1791 lines
1.5 MiB
1791 lines
1.5 MiB
var F2=Object.defineProperty;var q2=(t,e,n)=>e in t?F2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var mn=(t,e,n)=>(q2(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const h of l.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();/**
|
||
* @vue/shared v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**//*! #__NO_SIDE_EFFECTS__ */function Ap(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const gn={},ss=[],Ti=()=>{},h4=()=>!1,Mc=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Mp=t=>t.startsWith("onUpdate:"),lr=Object.assign,Cp=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},j2=Object.prototype.hasOwnProperty,an=(t,e)=>j2.call(t,e),Ot=Array.isArray,ls=t=>Cc(t)==="[object Map]",p4=t=>Cc(t)==="[object Set]",Ft=t=>typeof t=="function",Vn=t=>typeof t=="string",co=t=>typeof t=="symbol",Rn=t=>t!==null&&typeof t=="object",f4=t=>(Rn(t)||Ft(t))&&Ft(t.then)&&Ft(t.catch),m4=Object.prototype.toString,Cc=t=>m4.call(t),$2=t=>Cc(t).slice(8,-1),g4=t=>Cc(t)==="[object Object]",Lp=t=>Vn(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,vl=Ap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Lc=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},U2=/-(\w)/g,eo=Lc(t=>t.replace(U2,(e,n)=>n?n.toUpperCase():"")),V2=/\B([A-Z])/g,uo=Lc(t=>t.replace(V2,"-$1").toLowerCase()),v4=Lc(t=>t.charAt(0).toUpperCase()+t.slice(1)),Dd=Lc(t=>t?`on${v4(t)}`:""),Qa=(t,e)=>!Object.is(t,e),_0=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},b4=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},Ch=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let E1;const _c=()=>E1||(E1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ms(t){if(Ot(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],o=Vn(r)?X2(r):ms(r);if(o)for(const l in o)e[l]=o[l]}return e}else if(Vn(t)||Rn(t))return t}const W2=/;(?![^(]*\))/g,G2=/:([^]+)/,K2=/\/\*[^]*?\*\//g;function X2(t){const e={};return t.replace(K2,"").split(W2).forEach(n=>{if(n){const r=n.split(G2);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function zo(t){let e="";if(Vn(t))e=t;else if(Ot(t))for(let n=0;n<t.length;n++){const r=zo(t[n]);r&&(e+=r+" ")}else if(Rn(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const Z2="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Y2=Ap(Z2);function y4(t){return!!t||t===""}const w4=t=>!!(t&&t.__v_isRef===!0),ti=t=>Vn(t)?t:t==null?"":Ot(t)||Rn(t)&&(t.toString===m4||!Ft(t.toString))?w4(t)?ti(t.value):JSON.stringify(t,x4,2):String(t),x4=(t,e)=>w4(e)?x4(t,e.value):ls(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,o],l)=>(n[Rd(r,l)+" =>"]=o,n),{})}:p4(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Rd(n))}:co(e)?Rd(e):Rn(e)&&!Ot(e)&&!g4(e)?String(e):e,Rd=(t,e="")=>{var n;return co(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
|
||
* @vue/reactivity v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let Nr;class J2{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Nr,!e&&Nr&&(this.index=(Nr.scopes||(Nr.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=Nr;try{return Nr=this,e()}finally{Nr=n}}}on(){++this._on===1&&(this.prevScope=Nr,Nr=this)}off(){this._on>0&&--this._on===0&&(Nr=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Q2(){return Nr}let yn;const Id=new WeakSet;class k4{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Nr&&Nr.active&&Nr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Id.has(this)&&(Id.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||E4(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,T1(this),T4(this);const e=yn,n=Ai;yn=this,Ai=!0;try{return this.fn()}finally{A4(this),yn=e,Ai=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Dp(e);this.deps=this.depsTail=void 0,T1(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Id.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Lh(this)&&this.run()}get dirty(){return Lh(this)}}let S4=0,bl,yl;function E4(t,e=!1){if(t.flags|=8,e){t.next=yl,yl=t;return}t.next=bl,bl=t}function _p(){S4++}function Np(){if(--S4>0)return;if(yl){let e=yl;for(yl=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;bl;){let e=bl;for(bl=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function T4(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function A4(t){let e,n=t.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Dp(r),e5(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}t.deps=e,t.depsTail=n}function Lh(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(M4(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function M4(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===_l)||(t.globalVersion=_l,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Lh(t))))return;t.flags|=2;const e=t.dep,n=yn,r=Ai;yn=t,Ai=!0;try{T4(t);const o=t.fn(t._value);(e.version===0||Qa(o,t._value))&&(t.flags|=128,t._value=o,e.version++)}catch(o){throw e.version++,o}finally{yn=n,Ai=r,A4(t),t.flags&=-3}}function Dp(t,e=!1){const{dep:n,prevSub:r,nextSub:o}=t;if(r&&(r.nextSub=o,t.prevSub=void 0),o&&(o.prevSub=r,t.nextSub=void 0),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)Dp(l,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function e5(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let Ai=!0;const C4=[];function Aa(){C4.push(Ai),Ai=!1}function Ma(){const t=C4.pop();Ai=t===void 0?!0:t}function T1(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=yn;yn=void 0;try{e()}finally{yn=n}}}let _l=0;class t5{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rp{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!yn||!Ai||yn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==yn)n=this.activeLink=new t5(yn,this),yn.deps?(n.prevDep=yn.depsTail,yn.depsTail.nextDep=n,yn.depsTail=n):yn.deps=yn.depsTail=n,L4(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=yn.depsTail,n.nextDep=void 0,yn.depsTail.nextDep=n,yn.depsTail=n,yn.deps===n&&(yn.deps=r)}return n}trigger(e){this.version++,_l++,this.notify(e)}notify(e){_p();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Np()}}}function L4(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)L4(r)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const _h=new WeakMap,Ho=Symbol(""),Nh=Symbol(""),Nl=Symbol("");function pr(t,e,n){if(Ai&&yn){let r=_h.get(t);r||_h.set(t,r=new Map);let o=r.get(n);o||(r.set(n,o=new Rp),o.map=r,o.key=n),o.track()}}function fa(t,e,n,r,o,l){const h=_h.get(t);if(!h){_l++;return}const c=p=>{p&&p.trigger()};if(_p(),e==="clear")h.forEach(c);else{const p=Ot(t),v=p&&Lp(n);if(p&&n==="length"){const b=Number(r);h.forEach((g,m)=>{(m==="length"||m===Nl||!co(m)&&m>=b)&&c(g)})}else switch((n!==void 0||h.has(void 0))&&c(h.get(n)),v&&c(h.get(Nl)),e){case"add":p?v&&c(h.get("length")):(c(h.get(Ho)),ls(t)&&c(h.get(Nh)));break;case"delete":p||(c(h.get(Ho)),ls(t)&&c(h.get(Nh)));break;case"set":ls(t)&&c(h.get(Ho));break}}Np()}function Yo(t){const e=rn(t);return e===t?e:(pr(e,"iterate",Nl),ai(t)?e:e.map(sr))}function Nc(t){return pr(t=rn(t),"iterate",Nl),t}const n5={__proto__:null,[Symbol.iterator](){return Od(this,Symbol.iterator,sr)},concat(...t){return Yo(this).concat(...t.map(e=>Ot(e)?Yo(e):e))},entries(){return Od(this,"entries",t=>(t[1]=sr(t[1]),t))},every(t,e){return la(this,"every",t,e,void 0,arguments)},filter(t,e){return la(this,"filter",t,e,n=>n.map(sr),arguments)},find(t,e){return la(this,"find",t,e,sr,arguments)},findIndex(t,e){return la(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return la(this,"findLast",t,e,sr,arguments)},findLastIndex(t,e){return la(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return la(this,"forEach",t,e,void 0,arguments)},includes(...t){return Hd(this,"includes",t)},indexOf(...t){return Hd(this,"indexOf",t)},join(t){return Yo(this).join(t)},lastIndexOf(...t){return Hd(this,"lastIndexOf",t)},map(t,e){return la(this,"map",t,e,void 0,arguments)},pop(){return tl(this,"pop")},push(...t){return tl(this,"push",t)},reduce(t,...e){return A1(this,"reduce",t,e)},reduceRight(t,...e){return A1(this,"reduceRight",t,e)},shift(){return tl(this,"shift")},some(t,e){return la(this,"some",t,e,void 0,arguments)},splice(...t){return tl(this,"splice",t)},toReversed(){return Yo(this).toReversed()},toSorted(t){return Yo(this).toSorted(t)},toSpliced(...t){return Yo(this).toSpliced(...t)},unshift(...t){return tl(this,"unshift",t)},values(){return Od(this,"values",sr)}};function Od(t,e,n){const r=Nc(t),o=r[e]();return r!==t&&!ai(t)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.value&&(l.value=n(l.value)),l}),o}const r5=Array.prototype;function la(t,e,n,r,o,l){const h=Nc(t),c=h!==t&&!ai(t),p=h[e];if(p!==r5[e]){const g=p.apply(t,l);return c?sr(g):g}let v=n;h!==t&&(c?v=function(g,m){return n.call(this,sr(g),m,t)}:n.length>2&&(v=function(g,m){return n.call(this,g,m,t)}));const b=p.call(h,v,r);return c&&o?o(b):b}function A1(t,e,n,r){const o=Nc(t);let l=n;return o!==t&&(ai(t)?n.length>3&&(l=function(h,c,p){return n.call(this,h,c,p,t)}):l=function(h,c,p){return n.call(this,h,sr(c),p,t)}),o[e](l,...r)}function Hd(t,e,n){const r=rn(t);pr(r,"iterate",Nl);const o=r[e](...n);return(o===-1||o===!1)&&Pp(n[0])?(n[0]=rn(n[0]),r[e](...n)):o}function tl(t,e,n=[]){Aa(),_p();const r=rn(t)[e].apply(t,n);return Np(),Ma(),r}const i5=Ap("__proto__,__v_isRef,__isVue"),_4=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(co));function a5(t){co(t)||(t=String(t));const e=rn(this);return pr(e,"has",t),e.hasOwnProperty(t)}class N4{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;const o=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return l;if(n==="__v_raw")return r===(o?l?m5:O4:l?I4:R4).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const h=Ot(e);if(!o){let p;if(h&&(p=n5[n]))return p;if(n==="hasOwnProperty")return a5}const c=Reflect.get(e,n,mr(e)?e:r);return(co(n)?_4.has(n):i5(n))||(o||pr(e,"get",n),l)?c:mr(c)?h&&Lp(n)?c:c.value:Rn(c)?o?H4(c):Op(c):c}}class D4 extends N4{constructor(e=!1){super(!1,e)}set(e,n,r,o){let l=e[n];if(!this._isShallow){const p=to(l);if(!ai(r)&&!to(r)&&(l=rn(l),r=rn(r)),!Ot(e)&&mr(l)&&!mr(r))return p||(l.value=r),!0}const h=Ot(e)&&Lp(n)?Number(n)<e.length:an(e,n),c=Reflect.set(e,n,r,mr(e)?e:o);return e===rn(o)&&(h?Qa(r,l)&&fa(e,"set",n,r):fa(e,"add",n,r)),c}deleteProperty(e,n){const r=an(e,n);e[n];const o=Reflect.deleteProperty(e,n);return o&&r&&fa(e,"delete",n,void 0),o}has(e,n){const r=Reflect.has(e,n);return(!co(n)||!_4.has(n))&&pr(e,"has",n),r}ownKeys(e){return pr(e,"iterate",Ot(e)?"length":Ho),Reflect.ownKeys(e)}}class o5 extends N4{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const s5=new D4,l5=new o5,c5=new D4(!0);const Dh=t=>t,n0=t=>Reflect.getPrototypeOf(t);function u5(t,e,n){return function(...r){const o=this.__v_raw,l=rn(o),h=ls(l),c=t==="entries"||t===Symbol.iterator&&h,p=t==="keys"&&h,v=o[t](...r),b=n?Dh:e?W0:sr;return!e&&pr(l,"iterate",p?Nh:Ho),{next(){const{value:g,done:m}=v.next();return m?{value:g,done:m}:{value:c?[b(g[0]),b(g[1])]:b(g),done:m}},[Symbol.iterator](){return this}}}}function r0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function d5(t,e){const n={get(o){const l=this.__v_raw,h=rn(l),c=rn(o);t||(Qa(o,c)&&pr(h,"get",o),pr(h,"get",c));const{has:p}=n0(h),v=e?Dh:t?W0:sr;if(p.call(h,o))return v(l.get(o));if(p.call(h,c))return v(l.get(c));l!==h&&l.get(o)},get size(){const o=this.__v_raw;return!t&&pr(rn(o),"iterate",Ho),o.size},has(o){const l=this.__v_raw,h=rn(l),c=rn(o);return t||(Qa(o,c)&&pr(h,"has",o),pr(h,"has",c)),o===c?l.has(o):l.has(o)||l.has(c)},forEach(o,l){const h=this,c=h.__v_raw,p=rn(c),v=e?Dh:t?W0:sr;return!t&&pr(p,"iterate",Ho),c.forEach((b,g)=>o.call(l,v(b),v(g),h))}};return lr(n,t?{add:r0("add"),set:r0("set"),delete:r0("delete"),clear:r0("clear")}:{add(o){!e&&!ai(o)&&!to(o)&&(o=rn(o));const l=rn(this);return n0(l).has.call(l,o)||(l.add(o),fa(l,"add",o,o)),this},set(o,l){!e&&!ai(l)&&!to(l)&&(l=rn(l));const h=rn(this),{has:c,get:p}=n0(h);let v=c.call(h,o);v||(o=rn(o),v=c.call(h,o));const b=p.call(h,o);return h.set(o,l),v?Qa(l,b)&&fa(h,"set",o,l):fa(h,"add",o,l),this},delete(o){const l=rn(this),{has:h,get:c}=n0(l);let p=h.call(l,o);p||(o=rn(o),p=h.call(l,o)),c&&c.call(l,o);const v=l.delete(o);return p&&fa(l,"delete",o,void 0),v},clear(){const o=rn(this),l=o.size!==0,h=o.clear();return l&&fa(o,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=u5(o,t,e)}),n}function Ip(t,e){const n=d5(t,e);return(r,o,l)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?r:Reflect.get(an(n,o)&&o in r?n:r,o,l)}const h5={get:Ip(!1,!1)},p5={get:Ip(!1,!0)},f5={get:Ip(!0,!1)};const R4=new WeakMap,I4=new WeakMap,O4=new WeakMap,m5=new WeakMap;function g5(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function v5(t){return t.__v_skip||!Object.isExtensible(t)?0:g5($2(t))}function Op(t){return to(t)?t:Hp(t,!1,s5,h5,R4)}function b5(t){return Hp(t,!1,c5,p5,I4)}function H4(t){return Hp(t,!0,l5,f5,O4)}function Hp(t,e,n,r,o){if(!Rn(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const l=v5(t);if(l===0)return t;const h=o.get(t);if(h)return h;const c=new Proxy(t,l===2?r:n);return o.set(t,c),c}function cs(t){return to(t)?cs(t.__v_raw):!!(t&&t.__v_isReactive)}function to(t){return!!(t&&t.__v_isReadonly)}function ai(t){return!!(t&&t.__v_isShallow)}function Pp(t){return t?!!t.__v_raw:!1}function rn(t){const e=t&&t.__v_raw;return e?rn(e):t}function y5(t){return!an(t,"__v_skip")&&Object.isExtensible(t)&&b4(t,"__v_skip",!0),t}const sr=t=>Rn(t)?Op(t):t,W0=t=>Rn(t)?H4(t):t;function mr(t){return t?t.__v_isRef===!0:!1}function yt(t){return w5(t,!1)}function w5(t,e){return mr(t)?t:new x5(t,e)}class x5{constructor(e,n){this.dep=new Rp,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:rn(e),this._value=n?e:sr(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,r=this.__v_isShallow||ai(e)||to(e);e=r?e:rn(e),Qa(e,n)&&(this._rawValue=e,this._value=r?e:sr(e),this.dep.trigger())}}function k5(t){return mr(t)?t.value:t}const S5={get:(t,e,n)=>e==="__v_raw"?t:k5(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const o=t[e];return mr(o)&&!mr(n)?(o.value=n,!0):Reflect.set(t,e,n,r)}};function P4(t){return cs(t)?t:new Proxy(t,S5)}class E5{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new Rp(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=_l-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&yn!==this)return E4(this,!0),!0}get value(){const e=this.dep.track();return M4(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function T5(t,e,n=!1){let r,o;return Ft(t)?r=t:(r=t.get,o=t.set),new E5(r,o,n)}const i0={},G0=new WeakMap;let Io;function A5(t,e=!1,n=Io){if(n){let r=G0.get(n);r||G0.set(n,r=[]),r.push(t)}}function M5(t,e,n=gn){const{immediate:r,deep:o,once:l,scheduler:h,augmentJob:c,call:p}=n,v=M=>o?M:ai(M)||o===!1||o===0?ma(M,1):ma(M);let b,g,m,x,w=!1,S=!1;if(mr(t)?(g=()=>t.value,w=ai(t)):cs(t)?(g=()=>v(t),w=!0):Ot(t)?(S=!0,w=t.some(M=>cs(M)||ai(M)),g=()=>t.map(M=>{if(mr(M))return M.value;if(cs(M))return v(M);if(Ft(M))return p?p(M,2):M()})):Ft(t)?e?g=p?()=>p(t,2):t:g=()=>{if(m){Aa();try{m()}finally{Ma()}}const M=Io;Io=b;try{return p?p(t,3,[x]):t(x)}finally{Io=M}}:g=Ti,e&&o){const M=g,y=o===!0?1/0:o;g=()=>ma(M(),y)}const k=Q2(),C=()=>{b.stop(),k&&k.active&&Cp(k.effects,b)};if(l&&e){const M=e;e=(...y)=>{M(...y),C()}}let T=S?new Array(t.length).fill(i0):i0;const A=M=>{if(!(!(b.flags&1)||!b.dirty&&!M))if(e){const y=b.run();if(o||w||(S?y.some((N,z)=>Qa(N,T[z])):Qa(y,T))){m&&m();const N=Io;Io=b;try{const z=[y,T===i0?void 0:S&&T[0]===i0?[]:T,x];T=y,p?p(e,3,z):e(...z)}finally{Io=N}}}else b.run()};return c&&c(A),b=new k4(g),b.scheduler=h?()=>h(A,!1):A,x=M=>A5(M,!1,b),m=b.onStop=()=>{const M=G0.get(b);if(M){if(p)p(M,4);else for(const y of M)y();G0.delete(b)}},e?r?A(!0):T=b.run():h?h(A.bind(null,!0),!0):b.run(),C.pause=b.pause.bind(b),C.resume=b.resume.bind(b),C.stop=C,C}function ma(t,e=1/0,n){if(e<=0||!Rn(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,mr(t))ma(t.value,e,n);else if(Ot(t))for(let r=0;r<t.length;r++)ma(t[r],e,n);else if(p4(t)||ls(t))t.forEach(r=>{ma(r,e,n)});else if(g4(t)){for(const r in t)ma(t[r],e,n);for(const r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&ma(t[r],e,n)}return t}/**
|
||
* @vue/runtime-core v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/function Fl(t,e,n,r){try{return r?t(...r):t()}catch(o){Dc(o,e,n)}}function $i(t,e,n,r){if(Ft(t)){const o=Fl(t,e,n,r);return o&&f4(o)&&o.catch(l=>{Dc(l,e,n)}),o}if(Ot(t)){const o=[];for(let l=0;l<t.length;l++)o.push($i(t[l],e,n,r));return o}}function Dc(t,e,n,r=!0){const o=e?e.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:h}=e&&e.appContext.config||gn;if(e){let c=e.parent;const p=e.proxy,v=`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const b=c.ec;if(b){for(let g=0;g<b.length;g++)if(b[g](t,p,v)===!1)return}c=c.parent}if(l){Aa(),Fl(l,null,10,[t,p,v]),Ma();return}}C5(t,n,o,r,h)}function C5(t,e,n,r=!0,o=!1){if(o)throw t;console.error(t)}const xr=[];let Oi=-1;const us=[];let Ka=null,is=0;const z4=Promise.resolve();let K0=null;function Ga(t){const e=K0||z4;return t?e.then(this?t.bind(this):t):e}function L5(t){let e=Oi+1,n=xr.length;for(;e<n;){const r=e+n>>>1,o=xr[r],l=Dl(o);l<t||l===t&&o.flags&2?e=r+1:n=r}return e}function zp(t){if(!(t.flags&1)){const e=Dl(t),n=xr[xr.length-1];!n||!(t.flags&2)&&e>=Dl(n)?xr.push(t):xr.splice(L5(e),0,t),t.flags|=1,B4()}}function B4(){K0||(K0=z4.then(q4))}function _5(t){Ot(t)?us.push(...t):Ka&&t.id===-1?Ka.splice(is+1,0,t):t.flags&1||(us.push(t),t.flags|=1),B4()}function M1(t,e,n=Oi+1){for(;n<xr.length;n++){const r=xr[n];if(r&&r.flags&2){if(t&&r.id!==t.uid)continue;xr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function F4(t){if(us.length){const e=[...new Set(us)].sort((n,r)=>Dl(n)-Dl(r));if(us.length=0,Ka){Ka.push(...e);return}for(Ka=e,is=0;is<Ka.length;is++){const n=Ka[is];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ka=null,is=0}}const Dl=t=>t.id==null?t.flags&2?-1:1/0:t.id;function q4(t){const e=Ti;try{for(Oi=0;Oi<xr.length;Oi++){const n=xr[Oi];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Fl(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Oi<xr.length;Oi++){const n=xr[Oi];n&&(n.flags&=-2)}Oi=-1,xr.length=0,F4(),K0=null,(xr.length||us.length)&&q4()}}let ni=null,j4=null;function X0(t){const e=ni;return ni=t,j4=t&&t.type.__scopeId||null,e}function N5(t,e=ni,n){if(!e||t._n)return t;const r=(...o)=>{r._d&&O1(-1);const l=X0(e);let h;try{h=t(...o)}finally{X0(l),r._d&&O1(1)}return h};return r._n=!0,r._c=!0,r._d=!0,r}function Z0(t,e){if(ni===null)return t;const n=Pc(ni),r=t.dirs||(t.dirs=[]);for(let o=0;o<e.length;o++){let[l,h,c,p=gn]=e[o];l&&(Ft(l)&&(l={mounted:l,updated:l}),l.deep&&ma(h),r.push({dir:l,instance:n,value:h,oldValue:void 0,arg:c,modifiers:p}))}return t}function Mo(t,e,n,r){const o=t.dirs,l=e&&e.dirs;for(let h=0;h<o.length;h++){const c=o[h];l&&(c.oldValue=l[h].value);let p=c.dir[r];p&&(Aa(),$i(p,n,8,[t.el,c,t,e]),Ma())}}const D5=Symbol("_vte"),R5=t=>t.__isTeleport,I5=Symbol("_leaveCb");function Bp(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Bp(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function $4(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function wl(t,e,n,r,o=!1){if(Ot(t)){t.forEach((w,S)=>wl(w,e&&(Ot(e)?e[S]:e),n,r,o));return}if(xl(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&wl(t,e,n,r.component.subTree);return}const l=r.shapeFlag&4?Pc(r.component):r.el,h=o?null:l,{i:c,r:p}=t,v=e&&e.r,b=c.refs===gn?c.refs={}:c.refs,g=c.setupState,m=rn(g),x=g===gn?h4:w=>an(m,w);if(v!=null&&v!==p){if(Vn(v))b[v]=null,x(v)&&(g[v]=null);else if(mr(v)){v.value=null;const w=e;w.k&&(b[w.k]=null)}}if(Ft(p))Fl(p,c,12,[h,b]);else{const w=Vn(p),S=mr(p);if(w||S){const k=()=>{if(t.f){const C=w?x(p)?g[p]:b[p]:p.value;if(o)Ot(C)&&Cp(C,l);else if(Ot(C))C.includes(l)||C.push(l);else if(w)b[p]=[l],x(p)&&(g[p]=b[p]);else{const T=[l];p.value=T,t.k&&(b[t.k]=T)}}else w?(b[p]=h,x(p)&&(g[p]=h)):S&&(p.value=h,t.k&&(b[t.k]=h))};h?(k.id=-1,Ur(k,n)):k()}}}_c().requestIdleCallback;_c().cancelIdleCallback;const xl=t=>!!t.type.__asyncLoader,U4=t=>t.type.__isKeepAlive;function O5(t,e){V4(t,"a",e)}function H5(t,e){V4(t,"da",e)}function V4(t,e,n=kr){const r=t.__wdc||(t.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return t()});if(Rc(e,r,n),n){let o=n.parent;for(;o&&o.parent;)U4(o.parent.vnode)&&P5(r,e,n,o),o=o.parent}}function P5(t,e,n,r){const o=Rc(e,t,r,!0);Ic(()=>{Cp(r[e],o)},n)}function Rc(t,e,n=kr,r=!1){if(n){const o=n[t]||(n[t]=[]),l=e.__weh||(e.__weh=(...h)=>{Aa();const c=ql(n),p=$i(e,n,t,h);return c(),Ma(),p});return r?o.unshift(l):o.push(l),l}}const Ia=t=>(e,n=kr)=>{(!Il||t==="sp")&&Rc(t,(...r)=>e(...r),n)},z5=Ia("bm"),Fp=Ia("m"),B5=Ia("bu"),F5=Ia("u"),q5=Ia("bum"),Ic=Ia("um"),j5=Ia("sp"),$5=Ia("rtg"),U5=Ia("rtc");function V5(t,e=kr){Rc("ec",t,e)}const W5=Symbol.for("v-ndc");function W4(t,e,n,r){let o;const l=n&&n[r],h=Ot(t);if(h||Vn(t)){const c=h&&cs(t);let p=!1,v=!1;c&&(p=!ai(t),v=to(t),t=Nc(t)),o=new Array(t.length);for(let b=0,g=t.length;b<g;b++)o[b]=e(p?v?W0(sr(t[b])):sr(t[b]):t[b],b,void 0,l&&l[b])}else if(typeof t=="number"){o=new Array(t);for(let c=0;c<t;c++)o[c]=e(c+1,c,void 0,l&&l[c])}else if(Rn(t))if(t[Symbol.iterator])o=Array.from(t,(c,p)=>e(c,p,void 0,l&&l[p]));else{const c=Object.keys(t);o=new Array(c.length);for(let p=0,v=c.length;p<v;p++){const b=c[p];o[p]=e(t[b],b,p,l&&l[p])}}else o=[];return n&&(n[r]=o),o}const Rh=t=>t?hv(t)?Pc(t):Rh(t.parent):null,kl=lr(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Rh(t.parent),$root:t=>Rh(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>qp(t),$forceUpdate:t=>t.f||(t.f=()=>{zp(t.update)}),$nextTick:t=>t.n||(t.n=Ga.bind(t.proxy)),$watch:t=>fb.bind(t)}),Pd=(t,e)=>t!==gn&&!t.__isScriptSetup&&an(t,e),G5={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:l,accessCache:h,type:c,appContext:p}=t;let v;if(e[0]!=="$"){const x=h[e];if(x!==void 0)switch(x){case 1:return r[e];case 2:return o[e];case 4:return n[e];case 3:return l[e]}else{if(Pd(r,e))return h[e]=1,r[e];if(o!==gn&&an(o,e))return h[e]=2,o[e];if((v=t.propsOptions[0])&&an(v,e))return h[e]=3,l[e];if(n!==gn&&an(n,e))return h[e]=4,n[e];Ih&&(h[e]=0)}}const b=kl[e];let g,m;if(b)return e==="$attrs"&&pr(t.attrs,"get",""),b(t);if((g=c.__cssModules)&&(g=g[e]))return g;if(n!==gn&&an(n,e))return h[e]=4,n[e];if(m=p.config.globalProperties,an(m,e))return m[e]},set({_:t},e,n){const{data:r,setupState:o,ctx:l}=t;return Pd(o,e)?(o[e]=n,!0):r!==gn&&an(r,e)?(r[e]=n,!0):an(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(l[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:o,propsOptions:l,type:h}},c){let p,v;return!!(n[c]||t!==gn&&c[0]!=="$"&&an(t,c)||Pd(e,c)||(p=l[0])&&an(p,c)||an(r,c)||an(kl,c)||an(o.config.globalProperties,c)||(v=h.__cssModules)&&v[c])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:an(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function C1(t){return Ot(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Ih=!0;function K5(t){const e=qp(t),n=t.proxy,r=t.ctx;Ih=!1,e.beforeCreate&&L1(e.beforeCreate,t,"bc");const{data:o,computed:l,methods:h,watch:c,provide:p,inject:v,created:b,beforeMount:g,mounted:m,beforeUpdate:x,updated:w,activated:S,deactivated:k,beforeDestroy:C,beforeUnmount:T,destroyed:A,unmounted:M,render:y,renderTracked:N,renderTriggered:z,errorCaptured:F,serverPrefetch:P,expose:Y,inheritAttrs:te,components:de,directives:Ce,filters:qe}=e;if(v&&X5(v,r,null),h)for(const je in h){const Ne=h[je];Ft(Ne)&&(r[je]=Ne.bind(n))}if(o){const je=o.call(n,n);Rn(je)&&(t.data=Op(je))}if(Ih=!0,l)for(const je in l){const Ne=l[je],tt=Ft(Ne)?Ne.bind(n,n):Ft(Ne.get)?Ne.get.bind(n,n):Ti,lt=!Ft(Ne)&&Ft(Ne.set)?Ne.set.bind(n):Ti,Qe=fv({get:tt,set:lt});Object.defineProperty(r,je,{enumerable:!0,configurable:!0,get:()=>Qe.value,set:j=>Qe.value=j})}if(c)for(const je in c)G4(c[je],r,n,je);if(p){const je=Ft(p)?p.call(n):p;Reflect.ownKeys(je).forEach(Ne=>{tb(Ne,je[Ne])})}b&&L1(b,t,"c");function nt(je,Ne){Ot(Ne)?Ne.forEach(tt=>je(tt.bind(n))):Ne&&je(Ne.bind(n))}if(nt(z5,g),nt(Fp,m),nt(B5,x),nt(F5,w),nt(O5,S),nt(H5,k),nt(V5,F),nt(U5,N),nt($5,z),nt(q5,T),nt(Ic,M),nt(j5,P),Ot(Y))if(Y.length){const je=t.exposed||(t.exposed={});Y.forEach(Ne=>{Object.defineProperty(je,Ne,{get:()=>n[Ne],set:tt=>n[Ne]=tt,enumerable:!0})})}else t.exposed||(t.exposed={});y&&t.render===Ti&&(t.render=y),te!=null&&(t.inheritAttrs=te),de&&(t.components=de),Ce&&(t.directives=Ce),P&&$4(t)}function X5(t,e,n=Ti){Ot(t)&&(t=Oh(t));for(const r in t){const o=t[r];let l;Rn(o)?"default"in o?l=N0(o.from||r,o.default,!0):l=N0(o.from||r):l=N0(o),mr(l)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>l.value,set:h=>l.value=h}):e[r]=l}}function L1(t,e,n){$i(Ot(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function G4(t,e,n,r){let o=r.includes(".")?ov(n,r):()=>n[r];if(Vn(t)){const l=e[t];Ft(l)&&Sl(o,l)}else if(Ft(t))Sl(o,t.bind(n));else if(Rn(t))if(Ot(t))t.forEach(l=>G4(l,e,n,r));else{const l=Ft(t.handler)?t.handler.bind(n):e[t.handler];Ft(l)&&Sl(o,l,t)}}function qp(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:o,optionsCache:l,config:{optionMergeStrategies:h}}=t.appContext,c=l.get(e);let p;return c?p=c:!o.length&&!n&&!r?p=e:(p={},o.length&&o.forEach(v=>Y0(p,v,h,!0)),Y0(p,e,h)),Rn(e)&&l.set(e,p),p}function Y0(t,e,n,r=!1){const{mixins:o,extends:l}=e;l&&Y0(t,l,n,!0),o&&o.forEach(h=>Y0(t,h,n,!0));for(const h in e)if(!(r&&h==="expose")){const c=Z5[h]||n&&n[h];t[h]=c?c(t[h],e[h]):e[h]}return t}const Z5={data:_1,props:N1,emits:N1,methods:pl,computed:pl,beforeCreate:wr,created:wr,beforeMount:wr,mounted:wr,beforeUpdate:wr,updated:wr,beforeDestroy:wr,beforeUnmount:wr,destroyed:wr,unmounted:wr,activated:wr,deactivated:wr,errorCaptured:wr,serverPrefetch:wr,components:pl,directives:pl,watch:J5,provide:_1,inject:Y5};function _1(t,e){return e?t?function(){return lr(Ft(t)?t.call(this,this):t,Ft(e)?e.call(this,this):e)}:e:t}function Y5(t,e){return pl(Oh(t),Oh(e))}function Oh(t){if(Ot(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function wr(t,e){return t?[...new Set([].concat(t,e))]:e}function pl(t,e){return t?lr(Object.create(null),t,e):e}function N1(t,e){return t?Ot(t)&&Ot(e)?[...new Set([...t,...e])]:lr(Object.create(null),C1(t),C1(e??{})):e}function J5(t,e){if(!t)return e;if(!e)return t;const n=lr(Object.create(null),t);for(const r in e)n[r]=wr(t[r],e[r]);return n}function K4(){return{app:null,config:{isNativeTag:h4,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Q5=0;function eb(t,e){return function(r,o=null){Ft(r)||(r=lr({},r)),o!=null&&!Rn(o)&&(o=null);const l=K4(),h=new WeakSet,c=[];let p=!1;const v=l.app={_uid:Q5++,_component:r,_props:o,_container:null,_context:l,_instance:null,version:Hb,get config(){return l.config},set config(b){},use(b,...g){return h.has(b)||(b&&Ft(b.install)?(h.add(b),b.install(v,...g)):Ft(b)&&(h.add(b),b(v,...g))),v},mixin(b){return l.mixins.includes(b)||l.mixins.push(b),v},component(b,g){return g?(l.components[b]=g,v):l.components[b]},directive(b,g){return g?(l.directives[b]=g,v):l.directives[b]},mount(b,g,m){if(!p){const x=v._ceVNode||Zr(r,o);return x.appContext=l,m===!0?m="svg":m===!1&&(m=void 0),g&&e?e(x,b):t(x,b,m),p=!0,v._container=b,b.__vue_app__=v,Pc(x.component)}},onUnmount(b){c.push(b)},unmount(){p&&($i(c,v._instance,16),t(null,v._container),delete v._container.__vue_app__)},provide(b,g){return l.provides[b]=g,v},runWithContext(b){const g=ds;ds=v;try{return b()}finally{ds=g}}};return v}}let ds=null;function tb(t,e){if(kr){let n=kr.provides;const r=kr.parent&&kr.parent.provides;r===n&&(n=kr.provides=Object.create(r)),n[t]=e}}function N0(t,e,n=!1){const r=_b();if(r||ds){let o=ds?ds._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&t in o)return o[t];if(arguments.length>1)return n&&Ft(e)?e.call(r&&r.proxy):e}}const X4={},Z4=()=>Object.create(X4),Y4=t=>Object.getPrototypeOf(t)===X4;function nb(t,e,n,r=!1){const o={},l=Z4();t.propsDefaults=Object.create(null),J4(t,e,o,l);for(const h in t.propsOptions[0])h in o||(o[h]=void 0);n?t.props=r?o:b5(o):t.type.props?t.props=o:t.props=l,t.attrs=l}function rb(t,e,n,r){const{props:o,attrs:l,vnode:{patchFlag:h}}=t,c=rn(o),[p]=t.propsOptions;let v=!1;if((r||h>0)&&!(h&16)){if(h&8){const b=t.vnode.dynamicProps;for(let g=0;g<b.length;g++){let m=b[g];if(Oc(t.emitsOptions,m))continue;const x=e[m];if(p)if(an(l,m))x!==l[m]&&(l[m]=x,v=!0);else{const w=eo(m);o[w]=Hh(p,c,w,x,t,!1)}else x!==l[m]&&(l[m]=x,v=!0)}}}else{J4(t,e,o,l)&&(v=!0);let b;for(const g in c)(!e||!an(e,g)&&((b=uo(g))===g||!an(e,b)))&&(p?n&&(n[g]!==void 0||n[b]!==void 0)&&(o[g]=Hh(p,c,g,void 0,t,!0)):delete o[g]);if(l!==c)for(const g in l)(!e||!an(e,g))&&(delete l[g],v=!0)}v&&fa(t.attrs,"set","")}function J4(t,e,n,r){const[o,l]=t.propsOptions;let h=!1,c;if(e)for(let p in e){if(vl(p))continue;const v=e[p];let b;o&&an(o,b=eo(p))?!l||!l.includes(b)?n[b]=v:(c||(c={}))[b]=v:Oc(t.emitsOptions,p)||(!(p in r)||v!==r[p])&&(r[p]=v,h=!0)}if(l){const p=rn(n),v=c||gn;for(let b=0;b<l.length;b++){const g=l[b];n[g]=Hh(o,p,g,v[g],t,!an(v,g))}}return h}function Hh(t,e,n,r,o,l){const h=t[n];if(h!=null){const c=an(h,"default");if(c&&r===void 0){const p=h.default;if(h.type!==Function&&!h.skipFactory&&Ft(p)){const{propsDefaults:v}=o;if(n in v)r=v[n];else{const b=ql(o);r=v[n]=p.call(null,e),b()}}else r=p;o.ce&&o.ce._setProp(n,r)}h[0]&&(l&&!c?r=!1:h[1]&&(r===""||r===uo(n))&&(r=!0))}return r}const ib=new WeakMap;function Q4(t,e,n=!1){const r=n?ib:e.propsCache,o=r.get(t);if(o)return o;const l=t.props,h={},c=[];let p=!1;if(!Ft(t)){const b=g=>{p=!0;const[m,x]=Q4(g,e,!0);lr(h,m),x&&c.push(...x)};!n&&e.mixins.length&&e.mixins.forEach(b),t.extends&&b(t.extends),t.mixins&&t.mixins.forEach(b)}if(!l&&!p)return Rn(t)&&r.set(t,ss),ss;if(Ot(l))for(let b=0;b<l.length;b++){const g=eo(l[b]);D1(g)&&(h[g]=gn)}else if(l)for(const b in l){const g=eo(b);if(D1(g)){const m=l[b],x=h[g]=Ot(m)||Ft(m)?{type:m}:lr({},m),w=x.type;let S=!1,k=!0;if(Ot(w))for(let C=0;C<w.length;++C){const T=w[C],A=Ft(T)&&T.name;if(A==="Boolean"){S=!0;break}else A==="String"&&(k=!1)}else S=Ft(w)&&w.name==="Boolean";x[0]=S,x[1]=k,(S||an(x,"default"))&&c.push(g)}}const v=[h,c];return Rn(t)&&r.set(t,v),v}function D1(t){return t[0]!=="$"&&!vl(t)}const jp=t=>t==="_"||t==="_ctx"||t==="$stable",$p=t=>Ot(t)?t.map(Hi):[Hi(t)],ab=(t,e,n)=>{if(e._n)return e;const r=N5((...o)=>$p(e(...o)),n);return r._c=!1,r},ev=(t,e,n)=>{const r=t._ctx;for(const o in t){if(jp(o))continue;const l=t[o];if(Ft(l))e[o]=ab(o,l,r);else if(l!=null){const h=$p(l);e[o]=()=>h}}},tv=(t,e)=>{const n=$p(e);t.slots.default=()=>n},nv=(t,e,n)=>{for(const r in e)(n||!jp(r))&&(t[r]=e[r])},ob=(t,e,n)=>{const r=t.slots=Z4();if(t.vnode.shapeFlag&32){const o=e._;o?(nv(r,e,n),n&&b4(r,"_",o,!0)):ev(e,r)}else e&&tv(t,e)},sb=(t,e,n)=>{const{vnode:r,slots:o}=t;let l=!0,h=gn;if(r.shapeFlag&32){const c=e._;c?n&&c===1?l=!1:nv(o,e,n):(l=!e.$stable,ev(e,o)),h=e}else e&&(tv(t,e),h={default:1});if(l)for(const c in o)!jp(c)&&h[c]==null&&delete o[c]},Ur=xb;function lb(t){return cb(t)}function cb(t,e){const n=_c();n.__VUE__=!0;const{insert:r,remove:o,patchProp:l,createElement:h,createText:c,createComment:p,setText:v,setElementText:b,parentNode:g,nextSibling:m,setScopeId:x=Ti,insertStaticContent:w}=t,S=(V,Z,ve,le=null,we=null,Ae=null,Fe=void 0,Ke=null,Xe=!!Z.dynamicChildren)=>{if(V===Z)return;V&&!nl(V,Z)&&(le=oe(V),j(V,we,Ae,!0),V=null),Z.patchFlag===-2&&(Xe=!1,Z.dynamicChildren=null);const{type:Be,ref:ot,shapeFlag:Ue}=Z;switch(Be){case Hc:k(V,Z,ve,le);break;case no:C(V,Z,ve,le);break;case D0:V==null&&T(Z,ve,le,Fe);break;case Ei:de(V,Z,ve,le,we,Ae,Fe,Ke,Xe);break;default:Ue&1?y(V,Z,ve,le,we,Ae,Fe,Ke,Xe):Ue&6?Ce(V,Z,ve,le,we,Ae,Fe,Ke,Xe):(Ue&64||Ue&128)&&Be.process(V,Z,ve,le,we,Ae,Fe,Ke,Xe,ee)}ot!=null&&we?wl(ot,V&&V.ref,Ae,Z||V,!Z):ot==null&&V&&V.ref!=null&&wl(V.ref,null,Ae,V,!0)},k=(V,Z,ve,le)=>{if(V==null)r(Z.el=c(Z.children),ve,le);else{const we=Z.el=V.el;Z.children!==V.children&&v(we,Z.children)}},C=(V,Z,ve,le)=>{V==null?r(Z.el=p(Z.children||""),ve,le):Z.el=V.el},T=(V,Z,ve,le)=>{[V.el,V.anchor]=w(V.children,Z,ve,le,V.el,V.anchor)},A=({el:V,anchor:Z},ve,le)=>{let we;for(;V&&V!==Z;)we=m(V),r(V,ve,le),V=we;r(Z,ve,le)},M=({el:V,anchor:Z})=>{let ve;for(;V&&V!==Z;)ve=m(V),o(V),V=ve;o(Z)},y=(V,Z,ve,le,we,Ae,Fe,Ke,Xe)=>{Z.type==="svg"?Fe="svg":Z.type==="math"&&(Fe="mathml"),V==null?N(Z,ve,le,we,Ae,Fe,Ke,Xe):P(V,Z,we,Ae,Fe,Ke,Xe)},N=(V,Z,ve,le,we,Ae,Fe,Ke)=>{let Xe,Be;const{props:ot,shapeFlag:Ue,transition:Oe,dirs:mt}=V;if(Xe=V.el=h(V.type,Ae,ot&&ot.is,ot),Ue&8?b(Xe,V.children):Ue&16&&F(V.children,Xe,null,le,we,zd(V,Ae),Fe,Ke),mt&&Mo(V,null,le,"created"),z(Xe,V,V.scopeId,Fe,le),ot){for(const Vt in ot)Vt!=="value"&&!vl(Vt)&&l(Xe,Vt,null,ot[Vt],Ae,le);"value"in ot&&l(Xe,"value",null,ot.value,Ae),(Be=ot.onVnodeBeforeMount)&&_i(Be,le,V)}mt&&Mo(V,null,le,"beforeMount");const Ct=ub(we,Oe);Ct&&Oe.beforeEnter(Xe),r(Xe,Z,ve),((Be=ot&&ot.onVnodeMounted)||Ct||mt)&&Ur(()=>{Be&&_i(Be,le,V),Ct&&Oe.enter(Xe),mt&&Mo(V,null,le,"mounted")},we)},z=(V,Z,ve,le,we)=>{if(ve&&x(V,ve),le)for(let Ae=0;Ae<le.length;Ae++)x(V,le[Ae]);if(we){let Ae=we.subTree;if(Z===Ae||lv(Ae.type)&&(Ae.ssContent===Z||Ae.ssFallback===Z)){const Fe=we.vnode;z(V,Fe,Fe.scopeId,Fe.slotScopeIds,we.parent)}}},F=(V,Z,ve,le,we,Ae,Fe,Ke,Xe=0)=>{for(let Be=Xe;Be<V.length;Be++){const ot=V[Be]=Ke?Xa(V[Be]):Hi(V[Be]);S(null,ot,Z,ve,le,we,Ae,Fe,Ke)}},P=(V,Z,ve,le,we,Ae,Fe)=>{const Ke=Z.el=V.el;let{patchFlag:Xe,dynamicChildren:Be,dirs:ot}=Z;Xe|=V.patchFlag&16;const Ue=V.props||gn,Oe=Z.props||gn;let mt;if(ve&&Co(ve,!1),(mt=Oe.onVnodeBeforeUpdate)&&_i(mt,ve,Z,V),ot&&Mo(Z,V,ve,"beforeUpdate"),ve&&Co(ve,!0),(Ue.innerHTML&&Oe.innerHTML==null||Ue.textContent&&Oe.textContent==null)&&b(Ke,""),Be?Y(V.dynamicChildren,Be,Ke,ve,le,zd(Z,we),Ae):Fe||Ne(V,Z,Ke,null,ve,le,zd(Z,we),Ae,!1),Xe>0){if(Xe&16)te(Ke,Ue,Oe,ve,we);else if(Xe&2&&Ue.class!==Oe.class&&l(Ke,"class",null,Oe.class,we),Xe&4&&l(Ke,"style",Ue.style,Oe.style,we),Xe&8){const Ct=Z.dynamicProps;for(let Vt=0;Vt<Ct.length;Vt++){const $t=Ct[Vt],$n=Ue[$t],Mn=Oe[$t];(Mn!==$n||$t==="value")&&l(Ke,$t,$n,Mn,we,ve)}}Xe&1&&V.children!==Z.children&&b(Ke,Z.children)}else!Fe&&Be==null&&te(Ke,Ue,Oe,ve,we);((mt=Oe.onVnodeUpdated)||ot)&&Ur(()=>{mt&&_i(mt,ve,Z,V),ot&&Mo(Z,V,ve,"updated")},le)},Y=(V,Z,ve,le,we,Ae,Fe)=>{for(let Ke=0;Ke<Z.length;Ke++){const Xe=V[Ke],Be=Z[Ke],ot=Xe.el&&(Xe.type===Ei||!nl(Xe,Be)||Xe.shapeFlag&198)?g(Xe.el):ve;S(Xe,Be,ot,null,le,we,Ae,Fe,!0)}},te=(V,Z,ve,le,we)=>{if(Z!==ve){if(Z!==gn)for(const Ae in Z)!vl(Ae)&&!(Ae in ve)&&l(V,Ae,Z[Ae],null,we,le);for(const Ae in ve){if(vl(Ae))continue;const Fe=ve[Ae],Ke=Z[Ae];Fe!==Ke&&Ae!=="value"&&l(V,Ae,Ke,Fe,we,le)}"value"in ve&&l(V,"value",Z.value,ve.value,we)}},de=(V,Z,ve,le,we,Ae,Fe,Ke,Xe)=>{const Be=Z.el=V?V.el:c(""),ot=Z.anchor=V?V.anchor:c("");let{patchFlag:Ue,dynamicChildren:Oe,slotScopeIds:mt}=Z;mt&&(Ke=Ke?Ke.concat(mt):mt),V==null?(r(Be,ve,le),r(ot,ve,le),F(Z.children||[],ve,ot,we,Ae,Fe,Ke,Xe)):Ue>0&&Ue&64&&Oe&&V.dynamicChildren?(Y(V.dynamicChildren,Oe,ve,we,Ae,Fe,Ke),(Z.key!=null||we&&Z===we.subTree)&&rv(V,Z,!0)):Ne(V,Z,ve,ot,we,Ae,Fe,Ke,Xe)},Ce=(V,Z,ve,le,we,Ae,Fe,Ke,Xe)=>{Z.slotScopeIds=Ke,V==null?Z.shapeFlag&512?we.ctx.activate(Z,ve,le,Fe,Xe):qe(Z,ve,le,we,Ae,Fe,Xe):Ge(V,Z,Xe)},qe=(V,Z,ve,le,we,Ae,Fe)=>{const Ke=V.component=Lb(V,le,we);if(U4(V)&&(Ke.ctx.renderer=ee),Nb(Ke,!1,Fe),Ke.asyncDep){if(we&&we.registerDep(Ke,nt,Fe),!V.el){const Xe=Ke.subTree=Zr(no);C(null,Xe,Z,ve),V.placeholder=Xe.el}}else nt(Ke,V,Z,ve,we,Ae,Fe)},Ge=(V,Z,ve)=>{const le=Z.component=V.component;if(yb(V,Z,ve))if(le.asyncDep&&!le.asyncResolved){je(le,Z,ve);return}else le.next=Z,le.update();else Z.el=V.el,le.vnode=Z},nt=(V,Z,ve,le,we,Ae,Fe)=>{const Ke=()=>{if(V.isMounted){let{next:Ue,bu:Oe,u:mt,parent:Ct,vnode:Vt}=V;{const kn=iv(V);if(kn){Ue&&(Ue.el=Vt.el,je(V,Ue,Fe)),kn.asyncDep.then(()=>{V.isUnmounted||Ke()});return}}let $t=Ue,$n;Co(V,!1),Ue?(Ue.el=Vt.el,je(V,Ue,Fe)):Ue=Vt,Oe&&_0(Oe),($n=Ue.props&&Ue.props.onVnodeBeforeUpdate)&&_i($n,Ct,Ue,Vt),Co(V,!0);const Mn=Bd(V),In=V.subTree;V.subTree=Mn,S(In,Mn,g(In.el),oe(In),V,we,Ae),Ue.el=Mn.el,$t===null&&wb(V,Mn.el),mt&&Ur(mt,we),($n=Ue.props&&Ue.props.onVnodeUpdated)&&Ur(()=>_i($n,Ct,Ue,Vt),we)}else{let Ue;const{el:Oe,props:mt}=Z,{bm:Ct,m:Vt,parent:$t,root:$n,type:Mn}=V,In=xl(Z);if(Co(V,!1),Ct&&_0(Ct),!In&&(Ue=mt&&mt.onVnodeBeforeMount)&&_i(Ue,$t,Z),Co(V,!0),Oe&&se){const kn=()=>{V.subTree=Bd(V),se(Oe,V.subTree,V,we,null)};In&&Mn.__asyncHydrate?Mn.__asyncHydrate(Oe,V,kn):kn()}else{$n.ce&&$n.ce._def.shadowRoot!==!1&&$n.ce._injectChildStyle(Mn);const kn=V.subTree=Bd(V);S(null,kn,ve,le,V,we,Ae),Z.el=kn.el}if(Vt&&Ur(Vt,we),!In&&(Ue=mt&&mt.onVnodeMounted)){const kn=Z;Ur(()=>_i(Ue,$t,kn),we)}(Z.shapeFlag&256||$t&&xl($t.vnode)&&$t.vnode.shapeFlag&256)&&V.a&&Ur(V.a,we),V.isMounted=!0,Z=ve=le=null}};V.scope.on();const Xe=V.effect=new k4(Ke);V.scope.off();const Be=V.update=Xe.run.bind(Xe),ot=V.job=Xe.runIfDirty.bind(Xe);ot.i=V,ot.id=V.uid,Xe.scheduler=()=>zp(ot),Co(V,!0),Be()},je=(V,Z,ve)=>{Z.component=V;const le=V.vnode.props;V.vnode=Z,V.next=null,rb(V,Z.props,le,ve),sb(V,Z.children,ve),Aa(),M1(V),Ma()},Ne=(V,Z,ve,le,we,Ae,Fe,Ke,Xe=!1)=>{const Be=V&&V.children,ot=V?V.shapeFlag:0,Ue=Z.children,{patchFlag:Oe,shapeFlag:mt}=Z;if(Oe>0){if(Oe&128){lt(Be,Ue,ve,le,we,Ae,Fe,Ke,Xe);return}else if(Oe&256){tt(Be,Ue,ve,le,we,Ae,Fe,Ke,Xe);return}}mt&8?(ot&16&&Nt(Be,we,Ae),Ue!==Be&&b(ve,Ue)):ot&16?mt&16?lt(Be,Ue,ve,le,we,Ae,Fe,Ke,Xe):Nt(Be,we,Ae,!0):(ot&8&&b(ve,""),mt&16&&F(Ue,ve,le,we,Ae,Fe,Ke,Xe))},tt=(V,Z,ve,le,we,Ae,Fe,Ke,Xe)=>{V=V||ss,Z=Z||ss;const Be=V.length,ot=Z.length,Ue=Math.min(Be,ot);let Oe;for(Oe=0;Oe<Ue;Oe++){const mt=Z[Oe]=Xe?Xa(Z[Oe]):Hi(Z[Oe]);S(V[Oe],mt,ve,null,we,Ae,Fe,Ke,Xe)}Be>ot?Nt(V,we,Ae,!0,!1,Ue):F(Z,ve,le,we,Ae,Fe,Ke,Xe,Ue)},lt=(V,Z,ve,le,we,Ae,Fe,Ke,Xe)=>{let Be=0;const ot=Z.length;let Ue=V.length-1,Oe=ot-1;for(;Be<=Ue&&Be<=Oe;){const mt=V[Be],Ct=Z[Be]=Xe?Xa(Z[Be]):Hi(Z[Be]);if(nl(mt,Ct))S(mt,Ct,ve,null,we,Ae,Fe,Ke,Xe);else break;Be++}for(;Be<=Ue&&Be<=Oe;){const mt=V[Ue],Ct=Z[Oe]=Xe?Xa(Z[Oe]):Hi(Z[Oe]);if(nl(mt,Ct))S(mt,Ct,ve,null,we,Ae,Fe,Ke,Xe);else break;Ue--,Oe--}if(Be>Ue){if(Be<=Oe){const mt=Oe+1,Ct=mt<ot?Z[mt].el:le;for(;Be<=Oe;)S(null,Z[Be]=Xe?Xa(Z[Be]):Hi(Z[Be]),ve,Ct,we,Ae,Fe,Ke,Xe),Be++}}else if(Be>Oe)for(;Be<=Ue;)j(V[Be],we,Ae,!0),Be++;else{const mt=Be,Ct=Be,Vt=new Map;for(Be=Ct;Be<=Oe;Be++){const Xn=Z[Be]=Xe?Xa(Z[Be]):Hi(Z[Be]);Xn.key!=null&&Vt.set(Xn.key,Be)}let $t,$n=0;const Mn=Oe-Ct+1;let In=!1,kn=0;const gr=new Array(Mn);for(Be=0;Be<Mn;Be++)gr[Be]=0;for(Be=mt;Be<=Ue;Be++){const Xn=V[Be];if($n>=Mn){j(Xn,we,Ae,!0);continue}let It;if(Xn.key!=null)It=Vt.get(Xn.key);else for($t=Ct;$t<=Oe;$t++)if(gr[$t-Ct]===0&&nl(Xn,Z[$t])){It=$t;break}It===void 0?j(Xn,we,Ae,!0):(gr[It-Ct]=Be+1,It>=kn?kn=It:In=!0,S(Xn,Z[It],ve,null,we,Ae,Fe,Ke,Xe),$n++)}const nr=In?db(gr):ss;for($t=nr.length-1,Be=Mn-1;Be>=0;Be--){const Xn=Ct+Be,It=Z[Xn],zn=Z[Xn+1],nn=Xn+1<ot?zn.el||zn.placeholder:le;gr[Be]===0?S(null,It,ve,nn,we,Ae,Fe,Ke,Xe):In&&($t<0||Be!==nr[$t]?Qe(It,ve,nn,2):$t--)}}},Qe=(V,Z,ve,le,we=null)=>{const{el:Ae,type:Fe,transition:Ke,children:Xe,shapeFlag:Be}=V;if(Be&6){Qe(V.component.subTree,Z,ve,le);return}if(Be&128){V.suspense.move(Z,ve,le);return}if(Be&64){Fe.move(V,Z,ve,ee);return}if(Fe===Ei){r(Ae,Z,ve);for(let Ue=0;Ue<Xe.length;Ue++)Qe(Xe[Ue],Z,ve,le);r(V.anchor,Z,ve);return}if(Fe===D0){A(V,Z,ve);return}if(le!==2&&Be&1&&Ke)if(le===0)Ke.beforeEnter(Ae),r(Ae,Z,ve),Ur(()=>Ke.enter(Ae),we);else{const{leave:Ue,delayLeave:Oe,afterLeave:mt}=Ke,Ct=()=>{V.ctx.isUnmounted?o(Ae):r(Ae,Z,ve)},Vt=()=>{Ae._isLeaving&&Ae[I5](!0),Ue(Ae,()=>{Ct(),mt&&mt()})};Oe?Oe(Ae,Ct,Vt):Vt()}else r(Ae,Z,ve)},j=(V,Z,ve,le=!1,we=!1)=>{const{type:Ae,props:Fe,ref:Ke,children:Xe,dynamicChildren:Be,shapeFlag:ot,patchFlag:Ue,dirs:Oe,cacheIndex:mt}=V;if(Ue===-2&&(we=!1),Ke!=null&&(Aa(),wl(Ke,null,ve,V,!0),Ma()),mt!=null&&(Z.renderCache[mt]=void 0),ot&256){Z.ctx.deactivate(V);return}const Ct=ot&1&&Oe,Vt=!xl(V);let $t;if(Vt&&($t=Fe&&Fe.onVnodeBeforeUnmount)&&_i($t,Z,V),ot&6)Ut(V.component,ve,le);else{if(ot&128){V.suspense.unmount(ve,le);return}Ct&&Mo(V,null,Z,"beforeUnmount"),ot&64?V.type.remove(V,Z,ve,ee,le):Be&&!Be.hasOnce&&(Ae!==Ei||Ue>0&&Ue&64)?Nt(Be,Z,ve,!1,!0):(Ae===Ei&&Ue&384||!we&&ot&16)&&Nt(Xe,Z,ve),le&&Ht(V)}(Vt&&($t=Fe&&Fe.onVnodeUnmounted)||Ct)&&Ur(()=>{$t&&_i($t,Z,V),Ct&&Mo(V,null,Z,"unmounted")},ve)},Ht=V=>{const{type:Z,el:ve,anchor:le,transition:we}=V;if(Z===Ei){Rt(ve,le);return}if(Z===D0){M(V);return}const Ae=()=>{o(ve),we&&!we.persisted&&we.afterLeave&&we.afterLeave()};if(V.shapeFlag&1&&we&&!we.persisted){const{leave:Fe,delayLeave:Ke}=we,Xe=()=>Fe(ve,Ae);Ke?Ke(V.el,Ae,Xe):Xe()}else Ae()},Rt=(V,Z)=>{let ve;for(;V!==Z;)ve=m(V),o(V),V=ve;o(Z)},Ut=(V,Z,ve)=>{const{bum:le,scope:we,job:Ae,subTree:Fe,um:Ke,m:Xe,a:Be}=V;R1(Xe),R1(Be),le&&_0(le),we.stop(),Ae&&(Ae.flags|=8,j(Fe,V,Z,ve)),Ke&&Ur(Ke,Z),Ur(()=>{V.isUnmounted=!0},Z)},Nt=(V,Z,ve,le=!1,we=!1,Ae=0)=>{for(let Fe=Ae;Fe<V.length;Fe++)j(V[Fe],Z,ve,le,we)},oe=V=>{if(V.shapeFlag&6)return oe(V.component.subTree);if(V.shapeFlag&128)return V.suspense.next();const Z=m(V.anchor||V.el),ve=Z&&Z[D5];return ve?m(ve):Z};let he=!1;const J=(V,Z,ve)=>{V==null?Z._vnode&&j(Z._vnode,null,null,!0):S(Z._vnode||null,V,Z,null,null,null,ve),Z._vnode=V,he||(he=!0,M1(),F4(),he=!1)},ee={p:S,um:j,m:Qe,r:Ht,mt:qe,mc:F,pc:Ne,pbc:Y,n:oe,o:t};let De,se;return e&&([De,se]=e(ee)),{render:J,hydrate:De,createApp:eb(J,De)}}function zd({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Co({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function ub(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function rv(t,e,n=!1){const r=t.children,o=e.children;if(Ot(r)&&Ot(o))for(let l=0;l<r.length;l++){const h=r[l];let c=o[l];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=o[l]=Xa(o[l]),c.el=h.el),!n&&c.patchFlag!==-2&&rv(h,c)),c.type===Hc&&c.patchFlag!==-1&&(c.el=h.el),c.type===no&&!c.el&&(c.el=h.el)}}function db(t){const e=t.slice(),n=[0];let r,o,l,h,c;const p=t.length;for(r=0;r<p;r++){const v=t[r];if(v!==0){if(o=n[n.length-1],t[o]<v){e[r]=o,n.push(r);continue}for(l=0,h=n.length-1;l<h;)c=l+h>>1,t[n[c]]<v?l=c+1:h=c;v<t[n[l]]&&(l>0&&(e[r]=n[l-1]),n[l]=r)}}for(l=n.length,h=n[l-1];l-- >0;)n[l]=h,h=e[h];return n}function iv(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:iv(e)}function R1(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}const hb=Symbol.for("v-scx"),pb=()=>N0(hb);function Sl(t,e,n){return av(t,e,n)}function av(t,e,n=gn){const{immediate:r,deep:o,flush:l,once:h}=n,c=lr({},n),p=e&&r||!e&&l!=="post";let v;if(Il){if(l==="sync"){const x=pb();v=x.__watcherHandles||(x.__watcherHandles=[])}else if(!p){const x=()=>{};return x.stop=Ti,x.resume=Ti,x.pause=Ti,x}}const b=kr;c.call=(x,w,S)=>$i(x,b,w,S);let g=!1;l==="post"?c.scheduler=x=>{Ur(x,b&&b.suspense)}:l!=="sync"&&(g=!0,c.scheduler=(x,w)=>{w?x():zp(x)}),c.augmentJob=x=>{e&&(x.flags|=4),g&&(x.flags|=2,b&&(x.id=b.uid,x.i=b))};const m=M5(t,e,c);return Il&&(v?v.push(m):p&&m()),m}function fb(t,e,n){const r=this.proxy,o=Vn(t)?t.includes(".")?ov(r,t):()=>r[t]:t.bind(r,r);let l;Ft(e)?l=e:(l=e.handler,n=e);const h=ql(this),c=av(o,l.bind(r),n);return h(),c}function ov(t,e){const n=e.split(".");return()=>{let r=t;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}const mb=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${eo(e)}Modifiers`]||t[`${uo(e)}Modifiers`];function gb(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||gn;let o=n;const l=e.startsWith("update:"),h=l&&mb(r,e.slice(7));h&&(h.trim&&(o=n.map(b=>Vn(b)?b.trim():b)),h.number&&(o=n.map(Ch)));let c,p=r[c=Dd(e)]||r[c=Dd(eo(e))];!p&&l&&(p=r[c=Dd(uo(e))]),p&&$i(p,t,6,o);const v=r[c+"Once"];if(v){if(!t.emitted)t.emitted={};else if(t.emitted[c])return;t.emitted[c]=!0,$i(v,t,6,o)}}function sv(t,e,n=!1){const r=e.emitsCache,o=r.get(t);if(o!==void 0)return o;const l=t.emits;let h={},c=!1;if(!Ft(t)){const p=v=>{const b=sv(v,e,!0);b&&(c=!0,lr(h,b))};!n&&e.mixins.length&&e.mixins.forEach(p),t.extends&&p(t.extends),t.mixins&&t.mixins.forEach(p)}return!l&&!c?(Rn(t)&&r.set(t,null),null):(Ot(l)?l.forEach(p=>h[p]=null):lr(h,l),Rn(t)&&r.set(t,h),h)}function Oc(t,e){return!t||!Mc(e)?!1:(e=e.slice(2).replace(/Once$/,""),an(t,e[0].toLowerCase()+e.slice(1))||an(t,uo(e))||an(t,e))}function Bd(t){const{type:e,vnode:n,proxy:r,withProxy:o,propsOptions:[l],slots:h,attrs:c,emit:p,render:v,renderCache:b,props:g,data:m,setupState:x,ctx:w,inheritAttrs:S}=t,k=X0(t);let C,T;try{if(n.shapeFlag&4){const M=o||r,y=M;C=Hi(v.call(y,M,b,g,x,m,w)),T=c}else{const M=e;C=Hi(M.length>1?M(g,{attrs:c,slots:h,emit:p}):M(g,null)),T=e.props?c:vb(c)}}catch(M){El.length=0,Dc(M,t,1),C=Zr(no)}let A=C;if(T&&S!==!1){const M=Object.keys(T),{shapeFlag:y}=A;M.length&&y&7&&(l&&M.some(Mp)&&(T=bb(T,l)),A=gs(A,T,!1,!0))}return n.dirs&&(A=gs(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&Bp(A,n.transition),C=A,X0(k),C}const vb=t=>{let e;for(const n in t)(n==="class"||n==="style"||Mc(n))&&((e||(e={}))[n]=t[n]);return e},bb=(t,e)=>{const n={};for(const r in t)(!Mp(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function yb(t,e,n){const{props:r,children:o,component:l}=t,{props:h,children:c,patchFlag:p}=e,v=l.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&p>=0){if(p&1024)return!0;if(p&16)return r?I1(r,h,v):!!h;if(p&8){const b=e.dynamicProps;for(let g=0;g<b.length;g++){const m=b[g];if(h[m]!==r[m]&&!Oc(v,m))return!0}}}else return(o||c)&&(!c||!c.$stable)?!0:r===h?!1:r?h?I1(r,h,v):!0:!!h;return!1}function I1(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let o=0;o<r.length;o++){const l=r[o];if(e[l]!==t[l]&&!Oc(n,l))return!0}return!1}function wb({vnode:t,parent:e},n){for(;e;){const r=e.subTree;if(r.suspense&&r.suspense.activeBranch===t&&(r.el=t.el),r===t)(t=e.vnode).el=n,e=e.parent;else break}}const lv=t=>t.__isSuspense;function xb(t,e){e&&e.pendingBranch?Ot(t)?e.effects.push(...t):e.effects.push(t):_5(t)}const Ei=Symbol.for("v-fgt"),Hc=Symbol.for("v-txt"),no=Symbol.for("v-cmt"),D0=Symbol.for("v-stc"),El=[];let Xr=null;function Xt(t=!1){El.push(Xr=t?null:[])}function kb(){El.pop(),Xr=El[El.length-1]||null}let Rl=1;function O1(t,e=!1){Rl+=t,t<0&&Xr&&e&&(Xr.hasOnce=!0)}function cv(t){return t.dynamicChildren=Rl>0?Xr||ss:null,kb(),Rl>0&&Xr&&Xr.push(t),t}function Yt(t,e,n,r,o,l){return cv(Ie(t,e,n,r,o,l,!0))}function Sb(t,e,n,r,o){return cv(Zr(t,e,n,r,o,!0))}function uv(t){return t?t.__v_isVNode===!0:!1}function nl(t,e){return t.type===e.type&&t.key===e.key}const dv=({key:t})=>t??null,R0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Vn(t)||mr(t)||Ft(t)?{i:ni,r:t,k:e,f:!!n}:t:null);function Ie(t,e=null,n=null,r=0,o=null,l=t===Ei?0:1,h=!1,c=!1){const p={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&dv(e),ref:e&&R0(e),scopeId:j4,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:ni};return c?(Vp(p,n),l&128&&t.normalize(p)):n&&(p.shapeFlag|=Vn(n)?8:16),Rl>0&&!h&&Xr&&(p.patchFlag>0||l&6)&&p.patchFlag!==32&&Xr.push(p),p}const Zr=Eb;function Eb(t,e=null,n=null,r=0,o=null,l=!1){if((!t||t===W5)&&(t=no),uv(t)){const c=gs(t,e,!0);return n&&Vp(c,n),Rl>0&&!l&&Xr&&(c.shapeFlag&6?Xr[Xr.indexOf(t)]=c:Xr.push(c)),c.patchFlag=-2,c}if(Ob(t)&&(t=t.__vccOpts),e){e=Tb(e);let{class:c,style:p}=e;c&&!Vn(c)&&(e.class=zo(c)),Rn(p)&&(Pp(p)&&!Ot(p)&&(p=lr({},p)),e.style=ms(p))}const h=Vn(t)?1:lv(t)?128:R5(t)?64:Rn(t)?4:Ft(t)?2:0;return Ie(t,e,n,r,o,h,l,!0)}function Tb(t){return t?Pp(t)||Y4(t)?lr({},t):t:null}function gs(t,e,n=!1,r=!1){const{props:o,ref:l,patchFlag:h,children:c,transition:p}=t,v=e?Ab(o||{},e):o,b={__v_isVNode:!0,__v_skip:!0,type:t.type,props:v,key:v&&dv(v),ref:e&&e.ref?n&&l?Ot(l)?l.concat(R0(e)):[l,R0(e)]:R0(e):l,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:c,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Ei?h===-1?16:h|16:h,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:p,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&gs(t.ssContent),ssFallback:t.ssFallback&&gs(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return p&&r&&Bp(b,p.clone(b)),b}function Up(t=" ",e=0){return Zr(Hc,null,t,e)}function H1(t,e){const n=Zr(D0,null,t);return n.staticCount=e,n}function ei(t="",e=!1){return e?(Xt(),Sb(no,null,t)):Zr(no,null,t)}function Hi(t){return t==null||typeof t=="boolean"?Zr(no):Ot(t)?Zr(Ei,null,t.slice()):uv(t)?Xa(t):Zr(Hc,null,String(t))}function Xa(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:gs(t)}function Vp(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(Ot(e))n=16;else if(typeof e=="object")if(r&65){const o=e.default;o&&(o._c&&(o._d=!1),Vp(t,o()),o._c&&(o._d=!0));return}else{n=32;const o=e._;!o&&!Y4(e)?e._ctx=ni:o===3&&ni&&(ni.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ft(e)?(e={default:e,_ctx:ni},n=32):(e=String(e),r&64?(n=16,e=[Up(e)]):n=8);t.children=e,t.shapeFlag|=n}function Ab(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const o in r)if(o==="class")e.class!==r.class&&(e.class=zo([e.class,r.class]));else if(o==="style")e.style=ms([e.style,r.style]);else if(Mc(o)){const l=e[o],h=r[o];h&&l!==h&&!(Ot(l)&&l.includes(h))&&(e[o]=l?[].concat(l,h):h)}else o!==""&&(e[o]=r[o])}return e}function _i(t,e,n,r=null){$i(t,e,7,[n,r])}const Mb=K4();let Cb=0;function Lb(t,e,n){const r=t.type,o=(e?e.appContext:t.appContext)||Mb,l={uid:Cb++,vnode:t,type:r,parent:e,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new J2(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(o.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Q4(r,o),emitsOptions:sv(r,o),emit:null,emitted:null,propsDefaults:gn,inheritAttrs:r.inheritAttrs,ctx:gn,data:gn,props:gn,attrs:gn,slots:gn,refs:gn,setupState:gn,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=e?e.root:l,l.emit=gb.bind(null,l),t.ce&&t.ce(l),l}let kr=null;const _b=()=>kr||ni;let J0,Ph;{const t=_c(),e=(n,r)=>{let o;return(o=t[n])||(o=t[n]=[]),o.push(r),l=>{o.length>1?o.forEach(h=>h(l)):o[0](l)}};J0=e("__VUE_INSTANCE_SETTERS__",n=>kr=n),Ph=e("__VUE_SSR_SETTERS__",n=>Il=n)}const ql=t=>{const e=kr;return J0(t),t.scope.on(),()=>{t.scope.off(),J0(e)}},P1=()=>{kr&&kr.scope.off(),J0(null)};function hv(t){return t.vnode.shapeFlag&4}let Il=!1;function Nb(t,e=!1,n=!1){e&&Ph(e);const{props:r,children:o}=t.vnode,l=hv(t);nb(t,r,l,e),ob(t,o,n||e);const h=l?Db(t,e):void 0;return e&&Ph(!1),h}function Db(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,G5);const{setup:r}=n;if(r){Aa();const o=t.setupContext=r.length>1?Ib(t):null,l=ql(t),h=Fl(r,t,0,[t.props,o]),c=f4(h);if(Ma(),l(),(c||t.sp)&&!xl(t)&&$4(t),c){if(h.then(P1,P1),e)return h.then(p=>{z1(t,p,e)}).catch(p=>{Dc(p,t,0)});t.asyncDep=h}else z1(t,h,e)}else pv(t,e)}function z1(t,e,n){Ft(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Rn(e)&&(t.setupState=P4(e)),pv(t,n)}let B1;function pv(t,e,n){const r=t.type;if(!t.render){if(!e&&B1&&!r.render){const o=r.template||qp(t).template;if(o){const{isCustomElement:l,compilerOptions:h}=t.appContext.config,{delimiters:c,compilerOptions:p}=r,v=lr(lr({isCustomElement:l,delimiters:c},h),p);r.render=B1(o,v)}}t.render=r.render||Ti}{const o=ql(t);Aa();try{K5(t)}finally{Ma(),o()}}}const Rb={get(t,e){return pr(t,"get",""),t[e]}};function Ib(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,Rb),slots:t.slots,emit:t.emit,expose:e}}function Pc(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(P4(y5(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in kl)return kl[n](t)},has(e,n){return n in e||n in kl}})):t.proxy}function Ob(t){return Ft(t)&&"__vccOpts"in t}const fv=(t,e)=>T5(t,e,Il),Hb="3.5.20";/**
|
||
* @vue/runtime-dom v3.5.20
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**/let zh;const F1=typeof window<"u"&&window.trustedTypes;if(F1)try{zh=F1.createPolicy("vue",{createHTML:t=>t})}catch{}const mv=zh?t=>zh.createHTML(t):t=>t,Pb="http://www.w3.org/2000/svg",zb="http://www.w3.org/1998/Math/MathML",da=typeof document<"u"?document:null,q1=da&&da.createElement("template"),Bb={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const o=e==="svg"?da.createElementNS(Pb,t):e==="mathml"?da.createElementNS(zb,t):n?da.createElement(t,{is:n}):da.createElement(t);return t==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:t=>da.createTextNode(t),createComment:t=>da.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>da.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,o,l){const h=n?n.previousSibling:e.lastChild;if(o&&(o===l||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{q1.innerHTML=mv(r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t);const c=q1.content;if(r==="svg"||r==="mathml"){const p=c.firstChild;for(;p.firstChild;)c.appendChild(p.firstChild);c.removeChild(p)}e.insertBefore(c,n)}return[h?h.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Fb=Symbol("_vtc");function qb(t,e,n){const r=t[Fb];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const Q0=Symbol("_vod"),gv=Symbol("_vsh"),jb={name:"show",beforeMount(t,{value:e},{transition:n}){t[Q0]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):rl(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),rl(t,!0),r.enter(t)):r.leave(t,()=>{rl(t,!1)}):rl(t,e))},beforeUnmount(t,{value:e}){rl(t,e)}};function rl(t,e){t.style.display=e?t[Q0]:"none",t[gv]=!e}const $b=Symbol(""),Ub=/(^|;)\s*display\s*:/;function Vb(t,e,n){const r=t.style,o=Vn(n);let l=!1;if(n&&!o){if(e)if(Vn(e))for(const h of e.split(";")){const c=h.slice(0,h.indexOf(":")).trim();n[c]==null&&I0(r,c,"")}else for(const h in e)n[h]==null&&I0(r,h,"");for(const h in n)h==="display"&&(l=!0),I0(r,h,n[h])}else if(o){if(e!==n){const h=r[$b];h&&(n+=";"+h),r.cssText=n,l=Ub.test(n)}}else e&&t.removeAttribute("style");Q0 in t&&(t[Q0]=l?r.display:"",t[gv]&&(r.display="none"))}const j1=/\s*!important$/;function I0(t,e,n){if(Ot(n))n.forEach(r=>I0(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=Wb(t,e);j1.test(n)?t.setProperty(uo(r),n.replace(j1,""),"important"):t[r]=n}}const $1=["Webkit","Moz","ms"],Fd={};function Wb(t,e){const n=Fd[e];if(n)return n;let r=eo(e);if(r!=="filter"&&r in t)return Fd[e]=r;r=v4(r);for(let o=0;o<$1.length;o++){const l=$1[o]+r;if(l in t)return Fd[e]=l}return e}const U1="http://www.w3.org/1999/xlink";function V1(t,e,n,r,o,l=Y2(e)){r&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(U1,e.slice(6,e.length)):t.setAttributeNS(U1,e,n):n==null||l&&!y4(n)?t.removeAttribute(e):t.setAttribute(e,l?"":co(n)?String(n):n)}function W1(t,e,n,r,o){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?mv(n):n);return}const l=t.tagName;if(e==="value"&&l!=="PROGRESS"&&!l.includes("-")){const c=l==="OPTION"?t.getAttribute("value")||"":t.value,p=n==null?t.type==="checkbox"?"on":"":String(n);(c!==p||!("_value"in t))&&(t.value=p),n==null&&t.removeAttribute(e),t._value=n;return}let h=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=y4(n):n==null&&c==="string"?(n="",h=!0):c==="number"&&(n=0,h=!0)}try{t[e]=n}catch{}h&&t.removeAttribute(o||e)}function as(t,e,n,r){t.addEventListener(e,n,r)}function Gb(t,e,n,r){t.removeEventListener(e,n,r)}const G1=Symbol("_vei");function Kb(t,e,n,r,o=null){const l=t[G1]||(t[G1]={}),h=l[e];if(r&&h)h.value=r;else{const[c,p]=Xb(e);if(r){const v=l[e]=Jb(r,o);as(t,c,v,p)}else h&&(Gb(t,c,h,p),l[e]=void 0)}}const K1=/(?:Once|Passive|Capture)$/;function Xb(t){let e;if(K1.test(t)){e={};let r;for(;r=t.match(K1);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):uo(t.slice(2)),e]}let qd=0;const Zb=Promise.resolve(),Yb=()=>qd||(Zb.then(()=>qd=0),qd=Date.now());function Jb(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;$i(Qb(r,n.value),e,5,[r])};return n.value=t,n.attached=Yb(),n}function Qb(t,e){if(Ot(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>o=>!o._stopped&&r&&r(o))}else return e}const X1=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,ey=(t,e,n,r,o,l)=>{const h=o==="svg";e==="class"?qb(t,r,h):e==="style"?Vb(t,n,r):Mc(e)?Mp(e)||Kb(t,e,n,r,l):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):ty(t,e,r,h))?(W1(t,e,r),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&V1(t,e,r,h,l,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Vn(r))?W1(t,eo(e),r,l,e):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),V1(t,e,r,h))};function ty(t,e,n,r){if(r)return!!(e==="innerHTML"||e==="textContent"||e in t&&X1(e)&&Ft(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const o=t.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return X1(e)&&Vn(n)?!1:e in t}const Z1=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ot(e)?n=>_0(e,n):e};function ny(t){t.target.composing=!0}function Y1(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const jd=Symbol("_assign"),Wp={created(t,{modifiers:{lazy:e,trim:n,number:r}},o){t[jd]=Z1(o);const l=r||o.props&&o.props.type==="number";as(t,e?"change":"input",h=>{if(h.target.composing)return;let c=t.value;n&&(c=c.trim()),l&&(c=Ch(c)),t[jd](c)}),n&&as(t,"change",()=>{t.value=t.value.trim()}),e||(as(t,"compositionstart",ny),as(t,"compositionend",Y1),as(t,"change",Y1))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:r,trim:o,number:l}},h){if(t[jd]=Z1(h),t.composing)return;const c=(l||t.type==="number")&&!/^0\d/.test(t.value)?Ch(t.value):t.value,p=e??"";c!==p&&(document.activeElement===t&&t.type!=="range"&&(r&&e===n||o&&t.value.trim()===p)||(t.value=p))}},ry=["ctrl","shift","alt","meta"],iy={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>ry.some(n=>t[`${n}Key`]&&!e.includes(n))},Jo=(t,e)=>{const n=t._withMods||(t._withMods={}),r=e.join(".");return n[r]||(n[r]=(o,...l)=>{for(let h=0;h<e.length;h++){const c=iy[e[h]];if(c&&c(o,e))return}return t(o,...l)})},ay={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$d=(t,e)=>{const n=t._withKeys||(t._withKeys={}),r=e.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const l=uo(o.key);if(e.some(h=>h===l||ay[h]===l))return t(o)})},oy=lr({patchProp:ey},Bb);let J1;function sy(){return J1||(J1=lb(oy))}const ly=(...t)=>{const e=sy().createApp(...t),{mount:n}=e;return e.mount=r=>{const o=uy(r);if(!o)return;const l=e._component;!Ft(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const h=n(o,!1,cy(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),h},e};function cy(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function uy(t){return Vn(t)?document.querySelector(t):t}var Bh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function rC(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}),n}var bv={exports:{}};/*!
|
||
* Vditor v3.11.2 - A markdown editor written in TypeScript.
|
||
*
|
||
* MIT License
|
||
*
|
||
* Copyright (c) 2018-present B3log 开源, b3log.org
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in all
|
||
* copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*
|
||
*/(function(t,e){(function(r,o){t.exports=o()})(Bh,function(){return(()=>{var n={173:h=>{var c=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},p=-1,v=1,b=0;c.Diff=function(g,m){return[g,m]},c.prototype.diff_main=function(g,m,x,w){typeof w>"u"&&(this.Diff_Timeout<=0?w=Number.MAX_VALUE:w=new Date().getTime()+this.Diff_Timeout*1e3);var S=w;if(g==null||m==null)throw new Error("Null input. (diff_main)");if(g==m)return g?[new c.Diff(b,g)]:[];typeof x>"u"&&(x=!0);var k=x,C=this.diff_commonPrefix(g,m),T=g.substring(0,C);g=g.substring(C),m=m.substring(C),C=this.diff_commonSuffix(g,m);var A=g.substring(g.length-C);g=g.substring(0,g.length-C),m=m.substring(0,m.length-C);var M=this.diff_compute_(g,m,k,S);return T&&M.unshift(new c.Diff(b,T)),A&&M.push(new c.Diff(b,A)),this.diff_cleanupMerge(M),M},c.prototype.diff_compute_=function(g,m,x,w){var S;if(!g)return[new c.Diff(v,m)];if(!m)return[new c.Diff(p,g)];var k=g.length>m.length?g:m,C=g.length>m.length?m:g,T=k.indexOf(C);if(T!=-1)return S=[new c.Diff(v,k.substring(0,T)),new c.Diff(b,C),new c.Diff(v,k.substring(T+C.length))],g.length>m.length&&(S[0][0]=S[2][0]=p),S;if(C.length==1)return[new c.Diff(p,g),new c.Diff(v,m)];var A=this.diff_halfMatch_(g,m);if(A){var M=A[0],y=A[1],N=A[2],z=A[3],F=A[4],P=this.diff_main(M,N,x,w),Y=this.diff_main(y,z,x,w);return P.concat([new c.Diff(b,F)],Y)}return x&&g.length>100&&m.length>100?this.diff_lineMode_(g,m,w):this.diff_bisect_(g,m,w)},c.prototype.diff_lineMode_=function(g,m,x){var w=this.diff_linesToChars_(g,m);g=w.chars1,m=w.chars2;var S=w.lineArray,k=this.diff_main(g,m,!1,x);this.diff_charsToLines_(k,S),this.diff_cleanupSemantic(k),k.push(new c.Diff(b,""));for(var C=0,T=0,A=0,M="",y="";C<k.length;){switch(k[C][0]){case v:A++,y+=k[C][1];break;case p:T++,M+=k[C][1];break;case b:if(T>=1&&A>=1){k.splice(C-T-A,T+A),C=C-T-A;for(var N=this.diff_main(M,y,!1,x),z=N.length-1;z>=0;z--)k.splice(C,0,N[z]);C=C+N.length}A=0,T=0,M="",y="";break}C++}return k.pop(),k},c.prototype.diff_bisect_=function(g,m,x){for(var w=g.length,S=m.length,k=Math.ceil((w+S)/2),C=k,T=2*k,A=new Array(T),M=new Array(T),y=0;y<T;y++)A[y]=-1,M[y]=-1;A[C+1]=0,M[C+1]=0;for(var N=w-S,z=N%2!=0,F=0,P=0,Y=0,te=0,de=0;de<k&&!(new Date().getTime()>x);de++){for(var Ce=-de+F;Ce<=de-P;Ce+=2){var qe=C+Ce,Ge;Ce==-de||Ce!=de&&A[qe-1]<A[qe+1]?Ge=A[qe+1]:Ge=A[qe-1]+1;for(var nt=Ge-Ce;Ge<w&&nt<S&&g.charAt(Ge)==m.charAt(nt);)Ge++,nt++;if(A[qe]=Ge,Ge>w)P+=2;else if(nt>S)F+=2;else if(z){var je=C+N-Ce;if(je>=0&&je<T&&M[je]!=-1){var Ne=w-M[je];if(Ge>=Ne)return this.diff_bisectSplit_(g,m,Ge,nt,x)}}}for(var tt=-de+Y;tt<=de-te;tt+=2){var je=C+tt,Ne;tt==-de||tt!=de&&M[je-1]<M[je+1]?Ne=M[je+1]:Ne=M[je-1]+1;for(var lt=Ne-tt;Ne<w&<<S&&g.charAt(w-Ne-1)==m.charAt(S-lt-1);)Ne++,lt++;if(M[je]=Ne,Ne>w)te+=2;else if(lt>S)Y+=2;else if(!z){var qe=C+N-tt;if(qe>=0&&qe<T&&A[qe]!=-1){var Ge=A[qe],nt=C+Ge-qe;if(Ne=w-Ne,Ge>=Ne)return this.diff_bisectSplit_(g,m,Ge,nt,x)}}}}return[new c.Diff(p,g),new c.Diff(v,m)]},c.prototype.diff_bisectSplit_=function(g,m,x,w,S){var k=g.substring(0,x),C=m.substring(0,w),T=g.substring(x),A=m.substring(w),M=this.diff_main(k,C,!1,S),y=this.diff_main(T,A,!1,S);return M.concat(y)},c.prototype.diff_linesToChars_=function(g,m){var x=[],w={};x[0]="";function S(A){for(var M="",y=0,N=-1,z=x.length;N<A.length-1;){N=A.indexOf(`
|
||
`,y),N==-1&&(N=A.length-1);var F=A.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(F):w[F]!==void 0)?M+=String.fromCharCode(w[F]):(z==k&&(F=A.substring(y),N=A.length),M+=String.fromCharCode(z),w[F]=z,x[z++]=F),y=N+1}return M}var k=4e4,C=S(g);k=65535;var T=S(m);return{chars1:C,chars2:T,lineArray:x}},c.prototype.diff_charsToLines_=function(g,m){for(var x=0;x<g.length;x++){for(var w=g[x][1],S=[],k=0;k<w.length;k++)S[k]=m[w.charCodeAt(k)];g[x][1]=S.join("")}},c.prototype.diff_commonPrefix=function(g,m){if(!g||!m||g.charAt(0)!=m.charAt(0))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(k,S)==m.substring(k,S)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonSuffix=function(g,m){if(!g||!m||g.charAt(g.length-1)!=m.charAt(m.length-1))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(g.length-S,g.length-k)==m.substring(m.length-S,m.length-k)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonOverlap_=function(g,m){var x=g.length,w=m.length;if(x==0||w==0)return 0;x>w?g=g.substring(x-w):x<w&&(m=m.substring(0,x));var S=Math.min(x,w);if(g==m)return S;for(var k=0,C=1;;){var T=g.substring(S-C),A=m.indexOf(T);if(A==-1)return k;C+=A,(A==0||g.substring(S-C)==m.substring(0,C))&&(k=C,C++)}},c.prototype.diff_halfMatch_=function(g,m){if(this.Diff_Timeout<=0)return null;var x=g.length>m.length?g:m,w=g.length>m.length?m:g;if(x.length<4||w.length*2<x.length)return null;var S=this;function k(P,Y,te){for(var de=P.substring(te,te+Math.floor(P.length/4)),Ce=-1,qe="",Ge,nt,je,Ne;(Ce=Y.indexOf(de,Ce+1))!=-1;){var tt=S.diff_commonPrefix(P.substring(te),Y.substring(Ce)),lt=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Ce));qe.length<lt+tt&&(qe=Y.substring(Ce-lt,Ce)+Y.substring(Ce,Ce+tt),Ge=P.substring(0,te-lt),nt=P.substring(te+tt),je=Y.substring(0,Ce-lt),Ne=Y.substring(Ce+tt))}return qe.length*2>=P.length?[Ge,nt,je,Ne,qe]:null}var C=k(x,w,Math.ceil(x.length/4)),T=k(x,w,Math.ceil(x.length/2)),A;if(!C&&!T)return null;T?C?A=C[4].length>T[4].length?C:T:A=T:A=C;var M,y,N,z;g.length>m.length?(M=A[0],y=A[1],N=A[2],z=A[3]):(N=A[0],z=A[1],M=A[2],y=A[3]);var F=A[4];return[M,y,N,z,F]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,T=0,A=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=A,T=M,A=0,M=0,S=g[k][1]):(g[k][0]==v?A+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,T)&&S.length<=Math.max(A,M)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,w--,k=w>0?x[w-1]:-1,C=0,T=0,A=0,M=0,S=null,m=!0)),k++;for(m&&this.diff_cleanupMerge(g),this.diff_cleanupSemanticLossless(g),k=1;k<g.length;){if(g[k-1][0]==p&&g[k][0]==v){var y=g[k-1][1],N=g[k][1],z=this.diff_commonOverlap_(y,N),F=this.diff_commonOverlap_(N,y);z>=F?(z>=y.length/2||z>=N.length/2)&&(g.splice(k,0,new c.Diff(b,N.substring(0,z))),g[k-1][1]=y.substring(0,y.length-z),g[k+1][1]=N.substring(z),k++):(F>=y.length/2||F>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,F))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-F),g[k+1][0]=p,g[k+1][1]=y.substring(F),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(F,P){if(!F||!P)return 6;var Y=F.charAt(F.length-1),te=P.charAt(0),de=Y.match(c.nonAlphaNumericRegex_),Ce=te.match(c.nonAlphaNumericRegex_),qe=de&&Y.match(c.whitespaceRegex_),Ge=Ce&&te.match(c.whitespaceRegex_),nt=qe&&Y.match(c.linebreakRegex_),je=Ge&&te.match(c.linebreakRegex_),Ne=nt&&F.match(c.blanklineEndRegex_),tt=je&&P.match(c.blanklineStartRegex_);return Ne||tt?5:nt||je?4:de&&!qe&&Ge?3:qe||Ge?2:de||Ce?1:0}for(var x=1;x<g.length-1;){if(g[x-1][0]==b&&g[x+1][0]==b){var w=g[x-1][1],S=g[x][1],k=g[x+1][1],C=this.diff_commonSuffix(w,S);if(C){var T=S.substring(S.length-C);w=w.substring(0,w.length-C),S=T+S.substring(0,S.length-C),k=T+k}for(var A=w,M=S,y=k,N=m(w,S)+m(S,k);S.charAt(0)===k.charAt(0);){w+=S.charAt(0),S=S.substring(1)+k.charAt(0),k=k.substring(1);var z=m(w,S)+m(S,k);z>=N&&(N=z,A=w,M=S,y=k)}g[x-1][1]!=A&&(A?g[x-1][1]=A:(g.splice(x-1,1),x--),g[x][1]=M,y?g[x+1][1]=y:(g.splice(x+1,1),x--))}x++}},c.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,c.whitespaceRegex_=/\s/,c.linebreakRegex_=/[\r\n]/,c.blanklineEndRegex_=/\n\r?\n$/,c.blanklineStartRegex_=/^\r?\n\r?\n/,c.prototype.diff_cleanupEfficiency=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=!1,T=!1,A=!1,M=!1;k<g.length;)g[k][0]==b?(g[k][1].length<this.Diff_EditCost&&(A||M)?(x[w++]=k,C=A,T=M,S=g[k][1]):(w=0,S=null),A=M=!1):(g[k][0]==p?M=!0:A=!0,S&&(C&&T&&A&&M||S.length<this.Diff_EditCost/2&&C+T+A+M==3)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,S=null,C&&T?(A=M=!0,w=0):(w--,k=w>0?x[w-1]:-1,A=M=!1),m=!0)),k++;m&&this.diff_cleanupMerge(g)},c.prototype.diff_cleanupMerge=function(g){g.push(new c.Diff(b,""));for(var m=0,x=0,w=0,S="",k="",C;m<g.length;)switch(g[m][0]){case v:w++,k+=g[m][1],m++;break;case p:x++,S+=g[m][1],m++;break;case b:x+w>1?(x!==0&&w!==0&&(C=this.diff_commonPrefix(k,S),C!==0&&(m-x-w>0&&g[m-x-w-1][0]==b?g[m-x-w-1][1]+=k.substring(0,C):(g.splice(0,0,new c.Diff(b,k.substring(0,C))),m++),k=k.substring(C),S=S.substring(C)),C=this.diff_commonSuffix(k,S),C!==0&&(g[m][1]=k.substring(k.length-C)+g[m][1],k=k.substring(0,k.length-C),S=S.substring(0,S.length-C))),m-=x+w,g.splice(m,x+w),S.length&&(g.splice(m,0,new c.Diff(p,S)),m++),k.length&&(g.splice(m,0,new c.Diff(v,k)),m++),m++):m!==0&&g[m-1][0]==b?(g[m-1][1]+=g[m][1],g.splice(m,1)):m++,w=0,x=0,S="",k="";break}g[g.length-1][1]===""&&g.pop();var T=!1;for(m=1;m<g.length-1;)g[m-1][0]==b&&g[m+1][0]==b&&(g[m][1].substring(g[m][1].length-g[m-1][1].length)==g[m-1][1]?(g[m][1]=g[m-1][1]+g[m][1].substring(0,g[m][1].length-g[m-1][1].length),g[m+1][1]=g[m-1][1]+g[m+1][1],g.splice(m-1,1),T=!0):g[m][1].substring(0,g[m+1][1].length)==g[m+1][1]&&(g[m-1][1]+=g[m+1][1],g[m][1]=g[m][1].substring(g[m+1][1].length)+g[m+1][1],g.splice(m+1,1),T=!0)),m++;T&&this.diff_cleanupMerge(g)},c.prototype.diff_xIndex=function(g,m){var x=0,w=0,S=0,k=0,C;for(C=0;C<g.length&&(g[C][0]!==v&&(x+=g[C][1].length),g[C][0]!==p&&(w+=g[C][1].length),!(x>m));C++)S=x,k=w;return g.length!=C&&g[C][0]===p?k:k+(m-S)},c.prototype.diff_prettyHtml=function(g){for(var m=[],x=/&/g,w=/</g,S=/>/g,k=/\n/g,C=0;C<g.length;C++){var T=g[C][0],A=g[C][1],M=A.replace(x,"&").replace(w,"<").replace(S,">").replace(k,"¶<br>");switch(T){case v:m[C]='<ins style="background:#e6ffe6;">'+M+"</ins>";break;case p:m[C]='<del style="background:#ffe6e6;">'+M+"</del>";break;case b:m[C]="<span>"+M+"</span>";break}}return m.join("")},c.prototype.diff_text1=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==v&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_text2=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==p&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_levenshtein=function(g){for(var m=0,x=0,w=0,S=0;S<g.length;S++){var k=g[S][0],C=g[S][1];switch(k){case v:x+=C.length;break;case p:w+=C.length;break;case b:m+=Math.max(x,w),x=0,w=0;break}}return m+=Math.max(x,w),m},c.prototype.diff_toDelta=function(g){for(var m=[],x=0;x<g.length;x++)switch(g[x][0]){case v:m[x]="+"+encodeURI(g[x][1]);break;case p:m[x]="-"+g[x][1].length;break;case b:m[x]="="+g[x][1].length;break}return m.join(" ").replace(/%20/g," ")},c.prototype.diff_fromDelta=function(g,m){for(var x=[],w=0,S=0,k=m.split(/\t/g),C=0;C<k.length;C++){var T=k[C].substring(1);switch(k[C].charAt(0)){case"+":try{x[w++]=new c.Diff(v,decodeURI(T))}catch{throw new Error("Illegal escape in diff_fromDelta: "+T)}break;case"-":case"=":var A=parseInt(T,10);if(isNaN(A)||A<0)throw new Error("Invalid number in diff_fromDelta: "+T);var M=g.substring(S,S+=A);k[C].charAt(0)=="="?x[w++]=new c.Diff(b,M):x[w++]=new c.Diff(p,M);break;default:if(k[C])throw new Error("Invalid diff operation in diff_fromDelta: "+k[C])}}if(S!=g.length)throw new Error("Delta length ("+S+") does not equal source text length ("+g.length+").");return x},c.prototype.match_main=function(g,m,x){if(g==null||m==null||x==null)throw new Error("Null input. (match_main)");return x=Math.max(0,Math.min(x,g.length)),g==m?0:g.length?g.substring(x,x+m.length)==m?x:this.match_bitap_(g,m,x):-1},c.prototype.match_bitap_=function(g,m,x){if(m.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var w=this.match_alphabet_(m),S=this;function k(Ge,nt){var je=Ge/m.length,Ne=Math.abs(x-nt);return S.Match_Distance?je+Ne/S.Match_Distance:Ne?1:je}var C=this.Match_Threshold,T=g.indexOf(m,x);T!=-1&&(C=Math.min(k(0,T),C),T=g.lastIndexOf(m,x+m.length),T!=-1&&(C=Math.min(k(0,T),C)));var A=1<<m.length-1;T=-1;for(var M,y,N=m.length+g.length,z,F=0;F<m.length;F++){for(M=0,y=N;M<y;)k(F,x+y)<=C?M=y:N=y,y=Math.floor((N-M)/2+M);N=y;var P=Math.max(1,x-y+1),Y=Math.min(x+y,g.length)+m.length,te=Array(Y+2);te[Y+1]=(1<<F)-1;for(var de=Y;de>=P;de--){var Ce=w[g.charAt(de-1)];if(F===0?te[de]=(te[de+1]<<1|1)&Ce:te[de]=(te[de+1]<<1|1)&Ce|((z[de+1]|z[de])<<1|1)|z[de+1],te[de]&A){var qe=k(F,de-1);if(qe<=C)if(C=qe,T=de-1,T>x)P=Math.max(1,2*x-T);else break}}if(k(F+1,x)>C)break;z=te}return T},c.prototype.match_alphabet_=function(g){for(var m={},x=0;x<g.length;x++)m[g.charAt(x)]=0;for(var x=0;x<g.length;x++)m[g.charAt(x)]|=1<<g.length-x-1;return m},c.prototype.patch_addContext_=function(g,m){if(m.length!=0){if(g.start2===null)throw Error("patch not initialized");for(var x=m.substring(g.start2,g.start2+g.length1),w=0;m.indexOf(x)!=m.lastIndexOf(x)&&x.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)w+=this.Patch_Margin,x=m.substring(g.start2-w,g.start2+g.length1+w);w+=this.Patch_Margin;var S=m.substring(g.start2-w,g.start2);S&&g.diffs.unshift(new c.Diff(b,S));var k=m.substring(g.start2+g.length1,g.start2+g.length1+w);k&&g.diffs.push(new c.Diff(b,k)),g.start1-=S.length,g.start2-=S.length,g.length1+=S.length+k.length,g.length2+=S.length+k.length}},c.prototype.patch_make=function(g,m,x){var w,S;if(typeof g=="string"&&typeof m=="string"&&typeof x>"u")w=g,S=this.diff_main(w,m,!0),S.length>2&&(this.diff_cleanupSemantic(S),this.diff_cleanupEfficiency(S));else if(g&&typeof g=="object"&&typeof m>"u"&&typeof x>"u")S=g,w=this.diff_text1(S);else if(typeof g=="string"&&m&&typeof m=="object"&&typeof x>"u")w=g,S=m;else if(typeof g=="string"&&typeof m=="string"&&x&&typeof x=="object")w=g,S=x;else throw new Error("Unknown call format to patch_make.");if(S.length===0)return[];for(var k=[],C=new c.patch_obj,T=0,A=0,M=0,y=w,N=w,z=0;z<S.length;z++){var F=S[z][0],P=S[z][1];switch(!T&&F!==b&&(C.start1=A,C.start2=M),F){case v:C.diffs[T++]=S[z],C.length2+=P.length,N=N.substring(0,M)+P+N.substring(M);break;case p:C.length1+=P.length,C.diffs[T++]=S[z],N=N.substring(0,M)+N.substring(M+P.length);break;case b:P.length<=2*this.Patch_Margin&&T&&S.length!=z+1?(C.diffs[T++]=S[z],C.length1+=P.length,C.length2+=P.length):P.length>=2*this.Patch_Margin&&T&&(this.patch_addContext_(C,y),k.push(C),C=new c.patch_obj,T=0,y=N,A=M);break}F!==v&&(A+=P.length),F!==p&&(M+=P.length)}return T&&(this.patch_addContext_(C,y),k.push(C)),k},c.prototype.patch_deepCopy=function(g){for(var m=[],x=0;x<g.length;x++){var w=g[x],S=new c.patch_obj;S.diffs=[];for(var k=0;k<w.diffs.length;k++)S.diffs[k]=new c.Diff(w.diffs[k][0],w.diffs[k][1]);S.start1=w.start1,S.start2=w.start2,S.length1=w.length1,S.length2=w.length2,m[x]=S}return m},c.prototype.patch_apply=function(g,m){if(g.length==0)return[m,[]];g=this.patch_deepCopy(g);var x=this.patch_addPadding(g);m=x+m+x,this.patch_splitMax(g);for(var w=0,S=[],k=0;k<g.length;k++){var C=g[k].start2+w,T=this.diff_text1(g[k].diffs),A,M=-1;if(T.length>this.Match_MaxBits?(A=this.match_main(m,T.substring(0,this.Match_MaxBits),C),A!=-1&&(M=this.match_main(m,T.substring(T.length-this.Match_MaxBits),C+T.length-this.Match_MaxBits),(M==-1||A>=M)&&(A=-1))):A=this.match_main(m,T,C),A==-1)S[k]=!1,w-=g[k].length2-g[k].length1;else{S[k]=!0,w=A-C;var y;if(M==-1?y=m.substring(A,A+T.length):y=m.substring(A,M+this.Match_MaxBits),T==y)m=m.substring(0,A)+this.diff_text2(g[k].diffs)+m.substring(A+T.length);else{var N=this.diff_main(T,y,!1);if(T.length>this.Match_MaxBits&&this.diff_levenshtein(N)/T.length>this.Patch_DeleteThreshold)S[k]=!1;else{this.diff_cleanupSemanticLossless(N);for(var z=0,F,P=0;P<g[k].diffs.length;P++){var Y=g[k].diffs[P];Y[0]!==b&&(F=this.diff_xIndex(N,z)),Y[0]===v?m=m.substring(0,A+F)+Y[1]+m.substring(A+F):Y[0]===p&&(m=m.substring(0,A+F)+m.substring(A+this.diff_xIndex(N,z+Y[1].length))),Y[0]!==p&&(z+=Y[1].length)}}}}}return m=m.substring(x.length,m.length-x.length),[m,S]},c.prototype.patch_addPadding=function(g){for(var m=this.Patch_Margin,x="",w=1;w<=m;w++)x+=String.fromCharCode(w);for(var w=0;w<g.length;w++)g[w].start1+=m,g[w].start2+=m;var S=g[0],k=S.diffs;if(k.length==0||k[0][0]!=b)k.unshift(new c.Diff(b,x)),S.start1-=m,S.start2-=m,S.length1+=m,S.length2+=m;else if(m>k[0][1].length){var C=m-k[0][1].length;k[0][1]=x.substring(k[0][1].length)+k[0][1],S.start1-=C,S.start2-=C,S.length1+=C,S.length2+=C}if(S=g[g.length-1],k=S.diffs,k.length==0||k[k.length-1][0]!=b)k.push(new c.Diff(b,x)),S.length1+=m,S.length2+=m;else if(m>k[k.length-1][1].length){var C=m-k[k.length-1][1].length;k[k.length-1][1]+=x.substring(0,C),S.length1+=C,S.length2+=C}return x},c.prototype.patch_splitMax=function(g){for(var m=this.Match_MaxBits,x=0;x<g.length;x++)if(!(g[x].length1<=m)){var w=g[x];g.splice(x--,1);for(var S=w.start1,k=w.start2,C="";w.diffs.length!==0;){var T=new c.patch_obj,A=!0;for(T.start1=S-C.length,T.start2=k-C.length,C!==""&&(T.length1=T.length2=C.length,T.diffs.push(new c.Diff(b,C)));w.diffs.length!==0&&T.length1<m-this.Patch_Margin;){var M=w.diffs[0][0],y=w.diffs[0][1];M===v?(T.length2+=y.length,k+=y.length,T.diffs.push(w.diffs.shift()),A=!1):M===p&&T.diffs.length==1&&T.diffs[0][0]==b&&y.length>2*m?(T.length1+=y.length,S+=y.length,A=!1,T.diffs.push(new c.Diff(M,y)),w.diffs.shift()):(y=y.substring(0,m-T.length1-this.Patch_Margin),T.length1+=y.length,S+=y.length,M===b?(T.length2+=y.length,k+=y.length):A=!1,T.diffs.push(new c.Diff(M,y)),y==w.diffs[0][1]?w.diffs.shift():w.diffs[0][1]=w.diffs[0][1].substring(y.length))}C=this.diff_text2(T.diffs),C=C.substring(C.length-this.Patch_Margin);var N=this.diff_text1(w.diffs).substring(0,this.Patch_Margin);N!==""&&(T.length1+=N.length,T.length2+=N.length,T.diffs.length!==0&&T.diffs[T.diffs.length-1][0]===b?T.diffs[T.diffs.length-1][1]+=N:T.diffs.push(new c.Diff(b,N))),A||g.splice(++x,0,T)}}},c.prototype.patch_toText=function(g){for(var m=[],x=0;x<g.length;x++)m[x]=g[x];return m.join("")},c.prototype.patch_fromText=function(g){var m=[];if(!g)return m;for(var x=g.split(`
|
||
`),w=0,S=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;w<x.length;){var k=x[w].match(S);if(!k)throw new Error("Invalid patch string: "+x[w]);var C=new c.patch_obj;for(m.push(C),C.start1=parseInt(k[1],10),k[2]===""?(C.start1--,C.length1=1):k[2]=="0"?C.length1=0:(C.start1--,C.length1=parseInt(k[2],10)),C.start2=parseInt(k[3],10),k[4]===""?(C.start2--,C.length2=1):k[4]=="0"?C.length2=0:(C.start2--,C.length2=parseInt(k[4],10)),w++;w<x.length;){var T=x[w].charAt(0);try{var A=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+A)}if(T=="-")C.diffs.push(new c.Diff(p,A));else if(T=="+")C.diffs.push(new c.Diff(v,A));else if(T==" ")C.diffs.push(new c.Diff(b,A));else{if(T=="@")break;if(T!=="")throw new Error('Invalid patch mode "'+T+'" in: '+A)}w++}}return m},c.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},c.patch_obj.prototype.toString=function(){var g,m;this.length1===0?g=this.start1+",0":this.length1==1?g=this.start1+1:g=this.start1+1+","+this.length1,this.length2===0?m=this.start2+",0":this.length2==1?m=this.start2+1:m=this.start2+1+","+this.length2;for(var x=["@@ -"+g+" +"+m+` @@
|
||
`],w,S=0;S<this.diffs.length;S++){switch(this.diffs[S][0]){case v:w="+";break;case p:w="-";break;case b:w=" ";break}x[S+1]=w+encodeURI(this.diffs[S][1])+`
|
||
`}return x.join("").replace(/%20/g," ")},h.exports=c,h.exports.diff_match_patch=c,h.exports.DIFF_DELETE=p,h.exports.DIFF_INSERT=v,h.exports.DIFF_EQUAL=b},408:(h,c,p)=>{p.d(c,{default:()=>Nt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(oe){oe===void 0&&(oe=document);var he=function(J){var ee=document.createElement("img");ee.src=J.getAttribute("data-src"),ee.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&ee.naturalHeight>ee.naturalWidth&&ee.naturalWidth/ee.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&ee.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=ee.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return oe.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&he(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(ee){(typeof ee.isIntersecting>"u"?ee.intersectionRatio!==0:ee.isIntersecting)&&ee.target.getAttribute("data-src")&&he(ee.target)})}),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),T=p(280),A=p(637),M=p(825),y=p(11),N=p(194),z=p(436),F=p(229),P=p(145),Y=p(538),te=p(413),de=p(106),Ce=p(673),qe=function(oe){document.querySelectorAll(".vditor-anchor").forEach(function(he){oe===1&&he.classList.add("vditor-anchor--left"),he.onclick=function(){var J=he.getAttribute("href").substr(1),ee=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=ee}}),window.onhashchange=function(){var he=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));he&&(document.querySelector("html").scrollTop=he.offsetTop)}},Ge=p(214),nt=p(810),je=function(oe,he){if(he===void 0&&(he="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var ve=speechSynthesis.getVoices(),le,we;return ve.forEach(function(Ae){Ae.lang===he.replace("_","-")&&(le=Ae),Ae.default&&(we=Ae)}),le||(le=we),le},ee='<svg><use xlink:href="#vditor-icon-play"></use></svg>',De='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(ee='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',De='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var se=document.querySelector(".vditor-speech");se||(se=document.createElement("button"),se.className="vditor-speech",oe.insertAdjacentElement("beforeend",se),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var V=J(),Z=new SpeechSynthesisUtterance;Z.voice=V,Z.onend=Z.onerror=function(){se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee},oe.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(ve){var le=ve.target;if(le.classList.contains("vditor-speech")||le.parentElement.classList.contains("vditor-speech")){se.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),se.innerHTML=De):(speechSynthesis.pause(),se.innerHTML=ee)):(Z.text=se.getAttribute("data-text"),speechSynthesis.speak(Z),se.classList.add("vditor-speech--current"),se.innerHTML=De),(0,nt.Hc)(window.vditorSpeechRange),oe.focus();return}if(se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee,getSelection().rangeCount!==0){var we=getSelection().getRangeAt(0),Ae=we.toString().trim();if(Ae){window.vditorSpeechRange=we.cloneRange();var Fe=we.getBoundingClientRect();se.innerHTML=ee,se.style.display="block",se.style.top=Fe.top+Fe.height+document.querySelector("html").scrollTop-20+"px",window.ontouchstart!==void 0?se.style.left=ve.changedTouches[ve.changedTouches.length-1].pageX+2+"px":se.style.left=ve.clientX+2+"px",se.setAttribute("data-text",Ae)}}})}},Ne=function(oe,he,J,ee){function De(se){return se instanceof J?se:new J(function(V){V(se)})}return new(J||(J=Promise))(function(se,V){function Z(we){try{le(ee.next(we))}catch(Ae){V(Ae)}}function ve(we){try{le(ee.throw(we))}catch(Ae){V(Ae)}}function le(we){we.done?se(we.value):De(we.value).then(Z,ve)}le((ee=ee.apply(oe,he||[])).next())})},tt=function(oe,he){var J={label:0,sent:function(){if(se[0]&1)throw se[1];return se[1]},trys:[],ops:[]},ee,De,se,V;return V={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function Z(le){return function(we){return ve([le,we])}}function ve(le){if(ee)throw new TypeError("Generator is already executing.");for(;V&&(V=0,le[0]&&(J=0)),J;)try{if(ee=1,De&&(se=le[0]&2?De.return:le[0]?De.throw||((se=De.return)&&se.call(De),0):De.next)&&!(se=se.call(De,le[1])).done)return se;switch(De=0,se&&(le=[le[0]&2,se.value]),le[0]){case 0:case 1:se=le;break;case 4:return J.label++,{value:le[1],done:!1};case 5:J.label++,De=le[1],le=[0];continue;case 7:le=J.ops.pop(),J.trys.pop();continue;default:if(se=J.trys,!(se=se.length>0&&se[se.length-1])&&(le[0]===6||le[0]===2)){J=0;continue}if(le[0]===3&&(!se||le[1]>se[0]&&le[1]<se[3])){J.label=le[1];break}if(le[0]===6&&J.label<se[1]){J.label=se[1],se=le;break}if(se&&J.label<se[2]){J.label=se[2],J.ops.push(le);break}se[2]&&J.ops.pop(),J.trys.pop();continue}le=he.call(oe,J)}catch(we){le=[6,we],De=0}finally{ee=se=0}if(le[0]&5)throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}},lt=function(oe){var he,J={anchor:0,cdn:P.g.CDN,customEmoji:{},emojiPath:"".concat(P.g.CDN,"/dist/images/emoji"),hljs:P.g.HLJS_OPTIONS,icon:"ant",lang:"zh_CN",markdown:P.g.MARKDOWN_OPTIONS,math:P.g.MATH_OPTIONS,mode:"light",speech:{enable:!1},render:{media:{enable:!0}},theme:P.g.THEME_OPTIONS};return oe.cdn&&(!((he=oe.theme)===null||he===void 0)&&he.path||(J.theme.path="".concat(oe.cdn,"/dist/css/content-theme")),oe.emojiPath||(J.emojiPath="".concat(oe.cdn,"/dist/images/emoji"))),(0,Ce.T)(J,oe)},Qe=function(oe,he){var J=lt(he);return(0,te.G)("".concat(J.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){var ee=(0,Ge.X)({autoSpace:J.markdown.autoSpace,gfmAutoLink:J.markdown.gfmAutoLink,codeBlockPreview:J.markdown.codeBlockPreview,emojiSite:J.emojiPath,emojis:J.customEmoji,fixTermTypo:J.markdown.fixTermTypo,footnotes:J.markdown.footnotes,headingAnchor:J.anchor!==0,inlineMathDigit:J.math.inlineDigit,lazyLoadImage:J.lazyLoadImage,linkBase:J.markdown.linkBase,linkPrefix:J.markdown.linkPrefix,listStyle:J.markdown.listStyle,mark:J.markdown.mark,mathBlockPreview:J.markdown.mathBlockPreview,paragraphBeginningSpace:J.markdown.paragraphBeginningSpace,sanitize:J.markdown.sanitize,toc:J.markdown.toc});return he!=null&&he.renderers&&ee.SetJSRenderers({renderers:{Md2HTML:he.renderers}}),ee.SetHeadingID(!0),ee.Md2HTML(oe)})},j=function(oe,he,J){return Ne(void 0,void 0,void 0,function(){var ee,De,se,V;return tt(this,function(Z){switch(Z.label){case 0:return ee=lt(J),[4,Qe(he,ee)];case 1:if(De=Z.sent(),ee.transform&&(De=ee.transform(De)),oe.innerHTML=De,oe.classList.add("vditor-reset"),ee.i18n)return[3,5];if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(ee.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return se="vditorI18nScript",V=se+ee.lang,document.querySelectorAll('head script[id^="'.concat(se,'"]')).forEach(function(ve){ve.id!==V&&document.head.removeChild(ve)}),[4,(0,te.G)("".concat(ee.cdn,"/dist/js/i18n/").concat(ee.lang,".js"),V)];case 3:Z.sent(),Z.label=4;case 4:return[3,6];case 5:window.VditorI18n=ee.i18n,Z.label=6;case 6:return ee.icon?[4,(0,te.G)("".concat(ee.cdn,"/dist/js/icons/").concat(ee.icon,".js"),"vditorIconScript")]:[3,8];case 7:Z.sent(),Z.label=8;case 8:return(0,Y.Z)(ee.theme.current,ee.theme.path),ee.anchor===1&&oe.classList.add("vditor-reset--anchor"),(0,m.O)(oe,ee.hljs),(0,S.s)(ee.hljs,oe,ee.cdn),(0,C.H)(oe,{cdn:ee.cdn,math:ee.math}),(0,A.i)(oe,ee.cdn,ee.mode),(0,M.J)(oe,ee.cdn,ee.mode),(0,y.K)(oe,ee.cdn),(0,x.P)(oe,ee.cdn),(0,w.v)(oe,ee.cdn),(0,g.p)(oe,ee.cdn,ee.mode),(0,N.P)(oe,ee.cdn,ee.mode),(0,F.B)(oe,ee.cdn),(0,v.Q)(oe,ee.cdn),ee.render.media.enable&&(0,T.Y)(oe),ee.speech.enable&&je(oe),ee.anchor!==0&&qe(ee.anchor),ee.after&&ee.after(),ee.lazyLoadImage&&k(oe),oe.addEventListener("click",function(ve){var le=(0,de.lG)(ve.target,"SPAN");if(le&&(0,de.fb)(le,"vditor-toc")){var we=oe.querySelector("#"+le.getAttribute("data-target-id"));we&&window.scrollTo(window.scrollX,we.offsetTop);return}}),[2]}})})},Ht=p(190),Rt=p(580),Ut=function(){function oe(){}return oe.adapterRender=b,oe.previewImage=Ht.E,oe.codeRender=m.O,oe.graphvizRender=w.v,oe.highlightRender=S.s,oe.mathRender=C.H,oe.mermaidRender=A.i,oe.SMILESRender=M.J,oe.markmapRender=y.K,oe.flowchartRender=x.P,oe.chartRender=g.p,oe.abcRender=v.Q,oe.mindmapRender=N.P,oe.plantumlRender=F.B,oe.outlineRender=z.k,oe.mediaRender=T.Y,oe.speechRender=je,oe.lazyLoadImageRender=k,oe.md2html=Qe,oe.preview=j,oe.setCodeTheme=Rt.Y,oe.setContentTheme=Y.Z,oe}();const Nt=Ut},145:(h,c,p)=>{p.d(c,{H:()=>v,g:()=>b});var v="3.11.2",b=function(){function g(){}return g.ZWSP="",g.DROP_EDITOR="application/editor",g.MOBILE_WIDTH=520,g.CLASS_MENU_DISABLED="vditor-menu--disabled",g.EDIT_TOOLBARS=["emoji","headings","bold","italic","strike","link","list","ordered-list","outdent","indent","check","line","quote","code","inline-code","insert-after","insert-before","upload","record","table"],g.CODE_THEME=["a11y-dark","agate","an-old-hope","androidstudio","arta","atom-one-dark","atom-one-dark-reasonable","base16/3024","base16/apathy","base16/apprentice","base16/ashes","base16/atelier-cave","base16/atelier-dune","base16/atelier-estuary","base16/atelier-forest","base16/atelier-heath","base16/atelier-lakeside","base16/atelier-plateau","base16/atelier-savanna","base16/atelier-seaside","base16/atelier-sulphurpool","base16/atlas","base16/bespin","base16/black-metal","base16/black-metal-bathory","base16/black-metal-burzum","base16/black-metal-dark-funeral","base16/black-metal-gorgoroth","base16/black-metal-immortal","base16/black-metal-khold","base16/black-metal-marduk","base16/black-metal-mayhem","base16/black-metal-nile","base16/black-metal-venom","base16/brewer","base16/bright","base16/brogrammer","base16/brush-trees-dark","base16/chalk","base16/circus","base16/classic-dark","base16/codeschool","base16/colors","base16/danqing","base16/darcula","base16/dark-violet","base16/darkmoss","base16/darktooth","base16/decaf","base16/default-dark","base16/dracula","base16/edge-dark","base16/eighties","base16/embers","base16/equilibrium-dark","base16/equilibrium-gray-dark","base16/espresso","base16/eva","base16/eva-dim","base16/flat","base16/framer","base16/gigavolt","base16/google-dark","base16/grayscale-dark","base16/green-screen","base16/gruvbox-dark-hard","base16/gruvbox-dark-medium","base16/gruvbox-dark-pale","base16/gruvbox-dark-soft","base16/hardcore","base16/harmonic16-dark","base16/heetch-dark","base16/helios","base16/hopscotch","base16/horizon-dark","base16/humanoid-dark","base16/ia-dark","base16/icy-dark","base16/ir-black","base16/isotope","base16/kimber","base16/london-tube","base16/macintosh","base16/marrakesh","base16/materia","base16/material","base16/material-darker","base16/material-palenight","base16/material-vivid","base16/mellow-purple","base16/mocha","base16/monokai","base16/nebula","base16/nord","base16/nova","base16/ocean","base16/oceanicnext","base16/onedark","base16/outrun-dark","base16/papercolor-dark","base16/paraiso","base16/pasque","base16/phd","base16/pico","base16/pop","base16/porple","base16/qualia","base16/railscasts","base16/rebecca","base16/ros-pine","base16/ros-pine-moon","base16/sandcastle","base16/seti-ui","base16/silk-dark","base16/snazzy","base16/solar-flare","base16/solarized-dark","base16/spacemacs","base16/summercamp","base16/summerfruit-dark","base16/synth-midnight-terminal-dark","base16/tango","base16/tender","base16/tomorrow-night","base16/twilight","base16/unikitty-dark","base16/vulcan","base16/windows-10","base16/windows-95","base16/windows-high-contrast","base16/windows-nt","base16/woodland","base16/xcode-dusk","base16/zenburn","codepen-embed","dark","devibeans","far","felipec","github-dark","github-dark-dimmed","gml","gradient-dark","hybrid","ir-black","isbl-editor-dark","kimbie-dark","lioshi","monokai","monokai-sublime","night-owl","nnfx-dark","nord","obsidian","panda-syntax-dark","paraiso-dark","pojoaque","qtcreator-dark","rainbow","shades-of-purple","srcery","stackoverflow-dark","sunburst","tomorrow-night-blue","tomorrow-night-bright","tokyo-night-dark","vs2015","xt256","ant-design","a11y-light","arduino-light","ascetic","atom-one-light","base16/atelier-cave-light","base16/atelier-dune-light","base16/atelier-estuary-light","base16/atelier-forest-light","base16/atelier-heath-light","base16/atelier-lakeside-light","base16/atelier-plateau-light","base16/atelier-savanna-light","base16/atelier-seaside-light","base16/atelier-sulphurpool-light","base16/brush-trees","base16/classic-light","base16/cupcake","base16/cupertino","base16/default-light","base16/dirtysea","base16/edge-light","base16/equilibrium-gray-light","base16/equilibrium-light","base16/fruit-soda","base16/github","base16/google-light","base16/grayscale-light","base16/gruvbox-light-hard","base16/gruvbox-light-medium","base16/gruvbox-light-soft","base16/harmonic16-light","base16/heetch-light","base16/humanoid-light","base16/horizon-light","base16/ia-light","base16/material-lighter","base16/mexico-light","base16/one-light","base16/papercolor-light","base16/ros-pine-dawn","base16/sagelight","base16/shapeshifter","base16/silk-light","base16/solar-flare-light","base16/solarized-light","base16/summerfruit-light","base16/synth-midnight-terminal-light","base16/tomorrow","base16/unikitty-light","base16/windows-10-light","base16/windows-95-light","base16/windows-high-contrast-light","brown-paper","base16/windows-nt-light","color-brewer","docco","foundation","github","googlecode","gradient-light","grayscale","idea","intellij-light","isbl-editor-light","kimbie-light","lightfair","magula","mono-blue","nnfx-light","panda-syntax-light","paraiso-light","purebasic","qtcreator-light","routeros","school-book","stackoverflow-light","tokyo-night-light","vs","xcode","default"],g.ALIAS_CODE_LANGUAGES=["abc","plantuml","mermaid","flowchart","echarts","mindmap","graphviz","math","markmap","smiles","js","ts","html","toml","c#","bat"],g.CDN="https://unpkg.com/vditor@".concat("3.11.2"),g.MARKDOWN_OPTIONS={autoSpace:!1,gfmAutoLink:!0,codeBlockPreview:!0,fixTermTypo:!1,footnotes:!0,linkBase:"",linkPrefix:"",listStyle:!1,mark:!1,mathBlockPreview:!0,paragraphBeginningSpace:!1,sanitize:!0,toc:!1},g.HLJS_OPTIONS={enable:!0,lineNumber:!1,defaultLang:"",style:"github"},g.MATH_OPTIONS={engine:"KaTeX",inlineDigit:!1,macros:{}},g.THEME_OPTIONS={current:"light",list:{"ant-design":"Ant Design",dark:"Dark",light:"Light",wechat:"WeChat"},path:"".concat(g.CDN,"/dist/css/content-theme")},g}()},825:(h,c,p)=>{p.d(c,{J:()=>x});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(w,S,k){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var C=g.SMILESRenderAdapter.getElements(w);C.length>0&&(0,b.G)("".concat(S,"/dist/js/smiles-drawer/smiles-drawer.min.js?v=2.1.7"),"vditorAbcjsScript").then(function(){var T=new SmiDrawer({},{});C.forEach(function(A){var M=g.SMILESRenderAdapter.getCode(A).trim();if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y="smiles"+(0,m.Wb)();A.innerHTML='<svg id="'.concat(y,'"></svg>'),T.draw(M,"#"+y,k==="dark"?"dark":void 0),A.setAttribute("data-processed","true")}})})}},135:(h,c,p)=>{p.d(c,{Q:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.abcRenderAdapter.getElements(x);S.length>0&&(0,b.G)("".concat(w,"/dist/js/abcjs/abcjs_basic.min.js"),"vditorAbcjsScript").then(function(){S.forEach(function(k){k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre")||k.getAttribute("data-processed")!=="true"&&(ABCJS.renderAbc(k,g.abcRenderAdapter.getCode(k).trim()),k.style.overflowX="auto",k.setAttribute("data-processed","true"))})})}},840:(h,c,p)=>{p.r(c),p.d(c,{mathRenderAdapter:()=>v,SMILESRenderAdapter:()=>b,mermaidRenderAdapter:()=>g,markmapRenderAdapter:()=>m,mindmapRenderAdapter:()=>x,chartRenderAdapter:()=>w,abcRenderAdapter:()=>S,graphvizRenderAdapter:()=>k,flowchartRenderAdapter:()=>C,plantumlRenderAdapter:()=>T});var v={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-math")}},b={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-smiles")}},g={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-mermaid")}},m={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-markmap")}},x={getCode:function(A){return A.getAttribute("data-code")},getElements:function(A){return A.querySelectorAll(".language-mindmap")}},w={getCode:function(A){return A.innerText},getElements:function(A){return A.querySelectorAll(".language-echarts")}},S={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-abc")}},k={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-graphviz")}},C={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-flowchart")}},T={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-plantuml")}}},775:(h,c,p)=>{p.d(c,{p:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.chartRenderAdapter.getElements(k);A.length>0&&(0,b.G)("".concat(C,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){A.forEach(function(M){return x(void 0,void 0,void 0,function(){var y,N,z;return w(this,function(F){switch(F.label){case 0:if(M.parentElement.classList.contains("vditor-wysiwyg__pre")||M.parentElement.classList.contains("vditor-ir__marker--pre"))return[2];if(y=g.chartRenderAdapter.getCode(M).trim(),!y)return[2];F.label=1;case 1:return F.trys.push([1,3,,4]),M.getAttribute("data-processed")==="true"?[2]:[4,(0,m.Qf)(y)];case 2:return N=F.sent(),echarts.init(M,T==="dark"?"dark":void 0).setOption(N),M.setAttribute("data-processed","true"),[3,4];case 3:return z=F.sent(),M.className="vditor-reset--error",M.innerHTML="echarts render error: <br>".concat(z),[3,4];case 4:return[2]}})})})})}},428:(h,c,p)=>{p.d(c,{O:()=>g});var v=p(105),b=p(145),g=function(m,x){Array.from(m.querySelectorAll("pre > code")).filter(function(w,S){return!(w.parentElement.classList.contains("vditor-wysiwyg__pre")||w.parentElement.classList.contains("vditor-ir__marker--pre")||w.classList.contains("language-mermaid")||w.classList.contains("language-flowchart")||w.classList.contains("language-echarts")||w.classList.contains("language-mindmap")||w.classList.contains("language-plantuml")||w.classList.contains("language-markmap")||w.classList.contains("language-abc")||w.classList.contains("language-graphviz")||w.classList.contains("language-math")||w.classList.contains("language-smiles")||w.style.maxHeight.indexOf("px")>-1||m.classList.contains("vditor-preview")&&S>5)}).forEach(function(w){var S,k,C,T=w.innerText;if(w.classList.contains("highlight-chroma")){var A=w.cloneNode(!0);A.querySelectorAll(".highlight-ln").forEach(function(z){z.remove()}),T=A.innerText}else T.endsWith(`
|
||
`)&&(T=T.substr(0,T.length-1));var M='<svg><use xlink:href="#vditor-icon-copy"></use></svg>';document.getElementById("vditorIconScript")||(M='<svg viewBox="0 0 32 32"><path d="M22.545-0h-17.455c-1.6 0-2.909 1.309-2.909 2.909v20.364h2.909v-20.364h17.455v-2.909zM26.909 5.818h-16c-1.6 0-2.909 1.309-2.909 2.909v20.364c0 1.6 1.309 2.909 2.909 2.909h16c1.6 0 2.909-1.309 2.909-2.909v-20.364c0-1.6-1.309-2.909-2.909-2.909zM26.909 29.091h-16v-20.364h16v20.364z"></path></svg>');var y=document.createElement("div");y.className="vditor-copy",y.innerHTML='<span aria-label="'.concat(((S=window.VditorI18n)===null||S===void 0?void 0:S.copy)||"复制",`"
|
||
onmouseover="this.setAttribute('aria-label', '`).concat(((k=window.VditorI18n)===null||k===void 0?void 0:k.copy)||"复制",`')"
|
||
class="vditor-tooltipped vditor-tooltipped__w"
|
||
onclick="event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '`).concat(((C=window.VditorI18n)===null||C===void 0?void 0:C.copied)||"已复制",`');this.previousElementSibling.blur()">`).concat(M,"</span>");var N=document.createElement("textarea");N.value=(0,v.X)(T),y.insertAdjacentElement("afterbegin",N),x&&x.renderMenu&&x.renderMenu(w,y),w.before(y),w.style.maxHeight=window.outerHeight-40+"px",w.insertAdjacentHTML("afterend",'<span style="position: absolute">'.concat(b.g.ZWSP,"</span>"))})}},325:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.flowchartRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then(function(){S.forEach(function(k){if(k.getAttribute("data-processed")!=="true"){var C=flowchart.parse(g.flowchartRenderAdapter.getCode(k));k.innerHTML="",C.drawSVG(k),k.setAttribute("data-processed","true")}})})}},483:(h,c,p)=>{p.d(c,{v:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.graphvizRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then(function(){S.forEach(function(k){var C=g.graphvizRenderAdapter.getCode(k);if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))&&!(k.getAttribute("data-processed")==="true"||C.trim()==="")){try{var T=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),A=window.URL||window.webkitURL,M=A.createObjectURL(T),y=new Worker(M);new Viz({worker:y}).renderSVGElement(C).then(function(N){k.innerHTML=N.outerHTML}).catch(function(N){k.innerHTML="graphviz render error: <br>".concat(N),k.className="vditor-reset--error"})}catch(N){console.error("graphviz error",N)}k.setAttribute("data-processed","true")}})})}},999:(h,c,p)=>{p.d(c,{s:()=>m});var v=p(145),b=p(413),g=p(290),m=function(x,w,S){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var k=x.style;v.g.CODE_THEME.includes(k)||(k="github");var C=document.getElementById("vditorHljsStyle"),T="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==T&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var A=w.querySelectorAll("pre > code");A.length!==0&&(0,b.G)("".concat(S,"/dist/js/highlight.js/highlight.min.js?v=11.7.0"),"vditorHljsScript").then(function(){(0,b.G)("".concat(S,"/dist/js/highlight.js/third-languages.js?v=1.0.1"),"vditorHljsThirdScript").then(function(){w.querySelectorAll("pre > code").forEach(function(M){if(!(M.parentElement.classList.contains("vditor-ir__marker--pre")||M.parentElement.classList.contains("vditor-wysiwyg__pre"))&&!(M.classList.contains("language-mermaid")||M.classList.contains("language-flowchart")||M.classList.contains("language-echarts")||M.classList.contains("language-mindmap")||M.classList.contains("language-plantuml")||M.classList.contains("language-smiles")||M.classList.contains("language-abc")||M.classList.contains("language-graphviz")||M.classList.contains("language-math"))){x.defaultLang!==""&&M.className.indexOf("language-")===-1&&M.classList.add("language-"+x.defaultLang);var y=M.className.replace("language-","");if(window.hljs.getLanguage(y)||(y="plaintext"),M.innerHTML=window.hljs.highlight(M.textContent,{language:y,ignoreIllegals:!0}).value,M.classList.add("hljs"),!!x.lineNumber){M.classList.add("vditor-linenumber");var N=M.querySelector(".vditor-linenumber__temp");N||(N=document.createElement("div"),N.className="vditor-linenumber__temp",M.insertAdjacentElement("beforeend",N));var z=getComputedStyle(M).whiteSpace,F=!1;(z==="pre-wrap"||z==="pre-line")&&(F=!0);var P="",Y=M.textContent.split(/\r\n|\r|\n/g);Y.pop(),Y.map(function(te){var de="";F&&(N.textContent=te||`
|
||
`,de=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(de,"></span>")}),N.style.display="none",P='<span class="vditor-linenumber__rows">'.concat(P,"</span>"),M.insertAdjacentHTML("beforeend",P)}}})})})}}},11:(h,c,p)=>{p.d(c,{K:()=>S});var v=p(145),b=p(413),g=p(840),m={},x=function(k,C){var T=k.transform(C),A=Object.keys(T.features).filter(function(F){return!m[F]});A.forEach(function(F){m[F]=!0});var M=k.getAssets(A),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),T},w=function(k,C){var T=window.markmap,A=T.Transformer,M=T.Markmap,y=T.deriveOptions;T.globalCSS;var N=new A;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,F=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,de=te==null?void 0:te.markmap,Ce=y(de);F.setData(Y,Ce),F.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.markmapRenderAdapter.getElements(k);T.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){T.forEach(function(A){var M=g.markmapRenderAdapter.getCode(A);if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",A.parentNode.appendChild(y),w(y,M),A.parentNode.childNodes[0].nodeName=="CODE"&&A.parentNode.removeChild(A.parentNode.childNodes[0])}})})}},472:(h,c,p)=>{p.d(c,{H:()=>w});var v=p(145),b=p(413),g=p(290),m=p(105),x=p(840),w=function(S,k){S===void 0&&(S=document);var C=x.mathRenderAdapter.getElements(S);if(C.length!==0){var T={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},T.math,k.math)),k=Object.assign({},T,k),k.math.engine==="KaTeX")(0,g.c)("".concat(k.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,b.G)("".concat(k.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then(function(){(0,b.G)("".concat(k.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then(function(){C.forEach(function(y){if(!(y.parentElement.classList.contains("vditor-wysiwyg__pre")||y.parentElement.classList.contains("vditor-ir__marker--pre"))&&!y.getAttribute("data-math")){var N=(0,m.X)(x.mathRenderAdapter.getCode(y));y.setAttribute("data-math",N);try{y.innerHTML=katex.renderToString(N,{displayMode:y.tagName==="DIV",output:"html",macros:k.math.macros})}catch(z){y.innerHTML=z.message,y.className="language-math vditor-reset--error"}y.addEventListener("copy",function(z){z.stopPropagation(),z.preventDefault();var F=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",F.innerHTML),z.clipboardData.setData("text/plain",F.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var A=function(y){if(y.length!==0){var N=0,z=y[y.length-1],F=function(){var P=y[N++];P===z?P():P(F)};F()}};window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(k.cdn,"/dist/js/mathjax")}},startup:{typeset:!1},tex:{macros:k.math.macros}},Object.assign(window.MathJax,k.math.mathJaxOptions)),(0,b.J)("".concat(k.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var M=function(y,N){var z=(0,m.X)(y.textContent).trim(),F=window.MathJax.getMetricsFor(y);F.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,F).then(function(P){y.innerHTML="",y.setAttribute("data-math",z),y.append(P),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var Y=P.querySelector('[data-mml-node="merror"]');Y&&Y.textContent.trim()!==""&&(y.innerHTML=Y.textContent.trim(),y.className="vditor-reset--error"),N&&N()})};window.MathJax.startup.promise.then(function(){for(var y=[],N=function(F){var P=C[F];!P.parentElement.classList.contains("vditor-wysiwyg__pre")&&!P.parentElement.classList.contains("vditor-ir__marker--pre")&&!P.getAttribute("data-math")&&(0,m.X)(P.textContent).trim()&&y.push(function(Y){F===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);A(y)})}}}},280:(h,c,p)=>{p.d(c,{Y:()=>x});var v=p(494),b=function(w,S){w.insertAdjacentHTML("afterend",'<video controls="controls" src="'.concat(S,'"></video>')),w.remove()},g=function(w,S){w.insertAdjacentHTML("afterend",'<audio controls="controls" src="'.concat(S,'"></audio>')),w.remove()},m=function(w,S){var k=S.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?/),C=S.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),T=S.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),A=S.match(/(?:www\.|\/\/)coub\.com\/view\/(\w+)/),M=S.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/),y=S.match(/.+dailymotion.com\/(video|hub)\/(\w+)\?/),N=S.match(/(?:www\.|\/\/)bilibili\.com\/video\/(\w+)/),z=S.match(/(?:www\.|\/\/)ted\.com\/talks\/(\w+)/);if(k&&k[1].length===11)w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//www.youtube.com/embed/'.concat(k[1]+(k[2]?"?start="+k[2]:""),'"></iframe>')),w.remove();else if(C&&C[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//player.youku.com/embed/'.concat(C[1],'"></iframe>')),w.remove();else if(T&&T[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='.concat(T[1],'"></iframe>')),w.remove();else if(A&&A[1])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
|
||
src="//coub.com/embed/`.concat(A[1],'?muted=false&autostart=false&originalSize=true&startWithHD=true"></iframe>')),w.remove();else if(M&&M[0])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
|
||
src="https://www.facebook.com/plugins/video.php?href=`.concat(encodeURIComponent(M[0]),'"></iframe>')),w.remove();else if(y&&y[2])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
|
||
src="https://www.dailymotion.com/embed/video/`.concat(y[2],'"></iframe>')),w.remove();else if(S.indexOf("bilibili.com")>-1&&(S.indexOf("bvid=")>-1||N&&N[1])){var F={bvid:(0,v.on)("bvid",S)||N&&N[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(S.startsWith("http")?S:"https:"+S).search.split("&").forEach(function(te,de){if(te){de===0&&(te=te.substr(1));var Ce=te.split("=");F[Ce[0]]=Ce[1]}});var P="https://player.bilibili.com/player.html?",Y=Object.keys(F);Y.forEach(function(te,de){P+="".concat(te,"=").concat(F[te]),de<Y.length-1&&(P+="&")}),w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="'.concat(P,'"></iframe>')),w.remove()}else z&&z[1]&&(w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//embed.ted.com/talks/'.concat(z[1],'"></iframe>')),w.remove())},x=function(w){w&&w.querySelectorAll("a").forEach(function(S){var k=S.getAttribute("href");k&&(k.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?b(S,k):k.match(/^.+.(mp3|wav|flac)$/)?g(S,k):m(S,k))})}},637:(h,c,p)=>{p.d(c,{i:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.mermaidRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/mermaid/mermaid.min.js?v=11.6.0"),"vditorMermaidScript").then(function(){var M={securityLevel:"loose",altFontFamily:"sans-serif",fontFamily:"sans-serif",startOnLoad:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequence:{useMaxWidth:!0,diagramMarginX:8,diagramMarginY:8,boxMargin:8,showSequenceNumbers:!0},gantt:{leftPadding:75,rightPadding:20}};T==="dark"&&(M.theme="dark"),mermaid.initialize(M),A.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,F,P,Y;return w(this,function(te){switch(te.label){case 0:if(N=g.mermaidRenderAdapter.getCode(y),y.getAttribute("data-processed")==="true"||N.trim()==="")return[2];z="mermaid"+(0,m.Wb)(),te.label=1;case 1:return te.trys.push([1,3,,4]),[4,mermaid.render(z,y.textContent)];case 2:return F=te.sent(),y.innerHTML=F.svg,[3,4];case 3:return P=te.sent(),Y=document.querySelector("#"+z),y.innerHTML="".concat(Y.outerHTML,`<br>
|
||
<div style="text-align: left"><small>`).concat(P.message.replace(/\n/,"<br>"),"</small></div>"),Y.parentElement.remove(),[3,4];case 4:return y.setAttribute("data-processed","true"),[2]}})})})})}},194:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w,S){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var k=g.mindmapRenderAdapter.getElements(x);k.length>0&&(0,b.G)("".concat(w,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){k.forEach(function(C){if(!(C.parentElement.classList.contains("vditor-wysiwyg__pre")||C.parentElement.classList.contains("vditor-ir__marker--pre"))){var T=g.mindmapRenderAdapter.getCode(C);if(T)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(T))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(A,M){var y;return!((y=M==null?void 0:M.data)===null||y===void 0)&&y.children?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),C.setAttribute("data-processed","true")}catch(A){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(A)}}})})}},436:(h,c,p)=>{p.d(c,{k:()=>g});var v=p(771),b=p(472),g=function(m,x,w){var S="",k=[];if(Array.from(m.children).forEach(function(M,y){if((0,v.W)(M)){if(w){var N=M.id.lastIndexOf("_");M.id=M.id.substring(0,N===-1?void 0:N)+"_"+y}k.push(M.id),S+=M.outerHTML.replace("<wbr>","")}}),S==="")return x.innerHTML="","";var C=document.createElement("div");if(w)w.lute.SetToC(!0),w.currentMode==="wysiwyg"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorDOM("<p>[ToC]</p>"+S):w.currentMode==="ir"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorIRDOM("<p>[ToC]</p>"+S):C.innerHTML=w.lute.HTML2VditorDOM("<p>[ToC]</p>"+S),w.lute.SetToC(w.options.preview.markdown.toc);else{x.classList.add("vditor-outline");var T=Lute.New();T.SetToC(!0),C.innerHTML=T.HTML2VditorDOM("<p>[ToC]</p>"+S)}var A=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return A.forEach(function(M,y){if(M.nextElementSibling&&M.nextElementSibling.tagName==="UL"){var N="<svg class='vditor-outline__action'><use xlink:href='#vditor-icon-down'></use></svg>";document.getElementById("vditorIconScript")||(N='<svg class="vditor-outline__action" viewBox="0 0 32 32"><path d="M3.76 6.12l12.24 12.213 12.24-12.213 3.76 3.76-16 16-16-16 3.76-3.76z"></path></svg>'),M.innerHTML="".concat(N,"<span>").concat(M.innerHTML,"</span>")}else M.innerHTML="<svg></svg><span>".concat(M.innerHTML,"</span>");M.setAttribute("data-target-id",k[y])}),S=C.firstElementChild.innerHTML,A.length===0?(x.innerHTML="",S):(x.innerHTML=S,w&&(0,b.H)(x,{cdn:w.options.cdn,math:w.options.preview.math}),x.firstElementChild.addEventListener("click",function(M){for(var y=M.target;y&&!y.isEqualNode(x);){if(y.classList.contains("vditor-outline__action")){y.classList.contains("vditor-outline__action--close")?(y.classList.remove("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:block")):(y.classList.add("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:none")),M.preventDefault(),M.stopPropagation();break}else if(y.getAttribute("data-target-id")){M.preventDefault(),M.stopPropagation();var N=document.getElementById(y.getAttribute("data-target-id"));if(!N)return;if(w)if(w.options.height==="auto"){var z=N.offsetTop+w.element.offsetTop;w.options.toolbarConfig.pin||(z+=w.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,z)}else w.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,w.element.offsetTop),w.preview.element.contains(m)?m.parentElement.scrollTop=N.offsetTop:m.scrollTop=N.offsetTop;else window.scrollTo(window.scrollX,N.offsetTop);break}y=y.parentElement}}),S)}},229:(h,c,p)=>{p.d(c,{B:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.plantumlRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/plantuml/plantuml-encoder.min.js"),"vditorPlantumlScript").then(function(){S.forEach(function(k){if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))){var C=g.plantumlRenderAdapter.getCode(k).trim();if(C)try{k.innerHTML='<object type="image/svg+xml" data="https://www.plantuml.com/plantuml/svg/~1'.concat(plantumlEncoder.encode(C),'"/>')}catch(T){k.className="vditor-reset--error",k.innerHTML="plantuml render error: <br>".concat(T)}}})})}},214:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){var g=Lute.New();return g.PutEmojis(b.emojis),g.SetEmojiSite(b.emojiSite),g.SetHeadingAnchor(b.headingAnchor),g.SetInlineMathAllowDigitAfterOpenMarker(b.inlineMathDigit),g.SetAutoSpace(b.autoSpace),g.SetToC(b.toc),g.SetFootnotes(b.footnotes),g.SetFixTermTypo(b.fixTermTypo),g.SetVditorCodeBlockPreview(b.codeBlockPreview),g.SetVditorMathBlockPreview(b.mathBlockPreview),g.SetSanitize(b.sanitize),g.SetChineseParagraphBeginningSpace(b.paragraphBeginningSpace),g.SetRenderListStyle(b.listStyle),g.SetLinkBase(b.linkBase),g.SetLinkPrefix(b.linkPrefix),g.SetMark(b.mark),g.SetGFMAutoLink(b.gfmAutoLink),b.lazyLoadImage&&g.SetImageLazyLoading(b.lazyLoadImage),g}},190:(h,c,p)=>{p.d(c,{E:()=>v});var v=function(b,g,m){m===void 0&&(m="classic");var x=b.getBoundingClientRect(),w=36;document.body.insertAdjacentHTML("beforeend",'<div class="vditor vditor-img'.concat(m==="dark"?" vditor--dark":"",`">
|
||
<div class="vditor-img__bar">
|
||
<span class="vditor-img__btn" data-deg="0">
|
||
<svg><use xlink:href="#vditor-icon-redo"></use></svg>
|
||
`).concat(window.VditorI18n.spin,`
|
||
</span>
|
||
<span class="vditor-img__btn" onclick="this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''">
|
||
X `).concat(window.VditorI18n.close,`
|
||
</span>
|
||
</div>
|
||
<div class="vditor-img__img" onclick="this.parentElement.outerHTML = '';document.body.style.overflow = ''">
|
||
<img style="width: `).concat(b.width,"px;height:").concat(b.height,"px;transform: translate3d(").concat(x.left,"px, ").concat(x.top-w,'px, 0)" src="').concat(b.getAttribute("src"),`">
|
||
</div>
|
||
</div>`)),document.body.style.overflow="hidden";var S=document.querySelector(".vditor-img img"),k="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(Math.max(0,window.innerHeight-w-b.naturalHeight)/2,"px, 0)");setTimeout(function(){S.setAttribute("style","transition: transform .3s ease-in-out;transform: ".concat(k)),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)});var C=document.querySelector(".vditor-img__btn");C.addEventListener("click",function(){var T=parseInt(C.getAttribute("data-deg"),10)+90;T/90%2===1&&b.naturalWidth>S.parentElement.clientHeight?S.style.transform="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(b.naturalWidth/2-b.naturalHeight/2,"px, 0) rotateZ(").concat(T,"deg)"):S.style.transform="".concat(k," rotateZ(").concat(T,"deg)"),C.setAttribute("data-deg",T.toString()),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)})}},580:(h,c,p)=>{p.d(c,{Y:()=>g});var v=p(145),b=p(290),g=function(m,x){x===void 0&&(x=v.g.CDN),v.g.CODE_THEME.includes(m)||(m="github");var w=document.getElementById("vditorHljsStyle"),S="".concat(x,"/dist/js/highlight.js/styles/").concat(m,".min.css");w?w.getAttribute("href")!==S&&(w.remove(),(0,b.c)(S,"vditorHljsStyle")):(0,b.c)(S,"vditorHljsStyle")}},538:(h,c,p)=>{p.d(c,{Z:()=>b});var v=p(290),b=function(g,m){if(!(!g||!m)){var x=document.getElementById("vditorContentTheme"),w="".concat(m,"/").concat(g,".css");x?x.getAttribute("href")!==w&&(x.remove(),(0,v.c)(w,"vditorContentTheme")):(0,v.c)(w,"vditorContentTheme")}}},413:(h,c,p)=>{p.d(c,{J:()=>v,G:()=>b});var v=function(g,m){if(document.getElementById(m))return!1;var x=new XMLHttpRequest;x.open("GET",g,!1),x.setRequestHeader("Accept","text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01"),x.send("");var w=document.createElement("script");w.type="text/javascript",w.text=x.responseText,w.id=m,document.head.appendChild(w)},b=function(g,m){return new Promise(function(x,w){if(document.getElementById(m))return x(!0),!1;var S=document.createElement("script");S.src=g,S.async=!0,document.head.appendChild(S),S.onerror=function(k){w(k)},S.onload=function(){if(document.getElementById(m))return S.remove(),x(!0),!1;S.id=m,x(!0)}})}},290:(h,c,p)=>{p.d(c,{c:()=>v});var v=function(b,g){if(!document.getElementById(g)){var m=document.createElement("link");m.id=g,m.rel="stylesheet",m.type="text/css",m.href=b,document.getElementsByTagName("head")[0].appendChild(m)}}},105:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){return b.replace(/\u00a0/g," ")}},410:(h,c,p)=>{p.d(c,{G6:()=>v,vU:()=>b,pK:()=>g,Le:()=>m,yl:()=>x,ns:()=>w,i7:()=>S});var v=function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")===-1},b=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},g=function(){try{return typeof localStorage<"u"}catch{return!1}},m=function(){return navigator.userAgent.indexOf("iPhone")>-1?"touchstart":"click"},x=function(k){return navigator.platform.toUpperCase().indexOf("MAC")>=0?!!(k.metaKey&&!k.ctrlKey):!!(!k.metaKey&&k.ctrlKey)},w=function(k){return/Mac/.test(navigator.platform)||navigator.platform==="iPhone"?k.indexOf("⇧")>-1&&b()&&(k=k.replace(";",":").replace("=","+").replace("-","_")):(k.startsWith("⌘")?k=k.replace("⌘","⌘+"):k.startsWith("⌥")&&k.substr(1,1)!=="⌘"?k=k.replace("⌥","⌥+"):k=k.replace("⇧⌘","⌘+⇧+").replace("⌥⌘","⌥+⌘+"),k=k.replace("⌘","Ctrl").replace("⇧","Shift").replace("⌥","Alt"),k.indexOf("Shift")>-1&&(k=k.replace(";",":").replace("=","+").replace("-","_"))),k},S=function(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}},494:(h,c,p)=>{p.d(c,{Wb:()=>v,on:()=>b,Qf:()=>g});var v=function(){return([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(m){return(parseInt(m,10)^window.crypto.getRandomValues(new Uint32Array(1))[0]&15>>parseInt(m,10)/4).toString(16)})},b=function(m,x){x===void 0&&(x=window.location.search);var w=x.substring(x.indexOf("?")),S=w.indexOf("#"),k=new URLSearchParams(w.substring(0,S>=0?S:void 0));return k.get(m)},g=function(m){return Function('"use strict";return ('.concat(m,")"))()}},106:(h,c,p)=>{p.d(c,{JQ:()=>b,E2:()=>g,O9:()=>m,a1:()=>x,F9:()=>w,lG:()=>S,fb:()=>k,DX:()=>C});var v=p(771),b=function(T,A){for(var M=k(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=k(M.parentElement,A),y?M=y:N=!0;return M||!1},g=function(T,A){for(var M=(0,v.S)(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=(0,v.S)(M.parentElement,A),y?M=y:N=!0;return M||!1},m=function(T){var A=g(T,"UL"),M=g(T,"OL"),y=A;return M&&(!A||A&&M.contains(A))&&(y=M),y},x=function(T,A,M){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var y=T,N=!1;y&&!N&&!y.classList.contains("vditor-reset");)y.getAttribute(A)===M?N=!0:y=y.parentElement;return N&&y},w=function(T){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);var A=T,M=!1,y=x(T,"data-block","0");if(y)return y;for(;A&&!M&&!A.classList.contains("vditor-reset");)A.tagName==="H1"||A.tagName==="H2"||A.tagName==="H3"||A.tagName==="H4"||A.tagName==="H5"||A.tagName==="H6"||A.tagName==="P"||A.tagName==="BLOCKQUOTE"||A.tagName==="OL"||A.tagName==="UL"?M=!0:A=A.parentElement;return M&&A},S=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.nodeName===A?y=!0:M=M.parentElement;return y&&M},k=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.classList.contains(A)?y=!0:M=M.parentElement;return y&&M},C=function(T){for(;T&&T.lastChild;)T=T.lastChild;return T}},771:(h,c,p)=>{p.d(c,{S:()=>v,W:()=>b});var v=function(g,m){if(!g)return!1;g.nodeType===3&&(g=g.parentElement);for(var x=g,w=!1;x&&!w&&!x.classList.contains("vditor-reset");)x.nodeName.indexOf(m)===0?w=!0:x=x.parentElement;return w&&x},b=function(g){var m=v(g,"H");return m&&m.tagName.length===2&&m.tagName!=="HR"?m:!1}},673:(h,c,p)=>{p.d(c,{T:()=>v});var v=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];for(var m={},x=function(S){for(var k in S)S.hasOwnProperty(k)&&(Object.prototype.toString.call(S[k])==="[object Object]"?m[k]=v(m[k],S[k]):m[k]=S[k])},w=0;w<b.length;w++)x(b[w]);return m}},810:(h,c,p)=>{p.d(c,{zh:()=>m,Ny:()=>x,Gb:()=>w,Hc:()=>S,im:()=>k,$j:()=>C,ib:()=>T,oC:()=>A});var v=p(145),b=p(410),g=p(106),m=function(M){var y,N=M[M.currentMode].element;return getSelection().rangeCount>0&&(y=getSelection().getRangeAt(0),N.isEqualNode(y.startContainer)||N.contains(y.startContainer))?y:M[M.currentMode].range?M[M.currentMode].range:(N.focus(),y=N.ownerDocument.createRange(),y.setStart(N,0),y.collapse(!0),y)},x=function(M){var y=window.getSelection().getRangeAt(0);if(!M.contains(y.startContainer)&&!(0,g.fb)(y.startContainer,"vditor-panel--none"))return{left:0,top:0};var N=M.parentElement.getBoundingClientRect(),z;if(y.getClientRects().length===0)if(y.startContainer.nodeType===3){var F=y.startContainer.parentElement;if(F&&F.getClientRects().length>0)z=F.getClientRects()[0];else return{left:0,top:0}}else{var P=y.startContainer.children;if(P[y.startOffset]&&P[y.startOffset].getClientRects().length>0)z=P[y.startOffset].getClientRects()[0];else if(y.startContainer.childNodes.length>0){var Y=y.cloneRange();y.selectNode(y.startContainer.childNodes[Math.max(0,y.startOffset-1)]),z=y.getClientRects()[0],y.setEnd(Y.endContainer,Y.endOffset),y.setStart(Y.startContainer,Y.startOffset)}else z=y.startContainer.getClientRects()[0];if(!z){for(var te=y.startContainer.childNodes[y.startOffset];!te.getClientRects||te.getClientRects&&te.getClientRects().length===0;)te=te.parentElement;z=te.getClientRects()[0]}}else z=y.getClientRects()[0];return{left:z.left-N.left,top:z.top-N.top}},w=function(M,y){if(!y){if(getSelection().rangeCount===0)return!1;y=getSelection().getRangeAt(0)}var N=y.commonAncestorContainer;return M.isEqualNode(N)||M.contains(N)},S=function(M){var y=window.getSelection();y.removeAllRanges(),y.addRange(M)},k=function(M,y,N){var z={end:0,start:0};if(!N){if(getSelection().rangeCount===0)return z;N=window.getSelection().getRangeAt(0)}if(w(y,N)){var F=N.cloneRange();M.childNodes[0]&&M.childNodes[0].childNodes[0]?F.setStart(M.childNodes[0].childNodes[0],0):F.selectNodeContents(M),F.setEnd(N.startContainer,N.startOffset),z.start=F.toString().length,z.end=z.start+N.toString().length}return z},C=function(M,y,N){var z=0,F=0,P=N.childNodes[F],Y=!1,te=!1;M=Math.max(0,M),y=Math.max(0,y);var de=N.ownerDocument.createRange();for(de.setStart(P||N,0),de.collapse(!0);!te&&P;){var Ce=z+P.textContent.length;if(!Y&&M>=z&&M<=Ce&&(M===0?de.setStart(P,0):P.childNodes[0].nodeType===3?de.setStart(P.childNodes[0],M-z):P.nextSibling?de.setStartBefore(P.nextSibling):de.setStartAfter(P),Y=!0,M===y)){te=!0;break}Y&&y>=z&&y<=Ce&&(y===0?de.setEnd(P,0):P.childNodes[0].nodeType===3?de.setEnd(P.childNodes[0],y-z):P.nextSibling?de.setEndBefore(P.nextSibling):de.setEndAfter(P),te=!0),z=Ce,P=N.childNodes[++F]}return!te&&N.childNodes[F-1]&&de.setStartBefore(N.childNodes[F-1]),S(de),de},T=function(M,y){var N=M.querySelector("wbr");if(N){if(!N.previousElementSibling)N.previousSibling?y.setStart(N.previousSibling,N.previousSibling.textContent.length):N.nextSibling?N.nextSibling.nodeType===3?y.setStart(N.nextSibling,0):y.setStartBefore(N.nextSibling):y.setStart(N.parentElement,0);else if(N.previousElementSibling.isSameNode(N.previousSibling))if(N.previousElementSibling.lastChild){y.setStartBefore(N),y.collapse(!0),S(y),(0,b.i7)()&&(N.previousElementSibling.tagName==="EM"||N.previousElementSibling.tagName==="STRONG"||N.previousElementSibling.tagName==="S")&&(y.insertNode(document.createTextNode(v.g.ZWSP)),y.collapse(!1)),N.remove();return}else y.setStartAfter(N.previousElementSibling);else y.setStart(N.previousSibling,N.previousSibling.textContent.length);y.collapse(!0),N.remove(),S(y)}},A=function(M,y){var N=document.createElement("div");N.innerHTML=M;var z=N.querySelectorAll("p");z.length===1&&!z[0].previousSibling&&!z[0].nextSibling&&y[y.currentMode].element.children.length>0&&N.firstElementChild.tagName==="P"&&(M=z[0].innerHTML.trim());var F=document.createElement("div");F.innerHTML=M;var P=m(y);if(P.toString()!==""&&(y[y.currentMode].preventInput=!0,document.execCommand("delete",!1,"")),F.firstElementChild&&F.firstElementChild.getAttribute("data-block")==="0"){F.lastElementChild.insertAdjacentHTML("beforeend","<wbr>");var Y=(0,g.F9)(P.startContainer);if(!Y)y[y.currentMode].element.insertAdjacentHTML("beforeend",F.innerHTML);else{var te=(0,g.lG)(P.startContainer,"LI");te&&F.firstElementChild.tagName==="UL"?te.insertAdjacentHTML("afterend",F.firstElementChild.innerHTML):Y.insertAdjacentHTML("afterend",F.innerHTML)}T(y[y.currentMode].element,P)}else{var de=document.createElement("template");de.innerHTML=M,P.insertNode(de.content.cloneNode(!0)),P.collapse(!1),S(P)}}}},r={};function o(h){var c=r[h];if(c!==void 0)return c.exports;var p=r[h]={exports:{}};return n[h](p,p.exports,o),p.exports}o.d=(h,c)=>{for(var p in c)o.o(c,p)&&!o.o(h,p)&&Object.defineProperty(h,p,{enumerable:!0,get:c[p]})},o.o=(h,c)=>Object.prototype.hasOwnProperty.call(h,c),o.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var l={};return(()=>{o.d(l,{default:()=>Nd});var h=o(408),c=o(145),p=o(105),v=function(i){return i.currentMode==="sv"?(0,p.X)("".concat(i.sv.element.textContent,`
|
||
`).replace(/\n\n$/,`
|
||
`)):i.currentMode==="wysiwyg"?i.lute.VditorDOM2Md(i.wysiwyg.element.innerHTML):i.currentMode==="ir"?i.lute.VditorIRDOM2Md(i.ir.element.innerHTML):""},b=o(413),g=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-devtools",this.element.innerHTML='<div class="vditor-reset--error"></div><div style="height: 100%;"></div>'}return i.prototype.renderEchart=function(a){var s=this;a.devtools.element.style.display==="block"&&(0,b.G)("".concat(a.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(a.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(a.lute.RenderEChartsJSON(v(a))),initialTreeDepth:-1,label:{align:"left",backgroundColor:"rgba(68, 77, 86, .68)",borderRadius:3,color:"#d1d5da",fontSize:12,lineHeight:12,offset:[9,12],padding:[2,4,2,4],position:"top",verticalAlign:"middle"},lineStyle:{color:"#4285f4",type:"curve",width:1},orient:"vertical",roam:!0,type:"tree"}],toolbox:{bottom:25,emphasis:{iconStyle:{color:"#4285f4"}},feature:{restore:{show:!0},saveAsImage:{show:!0}},right:15,show:!0}}),s.ASTChart.resize()}catch(u){s.element.lastElementChild.style.display="none",s.element.firstElementChild.innerHTML=u}})},i}(),m=o(410),x=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains("vditor-menu--current")&&u.classList.remove("vditor-menu--current")}})},w=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains("vditor-menu--current")&&u.classList.add("vditor-menu--current")}})},S=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.remove(c.g.CLASS_MENU_DISABLED)}})},k=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.add(c.g.CLASS_MENU_DISABLED)}})},C=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},T=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},A=function(i,a,s){a.includes("subToolbar")&&(i.toolbar.element.querySelectorAll(".vditor-hint").forEach(function(u){s&&u.isEqualNode(s)||(u.style.display="none")}),i.toolbar.elements.emoji&&(i.toolbar.elements.emoji.lastElementChild.style.display="none")),a.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&a.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,a,s,u){s.addEventListener((0,m.Le)(),function(d){d.preventDefault(),d.stopPropagation(),!s.classList.contains(c.g.CLASS_MENU_DISABLED)&&(i.toolbar.element.querySelectorAll(".vditor-hint--current").forEach(function(f){f.classList.remove("vditor-hint--current")}),a.style.display==="block"?a.style.display="none":(A(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),a.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?a.classList.add("vditor-panel--left"):a.classList.remove("vditor-panel--left")))})},y=o(106),N=o(771),z=function(i,a,s,u){u&&console.log("".concat(i," - ").concat(s,": ").concat(a))},F=o(135),P=o(775),Y=o(428),te=o(325),de=o(483),Ce=o(999),qe=o(472),Ge=o(637),nt=o(11),je=o(194),Ne=o(229),tt=o(825),lt=function(i,a,s){s===void 0&&(s="sv");var u=document.createElement("div");u.innerHTML=i;var d=!1;u.childElementCount===1&&u.lastElementChild.style.fontFamily.indexOf("monospace")>-1&&(d=!0);var f=u.querySelectorAll("pre");if(u.childElementCount===1&&f.length===1&&f[0].className!=="vditor-wysiwyg"&&f[0].className!=="vditor-sv"&&(d=!0),i.indexOf(`
|
||
<p class="p1">`)===0&&(d=!0),u.childElementCount===1&&u.firstElementChild.tagName==="TABLE"&&u.querySelector(".line-number")&&u.querySelector(".line-content")&&(d=!0),d){var E=a||i;return/\n/.test(E)||f.length===1?s==="wysiwyg"?'<div class="vditor-wysiwyg__block" data-block="0" data-type="code-block"><pre><code>'.concat(E.replace(/&/g,"&").replace(/</g,"<"),"<wbr></code></pre></div>"):"\n```\n"+E.replace(/&/g,"&").replace(/</g,"<")+"\n```":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&").replace(/</g,"<"),"</code><wbr>"):"`".concat(E,"`")}return!1},Qe=function(i,a){if(i){if(i.parentElement.getAttribute("data-type")==="html-block"){i.setAttribute("data-render","1");return}var s=i.firstElementChild.className.replace("language-","");if(s==="abc")(0,F.Q)(i,a.options.cdn);else if(s==="mermaid")(0,Ge.i)(i,a.options.cdn,a.options.theme);else if(s==="smiles")(0,tt.J)(i,a.options.cdn,a.options.theme);else if(s==="markmap")(0,nt.K)(i,a.options.cdn);else if(s==="flowchart")(0,te.P)(i,a.options.cdn);else if(s==="echarts")(0,P.p)(i,a.options.cdn,a.options.theme);else if(s==="mindmap")(0,je.P)(i,a.options.cdn,a.options.theme);else if(s==="plantuml")(0,Ne.B)(i,a.options.cdn);else if(s==="graphviz")(0,de.v)(i,a.options.cdn);else if(s==="math")(0,qe.H)(i,{cdn:a.options.cdn,math:a.options.preview.math});else{var u=a.options.customRenders.find(function(d){if(d.language===s)return d.render(i,a),!0});u||((0,Ce.s)(Object.assign({},a.options.preview.hljs),i,a.options.cdn),(0,Y.O)(i,a.options.preview.hljs))}i.setAttribute("data-render","1")}},j=o(810),Ht=function(i){if(i.currentMode!=="sv"){var a=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),a.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,qe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},Rt=function(i,a){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=a[a.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(a.options.height==="auto"){var d=u.offsetTop+a.element.offsetTop;a.options.toolbarConfig.pin||(d+=a.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else a.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,a.element.offsetTop),a[a.currentMode].element.scrollTop=u.offsetTop;return}},Ut=function(i,a,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,j.im)(i,a[a.currentMode].element,u).start===0)return i.previousElementSibling.remove(),st(a),!0;if(Fr(a,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,j.im)(i,a[a.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),st(a),!0;if(vi(a,s,u,i,i.nextElementSibling))return!0}if(s.key==="Backspace"||s.key==="Delete"){var d=(0,y.fb)(u.startContainer,"vditor-toc");if(d)return d.remove(),st(a),!0}},Nt=function(i,a,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(a.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(yo(d.innerHTML)&&d.previousElementSibling||wo(d.innerHTML))return;for(var f=(0,j.im)(d,i.ir.element,a).start,E=!0,L=f-1;L>d.textContent.substr(0,f).lastIndexOf(`
|
||
`);L--)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==" "){E=!1;break}f===0&&(E=!1);for(var D=!0,L=f-1;L<d.textContent.length;L++)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==`
|
||
`){D=!1;break}if(E){typeof i.options.input=="function"&&i.options.input(v(i));return}if(D&&/^#{1,6} $/.test(d.textContent)&&(D=!1),D){var _=(0,y.fb)(a.startContainer,"vditor-ir__marker");if(!_){var B=a.startContainer.previousSibling;B&&B.nodeType!==3&&B.classList.contains("vditor-ir__node--expand")&&B.classList.remove("vditor-ir__node--expand"),typeof i.options.input=="function"&&i.options.input(v(i));return}}}if(i.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(rt){rt.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var X=(0,y.fb)(a.startContainer,"vditor-ir__preview");X?X.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):a.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(rt){rt.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var fe=d.isEqualNode(i.ir.element),be=(0,y.a1)(d,"data-type","footnotes-block"),ce="";if(fe)ce=d.innerHTML;else{var ke=(0,N.S)(a.startContainer,"BLOCKQUOTE"),xe=(0,y.O9)(a.startContainer);if(xe&&(d=xe),ke&&(!xe||xe&&!ke.contains(xe))&&(d=ke),be&&(d=be),ce=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var ue=d.previousElementSibling,ze=d.nextElementSibling;ue&&(ue.tagName==="UL"||ue.tagName==="OL")&&(ce=ue.outerHTML+ce,ue.remove()),ze&&(ze.tagName==="UL"||ze.tagName==="OL")&&(ce=ce+ze.outerHTML,ze.remove()),ce=ce.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}else d.previousElementSibling&&d.previousElementSibling.textContent.replace(c.g.ZWSP,"")!==""&&u&&u.inputType==="insertParagraph"&&(ce=d.previousElementSibling.outerHTML+ce,d.previousElementSibling.remove());d.innerText.startsWith("```")||(i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(rt){rt&&!d.isEqualNode(rt)&&(ce+=rt.outerHTML,rt.remove())}),i.ir.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(rt){rt&&!d.isEqualNode(rt)&&(ce+=rt.outerHTML,rt.remove())}))}if(z("SpinVditorIRDOM",ce,"argument",i.options.debugger),ce=i.lute.SpinVditorIRDOM(ce),z("SpinVditorIRDOM",ce,"result",i.options.debugger),fe)d.innerHTML=ce;else if(d.outerHTML=ce,be){var Te=(0,y.a1)(i.ir.element.querySelector("wbr"),"data-type","footnotes-def");if(Te){var $e=Te.textContent,bt=$e.substring(1,$e.indexOf("]:")),gt=i.ir.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(bt,'"]'));gt&>.setAttribute("aria-label",$e.substr(bt.length+3).trim().substr(0,24))}}var kt,hn=i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");hn.forEach(function(rt,Bt){Bt===0?kt=rt:(kt.insertAdjacentHTML("beforeend",rt.innerHTML),rt.remove())}),hn.length>0&&i.ir.element.insertAdjacentElement("beforeend",hn[0]);var Kt,pn=i.ir.element.querySelectorAll("[data-type='footnotes-block']");pn.forEach(function(rt,Bt){Bt===0?Kt=rt:(Kt.insertAdjacentHTML("beforeend",rt.innerHTML),rt.remove())}),pn.length>0&&i.ir.element.insertAdjacentElement("beforeend",pn[0]),(0,j.ib)(i.ir.element,a),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(rt){Qe(rt,i)}),Ht(i),Zn(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},oe=function(i,a){if(i==="")return!1;if(i.indexOf("⇧")===-1&&i.indexOf("⌘")===-1&&i.indexOf("⌥")===-1)return!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.code===i;if(i==="⇧Tab")return!!(!(0,m.yl)(a)&&!a.altKey&&a.shiftKey&&a.code==="Tab");var s=i.split("");if(i.startsWith("⌥")){var u=s.length===3?s[2]:s[1];return!!((s.length===3?(0,m.yl)(a):!(0,m.yl)(a))&&a.altKey&&!a.shiftKey&&a.code===(/^[0-9]$/.test(u)?"Digit":"Key")+u)}i==="⌘Enter"&&(s=["⌘","Enter"]);var d=s.length>2&&s[0]==="⇧",f=d?s[2]:s[1];return d&&((0,m.vU)()||!/Mac/.test(navigator.platform))&&(f==="-"?f="_":f==="="&&(f="+")),!!((0,m.yl)(a)&&a.key.toLowerCase()===f.toLowerCase()&&!a.altKey&&(!d&&!a.shiftKey||d&&a.shiftKey))},he=function(i){var a=i.startContainer;if(a.nodeType===3&&a.nodeValue.length!==i.startOffset)return!1;for(var s=a.nextSibling;s&&s.textContent==="";)s=s.nextSibling;if(s){if(s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block"))return s}else{var u=(0,y.fb)(a,"vditor-ir__marker");if(u&&!u.nextSibling){var d=a.parentElement.parentElement.nextSibling;if(d&&d.nodeType!==3&&d.classList.contains("vditor-ir__node"))return d}return!1}return!1},J=function(i){var a=i.startContainer,s=a.previousSibling;return a.nodeType===3&&i.startOffset===0&&s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block")?s:!1},ee=function(i,a){a.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(E){E.classList.remove("vditor-ir__node--expand")});var s=(0,y.JQ)(i.startContainer,"vditor-ir__node"),u=!i.collapsed&&(0,y.JQ)(i.endContainer,"vditor-ir__node");if(!(!i.collapsed&&(!s||s!==u))){s&&(s.classList.add("vditor-ir__node--expand"),s.classList.remove("vditor-ir__node--hidden"),(0,j.Hc)(i));var d=he(i);if(d){d.classList.add("vditor-ir__node--expand"),d.classList.remove("vditor-ir__node--hidden");return}var f=J(i);if(f){f.classList.add("vditor-ir__node--expand"),f.classList.remove("vditor-ir__node--hidden");return}}},De=function(i,a){if(i.ir.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,j.zh)(i),u=s.startContainer;if(!vo(a,i,u)||(Fa(s,i,a),qs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.a1)(u,"data-newline","1");if(!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.key==="Enter"&&d&&s.startOffset<d.textContent.length){var f=d.previousElementSibling;f&&(s.insertNode(document.createTextNode(f.textContent)),s.collapse(!1));var E=d.nextSibling;E&&(s.insertNode(document.createTextNode(E.textContent)),s.collapse(!0))}var L=(0,y.lG)(u,"P");if(Ns(a,i,L,s)||_s(s,i,L,a)||zs(i,s,a,L))return!0;var D=(0,y.fb)(u,"vditor-ir__marker--pre");if(D&&D.tagName==="PRE"){var _=D.firstChild;if(Ps(i,a,D,s)||(_.getAttribute("data-type")==="math-block"||_.getAttribute("data-type")==="html-block")&&Fr(i,a,s,_,D.parentElement)||vi(i,a,s,_,D.parentElement))return!0}var B=(0,y.a1)(u,"data-type","code-block-info");if(B){if(a.key==="Enter"||a.key==="Tab")return s.selectNodeContents(B.nextElementSibling.firstChild),s.collapse(!0),a.preventDefault(),A(i,["hint"]),!0;if(a.key==="Backspace"){var X=(0,j.im)(B,i.ir.element).start;X===1&&s.setStart(u,0),X===2&&(i.hint.recentLanguage="")}if(Fr(i,a,s,B,B.parentElement))return A(i,["hint"]),!0}var fe=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(a.key.indexOf("Arrow")>-1&&fe){var be=fu(fe);if(be&&Fr(i,a,s,fe,be))return!0;var ce=mu(fe);if(ce&&vi(i,a,s,fe,ce))return!0}if(Hs(i,a,s)||Bs(i,s,a)||xo(i,s,a))return!0;var ke=(0,N.W)(u);if(ke){if(oe("⌘=",a)){var xe=ke.querySelector(".vditor-ir__marker--heading");return xe&&xe.textContent.trim().length>1&&bi(i,xe.textContent.substr(1)),a.preventDefault(),!0}if(oe("⌘-",a)){var xe=ke.querySelector(".vditor-ir__marker--heading");return xe&&xe.textContent.trim().length<6&&bi(i,xe.textContent.trim()+"# "),a.preventDefault(),!0}}var ue=(0,y.F9)(u);if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(Fs(i,s,a,L))return!0;if(ue&&ue.previousElementSibling&&ue.tagName!=="UL"&&ue.tagName!=="OL"&&(ue.previousElementSibling.getAttribute("data-type")==="code-block"||ue.previousElementSibling.getAttribute("data-type")==="math-block")){var ze=(0,j.im)(ue,i.ir.element,s).start;if(ze===0||ze===1&&ue.innerText.startsWith(c.g.ZWSP))return s.selectNodeContents(ue.previousElementSibling.querySelector(".vditor-ir__marker--pre code")),s.collapse(!1),ee(s,i),ue.textContent.trim().replace(c.g.ZWSP,"")===""&&(ue.remove(),Zn(i)),a.preventDefault(),!0}if(ke){var Te=ke.firstElementChild.textContent.length;(0,j.im)(ke,i.ir.element).start===Te&&Te!==0&&(s.setStart(ke.firstElementChild.firstChild,Te-1),s.collapse(!0),(0,j.Hc)(s))}}return(a.key==="ArrowUp"||a.key==="ArrowDown")&&ue&&(ue.querySelectorAll(".vditor-ir__node").forEach(function($e){$e.contains(u)||$e.classList.add("vditor-ir__node--hidden")}),js(a,ue,s))?!0:(Ms(s,a.key),ue&&Ut(ue,i,a,s)?(a.preventDefault(),!0):!1)},se=o(190),V=function(i,a){i.querySelectorAll("[data-type=footnotes-link]").forEach(function(s){for(var u=s.parentElement,d=u.nextSibling;d&&d.textContent.startsWith(" ");){var f=d;f.childNodes.forEach(function(E){u.append(E.cloneNode(!0))}),d=d.nextSibling,f.remove()}a&&a(u)})},Z=function(i,a){var s,u=getSelection().getRangeAt(0).cloneRange(),d=u.startContainer;u.startContainer.nodeType!==3&&u.startContainer.tagName==="DIV"&&(d=u.startContainer.childNodes[u.startOffset-1]);var f=(0,y.a1)(d,"data-block","0");if(f&&a&&(a.inputType==="deleteContentBackward"||a.data===" ")){for(var E=(0,j.im)(f,i.sv.element,u).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
|
||
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}if(E===0&&(L=!1),L){Pe(i);return}if(a.inputType==="deleteContentBackward"){var _=(0,y.a1)(d,"data-type","code-block-open-marker")||(0,y.a1)(d,"data-type","code-block-close-marker");if(_){if(_.getAttribute("data-type")==="code-block-close-marker"){var B=He(d,"code-block-open-marker");if(B){B.textContent=_.textContent,Pe(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var B=He(d,"code-block-close-marker",!1);if(B){B.textContent=_.textContent,Pe(i);return}}}var X=(0,y.a1)(d,"data-type","math-block-open-marker");if(X){var fe=X.nextElementSibling.nextElementSibling;fe&&fe.getAttribute("data-type")==="math-block-close-marker"&&(fe.remove(),Pe(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(ue){ue.textContent.length===1&&ue.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(ue){ue.textContent.length===1&&ue.remove()});var be=(0,y.a1)(d,"data-type","heading-marker");if(be&&be.textContent.indexOf("#")===-1){Pe(i);return}}if((a.data===" "||a.inputType==="deleteContentBackward")&&((0,y.a1)(d,"data-type","padding")||(0,y.a1)(d,"data-type","li-marker")||(0,y.a1)(d,"data-type","task-marker")||(0,y.a1)(d,"data-type","blockquote-marker"))){Pe(i);return}}if(f&&f.textContent.trimRight()==="$$"){Pe(i);return}f||(f=i.sv.element),((s=f.firstElementChild)===null||s===void 0?void 0:s.getAttribute("data-type"))==="link-ref-defs-block"&&(f=i.sv.element),(0,y.a1)(d,"data-type","footnotes-link")&&(f=i.sv.element),f.textContent.indexOf(Lute.Caret)===-1&&u.insertNode(document.createTextNode(Lute.Caret)),f.querySelectorAll("[style]").forEach(function(ue){ue.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(ue){ue.outerHTML=ue.innerHTML});var ce=f.textContent,ke=f.isEqualNode(i.sv.element);if(ke)ce=f.textContent;else{f.previousElementSibling&&(ce=f.previousElementSibling.textContent+ce,f.previousElementSibling.remove()),f.previousElementSibling&&ce.indexOf(`---
|
||
`)===0&&(ce=f.previousElementSibling.textContent+ce,f.previousElementSibling.remove());var xe="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(ue,ze){ue&&!f.isEqualNode(ue.parentElement)&&(xe+=ue.parentElement.textContent+`
|
||
`,ue.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(ue,ze){ue&&!f.isEqualNode(ue.parentElement)&&(xe+=ue.parentElement.textContent+`
|
||
`,ue.parentElement.remove())}),ce=xe+ce}ce=pe(ce,i),ke?f.innerHTML=ce:f.outerHTML=ce,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(ue){i.sv.element.insertAdjacentElement("beforeend",ue.parentElement)}),V(i.sv.element,function(ue){i.sv.element.insertAdjacentElement("beforeend",ue)}),(0,j.ib)(i.sv.element,u),K(i),Pe(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},ve=function(i,a){var s,u,d,f,E;if(i.sv.composingLock=a.isComposing,a.isComposing||(a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"))return!1;var L=(0,j.zh)(i),D=L.startContainer;L.startContainer.nodeType!==3&&L.startContainer.tagName==="DIV"&&(D=L.startContainer.childNodes[L.startOffset-1]);var _=(0,y.a1)(D,"data-type","text"),B=(0,y.a1)(D,"data-type","blockquote-marker");if(!B&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(B=_.previousElementSibling),B&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&B.nextElementSibling.textContent.trim()===""&&(0,j.im)(B,i.sv.element,L).start===B.textContent.length)return((s=B.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&B.previousElementSibling.setAttribute("data-action","enter-remove"),B.remove(),Pe(i),a.preventDefault(),!0;var X=(0,y.a1)(D,"data-type","li-marker"),fe=(0,y.a1)(D,"data-type","task-marker"),be=X;if(be||fe&&fe.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(be=fe),!be&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(be=_.previousElementSibling),be){var ce=(0,j.im)(be,i.sv.element,L).start,ke=be.getAttribute("data-type")==="task-marker",xe=be;if(ke&&(xe=be.previousElementSibling.previousElementSibling.previousElementSibling),ce===be.textContent.length){if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&be.nextElementSibling.textContent.trim()==="")return((u=xe.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(xe.previousElementSibling.remove(),Z(i)):(ke&&(xe.remove(),be.previousElementSibling.previousElementSibling.remove(),be.previousElementSibling.remove()),be.nextElementSibling.remove(),be.remove(),Pe(i)),a.preventDefault(),!0;if(a.key==="Tab")return a.shiftKey?xe.previousElementSibling.getAttribute("data-type")==="padding"&&xe.previousElementSibling.remove():xe.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(xe.textContent.replace(/\S/g," "),"</span>")),/^\d/.test(xe.textContent)&&(xe.textContent=xe.textContent.replace(/^\d{1,}/,"1"),L.selectNodeContents(be.firstChild),L.collapse(!1)),Z(i),a.preventDefault(),!0}}if(xo(i,L,a))return!0;var ue=(0,y.a1)(D,"data-block","0"),ze=(0,N.S)(D,"SPAN");if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&ue){var Te=!1,$e=ue.textContent.match(/^\n+/);(0,j.im)(ue,i.sv.element).start<=($e?$e[0].length:0)&&(Te=!0);var bt=`
|
||
`;if(ze){if(((d=ze.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return ze.previousElementSibling.remove(),Pe(i),a.preventDefault(),!0;bt+=Re(ze)}return L.insertNode(document.createTextNode(bt)),L.collapse(!1),ue&&ue.textContent.trim()!==""&&!Te?Z(i):Pe(i),a.preventDefault(),!0}if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey){if(ze&&((f=ze.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,j.im)(ze,i.sv.element,L).start===1&&ze.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(ze,0),L.extractContents(),ze.textContent.trim()!==""?Z(i):Pe(i),a.preventDefault(),!0;if(ue&&(0,j.im)(ue,i.sv.element,L).start===0&&ue.previousElementSibling){L.extractContents();var gt=ue.previousElementSibling.lastElementChild;return gt.getAttribute("data-type")==="newline"&&(gt.remove(),gt=ue.previousElementSibling.lastElementChild),gt.getAttribute("data-type")!=="newline"&&(gt.insertAdjacentHTML("afterend",ue.innerHTML),ue.remove()),ue.textContent.trim()!==""&&!(!((E=ue.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?Z(i):(gt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(gt.lastChild),L.collapse(!1)),Pe(i)),a.preventDefault(),!0}}return!1},le=o(538),we=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ae=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),we(i),(0,le.Z)(i.options.preview.theme.current,i.options.preview.theme.path),typeof i.options.height=="number"?i.element.style.height=i.options.height+"px":i.element.style.height=i.options.height,typeof i.options.minHeight=="number"&&(i.element.style.minHeight=i.options.minHeight+"px"),typeof i.options.width=="number"?i.element.style.width=i.options.width+"px":i.element.style.width=i.options.width,i.element.appendChild(i.toolbar.element);var a=document.createElement("div");if(a.className="vditor-content",i.options.outline.position==="left"&&a.appendChild(i.outline.element),a.appendChild(i.wysiwyg.element.parentElement),a.appendChild(i.sv.element),a.appendChild(i.ir.element.parentElement),a.appendChild(i.preview.element),i.toolbar.elements.devtools&&a.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),a.appendChild(i.outline.element)),i.upload&&a.appendChild(i.upload.element),i.options.resize.enable&&a.appendChild(i.resize.element),a.appendChild(i.hint.element),a.appendChild(i.tip.element),i.element.appendChild(a),a.addEventListener("click",function(){A(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),rr(i,i.options.mode,ot(i)),document.execCommand("DefaultParagraphSeparator",!1,"p"),navigator.userAgent.indexOf("iPhone")>-1&&typeof window.visualViewport<"u"){var s=!1,u=function(d){s||(s=!0,requestAnimationFrame(function(){s=!1;var f=i.toolbar.element;f.style.transform="none",f.getBoundingClientRect().top<0&&(f.style.transform="translate(0, ".concat(-f.getBoundingClientRect().top,"px)"))}))};window.visualViewport.addEventListener("scroll",u),window.visualViewport.addEventListener("resize",u)}},Fe=function(i){var a=window.innerWidth<=c.g.MOBILE_WIDTH?10:35;if(i.wysiwyg.element.parentElement.style.display!=="none"){var s=(i.wysiwyg.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.wysiwyg.element.style.padding="10px ".concat(Math.max(a,s),"px")}if(i.ir.element.parentElement.style.display!=="none"){var s=(i.ir.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.ir.element.style.padding="10px ".concat(Math.max(a,s),"px")}i.preview.element.style.display!=="block"?i.toolbar.element.style.paddingLeft=Math.max(5,parseInt(i[i.currentMode].element.style.paddingLeft||"0",10)+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0))+"px":i.toolbar.element.style.paddingLeft=5+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0)+"px"},Ke=function(i){if(i.options.typewriterMode){var a=window.innerHeight;typeof i.options.height=="number"?(a=i.options.height,typeof i.options.minHeight=="number"&&(a=Math.max(a,i.options.minHeight)),a=Math.min(window.innerHeight,a)):a=i.element.clientHeight,i.element.classList.contains("vditor--fullscreen")&&(a=window.innerHeight),i[i.currentMode].element.style.setProperty("--editor-bottom",(a-i.toolbar.element.offsetHeight)/2+"px")}},Xe;function Be(){window.removeEventListener("resize",Xe)}var ot=function(i){Ke(i),Be(),window.addEventListener("resize",Xe=function(){Fe(i),Ke(i)});var a=(0,m.pK)()&&localStorage.getItem(i.options.cache.id);return(!i.options.cache.enable||!a)&&(i.options.value?a=i.options.value:i.originalInnerHTML?a=i.lute.HTML2Md(i.originalInnerHTML):i.options.cache.enable||(a="")),a||""},Ue=function(i){clearTimeout(i[i.currentMode].hlToolbarTimeoutId),i[i.currentMode].hlToolbarTimeoutId=window.setTimeout(function(){if(i[i.currentMode].element.getAttribute("contenteditable")!=="false"&&(0,j.Gb)(i[i.currentMode].element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=(0,j.zh)(i),s=a.startContainer;a.startContainer.nodeType===3&&(s=a.startContainer.parentElement),s.classList.contains("vditor-reset")&&(s=s.childNodes[a.startOffset]);var u=i.currentMode==="sv"?(0,y.a1)(s,"data-type","heading"):(0,N.W)(s);u&&w(i.toolbar.elements,["headings"]);var d=i.currentMode==="sv"?(0,y.a1)(s,"data-type","blockquote"):(0,y.lG)(s,"BLOCKQUOTE");d&&w(i.toolbar.elements,["quote"]);var f=(0,y.a1)(s,"data-type","strong");f&&w(i.toolbar.elements,["bold"]);var E=(0,y.a1)(s,"data-type","em");E&&w(i.toolbar.elements,["italic"]);var L=(0,y.a1)(s,"data-type","s");L&&w(i.toolbar.elements,["strike"]);var D=(0,y.a1)(s,"data-type","a");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"LI");_?(_.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):_.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):_.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]);var B=(0,y.a1)(s,"data-type","code-block");B&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"]));var X=(0,y.a1)(s,"data-type","code");X&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"]));var fe=(0,y.a1)(s,"data-type","table");fe&&k(i.toolbar.elements,["headings","list","ordered-list","check","line","quote","code","table"])}},200)},Oe=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),clearTimeout(i.wysiwyg.afterRenderTimeoutId),i.wysiwyg.afterRenderTimeoutId=window.setTimeout(function(){if(!i.wysiwyg.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},mt=function(i){for(var a=i.previousSibling;a;){if(a.nodeType!==3&&a.tagName==="A"&&!a.previousSibling&&a.innerHTML.replace(c.g.ZWSP,"")===""&&a.nextSibling)return a;a=a.previousSibling}return!1},Ct=function(i){for(var a=i.startContainer.nextSibling;a&&a.textContent==="";)a=a.nextSibling;return!!(a&&a.nodeType!==3&&(a.tagName==="CODE"||a.getAttribute("data-type")==="math-inline"||a.getAttribute("data-type")==="html-entity"||a.getAttribute("data-type")==="html-inline"))},Vt=function(i){for(var a="",s=i.nextSibling;s;)s.nodeType===3?a+=s.textContent:a+=s.outerHTML,s=s.nextSibling;return a},$t=function(i){for(var a="",s=i.previousSibling;s;)s.nodeType===3?a=s.textContent+a:a=s.outerHTML+a,s=s.previousSibling;return a},$n=function(i){for(var a=i;a&&!a.nextSibling;)a=a.parentElement;return a.nextSibling},Mn=function(i){var a=$t(i.startContainer),s=Vt(i.startContainer),u=i.startContainer.textContent,d=i.startOffset,f="",E="";return(u.substr(0,d)!==""&&u.substr(0,d)!==c.g.ZWSP||a)&&(f="".concat(a).concat(u.substr(0,d))),(u.substr(d)!==""&&u.substr(d)!==c.g.ZWSP||s)&&(E="".concat(u.substr(d)).concat(s)),{afterHTML:E,beforeHTML:f}},In=function(i,a){Array.from(i.wysiwyg.element.childNodes).find(function(s){if(s.nodeType===3){var u=document.createElement("p");u.setAttribute("data-block","0"),u.textContent=s.textContent;var d=a.startContainer.nodeType===3?a.startOffset:s.textContent.length;return s.parentNode.insertBefore(u,s),s.remove(),a.setStart(u.firstChild,Math.min(u.firstChild.textContent.length,d)),a.collapse(!0),(0,j.Hc)(a),!0}else if(!s.getAttribute("data-block"))return s.tagName==="P"?s.remove():(s.tagName==="DIV"?(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>")):s.tagName==="BR"?s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"<wbr></p>"):(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"</p>")),(0,j.ib)(i.wysiwyg.element,a),a=getSelection().getRangeAt(0)),!0})},kn=function(i,a){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer);u||(u=s.startContainer.childNodes[s.startOffset]),!u&&i.wysiwyg.element.children.length===0&&(u=i.wysiwyg.element),u&&!u.classList.contains("vditor-wysiwyg__block")&&(s.insertNode(document.createElement("wbr")),u.innerHTML.trim()==="<wbr>"&&(u.innerHTML="<wbr><br>"),u.tagName==="BLOCKQUOTE"||u.classList.contains("vditor-reset")?u.innerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"):u.outerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"),(0,j.ib)(i.wysiwyg.element,s),Ht(i))},gr=function(i){var a=getSelection().getRangeAt(0),s=(0,y.F9)(a.startContainer);s||(s=a.startContainer.childNodes[a.startOffset]),s&&(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>"),(0,j.ib)(i.wysiwyg.element,a)),i.wysiwyg.popover.style.display="none"},nr=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling,d=u.ownerDocument.createRange();u.tagName==="CODE"?(u.style.display="inline-block",s?d.setStart(u.firstChild,1):d.selectNodeContents(u)):(u.style.display="block",u.firstChild.firstChild||u.firstChild.appendChild(document.createTextNode("")),d.selectNodeContents(u.firstChild)),s?d.collapse(!0):d.collapse(!1),(0,j.Hc)(d),!i.firstElementChild.classList.contains("language-mindmap")&&K(a)},Xn=function(i,a){if(i.wysiwyg.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,j.zh)(i),u=s.startContainer;if(!vo(a,i,u)||(Fa(s,i,a),qs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.F9)(u),f=(0,y.lG)(u,"P");if(Ns(a,i,f,s)||_s(s,i,f,a)||Hs(i,a,s))return!0;var E=(0,y.fb)(u,"vditor-wysiwyg__block");if(E){if(a.key==="Escape"&&E.children.length===2)return i.wysiwyg.popover.style.display="none",E.firstElementChild.style.display="none",i.wysiwyg.element.blur(),a.preventDefault(),!0;if(!(0,m.yl)(a)&&!a.shiftKey&&a.altKey&&a.key==="Enter"&&E.getAttribute("data-type")==="code-block"){var L=i.wysiwyg.popover.querySelector(".vditor-input");return L.focus(),L.select(),a.preventDefault(),!0}if(E.getAttribute("data-block")==="0"&&(Ps(i,a,E.firstElementChild,s)||vi(i,a,s,E.firstElementChild,E)||E.getAttribute("data-type")!=="yaml-front-matter"&&Fr(i,a,s,E.firstElementChild,E)))return!0}if(zs(i,s,a,f))return!0;var D=(0,y.E2)(u,"BLOCKQUOTE");if(D&&!a.shiftKey&&a.altKey&&a.key==="Enter"){(0,m.yl)(a)?s.setStartBefore(D):s.setStartAfter(D),(0,j.Hc)(s);var _=document.createElement("p");return _.setAttribute("data-block","0"),_.innerHTML=`
|
||
`,s.insertNode(_),s.collapse(!0),(0,j.Hc)(s),Oe(i),K(i),a.preventDefault(),!0}var B=(0,N.W)(u);if(B){if(B.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"){var X=document.createElement("p");return X.textContent=`
|
||
`,X.setAttribute("data-block","0"),u.parentElement.insertAdjacentElement("afterend",X),s.setStart(X,0),(0,j.Hc)(s),Oe(i),K(i),a.preventDefault(),!0}if(oe("⌘=",a)){var fe=parseInt(B.tagName.substr(1),10)-1;return fe>0&&(kn(i,"h".concat(fe)),Oe(i)),a.preventDefault(),!0}if(oe("⌘-",a)){var fe=parseInt(B.tagName.substr(1),10)+1;return fe<7&&(kn(i,"h".concat(fe)),Oe(i)),a.preventDefault(),!0}a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&B.textContent.length===1&&gr(i)}if(Bs(i,s,a))return!0;if(a.altKey&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.shiftKey){var be=(0,y.lG)(u,"A"),ce=(0,y.a1)(u,"data-type","link-ref"),ke=(0,y.a1)(u,"data-type","footnotes-ref");if(be||ce||ke||B&&B.tagName.length===2){var xe=i.wysiwyg.popover.querySelector("input");xe.focus(),xe.select()}}if(It(i,a))return!0;if(oe("⇧⌘U",a)){var ue=i.wysiwyg.popover.querySelector('[data-type="up"]');if(ue)return ue.click(),a.preventDefault(),!0}if(oe("⇧⌘D",a)){var ue=i.wysiwyg.popover.querySelector('[data-type="down"]');if(ue)return ue.click(),a.preventDefault(),!0}if(xo(i,s,a))return!0;if(!(0,m.yl)(a)&&a.shiftKey&&!a.altKey&&a.key==="Enter"&&u.parentElement.tagName!=="LI"&&u.parentElement.tagName!=="P")return["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName)?s.insertNode(document.createTextNode(`
|
||
`+c.g.ZWSP)):s.insertNode(document.createTextNode(`
|
||
`)),s.collapse(!1),(0,j.Hc)(s),Oe(i),K(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(Fs(i,s,a,f))return!0;if(d){if(d.previousElementSibling&&d.previousElementSibling.classList.contains("vditor-wysiwyg__block")&&d.previousElementSibling.getAttribute("data-block")==="0"&&d.tagName!=="UL"&&d.tagName!=="OL"){var ze=(0,j.im)(d,i.wysiwyg.element,s).start;if(ze===0&&s.startOffset===0||ze===1&&d.innerText.startsWith(c.g.ZWSP))return nr(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),Oe(i)),a.preventDefault(),!0}var Te=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Te-2)===`
|
||
`&&u.textContent.charAt(Te-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Te-1)+c.g.ZWSP,s.setStart(u,Te),s.collapse(!0),Oe(i),a.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&Ct(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"})}}if((0,m.vU)()&&s.startOffset===1&&u.textContent.indexOf(c.g.ZWSP)>-1&&u.previousSibling&&u.previousSibling.nodeType!==3&&u.previousSibling.tagName==="CODE"&&(a.key==="Backspace"||a.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),a.preventDefault(),!0;if(js(a,d,s))return a.preventDefault(),!0;if(Ms(s,a.key),a.key==="ArrowDown"){var $e=u.nextSibling;$e&&$e.nodeType!==3&&$e.getAttribute("data-type")==="math-inline"&&s.setStartAfter($e)}return d&&Ut(d,i,a,s)?(a.preventDefault(),!0):!1},It=function(i,a){if(oe("⇧⌘X",a)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),a.preventDefault(),!0}},zn=function(i){clearTimeout(i.wysiwyg.hlToolbarTimeoutId),i.wysiwyg.hlToolbarTimeoutId=window.setTimeout(function(){if(i.wysiwyg.element.getAttribute("contenteditable")!=="false"&&(0,j.Gb)(i.wysiwyg.element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=getSelection().getRangeAt(0),s=a.startContainer;a.startContainer.nodeType===3?s=a.startContainer.parentElement:s=s.childNodes[a.startOffset>=s.childNodes.length?s.childNodes.length-1:a.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",un(u,i),Gt(i,"footnotes-block"),nn(i,u);return}var d=(0,y.lG)(s,"LI");d?(d.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):d.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):d.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]),(0,y.lG)(s,"BLOCKQUOTE")&&w(i.toolbar.elements,["quote"]),((0,y.lG)(s,"B")||(0,y.lG)(s,"STRONG"))&&w(i.toolbar.elements,["bold"]),((0,y.lG)(s,"I")||(0,y.lG)(s,"EM"))&&w(i.toolbar.elements,["italic"]),((0,y.lG)(s,"STRIKE")||(0,y.lG)(s,"S"))&&w(i.toolbar.elements,["strike"]),i.wysiwyg.element.querySelectorAll(".vditor-comment--focus").forEach(function(Le){Le.classList.remove("vditor-comment--focus")});var f=(0,y.fb)(s,"vditor-comment");if(f){var E=f.getAttribute("data-cmtids").split(" ");if(E.length>1&&f.nextSibling.isSameNode(f.nextElementSibling)){var L=f.nextElementSibling.getAttribute("data-cmtids").split(" ");E.find(function(Le){if(L.includes(Le))return E=[Le],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Le){Le.getAttribute("data-cmtids").indexOf(E[0])>-1&&Le.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),B=(0,N.W)(s);(0,y.lG)(s,"CODE")?(0,y.lG)(s,"PRE")?(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"])):(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"])):B?(k(i.toolbar.elements,["bold"]),w(i.toolbar.elements,["headings"])):_&&k(i.toolbar.elements,["table"]);var X=(0,y.fb)(s,"vditor-toc");if(X){i.wysiwyg.popover.innerHTML="",un(X,i),Gt(i,"vditor-toc"),nn(i,X);return}var fe=(0,N.S)(s,"BLOCKQUOTE");if(fe&&(i.wysiwyg.popover.innerHTML="",vr(a,fe,i),cr(a,fe,i),un(fe,i),Gt(i,"blockquote"),nn(i,fe)),d&&(i.wysiwyg.popover.innerHTML="",vr(a,d,i),cr(a,d,i),un(d,i),Gt(i,"li"),nn(i,d)),_){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var be=function(){var Le=_.rows.length,ct=_.rows[0].cells.length,ar=parseInt(Bt.value,10)||Le,or=parseInt(fn.value,10)||ct;if(!(ar===Le&&ct===or)){if(ct!==or)for(var wi=or-ct,Fn=0;Fn<_.rows.length;Fn++)if(wi>0)for(var Js=0;Js<wi;Js++)Fn===0?_.rows[Fn].lastElementChild.insertAdjacentHTML("afterend","<th> </th>"):_.rows[Fn].lastElementChild.insertAdjacentHTML("afterend","<td> </td>");else for(var To=ct-1;To>=or;To--)_.rows[Fn].cells[To].remove();if(Le!==ar){var Qs=ar-Le;if(Qs>0){for(var Ao="<tr>",$r=0;$r<or;$r++)Ao+="<td> </td>";for(var el=0;el<Qs;el++)_.querySelector("tbody")?_.querySelector("tbody").insertAdjacentHTML("beforeend",Ao):_.querySelector("thead").insertAdjacentHTML("afterend",Ao+"</tr>")}else for(var $r=Le-1;$r>=ar;$r--)_.rows[$r].remove(),_.rows.length===1&&_.querySelector("tbody").remove()}typeof i.options.input=="function"&&i.options.input(v(i))}},ce=function(Le){na(_,Le),Le==="right"?(ze.classList.remove("vditor-icon--current"),Te.classList.remove("vditor-icon--current"),$e.classList.add("vditor-icon--current")):Le==="center"?(ze.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),Te.classList.add("vditor-icon--current")):(Te.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),ze.classList.add("vditor-icon--current")),(0,j.Hc)(a),Oe(i)},ke=(0,y.lG)(s,"TD"),xe=(0,y.lG)(s,"TH"),ue="left";ke?ue=ke.getAttribute("align")||"left":xe&&(ue=xe.getAttribute("align")||"center");var ze=document.createElement("button");ze.setAttribute("type","button"),ze.setAttribute("aria-label",window.VditorI18n.alignLeft+"<"+(0,m.ns)("⇧⌘L")+">"),ze.setAttribute("data-type","left"),ze.innerHTML='<svg><use xlink:href="#vditor-icon-align-left"></use></svg>',ze.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(ue==="left"?" vditor-icon--current":""),ze.onclick=function(){ce("left")};var Te=document.createElement("button");Te.setAttribute("type","button"),Te.setAttribute("aria-label",window.VditorI18n.alignCenter+"<"+(0,m.ns)("⇧⌘C")+">"),Te.setAttribute("data-type","center"),Te.innerHTML='<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',Te.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(ue==="center"?" vditor-icon--current":""),Te.onclick=function(){ce("center")};var $e=document.createElement("button");$e.setAttribute("type","button"),$e.setAttribute("aria-label",window.VditorI18n.alignRight+"<"+(0,m.ns)("⇧⌘R")+">"),$e.setAttribute("data-type","right"),$e.innerHTML='<svg><use xlink:href="#vditor-icon-align-right"></use></svg>',$e.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(ue==="right"?" vditor-icon--current":""),$e.onclick=function(){ce("right")};var bt=document.createElement("button");bt.setAttribute("type","button"),bt.setAttribute("aria-label",window.VditorI18n.insertRowBelow+"<"+(0,m.ns)("⌘=")+">"),bt.setAttribute("data-type","insertRow"),bt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-row"></use></svg>',bt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",bt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Ds(i,a,ct)};var gt=document.createElement("button");gt.setAttribute("type","button"),gt.setAttribute("aria-label",window.VditorI18n.insertRowAbove+"<"+(0,m.ns)("⇧⌘F")+">"),gt.setAttribute("data-type","insertRow"),gt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-rowb"></use></svg>',gt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",gt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Rs(i,a,ct)};var kt=document.createElement("button");kt.setAttribute("type","button"),kt.setAttribute("aria-label",window.VditorI18n.insertColumnRight+"<"+(0,m.ns)("⇧⌘=")+">"),kt.setAttribute("data-type","insertColumn"),kt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-column"></use></svg>',kt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",kt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&ra(i,_,ct)};var hn=document.createElement("button");hn.setAttribute("type","button"),hn.setAttribute("aria-label",window.VditorI18n.insertColumnLeft+"<"+(0,m.ns)("⇧⌘G")+">"),hn.setAttribute("data-type","insertColumn"),hn.innerHTML='<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>',hn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",hn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&ra(i,_,ct,"beforebegin")};var Kt=document.createElement("button");Kt.setAttribute("type","button"),Kt.setAttribute("aria-label",window.VditorI18n["delete-row"]+"<"+(0,m.ns)("⌘-")+">"),Kt.setAttribute("data-type","deleteRow"),Kt.innerHTML='<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>',Kt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Kt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Is(i,a,ct)};var pn=document.createElement("button");pn.setAttribute("type","button"),pn.setAttribute("aria-label",window.VditorI18n["delete-column"]+"<"+(0,m.ns)("⇧⌘-")+">"),pn.setAttribute("data-type","deleteColumn"),pn.innerHTML='<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>',pn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",pn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Os(i,a,_,ct)};var rt=document.createElement("span");rt.setAttribute("aria-label",window.VditorI18n.row),rt.className="vditor-tooltipped vditor-tooltipped__n";var Bt=document.createElement("input");rt.appendChild(Bt),Bt.type="number",Bt.min="1",Bt.className="vditor-input",Bt.style.width="42px",Bt.style.textAlign="center",Bt.setAttribute("placeholder",window.VditorI18n.row),Bt.value=_.rows.length.toString(),Bt.oninput=function(){be()},Bt.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){fn.focus(),fn.select(),Le.preventDefault();return}It(i,Le)||dn(Le,a)}};var oa=document.createElement("span");oa.setAttribute("aria-label",window.VditorI18n.column),oa.className="vditor-tooltipped vditor-tooltipped__n";var fn=document.createElement("input");oa.appendChild(fn),fn.type="number",fn.min="1",fn.className="vditor-input",fn.style.width="42px",fn.style.textAlign="center",fn.setAttribute("placeholder",window.VditorI18n.column),fn.value=_.rows[0].cells.length.toString(),fn.oninput=function(){be()},fn.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){Bt.focus(),Bt.select(),Le.preventDefault();return}It(i,Le)||dn(Le,a)}},vr(a,_,i),cr(a,_,i),un(_,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",ze),i.wysiwyg.popover.insertAdjacentElement("beforeend",Te),i.wysiwyg.popover.insertAdjacentElement("beforeend",$e),i.wysiwyg.popover.insertAdjacentElement("beforeend",gt),i.wysiwyg.popover.insertAdjacentElement("beforeend",bt),i.wysiwyg.popover.insertAdjacentElement("beforeend",hn),i.wysiwyg.popover.insertAdjacentElement("beforeend",kt),i.wysiwyg.popover.insertAdjacentElement("beforeend",Kt),i.wysiwyg.popover.insertAdjacentElement("beforeend",pn),i.wysiwyg.popover.insertAdjacentElement("beforeend",rt),i.wysiwyg.popover.insertAdjacentHTML("beforeend"," x "),i.wysiwyg.popover.insertAdjacentElement("beforeend",oa),Gt(i,"table"),nn(i,_)}var Eo=(0,y.a1)(s,"data-type","link-ref");Eo&&mo(i,Eo,a);var qr=(0,y.a1)(s,"data-type","footnotes-ref");if(qr){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var rt=document.createElement("span");rt.setAttribute("aria-label",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),rt.className="vditor-tooltipped vditor-tooltipped__n";var Yn=document.createElement("input");rt.appendChild(Yn),Yn.className="vditor-input",Yn.setAttribute("placeholder",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),Yn.style.width="120px",Yn.value=qr.getAttribute("data-footnotes-label"),Yn.oninput=function(){Yn.value.trim()!==""&&qr.setAttribute("data-footnotes-label",Yn.value),typeof i.options.input=="function"&&i.options.input(v(i))},Yn.onkeydown=function(ct){ct.isComposing||It(i,ct)||dn(ct,a)},un(qr,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",rt),Gt(i,"footnotes-ref"),nn(i,qr)}var Wt=(0,y.fb)(s,"vditor-wysiwyg__block"),Zs=Wt?Wt.getAttribute("data-type").indexOf("block")>-1:!1;if(i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(Le){if(!Wt||Wt&&Zs&&!Wt.contains(Le)){var ct=Le.previousElementSibling;ct.style.display="none"}}),Wt&&Zs){if(i.wysiwyg.popover.innerHTML="",vr(a,Wt,i),cr(a,Wt,i),un(Wt,i),Wt.getAttribute("data-type")==="code-block"){var sa=document.createElement("span");sa.setAttribute("aria-label",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),sa.className="vditor-tooltipped vditor-tooltipped__n";var Cn=document.createElement("input");sa.appendChild(Cn);var yi=Wt.firstElementChild.firstElementChild;Cn.className="vditor-input",Cn.setAttribute("placeholder",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),Cn.value=yi.className.indexOf("language-")>-1?yi.className.split("-")[1].split(" ")[0]:"",Cn.oninput=function(Le){Cn.value.trim()!==""?yi.className="language-".concat(Cn.value):(yi.className="",i.hint.recentLanguage=""),Wt.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(Wt.lastElementChild.innerHTML=Wt.firstElementChild.innerHTML,Qe(Wt.lastElementChild,i)),Oe(i),Le.detail===1&&(a.setStart(yi.firstChild,0),a.collapse(!0),(0,j.Hc)(a))},Cn.onkeydown=function(Le){if(!Le.isComposing&&!It(i,Le)){if(Le.key==="Escape"&&i.hint.element.style.display==="block"){i.hint.element.style.display="none",Le.preventDefault();return}i.hint.select(Le,i),dn(Le,a)}},Cn.onkeyup=function(Le){var ct,ar;if(!(Le.isComposing||Le.key==="Enter"||Le.key==="ArrowUp"||Le.key==="Escape"||Le.key==="ArrowDown")){var or=[],wi=Cn.value.substring(0,Cn.selectionStart);(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((ar=(ct=window.hljs)===null||ct===void 0?void 0:ct.listLanguages())!==null&&ar!==void 0?ar:[]).sort())).forEach(function(Fn){Fn.indexOf(wi.toLowerCase())>-1&&or.push({html:Fn,value:Fn})}),i.hint.genHTML(or,wi,i),Le.preventDefault()}},i.wysiwyg.popover.insertAdjacentElement("beforeend",sa),Gt(i,"code-block")}else Gt(i,"block");nn(i,Wt)}else Wt=void 0;if(B){i.wysiwyg.popover.innerHTML="";var rt=document.createElement("span");rt.setAttribute("aria-label","ID<"+(0,m.ns)("⌥Enter")+">"),rt.className="vditor-tooltipped vditor-tooltipped__n";var ir=document.createElement("input");rt.appendChild(ir),ir.className="vditor-input",ir.setAttribute("placeholder","ID<"+(0,m.ns)("⌥Enter")+">"),ir.style.width="120px",ir.value=B.getAttribute("data-id")||"",ir.oninput=function(){B.setAttribute("data-id",ir.value),typeof i.options.input=="function"&&i.options.input(v(i))},ir.onkeydown=function(ct){ct.isComposing||It(i,ct)||dn(ct,a)},vr(a,B,i),cr(a,B,i),un(B,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",rt),Gt(i,"heading"),nn(i,B)}if(D&&Zi(i,D,a),!fe&&!d&&!_&&!Wt&&!D&&!Eo&&!qr&&!B&&!X){var jr=(0,y.a1)(s,"data-block","0");jr&&jr.parentElement.isEqualNode(i.wysiwyg.element)?(i.wysiwyg.popover.innerHTML="",vr(a,jr,i),cr(a,jr,i),un(jr,i),Gt(i,"block"),nn(i,jr)):i.wysiwyg.popover.style.display="none"}i.wysiwyg.element.querySelectorAll('span[data-type="backslash"] > span').forEach(function(Le){Le.style.display="none"});var Ys=(0,y.a1)(a.startContainer,"data-type","backslash");Ys&&(Ys.querySelector("span").style.display="inline")}},200)},nn=function(i,a){var s=a,u=(0,y.lG)(a,"TABLE");u&&(s=u),i.wysiwyg.popover.style.left="0",i.wysiwyg.popover.style.display="block",i.wysiwyg.popover.style.top=Math.max(-8,s.offsetTop-21-i.wysiwyg.element.scrollTop)+"px",i.wysiwyg.popover.style.left=Math.min(s.offsetLeft,i.wysiwyg.element.clientWidth-i.wysiwyg.popover.clientWidth)+"px",i.wysiwyg.popover.setAttribute("data-top",(s.offsetTop-21).toString())},mo=function(i,a,s){s===void 0&&(s=getSelection().getRangeAt(0)),i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.tagName==="IMG"?a.setAttribute("alt",f.value):a.textContent=f.value),L.value.trim()!==""&&a.setAttribute("data-link-label",L.value),typeof i.options.input=="function"&&i.options.input(v(i))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.getAttribute("alt")||a.textContent,f.oninput=function(){u()},f.onkeydown=function(D){It(i,D)||dn(D,s)||Pr(i,a,D,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.linkRef),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.linkRef),L.value=a.getAttribute("data-link-label"),L.oninput=function(){u()},L.onkeydown=function(D){It(i,D)||dn(D,s)||Pr(i,a,D,f)},un(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),Gt(i,"link-ref"),nn(i,a)},vr=function(i,a,s){var u=a.previousElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","up"),d.setAttribute("aria-label",window.VditorI18n.up+"<"+(0,m.ns)("⇧⌘U")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-up"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("beforebegin",a),(0,j.ib)(s.wysiwyg.element,i),Oe(s),zn(s),K(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},cr=function(i,a,s){var u=a.nextElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","down"),d.setAttribute("aria-label",window.VditorI18n.down+"<"+(0,m.ns)("⇧⌘D")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-down"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("afterend",a),(0,j.ib)(s.wysiwyg.element,i),Oe(s),zn(s),K(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},un=function(i,a){var s=document.createElement("button");s.setAttribute("type","button"),s.setAttribute("data-type","remove"),s.setAttribute("aria-label",window.VditorI18n.remove+"<"+(0,m.ns)("⇧⌘X")+">"),s.innerHTML='<svg><use xlink:href="#vditor-icon-trashcan"></use></svg>',s.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",s.onclick=function(){var u=(0,j.zh)(a);u.setStartAfter(i),(0,j.Hc)(u),i.remove(),Oe(a),zn(a),["H1","H2","H3","H4","H5","H6"].includes(i.tagName)&&Ht(a)},a.wysiwyg.popover.insertAdjacentElement("beforeend",s)},Pr=function(i,a,s,u){if(!s.isComposing){if(s.key==="Tab"){u.focus(),u.select(),s.preventDefault();return}if(!(0,m.yl)(s)&&!s.shiftKey&&s.altKey&&s.key==="Enter"){var d=(0,j.zh)(i);a.insertAdjacentHTML("afterend",c.g.ZWSP),d.setStartAfter(a.nextSibling),d.collapse(!0),(0,j.Hc)(d),s.preventDefault()}}},Zi=function(i,a,s){i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.innerHTML=f.value),a.setAttribute("href",L.value),a.setAttribute("title",_.value),Oe(i)};a.querySelectorAll("[data-marker]").forEach(function(B){B.removeAttribute("data-marker")});var d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.innerHTML||"",f.oninput=function(){u()},f.onkeydown=function(B){It(i,B)||dn(B,s)||Pr(i,a,B,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.link),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.link),L.value=a.getAttribute("href")||"",L.oninput=function(){u()},L.onkeydown=function(B){It(i,B)||dn(B,s)||Pr(i,a,B,_)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.tooltipText),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.tooltipText),_.style.width="60px",_.value=a.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){It(i,B)||dn(B,s)||Pr(i,a,B,f)},un(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),i.wysiwyg.popover.insertAdjacentElement("beforeend",D),Gt(i,"a"),nn(i,a)},Xo=function(i,a){var s=i.target;a.wysiwyg.popover.innerHTML="";var u=function(){s.setAttribute("src",f.value),s.setAttribute("alt",L.value),s.setAttribute("title",_.value),typeof a.options.input=="function"&&a.options.input(v(a))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.imageURL),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.imageURL),f.value=s.getAttribute("src")||"",f.oninput=function(){u()},f.onkeydown=function(B){It(a,B)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.alternateText),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.alternateText),L.style.width="52px",L.value=s.getAttribute("alt")||"",L.oninput=function(){u()},L.onkeydown=function(B){It(a,B)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.title),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.title),_.value=s.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){It(a,B)},un(s,a),a.wysiwyg.popover.insertAdjacentElement("beforeend",d),a.wysiwyg.popover.insertAdjacentElement("beforeend",E),a.wysiwyg.popover.insertAdjacentElement("beforeend",D),Gt(a,"image"),nn(a,s)},dn=function(i,a){if(!(0,m.yl)(i)&&!i.shiftKey&&i.key==="Enter"||i.key==="Escape")return a&&(0,j.Hc)(a),i.preventDefault(),i.stopPropagation(),!0},Gt=function(i,a){i.options.customWysiwygToolbar(a,i.wysiwyg.popover)},ur=function(i){i.currentMode==="wysiwyg"?zn(i):i.currentMode==="ir"&&Ue(i)},Pa=function(i,a,s){s===void 0&&(s={enableAddUndoStack:!0,enableHint:!1,enableInput:!0});var u=i.wysiwyg.element;u.innerHTML=i.lute.Md2VditorDOM(a),u.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(d){Qe(d,i),d.previousElementSibling.setAttribute("style","display:none")}),Oe(i,s)},Yi=function(i,a,s){for(var u=i.startContainer.parentElement,d=!1,f="",E="",L=Mn(i),D=L.beforeHTML,_=L.afterHTML;u&&!d;){var B=u.tagName;if(B==="STRIKE"&&(B="S"),B==="I"&&(B="EM"),B==="B"&&(B="STRONG"),B==="S"||B==="STRONG"||B==="EM"){var X="",fe="",be="";u.parentElement.getAttribute("data-block")!=="0"&&(fe=$t(u),be=Vt(u)),(D||fe)&&(X="".concat(fe,"<").concat(B,">").concat(D,"</").concat(B,">"),D=X),(s==="bold"&&B==="STRONG"||s==="italic"&&B==="EM"||s==="strikeThrough"&&B==="S")&&(X+="".concat(f).concat(c.g.ZWSP,"<wbr>").concat(E),d=!0),(_||be)&&(_="<".concat(B,">").concat(_,"</").concat(B,">").concat(be),X+=_),u.parentElement.getAttribute("data-block")!=="0"?(u=u.parentElement,u.innerHTML=X):(u.outerHTML=X,u=u.parentElement),f="<".concat(B,">")+f,E="</".concat(B,">")+E}else d=!0}(0,j.ib)(a.wysiwyg.element,i)},Ji=function(i,a,s){if(!(i.wysiwyg.composingLock&&s instanceof CustomEvent)){var u=!0,d=!0;i.wysiwyg.element.querySelector("wbr")&&i.wysiwyg.element.querySelector("wbr").remove();var f=(0,j.zh)(i),E=a.getAttribute("data-type");if(a.classList.contains("vditor-menu--current"))if(E==="strike"&&(E="strikeThrough"),E==="quote"){var L=(0,y.lG)(f.startContainer,"BLOCKQUOTE");L||(L=f.startContainer.childNodes[f.startOffset]),L&&(u=!1,a.classList.remove("vditor-menu--current"),f.insertNode(document.createElement("wbr")),L.outerHTML=L.innerHTML.trim()===""?'<p data-block="0">'.concat(L.innerHTML,"</p>"):L.innerHTML,(0,j.ib)(i.wysiwyg.element,f))}else if(E==="inline-code"){var D=(0,y.lG)(f.startContainer,"CODE");D||(D=f.startContainer.childNodes[f.startOffset]),D&&(D.outerHTML=D.innerHTML.replace(c.g.ZWSP,"")+"<wbr>",(0,j.ib)(i.wysiwyg.element,f))}else E==="link"?(f.collapsed&&f.selectNode(f.startContainer.parentElement),document.execCommand("unlink",!1,"")):E==="check"||E==="list"||E==="ordered-list"?(ta(i,f,E),(0,j.ib)(i.wysiwyg.element,f),u=!1,a.classList.remove("vditor-menu--current")):(u=!1,a.classList.remove("vditor-menu--current"),f.toString()===""?Yi(f,i,E):document.execCommand(E,!1,""));else{i.wysiwyg.element.childNodes.length===0&&(i.wysiwyg.element.innerHTML='<p data-block="0"><wbr></p>',(0,j.ib)(i.wysiwyg.element,f));var _=(0,y.F9)(f.startContainer);if(E==="quote"){if(_||(_=f.startContainer.childNodes[f.startOffset]),_){u=!1,a.classList.add("vditor-menu--current"),f.insertNode(document.createElement("wbr"));var B=(0,y.lG)(f.startContainer,"LI");B&&_.contains(B)?B.innerHTML='<blockquote data-block="0">'.concat(B.innerHTML,"</blockquote>"):_.outerHTML='<blockquote data-block="0">'.concat(_.outerHTML,"</blockquote>"),(0,j.ib)(i.wysiwyg.element,f)}}else if(E==="check"||E==="list"||E==="ordered-list")ta(i,f,E,!1),(0,j.ib)(i.wysiwyg.element,f),u=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current");else if(E==="inline-code"){if(f.toString()===""){var X=document.createElement("code");X.textContent=c.g.ZWSP,f.insertNode(X),f.setStart(X.firstChild,1),f.collapse(!0),(0,j.Hc)(f)}else if(f.startContainer.nodeType===3){var X=document.createElement("code");f.surroundContents(X),f.insertNode(X),(0,j.Hc)(f)}a.classList.add("vditor-menu--current")}else if(E==="code"){var X=document.createElement("div");X.className="vditor-wysiwyg__block",X.setAttribute("data-type","code-block"),X.setAttribute("data-block","0"),X.setAttribute("data-marker","```"),f.toString()===""?X.innerHTML=`<pre><code><wbr>
|
||
</code></pre>`:(X.innerHTML="<pre><code>".concat(f.toString(),"<wbr></code></pre>"),f.deleteContents()),f.insertNode(X),_&&(_.outerHTML=i.lute.SpinVditorDOM(_.outerHTML)),(0,j.ib)(i.wysiwyg.element,f),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(bt){Qe(bt,i)}),a.classList.add("vditor-menu--disabled")}else if(E==="link"){if(f.toString()===""){var fe=document.createElement("a");fe.innerText=c.g.ZWSP,f.insertNode(fe),f.setStart(fe.firstChild,1),f.collapse(!0),Zi(i,fe,f);var be=i.wysiwyg.popover.querySelector("input");be.value="",be.focus(),d=!1}else{var X=document.createElement("a");X.setAttribute("href",""),X.innerHTML=f.toString(),f.surroundContents(X),f.insertNode(X),(0,j.Hc)(f),Zi(i,X,f);var ce=i.wysiwyg.popover.querySelectorAll("input");ce[0].value=X.innerText,ce[1].focus()}u=!1,a.classList.add("vditor-menu--current")}else if(E==="table"){var ke='<table data-block="0"><thead><tr><th>col1<wbr></th><th>col2</th><th>col3</th></tr></thead><tbody><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></tbody></table>';if(f.toString().trim()==="")_&&_.innerHTML.trim().replace(c.g.ZWSP,"")===""?_.outerHTML=ke:document.execCommand("insertHTML",!1,ke),f.selectNode(i.wysiwyg.element.querySelector("wbr").previousSibling),i.wysiwyg.element.querySelector("wbr").remove(),(0,j.Hc)(f);else{ke='<table data-block="0"><thead><tr>';var xe=f.toString().split(`
|
||
`),ue=xe[0].split(",").length>xe[0].split(" ").length?",":" ";xe.forEach(function($e,bt){bt===0?($e.split(ue).forEach(function(gt,kt){kt===0?ke+="<th>".concat(gt,"<wbr></th>"):ke+="<th>".concat(gt,"</th>")}),ke+="</tr></thead>"):(bt===1?ke+="<tbody><tr>":ke+="<tr>",$e.split(ue).forEach(function(gt){ke+="<td>".concat(gt,"</td>")}),ke+="</tr>")}),ke+="</tbody></table>",document.execCommand("insertHTML",!1,ke),(0,j.ib)(i.wysiwyg.element,f)}u=!1,a.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var ze=`<hr data-block="0"><p data-block="0"><wbr>
|
||
</p>`;_.innerHTML.trim()===""?_.outerHTML=ze:_.insertAdjacentHTML("afterend",ze),(0,j.ib)(i.wysiwyg.element,f)}}else if(u=!1,a.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Te="strong";E==="italic"?Te="em":E==="strikeThrough"&&(Te="s");var X=document.createElement(Te);X.textContent=c.g.ZWSP,f.insertNode(X),X.previousSibling&&X.previousSibling.textContent===c.g.ZWSP&&(X.previousSibling.textContent=""),f.setStart(X.firstChild,1),f.collapse(!0),(0,j.Hc)(f)}else document.execCommand(E,!1,"")}u&&zn(i),d&&Oe(i)}},Mt=function(){function i(a,s){var u,d=this;this.element=document.createElement("div"),s.className&&(u=this.element.classList).add.apply(u,s.className.split(" "));var f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"";s.level===2&&(f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"");var E=s.tip?s.tip+f:"".concat(window.VditorI18n[s.name]).concat(f),L=s.name==="upload"?"div":"button";if(s.level===2)this.element.innerHTML="<".concat(L,' data-type="').concat(s.name,'">').concat(E,"</").concat(L,">");else{this.element.classList.add("vditor-toolbar__item");var D=document.createElement(L);D.setAttribute("data-type",s.name),D.className="vditor-tooltipped vditor-tooltipped__".concat(s.tipPosition),D.setAttribute("aria-label",E),D.innerHTML=s.icon,this.element.appendChild(D)}s.prefix&&this.element.children[0].addEventListener((0,m.Le)(),function(_){_.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&(a.currentMode==="wysiwyg"?Ji(a,d.element.children[0],_):a.currentMode==="ir"?vu(a,d.element.children[0],s.prefix||"",s.suffix||""):Dt(a,d.element.children[0],s.prefix||"",s.suffix||""))})}return i}(),As=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rr=function(i,a,s){var u;if(typeof s!="string"?(A(i,["subToolbar","hint"]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===a&&typeof s!="string")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode==="both"&&a==="sv"?i.preview.element.style.display="block":i.preview.element.style.display="none",S(i.toolbar.elements,c.g.EDIT_TOOLBARS),x(i.toolbar.elements,c.g.EDIT_TOOLBARS),k(i.toolbar.elements,["outdent","indent"]),a==="ir")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="block",i.lute.SetVditorIR(!0),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!1),i.currentMode="ir",i.ir.element.innerHTML=i.lute.Md2VditorIRDOM(u),Zn(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),Fe(i),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){Qe(f,i)}),i.ir.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,qe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})});else if(a==="wysiwyg")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="block",i.ir.element.parentElement.style.display="none",i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!0),i.lute.SetVditorSV(!1),i.currentMode="wysiwyg",Fe(i),Pa(i,u,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),i.wysiwyg.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,qe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})}),i.wysiwyg.popover.style.display="none";else if(a==="sv"){T(i.toolbar.elements,["both"]),C(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="none",(i.options.preview.mode==="both"||i.options.preview.mode==="editor")&&(i.sv.element.style.display="block"),i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!0),i.currentMode="sv";var d=pe(u,i);d==="<div data-block='0'></div>"&&(d=""),i.sv.element.innerHTML=d,V(i.sv.element),Pe(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),Fe(i)}i.undo.resetIcon(i),typeof s!="string"&&(i[i.currentMode].element.focus(),ur(i)),Ht(i),Ke(i),i.toolbar.elements["edit-mode"]&&(i.toolbar.elements["edit-mode"].querySelectorAll("button").forEach(function(f){f.classList.remove("vditor-menu--current")}),i.toolbar.elements["edit-mode"].querySelector('button[data-mode="'.concat(i.currentMode,'"]')).classList.add("vditor-menu--current")),i.outline.toggle(i,i.currentMode!=="sv"&&i.options.outline.enable,typeof s!="string")}},Zo=function(i){As(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),f.innerHTML='<button data-mode="wysiwyg">'.concat(window.VditorI18n.wysiwyg," <").concat((0,m.ns)("⌥⌘7"),`></button>
|
||
<button data-mode="ir">`).concat(window.VditorI18n.instantRendering," <").concat((0,m.ns)("⌥⌘8"),`></button>
|
||
<button data-mode="sv">`).concat(window.VditorI18n.splitView," <").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return a.prototype._bindEvent=function(s,u,d){var f=this.element.children[0];M(s,u,f,d.level),u.children.item(0).addEventListener((0,m.Le)(),function(E){rr(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){rr(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){rr(s,"sv",E),E.preventDefault(),E.stopPropagation()})},a}(Mt),zr=function(i,a){return(0,j.Gb)(i,a)?getSelection().toString():""},Qi=function(i,a){a.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),A(i,["subToolbar","hint"])})},za=function(i,a){a.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,se.E)(s.target,i.options.lang,i.options.theme))})},ea=function(i,a){a.addEventListener("blur",function(s){if(i.currentMode==="ir"){var u=i.ir.element.querySelector(".vditor-ir__node--expand");u&&u.classList.remove("vditor-ir__node--expand")}else i.currentMode==="wysiwyg"&&!i.wysiwyg.selectPopover.contains(s.relatedTarget)&&i.wysiwyg.hideComment();i[i.currentMode].range=(0,j.zh)(i),i.options.blur&&i.options.blur(v(i))})},fi=function(i,a){a.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),a.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?st(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ia(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},Li=function(i,a,s){a.addEventListener("copy",function(u){return s(u,i)})},q=function(i,a,s){a.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},K=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var a=i[i.currentMode].element,s=(0,j.Ny)(a).top;i.options.height==="auto"&&!i.element.classList.contains("vditor--fullscreen")&&window.scrollTo(window.scrollX,s+i.element.offsetTop+i.toolbar.element.offsetHeight-window.innerHeight/2+10),(i.options.height!=="auto"||i.element.classList.contains("vditor--fullscreen"))&&(a.scrollTop=s+a.scrollTop-a.clientHeight/2+10)}},Q=function(i,a){a.addEventListener("keydown",function(s){if(!s.isComposing&&i.options.keydown&&i.options.keydown(s),!((i.options.hint.extend.length>1||i.toolbar.elements.emoji)&&i.hint.select(s,i))){if(i.options.comment.enable&&i.currentMode==="wysiwyg"&&(s.key==="Backspace"||oe("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(ve(i,s))return}else if(i.currentMode==="wysiwyg"){if(Xn(i,s))return}else if(i.currentMode==="ir"&&De(i,s))return;if(i.options.ctrlEnter&&oe("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(oe("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(oe("⌘Y",s)&&!i.toolbar.elements.redo){i.undo.redo(i),s.preventDefault();return}if(s.key==="Escape"){i.hint.element.style.display==="block"?i.hint.element.style.display="none":i.options.esc&&!s.isComposing&&i.options.esc(v(i)),s.preventDefault();return}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[1-6]$/.test(s.code)){if(i.currentMode==="wysiwyg"){var u=s.code.replace("Digit","H");(0,y.lG)(getSelection().getRangeAt(0).startContainer,u)?gr(i):kn(i,u),Oe(i)}else i.currentMode==="sv"?ht(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&bi(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" ");return s.preventDefault(),!0}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[7-9]$/.test(s.code))return s.code==="Digit7"?rr(i,"wysiwyg",s):s.code==="Digit8"?rr(i,"ir",s):s.code==="Digit9"&&rr(i,"sv",s),!0;i.options.toolbar.find(function(d){if(!d.hotkey||d.toolbar){if(d.toolbar){var f=d.toolbar.find(function(E){if(!E.hotkey)return!1;if(oe(E.hotkey,s))return i.toolbar.elements[E.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0});return!!f}return!1}if(oe(d.hotkey,s))return i.toolbar.elements[d.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0})}})},ye=function(i,a){a.addEventListener("selectstart",function(s){a.onmouseup=function(){setTimeout(function(){var u=zr(i[i.currentMode].element);u.trim()?(i.currentMode==="wysiwyg"&&i.options.comment.enable&&(!(0,y.a1)(s.target,"data-type","footnotes-block")&&!(0,y.a1)(s.target,"data-type","link-ref-defs-block")?i.wysiwyg.showComment():i.wysiwyg.hideComment()),i.options.select&&i.options.select(u)):(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.wysiwyg.hideComment(),typeof i.options.unSelect=="function"&&i.options.unSelect())})}})},Me=function(i,a){var s=(0,j.zh)(i);s.extractContents(),s.insertNode(document.createTextNode(Lute.Caret)),s.insertNode(document.createTextNode(a));var u=(0,y.a1)(s.startContainer,"data-block","0");u||(u=i.sv.element);var d=i.lute.SpinVditorSVDOM(u.textContent);d="<div data-block='0'>"+d.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
|
||
</span></span><span data-type="newline"><br /><span style="display: none">
|
||
</span></span></div><div data-block="0"><`)+"</div>",u.isEqualNode(i.sv.element)?u.innerHTML=d:u.outerHTML=d,V(i.sv.element),(0,j.ib)(i.sv.element,s),K(i)},He=function(i,a,s){s===void 0&&(s=!0);var u=i;for(u.nodeType===3&&(u=u.parentElement);u;){if(u.getAttribute("data-type")===a)return u;s?u=u.previousElementSibling:u=u.nextElementSibling}return!1},pe=function(i,a){z("SpinVditorSVDOM",i,"argument",a.options.debugger);var s=a.lute.SpinVditorSVDOM(i);return i="<div data-block='0'>"+s.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
|
||
</span></span><span data-type="newline"><br /><span style="display: none">
|
||
</span></span></div><div data-block="0"><`)+"</div>",z("SpinVditorSVDOM",i,"result",a.options.debugger),i},Re=function(i){var a=i.getAttribute("data-type"),s=i.previousElementSibling,u=a&&a!=="text"&&a!=="table"&&a!=="heading-marker"&&a!=="newline"&&a!=="yaml-front-matter-open-marker"&&a!=="yaml-front-matter-close-marker"&&a!=="code-block-info"&&a!=="code-block-close-marker"&&a!=="code-block-open-marker"?i.textContent:"",d=!1;for(a==="newline"&&(d=!0);s&&!d;){var f=s.getAttribute("data-type");if(f==="li-marker"||f==="blockquote-marker"||f==="task-marker"||f==="padding"){var E=s.textContent;if(f==="li-marker"&&(a==="code-block-open-marker"||a==="code-block-info"))u=E.replace(/\S/g," ")+u;else if(a==="code-block-close-marker"&&s.nextElementSibling.isSameNode(i)){var L=He(i,"code-block-open-marker");L&&L.previousElementSibling&&(s=L.previousElementSibling,u=E+u)}else u=E+u}else f==="newline"&&(d=!0);s=s.previousElementSibling}return u},Pe=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),i.preview.render(i);var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),clearTimeout(i.sv.processTimeoutId),i.sv.processTimeoutId=window.setTimeout(function(){a.enableAddUndoStack&&!i.sv.composingLock&&i.undo.addToUndoStack(i)},i.options.undoDelay)},ht=function(i,a){var s=(0,j.zh)(i),u=(0,N.S)(s.startContainer,"SPAN");u&&u.textContent.trim()!==""&&(a=`
|
||
`+a),s.collapse(!0),document.execCommand("insertHTML",!1,a)},Dt=function(i,a,s,u){var d=(0,j.zh)(i),f=a.getAttribute("data-type");i.sv.element.childNodes.length===0&&(i.sv.element.innerHTML=`<span data-type="p" data-block="0"><span data-type="text"><wbr></span></span><span data-type="newline"><br><span style="display: none">
|
||
</span></span>`,(0,j.ib)(i.sv.element,d));var E=(0,y.F9)(d.startContainer),L=(0,N.S)(d.startContainer,"SPAN");if(E){if(f==="link"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(u):D="".concat(s).concat(d.toString()).concat(u.replace(")",Lute.Caret+")")),document.execCommand("insertHTML",!1,D);return}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"||f==="line"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(f==="code"?"":u):D="".concat(s).concat(d.toString()).concat(Lute.Caret).concat(f==="code"?"":u),f==="table"||f==="code"&&L&&L.textContent!==""?D=`
|
||
|
||
`+D:f==="line"&&(D=`
|
||
|
||
`.concat(s,`
|
||
`).concat(Lute.Caret)),document.execCommand("insertHTML",!1,D);return}else if((f==="check"||f==="list"||f==="ordered-list"||f==="quote")&&L){var _="* ";f==="check"?_="* [ ] ":f==="ordered-list"?_="1. ":f==="quote"&&(_="> ");var B=He(L,"newline");B?B.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),Z(i);return}(0,j.ib)(i.sv.element,d),Pe(i)}},zt=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}},en=function(i,a){i.options.upload.setHeaders&&(i.options.upload.headers=i.options.upload.setHeaders()),i.options.upload.headers&&Object.keys(i.options.upload.headers).forEach(function(s){a.setRequestHeader(s,i.options.upload.headers[s])})},Bn=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(X){E(X)}}function D(B){try{_(u.throw(B))}catch(X){E(X)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},On=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},dr=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),mi=function(i,a){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,B){var X=a[B],fe=!0;X.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),fe=!1),X.size>i.options.upload.max&&(u+="<li>".concat(X.name," ").concat(window.VditorI18n.over," ").concat(i.options.upload.max/1024/1024,"M</li>"),fe=!1);var be=X.name.lastIndexOf("."),ce=X.name.substr(be),ke=i.options.upload.filename(X.name.substr(0,be))+ce;if(i.options.upload.accept){var xe=i.options.upload.accept.split(",").some(function(ue){var ze=ue.trim();if(ze.indexOf(".")===0){if(ce.toLowerCase()===ze.toLowerCase())return!0}else if(X.type.split("/")[0]===ze.split("/")[0])return!0;return!1});xe||(u+="<li>".concat(X.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),fe=!1)}fe&&(s.push(X),d+="<li>".concat(ke," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=a.length,L=0;L<E;L++)f(E,L);if(i.tip.show("<ul>".concat(u).concat(d,"</ul>")),i.options.upload.cancel){var D=i.tip.element.querySelector(".vditorCancelUpload");D&&D.addEventListener("click",function(){i.options.upload.cancel(s),i.tip.hide(),i.upload.isUploading=!1})}return s},Qr=function(i,a){var s=zt(a);s.focus();var u=JSON.parse(i),d="";u.code===1&&(d="".concat(u.msg)),u.data.errFiles&&u.data.errFiles.length>0&&(d="<ul><li>".concat(d,"</li>"),u.data.errFiles.forEach(function(E){var L=E.lastIndexOf("."),D=a.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?a.tip.show(d):a.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),B=a.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase(),_.indexOf(".wav")===0||_.indexOf(".mp3")===0||_.indexOf(".ogg")===0?a.currentMode==="wysiwyg"?f+=`<div class="vditor-wysiwyg__block" data-type="html-block"
|
||
data-block="0"><pre><code><audio controls="controls" src="`.concat(L,'"></audio></code></pre><pre class="vditor-wysiwyg__preview" data-render="1"><audio controls="controls" src="').concat(L,`"></audio></pre></div>
|
||
`):a.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L,`"></audio>
|
||
`):f+="[".concat(B,"](").concat(L,`)
|
||
`):_.indexOf(".apng")===0||_.indexOf(".bmp")===0||_.indexOf(".gif")===0||_.indexOf(".ico")===0||_.indexOf(".cur")===0||_.indexOf(".jpg")===0||_.indexOf(".jpeg")===0||_.indexOf(".jfif")===0||_.indexOf(".pjp")===0||_.indexOf(".pjpeg")===0||_.indexOf(".png")===0||_.indexOf(".svg")===0||_.indexOf(".webp")===0?a.currentMode==="wysiwyg"?f+='<img alt="'.concat(B,'" src="').concat(L,`">
|
||
`):f+=".concat(L,`)
|
||
`):a.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(B,`</a>
|
||
`):f+="[".concat(B,"](").concat(L,`)
|
||
`)}),(0,j.Hc)(a.upload.range),document.execCommand("insertHTML",!1,f),a.upload.range=getSelection().getRangeAt(0).cloneRange()},Br=function(i,a,s){return Bn(void 0,void 0,void 0,function(){var u,d,ce,f,E,E,L,D,_,B,X,fe,be,ce,ke,xe;return On(this,function(ue){switch(ue.label){case 0:for(u=[],d=i.options.upload.multiple===!0?a.length:1,ce=0;ce<d;ce++)f=a[ce],f instanceof DataTransferItem&&(f=f.getAsFile()),u.push(f);return i.options.upload.handler?[4,i.options.upload.handler(u)]:[3,2];case 1:return E=ue.sent(),s&&(s.value=""),typeof E=="string"?(i.tip.show(E),[2]):[2];case 2:return!i.options.upload.url||!i.upload?(s&&(s.value=""),i.tip.show("please config: options.upload.url"),[2]):i.options.upload.file?[4,i.options.upload.file(u)]:[3,4];case 3:u=ue.sent(),ue.label=4;case 4:if(i.options.upload.validate&&(E=i.options.upload.validate(u),typeof E=="string"))return i.tip.show(E),[2];if(L=zt(i),i.upload.range=(0,j.zh)(i),D=mi(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,B=i.options.upload.extraData,X=0,fe=Object.keys(B);X<fe.length;X++)be=fe[X],_.append(be,B[be]);for(ce=0,ke=D.length;ce<ke;ce++)_.append(i.options.upload.fieldName,D[ce]);return xe=new XMLHttpRequest,i.upload.xhr=xe,xe.open("POST",i.options.upload.url),i.options.upload.token&&xe.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(xe.withCredentials=!0),en(i,xe),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),xe.onreadystatechange=function(){if(xe.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),xe.status>=200&&xe.status<300)if(i.options.upload.success)i.options.upload.success(L,xe.responseText);else{var ze=xe.responseText;i.options.upload.format&&(ze=i.options.upload.format(a,xe.responseText)),Qr(ze,i)}else i.options.upload.error?i.options.upload.error(xe.responseText):i.tip.show(xe.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},xe.upload.onprogress=function(ze){if(ze.lengthComputable){var Te=ze.loaded/ze.total*100;i.upload.element.style.display="block";var $e=i.upload.element;$e.style.width=Te+"%"}},xe.send(_),[2]}})})},_r=function(i,a,s){var u,d=(0,y.F9)(a.startContainer);if(d||(d=i.wysiwyg.element),s&&s.inputType!=="formatItalic"&&s.inputType!=="deleteByDrag"&&s.inputType!=="insertFromDrop"&&s.inputType!=="formatBold"&&s.inputType!=="formatRemove"&&s.inputType!=="formatStrikeThrough"&&s.inputType!=="insertUnorderedList"&&s.inputType!=="insertOrderedList"&&s.inputType!=="formatOutdent"&&s.inputType!=="formatIndent"&&s.inputType!==""||!s){var f=mt(a.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Te){Te.remove()}),a.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Te){Te.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))});var E="";d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.wysiwyg.element);var L=d.isEqualNode(i.wysiwyg.element),D=(0,y.a1)(d,"data-type","footnotes-block");if(L)E=d.innerHTML;else{var _=(0,y.O9)(a.startContainer);if(_&&!D){var B=(0,N.S)(a.startContainer,"BLOCKQUOTE");B?d=(0,y.F9)(a.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var X=d.previousElementSibling,fe=d.nextElementSibling;X&&(X.tagName==="UL"||X.tagName==="OL")&&(E=X.outerHTML+E,X.remove()),fe&&(fe.tagName==="UL"||fe.tagName==="OL")&&(E=E+fe.outerHTML,fe.remove()),E=E.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}d.innerText.startsWith("```")||(i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}),i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}))}if(E=E.replace(/<\/(strong|b)><strong data-marker="\W{2}">/g,"").replace(/<\/(em|i)><em data-marker="\W{1}">/g,"").replace(/<\/(s|strike)><s data-marker="~{1,2}">/g,""),E==='<p data-block="0">```<wbr></p>'&&i.hint.recentLanguage&&(E='<p data-block="0">```<wbr></p>'.replace("```","```"+i.hint.recentLanguage)),z("SpinVditorDOM",E,"argument",i.options.debugger),E=i.lute.SpinVditorDOM(E),z("SpinVditorDOM",E,"result",i.options.debugger),L)d.innerHTML=E;else if(d.outerHTML=E,D){var be=(0,y.E2)(i.wysiwyg.element.querySelector("wbr"),"LI");if(be){var ce=i.wysiwyg.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(be.getAttribute("data-marker"),'"]'));ce&&ce.setAttribute("aria-label",be.textContent.trim().substr(0,24))}}var ke,xe=i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']");xe.forEach(function(Te,$e){$e===0?ke=Te:(ke.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),xe.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",xe[0]);var ue,ze=i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']");ze.forEach(function(Te,$e){$e===0?ue=Te:(ue.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),ze.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",ze[0]),(0,j.ib)(i.wysiwyg.element,a),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(Te){Qe(Te,i)}),s&&(s.inputType==="deleteContentBackward"||s.inputType==="deleteContentForward")&&i.options.comment.enable&&(i.wysiwyg.triggerRemoveComment(i),i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)))}Ht(i),Oe(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},Ba=function(i,a){return Object.defineProperty?Object.defineProperty(i,"raw",{value:a}):i.raw=a,i},go=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(X){E(X)}}function D(B){try{_(u.throw(B))}catch(X){E(X)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},hr=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},vo=function(i,a,s){if(i.keyCode===229&&i.code===""&&i.key==="Unidentified"&&a.currentMode!=="sv"){var u=(0,y.F9)(s);if(u&&u.textContent.trim()==="")return a[a.currentMode].composingLock=!0,!1}return!0},Fa=function(i,a,s){if(!(s.key==="Enter"||s.key==="Tab"||s.key==="Backspace"||s.key.indexOf("Arrow")>-1||(0,m.yl)(s)||s.key==="Escape"||s.shiftKey||s.altKey)){var u=(0,y.lG)(i.startContainer,"P")||(0,y.lG)(i.startContainer,"LI");if(u&&(0,j.im)(u,a[a.currentMode].element,i).start===0){u.nodeValue&&(u.nodeValue=u.nodeValue.replace(/\u2006/g,""));var d=document.createTextNode(c.g.ZWSP);i.insertNode(d),i.setStartAfter(d)}}},Ms=function(i,a){if(a==="ArrowDown"||a==="ArrowUp"){var s=(0,y.a1)(i.startContainer,"data-type","math-inline")||(0,y.a1)(i.startContainer,"data-type","html-entity")||(0,y.a1)(i.startContainer,"data-type","html-inline");s&&(a==="ArrowDown"&&i.setStartAfter(s.parentElement),a==="ArrowUp"&&i.setStartBefore(s.parentElement))}},gi=function(i,a){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer);u&&(u.insertAdjacentHTML(a,'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
|
||
</p>`)),(0,j.ib)(i[i.currentMode].element,s),ur(i),st(i))},fu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.rows[0].cells[0].isSameNode(i)?a:!1},mu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.lastElementChild.lastElementChild.lastElementChild.isSameNode(i)?a:!1},Cs=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling;return u||(i.parentElement.previousElementSibling?u=i.parentElement.previousElementSibling.lastElementChild:i.parentElement.parentElement.tagName==="TBODY"&&i.parentElement.parentElement.previousElementSibling?u=i.parentElement.parentElement.previousElementSibling.lastElementChild.lastElementChild:u=null),u&&(a.selectNodeContents(u),s||a.collapse(!1),(0,j.Hc)(a)),u},vi=function(i,a,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowDown"&&u.textContent.trimRight().substr(f.start).indexOf(`
|
||
`)===-1||a.key==="ArrowRight"&&f.start>=u.textContent.trimRight().length){var E=d.nextElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!0),(0,j.Hc)(s)),a.preventDefault(),!0}return!1},Fr=function(i,a,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf(`
|
||
`)===-1||(a.key==="ArrowLeft"||a.key==="Backspace"&&s.toString()==="")&&f.start===0){var E=d.previousElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("beforebegin",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!1),(0,j.Hc)(s)),a.preventDefault(),!0}return!1},ta=function(i,a,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(a.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(B){B.remove()}),a.insertNode(document.createElement("wbr")),u&&d){for(var f="",E=0;E<d.parentElement.childElementCount;E++){var L=d.parentElement.children[E].querySelector("input");L&&L.remove(),f+='<p data-block="0">'.concat(d.parentElement.children[E].innerHTML.trimLeft(),"</p>")}d.parentElement.insertAdjacentHTML("beforebegin",f),d.parentElement.remove()}else if(d)if(s==="check")d.parentElement.querySelectorAll("li").forEach(function(B){B.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(B.textContent.indexOf(" ")===0?"":" ")),B.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(B){B.querySelector("input").remove(),B.classList.remove("vditor-task")});var _=void 0;s==="list"?(_=document.createElement("ul"),_.setAttribute("data-marker","*")):(_=document.createElement("ol"),_.setAttribute("data-marker","1.")),_.setAttribute("data-block","0"),_.setAttribute("data-tight",d.parentElement.getAttribute("data-tight")),_.innerHTML=d.parentElement.innerHTML,d.parentElement.parentNode.replaceChild(_,d.parentElement)}else{var D=(0,y.a1)(a.startContainer,"data-block","0");D||(i[i.currentMode].element.querySelector("wbr").remove(),D=i[i.currentMode].element.querySelector("p"),D.innerHTML="<wbr>"),s==="check"?(D.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li class="vditor-task"><input type="checkbox" /> '.concat(D.innerHTML,"</li></ul>")),D.remove()):s==="list"?(D.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li>'.concat(D.innerHTML,"</li></ul>")),D.remove()):s==="ordered-list"&&(D.insertAdjacentHTML("beforebegin",'<ol data-block="0"><li>'.concat(D.innerHTML,"</li></ol>")),D.remove())}},Ls=function(i,a,s){var u=a.previousElementSibling;if(a&&u){var d=[a];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&a&&D.textContent.trim()!==""&&a.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(a),a=a.nextElementSibling)}),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(D){D.remove()}),s.insertNode(document.createElement("wbr"));var f=u.parentElement,E="";d.forEach(function(D){var _=D.getAttribute("data-marker");_.length!==1&&(_="1".concat(_.slice(-1))),E+='<li data-node-id="'.concat(D.getAttribute("data-node-id"),'" data-marker="').concat(_,'">').concat(D.innerHTML,"</li>"),D.remove()}),u.insertAdjacentHTML("beforeend","<".concat(f.tagName,' data-block="0">').concat(E,"</").concat(f.tagName,">")),i.currentMode==="wysiwyg"?f.outerHTML=i.lute.SpinVditorDOM(f.outerHTML):f.outerHTML=i.lute.SpinVditorIRDOM(f.outerHTML),(0,j.ib)(i[i.currentMode].element,s);var L=(0,y.O9)(s.startContainer);L&&L.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(D){Qe(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),st(i),ur(i)}else i[i.currentMode].element.focus()},bo=function(i,a,s,u){var d=(0,y.lG)(a.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(X){X.remove()}),s.insertNode(document.createElement("wbr"));var f=a.parentElement,E=f.cloneNode(),L=[a];Array.from(s.cloneContents().children).forEach(function(X,fe){X.nodeType!==3&&a&&X.textContent.trim()!==""&&a.getAttribute("data-node-id")===X.getAttribute("data-node-id")&&(fe!==0&&L.push(a),a=a.nextElementSibling)});var D=!1,_="";f.querySelectorAll("li").forEach(function(X){D&&(_+=X.outerHTML,!X.nextElementSibling&&!X.previousElementSibling?X.parentElement.remove():X.remove()),X.isSameNode(L[L.length-1])&&(D=!0)}),L.reverse().forEach(function(X){d.insertAdjacentElement("afterend",X)}),_&&(E.innerHTML=_,L[0].insertAdjacentElement("beforeend",E)),i.currentMode==="wysiwyg"?u.outerHTML=i.lute.SpinVditorDOM(u.outerHTML):u.outerHTML=i.lute.SpinVditorIRDOM(u.outerHTML),(0,j.ib)(i[i.currentMode].element,s);var B=(0,y.O9)(s.startContainer);B&&B.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(X){Qe(X,i),i.currentMode==="wysiwyg"&&X.previousElementSibling.setAttribute("style","display:none")}),st(i),ur(i)}else i[i.currentMode].element.focus()},na=function(i,a){for(var s=getSelection().getRangeAt(0).startContainer.parentElement,u=i.rows[0].cells.length,d=i.rows.length,f=0,E=0;E<d;E++)for(var L=0;L<u;L++)if(i.rows[E].cells[L].isSameNode(s)){f=L;break}for(var D=0;D<d;D++)i.rows[D].cells[f].setAttribute("align",a)},yo=function(i){var a=i.trimRight().split(`
|
||
`).pop();return a===""?!1:(a.replace(/ |-/g,"")===""||a.replace(/ |_/g,"")===""||a.replace(/ |\*/g,"")==="")&&a.replace(/ /g,"").length>2?!(a.indexOf("-")>-1&&a.trimLeft().indexOf(" ")===-1&&i.trimRight().split(`
|
||
`).length>1||a.indexOf(" ")===0||a.indexOf(" ")===0):!1},wo=function(i){var a=i.trimRight().split(`
|
||
`);return i=a.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||a.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},st=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?Oe(i,a):i.currentMode==="ir"?Zn(i,a):i.currentMode==="sv"&&Pe(i,a)},_s=function(i,a,s,u){var d,f=i.startContainer,E=(0,y.lG)(f,"LI");if(E){if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Enter"&&!u.shiftKey&&s&&E.contains(s)&&s.nextElementSibling)return E&&!E.textContent.endsWith(`
|
||
`)&&E.insertAdjacentText("beforeend",`
|
||
`),i.insertNode(document.createTextNode(`
|
||
|
||
`)),i.collapse(!1),st(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,j.im)(E,a[a.currentMode].element,i).start===0)return E.nextElementSibling?(E.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>")),E.remove()):E.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>"),(0,j.ib)(a[a.currentMode].element,i),st(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&E.textContent.trim().replace(c.g.ZWSP,"")===""&&i.toString()===""&&((d=E.previousElementSibling)===null||d===void 0?void 0:d.tagName)==="LI")return E.previousElementSibling.insertAdjacentText("beforeend",`
|
||
|
||
`),i.selectNodeContents(E.previousElementSibling),i.collapse(!1),E.remove(),(0,j.ib)(a[a.currentMode].element,i),st(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Tab"){var L=!1;if((i.startOffset===0&&(f.nodeType===3&&!f.previousSibling||f.nodeType!==3&&f.nodeName==="LI")||E.classList.contains("vditor-task")&&i.startOffset===1&&f.previousSibling.nodeType!==3&&f.previousSibling.tagName==="INPUT")&&(L=!0),L||i.toString()!=="")return u.shiftKey?bo(a,E,i,E.parentElement):Ls(a,E,i),u.preventDefault(),!0}}return!1},xo=function(i,a,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(a.toString()===""?(a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1)):(a.extractContents(),a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1))),(0,j.Hc)(a),st(i),s.preventDefault(),!0},Ns=function(i,a,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw($s||($s=Ba(["",""],["",""])),s.textContent).replace(/\\\|/g,"").trim(),f=d.split("|");if(d.startsWith("|")&&d.endsWith("|")&&f.length>3){var E=f.map(function(){return"---"}).join("|");return E=s.textContent+`
|
||
`+E.substring(3,E.length-3)+`
|
||
|<wbr>`,s.outerHTML=a.lute.SpinVditorDOM(E),(0,j.ib)(a[a.currentMode].element,u),st(a),K(a),i.preventDefault(),!0}if(yo(s.innerHTML)&&s.previousElementSibling){var L="",D=s.innerHTML.trimRight().split(`
|
||
`);return D.length>1&&(D.pop(),L='<p data-block="0">'.concat(D.join(`
|
||
`),"</p>")),s.insertAdjacentHTML("afterend","".concat(L,`<hr data-block="0"><p data-block="0"><wbr>
|
||
</p>`)),s.remove(),(0,j.ib)(a[a.currentMode].element,u),st(a),K(a),i.preventDefault(),!0}if(wo(s.innerHTML))return a.currentMode==="wysiwyg"?s.outerHTML=a.lute.SpinVditorDOM(s.innerHTML+`<p data-block="0"><wbr>
|
||
</p>`):s.outerHTML=a.lute.SpinVditorIRDOM(s.innerHTML+`<p data-block="0"><wbr>
|
||
</p>`),(0,j.ib)(a[a.currentMode].element,u),st(a),K(a),i.preventDefault(),!0}if(u.collapsed&&s.previousElementSibling&&i.key==="Backspace"&&!(0,m.yl)(i)&&!i.altKey&&!i.shiftKey&&s.textContent.trimRight().split(`
|
||
`).length>1&&(0,j.im)(s,a[a.currentMode].element,u).start===0){var _=(0,y.DX)(s.previousElementSibling);return _.textContent.endsWith(`
|
||
`)||(_.textContent=_.textContent+`
|
||
`),_.parentElement.insertAdjacentHTML("beforeend","<wbr>".concat(s.innerHTML)),s.remove(),(0,j.ib)(a[a.currentMode].element,u),!1}return!1}},Ds=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');s.tagName==="TH"?s.parentElement.parentElement.insertAdjacentHTML("afterend","<tbody><tr>".concat(u,"</tr></tbody>")):s.parentElement.insertAdjacentHTML("afterend","<tr>".concat(u,"</tr>")),st(i)},Rs=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)s.tagName==="TH"?u+='<th align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </th>'):u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');if(s.tagName==="TH"){s.parentElement.parentElement.insertAdjacentHTML("beforebegin","<thead><tr>".concat(u,"</tr></thead>")),a.insertNode(document.createElement("wbr"));var f=s.parentElement.innerHTML.replace(/<th>/g,"<td>").replace(/<\/th>/g,"</td>");s.parentElement.parentElement.nextElementSibling.insertAdjacentHTML("afterbegin",f),s.parentElement.parentElement.remove(),(0,j.ib)(i.ir.element,a)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));st(i)},ra=function(i,a,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<a.rows.length;E++)E===0?a.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):a.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");st(i)},Is=function(i,a,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?a.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):a.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),a.collapse(!1),(0,j.Hc)(a),st(i)}},Os=function(i,a,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(a.selectNodeContents(u.previousElementSibling||u.nextElementSibling),a.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),ur(i);break}L[d].remove()}(0,j.Hc)(a),st(i)},Hs=function(i,a,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"){(!d.lastElementChild||d.lastElementChild&&(!d.lastElementChild.isSameNode(d.lastChild)||d.lastElementChild.tagName!=="BR"))&&d.insertAdjacentHTML("beforeend","<br>");var f=document.createElement("br");return s.insertNode(f),s.setStartAfter(f),st(i),K(i),a.preventDefault(),!0}if(a.key==="Tab"){if(a.shiftKey)return Cs(d,s),a.preventDefault(),!0;var E=d.nextElementSibling;return E||(d.parentElement.nextElementSibling?E=d.parentElement.nextElementSibling.firstElementChild:d.parentElement.parentElement.tagName==="THEAD"&&d.parentElement.parentElement.nextElementSibling?E=d.parentElement.parentElement.nextElementSibling.firstElementChild.firstElementChild:E=null),E&&(s.selectNodeContents(E),(0,j.Hc)(s)),a.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(a.key==="ArrowUp"){if(a.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,j.Hc)(s)):gi(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var B=_.previousElementSibling;return B||(B=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(B.cells[D]),s.collapse(!1),(0,j.Hc)(s),!0}if(a.key==="ArrowDown"){a.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,j.Hc)(s)):gi(i,"afterend"),!0;for(var D=0;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var E=_.nextElementSibling;return E||(E=_.parentElement.nextElementSibling.firstChild),s.selectNodeContents(E.cells[D]),s.collapse(!0),(0,j.Hc)(s),!0}if(i.currentMode==="wysiwyg"&&!(0,m.yl)(a)&&a.key==="Enter"&&!a.shiftKey&&a.altKey){var X=i.wysiwyg.popover.querySelector(".vditor-input");return X.focus(),X.select(),a.preventDefault(),!0}if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Backspace"&&s.startOffset===0&&s.toString()===""){var fe=Cs(d,s,!1);return!fe&&L&&(L.textContent.trim()===""?(L.outerHTML=`<p data-block="0"><wbr>
|
||
</p>`,(0,j.ib)(i[i.currentMode].element,s)):(s.setStartBefore(L),s.collapse(!0)),st(i)),a.preventDefault(),!0}if(oe("⇧⌘F",a))return Rs(i,s,d),a.preventDefault(),!0;if(oe("⌘=",a))return Ds(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘G",a))return ra(i,L,d,"beforebegin"),a.preventDefault(),!0;if(oe("⇧⌘=",a))return ra(i,L,d),a.preventDefault(),!0;if(oe("⌘-",a))return Is(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘-",a))return Os(i,s,L,d),a.preventDefault(),!0;if(oe("⇧⌘L",a)){if(i.currentMode==="ir")return na(L,"left"),st(i),a.preventDefault(),!0;var be=i.wysiwyg.popover.querySelector('[data-type="left"]');if(be)return be.click(),a.preventDefault(),!0}if(oe("⇧⌘C",a)){if(i.currentMode==="ir")return na(L,"center"),st(i),a.preventDefault(),!0;var be=i.wysiwyg.popover.querySelector('[data-type="center"]');if(be)return be.click(),a.preventDefault(),!0}if(oe("⇧⌘R",a)){if(i.currentMode==="ir")return na(L,"right"),st(i),a.preventDefault(),!0;var be=i.wysiwyg.popover.querySelector('[data-type="right"]');if(be)return be.click(),a.preventDefault(),!0}}return!1},Ps=function(i,a,s,u){if(s.tagName==="PRE"&&oe("⌘A",a))return u.selectNodeContents(s.firstElementChild),a.preventDefault(),!0;if(i.options.tab&&a.key==="Tab"&&!a.shiftKey&&u.toString()==="")return u.insertNode(document.createTextNode(i.options.tab)),u.collapse(!1),st(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey){var d=(0,j.im)(s,i[i.currentMode].element,u);if((d.start===0||d.start===1&&s.innerText===`
|
||
`)&&u.toString()==="")return s.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(s.firstElementChild.innerHTML,"</p>"),(0,j.ib)(i[i.currentMode].element,u),st(i),a.preventDefault(),!0}return!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"?(s.firstElementChild.textContent.endsWith(`
|
||
`)||s.firstElementChild.insertAdjacentText("beforeend",`
|
||
`),u.extractContents(),u.insertNode(document.createTextNode(`
|
||
`)),u.collapse(!1),(0,j.Hc)(u),(0,m.vU)()||(i.currentMode==="wysiwyg"?_r(i,u):Nt(i,u)),K(i),a.preventDefault(),!0):!1},zs=function(i,a,s,u){var d=a.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&a.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,j.im)(f,i[i.currentMode].element,a).start===0)return a.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0;if(u&&s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&u.parentElement.tagName==="BLOCKQUOTE"){var E=!1;if(u.innerHTML.replace(c.g.ZWSP,"")===`
|
||
`||u.innerHTML.replace(c.g.ZWSP,"")===""?(E=!0,u.remove()):u.innerHTML.endsWith(`
|
||
|
||
`)&&(0,j.im)(u,i[i.currentMode].element,a).start===u.textContent.length-1&&(u.innerHTML=u.innerHTML.substr(0,u.innerHTML.length-2),E=!0),E)return f.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
|
||
</p>`)),(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0}var L=(0,y.F9)(d);if(i.currentMode==="wysiwyg"&&L&&oe("⇧⌘;",s))return a.insertNode(document.createElement("wbr")),L.outerHTML='<blockquote data-block="0">'.concat(L.outerHTML,"</blockquote>"),(0,j.ib)(i.wysiwyg.element,a),Oe(i),s.preventDefault(),!0;if(vi(i,s,a,f,f)||Fr(i,s,a,f,f))return!0}return!1},Bs=function(i,a,s){var u=a.startContainer,d=(0,y.lG)(u,"LI");if(d&&d.classList.contains("vditor-task")){if(oe("⇧⌘J",s)){var f=d.firstElementChild;return f.checked?f.removeAttribute("checked"):f.setAttribute("checked","checked"),st(i),s.preventDefault(),!0}if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&a.toString()===""&&a.startOffset===1&&(u.nodeType===3&&u.previousSibling&&u.previousSibling.tagName==="INPUT"||u.nodeType!==3)){var E=d.previousElementSibling;if(d.querySelector("input").remove(),E){var L=(0,y.DX)(E);L.parentElement.insertAdjacentHTML("beforeend","<wbr>"+d.innerHTML.trim()),d.remove()}else d.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(d.innerHTML.trim()||`
|
||
`,"</p>")),d.nextElementSibling?d.remove():d.parentElement.remove();return(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0}if(s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey){if(d.textContent.trim()==="")if((0,y.fb)(d.parentElement,"vditor-task")){var D=(0,y.O9)(u);D&&bo(i,d,a,D)}else if(d.nextElementSibling){var _="",B="",X=!1;Array.from(d.parentElement.children).forEach(function(ke){d.isSameNode(ke)?X=!0:X?_+=ke.outerHTML:B+=ke.outerHTML});var fe=d.parentElement.tagName,be=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),ce="";B&&(ce=d.parentElement.tagName==="UL"?"":' start="1"',B="<".concat(fe,' data-tight="true"').concat(be,' data-block="0">').concat(B,"</").concat(fe,">")),d.parentElement.outerHTML="".concat(B,`<p data-block="0"><wbr>
|
||
</p><`).concat(fe,`
|
||
data-tight="true"`).concat(be,' data-block="0"').concat(ce,">").concat(_,"</").concat(fe,">")}else d.parentElement.insertAdjacentHTML("afterend",`<p data-block="0"><wbr>
|
||
</p>`),d.parentElement.querySelectorAll("li").length===1?d.parentElement.remove():d.remove();else u.nodeType!==3&&a.startOffset===0&&u.firstChild.tagName==="INPUT"?a.setStart(u.childNodes[1],1):(a.setEndAfter(d.lastChild),d.insertAdjacentHTML("afterend",'<li class="vditor-task" data-marker="'.concat(d.getAttribute("data-marker"),'"><input type="checkbox"> <wbr></li>')),document.querySelector("wbr").after(a.extractContents()));return(0,j.ib)(i[i.currentMode].element,a),st(i),K(i),s.preventDefault(),!0}}return!1},Fs=function(i,a,s,u){if(a.startContainer.nodeType!==3){var d=a.startContainer.children[a.startOffset];if(d&&d.tagName==="HR")return a.selectNodeContents(d.previousElementSibling),a.collapse(!1),s.preventDefault(),!0}if(u){var f=u.previousElementSibling;if(f&&(0,j.im)(u,i[i.currentMode].element,a).start===0&&((0,m.vU)()&&f.tagName==="HR"||f.tagName==="TABLE")){if(f.tagName==="TABLE"){var E=f.lastElementChild.lastElementChild.lastElementChild;E.innerHTML=E.innerHTML.trimLeft()+"<wbr>"+u.textContent.trim(),u.remove()}else f.remove();return(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0}}return!1},qs=function(i){(0,m.vU)()&&i.startContainer.nodeType!==3&&i.startContainer.tagName==="HR"&&i.setStartBefore(i.startContainer)},js=function(i,a,s){var u,d;if(!(0,m.vU)())return!1;if(i.key==="ArrowUp"&&a&&((u=a.previousElementSibling)===null||u===void 0?void 0:u.tagName)==="TABLE"){var f=a.previousElementSibling;return s.selectNodeContents(f.rows[f.rows.length-1].lastElementChild),s.collapse(!1),i.preventDefault(),!0}return i.key==="ArrowDown"&&a&&((d=a.nextElementSibling)===null||d===void 0?void 0:d.tagName)==="TABLE"?(s.selectNodeContents(a.nextElementSibling.rows[0].cells[0]),s.collapse(!0),i.preventDefault(),!0):!1},ia=function(i,a,s){return go(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,X,fe,be,ce,ke,ue,xe,ue,ze;return hr(this,function(Te){switch(Te.label){case 0:return i[i.currentMode].element.getAttribute("contenteditable")!=="true"?[2]:(a.stopPropagation(),a.preventDefault(),"clipboardData"in a?(u=a.clipboardData.getData("text/html"),d=a.clipboardData.getData("text/plain"),f=a.clipboardData.files):(u=a.dataTransfer.getData("text/html"),d=a.dataTransfer.getData("text/plain"),a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items)),E={},L=function($e,bt){if(!bt)return["",Lute.WalkContinue];if(i.options.upload.renderLinkDest)return i.options.upload.renderLinkDest(i,$e,bt);var gt=$e.TokensStr();if($e.__internal_object__.Parent.Type===34&>&>.indexOf("file://")===-1&&i.options.upload.linkToImgUrl){var kt=new XMLHttpRequest;kt.open("POST",i.options.upload.linkToImgUrl),i.options.upload.token&&kt.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(kt.withCredentials=!0),en(i,kt),kt.setRequestHeader("Content-Type","application/json; charset=utf-8"),kt.onreadystatechange=function(){if(kt.readyState===XMLHttpRequest.DONE){if(kt.status===200){var hn=kt.responseText;i.options.upload.linkToImgFormat&&(hn=i.options.upload.linkToImgFormat(kt.responseText));var Kt=JSON.parse(hn);if(Kt.code!==0){i.tip.show(Kt.msg);return}var pn=Kt.data.originalURL;if(i.currentMode==="sv")i.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(Bt){Bt.textContent===pn&&(Bt.textContent=Kt.data.url)});else{var rt=i[i.currentMode].element.querySelector('img[src="'.concat(pn,'"]'));rt.src=Kt.data.url,i.currentMode==="ir"&&(rt.previousElementSibling.previousElementSibling.innerHTML=Kt.data.url)}st(i)}else i.tip.show(kt.responseText);i.options.upload.linkToImgCallback&&i.options.upload.linkToImgCallback(kt.responseText)}},kt.send(JSON.stringify({url:gt}))}return i.currentMode==="ir"?['<span class="vditor-ir__marker vditor-ir__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]:i.currentMode==="wysiwyg"?["",Lute.WalkContinue]:['<span class="vditor-sv__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]},(u.replace(/&/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<a href="'.concat(d,'">').concat(d,"</a>")||u.replace(/&/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<!--StartFragment--><a href="'.concat(d,'">').concat(d,"</a><!--EndFragment-->"))&&(u=""),D=new DOMParser().parseFromString(u,"text/html"),D.body&&(u=D.body.innerHTML),u=Lute.Sanitize(u),i.wysiwyg.getComments(i),_=i[i.currentMode].element.scrollHeight,B=lt(u,d,i.currentMode),X=i.currentMode==="sv"?(0,y.a1)(a.target,"data-type","code-block"):(0,y.lG)(a.target,"CODE"),X?(i.currentMode==="sv"?document.execCommand("insertHTML",!1,d.replace(/&/g,"&").replace(/</g,"<")):(fe=(0,j.im)(a.target,i[i.currentMode].element),X.parentElement.tagName!=="PRE"&&(d+=c.g.ZWSP),X.textContent=X.textContent.substring(0,fe.start)+d+X.textContent.substring(fe.end),(0,j.$j)(fe.start+d.length,fe.start+d.length,X.parentElement),!((ze=X.parentElement)===null||ze===void 0)&&ze.nextElementSibling.classList.contains("vditor-".concat(i.currentMode,"__preview"))&&(X.parentElement.nextElementSibling.innerHTML=X.outerHTML,Qe(X.parentElement.nextElementSibling,i))),[3,10]):[3,1]);case 1:return B?(s.pasteCode(B),[3,10]):[3,2];case 2:return u.trim()===""?[3,5]:(be=document.createElement("div"),be.innerHTML=u,i.options.upload.base64ToLink?[3,4]:[4,gu(i,be,("clipboardData"in a?a.clipboardData:a.dataTransfer).getData("text/rtf"))]);case 3:Te.sent(),Te.label=4;case 4:return be.querySelectorAll("[style]").forEach(function($e){$e.removeAttribute("style")}),be.querySelectorAll(".vditor-copy").forEach(function($e){$e.remove()}),i.currentMode==="ir"?(E.HTML2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorIRDOM(be.innerHTML),i)):i.currentMode==="wysiwyg"?(E.HTML2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorDOM(be.innerHTML),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Me(i,i.lute.HTML2Md(be.innerHTML).trimRight())),i.outline.render(i),[3,10];case 5:return f.length>0?i.options.upload.url||i.options.upload.handler?[4,Br(i,f)]:[3,7]:[3,9];case 6:return Te.sent(),[3,8];case 7:ce=new FileReader,"clipboardData"in a?(f=a.clipboardData.files,ke=f[0]):a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items,ke=f[0].getAsFile()),ke&&ke.type.startsWith("image")&&(ce.readAsDataURL(ke),ce.onload=function(){var $e="";i.currentMode==="wysiwyg"?$e+='<img alt="'.concat(ke.name,'" src="').concat(ce.result.toString(),`">
|
||
`):$e+=".concat(ce.result.toString(),`)
|
||
`),document.execCommand("insertHTML",!1,$e)}),Te.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(ue=(0,j.zh)(i),ue.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(ue.toString(),"](").concat(d,")")),i.currentMode==="ir"?(E.Md2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(Lute.Sanitize(i.lute.Md2VditorIRDOM(d)),i)):i.currentMode==="wysiwyg"?(E.Md2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(Lute.Sanitize(i.lute.Md2VditorDOM(d)),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Me(i,d)),i.outline.render(i)),Te.label=10;case 10:return i.currentMode!=="sv"&&(xe=(0,y.F9)((0,j.zh)(i).startContainer),xe&&(ue=(0,j.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function($e){$e.remove()}),ue.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?xe.outerHTML=i.lute.SpinVditorDOM(xe.outerHTML):xe.outerHTML=i.lute.SpinVditorIRDOM(xe.outerHTML),(0,j.ib)(i[i.currentMode].element,ue)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function($e){Qe($e,i)})),i.wysiwyg.triggerRemoveComment(i),st(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&K(i),[2]}})})},gu=function(i,a,s){return go(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,X,ke,fe,be,ce,ke,xe,ue;return hr(this,function(ze){switch(ze.label){case 0:if(!s)return[2];if(u=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,d=new RegExp("(?:("+u.source+"))([\\da-fA-F\\s]+)\\}","g"),f=s.match(d),E=[],f)for(L=0,D=f;L<D.length;L++)_=D[L],B=void 0,_.includes("\\pngblip")?B="image/png":_.includes("\\jpegblip")&&(B="image/jpeg"),B&&E.push({hex:_.replace(u,"").replace(/[^\da-fA-F]/g,""),type:B});for(X=[],ko(a,function(Te){if(Te.tagName==="V:SHAPE")return ko(Te,function($e){$e.tagName==="V:IMAGEDATA"&&X.push({shape:Te,img:$e})}),!1}),ke=0;ke<X.length;ke++)fe=document.createElement("img"),be="data:"+E[ke].type+";base64,"+btoa((E[ke].hex.match(/\w{2}/g)||[]).map(function(Te){return String.fromCharCode(parseInt(Te,16))}).join("")),fe.src=be,fe.title=X[ke].img.getAttribute("title"),X[ke].shape.parentNode.replaceChild(fe,X[ke].shape);ce=a.querySelectorAll("img"),ke=0,ze.label=1;case 1:return ke<ce.length?(xe=ce[ke].src||"",xe?(ue=ce[ke],[4,i.options.upload.base64ToLink(xe)]):[3,3]):[3,4];case 2:ue.src=ze.sent(),ze.label=3;case 3:return ke++,[3,1];case 4:return[2]}})})},ko=function(i,a){var s=a(i);if(s!==!1)for(var u=0;u<i.children.length;u++)ko(i.children[u],a)},$s,Us=function(i){var a,s;i.hint.render(i);var u=(0,j.zh)(i).startContainer,d=(0,y.a1)(u,"data-type","code-block-info");if(d)if(d.textContent.replace(c.g.ZWSP,"")===""&&i.hint.recentLanguage){d.textContent=c.g.ZWSP+i.hint.recentLanguage;var f=(0,j.zh)(i);f.selectNodeContents(d)}else{var E=[],L=d.textContent.substring(0,(0,j.im)(d,i.ir.element).start).replace(c.g.ZWSP,"");(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((s=(a=window.hljs)===null||a===void 0?void 0:a.listLanguages())!==null&&s!==void 0?s:[]).sort())).forEach(function(D){D.indexOf(L.toLowerCase())>-1&&E.push({html:D,value:D})}),i.hint.genHTML(E,L,i)}},Zn=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&Us(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},bi=function(i,a){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer)||s.startContainer;if(u){var d=u.querySelector(".vditor-ir__marker--heading");d?d.innerHTML=a:(u.insertAdjacentText("afterbegin",a),s.selectNodeContents(u),s.collapse(!1)),Nt(i,s.cloneRange()),Ue(i)}},aa=function(i,a,s){var u=(0,y.a1)(i.startContainer,"data-type",s);if(u){u.firstElementChild.remove(),u.lastElementChild.remove(),i.insertNode(document.createElement("wbr"));var d=document.createElement("div");d.innerHTML=a.lute.SpinVditorIRDOM(u.outerHTML),u.outerHTML=d.firstElementChild.innerHTML.trim()}},vu=function(i,a,s,u){var d=(0,j.zh)(i),f=a.getAttribute("data-type"),E=d.startContainer;E.nodeType===3&&(E=E.parentElement);var L=!0;if(a.classList.contains("vditor-menu--current"))if(f==="quote"){var D=(0,y.lG)(E,"BLOCKQUOTE");D&&(d.insertNode(document.createElement("wbr")),D.outerHTML=D.innerHTML.trim()===""?'<p data-block="0">'.concat(D.innerHTML,"</p>"):D.innerHTML)}else if(f==="link"){var _=(0,y.a1)(d.startContainer,"data-type","a");if(_){var B=(0,y.fb)(d.startContainer,"vditor-ir__link");B?(d.insertNode(document.createElement("wbr")),_.outerHTML=B.innerHTML):_.outerHTML=_.querySelector(".vditor-ir__link").innerHTML+"<wbr>"}}else f==="italic"?aa(d,i,"em"):f==="bold"?aa(d,i,"strong"):f==="strike"?aa(d,i,"s"):f==="inline-code"?aa(d,i,"code"):(f==="check"||f==="list"||f==="ordered-list")&&(ta(i,d,f),L=!1,a.classList.remove("vditor-menu--current"));else{i.ir.element.childNodes.length===0&&(i.ir.element.innerHTML='<p data-block="0"><wbr></p>',(0,j.ib)(i.ir.element,d));var X=(0,y.F9)(d.startContainer);if(f==="line"){if(X){var fe=`<hr data-block="0"><p data-block="0"><wbr>
|
||
</p>`;X.innerHTML.trim()===""?X.outerHTML=fe:X.insertAdjacentHTML("afterend",fe)}}else if(f==="quote")X&&(d.insertNode(document.createElement("wbr")),X.outerHTML='<blockquote data-block="0">'.concat(X.outerHTML,"</blockquote>"),L=!1,a.classList.add("vditor-menu--current"));else if(f==="link"){var be=void 0;d.toString()===""?be="".concat(s,"<wbr>").concat(u):be="".concat(s).concat(d.toString()).concat(u.replace(")","<wbr>)")),document.execCommand("insertHTML",!1,be),L=!1,a.classList.add("vditor-menu--current")}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"){var be=void 0;d.toString()===""?be="".concat(s,"<wbr>").concat(u):(f==="code"?be="".concat(s,`
|
||
`).concat(d.toString(),"<wbr>").concat(u):f==="table"?be="".concat(s).concat(d.toString(),"<wbr>").concat(u):be="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(be=`
|
||
`+be+`
|
||
|
||
`);var ce=document.createElement("span");ce.innerHTML=be,d.insertNode(ce),Nt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,j.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(ta(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current"))}(0,j.ib)(i.ir.element,d),Zn(i),L&&Ue(i)},bu=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(X){E(X)}}function D(B){try{_(u.throw(B))}catch(X){E(X)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},yu=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},wu=function(){function i(a){var s=this;this.splitChar="",this.lastIndex=-1,this.fillEmoji=function(u,d){s.element.style.display="none";var f=decodeURIComponent(u.getAttribute("data-value")),E=window.getSelection().getRangeAt(0);if(d.currentMode==="ir"){var L=(0,y.a1)(E.startContainer,"data-type","code-block-info");if(L){L.textContent=c.g.ZWSP+f.trimRight(),E.selectNodeContents(L),E.collapse(!1),Zn(d),L.parentElement.querySelectorAll("code").forEach(function(X){X.className="language-"+f.trimRight()}),Qe(L.parentElement.querySelector(".vditor-ir__preview"),d),s.recentLanguage=f.trimRight();return}}if(d.currentMode==="wysiwyg"&&E.startContainer.nodeType!==3){var D=E.startContainer,_=void 0;if(D.classList.contains("vditor-input")?_=D:_=D.firstElementChild,_&&_.classList.contains("vditor-input")){_.value=f.trimRight(),E.selectNodeContents(_),E.collapse(!1),_.dispatchEvent(new CustomEvent("input",{detail:1})),s.recentLanguage=f.trimRight();return}}if(E.setStart(E.startContainer,s.lastIndex),E.deleteContents(),d.options.hint.parse?d.currentMode==="sv"?(0,j.oC)(d.lute.SpinVditorSVDOM(f),d):d.currentMode==="wysiwyg"?(0,j.oC)(d.lute.SpinVditorDOM(f),d):(0,j.oC)(d.lute.SpinVditorIRDOM(f),d):(0,j.oC)(f,d),s.splitChar===":"&&f.indexOf(":")>-1&&d.currentMode!=="sv"&&E.insertNode(document.createTextNode(" ")),E.collapse(!1),(0,j.Hc)(E),d.currentMode==="wysiwyg"){var B=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");B&&B.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(B.lastElementChild.innerHTML=B.firstElementChild.innerHTML,Qe(B.lastElementChild,d))}else if(d.currentMode==="ir"){var B=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");B&&B.nextElementSibling.classList.contains("vditor-ir__preview")&&(B.nextElementSibling.innerHTML=B.innerHTML,Qe(B.nextElementSibling,d))}st(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",a.push({key:":"})}return i.prototype.render=function(a){var s=this;if(window.getSelection().focusNode){var u,d=getSelection().getRangeAt(0);u=d.startContainer.textContent.substring(0,d.startOffset)||"";var f=this.getKey(u,a.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?a.options.hint.emoji:a.lute.GetEmojis(),L=[];Object.keys(E).forEach(function(D){D.indexOf(f.toLowerCase())===0&&(E[D].indexOf(".")>-1?L.push({html:'<img src="'.concat(E[D],'" title=":').concat(D,':"/> :').concat(D,":"),value:":".concat(D,":")}):L.push({html:'<span class="vditor-hint__emoji">'.concat(E[D],"</span>").concat(D),value:E[D]}))}),this.genHTML(L,f,a)}else a.options.hint.extend.forEach(function(D){D.key===s.splitChar&&(clearTimeout(s.timeId),s.timeId=window.setTimeout(function(){return bu(s,void 0,void 0,function(){var _;return yu(this,function(B){switch(B.label){case 0:return _=this.genHTML,[4,D.hint(f)];case 1:return _.apply(this,[B.sent(),f,a]),[2]}})})},a.options.hint.delay))})}},i.prototype.genHTML=function(a,s,u){var d=this;if(a.length===0){this.element.style.display="none";return}var f=u[u.currentMode].element,E=(0,j.Ny)(f),L=E.left+(u.options.outline.position==="left"?u.outline.element.offsetWidth:0),D=E.top,_="";a.forEach(function(X,fe){if(!(fe>7)){var be=X.html;if(s!==""){var ce=be.lastIndexOf(">")+1,ke=be.substr(ce),xe=ke.toLowerCase().indexOf(s.toLowerCase());xe>-1&&(ke=ke.substring(0,xe)+"<b>"+ke.substring(xe,xe+s.length)+"</b>"+ke.substring(xe+s.length),be=be.substr(0,ce)+ke)}_+='<button type="button" data-value="'.concat(encodeURIComponent(X.value),` "
|
||
`).concat(fe===0?"class='vditor-hint--current'":"","> ").concat(be,"</button>")}}),this.element.innerHTML=_;var B=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(B||22),"px"),this.element.style.left="".concat(L,"px"),this.element.style.display="block",this.element.style.right="auto",this.element.querySelectorAll("button").forEach(function(X){X.addEventListener("click",function(fe){d.fillEmoji(X,u),fe.preventDefault()})}),this.element.getBoundingClientRect().bottom>window.innerHeight&&(this.element.style.top="".concat(D-this.element.offsetHeight,"px")),this.element.getBoundingClientRect().right>window.innerWidth&&(this.element.style.left="auto",this.element.style.right="0")},i.prototype.select=function(a,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(a.key==="ArrowDown")return a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(a.key==="ArrowUp"){if(a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.previousElementSibling)u.previousElementSibling.className="vditor-hint--current";else{var d=this.element.children.length;this.element.children[d-1].className="vditor-hint--current"}return!0}else if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"&&!a.isComposing)return a.preventDefault(),a.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(a,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var B=a.lastIndexOf(_.key);u.lastIndex<B&&(u.splitChar=_.key,u.lastIndex=B)});var d;if(this.lastIndex===-1)return d;var f=a.split(this.splitChar),E=f[f.length-1],L=32;if(f.length>1&&E.trim()===E)if(f.length===2&&f[0]===""&&f[1].length<L)d=f[1];else{var D=f[f.length-2].slice(-1);(0,p.X)(D)===" "&&E.length<L&&(d=E)}return d},i}(),xu=function(){function i(a){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
|
||
contenteditable="true" spellcheck="false"></pre>`),this.element=s.firstElementChild,this.bindEvent(a),Qi(a,this.element),za(a,this.element),ea(a,this.element),Q(a,this.element),ye(a,this.element),fi(a,this.element),Li(a,this.element,this.copy),q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=document.createElement("div");d.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorIRDOM2Md(d.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ia(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){A(a,["hint"])}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Nt(a,getSelection().getRangeAt(0).cloneRange()),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Zn(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}s.composingLock||u.data==="‘"||u.data==="“"||u.data==="《"||Nt(a,getSelection().getRangeAt(0).cloneRange(),!1,u)}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){u.target.checked?u.target.setAttribute("checked","checked"):u.target.removeAttribute("checked"),s.preventInput=!0,Zn(a);return}var d=(0,j.zh)(a),f=(0,y.fb)(u.target,"vditor-ir__preview");if(f||(f=(0,y.fb)(d.startContainer,"vditor-ir__preview")),f&&(f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!0),(0,j.Hc)(d),K(a)),u.target.tagName==="IMG"){var E=u.target.parentElement.querySelector(".vditor-ir__marker--link");E&&(d.selectNode(E),(0,j.Hc)(d))}var L=(0,y.a1)(u.target,"data-type","a");if(L&&!L.classList.contains("vditor-ir__node--expand")){a.options.link.click?a.options.link.click(L.querySelector(":scope > .vditor-ir__marker--link")):a.options.link.isOpen&&window.open(L.querySelector(":scope > .vditor-ir__marker--link").textContent);return}if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&d.collapsed){var D=s.element.lastElementChild.getBoundingClientRect();u.y>D.top+D.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(d.selectNodeContents(s.element.lastElementChild),d.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(s.element,d)))}d.toString()===""?ee(d,a):setTimeout(function(){ee((0,j.zh)(a),a)}),Rt(u,a),Ue(a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if(u.key==="Enter"&&K(a),Ue(a),(u.key==="Backspace"||u.key==="Delete")&&a.ir.element.innerHTML!==""&&a.ir.element.childNodes.length===1&&a.ir.element.firstElementChild&&a.ir.element.firstElementChild.tagName==="P"&&a.ir.element.firstElementChild.childElementCount===0&&(a.ir.element.textContent===""||a.ir.element.textContent===`
|
||
`)){a.ir.element.innerHTML="";return}var d=(0,j.zh)(a);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent===`
|
||
`&&d.startOffset===1&&(d.startContainer.textContent="",ee(d,a)),s.element.querySelectorAll(".language-math").forEach(function(E){var L=E.querySelector("br");L&&L.remove()})):u.key.indexOf("Arrow")>-1?((u.key==="ArrowLeft"||u.key==="ArrowRight")&&Us(a),ee(d,a)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&ee(d,a);var f=(0,y.fb)(d.startContainer,"vditor-ir__preview");if(f){if(u.key==="ArrowUp"||u.key==="ArrowLeft")return f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!1),u.preventDefault(),!0;if(f.tagName==="SPAN"&&(u.key==="ArrowDown"||u.key==="ArrowRight"))return f.parentElement.getAttribute("data-type")==="html-entity"?(f.parentElement.insertAdjacentText("afterend",c.g.ZWSP),d.setStart(f.parentElement.nextSibling,1)):d.selectNodeContents(f.parentElement.lastElementChild),d.collapse(!1),u.preventDefault(),!0}}})},i}(),Vs=function(i){if(i.currentMode==="sv")return i.lute.Md2HTML(v(i));if(i.currentMode==="wysiwyg")return i.lute.VditorDOM2HTML(i.wysiwyg.element.innerHTML);if(i.currentMode==="ir")return i.lute.VditorIRDOM2HTML(i.ir.element.innerHTML)},ku=o(214),Ws=o(436),Su=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(a,`</div>
|
||
<div class="vditor-outline__content"></div>`)}return i.prototype.render=function(a){var s="";return a.preview.element.style.display==="block"?s=(0,Ws.k)(a.preview.previewElement,this.element.lastElementChild,a):s=(0,Ws.k)(a[a.currentMode].element,this.element.lastElementChild,a),s},i.prototype.toggle=function(a,s,u){var d;s===void 0&&(s=!0),u===void 0&&(u=!0);var f=(d=a.toolbar.elements.outline)===null||d===void 0?void 0:d.firstElementChild;if(s&&window.innerWidth>=c.g.MOBILE_WIDTH?(this.element.style.display="block",this.render(a),f==null||f.classList.add("vditor-menu--current")):(this.element.style.display="none",f==null||f.classList.remove("vditor-menu--current")),u&&getSelection().rangeCount>0){var E=getSelection().getRangeAt(0);a[a.currentMode].element.contains(E.startContainer)&&(0,j.Hc)(E)}Fe(a)},i}(),Eu=o(280),Tu=function(){function i(a){var s=this;this.element=document.createElement("div"),this.element.className="vditor-preview",this.previewElement=document.createElement("div"),this.previewElement.className="vditor-reset",a.options.classes.preview&&this.previewElement.classList.add(a.options.classes.preview),this.previewElement.style.maxWidth=a.options.preview.maxWidth+"px",this.previewElement.addEventListener("copy",function(D){if(D.target.tagName!=="TEXTAREA"){var _=document.createElement("div");_.className="vditor-reset",_.appendChild(getSelection().getRangeAt(0).cloneContents()),s.copyToX(a,_,"default"),D.preventDefault()}}),this.previewElement.addEventListener("click",function(D){var _=(0,y.lG)(D.target,"SPAN");if(_&&(0,y.fb)(_,"vditor-toc")){var B=s.previewElement.querySelector("#"+_.getAttribute("data-target-id"));B&&(s.element.scrollTop=B.offsetTop);return}if(D.target.tagName==="A"){a.options.link.click?a.options.link.click(D.target):a.options.link.isOpen&&window.open(D.target.getAttribute("href")),D.preventDefault();return}D.target.tagName==="IMG"&&(a.options.image.preview?a.options.image.preview(D.target):a.options.image.isPreview&&(0,se.E)(D.target,a.options.lang,a.options.theme))}),this.element.appendChild(this.previewElement);var u=a.options.preview.actions;if(u.length!==0){var d=document.createElement("div");d.className="vditor-preview__action";for(var f=[],E=0;E<u.length;E++){var L=u[E];if(typeof L=="object"){f.push('<button type="button" data-type="'.concat(L.key,'" class="').concat(L.className,'"').concat(L.tooltip?' aria-label="'.concat(L.tooltip,'"'):"",'">').concat(L.text,"</button>"));continue}switch(L){case"desktop":f.push('<button type="button" class="vditor-preview__action--current" data-type="desktop">Desktop</button>');break;case"tablet":f.push('<button type="button" data-type="tablet">Tablet</button>');break;case"mobile":f.push('<button type="button" data-type="mobile">Mobile/Wechat</button>');break;case"mp-wechat":f.push('<button type="button" data-type="mp-wechat" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到公众号"><svg><use xlink:href="#vditor-icon-mp-wechat"></use></svg></button>');break;case"zhihu":f.push('<button type="button" data-type="zhihu" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到知乎"><svg><use xlink:href="#vditor-icon-zhihu"></use></svg></button>');break}}d.innerHTML=f.join(""),d.addEventListener((0,m.Le)(),function(D){var _=(0,N.S)(D.target,"BUTTON");if(_){var B=_.getAttribute("data-type"),X=u.find(function(fe){return(fe==null?void 0:fe.key)===B});if(X){X.click(B);return}if(B==="mp-wechat"||B==="zhihu"){s.copyToX(a,s.previewElement.cloneNode(!0),B);return}B==="desktop"?s.previewElement.style.width="auto":B==="tablet"?s.previewElement.style.width="780px":s.previewElement.style.width="360px",s.previewElement.scrollWidth>s.previewElement.parentElement.clientWidth&&(s.previewElement.style.width="auto"),s.render(a),d.querySelectorAll("button").forEach(function(fe){fe.classList.remove("vditor-preview__action--current")}),_.classList.add("vditor-preview__action--current")}}),this.element.insertBefore(d,this.previewElement)}}return i.prototype.render=function(a,s){var u=this;if(clearTimeout(this.mdTimeoutId),this.element.style.display==="none"){this.element.getAttribute("data-type")==="renderPerformance"&&a.tip.hide();return}if(s){this.previewElement.innerHTML=s;return}if(v(a).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")===""){this.previewElement.innerHTML="";return}var d=new Date().getTime(),f=v(a);this.mdTimeoutId=window.setTimeout(function(){if(a.options.preview.url){var E=new XMLHttpRequest;E.open("POST",a.options.preview.url),E.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.onreadystatechange=function(){if(E.readyState===XMLHttpRequest.DONE)if(E.status===200){var D=JSON.parse(E.responseText);if(D.code!==0){a.tip.show(D.msg);return}a.options.preview.transform&&(D.data=a.options.preview.transform(D.data)),u.previewElement.innerHTML=D.data,u.afterRender(a,d)}else{var _=a.lute.Md2HTML(f);a.options.preview.transform&&(_=a.options.preview.transform(_)),u.previewElement.innerHTML=_,u.afterRender(a,d)}},E.send(JSON.stringify({markdownText:f}))}else{var L=a.lute.Md2HTML(f);a.options.preview.transform&&(L=a.options.preview.transform(L)),u.previewElement.innerHTML=L,u.afterRender(a,d)}},a.options.preview.delay)},i.prototype.afterRender=function(a,s){a.options.preview.parse&&a.options.preview.parse(this.element);var u=new Date().getTime()-s;new Date().getTime()-s>2600?(a.tip.show(window.VditorI18n.performanceTip.replace("${x}",u.toString())),a.preview.element.setAttribute("data-type","renderPerformance")):a.preview.element.getAttribute("data-type")==="renderPerformance"&&(a.tip.hide(),a.preview.element.removeAttribute("data-type"));var d=a.preview.element.querySelector(".vditor-comment--focus");d&&d.classList.remove("vditor-comment--focus"),(0,Y.O)(a.preview.previewElement,a.options.preview.hljs),(0,Ce.s)(a.options.preview.hljs,a.preview.previewElement,a.options.cdn),(0,Ge.i)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,nt.K)(a.preview.previewElement,a.options.cdn),(0,tt.J)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,te.P)(a.preview.previewElement,a.options.cdn),(0,de.v)(a.preview.previewElement,a.options.cdn),(0,P.p)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,je.P)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,Ne.B)(a.preview.previewElement,a.options.cdn),(0,F.Q)(a.preview.previewElement,a.options.cdn),a.options.preview.render.media.enable&&(0,Eu.Y)(a.preview.previewElement),a.options.customRenders.forEach(function(L){L.render(a.preview.previewElement,a)});var f=a.preview.element,E=a.outline.render(a);E===""&&(E="[ToC]"),f.querySelectorAll('[data-type="toc-block"]').forEach(function(L){L.innerHTML=E,(0,qe.H)(L,{cdn:a.options.cdn,math:a.options.preview.math})}),(0,qe.H)(a.preview.previewElement,{cdn:a.options.cdn,math:a.options.preview.math})},i.prototype.copyToX=function(a,s,u){u===void 0&&(u="mp-wechat"),u!=="zhihu"?s.querySelectorAll(".katex-html .base").forEach(function(f){f.style.display="initial"}):s.querySelectorAll(".language-math").forEach(function(f){f.outerHTML='<img class="Formula-image" data-eeimg="true" src="//www.zhihu.com/equation?tex=" alt="'.concat(f.getAttribute("data-math"),'\\" style="display: block; margin: 0 auto; max-width: 100%;">')}),s.style.backgroundColor="#fff",s.querySelectorAll("code").forEach(function(f){f.style.backgroundImage="none"}),this.element.append(s);var d=s.ownerDocument.createRange();d.selectNode(s),(0,j.Hc)(d),document.execCommand("copy"),s.remove(),a.tip.show(["zhihu","mp-wechat"].includes(u)?"已复制,可到".concat(u==="zhihu"?"知乎":"微信公众号平台","进行粘贴"):"已复制到剪切板")},i}(),Au=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-resize vditor-resize--".concat(a.options.resize.position),this.element.innerHTML='<div><svg><use xlink:href="#vditor-icon-resize"></use></svg></div>',this.bindEvent(a)}return i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("mousedown",function(u){var d=document,f=u.clientY,E=a.element.offsetHeight,L=63+a.element.querySelector(".vditor-toolbar").clientHeight;d.ondragstart=function(){return!1},window.captureEvents&&window.captureEvents(),s.element.classList.add("vditor-resize--selected"),d.onmousemove=function(D){a.options.resize.position==="top"?a.element.style.height=Math.max(L,E+(f-D.clientY))+"px":a.element.style.height=Math.max(L,E+(D.clientY-f))+"px",a.options.typewriterMode&&(a.sv.element.style.paddingBottom=a.sv.element.parentElement.offsetHeight/2+"px")},d.onmouseup=function(){a.options.resize.after&&a.options.resize.after(a.element.offsetHeight-E),window.captureEvents&&window.captureEvents(),d.onmousemove=null,d.onmouseup=null,d.ondragstart=null,d.onselectstart=null,d.onselect=null,s.element.classList.remove("vditor-resize--selected")}})},i}(),Mu=function(){function i(a){this.composingLock=!1,this.element=document.createElement("pre"),this.element.className="vditor-sv vditor-reset",this.element.setAttribute("placeholder",a.options.placeholder),this.element.setAttribute("contenteditable","true"),this.element.setAttribute("spellcheck","false"),this.bindEvent(a),Qi(a,this.element),ea(a,this.element),Q(a,this.element),ye(a,this.element),fi(a,this.element),Li(a,this.element,this.copy),q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){a.stopPropagation(),a.preventDefault(),a.clipboardData.setData("text/plain",zr(s[s.currentMode].element))},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ia(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){if(a.preview.element.style.display==="block"){var u=s.element.scrollTop,d=s.element.clientHeight,f=s.element.scrollHeight-parseFloat(s.element.style.paddingBottom||"0"),E=a.preview.element;u/d>.5?E.scrollTop=(u+d)*E.scrollHeight/f-d:E.scrollTop=u*E.scrollHeight/f}}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Z(a,u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")&&!(s.composingLock||u.data==="‘"||u.data==="“"||u.data==="《")){if(s.preventInput){s.preventInput=!1,Pe(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}Z(a,u)}}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if((u.key==="Backspace"||u.key==="Delete")&&a.sv.element.innerHTML!==""&&a.sv.element.childNodes.length===1&&a.sv.element.firstElementChild&&a.sv.element.firstElementChild.tagName==="DIV"&&a.sv.element.firstElementChild.childElementCount===2&&(a.sv.element.firstElementChild.textContent===""||a.sv.element.textContent===`
|
||
`)){a.sv.element.innerHTML="";return}u.key==="Enter"&&K(a)}})},i}(),Gs=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(a,s){var u=this;s===void 0&&(s=6e3),this.element.className="vditor-tip vditor-tip--show",s===0?(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,`
|
||
<div class="vditor-tip__close">X</div></div>`),this.element.querySelector(".vditor-tip__close").addEventListener("click",function(){u.hide()})):(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,"</div>"),setTimeout(function(){u.hide()},s)),this.element.removeAttribute("style"),setTimeout(function(){var d=u.element.getBoundingClientRect();d.top<46&&(u.element.style.position="fixed",u.element.style.top="46px")},150)},i.prototype.hide=function(){this.element.className="vditor-messageElementtip",this.element.innerHTML=""},i}(),So=function(i,a){if(a.options.preview.mode!==i){switch(a.options.preview.mode=i,i){case"both":a.sv.element.style.display="block",a.preview.element.style.display="block",a.preview.render(a),w(a.toolbar.elements,["both"]);break;case"editor":a.sv.element.style.display="block",a.preview.element.style.display="none",x(a.toolbar.elements,["both"]);break}a.devtools&&a.devtools.renderEchart(a)}},Cu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Lu=function(i){Cu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.preview.mode==="both"&&d.element.children[0].classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),s.currentMode==="sv"&&(s.options.preview.mode==="both"?So("editor",s):So("both",s)))}),d}return a}(Mt),_u=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__br"}return i}(),Ks=o(580),Nu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Du=function(i){Nu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return c.g.CODE_THEME.forEach(function(D){L+="<button>".concat(D,"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.hljs.style=D.target.textContent,(0,Ks.Y)(D.target.textContent,s.options.cdn),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ru=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Iu=function(i){Ru(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return Object.keys(s.options.preview.theme.list).forEach(function(D){L+='<button data-type="'.concat(D,'">').concat(s.options.preview.theme.list[D],"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.theme.current=D.target.getAttribute("data-type"),(0,le.Z)(s.options.preview.theme.current,s.options.preview.theme.path),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ou=function(){function i(a){this.element=document.createElement("span"),this.element.className="vditor-counter vditor-tooltipped vditor-tooltipped__nw",this.render(a,"")}return i.prototype.render=function(a,s){var u=s.endsWith(`
|
||
`)?s.length-1:s.length;if(a.options.counter.type==="text"&&a[a.currentMode]){var d=a[a.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof a.options.counter.max=="number"?(u>a.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(a.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",a.options.counter.type),a.options.counter.after&&a.options.counter.after(u,{enable:a.options.counter.enable,max:a.options.counter.max,type:a.options.counter.type})},i}(),Hu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pu=function(i){Hu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].innerHTML=u.icon,d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!f.currentTarget.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.click(f,s)}),d}return a}(Mt),zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Bu=function(i){zu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.firstElementChild.addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),E.classList.contains("vditor-menu--current")?(E.classList.remove("vditor-menu--current"),s.devtools.element.style.display="none",Fe(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",Fe(s),s.devtools.renderEchart(s)))}),d}return a}(Mt),Fu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),qu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ju=function(i){qu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");f.className="vditor-panel vditor-panel--arrow";var E="";return Object.keys(s.options.hint.emoji).forEach(function(L){var D=s.options.hint.emoji[L];D.indexOf(".")>-1?E+='<button data-value=":'.concat(L,': " data-key=":').concat(L,`:"><img
|
||
data-value=":`).concat(L,': " data-key=":').concat(L,':" class="vditor-emojis__icon" src="').concat(D,'"/></button>'):E+='<button data-value="'.concat(D,` "
|
||
data-key="`).concat(L,'"><span class="vditor-emojis__icon">').concat(D,"</span></button>")}),f.innerHTML='<div class="vditor-emojis" style="max-height: '.concat(s.options.height==="auto"?"auto":s.options.height-80,'px">').concat(E,`</div><div class="vditor-emojis__tail">
|
||
<span class="vditor-emojis__tip"></span><span>`).concat(s.options.hint.emojiTail||"",`</span>
|
||
</div>`),d.element.appendChild(f),M(s,f,d.element.firstElementChild,u.level),d.bindEvent(s),d}return a.prototype.bindEvent=function(s){var u=this;this.element.lastElementChild.addEventListener((0,m.Le)(),function(d){var f=(0,N.S)(d.target,"BUTTON");if(f){d.preventDefault();var E=f.getAttribute("data-value"),L=(0,j.zh)(s),D=E;if(s.currentMode==="wysiwyg"?D=s.lute.SpinVditorDOM(E):s.currentMode==="ir"&&(D=s.lute.SpinVditorIRDOM(E)),E.indexOf(":")>-1&&s.currentMode!=="sv"){var _=document.createElement("div");_.innerHTML=D,D=_.firstElementChild.firstElementChild.outerHTML+" ",(0,j.oC)(D,s)}else L.extractContents(),L.insertNode(document.createTextNode(E)),(0,y.F9)(L.startContainer)||In(s,L);L.collapse(!1),(0,j.Hc)(L),u.element.lastElementChild.style.display="none",st(s)}}),this.element.lastElementChild.addEventListener("mouseover",function(d){var f=(0,N.S)(d.target,"BUTTON");f&&(u.element.querySelector(".vditor-emojis__tip").innerHTML=f.getAttribute("data-key"))})},a}(Mt),Xs=function(i,a,s){var u=document.createElement("a");"download"in u?(u.download=s,u.style.display="none",u.href=URL.createObjectURL(new Blob([a])),document.body.appendChild(u),u.click(),u.remove()):i.tip.show(window.VditorI18n.downloadTip,0)},$u=function(i){var a=v(i);Xs(i,a,a.substr(0,10)+".md")},Uu=function(i){i.tip.show(window.VditorI18n.generate,3800);var a=document.querySelector("#vditorExportIframe");a.contentDocument.open(),a.contentDocument.write('<link rel="stylesheet" href="'.concat(i.options.cdn,`/dist/index.css"/>
|
||
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script>
|
||
<div id="preview" style="width: 800px"></div>
|
||
<script>
|
||
window.addEventListener("message", (e) => {
|
||
if(!e.data) {
|
||
return;
|
||
}
|
||
Vditor.preview(document.getElementById('preview'), e.data, {
|
||
cdn: "`).concat(i.options.cdn,`",
|
||
markdown: {
|
||
theme: `).concat(JSON.stringify(i.options.preview.theme),`
|
||
},
|
||
hljs: {
|
||
style: "`).concat(i.options.preview.hljs.style,`"
|
||
}
|
||
});
|
||
setTimeout(() => {
|
||
window.print();
|
||
}, 3600);
|
||
}, false);
|
||
<\/script>`)),a.contentDocument.close(),setTimeout(function(){a.contentWindow.postMessage(v(i),"*")},200)},Vu=function(i){var a=Vs(i),s='<html><head><link rel="stylesheet" type="text/css" href="'.concat(i.options.cdn,`/dist/index.css"/>
|
||
<script src="`).concat(i.options.cdn,"/dist/js/i18n/").concat(i.options.lang,`.js"><\/script>
|
||
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script></head>
|
||
<body><div class="vditor-reset" id="preview">`).concat(a,`</div>
|
||
<script>
|
||
const previewElement = document.getElementById('preview')
|
||
Vditor.setContentTheme('`).concat(i.options.preview.theme.current,"', '").concat(i.options.preview.theme.path,`');
|
||
Vditor.codeRender(previewElement);
|
||
Vditor.highlightRender(`).concat(JSON.stringify(i.options.preview.hljs),", previewElement, '").concat(i.options.cdn,`');
|
||
Vditor.mathRender(previewElement, {
|
||
cdn: '`).concat(i.options.cdn,`',
|
||
math: `).concat(JSON.stringify(i.options.preview.math),`,
|
||
});
|
||
Vditor.mermaidRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.SMILESRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.markmapRender(previewElement, '`).concat(i.options.cdn,`');
|
||
Vditor.flowchartRender(previewElement, '`).concat(i.options.cdn,`');
|
||
Vditor.graphvizRender(previewElement, '`).concat(i.options.cdn,`');
|
||
Vditor.chartRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.mindmapRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.abcRender(previewElement, '`).concat(i.options.cdn,`');
|
||
`).concat(i.options.preview.render.media.enable?"Vditor.mediaRender(previewElement);":"",`
|
||
Vditor.speechRender(previewElement);
|
||
<\/script>
|
||
<script src="`).concat(i.options.cdn,"/dist/js/icons/").concat(i.options.icon,'.js"><\/script></body></html>');Xs(i,s,a.substr(0,10)+".html")},Wu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Gu=function(i){Wu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");return E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),E.innerHTML=`<button data-type="markdown">Markdown</button>
|
||
<button data-type="pdf">PDF</button>
|
||
<button data-type="html">HTML</button>`,E.addEventListener((0,m.Le)(),function(L){var D=L.target;if(D.tagName==="BUTTON"){switch(D.getAttribute("data-type")){case"markdown":$u(s);break;case"pdf":Uu(s);break;case"html":Vu(s);break}A(s,["subToolbar"]),L.preventDefault(),L.stopPropagation()}}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ku=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Xu=function(i){Ku(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s,u),d}return a.prototype._bindEvent=function(s,u){this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault(),s.element.className.includes("vditor--fullscreen")?(u.level||(this.innerHTML=u.icon),s.element.style.zIndex="",document.body.style.overflow="",s.element.classList.remove("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__s","__n"),s.options.toolbar.forEach(function(L){typeof L!="string"&&L.tipPosition&&L.name===E.dataset.type&&(E.className="vditor-tooltipped vditor-tooltipped__".concat(L.tipPosition))}))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__s","__n"))):(u.level||(this.innerHTML='<svg><use xlink:href="#vditor-icon-contract"></use></svg>'),s.element.style.zIndex=s.options.fullscreen.index.toString(),document.body.style.overflow="hidden",s.element.classList.add("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__n","__s"))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__n","__s"))),s.devtools&&s.devtools.renderEchart(s),u.click&&u.click(d,s),Fe(s),Ke(s)})},a}(Mt),Zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Yu=function(i){Zu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint vditor-panel--arrow",f.innerHTML='<button data-tag="h1" data-value="# ">'.concat(window.VditorI18n.heading1," ").concat((0,m.ns)("<⌥⌘1>"),`</button>
|
||
<button data-tag="h2" data-value="## ">`).concat(window.VditorI18n.heading2," <").concat((0,m.ns)("⌥⌘2"),`></button>
|
||
<button data-tag="h3" data-value="### ">`).concat(window.VditorI18n.heading3," <").concat((0,m.ns)("⌥⌘3"),`></button>
|
||
<button data-tag="h4" data-value="#### ">`).concat(window.VditorI18n.heading4," <").concat((0,m.ns)("⌥⌘4"),`></button>
|
||
<button data-tag="h5" data-value="##### ">`).concat(window.VditorI18n.heading5," <").concat((0,m.ns)("⌥⌘5"),`></button>
|
||
<button data-tag="h6" data-value="###### ">`).concat(window.VditorI18n.heading6," <").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return a.prototype._bindEvent=function(s,u){var d=this.element.children[0];d.addEventListener((0,m.Le)(),function(E){E.preventDefault(),clearTimeout(s.wysiwyg.afterRenderTimeoutId),clearTimeout(s.ir.processTimeoutId),clearTimeout(s.sv.processTimeoutId),!d.classList.contains(c.g.CLASS_MENU_DISABLED)&&(d.blur(),d.classList.contains("vditor-menu--current")?(s.currentMode==="wysiwyg"?(gr(s),Oe(s)):s.currentMode==="ir"&&bi(s,""),d.classList.remove("vditor-menu--current")):(A(s,["subToolbar"]),u.style.display="block"))});for(var f=0;f<6;f++)u.children.item(f).addEventListener((0,m.Le)(),function(E){E.preventDefault(),s.currentMode==="wysiwyg"?(kn(s,E.target.getAttribute("data-tag")),Oe(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(bi(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):ht(s,E.target.getAttribute("data-value")),u.style.display="none"})},a}(Mt),Ju=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Qu=function(i){Ju(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="margin-bottom:14px;font-size: 14px;line-height: 22px;min-width:300px;max-width: 360px;display: flex;">
|
||
<div style="margin-top: 14px;flex: 1">
|
||
<div>Markdown 使用指南</div>
|
||
<ul style="list-style: none">
|
||
<li><a href="https://ld246.com/article/1583308420519" target="_blank">语法速查手册</a></li>
|
||
<li><a href="https://ld246.com/article/1583129520165" target="_blank">基础语法</a></li>
|
||
<li><a href="https://ld246.com/article/1583305480675" target="_blank">扩展语法</a></li>
|
||
<li><a href="https://ld246.com/article/1582778815353" target="_blank">键盘快捷键</a></li>
|
||
</ul>
|
||
</div>
|
||
<div style="margin-top: 14px;flex: 1">
|
||
<div>Vditor 支持</div>
|
||
<ul style="list-style: none">
|
||
<li><a href="https://github.com/Vanessa219/vditor/issues" target="_blank">Issues</a></li>
|
||
<li><a href="https://ld246.com/tag/vditor" target="_blank">官方讨论区</a></li>
|
||
<li><a href="https://ld246.com/article/1549638745630" target="_blank">开发手册</a></li>
|
||
<li><a href="https://ld246.com/guide/markdown" target="_blank">演示地址</a></li>
|
||
</ul>
|
||
</div></div>`,0)}),d}return a}(Mt),ed=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),td=function(i){ed(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,j.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&Ls(s,L,E)}}),d}return a}(Mt),nd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rd=function(i){nd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="max-width: 520px; font-size: 14px;line-height: 22px;margin-bottom: 14px;">
|
||
<p style="text-align: center;margin: 14px 0">
|
||
<em>下一代的 Markdown 编辑器,为未来而构建</em>
|
||
</p>
|
||
<div style="display: flex;margin-bottom: 14px;flex-wrap: wrap;align-items: center">
|
||
<img src="https://unpkg.com/vditor/dist/images/logo.png" style="margin: 0 auto;height: 68px"/>
|
||
<div> </div>
|
||
<div style="flex: 1;min-width: 250px">
|
||
Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。
|
||
它使用 TypeScript 实现,支持原生 JavaScript 以及 Vue、React、Angular 和 Svelte 等框架。
|
||
</div>
|
||
</div>
|
||
<div style="display: flex;flex-wrap: wrap;">
|
||
<ul style="list-style: none;flex: 1;min-width:148px">
|
||
<li>
|
||
项目地址:<a href="https://b3log.org/vditor" target="_blank">b3log.org/vditor</a>
|
||
</li>
|
||
<li>
|
||
开源协议:MIT
|
||
</li>
|
||
</ul>
|
||
<ul style="list-style: none;margin-right: 18px">
|
||
<li>
|
||
组件版本:Vditor v`.concat(c.H," / Lute v").concat(Lute.Version,`
|
||
</li>
|
||
<li>
|
||
赞助捐赠:<a href="https://ld246.com/sponsor" target="_blank">https://ld246.com/sponsor</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>`),0)}),d}return a}(Mt),id=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ad=function(i){id(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&gi(s,"afterend")}),d}return a}(Mt),od=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),sd=function(i){od(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&gi(s,"beforebegin")}),d}return a}(Mt),ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),cd=function(i){ld(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,j.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&bo(s,L,E,L.parentElement)}}),d}return a}(Mt),ud=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),dd=function(i){ud(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.outline&&d.element.firstElementChild.classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault();var E=s.toolbar.elements.outline.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(s.options.outline.enable=!d.element.firstElementChild.classList.contains("vditor-menu--current"),s.outline.toggle(s,s.options.outline.enable))}),d}return a}(Mt),hd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),pd=function(i){hd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault();var f=u.element.firstElementChild;if(!f.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=c.g.EDIT_TOOLBARS.concat(["both","edit-mode","devtools"]);f.classList.contains("vditor-menu--current")?(f.classList.remove("vditor-menu--current"),s.currentMode==="sv"?(s.sv.element.style.display="block",s.options.preview.mode==="both"?s.preview.element.style.display="block":s.preview.element.style.display="none"):(s[s.currentMode].element.parentElement.style.display="block",s.preview.element.style.display="none"),S(s.toolbar.elements,E),s.outline.render(s)):(k(s.toolbar.elements,E),s.preview.element.style.display="block",s.currentMode==="sv"?s.sv.element.style.display="none":s[s.currentMode].element.parentElement.style.display="none",s.preview.render(s),f.classList.add("vditor-menu--current"),A(s,["subToolbar","hint","popover"]),setTimeout(function(){s.outline.render(s)},s.options.preview.delay+10)),Fe(s)}})},a}(Mt),fd=function(){function i(a){this.SAMPLE_RATE=5e3,this.isRecording=!1,this.readyFlag=!1,this.leftChannel=[],this.rightChannel=[],this.recordingLength=0;var s;if(typeof AudioContext<"u")s=new AudioContext;else if(webkitAudioContext)s=new webkitAudioContext;else return;this.DEFAULT_SAMPLE_RATE=s.sampleRate;var u=s.createGain(),d=s.createMediaStreamSource(a);d.connect(u),this.recorder=s.createScriptProcessor(2048,2,1),this.recorder.onaudioprocess=null,u.connect(this.recorder),this.recorder.connect(s.destination),this.readyFlag=!0}return i.prototype.cloneChannelData=function(a,s){this.leftChannel.push(new Float32Array(a)),this.rightChannel.push(new Float32Array(s)),this.recordingLength+=2048},i.prototype.startRecordingNewWavFile=function(){this.readyFlag&&(this.isRecording=!0,this.leftChannel.length=this.rightChannel.length=0,this.recordingLength=0)},i.prototype.stopRecording=function(){this.isRecording=!1},i.prototype.buildWavFileBlob=function(){for(var a=this.mergeBuffers(this.leftChannel),s=this.mergeBuffers(this.rightChannel),u=new Float32Array(a.length),d=0;d<a.length;++d)u[d]=.5*(a[d]+s[d]);this.DEFAULT_SAMPLE_RATE>this.SAMPLE_RATE&&(u=this.downSampleBuffer(u,this.SAMPLE_RATE));var f=44+u.length*2,E=new ArrayBuffer(f),L=new DataView(E);this.writeUTFBytes(L,0,"RIFF"),L.setUint32(4,f,!0),this.writeUTFBytes(L,8,"WAVE"),this.writeUTFBytes(L,12,"fmt "),L.setUint32(16,16,!0),L.setUint16(20,1,!0),L.setUint16(22,1,!0),L.setUint32(24,this.SAMPLE_RATE,!0),L.setUint32(28,this.SAMPLE_RATE*2,!0),L.setUint16(32,2,!0),L.setUint16(34,16,!0);var D=u.length*2;this.writeUTFBytes(L,36,"data"),L.setUint32(40,D,!0);for(var _=u.length,B=44,X=1,fe=0;fe<_;fe++)L.setInt16(B,u[fe]*(32767*X),!0),B+=2;return new Blob([L],{type:"audio/wav"})},i.prototype.downSampleBuffer=function(a,s){if(s===this.DEFAULT_SAMPLE_RATE||s>this.DEFAULT_SAMPLE_RATE)return a;for(var u=this.DEFAULT_SAMPLE_RATE/s,d=Math.round(a.length/u),f=new Float32Array(d),E=0,L=0;E<f.length;){for(var D=Math.round((E+1)*u),_=0,B=0,X=L;X<D&&X<a.length;X++)_+=a[X],B++;f[E]=_/B,E++,L=D}return f},i.prototype.mergeBuffers=function(a){for(var s=new Float32Array(this.recordingLength),u=0,d=a.length,f=0;f<d;++f){var E=a[f];s.set(E,u),u+=E.length}return s},i.prototype.writeUTFBytes=function(a,s,u){for(var d=u.length,f=0;f<d;f++)a.setUint8(s+f,u.charCodeAt(f))},i}(),md=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),gd=function(i){md(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this,d;this.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=s[s.currentMode].element;if(!d){navigator.mediaDevices.getUserMedia({audio:!0}).then(function(D){d=new fd(D),d.recorder.onaudioprocess=function(_){if(d.isRecording){var B=_.inputBuffer.getChannelData(0),X=_.inputBuffer.getChannelData(1);d.cloneChannelData(B,X)}},d.startRecordingNewWavFile(),s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),u.element.children[0].classList.add("vditor-menu--current")}).catch(function(){s.tip.show(window.VditorI18n["record-tip"])});return}if(d.isRecording){d.stopRecording(),s.tip.hide();var L=new File([d.buildWavFileBlob()],"record".concat(new Date().getTime(),".wav"),{type:"video/webm"});Br(s,[L]),u.element.children[0].classList.remove("vditor-menu--current")}else s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),d.startRecordingNewWavFile(),u.element.children[0].classList.add("vditor-menu--current")}})},a}(Mt),vd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),bd=function(i){vd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({redo:d.element},["redo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.redo(s)}),d}return a}(Mt),yd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),wd=function(i){yd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({undo:d.element},["undo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.undo(s)}),d}return a}(Mt),xd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),kd=function(i){xd(a,i);function a(s,u){var d=i.call(this,s,u)||this,f='<input type="file"';return s.options.upload.multiple&&(f+=' multiple="multiple"'),s.options.upload.accept&&(f+=' accept="'.concat(s.options.upload.accept,'"')),d.element.children[0].innerHTML="".concat(u.icon||'<svg><use xlink:href="#vditor-icon-upload"></use></svg>').concat(f,">"),d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}}),this.element.querySelector("input").addEventListener("change",function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}d.target.files.length!==0&&Br(s,d.target.files,d.target)})},a}(Mt),Sd=function(){function i(a){var s=this,u=a.options;this.elements={},this.element=document.createElement("div"),this.element.className="vditor-toolbar",u.toolbar.forEach(function(d,f){var E=s.genItem(a,d,f);if(s.element.appendChild(E),d.toolbar){var L=document.createElement("div");L.className="vditor-hint vditor-panel--arrow",L.addEventListener((0,m.Le)(),function(D){L.style.display="none"}),d.toolbar.forEach(function(D,_){D.level=2,L.appendChild(s.genItem(a,D,f+_))}),E.appendChild(L),M(a,L,E.children[0])}}),a.options.toolbarConfig.hide&&this.element.classList.add("vditor-toolbar--hide"),a.options.toolbarConfig.pin&&this.element.classList.add("vditor-toolbar--pin"),a.options.counter.enable&&(a.counter=new Ou(a),this.element.appendChild(a.counter.element))}return i.prototype.updateConfig=function(a,s){a.options.toolbarConfig=Object.assign({hide:!1,pin:!1},s),a.options.toolbarConfig.hide?this.element.classList.add("vditor-toolbar--hide"):this.element.classList.remove("vditor-toolbar--hide"),a.options.toolbarConfig.pin?this.element.classList.add("vditor-toolbar--pin"):this.element.classList.remove("vditor-toolbar--pin")},i.prototype.genItem=function(a,s,u){var d;switch(s.name){case"bold":case"italic":case"more":case"strike":case"line":case"quote":case"list":case"ordered-list":case"check":case"code":case"inline-code":case"link":case"table":d=new Mt(a,s);break;case"emoji":d=new ju(a,s);break;case"headings":d=new Yu(a,s);break;case"|":d=new Fu;break;case"br":d=new _u;break;case"undo":d=new wd(a,s);break;case"redo":d=new bd(a,s);break;case"help":d=new Qu(a,s);break;case"both":d=new Lu(a,s);break;case"preview":d=new pd(a,s);break;case"fullscreen":d=new Xu(a,s);break;case"upload":d=new kd(a,s);break;case"record":d=new gd(a,s);break;case"info":d=new rd(a,s);break;case"edit-mode":d=new Zo(a,s);break;case"devtools":d=new Bu(a,s);break;case"outdent":d=new cd(a,s);break;case"indent":d=new td(a,s);break;case"outline":d=new dd(a,s);break;case"insert-after":d=new ad(a,s);break;case"insert-before":d=new sd(a,s);break;case"code-theme":d=new Du(a,s);break;case"content-theme":d=new Iu(a,s);break;case"export":d=new Gu(a,s);break;default:d=new Pu(a,s);break}if(d){var f=s.name;return(f==="br"||f==="|")&&(f=f+u),this.elements[f]=d.element,d.element}},i}(),Ed=o(173),Td=function(){function i(){this.stackSize=50,this.resetStack(),this.dmp=new Ed}return i.prototype.clearStack=function(a){this.resetStack(),this.resetIcon(a)},i.prototype.resetIcon=function(a){a.toolbar&&(this[a.currentMode].undoStack.length>1?S(a.toolbar.elements,["undo"]):k(a.toolbar.elements,["undo"]),this[a.currentMode].redoStack.length!==0?S(a.toolbar.elements,["redo"]):k(a.toolbar.elements,["redo"]))},i.prototype.undo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"&&!(this[a.currentMode].undoStack.length<2)){var s=this[a.currentMode].undoStack.pop();s&&(this[a.currentMode].redoStack.push(s),this.renderDiff(s,a),this[a.currentMode].hasUndo=!0,A(a,["hint"]))}},i.prototype.redo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"){var s=this[a.currentMode].redoStack.pop();s&&(this[a.currentMode].undoStack.push(s),this.renderDiff(s,a,!0))}},i.prototype.recordFirstPosition=function(a,s){if(getSelection().rangeCount!==0&&!(this[a.currentMode].undoStack.length!==1||this[a.currentMode].undoStack[0].length===0||this[a.currentMode].redoStack.length>0)&&!((0,m.vU)()&&s.key==="Backspace")&&!(0,m.G6)()){var u=this.addCaret(a);u.replace("<wbr>","").replace(" vditor-ir__node--expand","")===this[a.currentMode].undoStack[0][0].diffs[0][1].replace("<wbr>","")&&(this[a.currentMode].undoStack[0][0].diffs[0][1]=u,this[a.currentMode].lastText=u)}},i.prototype.addToUndoStack=function(a){var s=this.addCaret(a,!0),u=this.dmp.diff_main(s,this[a.currentMode].lastText,!0),d=this.dmp.patch_make(s,this[a.currentMode].lastText,u);d.length===0&&this[a.currentMode].undoStack.length>0||(this[a.currentMode].lastText=s,this[a.currentMode].undoStack.push(d),this[a.currentMode].undoStack.length>this.stackSize&&this[a.currentMode].undoStack.shift(),this[a.currentMode].hasUndo&&(this[a.currentMode].redoStack=[],this[a.currentMode].hasUndo=!1,k(a.toolbar.elements,["redo"])),this[a.currentMode].undoStack.length>1&&S(a.toolbar.elements,["undo"]))},i.prototype.renderDiff=function(a,s,u){u===void 0&&(u=!1);var d;if(u){var f=this.dmp.patch_deepCopy(a).reverse();f.forEach(function(L){L.diffs.forEach(function(D){D[0]=-D[0]})}),d=this.dmp.patch_apply(f,this[s.currentMode].lastText)[0]}else d=this.dmp.patch_apply(a,this[s.currentMode].lastText)[0];if(this[s.currentMode].lastText=d,s[s.currentMode].element.innerHTML=d,s.currentMode!=="sv"&&(s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview")).forEach(function(L){L.parentElement.querySelector(".language-echarts")&&(s.currentMode==="ir"?L.parentElement.outerHTML=s.lute.SpinVditorIRDOM(L.parentElement.outerHTML):L.parentElement.outerHTML=s.lute.SpinVditorDOM(L.parentElement.outerHTML))}),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){Qe(L,s)})),s[s.currentMode].element.querySelector("wbr"))(0,j.ib)(s[s.currentMode].element,s[s.currentMode].element.ownerDocument.createRange()),K(s);else{var E=getSelection().getRangeAt(0);E.setEndBefore(s[s.currentMode].element),E.collapse(!1)}Ht(s),st(s,{enableAddUndoStack:!1,enableHint:!1,enableInput:!0}),ur(s),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){Qe(L,s)}),this[s.currentMode].undoStack.length>1?S(s.toolbar.elements,["undo"]):k(s.toolbar.elements,["undo"]),this[s.currentMode].redoStack.length!==0?S(s.toolbar.elements,["redo"]):k(s.toolbar.elements,["redo"])},i.prototype.resetStack=function(){this.ir={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.sv={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.wysiwyg={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]}},i.prototype.addCaret=function(a,s){s===void 0&&(s=!1);var u;if(getSelection().rangeCount!==0&&!a[a.currentMode].element.querySelector("wbr")){var d=getSelection().getRangeAt(0);if(a[a.currentMode].element.contains(d.startContainer)){u=d.cloneRange();var f=document.createElement("span");f.className="vditor-wbr",d.insertNode(f)}}var E=a[a.currentMode].element.cloneNode(!0);E.querySelectorAll(".vditor-".concat(a.currentMode,"__preview[data-render='1']")).forEach(function(D){D.firstElementChild&&(D.firstElementChild.classList.contains("language-echarts")||D.firstElementChild.classList.contains("language-plantuml")||D.firstElementChild.classList.contains("language-mindmap")?(D.firstElementChild.removeAttribute("_echarts_instance_"),D.firstElementChild.removeAttribute("data-processed"),D.firstElementChild.innerHTML=D.previousElementSibling.firstElementChild.innerHTML,D.setAttribute("data-render","2")):D.firstElementChild.classList.contains("language-math")&&(D.setAttribute("data-render","2"),D.firstElementChild.textContent=D.firstElementChild.getAttribute("data-math"),D.firstElementChild.removeAttribute("data-math")))});var L=E.innerHTML;return a[a.currentMode].element.querySelectorAll(".vditor-wbr").forEach(function(D){D.remove()}),s&&u&&(0,j.Hc)(u),L.replace('<span class="vditor-wbr"></span>',"<wbr>")},i}(),Ad=o(673),Md=function(){function i(a){this.defaultOptions={rtl:!1,after:void 0,cache:{enable:!0},cdn:c.g.CDN,classes:{preview:""},comment:{enable:!1},counter:{enable:!1,type:"markdown"},customRenders:[],debugger:!1,fullscreen:{index:90},height:"auto",hint:{delay:200,emoji:{"+1":"👍","-1":"👎",confused:"😕",eyes:"👀️",heart:"❤️",rocket:"🚀️",smile:"😄",tada:"🎉️"},emojiPath:"".concat(c.g.CDN,"/dist/images/emoji"),extend:[],parse:!0},icon:"ant",lang:"zh_CN",mode:"ir",outline:{enable:!1,position:"left"},placeholder:"",preview:{actions:["desktop","tablet","mobile","mp-wechat","zhihu"],delay:1e3,hljs:c.g.HLJS_OPTIONS,markdown:c.g.MARKDOWN_OPTIONS,math:c.g.MATH_OPTIONS,maxWidth:800,mode:"both",theme:c.g.THEME_OPTIONS,render:{media:{enable:!0}}},link:{isOpen:!0},image:{isPreview:!0},resize:{enable:!1,position:"bottom"},theme:"classic",toolbar:["emoji","headings","bold","italic","strike","link","|","list","ordered-list","check","outdent","indent","|","quote","line","code","inline-code","insert-before","insert-after","|","upload","record","table","|","undo","redo","|","fullscreen","edit-mode",{name:"more",toolbar:["both","code-theme","content-theme","export","outline","preview","devtools","info","help"]}],toolbarConfig:{hide:!1,pin:!1},typewriterMode:!1,undoDelay:800,upload:{extraData:{},fieldName:"file[]",filename:function(s){return s.replace(/\W/g,"")},linkToImgUrl:"",max:10*1024*1024,multiple:!0,url:"",withCredentials:!1},value:"",width:"auto"},this.options=a}return i.prototype.merge=function(){var a,s,u,d,f,E,L,D,_;this.options&&(this.options.toolbar?this.options.toolbar=this.mergeToolbar(this.options.toolbar):this.options.toolbar=this.mergeToolbar(this.defaultOptions.toolbar),!((s=(a=this.options.preview)===null||a===void 0?void 0:a.theme)===null||s===void 0)&&s.list&&(this.defaultOptions.preview.theme.list=this.options.preview.theme.list),!((f=(d=(u=this.options.preview)===null||u===void 0?void 0:u.render)===null||d===void 0?void 0:d.media)===null||f===void 0)&&f.enable&&(this.defaultOptions.preview.render.media.enable=this.options.preview.render.media.enable),!((E=this.options.hint)===null||E===void 0)&&E.emoji&&(this.defaultOptions.hint.emoji=this.options.hint.emoji),this.options.comment&&(this.defaultOptions.comment=this.options.comment),this.options.cdn&&(!((D=(L=this.options.preview)===null||L===void 0?void 0:L.theme)===null||D===void 0)&&D.path||(this.defaultOptions.preview.theme.path="".concat(this.options.cdn,"/dist/css/content-theme")),!((_=this.options.hint)===null||_===void 0)&&_.emojiPath||(this.defaultOptions.hint.emojiPath="".concat(this.options.cdn,"/dist/images/emoji"))));var B=(0,Ad.T)(this.defaultOptions,this.options);if(B.cache.enable&&!B.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");return B},i.prototype.mergeToolbar=function(a){var s=this,u=[{icon:'<svg><use xlink:href="#vditor-icon-export"></use></svg>',name:"export",tipPosition:"ne"},{hotkey:"⌘E",icon:'<svg><use xlink:href="#vditor-icon-emoji"></use></svg>',name:"emoji",tipPosition:"ne"},{hotkey:"⌘H",icon:'<svg><use xlink:href="#vditor-icon-headings"></use></svg>',name:"headings",tipPosition:"ne"},{hotkey:"⌘B",icon:'<svg><use xlink:href="#vditor-icon-bold"></use></svg>',name:"bold",prefix:"**",suffix:"**",tipPosition:"ne"},{hotkey:"⌘I",icon:'<svg><use xlink:href="#vditor-icon-italic"></use></svg>',name:"italic",prefix:"*",suffix:"*",tipPosition:"ne"},{hotkey:"⌘D",icon:'<svg><use xlink:href="#vditor-icon-strike"></use></svg>',name:"strike",prefix:"~~",suffix:"~~",tipPosition:"ne"},{hotkey:"⌘K",icon:'<svg><use xlink:href="#vditor-icon-link"></use></svg>',name:"link",prefix:"[",suffix:"](https://)",tipPosition:"n"},{name:"|"},{hotkey:"⌘L",icon:'<svg><use xlink:href="#vditor-icon-list"></use></svg>',name:"list",prefix:"* ",tipPosition:"n"},{hotkey:"⌘O",icon:'<svg><use xlink:href="#vditor-icon-ordered-list"></use></svg>',name:"ordered-list",prefix:"1. ",tipPosition:"n"},{hotkey:"⌘J",icon:'<svg><use xlink:href="#vditor-icon-check"></use></svg>',name:"check",prefix:"* [ ] ",tipPosition:"n"},{hotkey:"⇧⌘I",icon:'<svg><use xlink:href="#vditor-icon-outdent"></use></svg>',name:"outdent",tipPosition:"n"},{hotkey:"⇧⌘O",icon:'<svg><use xlink:href="#vditor-icon-indent"></use></svg>',name:"indent",tipPosition:"n"},{name:"|"},{hotkey:"⌘;",icon:'<svg><use xlink:href="#vditor-icon-quote"></use></svg>',name:"quote",prefix:"> ",tipPosition:"n"},{hotkey:"⇧⌘H",icon:'<svg><use xlink:href="#vditor-icon-line"></use></svg>',name:"line",prefix:"---",tipPosition:"n"},{hotkey:"⌘U",icon:'<svg><use xlink:href="#vditor-icon-code"></use></svg>',name:"code",prefix:"```",suffix:"\n```",tipPosition:"n"},{hotkey:"⌘G",icon:'<svg><use xlink:href="#vditor-icon-inline-code"></use></svg>',name:"inline-code",prefix:"`",suffix:"`",tipPosition:"n"},{hotkey:"⇧⌘B",icon:'<svg><use xlink:href="#vditor-icon-before"></use></svg>',name:"insert-before",tipPosition:"n"},{hotkey:"⇧⌘E",icon:'<svg><use xlink:href="#vditor-icon-after"></use></svg>',name:"insert-after",tipPosition:"n"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-upload"></use></svg>',name:"upload",tipPosition:"n"},{icon:'<svg><use xlink:href="#vditor-icon-record"></use></svg>',name:"record",tipPosition:"n"},{hotkey:"⌘M",icon:'<svg><use xlink:href="#vditor-icon-table"></use></svg>',name:"table",prefix:"| col1",suffix:` | col2 | col3 |
|
||
| --- | --- | --- |
|
||
| | | |
|
||
| | | |`,tipPosition:"n"},{name:"|"},{hotkey:"⌘Z",icon:'<svg><use xlink:href="#vditor-icon-undo"></use></svg>',name:"undo",tipPosition:"nw"},{hotkey:"⌘Y",icon:'<svg><use xlink:href="#vditor-icon-redo"></use></svg>',name:"redo",tipPosition:"nw"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-more"></use></svg>',name:"more",tipPosition:"e"},{hotkey:"⌘'",icon:'<svg><use xlink:href="#vditor-icon-fullscreen"></use></svg>',name:"fullscreen",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-edit"></use></svg>',name:"edit-mode",tipPosition:"nw"},{hotkey:"⌘P",icon:'<svg><use xlink:href="#vditor-icon-both"></use></svg>',name:"both",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-preview"></use></svg>',name:"preview",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',name:"outline",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-theme"></use></svg>',name:"content-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-code-theme"></use></svg>',name:"code-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-bug"></use></svg>',name:"devtools",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-info"></use></svg>',name:"info",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-help"></use></svg>',name:"help",tipPosition:"nw"},{name:"br"}],d=[];return a.forEach(function(f){var E=f;u.forEach(function(L){typeof f=="string"&&L.name===f&&(E=L),typeof f=="object"&&L.name===f.name&&(E=Object.assign({},L,f))}),f.toolbar&&(E.toolbar=s.mergeToolbar(f.toolbar)),d.push(E)}),d},i}(),Cd=function(){function i(a){var s=this;this.composingLock=!1,this.commentIds=[];var u=document.createElement("div");u.className="vditor-wysiwyg",u.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
|
||
contenteditable="true" spellcheck="false"></pre>
|
||
<div class="vditor-panel vditor-panel--none"></div>
|
||
<div class="vditor-panel vditor-panel--none">
|
||
<button type="button" aria-label="`).concat(window.VditorI18n.comment,`" class="vditor-icon vditor-tooltipped vditor-tooltipped__n">
|
||
<svg><use xlink:href="#vditor-icon-comment"></use></svg>
|
||
</button>
|
||
</div>`),this.element=u.firstElementChild,this.popover=u.firstElementChild.nextElementSibling,this.selectPopover=u.lastElementChild,this.bindEvent(a),Qi(a,this.element),za(a,this.element),ea(a,this.element),Q(a,this.element),ye(a,this.element),fi(a,this.element),Li(a,this.element,this.copy),q(a,this.element,this.copy),a.options.comment.enable&&(this.selectPopover.querySelector("button").onclick=function(){var d=Lute.NewNodeID(),f=getSelection().getRangeAt(0),E=f.cloneRange(),L=f.extractContents(),D,_,B=!1,X=!1;L.childNodes.forEach(function(ce,ke){var xe=!1;if(ce.nodeType===3?xe=!0:ce.classList.contains("vditor-comment")?ce.classList.contains("vditor-comment")&&ce.setAttribute("data-cmtids",ce.getAttribute("data-cmtids")+" "+d):xe=!0,xe)if(ce.nodeType!==3&&ce.getAttribute("data-block")==="0"&&ke===0&&E.startOffset>0)ce.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ce.innerHTML,"</span>"),D=ce;else if(ce.nodeType!==3&&ce.getAttribute("data-block")==="0"&&ke===L.childNodes.length-1&&E.endOffset<E.endContainer.textContent.length)ce.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ce.innerHTML,"</span>"),_=ce;else if(ce.nodeType!==3&&ce.getAttribute("data-block")==="0")ke===0?B=!0:ke===L.childNodes.length-1&&(X=!0),ce.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ce.innerHTML,"</span>");else{var ue=document.createElement("span");ue.classList.add("vditor-comment"),ue.setAttribute("data-cmtids",d),ce.parentNode.insertBefore(ue,ce),ue.appendChild(ce)}});var fe=(0,y.F9)(E.startContainer);fe&&(D?(fe.insertAdjacentHTML("beforeend",D.innerHTML),D.remove()):fe.textContent.trim().replace(c.g.ZWSP,"")===""&&B&&fe.remove());var be=(0,y.F9)(E.endContainer);be&&(_?(be.insertAdjacentHTML("afterbegin",_.innerHTML),_.remove()):be.textContent.trim().replace(c.g.ZWSP,"")===""&&X&&be.remove()),f.insertNode(L),a.options.comment.add(d,f.toString(),s.getComments(a,!0)),Oe(a,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),s.hideComment()})}return i.prototype.getComments=function(a,s){var u=this;if(s===void 0&&(s=!1),a.currentMode==="wysiwyg"&&a.options.comment.enable){this.commentIds=[],this.element.querySelectorAll(".vditor-comment").forEach(function(f){u.commentIds=u.commentIds.concat(f.getAttribute("data-cmtids").split(" "))}),this.commentIds=Array.from(new Set(this.commentIds));var d=[];if(s)return this.commentIds.forEach(function(f){d.push({id:f,top:u.element.querySelector('.vditor-comment[data-cmtids="'.concat(f,'"]')).offsetTop})}),d}else return[]},i.prototype.triggerRemoveComment=function(a){var s=function(f,E){var L=new Set(E);return f.filter(function(D){return!L.has(D)})};if(a.currentMode==="wysiwyg"&&a.options.comment.enable&&a.wysiwyg.commentIds.length>0){var u=JSON.parse(JSON.stringify(this.commentIds));this.getComments(a);var d=s(u,this.commentIds);d.length>0&&a.options.comment.remove(d)}},i.prototype.showComment=function(){var a=(0,j.Ny)(this.element);this.selectPopover.setAttribute("style","left:".concat(a.left,"px;display:block;top:").concat(Math.max(-8,a.top-21),"px"))},i.prototype.hideComment=function(){this.selectPopover.setAttribute("style","display:none")},i.prototype.unbindListener=function(){window.removeEventListener("scroll",this.scrollListener)},i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=(0,y.lG)(u.startContainer,"CODE"),f=(0,y.lG)(u.endContainer,"CODE");if(d&&f&&f.isSameNode(d)){var E="";d.parentElement.tagName==="PRE"?E=u.toString():E="`"+u.toString()+"`",a.clipboardData.setData("text/plain",E),a.clipboardData.setData("text/html","");return}var L=(0,y.lG)(u.startContainer,"A"),D=(0,y.lG)(u.endContainer,"A");if(L&&D&&D.isSameNode(L)){var _=L.getAttribute("title")||"";_&&(_=' "'.concat(_,'"')),a.clipboardData.setData("text/plain","[".concat(u.toString(),"](").concat(L.getAttribute("href")).concat(_,")")),a.clipboardData.setData("text/html","");return}var B=document.createElement("div");B.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorDOM2Md(B.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.unbindListener(),window.addEventListener("scroll",this.scrollListener=function(){if(A(a,["hint"]),!(s.popover.style.display!=="block"||s.selectPopover.style.display!=="block")){var u=parseInt(s.popover.getAttribute("data-top"),10);if(a.options.height!=="auto"){if(a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0){var d=Math.max(window.scrollY-a.element.offsetTop-8,Math.min(u-a.wysiwyg.element.scrollTop,s.element.clientHeight-21))+"px";s.popover.style.display==="block"&&(s.popover.style.top=d),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=d)}return}else if(!a.options.toolbarConfig.pin)return;var f=Math.max(u,window.scrollY-a.element.offsetTop-8)+"px";s.popover.style.display==="block"&&(s.popover.style.top=f),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=f)}}),this.element.addEventListener("scroll",function(){if(A(a,["hint"]),a.options.comment&&a.options.comment.enable&&a.options.comment.scroll&&a.options.comment.scroll(a.wysiwyg.element.scrollTop),s.popover.style.display==="block"){var u=parseInt(s.popover.getAttribute("data-top"),10)-a.wysiwyg.element.scrollTop,d=-8;a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0&&(d=window.scrollY-a.element.offsetTop+d);var f=Math.max(d,Math.min(u,s.element.clientHeight-21))+"px";s.popover.style.top=f,s.selectPopover.style.top=f}}),this.element.addEventListener("paste",function(u){ia(a,u,{pasteCode:function(d){var f=(0,j.zh)(a),E=document.createElement("template");E.innerHTML=d,f.insertNode(E.content.cloneNode(!0));var L=(0,y.a1)(f.startContainer,"data-block","0");L?L.outerHTML=a.lute.SpinVditorDOM(L.outerHTML):a.wysiwyg.element.innerHTML=a.lute.SpinVditorDOM(a.wysiwyg.element.innerHTML),(0,j.ib)(a.wysiwyg.element,f)}})}),this.element.addEventListener("compositionstart",function(){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){var d=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(d&&d.textContent===""){Ht(a);return}(0,m.vU)()||_r(a,getSelection().getRangeAt(0).cloneRange(),u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Oe(a);return}if(s.composingLock||u.data==="‘"||u.data==="“"||u.data==="《"){Oe(a);return}var d=getSelection().getRangeAt(0),f=(0,y.F9)(d.startContainer);if(f||(In(a,d),f=(0,y.F9)(d.startContainer)),!!f){for(var E=(0,j.im)(f,a.wysiwyg.element,d).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
|
||
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}E===0&&(L=!1);for(var _=!0,D=E-1;D<f.textContent.length;D++)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==`
|
||
`){_=!1;break}_&&/^#{1,6} $/.test(f.textContent)&&(_=!1);var B=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(B&&B.textContent===""&&(Ht(a),B.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||wo(f.innerHTML)||yo(f.innerHTML)&&f.previousElementSibling){typeof a.options.input=="function"&&a.options.input(v(a));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),_r(a,d,u)}}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){var d=u.target;d.checked?d.setAttribute("checked","checked"):d.removeAttribute("checked"),s.preventInput=!0,getSelection().rangeCount>0&&(0,j.Hc)(getSelection().getRangeAt(0)),Oe(a);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?mo(a,u.target):Xo(u,a);return}var f=(0,y.lG)(u.target,"A");if(f){a.options.link.click?a.options.link.click(f):a.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,j.zh)(a);if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&E.collapsed){var L=s.element.lastElementChild.getBoundingClientRect();u.y>L.top+L.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(E.selectNodeContents(s.element.lastElementChild),E.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(s.element,E)))}zn(a);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,j.zh)(a).startContainer,"vditor-wysiwyg__preview")),D&&nr(D,a),Rt(u,a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&K(a),(u.key==="Backspace"||u.key==="Delete")&&a.wysiwyg.element.innerHTML!==""&&a.wysiwyg.element.childNodes.length===1&&a.wysiwyg.element.firstElementChild&&a.wysiwyg.element.firstElementChild.tagName==="P"&&a.wysiwyg.element.firstElementChild.childElementCount===0&&(a.wysiwyg.element.textContent===""||a.wysiwyg.element.textContent===`
|
||
`)&&(a.wysiwyg.element.innerHTML="");var d=(0,j.zh)(a);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent===`
|
||
`&&d.startOffset===1&&(d.startContainer.textContent=""),In(a,d),zn(a),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&a.hint.render(a);var f=(0,y.fb)(d.startContainer,"vditor-wysiwyg__preview");if(!f&&d.startContainer.nodeType!==3&&d.startOffset>0){var E=d.startContainer;E.classList.contains("vditor-wysiwyg__block")&&(f=E.lastElementChild)}if(f){var L=f.previousElementSibling;if(L.style.display==="none"){u.key==="ArrowDown"||u.key==="ArrowRight"?nr(f,a):nr(f,a,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=$n(E);if(_&&_.nodeType!==3){var B=_.querySelector(".vditor-wysiwyg__preview");if(B){nr(B,a);return}}if(_.nodeType===3){for(;_.textContent.length===0&&_.nextSibling;)_=_.nextSibling;d.setStart(_,1)}else d.setStart(_.firstChild,0)}else d.selectNodeContents(D),d.collapse(!1)}}}})},i}(),Ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),_d=function(i){Ld(a,i);function a(s,u){var d=i.call(this)||this;if(d.isDestroyed=!1,d.version=c.H,typeof s=="string"){if(u?u.cache?u.cache.id||(u.cache.id="vditor".concat(s)):u.cache={id:"vditor".concat(s)}:u={cache:{id:"vditor".concat(s)}},!document.getElementById(s))return d.showErrorTip("Failed to get element by id: ".concat(s)),d;s=document.getElementById(s)}var f=new Md(u),E=f.merge();if(E.i18n)window.VditorI18n=E.i18n,d.init(s,E);else if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(E.lang)){var L="vditorI18nScript",D=L+E.lang;document.querySelectorAll('head script[id^="'.concat(L,'"]')).forEach(function(_){_.id!==D&&document.head.removeChild(_)}),(0,b.G)("".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js"),D).then(function(){d.init(s,E)}).catch(function(_){d.showErrorTip("GET ".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js net::ERR_ABORTED 404 (Not Found)"))})}else throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");return d}return a.prototype.showErrorTip=function(s){var u=new Gs;document.body.appendChild(u.element),u.show(s,0)},a.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},a.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,we(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,le.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,Ks.Y)(d,this.vditor.options.cdn))},a.prototype.getValue=function(){return v(this.vditor)},a.prototype.getCurrentMode=function(){return this.vditor.currentMode},a.prototype.focus=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.focus():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.focus():this.vditor.currentMode==="ir"&&this.vditor.ir.element.focus()},a.prototype.blur=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.blur():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.blur():this.vditor.currentMode==="ir"&&this.vditor.ir.element.blur()},a.prototype.disabled=function(){A(this.vditor,["subToolbar","hint","popover"]),k(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","false")},a.prototype.enable=function(){S(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor.undo.resetIcon(this.vditor),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","true")},a.prototype.getSelection=function(){if(this.vditor.currentMode==="wysiwyg")return zr(this.vditor.wysiwyg.element);if(this.vditor.currentMode==="sv")return zr(this.vditor.sv.element);if(this.vditor.currentMode==="ir")return zr(this.vditor.ir.element)},a.prototype.renderPreview=function(s){this.vditor.preview.render(this.vditor,s)},a.prototype.getCursorPosition=function(){return(0,j.Ny)(this.vditor[this.vditor.currentMode].element)},a.prototype.isUploading=function(){return this.vditor.upload.isUploading},a.prototype.clearCache=function(){this.vditor.options.cache.enable&&(0,m.pK)()&&localStorage.removeItem(this.vditor.options.cache.id)},a.prototype.disabledCache=function(){this.vditor.options.cache.enable=!1},a.prototype.enableCache=function(){if(!this.vditor.options.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");this.vditor.options.cache.enable=!0},a.prototype.html2md=function(s){return this.vditor.lute.HTML2Md(s)},a.prototype.exportJSON=function(s){return this.vditor.lute.RenderJSON(s)},a.prototype.getHTML=function(){return Vs(this.vditor)},a.prototype.tip=function(s,u){this.vditor.tip.show(s,u)},a.prototype.setPreviewMode=function(s){So(s,this.vditor)},a.prototype.deleteValue=function(){window.getSelection().isCollapsed||document.execCommand("delete",!1)},a.prototype.updateValue=function(s){document.execCommand("insertHTML",!1,s)},a.prototype.insertValue=function(s,u){u===void 0&&(u=!0);var d=(0,j.zh)(this.vditor);d.collapse(!0);var f=document.createElement("template");f.innerHTML=s,d.insertNode(f.content.cloneNode(!0)),d.collapse(!1),this.vditor.currentMode==="sv"?(this.vditor.sv.preventInput=!0,u&&Z(this.vditor)):this.vditor.currentMode==="wysiwyg"?u&&_r(this.vditor,getSelection().getRangeAt(0)):this.vditor.currentMode==="ir"&&(this.vditor.ir.preventInput=!0,u&&Nt(this.vditor,getSelection().getRangeAt(0),!0))},a.prototype.insertMD=function(s){this.vditor.currentMode==="ir"?(0,j.oC)(this.vditor.lute.Md2VditorIRDOM(s),this.vditor):this.vditor.currentMode==="wysiwyg"?(0,j.oC)(this.vditor.lute.Md2VditorDOM(s),this.vditor):Me(this.vditor,s),this.vditor.outline.render(this.vditor),st(this.vditor)},a.prototype.setValue=function(s,u){var d=this;u===void 0&&(u=!1),this.vditor.currentMode==="sv"?(this.vditor.sv.element.innerHTML="<div data-block='0'>".concat(this.vditor.lute.SpinVditorSVDOM(s),"</div>"),Pe(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})):this.vditor.currentMode==="wysiwyg"?Pa(this.vditor,s,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}):(this.vditor.ir.element.innerHTML=this.vditor.lute.Md2VditorIRDOM(s),this.vditor.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){Qe(f,d.vditor)}),Zn(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})),this.vditor.outline.render(this.vditor),s||(A(this.vditor,["emoji","headings","submenu","hint"]),this.vditor.wysiwyg.popover&&(this.vditor.wysiwyg.popover.style.display="none"),this.clearCache()),u&&this.clearStack()},a.prototype.insertEmptyBlock=function(s){gi(this.vditor,s)},a.prototype.clearStack=function(){this.vditor.undo.clearStack(this.vditor),this.vditor.undo.addToUndoStack(this.vditor)},a.prototype.destroy=function(){this.vditor.element.innerHTML=this.vditor.originalInnerHTML,this.vditor.element.classList.remove("vditor"),this.vditor.element.removeAttribute("style");var s=document.getElementById("vditorIconScript");s&&s.remove(),this.clearCache(),Be(),this.vditor.wysiwyg.unbindListener(),this.vditor.options.after=void 0,this.isDestroyed=!0},a.prototype.getCommentIds=function(){return this.vditor.currentMode!=="wysiwyg"?[]:this.vditor.wysiwyg.getComments(this.vditor,!0)},a.prototype.hlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){d.classList.remove("vditor-comment--hover"),s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.add("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.unHlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.remove("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.removeCommentIds=function(s){var u=this;if(this.vditor.currentMode==="wysiwyg"){var d=function(f,E){var L=f.getAttribute("data-cmtids").split(" ");L.find(function(D,_){if(D===E)return L.splice(_,1),!0}),L.length===0?(f.outerHTML=f.innerHTML,(0,j.zh)(u.vditor).collapse(!0)):f.setAttribute("data-cmtids",L.join(" "))};s.forEach(function(f){u.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)}),u.vditor.preview.element.style.display!=="none"&&u.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)})}),Oe(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})}},a.prototype.init=function(s,u){var d=this;this.isDestroyed||(this.vditor={currentMode:u.mode,element:s,hint:new wu(u.hint.extend),lute:void 0,options:u,originalInnerHTML:s.innerHTML,outline:new Su(window.VditorI18n.outline),tip:new Gs},this.vditor.sv=new Mu(this.vditor),this.vditor.undo=new Td,this.vditor.wysiwyg=new Cd(this.vditor),this.vditor.ir=new xu(this.vditor),this.vditor.toolbar=new Sd(this.vditor),u.resize.enable&&(this.vditor.resize=new Au(this.vditor)),this.vditor.toolbar.elements.devtools&&(this.vditor.devtools=new g),(u.upload.url||u.upload.handler)&&(this.vditor.upload=new dr),(0,b.G)(u._lutePath||"".concat(u.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){d.vditor.lute=(0,ku.X)({autoSpace:d.vditor.options.preview.markdown.autoSpace,gfmAutoLink:d.vditor.options.preview.markdown.gfmAutoLink,codeBlockPreview:d.vditor.options.preview.markdown.codeBlockPreview,emojiSite:d.vditor.options.hint.emojiPath,emojis:d.vditor.options.hint.emoji,fixTermTypo:d.vditor.options.preview.markdown.fixTermTypo,footnotes:d.vditor.options.preview.markdown.footnotes,headingAnchor:!1,inlineMathDigit:d.vditor.options.preview.math.inlineDigit,linkBase:d.vditor.options.preview.markdown.linkBase,linkPrefix:d.vditor.options.preview.markdown.linkPrefix,listStyle:d.vditor.options.preview.markdown.listStyle,mark:d.vditor.options.preview.markdown.mark,mathBlockPreview:d.vditor.options.preview.markdown.mathBlockPreview,paragraphBeginningSpace:d.vditor.options.preview.markdown.paragraphBeginningSpace,sanitize:d.vditor.options.preview.markdown.sanitize,toc:d.vditor.options.preview.markdown.toc}),d.vditor.preview=new Tu(d.vditor),Ae(d.vditor),u.after&&u.after(),u.icon&&(0,b.J)("".concat(u.cdn,"/dist/js/icons/").concat(u.icon,".js"),"vditorIconScript")}))},a}(h.default);const Nd=_d})(),l=l.default,l})()})})(bv);var dy=bv.exports;const Qo=vv(dy);const Gp=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n};var hy=Object.defineProperty,py=(t,e,n)=>e in t?hy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vt=(t,e,n)=>(py(t,typeof e!="symbol"?e+"":e,n),n);const Kp={name:"Latte",type:"light",palette:["#dd7878","#ea76cb","#8839ef","#e64553","#fe640b","#df8e1d","#40a02b","#209fb5","#1e66f5","#7287fd"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#4c4f69","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#4dc4ff","--accent-color":"#e64553","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px"}},Xp={name:"Dark",type:"dark",palette:["#848FA0","#748BE9","#D2F9FE","#4145A5","#789AFA","#706CF4","#EF987F","#775DD5","#FCEECF","#DA7FBC"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#2d3748","--root-border-color":"rgba(255, 255, 255, 0.1)","--main-color":"#ffffff","--main-bgcolor":"#4c4f69","--topic-padding":"3px","--color":"#cccccc","--bgcolor":"#252526","--selected":"#4dc4ff","--accent-color":"#789AFA","--panel-color":"#ffffff","--panel-bgcolor":"#2d3748","--panel-border-color":"#696969","--map-padding":"50px 80px"}};function Fh(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/"/g,""")}const ec=function(t,e){if(e.id===t)return e;if(e.children&&e.children.length){for(let n=0;n<e.children.length;n++){const r=ec(t,e.children[n]);if(r)return r}return null}else return null},ho=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)ho(t.children[n],t)},hs=(t,e,n)=>{if(t.expanded=e,t.children)if(n===void 0||n>0){const r=n!==void 0?n-1:void 0;t.children.forEach(o=>{hs(o,e,r)})}else t.children.forEach(r=>{hs(r,!1)})};function Zp(t){if(t.id=$o(),t.children)for(let e=0;e<t.children.length;e++)Zp(t.children[e])}function tc(t,e,n,r){const o=r-e,l=t-n;let h=Math.atan(Math.abs(o)/Math.abs(l))/3.14*180;if(isNaN(h))return;l<0&&o>0&&(h=180-h),l<0&&o<0&&(h=180+h),l>0&&o<0&&(h=360-h);const c=12,p=30,v=h+p,b=h-p;return{x1:n+Math.cos(Math.PI*v/180)*c,y1:r-Math.sin(Math.PI*v/180)*c,x2:n+Math.cos(Math.PI*b/180)*c,y2:r-Math.sin(Math.PI*b/180)*c}}function $o(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const fy=function(){const t=$o();return{topic:this.newTopicName,id:t}};function Yp(t){return JSON.parse(JSON.stringify(t,(e,n)=>{if(e!=="parent")return n}))}const jl=(t,e)=>{let n=0,r=0;for(;e&&e!==t;)n+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{offsetLeft:n,offsetTop:r}},En=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},qh=t=>t?t.tagName==="ME-TPC":!1,zc=t=>t.filter(e=>e.nodeObj.parent).filter((e,n,r)=>{for(let o=0;o<r.length;o++){if(e===r[o])continue;const{parent:l}=e.nodeObj;if(l===r[o].nodeObj)return!1}return!0}),yv=t=>{const e=/translate\(([^,]+),\s*([^)]+)\)/,n=t.match(e);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},Jp=function(t){for(let e=0;e<t.length;e++){const{dom:n,evt:r,func:o}=t[e];n.addEventListener(r,o)}return function(){for(let e=0;e<t.length;e++){const{dom:n,evt:r,func:o}=t[e];n.removeEventListener(r,o)}}},my=t=>{const e=t.getBoundingClientRect();return getComputedStyle(t),{width:e.width,height:e.height,top:e.top,left:e.left,offsetWidth:t.offsetWidth,offsetHeight:t.offsetHeight,offsetTop:t.offsetTop,offsetLeft:t.offsetLeft}},Qp=(t,e)=>{try{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{offsetLeft:r.left-n.left,offsetTop:r.top-n.top}}catch{return jl(t,e)}};var ci=(t=>(t.LHS="lhs",t.RHS="rhs",t))(ci||{});const gy=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},vy=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},by=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))},yy=function(t,e){const n=e.parentElement.parentElement.parentElement.previousSibling;if(n){const r=n.firstChild;t.selectNode(r)}},wy=function(t,e){const n=e.parentElement.nextSibling;if(n&&n.firstChild){const r=n.firstChild.firstChild.firstChild;t.selectNode(r)}},Q1=function(t,e){var n,r;const o=t.currentNode||((n=t.currentNodes)==null?void 0:n[0]);if(!o)return;const l=o.nodeObj,h=o.offsetParent.offsetParent.parentElement;l.parent?h.className===e?wy(t,o):(r=l.parent)!=null&&r.parent?yy(t,o):by(t):e===ci.LHS?gy(t):vy(t)},em=function(t,e){const n=t.currentNode;if(!n||!n.nodeObj.parent)return;const r=e+"Sibling",o=n.parentElement.parentElement[r];o?t.selectNode(o.firstChild.firstChild):t.selectNode(n)},nc=function(t,e,n){const{scaleVal:r,scaleSensitivity:o}=t;switch(e){case"in":t.scale(r+o,n);break;case"out":t.scale(r-o,n)}};function xy(t,e){e=e===!0?{}:e;const n=()=>{t.currentArrow?t.removeArrow():t.currentSummary?t.removeSummary(t.currentSummary.summaryObj.id):t.currentNodes&&t.removeNodes(t.currentNodes)};let r=!1,o=null;const l=c=>{const p=t.nodeData;if(c.key==="0")for(const v of p.children)hs(v,!1);if(c.key==="=")for(const v of p.children)hs(v,!0);if(["1","2","3","4","5","6","7","8","9"].includes(c.key))for(const v of p.children)hs(v,!0,Number(c.key)-1);t.refresh(),t.toCenter(),r=!1,o&&(clearTimeout(o),o=null,t.container.removeEventListener("keydown",l))},h={Enter:c=>{c.shiftKey?t.insertSibling("before"):c.ctrlKey||c.metaKey?t.insertParent():t.insertSibling("after")},Tab:()=>{t.addChild()},F1:()=>{t.toCenter()},F2:()=>{t.beginEdit()},ArrowUp:c=>{if(c.altKey)t.moveUpNode();else{if(c.metaKey||c.ctrlKey)return t.initSide();em(t,"previous")}},ArrowDown:c=>{c.altKey?t.moveDownNode():em(t,"next")},ArrowLeft:c=>{if(c.metaKey||c.ctrlKey)return t.initLeft();Q1(t,ci.LHS)},ArrowRight:c=>{if(c.metaKey||c.ctrlKey)return t.initRight();Q1(t,ci.RHS)},PageUp:()=>t.moveUpNode(),PageDown:()=>{t.moveDownNode()},c:c=>{(c.metaKey||c.ctrlKey)&&(t.waitCopy=t.currentNodes)},x:c=>{(c.metaKey||c.ctrlKey)&&(t.waitCopy=t.currentNodes,n())},v:c=>{!t.waitCopy||!t.currentNode||(c.metaKey||c.ctrlKey)&&(t.waitCopy.length===1?t.copyNode(t.waitCopy[0],t.currentNode):t.copyNodes(t.waitCopy,t.currentNode))},"=":c=>{(c.metaKey||c.ctrlKey)&&nc(t,"in")},"-":c=>{(c.metaKey||c.ctrlKey)&&nc(t,"out")},0:c=>{if(c.metaKey||c.ctrlKey){if(r)return;t.scale(1)}},k:c=>{(c.metaKey||c.ctrlKey)&&(r=!0,o&&(clearTimeout(o),t.container.removeEventListener("keydown",l)),o=window.setTimeout(()=>{r=!1,o=null},2e3),t.container.addEventListener("keydown",l))},Delete:n,Backspace:n,...e};t.container.onkeydown=c=>{if(c.preventDefault(),!t.editable)return;const p=h[c.key];p&&p(c)}}function ky(t){const{dragMoveHelper:e}=t,n=m=>{var x,w,S;if(m.button!==0)return;if((x=t.helper1)!=null&&x.moved){t.helper1.clear();return}if((w=t.helper2)!=null&&w.moved){t.helper2.clear();return}if(e.moved){e.clear();return}const k=m.target;if(k.tagName==="ME-EPD")m.ctrlKey||m.metaKey?t.expandNodeAll(k.previousSibling):t.expandNode(k.previousSibling);else if(k.tagName==="ME-TPC"&&t.currentNodes.length>1)t.selectNode(k);else if(!t.editable)return;const C=(S=k.parentElement)==null?void 0:S.parentElement;C.getAttribute("class")==="topiclinks"?t.selectArrow(k.parentElement):C.getAttribute("class")==="summary"&&t.selectSummary(k.parentElement)},r=m=>{var x,w,S,k;const C=m.target;if(C.tagName==="IMG"){const T=C;T.src,T.alt||T.title;const A=C.closest(".me-tpc");A&&A.nodeObj&&t.bus.fire("showRichTextEditor",A.nodeObj,A);return}if(qh(C)){const T=C;if((x=T.nodeObj)!=null&&x.dangerouslySetInnerHTML&&T.innerHTML.includes("<table")){t.bus.fire("showRichTextEditor",T.nodeObj,T);return}if((w=T.nodeObj)!=null&&w.image){typeof T.nodeObj.image=="string"?T.nodeObj.image:T.nodeObj.image.url,t.bus.fire("showRichTextEditor",T.nodeObj,T);return}if((S=T.nodeObj)!=null&&S.dangerouslySetInnerHTML&&!T.innerHTML.includes("<table")){t.bus.fire("showRichTextEditor",T.nodeObj,T);return}t.bus.fire("showRichTextEditor",T.nodeObj||{},T)}if(t.editable){const T=(k=C.parentElement)==null?void 0:k.parentElement;T.getAttribute("class")==="topiclinks"?t.editArrowLabel(C.parentElement):T.getAttribute("class")==="summary"&&t.editSummary(C.parentElement)}};let o=0;const l=m=>{if(m.pointerType==="mouse")return;const x=new Date().getTime(),w=x-o;w<300&&w>0&&r(m),o=x},h=m=>{e.moved=!1;const x=t.mouseSelectionButton===0?2:0;if(m.button!==x&&m.pointerType==="mouse")return;e.x=m.clientX,e.y=m.clientY;const w=m.target;w.className!=="circle"&&w.contentEditable!=="plaintext-only"&&(e.mousedown=!0,w.setPointerCapture(m.pointerId))},c=m=>{if(m.target.contentEditable!=="plaintext-only"){const x=m.clientX-e.x,w=m.clientY-e.y;e.onMove(x,w)}e.x=m.clientX,e.y=m.clientY},p=m=>{const x=t.mouseSelectionButton===0?2:0;if(m.button!==x&&m.pointerType==="mouse")return;const w=m.target;w.hasPointerCapture&&w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),e.clear()},v=m=>{if(m.preventDefault(),m.button!==2||!t.editable)return;const x=m.target;qh(x)&&!x.classList.contains("selected")&&t.selectNode(x),setTimeout(()=>{t.dragMoveHelper.moved||t.bus.fire("showContextMenu",m)},200)},b=m=>{m.stopPropagation(),m.preventDefault(),m.ctrlKey||m.metaKey?m.deltaY<0?nc(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&nc(t,"out",t.dragMoveHelper):m.shiftKey?t.move(-m.deltaY,0):t.move(-m.deltaX,-m.deltaY)},{container:g}=t;return Jp([{dom:g,evt:"pointerdown",func:h},{dom:g,evt:"pointermove",func:c},{dom:g,evt:"pointerup",func:p},{dom:g,evt:"pointerup",func:l},{dom:g,evt:"click",func:n},{dom:g,evt:"dblclick",func:r},{dom:g,evt:"contextmenu",func:v},{dom:g,evt:"wheel",func:typeof t.handleWheel=="function"?t.handleWheel:b}])}function Sy(){return{handlers:{},addListener:function(t,e){this.handlers[t]===void 0&&(this.handlers[t]=[]),this.handlers[t].push(e)},fire:function(t,...e){if(this.handlers[t]instanceof Array){const n=this.handlers[t];for(let r=0;r<n.length;r++)n[r](...e)}},removeListener:function(t,e){if(!this.handlers[t])return;const n=this.handlers[t];if(!e)n.length=0;else if(n.length)for(let r=0;r<n.length;r++)n[r]===e&&this.handlers[t].splice(r,1)}}}const rc=document,Ey=function(){this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);qc.call(this,t,this.nodeData),t.draggable=!1;const e=rc.createElement("me-root");e.appendChild(t);const n=this.nodeData.children||[];if(this.direction===2){let r=0,o=0;n.map(l=>{l.direction===0?r+=1:l.direction===1?o+=1:r<=o?(l.direction=0,r+=1):(l.direction=1,o+=1)})}Ty(this,n,e)},Ty=function(t,e,n){const r=rc.createElement("me-main");r.className=ci.LHS;const o=rc.createElement("me-main");o.className=ci.RHS;for(let l=0;l<e.length;l++){const h=e[l],{grp:c}=t.createWrapper(h);t.direction===2?h.direction===0?r.appendChild(c):o.appendChild(c):t.direction===0?r.appendChild(c):o.appendChild(c)}t.nodes.appendChild(r),t.nodes.appendChild(n),t.nodes.appendChild(o),t.nodes.appendChild(t.lines)},Ay=function(t,e){const n=rc.createElement("me-children");for(let r=0;r<e.length;r++){const o=e[r],{grp:l}=t.createWrapper(o);n.appendChild(l)}return n};function ef(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Uo=ef();function wv(t){Uo=t}var Tl={exec:()=>null};function sn(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(o,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(Sr.caret,"$1"),n=n.replace(o,h),r},getRegex:()=>new RegExp(n,e)};return r}var Sr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},My=/^(?:[ \t]*(?:\n|$))+/,Cy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ly=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_y=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tf=/(?:[*+-]|\d{1,9}[.)])/,xv=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kv=sn(xv).replace(/bull/g,tf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ny=sn(xv).replace(/bull/g,tf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Dy=/^[^\n]+/,rf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ry=sn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Iy=sn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tf).getRegex(),Bc="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",af=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Oy=sn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",af).replace("tag",Bc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Sv=sn(nf).replace("hr",$l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bc).getRegex(),Hy=sn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Sv).getRegex(),of={blockquote:Hy,code:Cy,def:Ry,fences:Ly,heading:_y,hr:$l,html:Oy,lheading:kv,list:Iy,newline:My,paragraph:Sv,table:Tl,text:Dy},tm=sn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bc).getRegex(),Py={...of,lheading:Ny,table:tm,paragraph:sn(nf).replace("hr",$l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",tm).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bc).getRegex()},zy={...of,html:sn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",af).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Tl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:sn(nf).replace("hr",$l).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",kv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},By=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Fy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ev=/^( {2,}|\\)\n(?!\s*$)/,qy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fc=/[\p{P}\p{S}]/u,sf=/[\s\p{P}\p{S}]/u,Tv=/[^\s\p{P}\p{S}]/u,jy=sn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sf).getRegex(),Av=/(?!~)[\p{P}\p{S}]/u,$y=/(?!~)[\s\p{P}\p{S}]/u,Uy=/(?:[^\s\p{P}\p{S}]|~)/u,Vy=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Mv=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Wy=sn(Mv,"u").replace(/punct/g,Fc).getRegex(),Gy=sn(Mv,"u").replace(/punct/g,Av).getRegex(),Cv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ky=sn(Cv,"gu").replace(/notPunctSpace/g,Tv).replace(/punctSpace/g,sf).replace(/punct/g,Fc).getRegex(),Xy=sn(Cv,"gu").replace(/notPunctSpace/g,Uy).replace(/punctSpace/g,$y).replace(/punct/g,Av).getRegex(),Zy=sn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Tv).replace(/punctSpace/g,sf).replace(/punct/g,Fc).getRegex(),Yy=sn(/\\(punct)/,"gu").replace(/punct/g,Fc).getRegex(),Jy=sn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),Qy=sn(af).replace("(?:-->|$)","-->").getRegex(),e7=sn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Qy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ic=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,t7=sn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ic).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lv=sn(/^!?\[(label)\]\[(ref)\]/).replace("label",ic).replace("ref",rf).getRegex(),_v=sn(/^!?\[(ref)\](?:\[\])?/).replace("ref",rf).getRegex(),n7=sn("reflink|nolink(?!\\()","g").replace("reflink",Lv).replace("nolink",_v).getRegex(),lf={_backpedal:Tl,anyPunctuation:Yy,autolink:Jy,blockSkip:Vy,br:Ev,code:Fy,del:Tl,emStrongLDelim:Wy,emStrongRDelimAst:Ky,emStrongRDelimUnd:Zy,escape:By,link:t7,nolink:_v,punctuation:jy,reflink:Lv,reflinkSearch:n7,tag:e7,text:qy,url:Tl},r7={...lf,link:sn(/^!?\[(label)\]\((.*?)\)/).replace("label",ic).getRegex(),reflink:sn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ic).getRegex()},jh={...lf,emStrongRDelimAst:Xy,emStrongLDelim:Gy,url:sn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},i7={...jh,br:sn(Ev).replace("{2,}","*").getRegex(),text:sn(jh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},a0={normal:of,gfm:Py,pedantic:zy},il={normal:lf,gfm:jh,breaks:i7,pedantic:r7},a7={"&":"&","<":"<",">":">",'"':""","'":"'"},nm=t=>a7[t];function Di(t,e){if(e){if(Sr.escapeTest.test(t))return t.replace(Sr.escapeReplace,nm)}else if(Sr.escapeTestNoEncode.test(t))return t.replace(Sr.escapeReplaceNoEncode,nm);return t}function rm(t){try{t=encodeURI(t).replace(Sr.percentDecode,"%")}catch{return null}return t}function im(t,e){var n;let r=t.replace(Sr.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),o=r.split(Sr.splitPipe),l=0;if(o[0].trim()||o.shift(),o.length>0&&!((n=o.at(-1))!=null&&n.trim())&&o.pop(),e)if(o.length>e)o.splice(e);else for(;o.length<e;)o.push("");for(;l<o.length;l++)o[l]=o[l].trim().replace(Sr.slashPipe,"|");return o}function al(t,e,n){let r=t.length;if(r===0)return"";let o=0;for(;o<r;){let l=t.charAt(r-o-1);if(l===e&&!n)o++;else if(l!==e&&n)o++;else break}return t.slice(0,r-o)}function o7(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function am(t,e,n,r,o){let l=e.href,h=e.title||null,c=t[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:h,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,p}function s7(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(`
|
||
`).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join(`
|
||
`)}var ac=class{constructor(t){vt(this,"options"),vt(this,"rules"),vt(this,"lexer"),this.options=t||Uo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:al(n,`
|
||
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=s7(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=al(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:al(e[0],`
|
||
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=al(e[0],`
|
||
`).split(`
|
||
`),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join(`
|
||
`),b=v.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
||
${v}`:v,o=o?`${o}
|
||
${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+`
|
||
`+n.join(`
|
||
`),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+`
|
||
`+n.join(`
|
||
`),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split(`
|
||
`,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+`
|
||
`,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split(`
|
||
`,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+=`
|
||
`+z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+=`
|
||
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
|
||
`,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=im(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(e=n[3])!=null&&e.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],h={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let c of o)this.rules.other.tableAlignRight.test(c)?h.align.push("right"):this.rules.other.tableAlignCenter.test(c)?h.align.push("center"):this.rules.other.tableAlignLeft.test(c)?h.align.push("left"):h.align.push(null);for(let c=0;c<r.length;c++)h.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:h.align[c]});for(let c of l)h.rows.push(im(c,h.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:h.align[v]})));return h}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
||
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=al(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=o7(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),am(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return am(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var e;let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=n[0],o="mailto:"+r;else{let l;do l=n[0],n[0]=((e=this.rules.inline._backpedal.exec(n[0]))==null?void 0:e[0])??"";while(l!==n[0]);r=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},ga=class $h{constructor(e){vt(this,"tokens"),vt(this,"options"),vt(this,"state"),vt(this,"tokenizer"),vt(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Uo,this.options.tokenizer=this.options.tokenizer||new ac,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Sr,block:a0.normal,inline:il.normal};this.options.pedantic?(n.block=a0.pedantic,n.inline=il.pedantic):this.options.gfm&&(n.block=a0.gfm,this.options.breaks?n.inline=il.breaks:n.inline=il.gfm),this.tokenizer.rules=n}static get rules(){return{block:a0,inline:il}}static lex(e,n){return new $h(n).lex(e)}static lexInline(e,n){return new $h(n).inlineTokens(e)}lex(e){e=e.replace(Sr.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(Sr.tabCharGlobal," ").replace(Sr.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+=`
|
||
`:n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var r,o,l;let h=e,c=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(h))!=null;)b.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(h))!=null;)h=h.slice(0,c.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(c=this.tokenizer.rules.inline.blockSkip.exec(h))!=null;)h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,v="";for(;e;){p||(v=""),p=!1;let b;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,h,v)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(v=b.raw.slice(-1)),p=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(m)}}return n}},oc=class{constructor(t){vt(this,"options"),vt(this,"parser"),this.options=t||Uo}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let o=(r=(e||"").match(Sr.notSpaceStart))==null?void 0:r[0],l=t.replace(Sr.endingNewline,"")+`
|
||
`;return o?'<pre><code class="language-'+Di(o)+'">'+(n?l:Di(l,!0))+`</code></pre>
|
||
`:"<pre><code>"+(n?l:Di(l,!0))+`</code></pre>
|
||
`}blockquote({tokens:t}){return`<blockquote>
|
||
${this.parser.parse(t)}</blockquote>
|
||
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
||
`}hr(t){return`<hr>
|
||
`}list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+`>
|
||
`+r+"</"+o+`>
|
||
`}listitem(t){var e;let n="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((e=t.tokens[0])==null?void 0:e.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Di(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
||
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
||
`}table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+r+`</table>
|
||
`}tablerow({text:t}){return`<tr>
|
||
${t}</tr>
|
||
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
||
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Di(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),o=rm(t);if(o===null)return r;t=o;let l='<a href="'+t+'"';return e&&(l+=' title="'+Di(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=rm(t);if(o===null)return Di(n);t=o;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Di(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Di(t.text)}},cf=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},va=class Uh{constructor(e){vt(this,"options"),vt(this,"renderer"),vt(this,"textRenderer"),this.options=e||Uo,this.options.renderer=this.options.renderer||new oc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cf}static parse(e,n){return new Uh(n).parse(e)}static parseInline(e,n){return new Uh(n).parseInline(e)}parse(e,n=!0){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=c,b=this.options.extensions.renderers[v.type].call({parser:this},v);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(v.type)){l+=b||"";continue}}let p=c;switch(p.type){case"space":{l+=this.renderer.space(p);continue}case"hr":{l+=this.renderer.hr(p);continue}case"heading":{l+=this.renderer.heading(p);continue}case"code":{l+=this.renderer.code(p);continue}case"table":{l+=this.renderer.table(p);continue}case"blockquote":{l+=this.renderer.blockquote(p);continue}case"list":{l+=this.renderer.list(p);continue}case"html":{l+=this.renderer.html(p);continue}case"def":{l+=this.renderer.def(p);continue}case"paragraph":{l+=this.renderer.paragraph(p);continue}case"text":{let v=p,b=this.renderer.text(v);for(;h+1<e.length&&e[h+1].type==="text";)v=e[++h],b+=`
|
||
`+this.renderer.text(v);n?l+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):l+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}parseInline(e,n=this.renderer){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){l+=v||"";continue}}let p=c;switch(p.type){case"escape":{l+=n.text(p);break}case"html":{l+=n.html(p);break}case"link":{l+=n.link(p);break}case"image":{l+=n.image(p);break}case"strong":{l+=n.strong(p);break}case"em":{l+=n.em(p);break}case"codespan":{l+=n.codespan(p);break}case"br":{l+=n.br(p);break}case"del":{l+=n.del(p);break}case"text":{l+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}},Ud,O0=(Ud=class{constructor(t){vt(this,"options"),vt(this,"block"),this.options=t||Uo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?ga.lex:ga.lexInline}provideParser(){return this.block?va.parse:va.parseInline}},vt(Ud,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Ud),l7=class{constructor(...t){vt(this,"defaults",ef()),vt(this,"options",this.setOptions),vt(this,"parse",this.parseMarkdown(!0)),vt(this,"parseInline",this.parseMarkdown(!1)),vt(this,"Parser",va),vt(this,"Renderer",oc),vt(this,"TextRenderer",cf),vt(this,"Lexer",ga),vt(this,"Tokenizer",ac),vt(this,"Hooks",O0),this.use(...t)}walkTokens(t,e){var n,r;let o=[];for(let l of t)switch(o=o.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)o=o.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)o=o.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;o=o.concat(this.walkTokens(h.items,e));break}default:{let h=l;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);o=o.concat(this.walkTokens(p,e))}):h.tokens&&(o=o.concat(this.walkTokens(h.tokens,e)))}}return o}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new oc(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new ac(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new O0;for(let l in n.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=o[h];O0.passThroughHooks.has(l)?o[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(o,v)).then(g=>p.call(o,g));let b=c.call(o,v);return p.call(o,b)}:o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),o&&(c=c.concat(o.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ga.lex(t,e??this.defaults)}parser(t,e){return va.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},o={...this.defaults,...r},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let h=o.hooks?o.hooks.provideLexer():t?ga.lex:ga.lexInline,c=o.hooks?o.hooks.provideParser():t?va.parse:va.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(p=>h(p,o)).then(p=>o.hooks?o.hooks.processAllTokens(p):p).then(p=>o.walkTokens?Promise.all(this.walkTokens(p,o.walkTokens)).then(()=>p):p).then(p=>c(p,o)).then(p=>o.hooks?o.hooks.postprocess(p):p).catch(l);try{o.hooks&&(e=o.hooks.preprocess(e));let p=h(e,o);o.hooks&&(p=o.hooks.processAllTokens(p)),o.walkTokens&&this.walkTokens(p,o.walkTokens);let v=c(p,o);return o.hooks&&(v=o.hooks.postprocess(v)),v}catch(p){return l(p)}}}onError(t,e){return n=>{if(n.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Di(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Bo=new l7;function on(t,e){return Bo.parse(t,e)}on.options=on.setOptions=function(t){return Bo.setOptions(t),on.defaults=Bo.defaults,wv(on.defaults),on};on.getDefaults=ef;on.defaults=Uo;on.use=function(...t){return Bo.use(...t),on.defaults=Bo.defaults,wv(on.defaults),on};on.walkTokens=function(t,e){return Bo.walkTokens(t,e)};on.parseInline=Bo.parseInline;on.Parser=va;on.parser=va.parse;on.Renderer=oc;on.TextRenderer=cf;on.Lexer=ga;on.lexer=ga.lex;on.Tokenizer=ac;on.Hooks=O0;on.parse=on;on.options;on.setOptions;on.use;on.walkTokens;on.parseInline;va.parse;ga.lex;const Sn=document,Nv=function(t,e){const n=(this!=null&&this.el?this.el:e||document).querySelector(`[data-nodeid="me${t}"]`);if(!n)throw new Error(`FindEle: Node ${t} not found, maybe it's collapsed.`);return n},qc=function(t,e){if(t.innerHTML="",e.style){const r=e.style;for(const o in r)t.style[o]=r[o]}if(e.dangerouslySetInnerHTML){const r=e.dangerouslySetInnerHTML;if(r.includes("|")&&r.includes("-")||r.includes("![")||r.includes("#")||r.includes("**")||r.includes("`")){t.innerHTML='<div class="node-loading"><div class="loading-spinner"></div><span>渲染中...</span></div>',t.classList.add("mindmap-node-rendering");try{Promise.resolve().then(()=>sk).then(({default:o})=>{o.preview(t,r,{mode:"dark",hljs:{style:"github"},after:()=>{t.classList.remove("mindmap-node-rendering"),t.classList.add("mindmap-node-completed")}})}).catch(o=>{n(t,r)})}catch{n(t,r)}return}n(t,r);return}function n(r,o){let l=o;l.includes("<table")||l.includes("<td>")||l.includes("<th>")?(l=l.replace(/•\s*【/g,"【"),l=l.replace(/•\s*\[/g,"["),l=l.replace(/•\s*(/g,"("),l=l.replace(/•\s*\(/g,"(")):(l=l.replace(/•\s*【/g,"【"),l=l.replace(/•\s*\[/g,"["),l=l.replace(/•\s*(/g,"("),l=l.replace(/•\s*\(/g,"("),l=l.replace(/^(\s*)•\s*(.+)$/gm,"<li>$2</li>").replace(/(<li>.*<\/li>)/gs,h=>l.includes("<ul>")?h:`<ul>${h}</ul>`).replace(/\n/g,"<br>")),r.innerHTML=l,l.includes("<img"),e.image,r.classList.add("no-image"),r.classList.remove("has-image")}if(e.image){const r=e.image;if(r.url&&r.width&&r.height){const o=Sn.createElement("img");o.src=this.imageProxy?this.imageProxy(r.url):r.url,o.style.width=r.width+"px",o.style.height=r.height+"px",r.fit&&(o.style.objectFit=r.fit),t.appendChild(o),t.image=o}}else t.image&&(t.image=void 0);{const r=Sn.createElement("span");r.className="text";let o="";this.markdown?o=this.markdown(e.topic,e):o=e.topic||"",o=o.replace(/•\s*【/g,"【"),o=o.replace(/•\s*\[/g,"["),o=o.replace(/•\s*(/g,"("),o=o.replace(/•\s*\(/g,"("),r.innerHTML=o,t.appendChild(r),t.text=r,e.image,o.includes("<img"),t.classList.add("no-image"),t.classList.remove("has-image")}if(e.hyperLink){const r=Sn.createElement("a");r.className="hyper-link",r.target="_blank",r.innerText="🔗",r.href=e.hyperLink,t.appendChild(r),t.link=r}else t.link&&(t.link=void 0);if(e.icons&&e.icons.length){const r=Sn.createElement("span");r.className="icons",r.innerHTML=e.icons.map(o=>`<span>${Fh(o)}</span>`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=Sn.createElement("div");r.className="tags",e.tags.forEach(o=>{const l=Sn.createElement("span");typeof o=="string"?l.textContent=o:(l.textContent=o.text,o.className&&(l.className=o.className),o.style&&Object.assign(l.style,o.style)),r.appendChild(l)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},c7=function(t,e){const n=Sn.createElement("me-wrapper"),{p:r,tpc:o}=this.createParent(t);if(n.appendChild(r),!e&&t.children&&t.children.length>0){const l=uf(t.expanded);if(r.appendChild(l),t.expanded!==!1){const h=Ay(this,t.children);n.appendChild(h)}}return{grp:n,top:r,tpc:o}},u7=function(t){const e=Sn.createElement("me-parent"),n=this.createTopic(t);return qc.call(this,n,t),e.appendChild(n),{p:e,tpc:n}},d7=function(t){const e=Sn.createElement("me-children");return e.append(...t),e},h7=function(t){const e=Sn.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function Dv(t){const e=Sn.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const p7=function(t){if(!t)return;const e=Sn.createElement("div"),n=t.nodeObj,r=n.topic;t.appendChild(e),e.id="input-box",e.textContent=r,e.contentEditable="plaintext-only",e.spellcheck=!1;const o=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px;
|
||
color:${o.color};
|
||
padding:${o.padding};
|
||
margin:${o.margin};
|
||
font:${o.font};
|
||
background-color:${o.backgroundColor!=="rgba(0, 0, 0, 0)"&&o.backgroundColor};
|
||
border-radius:${o.borderRadius};`,this.direction===0&&(e.style.right="0"),Dv(e),this.bus.fire("operation",{name:"beginEdit",obj:t.nodeObj}),e.addEventListener("keydown",l=>{l.stopPropagation();const h=l.key;if(h==="Enter"||h==="Tab"){if(l.shiftKey)return;l.preventDefault(),e.blur(),this.container.focus()}}),e.addEventListener("blur",()=>{var l;if(!e)return;const h=((l=e.textContent)==null?void 0:l.trim())||"";h===""?n.topic=r:(n.topic=h,this.markdown?t.text.innerHTML=this.markdown(n.topic,n):t.text.textContent=h),e.remove(),qc.call(this,t,n),h!==r&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:n,origin:r}))})},uf=function(t){const e=Sn.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},f7=function(t){if(!t)return;const e=t.nodeObj,n=e.dangerouslySetInnerHTML||"",r=Sn.createElement("div");r.id="table-edit-overlay",r.style.cssText=`
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background: rgba(0, 0, 0, 0.5);
|
||
z-index: 9999;
|
||
`;const o=Sn.createElement("div");o.id="table-edit-container",o.style.cssText=`
|
||
position: fixed;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
width: 600px;
|
||
min-height: 400px;
|
||
max-height: 80vh;
|
||
background: white;
|
||
border: 2px solid #660874;
|
||
border-radius: 8px;
|
||
padding: 15px;
|
||
z-index: 10000;
|
||
box-shadow: 0 8px 24px rgba(0,0,0,0.3);
|
||
display: flex;
|
||
flex-direction: column;
|
||
`;const l=Sn.createElement("div");l.textContent="编辑表格(Markdown格式)",l.style.cssText=`
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
color: #333;
|
||
margin-bottom: 10px;
|
||
padding-bottom: 8px;
|
||
border-bottom: 1px solid #e0e0e0;
|
||
`;const h=Sn.createElement("textarea");h.value=this.convertTableHTMLToMarkdown(n),h.style.cssText=`
|
||
flex: 1;
|
||
min-height: 300px;
|
||
border: 1px solid #ddd;
|
||
border-radius: 4px;
|
||
padding: 12px;
|
||
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
|
||
font-size: 13px;
|
||
line-height: 1.5;
|
||
resize: vertical;
|
||
outline: none;
|
||
background: #fafafa;
|
||
color: #333;
|
||
caret-color: #660874;
|
||
`,h.setAttribute("spellcheck","false"),h.setAttribute("autocomplete","off"),h.setAttribute("autocorrect","off"),h.setAttribute("autocapitalize","off");const c=Sn.createElement("div");c.style.cssText=`
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
gap: 8px;
|
||
margin-top: 12px;
|
||
padding-top: 12px;
|
||
border-top: 1px solid #e0e0e0;
|
||
`;const p=Sn.createElement("span");p.textContent="提示: Ctrl+Enter保存, Esc取消",p.style.cssText=`
|
||
font-size: 11px;
|
||
color: #999;
|
||
`;const v=Sn.createElement("div");v.style.cssText=`
|
||
display: flex;
|
||
gap: 8px;
|
||
`;const b=Sn.createElement("button");b.textContent="取消",b.style.cssText=`
|
||
padding: 8px 20px;
|
||
background: #6c757d;
|
||
color: white;
|
||
border: none;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 13px;
|
||
transition: background 0.2s;
|
||
`,b.addEventListener("mouseenter",()=>{b.style.background="#5a6268"}),b.addEventListener("mouseleave",()=>{b.style.background="#6c757d"});const g=Sn.createElement("button");g.textContent="保存",g.style.cssText=`
|
||
padding: 8px 20px;
|
||
background: #660874;
|
||
color: white;
|
||
border: none;
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 13px;
|
||
font-weight: 500;
|
||
transition: background 0.2s;
|
||
`,g.addEventListener("mouseenter",()=>{g.style.background="#4d0655"}),g.addEventListener("mouseleave",()=>{g.style.background="#660874"}),v.appendChild(b),v.appendChild(g),c.appendChild(p),c.appendChild(v),o.appendChild(l),o.appendChild(h),o.appendChild(c),Sn.body.appendChild(r),Sn.body.appendChild(o),r.addEventListener("click",()=>{r.remove(),o.remove()}),setTimeout(()=>{h.focus(),h.setSelectionRange(0,0)},50);const m=()=>{const w=h.value.trim();if(w===this.convertTableHTMLToMarkdown(n)){r.remove(),o.remove();return}on.setOptions({breaks:!1,gfm:!0});const S=on.parse(w).replace(/<table>/g,'<table class="markdown-table">');r.remove(),o.remove(),e.dangerouslySetInnerHTML=S,e.topic=w,t.innerHTML=S,this.bus.fire("operation",{name:"finishEditTable",obj:e,origin:n}),t.classList.add("no-image"),t.classList.remove("has-image"),this.bus.fire("operation",{name:"finishEditTable",obj:e,origin:n}),this.linkDiv()},x=()=>{r.remove(),o.remove()};g.addEventListener("click",m),b.addEventListener("click",x),h.addEventListener("keydown",w=>{w.stopPropagation(),w.key==="Escape"?(w.preventDefault(),x()):w.key==="Enter"&&w.ctrlKey&&(w.preventDefault(),m())})},m7=function(t){const e=Sn.createElement("div");e.innerHTML=t;const n=e.querySelector("table");if(!n)return t;let r="";const o=n.querySelector("thead");if(o){const h=o.querySelector("tr");if(h){const c=Array.from(h.querySelectorAll("th")).map(p=>{var v;return((v=p.textContent)==null?void 0:v.trim())||""});r+="| "+c.join(" | ")+` |
|
||
`,r+="| "+c.map(()=>"---").join(" | ")+` |
|
||
`}}const l=n.querySelector("tbody");return l&&l.querySelectorAll("tr").forEach(h=>{const c=Array.from(h.querySelectorAll("td")).map(p=>{var v;return((v=p.textContent)==null?void 0:v.trim())||""});r+="| "+c.join(" | ")+` |
|
||
`}),r.trim()},Po=document,oi="http://www.w3.org/2000/svg",Vh=function(t,e,n,r={}){const{anchor:o="middle",color:l,dataType:h}=r,c=document.createElementNS(oi,"text");return En(c,{"text-anchor":o,x:e+"",y:n+"",fill:l||(o==="middle"?"rgb(235, 95, 82)":"#666")}),h&&(c.dataset.type=h),c.innerHTML=t,c},Rv=function(t,e,n){const r=Po.createElementNS(oi,"path");return En(r,{d:t,stroke:e||"#666",fill:"none","stroke-width":n}),r},fl=function(t){const e=Po.createElementNS(oi,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},om=function(){const t=Po.createElementNS(oi,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},g7=function(t,e,n,r){const o=Po.createElementNS(oi,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:n}].forEach((l,h)=>{const c=l.d,p=Po.createElementNS(oi,"path"),v={d:c,stroke:(r==null?void 0:r.stroke)||"rgb(235, 95, 82)",fill:"none","stroke-linecap":(r==null?void 0:r.strokeLinecap)||"cap","stroke-width":String((r==null?void 0:r.strokeWidth)||"2")};(r==null?void 0:r.opacity)!==void 0&&(v.opacity=String(r.opacity)),En(p,v),h===0&&p.setAttribute("stroke-dasharray",(r==null?void 0:r.strokeDasharray)||"8,2");const b=Po.createElementNS(oi,"path");En(b,{d:c,stroke:"transparent",fill:"none","stroke-width":"15"}),o.appendChild(b),o.appendChild(p),o[l.name]=p}),o},Iv=function(t,e,n){if(!e)return;const r=Po.createElement("div");t.nodes.appendChild(r);const o=e.innerHTML;r.id="input-box",r.textContent=o,r.contentEditable="plaintext-only",r.spellcheck=!1;const l=e.getBBox();r.style.cssText=`
|
||
min-width:${Math.max(88,l.width)}px;
|
||
position:absolute;
|
||
left:${l.x}px;
|
||
top:${l.y}px;
|
||
padding: 2px 4px;
|
||
margin: -2px -4px;
|
||
`,Dv(r),t.scrollIntoView(r),r.addEventListener("keydown",h=>{h.stopPropagation();const c=h.key;if(c==="Enter"||c==="Tab"){if(h.shiftKey)return;h.preventDefault(),r.blur(),t.container.focus()}}),r.addEventListener("blur",()=>{var h;if(!r)return;const c=((h=r.textContent)==null?void 0:h.trim())||"";c===""?n.label=o:n.label=c,r.remove(),c!==o&&(e.innerHTML=n.label,"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},v7=function(t){const e=this.map.querySelector("me-root"),n=e.offsetTop,r=e.offsetLeft,o=e.offsetWidth,l=e.offsetHeight,h=this.map.querySelectorAll("me-main > me-wrapper");this.lines.innerHTML="";for(let c=0;c<h.length;c++){const p=h[c],v=p.querySelector("me-tpc"),{offsetLeft:b,offsetTop:g}=jl(this.nodes,v),m=v.offsetWidth,x=v.offsetHeight,w=p.parentNode.className,S=this.generateMainBranch({pT:n,pL:r,pW:o,pH:l,cT:g,cL:b,cW:m,cH:x,direction:w,containerHeight:this.nodes.offsetHeight}),k=this.theme.palette,C=v.nodeObj.branchColor||k[c%k.length];if(v.style.borderColor=C,this.lines.appendChild(Rv(S,C,"3")),t&&t!==p)continue;const T=fl("subLines"),A=p.lastChild;A.tagName==="svg"&&A.remove(),p.appendChild(T),Ov(this,T,C,p,w,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},Ov=function(t,e,n,r,o,l){const h=r.firstChild,c=r.children[1].children;if(c.length===0)return;const p=h.offsetTop,v=h.offsetLeft,b=h.offsetWidth,g=h.offsetHeight;for(let m=0;m<c.length;m++){const x=c[m],w=x.firstChild,S=w.offsetTop,k=w.offsetLeft,C=w.offsetWidth,T=w.offsetHeight,A=w.firstChild.nodeObj.branchColor||n,M=t.generateSubBranch({pT:p,pL:v,pW:b,pH:g,cT:S,cL:k,cW:C,cH:T,direction:o,isFirst:l});e.appendChild(Rv(M,A,"2"));const y=w.children[1];if(y){if(!y.expanded)continue}else continue;Ov(t,e,A,x,o)}},sm={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},lm={cn:sm,zh_CN:sm,zh_TW:{addChild:"插入子節點",addParent:"插入父節點",addSibling:"插入同級節點",removeNode:"刪除節點",focus:"專注",cancelFocus:"取消專注",moveUp:"上移",moveDown:"下移",link:"連接",linkBidirectional:"雙向連接",clickTips:"請點擊目標節點",summary:"摘要"},en:{addChild:"Add child",addParent:"Add parent",addSibling:"Add sibling",removeNode:"Remove node",focus:"Focus Mode",cancelFocus:"Cancel Focus Mode",moveUp:"Move up",moveDown:"Move down",link:"Link",linkBidirectional:"Bidirectional Link",clickTips:"Please click the target node",summary:"Summary"},ru:{addChild:"Добавить дочерний элемент",addParent:"Добавить родительский элемент",addSibling:"Добавить на этом уровне",removeNode:"Удалить узел",focus:"Режим фокусировки",cancelFocus:"Отменить режим фокусировки",moveUp:"Поднять выше",moveDown:"Опустить ниже",link:"Ссылка",linkBidirectional:"Двунаправленная ссылка",clickTips:"Пожалуйста, нажмите на целевой узел",summary:"Описание"},ja:{addChild:"子ノードを追加する",addParent:"親ノードを追加します",addSibling:"兄弟ノードを追加する",removeNode:"ノードを削除",focus:"集中",cancelFocus:"集中解除",moveUp:"上へ移動",moveDown:"下へ移動",link:"コネクト",linkBidirectional:"双方向リンク",clickTips:"ターゲットノードをクリックしてください",summary:"概要"},pt:{addChild:"Adicionar item filho",addParent:"Adicionar item pai",addSibling:"Adicionar item irmao",removeNode:"Remover item",focus:"Modo Foco",cancelFocus:"Cancelar Modo Foco",moveUp:"Mover para cima",moveDown:"Mover para baixo",link:"Link",linkBidirectional:"Link bidirecional",clickTips:"Favor clicar no item alvo",summary:"Resumo"},it:{addChild:"Aggiungi figlio",addParent:"Aggiungi genitore",addSibling:"Aggiungi fratello",removeNode:"Rimuovi nodo",focus:"Modalità Focus",cancelFocus:"Annulla Modalità Focus",moveUp:"Sposta su",moveDown:"Sposta giù",link:"Collega",linkBidirectional:"Collegamento bidirezionale",clickTips:"Si prega di fare clic sul nodo di destinazione",summary:"Unisci nodi"},es:{addChild:"Agregar hijo",addParent:"Agregar padre",addSibling:"Agregar hermano",removeNode:"Eliminar nodo",focus:"Modo Enfoque",cancelFocus:"Cancelar Modo Enfoque",moveUp:"Mover hacia arriba",moveDown:"Mover hacia abajo",link:"Enlace",linkBidirectional:"Enlace bidireccional",clickTips:"Por favor haga clic en el nodo de destino",summary:"Resumen"},fr:{addChild:"Ajout enfant",addParent:"Ajout parent",addSibling:"Ajout voisin",removeNode:"Supprimer",focus:"Cibler",cancelFocus:"Retour",moveUp:"Monter",moveDown:"Descendre",link:"Lier",linkBidirectional:"Lien bidirectionnel",clickTips:"Cliquer sur le noeud cible",summary:"Annoter"},ko:{addChild:"자식 추가",addParent:"부모 추가",addSibling:"형제 추가",removeNode:"노드 삭제",focus:"포커스 모드",cancelFocus:"포커스 모드 취소",moveUp:"위로 이동",moveDown:"아래로 이동",link:"연결",linkBidirectional:"양방향 연결",clickTips:"대상 노드를 클릭하십시오",summary:"요약"}};function b7(t,e){e=e===!0?{focus:!0,link:!0}:e;const n=F=>{const P=document.createElement("div");return P.innerText=F,P.className="tips",P},r=(F,P,Y)=>{const te=document.createElement("li");return te.id=F,te.innerHTML=`<span>${Fh(P)}</span><span ${Y?'class="key"':""}>${Fh(Y)}</span>`,te},o=lm[t.locale]?t.locale:"en",l=lm[o],h=r("cm-add_child",l.addChild,"Tab"),c=r("cm-add_parent",l.addParent,"Ctrl + Enter"),p=r("cm-add_sibling",l.addSibling,"Enter"),v=r("cm-remove_child",l.removeNode,"Delete"),b=r("cm-fucus",l.focus,""),g=r("cm-unfucus",l.cancelFocus,""),m=r("cm-up",l.moveUp,"PgUp"),x=r("cm-down",l.moveDown,"Pgdn"),w=r("cm-link",l.link,""),S=r("cm-link-bidirectional",l.linkBidirectional,""),k=r("cm-summary",l.summary,""),C=r("cm-image-preview","预览图片",""),T=r("cm-rich-text-edit","编辑内容",""),A=document.createElement("ul");if(A.className="menu-list",A.appendChild(h),A.appendChild(c),A.appendChild(p),A.appendChild(v),e.focus&&(A.appendChild(b),A.appendChild(g)),A.appendChild(m),A.appendChild(x),A.appendChild(k),A.appendChild(C),A.appendChild(T),e.link&&(A.appendChild(w),A.appendChild(S)),e&&e.extend)for(let F=0;F<e.extend.length;F++){const P=e.extend[F],Y=r(P.name,P.name,P.key||"");A.appendChild(Y),Y.onclick=te=>{P.onclick(te)}}const M=document.createElement("div");M.className="context-menu",M.appendChild(A),M.hidden=!0,t.container.append(M);let y=!0;const N=F=>{var P,Y;const te=F.target;if(qh(te)){te.parentElement.tagName==="ME-ROOT"?y=!0:y=!1;const de=te;(P=de.nodeObj)!=null&&P.image||(Y=de.nodeObj)!=null&&Y.dangerouslySetInnerHTML||de.querySelector("img")?(C.style.display="block",C.className="",T.style.display="block",T.className=""):(C.style.display="none",T.style.display="none"),y?(b.className="disabled",m.className="disabled",x.className="disabled",c.className="disabled",p.className="disabled",v.className="disabled"):(b.className="",m.className="",x.className="",c.className="",p.className="",v.className=""),M.hidden=!1,A.style.top="",A.style.bottom="",A.style.left="",A.style.right="";const Ce=A.getBoundingClientRect(),qe=A.offsetHeight,Ge=A.offsetWidth,nt=F.clientY-Ce.top,je=F.clientX-Ce.left;qe+nt>window.innerHeight?(A.style.top="",A.style.bottom="0px"):(A.style.bottom="",A.style.top=nt+15+"px"),Ge+je>window.innerWidth?(A.style.left="",A.style.right="0px"):(A.style.right="",A.style.left=je+10+"px")}};t.bus.addListener("showContextMenu",N),M.onclick=F=>{F.target===M&&(M.hidden=!0)},h.onclick=()=>{t.addChild(),M.hidden=!0},c.onclick=()=>{t.insertParent(),M.hidden=!0},p.onclick=()=>{y||(t.insertSibling("after"),M.hidden=!0)},v.onclick=()=>{y||(t.removeNodes(t.currentNodes||[]),M.hidden=!0)},b.onclick=()=>{y||(t.focusNode(t.currentNode),M.hidden=!0)},g.onclick=()=>{t.cancelFocus(),M.hidden=!0},m.onclick=()=>{y||(t.moveUpNode(),M.hidden=!0)},x.onclick=()=>{y||(t.moveDownNode(),M.hidden=!0)};const z=F=>{M.hidden=!0;const P=t.currentNode,Y=n(l.clickTips);t.container.appendChild(Y),t.map.addEventListener("click",te=>{te.preventDefault(),Y.remove();const de=te.target;(de.parentElement.tagName==="ME-PARENT"||de.parentElement.tagName==="ME-ROOT")&&t.createArrow(P,de,F)},{once:!0})};return w.onclick=()=>z(),S.onclick=()=>z({bidirectional:!0}),k.onclick=()=>{M.hidden=!0,t.createSummary(),t.unselectNodes(t.currentNodes)},C.onclick=()=>{var F,P;M.hidden=!0;const Y=t.currentNode;if(Y)if((F=Y.nodeObj)!=null&&F.image){const te=typeof Y.nodeObj.image=="string"?Y.nodeObj.image:Y.nodeObj.image.url;t.bus.fire("showImagePreview",te,Y.nodeObj.topic||"")}else{const te=Y.querySelector("img");if(te){const de=te.src,Ce=te.alt||te.title||((P=Y.nodeObj)==null?void 0:P.topic)||"";t.bus.fire("showImagePreview",de,Ce)}}},T.onclick=()=>{M.hidden=!0;const F=t.currentNode;F&&t.bus.fire("showRichTextEditor",F.nodeObj,F)},()=>{h.onclick=null,c.onclick=null,p.onclick=null,v.onclick=null,b.onclick=null,g.onclick=null,m.onclick=null,x.onclick=null,w.onclick=null,k.onclick=null,M.onclick=null,t.container.oncontextmenu=null}}const Wh=document,y7=function(t,e){if(!e)return Gh(t),t;let n=t.querySelector(".insert-preview");const r=`insert-preview ${e} show`;return n||(n=Wh.createElement("div"),t.appendChild(n)),n.className=r,t},Gh=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const n of e||[])n.remove()},cm=function(t,e){for(const n of e){const r=n.parentElement.parentElement.contains(t);if(!(t&&t.tagName==="ME-TPC"&&t!==n&&!r&&t.nodeObj.parent))return!1}return!0},w7=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class x7{constructor(e){vt(this,"mind"),vt(this,"isMoving",!1),vt(this,"interval",null),vt(this,"speed",20),this.mind=e}move(e,n){this.isMoving||(this.isMoving=!0,this.interval=setInterval(()=>{this.mind.move(e*this.speed*this.mind.scaleVal,n*this.speed*this.mind.scaleVal)},100))}stop(){this.isMoving=!1,clearInterval(this.interval)}}function k7(t){let e=null,n=null;const r=w7(t),o=new x7(t),l=p=>{t.selection.cancel();const v=p.target;if((v==null?void 0:v.tagName)!=="ME-TPC"){p.preventDefault();return}let b=t.currentNodes;b!=null&&b.includes(v)||(t.selectNode(v),b=t.currentNodes),t.dragged=b,b.length>1?r.innerHTML=b.length+"":r.innerHTML=v.innerHTML;for(const g of b)g.parentElement.parentElement.style.opacity="0.5";p.dataTransfer.setDragImage(r,0,0),p.dataTransfer.dropEffect="move",t.dragMoveHelper.clear()},h=p=>{const{dragged:v}=t;if(!v)return;o.stop();for(const g of v)g.parentElement.parentElement.style.opacity="1";const b=p.target;b.style.opacity="",n&&(Gh(n),e==="before"?t.moveNodeBefore(v,n):e==="after"?t.moveNodeAfter(v,n):e==="in"&&t.moveNodeIn(v,n),t.dragged=null,r.innerHTML="")},c=p=>{p.preventDefault();const v=12*t.scaleVal,{dragged:b}=t;if(!b)return;const g=t.container.getBoundingClientRect();p.clientX<g.x+50?o.move(1,0):p.clientX>g.x+g.width-50?o.move(-1,0):p.clientY<g.y+50?o.move(0,1):p.clientY>g.y+g.height-50?o.move(0,-1):o.stop(),Gh(n);const m=Wh.elementFromPoint(p.clientX,p.clientY-v);if(cm(m,b)){n=m;const x=m.getBoundingClientRect(),w=x.y;p.clientY>w+x.height?e="after":e="in"}else{const x=Wh.elementFromPoint(p.clientX,p.clientY+v),w=x.getBoundingClientRect();if(cm(x,b)){n=x;const S=w.y;p.clientY<S?e="before":e="in"}else e=n=null}n&&y7(n,e)};return Jp([{dom:t.map,evt:"dragstart",func:l},{dom:t.map,evt:"dragend",func:h},{dom:t.map,evt:"dragover",func:c}])}const S7=function(t){return["createSummary","removeSummary","finishEditSummary"].includes(t.name)?{type:"summary",value:t.obj.id}:["createArrow","removeArrow","finishEditArrowLabel"].includes(t.name)?{type:"arrow",value:t.obj.id}:["removeNodes","copyNodes","moveNodeBefore","moveNodeAfter","moveNodeIn"].includes(t.name)?{type:"nodes",value:t.objs.map(e=>e.id)}:{type:"nodes",value:[t.obj.id]}};function E7(t){let e=[],n=-1,r=t.getData(),o=[];t.undo=function(){if(n>-1){const p=e[n];r=p.prev,t.refresh(p.prev);try{p.currentTarget.type==="nodes"&&(p.operation==="removeNodes"?t.selectNodes(p.currentTarget.value.map(v=>this.findEle(v))):t.selectNodes(p.currentSelected.map(v=>this.findEle(v))))}catch{}finally{n--}}},t.redo=function(){if(n<e.length-1){n++;const p=e[n];r=p.next,t.refresh(p.next);try{p.currentTarget.type==="nodes"&&(p.operation==="removeNodes"?t.selectNodes(p.currentSelected.map(v=>this.findEle(v))):t.selectNodes(p.currentTarget.value.map(v=>this.findEle(v))))}catch{}}};const l=function(p){if(p.name==="beginEdit")return;e=e.slice(0,n+1);const v=t.getData(),b={prev:r,operation:p.name,currentSelected:o.map(g=>g.id),currentTarget:S7(p),next:v};e.push(b),r=v,n=e.length-1},h=function(p){(p.metaKey||p.ctrlKey)&&(p.shiftKey&&p.key==="Z"||p.key==="y")?t.redo():(p.metaKey||p.ctrlKey)&&p.key==="z"&&t.undo()},c=function(p){o=t.currentNodes.map(v=>v.nodeObj)};return t.bus.addListener("operation",l),t.bus.addListener("selectNodes",c),t.container.addEventListener("keydown",h),()=>{t.bus.removeListener("operation",l),t.bus.removeListener("selectNodes",c),t.container.removeEventListener("keydown",h)}}const T7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>',A7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>',M7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>',C7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>',L7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>',_7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>',N7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>',D7='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 128H128c-35.3 0-64 28.7-64 64v640c0 35.3 28.7 64 64 64h768c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zM832 832H192V192h640v640z" p-id="2481"></path><path d="M192 256h640v64H192v-64zM192 384h640v64H192v-64zM192 512h640v64H192v-64zM192 640h448v64H192v-64zM192 768h320v64H192v-64z" p-id="2482"></path></svg>',R7=t=>async e=>{var n;try{const r=`${((n=e.nodeData)==null?void 0:n.topic)||"思维导图"}_${new Date().toISOString().slice(0,10)}`,o=`
|
||
.topic { font-family: Arial, sans-serif; font-size: 14px; color: #333; }
|
||
.markdown-content { font-size: 12px; line-height: 1.3; }
|
||
|
||
/* 表格样式 */
|
||
.markdown-table {
|
||
border-collapse: collapse;
|
||
width: 100%;
|
||
margin: 4px 0;
|
||
font-size: 11px;
|
||
border: 1px solid #e0e0e0;
|
||
border-radius: 6px;
|
||
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
|
||
background-color: #fafafa;
|
||
overflow: hidden;
|
||
white-space: normal;
|
||
}
|
||
|
||
.markdown-table th,
|
||
.markdown-table td {
|
||
border: 1px solid #e0e0e0;
|
||
padding: 8px 12px;
|
||
text-align: left;
|
||
vertical-align: top;
|
||
position: relative;
|
||
white-space: normal;
|
||
}
|
||
|
||
.markdown-table th {
|
||
background-color: #f5f5f5;
|
||
font-weight: 600;
|
||
color: #333;
|
||
text-align: center;
|
||
border-bottom: 1px solid #d0d0d0;
|
||
}
|
||
|
||
.markdown-table td {
|
||
background-color: #fff;
|
||
}
|
||
|
||
.markdown-table tr:nth-child(even) td {
|
||
background-color: #f8f8f8;
|
||
}
|
||
|
||
.markdown-table tr:hover td {
|
||
background-color: #f0f8ff;
|
||
}
|
||
|
||
/* 移除多余的边框,保持简洁 */
|
||
.markdown-table th:not(:last-child),
|
||
.markdown-table td:not(:last-child) {
|
||
border-right: 1px solid #e0e0e0;
|
||
}
|
||
|
||
.markdown-table tr:not(:last-child) td {
|
||
border-bottom: 1px solid #e0e0e0;
|
||
}
|
||
`,l=await e.exportSvg(!0,o);if(!l)return;const h=URL.createObjectURL(l),c=document.createElement("a");c.href=h,c.download=`${r}.${t}`,c.click(),URL.revokeObjectURL(h)}catch{alert(`导出${t.toUpperCase()}失败,请重试`)}},I7={side:T7,left:A7,right:M7,full:C7,living:L7,zoomin:_7,zoomout:N7,exportSvg:D7},Za=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=I7[e],n};function O7(t){try{const e=document.createElement("div"),n=Za("fullscreen","full"),r=Za("toCenter","living"),o=Za("zoomout","zoomout"),l=Za("zoomin","zoomin"),h=Za("exportSvg","exportSvg");h.title="导出SVG矢量图";const c=document.createElement("span");return c.innerText="100%",e.appendChild(n),e.appendChild(r),e.appendChild(o),e.appendChild(l),e.appendChild(h),e.className="mind-elixir-toolbar rb",n.onclick=()=>{document.fullscreenElement===t.el?(document.exitFullscreen(),setTimeout(()=>{t.el.focus()},100)):(t.el.requestFullscreen(),setTimeout(()=>{},100))},r.onclick=()=>{t.toCenter()},o.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},l.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},h.onclick=()=>{R7("svg")(t)},setTimeout(()=>{const p=document.getElementById("exportSvg")},1e3),e}catch{const e=document.createElement("div");return e.className="mind-elixir-toolbar rb",e}}function H7(t){const e=document.createElement("div"),n=Za("tbltl","left"),r=Za("tbltr","right"),o=Za("tblts","side");return e.appendChild(n),e.appendChild(r),e.appendChild(o),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},r.onclick=()=>{t.initRight()},o.onclick=()=>{t.initSide()},e}function P7(t){try{if(!t.container)return;const e=O7(t),n=H7(t);t.container.append(e),t.container.append(n)}catch{}}/*! @viselect/vanilla v3.9.0 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */let z7=class{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(t,e){const n=this._listeners.get(t)??new Set;return this._listeners.set(t,n),n.add(e),this}removeEventListener(t,e){var n;return(n=this._listeners.get(t))==null||n.delete(e),this}dispatchEvent(t,...e){let n=!0;for(const r of this._listeners.get(t)??[])n=r(...e)!==!1&&n;return n}unbindAllListeners(){this._listeners.clear()}};const um=(t,e="px")=>typeof t=="number"?t+e:t,qa=({style:t},e,n)=>{if(typeof e=="object")for(const[r,o]of Object.entries(e))o!==void 0&&(t[r]=um(o));else n!==void 0&&(t[e]=um(n))},dm=(t=0,e=0,n=0,r=0)=>{const o={x:t,y:e,width:n,height:r,top:e,left:t,right:t+n,bottom:e+r};return{...o,toJSON:()=>JSON.stringify(o)}},B7=t=>{let e,n=-1,r=!1;return{next:(...o)=>{e=o,r||(r=!0,n=requestAnimationFrame(()=>{t(...e),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},hm=(t,e,n="touch")=>{switch(n){case"center":{const r=e.left+e.width/2,o=e.top+e.height/2;return r>=t.left&&r<=t.right&&o>=t.top&&o<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},F7=()=>matchMedia("(hover: none), (pointer: coarse)").matches,q7=()=>"safari"in window,Kh=t=>Array.isArray(t)?t:[t],Hv=t=>(e,n,r,o={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),n=Kh(n),e=Kh(e);for(const l of e)if(l)for(const h of n)l[t](h,r,{capture:!1,...o})},ja=Hv("addEventListener"),xi=Hv("removeEventListener"),o0=t=>{var e;const{clientX:n,clientY:r,target:o}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:r,target:o}},es=(t,e=document)=>Kh(t).map(n=>typeof n=="string"?Array.from(e.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),j7=(t,e)=>e.some(n=>typeof n=="number"?t.button===n:typeof n=="object"?n.button!==t.button?!1:n.modifiers.every(r=>{switch(r){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:Lo,max:pm,min:fm,ceil:mm}=Math,gm=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Pv=class extends z7{constructor(t){var e,n,r,o,l;super(),this._selection=gm(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=dm(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...t,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...t.behaviour,startThreshold:(e=t.behaviour)!=null&&e.startThreshold?typeof t.behaviour.startThreshold=="number"?t.behaviour.startThreshold:{x:10,y:10,...t.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(n=t.behaviour)==null?void 0:n.scrolling,startScrollMargins:{x:0,y:0,...(o=(r=t.behaviour)==null?void 0:r.scrolling)==null?void 0:o.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...t.features,singleTap:{allow:!0,intersect:"native",...(l=t.features)==null?void 0:l.singleTap}}};for(const v of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[v]=="function"&&(this[v]=this[v].bind(this));const{document:h,selectionAreaClass:c,selectionContainerClass:p}=this._options;this._area=h.createElement("div"),this._clippingElement=h.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(c),p&&this._clippingElement.classList.add(p),qa(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),qa(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=B7(v=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",v),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(t=!0){const{document:e,features:n}=this._options,r=t?ja:xi;r(e,"mousedown",this._onTapStart),n.touch&&r(e,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,e=!1){const{x:n,y:r,target:o}=o0(t),{document:l,startAreas:h,boundaries:c,features:p,behaviour:v}=this._options,b=o.getBoundingClientRect();if(t instanceof MouseEvent&&!j7(t,v.triggers))return;const g=es(h,l),m=es(c,l);this._targetElement=m.find(k=>hm(k.getBoundingClientRect(),b));const x=t.composedPath(),w=g.find(k=>x.includes(k));if(this._targetBoundary=m.find(k=>x.includes(k)),!this._targetElement||!w||!this._targetBoundary||!e&&this._emitEvent("beforestart",t)===!1)return;this._areaLocation={x1:n,y1:r,x2:0,y2:0};const S=l.scrollingElement??l.body;this._scrollDelta={x:S.scrollLeft,y:S.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),ja(l,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),ja(l,["mouseup","touchcancel","touchend"],this._onTapStop),ja(l,"scroll",this._onScroll),p.deselectOnBlur&&(this._targetBoundaryScrolled=!1,ja(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:e},range:n}=this._options.features,r=o0(t);let o;if(e==="native")o=r.target;else if(e==="touch"){this.resolveSelectables();const{x:h,y:c}=r;o=this._selectables.find(p=>{const{right:v,left:b,top:g,bottom:m}=p.getBoundingClientRect();return h<v&&h>b&&c<m&&c>g})}if(!o)return;for(this.resolveSelectables();!this._selectables.includes(o);)if(o.parentElement)o=o.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:l}=this._selection;if(this._emitEvent("start",t),t.shiftKey&&n&&this._latestElement){const h=this._latestElement,[c,p]=h.compareDocumentPosition(o)&4?[o,h]:[h,o],v=[...this._selectables.filter(b=>b.compareDocumentPosition(c)&4&&b.compareDocumentPosition(p)&2),c,p];this.select(v),this._latestElement=h}else l.includes(o)&&(l.length===1||t.ctrlKey||l.every(h=>this._selection.stored.includes(h)))?this.deselect(o):(this.select(o),this._latestElement=o)}_delayedTapMove(t){const{container:e,document:n,behaviour:{startThreshold:r}}=this._options,{x1:o,y1:l}=this._areaLocation,{x:h,y:c}=o0(t);if(typeof r=="number"&&Lo(h+c-(o+l))>=r||typeof r=="object"&&Lo(h-o)>=r.x||Lo(c-l)>=r.y){if(xi(n,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){xi(n,["mouseup","touchcancel","touchend"],this._onTapStop);return}ja(n,["mousemove","touchmove"],this._onTapMove,{passive:!1}),qa(this._area,"display","block"),es(e,n)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(ja(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),ja(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(p=>this._targetElement.contains(p))),this._setupSelectionArea(),this._emitEvent("start",t),this._onTapMove(t)}this._handleMoveEvent(t)}_setupSelectionArea(){const{_clippingElement:t,_targetElement:e,_area:n}=this,r=this._targetRect=e.getBoundingClientRect();this._scrollAvailable?(qa(t,{top:r.top,left:r.left,width:r.width,height:r.height}),qa(n,{marginTop:-r.top,marginLeft:-r.left})):(qa(t,{top:0,left:0,width:"100%",height:"100%"}),qa(n,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:e,_areaLocation:n,_options:r,_frame:o}=this,{speedDivider:l}=r.behaviour.scrolling,h=this._targetElement,{x:c,y:p}=o0(t);if(n.x2=c,n.y2=p,this._lastMousePosition.x=c,this._lastMousePosition.y=p,this._scrollAvailable&&!this._scrollingActive&&(e.y||e.x)){this._scrollingActive=!0;const v=()=>{if(!e.x&&!e.y){this._scrollingActive=!1;return}const{scrollTop:b,scrollLeft:g}=h;e.y&&(h.scrollTop+=mm(e.y/l),n.y1-=h.scrollTop-b),e.x&&(h.scrollLeft+=mm(e.x/l),n.x1-=h.scrollLeft-g),o.next(t),requestAnimationFrame(v)};requestAnimationFrame(v)}else o.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:e}=this._options;(e.touch&&F7()||this._scrollAvailable&&q7())&&t.preventDefault()}_onScroll(){const{_scrollDelta:t,_options:{document:e}}=this,{scrollTop:n,scrollLeft:r}=e.scrollingElement??e.body;this._areaLocation.x1+=t.x-r,this._areaLocation.y1+=t.y-n,t.x=r,t.y=n,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,xi(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,n=t.deltaY?t.deltaY>0?1:-1:0,r=t.deltaX?t.deltaX>0?1:-1:0;this._scrollSpeed.y+=n*e,this._scrollSpeed.x+=r*e,this._onTapMove(t),t.preventDefault()}_keyboardScroll(t){const{manualSpeed:e}=this._options.behaviour.scrolling,n=t.key==="ArrowLeft"?-1:t.key==="ArrowRight"?1:0,r=t.key==="ArrowUp"?-1:t.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(n)*e,this._scrollSpeed.y+=Math.sign(r)*e,t.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:t,_areaLocation:e,_targetElement:n,_options:r}=this,{scrollTop:o,scrollHeight:l,clientHeight:h,scrollLeft:c,scrollWidth:p,clientWidth:v}=n,b=this._targetRect,{x1:g,y1:m}=e;let{x2:x,y2:w}=e;const{behaviour:{scrolling:{startScrollMargins:S}}}=r;x<b.left+S.x?(t.x=c?-Lo(b.left-x+S.x):0,x=x<b.left?b.left:x):x>b.right-S.x?(t.x=p-c-v?Lo(b.left+b.width-x-S.x):0,x=x>b.right?b.right:x):t.x=0,w<b.top+S.y?(t.y=o?-Lo(b.top-w+S.y):0,w=w<b.top?b.top:w):w>b.bottom-S.y?(t.y=l-o-h?Lo(b.top+b.height-w-S.y):0,w=w>b.bottom?b.bottom:w):t.y=0;const k=fm(g,x),C=fm(m,w),T=pm(g,x),A=pm(m,w);this._areaRect=dm(k,C,T-k,A-C)}_redrawSelectionArea(){const{x:t,y:e,width:n,height:r}=this._areaRect,{style:o}=this._area;o.left=`${t}px`,o.top=`${e}px`,o.width=`${n}px`,o.height=`${r}px`}_onTapStop(t,e){var n;const{document:r,features:o}=this._options,{_singleClick:l}=this;xi(this._targetElement,"scroll",this._onStartAreaScroll),xi(r,["mousemove","touchmove"],this._delayedTapMove),xi(r,["touchmove","mousemove"],this._onTapMove),xi(r,["mouseup","touchcancel","touchend"],this._onTapStop),xi(r,"scroll",this._onScroll),this._keepSelection(),t&&l&&o.singleTap.allow?this._onSingleTap(t):!l&&!e&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,xi(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),xi(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(n=this._frame)==null||n.cancel(),qa(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:e,_selection:n,_areaRect:r}=this,{stored:o,selected:l,touched:h}=n,{intersect:c,overlap:p}=e.behaviour,v=p==="invert",b=[],g=[],m=[];for(let w=0;w<t.length;w++){const S=t[w];if(hm(r,S.getBoundingClientRect(),c)){if(l.includes(S))o.includes(S)&&!h.includes(S)&&h.push(S);else if(v&&o.includes(S)){m.push(S);continue}else g.push(S);b.push(S)}}v&&g.push(...o.filter(w=>!l.includes(w)));const x=p==="keep";for(let w=0;w<l.length;w++){const S=l[w];!b.includes(S)&&!(x&&o.includes(S))&&m.push(S)}n.selected=b,n.changed={added:g,removed:m},this._latestElement=void 0}_emitEvent(t,e){return this.emit(t,{event:e,store:this._selection,selection:this})}_keepSelection(){const{_options:t,_selection:e}=this,{selected:n,changed:r,touched:o,stored:l}=e,h=n.filter(c=>!l.includes(c));switch(t.behaviour.overlap){case"drop":{e.stored=[...h,...l.filter(c=>!o.includes(c))];break}case"invert":{e.stored=[...h,...l.filter(c=>!r.removed.includes(c))];break}case"keep":{e.stored=[...l,...n.filter(c=>!l.includes(c))];break}}}trigger(t,e=!0){this._onTapStart(t,e)}resolveSelectables(){this._selectables=es(this._options.selectables,this._options.document)}clearSelection(t=!0,e=!1){const{selected:n,stored:r,changed:o}=this._selection;o.added=[],o.removed.push(...n,...t?r:[]),e||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=gm(t?[]:r)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(t){Object.assign(this._areaLocation,t),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(t=!1){this._onTapStop(null,!t)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(t,e=!1){const{changed:n,selected:r,stored:o}=this._selection,l=es(t,this._options.document).filter(h=>!r.includes(h)&&!o.includes(h));return o.push(...l),r.push(...l),n.added.push(...l),n.removed=[],this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null)),l}deselect(t,e=!1){const{selected:n,stored:r,changed:o}=this._selection,l=es(t,this._options.document).filter(h=>n.includes(h)||r.includes(h));this._selection.stored=r.filter(h=>!l.includes(h)),this._selection.selected=n.filter(h=>!l.includes(h)),this._selection.changed.added=[],this._selection.changed.removed.push(...l.filter(h=>!o.removed.includes(h))),this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Pv.version="3.9.0";let $7=Pv;function U7(t){const e=t.mouseSelectionButton===2?[2]:[0],n=new $7({selectables:[".map-container me-tpc"],boundaries:[t.container],container:t.selectionContainer,features:{touch:!1},behaviour:{triggers:e,scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:10,y:10}}}}).on("beforestart",({event:r})=>{var o;const l=r.target;if(l.id==="input-box"||l.className==="circle"||(o=t.container.querySelector(".context-menu"))!=null&&o.contains(l))return!1;if(!r.ctrlKey&&!r.metaKey){if(l.tagName==="ME-TPC"&&l.classList.contains("selected"))return!1;t.clearSelection()}const h=n.getSelectionArea();return h.style.background="#4f90f22d",h.style.border="1px solid #4f90f2",h.parentElement&&(h.parentElement.style.zIndex="9999"),!0}).on("move",({store:{changed:{added:r,removed:o}}})=>{if(r.length>0||o.length>0,r.length>0){for(const l of r)l.className="selected";t.currentNodes=[...t.currentNodes,...r],t.bus.fire("selectNodes",r.map(l=>l.nodeObj))}if(o.length>0){for(const l of o)l.classList.remove("selected");t.currentNodes=t.currentNodes.filter(l=>!(o!=null&&o.includes(l))),t.bus.fire("unselectNodes",o.map(l=>l.nodeObj))}});t.selection=n}const V7=function(t,e=!0){this.theme=t;const n={...(t.type==="dark"?Xp:Kp).cssVar,...t.cssVar},r=Object.keys(n);for(let o=0;o<r.length;o++){const l=r[o];this.container.style.setProperty(l,n[l])}e&&this.refresh()},ys=t=>{var e;const n=(e=t.parent)==null?void 0:e.children,r=(n==null?void 0:n.indexOf(t))??0;return{siblings:n,index:r}};function W7(t){const{siblings:e,index:n}=ys(t);if(e===void 0)return;const r=e[n];n===0?(e[n]=e[e.length-1],e[e.length-1]=r):(e[n]=e[n-1],e[n-1]=r)}function G7(t){const{siblings:e,index:n}=ys(t);if(e===void 0)return;const r=e[n];n===e.length-1?(e[n]=e[0],e[0]=r):(e[n]=e[n+1],e[n+1]=r)}function zv(t){const{siblings:e,index:n}=ys(t);return e===void 0?0:(e.splice(n,1),e.length)}function K7(t,e,n){const{siblings:r,index:o}=ys(n);r!==void 0&&(e==="before"?r.splice(o,0,t):r.splice(o+1,0,t))}function X7(t,e){const{siblings:n,index:r}=ys(t);n!==void 0&&(n[r]=e,e.children=[t])}function Bv(t,e,n){var r;if(zv(e),(r=n.parent)!=null&&r.parent||(e.direction=n.direction),t==="in")n.children?n.children.push(e):n.children=[e];else{e.direction!==void 0&&(e.direction=n.direction);const{siblings:o,index:l}=ys(n);if(o===void 0)return;t==="before"?o.splice(l,0,e):o.splice(l+1,0,e)}}const Z7=function({map:t,direction:e},n){var r,o;if(e===0)return 0;if(e===1)return 1;if(e===2){const l=((r=t.querySelector(".lhs"))==null?void 0:r.childElementCount)||0,h=((o=t.querySelector(".rhs"))==null?void 0:o.childElementCount)||0;return l<=h?(n.direction=0,0):(n.direction=1,1)}},Fv=function(t,e,n){var r,o;const l=n.children[0].children[0],h=e.parentElement;if(h.tagName==="ME-PARENT"){if(Ul(l),h.children[1])h.nextSibling.appendChild(n);else{const c=t.createChildren([n]);h.appendChild(uf(!0)),h.insertAdjacentElement("afterend",c)}t.linkDiv(n.offsetParent)}else h.tagName==="ME-ROOT"&&(Z7(t,l.nodeObj)===0?(r=t.container.querySelector(".lhs"))==null||r.appendChild(n):(o=t.container.querySelector(".rhs"))==null||o.appendChild(n),t.linkDiv())},Y7=function(t,e){const n=t.parentNode;if(e===0){const r=n.parentNode.parentNode;r.tagName!=="ME-MAIN"&&(r.previousSibling.children[1].remove(),r.remove())}n.parentNode.remove()},qv={before:"beforebegin",after:"afterend"},Ul=function(t){const e=t.parentElement.parentElement.lastElementChild;(e==null?void 0:e.tagName)==="svg"&&(e==null||e.remove())},J7=function(t,e){const n=t.nodeObj,r=Yp(n);r.style&&e.style&&(e.style=Object.assign(r.style,e.style));const o=Object.assign(n,e);qc.call(this,t,o),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:o,origin:r})},df=function(t,e,n){if(!e)return null;const r=e.nodeObj;r.expanded===!1&&(t.expandNode(e,!0),e=t.findEle(r.id));const o=n||t.generateNewObj();r.children?r.children.push(o):r.children=[o],ho(t.nodeData);const{grp:l,top:h}=t.createWrapper(o);return Fv(t,e,l),{newTop:h,newNodeObj:o}},Q7=function(t,e,n){var r,o,l,h;const c=e||this.currentNode;if(!c)return;const p=c.nodeObj;if(p.parent){if(!((r=p.parent)!=null&&r.parent)&&((l=(o=p.parent)==null?void 0:o.children)==null?void 0:l.length)===1&&this.direction===2){this.addChild(this.findEle(p.parent.id),n);return}}else{this.addChild();return}const v=n||this.generateNewObj();if(!((h=p.parent)!=null&&h.parent)){const x=c.closest("me-main").className===ci.LHS?0:1;v.direction=x}K7(v,t,p),ho(this.nodeData);const b=c.parentElement,{grp:g,top:m}=this.createWrapper(v);b.parentElement.insertAdjacentElement(qv[t],g),this.linkDiv(g.offsetParent),n||this.editTopic(m.firstChild),this.bus.fire("operation",{name:"insertSibling",type:t,obj:v}),this.selectNode(m.firstChild,!0)},e8=function(t,e){const n=t||this.currentNode;if(!n)return;Ul(n);const r=n.nodeObj;if(!r.parent)return;const o=e||this.generateNewObj();X7(r,o),ho(this.nodeData);const l=n.parentElement.parentElement,{grp:h,top:c}=this.createWrapper(o,!0);c.appendChild(uf(!0)),l.insertAdjacentElement("afterend",h);const p=this.createChildren([l]);c.insertAdjacentElement("afterend",p),this.linkDiv(),e||this.editTopic(c.firstChild),this.selectNode(c.firstChild,!0),this.bus.fire("operation",{name:"insertParent",obj:o})},t8=function(t,e){const n=t||this.currentNode;if(!n)return;const r=df(this,n,e);if(!r)return;const{newTop:o,newNodeObj:l}=r;this.bus.fire("operation",{name:"addChild",obj:l}),e||this.editTopic(o.firstChild),this.selectNode(o.firstChild,!0)},n8=function(t,e){const n=Yp(t.nodeObj);Zp(n);const r=df(this,e,n);if(!r)return;const{newNodeObj:o}=r;this.selectNode(this.findEle(o.id)),this.bus.fire("operation",{name:"copyNode",obj:o})},r8=function(t,e){t=zc(t);const n=[];for(let r=0;r<t.length;r++){const o=t[r],l=Yp(o.nodeObj);Zp(l);const h=df(this,e,l);if(!h)return;const{newNodeObj:c}=h;n.push(c)}this.unselectNodes(this.currentNodes),this.selectNodes(n.map(r=>this.findEle(r.id))),this.bus.fire("operation",{name:"copyNodes",objs:n})},i8=function(t){const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;W7(n);const r=e.parentNode.parentNode;r.parentNode.insertBefore(r,r.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:n})},a8=function(t){const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;G7(n);const r=e.parentNode.parentNode;r.nextSibling?r.nextSibling.insertAdjacentElement("afterend",r):r.parentNode.prepend(r),this.linkDiv(),this.bus.fire("operation",{name:"moveDownNode",obj:n})},o8=function(t){if(t.length===0)return;t=zc(t);for(const n of t){const r=n.nodeObj,o=zv(r);Y7(n,o)}const e=t[t.length-1];this.selectNode(this.findEle(e.nodeObj.parent.id)),this.linkDiv(),this.bus.fire("operation",{name:"removeNodes",objs:t.map(n=>n.nodeObj)})},s8=function(t,e){t=zc(t);const n=e.nodeObj;n.expanded===!1&&(this.expandNode(e,!0),e=this.findEle(n.id));for(const r of t){const o=r.nodeObj;Bv("in",o,n),ho(this.nodeData);const l=r.parentElement;Fv(this,e,l.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:t.map(r=>r.nodeObj),toObj:n})},jv=(t,e,n,r)=>{t=zc(t),e==="after"&&(t=t.reverse());const o=n.nodeObj,l=[];for(const h of t){const c=h.nodeObj;Bv(e,c,o),ho(r.nodeData),Ul(h);const p=h.parentElement.parentNode;l.includes(p.parentElement)||l.push(p.parentElement),n.parentElement.parentNode.insertAdjacentElement(qv[e],p)}for(const h of l)h.childElementCount===0&&h.tagName!=="ME-MAIN"&&(h.previousSibling.children[1].remove(),h.remove());r.linkDiv(),r.bus.fire("operation",{name:e==="before"?"moveNodeBefore":"moveNodeAfter",objs:t.map(h=>h.nodeObj),toObj:o})},l8=function(t,e){jv(t,"before",e,this)},c8=function(t,e){jv(t,"after",e,this)},u8=function(t){const e=t||this.currentNode;if(e){if(e.nodeObj.dangerouslySetInnerHTML){if(e.innerHTML.includes("<table")){this.editTableNode(e);return}return}this.editTopic(e)}},d8=function(t,e){t.text.textContent=e,t.nodeObj.topic=e,this.linkDiv()},$v=Object.freeze(Object.defineProperty({__proto__:null,addChild:t8,beginEdit:u8,copyNode:n8,copyNodes:r8,insertParent:e8,insertSibling:Q7,moveDownNode:a8,moveNodeAfter:c8,moveNodeBefore:l8,moveNodeIn:s8,moveUpNode:i8,removeNodes:o8,reshapeNode:J7,rmSubline:Ul,setNodeTopic:d8},Symbol.toStringTag,{value:"Module"}));function h8(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const p8=function(t){const e=this.container,n=t.getBoundingClientRect(),r=e.getBoundingClientRect();if(n.top>r.bottom||n.bottom<r.top||n.left>r.right||n.right<r.left){const o=n.left+n.width/2,l=n.top+n.height/2,h=r.left+r.width/2,c=r.top+r.height/2,p=o-h,v=l-c;this.move(-p,-v,!0)}},f8=function(t,e,n){this.clearSelection(),this.scrollIntoView(t),this.selection.select(t),e&&this.bus.fire("selectNewNode",t.nodeObj)},m8=function(t){this.selection.select(t)},g8=function(t){this.selection.deselect(t)},v8=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},b8=function(){const t=h8(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},y8=function(){return JSON.parse(this.getDataString())},w8=function(){this.editable=!0},x8=function(){this.editable=!1},k8=function(t,e={x:0,y:0}){if(t<this.scaleMin||t>this.scaleMax)return;const n=this.container.getBoundingClientRect(),r=e.x?e.x-n.left-n.width/2:0,o=e.y?e.y-n.top-n.height/2:0,{dx:l,dy:h}=Uv(this),c=this.map.style.transform,{x:p,y:v}=yv(c),b=p-l,g=v-h,m=this.scaleVal,x=(-r+b)*(1-t/m),w=(-o+g)*(1-t/m);this.map.style.transform=`translate(${p-x}px, ${v-w}px) scale(${t})`,this.scaleVal=t,this.bus.fire("scale",t)},S8=function(){const t=this.nodes.offsetHeight/this.container.offsetHeight,e=this.nodes.offsetWidth/this.container.offsetWidth,n=1/Math.max(1,Math.max(t,e));this.scaleVal=n,this.map.style.transform="scale("+n+")",this.bus.fire("scale",n)},E8=function(t,e,n=!1){const{map:r,scaleVal:o,bus:l}=this,h=r.style.transform;let{x:c,y:p}=yv(h);c+=t,p+=e,n&&(r.style.transition="transform 0.3s",setTimeout(()=>{r.style.transition="none"},300)),r.style.transform=`translate(${c}px, ${p}px) scale(${o})`,l.fire("move",{dx:t,dy:e})},Uv=t=>{const{container:e,map:n,nodes:r}=t,o=n.querySelector("me-root"),l=o.offsetTop,h=o.offsetLeft,c=o.offsetWidth,p=o.offsetHeight;let v,b;return t.alignment==="root"?(v=e.offsetWidth/2-h-c/2,b=e.offsetHeight/2-l-p/2,n.style.transformOrigin=`${h+c/2}px 50%`):(v=(e.offsetWidth-r.offsetWidth)/2,b=(e.offsetHeight-r.offsetHeight)/2,n.style.transformOrigin="50% 50%"),{dx:v,dy:b}},T8=function(){const{map:t}=this,{dx:e,dy:n}=Uv(this);t.style.transform=`translate(${e}px, ${n}px) scale(${this.scaleVal})`},A8=function(t){t(this)},M8=function(t){t.nodeObj.parent&&(this.clearSelection(),this.tempDirection===null&&(this.tempDirection=this.direction),this.isFocusMode||(this.nodeDataBackup=this.nodeData,this.isFocusMode=!0),this.nodeData=t.nodeObj,this.initRight(),this.toCenter())},C8=function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},L8=function(){this.direction=0,this.refresh(),this.toCenter()},_8=function(){this.direction=1,this.refresh(),this.toCenter()},N8=function(){this.direction=2,this.refresh(),this.toCenter()},D8=function(t){this.locale=t,this.refresh()},R8=function(t,e){const n=t.nodeObj;typeof e=="boolean"?n.expanded=e:n.expanded!==!1?n.expanded=!1:n.expanded=!0;const r=t.getBoundingClientRect(),o={x:r.left,y:r.top},l=t.parentNode,h=l.children[1];if(h.expanded=n.expanded,h.className=n.expanded?"minus":"",Ul(t),n.expanded){const g=this.createChildren(n.children.map(m=>this.createWrapper(m).grp));l.parentNode.appendChild(g)}else l.parentNode.children[1].remove();this.linkDiv(t.closest("me-main > me-wrapper"));const c=t.getBoundingClientRect(),p={x:c.left,y:c.top},v=o.x-p.x,b=o.y-p.y;this.move(v,b),this.bus.fire("expandNode",n)},I8=function(t,e){const n=t.nodeObj,r=t.getBoundingClientRect(),o={x:r.left,y:r.top};hs(n,e??!n.expanded),this.refresh();const l=this.findEle(n.id).getBoundingClientRect(),h={x:l.left,y:l.top},c=o.x-h.x,p=o.y-h.y;this.move(c,p)},O8=function(t){this.clearSelection(),t&&(t=JSON.parse(JSON.stringify(t)),this.nodeData=t.nodeData,this.arrows=t.arrows||[],this.summaries=t.summaries||[],t.theme&&this.changeTheme(t.theme)),ho(this.nodeData),this.layout(),this.linkDiv()},H8=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:C8,clearSelection:v8,disableEdit:x8,enableEdit:w8,expandNode:R8,expandNodeAll:I8,focusNode:M8,getData:y8,getDataString:b8,initLeft:L8,initRight:_8,initSide:N8,install:A8,move:E8,refresh:O8,scale:k8,scaleFit:S8,scrollIntoView:p8,selectNode:f8,selectNodes:m8,setLocale:D8,toCenter:T8,unselectNodes:g8},Symbol.toStringTag,{value:"Module"})),P8=function(t){return{dom:t,moved:!1,pointerdown:!1,lastX:0,lastY:0,handlePointerMove(e){if(this.pointerdown){this.moved=!0;const n=e.clientX-this.lastX,r=e.clientY-this.lastY;this.lastX=e.clientX,this.lastY=e.clientY,this.cb&&this.cb(n,r)}},handlePointerDown(e){e.button===0&&(this.pointerdown=!0,this.lastX=e.clientX,this.lastY=e.clientY,this.dom.setPointerCapture(e.pointerId))},handleClear(e){this.pointerdown=!1,e.pointerId!==void 0&&this.dom.releasePointerCapture(e.pointerId)},cb:null,init(e,n){this.cb=n,this.handleClear=this.handleClear.bind(this),this.handlePointerMove=this.handlePointerMove.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this),this.destroy=Jp([{dom:e,evt:"pointermove",func:this.handlePointerMove},{dom:e,evt:"pointerleave",func:this.handleClear},{dom:e,evt:"pointerup",func:this.handleClear},{dom:this.dom,evt:"pointerdown",func:this.handlePointerDown}])},destroy:null,clear(){this.moved=!1,this.pointerdown=!1}}},vm={create:P8},z8="#4dc4ff";function Vv(t,e,n,r,o,l,h,c){return{x:t/8+n*3/8+o*3/8+h/8,y:e/8+r*3/8+l*3/8+c/8}}function B8(t,e,n){En(t,{x:e+"",y:n+""})}function s0(t,e,n,r,o){En(t,{x1:e+"",y1:n+"",x2:r+"",y2:o+""})}function bm(t,e,n,r,o,l,h,c,p,v){var b;const g=`M ${e} ${n} C ${r} ${o} ${l} ${h} ${c} ${p}`;if(t.line.setAttribute("d",g),v.style){const k=v.style;k.stroke&&t.line.setAttribute("stroke",k.stroke),k.strokeWidth&&t.line.setAttribute("stroke-width",String(k.strokeWidth)),k.strokeDasharray&&t.line.setAttribute("stroke-dasharray",k.strokeDasharray),k.strokeLinecap&&t.line.setAttribute("stroke-linecap",k.strokeLinecap),k.opacity!==void 0&&t.line.setAttribute("opacity",String(k.opacity))}const m=t.querySelectorAll('path[stroke="transparent"]');m.length>0&&m[0].setAttribute("d",g);const x=tc(l,h,c,p);if(x){const k=`M ${x.x1} ${x.y1} L ${c} ${p} L ${x.x2} ${x.y2}`;if(t.arrow1.setAttribute("d",k),m.length>1&&m[1].setAttribute("d",k),v.style){const C=v.style;C.stroke&&t.arrow1.setAttribute("stroke",C.stroke),C.strokeWidth&&t.arrow1.setAttribute("stroke-width",String(C.strokeWidth)),C.strokeLinecap&&t.arrow1.setAttribute("stroke-linecap",C.strokeLinecap),C.opacity!==void 0&&t.arrow1.setAttribute("opacity",String(C.opacity))}}if(v.bidirectional){const k=tc(r,o,e,n);if(k){const C=`M ${k.x1} ${k.y1} L ${e} ${n} L ${k.x2} ${k.y2}`;if(t.arrow2.setAttribute("d",C),m.length>2&&m[2].setAttribute("d",C),v.style){const T=v.style;T.stroke&&t.arrow2.setAttribute("stroke",T.stroke),T.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(T.strokeWidth)),T.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",T.strokeLinecap),T.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(T.opacity))}}}const{x:w,y:S}=Vv(e,n,r,o,l,h,c,p);B8(t.label,w,S),(b=v.style)!=null&&b.labelColor&&t.label.setAttribute("fill",v.style.labelColor),G8(t)}function sc(t,e,n){const{offsetLeft:r,offsetTop:o}=jl(t.nodes,e),l=e.offsetWidth,h=e.offsetHeight,c=r+l/2,p=o+h/2,v=c+n.x,b=p+n.y;return{w:l,h,cx:c,cy:p,ctrlX:v,ctrlY:b}}function os(t){let e,n;const r=(t.cy-t.ctrlY)/(t.ctrlX-t.cx);return r>t.h/t.w||r<-t.h/t.w?t.cy-t.ctrlY<0?(e=t.cx-t.h/2/r,n=t.cy+t.h/2):(e=t.cx+t.h/2/r,n=t.cy-t.h/2):t.cx-t.ctrlX<0?(e=t.cx+t.w/2,n=t.cy-t.w*r/2):(e=t.cx-t.w/2,n=t.cy+t.w*r/2),{x:e,y:n}}const hf=function(t,e,n,r,o){var l;if(!e||!n)return;const h=sc(t,e,r.delta1),c=sc(t,n,r.delta2),{x:p,y:v}=os(h),{ctrlX:b,ctrlY:g}=h,{ctrlX:m,ctrlY:x}=c,{x:w,y:S}=os(c),k=tc(m,x,w,S);if(!k)return;const C=`M ${k.x1} ${k.y1} L ${w} ${S} L ${k.x2} ${k.y2}`;let T="";if(r.bidirectional){const F=tc(b,g,p,v);if(!F)return;T=`M ${F.x1} ${F.y1} L ${p} ${v} L ${F.x2} ${F.y2}`}const A=g7(`M ${p} ${v} C ${b} ${g} ${m} ${x} ${w} ${S}`,C,T,r.style),{x:M,y}=Vv(p,v,b,g,m,x,w,S),N=(l=r.style)==null?void 0:l.labelColor,z=Vh(r.label,M,y,{anchor:"middle",color:N,dataType:"custom-link"});A.appendChild(z),A.label=z,A.arrowObj=r,A.dataset.linkid=r.id,t.linkSvgGroup.appendChild(A),o||(t.arrows.push(r),t.currentArrow=A,Wv(t,r,h,c))},F8=function(t,e,n={}){const r={id:$o(),label:"Custom Link",from:t.nodeObj.id,to:e.nodeObj.id,delta1:{x:t.offsetWidth/2+100,y:0},delta2:{x:e.offsetWidth/2+100,y:0},...n};hf(this,t,e,r),this.bus.fire("operation",{name:"createArrow",obj:r})},q8=function(t){jc(this);const e={...t,id:$o()};hf(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},j8=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;jc(this);const n=e.arrowObj.id;this.arrows=this.arrows.filter(r=>r.id!==n),e.remove(),this.bus.fire("operation",{name:"removeArrow",obj:{id:n}})},$8=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),r=this.findEle(e.to),o=sc(this,n,e.delta1),l=sc(this,r,e.delta2);Wv(this,e,o,l)},U8=function(){jc(this),this.currentArrow=null},Vd=function(t,e){const n=document.createElementNS(oi,"path");return En(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},V8=function(t,e){const n=document.createElementNS(oi,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const r=Vd(t.line.getAttribute("d"),e);n.appendChild(r);const o=Vd(t.arrow1.getAttribute("d"),e);if(n.appendChild(o),t.arrow2.getAttribute("d")){const l=Vd(t.arrow2.getAttribute("d"),e);n.appendChild(l)}t.insertBefore(n,t.firstChild)},W8=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},G8=function(t){const e=t.querySelector(".arrow-highlight");if(!e)return;const n=e.querySelectorAll("path");n.length>=1&&n[0].setAttribute("d",t.line.getAttribute("d")),n.length>=2&&n[1].setAttribute("d",t.arrow1.getAttribute("d")),n.length>=3&&t.arrow2.getAttribute("d")&&n[2].setAttribute("d",t.arrow2.getAttribute("d"))},jc=function(t){var e,n;(e=t.helper1)==null||e.destroy(),(n=t.helper2)==null||n.destroy(),t.linkController.style.display="none",t.P2.style.display="none",t.P3.style.display="none",t.currentArrow&&W8(t.currentArrow)},Wv=function(t,e,n,r){const{linkController:o,P2:l,P3:h,line1:c,line2:p,nodes:v,map:b,currentArrow:g,bus:m}=t;if(!g)return;o.style.display="initial",l.style.display="initial",h.style.display="initial",v.appendChild(o),v.appendChild(l),v.appendChild(h),V8(g,z8);let{x,y:w}=os(n),{ctrlX:S,ctrlY:k}=n,{ctrlX:C,ctrlY:T}=r,{x:A,y:M}=os(r);l.style.cssText=`top:${k}px;left:${S}px;`,h.style.cssText=`top:${T}px;left:${C}px;`,s0(c,x,w,S,k),s0(p,C,T,A,M),t.helper1=vm.create(l),t.helper2=vm.create(h),t.helper1.init(b,(y,N)=>{S=S+y/t.scaleVal,k=k+N/t.scaleVal;const z=os({...n,ctrlX:S,ctrlY:k});x=z.x,w=z.y,l.style.top=k+"px",l.style.left=S+"px",bm(g,x,w,S,k,C,T,A,M,e),s0(c,x,w,S,k),e.delta1.x=S-n.cx,e.delta1.y=k-n.cy,m.fire("updateArrowDelta",e)}),t.helper2.init(b,(y,N)=>{C=C+y/t.scaleVal,T=T+N/t.scaleVal;const z=os({...r,ctrlX:C,ctrlY:T});A=z.x,M=z.y,h.style.top=T+"px",h.style.left=C+"px",bm(g,x,w,S,k,C,T,A,M,e),s0(p,C,T,A,M),e.delta2.x=C-r.cx,e.delta2.y=T-r.cy,m.fire("updateArrowDelta",e)})};function K8(){this.linkSvgGroup.innerHTML="";for(let t=0;t<this.arrows.length;t++){const e=this.arrows[t];try{hf(this,this.findEle(e.from),this.findEle(e.to),e,!0)}catch{}}this.nodes.appendChild(this.linkSvgGroup)}function X8(t){if(jc(this),!t)return;const e=t.label;Iv(this,e,t.arrowObj)}function Z8(){this.arrows=this.arrows.filter(t=>ec(t.from,this.nodeData)&&ec(t.to,this.nodeData))}const Y8=Object.freeze(Object.defineProperty({__proto__:null,createArrow:F8,createArrowFrom:q8,editArrowLabel:X8,removeArrow:j8,renderArrow:K8,selectArrow:$8,tidyArrow:Z8,unselectArrow:U8},Symbol.toStringTag,{value:"Module"})),J8=function(t){var e,n;if(t.length===0)throw new Error("No selected node.");if(t.length===1){const b=t[0].nodeObj,g=t[0].nodeObj.parent;if(!g)throw new Error("Can not select root node.");const m=g.children.findIndex(x=>b===x);return{parent:g.id,start:m,end:m}}let r=0;const o=t.map(b=>{let g=b.nodeObj;const m=[];for(;g.parent;){const x=g.parent,w=x.children,S=w==null?void 0:w.indexOf(g);g=x,m.unshift({node:g,index:S})}return m.length>r&&(r=m.length),m});let l=0;e:for(;l<r;l++){const b=(e=o[0][l])==null?void 0:e.node;for(let g=1;g<o.length;g++)if(((n=o[g][l])==null?void 0:n.node)!==b)break e}if(!l)throw new Error("Can not select root node.");const h=o.map(b=>b[l-1].index).sort(),c=h[0]||0,p=h[h.length-1]||0,v=o[0][l-1].node;if(!v.parent)throw new Error("Please select nodes in the same main topic.");return{parent:v.id,start:c,end:p}},Q8=function(t){const e=document.createElementNS(oi,"g");return e.setAttribute("id",t),e},ym=function(t,e){const n=document.createElementNS(oi,"path");return En(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},ew=t=>t.parentElement.parentElement,tw=function(t,{parent:e,start:n}){const r=t.findEle(e),o=r.nodeObj;let l;return o.parent?l=r.closest("me-main").className:l=t.findEle(o.children[n].id).closest("me-main").className,l},pf=function(t,e){var n;const{id:r,label:o,parent:l,start:h,end:c}=e,{nodes:p,theme:v,summarySvg:b}=t,g=t.findEle(l).nodeObj,m=tw(t,e);let x=1/0,w=0,S=0,k=0;for(let F=h;F<=c;F++){const P=(n=g.children)==null?void 0:n[F];if(!P)return t.removeSummary(r),null;const Y=ew(t.findEle(P.id)),{offsetLeft:te,offsetTop:de}=jl(p,Y),Ce=h===c?10:20;F===h&&(S=de+Ce),F===c&&(k=de+Y.offsetHeight-Ce),te<x&&(x=te),Y.offsetWidth+te>w&&(w=Y.offsetWidth+te)}let C,T;const A=S+10,M=k+10,y=(A+M)/2,N=v.cssVar["--color"];m===ci.LHS?(C=ym(`M ${x+10} ${A} c -5 0 -10 5 -10 10 L ${x} ${M-10} c 0 5 5 10 10 10 M ${x} ${y} h -10`,N),T=Vh(o,x-20,y+6,{anchor:"end",color:N})):(C=ym(`M ${w-10} ${A} c 5 0 10 5 10 10 L ${w} ${M-10} c 0 5 -5 10 -10 10 M ${w} ${y} h 10`,N),T=Vh(o,w+20,y+6,{anchor:"start",color:N}));const z=Q8("s-"+r);return z.appendChild(C),z.appendChild(T),z.summaryObj=e,b.appendChild(z),z},nw=function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:n}=this,{parent:r,start:o,end:l}=J8(t),h={id:$o(),parent:r,start:o,end:l,label:"summary"},c=pf(this,h);e.push(h),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:h})},rw=function(t){const e=$o(),n={...t,id:e};pf(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},iw=function(t){var e;const n=this.summaries.findIndex(r=>r.id===t);n>-1&&(this.summaries.splice(n,1),(e=document.querySelector("#s-"+t))==null||e.remove()),this.bus.fire("operation",{name:"removeSummary",obj:{id:t}})},aw=function(t){const e=t.children[1].getBBox(),n=6,r=3,o=document.createElementNS(oi,"rect");En(o,{x:e.x-n+"",y:e.y-n+"",width:e.width+n*2+"",height:e.height+n*2+"",rx:r+"",stroke:this.theme.cssVar["--selected"]||"#4dc4ff","stroke-width":"2",fill:"none"}),t.appendChild(o),this.currentSummary=t},ow=function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null},sw=function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{pf(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},lw=function(t){if(!t)return;const e=t.childNodes[1];Iv(this,e,t.summaryObj)},cw=Object.freeze(Object.defineProperty({__proto__:null,createSummary:nw,createSummaryFrom:rw,editSummary:lw,removeSummary:iw,renderSummary:sw,selectSummary:aw,unselectSummary:ow},Symbol.toStringTag,{value:"Module"})),Jn="http://www.w3.org/2000/svg";function uw(t,e){const n=document.createElementNS(Jn,"svg");return En(n,{version:"1.1",xmlns:Jn,height:t,width:e}),n}function Gv(t,e,n,r){const o=document.createElementNS(Jn,"g");let l="";t.text?l=t.text.textContent:l=t.childNodes[0].textContent;const h=l.split(`
|
||
`),c=parseFloat(e.lineHeight)||parseFloat(e.fontSize)*1.2,p=parseFloat(e.fontSize),v=parseInt(e.paddingTop)||8,b=parseInt(e.paddingLeft)||8,g=t.offsetWidth||200,m=n+b,x=(h.length-1)*c+p+v+(parseInt(e.paddingBottom)||8),w=t.offsetHeight||100,S=Math.min(x,w),k=document.createElementNS(Jn,"rect");return En(k,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:g+"px",height:S+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),o.appendChild(k),h.forEach((C,T)=>{const A=document.createElementNS(Jn,"text");En(A,{x:m+"",y:r+v+p+c*T+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),A.innerHTML=C,o.appendChild(A)}),o}function wm(t){if(!t)return t;let e=t.replace(/<td[^>]*>([^<]*)<br\s*\/?>([^<]*)<\/td>/gi,(n,r,o)=>`<td>${r} ${o}</td>`);return e=e.replace(/<th[^>]*>([^<]*)<br\s*\/?>([^<]*)<\/th>/gi,(n,r,o)=>`<th>${r} ${o}</th>`),e=e.replace(/<br\s*\/?>/gi," "),e=e.replace(/•\s*【/g,"【"),e=e.replace(/•\s*\[/g,"["),e=e.replace(/•\s*(/g,"("),e=e.replace(/•\s*\(/g,"("),e=e.replace(/<([^>]+)>/g,(n,r)=>{const o=["br","hr","img","input","meta","link"],l=r.split(" ")[0].toLowerCase();return o.includes(l)?`<${r} />`:n}),e}function Wd(t,e,n,r,o=!1){const l=document.createElementNS(Jn,"g");o||l.setAttribute("transform",`translate(${n}, ${r})`);const h=t;let c="";h.nodeObj&&h.nodeObj.dangerouslySetInnerHTML?c=h.nodeObj.dangerouslySetInnerHTML:h.text&&h.text.innerHTML&&(c=h.text.innerHTML);const p=c&&c!==t.textContent,v=c&&c.includes("<table");if(v){const b=t.offsetWidth||400,g=t.offsetHeight||200,m=document.createElementNS(Jn,"rect");En(m,{x:n+"",y:r+"",width:b+"",height:g+"",fill:"white",stroke:"#ccc","stroke-width":"1"}),l.appendChild(m);const x=document.createElementNS(Jn,"foreignObject");En(x,{x:o?n+"":"0",y:o?r+"":"0",width:b+"",height:g+""});const w=`
|
||
<div xmlns="http://www.w3.org/1999/xhtml" style="
|
||
width: 100%;
|
||
height: 100%;
|
||
padding: 8px;
|
||
box-sizing: border-box;
|
||
overflow: hidden;
|
||
font-family: '${(e.fontFamily||"Arial, sans-serif").replace(/"/g,""")}';
|
||
font-size: ${e.fontSize||"14px"};
|
||
line-height: 1.4;
|
||
">
|
||
${wm(c)}
|
||
</div>
|
||
`;return x.innerHTML=w,l.appendChild(x),l}if(p&&!v){const b=wm(c),g=t.getBoundingClientRect(),m=g.width,x=g.height;b.includes("<img"),h.nodeObj&&h.nodeObj.image;try{const N=document.createElement("div");N.innerHTML=b,N.style.cssText=`
|
||
position: absolute;
|
||
top: -9999px;
|
||
left: -9999px;
|
||
width: ${m}px;
|
||
font-family: '${(e.fontFamily||"Arial").replace(/"/g,""")}';
|
||
font-size: ${e.fontSize};
|
||
color: ${e.color};
|
||
`,document.body.appendChild(N);const z=(N.textContent||N.innerText||"").split(`
|
||
`).filter(F=>F.trim());if(z.length>0){const F=parseFloat(e.fontSize)||14,P=F*1.4,Y=parseInt(e.paddingTop)||8,te=parseInt(e.paddingBottom)||8,de=parseInt(e.paddingLeft)||8,Ce=(z.length-1)*P+F+Y+te,qe=Math.min(Ce,x),Ge=b.includes("<img"),nt=Ge?n+m/2:n+de,je=r+F+Y;z.forEach((tt,lt)=>{const Qe=document.createElementNS(Jn,"text");En(Qe,{x:nt+"",y:je+P*lt+"","text-anchor":Ge?"middle":"start","font-family":e.fontFamily,"font-size":e.fontSize,"font-weight":e.fontWeight,fill:e.color}),Qe.innerHTML=tt.trim(),l.appendChild(Qe)});const Ne=document.createElementNS(Jn,"rect");return En(Ne,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:m+"px",height:qe+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),l.insertBefore(Ne,l.firstChild),document.body.removeChild(N),l}document.body.removeChild(N)}catch{}const w=document.createElementNS(Jn,"foreignObject");En(w,{x:n+"",y:r+"",width:m+"px",height:x+"px"});const S=document.createElement("div");S.innerHTML=b;const k=15,C=15,T=parseInt(e.paddingLeft)||8,A=parseInt(e.paddingRight)||8;S.style.cssText=`
|
||
width: 100%;
|
||
height: 100%;
|
||
font-family: '${(e.fontFamily||"Arial").replace(/"/g,""")}';
|
||
font-size: ${e.fontSize};
|
||
color: ${e.color};
|
||
background: transparent;
|
||
padding: ${k}px ${A}px ${C}px ${T}px;
|
||
box-sizing: border-box;
|
||
overflow: visible;
|
||
text-align: center !important;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
align-items: center;
|
||
position: relative;
|
||
`,S.querySelectorAll("table").forEach(N=>{const z=N;z.style.cssText=`
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: ${e.fontSize};
|
||
font-family: '${(e.fontFamily||"Arial").replace(/"/g,""")}';
|
||
margin: 0 auto 0px auto;
|
||
border: 1px solid #ccc;
|
||
`,N.querySelectorAll("td, th").forEach(F=>{const P=F;P.style.cssText=`
|
||
border: 1px solid #ccc;
|
||
padding: 4px 8px;
|
||
text-align: center;
|
||
vertical-align: top;
|
||
font-size: ${parseFloat(e.fontSize)*.9}px;
|
||
background: white;
|
||
`})}),S.querySelectorAll("ul, ol").forEach(N=>{const z=N;z.style.cssText=`
|
||
margin: 2px 0 4px 0 !important;
|
||
padding-left: 0 !important;
|
||
text-align: center !important;
|
||
list-style-position: inside !important;
|
||
`}),S.querySelectorAll("li").forEach(N=>{const z=N;z.style.cssText=`
|
||
margin: 1px 0 !important;
|
||
line-height: 1.2 !important;
|
||
padding: 0 !important;
|
||
text-align: center !important;
|
||
list-style-position: inside !important;
|
||
`}),S.querySelectorAll("p").forEach(N=>{const z=N;z.style.cssText=`
|
||
margin: 2px 0 !important;
|
||
line-height: 1.4 !important;
|
||
padding: 0 !important;
|
||
text-align: center !important;
|
||
`}),S.querySelectorAll("span, div, strong, em").forEach(N=>{const z=N;z.style.cssText=`
|
||
text-align: center !important;
|
||
display: block !important;
|
||
margin-left: auto !important;
|
||
margin-right: auto !important;
|
||
`});const M=document.createElement("style");M.textContent=`
|
||
* {
|
||
text-align: center !important;
|
||
margin-left: auto !important;
|
||
margin-right: auto !important;
|
||
}
|
||
`,S.appendChild(M),S.querySelectorAll("img").forEach((N,z)=>{const F=N,P=m-T-A-5,Y=Math.floor(x*.7);F.style.cssText=`
|
||
max-width: ${P}px !important;
|
||
max-height: ${Y}px !important;
|
||
width: auto !important;
|
||
height: auto !important;
|
||
display: block !important;
|
||
margin: 8px auto 0px auto !important;
|
||
border-radius: 4px;
|
||
object-fit: contain !important;
|
||
flex-shrink: 0 !important;
|
||
box-sizing: border-box !important;
|
||
position: relative !important;
|
||
top: 0 !important;
|
||
left: 0 !important;
|
||
right: 0 !important;
|
||
bottom: 0 !important;
|
||
`}),w.appendChild(S);const y=document.createElementNS(Jn,"rect");En(y,{x:n+"",y:r+"",rx:e.borderRadius||"8",ry:e.borderRadius||"8",width:m+"px",height:x+"px",fill:e.backgroundColor||"white",stroke:e.borderColor||"#ccc","stroke-width":e.borderWidth||"1"}),l.insertBefore(y,l.firstChild),l.appendChild(w)}else return Gv(t,e,n,r);return l}function l0(t,e,n=!1,r){var o;const l=getComputedStyle(e);let h,c;if(r)h=r.x,c=r.y;else{const{offsetLeft:x,offsetTop:w}=Qp(t.nodes,e);h=x,c=w}my(e);const p=e;p.nodeObj&&p.nodeObj.dangerouslySetInnerHTML&&((o=p.nodeObj.dangerouslySetInnerHTML)==null||o.includes("<img")),p.nodeObj&&p.nodeObj.image;const v=document.createElementNS(Jn,"g");r||v.setAttribute("transform",`translate(${h}, ${c})`);let b=null;const g=e,m=g.nodeObj&&g.nodeObj.dangerouslySetInnerHTML&&g.nodeObj.dangerouslySetInnerHTML.includes("<table");if(g.nodeObj&&g.nodeObj.dangerouslySetInnerHTML){if(m)return Wd(e,l,h,c);b=Wd(e,l,h,c)}else n?b=Wd(e,l,h,c):b=Gv(e,l,h,c);return b&&v.appendChild(b),v}function dw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=jl(t.nodes,e),l=document.createElementNS(Jn,"a"),h=document.createElementNS(Jn,"text");return En(h,{x:r+"",y:o+parseInt(n.fontSize)+"","text-anchor":"start","font-family":n.fontFamily,"font-size":`${n.fontSize}`,"font-weight":`${n.fontWeight}`,fill:`${n.color}`}),h.innerHTML=e.textContent,l.appendChild(h),l.setAttribute("href",e.href),l}async function hw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=Qp(t.nodes,e);if(!e.nodeObj.image)return null;const l=e.nodeObj.image,h=document.createElementNS(Jn,"image"),c=parseInt(n.width),p=parseInt(n.height),v=Math.min(c-10,300),b=Math.min(p*.6,150),g=Math.min(l.width||200,v),m=Math.min(l.height||150,b);let x=0;if(e.text&&e.text.textContent){const k=e.text.textContent.trim();if(k){const C=k.split(`
|
||
`).length,T=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2;parseFloat(n.fontSize);const A=parseInt(n.paddingTop)||8,M=parseInt(n.paddingBottom)||8;x=C*T+A+M}}const w=r+(c-g)/2,S=o+x+0;try{const k=await Kv(l.url);En(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:k})}catch{En(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:l.url})}return h}async function pw(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:o}=Qp(t.nodes,e),l=document.createElementNS(Jn,"image"),h=t.imageProxy?t.imageProxy(e.src):e.src,c=Math.min(parseInt(n.width)||300,300),p=Math.min(parseInt(n.height)||200,200);try{const v=await Kv(h);En(l,{x:r+"",y:o+"",width:c+"",height:p+"",href:v})}catch{En(l,{x:r+"",y:o+"",width:c+"",height:p+"",href:h})}return l}function Kv(t){return new Promise((e,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{try{const o=document.createElement("canvas");o.width=r.width,o.height=r.height;const l=o.getContext("2d");if(!l){n(new Error("Failed to get canvas context"));return}l.drawImage(r,0,0);const h=o.toDataURL("image/png");e(h)}catch(o){n(o)}},r.onerror=()=>{n(new Error("Failed to load image"))},r.src=t})}const c0=100,fw='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',xm=(t,e)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return window.getComputedStyle(e).transform,{x:n.left-r.left,y:n.top-r.top,width:n.width,height:n.height}},mw=async()=>{await new Promise(t=>setTimeout(t,0)),await document.fonts.ready,await new Promise(t=>requestAnimationFrame(t)),await new Promise(t=>setTimeout(t,100))},gw=async(t,e=!1)=>{var n,r,o;await mw();const l=t.nodes;l.getBoundingClientRect();const h=l.offsetHeight+c0*2,c=l.offsetWidth+c0*2,p=uw(h+"px",c+"px"),v=document.createElementNS(Jn,"svg"),b=document.createElementNS(Jn,"rect");En(b,{x:"0",y:"0",width:`${c}`,height:`${h}`,fill:t.theme.cssVar["--bgcolor"]}),p.appendChild(b),l.querySelectorAll(".subLines").forEach(k=>{const C=k.cloneNode(!0),T=k.parentElement,A=xm(T,l);C.setAttribute("x",`${A.x}`),C.setAttribute("y",`${A.y}`),v.appendChild(C)});const g=(n=l.querySelector(".lines"))==null?void 0:n.cloneNode(!0);g&&v.appendChild(g);const m=(r=l.querySelector(".topiclinks"))==null?void 0:r.cloneNode(!0);m&&v.appendChild(m);const x=(o=l.querySelector(".summary"))==null?void 0:o.cloneNode(!0);x&&v.appendChild(x);const w=Array.from(l.querySelectorAll("me-tpc")).map(async k=>{const C=xm(k,l),T=k.nodeObj.dangerouslySetInnerHTML,A=!!(k.text&&k.text.innerHTML&&k.text.innerHTML!==k.text.textContent),M=k.nodeObj.image;if(T||A){const y=l0(t,k,!e,C);v.appendChild(y)}else v.appendChild(l0(t,k,!1,C));if(M)try{const y=await hw(t,k);y&&v.appendChild(y)}catch{}});await Promise.all(w),l.querySelectorAll(".tags > span").forEach(k=>{v.appendChild(l0(t,k))}),l.querySelectorAll(".icons > span").forEach(k=>{v.appendChild(l0(t,k))}),l.querySelectorAll(".hyper-link").forEach(k=>{v.appendChild(dw(t,k))});const S=Array.from(l.querySelectorAll("img")).map(async(k,C)=>{const T=k.closest("me-tpc"),A=k.closest("foreignObject");return T||A?null:await pw(t,k)});return(await Promise.all(S)).filter(k=>k!==null).forEach(k=>{k&&v.appendChild(k)}),En(v,{x:c0+"",y:c0+"",overflow:"visible"}),p.appendChild(v),p},vw=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),fw+t.outerHTML);function bw(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=o=>{e(o.target.result)},r.onerror=o=>{n(o)},r.readAsDataURL(t)})}const yw=async function(t=!1,e){const n=await gw(this,t),r=vw(n,e);return new Blob([r],{type:"image/svg+xml"})},ww=async function(t=!1,e){const n=await this.exportSvg(t,e),r=await bw(n);return new Promise((o,l)=>{const h=new Image;h.setAttribute("crossOrigin","anonymous");const c=setTimeout(()=>{l(new Error("Image loading timeout"))},1e4);h.onload=()=>{clearTimeout(c);try{const p=document.createElement("canvas");p.width=h.width,p.height=h.height;const v=p.getContext("2d");v.fillStyle="#ffffff",v.fillRect(0,0,p.width,p.height),v.drawImage(h,0,0),p.toBlob(o,"image/png",1)}catch(p){l(p)}},h.onerror=p=>{clearTimeout(c),l(p)},h.src=r})},xw=Object.freeze(Object.defineProperty({__proto__:null,exportPng:ww,exportSvg:yw},Symbol.toStringTag,{value:"Module"}));function ff(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vo=ff();function Xv(t){Vo=t}var Al={exec:()=>null};function ln(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(o,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(Er.caret,"$1"),n=n.replace(o,h),r},getRegex:()=>new RegExp(n,e)};return r}var Er={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},kw=/^(?:[ \t]*(?:\n|$))+/,Sw=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ew=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Vl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Tw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,mf=/(?:[*+-]|\d{1,9}[.)])/,Zv=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Yv=ln(Zv).replace(/bull/g,mf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Aw=ln(Zv).replace(/bull/g,mf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),gf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mw=/^[^\n]+/,vf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Cw=ln(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lw=ln(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,mf).getRegex(),$c="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",bf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_w=ln("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",bf).replace("tag",$c).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Jv=ln(gf).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$c).getRegex(),Nw=ln(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Jv).getRegex(),yf={blockquote:Nw,code:Sw,def:Cw,fences:Ew,heading:Tw,hr:Vl,html:_w,lheading:Yv,list:Lw,newline:kw,paragraph:Jv,table:Al,text:Mw},km=ln("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$c).getRegex(),Dw={...yf,lheading:Aw,table:km,paragraph:ln(gf).replace("hr",Vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",km).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$c).getRegex()},Rw={...yf,html:ln(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bf).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Al,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ln(gf).replace("hr",Vl).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",Yv).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Iw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ow=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qv=/^( {2,}|\\)\n(?!\s*$)/,Hw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Uc=/[\p{P}\p{S}]/u,wf=/[\s\p{P}\p{S}]/u,e6=/[^\s\p{P}\p{S}]/u,Pw=ln(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,wf).getRegex(),t6=/(?!~)[\p{P}\p{S}]/u,zw=/(?!~)[\s\p{P}\p{S}]/u,Bw=/(?:[^\s\p{P}\p{S}]|~)/u,Fw=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,n6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,qw=ln(n6,"u").replace(/punct/g,Uc).getRegex(),jw=ln(n6,"u").replace(/punct/g,t6).getRegex(),r6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$w=ln(r6,"gu").replace(/notPunctSpace/g,e6).replace(/punctSpace/g,wf).replace(/punct/g,Uc).getRegex(),Uw=ln(r6,"gu").replace(/notPunctSpace/g,Bw).replace(/punctSpace/g,zw).replace(/punct/g,t6).getRegex(),Vw=ln("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,e6).replace(/punctSpace/g,wf).replace(/punct/g,Uc).getRegex(),Ww=ln(/\\(punct)/,"gu").replace(/punct/g,Uc).getRegex(),Gw=ln(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),Kw=ln(bf).replace("(?:-->|$)","-->").getRegex(),Xw=ln("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Kw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Zw=ln(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",lc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),i6=ln(/^!?\[(label)\]\[(ref)\]/).replace("label",lc).replace("ref",vf).getRegex(),a6=ln(/^!?\[(ref)\](?:\[\])?/).replace("ref",vf).getRegex(),Yw=ln("reflink|nolink(?!\\()","g").replace("reflink",i6).replace("nolink",a6).getRegex(),xf={_backpedal:Al,anyPunctuation:Ww,autolink:Gw,blockSkip:Fw,br:Qv,code:Ow,del:Al,emStrongLDelim:qw,emStrongRDelimAst:$w,emStrongRDelimUnd:Vw,escape:Iw,link:Zw,nolink:a6,punctuation:Pw,reflink:i6,reflinkSearch:Yw,tag:Xw,text:Hw,url:Al},Jw={...xf,link:ln(/^!?\[(label)\]\((.*?)\)/).replace("label",lc).getRegex(),reflink:ln(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lc).getRegex()},Xh={...xf,emStrongRDelimAst:Uw,emStrongLDelim:jw,url:ln(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Qw={...Xh,br:ln(Qv).replace("{2,}","*").getRegex(),text:ln(Xh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},u0={normal:yf,gfm:Dw,pedantic:Rw},ol={normal:xf,gfm:Xh,breaks:Qw,pedantic:Jw},e9={"&":"&","<":"<",">":">",'"':""","'":"'"},Sm=t=>e9[t];function Ri(t,e){if(e){if(Er.escapeTest.test(t))return t.replace(Er.escapeReplace,Sm)}else if(Er.escapeTestNoEncode.test(t))return t.replace(Er.escapeReplaceNoEncode,Sm);return t}function Em(t){try{t=encodeURI(t).replace(Er.percentDecode,"%")}catch{return null}return t}function Tm(t,e){var n;let r=t.replace(Er.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),o=r.split(Er.splitPipe),l=0;if(o[0].trim()||o.shift(),o.length>0&&!((n=o.at(-1))!=null&&n.trim())&&o.pop(),e)if(o.length>e)o.splice(e);else for(;o.length<e;)o.push("");for(;l<o.length;l++)o[l]=o[l].trim().replace(Er.slashPipe,"|");return o}function sl(t,e,n){let r=t.length;if(r===0)return"";let o=0;for(;o<r;){let l=t.charAt(r-o-1);if(l===e&&!n)o++;else if(l!==e&&n)o++;else break}return t.slice(0,r-o)}function t9(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Am(t,e,n,r,o){let l=e.href,h=e.title||null,c=t[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:h,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,p}function n9(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(`
|
||
`).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join(`
|
||
`)}var cc=class{constructor(t){vt(this,"options"),vt(this,"rules"),vt(this,"lexer"),this.options=t||Vo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:sl(n,`
|
||
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=n9(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=sl(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:sl(e[0],`
|
||
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=sl(e[0],`
|
||
`).split(`
|
||
`),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join(`
|
||
`),b=v.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
||
${v}`:v,o=o?`${o}
|
||
${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+`
|
||
`+n.join(`
|
||
`),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+`
|
||
`+n.join(`
|
||
`),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split(`
|
||
`,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+`
|
||
`,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split(`
|
||
`,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+=`
|
||
`+z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+=`
|
||
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
|
||
`,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=Tm(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),l=(e=n[3])!=null&&e.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],h={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let c of o)this.rules.other.tableAlignRight.test(c)?h.align.push("right"):this.rules.other.tableAlignCenter.test(c)?h.align.push("center"):this.rules.other.tableAlignLeft.test(c)?h.align.push("left"):h.align.push(null);for(let c=0;c<r.length;c++)h.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:h.align[c]});for(let c of l)h.rows.push(Tm(c,h.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:h.align[v]})));return h}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
||
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=sl(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=t9(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Am(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Am(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var e;let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=n[0],o="mailto:"+r;else{let l;do l=n[0],n[0]=((e=this.rules.inline._backpedal.exec(n[0]))==null?void 0:e[0])??"";while(l!==n[0]);r=n[0],n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},ba=class Zh{constructor(e){vt(this,"tokens"),vt(this,"options"),vt(this,"state"),vt(this,"tokenizer"),vt(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Vo,this.options.tokenizer=this.options.tokenizer||new cc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Er,block:u0.normal,inline:ol.normal};this.options.pedantic?(n.block=u0.pedantic,n.inline=ol.pedantic):this.options.gfm&&(n.block=u0.gfm,this.options.breaks?n.inline=ol.breaks:n.inline=ol.gfm),this.tokenizer.rules=n}static get rules(){return{block:u0,inline:ol}}static lex(e,n){return new Zh(n).lex(e)}static lexInline(e,n){return new Zh(n).inlineTokens(e)}lex(e){e=e.replace(Er.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(Er.tabCharGlobal," ").replace(Er.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+=`
|
||
`:n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var r,o,l;let h=e,c=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(c=this.tokenizer.rules.inline.reflinkSearch.exec(h))!=null;)b.includes(c[0].slice(c[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(c=this.tokenizer.rules.inline.anyPunctuation.exec(h))!=null;)h=h.slice(0,c.index)+"++"+h.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(c=this.tokenizer.rules.inline.blockSkip.exec(h))!=null;)h=h.slice(0,c.index)+"["+"a".repeat(c[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let p=!1,v="";for(;e;){p||(v=""),p=!1;let b;if((o=(r=this.options.extensions)==null?void 0:r.inline)!=null&&o.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,h,v)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(v=b.raw.slice(-1)),p=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(m)}}return n}},uc=class{constructor(t){vt(this,"options"),vt(this,"parser"),this.options=t||Vo}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let o=(r=(e||"").match(Er.notSpaceStart))==null?void 0:r[0],l=t.replace(Er.endingNewline,"")+`
|
||
`;return o?'<pre><code class="language-'+Ri(o)+'">'+(n?l:Ri(l,!0))+`</code></pre>
|
||
`:"<pre><code>"+(n?l:Ri(l,!0))+`</code></pre>
|
||
`}blockquote({tokens:t}){return`<blockquote>
|
||
${this.parser.parse(t)}</blockquote>
|
||
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
||
`}hr(t){return`<hr>
|
||
`}list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+`>
|
||
`+r+"</"+o+`>
|
||
`}listitem(t){var e;let n="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((e=t.tokens[0])==null?void 0:e.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Ri(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
|
||
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
||
`}table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+r+`</table>
|
||
`}tablerow({text:t}){return`<tr>
|
||
${t}</tr>
|
||
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
||
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ri(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),o=Em(t);if(o===null)return r;t=o;let l='<a href="'+t+'"';return e&&(l+=' title="'+Ri(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=Em(t);if(o===null)return Ri(n);t=o;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Ri(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ri(t.text)}},kf=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},ya=class Yh{constructor(e){vt(this,"options"),vt(this,"renderer"),vt(this,"textRenderer"),this.options=e||Vo,this.options.renderer=this.options.renderer||new uc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kf}static parse(e,n){return new Yh(n).parse(e)}static parseInline(e,n){return new Yh(n).parseInline(e)}parse(e,n=!0){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=c,b=this.options.extensions.renderers[v.type].call({parser:this},v);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(v.type)){l+=b||"";continue}}let p=c;switch(p.type){case"space":{l+=this.renderer.space(p);continue}case"hr":{l+=this.renderer.hr(p);continue}case"heading":{l+=this.renderer.heading(p);continue}case"code":{l+=this.renderer.code(p);continue}case"table":{l+=this.renderer.table(p);continue}case"blockquote":{l+=this.renderer.blockquote(p);continue}case"list":{l+=this.renderer.list(p);continue}case"html":{l+=this.renderer.html(p);continue}case"def":{l+=this.renderer.def(p);continue}case"paragraph":{l+=this.renderer.paragraph(p);continue}case"text":{let v=p,b=this.renderer.text(v);for(;h+1<e.length&&e[h+1].type==="text";)v=e[++h],b+=`
|
||
`+this.renderer.text(v);n?l+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):l+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}parseInline(e,n=this.renderer){var r,o;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){l+=v||"";continue}}let p=c;switch(p.type){case"escape":{l+=n.text(p);break}case"html":{l+=n.html(p);break}case"link":{l+=n.link(p);break}case"image":{l+=n.image(p);break}case"strong":{l+=n.strong(p);break}case"em":{l+=n.em(p);break}case"codespan":{l+=n.codespan(p);break}case"br":{l+=n.br(p);break}case"del":{l+=n.del(p);break}case"text":{l+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return"";throw new Error(v)}}}return l}},Gd,H0=(Gd=class{constructor(t){vt(this,"options"),vt(this,"block"),this.options=t||Vo}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?ba.lex:ba.lexInline}provideParser(){return this.block?ya.parse:ya.parseInline}},vt(Gd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Gd),r9=class{constructor(...t){vt(this,"defaults",ff()),vt(this,"options",this.setOptions),vt(this,"parse",this.parseMarkdown(!0)),vt(this,"parseInline",this.parseMarkdown(!1)),vt(this,"Parser",ya),vt(this,"Renderer",uc),vt(this,"TextRenderer",kf),vt(this,"Lexer",ba),vt(this,"Tokenizer",cc),vt(this,"Hooks",H0),this.use(...t)}walkTokens(t,e){var n,r;let o=[];for(let l of t)switch(o=o.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)o=o.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)o=o.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;o=o.concat(this.walkTokens(h.items,e));break}default:{let h=l;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);o=o.concat(this.walkTokens(p,e))}):h.tokens&&(o=o.concat(this.walkTokens(h.tokens,e)))}}return o}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new uc(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new cc(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new H0;for(let l in n.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=o[h];H0.passThroughHooks.has(l)?o[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(o,v)).then(g=>p.call(o,g));let b=c.call(o,v);return p.call(o,b)}:o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),o&&(c=c.concat(o.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ba.lex(t,e??this.defaults)}parser(t,e){return ya.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},o={...this.defaults,...r},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let h=o.hooks?o.hooks.provideLexer():t?ba.lex:ba.lexInline,c=o.hooks?o.hooks.provideParser():t?ya.parse:ya.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(p=>h(p,o)).then(p=>o.hooks?o.hooks.processAllTokens(p):p).then(p=>o.walkTokens?Promise.all(this.walkTokens(p,o.walkTokens)).then(()=>p):p).then(p=>c(p,o)).then(p=>o.hooks?o.hooks.postprocess(p):p).catch(l);try{o.hooks&&(e=o.hooks.preprocess(e));let p=h(e,o);o.hooks&&(p=o.hooks.processAllTokens(p)),o.walkTokens&&this.walkTokens(p,o.walkTokens);let v=c(p,o);return o.hooks&&(v=o.hooks.postprocess(v)),v}catch(p){return l(p)}}}onError(t,e){return n=>{if(n.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Ri(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Fo=new r9;function tn(t,e){return Fo.parse(t,e)}tn.options=tn.setOptions=function(t){return Fo.setOptions(t),tn.defaults=Fo.defaults,Xv(tn.defaults),tn};tn.getDefaults=ff;tn.defaults=Vo;tn.use=function(...t){return Fo.use(...t),tn.defaults=Fo.defaults,Xv(tn.defaults),tn};tn.walkTokens=function(t,e){return Fo.walkTokens(t,e)};tn.parseInline=Fo.parseInline;tn.Parser=ya;tn.parser=ya.parse;tn.Renderer=uc;tn.TextRenderer=kf;tn.Lexer=ba;tn.lexer=ba.lex;tn.Tokenizer=cc;tn.Hooks=H0;tn.parse=tn;tn.options;tn.setOptions;tn.use;tn.walkTokens;tn.parseInline;ya.parse;ba.lex;var Jh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function o6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s6={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||
*
|
||
* @license MIT <https://opensource.org/licenses/MIT>
|
||
* @author Lea Verou <https://lea.verou.me>
|
||
* @namespace
|
||
* @public
|
||
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,h={},c={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function T(A){return A instanceof p?new p(A.type,T(A.content),A.alias):Array.isArray(A)?A.map(T):A.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(T){return Object.prototype.toString.call(T).slice(8,-1)},objId:function(T){return T.__id||Object.defineProperty(T,"__id",{value:++l}),T.__id},clone:function T(A,M){M=M||{};var y,N;switch(c.util.type(A)){case"Object":if(N=c.util.objId(A),M[N])return M[N];y={},M[N]=y;for(var z in A)A.hasOwnProperty(z)&&(y[z]=T(A[z],M));return y;case"Array":return N=c.util.objId(A),M[N]?M[N]:(y=[],M[N]=y,A.forEach(function(F,P){y[P]=T(F,M)}),y);default:return A}},getLanguage:function(T){for(;T;){var A=o.exec(T.className);if(A)return A[1].toLowerCase();T=T.parentElement}return"none"},setLanguage:function(T,A){T.className=T.className.replace(RegExp(o,"gi"),""),T.classList.add("language-"+A)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(y){var T=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(T){var A=document.getElementsByTagName("script");for(var M in A)if(A[M].src==T)return A[M]}return null}},isActive:function(T,A,M){for(var y="no-"+A;T;){var N=T.classList;if(N.contains(A))return!0;if(N.contains(y))return!1;T=T.parentElement}return!!M}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(T,A){var M=c.util.clone(c.languages[T]);for(var y in A)M[y]=A[y];return M},insertBefore:function(T,A,M,y){y=y||c.languages;var N=y[T],z={};for(var F in N)if(N.hasOwnProperty(F)){if(F==A)for(var P in M)M.hasOwnProperty(P)&&(z[P]=M[P]);M.hasOwnProperty(F)||(z[F]=N[F])}var Y=y[T];return y[T]=z,c.languages.DFS(c.languages,function(te,de){de===Y&&te!=T&&(this[te]=z)}),z},DFS:function T(A,M,y,N){N=N||{};var z=c.util.objId;for(var F in A)if(A.hasOwnProperty(F)){M.call(A,F,A[F],y||F);var P=A[F],Y=c.util.type(P);Y==="Object"&&!N[z(P)]?(N[z(P)]=!0,T(P,M,null,N)):Y==="Array"&&!N[z(P)]&&(N[z(P)]=!0,T(P,M,F,N))}}},plugins:{},highlightAll:function(T,A){c.highlightAllUnder(document,T,A)},highlightAllUnder:function(T,A,M){var y={callback:M,container:T,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",y),y.elements=Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)),c.hooks.run("before-all-elements-highlight",y);for(var N=0,z;z=y.elements[N++];)c.highlightElement(z,A===!0,y.callback)},highlightElement:function(T,A,M){var y=c.util.getLanguage(T),N=c.languages[y];c.util.setLanguage(T,y);var z=T.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(z,y);var F=T.textContent,P={element:T,language:y,grammar:N,code:F};function Y(de){P.highlightedCode=de,c.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,c.hooks.run("after-highlight",P),c.hooks.run("complete",P),M&&M.call(P.element)}if(c.hooks.run("before-sanity-check",P),z=P.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!P.code){c.hooks.run("complete",P),M&&M.call(P.element);return}if(c.hooks.run("before-highlight",P),!P.grammar){Y(c.util.encode(P.code));return}if(A&&r.Worker){var te=new Worker(c.filename);te.onmessage=function(de){Y(de.data)},te.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else Y(c.highlight(P.code,P.grammar,P.language))},highlight:function(T,A,M){var y={code:T,grammar:A,language:M};if(c.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=c.tokenize(y.code,y.grammar),c.hooks.run("after-tokenize",y),p.stringify(c.util.encode(y.tokens),y.language)},tokenize:function(T,A){var M=A.rest;if(M){for(var y in M)A[y]=M[y];delete A.rest}var N=new g;return m(N,N.head,T),b(T,N,A,N.head,0),w(N)},hooks:{all:{},add:function(T,A){var M=c.hooks.all;M[T]=M[T]||[],M[T].push(A)},run:function(T,A){var M=c.hooks.all[T];if(!(!M||!M.length))for(var y=0,N;N=M[y++];)N(A)}},Token:p};r.Prism=c;function p(T,A,M,y){this.type=T,this.content=A,this.alias=M,this.length=(y||"").length|0}p.stringify=function T(A,M){if(typeof A=="string")return A;if(Array.isArray(A)){var y="";return A.forEach(function(Y){y+=T(Y,M)}),y}var N={type:A.type,content:T(A.content,M),tag:"span",classes:["token",A.type],attributes:{},language:M},z=A.alias;z&&(Array.isArray(z)?Array.prototype.push.apply(N.classes,z):N.classes.push(z)),c.hooks.run("wrap",N);var F="";for(var P in N.attributes)F+=" "+P+'="'+(N.attributes[P]||"").replace(/"/g,""")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+F+">"+N.content+"</"+N.tag+">"};function v(T,A,M,y){T.lastIndex=A;var N=T.exec(M);if(N&&y&&N[1]){var z=N[1].length;N.index+=z,N[0]=N[0].slice(z)}return N}function b(T,A,M,y,N,z){for(var F in M)if(!(!M.hasOwnProperty(F)||!M[F])){var P=M[F];P=Array.isArray(P)?P:[P];for(var Y=0;Y<P.length;++Y){if(z&&z.cause==F+","+Y)return;var te=P[Y],de=te.inside,Ce=!!te.lookbehind,qe=!!te.greedy,Ge=te.alias;if(qe&&!te.pattern.global){var nt=te.pattern.toString().match(/[imsuy]*$/)[0];te.pattern=RegExp(te.pattern.source,nt+"g")}for(var je=te.pattern||te,Ne=y.next,tt=N;Ne!==A.tail&&!(z&&tt>=z.reach);tt+=Ne.value.length,Ne=Ne.next){var lt=Ne.value;if(A.length>T.length)return;if(!(lt instanceof p)){var Qe=1,j;if(qe){if(j=v(je,tt,T,Ce),!j||j.index>=T.length)break;var Nt=j.index,Ht=j.index+j[0].length,Rt=tt;for(Rt+=Ne.value.length;Nt>=Rt;)Ne=Ne.next,Rt+=Ne.value.length;if(Rt-=Ne.value.length,tt=Rt,Ne.value instanceof p)continue;for(var Ut=Ne;Ut!==A.tail&&(Rt<Ht||typeof Ut.value=="string");Ut=Ut.next)Qe++,Rt+=Ut.value.length;Qe--,lt=T.slice(tt,Rt),j.index-=tt}else if(j=v(je,0,lt,Ce),!j)continue;var Nt=j.index,oe=j[0],he=lt.slice(0,Nt),J=lt.slice(Nt+oe.length),ee=tt+lt.length;z&&ee>z.reach&&(z.reach=ee);var De=Ne.prev;he&&(De=m(A,De,he),tt+=he.length),x(A,De,Qe);var se=new p(F,de?c.tokenize(oe,de):oe,Ge,oe);if(Ne=m(A,De,se),J&&m(A,Ne,J),Qe>1){var V={cause:F+","+Y,reach:ee};b(T,A,M,Ne.prev,tt,V),z&&V.reach>z.reach&&(z.reach=V.reach)}}}}}}function g(){var T={value:null,prev:null,next:null},A={value:null,prev:T,next:null};T.next=A,this.head=T,this.tail=A,this.length=0}function m(T,A,M){var y=A.next,N={value:M,prev:A,next:y};return A.next=N,y.prev=N,T.length++,N}function x(T,A,M){for(var y=A.next,N=0;N<M&&y!==T.tail;N++)y=y.next;A.next=y,y.prev=A,T.length-=N}function w(T){for(var A=[],M=T.head.next;M!==T.tail;)A.push(M.value),M=M.next;return A}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(T){var A=JSON.parse(T.data),M=A.language,y=A.code,N=A.immediateClose;r.postMessage(c.highlight(y,c.languages[M],M)),N&&r.close()},!1)),c;var S=c.util.currentScript();S&&(c.filename=S.src,S.hasAttribute("data-manual")&&(c.manual=!0));function k(){c.manual||c.highlightAll()}if(!c.manual){var C=document.readyState;C==="loading"||C==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",k):window.requestAnimationFrame?window.requestAnimationFrame(k):window.setTimeout(k,16)}return c}(e);t.exports&&(t.exports=n),typeof Jh<"u"&&(Jh.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,o){var l={};l["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[o]},l.cdata=/^<!\[CDATA\[|\]\]>$/i;var h={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}};h["language-"+o]={pattern:/[\s\S]+/,inside:n.languages[o]};var c={};c[r]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return r}),"i"),lookbehind:!0,greedy:!0,inside:h},n.languages.insertBefore("markup","cdata",c)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var l=r.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(w,S){return"✖ Error "+w+" while fetching file: "+S},l="✖ Error: File does not exist or is empty",h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",p="loading",v="loaded",b="failed",g="pre[data-src]:not(["+c+'="'+v+'"]):not(['+c+'="'+p+'"])';function m(w,S,k){var C=new XMLHttpRequest;C.open("GET",w,!0),C.onreadystatechange=function(){C.readyState==4&&(C.status<400&&C.responseText?S(C.responseText):C.status>=400?k(o(C.status,C.statusText)):k(l))},C.send(null)}function x(w){var S=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(w||"");if(S){var k=Number(S[1]),C=S[2],T=S[3];return C?T?[k,Number(T)]:[k,void 0]:[k,k]}}n.hooks.add("before-highlightall",function(w){w.selector+=", "+g}),n.hooks.add("before-sanity-check",function(w){var S=w.element;if(S.matches(g)){w.code="",S.setAttribute(c,p);var k=S.appendChild(document.createElement("CODE"));k.textContent=r;var C=S.getAttribute("data-src"),T=w.language;if(T==="none"){var A=(/\.(\w+)$/.exec(C)||[,"none"])[1];T=h[A]||A}n.util.setLanguage(k,T),n.util.setLanguage(S,T);var M=n.plugins.autoloader;M&&M.loadLanguages(T),m(C,function(y){S.setAttribute(c,v);var N=x(S.getAttribute("data-range"));if(N){var z=y.split(/\r\n?|\n/g),F=N[0],P=N[1]==null?z.length:N[1];F<0&&(F+=z.length),F=Math.max(0,Math.min(F-1,z.length)),P<0&&(P+=z.length),P=Math.max(0,Math.min(P,z.length)),y=z.slice(F,P).join(`
|
||
`),S.hasAttribute("data-start")||S.setAttribute("data-start",String(F+1))}k.textContent=y,n.highlightElement(k)},function(y){S.setAttribute(c,b),k.textContent=y})}}),n.plugins.fileHighlight={highlight:function(w){for(var S=(w||document).querySelectorAll(g),k=0,C;C=S[k++];)n.highlightElement(C)}},n.fileHighlight=function(){n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(s6);var i9=s6.exports;const Mm=o6(i9);class Vr{constructor(e,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=r}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new Vr(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class si{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new si(n,Vr.range(this,e))}}let et=class l6{constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,o,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;o=h.start,l=h.end,o===c.length?r+=" at end of input: ":r+=" at position "+(o+1)+": ";var p=c.slice(o,l).replace(/[^]/g,"$&̲"),v;o>15?v="…"+c.slice(o-15,o):v=c.slice(0,o);var b;l+15<c.length?b=c.slice(l,l+15)+"…":b=c.slice(l),r+=v+p+b}var g=new Error(r);return g.name="ParseError",g.__proto__=l6.prototype,g.position=o,o!=null&&l!=null&&(g.length=l-o),g.rawMessage=e,g}};et.prototype.__proto__=Error.prototype;var a9=function(t,e){return t.indexOf(e)!==-1},o9=function(t,e){return t===void 0?e:t},s9=/([A-Z])/g,l9=function(t){return t.replace(s9,"-$1").toLowerCase()},c9={"&":"&",">":">","<":"<",'"':""","'":"'"},u9=/[&><"']/g;function d9(t){return String(t).replace(u9,e=>c9[e])}var c6=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},h9=function(t){var e=c6(t);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},p9=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},f9=function(t){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},wt={contains:a9,deflt:o9,escape:d9,hyphenate:l9,getBaseElem:c6,isCharacterBox:h9,protocolFromUrl:f9},P0={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:t=>"#"+t},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:(t,e)=>(e.push(t),e)},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:t=>Math.max(0,t),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:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function m9(t){if(t.default)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Sf{constructor(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 n in P0)if(P0.hasOwnProperty(n)){var r=P0[n];this[n]=e[n]!==void 0?r.processor?r.processor(e[n]):e[n]:m9(r)}}reportNonstrict(e,n,r){var o=this.strict;if(typeof o=="function"&&(o=o(e,n,r)),!(!o||o==="ignore")){if(o===!0||o==="error")throw new et("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),r);o==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,r){var o=this.strict;if(typeof o=="function")try{o=o(e,n,r)}catch{o="error"}return!o||o==="ignore"?!1:o===!0||o==="error"?!0:o==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var n=wt.protocolFromUrl(e.url);if(n==null)return!1;e.protocol=n}var r=typeof this.trust=="function"?this.trust(e):this.trust;return!!r}}class $a{constructor(e,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=n,this.cramped=r}sup(){return Pi[g9[this.id]]}sub(){return Pi[v9[this.id]]}fracNum(){return Pi[b9[this.id]]}fracDen(){return Pi[y9[this.id]]}cramp(){return Pi[w9[this.id]]}text(){return Pi[x9[this.id]]}isTight(){return this.size>=2}}var Ef=0,dc=1,ps=2,ka=3,Ol=4,ri=5,vs=6,Tr=7,Pi=[new $a(Ef,0,!1),new $a(dc,0,!0),new $a(ps,1,!1),new $a(ka,1,!0),new $a(Ol,2,!1),new $a(ri,2,!0),new $a(vs,3,!1),new $a(Tr,3,!0)],g9=[Ol,ri,Ol,ri,vs,Tr,vs,Tr],v9=[ri,ri,ri,ri,Tr,Tr,Tr,Tr],b9=[ps,ka,Ol,ri,vs,Tr,vs,Tr],y9=[ka,ka,ri,ri,Tr,Tr,Tr,Tr],w9=[dc,dc,ka,ka,ri,ri,Tr,Tr],x9=[Ef,dc,ps,ka,ps,ka,ps,ka],Tt={DISPLAY:Pi[Ef],TEXT:Pi[ps],SCRIPT:Pi[Ol],SCRIPTSCRIPT:Pi[vs]},Qh=[{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 k9(t){for(var e=0;e<Qh.length;e++)for(var n=Qh[e],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(t>=o[0]&&t<=o[1])return n.name}return null}var z0=[];Qh.forEach(t=>t.blocks.forEach(e=>z0.push(...e)));function u6(t){for(var e=0;e<z0.length;e+=2)if(t>=z0[e]&&t<=z0[e+1])return!0;return!1}var ts=80,S9=function(t,e){return"M95,"+(622+t+e)+`
|
||
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
||
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
||
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
||
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
||
c69,-144,104.5,-217.7,106.5,-221
|
||
l`+t/2.075+" -"+t+`
|
||
c5.3,-9.3,12,-14,20,-14
|
||
H400000v`+(40+t)+`H845.2724
|
||
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
||
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
||
M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},E9=function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119
|
||
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
||
c340,-704.7,510.7,-1060.3,512,-1067
|
||
l`+t/2.084+" -"+t+`
|
||
c4.7,-7.3,11,-11,19,-11
|
||
H40000v`+(40+t)+`H1012.3
|
||
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
||
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
||
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
||
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
||
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},T9=function(t,e){return"M983 "+(10+t+e)+`
|
||
l`+t/3.13+" -"+t+`
|
||
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
|
||
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
||
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
||
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
||
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
||
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
||
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
||
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},A9=function(t,e){return"M424,"+(2398+t+e)+`
|
||
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
||
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
||
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
||
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
||
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
|
||
v`+(40+t)+`H1014.6
|
||
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
||
c-2,6,-10,9,-24,9
|
||
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+`
|
||
h400000v`+(40+t)+"h-400000z"},M9=function(t,e){return"M473,"+(2713+t+e)+`
|
||
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
|
||
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
|
||
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
||
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
||
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
||
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
||
606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},C9=function(t){var e=t/2;return"M400000 "+t+" H0 L"+e+" 0 l65 45 L145 "+(t-80)+" H400000z"},L9=function(t,e,n){var r=n-54-e-t;return"M702 "+(t+e)+"H400000"+(40+t)+`
|
||
H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
||
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
||
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
||
219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},_9=function(t,e,n){e=1e3*e;var r="";switch(t){case"sqrtMain":r=S9(e,ts);break;case"sqrtSize1":r=E9(e,ts);break;case"sqrtSize2":r=T9(e,ts);break;case"sqrtSize3":r=A9(e,ts);break;case"sqrtSize4":r=M9(e,ts);break;case"sqrtTall":r=L9(e,ts,n)}return r},N9=function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z"+("M367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z");case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257z"+("M478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z");default:return""}},Cm={doubleleftarrow:`M262 157
|
||
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
||
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
||
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
||
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
||
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
||
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
||
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
||
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
||
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
||
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
||
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
||
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
||
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
||
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
||
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
||
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
||
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
||
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
||
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
||
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
||
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
||
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
||
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
||
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
||
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
||
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
||
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
||
435 0h399565z`,leftgroupunder:`M400000 262
|
||
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
||
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
||
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
||
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
||
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
||
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
||
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
||
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
||
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
||
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
||
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
||
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
||
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
||
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
||
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
||
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
||
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
||
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
||
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
||
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
||
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
||
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
||
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
||
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
||
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
||
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
||
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
||
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
||
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
||
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
||
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
||
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
||
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
||
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
||
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
||
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
||
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
||
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
||
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
||
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
||
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
||
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
||
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
||
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
||
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
||
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
||
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
||
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
||
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
||
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
||
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
||
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
||
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
||
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
||
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
||
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
||
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
||
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
||
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
||
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
||
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
||
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
||
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
||
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
||
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
||
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
||
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
||
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
||
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
||
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
||
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
||
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
||
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
||
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
||
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
||
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
||
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
||
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
||
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
||
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
||
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
||
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
||
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
||
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
||
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
||
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
||
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
||
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
||
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
||
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
||
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
||
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
||
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
||
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
||
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
||
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
||
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
||
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
||
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
||
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
||
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
||
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
||
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
||
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
||
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
||
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
||
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
||
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
||
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
||
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
||
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
||
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
||
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
||
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
||
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
||
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
||
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
||
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
||
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
||
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
||
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
||
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
||
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
||
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
||
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
||
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
||
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},D9=function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84
|
||
H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z
|
||
M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z
|
||
M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z
|
||
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z
|
||
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z
|
||
M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z
|
||
M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
||
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
||
-36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
||
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
||
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
||
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
||
l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
||
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
||
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
||
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+`
|
||
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
||
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
||
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
||
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
||
l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
||
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Wl{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 wt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){for(var e="",n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e}toText(){var e=n=>n.toText();return this.children.map(e).join("")}}var Bi={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},d0={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Lm={Å:"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 R9(t,e){Bi[t]=e}function Tf(t,e,n){if(!Bi[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),o=Bi[e][r];if(!o&&t[0]in Lm&&(r=Lm[t[0]].charCodeAt(0),o=Bi[e][r]),!o&&n==="text"&&u6(r)&&(o=Bi[e][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var Kd={};function I9(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!Kd[e]){var n=Kd[e]={cssEmPerMu:d0.quad[e]/18};for(var r in d0)d0.hasOwnProperty(r)&&(n[r]=d0[r][e])}return Kd[e]}var O9=[[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]],_m=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Nm=function(t,e){return e.size<2?t:O9[t-1][e.size-1]};class ha{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.style=e.style,this.color=e.color,this.size=e.size||ha.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=_m[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var n={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};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return new ha(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Nm(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:_m[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=Nm(ha.BASESIZE,e);return this.size===n&&this.textSize===ha.BASESIZE&&this.style===e?this:this.extend({style:e,size:n})}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){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ha.BASESIZE?["sizing","reset-size"+this.size,"size"+ha.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=I9(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ha.BASESIZE=6;var ep={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},H9={ex:!0,em:!0,mu:!0},d6=function(t){return typeof t!="string"&&(t=t.unit),t in ep||t in H9||t==="ex"},Nn=function(t,e){var n;if(t.unit in ep)n=ep[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if(t.unit==="mu")n=e.fontMetrics().cssEmPerMu;else{var r;if(e.style.isTight()?r=e.havingStyle(e.style.text()):r=e,t.unit==="ex")n=r.fontMetrics().xHeight;else if(t.unit==="em")n=r.fontMetrics().quad;else throw new et("Invalid unit: '"+t.unit+"'");r!==e&&(n*=r.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*n,e.maxSize)},it=function(t){return+t.toFixed(4)+"em"},ro=function(t){return t.filter(e=>e).join(" ")},h6=function(t,e,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},e){e.style.isTight()&&this.classes.push("mtight");var r=e.getColor();r&&(this.style.color=r)}},p6=function(t){var e=document.createElement(t);e.className=ro(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&e.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)e.appendChild(this.children[o].toNode());return e},P9=/[\s"'>/=\x00-\x1f]/,f6=function(t){var e="<"+t;this.classes.length&&(e+=' class="'+wt.escape(ro(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=wt.hyphenate(r)+":"+this.style[r]+";");n&&(e+=' style="'+wt.escape(n)+'"');for(var o in this.attributes)if(this.attributes.hasOwnProperty(o)){if(P9.test(o))throw new et("Invalid attribute name '"+o+"'");e+=" "+o+'="'+wt.escape(this.attributes[o])+'"'}e+=">";for(var l=0;l<this.children.length;l++)e+=this.children[l].toMarkup();return e+="</"+t+">",e};class Gl{constructor(e,n,r,o){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,h6.call(this,e,r,o),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return wt.contains(this.classes,e)}toNode(){return p6.call(this,"span")}toMarkup(){return f6.call(this,"span")}}class Af{constructor(e,n,r,o){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,h6.call(this,n,o),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return wt.contains(this.classes,e)}toNode(){return p6.call(this,"a")}toMarkup(){return f6.call(this,"a")}}class z9{constructor(e,n,r){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=n,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return wt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);return e}toMarkup(){var e='<img src="'+wt.escape(this.src)+'"'+(' alt="'+wt.escape(this.alt)+'"'),n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=wt.hyphenate(r)+":"+this.style[r]+";");return n&&(e+=' style="'+wt.escape(n)+'"'),e+="'/>",e}}var B9={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class ui{constructor(e,n,r,o,l,h,c,p){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=n||0,this.depth=r||0,this.italic=o||0,this.skew=l||0,this.width=h||0,this.classes=c||[],this.style=p||{},this.maxFontSize=0;var v=k9(this.text.charCodeAt(0));v&&this.classes.push(v+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=B9[this.text])}hasClass(e){return wt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=it(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=ro(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(e),n):e}toMarkup(){var e=!1,n="<span";this.classes.length&&(e=!0,n+=' class="',n+=wt.escape(ro(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var o in this.style)this.style.hasOwnProperty(o)&&(r+=wt.hyphenate(o)+":"+this.style[o]+";");r&&(e=!0,n+=' style="'+wt.escape(r)+'"');var l=wt.escape(this.text);return e?(n+=">",n+=l,n+="</span>",n):l}}class Ca{constructor(e,n){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=n||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)n.appendChild(this.children[o].toNode());return n}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+wt.escape(this.attributes[n])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}}class io{constructor(e,n){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=n}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",Cm[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+wt.escape(this.alternate)+'"/>':'<path d="'+wt.escape(Cm[this.pathName])+'"/>'}}class tp{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var e="<line";for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+wt.escape(this.attributes[n])+'"');return e+="/>",e}}function Dm(t){if(t instanceof ui)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function F9(t){if(t instanceof Gl)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var q9={bin:1,close:1,inner:1,open:1,punct:1,rel:1},j9={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},wn={math:{},text:{}};function R(t,e,n,r,o,l){wn[t][o]={font:e,group:n,replace:r},l&&r&&(wn[t][r]=wn[t][o])}var O="math",Ve="text",$="main",ne="ams",Tn="accent-token",pt="bin",Cr="close",ws="inner",St="mathord",Gn="op-token",Yr="open",Vc="punct",ie="rel",Oa="spacing",me="textord";R(O,$,ie,"≡","\\equiv",!0);R(O,$,ie,"≺","\\prec",!0);R(O,$,ie,"≻","\\succ",!0);R(O,$,ie,"∼","\\sim",!0);R(O,$,ie,"⊥","\\perp");R(O,$,ie,"⪯","\\preceq",!0);R(O,$,ie,"⪰","\\succeq",!0);R(O,$,ie,"≃","\\simeq",!0);R(O,$,ie,"∣","\\mid",!0);R(O,$,ie,"≪","\\ll",!0);R(O,$,ie,"≫","\\gg",!0);R(O,$,ie,"≍","\\asymp",!0);R(O,$,ie,"∥","\\parallel");R(O,$,ie,"⋈","\\bowtie",!0);R(O,$,ie,"⌣","\\smile",!0);R(O,$,ie,"⊑","\\sqsubseteq",!0);R(O,$,ie,"⊒","\\sqsupseteq",!0);R(O,$,ie,"≐","\\doteq",!0);R(O,$,ie,"⌢","\\frown",!0);R(O,$,ie,"∋","\\ni",!0);R(O,$,ie,"∝","\\propto",!0);R(O,$,ie,"⊢","\\vdash",!0);R(O,$,ie,"⊣","\\dashv",!0);R(O,$,ie,"∋","\\owns");R(O,$,Vc,".","\\ldotp");R(O,$,Vc,"⋅","\\cdotp");R(O,$,me,"#","\\#");R(Ve,$,me,"#","\\#");R(O,$,me,"&","\\&");R(Ve,$,me,"&","\\&");R(O,$,me,"ℵ","\\aleph",!0);R(O,$,me,"∀","\\forall",!0);R(O,$,me,"ℏ","\\hbar",!0);R(O,$,me,"∃","\\exists",!0);R(O,$,me,"∇","\\nabla",!0);R(O,$,me,"♭","\\flat",!0);R(O,$,me,"ℓ","\\ell",!0);R(O,$,me,"♮","\\natural",!0);R(O,$,me,"♣","\\clubsuit",!0);R(O,$,me,"℘","\\wp",!0);R(O,$,me,"♯","\\sharp",!0);R(O,$,me,"♢","\\diamondsuit",!0);R(O,$,me,"ℜ","\\Re",!0);R(O,$,me,"♡","\\heartsuit",!0);R(O,$,me,"ℑ","\\Im",!0);R(O,$,me,"♠","\\spadesuit",!0);R(O,$,me,"§","\\S",!0);R(Ve,$,me,"§","\\S");R(O,$,me,"¶","\\P",!0);R(Ve,$,me,"¶","\\P");R(O,$,me,"†","\\dag");R(Ve,$,me,"†","\\dag");R(Ve,$,me,"†","\\textdagger");R(O,$,me,"‡","\\ddag");R(Ve,$,me,"‡","\\ddag");R(Ve,$,me,"‡","\\textdaggerdbl");R(O,$,Cr,"⎱","\\rmoustache",!0);R(O,$,Yr,"⎰","\\lmoustache",!0);R(O,$,Cr,"⟯","\\rgroup",!0);R(O,$,Yr,"⟮","\\lgroup",!0);R(O,$,pt,"∓","\\mp",!0);R(O,$,pt,"⊖","\\ominus",!0);R(O,$,pt,"⊎","\\uplus",!0);R(O,$,pt,"⊓","\\sqcap",!0);R(O,$,pt,"∗","\\ast");R(O,$,pt,"⊔","\\sqcup",!0);R(O,$,pt,"◯","\\bigcirc",!0);R(O,$,pt,"∙","\\bullet",!0);R(O,$,pt,"‡","\\ddagger");R(O,$,pt,"≀","\\wr",!0);R(O,$,pt,"⨿","\\amalg");R(O,$,pt,"&","\\And");R(O,$,ie,"⟵","\\longleftarrow",!0);R(O,$,ie,"⇐","\\Leftarrow",!0);R(O,$,ie,"⟸","\\Longleftarrow",!0);R(O,$,ie,"⟶","\\longrightarrow",!0);R(O,$,ie,"⇒","\\Rightarrow",!0);R(O,$,ie,"⟹","\\Longrightarrow",!0);R(O,$,ie,"↔","\\leftrightarrow",!0);R(O,$,ie,"⟷","\\longleftrightarrow",!0);R(O,$,ie,"⇔","\\Leftrightarrow",!0);R(O,$,ie,"⟺","\\Longleftrightarrow",!0);R(O,$,ie,"↦","\\mapsto",!0);R(O,$,ie,"⟼","\\longmapsto",!0);R(O,$,ie,"↗","\\nearrow",!0);R(O,$,ie,"↩","\\hookleftarrow",!0);R(O,$,ie,"↪","\\hookrightarrow",!0);R(O,$,ie,"↘","\\searrow",!0);R(O,$,ie,"↼","\\leftharpoonup",!0);R(O,$,ie,"⇀","\\rightharpoonup",!0);R(O,$,ie,"↙","\\swarrow",!0);R(O,$,ie,"↽","\\leftharpoondown",!0);R(O,$,ie,"⇁","\\rightharpoondown",!0);R(O,$,ie,"↖","\\nwarrow",!0);R(O,$,ie,"⇌","\\rightleftharpoons",!0);R(O,ne,ie,"≮","\\nless",!0);R(O,ne,ie,"","\\@nleqslant");R(O,ne,ie,"","\\@nleqq");R(O,ne,ie,"⪇","\\lneq",!0);R(O,ne,ie,"≨","\\lneqq",!0);R(O,ne,ie,"","\\@lvertneqq");R(O,ne,ie,"⋦","\\lnsim",!0);R(O,ne,ie,"⪉","\\lnapprox",!0);R(O,ne,ie,"⊀","\\nprec",!0);R(O,ne,ie,"⋠","\\npreceq",!0);R(O,ne,ie,"⋨","\\precnsim",!0);R(O,ne,ie,"⪹","\\precnapprox",!0);R(O,ne,ie,"≁","\\nsim",!0);R(O,ne,ie,"","\\@nshortmid");R(O,ne,ie,"∤","\\nmid",!0);R(O,ne,ie,"⊬","\\nvdash",!0);R(O,ne,ie,"⊭","\\nvDash",!0);R(O,ne,ie,"⋪","\\ntriangleleft");R(O,ne,ie,"⋬","\\ntrianglelefteq",!0);R(O,ne,ie,"⊊","\\subsetneq",!0);R(O,ne,ie,"","\\@varsubsetneq");R(O,ne,ie,"⫋","\\subsetneqq",!0);R(O,ne,ie,"","\\@varsubsetneqq");R(O,ne,ie,"≯","\\ngtr",!0);R(O,ne,ie,"","\\@ngeqslant");R(O,ne,ie,"","\\@ngeqq");R(O,ne,ie,"⪈","\\gneq",!0);R(O,ne,ie,"≩","\\gneqq",!0);R(O,ne,ie,"","\\@gvertneqq");R(O,ne,ie,"⋧","\\gnsim",!0);R(O,ne,ie,"⪊","\\gnapprox",!0);R(O,ne,ie,"⊁","\\nsucc",!0);R(O,ne,ie,"⋡","\\nsucceq",!0);R(O,ne,ie,"⋩","\\succnsim",!0);R(O,ne,ie,"⪺","\\succnapprox",!0);R(O,ne,ie,"≆","\\ncong",!0);R(O,ne,ie,"","\\@nshortparallel");R(O,ne,ie,"∦","\\nparallel",!0);R(O,ne,ie,"⊯","\\nVDash",!0);R(O,ne,ie,"⋫","\\ntriangleright");R(O,ne,ie,"⋭","\\ntrianglerighteq",!0);R(O,ne,ie,"","\\@nsupseteqq");R(O,ne,ie,"⊋","\\supsetneq",!0);R(O,ne,ie,"","\\@varsupsetneq");R(O,ne,ie,"⫌","\\supsetneqq",!0);R(O,ne,ie,"","\\@varsupsetneqq");R(O,ne,ie,"⊮","\\nVdash",!0);R(O,ne,ie,"⪵","\\precneqq",!0);R(O,ne,ie,"⪶","\\succneqq",!0);R(O,ne,ie,"","\\@nsubseteqq");R(O,ne,pt,"⊴","\\unlhd");R(O,ne,pt,"⊵","\\unrhd");R(O,ne,ie,"↚","\\nleftarrow",!0);R(O,ne,ie,"↛","\\nrightarrow",!0);R(O,ne,ie,"⇍","\\nLeftarrow",!0);R(O,ne,ie,"⇏","\\nRightarrow",!0);R(O,ne,ie,"↮","\\nleftrightarrow",!0);R(O,ne,ie,"⇎","\\nLeftrightarrow",!0);R(O,ne,ie,"△","\\vartriangle");R(O,ne,me,"ℏ","\\hslash");R(O,ne,me,"▽","\\triangledown");R(O,ne,me,"◊","\\lozenge");R(O,ne,me,"Ⓢ","\\circledS");R(O,ne,me,"®","\\circledR");R(Ve,ne,me,"®","\\circledR");R(O,ne,me,"∡","\\measuredangle",!0);R(O,ne,me,"∄","\\nexists");R(O,ne,me,"℧","\\mho");R(O,ne,me,"Ⅎ","\\Finv",!0);R(O,ne,me,"⅁","\\Game",!0);R(O,ne,me,"‵","\\backprime");R(O,ne,me,"▲","\\blacktriangle");R(O,ne,me,"▼","\\blacktriangledown");R(O,ne,me,"■","\\blacksquare");R(O,ne,me,"⧫","\\blacklozenge");R(O,ne,me,"★","\\bigstar");R(O,ne,me,"∢","\\sphericalangle",!0);R(O,ne,me,"∁","\\complement",!0);R(O,ne,me,"ð","\\eth",!0);R(Ve,$,me,"ð","ð");R(O,ne,me,"╱","\\diagup");R(O,ne,me,"╲","\\diagdown");R(O,ne,me,"□","\\square");R(O,ne,me,"□","\\Box");R(O,ne,me,"◊","\\Diamond");R(O,ne,me,"¥","\\yen",!0);R(Ve,ne,me,"¥","\\yen",!0);R(O,ne,me,"✓","\\checkmark",!0);R(Ve,ne,me,"✓","\\checkmark");R(O,ne,me,"ℶ","\\beth",!0);R(O,ne,me,"ℸ","\\daleth",!0);R(O,ne,me,"ℷ","\\gimel",!0);R(O,ne,me,"ϝ","\\digamma",!0);R(O,ne,me,"ϰ","\\varkappa");R(O,ne,Yr,"┌","\\@ulcorner",!0);R(O,ne,Cr,"┐","\\@urcorner",!0);R(O,ne,Yr,"└","\\@llcorner",!0);R(O,ne,Cr,"┘","\\@lrcorner",!0);R(O,ne,ie,"≦","\\leqq",!0);R(O,ne,ie,"⩽","\\leqslant",!0);R(O,ne,ie,"⪕","\\eqslantless",!0);R(O,ne,ie,"≲","\\lesssim",!0);R(O,ne,ie,"⪅","\\lessapprox",!0);R(O,ne,ie,"≊","\\approxeq",!0);R(O,ne,pt,"⋖","\\lessdot");R(O,ne,ie,"⋘","\\lll",!0);R(O,ne,ie,"≶","\\lessgtr",!0);R(O,ne,ie,"⋚","\\lesseqgtr",!0);R(O,ne,ie,"⪋","\\lesseqqgtr",!0);R(O,ne,ie,"≑","\\doteqdot");R(O,ne,ie,"≓","\\risingdotseq",!0);R(O,ne,ie,"≒","\\fallingdotseq",!0);R(O,ne,ie,"∽","\\backsim",!0);R(O,ne,ie,"⋍","\\backsimeq",!0);R(O,ne,ie,"⫅","\\subseteqq",!0);R(O,ne,ie,"⋐","\\Subset",!0);R(O,ne,ie,"⊏","\\sqsubset",!0);R(O,ne,ie,"≼","\\preccurlyeq",!0);R(O,ne,ie,"⋞","\\curlyeqprec",!0);R(O,ne,ie,"≾","\\precsim",!0);R(O,ne,ie,"⪷","\\precapprox",!0);R(O,ne,ie,"⊲","\\vartriangleleft");R(O,ne,ie,"⊴","\\trianglelefteq");R(O,ne,ie,"⊨","\\vDash",!0);R(O,ne,ie,"⊪","\\Vvdash",!0);R(O,ne,ie,"⌣","\\smallsmile");R(O,ne,ie,"⌢","\\smallfrown");R(O,ne,ie,"≏","\\bumpeq",!0);R(O,ne,ie,"≎","\\Bumpeq",!0);R(O,ne,ie,"≧","\\geqq",!0);R(O,ne,ie,"⩾","\\geqslant",!0);R(O,ne,ie,"⪖","\\eqslantgtr",!0);R(O,ne,ie,"≳","\\gtrsim",!0);R(O,ne,ie,"⪆","\\gtrapprox",!0);R(O,ne,pt,"⋗","\\gtrdot");R(O,ne,ie,"⋙","\\ggg",!0);R(O,ne,ie,"≷","\\gtrless",!0);R(O,ne,ie,"⋛","\\gtreqless",!0);R(O,ne,ie,"⪌","\\gtreqqless",!0);R(O,ne,ie,"≖","\\eqcirc",!0);R(O,ne,ie,"≗","\\circeq",!0);R(O,ne,ie,"≜","\\triangleq",!0);R(O,ne,ie,"∼","\\thicksim");R(O,ne,ie,"≈","\\thickapprox");R(O,ne,ie,"⫆","\\supseteqq",!0);R(O,ne,ie,"⋑","\\Supset",!0);R(O,ne,ie,"⊐","\\sqsupset",!0);R(O,ne,ie,"≽","\\succcurlyeq",!0);R(O,ne,ie,"⋟","\\curlyeqsucc",!0);R(O,ne,ie,"≿","\\succsim",!0);R(O,ne,ie,"⪸","\\succapprox",!0);R(O,ne,ie,"⊳","\\vartriangleright");R(O,ne,ie,"⊵","\\trianglerighteq");R(O,ne,ie,"⊩","\\Vdash",!0);R(O,ne,ie,"∣","\\shortmid");R(O,ne,ie,"∥","\\shortparallel");R(O,ne,ie,"≬","\\between",!0);R(O,ne,ie,"⋔","\\pitchfork",!0);R(O,ne,ie,"∝","\\varpropto");R(O,ne,ie,"◀","\\blacktriangleleft");R(O,ne,ie,"∴","\\therefore",!0);R(O,ne,ie,"∍","\\backepsilon");R(O,ne,ie,"▶","\\blacktriangleright");R(O,ne,ie,"∵","\\because",!0);R(O,ne,ie,"⋘","\\llless");R(O,ne,ie,"⋙","\\gggtr");R(O,ne,pt,"⊲","\\lhd");R(O,ne,pt,"⊳","\\rhd");R(O,ne,ie,"≂","\\eqsim",!0);R(O,$,ie,"⋈","\\Join");R(O,ne,ie,"≑","\\Doteq",!0);R(O,ne,pt,"∔","\\dotplus",!0);R(O,ne,pt,"∖","\\smallsetminus");R(O,ne,pt,"⋒","\\Cap",!0);R(O,ne,pt,"⋓","\\Cup",!0);R(O,ne,pt,"⩞","\\doublebarwedge",!0);R(O,ne,pt,"⊟","\\boxminus",!0);R(O,ne,pt,"⊞","\\boxplus",!0);R(O,ne,pt,"⋇","\\divideontimes",!0);R(O,ne,pt,"⋉","\\ltimes",!0);R(O,ne,pt,"⋊","\\rtimes",!0);R(O,ne,pt,"⋋","\\leftthreetimes",!0);R(O,ne,pt,"⋌","\\rightthreetimes",!0);R(O,ne,pt,"⋏","\\curlywedge",!0);R(O,ne,pt,"⋎","\\curlyvee",!0);R(O,ne,pt,"⊝","\\circleddash",!0);R(O,ne,pt,"⊛","\\circledast",!0);R(O,ne,pt,"⋅","\\centerdot");R(O,ne,pt,"⊺","\\intercal",!0);R(O,ne,pt,"⋒","\\doublecap");R(O,ne,pt,"⋓","\\doublecup");R(O,ne,pt,"⊠","\\boxtimes",!0);R(O,ne,ie,"⇢","\\dashrightarrow",!0);R(O,ne,ie,"⇠","\\dashleftarrow",!0);R(O,ne,ie,"⇇","\\leftleftarrows",!0);R(O,ne,ie,"⇆","\\leftrightarrows",!0);R(O,ne,ie,"⇚","\\Lleftarrow",!0);R(O,ne,ie,"↞","\\twoheadleftarrow",!0);R(O,ne,ie,"↢","\\leftarrowtail",!0);R(O,ne,ie,"↫","\\looparrowleft",!0);R(O,ne,ie,"⇋","\\leftrightharpoons",!0);R(O,ne,ie,"↶","\\curvearrowleft",!0);R(O,ne,ie,"↺","\\circlearrowleft",!0);R(O,ne,ie,"↰","\\Lsh",!0);R(O,ne,ie,"⇈","\\upuparrows",!0);R(O,ne,ie,"↿","\\upharpoonleft",!0);R(O,ne,ie,"⇃","\\downharpoonleft",!0);R(O,$,ie,"⊶","\\origof",!0);R(O,$,ie,"⊷","\\imageof",!0);R(O,ne,ie,"⊸","\\multimap",!0);R(O,ne,ie,"↭","\\leftrightsquigarrow",!0);R(O,ne,ie,"⇉","\\rightrightarrows",!0);R(O,ne,ie,"⇄","\\rightleftarrows",!0);R(O,ne,ie,"↠","\\twoheadrightarrow",!0);R(O,ne,ie,"↣","\\rightarrowtail",!0);R(O,ne,ie,"↬","\\looparrowright",!0);R(O,ne,ie,"↷","\\curvearrowright",!0);R(O,ne,ie,"↻","\\circlearrowright",!0);R(O,ne,ie,"↱","\\Rsh",!0);R(O,ne,ie,"⇊","\\downdownarrows",!0);R(O,ne,ie,"↾","\\upharpoonright",!0);R(O,ne,ie,"⇂","\\downharpoonright",!0);R(O,ne,ie,"⇝","\\rightsquigarrow",!0);R(O,ne,ie,"⇝","\\leadsto");R(O,ne,ie,"⇛","\\Rrightarrow",!0);R(O,ne,ie,"↾","\\restriction");R(O,$,me,"‘","`");R(O,$,me,"$","\\$");R(Ve,$,me,"$","\\$");R(Ve,$,me,"$","\\textdollar");R(O,$,me,"%","\\%");R(Ve,$,me,"%","\\%");R(O,$,me,"_","\\_");R(Ve,$,me,"_","\\_");R(Ve,$,me,"_","\\textunderscore");R(O,$,me,"∠","\\angle",!0);R(O,$,me,"∞","\\infty",!0);R(O,$,me,"′","\\prime");R(O,$,me,"△","\\triangle");R(O,$,me,"Γ","\\Gamma",!0);R(O,$,me,"Δ","\\Delta",!0);R(O,$,me,"Θ","\\Theta",!0);R(O,$,me,"Λ","\\Lambda",!0);R(O,$,me,"Ξ","\\Xi",!0);R(O,$,me,"Π","\\Pi",!0);R(O,$,me,"Σ","\\Sigma",!0);R(O,$,me,"Υ","\\Upsilon",!0);R(O,$,me,"Φ","\\Phi",!0);R(O,$,me,"Ψ","\\Psi",!0);R(O,$,me,"Ω","\\Omega",!0);R(O,$,me,"A","Α");R(O,$,me,"B","Β");R(O,$,me,"E","Ε");R(O,$,me,"Z","Ζ");R(O,$,me,"H","Η");R(O,$,me,"I","Ι");R(O,$,me,"K","Κ");R(O,$,me,"M","Μ");R(O,$,me,"N","Ν");R(O,$,me,"O","Ο");R(O,$,me,"P","Ρ");R(O,$,me,"T","Τ");R(O,$,me,"X","Χ");R(O,$,me,"¬","\\neg",!0);R(O,$,me,"¬","\\lnot");R(O,$,me,"⊤","\\top");R(O,$,me,"⊥","\\bot");R(O,$,me,"∅","\\emptyset");R(O,ne,me,"∅","\\varnothing");R(O,$,St,"α","\\alpha",!0);R(O,$,St,"β","\\beta",!0);R(O,$,St,"γ","\\gamma",!0);R(O,$,St,"δ","\\delta",!0);R(O,$,St,"ϵ","\\epsilon",!0);R(O,$,St,"ζ","\\zeta",!0);R(O,$,St,"η","\\eta",!0);R(O,$,St,"θ","\\theta",!0);R(O,$,St,"ι","\\iota",!0);R(O,$,St,"κ","\\kappa",!0);R(O,$,St,"λ","\\lambda",!0);R(O,$,St,"μ","\\mu",!0);R(O,$,St,"ν","\\nu",!0);R(O,$,St,"ξ","\\xi",!0);R(O,$,St,"ο","\\omicron",!0);R(O,$,St,"π","\\pi",!0);R(O,$,St,"ρ","\\rho",!0);R(O,$,St,"σ","\\sigma",!0);R(O,$,St,"τ","\\tau",!0);R(O,$,St,"υ","\\upsilon",!0);R(O,$,St,"ϕ","\\phi",!0);R(O,$,St,"χ","\\chi",!0);R(O,$,St,"ψ","\\psi",!0);R(O,$,St,"ω","\\omega",!0);R(O,$,St,"ε","\\varepsilon",!0);R(O,$,St,"ϑ","\\vartheta",!0);R(O,$,St,"ϖ","\\varpi",!0);R(O,$,St,"ϱ","\\varrho",!0);R(O,$,St,"ς","\\varsigma",!0);R(O,$,St,"φ","\\varphi",!0);R(O,$,pt,"∗","*",!0);R(O,$,pt,"+","+");R(O,$,pt,"−","-",!0);R(O,$,pt,"⋅","\\cdot",!0);R(O,$,pt,"∘","\\circ",!0);R(O,$,pt,"÷","\\div",!0);R(O,$,pt,"±","\\pm",!0);R(O,$,pt,"×","\\times",!0);R(O,$,pt,"∩","\\cap",!0);R(O,$,pt,"∪","\\cup",!0);R(O,$,pt,"∖","\\setminus",!0);R(O,$,pt,"∧","\\land");R(O,$,pt,"∨","\\lor");R(O,$,pt,"∧","\\wedge",!0);R(O,$,pt,"∨","\\vee",!0);R(O,$,me,"√","\\surd");R(O,$,Yr,"⟨","\\langle",!0);R(O,$,Yr,"∣","\\lvert");R(O,$,Yr,"∥","\\lVert");R(O,$,Cr,"?","?");R(O,$,Cr,"!","!");R(O,$,Cr,"⟩","\\rangle",!0);R(O,$,Cr,"∣","\\rvert");R(O,$,Cr,"∥","\\rVert");R(O,$,ie,"=","=");R(O,$,ie,":",":");R(O,$,ie,"≈","\\approx",!0);R(O,$,ie,"≅","\\cong",!0);R(O,$,ie,"≥","\\ge");R(O,$,ie,"≥","\\geq",!0);R(O,$,ie,"←","\\gets");R(O,$,ie,">","\\gt",!0);R(O,$,ie,"∈","\\in",!0);R(O,$,ie,"","\\@not");R(O,$,ie,"⊂","\\subset",!0);R(O,$,ie,"⊃","\\supset",!0);R(O,$,ie,"⊆","\\subseteq",!0);R(O,$,ie,"⊇","\\supseteq",!0);R(O,ne,ie,"⊈","\\nsubseteq",!0);R(O,ne,ie,"⊉","\\nsupseteq",!0);R(O,$,ie,"⊨","\\models");R(O,$,ie,"←","\\leftarrow",!0);R(O,$,ie,"≤","\\le");R(O,$,ie,"≤","\\leq",!0);R(O,$,ie,"<","\\lt",!0);R(O,$,ie,"→","\\rightarrow",!0);R(O,$,ie,"→","\\to");R(O,ne,ie,"≱","\\ngeq",!0);R(O,ne,ie,"≰","\\nleq",!0);R(O,$,Oa," ","\\ ");R(O,$,Oa," ","\\space");R(O,$,Oa," ","\\nobreakspace");R(Ve,$,Oa," ","\\ ");R(Ve,$,Oa," "," ");R(Ve,$,Oa," ","\\space");R(Ve,$,Oa," ","\\nobreakspace");R(O,$,Oa,null,"\\nobreak");R(O,$,Oa,null,"\\allowbreak");R(O,$,Vc,",",",");R(O,$,Vc,";",";");R(O,ne,pt,"⊼","\\barwedge",!0);R(O,ne,pt,"⊻","\\veebar",!0);R(O,$,pt,"⊙","\\odot",!0);R(O,$,pt,"⊕","\\oplus",!0);R(O,$,pt,"⊗","\\otimes",!0);R(O,$,me,"∂","\\partial",!0);R(O,$,pt,"⊘","\\oslash",!0);R(O,ne,pt,"⊚","\\circledcirc",!0);R(O,ne,pt,"⊡","\\boxdot",!0);R(O,$,pt,"△","\\bigtriangleup");R(O,$,pt,"▽","\\bigtriangledown");R(O,$,pt,"†","\\dagger");R(O,$,pt,"⋄","\\diamond");R(O,$,pt,"⋆","\\star");R(O,$,pt,"◃","\\triangleleft");R(O,$,pt,"▹","\\triangleright");R(O,$,Yr,"{","\\{");R(Ve,$,me,"{","\\{");R(Ve,$,me,"{","\\textbraceleft");R(O,$,Cr,"}","\\}");R(Ve,$,me,"}","\\}");R(Ve,$,me,"}","\\textbraceright");R(O,$,Yr,"{","\\lbrace");R(O,$,Cr,"}","\\rbrace");R(O,$,Yr,"[","\\lbrack",!0);R(Ve,$,me,"[","\\lbrack",!0);R(O,$,Cr,"]","\\rbrack",!0);R(Ve,$,me,"]","\\rbrack",!0);R(O,$,Yr,"(","\\lparen",!0);R(O,$,Cr,")","\\rparen",!0);R(Ve,$,me,"<","\\textless",!0);R(Ve,$,me,">","\\textgreater",!0);R(O,$,Yr,"⌊","\\lfloor",!0);R(O,$,Cr,"⌋","\\rfloor",!0);R(O,$,Yr,"⌈","\\lceil",!0);R(O,$,Cr,"⌉","\\rceil",!0);R(O,$,me,"\\","\\backslash");R(O,$,me,"∣","|");R(O,$,me,"∣","\\vert");R(Ve,$,me,"|","\\textbar",!0);R(O,$,me,"∥","\\|");R(O,$,me,"∥","\\Vert");R(Ve,$,me,"∥","\\textbardbl");R(Ve,$,me,"~","\\textasciitilde");R(Ve,$,me,"\\","\\textbackslash");R(Ve,$,me,"^","\\textasciicircum");R(O,$,ie,"↑","\\uparrow",!0);R(O,$,ie,"⇑","\\Uparrow",!0);R(O,$,ie,"↓","\\downarrow",!0);R(O,$,ie,"⇓","\\Downarrow",!0);R(O,$,ie,"↕","\\updownarrow",!0);R(O,$,ie,"⇕","\\Updownarrow",!0);R(O,$,Gn,"∐","\\coprod");R(O,$,Gn,"⋁","\\bigvee");R(O,$,Gn,"⋀","\\bigwedge");R(O,$,Gn,"⨄","\\biguplus");R(O,$,Gn,"⋂","\\bigcap");R(O,$,Gn,"⋃","\\bigcup");R(O,$,Gn,"∫","\\int");R(O,$,Gn,"∫","\\intop");R(O,$,Gn,"∬","\\iint");R(O,$,Gn,"∭","\\iiint");R(O,$,Gn,"∏","\\prod");R(O,$,Gn,"∑","\\sum");R(O,$,Gn,"⨂","\\bigotimes");R(O,$,Gn,"⨁","\\bigoplus");R(O,$,Gn,"⨀","\\bigodot");R(O,$,Gn,"∮","\\oint");R(O,$,Gn,"∯","\\oiint");R(O,$,Gn,"∰","\\oiiint");R(O,$,Gn,"⨆","\\bigsqcup");R(O,$,Gn,"∫","\\smallint");R(Ve,$,ws,"…","\\textellipsis");R(O,$,ws,"…","\\mathellipsis");R(Ve,$,ws,"…","\\ldots",!0);R(O,$,ws,"…","\\ldots",!0);R(O,$,ws,"⋯","\\@cdots",!0);R(O,$,ws,"⋱","\\ddots",!0);R(O,$,me,"⋮","\\varvdots");R(Ve,$,me,"⋮","\\varvdots");R(O,$,Tn,"ˊ","\\acute");R(O,$,Tn,"ˋ","\\grave");R(O,$,Tn,"¨","\\ddot");R(O,$,Tn,"~","\\tilde");R(O,$,Tn,"ˉ","\\bar");R(O,$,Tn,"˘","\\breve");R(O,$,Tn,"ˇ","\\check");R(O,$,Tn,"^","\\hat");R(O,$,Tn,"⃗","\\vec");R(O,$,Tn,"˙","\\dot");R(O,$,Tn,"˚","\\mathring");R(O,$,St,"","\\@imath");R(O,$,St,"","\\@jmath");R(O,$,me,"ı","ı");R(O,$,me,"ȷ","ȷ");R(Ve,$,me,"ı","\\i",!0);R(Ve,$,me,"ȷ","\\j",!0);R(Ve,$,me,"ß","\\ss",!0);R(Ve,$,me,"æ","\\ae",!0);R(Ve,$,me,"œ","\\oe",!0);R(Ve,$,me,"ø","\\o",!0);R(Ve,$,me,"Æ","\\AE",!0);R(Ve,$,me,"Œ","\\OE",!0);R(Ve,$,me,"Ø","\\O",!0);R(Ve,$,Tn,"ˊ","\\'");R(Ve,$,Tn,"ˋ","\\`");R(Ve,$,Tn,"ˆ","\\^");R(Ve,$,Tn,"˜","\\~");R(Ve,$,Tn,"ˉ","\\=");R(Ve,$,Tn,"˘","\\u");R(Ve,$,Tn,"˙","\\.");R(Ve,$,Tn,"¸","\\c");R(Ve,$,Tn,"˚","\\r");R(Ve,$,Tn,"ˇ","\\v");R(Ve,$,Tn,"¨",'\\"');R(Ve,$,Tn,"˝","\\H");R(Ve,$,Tn,"◯","\\textcircled");var m6={"--":!0,"---":!0,"``":!0,"''":!0};R(Ve,$,me,"–","--",!0);R(Ve,$,me,"–","\\textendash");R(Ve,$,me,"—","---",!0);R(Ve,$,me,"—","\\textemdash");R(Ve,$,me,"‘","`",!0);R(Ve,$,me,"‘","\\textquoteleft");R(Ve,$,me,"’","'",!0);R(Ve,$,me,"’","\\textquoteright");R(Ve,$,me,"“","``",!0);R(Ve,$,me,"“","\\textquotedblleft");R(Ve,$,me,"”","''",!0);R(Ve,$,me,"”","\\textquotedblright");R(O,$,me,"°","\\degree",!0);R(Ve,$,me,"°","\\degree");R(Ve,$,me,"°","\\textdegree",!0);R(O,$,me,"£","\\pounds");R(O,$,me,"£","\\mathsterling",!0);R(Ve,$,me,"£","\\pounds");R(Ve,$,me,"£","\\textsterling",!0);R(O,ne,me,"✠","\\maltese");R(Ve,ne,me,"✠","\\maltese");var Rm='0123456789/@."';for(var Xd=0;Xd<Rm.length;Xd++){var Im=Rm.charAt(Xd);R(O,$,me,Im,Im)}var Om='0123456789!@*()-=+";:?/.,';for(var Zd=0;Zd<Om.length;Zd++){var Hm=Om.charAt(Zd);R(Ve,$,me,Hm,Hm)}var hc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Yd=0;Yd<hc.length;Yd++){var h0=hc.charAt(Yd);R(O,$,St,h0,h0),R(Ve,$,me,h0,h0)}R(O,ne,me,"C","ℂ");R(Ve,ne,me,"C","ℂ");R(O,ne,me,"H","ℍ");R(Ve,ne,me,"H","ℍ");R(O,ne,me,"N","ℕ");R(Ve,ne,me,"N","ℕ");R(O,ne,me,"P","ℙ");R(Ve,ne,me,"P","ℙ");R(O,ne,me,"Q","ℚ");R(Ve,ne,me,"Q","ℚ");R(O,ne,me,"R","ℝ");R(Ve,ne,me,"R","ℝ");R(O,ne,me,"Z","ℤ");R(Ve,ne,me,"Z","ℤ");R(O,$,St,"h","ℎ");R(Ve,$,St,"h","ℎ");var Lt="";for(var br=0;br<hc.length;br++){var Hn=hc.charAt(br);Lt=String.fromCharCode(55349,56320+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56372+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56424+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56580+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56684+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56736+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56788+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56840+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56944+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),br<26&&(Lt=String.fromCharCode(55349,56632+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt),Lt=String.fromCharCode(55349,56476+br),R(O,$,St,Hn,Lt),R(Ve,$,me,Hn,Lt))}Lt=String.fromCharCode(55349,56668);R(O,$,St,"k",Lt);R(Ve,$,me,"k",Lt);for(var _o=0;_o<10;_o++){var Ua=_o.toString();Lt=String.fromCharCode(55349,57294+_o),R(O,$,St,Ua,Lt),R(Ve,$,me,Ua,Lt),Lt=String.fromCharCode(55349,57314+_o),R(O,$,St,Ua,Lt),R(Ve,$,me,Ua,Lt),Lt=String.fromCharCode(55349,57324+_o),R(O,$,St,Ua,Lt),R(Ve,$,me,Ua,Lt),Lt=String.fromCharCode(55349,57334+_o),R(O,$,St,Ua,Lt),R(Ve,$,me,Ua,Lt)}var np="ÐÞþ";for(var Jd=0;Jd<np.length;Jd++){var p0=np.charAt(Jd);R(O,$,St,p0,p0),R(Ve,$,me,p0,p0)}var f0=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Pm=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],$9=function(t,e){var n=t.charCodeAt(0),r=t.charCodeAt(1),o=(n-55296)*1024+(r-56320)+65536,l=e==="math"?0:1;if(119808<=o&&o<120484){var h=Math.floor((o-119808)/26);return[f0[h][2],f0[h][l]]}else if(120782<=o&&o<=120831){var c=Math.floor((o-120782)/10);return[Pm[c][2],Pm[c][l]]}else{if(o===120485||o===120486)return[f0[0][2],f0[0][l]];if(120486<o&&o<120782)return["",""];throw new et("Unsupported character: "+t)}},Wc=function(t,e,n){return wn[n][t]&&wn[n][t].replace&&(t=wn[n][t].replace),{value:t,metrics:Tf(t,e,n)}},ki=function(t,e,n,r,o){var l=Wc(t,e,n),h=l.metrics;t=l.value;var c;if(h){var p=h.italic;(n==="text"||r&&r.font==="mathit")&&(p=0),c=new ui(t,h.height,h.depth,p,h.skew,h.width,o)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+e+"' and mode '"+n+"'")),c=new ui(t,0,0,0,0,0,o);if(r){c.maxFontSize=r.sizeMultiplier,r.style.isTight()&&c.classes.push("mtight");var v=r.getColor();v&&(c.style.color=v)}return c},U9=function(t,e,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&Wc(t,"Main-Bold",e).metrics?ki(t,"Main-Bold",e,n,r.concat(["mathbf"])):t==="\\"||wn[e][t].font==="main"?ki(t,"Main-Regular",e,n,r):ki(t,"AMS-Regular",e,n,r.concat(["amsrm"]))},V9=function(t,e,n,r,o){return o!=="textord"&&Wc(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},W9=function(t,e,n){var r=t.mode,o=t.text,l=["mord"],h=r==="math"||r==="text"&&e.font,c=h?e.font:e.fontFamily,p="",v="";if(o.charCodeAt(0)===55349&&([p,v]=$9(o,r)),p.length>0)return ki(o,p,r,e,l.concat(v));if(c){var b,g;if(c==="boldsymbol"){var m=V9(o,r,e,l,n);b=m.fontName,g=[m.fontClass]}else h?(b=b6[c].fontName,g=[c]):(b=m0(c,e.fontWeight,e.fontShape),g=[c,e.fontWeight,e.fontShape]);if(Wc(o,b,r).metrics)return ki(o,b,r,e,l.concat(g));if(m6.hasOwnProperty(o)&&b.slice(0,10)==="Typewriter"){for(var x=[],w=0;w<o.length;w++)x.push(ki(o[w],b,r,e,l.concat(g)));return v6(x)}}if(n==="mathord")return ki(o,"Math-Italic",r,e,l.concat(["mathnormal"]));if(n==="textord"){var S=wn[r][o]&&wn[r][o].font;if(S==="ams"){var k=m0("amsrm",e.fontWeight,e.fontShape);return ki(o,k,r,e,l.concat("amsrm",e.fontWeight,e.fontShape))}else if(S==="main"||!S){var C=m0("textrm",e.fontWeight,e.fontShape);return ki(o,C,r,e,l.concat(e.fontWeight,e.fontShape))}else{var T=m0(S,e.fontWeight,e.fontShape);return ki(o,T,r,e,l.concat(T,e.fontWeight,e.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},G9=(t,e)=>{if(ro(t.classes)!==ro(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var n=t.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in t.style)if(t.style.hasOwnProperty(r)&&t.style[r]!==e.style[r])return!1;for(var o in e.style)if(e.style.hasOwnProperty(o)&&t.style[o]!==e.style[o])return!1;return!0},K9=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n instanceof ui&&r instanceof ui&&G9(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,t.splice(e+1,1),e--)}return t},Mf=function(t){for(var e=0,n=0,r=0,o=0;o<t.children.length;o++){var l=t.children[o];l.height>e&&(e=l.height),l.depth>n&&(n=l.depth),l.maxFontSize>r&&(r=l.maxFontSize)}t.height=e,t.depth=n,t.maxFontSize=r},Dr=function(t,e,n,r){var o=new Gl(t,e,n,r);return Mf(o),o},g6=(t,e,n,r)=>new Gl(t,e,n,r),X9=function(t,e,n){var r=Dr([t],[],e);return r.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),r.style.borderBottomWidth=it(r.height),r.maxFontSize=1,r},Z9=function(t,e,n,r){var o=new Af(t,e,n,r);return Mf(o),o},v6=function(t){var e=new Wl(t);return Mf(e),e},Y9=function(t,e){return t instanceof Wl?Dr([],[t],e):t},J9=function(t){if(t.positionType==="individualShift"){for(var e=t.children,n=[e[0]],r=-e[0].shift-e[0].elem.depth,o=r,l=1;l<e.length;l++){var h=-e[l].shift-o-e[l].elem.depth,c=h-(e[l-1].elem.height+e[l-1].elem.depth);o=o+h,n.push({type:"kern",size:c}),n.push(e[l])}return{children:n,depth:r}}var p;if(t.positionType==="top"){for(var v=t.positionData,b=0;b<t.children.length;b++){var g=t.children[b];v-=g.type==="kern"?g.size:g.elem.height+g.elem.depth}p=v}else if(t.positionType==="bottom")p=-t.positionData;else{var m=t.children[0];if(m.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")p=-m.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")p=-m.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:p}},Q9=function(t,e){for(var{children:n,depth:r}=J9(t),o=0,l=0;l<n.length;l++){var h=n[l];if(h.type==="elem"){var c=h.elem;o=Math.max(o,c.maxFontSize,c.height)}}o+=2;var p=Dr(["pstrut"],[]);p.style.height=it(o);for(var v=[],b=r,g=r,m=r,x=0;x<n.length;x++){var w=n[x];if(w.type==="kern")m+=w.size;else{var S=w.elem,k=w.wrapperClasses||[],C=w.wrapperStyle||{},T=Dr(k,[p,S],void 0,C);T.style.top=it(-o-m-S.depth),w.marginLeft&&(T.style.marginLeft=w.marginLeft),w.marginRight&&(T.style.marginRight=w.marginRight),v.push(T),m+=S.height+S.depth}b=Math.min(b,m),g=Math.max(g,m)}var A=Dr(["vlist"],v);A.style.height=it(g);var M;if(b<0){var y=Dr([],[]),N=Dr(["vlist"],[y]);N.style.height=it(-b);var z=Dr(["vlist-s"],[new ui("")]);M=[Dr(["vlist-r"],[A,z]),Dr(["vlist-r"],[N])]}else M=[Dr(["vlist-r"],[A])];var F=Dr(["vlist-t"],M);return M.length===2&&F.classes.push("vlist-t2"),F.height=g,F.depth=-b,F},ex=(t,e)=>{var n=Dr(["mspace"],[],e),r=Nn(t,e);return n.style.marginRight=it(r),n},m0=function(t,e,n){var r="";switch(t){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=t}var o;return e==="textbf"&&n==="textit"?o="BoldItalic":e==="textbf"?o="Bold":e==="textit"?o="Italic":o="Regular",r+"-"+o},b6={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"}},y6={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},tx=function(t,e){var[n,r,o]=y6[t],l=new io(n),h=new Ca([l],{width:it(r),height:it(o),style:"width:"+it(r),viewBox:"0 0 "+1e3*r+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),c=g6(["overlay"],[h],e);return c.height=o,c.style.height=it(o),c.style.width=it(r),c},Se={fontMap:b6,makeSymbol:ki,mathsym:U9,makeSpan:Dr,makeSvgSpan:g6,makeLineSpan:X9,makeAnchor:Z9,makeFragment:v6,wrapFragment:Y9,makeVList:Q9,makeOrd:W9,makeGlue:ex,staticSvg:tx,svgData:y6,tryCombineChars:K9},Ln={number:3,unit:"mu"},No={number:4,unit:"mu"},ca={number:5,unit:"mu"},nx={mord:{mop:Ln,mbin:No,mrel:ca,minner:Ln},mop:{mord:Ln,mop:Ln,mrel:ca,minner:Ln},mbin:{mord:No,mop:No,mopen:No,minner:No},mrel:{mord:ca,mop:ca,mopen:ca,minner:ca},mopen:{},mclose:{mop:Ln,mbin:No,mrel:ca,minner:Ln},mpunct:{mord:Ln,mop:Ln,mrel:ca,mopen:Ln,mclose:Ln,mpunct:Ln,minner:Ln},minner:{mord:Ln,mop:Ln,mbin:No,mrel:ca,mopen:Ln,mpunct:Ln,minner:Ln}},rx={mord:{mop:Ln},mop:{mord:Ln,mop:Ln},mbin:{},mrel:{},mopen:{},mclose:{mop:Ln},mpunct:{},minner:{mop:Ln}},w6={},pc={},fc={};function ut(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o},p=0;p<n.length;++p)w6[n[p]]=c;e&&(l&&(pc[e]=l),h&&(fc[e]=h))}function Wo(t){var{type:e,htmlBuilder:n,mathmlBuilder:r}=t;ut({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var mc=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},qn=function(t){return t.type==="ordgroup"?t.body:[t]},La=Se.makeSpan,ix=["leftmost","mbin","mopen","mrel","mop","mpunct"],ax=["rightmost","mrel","mclose","mpunct"],ox={display:Tt.DISPLAY,text:Tt.TEXT,script:Tt.SCRIPT,scriptscript:Tt.SCRIPTSCRIPT},sx={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Qn=function(t,e,n,r){r===void 0&&(r=[null,null]);for(var o=[],l=0;l<t.length;l++){var h=Jt(t[l],e);if(h instanceof Wl){var c=h.children;o.push(...c)}else o.push(h)}if(Se.tryCombineChars(o),!n)return o;var p=e;if(t.length===1){var v=t[0];v.type==="sizing"?p=e.havingSize(v.size):v.type==="styling"&&(p=e.havingStyle(ox[v.style]))}var b=La([r[0]||"leftmost"],[],e),g=La([r[1]||"rightmost"],[],e),m=n==="root";return zm(o,(x,w)=>{var S=w.classes[0],k=x.classes[0];S==="mbin"&&wt.contains(ax,k)?w.classes[0]="mord":k==="mbin"&&wt.contains(ix,S)&&(x.classes[0]="mord")},{node:b},g,m),zm(o,(x,w)=>{var S=rp(w),k=rp(x),C=S&&k?x.hasClass("mtight")?rx[S][k]:nx[S][k]:null;if(C)return Se.makeGlue(C,p)},{node:b},g,m),o},zm=function t(e,n,r,o,l){o&&e.push(o);for(var h=0;h<e.length;h++){var c=e[h],p=x6(c);if(p){t(p.children,n,r,null,l);continue}var v=!c.hasClass("mspace");if(v){var b=n(c,r.node);b&&(r.insertAfter?r.insertAfter(b):(e.unshift(b),h++))}v?r.node=c:l&&c.hasClass("newline")&&(r.node=La(["leftmost"])),r.insertAfter=(g=>m=>{e.splice(g+1,0,m),h++})(h)}o&&e.pop()},x6=function(t){return t instanceof Wl||t instanceof Af||t instanceof Gl&&t.hasClass("enclosing")?t:null},lx=function t(e,n){var r=x6(e);if(r){var o=r.children;if(o.length){if(n==="right")return t(o[o.length-1],"right");if(n==="left")return t(o[0],"left")}}return e},rp=function(t,e){return t?(e&&(t=lx(t,e)),sx[t.classes[0]]||null):null},Hl=function(t,e){var n=["nulldelimiter"].concat(t.baseSizingClasses());return La(e.concat(n))},Jt=function(t,e,n){if(!t)return La();if(pc[t.type]){var r=pc[t.type](t,e);if(n&&e.size!==n.size){r=La(e.sizingClasses(n),[r],e);var o=e.sizeMultiplier/n.sizeMultiplier;r.height*=o,r.depth*=o}return r}else throw new et("Got group of unknown type: '"+t.type+"'")};function g0(t,e){var n=La(["base"],t,e),r=La(["strut"]);return r.style.height=it(n.height+n.depth),n.depth&&(r.style.verticalAlign=it(-n.depth)),n.children.unshift(r),n}function ip(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var r=Qn(t,e,"root"),o;r.length===2&&r[1].hasClass("tag")&&(o=r.pop());for(var l=[],h=[],c=0;c<r.length;c++)if(h.push(r[c]),r[c].hasClass("mbin")||r[c].hasClass("mrel")||r[c].hasClass("allowbreak")){for(var p=!1;c<r.length-1&&r[c+1].hasClass("mspace")&&!r[c+1].hasClass("newline");)c++,h.push(r[c]),r[c].hasClass("nobreak")&&(p=!0);p||(l.push(g0(h,e)),h=[])}else r[c].hasClass("newline")&&(h.pop(),h.length>0&&(l.push(g0(h,e)),h=[]),l.push(r[c]));h.length>0&&l.push(g0(h,e));var v;n?(v=g0(Qn(n,e,!0)),v.classes=["tag"],l.push(v)):o&&l.push(o);var b=La(["katex-html"],l);if(b.setAttribute("aria-hidden","true"),v){var g=v.children[0];g.style.height=it(b.height+b.depth),b.depth&&(g.style.verticalAlign=it(-b.depth))}return b}function k6(t){return new Wl(t)}class Gr{constructor(e,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(e,n){this.attributes[e]=n}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);this.classes.length>0&&(e.className=ro(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof Fi&&this.children[r+1]instanceof Fi){for(var o=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof Fi;)o+=this.children[++r].toText();e.appendChild(new Fi(o).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="',e+=wt.escape(this.attributes[n]),e+='"');this.classes.length>0&&(e+=' class ="'+wt.escape(ro(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class Fi{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return wt.escape(this.toText())}toText(){return this.text}}class cx{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character=" ":e>=-.05556&&e<=-.05555?this.character=" ":e>=-.1667&&e<=-.1666?this.character=" ":e>=-.2223&&e<=-.2222?this.character=" ":e>=-.2778&&e<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",it(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+it(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ze={MathNode:Gr,TextNode:Fi,SpaceNode:cx,newDocumentFragment:k6},di=function(t,e,n){return wn[e][t]&&wn[e][t].replace&&t.charCodeAt(0)!==55349&&!(m6.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=wn[e][t].replace),new Ze.TextNode(t)},Cf=function(t){return t.length===1?t[0]:new Ze.MathNode("mrow",t)},Lf=function(t,e){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold";var n=e.font;if(!n||n==="mathnormal")return null;var r=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var o=t.text;if(wt.contains(["\\imath","\\jmath"],o))return null;wn[r][o]&&wn[r][o].replace&&(o=wn[r][o].replace);var l=Se.fontMap[n].fontName;return Tf(o,l,r)?Se.fontMap[n].variant:null};function Qd(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof Fi&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var n=t.children[0];return n instanceof Fi&&n.text===","}else return!1}var Or=function(t,e,n){if(t.length===1){var r=vn(t[0],e);return n&&r instanceof Gr&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var o=[],l,h=0;h<t.length;h++){var c=vn(t[h],e);if(c instanceof Gr&&l instanceof Gr){if(c.type==="mtext"&&l.type==="mtext"&&c.getAttribute("mathvariant")===l.getAttribute("mathvariant")){l.children.push(...c.children);continue}else if(c.type==="mn"&&l.type==="mn"){l.children.push(...c.children);continue}else if(Qd(c)&&l.type==="mn"){l.children.push(...c.children);continue}else if(c.type==="mn"&&Qd(l))c.children=[...l.children,...c.children],o.pop();else if((c.type==="msup"||c.type==="msub")&&c.children.length>=1&&(l.type==="mn"||Qd(l))){var p=c.children[0];p instanceof Gr&&p.type==="mn"&&(p.children=[...l.children,...p.children],o.pop())}else if(l.type==="mi"&&l.children.length===1){var v=l.children[0];if(v instanceof Fi&&v.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var b=c.children[0];b instanceof Fi&&b.text.length>0&&(b.text=b.text.slice(0,1)+"̸"+b.text.slice(1),o.pop())}}}o.push(c),l=c}return o},ao=function(t,e,n){return Cf(Or(t,e,n))},vn=function(t,e){if(!t)return new Ze.MathNode("mrow");if(fc[t.type]){var n=fc[t.type](t,e);return n}else throw new et("Got group of unknown type: '"+t.type+"'")};function Bm(t,e,n,r,o){var l=Or(t,n),h;l.length===1&&l[0]instanceof Gr&&wt.contains(["mrow","mtable"],l[0].type)?h=l[0]:h=new Ze.MathNode("mrow",l);var c=new Ze.MathNode("annotation",[new Ze.TextNode(e)]);c.setAttribute("encoding","application/x-tex");var p=new Ze.MathNode("semantics",[h,c]),v=new Ze.MathNode("math",[p]);v.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&v.setAttribute("display","block");var b=o?"katex":"katex-mathml";return Se.makeSpan([b],[v])}var S6=function(t){return new ha({style:t.displayMode?Tt.DISPLAY:Tt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},E6=function(t,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),t=Se.makeSpan(n,[t])}return t},ux=function(t,e,n){var r=S6(n),o;if(n.output==="mathml")return Bm(t,e,r,n.displayMode,!0);if(n.output==="html"){var l=ip(t,r);o=Se.makeSpan(["katex"],[l])}else{var h=Bm(t,e,r,n.displayMode,!1),c=ip(t,r);o=Se.makeSpan(["katex"],[h,c])}return E6(o,n)},dx=function(t,e,n){var r=S6(n),o=ip(t,r),l=Se.makeSpan(["katex"],[o]);return E6(l,n)},hx={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",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":"="},px=function(t){var e=new Ze.MathNode("mo",[new Ze.TextNode(hx[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},fx={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},mx=function(t){return t.type==="ordgroup"?t.body.length:1},gx=function(t,e){function n(){var h=4e5,c=t.label.slice(1);if(wt.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=t,v=mx(p.base),b,g,m;if(v>5)c==="widehat"||c==="widecheck"?(b=420,h=2364,m=.42,g=c+"4"):(b=312,h=2340,m=.34,g="tilde4");else{var x=[1,1,2,2,3,3][v];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][x],b=[0,239,300,360,420][x],m=[0,.24,.3,.3,.36,.42][x],g=c+x):(h=[0,600,1033,2339,2340][x],b=[0,260,286,306,312][x],m=[0,.26,.286,.3,.306,.34][x],g="tilde"+x)}var w=new io(g),S=new Ca([w],{width:"100%",height:it(m),viewBox:"0 0 "+h+" "+b,preserveAspectRatio:"none"});return{span:Se.makeSvgSpan([],[S],e),minWidth:0,height:m}}else{var k=[],C=fx[c],[T,A,M]=C,y=M/1e3,N=T.length,z,F;if(N===1){var P=C[3];z=["hide-tail"],F=[P]}else if(N===2)z=["halfarrow-left","halfarrow-right"],F=["xMinYMin","xMaxYMin"];else if(N===3)z=["brace-left","brace-center","brace-right"],F=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
||
`+N+" children.");for(var Y=0;Y<N;Y++){var te=new io(T[Y]),de=new Ca([te],{width:"400em",height:it(y),viewBox:"0 0 "+h+" "+M,preserveAspectRatio:F[Y]+" slice"}),Ce=Se.makeSvgSpan([z[Y]],[de],e);if(N===1)return{span:Ce,minWidth:A,height:y};Ce.style.height=it(y),k.push(Ce)}return{span:Se.makeSpan(["stretchy"],k,e),minWidth:A,height:y}}}var{span:r,minWidth:o,height:l}=n();return r.height=l,r.style.height=it(l),o>0&&(r.style.minWidth=it(o)),r},vx=function(t,e,n,r,o){var l,h=t.height+t.depth+n+r;if(/fbox|color|angl/.test(e)){if(l=Se.makeSpan(["stretchy",e],[],o),e==="fbox"){var c=o.color&&o.getColor();c&&(l.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(e)&&p.push(new tp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&p.push(new tp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var v=new Ca(p,{width:"100%",height:it(h)});l=Se.makeSvgSpan([],[v],o)}return l.height=h,l.style.height=it(h),l},_a={encloseSpan:vx,mathMLnode:px,svgSpan:gx};function qt(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function _f(t){var e=Gc(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function Gc(t){return t&&(t.type==="atom"||j9.hasOwnProperty(t.type))?t:null}var Nf=(t,e)=>{var n,r,o;t&&t.type==="supsub"?(r=qt(t.base,"accent"),n=r.base,t.base=n,o=F9(Jt(t,e)),t.base=r):(r=qt(t,"accent"),n=r.base);var l=Jt(n,e.havingCrampedStyle()),h=r.isShifty&&wt.isCharacterBox(n),c=0;if(h){var p=wt.getBaseElem(n),v=Jt(p,e.havingCrampedStyle());c=Dm(v).skew}var b=r.label==="\\c",g=b?l.height+l.depth:Math.min(l.height,e.fontMetrics().xHeight),m;if(r.isStretchy)m=_a.svgSpan(r,e),m=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+it(2*c)+")",marginLeft:it(2*c)}:void 0}]},e);else{var x,w;r.label==="\\vec"?(x=Se.staticSvg("vec",e),w=Se.svgData.vec[1]):(x=Se.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=Dm(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Se.makeSpan(["accent-body"],[x]);var S=r.label==="\\textcircled";S&&(m.classes.push("accent-full"),g=l.height);var k=c;S||(k-=w/2),m.style.left=it(k),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Se.makeSpan(["mord","accent"],[m],e);return o?(o.children[0]=C,o.height=Math.max(C.height,o.height),o.classes[0]="mord",o):C},T6=(t,e)=>{var n=t.isStretchy?_a.mathMLnode(t.label):new Ze.MathNode("mo",[di(t.label,t.mode)]),r=new Ze.MathNode("mover",[vn(t.base,e),n]);return r.setAttribute("accent","true"),r},bx=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ut({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var n=mc(e[0]),r=!bx.test(t.funcName),o=!r||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:Nf,mathmlBuilder:T6});ut({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],r=t.parser.mode;return r==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Nf,mathmlBuilder:T6});ut({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:(t,e)=>{var n=Jt(t.base,e),r=_a.svgSpan(t,e),o=t.label==="\\utilde"?.12:0,l=Se.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},e);return Se.makeSpan(["mord","accentunder"],[l],e)},mathmlBuilder:(t,e)=>{var n=_a.mathMLnode(t.label),r=new Ze.MathNode("munder",[vn(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var v0=t=>{var e=new Ze.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ut({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r,funcName:o}=t;return{type:"xArrow",mode:r.mode,label:o,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,r=e.havingStyle(n.sup()),o=Se.wrapFragment(Jt(t.body,r,e),e),l=t.label.slice(0,2)==="\\x"?"x":"cd";o.classes.push(l+"-arrow-pad");var h;t.below&&(r=e.havingStyle(n.sub()),h=Se.wrapFragment(Jt(t.below,r,e),e),h.classes.push(l+"-arrow-pad"));var c=_a.svgSpan(t,e),p=-e.fontMetrics().axisHeight+.5*c.height,v=-e.fontMetrics().axisHeight-.5*c.height-.111;(o.depth>.25||t.label==="\\xleftequilibrium")&&(v-=o.depth);var b;if(h){var g=-e.fontMetrics().axisHeight+h.height+.5*c.height+.111;b=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p},{type:"elem",elem:h,shift:g}]},e)}else b=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p}]},e);return b.children[0].children[0].children[1].classes.push("svg-align"),Se.makeSpan(["mrel","x-arrow"],[b],e)},mathmlBuilder(t,e){var n=_a.mathMLnode(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(t.body){var o=v0(vn(t.body,e));if(t.below){var l=v0(vn(t.below,e));r=new Ze.MathNode("munderover",[n,l,o])}else r=new Ze.MathNode("mover",[n,o])}else if(t.below){var h=v0(vn(t.below,e));r=new Ze.MathNode("munder",[n,h])}else r=v0(),r=new Ze.MathNode("mover",[n,r]);return r}});var yx=Se.makeSpan;function A6(t,e){var n=Qn(t.body,e,!0);return yx([t.mclass],n,e)}function M6(t,e){var n,r=Or(t.body,e);return t.mclass==="minner"?n=new Ze.MathNode("mpadded",r):t.mclass==="mord"?t.isCharacterBox?(n=r[0],n.type="mi"):n=new Ze.MathNode("mi",r):(t.isCharacterBox?(n=r[0],n.type="mo"):n=new Ze.MathNode("mo",r),t.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):t.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):t.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}ut({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:qn(o),isCharacterBox:wt.isCharacterBox(o)}},htmlBuilder:A6,mathmlBuilder:M6});var Kc=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};ut({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:Kc(e[0]),body:qn(e[1]),isCharacterBox:wt.isCharacterBox(e[1])}}});ut({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:r}=t,o=e[1],l=e[0],h;r!=="\\stackrel"?h=Kc(o):h="mrel";var c={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:qn(o)},p={type:"supsub",mode:l.mode,base:c,sup:r==="\\underset"?null:l,sub:r==="\\underset"?l:null};return{type:"mclass",mode:n.mode,mclass:h,body:[p],isCharacterBox:wt.isCharacterBox(p)}},htmlBuilder:A6,mathmlBuilder:M6});ut({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:Kc(e[0]),body:qn(e[0])}},htmlBuilder(t,e){var n=Qn(t.body,e,!0),r=Se.makeSpan([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=Or(t.body,e),r=new Ze.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var wx={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Fm=()=>({type:"styling",body:[],mode:"math",style:"display"}),qm=t=>t.type==="textord"&&t.text==="@",xx=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function kx(t,e,n){var r=wx[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var o=n.callFunction("\\\\cdleft",[e[0]],[]),l={type:"atom",text:r,mode:"math",family:"rel"},h=n.callFunction("\\Big",[l],[]),c=n.callFunction("\\\\cdright",[e[1]],[]),p={type:"ordgroup",mode:"math",body:[o,h,c]};return n.callFunction("\\\\cdparent",[p],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var v={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[v],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Sx(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if(n==="&"||n==="\\\\")t.consume();else if(n==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new et("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var r=[],o=[r],l=0;l<e.length;l++){for(var h=e[l],c=Fm(),p=0;p<h.length;p++)if(!qm(h[p]))c.body.push(h[p]);else{r.push(c),p+=1;var v=_f(h[p]).text,b=new Array(2);if(b[0]={type:"ordgroup",mode:"math",body:[]},b[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(v)>-1))if("<>AV".indexOf(v)>-1)for(var g=0;g<2;g++){for(var m=!0,x=p+1;x<h.length;x++){if(xx(h[x],v)){m=!1,p=x;break}if(qm(h[x]))throw new et("Missing a "+v+" character to complete a CD arrow.",h[x]);b[g].body.push(h[x])}if(m)throw new et("Missing a "+v+" character to complete a CD arrow.",h[p])}else throw new et('Expected one of "<>AV=|." after @',h[p]);var w=kx(v,b,t),S={type:"styling",body:[w],mode:"math",style:"display"};r.push(S),c=Fm()}l%2===0?r.push(c):r.shift(),r=[],o.push(r)}t.gullet.endGroup(),t.gullet.endGroup();var k=new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}ut({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),r=Se.wrapFragment(Jt(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=it(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){var n=new Ze.MathNode("mrow",[vn(t.label,e)]);return n=new Ze.MathNode("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ze.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});ut({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=Se.wrapFragment(Jt(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new Ze.MathNode("mrow",[vn(t.fragment,e)])}});ut({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,r=qt(e[0],"ordgroup"),o=r.body,l="",h=0;h<o.length;h++){var c=qt(o[h],"textord");l+=c.text}var p=parseInt(l),v;if(isNaN(p))throw new et("\\@char has non-numeric argument "+l);if(p<0||p>=1114111)throw new et("\\@char with invalid code point "+l);return p<=65535?v=String.fromCharCode(p):(p-=65536,v=String.fromCharCode((p>>10)+55296,(p&1023)+56320)),{type:"textord",mode:n.mode,text:v}}});var C6=(t,e)=>{var n=Qn(t.body,e.withColor(t.color),!1);return Se.makeFragment(n)},L6=(t,e)=>{var n=Or(t.body,e.withColor(t.color)),r=new Ze.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r};ut({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=qt(e[0],"color-token").color,o=e[1];return{type:"color",mode:n.mode,color:r,body:qn(o)}},htmlBuilder:C6,mathmlBuilder:L6});ut({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,o=qt(e[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var l=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:l}},htmlBuilder:C6,mathmlBuilder:L6});ut({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,o=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,l=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:l,size:o&&qt(o,"size").value}},htmlBuilder(t,e){var n=Se.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=it(Nn(t.size,e)))),n},mathmlBuilder(t,e){var n=new Ze.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",it(Nn(t.size,e)))),n}});var ap={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},_6=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new et("Expected a control sequence",t);return e},Ex=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},N6=(t,e,n,r)=>{var o=t.gullet.macros.get(n.text);o==null&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,o,r)};ut({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var r=e.fetch();if(ap[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=ap[r.text]),qt(e.parseFunction(),"internal");throw new et("Invalid token after macro prefix",r)}});ut({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=e.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new et("Expected a control sequence",r);for(var l=0,h,c=[[]];e.gullet.future().text!=="{";)if(r=e.gullet.popToken(),r.text==="#"){if(e.gullet.future().text==="{"){h=e.gullet.future(),c[l].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new et('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==l+1)throw new et('Argument number "'+r.text+'" out of order');l++,c.push([])}else{if(r.text==="EOF")throw new et("Expected a macro definition");c[l].push(r.text)}var{tokens:p}=e.gullet.consumeArg();return h&&p.unshift(h),(n==="\\edef"||n==="\\xdef")&&(p=e.gullet.expandTokens(p),p.reverse()),e.gullet.macros.set(o,{tokens:p,numArgs:l,delimiters:c},n===ap[n]),{type:"internal",mode:e.mode}}});ut({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=_6(e.gullet.popToken());e.gullet.consumeSpaces();var o=Ex(e);return N6(e,r,o,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});ut({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=_6(e.gullet.popToken()),o=e.gullet.popToken(),l=e.gullet.popToken();return N6(e,r,l,n==="\\\\globalfuture"),e.gullet.pushToken(l),e.gullet.pushToken(o),{type:"internal",mode:e.mode}}});var ml=function(t,e,n){var r=wn.math[t]&&wn.math[t].replace,o=Tf(r||t,e,n);if(!o)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return o},Df=function(t,e,n,r){var o=n.havingBaseStyle(e),l=Se.makeSpan(r.concat(o.sizingClasses(n)),[t],n),h=o.sizeMultiplier/n.sizeMultiplier;return l.height*=h,l.depth*=h,l.maxFontSize=o.sizeMultiplier,l},D6=function(t,e,n){var r=e.havingBaseStyle(n),o=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=it(o),t.height-=o,t.depth+=o},Tx=function(t,e,n,r,o,l){var h=Se.makeSymbol(t,"Main-Regular",o,r),c=Df(h,e,r,l);return n&&D6(c,r,e),c},Ax=function(t,e,n,r){return Se.makeSymbol(t,"Size"+e+"-Regular",n,r)},R6=function(t,e,n,r,o,l){var h=Ax(t,e,o,r),c=Df(Se.makeSpan(["delimsizing","size"+e],[h],r),Tt.TEXT,r,l);return n&&D6(c,r,Tt.TEXT),c},eh=function(t,e,n){var r;e==="Size1-Regular"?r="delim-size1":r="delim-size4";var o=Se.makeSpan(["delimsizinginner",r],[Se.makeSpan([],[Se.makeSymbol(t,e,n)])]);return{type:"elem",elem:o}},th=function(t,e,n){var r=Bi["Size4-Regular"][t.charCodeAt(0)]?Bi["Size4-Regular"][t.charCodeAt(0)][4]:Bi["Size1-Regular"][t.charCodeAt(0)][4],o=new io("inner",N9(t,Math.round(1e3*e))),l=new Ca([o],{width:it(r),height:it(e),style:"width:"+it(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),h=Se.makeSvgSpan([],[l],n);return h.height=e,h.style.height=it(e),h.style.width=it(r),{type:"elem",elem:h}},op=.008,b0={type:"kern",size:-1*op},Mx=["|","\\lvert","\\rvert","\\vert"],Cx=["\\|","\\lVert","\\rVert","\\Vert"],I6=function(t,e,n,r,o,l){var h,c,p,v,b="",g=0;h=p=v=t,c=null;var m="Size1-Regular";t==="\\uparrow"?p=v="⏐":t==="\\Uparrow"?p=v="‖":t==="\\downarrow"?h=p="⏐":t==="\\Downarrow"?h=p="‖":t==="\\updownarrow"?(h="\\uparrow",p="⏐",v="\\downarrow"):t==="\\Updownarrow"?(h="\\Uparrow",p="‖",v="\\Downarrow"):wt.contains(Mx,t)?(p="∣",b="vert",g=333):wt.contains(Cx,t)?(p="∥",b="doublevert",g=556):t==="["||t==="\\lbrack"?(h="⎡",p="⎢",v="⎣",m="Size4-Regular",b="lbrack",g=667):t==="]"||t==="\\rbrack"?(h="⎤",p="⎥",v="⎦",m="Size4-Regular",b="rbrack",g=667):t==="\\lfloor"||t==="⌊"?(p=h="⎢",v="⎣",m="Size4-Regular",b="lfloor",g=667):t==="\\lceil"||t==="⌈"?(h="⎡",p=v="⎢",m="Size4-Regular",b="lceil",g=667):t==="\\rfloor"||t==="⌋"?(p=h="⎥",v="⎦",m="Size4-Regular",b="rfloor",g=667):t==="\\rceil"||t==="⌉"?(h="⎤",p=v="⎥",m="Size4-Regular",b="rceil",g=667):t==="("||t==="\\lparen"?(h="⎛",p="⎜",v="⎝",m="Size4-Regular",b="lparen",g=875):t===")"||t==="\\rparen"?(h="⎞",p="⎟",v="⎠",m="Size4-Regular",b="rparen",g=875):t==="\\{"||t==="\\lbrace"?(h="⎧",c="⎨",v="⎩",p="⎪",m="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(h="⎫",c="⎬",v="⎭",p="⎪",m="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(h="⎧",v="⎩",p="⎪",m="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(h="⎫",v="⎭",p="⎪",m="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(h="⎧",v="⎭",p="⎪",m="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(h="⎫",v="⎩",p="⎪",m="Size4-Regular");var x=ml(h,m,o),w=x.height+x.depth,S=ml(p,m,o),k=S.height+S.depth,C=ml(v,m,o),T=C.height+C.depth,A=0,M=1;if(c!==null){var y=ml(c,m,o);A=y.height+y.depth,M=2}var N=w+T+A,z=Math.max(0,Math.ceil((e-N)/(M*k))),F=N+z*M*k,P=r.fontMetrics().axisHeight;n&&(P*=r.sizeMultiplier);var Y=F/2-P,te=[];if(b.length>0){var de=F-w-T,Ce=Math.round(F*1e3),qe=D9(b,Math.round(de*1e3)),Ge=new io(b,qe),nt=(g/1e3).toFixed(3)+"em",je=(Ce/1e3).toFixed(3)+"em",Ne=new Ca([Ge],{width:nt,height:je,viewBox:"0 0 "+g+" "+Ce}),tt=Se.makeSvgSpan([],[Ne],r);tt.height=Ce/1e3,tt.style.width=nt,tt.style.height=je,te.push({type:"elem",elem:tt})}else{if(te.push(eh(v,m,o)),te.push(b0),c===null){var lt=F-w-T+2*op;te.push(th(p,lt,r))}else{var Qe=(F-w-T-A)/2+2*op;te.push(th(p,Qe,r)),te.push(b0),te.push(eh(c,m,o)),te.push(b0),te.push(th(p,Qe,r))}te.push(b0),te.push(eh(h,m,o))}var j=r.havingBaseStyle(Tt.TEXT),Ht=Se.makeVList({positionType:"bottom",positionData:Y,children:te},j);return Df(Se.makeSpan(["delimsizing","mult"],[Ht],j),Tt.TEXT,r,l)},nh=80,rh=.08,ih=function(t,e,n,r,o){var l=_9(t,r,n),h=new io(t,l),c=new Ca([h],{width:"400em",height:it(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Se.makeSvgSpan(["hide-tail"],[c],o)},Lx=function(t,e){var n=e.havingBaseSizing(),r=z6("\\surd",t*n.sizeMultiplier,P6,n),o=n.sizeMultiplier,l=Math.max(0,e.minRuleThickness-e.fontMetrics().sqrtRuleThickness),h,c=0,p=0,v=0,b;return r.type==="small"?(v=1e3+1e3*l+nh,t<1?o=1:t<1.4&&(o=.7),c=(1+l+rh)/o,p=(1+l)/o,h=ih("sqrtMain",c,v,l,e),h.style.minWidth="0.853em",b=.833/o):r.type==="large"?(v=(1e3+nh)*Ml[r.size],p=(Ml[r.size]+l)/o,c=(Ml[r.size]+l+rh)/o,h=ih("sqrtSize"+r.size,c,v,l,e),h.style.minWidth="1.02em",b=1/o):(c=t+l+rh,p=t+l,v=Math.floor(1e3*t+l)+nh,h=ih("sqrtTall",c,v,l,e),h.style.minWidth="0.742em",b=1.056),h.height=p,h.style.height=it(c),{span:h,advanceWidth:b,ruleWidth:(e.fontMetrics().sqrtRuleThickness+l)*o}},O6=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],_x=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],H6=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ml=[0,1.2,1.8,2.4,3],Nx=function(t,e,n,r,o){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),wt.contains(O6,t)||wt.contains(H6,t))return R6(t,e,!1,n,r,o);if(wt.contains(_x,t))return I6(t,Ml[e],!1,n,r,o);throw new et("Illegal delimiter: '"+t+"'")},Dx=[{type:"small",style:Tt.SCRIPTSCRIPT},{type:"small",style:Tt.SCRIPT},{type:"small",style:Tt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Rx=[{type:"small",style:Tt.SCRIPTSCRIPT},{type:"small",style:Tt.SCRIPT},{type:"small",style:Tt.TEXT},{type:"stack"}],P6=[{type:"small",style:Tt.SCRIPTSCRIPT},{type:"small",style:Tt.SCRIPT},{type:"small",style:Tt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ix=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},z6=function(t,e,n,r){for(var o=Math.min(2,3-r.style.size),l=o;l<n.length&&n[l].type!=="stack";l++){var h=ml(t,Ix(n[l]),"math"),c=h.height+h.depth;if(n[l].type==="small"){var p=r.havingBaseStyle(n[l].style);c*=p.sizeMultiplier}if(c>e)return n[l]}return n[n.length-1]},B6=function(t,e,n,r,o,l){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var h;wt.contains(H6,t)?h=Dx:wt.contains(O6,t)?h=P6:h=Rx;var c=z6(t,e,h,r);return c.type==="small"?Tx(t,c.style,n,r,o,l):c.type==="large"?R6(t,c.size,n,r,o,l):I6(t,e,n,r,o,l)},Ox=function(t,e,n,r,o,l){var h=r.fontMetrics().axisHeight*r.sizeMultiplier,c=901,p=5/r.fontMetrics().ptPerEm,v=Math.max(e-h,n+h),b=Math.max(v/500*c,2*v-p);return B6(t,b,!0,r,o,l)},Sa={sqrtImage:Lx,sizedDelim:Nx,sizeToMaxHeight:Ml,customSizedDelim:B6,leftRightDelim:Ox},jm={"\\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}},Hx=["(","\\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 Xc(t,e){var n=Gc(t);if(n&&wt.contains(Hx,n.text))return n;throw n?new et("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new et("Invalid delimiter type '"+t.type+"'",t)}ut({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var n=Xc(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:jm[t.funcName].size,mclass:jm[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?Se.makeSpan([t.mclass]):Sa.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(di(t.delim,t.mode));var n=new Ze.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=it(Sa.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function $m(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ut({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new et("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:Xc(e[0],t).text,color:n}}});ut({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=Xc(e[0],t),r=t.parser;++r.leftrightDepth;var o=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var l=qt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:l.delim,rightColor:l.color}},htmlBuilder:(t,e)=>{$m(t);for(var n=Qn(t.body,e,!0,["mopen","mclose"]),r=0,o=0,l=!1,h=0;h<n.length;h++)n[h].isMiddle?l=!0:(r=Math.max(n[h].height,r),o=Math.max(n[h].depth,o));r*=e.sizeMultiplier,o*=e.sizeMultiplier;var c;if(t.left==="."?c=Hl(e,["mopen"]):c=Sa.leftRightDelim(t.left,r,o,e,t.mode,["mopen"]),n.unshift(c),l)for(var p=1;p<n.length;p++){var v=n[p],b=v.isMiddle;b&&(n[p]=Sa.leftRightDelim(b.delim,r,o,b.options,t.mode,[]))}var g;if(t.right===".")g=Hl(e,["mclose"]);else{var m=t.rightColor?e.withColor(t.rightColor):e;g=Sa.leftRightDelim(t.right,r,o,m,t.mode,["mclose"])}return n.push(g),Se.makeSpan(["minner"],n,e)},mathmlBuilder:(t,e)=>{$m(t);var n=Or(t.body,e);if(t.left!=="."){var r=new Ze.MathNode("mo",[di(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(t.right!=="."){var o=new Ze.MathNode("mo",[di(t.right,t.mode)]);o.setAttribute("fence","true"),t.rightColor&&o.setAttribute("mathcolor",t.rightColor),n.push(o)}return Cf(n)}});ut({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=Xc(e[0],t);if(!t.parser.leftrightDepth)throw new et("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;if(t.delim===".")n=Hl(e,[]);else{n=Sa.sizedDelim(t.delim,1,e,t.mode,[]);var r={delim:t.delim,options:e};n.isMiddle=r}return n},mathmlBuilder:(t,e)=>{var n=t.delim==="\\vert"||t.delim==="|"?di("|","text"):di(t.delim,t.mode),r=new Ze.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Rf=(t,e)=>{var n=Se.wrapFragment(Jt(t.body,e),e),r=t.label.slice(1),o=e.sizeMultiplier,l,h=0,c=wt.isCharacterBox(t.body);if(r==="sout")l=Se.makeSpan(["stretchy","sout"]),l.height=e.fontMetrics().defaultRuleThickness/o,h=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var p=Nn({number:.6,unit:"pt"},e),v=Nn({number:.35,unit:"ex"},e),b=e.havingBaseSizing();o=o/b.sizeMultiplier;var g=n.height+n.depth+p+v;n.style.paddingLeft=it(g/2+p);var m=Math.floor(1e3*g*o),x=C9(m),w=new Ca([new io("phase",x)],{width:"400em",height:it(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});l=Se.makeSvgSpan(["hide-tail"],[w],e),l.style.height=it(g),h=n.depth+p+v}else{/cancel/.test(r)?c||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var S=0,k=0,C=0;/box/.test(r)?(C=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),S=e.fontMetrics().fboxsep+(r==="colorbox"?0:C),k=S):r==="angl"?(C=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),S=4*C,k=Math.max(0,.25-n.depth)):(S=c?.2:0,k=S),l=_a.encloseSpan(n,r,S,k,e),/fbox|boxed|fcolorbox/.test(r)?(l.style.borderStyle="solid",l.style.borderWidth=it(C)):r==="angl"&&C!==.049&&(l.style.borderTopWidth=it(C),l.style.borderRightWidth=it(C)),h=n.depth+k,t.backgroundColor&&(l.style.backgroundColor=t.backgroundColor,t.borderColor&&(l.style.borderColor=t.borderColor))}var T;if(t.backgroundColor)T=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:h},{type:"elem",elem:n,shift:0}]},e);else{var A=/cancel|phase/.test(r)?["svg-align"]:[];T=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:l,shift:h,wrapperClasses:A}]},e)}return/cancel/.test(r)&&(T.height=n.height,T.depth=n.depth),/cancel/.test(r)&&!c?Se.makeSpan(["mord","cancel-lap"],[T],e):Se.makeSpan(["mord"],[T],e)},If=(t,e)=>{var n=0,r=new Ze.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[vn(t.body,e)]);switch(t.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=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),t.label==="\\fcolorbox"){var o=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};ut({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=qt(e[0],"color-token").color,h=e[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:l,body:h}},htmlBuilder:Rf,mathmlBuilder:If});ut({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=qt(e[0],"color-token").color,h=qt(e[1],"color-token").color,c=e[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:h,borderColor:l,body:c}},htmlBuilder:Rf,mathmlBuilder:If});ut({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}});ut({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"enclose",mode:n.mode,label:r,body:o}},htmlBuilder:Rf,mathmlBuilder:If});ut({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var F6={};function Ui(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},p=0;p<n.length;++p)F6[n[p]]=c;l&&(pc[e]=l),h&&(fc[e]=h)}var q6={};function W(t,e){q6[t]=e}function Um(t){var e=[];t.consumeSpaces();var n=t.fetch().text;for(n==="\\relax"&&(t.consume(),t.consumeSpaces(),n=t.fetch().text);n==="\\hline"||n==="\\hdashline";)t.consume(),e.push(n==="\\hdashline"),t.consumeSpaces(),n=t.fetch().text;return e}var Zc=t=>{var e=t.parser.settings;if(!e.displayMode)throw new et("{"+t.envName+"} can be used only in display mode.")};function Of(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function po(t,e,n){var{hskipBeforeAndAfter:r,addJot:o,cols:l,arraystretch:h,colSeparationType:c,autoTag:p,singleRow:v,emptySingleRow:b,maxNumCols:g,leqno:m}=e;if(t.gullet.beginGroup(),v||t.gullet.macros.set("\\cr","\\\\\\relax"),!h){var x=t.gullet.expandMacroAsText("\\arraystretch");if(x==null)h=1;else if(h=parseFloat(x),!h||h<0)throw new et("Invalid \\arraystretch: "+x)}t.gullet.beginGroup();var w=[],S=[w],k=[],C=[],T=p!=null?[]:void 0;function A(){p&&t.gullet.macros.set("\\@eqnsw","1",!0)}function M(){T&&(t.gullet.macros.get("\\df@tag")?(T.push(t.subparse([new si("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):T.push(!!p&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),C.push(Um(t));;){var y=t.parseExpression(!1,v?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),y={type:"ordgroup",mode:t.mode,body:y},n&&(y={type:"styling",mode:t.mode,style:n,body:[y]}),w.push(y);var N=t.fetch().text;if(N==="&"){if(g&&w.length===g){if(v||c)throw new et("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(N==="\\end"){M(),w.length===1&&y.type==="styling"&&y.body[0].body.length===0&&(S.length>1||!b)&&S.pop(),C.length<S.length+1&&C.push([]);break}else if(N==="\\\\"){t.consume();var z=void 0;t.gullet.future().text!==" "&&(z=t.parseSizeGroup(!0)),k.push(z?z.value:null),M(),C.push(Um(t)),w=[],S.push(w),A()}else throw new et("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:o,arraystretch:h,body:S,cols:l,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:C,colSeparationType:c,tags:T,leqno:m}}function Hf(t){return t.slice(0,1)==="d"?"display":"text"}var Vi=function(t,e){var n,r,o=t.body.length,l=t.hLinesBeforeRow,h=0,c=new Array(o),p=[],v=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),b=1/e.fontMetrics().ptPerEm,g=5*b;if(t.colSeparationType&&t.colSeparationType==="small"){var m=e.havingStyle(Tt.SCRIPT).sizeMultiplier;g=.2778*(m/e.sizeMultiplier)}var x=t.colSeparationType==="CD"?Nn({number:3,unit:"ex"},e):12*b,w=3*b,S=t.arraystretch*x,k=.7*S,C=.3*S,T=0;function A(we){for(var Ae=0;Ae<we.length;++Ae)Ae>0&&(T+=.25),p.push({pos:T,isDashed:we[Ae]})}for(A(l[0]),n=0;n<t.body.length;++n){var M=t.body[n],y=k,N=C;h<M.length&&(h=M.length);var z=new Array(M.length);for(r=0;r<M.length;++r){var F=Jt(M[r],e);N<F.depth&&(N=F.depth),y<F.height&&(y=F.height),z[r]=F}var P=t.rowGaps[n],Y=0;P&&(Y=Nn(P,e),Y>0&&(Y+=C,N<Y&&(N=Y),Y=0)),t.addJot&&(N+=w),z.height=y,z.depth=N,T+=y,z.pos=T,T+=N+Y,c[n]=z,A(l[n+1])}var te=T/2+e.fontMetrics().axisHeight,de=t.cols||[],Ce=[],qe,Ge,nt=[];if(t.tags&&t.tags.some(we=>we))for(n=0;n<o;++n){var je=c[n],Ne=je.pos-te,tt=t.tags[n],lt=void 0;tt===!0?lt=Se.makeSpan(["eqn-num"],[],e):tt===!1?lt=Se.makeSpan([],[],e):lt=Se.makeSpan([],Qn(tt,e,!0),e),lt.depth=je.depth,lt.height=je.height,nt.push({type:"elem",elem:lt,shift:Ne})}for(r=0,Ge=0;r<h||Ge<de.length;++r,++Ge){for(var Qe=de[Ge]||{},j=!0;Qe.type==="separator";){if(j||(qe=Se.makeSpan(["arraycolsep"],[]),qe.style.width=it(e.fontMetrics().doubleRuleSep),Ce.push(qe)),Qe.separator==="|"||Qe.separator===":"){var Ht=Qe.separator==="|"?"solid":"dashed",Rt=Se.makeSpan(["vertical-separator"],[],e);Rt.style.height=it(T),Rt.style.borderRightWidth=it(v),Rt.style.borderRightStyle=Ht,Rt.style.margin="0 "+it(-v/2);var Ut=T-te;Ut&&(Rt.style.verticalAlign=it(-Ut)),Ce.push(Rt)}else throw new et("Invalid separator type: "+Qe.separator);Ge++,Qe=de[Ge]||{},j=!1}if(!(r>=h)){var Nt=void 0;(r>0||t.hskipBeforeAndAfter)&&(Nt=wt.deflt(Qe.pregap,g),Nt!==0&&(qe=Se.makeSpan(["arraycolsep"],[]),qe.style.width=it(Nt),Ce.push(qe)));var oe=[];for(n=0;n<o;++n){var he=c[n],J=he[r];if(J){var ee=he.pos-te;J.depth=he.depth,J.height=he.height,oe.push({type:"elem",elem:J,shift:ee})}}oe=Se.makeVList({positionType:"individualShift",children:oe},e),oe=Se.makeSpan(["col-align-"+(Qe.align||"c")],[oe]),Ce.push(oe),(r<h-1||t.hskipBeforeAndAfter)&&(Nt=wt.deflt(Qe.postgap,g),Nt!==0&&(qe=Se.makeSpan(["arraycolsep"],[]),qe.style.width=it(Nt),Ce.push(qe)))}}if(c=Se.makeSpan(["mtable"],Ce),p.length>0){for(var De=Se.makeLineSpan("hline",e,v),se=Se.makeLineSpan("hdashline",e,v),V=[{type:"elem",elem:c,shift:0}];p.length>0;){var Z=p.pop(),ve=Z.pos-te;Z.isDashed?V.push({type:"elem",elem:se,shift:ve}):V.push({type:"elem",elem:De,shift:ve})}c=Se.makeVList({positionType:"individualShift",children:V},e)}if(nt.length===0)return Se.makeSpan(["mord"],[c],e);var le=Se.makeVList({positionType:"individualShift",children:nt},e);return le=Se.makeSpan(["tag"],[le],e),Se.makeFragment([c,le])},Px={c:"center ",l:"left ",r:"right "},Wi=function(t,e){for(var n=[],r=new Ze.MathNode("mtd",[],["mtr-glue"]),o=new Ze.MathNode("mtd",[],["mml-eqn-num"]),l=0;l<t.body.length;l++){for(var h=t.body[l],c=[],p=0;p<h.length;p++)c.push(new Ze.MathNode("mtd",[vn(h[p],e)]));t.tags&&t.tags[l]&&(c.unshift(r),c.push(r),t.leqno?c.unshift(o):c.push(o)),n.push(new Ze.MathNode("mtr",c))}var v=new Ze.MathNode("mtable",n),b=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);v.setAttribute("rowspacing",it(b));var g="",m="";if(t.cols&&t.cols.length>0){var x=t.cols,w="",S=!1,k=0,C=x.length;x[0].type==="separator"&&(g+="top ",k=1),x[x.length-1].type==="separator"&&(g+="bottom ",C-=1);for(var T=k;T<C;T++)x[T].type==="align"?(m+=Px[x[T].align],S&&(w+="none "),S=!0):x[T].type==="separator"&&S&&(w+=x[T].separator==="|"?"solid ":"dashed ",S=!1);v.setAttribute("columnalign",m.trim()),/[sd]/.test(w)&&v.setAttribute("columnlines",w.trim())}if(t.colSeparationType==="align"){for(var A=t.cols||[],M="",y=1;y<A.length;y++)M+=y%2?"0em ":"1em ";v.setAttribute("columnspacing",M.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?v.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?v.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?v.setAttribute("columnspacing","0.5em"):v.setAttribute("columnspacing","1em");var N="",z=t.hLinesBeforeRow;g+=z[0].length>0?"left ":"",g+=z[z.length-1].length>0?"right ":"";for(var F=1;F<z.length-1;F++)N+=z[F].length===0?"none ":z[F][0]?"dashed ":"solid ";return/[sd]/.test(N)&&v.setAttribute("rowlines",N.trim()),g!==""&&(v=new Ze.MathNode("menclose",[v]),v.setAttribute("notation",g.trim())),t.arraystretch&&t.arraystretch<1&&(v=new Ze.MathNode("mstyle",[v]),v.setAttribute("scriptlevel","1")),v},j6=function(t,e){t.envName.indexOf("ed")===-1&&Zc(t);var n=[],r=t.envName.indexOf("at")>-1?"alignat":"align",o=t.envName==="split",l=po(t.parser,{cols:n,addJot:!0,autoTag:o?void 0:Of(t.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:o?2:void 0,leqno:t.parser.settings.leqno},"display"),h,c=0,p={type:"ordgroup",mode:t.mode,body:[]};if(e[0]&&e[0].type==="ordgroup"){for(var v="",b=0;b<e[0].body.length;b++){var g=qt(e[0].body[b],"textord");v+=g.text}h=Number(v),c=h*2}var m=!c;l.body.forEach(function(k){for(var C=1;C<k.length;C+=2){var T=qt(k[C],"styling"),A=qt(T.body[0],"ordgroup");A.body.unshift(p)}if(m)c<k.length&&(c=k.length);else{var M=k.length/2;if(h<M)throw new et("Too many math in a row: "+("expected "+h+", but got "+M),k[0])}});for(var x=0;x<c;++x){var w="r",S=0;x%2===1?w="l":x>0&&m&&(S=1),n[x]={type:"align",align:w,pregap:S,postgap:0}}return l.colSeparationType=m?"align":"alignat",l};Ui({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=Gc(e[0]),r=n?[e[0]]:qt(e[0],"ordgroup").body,o=r.map(function(h){var c=_f(h),p=c.text;if("lcr".indexOf(p)!==-1)return{type:"align",align:p};if(p==="|")return{type:"separator",separator:"|"};if(p===":")return{type:"separator",separator:":"};throw new et("Unknown column alignment: "+p,h)}),l={cols:o,hskipBeforeAndAfter:!0,maxNumCols:o.length};return po(t.parser,l,Hf(t.envName))},htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(t.envName.charAt(t.envName.length-1)==="*"){var o=t.parser;if(o.consumeSpaces(),o.fetch().text==="["){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,"lcr".indexOf(n)===-1)throw new et("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),r.cols=[{type:"align",align:n}]}}var l=po(t.parser,r,Hf(t.envName)),h=Math.max(0,...l.body.map(c=>c.length));return l.cols=new Array(h).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[l],left:e[0],right:e[1],rightColor:void 0}:l},htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=po(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=Gc(e[0]),r=n?[e[0]]:qt(e[0],"ordgroup").body,o=r.map(function(h){var c=_f(h),p=c.text;if("lc".indexOf(p)!==-1)return{type:"align",align:p};throw new et("Unknown column alignment: "+p,h)});if(o.length>1)throw new et("{subarray} can contain only one column");var l={cols:o,hskipBeforeAndAfter:!1,arraystretch:.5};if(l=po(t.parser,l,"script"),l.body.length>0&&l.body[0].length>1)throw new et("{subarray} can contain only one column");return l},htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=po(t.parser,e,Hf(t.envName));return{type:"leftright",mode:t.mode,body:[n],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:j6,htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){wt.contains(["gather","gather*"],t.envName)&&Zc(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Of(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return po(t.parser,e,"display")},htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:j6,htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Zc(t);var e={autoTag:Of(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return po(t.parser,e,"display")},htmlBuilder:Vi,mathmlBuilder:Wi});Ui({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Zc(t),Sx(t.parser)},htmlBuilder:Vi,mathmlBuilder:Wi});W("\\nonumber","\\gdef\\@eqnsw{0}");W("\\notag","\\nonumber");ut({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new et(t.funcName+" valid only within array environment")}});var Vm=F6;ut({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];if(o.type!=="ordgroup")throw new et("Invalid environment name",o);for(var l="",h=0;h<o.body.length;++h)l+=qt(o.body[h],"textord").text;if(r==="\\begin"){if(!Vm.hasOwnProperty(l))throw new et("No such environment: "+l,o);var c=Vm[l],{args:p,optArgs:v}=n.parseArguments("\\begin{"+l+"}",c),b={mode:n.mode,envName:l,parser:n},g=c.handler(b,p,v);n.expect("\\end",!1);var m=n.nextToken,x=qt(n.parseFunction(),"environment");if(x.name!==l)throw new et("Mismatch: \\begin{"+l+"} matched by \\end{"+x.name+"}",m);return g}return{type:"environment",mode:n.mode,name:l,nameGroup:o}}});var $6=(t,e)=>{var n=t.font,r=e.withFont(n);return Jt(t.body,r)},U6=(t,e)=>{var n=t.font,r=e.withFont(n);return vn(t.body,r)},Wm={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ut({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=mc(e[0]),l=r;return l in Wm&&(l=Wm[l]),{type:"font",mode:n.mode,font:l.slice(1),body:o}},htmlBuilder:$6,mathmlBuilder:U6});ut({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,r=e[0],o=wt.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Kc(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}});ut({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,breakOnTokenText:o}=t,{mode:l}=n,h=n.parseExpression(!0,o),c="math"+r.slice(1);return{type:"font",mode:l,font:c,body:{type:"ordgroup",mode:n.mode,body:h}}},htmlBuilder:$6,mathmlBuilder:U6});var V6=(t,e)=>{var n=e;return t==="display"?n=n.id>=Tt.SCRIPT.id?n.text():Tt.DISPLAY:t==="text"&&n.size===Tt.DISPLAY.size?n=Tt.TEXT:t==="script"?n=Tt.SCRIPT:t==="scriptscript"&&(n=Tt.SCRIPTSCRIPT),n},Pf=(t,e)=>{var n=V6(t.size,e.style),r=n.fracNum(),o=n.fracDen(),l;l=e.havingStyle(r);var h=Jt(t.numer,l,e);if(t.continued){var c=8.5/e.fontMetrics().ptPerEm,p=3.5/e.fontMetrics().ptPerEm;h.height=h.height<c?c:h.height,h.depth=h.depth<p?p:h.depth}l=e.havingStyle(o);var v=Jt(t.denom,l,e),b,g,m;t.hasBarLine?(t.barSize?(g=Nn(t.barSize,e),b=Se.makeLineSpan("frac-line",e,g)):b=Se.makeLineSpan("frac-line",e),g=b.height,m=b.height):(b=null,g=0,m=e.fontMetrics().defaultRuleThickness);var x,w,S;n.size===Tt.DISPLAY.size||t.size==="display"?(x=e.fontMetrics().num1,g>0?w=3*m:w=7*m,S=e.fontMetrics().denom1):(g>0?(x=e.fontMetrics().num2,w=m):(x=e.fontMetrics().num3,w=3*m),S=e.fontMetrics().denom2);var k;if(b){var C=e.fontMetrics().axisHeight;x-h.depth-(C+.5*g)<w&&(x+=w-(x-h.depth-(C+.5*g))),C-.5*g-(v.height-S)<w&&(S+=w-(C-.5*g-(v.height-S)));var T=-(C-.5*g);k=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:b,shift:T},{type:"elem",elem:h,shift:-x}]},e)}else{var A=x-h.depth-(v.height-S);A<w&&(x+=.5*(w-A),S+=.5*(w-A)),k=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:h,shift:-x}]},e)}l=e.havingStyle(n),k.height*=l.sizeMultiplier/e.sizeMultiplier,k.depth*=l.sizeMultiplier/e.sizeMultiplier;var M;n.size===Tt.DISPLAY.size?M=e.fontMetrics().delim1:n.size===Tt.SCRIPTSCRIPT.size?M=e.havingStyle(Tt.SCRIPT).fontMetrics().delim2:M=e.fontMetrics().delim2;var y,N;return t.leftDelim==null?y=Hl(e,["mopen"]):y=Sa.customSizedDelim(t.leftDelim,M,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?N=Se.makeSpan([]):t.rightDelim==null?N=Hl(e,["mclose"]):N=Sa.customSizedDelim(t.rightDelim,M,!0,e.havingStyle(n),t.mode,["mclose"]),Se.makeSpan(["mord"].concat(l.sizingClasses(e)),[y,Se.makeSpan(["mfrac"],[k]),N],e)},zf=(t,e)=>{var n=new Ze.MathNode("mfrac",[vn(t.numer,e),vn(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var r=Nn(t.barSize,e);n.setAttribute("linethickness",it(r))}var o=V6(t.size,e.style);if(o.size!==e.style.size){n=new Ze.MathNode("mstyle",[n]);var l=o.size===Tt.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",l),n.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var h=[];if(t.leftDelim!=null){var c=new Ze.MathNode("mo",[new Ze.TextNode(t.leftDelim.replace("\\",""))]);c.setAttribute("fence","true"),h.push(c)}if(h.push(n),t.rightDelim!=null){var p=new Ze.MathNode("mo",[new Ze.TextNode(t.rightDelim.replace("\\",""))]);p.setAttribute("fence","true"),h.push(p)}return Cf(h)}return n};ut({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1],h,c=null,p=null,v="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":h=!0;break;case"\\\\atopfrac":h=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":h=!1,c="(",p=")";break;case"\\\\bracefrac":h=!1,c="\\{",p="\\}";break;case"\\\\brackfrac":h=!1,c="[",p="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":v="display";break;case"\\tfrac":case"\\tbinom":v="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:o,denom:l,hasBarLine:h,leftDelim:c,rightDelim:p,size:v,barSize:null}},htmlBuilder:Pf,mathmlBuilder:zf});ut({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:o,denom:l,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ut({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:r}=t,o;switch(n){case"\\over":o="\\frac";break;case"\\choose":o="\\binom";break;case"\\atop":o="\\\\atopfrac";break;case"\\brace":o="\\\\bracefrac";break;case"\\brack":o="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:o,token:r}}});var Gm=["display","text","script","scriptscript"],Km=function(t){var e=null;return t.length>0&&(e=t,e=e==="."?null:e),e};ut({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:n}=t,r=e[4],o=e[5],l=mc(e[0]),h=l.type==="atom"&&l.family==="open"?Km(l.text):null,c=mc(e[1]),p=c.type==="atom"&&c.family==="close"?Km(c.text):null,v=qt(e[2],"size"),b,g=null;v.isBlank?b=!0:(g=v.value,b=g.number>0);var m="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var w=qt(x.body[0],"textord");m=Gm[Number(w.text)]}}else x=qt(x,"textord"),m=Gm[Number(x.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:b,barSize:g,leftDelim:h,rightDelim:p,size:m}},htmlBuilder:Pf,mathmlBuilder:zf});ut({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:o}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:qt(e[0],"size").value,token:o}}});ut({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=p9(qt(e[1],"infix").size),h=e[2],c=l.number>0;return{type:"genfrac",mode:n.mode,numer:o,denom:h,continued:!1,hasBarLine:c,barSize:l,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Pf,mathmlBuilder:zf});var W6=(t,e)=>{var n=e.style,r,o;t.type==="supsub"?(r=t.sup?Jt(t.sup,e.havingStyle(n.sup()),e):Jt(t.sub,e.havingStyle(n.sub()),e),o=qt(t.base,"horizBrace")):o=qt(t,"horizBrace");var l=Jt(o.base,e.havingBaseStyle(Tt.DISPLAY)),h=_a.svgSpan(o,e),c;if(o.isOver?(c=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:h}]},e),c.children[0].children[0].children[1].classes.push("svg-align")):(c=Se.makeVList({positionType:"bottom",positionData:l.depth+.1+h.height,children:[{type:"elem",elem:h},{type:"kern",size:.1},{type:"elem",elem:l}]},e),c.children[0].children[0].children[0].classes.push("svg-align")),r){var p=Se.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e);o.isOver?c=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:r}]},e):c=Se.makeVList({positionType:"bottom",positionData:p.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:p}]},e)}return Se.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e)},zx=(t,e)=>{var n=_a.mathMLnode(t.label);return new Ze.MathNode(t.isOver?"mover":"munder",[vn(t.base,e),n])};ut({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:W6,mathmlBuilder:zx});ut({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[1],o=qt(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:qn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=Qn(t.body,e,!1);return Se.makeAnchor(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=ao(t.body,e);return n instanceof Gr||(n=new Gr("mrow",[n])),n.setAttribute("href",t.href),n}});ut({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=qt(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],l=0;l<r.length;l++){var h=r[l];h==="~"&&(h="\\textasciitilde"),o.push({type:"textord",mode:"text",text:h})}var c={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:qn(c)}}});ut({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:n}=t;return{type:"hbox",mode:n.mode,body:qn(e[0])}},htmlBuilder(t,e){var n=Qn(t.body,e,!1);return Se.makeFragment(n)},mathmlBuilder(t,e){return new Ze.MathNode("mrow",Or(t.body,e))}});ut({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,token:o}=t,l=qt(e[0],"raw").string,h=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c,p={};switch(r){case"\\htmlClass":p.class=l,c={command:"\\htmlClass",class:l};break;case"\\htmlId":p.id=l,c={command:"\\htmlId",id:l};break;case"\\htmlStyle":p.style=l,c={command:"\\htmlStyle",style:l};break;case"\\htmlData":{for(var v=l.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length!==2)throw new et("Error parsing key-value for \\htmlData");p["data-"+g[0].trim()]=g[1].trim()}c={command:"\\htmlData",attributes:p};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(c)?{type:"html",mode:n.mode,attributes:p,body:qn(h)}:n.formatUnsupportedCmd(r)},htmlBuilder:(t,e)=>{var n=Qn(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var o=Se.makeSpan(r,n,e);for(var l in t.attributes)l!=="class"&&t.attributes.hasOwnProperty(l)&&o.setAttribute(l,t.attributes[l]);return o},mathmlBuilder:(t,e)=>ao(t.body,e)});ut({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:qn(e[0]),mathml:qn(e[1])}},htmlBuilder:(t,e)=>{var n=Qn(t.html,e,!1);return Se.makeFragment(n)},mathmlBuilder:(t,e)=>ao(t.mathml,e)});var ah=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new et("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!d6(n))throw new et("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ut({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:r}=t,o={number:0,unit:"em"},l={number:.9,unit:"em"},h={number:0,unit:"em"},c="";if(n[0])for(var p=qt(n[0],"raw").string,v=p.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length===2){var m=g[1].trim();switch(g[0].trim()){case"alt":c=m;break;case"width":o=ah(m);break;case"height":l=ah(m);break;case"totalheight":h=ah(m);break;default:throw new et("Invalid key: '"+g[0]+"' in \\includegraphics.")}}}var x=qt(e[0],"url").url;return c===""&&(c=x,c=c.replace(/^.*[\\/]/,""),c=c.substring(0,c.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:r.mode,alt:c,width:o,height:l,totalheight:h,src:x}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=Nn(t.height,e),r=0;t.totalheight.number>0&&(r=Nn(t.totalheight,e)-n);var o=0;t.width.number>0&&(o=Nn(t.width,e));var l={height:it(n+r)};o>0&&(l.width=it(o)),r>0&&(l.verticalAlign=it(-r));var h=new z9(t.src,t.alt,l);return h.height=n,h.depth=r,h},mathmlBuilder:(t,e)=>{var n=new Ze.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var r=Nn(t.height,e),o=0;if(t.totalheight.number>0&&(o=Nn(t.totalheight,e)-r,n.setAttribute("valign",it(-o))),n.setAttribute("height",it(r+o)),t.width.number>0){var l=Nn(t.width,e);n.setAttribute("width",it(l))}return n.setAttribute("src",t.src),n}});ut({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=qt(e[0],"size");if(n.settings.strict){var l=r[1]==="m",h=o.value.unit==="mu";l?(h||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+o.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):h&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder(t,e){return Se.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var n=Nn(t.dimension,e);return new Ze.SpaceNode(n)}});ut({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=Se.makeSpan([],[Jt(t.body,e)]),n=Se.makeSpan(["inner"],[n],e)):n=Se.makeSpan(["inner"],[Jt(t.body,e)]);var r=Se.makeSpan(["fix"],[]),o=Se.makeSpan([t.alignment],[n,r],e),l=Se.makeSpan(["strut"]);return l.style.height=it(o.height+o.depth),o.depth&&(l.style.verticalAlign=it(-o.depth)),o.children.unshift(l),o=Se.makeSpan(["thinbox"],[o],e),Se.makeSpan(["mord","vbox"],[o],e)},mathmlBuilder:(t,e)=>{var n=new Ze.MathNode("mpadded",[vn(t.body,e)]);if(t.alignment!=="rlap"){var r=t.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});ut({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,o=r.mode;r.switchMode("math");var l=n==="\\("?"\\)":"$",h=r.parseExpression(!1,l);return r.expect(l),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:h}}});ut({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new et("Mismatched "+t.funcName)}});var Xm=(t,e)=>{switch(e.style.size){case Tt.DISPLAY.size:return t.display;case Tt.TEXT.size:return t.text;case Tt.SCRIPT.size:return t.script;case Tt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ut({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:qn(e[0]),text:qn(e[1]),script:qn(e[2]),scriptscript:qn(e[3])}},htmlBuilder:(t,e)=>{var n=Xm(t,e),r=Qn(n,e,!1);return Se.makeFragment(r)},mathmlBuilder:(t,e)=>{var n=Xm(t,e);return ao(n,e)}});var G6=(t,e,n,r,o,l,h)=>{t=Se.makeSpan([],[t]);var c=n&&wt.isCharacterBox(n),p,v;if(e){var b=Jt(e,r.havingStyle(o.sup()),r);v={elem:b,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-b.depth)}}if(n){var g=Jt(n,r.havingStyle(o.sub()),r);p={elem:g,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-g.height)}}var m;if(v&&p){var x=r.fontMetrics().bigOpSpacing5+p.elem.height+p.elem.depth+p.kern+t.depth+h;m=Se.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:it(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:it(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(p){var w=t.height-h;m=Se.makeVList({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:it(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t}]},r)}else if(v){var S=t.depth+h;m=Se.makeVList({positionType:"bottom",positionData:S,children:[{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:it(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return t;var k=[m];if(p&&l!==0&&!c){var C=Se.makeSpan(["mspace"],[],r);C.style.marginRight=it(l),k.unshift(C)}return Se.makeSpan(["mop","op-limits"],k,r)},K6=["\\smallint"],xs=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=qt(t.base,"op"),o=!0):l=qt(t,"op");var h=e.style,c=!1;h.size===Tt.DISPLAY.size&&l.symbol&&!wt.contains(K6,l.name)&&(c=!0);var p;if(l.symbol){var v=c?"Size2-Regular":"Size1-Regular",b="";if((l.name==="\\oiint"||l.name==="\\oiiint")&&(b=l.name.slice(1),l.name=b==="oiint"?"\\iint":"\\iiint"),p=Se.makeSymbol(l.name,v,"math",e,["mop","op-symbol",c?"large-op":"small-op"]),b.length>0){var g=p.italic,m=Se.staticSvg(b+"Size"+(c?"2":"1"),e);p=Se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:p,shift:0},{type:"elem",elem:m,shift:c?.08:0}]},e),l.name="\\"+b,p.classes.unshift("mop"),p.italic=g}}else if(l.body){var x=Qn(l.body,e,!0);x.length===1&&x[0]instanceof ui?(p=x[0],p.classes[0]="mop"):p=Se.makeSpan(["mop"],x,e)}else{for(var w=[],S=1;S<l.name.length;S++)w.push(Se.mathsym(l.name[S],l.mode,e));p=Se.makeSpan(["mop"],w,e)}var k=0,C=0;return(p instanceof ui||l.name==="\\oiint"||l.name==="\\oiiint")&&!l.suppressBaseShift&&(k=(p.height-p.depth)/2-e.fontMetrics().axisHeight,C=p.italic),o?G6(p,n,r,e,h,C,k):(k&&(p.style.position="relative",p.style.top=it(k)),p)},Kl=(t,e)=>{var n;if(t.symbol)n=new Gr("mo",[di(t.name,t.mode)]),wt.contains(K6,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new Gr("mo",Or(t.body,e));else{n=new Gr("mi",[new Fi(t.name.slice(1))]);var r=new Gr("mo",[di("","text")]);t.parentIsSupSub?n=new Gr("mrow",[n,r]):n=k6([n,r])}return n},Bx={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ut({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=r;return o.length===1&&(o=Bx[o]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:xs,mathmlBuilder:Kl});ut({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:qn(r)}},htmlBuilder:xs,mathmlBuilder:Kl});var Fx={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ut({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:xs,mathmlBuilder:Kl});ut({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:xs,mathmlBuilder:Kl});ut({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t,r=n;return r.length===1&&(r=Fx[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:xs,mathmlBuilder:Kl});var X6=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=qt(t.base,"operatorname"),o=!0):l=qt(t,"operatorname");var h;if(l.body.length>0){for(var c=l.body.map(g=>{var m=g.text;return typeof m=="string"?{type:"textord",mode:g.mode,text:m}:g}),p=Qn(c,e.withFont("mathrm"),!0),v=0;v<p.length;v++){var b=p[v];b instanceof ui&&(b.text=b.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}h=Se.makeSpan(["mop"],p,e)}else h=Se.makeSpan(["mop"],[],e);return o?G6(h,n,r,e,e.style,0,0):h},qx=(t,e)=>{for(var n=Or(t.body,e.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var l=n[o];if(!(l instanceof Ze.SpaceNode))if(l instanceof Ze.MathNode)switch(l.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var h=l.children[0];l.children.length===1&&h instanceof Ze.TextNode?h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var c=n.map(b=>b.toText()).join("");n=[new Ze.TextNode(c)]}var p=new Ze.MathNode("mi",n);p.setAttribute("mathvariant","normal");var v=new Ze.MathNode("mo",[di("","text")]);return t.parentIsSupSub?new Ze.MathNode("mrow",[p,v]):Ze.newDocumentFragment([p,v])};ut({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"operatorname",mode:n.mode,body:qn(o),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:X6,mathmlBuilder:qx});W("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Wo({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Se.makeFragment(Qn(t.body,e,!1)):Se.makeSpan(["mord"],Qn(t.body,e,!0),e)},mathmlBuilder(t,e){return ao(t.body,e,!0)}});ut({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,r=e[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(t,e){var n=Jt(t.body,e.havingCrampedStyle()),r=Se.makeLineSpan("overline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},e);return Se.makeSpan(["mord","overline"],[l],e)},mathmlBuilder(t,e){var n=new Ze.MathNode("mo",[new Ze.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ze.MathNode("mover",[vn(t.body,e),n]);return r.setAttribute("accent","true"),r}});ut({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"phantom",mode:n.mode,body:qn(r)}},htmlBuilder:(t,e)=>{var n=Qn(t.body,e.withPhantom(),!1);return Se.makeFragment(n)},mathmlBuilder:(t,e)=>{var n=Or(t.body,e);return new Ze.MathNode("mphantom",n)}});ut({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Se.makeSpan([],[Jt(t.body,e.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e),Se.makeSpan(["mord"],[n],e)},mathmlBuilder:(t,e)=>{var n=Or(qn(t.body),e),r=new Ze.MathNode("mphantom",n),o=new Ze.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}});ut({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Se.makeSpan(["inner"],[Jt(t.body,e.withPhantom())]),r=Se.makeSpan(["fix"],[]);return Se.makeSpan(["mord","rlap"],[n,r],e)},mathmlBuilder:(t,e)=>{var n=Or(qn(t.body),e),r=new Ze.MathNode("mphantom",n),o=new Ze.MathNode("mpadded",[r]);return o.setAttribute("width","0px"),o}});ut({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=qt(e[0],"size").value,o=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder(t,e){var n=Jt(t.body,e),r=Nn(t.dy,e);return Se.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new Ze.MathNode("mpadded",[vn(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}});ut({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});ut({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:r}=t,o=n[0],l=qt(e[0],"size"),h=qt(e[1],"size");return{type:"rule",mode:r.mode,shift:o&&qt(o,"size").value,width:l.value,height:h.value}},htmlBuilder(t,e){var n=Se.makeSpan(["mord","rule"],[],e),r=Nn(t.width,e),o=Nn(t.height,e),l=t.shift?Nn(t.shift,e):0;return n.style.borderRightWidth=it(r),n.style.borderTopWidth=it(o),n.style.bottom=it(l),n.width=r,n.height=o+l,n.depth=-l,n.maxFontSize=o*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=Nn(t.width,e),r=Nn(t.height,e),o=t.shift?Nn(t.shift,e):0,l=e.color&&e.getColor()||"black",h=new Ze.MathNode("mspace");h.setAttribute("mathbackground",l),h.setAttribute("width",it(n)),h.setAttribute("height",it(r));var c=new Ze.MathNode("mpadded",[h]);return o>=0?c.setAttribute("height",it(o)):(c.setAttribute("height",it(o)),c.setAttribute("depth",it(-o))),c.setAttribute("voffset",it(o)),c}});function Z6(t,e,n){for(var r=Qn(t,e,!1),o=e.sizeMultiplier/n.sizeMultiplier,l=0;l<r.length;l++){var h=r[l].classes.indexOf("sizing");h<0?Array.prototype.push.apply(r[l].classes,e.sizingClasses(n)):r[l].classes[h+1]==="reset-size"+e.size&&(r[l].classes[h+1]="reset-size"+n.size),r[l].height*=o,r[l].depth*=o}return Se.makeFragment(r)}var Zm=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],jx=(t,e)=>{var n=e.havingSize(t.size);return Z6(t.body,n,e)};ut({type:"sizing",names:Zm,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:Zm.indexOf(r)+1,body:l}},htmlBuilder:jx,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),r=Or(t.body,n),o=new Ze.MathNode("mstyle",r);return o.setAttribute("mathsize",it(n.sizeMultiplier)),o}});ut({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:r}=t,o=!1,l=!1,h=n[0]&&qt(n[0],"ordgroup");if(h)for(var c="",p=0;p<h.body.length;++p){var v=h.body[p];if(c=v.text,c==="t")o=!0;else if(c==="b")l=!0;else{o=!1,l=!1;break}}else o=!0,l=!0;var b=e[0];return{type:"smash",mode:r.mode,body:b,smashHeight:o,smashDepth:l}},htmlBuilder:(t,e)=>{var n=Se.makeSpan([],[Jt(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(t.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var l=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e);return Se.makeSpan(["mord"],[l],e)},mathmlBuilder:(t,e)=>{var n=new Ze.MathNode("mpadded",[vn(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});ut({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,o=n[0],l=e[0];return{type:"sqrt",mode:r.mode,body:l,index:o}},htmlBuilder(t,e){var n=Jt(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=Se.wrapFragment(n,e);var r=e.fontMetrics(),o=r.defaultRuleThickness,l=o;e.style.id<Tt.TEXT.id&&(l=e.fontMetrics().xHeight);var h=o+l/4,c=n.height+n.depth+h+o,{span:p,ruleWidth:v,advanceWidth:b}=Sa.sqrtImage(c,e),g=p.height-v;g>n.height+n.depth+h&&(h=(h+g-n.height-n.depth)/2);var m=p.height-n.height-h-v;n.style.paddingLeft=it(b);var x=Se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+m)},{type:"elem",elem:p},{type:"kern",size:v}]},e);if(t.index){var w=e.havingStyle(Tt.SCRIPTSCRIPT),S=Jt(t.index,w,e),k=.6*(x.height-x.depth),C=Se.makeVList({positionType:"shift",positionData:-k,children:[{type:"elem",elem:S}]},e),T=Se.makeSpan(["root"],[C]);return Se.makeSpan(["mord","sqrt"],[T,x],e)}else return Se.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new Ze.MathNode("mroot",[vn(n,e),vn(r,e)]):new Ze.MathNode("msqrt",[vn(n,e)])}});var Ym={display:Tt.DISPLAY,text:Tt.TEXT,script:Tt.SCRIPT,scriptscript:Tt.SCRIPTSCRIPT};ut({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!0,n),h=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:h,body:l}},htmlBuilder(t,e){var n=Ym[t.style],r=e.havingStyle(n).withFont("");return Z6(t.body,r,e)},mathmlBuilder(t,e){var n=Ym[t.style],r=e.havingStyle(n),o=Or(t.body,r),l=new Ze.MathNode("mstyle",o),h={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},c=h[t.style];return l.setAttribute("scriptlevel",c[0]),l.setAttribute("displaystyle",c[1]),l}});var $x=function(t,e){var n=t.base;if(n)if(n.type==="op"){var r=n.limits&&(e.style.size===Tt.DISPLAY.size||n.alwaysHandleSupSub);return r?xs:null}else if(n.type==="operatorname"){var o=n.alwaysHandleSupSub&&(e.style.size===Tt.DISPLAY.size||n.limits);return o?X6:null}else{if(n.type==="accent")return wt.isCharacterBox(n.base)?Nf:null;if(n.type==="horizBrace"){var l=!t.sub;return l===n.isOver?W6:null}else return null}else return null};Wo({type:"supsub",htmlBuilder(t,e){var n=$x(t,e);if(n)return n(t,e);var{base:r,sup:o,sub:l}=t,h=Jt(r,e),c,p,v=e.fontMetrics(),b=0,g=0,m=r&&wt.isCharacterBox(r);if(o){var x=e.havingStyle(e.style.sup());c=Jt(o,x,e),m||(b=h.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(l){var w=e.havingStyle(e.style.sub());p=Jt(l,w,e),m||(g=h.depth+w.fontMetrics().subDrop*w.sizeMultiplier/e.sizeMultiplier)}var S;e.style===Tt.DISPLAY?S=v.sup1:e.style.cramped?S=v.sup3:S=v.sup2;var k=e.sizeMultiplier,C=it(.5/v.ptPerEm/k),T=null;if(p){var A=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(h instanceof ui||A)&&(T=it(-h.italic))}var M;if(c&&p){b=Math.max(b,S,c.depth+.25*v.xHeight),g=Math.max(g,v.sub2);var y=v.defaultRuleThickness,N=4*y;if(b-c.depth-(p.height-g)<N){g=N-(b-c.depth)+p.height;var z=.8*v.xHeight-(b-c.depth);z>0&&(b+=z,g-=z)}var F=[{type:"elem",elem:p,shift:g,marginRight:C,marginLeft:T},{type:"elem",elem:c,shift:-b,marginRight:C}];M=Se.makeVList({positionType:"individualShift",children:F},e)}else if(p){g=Math.max(g,v.sub1,p.height-.8*v.xHeight);var P=[{type:"elem",elem:p,marginLeft:T,marginRight:C}];M=Se.makeVList({positionType:"shift",positionData:g,children:P},e)}else if(c)b=Math.max(b,S,c.depth+.25*v.xHeight),M=Se.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:c,marginRight:C}]},e);else throw new Error("supsub must have either sup or sub.");var Y=rp(h,"right")||"mord";return Se.makeSpan([Y],[h,Se.makeSpan(["msupsub"],[M])],e)},mathmlBuilder(t,e){var n=!1,r,o;t.base&&t.base.type==="horizBrace"&&(o=!!t.sup,o===t.base.isOver&&(n=!0,r=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var l=[vn(t.base,e)];t.sub&&l.push(vn(t.sub,e)),t.sup&&l.push(vn(t.sup,e));var h;if(n)h=r?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===Tt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===Tt.DISPLAY||c.limits)?h="munderover":h="msubsup"}else{var p=t.base;p&&p.type==="op"&&p.limits&&(e.style===Tt.DISPLAY||p.alwaysHandleSupSub)||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(p.limits||e.style===Tt.DISPLAY)?h="munder":h="msub"}else{var v=t.base;v&&v.type==="op"&&v.limits&&(e.style===Tt.DISPLAY||v.alwaysHandleSupSub)||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(v.limits||e.style===Tt.DISPLAY)?h="mover":h="msup"}return new Ze.MathNode(h,l)}});Wo({type:"atom",htmlBuilder(t,e){return Se.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new Ze.MathNode("mo",[di(t.text,t.mode)]);if(t.family==="bin"){var r=Lf(t,e);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else t.family==="punct"?n.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&n.setAttribute("stretchy","false");return n}});var Y6={mi:"italic",mn:"normal",mtext:"normal"};Wo({type:"mathord",htmlBuilder(t,e){return Se.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var n=new Ze.MathNode("mi",[di(t.text,t.mode,e)]),r=Lf(t,e)||"italic";return r!==Y6[n.type]&&n.setAttribute("mathvariant",r),n}});Wo({type:"textord",htmlBuilder(t,e){return Se.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var n=di(t.text,t.mode,e),r=Lf(t,e)||"normal",o;return t.mode==="text"?o=new Ze.MathNode("mtext",[n]):/[0-9]/.test(t.text)?o=new Ze.MathNode("mn",[n]):t.text==="\\prime"?o=new Ze.MathNode("mo",[n]):o=new Ze.MathNode("mi",[n]),r!==Y6[o.type]&&o.setAttribute("mathvariant",r),o}});var oh={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},sh={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Wo({type:"spacing",htmlBuilder(t,e){if(sh.hasOwnProperty(t.text)){var n=sh[t.text].className||"";if(t.mode==="text"){var r=Se.makeOrd(t,e,"textord");return r.classes.push(n),r}else return Se.makeSpan(["mspace",n],[Se.mathsym(t.text,t.mode,e)],e)}else{if(oh.hasOwnProperty(t.text))return Se.makeSpan(["mspace",oh[t.text]],[],e);throw new et('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(sh.hasOwnProperty(t.text))n=new Ze.MathNode("mtext",[new Ze.TextNode(" ")]);else{if(oh.hasOwnProperty(t.text))return new Ze.MathNode("mspace");throw new et('Unknown type of space "'+t.text+'"')}return n}});var Jm=()=>{var t=new Ze.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Wo({type:"tag",mathmlBuilder(t,e){var n=new Ze.MathNode("mtable",[new Ze.MathNode("mtr",[Jm(),new Ze.MathNode("mtd",[ao(t.body,e)]),Jm(),new Ze.MathNode("mtd",[ao(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var Qm={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},eg={"\\textbf":"textbf","\\textmd":"textmd"},Ux={"\\textit":"textit","\\textup":"textup"},tg=(t,e)=>{var n=t.font;if(n){if(Qm[n])return e.withTextFontFamily(Qm[n]);if(eg[n])return e.withTextFontWeight(eg[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Ux[n])};ut({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"text",mode:n.mode,body:qn(o),font:r}},htmlBuilder(t,e){var n=tg(t,e),r=Qn(t.body,n,!0);return Se.makeSpan(["mord","text"],r,n)},mathmlBuilder(t,e){var n=tg(t,e);return ao(t.body,n)}});ut({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Jt(t.body,e),r=Se.makeLineSpan("underline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Se.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},e);return Se.makeSpan(["mord","underline"],[l],e)},mathmlBuilder(t,e){var n=new Ze.MathNode("mo",[new Ze.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ze.MathNode("munder",[vn(t.body,e),n]);return r.setAttribute("accentunder","true"),r}});ut({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Jt(t.body,e),r=e.fontMetrics().axisHeight,o=.5*(n.height-r-(n.depth+r));return Se.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){return new Ze.MathNode("mpadded",[vn(t.body,e)],["vcenter"])}});ut({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new et("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=ng(t),r=[],o=e.havingStyle(e.style.text()),l=0;l<n.length;l++){var h=n[l];h==="~"&&(h="\\textasciitilde"),r.push(Se.makeSymbol(h,"Typewriter-Regular",t.mode,o,["mord","texttt"]))}return Se.makeSpan(["mord","text"].concat(o.sizingClasses(e)),Se.tryCombineChars(r),o)},mathmlBuilder(t,e){var n=new Ze.TextNode(ng(t)),r=new Ze.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var ng=t=>t.body.replace(/ /g,t.star?"␣":" "),Ya=w6,J6=`[ \r
|
||
]`,Vx="\\\\[a-zA-Z@]+",Wx="\\\\[^\uD800-\uDFFF]",Gx="("+Vx+")"+J6+"*",Kx=`\\\\(
|
||
|[ \r ]+
|
||
?)[ \r ]*`,sp="[̀-ͯ]",Xx=new RegExp(sp+"+$"),Zx="("+J6+"+)|"+(Kx+"|")+"([!-\\[\\]-‧-豈-]"+(sp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(sp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Gx)+("|"+Wx+")");class rg{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(Zx,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new si("EOF",new Vr(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new et("Unexpected character: '"+e[n]+"'",new si(e[n],new Vr(this,n,n+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[o]===14){var l=e.indexOf(`
|
||
`,this.tokenRegex.lastIndex);return l===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=l+1,this.lex()}return new si(o,new Vr(this,n,this.tokenRegex.lastIndex))}}class Yx{constructor(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new et("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,n,r){if(r===void 0&&(r=!1),r){for(var o=0;o<this.undefStack.length;o++)delete this.undefStack[o][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=n)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(e)&&(l[e]=this.current[e])}n==null?delete this.current[e]:this.current[e]=n}}var Jx=q6;W("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});W("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});W("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});W("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});W("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return e[0].length===1&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});W("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");W("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var ig={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(t){var e=t.popToken(),n,r="";if(e.text==="'")n=8,e=t.popToken();else if(e.text==='"')n=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")r=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new et("\\char` missing argument");r=e.text.charCodeAt(0)}else n=10;if(n){if(r=ig[e.text],r==null||r>=n)throw new et("Invalid base-"+n+" digit "+e.text);for(var o;(o=ig[t.future().text])!=null&&o<n;)r*=n,r+=o,t.popToken()}return"\\@char{"+r+"}"});var Bf=(t,e,n,r)=>{var o=t.consumeArg().tokens;if(o.length!==1)throw new et("\\newcommand's first argument must be a macro name");var l=o[0].text,h=t.isDefined(l);if(h&&!e)throw new et("\\newcommand{"+l+"} attempting to redefine "+(l+"; use \\renewcommand"));if(!h&&!n)throw new et("\\renewcommand{"+l+"} when command "+l+" does not yet exist; use \\newcommand");var c=0;if(o=t.consumeArg().tokens,o.length===1&&o[0].text==="["){for(var p="",v=t.expandNextToken();v.text!=="]"&&v.text!=="EOF";)p+=v.text,v=t.expandNextToken();if(!p.match(/^\s*[0-9]+\s*$/))throw new et("Invalid number of arguments: "+p);c=parseInt(p),o=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:o,numArgs:c}),""};W("\\newcommand",t=>Bf(t,!1,!0,!1));W("\\renewcommand",t=>Bf(t,!0,!1,!1));W("\\providecommand",t=>Bf(t,!0,!0,!0));W("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});W("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});W("\\show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),Ya[n],wn.math[n],wn.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("·","\\cdotp");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}}{\\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("️","\\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 ag={",":"\\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"};W("\\dots",function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in ag?e=ag[n]:(n.slice(0,4)==="\\not"||n in wn.math&&wt.contains(["bin","rel"],wn.math[n].group))&&(e="\\dotsb"),e});var Ff={")":!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(t){var e=t.future().text;return e in Ff?"\\ldots\\,":"\\ldots"});W("\\dotsc",function(t){var e=t.future().text;return e in Ff&&e!==","?"\\ldots\\,":"\\ldots"});W("\\cdots",function(t){var e=t.future().text;return e in Ff?"\\@cdots\\,":"\\@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",t=>{if(t.macros.get("\\df@tag"))throw new et("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 Q6=it(Bi["Main-Regular"]["T".charCodeAt(0)][1]-.7*Bi["Main-Regular"]["A".charCodeAt(0)][1]);W("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Q6+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");W("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Q6+"}{\\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("⦃","\\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 e3=t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.consumeArg().tokens,l=e.consumeArg().tokens,h=e.macros.get("|"),c=e.macros.get("\\|");e.macros.beginGroup();var p=g=>m=>{t&&(m.macros.set("|",h),o.length&&m.macros.set("\\|",c));var x=g;if(!g&&o.length){var w=m.future();w.text==="|"&&(m.popToken(),x=!0)}return{tokens:x?o:r,numArgs:0}};e.macros.set("|",p(!1)),o.length&&e.macros.set("\\|",p(!0));var v=e.consumeArg().tokens,b=e.expandTokens([...l,...v,...n]);return e.macros.endGroup(),{tokens:b.reverse(),numArgs:0}};W("\\bra@ket",e3(!1));W("\\bra@set",e3(!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 t3={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Qx{constructor(e,n,r){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=n,this.expansionCount=0,this.feed(e),this.macros=new Yx(Jx,n.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new rg(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var n,r,o;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:o,end:r}=this.consumeArg(["]"])}else({tokens:o,start:n,end:r}=this.consumeArg());return this.pushToken(new si("EOF",r.loc)),this.pushTokens(o),n.range(r,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var n=[],r=e&&e.length>0;r||this.consumeSpaces();var o=this.future(),l,h=0,c=0;do{if(l=this.popToken(),n.push(l),l.text==="{")++h;else if(l.text==="}"){if(--h,h===-1)throw new et("Extra }",l)}else if(l.text==="EOF")throw new et("Unexpected end of input in a macro argument, expected '"+(e&&r?e[c]:"}")+"'",l);if(e&&r)if((h===0||h===1&&e[c]==="{")&&l.text===e[c]){if(++c,c===e.length){n.splice(-c,c);break}}else c=0}while(h!==0||r);return o.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:o,end:l}}consumeArgs(e,n){if(n){if(n.length!==e+1)throw new et("The length of delimiters doesn't match the number of args!");for(var r=n[0],o=0;o<r.length;o++){var l=this.popToken();if(r[o]!==l.text)throw new et("Use of the macro doesn't match its definition",l)}}for(var h=[],c=0;c<e;c++)h.push(this.consumeArg(n&&n[c+1]).tokens);return h}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new et("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var n=this.popToken(),r=n.text,o=n.noexpand?null:this._getExpansion(r);if(o==null||e&&o.unexpandable){if(e&&o==null&&r[0]==="\\"&&!this.isDefined(r))throw new et("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var l=o.tokens,h=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){l=l.slice();for(var c=l.length-1;c>=0;--c){var p=l[c];if(p.text==="#"){if(c===0)throw new et("Incomplete placeholder at end of macro body",p);if(p=l[--c],p.text==="#")l.splice(c+1,1);else if(/^[1-9]$/.test(p.text))l.splice(c,2,...h[+p.text-1]);else throw new et("Not a valid argument number",p)}}}return this.pushTokens(l),l.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new si(e)]):void 0}expandTokens(e){var n=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(this.expandOnce(!0)===!1){var o=this.stack.pop();o.treatAsRelax&&(o.noexpand=!1,o.treatAsRelax=!1),n.push(o)}return this.countExpansion(n.length),n}expandMacroAsText(e){var n=this.expandMacro(e);return n&&n.map(r=>r.text).join("")}_getExpansion(e){var n=this.macros.get(e);if(n==null)return n;if(e.length===1){var r=this.lexer.catcodes[e];if(r!=null&&r!==13)return}var o=typeof n=="function"?n(this):n;if(typeof o=="string"){var l=0;if(o.indexOf("#")!==-1)for(var h=o.replace(/##/g,"");h.indexOf("#"+(l+1))!==-1;)++l;for(var c=new rg(o,this.settings),p=[],v=c.lex();v.text!=="EOF";)p.push(v),v=c.lex();p.reverse();var b={tokens:p,numArgs:l};return b}return o}isDefined(e){return this.macros.has(e)||Ya.hasOwnProperty(e)||wn.math.hasOwnProperty(e)||wn.text.hasOwnProperty(e)||t3.hasOwnProperty(e)}isExpandable(e){var n=this.macros.get(e);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Ya.hasOwnProperty(e)&&!Ya[e].primitive}}var og=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,y0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),lh={"́":{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"}},sg={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Yc{constructor(e,n){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 Qx(e,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(e,n){if(n===void 0&&(n=!0),this.fetch().text!==e)throw new et("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var n=this.nextToken;this.consume(),this.gullet.pushToken(new si("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(e,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var o=this.fetch();if(Yc.endOfExpression.indexOf(o.text)!==-1||n&&o.text===n||e&&Ya[o.text]&&Ya[o.text].infix)break;var l=this.parseAtom(n);if(l){if(l.type==="internal")continue}else break;r.push(l)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var n=-1,r,o=0;o<e.length;o++)if(e[o].type==="infix"){if(n!==-1)throw new et("only one infix operator per group",e[o].token);n=o,r=e[o].replaceWith}if(n!==-1&&r){var l,h,c=e.slice(0,n),p=e.slice(n+1);c.length===1&&c[0].type==="ordgroup"?l=c[0]:l={type:"ordgroup",mode:this.mode,body:c},p.length===1&&p[0].type==="ordgroup"?h=p[0]:h={type:"ordgroup",mode:this.mode,body:p};var v;return r==="\\\\abovefrac"?v=this.callFunction(r,[l,e[n],h],[]):v=this.callFunction(r,[l,h],[]),[v]}else return e}handleSupSubscript(e){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var o;do{var l;o=this.parseGroup(e)}while(((l=o)==null?void 0:l.type)==="internal");if(!o)throw new et("Expected group after '"+r+"'",n);return o}formatUnsupportedCmd(e){for(var n=[],r=0;r<e.length;r++)n.push({type:"textord",mode:"text",text:e[r]});var o={type:"text",mode:this.mode,body:n},l={type:"color",mode:this.mode,color:this.settings.errorColor,body:[o]};return l}parseAtom(e){var n=this.parseGroup("atom",e);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var r,o;;){this.consumeSpaces();var l=this.fetch();if(l.text==="\\limits"||l.text==="\\nolimits"){if(n&&n.type==="op"){var h=l.text==="\\limits";n.limits=h,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=l.text==="\\limits");else throw new et("Limit controls must follow a math operator",l);this.consume()}else if(l.text==="^"){if(r)throw new et("Double superscript",l);r=this.handleSupSubscript("superscript")}else if(l.text==="_"){if(o)throw new et("Double subscript",l);o=this.handleSupSubscript("subscript")}else if(l.text==="'"){if(r)throw new et("Double superscript",l);var c={type:"textord",mode:this.mode,text:"\\prime"},p=[c];for(this.consume();this.fetch().text==="'";)p.push(c),this.consume();this.fetch().text==="^"&&p.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:p}}else if(y0[l.text]){var v=og.test(l.text),b=[];for(b.push(new si(y0[l.text])),this.consume();;){var g=this.fetch().text;if(!y0[g]||og.test(g)!==v)break;b.unshift(new si(y0[g])),this.consume()}var m=this.subparse(b);v?o={type:"ordgroup",mode:"math",body:m}:r={type:"ordgroup",mode:"math",body:m}}else break}return r||o?{type:"supsub",mode:this.mode,base:n,sup:r,sub:o}:n}parseFunction(e,n){var r=this.fetch(),o=r.text,l=Ya[o];if(!l)return null;if(this.consume(),n&&n!=="atom"&&!l.allowedInArgument)throw new et("Got function '"+o+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!l.allowedInText)throw new et("Can't use function '"+o+"' in text mode",r);if(this.mode==="math"&&l.allowedInMath===!1)throw new et("Can't use function '"+o+"' in math mode",r);var{args:h,optArgs:c}=this.parseArguments(o,l);return this.callFunction(o,h,c,r,e)}callFunction(e,n,r,o,l){var h={funcName:e,parser:this,token:o,breakOnTokenText:l},c=Ya[e];if(c&&c.handler)return c.handler(h,n,r);throw new et("No function handler for "+e)}parseArguments(e,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var o=[],l=[],h=0;h<r;h++){var c=n.argTypes&&n.argTypes[h],p=h<n.numOptionalArgs;(n.primitive&&c==null||n.type==="sqrt"&&h===1&&l[0]==null)&&(c="primitive");var v=this.parseGroupOfType("argument to '"+e+"'",c,p);if(p)l.push(v);else if(v!=null)o.push(v);else throw new et("Null argument, please report this as a bug")}return{args:o,optArgs:l}}parseGroupOfType(e,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var o=this.parseArgumentGroup(r,"text");return o!=null?{type:"styling",mode:o.mode,body:[o],style:"text"}:null}case"raw":{var l=this.parseStringGroup("raw",r);return l!=null?{type:"raw",mode:"text",string:l.text}:null}case"primitive":{if(r)throw new et("A primitive argument cannot be optional");var h=this.parseGroup(e);if(h==null)throw new et("Expected group as "+e,this.fetch());return h}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new et("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,n){var r=this.gullet.scanArgument(n);if(r==null)return null;for(var o="",l;(l=this.fetch()).text!=="EOF";)o+=l.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,n){for(var r=this.fetch(),o=r,l="",h;(h=this.fetch()).text!=="EOF"&&e.test(l+h.text);)o=h,l+=o.text,this.consume();if(l==="")throw new et("Invalid "+n+": '"+r.text+"'",r);return r.range(o,l)}parseColorGroup(e){var n=this.parseStringGroup("color",e);if(n==null)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new et("Invalid color: '"+n.text+"'",n);var o=r[0];return/^[0-9a-f]{6}$/i.test(o)&&(o="#"+o),{type:"color-token",mode:this.mode,color:o}}parseSizeGroup(e){var n,r=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",e),!n)return null;!e&&n.text.length===0&&(n.text="0pt",r=!0);var o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!o)throw new et("Invalid size: '"+n.text+"'",n);var l={number:+(o[1]+o[2]),unit:o[3]};if(!d6(l))throw new et("Invalid unit: '"+l.unit+"'",n);return{type:"size",mode:this.mode,value:l,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,n){var r=this.gullet.scanArgument(e);if(r==null)return null;var o=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var l=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var h={type:"ordgroup",mode:this.mode,loc:r.loc,body:l};return n&&this.switchMode(o),h}parseGroup(e,n){var r=this.fetch(),o=r.text,l;if(o==="{"||o==="\\begingroup"){this.consume();var h=o==="{"?"}":"\\endgroup";this.gullet.beginGroup();var c=this.parseExpression(!1,h),p=this.fetch();this.expect(h),this.gullet.endGroup(),l={type:"ordgroup",mode:this.mode,loc:Vr.range(r,p),body:c,semisimple:o==="\\begingroup"||void 0}}else if(l=this.parseFunction(n,e)||this.parseSymbol(),l==null&&o[0]==="\\"&&!t3.hasOwnProperty(o)){if(this.settings.throwOnError)throw new et("Undefined control sequence: "+o,r);l=this.formatUnsupportedCmd(o),this.consume()}return l}formLigatures(e){for(var n=e.length-1,r=0;r<n;++r){var o=e[r],l=o.text;l==="-"&&e[r+1].text==="-"&&(r+1<n&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:Vr.range(o,e[r+2]),text:"---"}),n-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Vr.range(o,e[r+1]),text:"--"}),n-=1)),(l==="'"||l==="`")&&e[r+1].text===l&&(e.splice(r,2,{type:"textord",mode:"text",loc:Vr.range(o,e[r+1]),text:l+l}),n-=1)}}parseSymbol(){var e=this.fetch(),n=e.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),o=r.charAt(0)==="*";if(o&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new et(`\\verb assertion failed --
|
||
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:o}}sg.hasOwnProperty(n[0])&&!wn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',e),n=sg[n[0]]+n.slice(1));var l=Xx.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var h;if(wn[this.mode][n]){this.settings.strict&&this.mode==="math"&&np.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=wn[this.mode][n].group,p=Vr.range(e),v;if(q9.hasOwnProperty(c)){var b=c;v={type:"atom",mode:this.mode,family:b,loc:p,text:n}}else v={type:c,mode:this.mode,loc:p,text:n};h=v}else if(n.charCodeAt(0)>=128)this.settings.strict&&(u6(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),e)),h={type:"textord",mode:"text",loc:Vr.range(e),text:n};else return null;if(this.consume(),l)for(var g=0;g<l[0].length;g++){var m=l[0][g];if(!lh[m])throw new et("Unknown accent ' "+m+"'",e);var x=lh[m][this.mode]||lh[m].text;if(!x)throw new et("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc:Vr.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}Yc.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var qf=function(t,e){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Yc(t,e);delete n.gullet.macros.current["\\df@tag"];var r=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new et("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new si("\\df@tag")])}]}return r},n3=function(t,e,n){e.textContent="";var r=jf(t,n).toNode();e.appendChild(r)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),n3=function(){throw new et("KaTeX doesn't work in quirks mode.")});var ek=function(t,e){var n=jf(t,e).toMarkup();return n},tk=function(t,e){var n=new Sf(e);return qf(t,n)},r3=function(t,e,n){if(n.throwOnError||!(t instanceof et))throw t;var r=Se.makeSpan(["katex-error"],[new ui(e)]);return r.setAttribute("title",t.toString()),r.setAttribute("style","color:"+n.errorColor),r},jf=function(t,e){var n=new Sf(e);try{var r=qf(t,n);return ux(r,t,n)}catch(o){return r3(o,t,n)}},nk=function(t,e){var n=new Sf(e);try{var r=qf(t,n);return dx(r,t,n)}catch(o){return r3(o,t,n)}},rk="0.16.22",ik={Span:Gl,Anchor:Af,SymbolNode:ui,SvgNode:Ca,PathNode:io,LineNode:tp},lg={version:rk,render:n3,renderToString:ek,ParseError:et,SETTINGS_SCHEMA:P0,__parse:tk,__renderToDomTree:jf,__renderToHTMLTree:nk,__setFontMetrics:R9,__defineSymbol:R,__defineFunction:ut,__defineMacro:W,__domTree:ik},i3={exports:{}};/*!
|
||
* Vditor v3.11.2 - A markdown editor written in TypeScript.
|
||
*
|
||
* MIT License
|
||
*
|
||
* Copyright (c) 2018-present B3log 开源, b3log.org
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in all
|
||
* copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*
|
||
*/(function(t,e){(function(n,r){t.exports=r()})(Jh,function(){return(()=>{var n={173:h=>{var c=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},p=-1,v=1,b=0;c.Diff=function(g,m){return[g,m]},c.prototype.diff_main=function(g,m,x,w){typeof w>"u"&&(this.Diff_Timeout<=0?w=Number.MAX_VALUE:w=new Date().getTime()+this.Diff_Timeout*1e3);var S=w;if(g==null||m==null)throw new Error("Null input. (diff_main)");if(g==m)return g?[new c.Diff(b,g)]:[];typeof x>"u"&&(x=!0);var k=x,C=this.diff_commonPrefix(g,m),T=g.substring(0,C);g=g.substring(C),m=m.substring(C),C=this.diff_commonSuffix(g,m);var A=g.substring(g.length-C);g=g.substring(0,g.length-C),m=m.substring(0,m.length-C);var M=this.diff_compute_(g,m,k,S);return T&&M.unshift(new c.Diff(b,T)),A&&M.push(new c.Diff(b,A)),this.diff_cleanupMerge(M),M},c.prototype.diff_compute_=function(g,m,x,w){var S;if(!g)return[new c.Diff(v,m)];if(!m)return[new c.Diff(p,g)];var k=g.length>m.length?g:m,C=g.length>m.length?m:g,T=k.indexOf(C);if(T!=-1)return S=[new c.Diff(v,k.substring(0,T)),new c.Diff(b,C),new c.Diff(v,k.substring(T+C.length))],g.length>m.length&&(S[0][0]=S[2][0]=p),S;if(C.length==1)return[new c.Diff(p,g),new c.Diff(v,m)];var A=this.diff_halfMatch_(g,m);if(A){var M=A[0],y=A[1],N=A[2],z=A[3],F=A[4],P=this.diff_main(M,N,x,w),Y=this.diff_main(y,z,x,w);return P.concat([new c.Diff(b,F)],Y)}return x&&g.length>100&&m.length>100?this.diff_lineMode_(g,m,w):this.diff_bisect_(g,m,w)},c.prototype.diff_lineMode_=function(g,m,x){var w=this.diff_linesToChars_(g,m);g=w.chars1,m=w.chars2;var S=w.lineArray,k=this.diff_main(g,m,!1,x);this.diff_charsToLines_(k,S),this.diff_cleanupSemantic(k),k.push(new c.Diff(b,""));for(var C=0,T=0,A=0,M="",y="";C<k.length;){switch(k[C][0]){case v:A++,y+=k[C][1];break;case p:T++,M+=k[C][1];break;case b:if(T>=1&&A>=1){k.splice(C-T-A,T+A),C=C-T-A;for(var N=this.diff_main(M,y,!1,x),z=N.length-1;z>=0;z--)k.splice(C,0,N[z]);C=C+N.length}A=0,T=0,M="",y="";break}C++}return k.pop(),k},c.prototype.diff_bisect_=function(g,m,x){for(var w=g.length,S=m.length,k=Math.ceil((w+S)/2),C=k,T=2*k,A=new Array(T),M=new Array(T),y=0;y<T;y++)A[y]=-1,M[y]=-1;A[C+1]=0,M[C+1]=0;for(var N=w-S,z=N%2!=0,F=0,P=0,Y=0,te=0,de=0;de<k&&!(new Date().getTime()>x);de++){for(var Ce=-de+F;Ce<=de-P;Ce+=2){var qe=C+Ce,Ge;Ce==-de||Ce!=de&&A[qe-1]<A[qe+1]?Ge=A[qe+1]:Ge=A[qe-1]+1;for(var nt=Ge-Ce;Ge<w&&nt<S&&g.charAt(Ge)==m.charAt(nt);)Ge++,nt++;if(A[qe]=Ge,Ge>w)P+=2;else if(nt>S)F+=2;else if(z){var je=C+N-Ce;if(je>=0&&je<T&&M[je]!=-1){var Ne=w-M[je];if(Ge>=Ne)return this.diff_bisectSplit_(g,m,Ge,nt,x)}}}for(var tt=-de+Y;tt<=de-te;tt+=2){var je=C+tt,Ne;tt==-de||tt!=de&&M[je-1]<M[je+1]?Ne=M[je+1]:Ne=M[je-1]+1;for(var lt=Ne-tt;Ne<w&<<S&&g.charAt(w-Ne-1)==m.charAt(S-lt-1);)Ne++,lt++;if(M[je]=Ne,Ne>w)te+=2;else if(lt>S)Y+=2;else if(!z){var qe=C+N-tt;if(qe>=0&&qe<T&&A[qe]!=-1){var Ge=A[qe],nt=C+Ge-qe;if(Ne=w-Ne,Ge>=Ne)return this.diff_bisectSplit_(g,m,Ge,nt,x)}}}}return[new c.Diff(p,g),new c.Diff(v,m)]},c.prototype.diff_bisectSplit_=function(g,m,x,w,S){var k=g.substring(0,x),C=m.substring(0,w),T=g.substring(x),A=m.substring(w),M=this.diff_main(k,C,!1,S),y=this.diff_main(T,A,!1,S);return M.concat(y)},c.prototype.diff_linesToChars_=function(g,m){var x=[],w={};x[0]="";function S(A){for(var M="",y=0,N=-1,z=x.length;N<A.length-1;){N=A.indexOf(`
|
||
`,y),N==-1&&(N=A.length-1);var F=A.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(F):w[F]!==void 0)?M+=String.fromCharCode(w[F]):(z==k&&(F=A.substring(y),N=A.length),M+=String.fromCharCode(z),w[F]=z,x[z++]=F),y=N+1}return M}var k=4e4,C=S(g);k=65535;var T=S(m);return{chars1:C,chars2:T,lineArray:x}},c.prototype.diff_charsToLines_=function(g,m){for(var x=0;x<g.length;x++){for(var w=g[x][1],S=[],k=0;k<w.length;k++)S[k]=m[w.charCodeAt(k)];g[x][1]=S.join("")}},c.prototype.diff_commonPrefix=function(g,m){if(!g||!m||g.charAt(0)!=m.charAt(0))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(k,S)==m.substring(k,S)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonSuffix=function(g,m){if(!g||!m||g.charAt(g.length-1)!=m.charAt(m.length-1))return 0;for(var x=0,w=Math.min(g.length,m.length),S=w,k=0;x<S;)g.substring(g.length-S,g.length-k)==m.substring(m.length-S,m.length-k)?(x=S,k=x):w=S,S=Math.floor((w-x)/2+x);return S},c.prototype.diff_commonOverlap_=function(g,m){var x=g.length,w=m.length;if(x==0||w==0)return 0;x>w?g=g.substring(x-w):x<w&&(m=m.substring(0,x));var S=Math.min(x,w);if(g==m)return S;for(var k=0,C=1;;){var T=g.substring(S-C),A=m.indexOf(T);if(A==-1)return k;C+=A,(A==0||g.substring(S-C)==m.substring(0,C))&&(k=C,C++)}},c.prototype.diff_halfMatch_=function(g,m){if(this.Diff_Timeout<=0)return null;var x=g.length>m.length?g:m,w=g.length>m.length?m:g;if(x.length<4||w.length*2<x.length)return null;var S=this;function k(P,Y,te){for(var de=P.substring(te,te+Math.floor(P.length/4)),Ce=-1,qe="",Ge,nt,je,Ne;(Ce=Y.indexOf(de,Ce+1))!=-1;){var tt=S.diff_commonPrefix(P.substring(te),Y.substring(Ce)),lt=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Ce));qe.length<lt+tt&&(qe=Y.substring(Ce-lt,Ce)+Y.substring(Ce,Ce+tt),Ge=P.substring(0,te-lt),nt=P.substring(te+tt),je=Y.substring(0,Ce-lt),Ne=Y.substring(Ce+tt))}return qe.length*2>=P.length?[Ge,nt,je,Ne,qe]:null}var C=k(x,w,Math.ceil(x.length/4)),T=k(x,w,Math.ceil(x.length/2)),A;if(!C&&!T)return null;T?C?A=C[4].length>T[4].length?C:T:A=T:A=C;var M,y,N,z;g.length>m.length?(M=A[0],y=A[1],N=A[2],z=A[3]):(N=A[0],z=A[1],M=A[2],y=A[3]);var F=A[4];return[M,y,N,z,F]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,T=0,A=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=A,T=M,A=0,M=0,S=g[k][1]):(g[k][0]==v?A+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,T)&&S.length<=Math.max(A,M)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,w--,k=w>0?x[w-1]:-1,C=0,T=0,A=0,M=0,S=null,m=!0)),k++;for(m&&this.diff_cleanupMerge(g),this.diff_cleanupSemanticLossless(g),k=1;k<g.length;){if(g[k-1][0]==p&&g[k][0]==v){var y=g[k-1][1],N=g[k][1],z=this.diff_commonOverlap_(y,N),F=this.diff_commonOverlap_(N,y);z>=F?(z>=y.length/2||z>=N.length/2)&&(g.splice(k,0,new c.Diff(b,N.substring(0,z))),g[k-1][1]=y.substring(0,y.length-z),g[k+1][1]=N.substring(z),k++):(F>=y.length/2||F>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,F))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-F),g[k+1][0]=p,g[k+1][1]=y.substring(F),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(F,P){if(!F||!P)return 6;var Y=F.charAt(F.length-1),te=P.charAt(0),de=Y.match(c.nonAlphaNumericRegex_),Ce=te.match(c.nonAlphaNumericRegex_),qe=de&&Y.match(c.whitespaceRegex_),Ge=Ce&&te.match(c.whitespaceRegex_),nt=qe&&Y.match(c.linebreakRegex_),je=Ge&&te.match(c.linebreakRegex_),Ne=nt&&F.match(c.blanklineEndRegex_),tt=je&&P.match(c.blanklineStartRegex_);return Ne||tt?5:nt||je?4:de&&!qe&&Ge?3:qe||Ge?2:de||Ce?1:0}for(var x=1;x<g.length-1;){if(g[x-1][0]==b&&g[x+1][0]==b){var w=g[x-1][1],S=g[x][1],k=g[x+1][1],C=this.diff_commonSuffix(w,S);if(C){var T=S.substring(S.length-C);w=w.substring(0,w.length-C),S=T+S.substring(0,S.length-C),k=T+k}for(var A=w,M=S,y=k,N=m(w,S)+m(S,k);S.charAt(0)===k.charAt(0);){w+=S.charAt(0),S=S.substring(1)+k.charAt(0),k=k.substring(1);var z=m(w,S)+m(S,k);z>=N&&(N=z,A=w,M=S,y=k)}g[x-1][1]!=A&&(A?g[x-1][1]=A:(g.splice(x-1,1),x--),g[x][1]=M,y?g[x+1][1]=y:(g.splice(x+1,1),x--))}x++}},c.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,c.whitespaceRegex_=/\s/,c.linebreakRegex_=/[\r\n]/,c.blanklineEndRegex_=/\n\r?\n$/,c.blanklineStartRegex_=/^\r?\n\r?\n/,c.prototype.diff_cleanupEfficiency=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=!1,T=!1,A=!1,M=!1;k<g.length;)g[k][0]==b?(g[k][1].length<this.Diff_EditCost&&(A||M)?(x[w++]=k,C=A,T=M,S=g[k][1]):(w=0,S=null),A=M=!1):(g[k][0]==p?M=!0:A=!0,S&&(C&&T&&A&&M||S.length<this.Diff_EditCost/2&&C+T+A+M==3)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,S=null,C&&T?(A=M=!0,w=0):(w--,k=w>0?x[w-1]:-1,A=M=!1),m=!0)),k++;m&&this.diff_cleanupMerge(g)},c.prototype.diff_cleanupMerge=function(g){g.push(new c.Diff(b,""));for(var m=0,x=0,w=0,S="",k="",C;m<g.length;)switch(g[m][0]){case v:w++,k+=g[m][1],m++;break;case p:x++,S+=g[m][1],m++;break;case b:x+w>1?(x!==0&&w!==0&&(C=this.diff_commonPrefix(k,S),C!==0&&(m-x-w>0&&g[m-x-w-1][0]==b?g[m-x-w-1][1]+=k.substring(0,C):(g.splice(0,0,new c.Diff(b,k.substring(0,C))),m++),k=k.substring(C),S=S.substring(C)),C=this.diff_commonSuffix(k,S),C!==0&&(g[m][1]=k.substring(k.length-C)+g[m][1],k=k.substring(0,k.length-C),S=S.substring(0,S.length-C))),m-=x+w,g.splice(m,x+w),S.length&&(g.splice(m,0,new c.Diff(p,S)),m++),k.length&&(g.splice(m,0,new c.Diff(v,k)),m++),m++):m!==0&&g[m-1][0]==b?(g[m-1][1]+=g[m][1],g.splice(m,1)):m++,w=0,x=0,S="",k="";break}g[g.length-1][1]===""&&g.pop();var T=!1;for(m=1;m<g.length-1;)g[m-1][0]==b&&g[m+1][0]==b&&(g[m][1].substring(g[m][1].length-g[m-1][1].length)==g[m-1][1]?(g[m][1]=g[m-1][1]+g[m][1].substring(0,g[m][1].length-g[m-1][1].length),g[m+1][1]=g[m-1][1]+g[m+1][1],g.splice(m-1,1),T=!0):g[m][1].substring(0,g[m+1][1].length)==g[m+1][1]&&(g[m-1][1]+=g[m+1][1],g[m][1]=g[m][1].substring(g[m+1][1].length)+g[m+1][1],g.splice(m+1,1),T=!0)),m++;T&&this.diff_cleanupMerge(g)},c.prototype.diff_xIndex=function(g,m){var x=0,w=0,S=0,k=0,C;for(C=0;C<g.length&&(g[C][0]!==v&&(x+=g[C][1].length),g[C][0]!==p&&(w+=g[C][1].length),!(x>m));C++)S=x,k=w;return g.length!=C&&g[C][0]===p?k:k+(m-S)},c.prototype.diff_prettyHtml=function(g){for(var m=[],x=/&/g,w=/</g,S=/>/g,k=/\n/g,C=0;C<g.length;C++){var T=g[C][0],A=g[C][1],M=A.replace(x,"&").replace(w,"<").replace(S,">").replace(k,"¶<br>");switch(T){case v:m[C]='<ins style="background:#e6ffe6;">'+M+"</ins>";break;case p:m[C]='<del style="background:#ffe6e6;">'+M+"</del>";break;case b:m[C]="<span>"+M+"</span>";break}}return m.join("")},c.prototype.diff_text1=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==v&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_text2=function(g){for(var m=[],x=0;x<g.length;x++)g[x][0]!==p&&(m[x]=g[x][1]);return m.join("")},c.prototype.diff_levenshtein=function(g){for(var m=0,x=0,w=0,S=0;S<g.length;S++){var k=g[S][0],C=g[S][1];switch(k){case v:x+=C.length;break;case p:w+=C.length;break;case b:m+=Math.max(x,w),x=0,w=0;break}}return m+=Math.max(x,w),m},c.prototype.diff_toDelta=function(g){for(var m=[],x=0;x<g.length;x++)switch(g[x][0]){case v:m[x]="+"+encodeURI(g[x][1]);break;case p:m[x]="-"+g[x][1].length;break;case b:m[x]="="+g[x][1].length;break}return m.join(" ").replace(/%20/g," ")},c.prototype.diff_fromDelta=function(g,m){for(var x=[],w=0,S=0,k=m.split(/\t/g),C=0;C<k.length;C++){var T=k[C].substring(1);switch(k[C].charAt(0)){case"+":try{x[w++]=new c.Diff(v,decodeURI(T))}catch{throw new Error("Illegal escape in diff_fromDelta: "+T)}break;case"-":case"=":var A=parseInt(T,10);if(isNaN(A)||A<0)throw new Error("Invalid number in diff_fromDelta: "+T);var M=g.substring(S,S+=A);k[C].charAt(0)=="="?x[w++]=new c.Diff(b,M):x[w++]=new c.Diff(p,M);break;default:if(k[C])throw new Error("Invalid diff operation in diff_fromDelta: "+k[C])}}if(S!=g.length)throw new Error("Delta length ("+S+") does not equal source text length ("+g.length+").");return x},c.prototype.match_main=function(g,m,x){if(g==null||m==null||x==null)throw new Error("Null input. (match_main)");return x=Math.max(0,Math.min(x,g.length)),g==m?0:g.length?g.substring(x,x+m.length)==m?x:this.match_bitap_(g,m,x):-1},c.prototype.match_bitap_=function(g,m,x){if(m.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var w=this.match_alphabet_(m),S=this;function k(Ge,nt){var je=Ge/m.length,Ne=Math.abs(x-nt);return S.Match_Distance?je+Ne/S.Match_Distance:Ne?1:je}var C=this.Match_Threshold,T=g.indexOf(m,x);T!=-1&&(C=Math.min(k(0,T),C),T=g.lastIndexOf(m,x+m.length),T!=-1&&(C=Math.min(k(0,T),C)));var A=1<<m.length-1;T=-1;for(var M,y,N=m.length+g.length,z,F=0;F<m.length;F++){for(M=0,y=N;M<y;)k(F,x+y)<=C?M=y:N=y,y=Math.floor((N-M)/2+M);N=y;var P=Math.max(1,x-y+1),Y=Math.min(x+y,g.length)+m.length,te=Array(Y+2);te[Y+1]=(1<<F)-1;for(var de=Y;de>=P;de--){var Ce=w[g.charAt(de-1)];if(F===0?te[de]=(te[de+1]<<1|1)&Ce:te[de]=(te[de+1]<<1|1)&Ce|((z[de+1]|z[de])<<1|1)|z[de+1],te[de]&A){var qe=k(F,de-1);if(qe<=C)if(C=qe,T=de-1,T>x)P=Math.max(1,2*x-T);else break}}if(k(F+1,x)>C)break;z=te}return T},c.prototype.match_alphabet_=function(g){for(var m={},x=0;x<g.length;x++)m[g.charAt(x)]=0;for(var x=0;x<g.length;x++)m[g.charAt(x)]|=1<<g.length-x-1;return m},c.prototype.patch_addContext_=function(g,m){if(m.length!=0){if(g.start2===null)throw Error("patch not initialized");for(var x=m.substring(g.start2,g.start2+g.length1),w=0;m.indexOf(x)!=m.lastIndexOf(x)&&x.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)w+=this.Patch_Margin,x=m.substring(g.start2-w,g.start2+g.length1+w);w+=this.Patch_Margin;var S=m.substring(g.start2-w,g.start2);S&&g.diffs.unshift(new c.Diff(b,S));var k=m.substring(g.start2+g.length1,g.start2+g.length1+w);k&&g.diffs.push(new c.Diff(b,k)),g.start1-=S.length,g.start2-=S.length,g.length1+=S.length+k.length,g.length2+=S.length+k.length}},c.prototype.patch_make=function(g,m,x){var w,S;if(typeof g=="string"&&typeof m=="string"&&typeof x>"u")w=g,S=this.diff_main(w,m,!0),S.length>2&&(this.diff_cleanupSemantic(S),this.diff_cleanupEfficiency(S));else if(g&&typeof g=="object"&&typeof m>"u"&&typeof x>"u")S=g,w=this.diff_text1(S);else if(typeof g=="string"&&m&&typeof m=="object"&&typeof x>"u")w=g,S=m;else if(typeof g=="string"&&typeof m=="string"&&x&&typeof x=="object")w=g,S=x;else throw new Error("Unknown call format to patch_make.");if(S.length===0)return[];for(var k=[],C=new c.patch_obj,T=0,A=0,M=0,y=w,N=w,z=0;z<S.length;z++){var F=S[z][0],P=S[z][1];switch(!T&&F!==b&&(C.start1=A,C.start2=M),F){case v:C.diffs[T++]=S[z],C.length2+=P.length,N=N.substring(0,M)+P+N.substring(M);break;case p:C.length1+=P.length,C.diffs[T++]=S[z],N=N.substring(0,M)+N.substring(M+P.length);break;case b:P.length<=2*this.Patch_Margin&&T&&S.length!=z+1?(C.diffs[T++]=S[z],C.length1+=P.length,C.length2+=P.length):P.length>=2*this.Patch_Margin&&T&&(this.patch_addContext_(C,y),k.push(C),C=new c.patch_obj,T=0,y=N,A=M);break}F!==v&&(A+=P.length),F!==p&&(M+=P.length)}return T&&(this.patch_addContext_(C,y),k.push(C)),k},c.prototype.patch_deepCopy=function(g){for(var m=[],x=0;x<g.length;x++){var w=g[x],S=new c.patch_obj;S.diffs=[];for(var k=0;k<w.diffs.length;k++)S.diffs[k]=new c.Diff(w.diffs[k][0],w.diffs[k][1]);S.start1=w.start1,S.start2=w.start2,S.length1=w.length1,S.length2=w.length2,m[x]=S}return m},c.prototype.patch_apply=function(g,m){if(g.length==0)return[m,[]];g=this.patch_deepCopy(g);var x=this.patch_addPadding(g);m=x+m+x,this.patch_splitMax(g);for(var w=0,S=[],k=0;k<g.length;k++){var C=g[k].start2+w,T=this.diff_text1(g[k].diffs),A,M=-1;if(T.length>this.Match_MaxBits?(A=this.match_main(m,T.substring(0,this.Match_MaxBits),C),A!=-1&&(M=this.match_main(m,T.substring(T.length-this.Match_MaxBits),C+T.length-this.Match_MaxBits),(M==-1||A>=M)&&(A=-1))):A=this.match_main(m,T,C),A==-1)S[k]=!1,w-=g[k].length2-g[k].length1;else{S[k]=!0,w=A-C;var y;if(M==-1?y=m.substring(A,A+T.length):y=m.substring(A,M+this.Match_MaxBits),T==y)m=m.substring(0,A)+this.diff_text2(g[k].diffs)+m.substring(A+T.length);else{var N=this.diff_main(T,y,!1);if(T.length>this.Match_MaxBits&&this.diff_levenshtein(N)/T.length>this.Patch_DeleteThreshold)S[k]=!1;else{this.diff_cleanupSemanticLossless(N);for(var z=0,F,P=0;P<g[k].diffs.length;P++){var Y=g[k].diffs[P];Y[0]!==b&&(F=this.diff_xIndex(N,z)),Y[0]===v?m=m.substring(0,A+F)+Y[1]+m.substring(A+F):Y[0]===p&&(m=m.substring(0,A+F)+m.substring(A+this.diff_xIndex(N,z+Y[1].length))),Y[0]!==p&&(z+=Y[1].length)}}}}}return m=m.substring(x.length,m.length-x.length),[m,S]},c.prototype.patch_addPadding=function(g){for(var m=this.Patch_Margin,x="",w=1;w<=m;w++)x+=String.fromCharCode(w);for(var w=0;w<g.length;w++)g[w].start1+=m,g[w].start2+=m;var S=g[0],k=S.diffs;if(k.length==0||k[0][0]!=b)k.unshift(new c.Diff(b,x)),S.start1-=m,S.start2-=m,S.length1+=m,S.length2+=m;else if(m>k[0][1].length){var C=m-k[0][1].length;k[0][1]=x.substring(k[0][1].length)+k[0][1],S.start1-=C,S.start2-=C,S.length1+=C,S.length2+=C}if(S=g[g.length-1],k=S.diffs,k.length==0||k[k.length-1][0]!=b)k.push(new c.Diff(b,x)),S.length1+=m,S.length2+=m;else if(m>k[k.length-1][1].length){var C=m-k[k.length-1][1].length;k[k.length-1][1]+=x.substring(0,C),S.length1+=C,S.length2+=C}return x},c.prototype.patch_splitMax=function(g){for(var m=this.Match_MaxBits,x=0;x<g.length;x++)if(!(g[x].length1<=m)){var w=g[x];g.splice(x--,1);for(var S=w.start1,k=w.start2,C="";w.diffs.length!==0;){var T=new c.patch_obj,A=!0;for(T.start1=S-C.length,T.start2=k-C.length,C!==""&&(T.length1=T.length2=C.length,T.diffs.push(new c.Diff(b,C)));w.diffs.length!==0&&T.length1<m-this.Patch_Margin;){var M=w.diffs[0][0],y=w.diffs[0][1];M===v?(T.length2+=y.length,k+=y.length,T.diffs.push(w.diffs.shift()),A=!1):M===p&&T.diffs.length==1&&T.diffs[0][0]==b&&y.length>2*m?(T.length1+=y.length,S+=y.length,A=!1,T.diffs.push(new c.Diff(M,y)),w.diffs.shift()):(y=y.substring(0,m-T.length1-this.Patch_Margin),T.length1+=y.length,S+=y.length,M===b?(T.length2+=y.length,k+=y.length):A=!1,T.diffs.push(new c.Diff(M,y)),y==w.diffs[0][1]?w.diffs.shift():w.diffs[0][1]=w.diffs[0][1].substring(y.length))}C=this.diff_text2(T.diffs),C=C.substring(C.length-this.Patch_Margin);var N=this.diff_text1(w.diffs).substring(0,this.Patch_Margin);N!==""&&(T.length1+=N.length,T.length2+=N.length,T.diffs.length!==0&&T.diffs[T.diffs.length-1][0]===b?T.diffs[T.diffs.length-1][1]+=N:T.diffs.push(new c.Diff(b,N))),A||g.splice(++x,0,T)}}},c.prototype.patch_toText=function(g){for(var m=[],x=0;x<g.length;x++)m[x]=g[x];return m.join("")},c.prototype.patch_fromText=function(g){var m=[];if(!g)return m;for(var x=g.split(`
|
||
`),w=0,S=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;w<x.length;){var k=x[w].match(S);if(!k)throw new Error("Invalid patch string: "+x[w]);var C=new c.patch_obj;for(m.push(C),C.start1=parseInt(k[1],10),k[2]===""?(C.start1--,C.length1=1):k[2]=="0"?C.length1=0:(C.start1--,C.length1=parseInt(k[2],10)),C.start2=parseInt(k[3],10),k[4]===""?(C.start2--,C.length2=1):k[4]=="0"?C.length2=0:(C.start2--,C.length2=parseInt(k[4],10)),w++;w<x.length;){var T=x[w].charAt(0);try{var A=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+A)}if(T=="-")C.diffs.push(new c.Diff(p,A));else if(T=="+")C.diffs.push(new c.Diff(v,A));else if(T==" ")C.diffs.push(new c.Diff(b,A));else{if(T=="@")break;if(T!=="")throw new Error('Invalid patch mode "'+T+'" in: '+A)}w++}}return m},c.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},c.patch_obj.prototype.toString=function(){var g,m;this.length1===0?g=this.start1+",0":this.length1==1?g=this.start1+1:g=this.start1+1+","+this.length1,this.length2===0?m=this.start2+",0":this.length2==1?m=this.start2+1:m=this.start2+1+","+this.length2;for(var x=["@@ -"+g+" +"+m+` @@
|
||
`],w,S=0;S<this.diffs.length;S++){switch(this.diffs[S][0]){case v:w="+";break;case p:w="-";break;case b:w=" ";break}x[S+1]=w+encodeURI(this.diffs[S][1])+`
|
||
`}return x.join("").replace(/%20/g," ")},h.exports=c,h.exports.diff_match_patch=c,h.exports.DIFF_DELETE=p,h.exports.DIFF_INSERT=v,h.exports.DIFF_EQUAL=b},408:(h,c,p)=>{p.d(c,{default:()=>Nt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(oe){oe===void 0&&(oe=document);var he=function(J){var ee=document.createElement("img");ee.src=J.getAttribute("data-src"),ee.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&ee.naturalHeight>ee.naturalWidth&&ee.naturalWidth/ee.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&ee.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=ee.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return oe.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&he(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(ee){(typeof ee.isIntersecting>"u"?ee.intersectionRatio!==0:ee.isIntersecting)&&ee.target.getAttribute("data-src")&&he(ee.target)})}),oe.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),T=p(280),A=p(637),M=p(825),y=p(11),N=p(194),z=p(436),F=p(229),P=p(145),Y=p(538),te=p(413),de=p(106),Ce=p(673),qe=function(oe){document.querySelectorAll(".vditor-anchor").forEach(function(he){oe===1&&he.classList.add("vditor-anchor--left"),he.onclick=function(){var J=he.getAttribute("href").substr(1),ee=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=ee}}),window.onhashchange=function(){var he=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));he&&(document.querySelector("html").scrollTop=he.offsetTop)}},Ge=p(214),nt=p(810),je=function(oe,he){if(he===void 0&&(he="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var ve=speechSynthesis.getVoices(),le,we;return ve.forEach(function(Ae){Ae.lang===he.replace("_","-")&&(le=Ae),Ae.default&&(we=Ae)}),le||(le=we),le},ee='<svg><use xlink:href="#vditor-icon-play"></use></svg>',De='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(ee='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',De='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var se=document.querySelector(".vditor-speech");se||(se=document.createElement("button"),se.className="vditor-speech",oe.insertAdjacentElement("beforeend",se),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var V=J(),Z=new SpeechSynthesisUtterance;Z.voice=V,Z.onend=Z.onerror=function(){se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee},oe.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(ve){var le=ve.target;if(le.classList.contains("vditor-speech")||le.parentElement.classList.contains("vditor-speech")){se.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),se.innerHTML=De):(speechSynthesis.pause(),se.innerHTML=ee)):(Z.text=se.getAttribute("data-text"),speechSynthesis.speak(Z),se.classList.add("vditor-speech--current"),se.innerHTML=De),(0,nt.Hc)(window.vditorSpeechRange),oe.focus();return}if(se.style.display="none",speechSynthesis.cancel(),se.classList.remove("vditor-speech--current"),se.innerHTML=ee,getSelection().rangeCount!==0){var we=getSelection().getRangeAt(0),Ae=we.toString().trim();if(Ae){window.vditorSpeechRange=we.cloneRange();var Fe=we.getBoundingClientRect();se.innerHTML=ee,se.style.display="block",se.style.top=Fe.top+Fe.height+document.querySelector("html").scrollTop-20+"px",window.ontouchstart!==void 0?se.style.left=ve.changedTouches[ve.changedTouches.length-1].pageX+2+"px":se.style.left=ve.clientX+2+"px",se.setAttribute("data-text",Ae)}}})}},Ne=function(oe,he,J,ee){function De(se){return se instanceof J?se:new J(function(V){V(se)})}return new(J||(J=Promise))(function(se,V){function Z(we){try{le(ee.next(we))}catch(Ae){V(Ae)}}function ve(we){try{le(ee.throw(we))}catch(Ae){V(Ae)}}function le(we){we.done?se(we.value):De(we.value).then(Z,ve)}le((ee=ee.apply(oe,he||[])).next())})},tt=function(oe,he){var J={label:0,sent:function(){if(se[0]&1)throw se[1];return se[1]},trys:[],ops:[]},ee,De,se,V;return V={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(V[Symbol.iterator]=function(){return this}),V;function Z(le){return function(we){return ve([le,we])}}function ve(le){if(ee)throw new TypeError("Generator is already executing.");for(;V&&(V=0,le[0]&&(J=0)),J;)try{if(ee=1,De&&(se=le[0]&2?De.return:le[0]?De.throw||((se=De.return)&&se.call(De),0):De.next)&&!(se=se.call(De,le[1])).done)return se;switch(De=0,se&&(le=[le[0]&2,se.value]),le[0]){case 0:case 1:se=le;break;case 4:return J.label++,{value:le[1],done:!1};case 5:J.label++,De=le[1],le=[0];continue;case 7:le=J.ops.pop(),J.trys.pop();continue;default:if(se=J.trys,!(se=se.length>0&&se[se.length-1])&&(le[0]===6||le[0]===2)){J=0;continue}if(le[0]===3&&(!se||le[1]>se[0]&&le[1]<se[3])){J.label=le[1];break}if(le[0]===6&&J.label<se[1]){J.label=se[1],se=le;break}if(se&&J.label<se[2]){J.label=se[2],J.ops.push(le);break}se[2]&&J.ops.pop(),J.trys.pop();continue}le=he.call(oe,J)}catch(we){le=[6,we],De=0}finally{ee=se=0}if(le[0]&5)throw le[1];return{value:le[0]?le[1]:void 0,done:!0}}},lt=function(oe){var he,J={anchor:0,cdn:P.g.CDN,customEmoji:{},emojiPath:"".concat(P.g.CDN,"/dist/images/emoji"),hljs:P.g.HLJS_OPTIONS,icon:"ant",lang:"zh_CN",markdown:P.g.MARKDOWN_OPTIONS,math:P.g.MATH_OPTIONS,mode:"light",speech:{enable:!1},render:{media:{enable:!0}},theme:P.g.THEME_OPTIONS};return oe.cdn&&(!((he=oe.theme)===null||he===void 0)&&he.path||(J.theme.path="".concat(oe.cdn,"/dist/css/content-theme")),oe.emojiPath||(J.emojiPath="".concat(oe.cdn,"/dist/images/emoji"))),(0,Ce.T)(J,oe)},Qe=function(oe,he){var J=lt(he);return(0,te.G)("".concat(J.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){var ee=(0,Ge.X)({autoSpace:J.markdown.autoSpace,gfmAutoLink:J.markdown.gfmAutoLink,codeBlockPreview:J.markdown.codeBlockPreview,emojiSite:J.emojiPath,emojis:J.customEmoji,fixTermTypo:J.markdown.fixTermTypo,footnotes:J.markdown.footnotes,headingAnchor:J.anchor!==0,inlineMathDigit:J.math.inlineDigit,lazyLoadImage:J.lazyLoadImage,linkBase:J.markdown.linkBase,linkPrefix:J.markdown.linkPrefix,listStyle:J.markdown.listStyle,mark:J.markdown.mark,mathBlockPreview:J.markdown.mathBlockPreview,paragraphBeginningSpace:J.markdown.paragraphBeginningSpace,sanitize:J.markdown.sanitize,toc:J.markdown.toc});return he!=null&&he.renderers&&ee.SetJSRenderers({renderers:{Md2HTML:he.renderers}}),ee.SetHeadingID(!0),ee.Md2HTML(oe)})},j=function(oe,he,J){return Ne(void 0,void 0,void 0,function(){var ee,De,se,V;return tt(this,function(Z){switch(Z.label){case 0:return ee=lt(J),[4,Qe(he,ee)];case 1:if(De=Z.sent(),ee.transform&&(De=ee.transform(De)),oe.innerHTML=De,oe.classList.add("vditor-reset"),ee.i18n)return[3,5];if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(ee.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return se="vditorI18nScript",V=se+ee.lang,document.querySelectorAll('head script[id^="'.concat(se,'"]')).forEach(function(ve){ve.id!==V&&document.head.removeChild(ve)}),[4,(0,te.G)("".concat(ee.cdn,"/dist/js/i18n/").concat(ee.lang,".js"),V)];case 3:Z.sent(),Z.label=4;case 4:return[3,6];case 5:window.VditorI18n=ee.i18n,Z.label=6;case 6:return ee.icon?[4,(0,te.G)("".concat(ee.cdn,"/dist/js/icons/").concat(ee.icon,".js"),"vditorIconScript")]:[3,8];case 7:Z.sent(),Z.label=8;case 8:return(0,Y.Z)(ee.theme.current,ee.theme.path),ee.anchor===1&&oe.classList.add("vditor-reset--anchor"),(0,m.O)(oe,ee.hljs),(0,S.s)(ee.hljs,oe,ee.cdn),(0,C.H)(oe,{cdn:ee.cdn,math:ee.math}),(0,A.i)(oe,ee.cdn,ee.mode),(0,M.J)(oe,ee.cdn,ee.mode),(0,y.K)(oe,ee.cdn),(0,x.P)(oe,ee.cdn),(0,w.v)(oe,ee.cdn),(0,g.p)(oe,ee.cdn,ee.mode),(0,N.P)(oe,ee.cdn,ee.mode),(0,F.B)(oe,ee.cdn),(0,v.Q)(oe,ee.cdn),ee.render.media.enable&&(0,T.Y)(oe),ee.speech.enable&&je(oe),ee.anchor!==0&&qe(ee.anchor),ee.after&&ee.after(),ee.lazyLoadImage&&k(oe),oe.addEventListener("click",function(ve){var le=(0,de.lG)(ve.target,"SPAN");if(le&&(0,de.fb)(le,"vditor-toc")){var we=oe.querySelector("#"+le.getAttribute("data-target-id"));we&&window.scrollTo(window.scrollX,we.offsetTop);return}}),[2]}})})},Ht=p(190),Rt=p(580),Ut=function(){function oe(){}return oe.adapterRender=b,oe.previewImage=Ht.E,oe.codeRender=m.O,oe.graphvizRender=w.v,oe.highlightRender=S.s,oe.mathRender=C.H,oe.mermaidRender=A.i,oe.SMILESRender=M.J,oe.markmapRender=y.K,oe.flowchartRender=x.P,oe.chartRender=g.p,oe.abcRender=v.Q,oe.mindmapRender=N.P,oe.plantumlRender=F.B,oe.outlineRender=z.k,oe.mediaRender=T.Y,oe.speechRender=je,oe.lazyLoadImageRender=k,oe.md2html=Qe,oe.preview=j,oe.setCodeTheme=Rt.Y,oe.setContentTheme=Y.Z,oe}();const Nt=Ut},145:(h,c,p)=>{p.d(c,{H:()=>v,g:()=>b});var v="3.11.2",b=function(){function g(){}return g.ZWSP="",g.DROP_EDITOR="application/editor",g.MOBILE_WIDTH=520,g.CLASS_MENU_DISABLED="vditor-menu--disabled",g.EDIT_TOOLBARS=["emoji","headings","bold","italic","strike","link","list","ordered-list","outdent","indent","check","line","quote","code","inline-code","insert-after","insert-before","upload","record","table"],g.CODE_THEME=["a11y-dark","agate","an-old-hope","androidstudio","arta","atom-one-dark","atom-one-dark-reasonable","base16/3024","base16/apathy","base16/apprentice","base16/ashes","base16/atelier-cave","base16/atelier-dune","base16/atelier-estuary","base16/atelier-forest","base16/atelier-heath","base16/atelier-lakeside","base16/atelier-plateau","base16/atelier-savanna","base16/atelier-seaside","base16/atelier-sulphurpool","base16/atlas","base16/bespin","base16/black-metal","base16/black-metal-bathory","base16/black-metal-burzum","base16/black-metal-dark-funeral","base16/black-metal-gorgoroth","base16/black-metal-immortal","base16/black-metal-khold","base16/black-metal-marduk","base16/black-metal-mayhem","base16/black-metal-nile","base16/black-metal-venom","base16/brewer","base16/bright","base16/brogrammer","base16/brush-trees-dark","base16/chalk","base16/circus","base16/classic-dark","base16/codeschool","base16/colors","base16/danqing","base16/darcula","base16/dark-violet","base16/darkmoss","base16/darktooth","base16/decaf","base16/default-dark","base16/dracula","base16/edge-dark","base16/eighties","base16/embers","base16/equilibrium-dark","base16/equilibrium-gray-dark","base16/espresso","base16/eva","base16/eva-dim","base16/flat","base16/framer","base16/gigavolt","base16/google-dark","base16/grayscale-dark","base16/green-screen","base16/gruvbox-dark-hard","base16/gruvbox-dark-medium","base16/gruvbox-dark-pale","base16/gruvbox-dark-soft","base16/hardcore","base16/harmonic16-dark","base16/heetch-dark","base16/helios","base16/hopscotch","base16/horizon-dark","base16/humanoid-dark","base16/ia-dark","base16/icy-dark","base16/ir-black","base16/isotope","base16/kimber","base16/london-tube","base16/macintosh","base16/marrakesh","base16/materia","base16/material","base16/material-darker","base16/material-palenight","base16/material-vivid","base16/mellow-purple","base16/mocha","base16/monokai","base16/nebula","base16/nord","base16/nova","base16/ocean","base16/oceanicnext","base16/onedark","base16/outrun-dark","base16/papercolor-dark","base16/paraiso","base16/pasque","base16/phd","base16/pico","base16/pop","base16/porple","base16/qualia","base16/railscasts","base16/rebecca","base16/ros-pine","base16/ros-pine-moon","base16/sandcastle","base16/seti-ui","base16/silk-dark","base16/snazzy","base16/solar-flare","base16/solarized-dark","base16/spacemacs","base16/summercamp","base16/summerfruit-dark","base16/synth-midnight-terminal-dark","base16/tango","base16/tender","base16/tomorrow-night","base16/twilight","base16/unikitty-dark","base16/vulcan","base16/windows-10","base16/windows-95","base16/windows-high-contrast","base16/windows-nt","base16/woodland","base16/xcode-dusk","base16/zenburn","codepen-embed","dark","devibeans","far","felipec","github-dark","github-dark-dimmed","gml","gradient-dark","hybrid","ir-black","isbl-editor-dark","kimbie-dark","lioshi","monokai","monokai-sublime","night-owl","nnfx-dark","nord","obsidian","panda-syntax-dark","paraiso-dark","pojoaque","qtcreator-dark","rainbow","shades-of-purple","srcery","stackoverflow-dark","sunburst","tomorrow-night-blue","tomorrow-night-bright","tokyo-night-dark","vs2015","xt256","ant-design","a11y-light","arduino-light","ascetic","atom-one-light","base16/atelier-cave-light","base16/atelier-dune-light","base16/atelier-estuary-light","base16/atelier-forest-light","base16/atelier-heath-light","base16/atelier-lakeside-light","base16/atelier-plateau-light","base16/atelier-savanna-light","base16/atelier-seaside-light","base16/atelier-sulphurpool-light","base16/brush-trees","base16/classic-light","base16/cupcake","base16/cupertino","base16/default-light","base16/dirtysea","base16/edge-light","base16/equilibrium-gray-light","base16/equilibrium-light","base16/fruit-soda","base16/github","base16/google-light","base16/grayscale-light","base16/gruvbox-light-hard","base16/gruvbox-light-medium","base16/gruvbox-light-soft","base16/harmonic16-light","base16/heetch-light","base16/humanoid-light","base16/horizon-light","base16/ia-light","base16/material-lighter","base16/mexico-light","base16/one-light","base16/papercolor-light","base16/ros-pine-dawn","base16/sagelight","base16/shapeshifter","base16/silk-light","base16/solar-flare-light","base16/solarized-light","base16/summerfruit-light","base16/synth-midnight-terminal-light","base16/tomorrow","base16/unikitty-light","base16/windows-10-light","base16/windows-95-light","base16/windows-high-contrast-light","brown-paper","base16/windows-nt-light","color-brewer","docco","foundation","github","googlecode","gradient-light","grayscale","idea","intellij-light","isbl-editor-light","kimbie-light","lightfair","magula","mono-blue","nnfx-light","panda-syntax-light","paraiso-light","purebasic","qtcreator-light","routeros","school-book","stackoverflow-light","tokyo-night-light","vs","xcode","default"],g.ALIAS_CODE_LANGUAGES=["abc","plantuml","mermaid","flowchart","echarts","mindmap","graphviz","math","markmap","smiles","js","ts","html","toml","c#","bat"],g.CDN="https://unpkg.com/vditor@".concat("3.11.2"),g.MARKDOWN_OPTIONS={autoSpace:!1,gfmAutoLink:!0,codeBlockPreview:!0,fixTermTypo:!1,footnotes:!0,linkBase:"",linkPrefix:"",listStyle:!1,mark:!1,mathBlockPreview:!0,paragraphBeginningSpace:!1,sanitize:!0,toc:!1},g.HLJS_OPTIONS={enable:!0,lineNumber:!1,defaultLang:"",style:"github"},g.MATH_OPTIONS={engine:"KaTeX",inlineDigit:!1,macros:{}},g.THEME_OPTIONS={current:"light",list:{"ant-design":"Ant Design",dark:"Dark",light:"Light",wechat:"WeChat"},path:"".concat(g.CDN,"/dist/css/content-theme")},g}()},825:(h,c,p)=>{p.d(c,{J:()=>x});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(w,S,k){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var C=g.SMILESRenderAdapter.getElements(w);C.length>0&&(0,b.G)("".concat(S,"/dist/js/smiles-drawer/smiles-drawer.min.js?v=2.1.7"),"vditorAbcjsScript").then(function(){var T=new SmiDrawer({},{});C.forEach(function(A){var M=g.SMILESRenderAdapter.getCode(A).trim();if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y="smiles"+(0,m.Wb)();A.innerHTML='<svg id="'.concat(y,'"></svg>'),T.draw(M,"#"+y,k==="dark"?"dark":void 0),A.setAttribute("data-processed","true")}})})}},135:(h,c,p)=>{p.d(c,{Q:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.abcRenderAdapter.getElements(x);S.length>0&&(0,b.G)("".concat(w,"/dist/js/abcjs/abcjs_basic.min.js"),"vditorAbcjsScript").then(function(){S.forEach(function(k){k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre")||k.getAttribute("data-processed")!=="true"&&(ABCJS.renderAbc(k,g.abcRenderAdapter.getCode(k).trim()),k.style.overflowX="auto",k.setAttribute("data-processed","true"))})})}},840:(h,c,p)=>{p.r(c),p.d(c,{mathRenderAdapter:()=>v,SMILESRenderAdapter:()=>b,mermaidRenderAdapter:()=>g,markmapRenderAdapter:()=>m,mindmapRenderAdapter:()=>x,chartRenderAdapter:()=>w,abcRenderAdapter:()=>S,graphvizRenderAdapter:()=>k,flowchartRenderAdapter:()=>C,plantumlRenderAdapter:()=>T});var v={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-math")}},b={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-smiles")}},g={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-mermaid")}},m={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-markmap")}},x={getCode:function(A){return A.getAttribute("data-code")},getElements:function(A){return A.querySelectorAll(".language-mindmap")}},w={getCode:function(A){return A.innerText},getElements:function(A){return A.querySelectorAll(".language-echarts")}},S={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-abc")}},k={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-graphviz")}},C={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-flowchart")}},T={getCode:function(A){return A.textContent},getElements:function(A){return A.querySelectorAll(".language-plantuml")}}},775:(h,c,p)=>{p.d(c,{p:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.chartRenderAdapter.getElements(k);A.length>0&&(0,b.G)("".concat(C,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){A.forEach(function(M){return x(void 0,void 0,void 0,function(){var y,N,z;return w(this,function(F){switch(F.label){case 0:if(M.parentElement.classList.contains("vditor-wysiwyg__pre")||M.parentElement.classList.contains("vditor-ir__marker--pre"))return[2];if(y=g.chartRenderAdapter.getCode(M).trim(),!y)return[2];F.label=1;case 1:return F.trys.push([1,3,,4]),M.getAttribute("data-processed")==="true"?[2]:[4,(0,m.Qf)(y)];case 2:return N=F.sent(),echarts.init(M,T==="dark"?"dark":void 0).setOption(N),M.setAttribute("data-processed","true"),[3,4];case 3:return z=F.sent(),M.className="vditor-reset--error",M.innerHTML="echarts render error: <br>".concat(z),[3,4];case 4:return[2]}})})})})}},428:(h,c,p)=>{p.d(c,{O:()=>g});var v=p(105),b=p(145),g=function(m,x){Array.from(m.querySelectorAll("pre > code")).filter(function(w,S){return!(w.parentElement.classList.contains("vditor-wysiwyg__pre")||w.parentElement.classList.contains("vditor-ir__marker--pre")||w.classList.contains("language-mermaid")||w.classList.contains("language-flowchart")||w.classList.contains("language-echarts")||w.classList.contains("language-mindmap")||w.classList.contains("language-plantuml")||w.classList.contains("language-markmap")||w.classList.contains("language-abc")||w.classList.contains("language-graphviz")||w.classList.contains("language-math")||w.classList.contains("language-smiles")||w.style.maxHeight.indexOf("px")>-1||m.classList.contains("vditor-preview")&&S>5)}).forEach(function(w){var S,k,C,T=w.innerText;if(w.classList.contains("highlight-chroma")){var A=w.cloneNode(!0);A.querySelectorAll(".highlight-ln").forEach(function(z){z.remove()}),T=A.innerText}else T.endsWith(`
|
||
`)&&(T=T.substr(0,T.length-1));var M='<svg><use xlink:href="#vditor-icon-copy"></use></svg>';document.getElementById("vditorIconScript")||(M='<svg viewBox="0 0 32 32"><path d="M22.545-0h-17.455c-1.6 0-2.909 1.309-2.909 2.909v20.364h2.909v-20.364h17.455v-2.909zM26.909 5.818h-16c-1.6 0-2.909 1.309-2.909 2.909v20.364c0 1.6 1.309 2.909 2.909 2.909h16c1.6 0 2.909-1.309 2.909-2.909v-20.364c0-1.6-1.309-2.909-2.909-2.909zM26.909 29.091h-16v-20.364h16v20.364z"></path></svg>');var y=document.createElement("div");y.className="vditor-copy",y.innerHTML='<span aria-label="'.concat(((S=window.VditorI18n)===null||S===void 0?void 0:S.copy)||"复制",`"
|
||
onmouseover="this.setAttribute('aria-label', '`).concat(((k=window.VditorI18n)===null||k===void 0?void 0:k.copy)||"复制",`')"
|
||
class="vditor-tooltipped vditor-tooltipped__w"
|
||
onclick="event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '`).concat(((C=window.VditorI18n)===null||C===void 0?void 0:C.copied)||"已复制",`');this.previousElementSibling.blur()">`).concat(M,"</span>");var N=document.createElement("textarea");N.value=(0,v.X)(T),y.insertAdjacentElement("afterbegin",N),x&&x.renderMenu&&x.renderMenu(w,y),w.before(y),w.style.maxHeight=window.outerHeight-40+"px",w.insertAdjacentHTML("afterend",'<span style="position: absolute">'.concat(b.g.ZWSP,"</span>"))})}},325:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.flowchartRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then(function(){S.forEach(function(k){if(k.getAttribute("data-processed")!=="true"){var C=flowchart.parse(g.flowchartRenderAdapter.getCode(k));k.innerHTML="",C.drawSVG(k),k.setAttribute("data-processed","true")}})})}},483:(h,c,p)=>{p.d(c,{v:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){w===void 0&&(w=v.g.CDN);var S=g.graphvizRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then(function(){S.forEach(function(k){var C=g.graphvizRenderAdapter.getCode(k);if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))&&!(k.getAttribute("data-processed")==="true"||C.trim()==="")){try{var T=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),A=window.URL||window.webkitURL,M=A.createObjectURL(T),y=new Worker(M);new Viz({worker:y}).renderSVGElement(C).then(function(N){k.innerHTML=N.outerHTML}).catch(function(N){k.innerHTML="graphviz render error: <br>".concat(N),k.className="vditor-reset--error"})}catch{}k.setAttribute("data-processed","true")}})})}},999:(h,c,p)=>{p.d(c,{s:()=>m});var v=p(145),b=p(413),g=p(290),m=function(x,w,S){w===void 0&&(w=document),S===void 0&&(S=v.g.CDN);var k=x.style;v.g.CODE_THEME.includes(k)||(k="github");var C=document.getElementById("vditorHljsStyle"),T="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==T&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var A=w.querySelectorAll("pre > code");A.length!==0&&(0,b.G)("".concat(S,"/dist/js/highlight.js/highlight.min.js?v=11.7.0"),"vditorHljsScript").then(function(){(0,b.G)("".concat(S,"/dist/js/highlight.js/third-languages.js?v=1.0.1"),"vditorHljsThirdScript").then(function(){w.querySelectorAll("pre > code").forEach(function(M){if(!(M.parentElement.classList.contains("vditor-ir__marker--pre")||M.parentElement.classList.contains("vditor-wysiwyg__pre"))&&!(M.classList.contains("language-mermaid")||M.classList.contains("language-flowchart")||M.classList.contains("language-echarts")||M.classList.contains("language-mindmap")||M.classList.contains("language-plantuml")||M.classList.contains("language-smiles")||M.classList.contains("language-abc")||M.classList.contains("language-graphviz")||M.classList.contains("language-math"))){x.defaultLang!==""&&M.className.indexOf("language-")===-1&&M.classList.add("language-"+x.defaultLang);var y=M.className.replace("language-","");if(window.hljs.getLanguage(y)||(y="plaintext"),M.innerHTML=window.hljs.highlight(M.textContent,{language:y,ignoreIllegals:!0}).value,M.classList.add("hljs"),!!x.lineNumber){M.classList.add("vditor-linenumber");var N=M.querySelector(".vditor-linenumber__temp");N||(N=document.createElement("div"),N.className="vditor-linenumber__temp",M.insertAdjacentElement("beforeend",N));var z=getComputedStyle(M).whiteSpace,F=!1;(z==="pre-wrap"||z==="pre-line")&&(F=!0);var P="",Y=M.textContent.split(/\r\n|\r|\n/g);Y.pop(),Y.map(function(te){var de="";F&&(N.textContent=te||`
|
||
`,de=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(de,"></span>")}),N.style.display="none",P='<span class="vditor-linenumber__rows">'.concat(P,"</span>"),M.insertAdjacentHTML("beforeend",P)}}})})})}}},11:(h,c,p)=>{p.d(c,{K:()=>S});var v=p(145),b=p(413),g=p(840),m={},x=function(k,C){var T=k.transform(C),A=Object.keys(T.features).filter(function(F){return!m[F]});A.forEach(function(F){m[F]=!0});var M=k.getAssets(A),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),T},w=function(k,C){var T=window.markmap,A=T.Transformer,M=T.Markmap,y=T.deriveOptions;T.globalCSS;var N=new A;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,F=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,de=te==null?void 0:te.markmap,Ce=y(de);F.setData(Y,Ce),F.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.markmapRenderAdapter.getElements(k);T.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){T.forEach(function(A){var M=g.markmapRenderAdapter.getCode(A);if(!(A.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",A.parentNode.appendChild(y),w(y,M),A.parentNode.childNodes[0].nodeName=="CODE"&&A.parentNode.removeChild(A.parentNode.childNodes[0])}})})}},472:(h,c,p)=>{p.d(c,{H:()=>w});var v=p(145),b=p(413),g=p(290),m=p(105),x=p(840),w=function(S,k){S===void 0&&(S=document);var C=x.mathRenderAdapter.getElements(S);if(C.length!==0){var T={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},T.math,k.math)),k=Object.assign({},T,k),k.math.engine==="KaTeX")(0,g.c)("".concat(k.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,b.G)("".concat(k.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then(function(){(0,b.G)("".concat(k.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then(function(){C.forEach(function(y){if(!(y.parentElement.classList.contains("vditor-wysiwyg__pre")||y.parentElement.classList.contains("vditor-ir__marker--pre"))&&!y.getAttribute("data-math")){var N=(0,m.X)(x.mathRenderAdapter.getCode(y));y.setAttribute("data-math",N);try{y.innerHTML=katex.renderToString(N,{displayMode:y.tagName==="DIV",output:"html",macros:k.math.macros})}catch(z){y.innerHTML=z.message,y.className="language-math vditor-reset--error"}y.addEventListener("copy",function(z){z.stopPropagation(),z.preventDefault();var F=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",F.innerHTML),z.clipboardData.setData("text/plain",F.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var A=function(y){if(y.length!==0){var N=0,z=y[y.length-1],F=function(){var P=y[N++];P===z?P():P(F)};F()}};window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(k.cdn,"/dist/js/mathjax")}},startup:{typeset:!1},tex:{macros:k.math.macros}},Object.assign(window.MathJax,k.math.mathJaxOptions)),(0,b.J)("".concat(k.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var M=function(y,N){var z=(0,m.X)(y.textContent).trim(),F=window.MathJax.getMetricsFor(y);F.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,F).then(function(P){y.innerHTML="",y.setAttribute("data-math",z),y.append(P),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var Y=P.querySelector('[data-mml-node="merror"]');Y&&Y.textContent.trim()!==""&&(y.innerHTML=Y.textContent.trim(),y.className="vditor-reset--error"),N&&N()})};window.MathJax.startup.promise.then(function(){for(var y=[],N=function(F){var P=C[F];!P.parentElement.classList.contains("vditor-wysiwyg__pre")&&!P.parentElement.classList.contains("vditor-ir__marker--pre")&&!P.getAttribute("data-math")&&(0,m.X)(P.textContent).trim()&&y.push(function(Y){F===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);A(y)})}}}},280:(h,c,p)=>{p.d(c,{Y:()=>x});var v=p(494),b=function(w,S){w.insertAdjacentHTML("afterend",'<video controls="controls" src="'.concat(S,'"></video>')),w.remove()},g=function(w,S){w.insertAdjacentHTML("afterend",'<audio controls="controls" src="'.concat(S,'"></audio>')),w.remove()},m=function(w,S){var k=S.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?/),C=S.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),T=S.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),A=S.match(/(?:www\.|\/\/)coub\.com\/view\/(\w+)/),M=S.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/),y=S.match(/.+dailymotion.com\/(video|hub)\/(\w+)\?/),N=S.match(/(?:www\.|\/\/)bilibili\.com\/video\/(\w+)/),z=S.match(/(?:www\.|\/\/)ted\.com\/talks\/(\w+)/);if(k&&k[1].length===11)w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//www.youtube.com/embed/'.concat(k[1]+(k[2]?"?start="+k[2]:""),'"></iframe>')),w.remove();else if(C&&C[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//player.youku.com/embed/'.concat(C[1],'"></iframe>')),w.remove();else if(T&&T[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='.concat(T[1],'"></iframe>')),w.remove();else if(A&&A[1])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
|
||
src="//coub.com/embed/`.concat(A[1],'?muted=false&autostart=false&originalSize=true&startWithHD=true"></iframe>')),w.remove();else if(M&&M[0])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
|
||
src="https://www.facebook.com/plugins/video.php?href=`.concat(encodeURIComponent(M[0]),'"></iframe>')),w.remove();else if(y&&y[2])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
|
||
src="https://www.dailymotion.com/embed/video/`.concat(y[2],'"></iframe>')),w.remove();else if(S.indexOf("bilibili.com")>-1&&(S.indexOf("bvid=")>-1||N&&N[1])){var F={bvid:(0,v.on)("bvid",S)||N&&N[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(S.startsWith("http")?S:"https:"+S).search.split("&").forEach(function(te,de){if(te){de===0&&(te=te.substr(1));var Ce=te.split("=");F[Ce[0]]=Ce[1]}});var P="https://player.bilibili.com/player.html?",Y=Object.keys(F);Y.forEach(function(te,de){P+="".concat(te,"=").concat(F[te]),de<Y.length-1&&(P+="&")}),w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="'.concat(P,'"></iframe>')),w.remove()}else z&&z[1]&&(w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//embed.ted.com/talks/'.concat(z[1],'"></iframe>')),w.remove())},x=function(w){w&&w.querySelectorAll("a").forEach(function(S){var k=S.getAttribute("href");k&&(k.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?b(S,k):k.match(/^.+.(mp3|wav|flac)$/)?g(S,k):m(S,k))})}},637:(h,c,p)=>{p.d(c,{i:()=>S});var v=p(145),b=p(413),g=p(840),m=p(494),x=function(k,C,T,A){function M(y){return y instanceof T?y:new T(function(N){N(y)})}return new(T||(T=Promise))(function(y,N){function z(Y){try{P(A.next(Y))}catch(te){N(te)}}function F(Y){try{P(A.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,F)}P((A=A.apply(k,C||[])).next())})},w=function(k,C){var T={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},A,M,y,N;return N={next:z(0),throw:z(1),return:z(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function z(P){return function(Y){return F([P,Y])}}function F(P){if(A)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(T=0)),T;)try{if(A=1,M&&(y=P[0]&2?M.return:P[0]?M.throw||((y=M.return)&&y.call(M),0):M.next)&&!(y=y.call(M,P[1])).done)return y;switch(M=0,y&&(P=[P[0]&2,y.value]),P[0]){case 0:case 1:y=P;break;case 4:return T.label++,{value:P[1],done:!1};case 5:T.label++,M=P[1],P=[0];continue;case 7:P=T.ops.pop(),T.trys.pop();continue;default:if(y=T.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){T=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){T.label=P[1];break}if(P[0]===6&&T.label<y[1]){T.label=y[1],y=P;break}if(y&&T.label<y[2]){T.label=y[2],T.ops.push(P);break}y[2]&&T.ops.pop(),T.trys.pop();continue}P=C.call(k,T)}catch(Y){P=[6,Y],M=0}finally{A=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,T){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.mermaidRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/mermaid/mermaid.min.js?v=11.6.0"),"vditorMermaidScript").then(function(){var M={securityLevel:"loose",altFontFamily:"sans-serif",fontFamily:"sans-serif",startOnLoad:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequence:{useMaxWidth:!0,diagramMarginX:8,diagramMarginY:8,boxMargin:8,showSequenceNumbers:!0},gantt:{leftPadding:75,rightPadding:20}};T==="dark"&&(M.theme="dark"),mermaid.initialize(M),A.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,F,P,Y;return w(this,function(te){switch(te.label){case 0:if(N=g.mermaidRenderAdapter.getCode(y),y.getAttribute("data-processed")==="true"||N.trim()==="")return[2];z="mermaid"+(0,m.Wb)(),te.label=1;case 1:return te.trys.push([1,3,,4]),[4,mermaid.render(z,y.textContent)];case 2:return F=te.sent(),y.innerHTML=F.svg,[3,4];case 3:return P=te.sent(),Y=document.querySelector("#"+z),y.innerHTML="".concat(Y.outerHTML,`<br>
|
||
<div style="text-align: left"><small>`).concat(P.message.replace(/\n/,"<br>"),"</small></div>"),Y.parentElement.remove(),[3,4];case 4:return y.setAttribute("data-processed","true"),[2]}})})})})}},194:(h,c,p)=>{p.d(c,{P:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w,S){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var k=g.mindmapRenderAdapter.getElements(x);k.length>0&&(0,b.G)("".concat(w,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){k.forEach(function(C){if(!(C.parentElement.classList.contains("vditor-wysiwyg__pre")||C.parentElement.classList.contains("vditor-ir__marker--pre"))){var T=g.mindmapRenderAdapter.getCode(C);if(T)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(T))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(A,M){var y;return!((y=M==null?void 0:M.data)===null||y===void 0)&&y.children?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),C.setAttribute("data-processed","true")}catch(A){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(A)}}})})}},436:(h,c,p)=>{p.d(c,{k:()=>g});var v=p(771),b=p(472),g=function(m,x,w){var S="",k=[];if(Array.from(m.children).forEach(function(M,y){if((0,v.W)(M)){if(w){var N=M.id.lastIndexOf("_");M.id=M.id.substring(0,N===-1?void 0:N)+"_"+y}k.push(M.id),S+=M.outerHTML.replace("<wbr>","")}}),S==="")return x.innerHTML="","";var C=document.createElement("div");if(w)w.lute.SetToC(!0),w.currentMode==="wysiwyg"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorDOM("<p>[ToC]</p>"+S):w.currentMode==="ir"&&!w.preview.element.contains(m)?C.innerHTML=w.lute.SpinVditorIRDOM("<p>[ToC]</p>"+S):C.innerHTML=w.lute.HTML2VditorDOM("<p>[ToC]</p>"+S),w.lute.SetToC(w.options.preview.markdown.toc);else{x.classList.add("vditor-outline");var T=Lute.New();T.SetToC(!0),C.innerHTML=T.HTML2VditorDOM("<p>[ToC]</p>"+S)}var A=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return A.forEach(function(M,y){if(M.nextElementSibling&&M.nextElementSibling.tagName==="UL"){var N="<svg class='vditor-outline__action'><use xlink:href='#vditor-icon-down'></use></svg>";document.getElementById("vditorIconScript")||(N='<svg class="vditor-outline__action" viewBox="0 0 32 32"><path d="M3.76 6.12l12.24 12.213 12.24-12.213 3.76 3.76-16 16-16-16 3.76-3.76z"></path></svg>'),M.innerHTML="".concat(N,"<span>").concat(M.innerHTML,"</span>")}else M.innerHTML="<svg></svg><span>".concat(M.innerHTML,"</span>");M.setAttribute("data-target-id",k[y])}),S=C.firstElementChild.innerHTML,A.length===0?(x.innerHTML="",S):(x.innerHTML=S,w&&(0,b.H)(x,{cdn:w.options.cdn,math:w.options.preview.math}),x.firstElementChild.addEventListener("click",function(M){for(var y=M.target;y&&!y.isEqualNode(x);){if(y.classList.contains("vditor-outline__action")){y.classList.contains("vditor-outline__action--close")?(y.classList.remove("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:block")):(y.classList.add("vditor-outline__action--close"),y.parentElement.nextElementSibling.setAttribute("style","display:none")),M.preventDefault(),M.stopPropagation();break}else if(y.getAttribute("data-target-id")){M.preventDefault(),M.stopPropagation();var N=document.getElementById(y.getAttribute("data-target-id"));if(!N)return;if(w)if(w.options.height==="auto"){var z=N.offsetTop+w.element.offsetTop;w.options.toolbarConfig.pin||(z+=w.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,z)}else w.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,w.element.offsetTop),w.preview.element.contains(m)?m.parentElement.scrollTop=N.offsetTop:m.scrollTop=N.offsetTop;else window.scrollTo(window.scrollX,N.offsetTop);break}y=y.parentElement}}),S)}},229:(h,c,p)=>{p.d(c,{B:()=>m});var v=p(145),b=p(413),g=p(840),m=function(x,w){x===void 0&&(x=document),w===void 0&&(w=v.g.CDN);var S=g.plantumlRenderAdapter.getElements(x);S.length!==0&&(0,b.G)("".concat(w,"/dist/js/plantuml/plantuml-encoder.min.js"),"vditorPlantumlScript").then(function(){S.forEach(function(k){if(!(k.parentElement.classList.contains("vditor-wysiwyg__pre")||k.parentElement.classList.contains("vditor-ir__marker--pre"))){var C=g.plantumlRenderAdapter.getCode(k).trim();if(C)try{k.innerHTML='<object type="image/svg+xml" data="https://www.plantuml.com/plantuml/svg/~1'.concat(plantumlEncoder.encode(C),'"/>')}catch(T){k.className="vditor-reset--error",k.innerHTML="plantuml render error: <br>".concat(T)}}})})}},214:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){var g=Lute.New();return g.PutEmojis(b.emojis),g.SetEmojiSite(b.emojiSite),g.SetHeadingAnchor(b.headingAnchor),g.SetInlineMathAllowDigitAfterOpenMarker(b.inlineMathDigit),g.SetAutoSpace(b.autoSpace),g.SetToC(b.toc),g.SetFootnotes(b.footnotes),g.SetFixTermTypo(b.fixTermTypo),g.SetVditorCodeBlockPreview(b.codeBlockPreview),g.SetVditorMathBlockPreview(b.mathBlockPreview),g.SetSanitize(b.sanitize),g.SetChineseParagraphBeginningSpace(b.paragraphBeginningSpace),g.SetRenderListStyle(b.listStyle),g.SetLinkBase(b.linkBase),g.SetLinkPrefix(b.linkPrefix),g.SetMark(b.mark),g.SetGFMAutoLink(b.gfmAutoLink),b.lazyLoadImage&&g.SetImageLazyLoading(b.lazyLoadImage),g}},190:(h,c,p)=>{p.d(c,{E:()=>v});var v=function(b,g,m){m===void 0&&(m="classic");var x=b.getBoundingClientRect(),w=36;document.body.insertAdjacentHTML("beforeend",'<div class="vditor vditor-img'.concat(m==="dark"?" vditor--dark":"",`">
|
||
<div class="vditor-img__bar">
|
||
<span class="vditor-img__btn" data-deg="0">
|
||
<svg><use xlink:href="#vditor-icon-redo"></use></svg>
|
||
`).concat(window.VditorI18n.spin,`
|
||
</span>
|
||
<span class="vditor-img__btn" onclick="this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''">
|
||
X `).concat(window.VditorI18n.close,`
|
||
</span>
|
||
</div>
|
||
<div class="vditor-img__img" onclick="this.parentElement.outerHTML = '';document.body.style.overflow = ''">
|
||
<img style="width: `).concat(b.width,"px;height:").concat(b.height,"px;transform: translate3d(").concat(x.left,"px, ").concat(x.top-w,'px, 0)" src="').concat(b.getAttribute("src"),`">
|
||
</div>
|
||
</div>`)),document.body.style.overflow="hidden";var S=document.querySelector(".vditor-img img"),k="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(Math.max(0,window.innerHeight-w-b.naturalHeight)/2,"px, 0)");setTimeout(function(){S.setAttribute("style","transition: transform .3s ease-in-out;transform: ".concat(k)),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)});var C=document.querySelector(".vditor-img__btn");C.addEventListener("click",function(){var T=parseInt(C.getAttribute("data-deg"),10)+90;T/90%2===1&&b.naturalWidth>S.parentElement.clientHeight?S.style.transform="translate3d(".concat(Math.max(0,window.innerWidth-b.naturalWidth)/2,"px, ").concat(b.naturalWidth/2-b.naturalHeight/2,"px, 0) rotateZ(").concat(T,"deg)"):S.style.transform="".concat(k," rotateZ(").concat(T,"deg)"),C.setAttribute("data-deg",T.toString()),setTimeout(function(){S.parentElement.scrollTo((S.parentElement.scrollWidth-S.parentElement.clientWidth)/2,(S.parentElement.scrollHeight-S.parentElement.clientHeight)/2)},400)})}},580:(h,c,p)=>{p.d(c,{Y:()=>g});var v=p(145),b=p(290),g=function(m,x){x===void 0&&(x=v.g.CDN),v.g.CODE_THEME.includes(m)||(m="github");var w=document.getElementById("vditorHljsStyle"),S="".concat(x,"/dist/js/highlight.js/styles/").concat(m,".min.css");w?w.getAttribute("href")!==S&&(w.remove(),(0,b.c)(S,"vditorHljsStyle")):(0,b.c)(S,"vditorHljsStyle")}},538:(h,c,p)=>{p.d(c,{Z:()=>b});var v=p(290),b=function(g,m){if(!(!g||!m)){var x=document.getElementById("vditorContentTheme"),w="".concat(m,"/").concat(g,".css");x?x.getAttribute("href")!==w&&(x.remove(),(0,v.c)(w,"vditorContentTheme")):(0,v.c)(w,"vditorContentTheme")}}},413:(h,c,p)=>{p.d(c,{J:()=>v,G:()=>b});var v=function(g,m){if(document.getElementById(m))return!1;var x=new XMLHttpRequest;x.open("GET",g,!1),x.setRequestHeader("Accept","text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01"),x.send("");var w=document.createElement("script");w.type="text/javascript",w.text=x.responseText,w.id=m,document.head.appendChild(w)},b=function(g,m){return new Promise(function(x,w){if(document.getElementById(m))return x(!0),!1;var S=document.createElement("script");S.src=g,S.async=!0,document.head.appendChild(S),S.onerror=function(k){w(k)},S.onload=function(){if(document.getElementById(m))return S.remove(),x(!0),!1;S.id=m,x(!0)}})}},290:(h,c,p)=>{p.d(c,{c:()=>v});var v=function(b,g){if(!document.getElementById(g)){var m=document.createElement("link");m.id=g,m.rel="stylesheet",m.type="text/css",m.href=b,document.getElementsByTagName("head")[0].appendChild(m)}}},105:(h,c,p)=>{p.d(c,{X:()=>v});var v=function(b){return b.replace(/\u00a0/g," ")}},410:(h,c,p)=>{p.d(c,{G6:()=>v,vU:()=>b,pK:()=>g,Le:()=>m,yl:()=>x,ns:()=>w,i7:()=>S});var v=function(){return navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")===-1},b=function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1},g=function(){try{return typeof localStorage<"u"}catch{return!1}},m=function(){return navigator.userAgent.indexOf("iPhone")>-1?"touchstart":"click"},x=function(k){return navigator.platform.toUpperCase().indexOf("MAC")>=0?!!(k.metaKey&&!k.ctrlKey):!!(!k.metaKey&&k.ctrlKey)},w=function(k){return/Mac/.test(navigator.platform)||navigator.platform==="iPhone"?k.indexOf("⇧")>-1&&b()&&(k=k.replace(";",":").replace("=","+").replace("-","_")):(k.startsWith("⌘")?k=k.replace("⌘","⌘+"):k.startsWith("⌥")&&k.substr(1,1)!=="⌘"?k=k.replace("⌥","⌥+"):k=k.replace("⇧⌘","⌘+⇧+").replace("⌥⌘","⌥+⌘+"),k=k.replace("⌘","Ctrl").replace("⇧","Shift").replace("⌥","Alt"),k.indexOf("Shift")>-1&&(k=k.replace(";",":").replace("=","+").replace("-","_"))),k},S=function(){return/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}},494:(h,c,p)=>{p.d(c,{Wb:()=>v,on:()=>b,Qf:()=>g});var v=function(){return([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(m){return(parseInt(m,10)^window.crypto.getRandomValues(new Uint32Array(1))[0]&15>>parseInt(m,10)/4).toString(16)})},b=function(m,x){x===void 0&&(x=window.location.search);var w=x.substring(x.indexOf("?")),S=w.indexOf("#"),k=new URLSearchParams(w.substring(0,S>=0?S:void 0));return k.get(m)},g=function(m){return Function('"use strict";return ('.concat(m,")"))()}},106:(h,c,p)=>{p.d(c,{JQ:()=>b,E2:()=>g,O9:()=>m,a1:()=>x,F9:()=>w,lG:()=>S,fb:()=>k,DX:()=>C});var v=p(771),b=function(T,A){for(var M=k(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=k(M.parentElement,A),y?M=y:N=!0;return M||!1},g=function(T,A){for(var M=(0,v.S)(T,A),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=(0,v.S)(M.parentElement,A),y?M=y:N=!0;return M||!1},m=function(T){var A=g(T,"UL"),M=g(T,"OL"),y=A;return M&&(!A||A&&M.contains(A))&&(y=M),y},x=function(T,A,M){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var y=T,N=!1;y&&!N&&!y.classList.contains("vditor-reset");)y.getAttribute(A)===M?N=!0:y=y.parentElement;return N&&y},w=function(T){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);var A=T,M=!1,y=x(T,"data-block","0");if(y)return y;for(;A&&!M&&!A.classList.contains("vditor-reset");)A.tagName==="H1"||A.tagName==="H2"||A.tagName==="H3"||A.tagName==="H4"||A.tagName==="H5"||A.tagName==="H6"||A.tagName==="P"||A.tagName==="BLOCKQUOTE"||A.tagName==="OL"||A.tagName==="UL"?M=!0:A=A.parentElement;return M&&A},S=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.nodeName===A?y=!0:M=M.parentElement;return y&&M},k=function(T,A){if(!T)return!1;T.nodeType===3&&(T=T.parentElement);for(var M=T,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.classList.contains(A)?y=!0:M=M.parentElement;return y&&M},C=function(T){for(;T&&T.lastChild;)T=T.lastChild;return T}},771:(h,c,p)=>{p.d(c,{S:()=>v,W:()=>b});var v=function(g,m){if(!g)return!1;g.nodeType===3&&(g=g.parentElement);for(var x=g,w=!1;x&&!w&&!x.classList.contains("vditor-reset");)x.nodeName.indexOf(m)===0?w=!0:x=x.parentElement;return w&&x},b=function(g){var m=v(g,"H");return m&&m.tagName.length===2&&m.tagName!=="HR"?m:!1}},673:(h,c,p)=>{p.d(c,{T:()=>v});var v=function(){for(var b=[],g=0;g<arguments.length;g++)b[g]=arguments[g];for(var m={},x=function(S){for(var k in S)S.hasOwnProperty(k)&&(Object.prototype.toString.call(S[k])==="[object Object]"?m[k]=v(m[k],S[k]):m[k]=S[k])},w=0;w<b.length;w++)x(b[w]);return m}},810:(h,c,p)=>{p.d(c,{zh:()=>m,Ny:()=>x,Gb:()=>w,Hc:()=>S,im:()=>k,$j:()=>C,ib:()=>T,oC:()=>A});var v=p(145),b=p(410),g=p(106),m=function(M){var y,N=M[M.currentMode].element;return getSelection().rangeCount>0&&(y=getSelection().getRangeAt(0),N.isEqualNode(y.startContainer)||N.contains(y.startContainer))?y:M[M.currentMode].range?M[M.currentMode].range:(N.focus(),y=N.ownerDocument.createRange(),y.setStart(N,0),y.collapse(!0),y)},x=function(M){var y=window.getSelection().getRangeAt(0);if(!M.contains(y.startContainer)&&!(0,g.fb)(y.startContainer,"vditor-panel--none"))return{left:0,top:0};var N=M.parentElement.getBoundingClientRect(),z;if(y.getClientRects().length===0)if(y.startContainer.nodeType===3){var F=y.startContainer.parentElement;if(F&&F.getClientRects().length>0)z=F.getClientRects()[0];else return{left:0,top:0}}else{var P=y.startContainer.children;if(P[y.startOffset]&&P[y.startOffset].getClientRects().length>0)z=P[y.startOffset].getClientRects()[0];else if(y.startContainer.childNodes.length>0){var Y=y.cloneRange();y.selectNode(y.startContainer.childNodes[Math.max(0,y.startOffset-1)]),z=y.getClientRects()[0],y.setEnd(Y.endContainer,Y.endOffset),y.setStart(Y.startContainer,Y.startOffset)}else z=y.startContainer.getClientRects()[0];if(!z){for(var te=y.startContainer.childNodes[y.startOffset];!te.getClientRects||te.getClientRects&&te.getClientRects().length===0;)te=te.parentElement;z=te.getClientRects()[0]}}else z=y.getClientRects()[0];return{left:z.left-N.left,top:z.top-N.top}},w=function(M,y){if(!y){if(getSelection().rangeCount===0)return!1;y=getSelection().getRangeAt(0)}var N=y.commonAncestorContainer;return M.isEqualNode(N)||M.contains(N)},S=function(M){var y=window.getSelection();y.removeAllRanges(),y.addRange(M)},k=function(M,y,N){var z={end:0,start:0};if(!N){if(getSelection().rangeCount===0)return z;N=window.getSelection().getRangeAt(0)}if(w(y,N)){var F=N.cloneRange();M.childNodes[0]&&M.childNodes[0].childNodes[0]?F.setStart(M.childNodes[0].childNodes[0],0):F.selectNodeContents(M),F.setEnd(N.startContainer,N.startOffset),z.start=F.toString().length,z.end=z.start+N.toString().length}return z},C=function(M,y,N){var z=0,F=0,P=N.childNodes[F],Y=!1,te=!1;M=Math.max(0,M),y=Math.max(0,y);var de=N.ownerDocument.createRange();for(de.setStart(P||N,0),de.collapse(!0);!te&&P;){var Ce=z+P.textContent.length;if(!Y&&M>=z&&M<=Ce&&(M===0?de.setStart(P,0):P.childNodes[0].nodeType===3?de.setStart(P.childNodes[0],M-z):P.nextSibling?de.setStartBefore(P.nextSibling):de.setStartAfter(P),Y=!0,M===y)){te=!0;break}Y&&y>=z&&y<=Ce&&(y===0?de.setEnd(P,0):P.childNodes[0].nodeType===3?de.setEnd(P.childNodes[0],y-z):P.nextSibling?de.setEndBefore(P.nextSibling):de.setEndAfter(P),te=!0),z=Ce,P=N.childNodes[++F]}return!te&&N.childNodes[F-1]&&de.setStartBefore(N.childNodes[F-1]),S(de),de},T=function(M,y){var N=M.querySelector("wbr");if(N){if(!N.previousElementSibling)N.previousSibling?y.setStart(N.previousSibling,N.previousSibling.textContent.length):N.nextSibling?N.nextSibling.nodeType===3?y.setStart(N.nextSibling,0):y.setStartBefore(N.nextSibling):y.setStart(N.parentElement,0);else if(N.previousElementSibling.isSameNode(N.previousSibling))if(N.previousElementSibling.lastChild){y.setStartBefore(N),y.collapse(!0),S(y),(0,b.i7)()&&(N.previousElementSibling.tagName==="EM"||N.previousElementSibling.tagName==="STRONG"||N.previousElementSibling.tagName==="S")&&(y.insertNode(document.createTextNode(v.g.ZWSP)),y.collapse(!1)),N.remove();return}else y.setStartAfter(N.previousElementSibling);else y.setStart(N.previousSibling,N.previousSibling.textContent.length);y.collapse(!0),N.remove(),S(y)}},A=function(M,y){var N=document.createElement("div");N.innerHTML=M;var z=N.querySelectorAll("p");z.length===1&&!z[0].previousSibling&&!z[0].nextSibling&&y[y.currentMode].element.children.length>0&&N.firstElementChild.tagName==="P"&&(M=z[0].innerHTML.trim());var F=document.createElement("div");F.innerHTML=M;var P=m(y);if(P.toString()!==""&&(y[y.currentMode].preventInput=!0,document.execCommand("delete",!1,"")),F.firstElementChild&&F.firstElementChild.getAttribute("data-block")==="0"){F.lastElementChild.insertAdjacentHTML("beforeend","<wbr>");var Y=(0,g.F9)(P.startContainer);if(!Y)y[y.currentMode].element.insertAdjacentHTML("beforeend",F.innerHTML);else{var te=(0,g.lG)(P.startContainer,"LI");te&&F.firstElementChild.tagName==="UL"?te.insertAdjacentHTML("afterend",F.firstElementChild.innerHTML):Y.insertAdjacentHTML("afterend",F.innerHTML)}T(y[y.currentMode].element,P)}else{var de=document.createElement("template");de.innerHTML=M,P.insertNode(de.content.cloneNode(!0)),P.collapse(!1),S(P)}}}},r={};function o(h){var c=r[h];if(c!==void 0)return c.exports;var p=r[h]={exports:{}};return n[h](p,p.exports,o),p.exports}o.d=(h,c)=>{for(var p in c)o.o(c,p)&&!o.o(h,p)&&Object.defineProperty(h,p,{enumerable:!0,get:c[p]})},o.o=(h,c)=>Object.prototype.hasOwnProperty.call(h,c),o.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var l={};return(()=>{o.d(l,{default:()=>Nd});var h=o(408),c=o(145),p=o(105),v=function(i){return i.currentMode==="sv"?(0,p.X)("".concat(i.sv.element.textContent,`
|
||
`).replace(/\n\n$/,`
|
||
`)):i.currentMode==="wysiwyg"?i.lute.VditorDOM2Md(i.wysiwyg.element.innerHTML):i.currentMode==="ir"?i.lute.VditorIRDOM2Md(i.ir.element.innerHTML):""},b=o(413),g=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-devtools",this.element.innerHTML='<div class="vditor-reset--error"></div><div style="height: 100%;"></div>'}return i.prototype.renderEchart=function(a){var s=this;a.devtools.element.style.display==="block"&&(0,b.G)("".concat(a.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(a.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(a.lute.RenderEChartsJSON(v(a))),initialTreeDepth:-1,label:{align:"left",backgroundColor:"rgba(68, 77, 86, .68)",borderRadius:3,color:"#d1d5da",fontSize:12,lineHeight:12,offset:[9,12],padding:[2,4,2,4],position:"top",verticalAlign:"middle"},lineStyle:{color:"#4285f4",type:"curve",width:1},orient:"vertical",roam:!0,type:"tree"}],toolbox:{bottom:25,emphasis:{iconStyle:{color:"#4285f4"}},feature:{restore:{show:!0},saveAsImage:{show:!0}},right:15,show:!0}}),s.ASTChart.resize()}catch(u){s.element.lastElementChild.style.display="none",s.element.firstElementChild.innerHTML=u}})},i}(),m=o(410),x=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains("vditor-menu--current")&&u.classList.remove("vditor-menu--current")}})},w=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains("vditor-menu--current")&&u.classList.add("vditor-menu--current")}})},S=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.remove(c.g.CLASS_MENU_DISABLED)}})},k=function(i,a){a.forEach(function(s){if(i[s]){var u=i[s].children[0];u&&!u.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.classList.add(c.g.CLASS_MENU_DISABLED)}})},C=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},T=function(i,a){a.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},A=function(i,a,s){a.includes("subToolbar")&&(i.toolbar.element.querySelectorAll(".vditor-hint").forEach(function(u){s&&u.isEqualNode(s)||(u.style.display="none")}),i.toolbar.elements.emoji&&(i.toolbar.elements.emoji.lastElementChild.style.display="none")),a.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&a.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,a,s,u){s.addEventListener((0,m.Le)(),function(d){d.preventDefault(),d.stopPropagation(),!s.classList.contains(c.g.CLASS_MENU_DISABLED)&&(i.toolbar.element.querySelectorAll(".vditor-hint--current").forEach(function(f){f.classList.remove("vditor-hint--current")}),a.style.display==="block"?a.style.display="none":(A(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),a.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?a.classList.add("vditor-panel--left"):a.classList.remove("vditor-panel--left")))})},y=o(106),N=o(771),z=function(i,a,s,u){},F=o(135),P=o(775),Y=o(428),te=o(325),de=o(483),Ce=o(999),qe=o(472),Ge=o(637),nt=o(11),je=o(194),Ne=o(229),tt=o(825),lt=function(i,a,s){s===void 0&&(s="sv");var u=document.createElement("div");u.innerHTML=i;var d=!1;u.childElementCount===1&&u.lastElementChild.style.fontFamily.indexOf("monospace")>-1&&(d=!0);var f=u.querySelectorAll("pre");if(u.childElementCount===1&&f.length===1&&f[0].className!=="vditor-wysiwyg"&&f[0].className!=="vditor-sv"&&(d=!0),i.indexOf(`
|
||
<p class="p1">`)===0&&(d=!0),u.childElementCount===1&&u.firstElementChild.tagName==="TABLE"&&u.querySelector(".line-number")&&u.querySelector(".line-content")&&(d=!0),d){var E=a||i;return/\n/.test(E)||f.length===1?s==="wysiwyg"?'<div class="vditor-wysiwyg__block" data-block="0" data-type="code-block"><pre><code>'.concat(E.replace(/&/g,"&").replace(/</g,"<"),"<wbr></code></pre></div>"):"\n```\n"+E.replace(/&/g,"&").replace(/</g,"<")+"\n```":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&").replace(/</g,"<"),"</code><wbr>"):"`".concat(E,"`")}return!1},Qe=function(i,a){if(i){if(i.parentElement.getAttribute("data-type")==="html-block"){i.setAttribute("data-render","1");return}var s=i.firstElementChild.className.replace("language-","");if(s==="abc")(0,F.Q)(i,a.options.cdn);else if(s==="mermaid")(0,Ge.i)(i,a.options.cdn,a.options.theme);else if(s==="smiles")(0,tt.J)(i,a.options.cdn,a.options.theme);else if(s==="markmap")(0,nt.K)(i,a.options.cdn);else if(s==="flowchart")(0,te.P)(i,a.options.cdn);else if(s==="echarts")(0,P.p)(i,a.options.cdn,a.options.theme);else if(s==="mindmap")(0,je.P)(i,a.options.cdn,a.options.theme);else if(s==="plantuml")(0,Ne.B)(i,a.options.cdn);else if(s==="graphviz")(0,de.v)(i,a.options.cdn);else if(s==="math")(0,qe.H)(i,{cdn:a.options.cdn,math:a.options.preview.math});else{var u=a.options.customRenders.find(function(d){if(d.language===s)return d.render(i,a),!0});u||((0,Ce.s)(Object.assign({},a.options.preview.hljs),i,a.options.cdn),(0,Y.O)(i,a.options.preview.hljs))}i.setAttribute("data-render","1")}},j=o(810),Ht=function(i){if(i.currentMode!=="sv"){var a=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),a.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,qe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},Rt=function(i,a){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=a[a.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(a.options.height==="auto"){var d=u.offsetTop+a.element.offsetTop;a.options.toolbarConfig.pin||(d+=a.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else a.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,a.element.offsetTop),a[a.currentMode].element.scrollTop=u.offsetTop;return}},Ut=function(i,a,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,j.im)(i,a[a.currentMode].element,u).start===0)return i.previousElementSibling.remove(),st(a),!0;if(Fr(a,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,j.im)(i,a[a.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),st(a),!0;if(vi(a,s,u,i,i.nextElementSibling))return!0}if(s.key==="Backspace"||s.key==="Delete"){var d=(0,y.fb)(u.startContainer,"vditor-toc");if(d)return d.remove(),st(a),!0}},Nt=function(i,a,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(a.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(yo(d.innerHTML)&&d.previousElementSibling||wo(d.innerHTML))return;for(var f=(0,j.im)(d,i.ir.element,a).start,E=!0,L=f-1;L>d.textContent.substr(0,f).lastIndexOf(`
|
||
`);L--)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==" "){E=!1;break}f===0&&(E=!1);for(var D=!0,L=f-1;L<d.textContent.length;L++)if(d.textContent.charAt(L)!==" "&&d.textContent.charAt(L)!==`
|
||
`){D=!1;break}if(E){typeof i.options.input=="function"&&i.options.input(v(i));return}if(D&&/^#{1,6} $/.test(d.textContent)&&(D=!1),D){var _=(0,y.fb)(a.startContainer,"vditor-ir__marker");if(!_){var B=a.startContainer.previousSibling;B&&B.nodeType!==3&&B.classList.contains("vditor-ir__node--expand")&&B.classList.remove("vditor-ir__node--expand"),typeof i.options.input=="function"&&i.options.input(v(i));return}}}if(i.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(rt){rt.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var X=(0,y.fb)(a.startContainer,"vditor-ir__preview");X?X.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):a.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(rt){rt.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var fe=d.isEqualNode(i.ir.element),be=(0,y.a1)(d,"data-type","footnotes-block"),ce="";if(fe)ce=d.innerHTML;else{var ke=(0,N.S)(a.startContainer,"BLOCKQUOTE"),xe=(0,y.O9)(a.startContainer);if(xe&&(d=xe),ke&&(!xe||xe&&!ke.contains(xe))&&(d=ke),be&&(d=be),ce=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var ue=d.previousElementSibling,ze=d.nextElementSibling;ue&&(ue.tagName==="UL"||ue.tagName==="OL")&&(ce=ue.outerHTML+ce,ue.remove()),ze&&(ze.tagName==="UL"||ze.tagName==="OL")&&(ce=ce+ze.outerHTML,ze.remove()),ce=ce.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}else d.previousElementSibling&&d.previousElementSibling.textContent.replace(c.g.ZWSP,"")!==""&&u&&u.inputType==="insertParagraph"&&(ce=d.previousElementSibling.outerHTML+ce,d.previousElementSibling.remove());d.innerText.startsWith("```")||(i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(rt){rt&&!d.isEqualNode(rt)&&(ce+=rt.outerHTML,rt.remove())}),i.ir.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(rt){rt&&!d.isEqualNode(rt)&&(ce+=rt.outerHTML,rt.remove())}))}if(z("SpinVditorIRDOM",ce,"argument",i.options.debugger),ce=i.lute.SpinVditorIRDOM(ce),z("SpinVditorIRDOM",ce,"result",i.options.debugger),fe)d.innerHTML=ce;else if(d.outerHTML=ce,be){var Te=(0,y.a1)(i.ir.element.querySelector("wbr"),"data-type","footnotes-def");if(Te){var $e=Te.textContent,bt=$e.substring(1,$e.indexOf("]:")),gt=i.ir.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(bt,'"]'));gt&>.setAttribute("aria-label",$e.substr(bt.length+3).trim().substr(0,24))}}var kt,hn=i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");hn.forEach(function(rt,Bt){Bt===0?kt=rt:(kt.insertAdjacentHTML("beforeend",rt.innerHTML),rt.remove())}),hn.length>0&&i.ir.element.insertAdjacentElement("beforeend",hn[0]);var Kt,pn=i.ir.element.querySelectorAll("[data-type='footnotes-block']");pn.forEach(function(rt,Bt){Bt===0?Kt=rt:(Kt.insertAdjacentHTML("beforeend",rt.innerHTML),rt.remove())}),pn.length>0&&i.ir.element.insertAdjacentElement("beforeend",pn[0]),(0,j.ib)(i.ir.element,a),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(rt){Qe(rt,i)}),Ht(i),Zn(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},oe=function(i,a){if(i==="")return!1;if(i.indexOf("⇧")===-1&&i.indexOf("⌘")===-1&&i.indexOf("⌥")===-1)return!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.code===i;if(i==="⇧Tab")return!!(!(0,m.yl)(a)&&!a.altKey&&a.shiftKey&&a.code==="Tab");var s=i.split("");if(i.startsWith("⌥")){var u=s.length===3?s[2]:s[1];return!!((s.length===3?(0,m.yl)(a):!(0,m.yl)(a))&&a.altKey&&!a.shiftKey&&a.code===(/^[0-9]$/.test(u)?"Digit":"Key")+u)}i==="⌘Enter"&&(s=["⌘","Enter"]);var d=s.length>2&&s[0]==="⇧",f=d?s[2]:s[1];return d&&((0,m.vU)()||!/Mac/.test(navigator.platform))&&(f==="-"?f="_":f==="="&&(f="+")),!!((0,m.yl)(a)&&a.key.toLowerCase()===f.toLowerCase()&&!a.altKey&&(!d&&!a.shiftKey||d&&a.shiftKey))},he=function(i){var a=i.startContainer;if(a.nodeType===3&&a.nodeValue.length!==i.startOffset)return!1;for(var s=a.nextSibling;s&&s.textContent==="";)s=s.nextSibling;if(s){if(s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block"))return s}else{var u=(0,y.fb)(a,"vditor-ir__marker");if(u&&!u.nextSibling){var d=a.parentElement.parentElement.nextSibling;if(d&&d.nodeType!==3&&d.classList.contains("vditor-ir__node"))return d}return!1}return!1},J=function(i){var a=i.startContainer,s=a.previousSibling;return a.nodeType===3&&i.startOffset===0&&s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block")?s:!1},ee=function(i,a){a.ir.element.querySelectorAll(".vditor-ir__node--expand").forEach(function(E){E.classList.remove("vditor-ir__node--expand")});var s=(0,y.JQ)(i.startContainer,"vditor-ir__node"),u=!i.collapsed&&(0,y.JQ)(i.endContainer,"vditor-ir__node");if(!(!i.collapsed&&(!s||s!==u))){s&&(s.classList.add("vditor-ir__node--expand"),s.classList.remove("vditor-ir__node--hidden"),(0,j.Hc)(i));var d=he(i);if(d){d.classList.add("vditor-ir__node--expand"),d.classList.remove("vditor-ir__node--hidden");return}var f=J(i);if(f){f.classList.add("vditor-ir__node--expand"),f.classList.remove("vditor-ir__node--hidden");return}}},De=function(i,a){if(i.ir.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,j.zh)(i),u=s.startContainer;if(!vo(a,i,u)||(Fa(s,i,a),qs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.a1)(u,"data-newline","1");if(!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&a.key==="Enter"&&d&&s.startOffset<d.textContent.length){var f=d.previousElementSibling;f&&(s.insertNode(document.createTextNode(f.textContent)),s.collapse(!1));var E=d.nextSibling;E&&(s.insertNode(document.createTextNode(E.textContent)),s.collapse(!0))}var L=(0,y.lG)(u,"P");if(Ns(a,i,L,s)||_s(s,i,L,a)||zs(i,s,a,L))return!0;var D=(0,y.fb)(u,"vditor-ir__marker--pre");if(D&&D.tagName==="PRE"){var _=D.firstChild;if(Ps(i,a,D,s)||(_.getAttribute("data-type")==="math-block"||_.getAttribute("data-type")==="html-block")&&Fr(i,a,s,_,D.parentElement)||vi(i,a,s,_,D.parentElement))return!0}var B=(0,y.a1)(u,"data-type","code-block-info");if(B){if(a.key==="Enter"||a.key==="Tab")return s.selectNodeContents(B.nextElementSibling.firstChild),s.collapse(!0),a.preventDefault(),A(i,["hint"]),!0;if(a.key==="Backspace"){var X=(0,j.im)(B,i.ir.element).start;X===1&&s.setStart(u,0),X===2&&(i.hint.recentLanguage="")}if(Fr(i,a,s,B,B.parentElement))return A(i,["hint"]),!0}var fe=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(a.key.indexOf("Arrow")>-1&&fe){var be=fu(fe);if(be&&Fr(i,a,s,fe,be))return!0;var ce=mu(fe);if(ce&&vi(i,a,s,fe,ce))return!0}if(Hs(i,a,s)||Bs(i,s,a)||xo(i,s,a))return!0;var ke=(0,N.W)(u);if(ke){if(oe("⌘=",a)){var xe=ke.querySelector(".vditor-ir__marker--heading");return xe&&xe.textContent.trim().length>1&&bi(i,xe.textContent.substr(1)),a.preventDefault(),!0}if(oe("⌘-",a)){var xe=ke.querySelector(".vditor-ir__marker--heading");return xe&&xe.textContent.trim().length<6&&bi(i,xe.textContent.trim()+"# "),a.preventDefault(),!0}}var ue=(0,y.F9)(u);if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(Fs(i,s,a,L))return!0;if(ue&&ue.previousElementSibling&&ue.tagName!=="UL"&&ue.tagName!=="OL"&&(ue.previousElementSibling.getAttribute("data-type")==="code-block"||ue.previousElementSibling.getAttribute("data-type")==="math-block")){var ze=(0,j.im)(ue,i.ir.element,s).start;if(ze===0||ze===1&&ue.innerText.startsWith(c.g.ZWSP))return s.selectNodeContents(ue.previousElementSibling.querySelector(".vditor-ir__marker--pre code")),s.collapse(!1),ee(s,i),ue.textContent.trim().replace(c.g.ZWSP,"")===""&&(ue.remove(),Zn(i)),a.preventDefault(),!0}if(ke){var Te=ke.firstElementChild.textContent.length;(0,j.im)(ke,i.ir.element).start===Te&&Te!==0&&(s.setStart(ke.firstElementChild.firstChild,Te-1),s.collapse(!0),(0,j.Hc)(s))}}return(a.key==="ArrowUp"||a.key==="ArrowDown")&&ue&&(ue.querySelectorAll(".vditor-ir__node").forEach(function($e){$e.contains(u)||$e.classList.add("vditor-ir__node--hidden")}),js(a,ue,s))?!0:(Ms(s,a.key),ue&&Ut(ue,i,a,s)?(a.preventDefault(),!0):!1)},se=o(190),V=function(i,a){i.querySelectorAll("[data-type=footnotes-link]").forEach(function(s){for(var u=s.parentElement,d=u.nextSibling;d&&d.textContent.startsWith(" ");){var f=d;f.childNodes.forEach(function(E){u.append(E.cloneNode(!0))}),d=d.nextSibling,f.remove()}a&&a(u)})},Z=function(i,a){var s,u=getSelection().getRangeAt(0).cloneRange(),d=u.startContainer;u.startContainer.nodeType!==3&&u.startContainer.tagName==="DIV"&&(d=u.startContainer.childNodes[u.startOffset-1]);var f=(0,y.a1)(d,"data-block","0");if(f&&a&&(a.inputType==="deleteContentBackward"||a.data===" ")){for(var E=(0,j.im)(f,i.sv.element,u).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
|
||
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}if(E===0&&(L=!1),L){Pe(i);return}if(a.inputType==="deleteContentBackward"){var _=(0,y.a1)(d,"data-type","code-block-open-marker")||(0,y.a1)(d,"data-type","code-block-close-marker");if(_){if(_.getAttribute("data-type")==="code-block-close-marker"){var B=He(d,"code-block-open-marker");if(B){B.textContent=_.textContent,Pe(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var B=He(d,"code-block-close-marker",!1);if(B){B.textContent=_.textContent,Pe(i);return}}}var X=(0,y.a1)(d,"data-type","math-block-open-marker");if(X){var fe=X.nextElementSibling.nextElementSibling;fe&&fe.getAttribute("data-type")==="math-block-close-marker"&&(fe.remove(),Pe(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(ue){ue.textContent.length===1&&ue.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(ue){ue.textContent.length===1&&ue.remove()});var be=(0,y.a1)(d,"data-type","heading-marker");if(be&&be.textContent.indexOf("#")===-1){Pe(i);return}}if((a.data===" "||a.inputType==="deleteContentBackward")&&((0,y.a1)(d,"data-type","padding")||(0,y.a1)(d,"data-type","li-marker")||(0,y.a1)(d,"data-type","task-marker")||(0,y.a1)(d,"data-type","blockquote-marker"))){Pe(i);return}}if(f&&f.textContent.trimRight()==="$$"){Pe(i);return}f||(f=i.sv.element),((s=f.firstElementChild)===null||s===void 0?void 0:s.getAttribute("data-type"))==="link-ref-defs-block"&&(f=i.sv.element),(0,y.a1)(d,"data-type","footnotes-link")&&(f=i.sv.element),f.textContent.indexOf(Lute.Caret)===-1&&u.insertNode(document.createTextNode(Lute.Caret)),f.querySelectorAll("[style]").forEach(function(ue){ue.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(ue){ue.outerHTML=ue.innerHTML});var ce=f.textContent,ke=f.isEqualNode(i.sv.element);if(ke)ce=f.textContent;else{f.previousElementSibling&&(ce=f.previousElementSibling.textContent+ce,f.previousElementSibling.remove()),f.previousElementSibling&&ce.indexOf(`---
|
||
`)===0&&(ce=f.previousElementSibling.textContent+ce,f.previousElementSibling.remove());var xe="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(ue,ze){ue&&!f.isEqualNode(ue.parentElement)&&(xe+=ue.parentElement.textContent+`
|
||
`,ue.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(ue,ze){ue&&!f.isEqualNode(ue.parentElement)&&(xe+=ue.parentElement.textContent+`
|
||
`,ue.parentElement.remove())}),ce=xe+ce}ce=pe(ce,i),ke?f.innerHTML=ce:f.outerHTML=ce,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(ue){i.sv.element.insertAdjacentElement("beforeend",ue.parentElement)}),V(i.sv.element,function(ue){i.sv.element.insertAdjacentElement("beforeend",ue)}),(0,j.ib)(i.sv.element,u),K(i),Pe(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},ve=function(i,a){var s,u,d,f,E;if(i.sv.composingLock=a.isComposing,a.isComposing||(a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"))return!1;var L=(0,j.zh)(i),D=L.startContainer;L.startContainer.nodeType!==3&&L.startContainer.tagName==="DIV"&&(D=L.startContainer.childNodes[L.startOffset-1]);var _=(0,y.a1)(D,"data-type","text"),B=(0,y.a1)(D,"data-type","blockquote-marker");if(!B&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(B=_.previousElementSibling),B&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&B.nextElementSibling.textContent.trim()===""&&(0,j.im)(B,i.sv.element,L).start===B.textContent.length)return((s=B.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&B.previousElementSibling.setAttribute("data-action","enter-remove"),B.remove(),Pe(i),a.preventDefault(),!0;var X=(0,y.a1)(D,"data-type","li-marker"),fe=(0,y.a1)(D,"data-type","task-marker"),be=X;if(be||fe&&fe.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(be=fe),!be&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(be=_.previousElementSibling),be){var ce=(0,j.im)(be,i.sv.element,L).start,ke=be.getAttribute("data-type")==="task-marker",xe=be;if(ke&&(xe=be.previousElementSibling.previousElementSibling.previousElementSibling),ce===be.textContent.length){if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&be.nextElementSibling.textContent.trim()==="")return((u=xe.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(xe.previousElementSibling.remove(),Z(i)):(ke&&(xe.remove(),be.previousElementSibling.previousElementSibling.remove(),be.previousElementSibling.remove()),be.nextElementSibling.remove(),be.remove(),Pe(i)),a.preventDefault(),!0;if(a.key==="Tab")return a.shiftKey?xe.previousElementSibling.getAttribute("data-type")==="padding"&&xe.previousElementSibling.remove():xe.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(xe.textContent.replace(/\S/g," "),"</span>")),/^\d/.test(xe.textContent)&&(xe.textContent=xe.textContent.replace(/^\d{1,}/,"1"),L.selectNodeContents(be.firstChild),L.collapse(!1)),Z(i),a.preventDefault(),!0}}if(xo(i,L,a))return!0;var ue=(0,y.a1)(D,"data-block","0"),ze=(0,N.S)(D,"SPAN");if(a.key==="Enter"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey&&ue){var Te=!1,$e=ue.textContent.match(/^\n+/);(0,j.im)(ue,i.sv.element).start<=($e?$e[0].length:0)&&(Te=!0);var bt=`
|
||
`;if(ze){if(((d=ze.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return ze.previousElementSibling.remove(),Pe(i),a.preventDefault(),!0;bt+=Re(ze)}return L.insertNode(document.createTextNode(bt)),L.collapse(!1),ue&&ue.textContent.trim()!==""&&!Te?Z(i):Pe(i),a.preventDefault(),!0}if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.altKey&&!a.shiftKey){if(ze&&((f=ze.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,j.im)(ze,i.sv.element,L).start===1&&ze.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(ze,0),L.extractContents(),ze.textContent.trim()!==""?Z(i):Pe(i),a.preventDefault(),!0;if(ue&&(0,j.im)(ue,i.sv.element,L).start===0&&ue.previousElementSibling){L.extractContents();var gt=ue.previousElementSibling.lastElementChild;return gt.getAttribute("data-type")==="newline"&&(gt.remove(),gt=ue.previousElementSibling.lastElementChild),gt.getAttribute("data-type")!=="newline"&&(gt.insertAdjacentHTML("afterend",ue.innerHTML),ue.remove()),ue.textContent.trim()!==""&&!(!((E=ue.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?Z(i):(gt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(gt.lastChild),L.collapse(!1)),Pe(i)),a.preventDefault(),!0}}return!1},le=o(538),we=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ae=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),we(i),(0,le.Z)(i.options.preview.theme.current,i.options.preview.theme.path),typeof i.options.height=="number"?i.element.style.height=i.options.height+"px":i.element.style.height=i.options.height,typeof i.options.minHeight=="number"&&(i.element.style.minHeight=i.options.minHeight+"px"),typeof i.options.width=="number"?i.element.style.width=i.options.width+"px":i.element.style.width=i.options.width,i.element.appendChild(i.toolbar.element);var a=document.createElement("div");if(a.className="vditor-content",i.options.outline.position==="left"&&a.appendChild(i.outline.element),a.appendChild(i.wysiwyg.element.parentElement),a.appendChild(i.sv.element),a.appendChild(i.ir.element.parentElement),a.appendChild(i.preview.element),i.toolbar.elements.devtools&&a.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),a.appendChild(i.outline.element)),i.upload&&a.appendChild(i.upload.element),i.options.resize.enable&&a.appendChild(i.resize.element),a.appendChild(i.hint.element),a.appendChild(i.tip.element),i.element.appendChild(a),a.addEventListener("click",function(){A(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),rr(i,i.options.mode,ot(i)),document.execCommand("DefaultParagraphSeparator",!1,"p"),navigator.userAgent.indexOf("iPhone")>-1&&typeof window.visualViewport<"u"){var s=!1,u=function(d){s||(s=!0,requestAnimationFrame(function(){s=!1;var f=i.toolbar.element;f.style.transform="none",f.getBoundingClientRect().top<0&&(f.style.transform="translate(0, ".concat(-f.getBoundingClientRect().top,"px)"))}))};window.visualViewport.addEventListener("scroll",u),window.visualViewport.addEventListener("resize",u)}},Fe=function(i){var a=window.innerWidth<=c.g.MOBILE_WIDTH?10:35;if(i.wysiwyg.element.parentElement.style.display!=="none"){var s=(i.wysiwyg.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.wysiwyg.element.style.padding="10px ".concat(Math.max(a,s),"px")}if(i.ir.element.parentElement.style.display!=="none"){var s=(i.ir.element.parentElement.clientWidth-i.options.preview.maxWidth)/2;i.ir.element.style.padding="10px ".concat(Math.max(a,s),"px")}i.preview.element.style.display!=="block"?i.toolbar.element.style.paddingLeft=Math.max(5,parseInt(i[i.currentMode].element.style.paddingLeft||"0",10)+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0))+"px":i.toolbar.element.style.paddingLeft=5+(i.options.outline.position==="left"?i.outline.element.offsetWidth:0)+"px"},Ke=function(i){if(i.options.typewriterMode){var a=window.innerHeight;typeof i.options.height=="number"?(a=i.options.height,typeof i.options.minHeight=="number"&&(a=Math.max(a,i.options.minHeight)),a=Math.min(window.innerHeight,a)):a=i.element.clientHeight,i.element.classList.contains("vditor--fullscreen")&&(a=window.innerHeight),i[i.currentMode].element.style.setProperty("--editor-bottom",(a-i.toolbar.element.offsetHeight)/2+"px")}},Xe;function Be(){window.removeEventListener("resize",Xe)}var ot=function(i){Ke(i),Be(),window.addEventListener("resize",Xe=function(){Fe(i),Ke(i)});var a=(0,m.pK)()&&localStorage.getItem(i.options.cache.id);return(!i.options.cache.enable||!a)&&(i.options.value?a=i.options.value:i.originalInnerHTML?a=i.lute.HTML2Md(i.originalInnerHTML):i.options.cache.enable||(a="")),a||""},Ue=function(i){clearTimeout(i[i.currentMode].hlToolbarTimeoutId),i[i.currentMode].hlToolbarTimeoutId=window.setTimeout(function(){if(i[i.currentMode].element.getAttribute("contenteditable")!=="false"&&(0,j.Gb)(i[i.currentMode].element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=(0,j.zh)(i),s=a.startContainer;a.startContainer.nodeType===3&&(s=a.startContainer.parentElement),s.classList.contains("vditor-reset")&&(s=s.childNodes[a.startOffset]);var u=i.currentMode==="sv"?(0,y.a1)(s,"data-type","heading"):(0,N.W)(s);u&&w(i.toolbar.elements,["headings"]);var d=i.currentMode==="sv"?(0,y.a1)(s,"data-type","blockquote"):(0,y.lG)(s,"BLOCKQUOTE");d&&w(i.toolbar.elements,["quote"]);var f=(0,y.a1)(s,"data-type","strong");f&&w(i.toolbar.elements,["bold"]);var E=(0,y.a1)(s,"data-type","em");E&&w(i.toolbar.elements,["italic"]);var L=(0,y.a1)(s,"data-type","s");L&&w(i.toolbar.elements,["strike"]);var D=(0,y.a1)(s,"data-type","a");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"LI");_?(_.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):_.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):_.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]);var B=(0,y.a1)(s,"data-type","code-block");B&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"]));var X=(0,y.a1)(s,"data-type","code");X&&(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"]));var fe=(0,y.a1)(s,"data-type","table");fe&&k(i.toolbar.elements,["headings","list","ordered-list","check","line","quote","code","table"])}},200)},Oe=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),clearTimeout(i.wysiwyg.afterRenderTimeoutId),i.wysiwyg.afterRenderTimeoutId=window.setTimeout(function(){if(!i.wysiwyg.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},mt=function(i){for(var a=i.previousSibling;a;){if(a.nodeType!==3&&a.tagName==="A"&&!a.previousSibling&&a.innerHTML.replace(c.g.ZWSP,"")===""&&a.nextSibling)return a;a=a.previousSibling}return!1},Ct=function(i){for(var a=i.startContainer.nextSibling;a&&a.textContent==="";)a=a.nextSibling;return!!(a&&a.nodeType!==3&&(a.tagName==="CODE"||a.getAttribute("data-type")==="math-inline"||a.getAttribute("data-type")==="html-entity"||a.getAttribute("data-type")==="html-inline"))},Vt=function(i){for(var a="",s=i.nextSibling;s;)s.nodeType===3?a+=s.textContent:a+=s.outerHTML,s=s.nextSibling;return a},$t=function(i){for(var a="",s=i.previousSibling;s;)s.nodeType===3?a=s.textContent+a:a=s.outerHTML+a,s=s.previousSibling;return a},$n=function(i){for(var a=i;a&&!a.nextSibling;)a=a.parentElement;return a.nextSibling},Mn=function(i){var a=$t(i.startContainer),s=Vt(i.startContainer),u=i.startContainer.textContent,d=i.startOffset,f="",E="";return(u.substr(0,d)!==""&&u.substr(0,d)!==c.g.ZWSP||a)&&(f="".concat(a).concat(u.substr(0,d))),(u.substr(d)!==""&&u.substr(d)!==c.g.ZWSP||s)&&(E="".concat(u.substr(d)).concat(s)),{afterHTML:E,beforeHTML:f}},In=function(i,a){Array.from(i.wysiwyg.element.childNodes).find(function(s){if(s.nodeType===3){var u=document.createElement("p");u.setAttribute("data-block","0"),u.textContent=s.textContent;var d=a.startContainer.nodeType===3?a.startOffset:s.textContent.length;return s.parentNode.insertBefore(u,s),s.remove(),a.setStart(u.firstChild,Math.min(u.firstChild.textContent.length,d)),a.collapse(!0),(0,j.Hc)(a),!0}else if(!s.getAttribute("data-block"))return s.tagName==="P"?s.remove():(s.tagName==="DIV"?(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>")):s.tagName==="BR"?s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"<wbr></p>"):(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"</p>")),(0,j.ib)(i.wysiwyg.element,a),a=getSelection().getRangeAt(0)),!0})},kn=function(i,a){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer);u||(u=s.startContainer.childNodes[s.startOffset]),!u&&i.wysiwyg.element.children.length===0&&(u=i.wysiwyg.element),u&&!u.classList.contains("vditor-wysiwyg__block")&&(s.insertNode(document.createElement("wbr")),u.innerHTML.trim()==="<wbr>"&&(u.innerHTML="<wbr><br>"),u.tagName==="BLOCKQUOTE"||u.classList.contains("vditor-reset")?u.innerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"):u.outerHTML="<".concat(a,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(a,">"),(0,j.ib)(i.wysiwyg.element,s),Ht(i))},gr=function(i){var a=getSelection().getRangeAt(0),s=(0,y.F9)(a.startContainer);s||(s=a.startContainer.childNodes[a.startOffset]),s&&(a.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>"),(0,j.ib)(i.wysiwyg.element,a)),i.wysiwyg.popover.style.display="none"},nr=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling,d=u.ownerDocument.createRange();u.tagName==="CODE"?(u.style.display="inline-block",s?d.setStart(u.firstChild,1):d.selectNodeContents(u)):(u.style.display="block",u.firstChild.firstChild||u.firstChild.appendChild(document.createTextNode("")),d.selectNodeContents(u.firstChild)),s?d.collapse(!0):d.collapse(!1),(0,j.Hc)(d),!i.firstElementChild.classList.contains("language-mindmap")&&K(a)},Xn=function(i,a){if(i.wysiwyg.composingLock=a.isComposing,a.isComposing)return!1;a.key.indexOf("Arrow")===-1&&a.key!=="Meta"&&a.key!=="Control"&&a.key!=="Alt"&&a.key!=="Shift"&&a.key!=="CapsLock"&&a.key!=="Escape"&&!/^F\d{1,2}$/.test(a.key)&&i.undo.recordFirstPosition(i,a);var s=(0,j.zh)(i),u=s.startContainer;if(!vo(a,i,u)||(Fa(s,i,a),qs(s),a.key!=="Enter"&&a.key!=="Tab"&&a.key!=="Backspace"&&a.key.indexOf("Arrow")===-1&&!(0,m.yl)(a)&&a.key!=="Escape"&&a.key!=="Delete"))return!1;var d=(0,y.F9)(u),f=(0,y.lG)(u,"P");if(Ns(a,i,f,s)||_s(s,i,f,a)||Hs(i,a,s))return!0;var E=(0,y.fb)(u,"vditor-wysiwyg__block");if(E){if(a.key==="Escape"&&E.children.length===2)return i.wysiwyg.popover.style.display="none",E.firstElementChild.style.display="none",i.wysiwyg.element.blur(),a.preventDefault(),!0;if(!(0,m.yl)(a)&&!a.shiftKey&&a.altKey&&a.key==="Enter"&&E.getAttribute("data-type")==="code-block"){var L=i.wysiwyg.popover.querySelector(".vditor-input");return L.focus(),L.select(),a.preventDefault(),!0}if(E.getAttribute("data-block")==="0"&&(Ps(i,a,E.firstElementChild,s)||vi(i,a,s,E.firstElementChild,E)||E.getAttribute("data-type")!=="yaml-front-matter"&&Fr(i,a,s,E.firstElementChild,E)))return!0}if(zs(i,s,a,f))return!0;var D=(0,y.E2)(u,"BLOCKQUOTE");if(D&&!a.shiftKey&&a.altKey&&a.key==="Enter"){(0,m.yl)(a)?s.setStartBefore(D):s.setStartAfter(D),(0,j.Hc)(s);var _=document.createElement("p");return _.setAttribute("data-block","0"),_.innerHTML=`
|
||
`,s.insertNode(_),s.collapse(!0),(0,j.Hc)(s),Oe(i),K(i),a.preventDefault(),!0}var B=(0,N.W)(u);if(B){if(B.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"){var X=document.createElement("p");return X.textContent=`
|
||
`,X.setAttribute("data-block","0"),u.parentElement.insertAdjacentElement("afterend",X),s.setStart(X,0),(0,j.Hc)(s),Oe(i),K(i),a.preventDefault(),!0}if(oe("⌘=",a)){var fe=parseInt(B.tagName.substr(1),10)-1;return fe>0&&(kn(i,"h".concat(fe)),Oe(i)),a.preventDefault(),!0}if(oe("⌘-",a)){var fe=parseInt(B.tagName.substr(1),10)+1;return fe<7&&(kn(i,"h".concat(fe)),Oe(i)),a.preventDefault(),!0}a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&B.textContent.length===1&&gr(i)}if(Bs(i,s,a))return!0;if(a.altKey&&a.key==="Enter"&&!(0,m.yl)(a)&&!a.shiftKey){var be=(0,y.lG)(u,"A"),ce=(0,y.a1)(u,"data-type","link-ref"),ke=(0,y.a1)(u,"data-type","footnotes-ref");if(be||ce||ke||B&&B.tagName.length===2){var xe=i.wysiwyg.popover.querySelector("input");xe.focus(),xe.select()}}if(It(i,a))return!0;if(oe("⇧⌘U",a)){var ue=i.wysiwyg.popover.querySelector('[data-type="up"]');if(ue)return ue.click(),a.preventDefault(),!0}if(oe("⇧⌘D",a)){var ue=i.wysiwyg.popover.querySelector('[data-type="down"]');if(ue)return ue.click(),a.preventDefault(),!0}if(xo(i,s,a))return!0;if(!(0,m.yl)(a)&&a.shiftKey&&!a.altKey&&a.key==="Enter"&&u.parentElement.tagName!=="LI"&&u.parentElement.tagName!=="P")return["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName)?s.insertNode(document.createTextNode(`
|
||
`+c.g.ZWSP)):s.insertNode(document.createTextNode(`
|
||
`)),s.collapse(!1),(0,j.Hc)(s),Oe(i),K(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&s.toString()===""){if(Fs(i,s,a,f))return!0;if(d){if(d.previousElementSibling&&d.previousElementSibling.classList.contains("vditor-wysiwyg__block")&&d.previousElementSibling.getAttribute("data-block")==="0"&&d.tagName!=="UL"&&d.tagName!=="OL"){var ze=(0,j.im)(d,i.wysiwyg.element,s).start;if(ze===0&&s.startOffset===0||ze===1&&d.innerText.startsWith(c.g.ZWSP))return nr(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),Oe(i)),a.preventDefault(),!0}var Te=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Te-2)===`
|
||
`&&u.textContent.charAt(Te-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Te-1)+c.g.ZWSP,s.setStart(u,Te),s.collapse(!0),Oe(i),a.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&Ct(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(bt){bt.firstElementChild.style.display="inline",bt.lastElementChild.style.display="none"})}}if((0,m.vU)()&&s.startOffset===1&&u.textContent.indexOf(c.g.ZWSP)>-1&&u.previousSibling&&u.previousSibling.nodeType!==3&&u.previousSibling.tagName==="CODE"&&(a.key==="Backspace"||a.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),a.preventDefault(),!0;if(js(a,d,s))return a.preventDefault(),!0;if(Ms(s,a.key),a.key==="ArrowDown"){var $e=u.nextSibling;$e&&$e.nodeType!==3&&$e.getAttribute("data-type")==="math-inline"&&s.setStartAfter($e)}return d&&Ut(d,i,a,s)?(a.preventDefault(),!0):!1},It=function(i,a){if(oe("⇧⌘X",a)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),a.preventDefault(),!0}},zn=function(i){clearTimeout(i.wysiwyg.hlToolbarTimeoutId),i.wysiwyg.hlToolbarTimeoutId=window.setTimeout(function(){if(i.wysiwyg.element.getAttribute("contenteditable")!=="false"&&(0,j.Gb)(i.wysiwyg.element)){x(i.toolbar.elements,c.g.EDIT_TOOLBARS),S(i.toolbar.elements,c.g.EDIT_TOOLBARS);var a=getSelection().getRangeAt(0),s=a.startContainer;a.startContainer.nodeType===3?s=a.startContainer.parentElement:s=s.childNodes[a.startOffset>=s.childNodes.length?s.childNodes.length-1:a.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",un(u,i),Gt(i,"footnotes-block"),nn(i,u);return}var d=(0,y.lG)(s,"LI");d?(d.classList.contains("vditor-task")?w(i.toolbar.elements,["check"]):d.parentElement.tagName==="OL"?w(i.toolbar.elements,["ordered-list"]):d.parentElement.tagName==="UL"&&w(i.toolbar.elements,["list"]),S(i.toolbar.elements,["outdent","indent"])):k(i.toolbar.elements,["outdent","indent"]),(0,y.lG)(s,"BLOCKQUOTE")&&w(i.toolbar.elements,["quote"]),((0,y.lG)(s,"B")||(0,y.lG)(s,"STRONG"))&&w(i.toolbar.elements,["bold"]),((0,y.lG)(s,"I")||(0,y.lG)(s,"EM"))&&w(i.toolbar.elements,["italic"]),((0,y.lG)(s,"STRIKE")||(0,y.lG)(s,"S"))&&w(i.toolbar.elements,["strike"]),i.wysiwyg.element.querySelectorAll(".vditor-comment--focus").forEach(function(Le){Le.classList.remove("vditor-comment--focus")});var f=(0,y.fb)(s,"vditor-comment");if(f){var E=f.getAttribute("data-cmtids").split(" ");if(E.length>1&&f.nextSibling.isSameNode(f.nextElementSibling)){var L=f.nextElementSibling.getAttribute("data-cmtids").split(" ");E.find(function(Le){if(L.includes(Le))return E=[Le],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Le){Le.getAttribute("data-cmtids").indexOf(E[0])>-1&&Le.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),B=(0,N.W)(s);(0,y.lG)(s,"CODE")?(0,y.lG)(s,"PRE")?(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","inline-code","upload","link","table","record"]),w(i.toolbar.elements,["code"])):(k(i.toolbar.elements,["headings","bold","italic","strike","line","quote","list","ordered-list","check","code","upload","link","table","record"]),w(i.toolbar.elements,["inline-code"])):B?(k(i.toolbar.elements,["bold"]),w(i.toolbar.elements,["headings"])):_&&k(i.toolbar.elements,["table"]);var X=(0,y.fb)(s,"vditor-toc");if(X){i.wysiwyg.popover.innerHTML="",un(X,i),Gt(i,"vditor-toc"),nn(i,X);return}var fe=(0,N.S)(s,"BLOCKQUOTE");if(fe&&(i.wysiwyg.popover.innerHTML="",vr(a,fe,i),cr(a,fe,i),un(fe,i),Gt(i,"blockquote"),nn(i,fe)),d&&(i.wysiwyg.popover.innerHTML="",vr(a,d,i),cr(a,d,i),un(d,i),Gt(i,"li"),nn(i,d)),_){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var be=function(){var Le=_.rows.length,ct=_.rows[0].cells.length,ar=parseInt(Bt.value,10)||Le,or=parseInt(fn.value,10)||ct;if(!(ar===Le&&ct===or)){if(ct!==or)for(var wi=or-ct,Fn=0;Fn<_.rows.length;Fn++)if(wi>0)for(var Js=0;Js<wi;Js++)Fn===0?_.rows[Fn].lastElementChild.insertAdjacentHTML("afterend","<th> </th>"):_.rows[Fn].lastElementChild.insertAdjacentHTML("afterend","<td> </td>");else for(var To=ct-1;To>=or;To--)_.rows[Fn].cells[To].remove();if(Le!==ar){var Qs=ar-Le;if(Qs>0){for(var Ao="<tr>",$r=0;$r<or;$r++)Ao+="<td> </td>";for(var el=0;el<Qs;el++)_.querySelector("tbody")?_.querySelector("tbody").insertAdjacentHTML("beforeend",Ao):_.querySelector("thead").insertAdjacentHTML("afterend",Ao+"</tr>")}else for(var $r=Le-1;$r>=ar;$r--)_.rows[$r].remove(),_.rows.length===1&&_.querySelector("tbody").remove()}typeof i.options.input=="function"&&i.options.input(v(i))}},ce=function(Le){na(_,Le),Le==="right"?(ze.classList.remove("vditor-icon--current"),Te.classList.remove("vditor-icon--current"),$e.classList.add("vditor-icon--current")):Le==="center"?(ze.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),Te.classList.add("vditor-icon--current")):(Te.classList.remove("vditor-icon--current"),$e.classList.remove("vditor-icon--current"),ze.classList.add("vditor-icon--current")),(0,j.Hc)(a),Oe(i)},ke=(0,y.lG)(s,"TD"),xe=(0,y.lG)(s,"TH"),ue="left";ke?ue=ke.getAttribute("align")||"left":xe&&(ue=xe.getAttribute("align")||"center");var ze=document.createElement("button");ze.setAttribute("type","button"),ze.setAttribute("aria-label",window.VditorI18n.alignLeft+"<"+(0,m.ns)("⇧⌘L")+">"),ze.setAttribute("data-type","left"),ze.innerHTML='<svg><use xlink:href="#vditor-icon-align-left"></use></svg>',ze.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(ue==="left"?" vditor-icon--current":""),ze.onclick=function(){ce("left")};var Te=document.createElement("button");Te.setAttribute("type","button"),Te.setAttribute("aria-label",window.VditorI18n.alignCenter+"<"+(0,m.ns)("⇧⌘C")+">"),Te.setAttribute("data-type","center"),Te.innerHTML='<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',Te.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(ue==="center"?" vditor-icon--current":""),Te.onclick=function(){ce("center")};var $e=document.createElement("button");$e.setAttribute("type","button"),$e.setAttribute("aria-label",window.VditorI18n.alignRight+"<"+(0,m.ns)("⇧⌘R")+">"),$e.setAttribute("data-type","right"),$e.innerHTML='<svg><use xlink:href="#vditor-icon-align-right"></use></svg>',$e.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(ue==="right"?" vditor-icon--current":""),$e.onclick=function(){ce("right")};var bt=document.createElement("button");bt.setAttribute("type","button"),bt.setAttribute("aria-label",window.VditorI18n.insertRowBelow+"<"+(0,m.ns)("⌘=")+">"),bt.setAttribute("data-type","insertRow"),bt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-row"></use></svg>',bt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",bt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Ds(i,a,ct)};var gt=document.createElement("button");gt.setAttribute("type","button"),gt.setAttribute("aria-label",window.VditorI18n.insertRowAbove+"<"+(0,m.ns)("⇧⌘F")+">"),gt.setAttribute("data-type","insertRow"),gt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-rowb"></use></svg>',gt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",gt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Rs(i,a,ct)};var kt=document.createElement("button");kt.setAttribute("type","button"),kt.setAttribute("aria-label",window.VditorI18n.insertColumnRight+"<"+(0,m.ns)("⇧⌘=")+">"),kt.setAttribute("data-type","insertColumn"),kt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-column"></use></svg>',kt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",kt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&ra(i,_,ct)};var hn=document.createElement("button");hn.setAttribute("type","button"),hn.setAttribute("aria-label",window.VditorI18n.insertColumnLeft+"<"+(0,m.ns)("⇧⌘G")+">"),hn.setAttribute("data-type","insertColumn"),hn.innerHTML='<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>',hn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",hn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&ra(i,_,ct,"beforebegin")};var Kt=document.createElement("button");Kt.setAttribute("type","button"),Kt.setAttribute("aria-label",window.VditorI18n["delete-row"]+"<"+(0,m.ns)("⌘-")+">"),Kt.setAttribute("data-type","deleteRow"),Kt.innerHTML='<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>',Kt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Kt.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Is(i,a,ct)};var pn=document.createElement("button");pn.setAttribute("type","button"),pn.setAttribute("aria-label",window.VditorI18n["delete-column"]+"<"+(0,m.ns)("⇧⌘-")+">"),pn.setAttribute("data-type","deleteColumn"),pn.innerHTML='<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>',pn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",pn.onclick=function(){var Le=getSelection().getRangeAt(0).startContainer,ct=(0,y.lG)(Le,"TD")||(0,y.lG)(Le,"TH");ct&&Os(i,a,_,ct)};var rt=document.createElement("span");rt.setAttribute("aria-label",window.VditorI18n.row),rt.className="vditor-tooltipped vditor-tooltipped__n";var Bt=document.createElement("input");rt.appendChild(Bt),Bt.type="number",Bt.min="1",Bt.className="vditor-input",Bt.style.width="42px",Bt.style.textAlign="center",Bt.setAttribute("placeholder",window.VditorI18n.row),Bt.value=_.rows.length.toString(),Bt.oninput=function(){be()},Bt.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){fn.focus(),fn.select(),Le.preventDefault();return}It(i,Le)||dn(Le,a)}};var oa=document.createElement("span");oa.setAttribute("aria-label",window.VditorI18n.column),oa.className="vditor-tooltipped vditor-tooltipped__n";var fn=document.createElement("input");oa.appendChild(fn),fn.type="number",fn.min="1",fn.className="vditor-input",fn.style.width="42px",fn.style.textAlign="center",fn.setAttribute("placeholder",window.VditorI18n.column),fn.value=_.rows[0].cells.length.toString(),fn.oninput=function(){be()},fn.onkeydown=function(Le){if(!Le.isComposing){if(Le.key==="Tab"){Bt.focus(),Bt.select(),Le.preventDefault();return}It(i,Le)||dn(Le,a)}},vr(a,_,i),cr(a,_,i),un(_,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",ze),i.wysiwyg.popover.insertAdjacentElement("beforeend",Te),i.wysiwyg.popover.insertAdjacentElement("beforeend",$e),i.wysiwyg.popover.insertAdjacentElement("beforeend",gt),i.wysiwyg.popover.insertAdjacentElement("beforeend",bt),i.wysiwyg.popover.insertAdjacentElement("beforeend",hn),i.wysiwyg.popover.insertAdjacentElement("beforeend",kt),i.wysiwyg.popover.insertAdjacentElement("beforeend",Kt),i.wysiwyg.popover.insertAdjacentElement("beforeend",pn),i.wysiwyg.popover.insertAdjacentElement("beforeend",rt),i.wysiwyg.popover.insertAdjacentHTML("beforeend"," x "),i.wysiwyg.popover.insertAdjacentElement("beforeend",oa),Gt(i,"table"),nn(i,_)}var Eo=(0,y.a1)(s,"data-type","link-ref");Eo&&mo(i,Eo,a);var qr=(0,y.a1)(s,"data-type","footnotes-ref");if(qr){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var rt=document.createElement("span");rt.setAttribute("aria-label",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),rt.className="vditor-tooltipped vditor-tooltipped__n";var Yn=document.createElement("input");rt.appendChild(Yn),Yn.className="vditor-input",Yn.setAttribute("placeholder",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),Yn.style.width="120px",Yn.value=qr.getAttribute("data-footnotes-label"),Yn.oninput=function(){Yn.value.trim()!==""&&qr.setAttribute("data-footnotes-label",Yn.value),typeof i.options.input=="function"&&i.options.input(v(i))},Yn.onkeydown=function(ct){ct.isComposing||It(i,ct)||dn(ct,a)},un(qr,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",rt),Gt(i,"footnotes-ref"),nn(i,qr)}var Wt=(0,y.fb)(s,"vditor-wysiwyg__block"),Zs=Wt?Wt.getAttribute("data-type").indexOf("block")>-1:!1;if(i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(Le){if(!Wt||Wt&&Zs&&!Wt.contains(Le)){var ct=Le.previousElementSibling;ct.style.display="none"}}),Wt&&Zs){if(i.wysiwyg.popover.innerHTML="",vr(a,Wt,i),cr(a,Wt,i),un(Wt,i),Wt.getAttribute("data-type")==="code-block"){var sa=document.createElement("span");sa.setAttribute("aria-label",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),sa.className="vditor-tooltipped vditor-tooltipped__n";var Cn=document.createElement("input");sa.appendChild(Cn);var yi=Wt.firstElementChild.firstElementChild;Cn.className="vditor-input",Cn.setAttribute("placeholder",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),Cn.value=yi.className.indexOf("language-")>-1?yi.className.split("-")[1].split(" ")[0]:"",Cn.oninput=function(Le){Cn.value.trim()!==""?yi.className="language-".concat(Cn.value):(yi.className="",i.hint.recentLanguage=""),Wt.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(Wt.lastElementChild.innerHTML=Wt.firstElementChild.innerHTML,Qe(Wt.lastElementChild,i)),Oe(i),Le.detail===1&&(a.setStart(yi.firstChild,0),a.collapse(!0),(0,j.Hc)(a))},Cn.onkeydown=function(Le){if(!Le.isComposing&&!It(i,Le)){if(Le.key==="Escape"&&i.hint.element.style.display==="block"){i.hint.element.style.display="none",Le.preventDefault();return}i.hint.select(Le,i),dn(Le,a)}},Cn.onkeyup=function(Le){var ct,ar;if(!(Le.isComposing||Le.key==="Enter"||Le.key==="ArrowUp"||Le.key==="Escape"||Le.key==="ArrowDown")){var or=[],wi=Cn.value.substring(0,Cn.selectionStart);(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((ar=(ct=window.hljs)===null||ct===void 0?void 0:ct.listLanguages())!==null&&ar!==void 0?ar:[]).sort())).forEach(function(Fn){Fn.indexOf(wi.toLowerCase())>-1&&or.push({html:Fn,value:Fn})}),i.hint.genHTML(or,wi,i),Le.preventDefault()}},i.wysiwyg.popover.insertAdjacentElement("beforeend",sa),Gt(i,"code-block")}else Gt(i,"block");nn(i,Wt)}else Wt=void 0;if(B){i.wysiwyg.popover.innerHTML="";var rt=document.createElement("span");rt.setAttribute("aria-label","ID<"+(0,m.ns)("⌥Enter")+">"),rt.className="vditor-tooltipped vditor-tooltipped__n";var ir=document.createElement("input");rt.appendChild(ir),ir.className="vditor-input",ir.setAttribute("placeholder","ID<"+(0,m.ns)("⌥Enter")+">"),ir.style.width="120px",ir.value=B.getAttribute("data-id")||"",ir.oninput=function(){B.setAttribute("data-id",ir.value),typeof i.options.input=="function"&&i.options.input(v(i))},ir.onkeydown=function(ct){ct.isComposing||It(i,ct)||dn(ct,a)},vr(a,B,i),cr(a,B,i),un(B,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",rt),Gt(i,"heading"),nn(i,B)}if(D&&Zi(i,D,a),!fe&&!d&&!_&&!Wt&&!D&&!Eo&&!qr&&!B&&!X){var jr=(0,y.a1)(s,"data-block","0");jr&&jr.parentElement.isEqualNode(i.wysiwyg.element)?(i.wysiwyg.popover.innerHTML="",vr(a,jr,i),cr(a,jr,i),un(jr,i),Gt(i,"block"),nn(i,jr)):i.wysiwyg.popover.style.display="none"}i.wysiwyg.element.querySelectorAll('span[data-type="backslash"] > span').forEach(function(Le){Le.style.display="none"});var Ys=(0,y.a1)(a.startContainer,"data-type","backslash");Ys&&(Ys.querySelector("span").style.display="inline")}},200)},nn=function(i,a){var s=a,u=(0,y.lG)(a,"TABLE");u&&(s=u),i.wysiwyg.popover.style.left="0",i.wysiwyg.popover.style.display="block",i.wysiwyg.popover.style.top=Math.max(-8,s.offsetTop-21-i.wysiwyg.element.scrollTop)+"px",i.wysiwyg.popover.style.left=Math.min(s.offsetLeft,i.wysiwyg.element.clientWidth-i.wysiwyg.popover.clientWidth)+"px",i.wysiwyg.popover.setAttribute("data-top",(s.offsetTop-21).toString())},mo=function(i,a,s){s===void 0&&(s=getSelection().getRangeAt(0)),i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.tagName==="IMG"?a.setAttribute("alt",f.value):a.textContent=f.value),L.value.trim()!==""&&a.setAttribute("data-link-label",L.value),typeof i.options.input=="function"&&i.options.input(v(i))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.getAttribute("alt")||a.textContent,f.oninput=function(){u()},f.onkeydown=function(D){It(i,D)||dn(D,s)||Pr(i,a,D,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.linkRef),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.linkRef),L.value=a.getAttribute("data-link-label"),L.oninput=function(){u()},L.onkeydown=function(D){It(i,D)||dn(D,s)||Pr(i,a,D,f)},un(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),Gt(i,"link-ref"),nn(i,a)},vr=function(i,a,s){var u=a.previousElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","up"),d.setAttribute("aria-label",window.VditorI18n.up+"<"+(0,m.ns)("⇧⌘U")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-up"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("beforebegin",a),(0,j.ib)(s.wysiwyg.element,i),Oe(s),zn(s),K(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},cr=function(i,a,s){var u=a.nextElementSibling;if(!(!u||!a.parentElement.isEqualNode(s.wysiwyg.element)&&a.tagName!=="LI")){var d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("data-type","down"),d.setAttribute("aria-label",window.VditorI18n.down+"<"+(0,m.ns)("⇧⌘D")+">"),d.innerHTML='<svg><use xlink:href="#vditor-icon-down"></use></svg>',d.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",d.onclick=function(){i.insertNode(document.createElement("wbr")),u.insertAdjacentElement("afterend",a),(0,j.ib)(s.wysiwyg.element,i),Oe(s),zn(s),K(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},un=function(i,a){var s=document.createElement("button");s.setAttribute("type","button"),s.setAttribute("data-type","remove"),s.setAttribute("aria-label",window.VditorI18n.remove+"<"+(0,m.ns)("⇧⌘X")+">"),s.innerHTML='<svg><use xlink:href="#vditor-icon-trashcan"></use></svg>',s.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",s.onclick=function(){var u=(0,j.zh)(a);u.setStartAfter(i),(0,j.Hc)(u),i.remove(),Oe(a),zn(a),["H1","H2","H3","H4","H5","H6"].includes(i.tagName)&&Ht(a)},a.wysiwyg.popover.insertAdjacentElement("beforeend",s)},Pr=function(i,a,s,u){if(!s.isComposing){if(s.key==="Tab"){u.focus(),u.select(),s.preventDefault();return}if(!(0,m.yl)(s)&&!s.shiftKey&&s.altKey&&s.key==="Enter"){var d=(0,j.zh)(i);a.insertAdjacentHTML("afterend",c.g.ZWSP),d.setStartAfter(a.nextSibling),d.collapse(!0),(0,j.Hc)(d),s.preventDefault()}}},Zi=function(i,a,s){i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(a.innerHTML=f.value),a.setAttribute("href",L.value),a.setAttribute("title",_.value),Oe(i)};a.querySelectorAll("[data-marker]").forEach(function(B){B.removeAttribute("data-marker")});var d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.textIsNotEmpty),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.textIsNotEmpty),f.style.width="120px",f.value=a.innerHTML||"",f.oninput=function(){u()},f.onkeydown=function(B){It(i,B)||dn(B,s)||Pr(i,a,B,L)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.link),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.link),L.value=a.getAttribute("href")||"",L.oninput=function(){u()},L.onkeydown=function(B){It(i,B)||dn(B,s)||Pr(i,a,B,_)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.tooltipText),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.tooltipText),_.style.width="60px",_.value=a.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){It(i,B)||dn(B,s)||Pr(i,a,B,f)},un(a,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),i.wysiwyg.popover.insertAdjacentElement("beforeend",D),Gt(i,"a"),nn(i,a)},Xo=function(i,a){var s=i.target;a.wysiwyg.popover.innerHTML="";var u=function(){s.setAttribute("src",f.value),s.setAttribute("alt",L.value),s.setAttribute("title",_.value),typeof a.options.input=="function"&&a.options.input(v(a))},d=document.createElement("span");d.setAttribute("aria-label",window.VditorI18n.imageURL),d.className="vditor-tooltipped vditor-tooltipped__n";var f=document.createElement("input");d.appendChild(f),f.className="vditor-input",f.setAttribute("placeholder",window.VditorI18n.imageURL),f.value=s.getAttribute("src")||"",f.oninput=function(){u()},f.onkeydown=function(B){It(a,B)};var E=document.createElement("span");E.setAttribute("aria-label",window.VditorI18n.alternateText),E.className="vditor-tooltipped vditor-tooltipped__n";var L=document.createElement("input");E.appendChild(L),L.className="vditor-input",L.setAttribute("placeholder",window.VditorI18n.alternateText),L.style.width="52px",L.value=s.getAttribute("alt")||"",L.oninput=function(){u()},L.onkeydown=function(B){It(a,B)};var D=document.createElement("span");D.setAttribute("aria-label",window.VditorI18n.title),D.className="vditor-tooltipped vditor-tooltipped__n";var _=document.createElement("input");D.appendChild(_),_.className="vditor-input",_.setAttribute("placeholder",window.VditorI18n.title),_.value=s.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(B){It(a,B)},un(s,a),a.wysiwyg.popover.insertAdjacentElement("beforeend",d),a.wysiwyg.popover.insertAdjacentElement("beforeend",E),a.wysiwyg.popover.insertAdjacentElement("beforeend",D),Gt(a,"image"),nn(a,s)},dn=function(i,a){if(!(0,m.yl)(i)&&!i.shiftKey&&i.key==="Enter"||i.key==="Escape")return a&&(0,j.Hc)(a),i.preventDefault(),i.stopPropagation(),!0},Gt=function(i,a){i.options.customWysiwygToolbar(a,i.wysiwyg.popover)},ur=function(i){i.currentMode==="wysiwyg"?zn(i):i.currentMode==="ir"&&Ue(i)},Pa=function(i,a,s){s===void 0&&(s={enableAddUndoStack:!0,enableHint:!1,enableInput:!0});var u=i.wysiwyg.element;u.innerHTML=i.lute.Md2VditorDOM(a),u.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(d){Qe(d,i),d.previousElementSibling.setAttribute("style","display:none")}),Oe(i,s)},Yi=function(i,a,s){for(var u=i.startContainer.parentElement,d=!1,f="",E="",L=Mn(i),D=L.beforeHTML,_=L.afterHTML;u&&!d;){var B=u.tagName;if(B==="STRIKE"&&(B="S"),B==="I"&&(B="EM"),B==="B"&&(B="STRONG"),B==="S"||B==="STRONG"||B==="EM"){var X="",fe="",be="";u.parentElement.getAttribute("data-block")!=="0"&&(fe=$t(u),be=Vt(u)),(D||fe)&&(X="".concat(fe,"<").concat(B,">").concat(D,"</").concat(B,">"),D=X),(s==="bold"&&B==="STRONG"||s==="italic"&&B==="EM"||s==="strikeThrough"&&B==="S")&&(X+="".concat(f).concat(c.g.ZWSP,"<wbr>").concat(E),d=!0),(_||be)&&(_="<".concat(B,">").concat(_,"</").concat(B,">").concat(be),X+=_),u.parentElement.getAttribute("data-block")!=="0"?(u=u.parentElement,u.innerHTML=X):(u.outerHTML=X,u=u.parentElement),f="<".concat(B,">")+f,E="</".concat(B,">")+E}else d=!0}(0,j.ib)(a.wysiwyg.element,i)},Ji=function(i,a,s){if(!(i.wysiwyg.composingLock&&s instanceof CustomEvent)){var u=!0,d=!0;i.wysiwyg.element.querySelector("wbr")&&i.wysiwyg.element.querySelector("wbr").remove();var f=(0,j.zh)(i),E=a.getAttribute("data-type");if(a.classList.contains("vditor-menu--current"))if(E==="strike"&&(E="strikeThrough"),E==="quote"){var L=(0,y.lG)(f.startContainer,"BLOCKQUOTE");L||(L=f.startContainer.childNodes[f.startOffset]),L&&(u=!1,a.classList.remove("vditor-menu--current"),f.insertNode(document.createElement("wbr")),L.outerHTML=L.innerHTML.trim()===""?'<p data-block="0">'.concat(L.innerHTML,"</p>"):L.innerHTML,(0,j.ib)(i.wysiwyg.element,f))}else if(E==="inline-code"){var D=(0,y.lG)(f.startContainer,"CODE");D||(D=f.startContainer.childNodes[f.startOffset]),D&&(D.outerHTML=D.innerHTML.replace(c.g.ZWSP,"")+"<wbr>",(0,j.ib)(i.wysiwyg.element,f))}else E==="link"?(f.collapsed&&f.selectNode(f.startContainer.parentElement),document.execCommand("unlink",!1,"")):E==="check"||E==="list"||E==="ordered-list"?(ta(i,f,E),(0,j.ib)(i.wysiwyg.element,f),u=!1,a.classList.remove("vditor-menu--current")):(u=!1,a.classList.remove("vditor-menu--current"),f.toString()===""?Yi(f,i,E):document.execCommand(E,!1,""));else{i.wysiwyg.element.childNodes.length===0&&(i.wysiwyg.element.innerHTML='<p data-block="0"><wbr></p>',(0,j.ib)(i.wysiwyg.element,f));var _=(0,y.F9)(f.startContainer);if(E==="quote"){if(_||(_=f.startContainer.childNodes[f.startOffset]),_){u=!1,a.classList.add("vditor-menu--current"),f.insertNode(document.createElement("wbr"));var B=(0,y.lG)(f.startContainer,"LI");B&&_.contains(B)?B.innerHTML='<blockquote data-block="0">'.concat(B.innerHTML,"</blockquote>"):_.outerHTML='<blockquote data-block="0">'.concat(_.outerHTML,"</blockquote>"),(0,j.ib)(i.wysiwyg.element,f)}}else if(E==="check"||E==="list"||E==="ordered-list")ta(i,f,E,!1),(0,j.ib)(i.wysiwyg.element,f),u=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current");else if(E==="inline-code"){if(f.toString()===""){var X=document.createElement("code");X.textContent=c.g.ZWSP,f.insertNode(X),f.setStart(X.firstChild,1),f.collapse(!0),(0,j.Hc)(f)}else if(f.startContainer.nodeType===3){var X=document.createElement("code");f.surroundContents(X),f.insertNode(X),(0,j.Hc)(f)}a.classList.add("vditor-menu--current")}else if(E==="code"){var X=document.createElement("div");X.className="vditor-wysiwyg__block",X.setAttribute("data-type","code-block"),X.setAttribute("data-block","0"),X.setAttribute("data-marker","```"),f.toString()===""?X.innerHTML=`<pre><code><wbr>
|
||
</code></pre>`:(X.innerHTML="<pre><code>".concat(f.toString(),"<wbr></code></pre>"),f.deleteContents()),f.insertNode(X),_&&(_.outerHTML=i.lute.SpinVditorDOM(_.outerHTML)),(0,j.ib)(i.wysiwyg.element,f),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(bt){Qe(bt,i)}),a.classList.add("vditor-menu--disabled")}else if(E==="link"){if(f.toString()===""){var fe=document.createElement("a");fe.innerText=c.g.ZWSP,f.insertNode(fe),f.setStart(fe.firstChild,1),f.collapse(!0),Zi(i,fe,f);var be=i.wysiwyg.popover.querySelector("input");be.value="",be.focus(),d=!1}else{var X=document.createElement("a");X.setAttribute("href",""),X.innerHTML=f.toString(),f.surroundContents(X),f.insertNode(X),(0,j.Hc)(f),Zi(i,X,f);var ce=i.wysiwyg.popover.querySelectorAll("input");ce[0].value=X.innerText,ce[1].focus()}u=!1,a.classList.add("vditor-menu--current")}else if(E==="table"){var ke='<table data-block="0"><thead><tr><th>col1<wbr></th><th>col2</th><th>col3</th></tr></thead><tbody><tr><td> </td><td> </td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></tbody></table>';if(f.toString().trim()==="")_&&_.innerHTML.trim().replace(c.g.ZWSP,"")===""?_.outerHTML=ke:document.execCommand("insertHTML",!1,ke),f.selectNode(i.wysiwyg.element.querySelector("wbr").previousSibling),i.wysiwyg.element.querySelector("wbr").remove(),(0,j.Hc)(f);else{ke='<table data-block="0"><thead><tr>';var xe=f.toString().split(`
|
||
`),ue=xe[0].split(",").length>xe[0].split(" ").length?",":" ";xe.forEach(function($e,bt){bt===0?($e.split(ue).forEach(function(gt,kt){kt===0?ke+="<th>".concat(gt,"<wbr></th>"):ke+="<th>".concat(gt,"</th>")}),ke+="</tr></thead>"):(bt===1?ke+="<tbody><tr>":ke+="<tr>",$e.split(ue).forEach(function(gt){ke+="<td>".concat(gt,"</td>")}),ke+="</tr>")}),ke+="</tbody></table>",document.execCommand("insertHTML",!1,ke),(0,j.ib)(i.wysiwyg.element,f)}u=!1,a.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var ze=`<hr data-block="0"><p data-block="0"><wbr>
|
||
</p>`;_.innerHTML.trim()===""?_.outerHTML=ze:_.insertAdjacentHTML("afterend",ze),(0,j.ib)(i.wysiwyg.element,f)}}else if(u=!1,a.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Te="strong";E==="italic"?Te="em":E==="strikeThrough"&&(Te="s");var X=document.createElement(Te);X.textContent=c.g.ZWSP,f.insertNode(X),X.previousSibling&&X.previousSibling.textContent===c.g.ZWSP&&(X.previousSibling.textContent=""),f.setStart(X.firstChild,1),f.collapse(!0),(0,j.Hc)(f)}else document.execCommand(E,!1,"")}u&&zn(i),d&&Oe(i)}},Mt=function(){function i(a,s){var u,d=this;this.element=document.createElement("div"),s.className&&(u=this.element.classList).add.apply(u,s.className.split(" "));var f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"";s.level===2&&(f=s.hotkey?" <".concat((0,m.ns)(s.hotkey),">"):"");var E=s.tip?s.tip+f:"".concat(window.VditorI18n[s.name]).concat(f),L=s.name==="upload"?"div":"button";if(s.level===2)this.element.innerHTML="<".concat(L,' data-type="').concat(s.name,'">').concat(E,"</").concat(L,">");else{this.element.classList.add("vditor-toolbar__item");var D=document.createElement(L);D.setAttribute("data-type",s.name),D.className="vditor-tooltipped vditor-tooltipped__".concat(s.tipPosition),D.setAttribute("aria-label",E),D.innerHTML=s.icon,this.element.appendChild(D)}s.prefix&&this.element.children[0].addEventListener((0,m.Le)(),function(_){_.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&(a.currentMode==="wysiwyg"?Ji(a,d.element.children[0],_):a.currentMode==="ir"?vu(a,d.element.children[0],s.prefix||"",s.suffix||""):Dt(a,d.element.children[0],s.prefix||"",s.suffix||""))})}return i}(),As=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rr=function(i,a,s){var u;if(typeof s!="string"?(A(i,["subToolbar","hint"]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===a&&typeof s!="string")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode==="both"&&a==="sv"?i.preview.element.style.display="block":i.preview.element.style.display="none",S(i.toolbar.elements,c.g.EDIT_TOOLBARS),x(i.toolbar.elements,c.g.EDIT_TOOLBARS),k(i.toolbar.elements,["outdent","indent"]),a==="ir")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="block",i.lute.SetVditorIR(!0),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!1),i.currentMode="ir",i.ir.element.innerHTML=i.lute.Md2VditorIRDOM(u),Zn(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),Fe(i),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){Qe(f,i)}),i.ir.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,qe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})});else if(a==="wysiwyg")C(i.toolbar.elements,["both"]),T(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.sv.element.style.display="none",i.wysiwyg.element.parentElement.style.display="block",i.ir.element.parentElement.style.display="none",i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!0),i.lute.SetVditorSV(!1),i.currentMode="wysiwyg",Fe(i),Pa(i,u,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),i.wysiwyg.element.querySelectorAll(".vditor-toc").forEach(function(f){(0,qe.H)(f,{cdn:i.options.cdn,math:i.options.preview.math})}),i.wysiwyg.popover.style.display="none";else if(a==="sv"){T(i.toolbar.elements,["both"]),C(i.toolbar.elements,["outdent","indent","outline","insert-before","insert-after"]),i.wysiwyg.element.parentElement.style.display="none",i.ir.element.parentElement.style.display="none",(i.options.preview.mode==="both"||i.options.preview.mode==="editor")&&(i.sv.element.style.display="block"),i.lute.SetVditorIR(!1),i.lute.SetVditorWYSIWYG(!1),i.lute.SetVditorSV(!0),i.currentMode="sv";var d=pe(u,i);d==="<div data-block='0'></div>"&&(d=""),i.sv.element.innerHTML=d,V(i.sv.element),Pe(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),Fe(i)}i.undo.resetIcon(i),typeof s!="string"&&(i[i.currentMode].element.focus(),ur(i)),Ht(i),Ke(i),i.toolbar.elements["edit-mode"]&&(i.toolbar.elements["edit-mode"].querySelectorAll("button").forEach(function(f){f.classList.remove("vditor-menu--current")}),i.toolbar.elements["edit-mode"].querySelector('button[data-mode="'.concat(i.currentMode,'"]')).classList.add("vditor-menu--current")),i.outline.toggle(i,i.currentMode!=="sv"&&i.options.outline.enable,typeof s!="string")}},Zo=function(i){As(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),f.innerHTML='<button data-mode="wysiwyg">'.concat(window.VditorI18n.wysiwyg," <").concat((0,m.ns)("⌥⌘7"),`></button>
|
||
<button data-mode="ir">`).concat(window.VditorI18n.instantRendering," <").concat((0,m.ns)("⌥⌘8"),`></button>
|
||
<button data-mode="sv">`).concat(window.VditorI18n.splitView," <").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return a.prototype._bindEvent=function(s,u,d){var f=this.element.children[0];M(s,u,f,d.level),u.children.item(0).addEventListener((0,m.Le)(),function(E){rr(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){rr(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){rr(s,"sv",E),E.preventDefault(),E.stopPropagation()})},a}(Mt),zr=function(i,a){return(0,j.Gb)(i,a)?getSelection().toString():""},Qi=function(i,a){a.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),A(i,["subToolbar","hint"])})},za=function(i,a){a.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,se.E)(s.target,i.options.lang,i.options.theme))})},ea=function(i,a){a.addEventListener("blur",function(s){if(i.currentMode==="ir"){var u=i.ir.element.querySelector(".vditor-ir__node--expand");u&&u.classList.remove("vditor-ir__node--expand")}else i.currentMode==="wysiwyg"&&!i.wysiwyg.selectPopover.contains(s.relatedTarget)&&i.wysiwyg.hideComment();i[i.currentMode].range=(0,j.zh)(i),i.options.blur&&i.options.blur(v(i))})},fi=function(i,a){a.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),a.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?st(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ia(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},Li=function(i,a,s){a.addEventListener("copy",function(u){return s(u,i)})},q=function(i,a,s){a.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},K=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var a=i[i.currentMode].element,s=(0,j.Ny)(a).top;i.options.height==="auto"&&!i.element.classList.contains("vditor--fullscreen")&&window.scrollTo(window.scrollX,s+i.element.offsetTop+i.toolbar.element.offsetHeight-window.innerHeight/2+10),(i.options.height!=="auto"||i.element.classList.contains("vditor--fullscreen"))&&(a.scrollTop=s+a.scrollTop-a.clientHeight/2+10)}},Q=function(i,a){a.addEventListener("keydown",function(s){if(!s.isComposing&&i.options.keydown&&i.options.keydown(s),!((i.options.hint.extend.length>1||i.toolbar.elements.emoji)&&i.hint.select(s,i))){if(i.options.comment.enable&&i.currentMode==="wysiwyg"&&(s.key==="Backspace"||oe("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(ve(i,s))return}else if(i.currentMode==="wysiwyg"){if(Xn(i,s))return}else if(i.currentMode==="ir"&&De(i,s))return;if(i.options.ctrlEnter&&oe("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(oe("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(oe("⌘Y",s)&&!i.toolbar.elements.redo){i.undo.redo(i),s.preventDefault();return}if(s.key==="Escape"){i.hint.element.style.display==="block"?i.hint.element.style.display="none":i.options.esc&&!s.isComposing&&i.options.esc(v(i)),s.preventDefault();return}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[1-6]$/.test(s.code)){if(i.currentMode==="wysiwyg"){var u=s.code.replace("Digit","H");(0,y.lG)(getSelection().getRangeAt(0).startContainer,u)?gr(i):kn(i,u),Oe(i)}else i.currentMode==="sv"?ht(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&bi(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" ");return s.preventDefault(),!0}if((0,m.yl)(s)&&s.altKey&&!s.shiftKey&&/^Digit[7-9]$/.test(s.code))return s.code==="Digit7"?rr(i,"wysiwyg",s):s.code==="Digit8"?rr(i,"ir",s):s.code==="Digit9"&&rr(i,"sv",s),!0;i.options.toolbar.find(function(d){if(!d.hotkey||d.toolbar){if(d.toolbar){var f=d.toolbar.find(function(E){if(!E.hotkey)return!1;if(oe(E.hotkey,s))return i.toolbar.elements[E.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0});return!!f}return!1}if(oe(d.hotkey,s))return i.toolbar.elements[d.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0})}})},ye=function(i,a){a.addEventListener("selectstart",function(s){a.onmouseup=function(){setTimeout(function(){var u=zr(i[i.currentMode].element);u.trim()?(i.currentMode==="wysiwyg"&&i.options.comment.enable&&(!(0,y.a1)(s.target,"data-type","footnotes-block")&&!(0,y.a1)(s.target,"data-type","link-ref-defs-block")?i.wysiwyg.showComment():i.wysiwyg.hideComment()),i.options.select&&i.options.select(u)):(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.wysiwyg.hideComment(),typeof i.options.unSelect=="function"&&i.options.unSelect())})}})},Me=function(i,a){var s=(0,j.zh)(i);s.extractContents(),s.insertNode(document.createTextNode(Lute.Caret)),s.insertNode(document.createTextNode(a));var u=(0,y.a1)(s.startContainer,"data-block","0");u||(u=i.sv.element);var d=i.lute.SpinVditorSVDOM(u.textContent);d="<div data-block='0'>"+d.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
|
||
</span></span><span data-type="newline"><br /><span style="display: none">
|
||
</span></span></div><div data-block="0"><`)+"</div>",u.isEqualNode(i.sv.element)?u.innerHTML=d:u.outerHTML=d,V(i.sv.element),(0,j.ib)(i.sv.element,s),K(i)},He=function(i,a,s){s===void 0&&(s=!0);var u=i;for(u.nodeType===3&&(u=u.parentElement);u;){if(u.getAttribute("data-type")===a)return u;s?u=u.previousElementSibling:u=u.nextElementSibling}return!1},pe=function(i,a){z("SpinVditorSVDOM",i,"argument",a.options.debugger);var s=a.lute.SpinVditorSVDOM(i);return i="<div data-block='0'>"+s.replace(/<span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span><span data-type="newline"><br \/><span style="display: none">\n<\/span><\/span></g,`<span data-type="newline"><br /><span style="display: none">
|
||
</span></span><span data-type="newline"><br /><span style="display: none">
|
||
</span></span></div><div data-block="0"><`)+"</div>",z("SpinVditorSVDOM",i,"result",a.options.debugger),i},Re=function(i){var a=i.getAttribute("data-type"),s=i.previousElementSibling,u=a&&a!=="text"&&a!=="table"&&a!=="heading-marker"&&a!=="newline"&&a!=="yaml-front-matter-open-marker"&&a!=="yaml-front-matter-close-marker"&&a!=="code-block-info"&&a!=="code-block-close-marker"&&a!=="code-block-open-marker"?i.textContent:"",d=!1;for(a==="newline"&&(d=!0);s&&!d;){var f=s.getAttribute("data-type");if(f==="li-marker"||f==="blockquote-marker"||f==="task-marker"||f==="padding"){var E=s.textContent;if(f==="li-marker"&&(a==="code-block-open-marker"||a==="code-block-info"))u=E.replace(/\S/g," ")+u;else if(a==="code-block-close-marker"&&s.nextElementSibling.isSameNode(i)){var L=He(i,"code-block-open-marker");L&&L.previousElementSibling&&(s=L.previousElementSibling,u=E+u)}else u=E+u}else f==="newline"&&(d=!0);s=s.previousElementSibling}return u},Pe=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&i.hint.render(i),i.preview.render(i);var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),clearTimeout(i.sv.processTimeoutId),i.sv.processTimeoutId=window.setTimeout(function(){a.enableAddUndoStack&&!i.sv.composingLock&&i.undo.addToUndoStack(i)},i.options.undoDelay)},ht=function(i,a){var s=(0,j.zh)(i),u=(0,N.S)(s.startContainer,"SPAN");u&&u.textContent.trim()!==""&&(a=`
|
||
`+a),s.collapse(!0),document.execCommand("insertHTML",!1,a)},Dt=function(i,a,s,u){var d=(0,j.zh)(i),f=a.getAttribute("data-type");i.sv.element.childNodes.length===0&&(i.sv.element.innerHTML=`<span data-type="p" data-block="0"><span data-type="text"><wbr></span></span><span data-type="newline"><br><span style="display: none">
|
||
</span></span>`,(0,j.ib)(i.sv.element,d));var E=(0,y.F9)(d.startContainer),L=(0,N.S)(d.startContainer,"SPAN");if(E){if(f==="link"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(u):D="".concat(s).concat(d.toString()).concat(u.replace(")",Lute.Caret+")")),document.execCommand("insertHTML",!1,D);return}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"||f==="line"){var D=void 0;d.toString()===""?D="".concat(s).concat(Lute.Caret).concat(f==="code"?"":u):D="".concat(s).concat(d.toString()).concat(Lute.Caret).concat(f==="code"?"":u),f==="table"||f==="code"&&L&&L.textContent!==""?D=`
|
||
|
||
`+D:f==="line"&&(D=`
|
||
|
||
`.concat(s,`
|
||
`).concat(Lute.Caret)),document.execCommand("insertHTML",!1,D);return}else if((f==="check"||f==="list"||f==="ordered-list"||f==="quote")&&L){var _="* ";f==="check"?_="* [ ] ":f==="ordered-list"?_="1. ":f==="quote"&&(_="> ");var B=He(L,"newline");B?B.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),Z(i);return}(0,j.ib)(i.sv.element,d),Pe(i)}},zt=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}},en=function(i,a){i.options.upload.setHeaders&&(i.options.upload.headers=i.options.upload.setHeaders()),i.options.upload.headers&&Object.keys(i.options.upload.headers).forEach(function(s){a.setRequestHeader(s,i.options.upload.headers[s])})},Bn=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(X){E(X)}}function D(B){try{_(u.throw(B))}catch(X){E(X)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},On=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},dr=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),mi=function(i,a){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,B){var X=a[B],fe=!0;X.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),fe=!1),X.size>i.options.upload.max&&(u+="<li>".concat(X.name," ").concat(window.VditorI18n.over," ").concat(i.options.upload.max/1024/1024,"M</li>"),fe=!1);var be=X.name.lastIndexOf("."),ce=X.name.substr(be),ke=i.options.upload.filename(X.name.substr(0,be))+ce;if(i.options.upload.accept){var xe=i.options.upload.accept.split(",").some(function(ue){var ze=ue.trim();if(ze.indexOf(".")===0){if(ce.toLowerCase()===ze.toLowerCase())return!0}else if(X.type.split("/")[0]===ze.split("/")[0])return!0;return!1});xe||(u+="<li>".concat(X.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),fe=!1)}fe&&(s.push(X),d+="<li>".concat(ke," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=a.length,L=0;L<E;L++)f(E,L);if(i.tip.show("<ul>".concat(u).concat(d,"</ul>")),i.options.upload.cancel){var D=i.tip.element.querySelector(".vditorCancelUpload");D&&D.addEventListener("click",function(){i.options.upload.cancel(s),i.tip.hide(),i.upload.isUploading=!1})}return s},Qr=function(i,a){var s=zt(a);s.focus();var u=JSON.parse(i),d="";u.code===1&&(d="".concat(u.msg)),u.data.errFiles&&u.data.errFiles.length>0&&(d="<ul><li>".concat(d,"</li>"),u.data.errFiles.forEach(function(E){var L=E.lastIndexOf("."),D=a.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?a.tip.show(d):a.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),B=a.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase(),_.indexOf(".wav")===0||_.indexOf(".mp3")===0||_.indexOf(".ogg")===0?a.currentMode==="wysiwyg"?f+=`<div class="vditor-wysiwyg__block" data-type="html-block"
|
||
data-block="0"><pre><code><audio controls="controls" src="`.concat(L,'"></audio></code></pre><pre class="vditor-wysiwyg__preview" data-render="1"><audio controls="controls" src="').concat(L,`"></audio></pre></div>
|
||
`):a.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L,`"></audio>
|
||
`):f+="[".concat(B,"](").concat(L,`)
|
||
`):_.indexOf(".apng")===0||_.indexOf(".bmp")===0||_.indexOf(".gif")===0||_.indexOf(".ico")===0||_.indexOf(".cur")===0||_.indexOf(".jpg")===0||_.indexOf(".jpeg")===0||_.indexOf(".jfif")===0||_.indexOf(".pjp")===0||_.indexOf(".pjpeg")===0||_.indexOf(".png")===0||_.indexOf(".svg")===0||_.indexOf(".webp")===0?a.currentMode==="wysiwyg"?f+='<img alt="'.concat(B,'" src="').concat(L,`">
|
||
`):f+=".concat(L,`)
|
||
`):a.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(B,`</a>
|
||
`):f+="[".concat(B,"](").concat(L,`)
|
||
`)}),(0,j.Hc)(a.upload.range),document.execCommand("insertHTML",!1,f),a.upload.range=getSelection().getRangeAt(0).cloneRange()},Br=function(i,a,s){return Bn(void 0,void 0,void 0,function(){var u,d,ce,f,E,E,L,D,_,B,X,fe,be,ce,ke,xe;return On(this,function(ue){switch(ue.label){case 0:for(u=[],d=i.options.upload.multiple===!0?a.length:1,ce=0;ce<d;ce++)f=a[ce],f instanceof DataTransferItem&&(f=f.getAsFile()),u.push(f);return i.options.upload.handler?[4,i.options.upload.handler(u)]:[3,2];case 1:return E=ue.sent(),s&&(s.value=""),typeof E=="string"?(i.tip.show(E),[2]):[2];case 2:return!i.options.upload.url||!i.upload?(s&&(s.value=""),i.tip.show("please config: options.upload.url"),[2]):i.options.upload.file?[4,i.options.upload.file(u)]:[3,4];case 3:u=ue.sent(),ue.label=4;case 4:if(i.options.upload.validate&&(E=i.options.upload.validate(u),typeof E=="string"))return i.tip.show(E),[2];if(L=zt(i),i.upload.range=(0,j.zh)(i),D=mi(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,B=i.options.upload.extraData,X=0,fe=Object.keys(B);X<fe.length;X++)be=fe[X],_.append(be,B[be]);for(ce=0,ke=D.length;ce<ke;ce++)_.append(i.options.upload.fieldName,D[ce]);return xe=new XMLHttpRequest,i.upload.xhr=xe,xe.open("POST",i.options.upload.url),i.options.upload.token&&xe.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(xe.withCredentials=!0),en(i,xe),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),xe.onreadystatechange=function(){if(xe.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),xe.status>=200&&xe.status<300)if(i.options.upload.success)i.options.upload.success(L,xe.responseText);else{var ze=xe.responseText;i.options.upload.format&&(ze=i.options.upload.format(a,xe.responseText)),Qr(ze,i)}else i.options.upload.error?i.options.upload.error(xe.responseText):i.tip.show(xe.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},xe.upload.onprogress=function(ze){if(ze.lengthComputable){var Te=ze.loaded/ze.total*100;i.upload.element.style.display="block";var $e=i.upload.element;$e.style.width=Te+"%"}},xe.send(_),[2]}})})},_r=function(i,a,s){var u,d=(0,y.F9)(a.startContainer);if(d||(d=i.wysiwyg.element),s&&s.inputType!=="formatItalic"&&s.inputType!=="deleteByDrag"&&s.inputType!=="insertFromDrop"&&s.inputType!=="formatBold"&&s.inputType!=="formatRemove"&&s.inputType!=="formatStrikeThrough"&&s.inputType!=="insertUnorderedList"&&s.inputType!=="insertOrderedList"&&s.inputType!=="formatOutdent"&&s.inputType!=="formatIndent"&&s.inputType!==""||!s){var f=mt(a.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Te){Te.remove()}),a.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Te){Te.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Te){Te.textContent.trim()===""&&(Te.classList.remove("vditor-comment","vditor-comment--focus"),Te.removeAttribute("data-cmtids"))});var E="";d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.wysiwyg.element);var L=d.isEqualNode(i.wysiwyg.element),D=(0,y.a1)(d,"data-type","footnotes-block");if(L)E=d.innerHTML;else{var _=(0,y.O9)(a.startContainer);if(_&&!D){var B=(0,N.S)(a.startContainer,"BLOCKQUOTE");B?d=(0,y.F9)(a.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var X=d.previousElementSibling,fe=d.nextElementSibling;X&&(X.tagName==="UL"||X.tagName==="OL")&&(E=X.outerHTML+E,X.remove()),fe&&(fe.tagName==="UL"||fe.tagName==="OL")&&(E=E+fe.outerHTML,fe.remove()),E=E.replace("<div><wbr><br></div>","<li><p><wbr><br></p></li>")}d.innerText.startsWith("```")||(i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}),i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(Te){Te&&!d.isEqualNode(Te)&&(E+=Te.outerHTML,Te.remove())}))}if(E=E.replace(/<\/(strong|b)><strong data-marker="\W{2}">/g,"").replace(/<\/(em|i)><em data-marker="\W{1}">/g,"").replace(/<\/(s|strike)><s data-marker="~{1,2}">/g,""),E==='<p data-block="0">```<wbr></p>'&&i.hint.recentLanguage&&(E='<p data-block="0">```<wbr></p>'.replace("```","```"+i.hint.recentLanguage)),z("SpinVditorDOM",E,"argument",i.options.debugger),E=i.lute.SpinVditorDOM(E),z("SpinVditorDOM",E,"result",i.options.debugger),L)d.innerHTML=E;else if(d.outerHTML=E,D){var be=(0,y.E2)(i.wysiwyg.element.querySelector("wbr"),"LI");if(be){var ce=i.wysiwyg.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(be.getAttribute("data-marker"),'"]'));ce&&ce.setAttribute("aria-label",be.textContent.trim().substr(0,24))}}var ke,xe=i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']");xe.forEach(function(Te,$e){$e===0?ke=Te:(ke.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),xe.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",xe[0]);var ue,ze=i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']");ze.forEach(function(Te,$e){$e===0?ue=Te:(ue.insertAdjacentHTML("beforeend",Te.innerHTML),Te.remove())}),ze.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",ze[0]),(0,j.ib)(i.wysiwyg.element,a),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(Te){Qe(Te,i)}),s&&(s.inputType==="deleteContentBackward"||s.inputType==="deleteContentForward")&&i.options.comment.enable&&(i.wysiwyg.triggerRemoveComment(i),i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)))}Ht(i),Oe(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},Ba=function(i,a){return Object.defineProperty?Object.defineProperty(i,"raw",{value:a}):i.raw=a,i},go=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(X){E(X)}}function D(B){try{_(u.throw(B))}catch(X){E(X)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},hr=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},vo=function(i,a,s){if(i.keyCode===229&&i.code===""&&i.key==="Unidentified"&&a.currentMode!=="sv"){var u=(0,y.F9)(s);if(u&&u.textContent.trim()==="")return a[a.currentMode].composingLock=!0,!1}return!0},Fa=function(i,a,s){if(!(s.key==="Enter"||s.key==="Tab"||s.key==="Backspace"||s.key.indexOf("Arrow")>-1||(0,m.yl)(s)||s.key==="Escape"||s.shiftKey||s.altKey)){var u=(0,y.lG)(i.startContainer,"P")||(0,y.lG)(i.startContainer,"LI");if(u&&(0,j.im)(u,a[a.currentMode].element,i).start===0){u.nodeValue&&(u.nodeValue=u.nodeValue.replace(/\u2006/g,""));var d=document.createTextNode(c.g.ZWSP);i.insertNode(d),i.setStartAfter(d)}}},Ms=function(i,a){if(a==="ArrowDown"||a==="ArrowUp"){var s=(0,y.a1)(i.startContainer,"data-type","math-inline")||(0,y.a1)(i.startContainer,"data-type","html-entity")||(0,y.a1)(i.startContainer,"data-type","html-inline");s&&(a==="ArrowDown"&&i.setStartAfter(s.parentElement),a==="ArrowUp"&&i.setStartBefore(s.parentElement))}},gi=function(i,a){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer);u&&(u.insertAdjacentHTML(a,'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
|
||
</p>`)),(0,j.ib)(i[i.currentMode].element,s),ur(i),st(i))},fu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.rows[0].cells[0].isSameNode(i)?a:!1},mu=function(i){var a=(0,y.lG)(i,"TABLE");return a&&a.lastElementChild.lastElementChild.lastElementChild.isSameNode(i)?a:!1},Cs=function(i,a,s){s===void 0&&(s=!0);var u=i.previousElementSibling;return u||(i.parentElement.previousElementSibling?u=i.parentElement.previousElementSibling.lastElementChild:i.parentElement.parentElement.tagName==="TBODY"&&i.parentElement.parentElement.previousElementSibling?u=i.parentElement.parentElement.previousElementSibling.lastElementChild.lastElementChild:u=null),u&&(a.selectNodeContents(u),s||a.collapse(!1),(0,j.Hc)(a)),u},vi=function(i,a,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowDown"&&u.textContent.trimRight().substr(f.start).indexOf(`
|
||
`)===-1||a.key==="ArrowRight"&&f.start>=u.textContent.trimRight().length){var E=d.nextElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!0),(0,j.Hc)(s)),a.preventDefault(),!0}return!1},Fr=function(i,a,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(a.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf(`
|
||
`)===-1||(a.key==="ArrowLeft"||a.key==="Backspace"&&s.toString()==="")&&f.start===0){var E=d.previousElementSibling;return!E||E&&(E.tagName==="TABLE"||E.getAttribute("data-type"))?(d.insertAdjacentHTML("beforebegin",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(i[i.currentMode].element,s)):(s.selectNodeContents(E),s.collapse(!1),(0,j.Hc)(s)),a.preventDefault(),!0}return!1},ta=function(i,a,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(a.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(B){B.remove()}),a.insertNode(document.createElement("wbr")),u&&d){for(var f="",E=0;E<d.parentElement.childElementCount;E++){var L=d.parentElement.children[E].querySelector("input");L&&L.remove(),f+='<p data-block="0">'.concat(d.parentElement.children[E].innerHTML.trimLeft(),"</p>")}d.parentElement.insertAdjacentHTML("beforebegin",f),d.parentElement.remove()}else if(d)if(s==="check")d.parentElement.querySelectorAll("li").forEach(function(B){B.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(B.textContent.indexOf(" ")===0?"":" ")),B.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(B){B.querySelector("input").remove(),B.classList.remove("vditor-task")});var D=void 0;s==="list"?(D=document.createElement("ul"),D.setAttribute("data-marker","*")):(D=document.createElement("ol"),D.setAttribute("data-marker","1.")),D.setAttribute("data-block","0"),D.setAttribute("data-tight",d.parentElement.getAttribute("data-tight")),D.innerHTML=d.parentElement.innerHTML,d.parentElement.parentNode.replaceChild(D,d.parentElement)}else{var _=(0,y.a1)(a.startContainer,"data-block","0");_||(i[i.currentMode].element.querySelector("wbr").remove(),_=i[i.currentMode].element.querySelector("p"),_.innerHTML="<wbr>"),s==="check"?(_.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li class="vditor-task"><input type="checkbox" /> '.concat(_.innerHTML,"</li></ul>")),_.remove()):s==="list"?(_.insertAdjacentHTML("beforebegin",'<ul data-block="0"><li>'.concat(_.innerHTML,"</li></ul>")),_.remove()):s==="ordered-list"&&(_.insertAdjacentHTML("beforebegin",'<ol data-block="0"><li>'.concat(_.innerHTML,"</li></ol>")),_.remove())}},Ls=function(i,a,s){var u=a.previousElementSibling;if(a&&u){var d=[a];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&a&&D.textContent.trim()!==""&&a.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(a),a=a.nextElementSibling)}),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(D){D.remove()}),s.insertNode(document.createElement("wbr"));var f=u.parentElement,E="";d.forEach(function(D){var _=D.getAttribute("data-marker");_.length!==1&&(_="1".concat(_.slice(-1))),E+='<li data-node-id="'.concat(D.getAttribute("data-node-id"),'" data-marker="').concat(_,'">').concat(D.innerHTML,"</li>"),D.remove()}),u.insertAdjacentHTML("beforeend","<".concat(f.tagName,' data-block="0">').concat(E,"</").concat(f.tagName,">")),i.currentMode==="wysiwyg"?f.outerHTML=i.lute.SpinVditorDOM(f.outerHTML):f.outerHTML=i.lute.SpinVditorIRDOM(f.outerHTML),(0,j.ib)(i[i.currentMode].element,s);var L=(0,y.O9)(s.startContainer);L&&L.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(D){Qe(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),st(i),ur(i)}else i[i.currentMode].element.focus()},bo=function(i,a,s,u){var d=(0,y.lG)(a.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(X){X.remove()}),s.insertNode(document.createElement("wbr"));var f=a.parentElement,E=f.cloneNode(),L=[a];Array.from(s.cloneContents().children).forEach(function(X,fe){X.nodeType!==3&&a&&X.textContent.trim()!==""&&a.getAttribute("data-node-id")===X.getAttribute("data-node-id")&&(fe!==0&&L.push(a),a=a.nextElementSibling)});var D=!1,_="";f.querySelectorAll("li").forEach(function(X){D&&(_+=X.outerHTML,!X.nextElementSibling&&!X.previousElementSibling?X.parentElement.remove():X.remove()),X.isSameNode(L[L.length-1])&&(D=!0)}),L.reverse().forEach(function(X){d.insertAdjacentElement("afterend",X)}),_&&(E.innerHTML=_,L[0].insertAdjacentElement("beforeend",E)),i.currentMode==="wysiwyg"?u.outerHTML=i.lute.SpinVditorDOM(u.outerHTML):u.outerHTML=i.lute.SpinVditorIRDOM(u.outerHTML),(0,j.ib)(i[i.currentMode].element,s);var B=(0,y.O9)(s.startContainer);B&&B.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(X){Qe(X,i),i.currentMode==="wysiwyg"&&X.previousElementSibling.setAttribute("style","display:none")}),st(i),ur(i)}else i[i.currentMode].element.focus()},na=function(i,a){for(var s=getSelection().getRangeAt(0).startContainer.parentElement,u=i.rows[0].cells.length,d=i.rows.length,f=0,E=0;E<d;E++)for(var L=0;L<u;L++)if(i.rows[E].cells[L].isSameNode(s)){f=L;break}for(var D=0;D<d;D++)i.rows[D].cells[f].setAttribute("align",a)},yo=function(i){var a=i.trimRight().split(`
|
||
`).pop();return a===""?!1:(a.replace(/ |-/g,"")===""||a.replace(/ |_/g,"")===""||a.replace(/ |\*/g,"")==="")&&a.replace(/ /g,"").length>2?!(a.indexOf("-")>-1&&a.trimLeft().indexOf(" ")===-1&&i.trimRight().split(`
|
||
`).length>1||a.indexOf(" ")===0||a.indexOf(" ")===0):!1},wo=function(i){var a=i.trimRight().split(`
|
||
`);return i=a.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||a.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},st=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?Oe(i,a):i.currentMode==="ir"?Zn(i,a):i.currentMode==="sv"&&Pe(i,a)},_s=function(i,a,s,u){var d,f=i.startContainer,E=(0,y.lG)(f,"LI");if(E){if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Enter"&&!u.shiftKey&&s&&E.contains(s)&&s.nextElementSibling)return E&&!E.textContent.endsWith(`
|
||
`)&&E.insertAdjacentText("beforeend",`
|
||
`),i.insertNode(document.createTextNode(`
|
||
|
||
`)),i.collapse(!1),st(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,j.im)(E,a[a.currentMode].element,i).start===0)return E.nextElementSibling?(E.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>")),E.remove()):E.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(E.innerHTML,"</p>"),(0,j.ib)(a[a.currentMode].element,i),st(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&E.textContent.trim().replace(c.g.ZWSP,"")===""&&i.toString()===""&&((d=E.previousElementSibling)===null||d===void 0?void 0:d.tagName)==="LI")return E.previousElementSibling.insertAdjacentText("beforeend",`
|
||
|
||
`),i.selectNodeContents(E.previousElementSibling),i.collapse(!1),E.remove(),(0,j.ib)(a[a.currentMode].element,i),st(a),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.altKey&&u.key==="Tab"){var L=!1;if((i.startOffset===0&&(f.nodeType===3&&!f.previousSibling||f.nodeType!==3&&f.nodeName==="LI")||E.classList.contains("vditor-task")&&i.startOffset===1&&f.previousSibling.nodeType!==3&&f.previousSibling.tagName==="INPUT")&&(L=!0),L||i.toString()!=="")return u.shiftKey?bo(a,E,i,E.parentElement):Ls(a,E,i),u.preventDefault(),!0}}return!1},xo=function(i,a,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(a.toString()===""?(a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1)):(a.extractContents(),a.insertNode(document.createTextNode(i.options.tab)),a.collapse(!1))),(0,j.Hc)(a),st(i),s.preventDefault(),!0},Ns=function(i,a,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw($s||($s=Ba(["",""],["",""])),s.textContent).replace(/\\\|/g,"").trim(),f=d.split("|");if(d.startsWith("|")&&d.endsWith("|")&&f.length>3){var E=f.map(function(){return"---"}).join("|");return E=s.textContent+`
|
||
`+E.substring(3,E.length-3)+`
|
||
|<wbr>`,s.outerHTML=a.lute.SpinVditorDOM(E),(0,j.ib)(a[a.currentMode].element,u),st(a),K(a),i.preventDefault(),!0}if(yo(s.innerHTML)&&s.previousElementSibling){var L="",D=s.innerHTML.trimRight().split(`
|
||
`);return D.length>1&&(D.pop(),L='<p data-block="0">'.concat(D.join(`
|
||
`),"</p>")),s.insertAdjacentHTML("afterend","".concat(L,`<hr data-block="0"><p data-block="0"><wbr>
|
||
</p>`)),s.remove(),(0,j.ib)(a[a.currentMode].element,u),st(a),K(a),i.preventDefault(),!0}if(wo(s.innerHTML))return a.currentMode==="wysiwyg"?s.outerHTML=a.lute.SpinVditorDOM(s.innerHTML+`<p data-block="0"><wbr>
|
||
</p>`):s.outerHTML=a.lute.SpinVditorIRDOM(s.innerHTML+`<p data-block="0"><wbr>
|
||
</p>`),(0,j.ib)(a[a.currentMode].element,u),st(a),K(a),i.preventDefault(),!0}if(u.collapsed&&s.previousElementSibling&&i.key==="Backspace"&&!(0,m.yl)(i)&&!i.altKey&&!i.shiftKey&&s.textContent.trimRight().split(`
|
||
`).length>1&&(0,j.im)(s,a[a.currentMode].element,u).start===0){var _=(0,y.DX)(s.previousElementSibling);return _.textContent.endsWith(`
|
||
`)||(_.textContent=_.textContent+`
|
||
`),_.parentElement.insertAdjacentHTML("beforeend","<wbr>".concat(s.innerHTML)),s.remove(),(0,j.ib)(a[a.currentMode].element,u),!1}return!1}},Ds=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');s.tagName==="TH"?s.parentElement.parentElement.insertAdjacentHTML("afterend","<tbody><tr>".concat(u,"</tr></tbody>")):s.parentElement.insertAdjacentHTML("afterend","<tr>".concat(u,"</tr>")),st(i)},Rs=function(i,a,s){for(var u="",d=0;d<s.parentElement.childElementCount;d++)s.tagName==="TH"?u+='<th align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </th>'):u+='<td align="'.concat(s.parentElement.children[d].getAttribute("align"),'"> </td>');if(s.tagName==="TH"){s.parentElement.parentElement.insertAdjacentHTML("beforebegin","<thead><tr>".concat(u,"</tr></thead>")),a.insertNode(document.createElement("wbr"));var f=s.parentElement.innerHTML.replace(/<th>/g,"<td>").replace(/<\/th>/g,"</td>");s.parentElement.parentElement.nextElementSibling.insertAdjacentHTML("afterbegin",f),s.parentElement.parentElement.remove(),(0,j.ib)(i.ir.element,a)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));st(i)},ra=function(i,a,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<a.rows.length;E++)E===0?a.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):a.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");st(i)},Is=function(i,a,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?a.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):a.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),a.collapse(!1),(0,j.Hc)(a),st(i)}},Os=function(i,a,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(a.selectNodeContents(u.previousElementSibling||u.nextElementSibling),a.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),ur(i);break}L[d].remove()}(0,j.Hc)(a),st(i)},Hs=function(i,a,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"){(!d.lastElementChild||d.lastElementChild&&(!d.lastElementChild.isSameNode(d.lastChild)||d.lastElementChild.tagName!=="BR"))&&d.insertAdjacentHTML("beforeend","<br>");var f=document.createElement("br");return s.insertNode(f),s.setStartAfter(f),st(i),K(i),a.preventDefault(),!0}if(a.key==="Tab"){if(a.shiftKey)return Cs(d,s),a.preventDefault(),!0;var E=d.nextElementSibling;return E||(d.parentElement.nextElementSibling?E=d.parentElement.nextElementSibling.firstElementChild:d.parentElement.parentElement.tagName==="THEAD"&&d.parentElement.parentElement.nextElementSibling?E=d.parentElement.parentElement.nextElementSibling.firstElementChild.firstElementChild:E=null),E&&(s.selectNodeContents(E),(0,j.Hc)(s)),a.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(a.key==="ArrowUp"){if(a.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,j.Hc)(s)):gi(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var B=_.previousElementSibling;return B||(B=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(B.cells[D]),s.collapse(!1),(0,j.Hc)(s),!0}if(a.key==="ArrowDown"){a.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,j.Hc)(s)):gi(i,"afterend"),!0;for(var D=0;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var E=_.nextElementSibling;return E||(E=_.parentElement.nextElementSibling.firstChild),s.selectNodeContents(E.cells[D]),s.collapse(!0),(0,j.Hc)(s),!0}if(i.currentMode==="wysiwyg"&&!(0,m.yl)(a)&&a.key==="Enter"&&!a.shiftKey&&a.altKey){var X=i.wysiwyg.popover.querySelector(".vditor-input");return X.focus(),X.select(),a.preventDefault(),!0}if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Backspace"&&s.startOffset===0&&s.toString()===""){var fe=Cs(d,s,!1);return!fe&&L&&(L.textContent.trim()===""?(L.outerHTML=`<p data-block="0"><wbr>
|
||
</p>`,(0,j.ib)(i[i.currentMode].element,s)):(s.setStartBefore(L),s.collapse(!0)),st(i)),a.preventDefault(),!0}if(oe("⇧⌘F",a))return Rs(i,s,d),a.preventDefault(),!0;if(oe("⌘=",a))return Ds(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘G",a))return ra(i,L,d,"beforebegin"),a.preventDefault(),!0;if(oe("⇧⌘=",a))return ra(i,L,d),a.preventDefault(),!0;if(oe("⌘-",a))return Is(i,s,d),a.preventDefault(),!0;if(oe("⇧⌘-",a))return Os(i,s,L,d),a.preventDefault(),!0;if(oe("⇧⌘L",a)){if(i.currentMode==="ir")return na(L,"left"),st(i),a.preventDefault(),!0;var be=i.wysiwyg.popover.querySelector('[data-type="left"]');if(be)return be.click(),a.preventDefault(),!0}if(oe("⇧⌘C",a)){if(i.currentMode==="ir")return na(L,"center"),st(i),a.preventDefault(),!0;var be=i.wysiwyg.popover.querySelector('[data-type="center"]');if(be)return be.click(),a.preventDefault(),!0}if(oe("⇧⌘R",a)){if(i.currentMode==="ir")return na(L,"right"),st(i),a.preventDefault(),!0;var be=i.wysiwyg.popover.querySelector('[data-type="right"]');if(be)return be.click(),a.preventDefault(),!0}}return!1},Ps=function(i,a,s,u){if(s.tagName==="PRE"&&oe("⌘A",a))return u.selectNodeContents(s.firstElementChild),a.preventDefault(),!0;if(i.options.tab&&a.key==="Tab"&&!a.shiftKey&&u.toString()==="")return u.insertNode(document.createTextNode(i.options.tab)),u.collapse(!1),st(i),a.preventDefault(),!0;if(a.key==="Backspace"&&!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey){var d=(0,j.im)(s,i[i.currentMode].element,u);if((d.start===0||d.start===1&&s.innerText===`
|
||
`)&&u.toString()==="")return s.parentElement.outerHTML='<p data-block="0"><wbr>'.concat(s.firstElementChild.innerHTML,"</p>"),(0,j.ib)(i[i.currentMode].element,u),st(i),a.preventDefault(),!0}return!(0,m.yl)(a)&&!a.altKey&&a.key==="Enter"?(s.firstElementChild.textContent.endsWith(`
|
||
`)||s.firstElementChild.insertAdjacentText("beforeend",`
|
||
`),u.extractContents(),u.insertNode(document.createTextNode(`
|
||
`)),u.collapse(!1),(0,j.Hc)(u),(0,m.vU)()||(i.currentMode==="wysiwyg"?_r(i,u):Nt(i,u)),K(i),a.preventDefault(),!0):!1},zs=function(i,a,s,u){var d=a.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&a.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,j.im)(f,i[i.currentMode].element,a).start===0)return a.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0;if(u&&s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&u.parentElement.tagName==="BLOCKQUOTE"){var E=!1;if(u.innerHTML.replace(c.g.ZWSP,"")===`
|
||
`||u.innerHTML.replace(c.g.ZWSP,"")===""?(E=!0,u.remove()):u.innerHTML.endsWith(`
|
||
|
||
`)&&(0,j.im)(u,i[i.currentMode].element,a).start===u.textContent.length-1&&(u.innerHTML=u.innerHTML.substr(0,u.innerHTML.length-2),E=!0),E)return f.insertAdjacentHTML("afterend",'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
|
||
</p>`)),(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0}var L=(0,y.F9)(d);if(i.currentMode==="wysiwyg"&&L&&oe("⇧⌘;",s))return a.insertNode(document.createElement("wbr")),L.outerHTML='<blockquote data-block="0">'.concat(L.outerHTML,"</blockquote>"),(0,j.ib)(i.wysiwyg.element,a),Oe(i),s.preventDefault(),!0;if(vi(i,s,a,f,f)||Fr(i,s,a,f,f))return!0}return!1},Bs=function(i,a,s){var u=a.startContainer,d=(0,y.lG)(u,"LI");if(d&&d.classList.contains("vditor-task")){if(oe("⇧⌘J",s)){var f=d.firstElementChild;return f.checked?f.removeAttribute("checked"):f.setAttribute("checked","checked"),st(i),s.preventDefault(),!0}if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&a.toString()===""&&a.startOffset===1&&(u.nodeType===3&&u.previousSibling&&u.previousSibling.tagName==="INPUT"||u.nodeType!==3)){var E=d.previousElementSibling;if(d.querySelector("input").remove(),E){var L=(0,y.DX)(E);L.parentElement.insertAdjacentHTML("beforeend","<wbr>"+d.innerHTML.trim()),d.remove()}else d.parentElement.insertAdjacentHTML("beforebegin",'<p data-block="0"><wbr>'.concat(d.innerHTML.trim()||`
|
||
`,"</p>")),d.nextElementSibling?d.remove():d.parentElement.remove();return(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0}if(s.key==="Enter"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey){if(d.textContent.trim()==="")if((0,y.fb)(d.parentElement,"vditor-task")){var D=(0,y.O9)(u);D&&bo(i,d,a,D)}else if(d.nextElementSibling){var _="",B="",X=!1;Array.from(d.parentElement.children).forEach(function(ke){d.isSameNode(ke)?X=!0:X?_+=ke.outerHTML:B+=ke.outerHTML});var fe=d.parentElement.tagName,be=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),ce="";B&&(ce=d.parentElement.tagName==="UL"?"":' start="1"',B="<".concat(fe,' data-tight="true"').concat(be,' data-block="0">').concat(B,"</").concat(fe,">")),d.parentElement.outerHTML="".concat(B,`<p data-block="0"><wbr>
|
||
</p><`).concat(fe,`
|
||
data-tight="true"`).concat(be,' data-block="0"').concat(ce,">").concat(_,"</").concat(fe,">")}else d.parentElement.insertAdjacentHTML("afterend",`<p data-block="0"><wbr>
|
||
</p>`),d.parentElement.querySelectorAll("li").length===1?d.parentElement.remove():d.remove();else u.nodeType!==3&&a.startOffset===0&&u.firstChild.tagName==="INPUT"?a.setStart(u.childNodes[1],1):(a.setEndAfter(d.lastChild),d.insertAdjacentHTML("afterend",'<li class="vditor-task" data-marker="'.concat(d.getAttribute("data-marker"),'"><input type="checkbox"> <wbr></li>')),document.querySelector("wbr").after(a.extractContents()));return(0,j.ib)(i[i.currentMode].element,a),st(i),K(i),s.preventDefault(),!0}}return!1},Fs=function(i,a,s,u){if(a.startContainer.nodeType!==3){var d=a.startContainer.children[a.startOffset];if(d&&d.tagName==="HR")return a.selectNodeContents(d.previousElementSibling),a.collapse(!1),s.preventDefault(),!0}if(u){var f=u.previousElementSibling;if(f&&(0,j.im)(u,i[i.currentMode].element,a).start===0&&((0,m.vU)()&&f.tagName==="HR"||f.tagName==="TABLE")){if(f.tagName==="TABLE"){var E=f.lastElementChild.lastElementChild.lastElementChild;E.innerHTML=E.innerHTML.trimLeft()+"<wbr>"+u.textContent.trim(),u.remove()}else f.remove();return(0,j.ib)(i[i.currentMode].element,a),st(i),s.preventDefault(),!0}}return!1},qs=function(i){(0,m.vU)()&&i.startContainer.nodeType!==3&&i.startContainer.tagName==="HR"&&i.setStartBefore(i.startContainer)},js=function(i,a,s){var u,d;if(!(0,m.vU)())return!1;if(i.key==="ArrowUp"&&a&&((u=a.previousElementSibling)===null||u===void 0?void 0:u.tagName)==="TABLE"){var f=a.previousElementSibling;return s.selectNodeContents(f.rows[f.rows.length-1].lastElementChild),s.collapse(!1),i.preventDefault(),!0}return i.key==="ArrowDown"&&a&&((d=a.nextElementSibling)===null||d===void 0?void 0:d.tagName)==="TABLE"?(s.selectNodeContents(a.nextElementSibling.rows[0].cells[0]),s.collapse(!0),i.preventDefault(),!0):!1},ia=function(i,a,s){return go(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,X,fe,be,ce,ke,ue,xe,ue,ze;return hr(this,function(Te){switch(Te.label){case 0:return i[i.currentMode].element.getAttribute("contenteditable")!=="true"?[2]:(a.stopPropagation(),a.preventDefault(),"clipboardData"in a?(u=a.clipboardData.getData("text/html"),d=a.clipboardData.getData("text/plain"),f=a.clipboardData.files):(u=a.dataTransfer.getData("text/html"),d=a.dataTransfer.getData("text/plain"),a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items)),E={},L=function($e,bt){if(!bt)return["",Lute.WalkContinue];if(i.options.upload.renderLinkDest)return i.options.upload.renderLinkDest(i,$e,bt);var gt=$e.TokensStr();if($e.__internal_object__.Parent.Type===34&>&>.indexOf("file://")===-1&&i.options.upload.linkToImgUrl){var kt=new XMLHttpRequest;kt.open("POST",i.options.upload.linkToImgUrl),i.options.upload.token&&kt.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(kt.withCredentials=!0),en(i,kt),kt.setRequestHeader("Content-Type","application/json; charset=utf-8"),kt.onreadystatechange=function(){if(kt.readyState===XMLHttpRequest.DONE){if(kt.status===200){var hn=kt.responseText;i.options.upload.linkToImgFormat&&(hn=i.options.upload.linkToImgFormat(kt.responseText));var Kt=JSON.parse(hn);if(Kt.code!==0){i.tip.show(Kt.msg);return}var pn=Kt.data.originalURL;if(i.currentMode==="sv")i.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(Bt){Bt.textContent===pn&&(Bt.textContent=Kt.data.url)});else{var rt=i[i.currentMode].element.querySelector('img[src="'.concat(pn,'"]'));rt.src=Kt.data.url,i.currentMode==="ir"&&(rt.previousElementSibling.previousElementSibling.innerHTML=Kt.data.url)}st(i)}else i.tip.show(kt.responseText);i.options.upload.linkToImgCallback&&i.options.upload.linkToImgCallback(kt.responseText)}},kt.send(JSON.stringify({url:gt}))}return i.currentMode==="ir"?['<span class="vditor-ir__marker vditor-ir__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]:i.currentMode==="wysiwyg"?["",Lute.WalkContinue]:['<span class="vditor-sv__marker--link">'.concat(Lute.EscapeHTMLStr(gt),"</span>"),Lute.WalkContinue]},(u.replace(/&/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<a href="'.concat(d,'">').concat(d,"</a>")||u.replace(/&/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<!--StartFragment--><a href="'.concat(d,'">').concat(d,"</a><!--EndFragment-->"))&&(u=""),D=new DOMParser().parseFromString(u,"text/html"),D.body&&(u=D.body.innerHTML),u=Lute.Sanitize(u),i.wysiwyg.getComments(i),_=i[i.currentMode].element.scrollHeight,B=lt(u,d,i.currentMode),X=i.currentMode==="sv"?(0,y.a1)(a.target,"data-type","code-block"):(0,y.lG)(a.target,"CODE"),X?(i.currentMode==="sv"?document.execCommand("insertHTML",!1,d.replace(/&/g,"&").replace(/</g,"<")):(fe=(0,j.im)(a.target,i[i.currentMode].element),X.parentElement.tagName!=="PRE"&&(d+=c.g.ZWSP),X.textContent=X.textContent.substring(0,fe.start)+d+X.textContent.substring(fe.end),(0,j.$j)(fe.start+d.length,fe.start+d.length,X.parentElement),!((ze=X.parentElement)===null||ze===void 0)&&ze.nextElementSibling.classList.contains("vditor-".concat(i.currentMode,"__preview"))&&(X.parentElement.nextElementSibling.innerHTML=X.outerHTML,Qe(X.parentElement.nextElementSibling,i))),[3,10]):[3,1]);case 1:return B?(s.pasteCode(B),[3,10]):[3,2];case 2:return u.trim()===""?[3,5]:(be=document.createElement("div"),be.innerHTML=u,i.options.upload.base64ToLink?[3,4]:[4,gu(i,be,("clipboardData"in a?a.clipboardData:a.dataTransfer).getData("text/rtf"))]);case 3:Te.sent(),Te.label=4;case 4:return be.querySelectorAll("[style]").forEach(function($e){$e.removeAttribute("style")}),be.querySelectorAll(".vditor-copy").forEach(function($e){$e.remove()}),i.currentMode==="ir"?(E.HTML2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorIRDOM(be.innerHTML),i)):i.currentMode==="wysiwyg"?(E.HTML2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorDOM(be.innerHTML),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Me(i,i.lute.HTML2Md(be.innerHTML).trimRight())),i.outline.render(i),[3,10];case 5:return f.length>0?i.options.upload.url||i.options.upload.handler?[4,Br(i,f)]:[3,7]:[3,9];case 6:return Te.sent(),[3,8];case 7:ce=new FileReader,"clipboardData"in a?(f=a.clipboardData.files,ke=f[0]):a.dataTransfer.types.includes("Files")&&(f=a.dataTransfer.items,ke=f[0].getAsFile()),ke&&ke.type.startsWith("image")&&(ce.readAsDataURL(ke),ce.onload=function(){var $e="";i.currentMode==="wysiwyg"?$e+='<img alt="'.concat(ke.name,'" src="').concat(ce.result.toString(),`">
|
||
`):$e+=".concat(ce.result.toString(),`)
|
||
`),document.execCommand("insertHTML",!1,$e)}),Te.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(ue=(0,j.zh)(i),ue.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(ue.toString(),"](").concat(d,")")),i.currentMode==="ir"?(E.Md2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(Lute.Sanitize(i.lute.Md2VditorIRDOM(d)),i)):i.currentMode==="wysiwyg"?(E.Md2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(Lute.Sanitize(i.lute.Md2VditorDOM(d)),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),Me(i,d)),i.outline.render(i)),Te.label=10;case 10:return i.currentMode!=="sv"&&(xe=(0,y.F9)((0,j.zh)(i).startContainer),xe&&(ue=(0,j.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function($e){$e.remove()}),ue.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?xe.outerHTML=i.lute.SpinVditorDOM(xe.outerHTML):xe.outerHTML=i.lute.SpinVditorIRDOM(xe.outerHTML),(0,j.ib)(i[i.currentMode].element,ue)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function($e){Qe($e,i)})),i.wysiwyg.triggerRemoveComment(i),st(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&K(i),[2]}})})},gu=function(i,a,s){return go(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,B,X,ke,fe,be,ce,ke,xe,ue;return hr(this,function(ze){switch(ze.label){case 0:if(!s)return[2];if(u=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,d=new RegExp("(?:("+u.source+"))([\\da-fA-F\\s]+)\\}","g"),f=s.match(d),E=[],f)for(L=0,D=f;L<D.length;L++)_=D[L],B=void 0,_.includes("\\pngblip")?B="image/png":_.includes("\\jpegblip")&&(B="image/jpeg"),B&&E.push({hex:_.replace(u,"").replace(/[^\da-fA-F]/g,""),type:B});for(X=[],ko(a,function(Te){if(Te.tagName==="V:SHAPE")return ko(Te,function($e){$e.tagName==="V:IMAGEDATA"&&X.push({shape:Te,img:$e})}),!1}),ke=0;ke<X.length;ke++)fe=document.createElement("img"),be="data:"+E[ke].type+";base64,"+btoa((E[ke].hex.match(/\w{2}/g)||[]).map(function(Te){return String.fromCharCode(parseInt(Te,16))}).join("")),fe.src=be,fe.title=X[ke].img.getAttribute("title"),X[ke].shape.parentNode.replaceChild(fe,X[ke].shape);ce=a.querySelectorAll("img"),ke=0,ze.label=1;case 1:return ke<ce.length?(xe=ce[ke].src||"",xe?(ue=ce[ke],[4,i.options.upload.base64ToLink(xe)]):[3,3]):[3,4];case 2:ue.src=ze.sent(),ze.label=3;case 3:return ke++,[3,1];case 4:return[2]}})})},ko=function(i,a){var s=a(i);if(s!==!1)for(var u=0;u<i.children.length;u++)ko(i.children[u],a)},$s,Us=function(i){var a,s;i.hint.render(i);var u=(0,j.zh)(i).startContainer,d=(0,y.a1)(u,"data-type","code-block-info");if(d)if(d.textContent.replace(c.g.ZWSP,"")===""&&i.hint.recentLanguage){d.textContent=c.g.ZWSP+i.hint.recentLanguage;var f=(0,j.zh)(i);f.selectNodeContents(d)}else{var E=[],L=d.textContent.substring(0,(0,j.im)(d,i.ir.element).start).replace(c.g.ZWSP,"");(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((s=(a=window.hljs)===null||a===void 0?void 0:a.listLanguages())!==null&&s!==void 0?s:[]).sort())).forEach(function(D){D.indexOf(L.toLowerCase())>-1&&E.push({html:D,value:D})}),i.hint.genHTML(E,L,i)}},Zn=function(i,a){a===void 0&&(a={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),a.enableHint&&Us(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&a.enableInput&&i.options.input(s),i.options.counter.enable&&i.counter.render(i,s),i.options.cache.enable&&(0,m.pK)()&&(localStorage.setItem(i.options.cache.id,s),i.options.cache.after&&i.options.cache.after(s)),i.devtools&&i.devtools.renderEchart(i),a.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},bi=function(i,a){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer)||s.startContainer;if(u){var d=u.querySelector(".vditor-ir__marker--heading");d?d.innerHTML=a:(u.insertAdjacentText("afterbegin",a),s.selectNodeContents(u),s.collapse(!1)),Nt(i,s.cloneRange()),Ue(i)}},aa=function(i,a,s){var u=(0,y.a1)(i.startContainer,"data-type",s);if(u){u.firstElementChild.remove(),u.lastElementChild.remove(),i.insertNode(document.createElement("wbr"));var d=document.createElement("div");d.innerHTML=a.lute.SpinVditorIRDOM(u.outerHTML),u.outerHTML=d.firstElementChild.innerHTML.trim()}},vu=function(i,a,s,u){var d=(0,j.zh)(i),f=a.getAttribute("data-type"),E=d.startContainer;E.nodeType===3&&(E=E.parentElement);var L=!0;if(a.classList.contains("vditor-menu--current"))if(f==="quote"){var D=(0,y.lG)(E,"BLOCKQUOTE");D&&(d.insertNode(document.createElement("wbr")),D.outerHTML=D.innerHTML.trim()===""?'<p data-block="0">'.concat(D.innerHTML,"</p>"):D.innerHTML)}else if(f==="link"){var _=(0,y.a1)(d.startContainer,"data-type","a");if(_){var B=(0,y.fb)(d.startContainer,"vditor-ir__link");B?(d.insertNode(document.createElement("wbr")),_.outerHTML=B.innerHTML):_.outerHTML=_.querySelector(".vditor-ir__link").innerHTML+"<wbr>"}}else f==="italic"?aa(d,i,"em"):f==="bold"?aa(d,i,"strong"):f==="strike"?aa(d,i,"s"):f==="inline-code"?aa(d,i,"code"):(f==="check"||f==="list"||f==="ordered-list")&&(ta(i,d,f),L=!1,a.classList.remove("vditor-menu--current"));else{i.ir.element.childNodes.length===0&&(i.ir.element.innerHTML='<p data-block="0"><wbr></p>',(0,j.ib)(i.ir.element,d));var X=(0,y.F9)(d.startContainer);if(f==="line"){if(X){var fe=`<hr data-block="0"><p data-block="0"><wbr>
|
||
</p>`;X.innerHTML.trim()===""?X.outerHTML=fe:X.insertAdjacentHTML("afterend",fe)}}else if(f==="quote")X&&(d.insertNode(document.createElement("wbr")),X.outerHTML='<blockquote data-block="0">'.concat(X.outerHTML,"</blockquote>"),L=!1,a.classList.add("vditor-menu--current"));else if(f==="link"){var be=void 0;d.toString()===""?be="".concat(s,"<wbr>").concat(u):be="".concat(s).concat(d.toString()).concat(u.replace(")","<wbr>)")),document.execCommand("insertHTML",!1,be),L=!1,a.classList.add("vditor-menu--current")}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"){var be=void 0;d.toString()===""?be="".concat(s,"<wbr>").concat(u):(f==="code"?be="".concat(s,`
|
||
`).concat(d.toString(),"<wbr>").concat(u):f==="table"?be="".concat(s).concat(d.toString(),"<wbr>").concat(u):be="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(be=`
|
||
`+be+`
|
||
|
||
`);var ce=document.createElement("span");ce.innerHTML=be,d.insertNode(ce),Nt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,j.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(ta(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),a.classList.add("vditor-menu--current"))}(0,j.ib)(i.ir.element,d),Zn(i),L&&Ue(i)},bu=function(i,a,s,u){function d(f){return f instanceof s?f:new s(function(E){E(f)})}return new(s||(s=Promise))(function(f,E){function L(B){try{_(u.next(B))}catch(X){E(X)}}function D(B){try{_(u.throw(B))}catch(X){E(X)}}function _(B){B.done?f(B.value):d(B.value).then(L,D)}_((u=u.apply(i,a||[])).next())})},yu=function(i,a){var s={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},u,d,f,E;return E={next:L(0),throw:L(1),return:L(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function L(_){return function(B){return D([_,B])}}function D(_){if(u)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(s=0)),s;)try{if(u=1,d&&(f=_[0]&2?d.return:_[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,_[1])).done)return f;switch(d=0,f&&(_=[_[0]&2,f.value]),_[0]){case 0:case 1:f=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,d=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(f=s.trys,!(f=f.length>0&&f[f.length-1])&&(_[0]===6||_[0]===2)){s=0;continue}if(_[0]===3&&(!f||_[1]>f[0]&&_[1]<f[3])){s.label=_[1];break}if(_[0]===6&&s.label<f[1]){s.label=f[1],f=_;break}if(f&&s.label<f[2]){s.label=f[2],s.ops.push(_);break}f[2]&&s.ops.pop(),s.trys.pop();continue}_=a.call(i,s)}catch(B){_=[6,B],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},wu=function(){function i(a){var s=this;this.splitChar="",this.lastIndex=-1,this.fillEmoji=function(u,d){s.element.style.display="none";var f=decodeURIComponent(u.getAttribute("data-value")),E=window.getSelection().getRangeAt(0);if(d.currentMode==="ir"){var L=(0,y.a1)(E.startContainer,"data-type","code-block-info");if(L){L.textContent=c.g.ZWSP+f.trimRight(),E.selectNodeContents(L),E.collapse(!1),Zn(d),L.parentElement.querySelectorAll("code").forEach(function(X){X.className="language-"+f.trimRight()}),Qe(L.parentElement.querySelector(".vditor-ir__preview"),d),s.recentLanguage=f.trimRight();return}}if(d.currentMode==="wysiwyg"&&E.startContainer.nodeType!==3){var D=E.startContainer,_=void 0;if(D.classList.contains("vditor-input")?_=D:_=D.firstElementChild,_&&_.classList.contains("vditor-input")){_.value=f.trimRight(),E.selectNodeContents(_),E.collapse(!1),_.dispatchEvent(new CustomEvent("input",{detail:1})),s.recentLanguage=f.trimRight();return}}if(E.setStart(E.startContainer,s.lastIndex),E.deleteContents(),d.options.hint.parse?d.currentMode==="sv"?(0,j.oC)(d.lute.SpinVditorSVDOM(f),d):d.currentMode==="wysiwyg"?(0,j.oC)(d.lute.SpinVditorDOM(f),d):(0,j.oC)(d.lute.SpinVditorIRDOM(f),d):(0,j.oC)(f,d),s.splitChar===":"&&f.indexOf(":")>-1&&d.currentMode!=="sv"&&E.insertNode(document.createTextNode(" ")),E.collapse(!1),(0,j.Hc)(E),d.currentMode==="wysiwyg"){var B=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");B&&B.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(B.lastElementChild.innerHTML=B.firstElementChild.innerHTML,Qe(B.lastElementChild,d))}else if(d.currentMode==="ir"){var B=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");B&&B.nextElementSibling.classList.contains("vditor-ir__preview")&&(B.nextElementSibling.innerHTML=B.innerHTML,Qe(B.nextElementSibling,d))}st(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",a.push({key:":"})}return i.prototype.render=function(a){var s=this;if(window.getSelection().focusNode){var u,d=getSelection().getRangeAt(0);u=d.startContainer.textContent.substring(0,d.startOffset)||"";var f=this.getKey(u,a.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?a.options.hint.emoji:a.lute.GetEmojis(),L=[];Object.keys(E).forEach(function(D){D.indexOf(f.toLowerCase())===0&&(E[D].indexOf(".")>-1?L.push({html:'<img src="'.concat(E[D],'" title=":').concat(D,':"/> :').concat(D,":"),value:":".concat(D,":")}):L.push({html:'<span class="vditor-hint__emoji">'.concat(E[D],"</span>").concat(D),value:E[D]}))}),this.genHTML(L,f,a)}else a.options.hint.extend.forEach(function(D){D.key===s.splitChar&&(clearTimeout(s.timeId),s.timeId=window.setTimeout(function(){return bu(s,void 0,void 0,function(){var _;return yu(this,function(B){switch(B.label){case 0:return _=this.genHTML,[4,D.hint(f)];case 1:return _.apply(this,[B.sent(),f,a]),[2]}})})},a.options.hint.delay))})}},i.prototype.genHTML=function(a,s,u){var d=this;if(a.length===0){this.element.style.display="none";return}var f=u[u.currentMode].element,E=(0,j.Ny)(f),L=E.left+(u.options.outline.position==="left"?u.outline.element.offsetWidth:0),D=E.top,_="";a.forEach(function(X,fe){if(!(fe>7)){var be=X.html;if(s!==""){var ce=be.lastIndexOf(">")+1,ke=be.substr(ce),xe=ke.toLowerCase().indexOf(s.toLowerCase());xe>-1&&(ke=ke.substring(0,xe)+"<b>"+ke.substring(xe,xe+s.length)+"</b>"+ke.substring(xe+s.length),be=be.substr(0,ce)+ke)}_+='<button type="button" data-value="'.concat(encodeURIComponent(X.value),` "
|
||
`).concat(fe===0?"class='vditor-hint--current'":"","> ").concat(be,"</button>")}}),this.element.innerHTML=_;var B=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(B||22),"px"),this.element.style.left="".concat(L,"px"),this.element.style.display="block",this.element.style.right="auto",this.element.querySelectorAll("button").forEach(function(X){X.addEventListener("click",function(fe){d.fillEmoji(X,u),fe.preventDefault()})}),this.element.getBoundingClientRect().bottom>window.innerHeight&&(this.element.style.top="".concat(D-this.element.offsetHeight,"px")),this.element.getBoundingClientRect().right>window.innerWidth&&(this.element.style.left="auto",this.element.style.right="0")},i.prototype.select=function(a,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(a.key==="ArrowDown")return a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(a.key==="ArrowUp"){if(a.preventDefault(),a.stopPropagation(),u.removeAttribute("class"),u.previousElementSibling)u.previousElementSibling.className="vditor-hint--current";else{var d=this.element.children.length;this.element.children[d-1].className="vditor-hint--current"}return!0}else if(!(0,m.yl)(a)&&!a.shiftKey&&!a.altKey&&a.key==="Enter"&&!a.isComposing)return a.preventDefault(),a.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(a,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var B=a.lastIndexOf(_.key);u.lastIndex<B&&(u.splitChar=_.key,u.lastIndex=B)});var d;if(this.lastIndex===-1)return d;var f=a.split(this.splitChar),E=f[f.length-1],L=32;if(f.length>1&&E.trim()===E)if(f.length===2&&f[0]===""&&f[1].length<L)d=f[1];else{var D=f[f.length-2].slice(-1);(0,p.X)(D)===" "&&E.length<L&&(d=E)}return d},i}(),xu=function(){function i(a){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
|
||
contenteditable="true" spellcheck="false"></pre>`),this.element=s.firstElementChild,this.bindEvent(a),Qi(a,this.element),za(a,this.element),ea(a,this.element),Q(a,this.element),ye(a,this.element),fi(a,this.element),Li(a,this.element,this.copy),q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=document.createElement("div");d.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorIRDOM2Md(d.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ia(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){A(a,["hint"])}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Nt(a,getSelection().getRangeAt(0).cloneRange()),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Zn(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}s.composingLock||u.data==="‘"||u.data==="“"||u.data==="《"||Nt(a,getSelection().getRangeAt(0).cloneRange(),!1,u)}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){u.target.checked?u.target.setAttribute("checked","checked"):u.target.removeAttribute("checked"),s.preventInput=!0,Zn(a);return}var d=(0,j.zh)(a),f=(0,y.fb)(u.target,"vditor-ir__preview");if(f||(f=(0,y.fb)(d.startContainer,"vditor-ir__preview")),f&&(f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!0),(0,j.Hc)(d),K(a)),u.target.tagName==="IMG"){var E=u.target.parentElement.querySelector(".vditor-ir__marker--link");E&&(d.selectNode(E),(0,j.Hc)(d))}var L=(0,y.a1)(u.target,"data-type","a");if(L&&!L.classList.contains("vditor-ir__node--expand")){a.options.link.click?a.options.link.click(L.querySelector(":scope > .vditor-ir__marker--link")):a.options.link.isOpen&&window.open(L.querySelector(":scope > .vditor-ir__marker--link").textContent);return}if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&d.collapsed){var D=s.element.lastElementChild.getBoundingClientRect();u.y>D.top+D.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(d.selectNodeContents(s.element.lastElementChild),d.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(s.element,d)))}d.toString()===""?ee(d,a):setTimeout(function(){ee((0,j.zh)(a),a)}),Rt(u,a),Ue(a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if(u.key==="Enter"&&K(a),Ue(a),(u.key==="Backspace"||u.key==="Delete")&&a.ir.element.innerHTML!==""&&a.ir.element.childNodes.length===1&&a.ir.element.firstElementChild&&a.ir.element.firstElementChild.tagName==="P"&&a.ir.element.firstElementChild.childElementCount===0&&(a.ir.element.textContent===""||a.ir.element.textContent===`
|
||
`)){a.ir.element.innerHTML="";return}var d=(0,j.zh)(a);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent===`
|
||
`&&d.startOffset===1&&(d.startContainer.textContent="",ee(d,a)),s.element.querySelectorAll(".language-math").forEach(function(E){var L=E.querySelector("br");L&&L.remove()})):u.key.indexOf("Arrow")>-1?((u.key==="ArrowLeft"||u.key==="ArrowRight")&&Us(a),ee(d,a)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&ee(d,a);var f=(0,y.fb)(d.startContainer,"vditor-ir__preview");if(f){if(u.key==="ArrowUp"||u.key==="ArrowLeft")return f.previousElementSibling.firstElementChild?d.selectNodeContents(f.previousElementSibling.firstElementChild):d.selectNodeContents(f.previousElementSibling),d.collapse(!1),u.preventDefault(),!0;if(f.tagName==="SPAN"&&(u.key==="ArrowDown"||u.key==="ArrowRight"))return f.parentElement.getAttribute("data-type")==="html-entity"?(f.parentElement.insertAdjacentText("afterend",c.g.ZWSP),d.setStart(f.parentElement.nextSibling,1)):d.selectNodeContents(f.parentElement.lastElementChild),d.collapse(!1),u.preventDefault(),!0}}})},i}(),Vs=function(i){if(i.currentMode==="sv")return i.lute.Md2HTML(v(i));if(i.currentMode==="wysiwyg")return i.lute.VditorDOM2HTML(i.wysiwyg.element.innerHTML);if(i.currentMode==="ir")return i.lute.VditorIRDOM2HTML(i.ir.element.innerHTML)},ku=o(214),Ws=o(436),Su=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(a,`</div>
|
||
<div class="vditor-outline__content"></div>`)}return i.prototype.render=function(a){var s="";return a.preview.element.style.display==="block"?s=(0,Ws.k)(a.preview.previewElement,this.element.lastElementChild,a):s=(0,Ws.k)(a[a.currentMode].element,this.element.lastElementChild,a),s},i.prototype.toggle=function(a,s,u){var d;s===void 0&&(s=!0),u===void 0&&(u=!0);var f=(d=a.toolbar.elements.outline)===null||d===void 0?void 0:d.firstElementChild;if(s&&window.innerWidth>=c.g.MOBILE_WIDTH?(this.element.style.display="block",this.render(a),f==null||f.classList.add("vditor-menu--current")):(this.element.style.display="none",f==null||f.classList.remove("vditor-menu--current")),u&&getSelection().rangeCount>0){var E=getSelection().getRangeAt(0);a[a.currentMode].element.contains(E.startContainer)&&(0,j.Hc)(E)}Fe(a)},i}(),Eu=o(280),Tu=function(){function i(a){var s=this;this.element=document.createElement("div"),this.element.className="vditor-preview",this.previewElement=document.createElement("div"),this.previewElement.className="vditor-reset",a.options.classes.preview&&this.previewElement.classList.add(a.options.classes.preview),this.previewElement.style.maxWidth=a.options.preview.maxWidth+"px",this.previewElement.addEventListener("copy",function(D){if(D.target.tagName!=="TEXTAREA"){var _=document.createElement("div");_.className="vditor-reset",_.appendChild(getSelection().getRangeAt(0).cloneContents()),s.copyToX(a,_,"default"),D.preventDefault()}}),this.previewElement.addEventListener("click",function(D){var _=(0,y.lG)(D.target,"SPAN");if(_&&(0,y.fb)(_,"vditor-toc")){var B=s.previewElement.querySelector("#"+_.getAttribute("data-target-id"));B&&(s.element.scrollTop=B.offsetTop);return}if(D.target.tagName==="A"){a.options.link.click?a.options.link.click(D.target):a.options.link.isOpen&&window.open(D.target.getAttribute("href")),D.preventDefault();return}D.target.tagName==="IMG"&&(a.options.image.preview?a.options.image.preview(D.target):a.options.image.isPreview&&(0,se.E)(D.target,a.options.lang,a.options.theme))}),this.element.appendChild(this.previewElement);var u=a.options.preview.actions;if(u.length!==0){var d=document.createElement("div");d.className="vditor-preview__action";for(var f=[],E=0;E<u.length;E++){var L=u[E];if(typeof L=="object"){f.push('<button type="button" data-type="'.concat(L.key,'" class="').concat(L.className,'"').concat(L.tooltip?' aria-label="'.concat(L.tooltip,'"'):"",'">').concat(L.text,"</button>"));continue}switch(L){case"desktop":f.push('<button type="button" class="vditor-preview__action--current" data-type="desktop">Desktop</button>');break;case"tablet":f.push('<button type="button" data-type="tablet">Tablet</button>');break;case"mobile":f.push('<button type="button" data-type="mobile">Mobile/Wechat</button>');break;case"mp-wechat":f.push('<button type="button" data-type="mp-wechat" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到公众号"><svg><use xlink:href="#vditor-icon-mp-wechat"></use></svg></button>');break;case"zhihu":f.push('<button type="button" data-type="zhihu" class="vditor-tooltipped vditor-tooltipped__w" aria-label="复制到知乎"><svg><use xlink:href="#vditor-icon-zhihu"></use></svg></button>');break}}d.innerHTML=f.join(""),d.addEventListener((0,m.Le)(),function(D){var _=(0,N.S)(D.target,"BUTTON");if(_){var B=_.getAttribute("data-type"),X=u.find(function(fe){return(fe==null?void 0:fe.key)===B});if(X){X.click(B);return}if(B==="mp-wechat"||B==="zhihu"){s.copyToX(a,s.previewElement.cloneNode(!0),B);return}B==="desktop"?s.previewElement.style.width="auto":B==="tablet"?s.previewElement.style.width="780px":s.previewElement.style.width="360px",s.previewElement.scrollWidth>s.previewElement.parentElement.clientWidth&&(s.previewElement.style.width="auto"),s.render(a),d.querySelectorAll("button").forEach(function(fe){fe.classList.remove("vditor-preview__action--current")}),_.classList.add("vditor-preview__action--current")}}),this.element.insertBefore(d,this.previewElement)}}return i.prototype.render=function(a,s){var u=this;if(clearTimeout(this.mdTimeoutId),this.element.style.display==="none"){this.element.getAttribute("data-type")==="renderPerformance"&&a.tip.hide();return}if(s){this.previewElement.innerHTML=s;return}if(v(a).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")===""){this.previewElement.innerHTML="";return}var d=new Date().getTime(),f=v(a);this.mdTimeoutId=window.setTimeout(function(){if(a.options.preview.url){var E=new XMLHttpRequest;E.open("POST",a.options.preview.url),E.setRequestHeader("Content-Type","application/json;charset=UTF-8"),E.onreadystatechange=function(){if(E.readyState===XMLHttpRequest.DONE)if(E.status===200){var D=JSON.parse(E.responseText);if(D.code!==0){a.tip.show(D.msg);return}a.options.preview.transform&&(D.data=a.options.preview.transform(D.data)),u.previewElement.innerHTML=D.data,u.afterRender(a,d)}else{var _=a.lute.Md2HTML(f);a.options.preview.transform&&(_=a.options.preview.transform(_)),u.previewElement.innerHTML=_,u.afterRender(a,d)}},E.send(JSON.stringify({markdownText:f}))}else{var L=a.lute.Md2HTML(f);a.options.preview.transform&&(L=a.options.preview.transform(L)),u.previewElement.innerHTML=L,u.afterRender(a,d)}},a.options.preview.delay)},i.prototype.afterRender=function(a,s){a.options.preview.parse&&a.options.preview.parse(this.element);var u=new Date().getTime()-s;new Date().getTime()-s>2600?(a.tip.show(window.VditorI18n.performanceTip.replace("${x}",u.toString())),a.preview.element.setAttribute("data-type","renderPerformance")):a.preview.element.getAttribute("data-type")==="renderPerformance"&&(a.tip.hide(),a.preview.element.removeAttribute("data-type"));var d=a.preview.element.querySelector(".vditor-comment--focus");d&&d.classList.remove("vditor-comment--focus"),(0,Y.O)(a.preview.previewElement,a.options.preview.hljs),(0,Ce.s)(a.options.preview.hljs,a.preview.previewElement,a.options.cdn),(0,Ge.i)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,nt.K)(a.preview.previewElement,a.options.cdn),(0,tt.J)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,te.P)(a.preview.previewElement,a.options.cdn),(0,de.v)(a.preview.previewElement,a.options.cdn),(0,P.p)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,je.P)(a.preview.previewElement,a.options.cdn,a.options.theme),(0,Ne.B)(a.preview.previewElement,a.options.cdn),(0,F.Q)(a.preview.previewElement,a.options.cdn),a.options.preview.render.media.enable&&(0,Eu.Y)(a.preview.previewElement),a.options.customRenders.forEach(function(L){L.render(a.preview.previewElement,a)});var f=a.preview.element,E=a.outline.render(a);E===""&&(E="[ToC]"),f.querySelectorAll('[data-type="toc-block"]').forEach(function(L){L.innerHTML=E,(0,qe.H)(L,{cdn:a.options.cdn,math:a.options.preview.math})}),(0,qe.H)(a.preview.previewElement,{cdn:a.options.cdn,math:a.options.preview.math})},i.prototype.copyToX=function(a,s,u){u===void 0&&(u="mp-wechat"),u!=="zhihu"?s.querySelectorAll(".katex-html .base").forEach(function(f){f.style.display="initial"}):s.querySelectorAll(".language-math").forEach(function(f){f.outerHTML='<img class="Formula-image" data-eeimg="true" src="//www.zhihu.com/equation?tex=" alt="'.concat(f.getAttribute("data-math"),'\\" style="display: block; margin: 0 auto; max-width: 100%;">')}),s.style.backgroundColor="#fff",s.querySelectorAll("code").forEach(function(f){f.style.backgroundImage="none"}),this.element.append(s);var d=s.ownerDocument.createRange();d.selectNode(s),(0,j.Hc)(d),document.execCommand("copy"),s.remove(),a.tip.show(["zhihu","mp-wechat"].includes(u)?"已复制,可到".concat(u==="zhihu"?"知乎":"微信公众号平台","进行粘贴"):"已复制到剪切板")},i}(),Au=function(){function i(a){this.element=document.createElement("div"),this.element.className="vditor-resize vditor-resize--".concat(a.options.resize.position),this.element.innerHTML='<div><svg><use xlink:href="#vditor-icon-resize"></use></svg></div>',this.bindEvent(a)}return i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("mousedown",function(u){var d=document,f=u.clientY,E=a.element.offsetHeight,L=63+a.element.querySelector(".vditor-toolbar").clientHeight;d.ondragstart=function(){return!1},window.captureEvents&&window.captureEvents(),s.element.classList.add("vditor-resize--selected"),d.onmousemove=function(D){a.options.resize.position==="top"?a.element.style.height=Math.max(L,E+(f-D.clientY))+"px":a.element.style.height=Math.max(L,E+(D.clientY-f))+"px",a.options.typewriterMode&&(a.sv.element.style.paddingBottom=a.sv.element.parentElement.offsetHeight/2+"px")},d.onmouseup=function(){a.options.resize.after&&a.options.resize.after(a.element.offsetHeight-E),window.captureEvents&&window.captureEvents(),d.onmousemove=null,d.onmouseup=null,d.ondragstart=null,d.onselectstart=null,d.onselect=null,s.element.classList.remove("vditor-resize--selected")}})},i}(),Mu=function(){function i(a){this.composingLock=!1,this.element=document.createElement("pre"),this.element.className="vditor-sv vditor-reset",this.element.setAttribute("placeholder",a.options.placeholder),this.element.setAttribute("contenteditable","true"),this.element.setAttribute("spellcheck","false"),this.bindEvent(a),Qi(a,this.element),ea(a,this.element),Q(a,this.element),ye(a,this.element),fi(a,this.element),Li(a,this.element,this.copy),q(a,this.element,this.copy)}return i.prototype.copy=function(a,s){a.stopPropagation(),a.preventDefault(),a.clipboardData.setData("text/plain",zr(s[s.currentMode].element))},i.prototype.bindEvent=function(a){var s=this;this.element.addEventListener("paste",function(u){ia(a,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){if(a.preview.element.style.display==="block"){var u=s.element.scrollTop,d=s.element.clientHeight,f=s.element.scrollHeight-parseFloat(s.element.style.paddingBottom||"0"),E=a.preview.element;u/d>.5?E.scrollTop=(u+d)*E.scrollHeight/f-d:E.scrollTop=u*E.scrollHeight/f}}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Z(a,u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")&&!(s.composingLock||u.data==="‘"||u.data==="“"||u.data==="《")){if(s.preventInput){s.preventInput=!1,Pe(a,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}Z(a,u)}}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if((u.key==="Backspace"||u.key==="Delete")&&a.sv.element.innerHTML!==""&&a.sv.element.childNodes.length===1&&a.sv.element.firstElementChild&&a.sv.element.firstElementChild.tagName==="DIV"&&a.sv.element.firstElementChild.childElementCount===2&&(a.sv.element.firstElementChild.textContent===""||a.sv.element.textContent===`
|
||
`)){a.sv.element.innerHTML="";return}u.key==="Enter"&&K(a)}})},i}(),Gs=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(a,s){var u=this;s===void 0&&(s=6e3),this.element.className="vditor-tip vditor-tip--show",s===0?(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,`
|
||
<div class="vditor-tip__close">X</div></div>`),this.element.querySelector(".vditor-tip__close").addEventListener("click",function(){u.hide()})):(this.element.innerHTML='<div class="vditor-tip__content">'.concat(a,"</div>"),setTimeout(function(){u.hide()},s)),this.element.removeAttribute("style"),setTimeout(function(){var d=u.element.getBoundingClientRect();d.top<46&&(u.element.style.position="fixed",u.element.style.top="46px")},150)},i.prototype.hide=function(){this.element.className="vditor-messageElementtip",this.element.innerHTML=""},i}(),So=function(i,a){if(a.options.preview.mode!==i){switch(a.options.preview.mode=i,i){case"both":a.sv.element.style.display="block",a.preview.element.style.display="block",a.preview.render(a),w(a.toolbar.elements,["both"]);break;case"editor":a.sv.element.style.display="block",a.preview.element.style.display="none",x(a.toolbar.elements,["both"]);break}a.devtools&&a.devtools.renderEchart(a)}},Cu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Lu=function(i){Cu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.preview.mode==="both"&&d.element.children[0].classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),s.currentMode==="sv"&&(s.options.preview.mode==="both"?So("editor",s):So("both",s)))}),d}return a}(Mt),_u=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__br"}return i}(),Ks=o(580),Nu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Du=function(i){Nu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return c.g.CODE_THEME.forEach(function(D){L+="<button>".concat(D,"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.hljs.style=D.target.textContent,(0,Ks.Y)(D.target.textContent,s.options.cdn),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ru=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Iu=function(i){Ru(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow");var L="";return Object.keys(s.options.preview.theme.list).forEach(function(D){L+='<button data-type="'.concat(D,'">').concat(s.options.preview.theme.list[D],"</button>")}),E.innerHTML='<div style="overflow: auto;max-height:'.concat(window.innerHeight/2,'px">').concat(L,"</div>"),E.addEventListener((0,m.Le)(),function(D){D.target.tagName==="BUTTON"&&(A(s,["subToolbar"]),s.options.preview.theme.current=D.target.getAttribute("data-type"),(0,le.Z)(s.options.preview.theme.current,s.options.preview.theme.path),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ou=function(){function i(a){this.element=document.createElement("span"),this.element.className="vditor-counter vditor-tooltipped vditor-tooltipped__nw",this.render(a,"")}return i.prototype.render=function(a,s){var u=s.endsWith(`
|
||
`)?s.length-1:s.length;if(a.options.counter.type==="text"&&a[a.currentMode]){var d=a[a.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof a.options.counter.max=="number"?(u>a.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(a.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",a.options.counter.type),a.options.counter.after&&a.options.counter.after(u,{enable:a.options.counter.enable,max:a.options.counter.max,type:a.options.counter.type})},i}(),Hu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pu=function(i){Hu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].innerHTML=u.icon,d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!f.currentTarget.classList.contains(c.g.CLASS_MENU_DISABLED)&&u.click(f,s)}),d}return a}(Mt),zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Bu=function(i){zu(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.firstElementChild.addEventListener((0,m.Le)(),function(f){var E=d.element.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(f.preventDefault(),E.classList.contains("vditor-menu--current")?(E.classList.remove("vditor-menu--current"),s.devtools.element.style.display="none",Fe(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",Fe(s),s.devtools.renderEchart(s)))}),d}return a}(Mt),Fu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),qu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ju=function(i){qu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");f.className="vditor-panel vditor-panel--arrow";var E="";return Object.keys(s.options.hint.emoji).forEach(function(L){var D=s.options.hint.emoji[L];D.indexOf(".")>-1?E+='<button data-value=":'.concat(L,': " data-key=":').concat(L,`:"><img
|
||
data-value=":`).concat(L,': " data-key=":').concat(L,':" class="vditor-emojis__icon" src="').concat(D,'"/></button>'):E+='<button data-value="'.concat(D,` "
|
||
data-key="`).concat(L,'"><span class="vditor-emojis__icon">').concat(D,"</span></button>")}),f.innerHTML='<div class="vditor-emojis" style="max-height: '.concat(s.options.height==="auto"?"auto":s.options.height-80,'px">').concat(E,`</div><div class="vditor-emojis__tail">
|
||
<span class="vditor-emojis__tip"></span><span>`).concat(s.options.hint.emojiTail||"",`</span>
|
||
</div>`),d.element.appendChild(f),M(s,f,d.element.firstElementChild,u.level),d.bindEvent(s),d}return a.prototype.bindEvent=function(s){var u=this;this.element.lastElementChild.addEventListener((0,m.Le)(),function(d){var f=(0,N.S)(d.target,"BUTTON");if(f){d.preventDefault();var E=f.getAttribute("data-value"),L=(0,j.zh)(s),D=E;if(s.currentMode==="wysiwyg"?D=s.lute.SpinVditorDOM(E):s.currentMode==="ir"&&(D=s.lute.SpinVditorIRDOM(E)),E.indexOf(":")>-1&&s.currentMode!=="sv"){var _=document.createElement("div");_.innerHTML=D,D=_.firstElementChild.firstElementChild.outerHTML+" ",(0,j.oC)(D,s)}else L.extractContents(),L.insertNode(document.createTextNode(E)),(0,y.F9)(L.startContainer)||In(s,L);L.collapse(!1),(0,j.Hc)(L),u.element.lastElementChild.style.display="none",st(s)}}),this.element.lastElementChild.addEventListener("mouseover",function(d){var f=(0,N.S)(d.target,"BUTTON");f&&(u.element.querySelector(".vditor-emojis__tip").innerHTML=f.getAttribute("data-key"))})},a}(Mt),Xs=function(i,a,s){var u=document.createElement("a");"download"in u?(u.download=s,u.style.display="none",u.href=URL.createObjectURL(new Blob([a])),document.body.appendChild(u),u.click(),u.remove()):i.tip.show(window.VditorI18n.downloadTip,0)},$u=function(i){var a=v(i);Xs(i,a,a.substr(0,10)+".md")},Uu=function(i){i.tip.show(window.VditorI18n.generate,3800);var a=document.querySelector("#vditorExportIframe");a.contentDocument.open(),a.contentDocument.write('<link rel="stylesheet" href="'.concat(i.options.cdn,`/dist/index.css"/>
|
||
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script>
|
||
<div id="preview" style="width: 800px"></div>
|
||
<script>
|
||
window.addEventListener("message", (e) => {
|
||
if(!e.data) {
|
||
return;
|
||
}
|
||
Vditor.preview(document.getElementById('preview'), e.data, {
|
||
cdn: "`).concat(i.options.cdn,`",
|
||
markdown: {
|
||
theme: `).concat(JSON.stringify(i.options.preview.theme),`
|
||
},
|
||
hljs: {
|
||
style: "`).concat(i.options.preview.hljs.style,`"
|
||
}
|
||
});
|
||
setTimeout(() => {
|
||
window.print();
|
||
}, 3600);
|
||
}, false);
|
||
<\/script>`)),a.contentDocument.close(),setTimeout(function(){a.contentWindow.postMessage(v(i),"*")},200)},Vu=function(i){var a=Vs(i),s='<html><head><link rel="stylesheet" type="text/css" href="'.concat(i.options.cdn,`/dist/index.css"/>
|
||
<script src="`).concat(i.options.cdn,"/dist/js/i18n/").concat(i.options.lang,`.js"><\/script>
|
||
<script src="`).concat(i.options.cdn,`/dist/method.min.js"><\/script></head>
|
||
<body><div class="vditor-reset" id="preview">`).concat(a,`</div>
|
||
<script>
|
||
const previewElement = document.getElementById('preview')
|
||
Vditor.setContentTheme('`).concat(i.options.preview.theme.current,"', '").concat(i.options.preview.theme.path,`');
|
||
Vditor.codeRender(previewElement);
|
||
Vditor.highlightRender(`).concat(JSON.stringify(i.options.preview.hljs),", previewElement, '").concat(i.options.cdn,`');
|
||
Vditor.mathRender(previewElement, {
|
||
cdn: '`).concat(i.options.cdn,`',
|
||
math: `).concat(JSON.stringify(i.options.preview.math),`,
|
||
});
|
||
Vditor.mermaidRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.SMILESRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.markmapRender(previewElement, '`).concat(i.options.cdn,`');
|
||
Vditor.flowchartRender(previewElement, '`).concat(i.options.cdn,`');
|
||
Vditor.graphvizRender(previewElement, '`).concat(i.options.cdn,`');
|
||
Vditor.chartRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.mindmapRender(previewElement, '`).concat(i.options.cdn,"', '").concat(i.options.theme,`');
|
||
Vditor.abcRender(previewElement, '`).concat(i.options.cdn,`');
|
||
`).concat(i.options.preview.render.media.enable?"Vditor.mediaRender(previewElement);":"",`
|
||
Vditor.speechRender(previewElement);
|
||
<\/script>
|
||
<script src="`).concat(i.options.cdn,"/dist/js/icons/").concat(i.options.icon,'.js"><\/script></body></html>');Xs(i,s,a.substr(0,10)+".html")},Wu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Gu=function(i){Wu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=d.element.children[0],E=document.createElement("div");return E.className="vditor-hint".concat(u.level===2?"":" vditor-panel--arrow"),E.innerHTML=`<button data-type="markdown">Markdown</button>
|
||
<button data-type="pdf">PDF</button>
|
||
<button data-type="html">HTML</button>`,E.addEventListener((0,m.Le)(),function(L){var D=L.target;if(D.tagName==="BUTTON"){switch(D.getAttribute("data-type")){case"markdown":$u(s);break;case"pdf":Uu(s);break;case"html":Vu(s);break}A(s,["subToolbar"]),L.preventDefault(),L.stopPropagation()}}),d.element.appendChild(E),M(s,E,f,u.level),d}return a}(Mt),Ku=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Xu=function(i){Ku(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s,u),d}return a.prototype._bindEvent=function(s,u){this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault(),s.element.className.includes("vditor--fullscreen")?(u.level||(this.innerHTML=u.icon),s.element.style.zIndex="",document.body.style.overflow="",s.element.classList.remove("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__s","__n"),s.options.toolbar.forEach(function(L){typeof L!="string"&&L.tipPosition&&L.name===E.dataset.type&&(E.className="vditor-tooltipped vditor-tooltipped__".concat(L.tipPosition))}))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__s","__n"))):(u.level||(this.innerHTML='<svg><use xlink:href="#vditor-icon-contract"></use></svg>'),s.element.style.zIndex=s.options.fullscreen.index.toString(),document.body.style.overflow="hidden",s.element.classList.add("vditor--fullscreen"),Object.keys(s.toolbar.elements).forEach(function(f){var E=s.toolbar.elements[f].firstChild;E&&(E.className=E.className.replace("__n","__s"))}),s.counter&&(s.counter.element.className=s.counter.element.className.replace("__n","__s"))),s.devtools&&s.devtools.renderEchart(s),u.click&&u.click(d,s),Fe(s),Ke(s)})},a}(Mt),Zu=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Yu=function(i){Zu(a,i);function a(s,u){var d=i.call(this,s,u)||this,f=document.createElement("div");return f.className="vditor-hint vditor-panel--arrow",f.innerHTML='<button data-tag="h1" data-value="# ">'.concat(window.VditorI18n.heading1," ").concat((0,m.ns)("<⌥⌘1>"),`</button>
|
||
<button data-tag="h2" data-value="## ">`).concat(window.VditorI18n.heading2," <").concat((0,m.ns)("⌥⌘2"),`></button>
|
||
<button data-tag="h3" data-value="### ">`).concat(window.VditorI18n.heading3," <").concat((0,m.ns)("⌥⌘3"),`></button>
|
||
<button data-tag="h4" data-value="#### ">`).concat(window.VditorI18n.heading4," <").concat((0,m.ns)("⌥⌘4"),`></button>
|
||
<button data-tag="h5" data-value="##### ">`).concat(window.VditorI18n.heading5," <").concat((0,m.ns)("⌥⌘5"),`></button>
|
||
<button data-tag="h6" data-value="###### ">`).concat(window.VditorI18n.heading6," <").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return a.prototype._bindEvent=function(s,u){var d=this.element.children[0];d.addEventListener((0,m.Le)(),function(E){E.preventDefault(),clearTimeout(s.wysiwyg.afterRenderTimeoutId),clearTimeout(s.ir.processTimeoutId),clearTimeout(s.sv.processTimeoutId),!d.classList.contains(c.g.CLASS_MENU_DISABLED)&&(d.blur(),d.classList.contains("vditor-menu--current")?(s.currentMode==="wysiwyg"?(gr(s),Oe(s)):s.currentMode==="ir"&&bi(s,""),d.classList.remove("vditor-menu--current")):(A(s,["subToolbar"]),u.style.display="block"))});for(var f=0;f<6;f++)u.children.item(f).addEventListener((0,m.Le)(),function(E){E.preventDefault(),s.currentMode==="wysiwyg"?(kn(s,E.target.getAttribute("data-tag")),Oe(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(bi(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):ht(s,E.target.getAttribute("data-value")),u.style.display="none"})},a}(Mt),Ju=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Qu=function(i){Ju(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="margin-bottom:14px;font-size: 14px;line-height: 22px;min-width:300px;max-width: 360px;display: flex;">
|
||
<div style="margin-top: 14px;flex: 1">
|
||
<div>Markdown 使用指南</div>
|
||
<ul style="list-style: none">
|
||
<li><a href="https://ld246.com/article/1583308420519" target="_blank">语法速查手册</a></li>
|
||
<li><a href="https://ld246.com/article/1583129520165" target="_blank">基础语法</a></li>
|
||
<li><a href="https://ld246.com/article/1583305480675" target="_blank">扩展语法</a></li>
|
||
<li><a href="https://ld246.com/article/1582778815353" target="_blank">键盘快捷键</a></li>
|
||
</ul>
|
||
</div>
|
||
<div style="margin-top: 14px;flex: 1">
|
||
<div>Vditor 支持</div>
|
||
<ul style="list-style: none">
|
||
<li><a href="https://github.com/Vanessa219/vditor/issues" target="_blank">Issues</a></li>
|
||
<li><a href="https://ld246.com/tag/vditor" target="_blank">官方讨论区</a></li>
|
||
<li><a href="https://ld246.com/article/1549638745630" target="_blank">开发手册</a></li>
|
||
<li><a href="https://ld246.com/guide/markdown" target="_blank">演示地址</a></li>
|
||
</ul>
|
||
</div></div>`,0)}),d}return a}(Mt),ed=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),td=function(i){ed(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,j.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&Ls(s,L,E)}}),d}return a}(Mt),nd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rd=function(i){nd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),s.tip.show(`<div style="max-width: 520px; font-size: 14px;line-height: 22px;margin-bottom: 14px;">
|
||
<p style="text-align: center;margin: 14px 0">
|
||
<em>下一代的 Markdown 编辑器,为未来而构建</em>
|
||
</p>
|
||
<div style="display: flex;margin-bottom: 14px;flex-wrap: wrap;align-items: center">
|
||
<img src="https://unpkg.com/vditor/dist/images/logo.png" style="margin: 0 auto;height: 68px"/>
|
||
<div> </div>
|
||
<div style="flex: 1;min-width: 250px">
|
||
Vditor 是一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。
|
||
它使用 TypeScript 实现,支持原生 JavaScript 以及 Vue、React、Angular 和 Svelte 等框架。
|
||
</div>
|
||
</div>
|
||
<div style="display: flex;flex-wrap: wrap;">
|
||
<ul style="list-style: none;flex: 1;min-width:148px">
|
||
<li>
|
||
项目地址:<a href="https://b3log.org/vditor" target="_blank">b3log.org/vditor</a>
|
||
</li>
|
||
<li>
|
||
开源协议:MIT
|
||
</li>
|
||
</ul>
|
||
<ul style="list-style: none;margin-right: 18px">
|
||
<li>
|
||
组件版本:Vditor v`.concat(c.H," / Lute v").concat(Lute.Version,`
|
||
</li>
|
||
<li>
|
||
赞助捐赠:<a href="https://ld246.com/sponsor" target="_blank">https://ld246.com/sponsor</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>`),0)}),d}return a}(Mt),id=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ad=function(i){id(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&gi(s,"afterend")}),d}return a}(Mt),od=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),sd=function(i){od(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")&&gi(s,"beforebegin")}),d}return a}(Mt),ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),cd=function(i){ld(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!(d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)||s.currentMode==="sv")){var E=(0,j.zh)(s),L=(0,y.lG)(E.startContainer,"LI");L&&bo(s,L,E,L.parentElement)}}),d}return a}(Mt),ud=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),dd=function(i){ud(a,i);function a(s,u){var d=i.call(this,s,u)||this;return s.options.outline&&d.element.firstElementChild.classList.add("vditor-menu--current"),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault();var E=s.toolbar.elements.outline.firstElementChild;E.classList.contains(c.g.CLASS_MENU_DISABLED)||(s.options.outline.enable=!d.element.firstElementChild.classList.contains("vditor-menu--current"),s.outline.toggle(s,s.options.outline.enable))}),d}return a}(Mt),hd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),pd=function(i){hd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){d.preventDefault();var f=u.element.firstElementChild;if(!f.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=c.g.EDIT_TOOLBARS.concat(["both","edit-mode","devtools"]);f.classList.contains("vditor-menu--current")?(f.classList.remove("vditor-menu--current"),s.currentMode==="sv"?(s.sv.element.style.display="block",s.options.preview.mode==="both"?s.preview.element.style.display="block":s.preview.element.style.display="none"):(s[s.currentMode].element.parentElement.style.display="block",s.preview.element.style.display="none"),S(s.toolbar.elements,E),s.outline.render(s)):(k(s.toolbar.elements,E),s.preview.element.style.display="block",s.currentMode==="sv"?s.sv.element.style.display="none":s[s.currentMode].element.parentElement.style.display="none",s.preview.render(s),f.classList.add("vditor-menu--current"),A(s,["subToolbar","hint","popover"]),setTimeout(function(){s.outline.render(s)},s.options.preview.delay+10)),Fe(s)}})},a}(Mt),fd=function(){function i(a){this.SAMPLE_RATE=5e3,this.isRecording=!1,this.readyFlag=!1,this.leftChannel=[],this.rightChannel=[],this.recordingLength=0;var s;if(typeof AudioContext<"u")s=new AudioContext;else if(webkitAudioContext)s=new webkitAudioContext;else return;this.DEFAULT_SAMPLE_RATE=s.sampleRate;var u=s.createGain(),d=s.createMediaStreamSource(a);d.connect(u),this.recorder=s.createScriptProcessor(2048,2,1),this.recorder.onaudioprocess=null,u.connect(this.recorder),this.recorder.connect(s.destination),this.readyFlag=!0}return i.prototype.cloneChannelData=function(a,s){this.leftChannel.push(new Float32Array(a)),this.rightChannel.push(new Float32Array(s)),this.recordingLength+=2048},i.prototype.startRecordingNewWavFile=function(){this.readyFlag&&(this.isRecording=!0,this.leftChannel.length=this.rightChannel.length=0,this.recordingLength=0)},i.prototype.stopRecording=function(){this.isRecording=!1},i.prototype.buildWavFileBlob=function(){for(var a=this.mergeBuffers(this.leftChannel),s=this.mergeBuffers(this.rightChannel),u=new Float32Array(a.length),d=0;d<a.length;++d)u[d]=.5*(a[d]+s[d]);this.DEFAULT_SAMPLE_RATE>this.SAMPLE_RATE&&(u=this.downSampleBuffer(u,this.SAMPLE_RATE));var f=44+u.length*2,E=new ArrayBuffer(f),L=new DataView(E);this.writeUTFBytes(L,0,"RIFF"),L.setUint32(4,f,!0),this.writeUTFBytes(L,8,"WAVE"),this.writeUTFBytes(L,12,"fmt "),L.setUint32(16,16,!0),L.setUint16(20,1,!0),L.setUint16(22,1,!0),L.setUint32(24,this.SAMPLE_RATE,!0),L.setUint32(28,this.SAMPLE_RATE*2,!0),L.setUint16(32,2,!0),L.setUint16(34,16,!0);var D=u.length*2;this.writeUTFBytes(L,36,"data"),L.setUint32(40,D,!0);for(var _=u.length,B=44,X=1,fe=0;fe<_;fe++)L.setInt16(B,u[fe]*(32767*X),!0),B+=2;return new Blob([L],{type:"audio/wav"})},i.prototype.downSampleBuffer=function(a,s){if(s===this.DEFAULT_SAMPLE_RATE||s>this.DEFAULT_SAMPLE_RATE)return a;for(var u=this.DEFAULT_SAMPLE_RATE/s,d=Math.round(a.length/u),f=new Float32Array(d),E=0,L=0;E<f.length;){for(var D=Math.round((E+1)*u),_=0,B=0,X=L;X<D&&X<a.length;X++)_+=a[X],B++;f[E]=_/B,E++,L=D}return f},i.prototype.mergeBuffers=function(a){for(var s=new Float32Array(this.recordingLength),u=0,d=a.length,f=0;f<d;++f){var E=a[f];s.set(E,u),u+=E.length}return s},i.prototype.writeUTFBytes=function(a,s,u){for(var d=u.length,f=0;f<d;f++)a.setUint8(s+f,u.charCodeAt(f))},i}(),md=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),gd=function(i){md(a,i);function a(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this,d;this.element.children[0].addEventListener((0,m.Le)(),function(f){if(f.preventDefault(),!u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){var E=s[s.currentMode].element;if(!d){navigator.mediaDevices.getUserMedia({audio:!0}).then(function(D){d=new fd(D),d.recorder.onaudioprocess=function(_){if(d.isRecording){var B=_.inputBuffer.getChannelData(0),X=_.inputBuffer.getChannelData(1);d.cloneChannelData(B,X)}},d.startRecordingNewWavFile(),s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),u.element.children[0].classList.add("vditor-menu--current")}).catch(function(){s.tip.show(window.VditorI18n["record-tip"])});return}if(d.isRecording){d.stopRecording(),s.tip.hide();var L=new File([d.buildWavFileBlob()],"record".concat(new Date().getTime(),".wav"),{type:"video/webm"});Br(s,[L]),u.element.children[0].classList.remove("vditor-menu--current")}else s.tip.show(window.VditorI18n.recording),E.setAttribute("contenteditable","false"),d.startRecordingNewWavFile(),u.element.children[0].classList.add("vditor-menu--current")}})},a}(Mt),vd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),bd=function(i){vd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({redo:d.element},["redo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.redo(s)}),d}return a}(Mt),yd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),wd=function(i){yd(a,i);function a(s,u){var d=i.call(this,s,u)||this;return k({undo:d.element},["undo"]),d.element.children[0].addEventListener((0,m.Le)(),function(f){f.preventDefault(),!d.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)&&s.undo.undo(s)}),d}return a}(Mt),xd=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),kd=function(i){xd(a,i);function a(s,u){var d=i.call(this,s,u)||this,f='<input type="file"';return s.options.upload.multiple&&(f+=' multiple="multiple"'),s.options.upload.accept&&(f+=' accept="'.concat(s.options.upload.accept,'"')),d.element.children[0].innerHTML="".concat(u.icon||'<svg><use xlink:href="#vditor-icon-upload"></use></svg>').concat(f,">"),d._bindEvent(s),d}return a.prototype._bindEvent=function(s){var u=this;this.element.children[0].addEventListener((0,m.Le)(),function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}}),this.element.querySelector("input").addEventListener("change",function(d){if(u.element.firstElementChild.classList.contains(c.g.CLASS_MENU_DISABLED)){d.stopPropagation(),d.preventDefault();return}d.target.files.length!==0&&Br(s,d.target.files,d.target)})},a}(Mt),Sd=function(){function i(a){var s=this,u=a.options;this.elements={},this.element=document.createElement("div"),this.element.className="vditor-toolbar",u.toolbar.forEach(function(d,f){var E=s.genItem(a,d,f);if(s.element.appendChild(E),d.toolbar){var L=document.createElement("div");L.className="vditor-hint vditor-panel--arrow",L.addEventListener((0,m.Le)(),function(D){L.style.display="none"}),d.toolbar.forEach(function(D,_){D.level=2,L.appendChild(s.genItem(a,D,f+_))}),E.appendChild(L),M(a,L,E.children[0])}}),a.options.toolbarConfig.hide&&this.element.classList.add("vditor-toolbar--hide"),a.options.toolbarConfig.pin&&this.element.classList.add("vditor-toolbar--pin"),a.options.counter.enable&&(a.counter=new Ou(a),this.element.appendChild(a.counter.element))}return i.prototype.updateConfig=function(a,s){a.options.toolbarConfig=Object.assign({hide:!1,pin:!1},s),a.options.toolbarConfig.hide?this.element.classList.add("vditor-toolbar--hide"):this.element.classList.remove("vditor-toolbar--hide"),a.options.toolbarConfig.pin?this.element.classList.add("vditor-toolbar--pin"):this.element.classList.remove("vditor-toolbar--pin")},i.prototype.genItem=function(a,s,u){var d;switch(s.name){case"bold":case"italic":case"more":case"strike":case"line":case"quote":case"list":case"ordered-list":case"check":case"code":case"inline-code":case"link":case"table":d=new Mt(a,s);break;case"emoji":d=new ju(a,s);break;case"headings":d=new Yu(a,s);break;case"|":d=new Fu;break;case"br":d=new _u;break;case"undo":d=new wd(a,s);break;case"redo":d=new bd(a,s);break;case"help":d=new Qu(a,s);break;case"both":d=new Lu(a,s);break;case"preview":d=new pd(a,s);break;case"fullscreen":d=new Xu(a,s);break;case"upload":d=new kd(a,s);break;case"record":d=new gd(a,s);break;case"info":d=new rd(a,s);break;case"edit-mode":d=new Zo(a,s);break;case"devtools":d=new Bu(a,s);break;case"outdent":d=new cd(a,s);break;case"indent":d=new td(a,s);break;case"outline":d=new dd(a,s);break;case"insert-after":d=new ad(a,s);break;case"insert-before":d=new sd(a,s);break;case"code-theme":d=new Du(a,s);break;case"content-theme":d=new Iu(a,s);break;case"export":d=new Gu(a,s);break;default:d=new Pu(a,s);break}if(d){var f=s.name;return(f==="br"||f==="|")&&(f=f+u),this.elements[f]=d.element,d.element}},i}(),Ed=o(173),Td=function(){function i(){this.stackSize=50,this.resetStack(),this.dmp=new Ed}return i.prototype.clearStack=function(a){this.resetStack(),this.resetIcon(a)},i.prototype.resetIcon=function(a){a.toolbar&&(this[a.currentMode].undoStack.length>1?S(a.toolbar.elements,["undo"]):k(a.toolbar.elements,["undo"]),this[a.currentMode].redoStack.length!==0?S(a.toolbar.elements,["redo"]):k(a.toolbar.elements,["redo"]))},i.prototype.undo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"&&!(this[a.currentMode].undoStack.length<2)){var s=this[a.currentMode].undoStack.pop();s&&(this[a.currentMode].redoStack.push(s),this.renderDiff(s,a),this[a.currentMode].hasUndo=!0,A(a,["hint"]))}},i.prototype.redo=function(a){if(a[a.currentMode].element.getAttribute("contenteditable")!=="false"){var s=this[a.currentMode].redoStack.pop();s&&(this[a.currentMode].undoStack.push(s),this.renderDiff(s,a,!0))}},i.prototype.recordFirstPosition=function(a,s){if(getSelection().rangeCount!==0&&!(this[a.currentMode].undoStack.length!==1||this[a.currentMode].undoStack[0].length===0||this[a.currentMode].redoStack.length>0)&&!((0,m.vU)()&&s.key==="Backspace")&&!(0,m.G6)()){var u=this.addCaret(a);u.replace("<wbr>","").replace(" vditor-ir__node--expand","")===this[a.currentMode].undoStack[0][0].diffs[0][1].replace("<wbr>","")&&(this[a.currentMode].undoStack[0][0].diffs[0][1]=u,this[a.currentMode].lastText=u)}},i.prototype.addToUndoStack=function(a){var s=this.addCaret(a,!0),u=this.dmp.diff_main(s,this[a.currentMode].lastText,!0),d=this.dmp.patch_make(s,this[a.currentMode].lastText,u);d.length===0&&this[a.currentMode].undoStack.length>0||(this[a.currentMode].lastText=s,this[a.currentMode].undoStack.push(d),this[a.currentMode].undoStack.length>this.stackSize&&this[a.currentMode].undoStack.shift(),this[a.currentMode].hasUndo&&(this[a.currentMode].redoStack=[],this[a.currentMode].hasUndo=!1,k(a.toolbar.elements,["redo"])),this[a.currentMode].undoStack.length>1&&S(a.toolbar.elements,["undo"]))},i.prototype.renderDiff=function(a,s,u){u===void 0&&(u=!1);var d;if(u){var f=this.dmp.patch_deepCopy(a).reverse();f.forEach(function(L){L.diffs.forEach(function(D){D[0]=-D[0]})}),d=this.dmp.patch_apply(f,this[s.currentMode].lastText)[0]}else d=this.dmp.patch_apply(a,this[s.currentMode].lastText)[0];if(this[s.currentMode].lastText=d,s[s.currentMode].element.innerHTML=d,s.currentMode!=="sv"&&(s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview")).forEach(function(L){L.parentElement.querySelector(".language-echarts")&&(s.currentMode==="ir"?L.parentElement.outerHTML=s.lute.SpinVditorIRDOM(L.parentElement.outerHTML):L.parentElement.outerHTML=s.lute.SpinVditorDOM(L.parentElement.outerHTML))}),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){Qe(L,s)})),s[s.currentMode].element.querySelector("wbr"))(0,j.ib)(s[s.currentMode].element,s[s.currentMode].element.ownerDocument.createRange()),K(s);else{var E=getSelection().getRangeAt(0);E.setEndBefore(s[s.currentMode].element),E.collapse(!1)}Ht(s),st(s,{enableAddUndoStack:!1,enableHint:!1,enableInput:!0}),ur(s),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){Qe(L,s)}),this[s.currentMode].undoStack.length>1?S(s.toolbar.elements,["undo"]):k(s.toolbar.elements,["undo"]),this[s.currentMode].redoStack.length!==0?S(s.toolbar.elements,["redo"]):k(s.toolbar.elements,["redo"])},i.prototype.resetStack=function(){this.ir={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.sv={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]},this.wysiwyg={hasUndo:!1,lastText:"",redoStack:[],undoStack:[]}},i.prototype.addCaret=function(a,s){s===void 0&&(s=!1);var u;if(getSelection().rangeCount!==0&&!a[a.currentMode].element.querySelector("wbr")){var d=getSelection().getRangeAt(0);if(a[a.currentMode].element.contains(d.startContainer)){u=d.cloneRange();var f=document.createElement("span");f.className="vditor-wbr",d.insertNode(f)}}var E=a[a.currentMode].element.cloneNode(!0);E.querySelectorAll(".vditor-".concat(a.currentMode,"__preview[data-render='1']")).forEach(function(D){D.firstElementChild&&(D.firstElementChild.classList.contains("language-echarts")||D.firstElementChild.classList.contains("language-plantuml")||D.firstElementChild.classList.contains("language-mindmap")?(D.firstElementChild.removeAttribute("_echarts_instance_"),D.firstElementChild.removeAttribute("data-processed"),D.firstElementChild.innerHTML=D.previousElementSibling.firstElementChild.innerHTML,D.setAttribute("data-render","2")):D.firstElementChild.classList.contains("language-math")&&(D.setAttribute("data-render","2"),D.firstElementChild.textContent=D.firstElementChild.getAttribute("data-math"),D.firstElementChild.removeAttribute("data-math")))});var L=E.innerHTML;return a[a.currentMode].element.querySelectorAll(".vditor-wbr").forEach(function(D){D.remove()}),s&&u&&(0,j.Hc)(u),L.replace('<span class="vditor-wbr"></span>',"<wbr>")},i}(),Ad=o(673),Md=function(){function i(a){this.defaultOptions={rtl:!1,after:void 0,cache:{enable:!0},cdn:c.g.CDN,classes:{preview:""},comment:{enable:!1},counter:{enable:!1,type:"markdown"},customRenders:[],debugger:!1,fullscreen:{index:90},height:"auto",hint:{delay:200,emoji:{"+1":"👍","-1":"👎",confused:"😕",eyes:"👀️",heart:"❤️",rocket:"🚀️",smile:"😄",tada:"🎉️"},emojiPath:"".concat(c.g.CDN,"/dist/images/emoji"),extend:[],parse:!0},icon:"ant",lang:"zh_CN",mode:"ir",outline:{enable:!1,position:"left"},placeholder:"",preview:{actions:["desktop","tablet","mobile","mp-wechat","zhihu"],delay:1e3,hljs:c.g.HLJS_OPTIONS,markdown:c.g.MARKDOWN_OPTIONS,math:c.g.MATH_OPTIONS,maxWidth:800,mode:"both",theme:c.g.THEME_OPTIONS,render:{media:{enable:!0}}},link:{isOpen:!0},image:{isPreview:!0},resize:{enable:!1,position:"bottom"},theme:"classic",toolbar:["emoji","headings","bold","italic","strike","link","|","list","ordered-list","check","outdent","indent","|","quote","line","code","inline-code","insert-before","insert-after","|","upload","record","table","|","undo","redo","|","fullscreen","edit-mode",{name:"more",toolbar:["both","code-theme","content-theme","export","outline","preview","devtools","info","help"]}],toolbarConfig:{hide:!1,pin:!1},typewriterMode:!1,undoDelay:800,upload:{extraData:{},fieldName:"file[]",filename:function(s){return s.replace(/\W/g,"")},linkToImgUrl:"",max:10*1024*1024,multiple:!0,url:"",withCredentials:!1},value:"",width:"auto"},this.options=a}return i.prototype.merge=function(){var a,s,u,d,f,E,L,D,_;this.options&&(this.options.toolbar?this.options.toolbar=this.mergeToolbar(this.options.toolbar):this.options.toolbar=this.mergeToolbar(this.defaultOptions.toolbar),!((s=(a=this.options.preview)===null||a===void 0?void 0:a.theme)===null||s===void 0)&&s.list&&(this.defaultOptions.preview.theme.list=this.options.preview.theme.list),!((f=(d=(u=this.options.preview)===null||u===void 0?void 0:u.render)===null||d===void 0?void 0:d.media)===null||f===void 0)&&f.enable&&(this.defaultOptions.preview.render.media.enable=this.options.preview.render.media.enable),!((E=this.options.hint)===null||E===void 0)&&E.emoji&&(this.defaultOptions.hint.emoji=this.options.hint.emoji),this.options.comment&&(this.defaultOptions.comment=this.options.comment),this.options.cdn&&(!((D=(L=this.options.preview)===null||L===void 0?void 0:L.theme)===null||D===void 0)&&D.path||(this.defaultOptions.preview.theme.path="".concat(this.options.cdn,"/dist/css/content-theme")),!((_=this.options.hint)===null||_===void 0)&&_.emojiPath||(this.defaultOptions.hint.emojiPath="".concat(this.options.cdn,"/dist/images/emoji"))));var B=(0,Ad.T)(this.defaultOptions,this.options);if(B.cache.enable&&!B.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");return B},i.prototype.mergeToolbar=function(a){var s=this,u=[{icon:'<svg><use xlink:href="#vditor-icon-export"></use></svg>',name:"export",tipPosition:"ne"},{hotkey:"⌘E",icon:'<svg><use xlink:href="#vditor-icon-emoji"></use></svg>',name:"emoji",tipPosition:"ne"},{hotkey:"⌘H",icon:'<svg><use xlink:href="#vditor-icon-headings"></use></svg>',name:"headings",tipPosition:"ne"},{hotkey:"⌘B",icon:'<svg><use xlink:href="#vditor-icon-bold"></use></svg>',name:"bold",prefix:"**",suffix:"**",tipPosition:"ne"},{hotkey:"⌘I",icon:'<svg><use xlink:href="#vditor-icon-italic"></use></svg>',name:"italic",prefix:"*",suffix:"*",tipPosition:"ne"},{hotkey:"⌘D",icon:'<svg><use xlink:href="#vditor-icon-strike"></use></svg>',name:"strike",prefix:"~~",suffix:"~~",tipPosition:"ne"},{hotkey:"⌘K",icon:'<svg><use xlink:href="#vditor-icon-link"></use></svg>',name:"link",prefix:"[",suffix:"](https://)",tipPosition:"n"},{name:"|"},{hotkey:"⌘L",icon:'<svg><use xlink:href="#vditor-icon-list"></use></svg>',name:"list",prefix:"* ",tipPosition:"n"},{hotkey:"⌘O",icon:'<svg><use xlink:href="#vditor-icon-ordered-list"></use></svg>',name:"ordered-list",prefix:"1. ",tipPosition:"n"},{hotkey:"⌘J",icon:'<svg><use xlink:href="#vditor-icon-check"></use></svg>',name:"check",prefix:"* [ ] ",tipPosition:"n"},{hotkey:"⇧⌘I",icon:'<svg><use xlink:href="#vditor-icon-outdent"></use></svg>',name:"outdent",tipPosition:"n"},{hotkey:"⇧⌘O",icon:'<svg><use xlink:href="#vditor-icon-indent"></use></svg>',name:"indent",tipPosition:"n"},{name:"|"},{hotkey:"⌘;",icon:'<svg><use xlink:href="#vditor-icon-quote"></use></svg>',name:"quote",prefix:"> ",tipPosition:"n"},{hotkey:"⇧⌘H",icon:'<svg><use xlink:href="#vditor-icon-line"></use></svg>',name:"line",prefix:"---",tipPosition:"n"},{hotkey:"⌘U",icon:'<svg><use xlink:href="#vditor-icon-code"></use></svg>',name:"code",prefix:"```",suffix:"\n```",tipPosition:"n"},{hotkey:"⌘G",icon:'<svg><use xlink:href="#vditor-icon-inline-code"></use></svg>',name:"inline-code",prefix:"`",suffix:"`",tipPosition:"n"},{hotkey:"⇧⌘B",icon:'<svg><use xlink:href="#vditor-icon-before"></use></svg>',name:"insert-before",tipPosition:"n"},{hotkey:"⇧⌘E",icon:'<svg><use xlink:href="#vditor-icon-after"></use></svg>',name:"insert-after",tipPosition:"n"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-upload"></use></svg>',name:"upload",tipPosition:"n"},{icon:'<svg><use xlink:href="#vditor-icon-record"></use></svg>',name:"record",tipPosition:"n"},{hotkey:"⌘M",icon:'<svg><use xlink:href="#vditor-icon-table"></use></svg>',name:"table",prefix:"| col1",suffix:` | col2 | col3 |
|
||
| --- | --- | --- |
|
||
| | | |
|
||
| | | |`,tipPosition:"n"},{name:"|"},{hotkey:"⌘Z",icon:'<svg><use xlink:href="#vditor-icon-undo"></use></svg>',name:"undo",tipPosition:"nw"},{hotkey:"⌘Y",icon:'<svg><use xlink:href="#vditor-icon-redo"></use></svg>',name:"redo",tipPosition:"nw"},{name:"|"},{icon:'<svg><use xlink:href="#vditor-icon-more"></use></svg>',name:"more",tipPosition:"e"},{hotkey:"⌘'",icon:'<svg><use xlink:href="#vditor-icon-fullscreen"></use></svg>',name:"fullscreen",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-edit"></use></svg>',name:"edit-mode",tipPosition:"nw"},{hotkey:"⌘P",icon:'<svg><use xlink:href="#vditor-icon-both"></use></svg>',name:"both",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-preview"></use></svg>',name:"preview",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',name:"outline",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-theme"></use></svg>',name:"content-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-code-theme"></use></svg>',name:"code-theme",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-bug"></use></svg>',name:"devtools",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-info"></use></svg>',name:"info",tipPosition:"nw"},{icon:'<svg><use xlink:href="#vditor-icon-help"></use></svg>',name:"help",tipPosition:"nw"},{name:"br"}],d=[];return a.forEach(function(f){var E=f;u.forEach(function(L){typeof f=="string"&&L.name===f&&(E=L),typeof f=="object"&&L.name===f.name&&(E=Object.assign({},L,f))}),f.toolbar&&(E.toolbar=s.mergeToolbar(f.toolbar)),d.push(E)}),d},i}(),Cd=function(){function i(a){var s=this;this.composingLock=!1,this.commentIds=[];var u=document.createElement("div");u.className="vditor-wysiwyg",u.innerHTML='<pre class="vditor-reset" placeholder="'.concat(a.options.placeholder,`"
|
||
contenteditable="true" spellcheck="false"></pre>
|
||
<div class="vditor-panel vditor-panel--none"></div>
|
||
<div class="vditor-panel vditor-panel--none">
|
||
<button type="button" aria-label="`).concat(window.VditorI18n.comment,`" class="vditor-icon vditor-tooltipped vditor-tooltipped__n">
|
||
<svg><use xlink:href="#vditor-icon-comment"></use></svg>
|
||
</button>
|
||
</div>`),this.element=u.firstElementChild,this.popover=u.firstElementChild.nextElementSibling,this.selectPopover=u.lastElementChild,this.bindEvent(a),Qi(a,this.element),za(a,this.element),ea(a,this.element),Q(a,this.element),ye(a,this.element),fi(a,this.element),Li(a,this.element,this.copy),q(a,this.element,this.copy),a.options.comment.enable&&(this.selectPopover.querySelector("button").onclick=function(){var d=Lute.NewNodeID(),f=getSelection().getRangeAt(0),E=f.cloneRange(),L=f.extractContents(),D,_,B=!1,X=!1;L.childNodes.forEach(function(ce,ke){var xe=!1;if(ce.nodeType===3?xe=!0:ce.classList.contains("vditor-comment")?ce.classList.contains("vditor-comment")&&ce.setAttribute("data-cmtids",ce.getAttribute("data-cmtids")+" "+d):xe=!0,xe)if(ce.nodeType!==3&&ce.getAttribute("data-block")==="0"&&ke===0&&E.startOffset>0)ce.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ce.innerHTML,"</span>"),D=ce;else if(ce.nodeType!==3&&ce.getAttribute("data-block")==="0"&&ke===L.childNodes.length-1&&E.endOffset<E.endContainer.textContent.length)ce.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ce.innerHTML,"</span>"),_=ce;else if(ce.nodeType!==3&&ce.getAttribute("data-block")==="0")ke===0?B=!0:ke===L.childNodes.length-1&&(X=!0),ce.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(ce.innerHTML,"</span>");else{var ue=document.createElement("span");ue.classList.add("vditor-comment"),ue.setAttribute("data-cmtids",d),ce.parentNode.insertBefore(ue,ce),ue.appendChild(ce)}});var fe=(0,y.F9)(E.startContainer);fe&&(D?(fe.insertAdjacentHTML("beforeend",D.innerHTML),D.remove()):fe.textContent.trim().replace(c.g.ZWSP,"")===""&&B&&fe.remove());var be=(0,y.F9)(E.endContainer);be&&(_?(be.insertAdjacentHTML("afterbegin",_.innerHTML),_.remove()):be.textContent.trim().replace(c.g.ZWSP,"")===""&&X&&be.remove()),f.insertNode(L),a.options.comment.add(d,f.toString(),s.getComments(a,!0)),Oe(a,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),s.hideComment()})}return i.prototype.getComments=function(a,s){var u=this;if(s===void 0&&(s=!1),a.currentMode==="wysiwyg"&&a.options.comment.enable){this.commentIds=[],this.element.querySelectorAll(".vditor-comment").forEach(function(f){u.commentIds=u.commentIds.concat(f.getAttribute("data-cmtids").split(" "))}),this.commentIds=Array.from(new Set(this.commentIds));var d=[];if(s)return this.commentIds.forEach(function(f){d.push({id:f,top:u.element.querySelector('.vditor-comment[data-cmtids="'.concat(f,'"]')).offsetTop})}),d}else return[]},i.prototype.triggerRemoveComment=function(a){var s=function(f,E){var L=new Set(E);return f.filter(function(D){return!L.has(D)})};if(a.currentMode==="wysiwyg"&&a.options.comment.enable&&a.wysiwyg.commentIds.length>0){var u=JSON.parse(JSON.stringify(this.commentIds));this.getComments(a);var d=s(u,this.commentIds);d.length>0&&a.options.comment.remove(d)}},i.prototype.showComment=function(){var a=(0,j.Ny)(this.element);this.selectPopover.setAttribute("style","left:".concat(a.left,"px;display:block;top:").concat(Math.max(-8,a.top-21),"px"))},i.prototype.hideComment=function(){this.selectPopover.setAttribute("style","display:none")},i.prototype.unbindListener=function(){window.removeEventListener("scroll",this.scrollListener)},i.prototype.copy=function(a,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){a.stopPropagation(),a.preventDefault();var d=(0,y.lG)(u.startContainer,"CODE"),f=(0,y.lG)(u.endContainer,"CODE");if(d&&f&&f.isSameNode(d)){var E="";d.parentElement.tagName==="PRE"?E=u.toString():E="`"+u.toString()+"`",a.clipboardData.setData("text/plain",E),a.clipboardData.setData("text/html","");return}var L=(0,y.lG)(u.startContainer,"A"),D=(0,y.lG)(u.endContainer,"A");if(L&&D&&D.isSameNode(L)){var _=L.getAttribute("title")||"";_&&(_=' "'.concat(_,'"')),a.clipboardData.setData("text/plain","[".concat(u.toString(),"](").concat(L.getAttribute("href")).concat(_,")")),a.clipboardData.setData("text/html","");return}var B=document.createElement("div");B.appendChild(u.cloneContents()),a.clipboardData.setData("text/plain",s.lute.VditorDOM2Md(B.innerHTML).trim()),a.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(a){var s=this;this.unbindListener(),window.addEventListener("scroll",this.scrollListener=function(){if(A(a,["hint"]),!(s.popover.style.display!=="block"||s.selectPopover.style.display!=="block")){var u=parseInt(s.popover.getAttribute("data-top"),10);if(a.options.height!=="auto"){if(a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0){var d=Math.max(window.scrollY-a.element.offsetTop-8,Math.min(u-a.wysiwyg.element.scrollTop,s.element.clientHeight-21))+"px";s.popover.style.display==="block"&&(s.popover.style.top=d),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=d)}return}else if(!a.options.toolbarConfig.pin)return;var f=Math.max(u,window.scrollY-a.element.offsetTop-8)+"px";s.popover.style.display==="block"&&(s.popover.style.top=f),s.selectPopover.style.display==="block"&&(s.selectPopover.style.top=f)}}),this.element.addEventListener("scroll",function(){if(A(a,["hint"]),a.options.comment&&a.options.comment.enable&&a.options.comment.scroll&&a.options.comment.scroll(a.wysiwyg.element.scrollTop),s.popover.style.display==="block"){var u=parseInt(s.popover.getAttribute("data-top"),10)-a.wysiwyg.element.scrollTop,d=-8;a.options.toolbarConfig.pin&&a.toolbar.element.getBoundingClientRect().top===0&&(d=window.scrollY-a.element.offsetTop+d);var f=Math.max(d,Math.min(u,s.element.clientHeight-21))+"px";s.popover.style.top=f,s.selectPopover.style.top=f}}),this.element.addEventListener("paste",function(u){ia(a,u,{pasteCode:function(d){var f=(0,j.zh)(a),E=document.createElement("template");E.innerHTML=d,f.insertNode(E.content.cloneNode(!0));var L=(0,y.a1)(f.startContainer,"data-block","0");L?L.outerHTML=a.lute.SpinVditorDOM(L.outerHTML):a.wysiwyg.element.innerHTML=a.lute.SpinVditorDOM(a.wysiwyg.element.innerHTML),(0,j.ib)(a.wysiwyg.element,f)}})}),this.element.addEventListener("compositionstart",function(){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){var d=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(d&&d.textContent===""){Ht(a);return}(0,m.vU)()||_r(a,getSelection().getRangeAt(0).cloneRange(),u),s.composingLock=!1}),this.element.addEventListener("input",function(u){if(!(u.inputType==="deleteByDrag"||u.inputType==="insertFromDrop")){if(s.preventInput){s.preventInput=!1,Oe(a);return}if(s.composingLock||u.data==="‘"||u.data==="“"||u.data==="《"){Oe(a);return}var d=getSelection().getRangeAt(0),f=(0,y.F9)(d.startContainer);if(f||(In(a,d),f=(0,y.F9)(d.startContainer)),!!f){for(var E=(0,j.im)(f,a.wysiwyg.element,d).start,L=!0,D=E-1;D>f.textContent.substr(0,E).lastIndexOf(`
|
||
`);D--)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==" "){L=!1;break}E===0&&(L=!1);for(var _=!0,D=E-1;D<f.textContent.length;D++)if(f.textContent.charAt(D)!==" "&&f.textContent.charAt(D)!==`
|
||
`){_=!1;break}_&&/^#{1,6} $/.test(f.textContent)&&(_=!1);var B=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(B&&B.textContent===""&&(Ht(a),B.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||wo(f.innerHTML)||yo(f.innerHTML)&&f.previousElementSibling){typeof a.options.input=="function"&&a.options.input(v(a));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),_r(a,d,u)}}}),this.element.addEventListener("click",function(u){if(u.target.tagName==="INPUT"){var d=u.target;d.checked?d.setAttribute("checked","checked"):d.removeAttribute("checked"),s.preventInput=!0,getSelection().rangeCount>0&&(0,j.Hc)(getSelection().getRangeAt(0)),Oe(a);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?mo(a,u.target):Xo(u,a);return}var f=(0,y.lG)(u.target,"A");if(f){a.options.link.click?a.options.link.click(f):a.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,j.zh)(a);if(u.target.isEqualNode(s.element)&&s.element.lastElementChild&&E.collapsed){var L=s.element.lastElementChild.getBoundingClientRect();u.y>L.top+L.height&&(s.element.lastElementChild.tagName==="P"&&s.element.lastElementChild.textContent.trim().replace(c.g.ZWSP,"")===""?(E.selectNodeContents(s.element.lastElementChild),E.collapse(!1)):(s.element.insertAdjacentHTML("beforeend",'<p data-block="0">'.concat(c.g.ZWSP,"<wbr></p>")),(0,j.ib)(s.element,E)))}zn(a);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,j.zh)(a).startContainer,"vditor-wysiwyg__preview")),D&&nr(D,a),Rt(u,a)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&K(a),(u.key==="Backspace"||u.key==="Delete")&&a.wysiwyg.element.innerHTML!==""&&a.wysiwyg.element.childNodes.length===1&&a.wysiwyg.element.firstElementChild&&a.wysiwyg.element.firstElementChild.tagName==="P"&&a.wysiwyg.element.firstElementChild.childElementCount===0&&(a.wysiwyg.element.textContent===""||a.wysiwyg.element.textContent===`
|
||
`)&&(a.wysiwyg.element.innerHTML="");var d=(0,j.zh)(a);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent===`
|
||
`&&d.startOffset===1&&(d.startContainer.textContent=""),In(a,d),zn(a),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&a.hint.render(a);var f=(0,y.fb)(d.startContainer,"vditor-wysiwyg__preview");if(!f&&d.startContainer.nodeType!==3&&d.startOffset>0){var E=d.startContainer;E.classList.contains("vditor-wysiwyg__block")&&(f=E.lastElementChild)}if(f){var L=f.previousElementSibling;if(L.style.display==="none"){u.key==="ArrowDown"||u.key==="ArrowRight"?nr(f,a):nr(f,a,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=$n(E);if(_&&_.nodeType!==3){var B=_.querySelector(".vditor-wysiwyg__preview");if(B){nr(B,a);return}}if(_.nodeType===3){for(;_.textContent.length===0&&_.nextSibling;)_=_.nextSibling;d.setStart(_,1)}else d.setStart(_.firstChild,0)}else d.selectNodeContents(D),d.collapse(!1)}}}})},i}(),Ld=function(){var i=function(a,s){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&(u[f]=d[f])},i(a,s)};return function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(a,s);function u(){this.constructor=a}a.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),_d=function(i){Ld(a,i);function a(s,u){var d=i.call(this)||this;if(d.isDestroyed=!1,d.version=c.H,typeof s=="string"){if(u?u.cache?u.cache.id||(u.cache.id="vditor".concat(s)):u.cache={id:"vditor".concat(s)}:u={cache:{id:"vditor".concat(s)}},!document.getElementById(s))return d.showErrorTip("Failed to get element by id: ".concat(s)),d;s=document.getElementById(s)}var f=new Md(u),E=f.merge();if(E.i18n)window.VditorI18n=E.i18n,d.init(s,E);else if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(E.lang)){var L="vditorI18nScript",D=L+E.lang;document.querySelectorAll('head script[id^="'.concat(L,'"]')).forEach(function(_){_.id!==D&&document.head.removeChild(_)}),(0,b.G)("".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js"),D).then(function(){d.init(s,E)}).catch(function(_){d.showErrorTip("GET ".concat(E.cdn,"/dist/js/i18n/").concat(E.lang,".js net::ERR_ABORTED 404 (Not Found)"))})}else throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");return d}return a.prototype.showErrorTip=function(s){var u=new Gs;document.body.appendChild(u.element),u.show(s,0)},a.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},a.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,we(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,le.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,Ks.Y)(d,this.vditor.options.cdn))},a.prototype.getValue=function(){return v(this.vditor)},a.prototype.getCurrentMode=function(){return this.vditor.currentMode},a.prototype.focus=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.focus():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.focus():this.vditor.currentMode==="ir"&&this.vditor.ir.element.focus()},a.prototype.blur=function(){this.vditor.currentMode==="sv"?this.vditor.sv.element.blur():this.vditor.currentMode==="wysiwyg"?this.vditor.wysiwyg.element.blur():this.vditor.currentMode==="ir"&&this.vditor.ir.element.blur()},a.prototype.disabled=function(){A(this.vditor,["subToolbar","hint","popover"]),k(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","false")},a.prototype.enable=function(){S(this.vditor.toolbar.elements,c.g.EDIT_TOOLBARS.concat(["undo","redo","fullscreen","edit-mode"])),this.vditor.undo.resetIcon(this.vditor),this.vditor[this.vditor.currentMode].element.setAttribute("contenteditable","true")},a.prototype.getSelection=function(){if(this.vditor.currentMode==="wysiwyg")return zr(this.vditor.wysiwyg.element);if(this.vditor.currentMode==="sv")return zr(this.vditor.sv.element);if(this.vditor.currentMode==="ir")return zr(this.vditor.ir.element)},a.prototype.renderPreview=function(s){this.vditor.preview.render(this.vditor,s)},a.prototype.getCursorPosition=function(){return(0,j.Ny)(this.vditor[this.vditor.currentMode].element)},a.prototype.isUploading=function(){return this.vditor.upload.isUploading},a.prototype.clearCache=function(){this.vditor.options.cache.enable&&(0,m.pK)()&&localStorage.removeItem(this.vditor.options.cache.id)},a.prototype.disabledCache=function(){this.vditor.options.cache.enable=!1},a.prototype.enableCache=function(){if(!this.vditor.options.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");this.vditor.options.cache.enable=!0},a.prototype.html2md=function(s){return this.vditor.lute.HTML2Md(s)},a.prototype.exportJSON=function(s){return this.vditor.lute.RenderJSON(s)},a.prototype.getHTML=function(){return Vs(this.vditor)},a.prototype.tip=function(s,u){this.vditor.tip.show(s,u)},a.prototype.setPreviewMode=function(s){So(s,this.vditor)},a.prototype.deleteValue=function(){window.getSelection().isCollapsed||document.execCommand("delete",!1)},a.prototype.updateValue=function(s){document.execCommand("insertHTML",!1,s)},a.prototype.insertValue=function(s,u){u===void 0&&(u=!0);var d=(0,j.zh)(this.vditor);d.collapse(!0);var f=document.createElement("template");f.innerHTML=s,d.insertNode(f.content.cloneNode(!0)),d.collapse(!1),this.vditor.currentMode==="sv"?(this.vditor.sv.preventInput=!0,u&&Z(this.vditor)):this.vditor.currentMode==="wysiwyg"?u&&_r(this.vditor,getSelection().getRangeAt(0)):this.vditor.currentMode==="ir"&&(this.vditor.ir.preventInput=!0,u&&Nt(this.vditor,getSelection().getRangeAt(0),!0))},a.prototype.insertMD=function(s){this.vditor.currentMode==="ir"?(0,j.oC)(this.vditor.lute.Md2VditorIRDOM(s),this.vditor):this.vditor.currentMode==="wysiwyg"?(0,j.oC)(this.vditor.lute.Md2VditorDOM(s),this.vditor):Me(this.vditor,s),this.vditor.outline.render(this.vditor),st(this.vditor)},a.prototype.setValue=function(s,u){var d=this;u===void 0&&(u=!1),this.vditor.currentMode==="sv"?(this.vditor.sv.element.innerHTML="<div data-block='0'>".concat(this.vditor.lute.SpinVditorSVDOM(s),"</div>"),Pe(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})):this.vditor.currentMode==="wysiwyg"?Pa(this.vditor,s,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}):(this.vditor.ir.element.innerHTML=this.vditor.lute.Md2VditorIRDOM(s),this.vditor.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){Qe(f,d.vditor)}),Zn(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})),this.vditor.outline.render(this.vditor),s||(A(this.vditor,["emoji","headings","submenu","hint"]),this.vditor.wysiwyg.popover&&(this.vditor.wysiwyg.popover.style.display="none"),this.clearCache()),u&&this.clearStack()},a.prototype.insertEmptyBlock=function(s){gi(this.vditor,s)},a.prototype.clearStack=function(){this.vditor.undo.clearStack(this.vditor),this.vditor.undo.addToUndoStack(this.vditor)},a.prototype.destroy=function(){this.vditor.element.innerHTML=this.vditor.originalInnerHTML,this.vditor.element.classList.remove("vditor"),this.vditor.element.removeAttribute("style");var s=document.getElementById("vditorIconScript");s&&s.remove(),this.clearCache(),Be(),this.vditor.wysiwyg.unbindListener(),this.vditor.options.after=void 0,this.isDestroyed=!0},a.prototype.getCommentIds=function(){return this.vditor.currentMode!=="wysiwyg"?[]:this.vditor.wysiwyg.getComments(this.vditor,!0)},a.prototype.hlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){d.classList.remove("vditor-comment--hover"),s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.add("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.unHlCommentIds=function(s){if(this.vditor.currentMode==="wysiwyg"){var u=function(d){s.forEach(function(f){d.getAttribute("data-cmtids").indexOf(f)>-1&&d.classList.remove("vditor-comment--hover")})};this.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)}),this.vditor.preview.element.style.display!=="none"&&this.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(d){u(d)})}},a.prototype.removeCommentIds=function(s){var u=this;if(this.vditor.currentMode==="wysiwyg"){var d=function(f,E){var L=f.getAttribute("data-cmtids").split(" ");L.find(function(D,_){if(D===E)return L.splice(_,1),!0}),L.length===0?(f.outerHTML=f.innerHTML,(0,j.zh)(u.vditor).collapse(!0)):f.setAttribute("data-cmtids",L.join(" "))};s.forEach(function(f){u.vditor.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)}),u.vditor.preview.element.style.display!=="none"&&u.vditor.preview.element.querySelectorAll(".vditor-comment").forEach(function(E){d(E,f)})}),Oe(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})}},a.prototype.init=function(s,u){var d=this;this.isDestroyed||(this.vditor={currentMode:u.mode,element:s,hint:new wu(u.hint.extend),lute:void 0,options:u,originalInnerHTML:s.innerHTML,outline:new Su(window.VditorI18n.outline),tip:new Gs},this.vditor.sv=new Mu(this.vditor),this.vditor.undo=new Td,this.vditor.wysiwyg=new Cd(this.vditor),this.vditor.ir=new xu(this.vditor),this.vditor.toolbar=new Sd(this.vditor),u.resize.enable&&(this.vditor.resize=new Au(this.vditor)),this.vditor.toolbar.elements.devtools&&(this.vditor.devtools=new g),(u.upload.url||u.upload.handler)&&(this.vditor.upload=new dr),(0,b.G)(u._lutePath||"".concat(u.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){d.vditor.lute=(0,ku.X)({autoSpace:d.vditor.options.preview.markdown.autoSpace,gfmAutoLink:d.vditor.options.preview.markdown.gfmAutoLink,codeBlockPreview:d.vditor.options.preview.markdown.codeBlockPreview,emojiSite:d.vditor.options.hint.emojiPath,emojis:d.vditor.options.hint.emoji,fixTermTypo:d.vditor.options.preview.markdown.fixTermTypo,footnotes:d.vditor.options.preview.markdown.footnotes,headingAnchor:!1,inlineMathDigit:d.vditor.options.preview.math.inlineDigit,linkBase:d.vditor.options.preview.markdown.linkBase,linkPrefix:d.vditor.options.preview.markdown.linkPrefix,listStyle:d.vditor.options.preview.markdown.listStyle,mark:d.vditor.options.preview.markdown.mark,mathBlockPreview:d.vditor.options.preview.markdown.mathBlockPreview,paragraphBeginningSpace:d.vditor.options.preview.markdown.paragraphBeginningSpace,sanitize:d.vditor.options.preview.markdown.sanitize,toc:d.vditor.options.preview.markdown.toc}),d.vditor.preview=new Tu(d.vditor),Ae(d.vditor),u.after&&u.after(),u.icon&&(0,b.J)("".concat(u.cdn,"/dist/js/icons/").concat(u.icon,".js"),"vditorIconScript")}))},a}(h.default);const Nd=_d})(),l=l.default,l})()})})(i3);var ak=i3.exports;const ok=o6(ak),sk=Object.freeze(Object.defineProperty({__proto__:null,default:ok},Symbol.toStringTag,{value:"Module"}));Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const a3=new tn.Renderer;a3.image=function(t,e,n){let r="";if(typeof t=="string")r=t;else{if(t==null)return'<div class="markdown-error">图片链接为空</div>';if(typeof t=="object")if(t.href)r=String(t.href);else if(t.url)r=String(t.url);else if(t.src)r=String(t.src);else return'<div class="markdown-error">图片链接格式错误</div>';else if(typeof t.toString=="function")r=t.toString();else return'<div class="markdown-error">图片链接格式错误</div>'}let o=r;r.includes("cdn-mineru.openxlab.org.cn")&&(o=`/proxy-image${r.replace("https://cdn-mineru.openxlab.org.cn","")}`);const l=n||"图片",h=e?` title="${e}"`:"";return`<img src="${o}" alt="${l}"${h} class="markdown-image" style="max-width: 200px; max-height: 150px; object-fit: contain; display: block; margin: 4px auto; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);" />`};tn.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:a3});const lk=t=>{if(!t||typeof t!="string")return"";try{const e=ck(t),n=tn.parse(e);return uk(n)}catch(e){return`<div class="markdown-error">渲染失败: ${e.message}</div>`}},ck=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,n)=>{try{return`<div class="math-block">${lg.renderToString(n.trim(),{displayMode:!0,throwOnError:!1})}</div>`}catch{return`<div class="math-error">数学公式错误: ${n}</div>`}}).replace(/\$([^$\n]+?)\$/g,(e,n)=>{if(n.includes("\\")||n.includes("{")||n.includes("}")||n.includes("^")||n.includes("_")||n.includes("=")||n.includes("+")||n.includes("-")||n.includes("*")||n.includes("/")||n.includes("(")||n.includes(")"))try{return`<span class="math-inline">${lg.renderToString(n.trim(),{displayMode:!1,throwOnError:!1})}</span>`}catch{return`<span class="math-error">数学公式错误: ${n}</span>`}return e}),uk=t=>{let e=t.replace(/<table>/g,'<table class="markdown-table">').replace(/<pre><code/g,'<pre class="markdown-code"><code');const n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll("pre code").forEach(r=>{const o=r.className.match(/language-(\w+)/);if(o)try{r.innerHTML=Mm.highlight(r.textContent,Mm.languages[o[1]],o[1])}catch{}}),n.innerHTML};function dk(t,e){return async function(...n){const r=this.before[e];r&&!await r.apply(this,n)||t.apply(this,n)}}const cg=Object.keys($v),o3={};for(let t=0;t<cg.length;t++){const e=cg[t];o3[e]=dk($v[e],e)}const hk={getObjById:ec,generateNewObj:fy,layout:Ey,linkDiv:v7,editTopic:p7,editTableNode:f7,convertTableHTMLToMarkdown:m7,renderMarkdownToHTML:lk,createWrapper:c7,createParent:u7,createChildren:d7,createTopic:h7,findEle:Nv,changeTheme:V7,...H8,...o3,...Y8,...cw,...xw,init(t){if(t=JSON.parse(JSON.stringify(t)),!t||!t.nodeData)return new Error("MindElixir: `data` is required");t.direction!==void 0&&(this.direction=t.direction),this.changeTheme(t.theme||this.theme,!1),this.nodeData=t.nodeData,ho(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&P7(this),this.keypress&&xy(this,this.keypress),this.editable&&U7(this),this.contextMenu&&this.disposable.push(b7(this,this.contextMenu)),this.draggable&&this.disposable.push(k7(this)),this.allowUndo&&this.disposable.push(E7(this)),this.layout(),this.linkDiv(),this.toCenter()},destroy(){var t;this.disposable.forEach(e=>e()),this.el&&(this.el.innerHTML=""),this.el=void 0,this.nodeData=void 0,this.arrows=void 0,this.summaries=void 0,this.currentArrow=void 0,this.currentNodes=void 0,this.currentSummary=void 0,this.waitCopy=void 0,this.theme=void 0,this.direction=void 0,this.bus=void 0,this.container=void 0,this.map=void 0,this.lines=void 0,this.linkController=void 0,this.linkSvgGroup=void 0,this.P2=void 0,this.P3=void 0,this.line1=void 0,this.line2=void 0,this.nodes=void 0,(t=this.selection)==null||t.destroy(),this.selection=void 0}};function pk({pT:t,pL:e,pW:n,pH:r,cT:o,cL:l,cW:h,cH:c,direction:p,containerHeight:v}){let b=e+n/2;const g=t+r/2;let m;p===ci.LHS?m=l+h:m=l;const x=o+c/2,w=(1-Math.abs(x-g)/v)*.25*(n/2);return p===ci.LHS?b=b-n/10-w:b=b+n/10+w,`M ${b} ${g} Q ${b} ${x} ${m} ${x}`}function fk({pT:t,pL:e,pW:n,pH:r,cT:o,cL:l,cW:h,cH:c,direction:p,isFirst:v}){let b=e+n/2;const g=t+r/2;let m;p===ci.LHS?m=l+h-31:m=l+31;const x=o+c/2,w=this.container.offsetHeight||1e3,S=(1-Math.abs(x-g)/w)*.25*(n/2);return p===ci.LHS?b=b-n/10-S:b=b+n/10+S,`M ${b} ${g} Q ${b} ${x} ${m} ${x}`}const mk="5.1.1";function gk(t){return{x:0,y:0,moved:!1,mousedown:!1,onMove(e,n){this.mousedown&&(this.moved=!0,t.move(e,n))},clear(){this.mousedown=!1}}}const ll=document;function tr({el:t,direction:e,locale:n,draggable:r,editable:o,contextMenu:l,toolBar:h,keypress:c,mouseSelectionButton:p,selectionContainer:v,before:b,newTopicName:g,allowUndo:m,generateMainBranch:x,generateSubBranch:w,overflowHidden:S,theme:k,alignment:C,scaleSensitivity:T,scaleMax:A,scaleMin:M,handleWheel:y,markdown:N,imageProxy:z,enableNodeBorder:F}){let P=null;const Y=Object.prototype.toString.call(t);if(Y==="[object HTMLDivElement]"?P=t:Y==="[object String]"&&(P=document.querySelector(t)),!P)throw new Error("MindElixir: el is not a valid element");P.style.position="relative",P.innerHTML="",this.el=P,this.disposable=[],this.before=b||{},this.locale=n||"en",this.newTopicName=g||"New Node",this.contextMenu=l??!0,this.toolBar=h??!0,this.keypress=c??!0,this.mouseSelectionButton=p??0,this.direction=e??1,this.draggable=r??!0,this.editable=o??!0,this.allowUndo=m??!0,this.scaleSensitivity=T??.1,this.scaleMax=A??1.4,this.scaleMin=M??.2,this.generateMainBranch=x||pk,this.generateSubBranch=w||fk,this.overflowHidden=S??!1,this.alignment=C??"root",this.handleWheel=y??!0,this.markdown=N||void 0,this.imageProxy=z||void 0,this.enableNodeBorder=F??!1,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=gk(this),this.bus=Sy(),this.container=ll.createElement("div"),this.selectionContainer=v||this.container,this.container.className="map-container";const te=window.matchMedia("(prefers-color-scheme: dark)");this.theme=k||(te.matches?Xp:Kp);const de=ll.createElement("div");de.className="map-canvas",this.map=de,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=ll.createElement("me-nodes"),this.lines=fl("lines"),this.summarySvg=fl("summary"),this.linkController=fl("linkcontroller"),this.P2=ll.createElement("div"),this.P3=ll.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=om(),this.line2=om(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=fl("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(ky(this))}tr.prototype=hk;Object.defineProperty(tr.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0});tr.LEFT=0;tr.RIGHT=1;tr.SIDE=2;tr.THEME=Kp;tr.DARK_THEME=Xp;tr.version=mk;tr.E=Nv;tr.new=t=>({nodeData:{id:$o(),topic:t||"new topic",children:[]}});function $f(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Go=$f();function s3(t){Go=t}var Cl={exec:()=>null};function cn(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(o,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(Ar.caret,"$1"),n=n.replace(o,h),r},getRegex:()=>new RegExp(n,e)};return r}var Ar={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},vk=/^(?:[ \t]*(?:\n|$))+/,bk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,wk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Uf=/(?:[*+-]|\d{1,9}[.)])/,l3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,c3=cn(l3).replace(/bull/g,Uf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),xk=cn(l3).replace(/bull/g,Uf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Vf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kk=/^[^\n]+/,Wf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Sk=cn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ek=cn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Uf).getRegex(),Jc="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Gf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Tk=cn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Gf).replace("tag",Jc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),u3=cn(Vf).replace("hr",Xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jc).getRegex(),Ak=cn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",u3).getRegex(),Kf={blockquote:Ak,code:bk,def:Sk,fences:yk,heading:wk,hr:Xl,html:Tk,lheading:c3,list:Ek,newline:vk,paragraph:u3,table:Cl,text:kk},ug=cn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jc).getRegex(),Mk={...Kf,lheading:xk,table:ug,paragraph:cn(Vf).replace("hr",Xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ug).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jc).getRegex()},Ck={...Kf,html:cn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Gf).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Cl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:cn(Vf).replace("hr",Xl).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",c3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,_k=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,d3=/^( {2,}|\\)\n(?!\s*$)/,Nk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qc=/[\p{P}\p{S}]/u,Xf=/[\s\p{P}\p{S}]/u,h3=/[^\s\p{P}\p{S}]/u,Dk=cn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xf).getRegex(),p3=/(?!~)[\p{P}\p{S}]/u,Rk=/(?!~)[\s\p{P}\p{S}]/u,Ik=/(?:[^\s\p{P}\p{S}]|~)/u,Ok=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,f3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Hk=cn(f3,"u").replace(/punct/g,Qc).getRegex(),Pk=cn(f3,"u").replace(/punct/g,p3).getRegex(),m3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zk=cn(m3,"gu").replace(/notPunctSpace/g,h3).replace(/punctSpace/g,Xf).replace(/punct/g,Qc).getRegex(),Bk=cn(m3,"gu").replace(/notPunctSpace/g,Ik).replace(/punctSpace/g,Rk).replace(/punct/g,p3).getRegex(),Fk=cn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,h3).replace(/punctSpace/g,Xf).replace(/punct/g,Qc).getRegex(),qk=cn(/\\(punct)/,"gu").replace(/punct/g,Qc).getRegex(),jk=cn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),$k=cn(Gf).replace("(?:-->|$)","-->").getRegex(),Uk=cn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",$k).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,Vk=cn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",gc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),g3=cn(/^!?\[(label)\]\[(ref)\]/).replace("label",gc).replace("ref",Wf).getRegex(),v3=cn(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wf).getRegex(),Wk=cn("reflink|nolink(?!\\()","g").replace("reflink",g3).replace("nolink",v3).getRegex(),Zf={_backpedal:Cl,anyPunctuation:qk,autolink:jk,blockSkip:Ok,br:d3,code:_k,del:Cl,emStrongLDelim:Hk,emStrongRDelimAst:zk,emStrongRDelimUnd:Fk,escape:Lk,link:Vk,nolink:v3,punctuation:Dk,reflink:g3,reflinkSearch:Wk,tag:Uk,text:Nk,url:Cl},Gk={...Zf,link:cn(/^!?\[(label)\]\((.*?)\)/).replace("label",gc).getRegex(),reflink:cn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",gc).getRegex()},lp={...Zf,emStrongRDelimAst:Bk,emStrongLDelim:Pk,url:cn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Kk={...lp,br:cn(d3).replace("{2,}","*").getRegex(),text:cn(lp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},w0={normal:Kf,gfm:Mk,pedantic:Ck},cl={normal:Zf,gfm:lp,breaks:Kk,pedantic:Gk},Xk={"&":"&","<":"<",">":">",'"':""","'":"'"},dg=t=>Xk[t];function Ii(t,e){if(e){if(Ar.escapeTest.test(t))return t.replace(Ar.escapeReplace,dg)}else if(Ar.escapeTestNoEncode.test(t))return t.replace(Ar.escapeReplaceNoEncode,dg);return t}function hg(t){try{t=encodeURI(t).replace(Ar.percentDecode,"%")}catch{return null}return t}function pg(t,e){var l;let n=t.replace(Ar.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),r=n.split(Ar.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((l=r.at(-1))!=null&&l.trim())&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Ar.slashPipe,"|");return r}function ul(t,e,n){let r=t.length;if(r===0)return"";let o=0;for(;o<r;){let l=t.charAt(r-o-1);if(l===e&&!n)o++;else if(l!==e&&n)o++;else break}return t.slice(0,r-o)}function Zk(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function fg(t,e,n,r,o){let l=e.href,h=e.title||null,c=t[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:h,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,p}function Yk(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let o=r[1];return e.split(`
|
||
`).map(l=>{let h=l.match(n.other.beginningSpace);if(h===null)return l;let[c]=h;return c.length>=o.length?l.slice(o.length):l}).join(`
|
||
`)}var vc=class{constructor(t){mn(this,"options");mn(this,"rules");mn(this,"lexer");this.options=t||Go}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ul(n,`
|
||
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=Yk(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=ul(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ul(e[0],`
|
||
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=ul(e[0],`
|
||
`).split(`
|
||
`),r="",o="",l=[];for(;n.length>0;){let h=!1,c=[],p;for(p=0;p<n.length;p++)if(this.rules.other.blockquoteStart.test(n[p]))c.push(n[p]),h=!0;else if(!h)c.push(n[p]);else break;n=n.slice(p);let v=c.join(`
|
||
`),b=v.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
||
${v}`:v,o=o?`${o}
|
||
${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,l,!0),this.lexer.state.top=g,n.length===0)break;let m=l.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let x=m,w=x.raw+`
|
||
`+n.join(`
|
||
`),S=this.blockquote(w);l[l.length-1]=S,r=r.substring(0,r.length-x.raw.length)+S.raw,o=o.substring(0,o.length-x.text.length)+S.text;break}else if((m==null?void 0:m.type)==="list"){let x=m,w=x.raw+`
|
||
`+n.join(`
|
||
`),S=this.list(w);l[l.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:o}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let l=this.rules.other.listItemRegex(n),h=!1;for(;t;){let p=!1,v="",b="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;v=e[0],t=t.substring(v.length);let g=e[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),m=t.split(`
|
||
`,1)[0],x=!g.trim(),w=0;if(this.options.pedantic?(w=2,b=g.trimStart()):x?w=e[1].length+1:(w=e[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,b=g.slice(w),w+=e[1].length),x&&this.rules.other.blankLine.test(m)&&(v+=m+`
|
||
`,t=t.substring(m.length+1),p=!0),!p){let C=this.rules.other.nextBulletRegex(w),T=this.rules.other.hrRegex(w),A=this.rules.other.fencesBeginRegex(w),M=this.rules.other.headingBeginRegex(w),y=this.rules.other.htmlBeginRegex(w);for(;t;){let N=t.split(`
|
||
`,1)[0],z;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),z=m):z=m.replace(this.rules.other.tabCharGlobal," "),A.test(m)||M.test(m)||y.test(m)||C.test(m)||T.test(m))break;if(z.search(this.rules.other.nonSpaceChar)>=w||!m.trim())b+=`
|
||
`+z.slice(w);else{if(x||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(g)||M.test(g)||T.test(g))break;b+=`
|
||
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
|
||
`,t=t.substring(N.length+1),g=z.slice(w)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(h=!0));let S=null,k;this.options.gfm&&(S=this.rules.other.listIsTask.exec(b),S&&(k=S[0]!=="[ ] ",b=b.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),o.raw+=v}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p=0;p<o.items.length;p++)if(this.lexer.state.top=!1,o.items[p].tokens=this.lexer.blockTokens(o.items[p].text,[]),!o.loose){let v=o.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));o.loose=b}if(o.loose)for(let p=0;p<o.items.length;p++)o.items[p].loose=!0;return o}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:o}}}table(t){var h;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=pg(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=e[3])!=null&&h.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],l={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let c of r)this.rules.other.tableAlignRight.test(c)?l.align.push("right"):this.rules.other.tableAlignCenter.test(c)?l.align.push("center"):this.rules.other.tableAlignLeft.test(c)?l.align.push("left"):l.align.push(null);for(let c=0;c<n.length;c++)l.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:l.align[c]});for(let c of o)l.rows.push(pg(c,l.header.length).map((p,v)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:l.align[v]})));return l}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
||
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=ul(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=Zk(e[2],"()");if(l===-2)return;if(l>-1){let h=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,h).trim(),e[3]=""}}let r=e[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],o=l[3])}else o=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),fg(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[r.toLowerCase()];if(!o){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return fg(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,l,h,c=o,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+o);(r=v.exec(e))!=null;){if(l=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!l)continue;if(h=[...l].length,r[3]||r[4]){c+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){p+=h;continue}if(c-=h,c>0)continue;h=Math.min(h,h+c+p);let b=[...r[0]][0].length,g=t.slice(0,o+r.index+b+h);if(Math.min(o,h)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let r,o;if(e[2]==="@")r=e[0],o="mailto:"+r;else{let l;do l=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(l!==e[0]);r=e[0],e[1]==="www."?o="http://"+e[0]:o=e[0]}return{type:"link",raw:e[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},wa=class cp{constructor(e){mn(this,"tokens");mn(this,"options");mn(this,"state");mn(this,"tokenizer");mn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Go,this.options.tokenizer=this.options.tokenizer||new vc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ar,block:w0.normal,inline:cl.normal};this.options.pedantic?(n.block=w0.pedantic,n.inline=cl.pedantic):this.options.gfm&&(n.block=w0.gfm,this.options.breaks?n.inline=cl.breaks:n.inline=cl.gfm),this.tokenizer.rules=n}static get rules(){return{block:w0,inline:cl}}static lex(e,n){return new cp(n).lex(e)}static lexInline(e,n){return new cp(n).inlineTokens(e)}lex(e){e=e.replace(Ar.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){var o,l,h;for(this.options.pedantic&&(e=e.replace(Ar.tabCharGlobal," ").replace(Ar.spaceLine,""));e;){let c;if((l=(o=this.options.extensions)==null?void 0:o.block)!=null&&l.some(v=>(c=v.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);let v=n.at(-1);c.raw.length===1&&v!==void 0?v.raw+=`
|
||
`:n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="paragraph"||(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let p=e;if((h=this.options.extensions)!=null&&h.startBlock){let v=1/0,b=e.slice(1),g;this.options.extensions.startBlock.forEach(m=>{g=m.call({lexer:this},b),typeof g=="number"&&g>=0&&(v=Math.min(v,g))}),v<1/0&&v>=0&&(p=e.substring(0,v+1))}if(this.state.top&&(c=this.tokenizer.paragraph(p))){let v=n.at(-1);r&&(v==null?void 0:v.type)==="paragraph"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c),r=p.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=(v.raw.endsWith(`
|
||
`)?"":`
|
||
`)+c.raw,v.text+=`
|
||
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):n.push(c);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var c,p,v;let r=e,o=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)b.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let l=!1,h="";for(;e;){l||(h=""),l=!1;let b;if((p=(c=this.options.extensions)==null?void 0:c.inline)!=null&&p.some(m=>(b=m.call({lexer:this},e,n))?(e=e.substring(b.raw.length),n.push(b),!0):!1))continue;if(b=this.tokenizer.escape(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.tag(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.link(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(b.raw.length);let m=n.at(-1);b.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(b=this.tokenizer.emStrong(e,r,h)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.codespan(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.br(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.del(e)){e=e.substring(b.raw.length),n.push(b);continue}if(b=this.tokenizer.autolink(e)){e=e.substring(b.raw.length),n.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(e))){e=e.substring(b.raw.length),n.push(b);continue}let g=e;if((v=this.options.extensions)!=null&&v.startInline){let m=1/0,x=e.slice(1),w;this.options.extensions.startInline.forEach(S=>{w=S.call({lexer:this},x),typeof w=="number"&&w>=0&&(m=Math.min(m,w))}),m<1/0&&m>=0&&(g=e.substring(0,m+1))}if(b=this.tokenizer.inlineText(g)){e=e.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(h=b.raw.slice(-1)),l=!0;let m=n.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=b.raw,m.text+=b.text):n.push(b);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return n}},bc=class{constructor(t){mn(this,"options");mn(this,"parser");this.options=t||Go}space(t){return""}code({text:t,lang:e,escaped:n}){var l;let r=(l=(e||"").match(Ar.notSpaceStart))==null?void 0:l[0],o=t.replace(Ar.endingNewline,"")+`
|
||
`;return r?'<pre><code class="language-'+Ii(r)+'">'+(n?o:Ii(o,!0))+`</code></pre>
|
||
`:"<pre><code>"+(n?o:Ii(o,!0))+`</code></pre>
|
||
`}blockquote({tokens:t}){return`<blockquote>
|
||
${this.parser.parse(t)}</blockquote>
|
||
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
||
`}hr(t){return`<hr>
|
||
`}list(t){let e=t.ordered,n=t.start,r="";for(let h=0;h<t.items.length;h++){let c=t.items[h];r+=this.listitem(c)}let o=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+o+l+`>
|
||
`+r+"</"+o+`>
|
||
`}listitem(t){var n;let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?((n=t.tokens[0])==null?void 0:n.type)==="paragraph"?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=r+" "+Ii(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
|
||
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
||
`}table(t){let e="",n="";for(let o=0;o<t.header.length;o++)n+=this.tablecell(t.header[o]);e+=this.tablerow({text:n});let r="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];n="";for(let h=0;h<l.length;h++)n+=this.tablecell(l[h]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
||
<thead>
|
||
`+e+`</thead>
|
||
`+r+`</table>
|
||
`}tablerow({text:t}){return`<tr>
|
||
${t}</tr>
|
||
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
||
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ii(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let r=this.parser.parseInline(n),o=hg(t);if(o===null)return r;t=o;let l='<a href="'+t+'"';return e&&(l+=' title="'+Ii(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=hg(t);if(o===null)return Ii(n);t=o;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Ii(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ii(t.text)}},Yf=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},xa=class up{constructor(e){mn(this,"options");mn(this,"renderer");mn(this,"textRenderer");this.options=e||Go,this.options.renderer=this.options.renderer||new bc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Yf}static parse(e,n){return new up(n).parse(e)}static parseInline(e,n){return new up(n).parseInline(e)}parse(e,n=!0){var o,l;let r="";for(let h=0;h<e.length;h++){let c=e[h];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[c.type]){let v=c,b=this.options.extensions.renderers[v.type].call({parser:this},v);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(v.type)){r+=b||"";continue}}let p=c;switch(p.type){case"space":{r+=this.renderer.space(p);continue}case"hr":{r+=this.renderer.hr(p);continue}case"heading":{r+=this.renderer.heading(p);continue}case"code":{r+=this.renderer.code(p);continue}case"table":{r+=this.renderer.table(p);continue}case"blockquote":{r+=this.renderer.blockquote(p);continue}case"list":{r+=this.renderer.list(p);continue}case"html":{r+=this.renderer.html(p);continue}case"def":{r+=this.renderer.def(p);continue}case"paragraph":{r+=this.renderer.paragraph(p);continue}case"text":{let v=p,b=this.renderer.text(v);for(;h+1<e.length&&e[h+1].type==="text";)v=e[++h],b+=`
|
||
`+this.renderer.text(v);n?r+=this.renderer.paragraph({type:"paragraph",raw:b,text:b,tokens:[{type:"text",raw:b,text:b,escaped:!0}]}):r+=b;continue}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return r}parseInline(e,n=this.renderer){var o,l;let r="";for(let h=0;h<e.length;h++){let c=e[h];if((l=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&l[c.type]){let v=this.options.extensions.renderers[c.type].call({parser:this},c);if(v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){r+=v||"";continue}}let p=c;switch(p.type){case"escape":{r+=n.text(p);break}case"html":{r+=n.html(p);break}case"link":{r+=n.link(p);break}case"image":{r+=n.image(p);break}case"strong":{r+=n.strong(p);break}case"em":{r+=n.em(p);break}case"codespan":{r+=n.codespan(p);break}case"br":{r+=n.br(p);break}case"del":{r+=n.del(p);break}case"text":{r+=n.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return r}},Mh,B0=(Mh=class{constructor(t){mn(this,"options");mn(this,"block");this.options=t||Go}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?wa.lex:wa.lexInline}provideParser(){return this.block?xa.parse:xa.parseInline}},mn(Mh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Mh),Jk=class{constructor(...t){mn(this,"defaults",$f());mn(this,"options",this.setOptions);mn(this,"parse",this.parseMarkdown(!0));mn(this,"parseInline",this.parseMarkdown(!1));mn(this,"Parser",xa);mn(this,"Renderer",bc);mn(this,"TextRenderer",Yf);mn(this,"Lexer",wa);mn(this,"Tokenizer",vc);mn(this,"Hooks",B0);this.use(...t)}walkTokens(t,e){var r,o;let n=[];for(let l of t)switch(n=n.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)n=n.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)n=n.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;n=n.concat(this.walkTokens(h.items,e));break}default:{let h=l;(o=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(c=>{let p=h[c].flat(1/0);n=n.concat(this.walkTokens(p,e))}):h.tokens&&(n=n.concat(this.walkTokens(h.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=e.renderers[o.name];l?e.renderers[o.name]=function(...h){let c=o.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[o.level];l?l.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new bc(this.defaults);for(let l in n.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new vc(this.defaults);for(let l in n.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=o[h];o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new B0;for(let l in n.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=o[h];B0.passThroughHooks.has(l)?o[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(o,v)).then(g=>p.call(o,g));let b=c.call(o,v);return p.call(o,b)}:o[h]=(...v)=>{let b=c.apply(o,v);return b===!1&&(b=p.apply(o,v)),b}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),o&&(c=c.concat(o.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return wa.lex(t,e??this.defaults)}parser(t,e){return xa.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},o={...this.defaults,...r},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let h=o.hooks?o.hooks.provideLexer():t?wa.lex:wa.lexInline,c=o.hooks?o.hooks.provideParser():t?xa.parse:xa.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(p=>h(p,o)).then(p=>o.hooks?o.hooks.processAllTokens(p):p).then(p=>o.walkTokens?Promise.all(this.walkTokens(p,o.walkTokens)).then(()=>p):p).then(p=>c(p,o)).then(p=>o.hooks?o.hooks.postprocess(p):p).catch(l);try{o.hooks&&(e=o.hooks.preprocess(e));let p=h(e,o);o.hooks&&(p=o.hooks.processAllTokens(p)),o.walkTokens&&this.walkTokens(p,o.walkTokens);let v=c(p,o);return o.hooks&&(v=o.hooks.postprocess(v)),v}catch(p){return l(p)}}}onError(t,e){return n=>{if(n.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+Ii(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},qo=new Jk;function Zt(t,e){return qo.parse(t,e)}Zt.options=Zt.setOptions=function(t){return qo.setOptions(t),Zt.defaults=qo.defaults,s3(Zt.defaults),Zt};Zt.getDefaults=$f;Zt.defaults=Go;Zt.use=function(...t){return qo.use(...t),Zt.defaults=qo.defaults,s3(Zt.defaults),Zt};Zt.walkTokens=function(t,e){return qo.walkTokens(t,e)};Zt.parseInline=qo.parseInline;Zt.Parser=xa;Zt.parser=xa.parse;Zt.Renderer=bc;Zt.TextRenderer=Yf;Zt.Lexer=wa;Zt.lexer=wa.lex;Zt.Tokenizer=vc;Zt.Hooks=B0;Zt.parse=Zt;Zt.options;Zt.setOptions;Zt.use;Zt.walkTokens;Zt.parseInline;xa.parse;wa.lex;var b3={exports:{}};(function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||
*
|
||
* @license MIT <https://opensource.org/licenses/MIT>
|
||
* @author Lea Verou <https://lea.verou.me>
|
||
* @namespace
|
||
* @public
|
||
*/var n=function(r){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,h={},c={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function T(A){return A instanceof p?new p(A.type,T(A.content),A.alias):Array.isArray(A)?A.map(T):A.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(T){return Object.prototype.toString.call(T).slice(8,-1)},objId:function(T){return T.__id||Object.defineProperty(T,"__id",{value:++l}),T.__id},clone:function T(A,M){M=M||{};var y,N;switch(c.util.type(A)){case"Object":if(N=c.util.objId(A),M[N])return M[N];y={},M[N]=y;for(var z in A)A.hasOwnProperty(z)&&(y[z]=T(A[z],M));return y;case"Array":return N=c.util.objId(A),M[N]?M[N]:(y=[],M[N]=y,A.forEach(function(F,P){y[P]=T(F,M)}),y);default:return A}},getLanguage:function(T){for(;T;){var A=o.exec(T.className);if(A)return A[1].toLowerCase();T=T.parentElement}return"none"},setLanguage:function(T,A){T.className=T.className.replace(RegExp(o,"gi"),""),T.classList.add("language-"+A)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT"&&1<2)return document.currentScript;try{throw new Error}catch(y){var T=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(T){var A=document.getElementsByTagName("script");for(var M in A)if(A[M].src==T)return A[M]}return null}},isActive:function(T,A,M){for(var y="no-"+A;T;){var N=T.classList;if(N.contains(A))return!0;if(N.contains(y))return!1;T=T.parentElement}return!!M}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(T,A){var M=c.util.clone(c.languages[T]);for(var y in A)M[y]=A[y];return M},insertBefore:function(T,A,M,y){y=y||c.languages;var N=y[T],z={};for(var F in N)if(N.hasOwnProperty(F)){if(F==A)for(var P in M)M.hasOwnProperty(P)&&(z[P]=M[P]);M.hasOwnProperty(F)||(z[F]=N[F])}var Y=y[T];return y[T]=z,c.languages.DFS(c.languages,function(te,de){de===Y&&te!=T&&(this[te]=z)}),z},DFS:function T(A,M,y,N){N=N||{};var z=c.util.objId;for(var F in A)if(A.hasOwnProperty(F)){M.call(A,F,A[F],y||F);var P=A[F],Y=c.util.type(P);Y==="Object"&&!N[z(P)]?(N[z(P)]=!0,T(P,M,null,N)):Y==="Array"&&!N[z(P)]&&(N[z(P)]=!0,T(P,M,F,N))}}},plugins:{},highlightAll:function(T,A){c.highlightAllUnder(document,T,A)},highlightAllUnder:function(T,A,M){var y={callback:M,container:T,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",y),y.elements=Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)),c.hooks.run("before-all-elements-highlight",y);for(var N=0,z;z=y.elements[N++];)c.highlightElement(z,A===!0,y.callback)},highlightElement:function(T,A,M){var y=c.util.getLanguage(T),N=c.languages[y];c.util.setLanguage(T,y);var z=T.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(z,y);var F=T.textContent,P={element:T,language:y,grammar:N,code:F};function Y(de){P.highlightedCode=de,c.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,c.hooks.run("after-highlight",P),c.hooks.run("complete",P),M&&M.call(P.element)}if(c.hooks.run("before-sanity-check",P),z=P.element.parentElement,z&&z.nodeName.toLowerCase()==="pre"&&!z.hasAttribute("tabindex")&&z.setAttribute("tabindex","0"),!P.code){c.hooks.run("complete",P),M&&M.call(P.element);return}if(c.hooks.run("before-highlight",P),!P.grammar){Y(c.util.encode(P.code));return}if(A&&r.Worker){var te=new Worker(c.filename);te.onmessage=function(de){Y(de.data)},te.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else Y(c.highlight(P.code,P.grammar,P.language))},highlight:function(T,A,M){var y={code:T,grammar:A,language:M};if(c.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=c.tokenize(y.code,y.grammar),c.hooks.run("after-tokenize",y),p.stringify(c.util.encode(y.tokens),y.language)},tokenize:function(T,A){var M=A.rest;if(M){for(var y in M)A[y]=M[y];delete A.rest}var N=new g;return m(N,N.head,T),b(T,N,A,N.head,0),w(N)},hooks:{all:{},add:function(T,A){var M=c.hooks.all;M[T]=M[T]||[],M[T].push(A)},run:function(T,A){var M=c.hooks.all[T];if(!(!M||!M.length))for(var y=0,N;N=M[y++];)N(A)}},Token:p};r.Prism=c;function p(T,A,M,y){this.type=T,this.content=A,this.alias=M,this.length=(y||"").length|0}p.stringify=function T(A,M){if(typeof A=="string")return A;if(Array.isArray(A)){var y="";return A.forEach(function(Y){y+=T(Y,M)}),y}var N={type:A.type,content:T(A.content,M),tag:"span",classes:["token",A.type],attributes:{},language:M},z=A.alias;z&&(Array.isArray(z)?Array.prototype.push.apply(N.classes,z):N.classes.push(z)),c.hooks.run("wrap",N);var F="";for(var P in N.attributes)F+=" "+P+'="'+(N.attributes[P]||"").replace(/"/g,""")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+F+">"+N.content+"</"+N.tag+">"};function v(T,A,M,y){T.lastIndex=A;var N=T.exec(M);if(N&&y&&N[1]){var z=N[1].length;N.index+=z,N[0]=N[0].slice(z)}return N}function b(T,A,M,y,N,z){for(var F in M)if(!(!M.hasOwnProperty(F)||!M[F])){var P=M[F];P=Array.isArray(P)?P:[P];for(var Y=0;Y<P.length;++Y){if(z&&z.cause==F+","+Y)return;var te=P[Y],de=te.inside,Ce=!!te.lookbehind,qe=!!te.greedy,Ge=te.alias;if(qe&&!te.pattern.global){var nt=te.pattern.toString().match(/[imsuy]*$/)[0];te.pattern=RegExp(te.pattern.source,nt+"g")}for(var je=te.pattern||te,Ne=y.next,tt=N;Ne!==A.tail&&!(z&&tt>=z.reach);tt+=Ne.value.length,Ne=Ne.next){var lt=Ne.value;if(A.length>T.length)return;if(!(lt instanceof p)){var Qe=1,j;if(qe){if(j=v(je,tt,T,Ce),!j||j.index>=T.length)break;var Nt=j.index,Ht=j.index+j[0].length,Rt=tt;for(Rt+=Ne.value.length;Nt>=Rt;)Ne=Ne.next,Rt+=Ne.value.length;if(Rt-=Ne.value.length,tt=Rt,Ne.value instanceof p)continue;for(var Ut=Ne;Ut!==A.tail&&(Rt<Ht||typeof Ut.value=="string");Ut=Ut.next)Qe++,Rt+=Ut.value.length;Qe--,lt=T.slice(tt,Rt),j.index-=tt}else if(j=v(je,0,lt,Ce),!j)continue;var Nt=j.index,oe=j[0],he=lt.slice(0,Nt),J=lt.slice(Nt+oe.length),ee=tt+lt.length;z&&ee>z.reach&&(z.reach=ee);var De=Ne.prev;he&&(De=m(A,De,he),tt+=he.length),x(A,De,Qe);var se=new p(F,de?c.tokenize(oe,de):oe,Ge,oe);if(Ne=m(A,De,se),J&&m(A,Ne,J),Qe>1){var V={cause:F+","+Y,reach:ee};b(T,A,M,Ne.prev,tt,V),z&&V.reach>z.reach&&(z.reach=V.reach)}}}}}}function g(){var T={value:null,prev:null,next:null},A={value:null,prev:T,next:null};T.next=A,this.head=T,this.tail=A,this.length=0}function m(T,A,M){var y=A.next,N={value:M,prev:A,next:y};return A.next=N,y.prev=N,T.length++,N}function x(T,A,M){for(var y=A.next,N=0;N<M&&y!==T.tail;N++)y=y.next;A.next=y,y.prev=A,T.length-=N}function w(T){for(var A=[],M=T.head.next;M!==T.tail;)A.push(M.value),M=M.next;return A}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(T){var A=JSON.parse(T.data),M=A.language,y=A.code,N=A.immediateClose;r.postMessage(c.highlight(y,c.languages[M],M)),N&&r.close()},!1)),c;var S=c.util.currentScript();S&&(c.filename=S.src,S.hasAttribute("data-manual")&&(c.manual=!0));function k(){c.manual||c.highlightAll()}if(!c.manual){var C=document.readyState;C==="loading"||C==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",k):window.requestAnimationFrame?window.requestAnimationFrame(k):window.setTimeout(k,16)}return c}(e);t.exports&&(t.exports=n),typeof Bh<"u"&&(Bh.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(o,l){var h={};h["language-"+l]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[l]},h.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:h}};c["language-"+l]={pattern:/[\s\S]+/,inside:n.languages[l]};var p={};p[o]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return o}),"i"),lookbehind:!0,greedy:!0,inside:c},n.languages.insertBefore("markup","cdata",p)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,o){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[o,"language-"+o],inside:n.languages[o]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var o=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+o.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+o.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+o.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+o.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:o,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var l=r.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",o=function(S,k){return"✖ Error "+S+" while fetching file: "+k},l="✖ Error: File does not exist or is empty",h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},c="data-src-status",p="loading",v="loaded",b="failed",g="pre[data-src]:not(["+c+'="'+v+'"]):not(['+c+'="'+p+'"])';function m(S,k,C){var T=new XMLHttpRequest;T.open("GET",S,!0),T.onreadystatechange=function(){T.readyState==4&&(T.status<400&&T.responseText?k(T.responseText):T.status>=400?C(o(T.status,T.statusText)):C(l))},T.send(null)}function x(S){var k=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S||"");if(k){var C=Number(k[1]),T=k[2],A=k[3];return T?A?[C,Number(A)]:[C,void 0]:[C,C]}}n.hooks.add("before-highlightall",function(S){S.selector+=", "+g}),n.hooks.add("before-sanity-check",function(S){var k=S.element;if(k.matches(g)){S.code="",k.setAttribute(c,p);var C=k.appendChild(document.createElement("CODE"));C.textContent=r;var T=k.getAttribute("data-src"),A=S.language;if(A==="none"){var M=(/\.(\w+)$/.exec(T)||[,"none"])[1];A=h[M]||M}n.util.setLanguage(C,A),n.util.setLanguage(k,A);var y=n.plugins.autoloader;y&&y.loadLanguages(A),m(T,function(N){k.setAttribute(c,v);var z=x(k.getAttribute("data-range"));if(z){var F=N.split(/\r\n?|\n/g),P=z[0],Y=z[1]==null?F.length:z[1];P<0&&(P+=F.length),P=Math.max(0,Math.min(P-1,F.length)),Y<0&&(Y+=F.length),Y=Math.max(0,Math.min(Y,F.length)),N=F.slice(P,Y).join(`
|
||
`),k.hasAttribute("data-start")||k.setAttribute("data-start",String(P+1))}C.textContent=N,n.highlightElement(C)},function(N){k.setAttribute(c,b),C.textContent=N})}}),n.plugins.fileHighlight={highlight:function(k){for(var C=(k||document).querySelectorAll(g),T=0,A;A=C[T++];)n.highlightElement(A)}};var w=!1;n.fileHighlight=function(){w||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),w=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(b3);var Qk=b3.exports;const mg=vv(Qk);class Wr{constructor(e,n,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=n,this.end=r}static range(e,n){return n?!e||!e.loc||!n.loc||e.loc.lexer!==n.loc.lexer?null:new Wr(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class li{constructor(e,n){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=n}range(e,n){return new li(n,Wr.range(this,e))}}class Je{constructor(e,n){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r="KaTeX parse error: "+e,o,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;o=h.start,l=h.end,o===c.length?r+=" at end of input: ":r+=" at position "+(o+1)+": ";var p=c.slice(o,l).replace(/[^]/g,"$&̲"),v;o>15?v="…"+c.slice(o-15,o):v=c.slice(0,o);var b;l+15<c.length?b=c.slice(l,l+15)+"…":b=c.slice(l),r+=v+p+b}var g=new Error(r);return g.name="ParseError",g.__proto__=Je.prototype,g.position=o,o!=null&&l!=null&&(g.length=l-o),g.rawMessage=e,g}}Je.prototype.__proto__=Error.prototype;var eS=function(e,n){return e.indexOf(n)!==-1},tS=function(e,n){return e===void 0?n:e},nS=/([A-Z])/g,rS=function(e){return e.replace(nS,"-$1").toLowerCase()},iS={"&":"&",">":">","<":"<",'"':""","'":"'"},aS=/[&><"']/g;function oS(t){return String(t).replace(aS,e=>iS[e])}var y3=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},sS=function(e){var n=y3(e);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},lS=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},cS=function(e){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},xt={contains:eS,deflt:tS,escape:oS,hyphenate:rS,getBaseElem:y3,isCharacterBox:sS,protocolFromUrl:cS},F0={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:t=>"#"+t},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:(t,e)=>(e.push(t),e)},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:t=>Math.max(0,t),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:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function uS(t){if(t.default)return t.default;var e=t.type,n=Array.isArray(e)?e[0]:e;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Jf{constructor(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 n in F0)if(F0.hasOwnProperty(n)){var r=F0[n];this[n]=e[n]!==void 0?r.processor?r.processor(e[n]):e[n]:uS(r)}}reportNonstrict(e,n,r){var o=this.strict;if(typeof o=="function"&&(o=o(e,n,r)),!(!o||o==="ignore")){if(o===!0||o==="error")throw new Je("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),r);o==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,r){var o=this.strict;if(typeof o=="function")try{o=o(e,n,r)}catch{o="error"}return!o||o==="ignore"?!1:o===!0||o==="error"?!0:o==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+o+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var n=xt.protocolFromUrl(e.url);if(n==null)return!1;e.protocol=n}var r=typeof this.trust=="function"?this.trust(e):this.trust;return!!r}}class Va{constructor(e,n,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=n,this.cramped=r}sup(){return zi[dS[this.id]]}sub(){return zi[hS[this.id]]}fracNum(){return zi[pS[this.id]]}fracDen(){return zi[fS[this.id]]}cramp(){return zi[mS[this.id]]}text(){return zi[gS[this.id]]}isTight(){return this.size>=2}}var Qf=0,yc=1,fs=2,Ea=3,Pl=4,ii=5,bs=6,Mr=7,zi=[new Va(Qf,0,!1),new Va(yc,0,!0),new Va(fs,1,!1),new Va(Ea,1,!0),new Va(Pl,2,!1),new Va(ii,2,!0),new Va(bs,3,!1),new Va(Mr,3,!0)],dS=[Pl,ii,Pl,ii,bs,Mr,bs,Mr],hS=[ii,ii,ii,ii,Mr,Mr,Mr,Mr],pS=[fs,Ea,Pl,ii,bs,Mr,bs,Mr],fS=[Ea,Ea,ii,ii,Mr,Mr,Mr,Mr],mS=[yc,yc,Ea,Ea,ii,ii,Mr,Mr],gS=[Qf,yc,fs,Ea,fs,Ea,fs,Ea],At={DISPLAY:zi[Qf],TEXT:zi[fs],SCRIPT:zi[Pl],SCRIPTSCRIPT:zi[bs]},dp=[{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 vS(t){for(var e=0;e<dp.length;e++)for(var n=dp[e],r=0;r<n.blocks.length;r++){var o=n.blocks[r];if(t>=o[0]&&t<=o[1])return n.name}return null}var q0=[];dp.forEach(t=>t.blocks.forEach(e=>q0.push(...e)));function w3(t){for(var e=0;e<q0.length;e+=2)if(t>=q0[e]&&t<=q0[e+1])return!0;return!1}var ns=80,bS=function(e,n){return"M95,"+(622+e+n)+`
|
||
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
||
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
||
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
||
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
||
c69,-144,104.5,-217.7,106.5,-221
|
||
l`+e/2.075+" -"+e+`
|
||
c5.3,-9.3,12,-14,20,-14
|
||
H400000v`+(40+e)+`H845.2724
|
||
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
||
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
||
M`+(834+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},yS=function(e,n){return"M263,"+(601+e+n)+`c0.7,0,18,39.7,52,119
|
||
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
||
c340,-704.7,510.7,-1060.3,512,-1067
|
||
l`+e/2.084+" -"+e+`
|
||
c4.7,-7.3,11,-11,19,-11
|
||
H40000v`+(40+e)+`H1012.3
|
||
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
||
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
||
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
||
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
||
M`+(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},wS=function(e,n){return"M983 "+(10+e+n)+`
|
||
l`+e/3.13+" -"+e+`
|
||
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
||
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
||
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
||
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
||
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
||
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
||
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
||
M`+(1001+e)+" "+n+"h400000v"+(40+e)+"h-400000z"},xS=function(e,n){return"M424,"+(2398+e+n)+`
|
||
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
||
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
||
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
||
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
||
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
|
||
v`+(40+e)+`H1014.6
|
||
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
||
c-2,6,-10,9,-24,9
|
||
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+n+`
|
||
h400000v`+(40+e)+"h-400000z"},kS=function(e,n){return"M473,"+(2713+e+n)+`
|
||
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
|
||
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
||
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
||
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
||
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
||
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
||
606zM`+(1001+e)+" "+n+"h400000v"+(40+e)+"H1017.7z"},SS=function(e){var n=e/2;return"M400000 "+e+" H0 L"+n+" 0 l65 45 L145 "+(e-80)+" H400000z"},ES=function(e,n,r){var o=r-54-n-e;return"M702 "+(e+n)+"H400000"+(40+e)+`
|
||
H742v`+o+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
||
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
||
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
||
219 661 l218 661zM702 `+n+"H400000v"+(40+e)+"H742z"},TS=function(e,n,r){n=1e3*n;var o="";switch(e){case"sqrtMain":o=bS(n,ns);break;case"sqrtSize1":o=yS(n,ns);break;case"sqrtSize2":o=wS(n,ns);break;case"sqrtSize3":o=xS(n,ns);break;case"sqrtSize4":o=kS(n,ns);break;case"sqrtTall":o=ES(n,ns,r)}return o},AS=function(e,n){switch(e){case"⎜":return"M291 0 H417 V"+n+" H291z M291 0 H417 V"+n+" H291z";case"∣":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z";case"∥":return"M145 0 H188 V"+n+" H145z M145 0 H188 V"+n+" H145z"+("M367 0 H410 V"+n+" H367z M367 0 H410 V"+n+" H367z");case"⎟":return"M457 0 H583 V"+n+" H457z M457 0 H583 V"+n+" H457z";case"⎢":return"M319 0 H403 V"+n+" H319z M319 0 H403 V"+n+" H319z";case"⎥":return"M263 0 H347 V"+n+" H263z M263 0 H347 V"+n+" H263z";case"⎪":return"M384 0 H504 V"+n+" H384z M384 0 H504 V"+n+" H384z";case"⏐":return"M312 0 H355 V"+n+" H312z M312 0 H355 V"+n+" H312z";case"‖":return"M257 0 H300 V"+n+" H257z M257 0 H300 V"+n+" H257z"+("M478 0 H521 V"+n+" H478z M478 0 H521 V"+n+" H478z");default:return""}},gg={doubleleftarrow:`M262 157
|
||
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
||
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
||
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
||
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
||
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
||
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
||
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
||
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
||
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
||
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
||
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
||
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
||
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
||
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
||
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
||
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
||
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
||
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
||
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
||
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
||
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
||
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
||
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
||
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
||
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
||
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
||
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
||
435 0h399565z`,leftgroupunder:`M400000 262
|
||
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
||
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
||
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
||
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
||
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
||
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
||
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
||
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
||
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
||
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
||
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
||
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
||
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
||
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
||
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
||
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
||
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
||
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
||
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
||
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
||
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
||
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
||
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
||
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
||
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
||
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
||
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
||
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
||
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
||
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
||
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
||
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
||
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
||
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
||
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
||
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
||
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
||
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
||
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
||
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
||
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
||
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
||
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
||
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
||
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
||
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
||
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
||
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
||
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
||
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
||
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
||
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
||
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
||
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
||
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
||
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
||
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
||
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
||
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
||
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
||
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
||
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
||
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
||
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
||
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
||
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
||
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
||
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
||
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
||
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
||
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
|
||
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
||
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
||
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
||
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
||
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
||
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
||
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
||
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
||
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
||
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
||
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
||
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
||
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
||
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
||
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
||
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
||
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
||
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
||
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
||
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
||
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
||
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
||
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
||
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
||
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
||
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
||
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
||
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
||
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
||
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
||
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
||
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
||
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
||
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
||
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
||
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
||
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
||
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
||
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
||
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
||
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
||
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
||
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
||
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
||
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
||
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
||
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
||
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
||
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
||
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
||
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
||
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
||
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
||
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
||
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
||
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},MS=function(e,n){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v1759 h347 v-84
|
||
H403z M403 1759 V0 H319 V1759 v`+n+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v1759 H0 v84 H347z
|
||
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
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+" v585 h43z";case"doublevert":return"M145 15 v585 v"+n+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+n+` v585 h43z
|
||
M367 15 v585 v`+n+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-n+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+n+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+n+` v1715 h263 v84 H319z
|
||
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+n+` v1799 H0 v-84 H319z
|
||
MM319 602 V0 H403 V602 v`+n+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+n+` v602 h84z
|
||
M403 1759 V0 H319 V1759 v`+n+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+n+` v602 h84z
|
||
M347 1759 V0 h-84 V1759 v`+n+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
||
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
||
-36,557 l0,`+(n+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
||
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
||
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
||
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
||
l0,-`+(n+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
||
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
||
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
||
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(n+9)+`
|
||
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
||
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
||
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
||
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
||
l0,-`+(n+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
||
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Zl{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 xt.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){for(var e="",n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e}toText(){var e=n=>n.toText();return this.children.map(e).join("")}}var qi={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},x0={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},vg={Å:"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 CS(t,e){qi[t]=e}function e1(t,e,n){if(!qi[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),o=qi[e][r];if(!o&&t[0]in vg&&(r=vg[t[0]].charCodeAt(0),o=qi[e][r]),!o&&n==="text"&&w3(r)&&(o=qi[e][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var ch={};function LS(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!ch[e]){var n=ch[e]={cssEmPerMu:x0.quad[e]/18};for(var r in x0)x0.hasOwnProperty(r)&&(n[r]=x0[r][e])}return ch[e]}var _S=[[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]],bg=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],yg=function(e,n){return n.size<2?e:_S[e-1][n.size-1]};class pa{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.style=e.style,this.color=e.color,this.size=e.size||pa.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=bg[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var n={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};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return new pa(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:yg(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:bg[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=yg(pa.BASESIZE,e);return this.size===n&&this.textSize===pa.BASESIZE&&this.style===e?this:this.extend({style:e,size:n})}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){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==pa.BASESIZE?["sizing","reset-size"+this.size,"size"+pa.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=LS(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}pa.BASESIZE=6;var hp={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},NS={ex:!0,em:!0,mu:!0},x3=function(e){return typeof e!="string"&&(e=e.unit),e in hp||e in NS||e==="ex"},Dn=function(e,n){var r;if(e.unit in hp)r=hp[e.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(e.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var o;if(n.style.isTight()?o=n.havingStyle(n.style.text()):o=n,e.unit==="ex")r=o.fontMetrics().xHeight;else if(e.unit==="em")r=o.fontMetrics().quad;else throw new Je("Invalid unit: '"+e.unit+"'");o!==n&&(r*=o.sizeMultiplier/n.sizeMultiplier)}return Math.min(e.number*r,n.maxSize)},at=function(e){return+e.toFixed(4)+"em"},oo=function(e){return e.filter(n=>n).join(" ")},k3=function(e,n,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},n){n.style.isTight()&&this.classes.push("mtight");var o=n.getColor();o&&(this.style.color=o)}},S3=function(e){var n=document.createElement(e);n.className=oo(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var o in this.attributes)this.attributes.hasOwnProperty(o)&&n.setAttribute(o,this.attributes[o]);for(var l=0;l<this.children.length;l++)n.appendChild(this.children[l].toNode());return n},DS=/[\s"'>/=\x00-\x1f]/,E3=function(e){var n="<"+e;this.classes.length&&(n+=' class="'+xt.escape(oo(this.classes))+'"');var r="";for(var o in this.style)this.style.hasOwnProperty(o)&&(r+=xt.hyphenate(o)+":"+this.style[o]+";");r&&(n+=' style="'+xt.escape(r)+'"');for(var l in this.attributes)if(this.attributes.hasOwnProperty(l)){if(DS.test(l))throw new Je("Invalid attribute name '"+l+"'");n+=" "+l+'="'+xt.escape(this.attributes[l])+'"'}n+=">";for(var h=0;h<this.children.length;h++)n+=this.children[h].toMarkup();return n+="</"+e+">",n};class Yl{constructor(e,n,r,o){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,k3.call(this,e,r,o),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return xt.contains(this.classes,e)}toNode(){return S3.call(this,"span")}toMarkup(){return E3.call(this,"span")}}class t1{constructor(e,n,r,o){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,k3.call(this,n,o),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return xt.contains(this.classes,e)}toNode(){return S3.call(this,"a")}toMarkup(){return E3.call(this,"a")}}class RS{constructor(e,n,r){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=n,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return xt.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var n in this.style)this.style.hasOwnProperty(n)&&(e.style[n]=this.style[n]);return e}toMarkup(){var e='<img src="'+xt.escape(this.src)+'"'+(' alt="'+xt.escape(this.alt)+'"'),n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=xt.hyphenate(r)+":"+this.style[r]+";");return n&&(e+=' style="'+xt.escape(n)+'"'),e+="'/>",e}}var IS={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class hi{constructor(e,n,r,o,l,h,c,p){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=n||0,this.depth=r||0,this.italic=o||0,this.skew=l||0,this.width=h||0,this.classes=c||[],this.style=p||{},this.maxFontSize=0;var v=vS(this.text.charCodeAt(0));v&&this.classes.push(v+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=IS[this.text])}hasClass(e){return xt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=at(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=oo(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&(n=n||document.createElement("span"),n.style[r]=this.style[r]);return n?(n.appendChild(e),n):e}toMarkup(){var e=!1,n="<span";this.classes.length&&(e=!0,n+=' class="',n+=xt.escape(oo(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var o in this.style)this.style.hasOwnProperty(o)&&(r+=xt.hyphenate(o)+":"+this.style[o]+";");r&&(e=!0,n+=' style="'+xt.escape(r)+'"');var l=xt.escape(this.text);return e?(n+=">",n+=l,n+="</span>",n):l}}class Na{constructor(e,n){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=n||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"svg");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);for(var o=0;o<this.children.length;o++)n.appendChild(this.children[o].toNode());return n}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+xt.escape(this.attributes[n])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}}class so{constructor(e,n){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=n}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"path");return this.alternate?n.setAttribute("d",this.alternate):n.setAttribute("d",gg[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+xt.escape(this.alternate)+'"/>':'<path d="'+xt.escape(gg[this.pathName])+'"/>'}}class pp{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",n=document.createElementNS(e,"line");for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&n.setAttribute(r,this.attributes[r]);return n}toMarkup(){var e="<line";for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="'+xt.escape(this.attributes[n])+'"');return e+="/>",e}}function wg(t){if(t instanceof hi)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function OS(t){if(t instanceof Yl)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var HS={bin:1,close:1,inner:1,open:1,punct:1,rel:1},PS={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},xn={math:{},text:{}};function I(t,e,n,r,o,l){xn[t][o]={font:e,group:n,replace:r},l&&r&&(xn[t][r]=xn[t][o])}var H="math",We="text",U="main",re="ams",An="accent-token",ft="bin",Lr="close",ks="inner",Et="mathord",Kn="op-token",Jr="open",eu="punct",ae="rel",Ha="spacing",ge="textord";I(H,U,ae,"≡","\\equiv",!0);I(H,U,ae,"≺","\\prec",!0);I(H,U,ae,"≻","\\succ",!0);I(H,U,ae,"∼","\\sim",!0);I(H,U,ae,"⊥","\\perp");I(H,U,ae,"⪯","\\preceq",!0);I(H,U,ae,"⪰","\\succeq",!0);I(H,U,ae,"≃","\\simeq",!0);I(H,U,ae,"∣","\\mid",!0);I(H,U,ae,"≪","\\ll",!0);I(H,U,ae,"≫","\\gg",!0);I(H,U,ae,"≍","\\asymp",!0);I(H,U,ae,"∥","\\parallel");I(H,U,ae,"⋈","\\bowtie",!0);I(H,U,ae,"⌣","\\smile",!0);I(H,U,ae,"⊑","\\sqsubseteq",!0);I(H,U,ae,"⊒","\\sqsupseteq",!0);I(H,U,ae,"≐","\\doteq",!0);I(H,U,ae,"⌢","\\frown",!0);I(H,U,ae,"∋","\\ni",!0);I(H,U,ae,"∝","\\propto",!0);I(H,U,ae,"⊢","\\vdash",!0);I(H,U,ae,"⊣","\\dashv",!0);I(H,U,ae,"∋","\\owns");I(H,U,eu,".","\\ldotp");I(H,U,eu,"⋅","\\cdotp");I(H,U,ge,"#","\\#");I(We,U,ge,"#","\\#");I(H,U,ge,"&","\\&");I(We,U,ge,"&","\\&");I(H,U,ge,"ℵ","\\aleph",!0);I(H,U,ge,"∀","\\forall",!0);I(H,U,ge,"ℏ","\\hbar",!0);I(H,U,ge,"∃","\\exists",!0);I(H,U,ge,"∇","\\nabla",!0);I(H,U,ge,"♭","\\flat",!0);I(H,U,ge,"ℓ","\\ell",!0);I(H,U,ge,"♮","\\natural",!0);I(H,U,ge,"♣","\\clubsuit",!0);I(H,U,ge,"℘","\\wp",!0);I(H,U,ge,"♯","\\sharp",!0);I(H,U,ge,"♢","\\diamondsuit",!0);I(H,U,ge,"ℜ","\\Re",!0);I(H,U,ge,"♡","\\heartsuit",!0);I(H,U,ge,"ℑ","\\Im",!0);I(H,U,ge,"♠","\\spadesuit",!0);I(H,U,ge,"§","\\S",!0);I(We,U,ge,"§","\\S");I(H,U,ge,"¶","\\P",!0);I(We,U,ge,"¶","\\P");I(H,U,ge,"†","\\dag");I(We,U,ge,"†","\\dag");I(We,U,ge,"†","\\textdagger");I(H,U,ge,"‡","\\ddag");I(We,U,ge,"‡","\\ddag");I(We,U,ge,"‡","\\textdaggerdbl");I(H,U,Lr,"⎱","\\rmoustache",!0);I(H,U,Jr,"⎰","\\lmoustache",!0);I(H,U,Lr,"⟯","\\rgroup",!0);I(H,U,Jr,"⟮","\\lgroup",!0);I(H,U,ft,"∓","\\mp",!0);I(H,U,ft,"⊖","\\ominus",!0);I(H,U,ft,"⊎","\\uplus",!0);I(H,U,ft,"⊓","\\sqcap",!0);I(H,U,ft,"∗","\\ast");I(H,U,ft,"⊔","\\sqcup",!0);I(H,U,ft,"◯","\\bigcirc",!0);I(H,U,ft,"∙","\\bullet",!0);I(H,U,ft,"‡","\\ddagger");I(H,U,ft,"≀","\\wr",!0);I(H,U,ft,"⨿","\\amalg");I(H,U,ft,"&","\\And");I(H,U,ae,"⟵","\\longleftarrow",!0);I(H,U,ae,"⇐","\\Leftarrow",!0);I(H,U,ae,"⟸","\\Longleftarrow",!0);I(H,U,ae,"⟶","\\longrightarrow",!0);I(H,U,ae,"⇒","\\Rightarrow",!0);I(H,U,ae,"⟹","\\Longrightarrow",!0);I(H,U,ae,"↔","\\leftrightarrow",!0);I(H,U,ae,"⟷","\\longleftrightarrow",!0);I(H,U,ae,"⇔","\\Leftrightarrow",!0);I(H,U,ae,"⟺","\\Longleftrightarrow",!0);I(H,U,ae,"↦","\\mapsto",!0);I(H,U,ae,"⟼","\\longmapsto",!0);I(H,U,ae,"↗","\\nearrow",!0);I(H,U,ae,"↩","\\hookleftarrow",!0);I(H,U,ae,"↪","\\hookrightarrow",!0);I(H,U,ae,"↘","\\searrow",!0);I(H,U,ae,"↼","\\leftharpoonup",!0);I(H,U,ae,"⇀","\\rightharpoonup",!0);I(H,U,ae,"↙","\\swarrow",!0);I(H,U,ae,"↽","\\leftharpoondown",!0);I(H,U,ae,"⇁","\\rightharpoondown",!0);I(H,U,ae,"↖","\\nwarrow",!0);I(H,U,ae,"⇌","\\rightleftharpoons",!0);I(H,re,ae,"≮","\\nless",!0);I(H,re,ae,"","\\@nleqslant");I(H,re,ae,"","\\@nleqq");I(H,re,ae,"⪇","\\lneq",!0);I(H,re,ae,"≨","\\lneqq",!0);I(H,re,ae,"","\\@lvertneqq");I(H,re,ae,"⋦","\\lnsim",!0);I(H,re,ae,"⪉","\\lnapprox",!0);I(H,re,ae,"⊀","\\nprec",!0);I(H,re,ae,"⋠","\\npreceq",!0);I(H,re,ae,"⋨","\\precnsim",!0);I(H,re,ae,"⪹","\\precnapprox",!0);I(H,re,ae,"≁","\\nsim",!0);I(H,re,ae,"","\\@nshortmid");I(H,re,ae,"∤","\\nmid",!0);I(H,re,ae,"⊬","\\nvdash",!0);I(H,re,ae,"⊭","\\nvDash",!0);I(H,re,ae,"⋪","\\ntriangleleft");I(H,re,ae,"⋬","\\ntrianglelefteq",!0);I(H,re,ae,"⊊","\\subsetneq",!0);I(H,re,ae,"","\\@varsubsetneq");I(H,re,ae,"⫋","\\subsetneqq",!0);I(H,re,ae,"","\\@varsubsetneqq");I(H,re,ae,"≯","\\ngtr",!0);I(H,re,ae,"","\\@ngeqslant");I(H,re,ae,"","\\@ngeqq");I(H,re,ae,"⪈","\\gneq",!0);I(H,re,ae,"≩","\\gneqq",!0);I(H,re,ae,"","\\@gvertneqq");I(H,re,ae,"⋧","\\gnsim",!0);I(H,re,ae,"⪊","\\gnapprox",!0);I(H,re,ae,"⊁","\\nsucc",!0);I(H,re,ae,"⋡","\\nsucceq",!0);I(H,re,ae,"⋩","\\succnsim",!0);I(H,re,ae,"⪺","\\succnapprox",!0);I(H,re,ae,"≆","\\ncong",!0);I(H,re,ae,"","\\@nshortparallel");I(H,re,ae,"∦","\\nparallel",!0);I(H,re,ae,"⊯","\\nVDash",!0);I(H,re,ae,"⋫","\\ntriangleright");I(H,re,ae,"⋭","\\ntrianglerighteq",!0);I(H,re,ae,"","\\@nsupseteqq");I(H,re,ae,"⊋","\\supsetneq",!0);I(H,re,ae,"","\\@varsupsetneq");I(H,re,ae,"⫌","\\supsetneqq",!0);I(H,re,ae,"","\\@varsupsetneqq");I(H,re,ae,"⊮","\\nVdash",!0);I(H,re,ae,"⪵","\\precneqq",!0);I(H,re,ae,"⪶","\\succneqq",!0);I(H,re,ae,"","\\@nsubseteqq");I(H,re,ft,"⊴","\\unlhd");I(H,re,ft,"⊵","\\unrhd");I(H,re,ae,"↚","\\nleftarrow",!0);I(H,re,ae,"↛","\\nrightarrow",!0);I(H,re,ae,"⇍","\\nLeftarrow",!0);I(H,re,ae,"⇏","\\nRightarrow",!0);I(H,re,ae,"↮","\\nleftrightarrow",!0);I(H,re,ae,"⇎","\\nLeftrightarrow",!0);I(H,re,ae,"△","\\vartriangle");I(H,re,ge,"ℏ","\\hslash");I(H,re,ge,"▽","\\triangledown");I(H,re,ge,"◊","\\lozenge");I(H,re,ge,"Ⓢ","\\circledS");I(H,re,ge,"®","\\circledR");I(We,re,ge,"®","\\circledR");I(H,re,ge,"∡","\\measuredangle",!0);I(H,re,ge,"∄","\\nexists");I(H,re,ge,"℧","\\mho");I(H,re,ge,"Ⅎ","\\Finv",!0);I(H,re,ge,"⅁","\\Game",!0);I(H,re,ge,"‵","\\backprime");I(H,re,ge,"▲","\\blacktriangle");I(H,re,ge,"▼","\\blacktriangledown");I(H,re,ge,"■","\\blacksquare");I(H,re,ge,"⧫","\\blacklozenge");I(H,re,ge,"★","\\bigstar");I(H,re,ge,"∢","\\sphericalangle",!0);I(H,re,ge,"∁","\\complement",!0);I(H,re,ge,"ð","\\eth",!0);I(We,U,ge,"ð","ð");I(H,re,ge,"╱","\\diagup");I(H,re,ge,"╲","\\diagdown");I(H,re,ge,"□","\\square");I(H,re,ge,"□","\\Box");I(H,re,ge,"◊","\\Diamond");I(H,re,ge,"¥","\\yen",!0);I(We,re,ge,"¥","\\yen",!0);I(H,re,ge,"✓","\\checkmark",!0);I(We,re,ge,"✓","\\checkmark");I(H,re,ge,"ℶ","\\beth",!0);I(H,re,ge,"ℸ","\\daleth",!0);I(H,re,ge,"ℷ","\\gimel",!0);I(H,re,ge,"ϝ","\\digamma",!0);I(H,re,ge,"ϰ","\\varkappa");I(H,re,Jr,"┌","\\@ulcorner",!0);I(H,re,Lr,"┐","\\@urcorner",!0);I(H,re,Jr,"└","\\@llcorner",!0);I(H,re,Lr,"┘","\\@lrcorner",!0);I(H,re,ae,"≦","\\leqq",!0);I(H,re,ae,"⩽","\\leqslant",!0);I(H,re,ae,"⪕","\\eqslantless",!0);I(H,re,ae,"≲","\\lesssim",!0);I(H,re,ae,"⪅","\\lessapprox",!0);I(H,re,ae,"≊","\\approxeq",!0);I(H,re,ft,"⋖","\\lessdot");I(H,re,ae,"⋘","\\lll",!0);I(H,re,ae,"≶","\\lessgtr",!0);I(H,re,ae,"⋚","\\lesseqgtr",!0);I(H,re,ae,"⪋","\\lesseqqgtr",!0);I(H,re,ae,"≑","\\doteqdot");I(H,re,ae,"≓","\\risingdotseq",!0);I(H,re,ae,"≒","\\fallingdotseq",!0);I(H,re,ae,"∽","\\backsim",!0);I(H,re,ae,"⋍","\\backsimeq",!0);I(H,re,ae,"⫅","\\subseteqq",!0);I(H,re,ae,"⋐","\\Subset",!0);I(H,re,ae,"⊏","\\sqsubset",!0);I(H,re,ae,"≼","\\preccurlyeq",!0);I(H,re,ae,"⋞","\\curlyeqprec",!0);I(H,re,ae,"≾","\\precsim",!0);I(H,re,ae,"⪷","\\precapprox",!0);I(H,re,ae,"⊲","\\vartriangleleft");I(H,re,ae,"⊴","\\trianglelefteq");I(H,re,ae,"⊨","\\vDash",!0);I(H,re,ae,"⊪","\\Vvdash",!0);I(H,re,ae,"⌣","\\smallsmile");I(H,re,ae,"⌢","\\smallfrown");I(H,re,ae,"≏","\\bumpeq",!0);I(H,re,ae,"≎","\\Bumpeq",!0);I(H,re,ae,"≧","\\geqq",!0);I(H,re,ae,"⩾","\\geqslant",!0);I(H,re,ae,"⪖","\\eqslantgtr",!0);I(H,re,ae,"≳","\\gtrsim",!0);I(H,re,ae,"⪆","\\gtrapprox",!0);I(H,re,ft,"⋗","\\gtrdot");I(H,re,ae,"⋙","\\ggg",!0);I(H,re,ae,"≷","\\gtrless",!0);I(H,re,ae,"⋛","\\gtreqless",!0);I(H,re,ae,"⪌","\\gtreqqless",!0);I(H,re,ae,"≖","\\eqcirc",!0);I(H,re,ae,"≗","\\circeq",!0);I(H,re,ae,"≜","\\triangleq",!0);I(H,re,ae,"∼","\\thicksim");I(H,re,ae,"≈","\\thickapprox");I(H,re,ae,"⫆","\\supseteqq",!0);I(H,re,ae,"⋑","\\Supset",!0);I(H,re,ae,"⊐","\\sqsupset",!0);I(H,re,ae,"≽","\\succcurlyeq",!0);I(H,re,ae,"⋟","\\curlyeqsucc",!0);I(H,re,ae,"≿","\\succsim",!0);I(H,re,ae,"⪸","\\succapprox",!0);I(H,re,ae,"⊳","\\vartriangleright");I(H,re,ae,"⊵","\\trianglerighteq");I(H,re,ae,"⊩","\\Vdash",!0);I(H,re,ae,"∣","\\shortmid");I(H,re,ae,"∥","\\shortparallel");I(H,re,ae,"≬","\\between",!0);I(H,re,ae,"⋔","\\pitchfork",!0);I(H,re,ae,"∝","\\varpropto");I(H,re,ae,"◀","\\blacktriangleleft");I(H,re,ae,"∴","\\therefore",!0);I(H,re,ae,"∍","\\backepsilon");I(H,re,ae,"▶","\\blacktriangleright");I(H,re,ae,"∵","\\because",!0);I(H,re,ae,"⋘","\\llless");I(H,re,ae,"⋙","\\gggtr");I(H,re,ft,"⊲","\\lhd");I(H,re,ft,"⊳","\\rhd");I(H,re,ae,"≂","\\eqsim",!0);I(H,U,ae,"⋈","\\Join");I(H,re,ae,"≑","\\Doteq",!0);I(H,re,ft,"∔","\\dotplus",!0);I(H,re,ft,"∖","\\smallsetminus");I(H,re,ft,"⋒","\\Cap",!0);I(H,re,ft,"⋓","\\Cup",!0);I(H,re,ft,"⩞","\\doublebarwedge",!0);I(H,re,ft,"⊟","\\boxminus",!0);I(H,re,ft,"⊞","\\boxplus",!0);I(H,re,ft,"⋇","\\divideontimes",!0);I(H,re,ft,"⋉","\\ltimes",!0);I(H,re,ft,"⋊","\\rtimes",!0);I(H,re,ft,"⋋","\\leftthreetimes",!0);I(H,re,ft,"⋌","\\rightthreetimes",!0);I(H,re,ft,"⋏","\\curlywedge",!0);I(H,re,ft,"⋎","\\curlyvee",!0);I(H,re,ft,"⊝","\\circleddash",!0);I(H,re,ft,"⊛","\\circledast",!0);I(H,re,ft,"⋅","\\centerdot");I(H,re,ft,"⊺","\\intercal",!0);I(H,re,ft,"⋒","\\doublecap");I(H,re,ft,"⋓","\\doublecup");I(H,re,ft,"⊠","\\boxtimes",!0);I(H,re,ae,"⇢","\\dashrightarrow",!0);I(H,re,ae,"⇠","\\dashleftarrow",!0);I(H,re,ae,"⇇","\\leftleftarrows",!0);I(H,re,ae,"⇆","\\leftrightarrows",!0);I(H,re,ae,"⇚","\\Lleftarrow",!0);I(H,re,ae,"↞","\\twoheadleftarrow",!0);I(H,re,ae,"↢","\\leftarrowtail",!0);I(H,re,ae,"↫","\\looparrowleft",!0);I(H,re,ae,"⇋","\\leftrightharpoons",!0);I(H,re,ae,"↶","\\curvearrowleft",!0);I(H,re,ae,"↺","\\circlearrowleft",!0);I(H,re,ae,"↰","\\Lsh",!0);I(H,re,ae,"⇈","\\upuparrows",!0);I(H,re,ae,"↿","\\upharpoonleft",!0);I(H,re,ae,"⇃","\\downharpoonleft",!0);I(H,U,ae,"⊶","\\origof",!0);I(H,U,ae,"⊷","\\imageof",!0);I(H,re,ae,"⊸","\\multimap",!0);I(H,re,ae,"↭","\\leftrightsquigarrow",!0);I(H,re,ae,"⇉","\\rightrightarrows",!0);I(H,re,ae,"⇄","\\rightleftarrows",!0);I(H,re,ae,"↠","\\twoheadrightarrow",!0);I(H,re,ae,"↣","\\rightarrowtail",!0);I(H,re,ae,"↬","\\looparrowright",!0);I(H,re,ae,"↷","\\curvearrowright",!0);I(H,re,ae,"↻","\\circlearrowright",!0);I(H,re,ae,"↱","\\Rsh",!0);I(H,re,ae,"⇊","\\downdownarrows",!0);I(H,re,ae,"↾","\\upharpoonright",!0);I(H,re,ae,"⇂","\\downharpoonright",!0);I(H,re,ae,"⇝","\\rightsquigarrow",!0);I(H,re,ae,"⇝","\\leadsto");I(H,re,ae,"⇛","\\Rrightarrow",!0);I(H,re,ae,"↾","\\restriction");I(H,U,ge,"‘","`");I(H,U,ge,"$","\\$");I(We,U,ge,"$","\\$");I(We,U,ge,"$","\\textdollar");I(H,U,ge,"%","\\%");I(We,U,ge,"%","\\%");I(H,U,ge,"_","\\_");I(We,U,ge,"_","\\_");I(We,U,ge,"_","\\textunderscore");I(H,U,ge,"∠","\\angle",!0);I(H,U,ge,"∞","\\infty",!0);I(H,U,ge,"′","\\prime");I(H,U,ge,"△","\\triangle");I(H,U,ge,"Γ","\\Gamma",!0);I(H,U,ge,"Δ","\\Delta",!0);I(H,U,ge,"Θ","\\Theta",!0);I(H,U,ge,"Λ","\\Lambda",!0);I(H,U,ge,"Ξ","\\Xi",!0);I(H,U,ge,"Π","\\Pi",!0);I(H,U,ge,"Σ","\\Sigma",!0);I(H,U,ge,"Υ","\\Upsilon",!0);I(H,U,ge,"Φ","\\Phi",!0);I(H,U,ge,"Ψ","\\Psi",!0);I(H,U,ge,"Ω","\\Omega",!0);I(H,U,ge,"A","Α");I(H,U,ge,"B","Β");I(H,U,ge,"E","Ε");I(H,U,ge,"Z","Ζ");I(H,U,ge,"H","Η");I(H,U,ge,"I","Ι");I(H,U,ge,"K","Κ");I(H,U,ge,"M","Μ");I(H,U,ge,"N","Ν");I(H,U,ge,"O","Ο");I(H,U,ge,"P","Ρ");I(H,U,ge,"T","Τ");I(H,U,ge,"X","Χ");I(H,U,ge,"¬","\\neg",!0);I(H,U,ge,"¬","\\lnot");I(H,U,ge,"⊤","\\top");I(H,U,ge,"⊥","\\bot");I(H,U,ge,"∅","\\emptyset");I(H,re,ge,"∅","\\varnothing");I(H,U,Et,"α","\\alpha",!0);I(H,U,Et,"β","\\beta",!0);I(H,U,Et,"γ","\\gamma",!0);I(H,U,Et,"δ","\\delta",!0);I(H,U,Et,"ϵ","\\epsilon",!0);I(H,U,Et,"ζ","\\zeta",!0);I(H,U,Et,"η","\\eta",!0);I(H,U,Et,"θ","\\theta",!0);I(H,U,Et,"ι","\\iota",!0);I(H,U,Et,"κ","\\kappa",!0);I(H,U,Et,"λ","\\lambda",!0);I(H,U,Et,"μ","\\mu",!0);I(H,U,Et,"ν","\\nu",!0);I(H,U,Et,"ξ","\\xi",!0);I(H,U,Et,"ο","\\omicron",!0);I(H,U,Et,"π","\\pi",!0);I(H,U,Et,"ρ","\\rho",!0);I(H,U,Et,"σ","\\sigma",!0);I(H,U,Et,"τ","\\tau",!0);I(H,U,Et,"υ","\\upsilon",!0);I(H,U,Et,"ϕ","\\phi",!0);I(H,U,Et,"χ","\\chi",!0);I(H,U,Et,"ψ","\\psi",!0);I(H,U,Et,"ω","\\omega",!0);I(H,U,Et,"ε","\\varepsilon",!0);I(H,U,Et,"ϑ","\\vartheta",!0);I(H,U,Et,"ϖ","\\varpi",!0);I(H,U,Et,"ϱ","\\varrho",!0);I(H,U,Et,"ς","\\varsigma",!0);I(H,U,Et,"φ","\\varphi",!0);I(H,U,ft,"∗","*",!0);I(H,U,ft,"+","+");I(H,U,ft,"−","-",!0);I(H,U,ft,"⋅","\\cdot",!0);I(H,U,ft,"∘","\\circ",!0);I(H,U,ft,"÷","\\div",!0);I(H,U,ft,"±","\\pm",!0);I(H,U,ft,"×","\\times",!0);I(H,U,ft,"∩","\\cap",!0);I(H,U,ft,"∪","\\cup",!0);I(H,U,ft,"∖","\\setminus",!0);I(H,U,ft,"∧","\\land");I(H,U,ft,"∨","\\lor");I(H,U,ft,"∧","\\wedge",!0);I(H,U,ft,"∨","\\vee",!0);I(H,U,ge,"√","\\surd");I(H,U,Jr,"⟨","\\langle",!0);I(H,U,Jr,"∣","\\lvert");I(H,U,Jr,"∥","\\lVert");I(H,U,Lr,"?","?");I(H,U,Lr,"!","!");I(H,U,Lr,"⟩","\\rangle",!0);I(H,U,Lr,"∣","\\rvert");I(H,U,Lr,"∥","\\rVert");I(H,U,ae,"=","=");I(H,U,ae,":",":");I(H,U,ae,"≈","\\approx",!0);I(H,U,ae,"≅","\\cong",!0);I(H,U,ae,"≥","\\ge");I(H,U,ae,"≥","\\geq",!0);I(H,U,ae,"←","\\gets");I(H,U,ae,">","\\gt",!0);I(H,U,ae,"∈","\\in",!0);I(H,U,ae,"","\\@not");I(H,U,ae,"⊂","\\subset",!0);I(H,U,ae,"⊃","\\supset",!0);I(H,U,ae,"⊆","\\subseteq",!0);I(H,U,ae,"⊇","\\supseteq",!0);I(H,re,ae,"⊈","\\nsubseteq",!0);I(H,re,ae,"⊉","\\nsupseteq",!0);I(H,U,ae,"⊨","\\models");I(H,U,ae,"←","\\leftarrow",!0);I(H,U,ae,"≤","\\le");I(H,U,ae,"≤","\\leq",!0);I(H,U,ae,"<","\\lt",!0);I(H,U,ae,"→","\\rightarrow",!0);I(H,U,ae,"→","\\to");I(H,re,ae,"≱","\\ngeq",!0);I(H,re,ae,"≰","\\nleq",!0);I(H,U,Ha," ","\\ ");I(H,U,Ha," ","\\space");I(H,U,Ha," ","\\nobreakspace");I(We,U,Ha," ","\\ ");I(We,U,Ha," "," ");I(We,U,Ha," ","\\space");I(We,U,Ha," ","\\nobreakspace");I(H,U,Ha,null,"\\nobreak");I(H,U,Ha,null,"\\allowbreak");I(H,U,eu,",",",");I(H,U,eu,";",";");I(H,re,ft,"⊼","\\barwedge",!0);I(H,re,ft,"⊻","\\veebar",!0);I(H,U,ft,"⊙","\\odot",!0);I(H,U,ft,"⊕","\\oplus",!0);I(H,U,ft,"⊗","\\otimes",!0);I(H,U,ge,"∂","\\partial",!0);I(H,U,ft,"⊘","\\oslash",!0);I(H,re,ft,"⊚","\\circledcirc",!0);I(H,re,ft,"⊡","\\boxdot",!0);I(H,U,ft,"△","\\bigtriangleup");I(H,U,ft,"▽","\\bigtriangledown");I(H,U,ft,"†","\\dagger");I(H,U,ft,"⋄","\\diamond");I(H,U,ft,"⋆","\\star");I(H,U,ft,"◃","\\triangleleft");I(H,U,ft,"▹","\\triangleright");I(H,U,Jr,"{","\\{");I(We,U,ge,"{","\\{");I(We,U,ge,"{","\\textbraceleft");I(H,U,Lr,"}","\\}");I(We,U,ge,"}","\\}");I(We,U,ge,"}","\\textbraceright");I(H,U,Jr,"{","\\lbrace");I(H,U,Lr,"}","\\rbrace");I(H,U,Jr,"[","\\lbrack",!0);I(We,U,ge,"[","\\lbrack",!0);I(H,U,Lr,"]","\\rbrack",!0);I(We,U,ge,"]","\\rbrack",!0);I(H,U,Jr,"(","\\lparen",!0);I(H,U,Lr,")","\\rparen",!0);I(We,U,ge,"<","\\textless",!0);I(We,U,ge,">","\\textgreater",!0);I(H,U,Jr,"⌊","\\lfloor",!0);I(H,U,Lr,"⌋","\\rfloor",!0);I(H,U,Jr,"⌈","\\lceil",!0);I(H,U,Lr,"⌉","\\rceil",!0);I(H,U,ge,"\\","\\backslash");I(H,U,ge,"∣","|");I(H,U,ge,"∣","\\vert");I(We,U,ge,"|","\\textbar",!0);I(H,U,ge,"∥","\\|");I(H,U,ge,"∥","\\Vert");I(We,U,ge,"∥","\\textbardbl");I(We,U,ge,"~","\\textasciitilde");I(We,U,ge,"\\","\\textbackslash");I(We,U,ge,"^","\\textasciicircum");I(H,U,ae,"↑","\\uparrow",!0);I(H,U,ae,"⇑","\\Uparrow",!0);I(H,U,ae,"↓","\\downarrow",!0);I(H,U,ae,"⇓","\\Downarrow",!0);I(H,U,ae,"↕","\\updownarrow",!0);I(H,U,ae,"⇕","\\Updownarrow",!0);I(H,U,Kn,"∐","\\coprod");I(H,U,Kn,"⋁","\\bigvee");I(H,U,Kn,"⋀","\\bigwedge");I(H,U,Kn,"⨄","\\biguplus");I(H,U,Kn,"⋂","\\bigcap");I(H,U,Kn,"⋃","\\bigcup");I(H,U,Kn,"∫","\\int");I(H,U,Kn,"∫","\\intop");I(H,U,Kn,"∬","\\iint");I(H,U,Kn,"∭","\\iiint");I(H,U,Kn,"∏","\\prod");I(H,U,Kn,"∑","\\sum");I(H,U,Kn,"⨂","\\bigotimes");I(H,U,Kn,"⨁","\\bigoplus");I(H,U,Kn,"⨀","\\bigodot");I(H,U,Kn,"∮","\\oint");I(H,U,Kn,"∯","\\oiint");I(H,U,Kn,"∰","\\oiiint");I(H,U,Kn,"⨆","\\bigsqcup");I(H,U,Kn,"∫","\\smallint");I(We,U,ks,"…","\\textellipsis");I(H,U,ks,"…","\\mathellipsis");I(We,U,ks,"…","\\ldots",!0);I(H,U,ks,"…","\\ldots",!0);I(H,U,ks,"⋯","\\@cdots",!0);I(H,U,ks,"⋱","\\ddots",!0);I(H,U,ge,"⋮","\\varvdots");I(We,U,ge,"⋮","\\varvdots");I(H,U,An,"ˊ","\\acute");I(H,U,An,"ˋ","\\grave");I(H,U,An,"¨","\\ddot");I(H,U,An,"~","\\tilde");I(H,U,An,"ˉ","\\bar");I(H,U,An,"˘","\\breve");I(H,U,An,"ˇ","\\check");I(H,U,An,"^","\\hat");I(H,U,An,"⃗","\\vec");I(H,U,An,"˙","\\dot");I(H,U,An,"˚","\\mathring");I(H,U,Et,"","\\@imath");I(H,U,Et,"","\\@jmath");I(H,U,ge,"ı","ı");I(H,U,ge,"ȷ","ȷ");I(We,U,ge,"ı","\\i",!0);I(We,U,ge,"ȷ","\\j",!0);I(We,U,ge,"ß","\\ss",!0);I(We,U,ge,"æ","\\ae",!0);I(We,U,ge,"œ","\\oe",!0);I(We,U,ge,"ø","\\o",!0);I(We,U,ge,"Æ","\\AE",!0);I(We,U,ge,"Œ","\\OE",!0);I(We,U,ge,"Ø","\\O",!0);I(We,U,An,"ˊ","\\'");I(We,U,An,"ˋ","\\`");I(We,U,An,"ˆ","\\^");I(We,U,An,"˜","\\~");I(We,U,An,"ˉ","\\=");I(We,U,An,"˘","\\u");I(We,U,An,"˙","\\.");I(We,U,An,"¸","\\c");I(We,U,An,"˚","\\r");I(We,U,An,"ˇ","\\v");I(We,U,An,"¨",'\\"');I(We,U,An,"˝","\\H");I(We,U,An,"◯","\\textcircled");var T3={"--":!0,"---":!0,"``":!0,"''":!0};I(We,U,ge,"–","--",!0);I(We,U,ge,"–","\\textendash");I(We,U,ge,"—","---",!0);I(We,U,ge,"—","\\textemdash");I(We,U,ge,"‘","`",!0);I(We,U,ge,"‘","\\textquoteleft");I(We,U,ge,"’","'",!0);I(We,U,ge,"’","\\textquoteright");I(We,U,ge,"“","``",!0);I(We,U,ge,"“","\\textquotedblleft");I(We,U,ge,"”","''",!0);I(We,U,ge,"”","\\textquotedblright");I(H,U,ge,"°","\\degree",!0);I(We,U,ge,"°","\\degree");I(We,U,ge,"°","\\textdegree",!0);I(H,U,ge,"£","\\pounds");I(H,U,ge,"£","\\mathsterling",!0);I(We,U,ge,"£","\\pounds");I(We,U,ge,"£","\\textsterling",!0);I(H,re,ge,"✠","\\maltese");I(We,re,ge,"✠","\\maltese");var xg='0123456789/@."';for(var uh=0;uh<xg.length;uh++){var kg=xg.charAt(uh);I(H,U,ge,kg,kg)}var Sg='0123456789!@*()-=+";:?/.,';for(var dh=0;dh<Sg.length;dh++){var Eg=Sg.charAt(dh);I(We,U,ge,Eg,Eg)}var wc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var hh=0;hh<wc.length;hh++){var k0=wc.charAt(hh);I(H,U,Et,k0,k0),I(We,U,ge,k0,k0)}I(H,re,ge,"C","ℂ");I(We,re,ge,"C","ℂ");I(H,re,ge,"H","ℍ");I(We,re,ge,"H","ℍ");I(H,re,ge,"N","ℕ");I(We,re,ge,"N","ℕ");I(H,re,ge,"P","ℙ");I(We,re,ge,"P","ℙ");I(H,re,ge,"Q","ℚ");I(We,re,ge,"Q","ℚ");I(H,re,ge,"R","ℝ");I(We,re,ge,"R","ℝ");I(H,re,ge,"Z","ℤ");I(We,re,ge,"Z","ℤ");I(H,U,Et,"h","ℎ");I(We,U,Et,"h","ℎ");var _t="";for(var yr=0;yr<wc.length;yr++){var Pn=wc.charAt(yr);_t=String.fromCharCode(55349,56320+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56372+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56424+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56580+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56684+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56736+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56788+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56840+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56944+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),yr<26&&(_t=String.fromCharCode(55349,56632+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t),_t=String.fromCharCode(55349,56476+yr),I(H,U,Et,Pn,_t),I(We,U,ge,Pn,_t))}_t=String.fromCharCode(55349,56668);I(H,U,Et,"k",_t);I(We,U,ge,"k",_t);for(var Do=0;Do<10;Do++){var Wa=Do.toString();_t=String.fromCharCode(55349,57294+Do),I(H,U,Et,Wa,_t),I(We,U,ge,Wa,_t),_t=String.fromCharCode(55349,57314+Do),I(H,U,Et,Wa,_t),I(We,U,ge,Wa,_t),_t=String.fromCharCode(55349,57324+Do),I(H,U,Et,Wa,_t),I(We,U,ge,Wa,_t),_t=String.fromCharCode(55349,57334+Do),I(H,U,Et,Wa,_t),I(We,U,ge,Wa,_t)}var fp="ÐÞþ";for(var ph=0;ph<fp.length;ph++){var S0=fp.charAt(ph);I(H,U,Et,S0,S0),I(We,U,ge,S0,S0)}var E0=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Tg=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],zS=function(e,n){var r=e.charCodeAt(0),o=e.charCodeAt(1),l=(r-55296)*1024+(o-56320)+65536,h=n==="math"?0:1;if(119808<=l&&l<120484){var c=Math.floor((l-119808)/26);return[E0[c][2],E0[c][h]]}else if(120782<=l&&l<=120831){var p=Math.floor((l-120782)/10);return[Tg[p][2],Tg[p][h]]}else{if(l===120485||l===120486)return[E0[0][2],E0[0][h]];if(120486<l&&l<120782)return["",""];throw new Je("Unsupported character: "+e)}},tu=function(e,n,r){return xn[r][e]&&xn[r][e].replace&&(e=xn[r][e].replace),{value:e,metrics:e1(e,n,r)}},Si=function(e,n,r,o,l){var h=tu(e,n,r),c=h.metrics;e=h.value;var p;if(c){var v=c.italic;(r==="text"||o&&o.font==="mathit")&&(v=0),p=new hi(e,c.height,c.depth,v,c.skew,c.width,l)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+n+"' and mode '"+r+"'")),p=new hi(e,0,0,0,0,0,l);if(o){p.maxFontSize=o.sizeMultiplier,o.style.isTight()&&p.classes.push("mtight");var b=o.getColor();b&&(p.style.color=b)}return p},BS=function(e,n,r,o){return o===void 0&&(o=[]),r.font==="boldsymbol"&&tu(e,"Main-Bold",n).metrics?Si(e,"Main-Bold",n,r,o.concat(["mathbf"])):e==="\\"||xn[n][e].font==="main"?Si(e,"Main-Regular",n,r,o):Si(e,"AMS-Regular",n,r,o.concat(["amsrm"]))},FS=function(e,n,r,o,l){return l!=="textord"&&tu(e,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},qS=function(e,n,r){var o=e.mode,l=e.text,h=["mord"],c=o==="math"||o==="text"&&n.font,p=c?n.font:n.fontFamily,v="",b="";if(l.charCodeAt(0)===55349&&([v,b]=zS(l,o)),v.length>0)return Si(l,v,o,n,h.concat(b));if(p){var g,m;if(p==="boldsymbol"){var x=FS(l,o,n,h,r);g=x.fontName,m=[x.fontClass]}else c?(g=C3[p].fontName,m=[p]):(g=T0(p,n.fontWeight,n.fontShape),m=[p,n.fontWeight,n.fontShape]);if(tu(l,g,o).metrics)return Si(l,g,o,n,h.concat(m));if(T3.hasOwnProperty(l)&&g.slice(0,10)==="Typewriter"){for(var w=[],S=0;S<l.length;S++)w.push(Si(l[S],g,o,n,h.concat(m)));return M3(w)}}if(r==="mathord")return Si(l,"Math-Italic",o,n,h.concat(["mathnormal"]));if(r==="textord"){var k=xn[o][l]&&xn[o][l].font;if(k==="ams"){var C=T0("amsrm",n.fontWeight,n.fontShape);return Si(l,C,o,n,h.concat("amsrm",n.fontWeight,n.fontShape))}else if(k==="main"||!k){var T=T0("textrm",n.fontWeight,n.fontShape);return Si(l,T,o,n,h.concat(n.fontWeight,n.fontShape))}else{var A=T0(k,n.fontWeight,n.fontShape);return Si(l,A,o,n,h.concat(A,n.fontWeight,n.fontShape))}}else throw new Error("unexpected type: "+r+" in makeOrd")},jS=(t,e)=>{if(oo(t.classes)!==oo(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var n=t.classes[0];if(n==="mbin"||n==="mord")return!1}for(var r in t.style)if(t.style.hasOwnProperty(r)&&t.style[r]!==e.style[r])return!1;for(var o in e.style)if(e.style.hasOwnProperty(o)&&t.style[o]!==e.style[o])return!1;return!0},$S=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n instanceof hi&&r instanceof hi&&jS(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,t.splice(e+1,1),e--)}return t},n1=function(e){for(var n=0,r=0,o=0,l=0;l<e.children.length;l++){var h=e.children[l];h.height>n&&(n=h.height),h.depth>r&&(r=h.depth),h.maxFontSize>o&&(o=h.maxFontSize)}e.height=n,e.depth=r,e.maxFontSize=o},Rr=function(e,n,r,o){var l=new Yl(e,n,r,o);return n1(l),l},A3=(t,e,n,r)=>new Yl(t,e,n,r),US=function(e,n,r){var o=Rr([e],[],n);return o.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),o.style.borderBottomWidth=at(o.height),o.maxFontSize=1,o},VS=function(e,n,r,o){var l=new t1(e,n,r,o);return n1(l),l},M3=function(e){var n=new Zl(e);return n1(n),n},WS=function(e,n){return e instanceof Zl?Rr([],[e],n):e},GS=function(e){if(e.positionType==="individualShift"){for(var n=e.children,r=[n[0]],o=-n[0].shift-n[0].elem.depth,l=o,h=1;h<n.length;h++){var c=-n[h].shift-l-n[h].elem.depth,p=c-(n[h-1].elem.height+n[h-1].elem.depth);l=l+c,r.push({type:"kern",size:p}),r.push(n[h])}return{children:r,depth:o}}var v;if(e.positionType==="top"){for(var b=e.positionData,g=0;g<e.children.length;g++){var m=e.children[g];b-=m.type==="kern"?m.size:m.elem.height+m.elem.depth}v=b}else if(e.positionType==="bottom")v=-e.positionData;else{var x=e.children[0];if(x.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")v=-x.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")v=-x.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:v}},KS=function(e,n){for(var{children:r,depth:o}=GS(e),l=0,h=0;h<r.length;h++){var c=r[h];if(c.type==="elem"){var p=c.elem;l=Math.max(l,p.maxFontSize,p.height)}}l+=2;var v=Rr(["pstrut"],[]);v.style.height=at(l);for(var b=[],g=o,m=o,x=o,w=0;w<r.length;w++){var S=r[w];if(S.type==="kern")x+=S.size;else{var k=S.elem,C=S.wrapperClasses||[],T=S.wrapperStyle||{},A=Rr(C,[v,k],void 0,T);A.style.top=at(-l-x-k.depth),S.marginLeft&&(A.style.marginLeft=S.marginLeft),S.marginRight&&(A.style.marginRight=S.marginRight),b.push(A),x+=k.height+k.depth}g=Math.min(g,x),m=Math.max(m,x)}var M=Rr(["vlist"],b);M.style.height=at(m);var y;if(g<0){var N=Rr([],[]),z=Rr(["vlist"],[N]);z.style.height=at(-g);var F=Rr(["vlist-s"],[new hi("")]);y=[Rr(["vlist-r"],[M,F]),Rr(["vlist-r"],[z])]}else y=[Rr(["vlist-r"],[M])];var P=Rr(["vlist-t"],y);return y.length===2&&P.classes.push("vlist-t2"),P.height=m,P.depth=-g,P},XS=(t,e)=>{var n=Rr(["mspace"],[],e),r=Dn(t,e);return n.style.marginRight=at(r),n},T0=function(e,n,r){var o="";switch(e){case"amsrm":o="AMS";break;case"textrm":o="Main";break;case"textsf":o="SansSerif";break;case"texttt":o="Typewriter";break;default:o=e}var l;return n==="textbf"&&r==="textit"?l="BoldItalic":n==="textbf"?l="Bold":n==="textit"?l="Italic":l="Regular",o+"-"+l},C3={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"}},L3={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ZS=function(e,n){var[r,o,l]=L3[e],h=new so(r),c=new Na([h],{width:at(o),height:at(l),style:"width:"+at(o),viewBox:"0 0 "+1e3*o+" "+1e3*l,preserveAspectRatio:"xMinYMin"}),p=A3(["overlay"],[c],n);return p.height=l,p.style.height=at(l),p.style.width=at(o),p},Ee={fontMap:C3,makeSymbol:Si,mathsym:BS,makeSpan:Rr,makeSvgSpan:A3,makeLineSpan:US,makeAnchor:VS,makeFragment:M3,wrapFragment:WS,makeVList:KS,makeOrd:qS,makeGlue:XS,staticSvg:ZS,svgData:L3,tryCombineChars:$S},_n={number:3,unit:"mu"},Ro={number:4,unit:"mu"},ua={number:5,unit:"mu"},YS={mord:{mop:_n,mbin:Ro,mrel:ua,minner:_n},mop:{mord:_n,mop:_n,mrel:ua,minner:_n},mbin:{mord:Ro,mop:Ro,mopen:Ro,minner:Ro},mrel:{mord:ua,mop:ua,mopen:ua,minner:ua},mopen:{},mclose:{mop:_n,mbin:Ro,mrel:ua,minner:_n},mpunct:{mord:_n,mop:_n,mrel:ua,mopen:_n,mclose:_n,mpunct:_n,minner:_n},minner:{mord:_n,mop:_n,mbin:Ro,mrel:ua,mopen:_n,mpunct:_n,minner:_n}},JS={mord:{mop:_n},mop:{mord:_n,mop:_n},mbin:{},mrel:{},mopen:{},mclose:{mop:_n},mpunct:{},minner:{mop:_n}},_3={},xc={},kc={};function dt(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0?!0:r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:o},p=0;p<n.length;++p)_3[n[p]]=c;e&&(l&&(xc[e]=l),h&&(kc[e]=h))}function Ko(t){var{type:e,htmlBuilder:n,mathmlBuilder:r}=t;dt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Sc=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},jn=function(e){return e.type==="ordgroup"?e.body:[e]},Da=Ee.makeSpan,QS=["leftmost","mbin","mopen","mrel","mop","mpunct"],eE=["rightmost","mrel","mclose","mpunct"],tE={display:At.DISPLAY,text:At.TEXT,script:At.SCRIPT,scriptscript:At.SCRIPTSCRIPT},nE={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},er=function(e,n,r,o){o===void 0&&(o=[null,null]);for(var l=[],h=0;h<e.length;h++){var c=Qt(e[h],n);if(c instanceof Zl){var p=c.children;l.push(...p)}else l.push(c)}if(Ee.tryCombineChars(l),!r)return l;var v=n;if(e.length===1){var b=e[0];b.type==="sizing"?v=n.havingSize(b.size):b.type==="styling"&&(v=n.havingStyle(tE[b.style]))}var g=Da([o[0]||"leftmost"],[],n),m=Da([o[1]||"rightmost"],[],n),x=r==="root";return Ag(l,(w,S)=>{var k=S.classes[0],C=w.classes[0];k==="mbin"&&xt.contains(eE,C)?S.classes[0]="mord":C==="mbin"&&xt.contains(QS,k)&&(w.classes[0]="mord")},{node:g},m,x),Ag(l,(w,S)=>{var k=mp(S),C=mp(w),T=k&&C?w.hasClass("mtight")?JS[k][C]:YS[k][C]:null;if(T)return Ee.makeGlue(T,v)},{node:g},m,x),l},Ag=function t(e,n,r,o,l){o&&e.push(o);for(var h=0;h<e.length;h++){var c=e[h],p=N3(c);if(p){t(p.children,n,r,null,l);continue}var v=!c.hasClass("mspace");if(v){var b=n(c,r.node);b&&(r.insertAfter?r.insertAfter(b):(e.unshift(b),h++))}v?r.node=c:l&&c.hasClass("newline")&&(r.node=Da(["leftmost"])),r.insertAfter=(g=>m=>{e.splice(g+1,0,m),h++})(h)}o&&e.pop()},N3=function(e){return e instanceof Zl||e instanceof t1||e instanceof Yl&&e.hasClass("enclosing")?e:null},rE=function t(e,n){var r=N3(e);if(r){var o=r.children;if(o.length){if(n==="right")return t(o[o.length-1],"right");if(n==="left")return t(o[0],"left")}}return e},mp=function(e,n){return e?(n&&(e=rE(e,n)),nE[e.classes[0]]||null):null},zl=function(e,n){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Da(n.concat(r))},Qt=function(e,n,r){if(!e)return Da();if(xc[e.type]){var o=xc[e.type](e,n);if(r&&n.size!==r.size){o=Da(n.sizingClasses(r),[o],n);var l=n.sizeMultiplier/r.sizeMultiplier;o.height*=l,o.depth*=l}return o}else throw new Je("Got group of unknown type: '"+e.type+"'")};function A0(t,e){var n=Da(["base"],t,e),r=Da(["strut"]);return r.style.height=at(n.height+n.depth),n.depth&&(r.style.verticalAlign=at(-n.depth)),n.children.unshift(r),n}function gp(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var r=er(t,e,"root"),o;r.length===2&&r[1].hasClass("tag")&&(o=r.pop());for(var l=[],h=[],c=0;c<r.length;c++)if(h.push(r[c]),r[c].hasClass("mbin")||r[c].hasClass("mrel")||r[c].hasClass("allowbreak")){for(var p=!1;c<r.length-1&&r[c+1].hasClass("mspace")&&!r[c+1].hasClass("newline");)c++,h.push(r[c]),r[c].hasClass("nobreak")&&(p=!0);p||(l.push(A0(h,e)),h=[])}else r[c].hasClass("newline")&&(h.pop(),h.length>0&&(l.push(A0(h,e)),h=[]),l.push(r[c]));h.length>0&&l.push(A0(h,e));var v;n?(v=A0(er(n,e,!0)),v.classes=["tag"],l.push(v)):o&&l.push(o);var b=Da(["katex-html"],l);if(b.setAttribute("aria-hidden","true"),v){var g=v.children[0];g.style.height=at(b.height+b.depth),b.depth&&(g.style.verticalAlign=at(-b.depth))}return b}function D3(t){return new Zl(t)}class Kr{constructor(e,n,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=n||[],this.classes=r||[]}setAttribute(e,n){this.attributes[e]=n}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&e.setAttribute(n,this.attributes[n]);this.classes.length>0&&(e.className=oo(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof ji&&this.children[r+1]instanceof ji){for(var o=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof ji;)o+=this.children[++r].toText();e.appendChild(new ji(o).toNode())}else e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&(e+=" "+n+'="',e+=xt.escape(this.attributes[n]),e+='"');this.classes.length>0&&(e+=' class ="'+xt.escape(oo(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class ji{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return xt.escape(this.toText())}toText(){return this.text}}class iE{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character=" ":e>=-.05556&&e<=-.05555?this.character=" ":e>=-.1667&&e<=-.1666?this.character=" ":e>=-.2223&&e<=-.2222?this.character=" ":e>=-.2778&&e<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",at(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+at(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ye={MathNode:Kr,TextNode:ji,SpaceNode:iE,newDocumentFragment:D3},pi=function(e,n,r){return xn[n][e]&&xn[n][e].replace&&e.charCodeAt(0)!==55349&&!(T3.hasOwnProperty(e)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(e=xn[n][e].replace),new Ye.TextNode(e)},r1=function(e){return e.length===1?e[0]:new Ye.MathNode("mrow",e)},i1=function(e,n){if(n.fontFamily==="texttt")return"monospace";if(n.fontFamily==="textsf")return n.fontShape==="textit"&&n.fontWeight==="textbf"?"sans-serif-bold-italic":n.fontShape==="textit"?"sans-serif-italic":n.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(n.fontShape==="textit"&&n.fontWeight==="textbf")return"bold-italic";if(n.fontShape==="textit")return"italic";if(n.fontWeight==="textbf")return"bold";var r=n.font;if(!r||r==="mathnormal")return null;var o=e.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var l=e.text;if(xt.contains(["\\imath","\\jmath"],l))return null;xn[o][l]&&xn[o][l].replace&&(l=xn[o][l].replace);var h=Ee.fontMap[r].fontName;return e1(l,h,o)?Ee.fontMap[r].variant:null};function fh(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof ji&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var n=t.children[0];return n instanceof ji&&n.text===","}else return!1}var Hr=function(e,n,r){if(e.length===1){var o=bn(e[0],n);return r&&o instanceof Kr&&o.type==="mo"&&(o.setAttribute("lspace","0em"),o.setAttribute("rspace","0em")),[o]}for(var l=[],h,c=0;c<e.length;c++){var p=bn(e[c],n);if(p instanceof Kr&&h instanceof Kr){if(p.type==="mtext"&&h.type==="mtext"&&p.getAttribute("mathvariant")===h.getAttribute("mathvariant")){h.children.push(...p.children);continue}else if(p.type==="mn"&&h.type==="mn"){h.children.push(...p.children);continue}else if(fh(p)&&h.type==="mn"){h.children.push(...p.children);continue}else if(p.type==="mn"&&fh(h))p.children=[...h.children,...p.children],l.pop();else if((p.type==="msup"||p.type==="msub")&&p.children.length>=1&&(h.type==="mn"||fh(h))){var v=p.children[0];v instanceof Kr&&v.type==="mn"&&(v.children=[...h.children,...v.children],l.pop())}else if(h.type==="mi"&&h.children.length===1){var b=h.children[0];if(b instanceof ji&&b.text==="̸"&&(p.type==="mo"||p.type==="mi"||p.type==="mn")){var g=p.children[0];g instanceof ji&&g.text.length>0&&(g.text=g.text.slice(0,1)+"̸"+g.text.slice(1),l.pop())}}}l.push(p),h=p}return l},lo=function(e,n,r){return r1(Hr(e,n,r))},bn=function(e,n){if(!e)return new Ye.MathNode("mrow");if(kc[e.type]){var r=kc[e.type](e,n);return r}else throw new Je("Got group of unknown type: '"+e.type+"'")};function Mg(t,e,n,r,o){var l=Hr(t,n),h;l.length===1&&l[0]instanceof Kr&&xt.contains(["mrow","mtable"],l[0].type)?h=l[0]:h=new Ye.MathNode("mrow",l);var c=new Ye.MathNode("annotation",[new Ye.TextNode(e)]);c.setAttribute("encoding","application/x-tex");var p=new Ye.MathNode("semantics",[h,c]),v=new Ye.MathNode("math",[p]);v.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&v.setAttribute("display","block");var b=o?"katex":"katex-mathml";return Ee.makeSpan([b],[v])}var R3=function(e){return new pa({style:e.displayMode?At.DISPLAY:At.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},I3=function(e,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),e=Ee.makeSpan(r,[e])}return e},aE=function(e,n,r){var o=R3(r),l;if(r.output==="mathml")return Mg(e,n,o,r.displayMode,!0);if(r.output==="html"){var h=gp(e,o);l=Ee.makeSpan(["katex"],[h])}else{var c=Mg(e,n,o,r.displayMode,!1),p=gp(e,o);l=Ee.makeSpan(["katex"],[c,p])}return I3(l,r)},oE=function(e,n,r){var o=R3(r),l=gp(e,o),h=Ee.makeSpan(["katex"],[l]);return I3(h,r)},sE={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",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":"="},lE=function(e){var n=new Ye.MathNode("mo",[new Ye.TextNode(sE[e.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},cE={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},uE=function(e){return e.type==="ordgroup"?e.body.length:1},dE=function(e,n){function r(){var c=4e5,p=e.label.slice(1);if(xt.contains(["widehat","widecheck","widetilde","utilde"],p)){var v=e,b=uE(v.base),g,m,x;if(b>5)p==="widehat"||p==="widecheck"?(g=420,c=2364,x=.42,m=p+"4"):(g=312,c=2340,x=.34,m="tilde4");else{var w=[1,1,2,2,3,3][b];p==="widehat"||p==="widecheck"?(c=[0,1062,2364,2364,2364][w],g=[0,239,300,360,420][w],x=[0,.24,.3,.3,.36,.42][w],m=p+w):(c=[0,600,1033,2339,2340][w],g=[0,260,286,306,312][w],x=[0,.26,.286,.3,.306,.34][w],m="tilde"+w)}var S=new so(m),k=new Na([S],{width:"100%",height:at(x),viewBox:"0 0 "+c+" "+g,preserveAspectRatio:"none"});return{span:Ee.makeSvgSpan([],[k],n),minWidth:0,height:x}}else{var C=[],T=cE[p],[A,M,y]=T,N=y/1e3,z=A.length,F,P;if(z===1){var Y=T[3];F=["hide-tail"],P=[Y]}else if(z===2)F=["halfarrow-left","halfarrow-right"],P=["xMinYMin","xMaxYMin"];else if(z===3)F=["brace-left","brace-center","brace-right"],P=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
||
`+z+" children.");for(var te=0;te<z;te++){var de=new so(A[te]),Ce=new Na([de],{width:"400em",height:at(N),viewBox:"0 0 "+c+" "+y,preserveAspectRatio:P[te]+" slice"}),qe=Ee.makeSvgSpan([F[te]],[Ce],n);if(z===1)return{span:qe,minWidth:M,height:N};qe.style.height=at(N),C.push(qe)}return{span:Ee.makeSpan(["stretchy"],C,n),minWidth:M,height:N}}}var{span:o,minWidth:l,height:h}=r();return o.height=h,o.style.height=at(h),l>0&&(o.style.minWidth=at(l)),o},hE=function(e,n,r,o,l){var h,c=e.height+e.depth+r+o;if(/fbox|color|angl/.test(n)){if(h=Ee.makeSpan(["stretchy",n],[],l),n==="fbox"){var p=l.color&&l.getColor();p&&(h.style.borderColor=p)}}else{var v=[];/^[bx]cancel$/.test(n)&&v.push(new pp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&v.push(new pp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var b=new Na(v,{width:"100%",height:at(c)});h=Ee.makeSvgSpan([],[b],l)}return h.height=c,h.style.height=at(c),h},Ra={encloseSpan:hE,mathMLnode:lE,svgSpan:dE};function jt(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function a1(t){var e=nu(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function nu(t){return t&&(t.type==="atom"||PS.hasOwnProperty(t.type))?t:null}var o1=(t,e)=>{var n,r,o;t&&t.type==="supsub"?(r=jt(t.base,"accent"),n=r.base,t.base=n,o=OS(Qt(t,e)),t.base=r):(r=jt(t,"accent"),n=r.base);var l=Qt(n,e.havingCrampedStyle()),h=r.isShifty&&xt.isCharacterBox(n),c=0;if(h){var p=xt.getBaseElem(n),v=Qt(p,e.havingCrampedStyle());c=wg(v).skew}var b=r.label==="\\c",g=b?l.height+l.depth:Math.min(l.height,e.fontMetrics().xHeight),m;if(r.isStretchy)m=Ra.svgSpan(r,e),m=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+at(2*c)+")",marginLeft:at(2*c)}:void 0}]},e);else{var x,w;r.label==="\\vec"?(x=Ee.staticSvg("vec",e),w=Ee.svgData.vec[1]):(x=Ee.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=wg(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Ee.makeSpan(["accent-body"],[x]);var S=r.label==="\\textcircled";S&&(m.classes.push("accent-full"),g=l.height);var k=c;S||(k-=w/2),m.style.left=at(k),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Ee.makeSpan(["mord","accent"],[m],e);return o?(o.children[0]=C,o.height=Math.max(C.height,o.height),o.classes[0]="mord",o):C},O3=(t,e)=>{var n=t.isStretchy?Ra.mathMLnode(t.label):new Ye.MathNode("mo",[pi(t.label,t.mode)]),r=new Ye.MathNode("mover",[bn(t.base,e),n]);return r.setAttribute("accent","true"),r},pE=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));dt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var n=Sc(e[0]),r=!pE.test(t.funcName),o=!r||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:o,base:n}},htmlBuilder:o1,mathmlBuilder:O3});dt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var n=e[0],r=t.parser.mode;return r==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:o1,mathmlBuilder:O3});dt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:o}},htmlBuilder:(t,e)=>{var n=Qt(t.base,e),r=Ra.svgSpan(t,e),o=t.label==="\\utilde"?.12:0,l=Ee.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:n}]},e);return Ee.makeSpan(["mord","accentunder"],[l],e)},mathmlBuilder:(t,e)=>{var n=Ra.mathMLnode(t.label),r=new Ye.MathNode("munder",[bn(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var M0=t=>{var e=new Ye.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};dt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r,funcName:o}=t;return{type:"xArrow",mode:r.mode,label:o,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,r=e.havingStyle(n.sup()),o=Ee.wrapFragment(Qt(t.body,r,e),e),l=t.label.slice(0,2)==="\\x"?"x":"cd";o.classes.push(l+"-arrow-pad");var h;t.below&&(r=e.havingStyle(n.sub()),h=Ee.wrapFragment(Qt(t.below,r,e),e),h.classes.push(l+"-arrow-pad"));var c=Ra.svgSpan(t,e),p=-e.fontMetrics().axisHeight+.5*c.height,v=-e.fontMetrics().axisHeight-.5*c.height-.111;(o.depth>.25||t.label==="\\xleftequilibrium")&&(v-=o.depth);var b;if(h){var g=-e.fontMetrics().axisHeight+h.height+.5*c.height+.111;b=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p},{type:"elem",elem:h,shift:g}]},e)}else b=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:v},{type:"elem",elem:c,shift:p}]},e);return b.children[0].children[0].children[1].classes.push("svg-align"),Ee.makeSpan(["mrel","x-arrow"],[b],e)},mathmlBuilder(t,e){var n=Ra.mathMLnode(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(t.body){var o=M0(bn(t.body,e));if(t.below){var l=M0(bn(t.below,e));r=new Ye.MathNode("munderover",[n,l,o])}else r=new Ye.MathNode("mover",[n,o])}else if(t.below){var h=M0(bn(t.below,e));r=new Ye.MathNode("munder",[n,h])}else r=M0(),r=new Ye.MathNode("mover",[n,r]);return r}});var fE=Ee.makeSpan;function H3(t,e){var n=er(t.body,e,!0);return fE([t.mclass],n,e)}function P3(t,e){var n,r=Hr(t.body,e);return t.mclass==="minner"?n=new Ye.MathNode("mpadded",r):t.mclass==="mord"?t.isCharacterBox?(n=r[0],n.type="mi"):n=new Ye.MathNode("mi",r):(t.isCharacterBox?(n=r[0],n.type="mo"):n=new Ye.MathNode("mo",r),t.mclass==="mbin"?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):t.mclass==="mpunct"?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(n.attributes.lspace="0em",n.attributes.rspace="0em"):t.mclass==="minner"&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}dt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:jn(o),isCharacterBox:xt.isCharacterBox(o)}},htmlBuilder:H3,mathmlBuilder:P3});var ru=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};dt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:ru(e[0]),body:jn(e[1]),isCharacterBox:xt.isCharacterBox(e[1])}}});dt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:r}=t,o=e[1],l=e[0],h;r!=="\\stackrel"?h=ru(o):h="mrel";var c={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:jn(o)},p={type:"supsub",mode:l.mode,base:c,sup:r==="\\underset"?null:l,sub:r==="\\underset"?l:null};return{type:"mclass",mode:n.mode,mclass:h,body:[p],isCharacterBox:xt.isCharacterBox(p)}},htmlBuilder:H3,mathmlBuilder:P3});dt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:ru(e[0]),body:jn(e[0])}},htmlBuilder(t,e){var n=er(t.body,e,!0),r=Ee.makeSpan([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=Hr(t.body,e),r=new Ye.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var mE={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Cg=()=>({type:"styling",body:[],mode:"math",style:"display"}),Lg=t=>t.type==="textord"&&t.text==="@",gE=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function vE(t,e,n){var r=mE[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var o=n.callFunction("\\\\cdleft",[e[0]],[]),l={type:"atom",text:r,mode:"math",family:"rel"},h=n.callFunction("\\Big",[l],[]),c=n.callFunction("\\\\cdright",[e[1]],[]),p={type:"ordgroup",mode:"math",body:[o,h,c]};return n.callFunction("\\\\cdparent",[p],[])}case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var v={type:"textord",text:"\\Vert",mode:"math"};return n.callFunction("\\Big",[v],[])}default:return{type:"textord",text:" ",mode:"math"}}}function bE(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var n=t.fetch().text;if(n==="&"||n==="\\\\")t.consume();else if(n==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Je("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var r=[],o=[r],l=0;l<e.length;l++){for(var h=e[l],c=Cg(),p=0;p<h.length;p++)if(!Lg(h[p]))c.body.push(h[p]);else{r.push(c),p+=1;var v=a1(h[p]).text,b=new Array(2);if(b[0]={type:"ordgroup",mode:"math",body:[]},b[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(v)>-1))if("<>AV".indexOf(v)>-1)for(var g=0;g<2;g++){for(var m=!0,x=p+1;x<h.length;x++){if(gE(h[x],v)){m=!1,p=x;break}if(Lg(h[x]))throw new Je("Missing a "+v+" character to complete a CD arrow.",h[x]);b[g].body.push(h[x])}if(m)throw new Je("Missing a "+v+" character to complete a CD arrow.",h[p])}else throw new Je('Expected one of "<>AV=|." after @',h[p]);var w=vE(v,b,t),S={type:"styling",body:[w],mode:"math",style:"display"};r.push(S),c=Cg()}l%2===0?r.push(c):r.shift(),r=[],o.push(r)}t.gullet.endGroup(),t.gullet.endGroup();var k=new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}dt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var n=e.havingStyle(e.style.sup()),r=Ee.wrapFragment(Qt(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=at(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){var n=new Ye.MathNode("mrow",[bn(t.label,e)]);return n=new Ye.MathNode("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Ye.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});dt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:n}=t;return{type:"cdlabelparent",mode:n.mode,fragment:e[0]}},htmlBuilder(t,e){var n=Ee.wrapFragment(Qt(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new Ye.MathNode("mrow",[bn(t.fragment,e)])}});dt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,r=jt(e[0],"ordgroup"),o=r.body,l="",h=0;h<o.length;h++){var c=jt(o[h],"textord");l+=c.text}var p=parseInt(l),v;if(isNaN(p))throw new Je("\\@char has non-numeric argument "+l);if(p<0||p>=1114111)throw new Je("\\@char with invalid code point "+l);return p<=65535?v=String.fromCharCode(p):(p-=65536,v=String.fromCharCode((p>>10)+55296,(p&1023)+56320)),{type:"textord",mode:n.mode,text:v}}});var z3=(t,e)=>{var n=er(t.body,e.withColor(t.color),!1);return Ee.makeFragment(n)},B3=(t,e)=>{var n=Hr(t.body,e.withColor(t.color)),r=new Ye.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r};dt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=jt(e[0],"color-token").color,o=e[1];return{type:"color",mode:n.mode,color:r,body:jn(o)}},htmlBuilder:z3,mathmlBuilder:B3});dt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,o=jt(e[0],"color-token").color;n.gullet.macros.set("\\current@color",o);var l=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:o,body:l}},htmlBuilder:z3,mathmlBuilder:B3});dt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,o=r.gullet.future().text==="["?r.parseSizeGroup(!0):null,l=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:l,size:o&&jt(o,"size").value}},htmlBuilder(t,e){var n=Ee.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=at(Dn(t.size,e)))),n},mathmlBuilder(t,e){var n=new Ye.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",at(Dn(t.size,e)))),n}});var vp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},F3=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Je("Expected a control sequence",t);return e},yE=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},q3=(t,e,n,r)=>{var o=t.gullet.macros.get(n.text);o==null&&(n.noexpand=!0,o={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,o,r)};dt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:n}=t;e.consumeSpaces();var r=e.fetch();if(vp[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=vp[r.text]),jt(e.parseFunction(),"internal");throw new Je("Invalid token after macro prefix",r)}});dt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=e.gullet.popToken(),o=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new Je("Expected a control sequence",r);for(var l=0,h,c=[[]];e.gullet.future().text!=="{";)if(r=e.gullet.popToken(),r.text==="#"){if(e.gullet.future().text==="{"){h=e.gullet.future(),c[l].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Je('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==l+1)throw new Je('Argument number "'+r.text+'" out of order');l++,c.push([])}else{if(r.text==="EOF")throw new Je("Expected a macro definition");c[l].push(r.text)}var{tokens:p}=e.gullet.consumeArg();return h&&p.unshift(h),(n==="\\edef"||n==="\\xdef")&&(p=e.gullet.expandTokens(p),p.reverse()),e.gullet.macros.set(o,{tokens:p,numArgs:l,delimiters:c},n===vp[n]),{type:"internal",mode:e.mode}}});dt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=F3(e.gullet.popToken());e.gullet.consumeSpaces();var o=yE(e);return q3(e,r,o,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});dt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=F3(e.gullet.popToken()),o=e.gullet.popToken(),l=e.gullet.popToken();return q3(e,r,l,n==="\\\\globalfuture"),e.gullet.pushToken(l),e.gullet.pushToken(o),{type:"internal",mode:e.mode}}});var gl=function(e,n,r){var o=xn.math[e]&&xn.math[e].replace,l=e1(o||e,n,r);if(!l)throw new Error("Unsupported symbol "+e+" and font size "+n+".");return l},s1=function(e,n,r,o){var l=r.havingBaseStyle(n),h=Ee.makeSpan(o.concat(l.sizingClasses(r)),[e],r),c=l.sizeMultiplier/r.sizeMultiplier;return h.height*=c,h.depth*=c,h.maxFontSize=l.sizeMultiplier,h},j3=function(e,n,r){var o=n.havingBaseStyle(r),l=(1-n.sizeMultiplier/o.sizeMultiplier)*n.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=at(l),e.height-=l,e.depth+=l},wE=function(e,n,r,o,l,h){var c=Ee.makeSymbol(e,"Main-Regular",l,o),p=s1(c,n,o,h);return r&&j3(p,o,n),p},xE=function(e,n,r,o){return Ee.makeSymbol(e,"Size"+n+"-Regular",r,o)},$3=function(e,n,r,o,l,h){var c=xE(e,n,l,o),p=s1(Ee.makeSpan(["delimsizing","size"+n],[c],o),At.TEXT,o,h);return r&&j3(p,o,At.TEXT),p},mh=function(e,n,r){var o;n==="Size1-Regular"?o="delim-size1":o="delim-size4";var l=Ee.makeSpan(["delimsizinginner",o],[Ee.makeSpan([],[Ee.makeSymbol(e,n,r)])]);return{type:"elem",elem:l}},gh=function(e,n,r){var o=qi["Size4-Regular"][e.charCodeAt(0)]?qi["Size4-Regular"][e.charCodeAt(0)][4]:qi["Size1-Regular"][e.charCodeAt(0)][4],l=new so("inner",AS(e,Math.round(1e3*n))),h=new Na([l],{width:at(o),height:at(n),style:"width:"+at(o),viewBox:"0 0 "+1e3*o+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),c=Ee.makeSvgSpan([],[h],r);return c.height=n,c.style.height=at(n),c.style.width=at(o),{type:"elem",elem:c}},bp=.008,C0={type:"kern",size:-1*bp},kE=["|","\\lvert","\\rvert","\\vert"],SE=["\\|","\\lVert","\\rVert","\\Vert"],U3=function(e,n,r,o,l,h){var c,p,v,b,g="",m=0;c=v=b=e,p=null;var x="Size1-Regular";e==="\\uparrow"?v=b="⏐":e==="\\Uparrow"?v=b="‖":e==="\\downarrow"?c=v="⏐":e==="\\Downarrow"?c=v="‖":e==="\\updownarrow"?(c="\\uparrow",v="⏐",b="\\downarrow"):e==="\\Updownarrow"?(c="\\Uparrow",v="‖",b="\\Downarrow"):xt.contains(kE,e)?(v="∣",g="vert",m=333):xt.contains(SE,e)?(v="∥",g="doublevert",m=556):e==="["||e==="\\lbrack"?(c="⎡",v="⎢",b="⎣",x="Size4-Regular",g="lbrack",m=667):e==="]"||e==="\\rbrack"?(c="⎤",v="⎥",b="⎦",x="Size4-Regular",g="rbrack",m=667):e==="\\lfloor"||e==="⌊"?(v=c="⎢",b="⎣",x="Size4-Regular",g="lfloor",m=667):e==="\\lceil"||e==="⌈"?(c="⎡",v=b="⎢",x="Size4-Regular",g="lceil",m=667):e==="\\rfloor"||e==="⌋"?(v=c="⎥",b="⎦",x="Size4-Regular",g="rfloor",m=667):e==="\\rceil"||e==="⌉"?(c="⎤",v=b="⎥",x="Size4-Regular",g="rceil",m=667):e==="("||e==="\\lparen"?(c="⎛",v="⎜",b="⎝",x="Size4-Regular",g="lparen",m=875):e===")"||e==="\\rparen"?(c="⎞",v="⎟",b="⎠",x="Size4-Regular",g="rparen",m=875):e==="\\{"||e==="\\lbrace"?(c="⎧",p="⎨",b="⎩",v="⎪",x="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(c="⎫",p="⎬",b="⎭",v="⎪",x="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(c="⎧",b="⎩",v="⎪",x="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(c="⎫",b="⎭",v="⎪",x="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(c="⎧",b="⎭",v="⎪",x="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(c="⎫",b="⎩",v="⎪",x="Size4-Regular");var w=gl(c,x,l),S=w.height+w.depth,k=gl(v,x,l),C=k.height+k.depth,T=gl(b,x,l),A=T.height+T.depth,M=0,y=1;if(p!==null){var N=gl(p,x,l);M=N.height+N.depth,y=2}var z=S+A+M,F=Math.max(0,Math.ceil((n-z)/(y*C))),P=z+F*y*C,Y=o.fontMetrics().axisHeight;r&&(Y*=o.sizeMultiplier);var te=P/2-Y,de=[];if(g.length>0){var Ce=P-S-A,qe=Math.round(P*1e3),Ge=MS(g,Math.round(Ce*1e3)),nt=new so(g,Ge),je=(m/1e3).toFixed(3)+"em",Ne=(qe/1e3).toFixed(3)+"em",tt=new Na([nt],{width:je,height:Ne,viewBox:"0 0 "+m+" "+qe}),lt=Ee.makeSvgSpan([],[tt],o);lt.height=qe/1e3,lt.style.width=je,lt.style.height=Ne,de.push({type:"elem",elem:lt})}else{if(de.push(mh(b,x,l)),de.push(C0),p===null){var Qe=P-S-A+2*bp;de.push(gh(v,Qe,o))}else{var j=(P-S-A-M)/2+2*bp;de.push(gh(v,j,o)),de.push(C0),de.push(mh(p,x,l)),de.push(C0),de.push(gh(v,j,o))}de.push(C0),de.push(mh(c,x,l))}var Ht=o.havingBaseStyle(At.TEXT),Rt=Ee.makeVList({positionType:"bottom",positionData:te,children:de},Ht);return s1(Ee.makeSpan(["delimsizing","mult"],[Rt],Ht),At.TEXT,o,h)},vh=80,bh=.08,yh=function(e,n,r,o,l){var h=TS(e,o,r),c=new so(e,h),p=new Na([c],{width:"400em",height:at(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ee.makeSvgSpan(["hide-tail"],[p],l)},EE=function(e,n){var r=n.havingBaseSizing(),o=K3("\\surd",e*r.sizeMultiplier,G3,r),l=r.sizeMultiplier,h=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),c,p=0,v=0,b=0,g;return o.type==="small"?(b=1e3+1e3*h+vh,e<1?l=1:e<1.4&&(l=.7),p=(1+h+bh)/l,v=(1+h)/l,c=yh("sqrtMain",p,b,h,n),c.style.minWidth="0.853em",g=.833/l):o.type==="large"?(b=(1e3+vh)*Ll[o.size],v=(Ll[o.size]+h)/l,p=(Ll[o.size]+h+bh)/l,c=yh("sqrtSize"+o.size,p,b,h,n),c.style.minWidth="1.02em",g=1/l):(p=e+h+bh,v=e+h,b=Math.floor(1e3*e+h)+vh,c=yh("sqrtTall",p,b,h,n),c.style.minWidth="0.742em",g=1.056),c.height=v,c.style.height=at(p),{span:c,advanceWidth:g,ruleWidth:(n.fontMetrics().sqrtRuleThickness+h)*l}},V3=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],TE=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],W3=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ll=[0,1.2,1.8,2.4,3],AE=function(e,n,r,o,l){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),xt.contains(V3,e)||xt.contains(W3,e))return $3(e,n,!1,r,o,l);if(xt.contains(TE,e))return U3(e,Ll[n],!1,r,o,l);throw new Je("Illegal delimiter: '"+e+"'")},ME=[{type:"small",style:At.SCRIPTSCRIPT},{type:"small",style:At.SCRIPT},{type:"small",style:At.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],CE=[{type:"small",style:At.SCRIPTSCRIPT},{type:"small",style:At.SCRIPT},{type:"small",style:At.TEXT},{type:"stack"}],G3=[{type:"small",style:At.SCRIPTSCRIPT},{type:"small",style:At.SCRIPT},{type:"small",style:At.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],LE=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},K3=function(e,n,r,o){for(var l=Math.min(2,3-o.style.size),h=l;h<r.length&&r[h].type!=="stack";h++){var c=gl(e,LE(r[h]),"math"),p=c.height+c.depth;if(r[h].type==="small"){var v=o.havingBaseStyle(r[h].style);p*=v.sizeMultiplier}if(p>n)return r[h]}return r[r.length-1]},X3=function(e,n,r,o,l,h){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var c;xt.contains(W3,e)?c=ME:xt.contains(V3,e)?c=G3:c=CE;var p=K3(e,n,c,o);return p.type==="small"?wE(e,p.style,r,o,l,h):p.type==="large"?$3(e,p.size,r,o,l,h):U3(e,n,r,o,l,h)},_E=function(e,n,r,o,l,h){var c=o.fontMetrics().axisHeight*o.sizeMultiplier,p=901,v=5/o.fontMetrics().ptPerEm,b=Math.max(n-c,r+c),g=Math.max(b/500*p,2*b-v);return X3(e,g,!0,o,l,h)},Ta={sqrtImage:EE,sizedDelim:AE,sizeToMaxHeight:Ll,customSizedDelim:X3,leftRightDelim:_E},_g={"\\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}},NE=["(","\\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 iu(t,e){var n=nu(t);if(n&&xt.contains(NE,n.text))return n;throw n?new Je("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new Je("Invalid delimiter type '"+t.type+"'",t)}dt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var n=iu(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:_g[t.funcName].size,mclass:_g[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?Ee.makeSpan([t.mclass]):Ta.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(pi(t.delim,t.mode));var n=new Ye.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=at(Ta.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function Ng(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}dt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=t.parser.gullet.macros.get("\\current@color");if(n&&typeof n!="string")throw new Je("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:iu(e[0],t).text,color:n}}});dt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=iu(e[0],t),r=t.parser;++r.leftrightDepth;var o=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var l=jt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:o,left:n.text,right:l.delim,rightColor:l.color}},htmlBuilder:(t,e)=>{Ng(t);for(var n=er(t.body,e,!0,["mopen","mclose"]),r=0,o=0,l=!1,h=0;h<n.length;h++)n[h].isMiddle?l=!0:(r=Math.max(n[h].height,r),o=Math.max(n[h].depth,o));r*=e.sizeMultiplier,o*=e.sizeMultiplier;var c;if(t.left==="."?c=zl(e,["mopen"]):c=Ta.leftRightDelim(t.left,r,o,e,t.mode,["mopen"]),n.unshift(c),l)for(var p=1;p<n.length;p++){var v=n[p],b=v.isMiddle;b&&(n[p]=Ta.leftRightDelim(b.delim,r,o,b.options,t.mode,[]))}var g;if(t.right===".")g=zl(e,["mclose"]);else{var m=t.rightColor?e.withColor(t.rightColor):e;g=Ta.leftRightDelim(t.right,r,o,m,t.mode,["mclose"])}return n.push(g),Ee.makeSpan(["minner"],n,e)},mathmlBuilder:(t,e)=>{Ng(t);var n=Hr(t.body,e);if(t.left!=="."){var r=new Ye.MathNode("mo",[pi(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(t.right!=="."){var o=new Ye.MathNode("mo",[pi(t.right,t.mode)]);o.setAttribute("fence","true"),t.rightColor&&o.setAttribute("mathcolor",t.rightColor),n.push(o)}return r1(n)}});dt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=iu(e[0],t);if(!t.parser.leftrightDepth)throw new Je("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;if(t.delim===".")n=zl(e,[]);else{n=Ta.sizedDelim(t.delim,1,e,t.mode,[]);var r={delim:t.delim,options:e};n.isMiddle=r}return n},mathmlBuilder:(t,e)=>{var n=t.delim==="\\vert"||t.delim==="|"?pi("|","text"):pi(t.delim,t.mode),r=new Ye.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var l1=(t,e)=>{var n=Ee.wrapFragment(Qt(t.body,e),e),r=t.label.slice(1),o=e.sizeMultiplier,l,h=0,c=xt.isCharacterBox(t.body);if(r==="sout")l=Ee.makeSpan(["stretchy","sout"]),l.height=e.fontMetrics().defaultRuleThickness/o,h=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var p=Dn({number:.6,unit:"pt"},e),v=Dn({number:.35,unit:"ex"},e),b=e.havingBaseSizing();o=o/b.sizeMultiplier;var g=n.height+n.depth+p+v;n.style.paddingLeft=at(g/2+p);var m=Math.floor(1e3*g*o),x=SS(m),w=new Na([new so("phase",x)],{width:"400em",height:at(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});l=Ee.makeSvgSpan(["hide-tail"],[w],e),l.style.height=at(g),h=n.depth+p+v}else{/cancel/.test(r)?c||n.classes.push("cancel-pad"):r==="angl"?n.classes.push("anglpad"):n.classes.push("boxpad");var S=0,k=0,C=0;/box/.test(r)?(C=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),S=e.fontMetrics().fboxsep+(r==="colorbox"?0:C),k=S):r==="angl"?(C=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),S=4*C,k=Math.max(0,.25-n.depth)):(S=c?.2:0,k=S),l=Ra.encloseSpan(n,r,S,k,e),/fbox|boxed|fcolorbox/.test(r)?(l.style.borderStyle="solid",l.style.borderWidth=at(C)):r==="angl"&&C!==.049&&(l.style.borderTopWidth=at(C),l.style.borderRightWidth=at(C)),h=n.depth+k,t.backgroundColor&&(l.style.backgroundColor=t.backgroundColor,t.borderColor&&(l.style.borderColor=t.borderColor))}var T;if(t.backgroundColor)T=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:h},{type:"elem",elem:n,shift:0}]},e);else{var A=/cancel|phase/.test(r)?["svg-align"]:[];T=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:l,shift:h,wrapperClasses:A}]},e)}return/cancel/.test(r)&&(T.height=n.height,T.depth=n.depth),/cancel/.test(r)&&!c?Ee.makeSpan(["mord","cancel-lap"],[T],e):Ee.makeSpan(["mord"],[T],e)},c1=(t,e)=>{var n=0,r=new Ye.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[bn(t.body,e)]);switch(t.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=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),t.label==="\\fcolorbox"){var o=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+o+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};dt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=jt(e[0],"color-token").color,h=e[1];return{type:"enclose",mode:r.mode,label:o,backgroundColor:l,body:h}},htmlBuilder:l1,mathmlBuilder:c1});dt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:o}=t,l=jt(e[0],"color-token").color,h=jt(e[1],"color-token").color,c=e[2];return{type:"enclose",mode:r.mode,label:o,backgroundColor:h,borderColor:l,body:c}},htmlBuilder:l1,mathmlBuilder:c1});dt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\fbox",body:e[0]}}});dt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"enclose",mode:n.mode,label:r,body:o}},htmlBuilder:l1,mathmlBuilder:c1});dt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"enclose",mode:n.mode,label:"\\angl",body:e[0]}}});var Z3={};function Gi(t){for(var{type:e,names:n,props:r,handler:o,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},p=0;p<n.length;++p)Z3[n[p]]=c;l&&(xc[e]=l),h&&(kc[e]=h)}var Y3={};function G(t,e){Y3[t]=e}function Dg(t){var e=[];t.consumeSpaces();var n=t.fetch().text;for(n==="\\relax"&&(t.consume(),t.consumeSpaces(),n=t.fetch().text);n==="\\hline"||n==="\\hdashline";)t.consume(),e.push(n==="\\hdashline"),t.consumeSpaces(),n=t.fetch().text;return e}var au=t=>{var e=t.parser.settings;if(!e.displayMode)throw new Je("{"+t.envName+"} can be used only in display mode.")};function u1(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function fo(t,e,n){var{hskipBeforeAndAfter:r,addJot:o,cols:l,arraystretch:h,colSeparationType:c,autoTag:p,singleRow:v,emptySingleRow:b,maxNumCols:g,leqno:m}=e;if(t.gullet.beginGroup(),v||t.gullet.macros.set("\\cr","\\\\\\relax"),!h){var x=t.gullet.expandMacroAsText("\\arraystretch");if(x==null)h=1;else if(h=parseFloat(x),!h||h<0)throw new Je("Invalid \\arraystretch: "+x)}t.gullet.beginGroup();var w=[],S=[w],k=[],C=[],T=p!=null?[]:void 0;function A(){p&&t.gullet.macros.set("\\@eqnsw","1",!0)}function M(){T&&(t.gullet.macros.get("\\df@tag")?(T.push(t.subparse([new li("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):T.push(!!p&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(A(),C.push(Dg(t));;){var y=t.parseExpression(!1,v?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),y={type:"ordgroup",mode:t.mode,body:y},n&&(y={type:"styling",mode:t.mode,style:n,body:[y]}),w.push(y);var N=t.fetch().text;if(N==="&"){if(g&&w.length===g){if(v||c)throw new Je("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(N==="\\end"){M(),w.length===1&&y.type==="styling"&&y.body[0].body.length===0&&(S.length>1||!b)&&S.pop(),C.length<S.length+1&&C.push([]);break}else if(N==="\\\\"){t.consume();var z=void 0;t.gullet.future().text!==" "&&(z=t.parseSizeGroup(!0)),k.push(z?z.value:null),M(),C.push(Dg(t)),w=[],S.push(w),A()}else throw new Je("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:o,arraystretch:h,body:S,cols:l,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:C,colSeparationType:c,tags:T,leqno:m}}function d1(t){return t.slice(0,1)==="d"?"display":"text"}var Ki=function(e,n){var r,o,l=e.body.length,h=e.hLinesBeforeRow,c=0,p=new Array(l),v=[],b=Math.max(n.fontMetrics().arrayRuleWidth,n.minRuleThickness),g=1/n.fontMetrics().ptPerEm,m=5*g;if(e.colSeparationType&&e.colSeparationType==="small"){var x=n.havingStyle(At.SCRIPT).sizeMultiplier;m=.2778*(x/n.sizeMultiplier)}var w=e.colSeparationType==="CD"?Dn({number:3,unit:"ex"},n):12*g,S=3*g,k=e.arraystretch*w,C=.7*k,T=.3*k,A=0;function M(Ae){for(var Fe=0;Fe<Ae.length;++Fe)Fe>0&&(A+=.25),v.push({pos:A,isDashed:Ae[Fe]})}for(M(h[0]),r=0;r<e.body.length;++r){var y=e.body[r],N=C,z=T;c<y.length&&(c=y.length);var F=new Array(y.length);for(o=0;o<y.length;++o){var P=Qt(y[o],n);z<P.depth&&(z=P.depth),N<P.height&&(N=P.height),F[o]=P}var Y=e.rowGaps[r],te=0;Y&&(te=Dn(Y,n),te>0&&(te+=T,z<te&&(z=te),te=0)),e.addJot&&(z+=S),F.height=N,F.depth=z,A+=N,F.pos=A,A+=z+te,p[r]=F,M(h[r+1])}var de=A/2+n.fontMetrics().axisHeight,Ce=e.cols||[],qe=[],Ge,nt,je=[];if(e.tags&&e.tags.some(Ae=>Ae))for(r=0;r<l;++r){var Ne=p[r],tt=Ne.pos-de,lt=e.tags[r],Qe=void 0;lt===!0?Qe=Ee.makeSpan(["eqn-num"],[],n):lt===!1?Qe=Ee.makeSpan([],[],n):Qe=Ee.makeSpan([],er(lt,n,!0),n),Qe.depth=Ne.depth,Qe.height=Ne.height,je.push({type:"elem",elem:Qe,shift:tt})}for(o=0,nt=0;o<c||nt<Ce.length;++o,++nt){for(var j=Ce[nt]||{},Ht=!0;j.type==="separator";){if(Ht||(Ge=Ee.makeSpan(["arraycolsep"],[]),Ge.style.width=at(n.fontMetrics().doubleRuleSep),qe.push(Ge)),j.separator==="|"||j.separator===":"){var Rt=j.separator==="|"?"solid":"dashed",Ut=Ee.makeSpan(["vertical-separator"],[],n);Ut.style.height=at(A),Ut.style.borderRightWidth=at(b),Ut.style.borderRightStyle=Rt,Ut.style.margin="0 "+at(-b/2);var Nt=A-de;Nt&&(Ut.style.verticalAlign=at(-Nt)),qe.push(Ut)}else throw new Je("Invalid separator type: "+j.separator);nt++,j=Ce[nt]||{},Ht=!1}if(!(o>=c)){var oe=void 0;(o>0||e.hskipBeforeAndAfter)&&(oe=xt.deflt(j.pregap,m),oe!==0&&(Ge=Ee.makeSpan(["arraycolsep"],[]),Ge.style.width=at(oe),qe.push(Ge)));var he=[];for(r=0;r<l;++r){var J=p[r],ee=J[o];if(ee){var De=J.pos-de;ee.depth=J.depth,ee.height=J.height,he.push({type:"elem",elem:ee,shift:De})}}he=Ee.makeVList({positionType:"individualShift",children:he},n),he=Ee.makeSpan(["col-align-"+(j.align||"c")],[he]),qe.push(he),(o<c-1||e.hskipBeforeAndAfter)&&(oe=xt.deflt(j.postgap,m),oe!==0&&(Ge=Ee.makeSpan(["arraycolsep"],[]),Ge.style.width=at(oe),qe.push(Ge)))}}if(p=Ee.makeSpan(["mtable"],qe),v.length>0){for(var se=Ee.makeLineSpan("hline",n,b),V=Ee.makeLineSpan("hdashline",n,b),Z=[{type:"elem",elem:p,shift:0}];v.length>0;){var ve=v.pop(),le=ve.pos-de;ve.isDashed?Z.push({type:"elem",elem:V,shift:le}):Z.push({type:"elem",elem:se,shift:le})}p=Ee.makeVList({positionType:"individualShift",children:Z},n)}if(je.length===0)return Ee.makeSpan(["mord"],[p],n);var we=Ee.makeVList({positionType:"individualShift",children:je},n);return we=Ee.makeSpan(["tag"],[we],n),Ee.makeFragment([p,we])},DE={c:"center ",l:"left ",r:"right "},Xi=function(e,n){for(var r=[],o=new Ye.MathNode("mtd",[],["mtr-glue"]),l=new Ye.MathNode("mtd",[],["mml-eqn-num"]),h=0;h<e.body.length;h++){for(var c=e.body[h],p=[],v=0;v<c.length;v++)p.push(new Ye.MathNode("mtd",[bn(c[v],n)]));e.tags&&e.tags[h]&&(p.unshift(o),p.push(o),e.leqno?p.unshift(l):p.push(l)),r.push(new Ye.MathNode("mtr",p))}var b=new Ye.MathNode("mtable",r),g=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);b.setAttribute("rowspacing",at(g));var m="",x="";if(e.cols&&e.cols.length>0){var w=e.cols,S="",k=!1,C=0,T=w.length;w[0].type==="separator"&&(m+="top ",C=1),w[w.length-1].type==="separator"&&(m+="bottom ",T-=1);for(var A=C;A<T;A++)w[A].type==="align"?(x+=DE[w[A].align],k&&(S+="none "),k=!0):w[A].type==="separator"&&k&&(S+=w[A].separator==="|"?"solid ":"dashed ",k=!1);b.setAttribute("columnalign",x.trim()),/[sd]/.test(S)&&b.setAttribute("columnlines",S.trim())}if(e.colSeparationType==="align"){for(var M=e.cols||[],y="",N=1;N<M.length;N++)y+=N%2?"0em ":"1em ";b.setAttribute("columnspacing",y.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?b.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?b.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?b.setAttribute("columnspacing","0.5em"):b.setAttribute("columnspacing","1em");var z="",F=e.hLinesBeforeRow;m+=F[0].length>0?"left ":"",m+=F[F.length-1].length>0?"right ":"";for(var P=1;P<F.length-1;P++)z+=F[P].length===0?"none ":F[P][0]?"dashed ":"solid ";return/[sd]/.test(z)&&b.setAttribute("rowlines",z.trim()),m!==""&&(b=new Ye.MathNode("menclose",[b]),b.setAttribute("notation",m.trim())),e.arraystretch&&e.arraystretch<1&&(b=new Ye.MathNode("mstyle",[b]),b.setAttribute("scriptlevel","1")),b},J3=function(e,n){e.envName.indexOf("ed")===-1&&au(e);var r=[],o=e.envName.indexOf("at")>-1?"alignat":"align",l=e.envName==="split",h=fo(e.parser,{cols:r,addJot:!0,autoTag:l?void 0:u1(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:l?2:void 0,leqno:e.parser.settings.leqno},"display"),c,p=0,v={type:"ordgroup",mode:e.mode,body:[]};if(n[0]&&n[0].type==="ordgroup"){for(var b="",g=0;g<n[0].body.length;g++){var m=jt(n[0].body[g],"textord");b+=m.text}c=Number(b),p=c*2}var x=!p;h.body.forEach(function(C){for(var T=1;T<C.length;T+=2){var A=jt(C[T],"styling"),M=jt(A.body[0],"ordgroup");M.body.unshift(v)}if(x)p<C.length&&(p=C.length);else{var y=C.length/2;if(c<y)throw new Je("Too many math in a row: "+("expected "+c+", but got "+y),C[0])}});for(var w=0;w<p;++w){var S="r",k=0;w%2===1?S="l":w>0&&x&&(k=1),r[w]={type:"align",align:S,pregap:k,postgap:0}}return h.colSeparationType=x?"align":"alignat",h};Gi({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=nu(e[0]),r=n?[e[0]]:jt(e[0],"ordgroup").body,o=r.map(function(h){var c=a1(h),p=c.text;if("lcr".indexOf(p)!==-1)return{type:"align",align:p};if(p==="|")return{type:"separator",separator:"|"};if(p===":")return{type:"separator",separator:":"};throw new Je("Unknown column alignment: "+p,h)}),l={cols:o,hskipBeforeAndAfter:!0,maxNumCols:o.length};return fo(t.parser,l,d1(t.envName))},htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if(t.envName.charAt(t.envName.length-1)==="*"){var o=t.parser;if(o.consumeSpaces(),o.fetch().text==="["){if(o.consume(),o.consumeSpaces(),n=o.fetch().text,"lcr".indexOf(n)===-1)throw new Je("Expected l or c or r",o.nextToken);o.consume(),o.consumeSpaces(),o.expect("]"),o.consume(),r.cols=[{type:"align",align:n}]}}var l=fo(t.parser,r,d1(t.envName)),h=Math.max(0,...l.body.map(c=>c.length));return l.cols=new Array(h).fill({type:"align",align:n}),e?{type:"leftright",mode:t.mode,body:[l],left:e[0],right:e[1],rightColor:void 0}:l},htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=fo(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=nu(e[0]),r=n?[e[0]]:jt(e[0],"ordgroup").body,o=r.map(function(h){var c=a1(h),p=c.text;if("lc".indexOf(p)!==-1)return{type:"align",align:p};throw new Je("Unknown column alignment: "+p,h)});if(o.length>1)throw new Je("{subarray} can contain only one column");var l={cols:o,hskipBeforeAndAfter:!1,arraystretch:.5};if(l=fo(t.parser,l,"script"),l.body.length>0&&l.body[0].length>1)throw new Je("{subarray} can contain only one column");return l},htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},n=fo(t.parser,e,d1(t.envName));return{type:"leftright",mode:t.mode,body:[n],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:J3,htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){xt.contains(["gather","gather*"],t.envName)&&au(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:u1(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return fo(t.parser,e,"display")},htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:J3,htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){au(t);var e={autoTag:u1(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return fo(t.parser,e,"display")},htmlBuilder:Ki,mathmlBuilder:Xi});Gi({type:"array",names:["CD"],props:{numArgs:0},handler(t){return au(t),bE(t.parser)},htmlBuilder:Ki,mathmlBuilder:Xi});G("\\nonumber","\\gdef\\@eqnsw{0}");G("\\notag","\\nonumber");dt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new Je(t.funcName+" valid only within array environment")}});var Rg=Z3;dt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];if(o.type!=="ordgroup")throw new Je("Invalid environment name",o);for(var l="",h=0;h<o.body.length;++h)l+=jt(o.body[h],"textord").text;if(r==="\\begin"){if(!Rg.hasOwnProperty(l))throw new Je("No such environment: "+l,o);var c=Rg[l],{args:p,optArgs:v}=n.parseArguments("\\begin{"+l+"}",c),b={mode:n.mode,envName:l,parser:n},g=c.handler(b,p,v);n.expect("\\end",!1);var m=n.nextToken,x=jt(n.parseFunction(),"environment");if(x.name!==l)throw new Je("Mismatch: \\begin{"+l+"} matched by \\end{"+x.name+"}",m);return g}return{type:"environment",mode:n.mode,name:l,nameGroup:o}}});var Q3=(t,e)=>{var n=t.font,r=e.withFont(n);return Qt(t.body,r)},e2=(t,e)=>{var n=t.font,r=e.withFont(n);return bn(t.body,r)},Ig={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};dt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=Sc(e[0]),l=r;return l in Ig&&(l=Ig[l]),{type:"font",mode:n.mode,font:l.slice(1),body:o}},htmlBuilder:Q3,mathmlBuilder:e2});dt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,r=e[0],o=xt.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:ru(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:o}}});dt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,breakOnTokenText:o}=t,{mode:l}=n,h=n.parseExpression(!0,o),c="math"+r.slice(1);return{type:"font",mode:l,font:c,body:{type:"ordgroup",mode:n.mode,body:h}}},htmlBuilder:Q3,mathmlBuilder:e2});var t2=(t,e)=>{var n=e;return t==="display"?n=n.id>=At.SCRIPT.id?n.text():At.DISPLAY:t==="text"&&n.size===At.DISPLAY.size?n=At.TEXT:t==="script"?n=At.SCRIPT:t==="scriptscript"&&(n=At.SCRIPTSCRIPT),n},h1=(t,e)=>{var n=t2(t.size,e.style),r=n.fracNum(),o=n.fracDen(),l;l=e.havingStyle(r);var h=Qt(t.numer,l,e);if(t.continued){var c=8.5/e.fontMetrics().ptPerEm,p=3.5/e.fontMetrics().ptPerEm;h.height=h.height<c?c:h.height,h.depth=h.depth<p?p:h.depth}l=e.havingStyle(o);var v=Qt(t.denom,l,e),b,g,m;t.hasBarLine?(t.barSize?(g=Dn(t.barSize,e),b=Ee.makeLineSpan("frac-line",e,g)):b=Ee.makeLineSpan("frac-line",e),g=b.height,m=b.height):(b=null,g=0,m=e.fontMetrics().defaultRuleThickness);var x,w,S;n.size===At.DISPLAY.size||t.size==="display"?(x=e.fontMetrics().num1,g>0?w=3*m:w=7*m,S=e.fontMetrics().denom1):(g>0?(x=e.fontMetrics().num2,w=m):(x=e.fontMetrics().num3,w=3*m),S=e.fontMetrics().denom2);var k;if(b){var T=e.fontMetrics().axisHeight;x-h.depth-(T+.5*g)<w&&(x+=w-(x-h.depth-(T+.5*g))),T-.5*g-(v.height-S)<w&&(S+=w-(T-.5*g-(v.height-S)));var A=-(T-.5*g);k=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:b,shift:A},{type:"elem",elem:h,shift:-x}]},e)}else{var C=x-h.depth-(v.height-S);C<w&&(x+=.5*(w-C),S+=.5*(w-C)),k=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:v,shift:S},{type:"elem",elem:h,shift:-x}]},e)}l=e.havingStyle(n),k.height*=l.sizeMultiplier/e.sizeMultiplier,k.depth*=l.sizeMultiplier/e.sizeMultiplier;var M;n.size===At.DISPLAY.size?M=e.fontMetrics().delim1:n.size===At.SCRIPTSCRIPT.size?M=e.havingStyle(At.SCRIPT).fontMetrics().delim2:M=e.fontMetrics().delim2;var y,N;return t.leftDelim==null?y=zl(e,["mopen"]):y=Ta.customSizedDelim(t.leftDelim,M,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?N=Ee.makeSpan([]):t.rightDelim==null?N=zl(e,["mclose"]):N=Ta.customSizedDelim(t.rightDelim,M,!0,e.havingStyle(n),t.mode,["mclose"]),Ee.makeSpan(["mord"].concat(l.sizingClasses(e)),[y,Ee.makeSpan(["mfrac"],[k]),N],e)},p1=(t,e)=>{var n=new Ye.MathNode("mfrac",[bn(t.numer,e),bn(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var r=Dn(t.barSize,e);n.setAttribute("linethickness",at(r))}var o=t2(t.size,e.style);if(o.size!==e.style.size){n=new Ye.MathNode("mstyle",[n]);var l=o.size===At.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",l),n.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var h=[];if(t.leftDelim!=null){var c=new Ye.MathNode("mo",[new Ye.TextNode(t.leftDelim.replace("\\",""))]);c.setAttribute("fence","true"),h.push(c)}if(h.push(n),t.rightDelim!=null){var p=new Ye.MathNode("mo",[new Ye.TextNode(t.rightDelim.replace("\\",""))]);p.setAttribute("fence","true"),h.push(p)}return r1(h)}return n};dt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1],h,c=null,p=null,v="auto";switch(r){case"\\dfrac":case"\\frac":case"\\tfrac":h=!0;break;case"\\\\atopfrac":h=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":h=!1,c="(",p=")";break;case"\\\\bracefrac":h=!1,c="\\{",p="\\}";break;case"\\\\brackfrac":h=!1,c="[",p="]";break;default:throw new Error("Unrecognized genfrac command")}switch(r){case"\\dfrac":case"\\dbinom":v="display";break;case"\\tfrac":case"\\tbinom":v="text";break}return{type:"genfrac",mode:n.mode,continued:!1,numer:o,denom:l,hasBarLine:h,leftDelim:c,rightDelim:p,size:v,barSize:null}},htmlBuilder:h1,mathmlBuilder:p1});dt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:o,denom:l,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});dt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:r}=t,o;switch(n){case"\\over":o="\\frac";break;case"\\choose":o="\\binom";break;case"\\atop":o="\\\\atopfrac";break;case"\\brace":o="\\\\bracefrac";break;case"\\brack":o="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:o,token:r}}});var Og=["display","text","script","scriptscript"],Hg=function(e){var n=null;return e.length>0&&(n=e,n=n==="."?null:n),n};dt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:n}=t,r=e[4],o=e[5],l=Sc(e[0]),h=l.type==="atom"&&l.family==="open"?Hg(l.text):null,c=Sc(e[1]),p=c.type==="atom"&&c.family==="close"?Hg(c.text):null,v=jt(e[2],"size"),b,g=null;v.isBlank?b=!0:(g=v.value,b=g.number>0);var m="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var w=jt(x.body[0],"textord");m=Og[Number(w.text)]}}else x=jt(x,"textord"),m=Og[Number(x.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:o,continued:!1,hasBarLine:b,barSize:g,leftDelim:h,rightDelim:p,size:m}},htmlBuilder:h1,mathmlBuilder:p1});dt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:o}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:jt(e[0],"size").value,token:o}}});dt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0],l=lS(jt(e[1],"infix").size),h=e[2],c=l.number>0;return{type:"genfrac",mode:n.mode,numer:o,denom:h,continued:!1,hasBarLine:c,barSize:l,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:h1,mathmlBuilder:p1});var n2=(t,e)=>{var n=e.style,r,o;t.type==="supsub"?(r=t.sup?Qt(t.sup,e.havingStyle(n.sup()),e):Qt(t.sub,e.havingStyle(n.sub()),e),o=jt(t.base,"horizBrace")):o=jt(t,"horizBrace");var l=Qt(o.base,e.havingBaseStyle(At.DISPLAY)),h=Ra.svgSpan(o,e),c;if(o.isOver?(c=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:h}]},e),c.children[0].children[0].children[1].classes.push("svg-align")):(c=Ee.makeVList({positionType:"bottom",positionData:l.depth+.1+h.height,children:[{type:"elem",elem:h},{type:"kern",size:.1},{type:"elem",elem:l}]},e),c.children[0].children[0].children[0].classes.push("svg-align")),r){var p=Ee.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e);o.isOver?c=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:r}]},e):c=Ee.makeVList({positionType:"bottom",positionData:p.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:p}]},e)}return Ee.makeSpan(["mord",o.isOver?"mover":"munder"],[c],e)},RE=(t,e)=>{var n=Ra.mathMLnode(t.label);return new Ye.MathNode(t.isOver?"mover":"munder",[bn(t.base,e),n])};dt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:n2,mathmlBuilder:RE});dt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[1],o=jt(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:n.mode,href:o,body:jn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=er(t.body,e,!1);return Ee.makeAnchor(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=lo(t.body,e);return n instanceof Kr||(n=new Kr("mrow",[n])),n.setAttribute("href",t.href),n}});dt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=jt(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var o=[],l=0;l<r.length;l++){var h=r[l];h==="~"&&(h="\\textasciitilde"),o.push({type:"textord",mode:"text",text:h})}var c={type:"text",mode:n.mode,font:"\\texttt",body:o};return{type:"href",mode:n.mode,href:r,body:jn(c)}}});dt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:n}=t;return{type:"hbox",mode:n.mode,body:jn(e[0])}},htmlBuilder(t,e){var n=er(t.body,e,!1);return Ee.makeFragment(n)},mathmlBuilder(t,e){return new Ye.MathNode("mrow",Hr(t.body,e))}});dt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,token:o}=t,l=jt(e[0],"raw").string,h=e[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c,p={};switch(r){case"\\htmlClass":p.class=l,c={command:"\\htmlClass",class:l};break;case"\\htmlId":p.id=l,c={command:"\\htmlId",id:l};break;case"\\htmlStyle":p.style=l,c={command:"\\htmlStyle",style:l};break;case"\\htmlData":{for(var v=l.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length!==2)throw new Je("Error parsing key-value for \\htmlData");p["data-"+g[0].trim()]=g[1].trim()}c={command:"\\htmlData",attributes:p};break}default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(c)?{type:"html",mode:n.mode,attributes:p,body:jn(h)}:n.formatUnsupportedCmd(r)},htmlBuilder:(t,e)=>{var n=er(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var o=Ee.makeSpan(r,n,e);for(var l in t.attributes)l!=="class"&&t.attributes.hasOwnProperty(l)&&o.setAttribute(l,t.attributes[l]);return o},mathmlBuilder:(t,e)=>lo(t.body,e)});dt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:jn(e[0]),mathml:jn(e[1])}},htmlBuilder:(t,e)=>{var n=er(t.html,e,!1);return Ee.makeFragment(n)},mathmlBuilder:(t,e)=>lo(t.mathml,e)});var wh=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!n)throw new Je("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!x3(r))throw new Je("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};dt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:r}=t,o={number:0,unit:"em"},l={number:.9,unit:"em"},h={number:0,unit:"em"},c="";if(n[0])for(var p=jt(n[0],"raw").string,v=p.split(","),b=0;b<v.length;b++){var g=v[b].split("=");if(g.length===2){var m=g[1].trim();switch(g[0].trim()){case"alt":c=m;break;case"width":o=wh(m);break;case"height":l=wh(m);break;case"totalheight":h=wh(m);break;default:throw new Je("Invalid key: '"+g[0]+"' in \\includegraphics.")}}}var x=jt(e[0],"url").url;return c===""&&(c=x,c=c.replace(/^.*[\\/]/,""),c=c.substring(0,c.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:x})?{type:"includegraphics",mode:r.mode,alt:c,width:o,height:l,totalheight:h,src:x}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=Dn(t.height,e),r=0;t.totalheight.number>0&&(r=Dn(t.totalheight,e)-n);var o=0;t.width.number>0&&(o=Dn(t.width,e));var l={height:at(n+r)};o>0&&(l.width=at(o)),r>0&&(l.verticalAlign=at(-r));var h=new RS(t.src,t.alt,l);return h.height=n,h.depth=r,h},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var r=Dn(t.height,e),o=0;if(t.totalheight.number>0&&(o=Dn(t.totalheight,e)-r,n.setAttribute("valign",at(-o))),n.setAttribute("height",at(r+o)),t.width.number>0){var l=Dn(t.width,e);n.setAttribute("width",at(l))}return n.setAttribute("src",t.src),n}});dt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=jt(e[0],"size");if(n.settings.strict){var l=r[1]==="m",h=o.value.unit==="mu";l?(h||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+o.value.unit+" units")),n.mode!=="math"&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):h&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:o.value}},htmlBuilder(t,e){return Ee.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var n=Dn(t.dimension,e);return new Ye.SpaceNode(n)}});dt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:o}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=Ee.makeSpan([],[Qt(t.body,e)]),n=Ee.makeSpan(["inner"],[n],e)):n=Ee.makeSpan(["inner"],[Qt(t.body,e)]);var r=Ee.makeSpan(["fix"],[]),o=Ee.makeSpan([t.alignment],[n,r],e),l=Ee.makeSpan(["strut"]);return l.style.height=at(o.height+o.depth),o.depth&&(l.style.verticalAlign=at(-o.depth)),o.children.unshift(l),o=Ee.makeSpan(["thinbox"],[o],e),Ee.makeSpan(["mord","vbox"],[o],e)},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mpadded",[bn(t.body,e)]);if(t.alignment!=="rlap"){var r=t.alignment==="llap"?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}});dt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,o=r.mode;r.switchMode("math");var l=n==="\\("?"\\)":"$",h=r.parseExpression(!1,l);return r.expect(l),r.switchMode(o),{type:"styling",mode:r.mode,style:"text",body:h}}});dt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new Je("Mismatched "+t.funcName)}});var Pg=(t,e)=>{switch(e.style.size){case At.DISPLAY.size:return t.display;case At.TEXT.size:return t.text;case At.SCRIPT.size:return t.script;case At.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};dt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:jn(e[0]),text:jn(e[1]),script:jn(e[2]),scriptscript:jn(e[3])}},htmlBuilder:(t,e)=>{var n=Pg(t,e),r=er(n,e,!1);return Ee.makeFragment(r)},mathmlBuilder:(t,e)=>{var n=Pg(t,e);return lo(n,e)}});var r2=(t,e,n,r,o,l,h)=>{t=Ee.makeSpan([],[t]);var c=n&&xt.isCharacterBox(n),p,v;if(e){var b=Qt(e,r.havingStyle(o.sup()),r);v={elem:b,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-b.depth)}}if(n){var g=Qt(n,r.havingStyle(o.sub()),r);p={elem:g,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-g.height)}}var m;if(v&&p){var x=r.fontMetrics().bigOpSpacing5+p.elem.height+p.elem.depth+p.kern+t.depth+h;m=Ee.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:at(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:at(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(p){var w=t.height-h;m=Ee.makeVList({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:at(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t}]},r)}else if(v){var S=t.depth+h;m=Ee.makeVList({positionType:"bottom",positionData:S,children:[{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:at(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return t;var k=[m];if(p&&l!==0&&!c){var C=Ee.makeSpan(["mspace"],[],r);C.style.marginRight=at(l),k.unshift(C)}return Ee.makeSpan(["mop","op-limits"],k,r)},i2=["\\smallint"],Ss=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=jt(t.base,"op"),o=!0):l=jt(t,"op");var h=e.style,c=!1;h.size===At.DISPLAY.size&&l.symbol&&!xt.contains(i2,l.name)&&(c=!0);var p;if(l.symbol){var v=c?"Size2-Regular":"Size1-Regular",b="";if((l.name==="\\oiint"||l.name==="\\oiiint")&&(b=l.name.slice(1),l.name=b==="oiint"?"\\iint":"\\iiint"),p=Ee.makeSymbol(l.name,v,"math",e,["mop","op-symbol",c?"large-op":"small-op"]),b.length>0){var g=p.italic,m=Ee.staticSvg(b+"Size"+(c?"2":"1"),e);p=Ee.makeVList({positionType:"individualShift",children:[{type:"elem",elem:p,shift:0},{type:"elem",elem:m,shift:c?.08:0}]},e),l.name="\\"+b,p.classes.unshift("mop"),p.italic=g}}else if(l.body){var x=er(l.body,e,!0);x.length===1&&x[0]instanceof hi?(p=x[0],p.classes[0]="mop"):p=Ee.makeSpan(["mop"],x,e)}else{for(var w=[],S=1;S<l.name.length;S++)w.push(Ee.mathsym(l.name[S],l.mode,e));p=Ee.makeSpan(["mop"],w,e)}var k=0,C=0;return(p instanceof hi||l.name==="\\oiint"||l.name==="\\oiiint")&&!l.suppressBaseShift&&(k=(p.height-p.depth)/2-e.fontMetrics().axisHeight,C=p.italic),o?r2(p,n,r,e,h,C,k):(k&&(p.style.position="relative",p.style.top=at(k)),p)},Jl=(t,e)=>{var n;if(t.symbol)n=new Kr("mo",[pi(t.name,t.mode)]),xt.contains(i2,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new Kr("mo",Hr(t.body,e));else{n=new Kr("mi",[new ji(t.name.slice(1))]);var r=new Kr("mo",[pi("","text")]);t.parentIsSupSub?n=new Kr("mrow",[n,r]):n=D3([n,r])}return n},IE={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};dt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=r;return o.length===1&&(o=IE[o]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:Ss,mathmlBuilder:Jl});dt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:jn(r)}},htmlBuilder:Ss,mathmlBuilder:Jl});var OE={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};dt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Ss,mathmlBuilder:Jl});dt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Ss,mathmlBuilder:Jl});dt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:e,funcName:n}=t,r=n;return r.length===1&&(r=OE[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Ss,mathmlBuilder:Jl});var a2=(t,e)=>{var n,r,o=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=jt(t.base,"operatorname"),o=!0):l=jt(t,"operatorname");var h;if(l.body.length>0){for(var c=l.body.map(g=>{var m=g.text;return typeof m=="string"?{type:"textord",mode:g.mode,text:m}:g}),p=er(c,e.withFont("mathrm"),!0),v=0;v<p.length;v++){var b=p[v];b instanceof hi&&(b.text=b.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}h=Ee.makeSpan(["mop"],p,e)}else h=Ee.makeSpan(["mop"],[],e);return o?r2(h,n,r,e,e.style,0,0):h},HE=(t,e)=>{for(var n=Hr(t.body,e.withFont("mathrm")),r=!0,o=0;o<n.length;o++){var l=n[o];if(!(l instanceof Ye.SpaceNode))if(l instanceof Ye.MathNode)switch(l.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var h=l.children[0];l.children.length===1&&h instanceof Ye.TextNode?h.text=h.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){var c=n.map(b=>b.toText()).join("");n=[new Ye.TextNode(c)]}var p=new Ye.MathNode("mi",n);p.setAttribute("mathvariant","normal");var v=new Ye.MathNode("mo",[pi("","text")]);return t.parentIsSupSub?new Ye.MathNode("mrow",[p,v]):Ye.newDocumentFragment([p,v])};dt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,o=e[0];return{type:"operatorname",mode:n.mode,body:jn(o),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:a2,mathmlBuilder:HE});G("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Ko({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Ee.makeFragment(er(t.body,e,!1)):Ee.makeSpan(["mord"],er(t.body,e,!0),e)},mathmlBuilder(t,e){return lo(t.body,e,!0)}});dt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:n}=t,r=e[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(t,e){var n=Qt(t.body,e.havingCrampedStyle()),r=Ee.makeLineSpan("overline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r},{type:"kern",size:o}]},e);return Ee.makeSpan(["mord","overline"],[l],e)},mathmlBuilder(t,e){var n=new Ye.MathNode("mo",[new Ye.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ye.MathNode("mover",[bn(t.body,e),n]);return r.setAttribute("accent","true"),r}});dt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"phantom",mode:n.mode,body:jn(r)}},htmlBuilder:(t,e)=>{var n=er(t.body,e.withPhantom(),!1);return Ee.makeFragment(n)},mathmlBuilder:(t,e)=>{var n=Hr(t.body,e);return new Ye.MathNode("mphantom",n)}});dt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Ee.makeSpan([],[Qt(t.body,e.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e),Ee.makeSpan(["mord"],[n],e)},mathmlBuilder:(t,e)=>{var n=Hr(jn(t.body),e),r=new Ye.MathNode("mphantom",n),o=new Ye.MathNode("mpadded",[r]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}});dt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(t,e)=>{var n=Ee.makeSpan(["inner"],[Qt(t.body,e.withPhantom())]),r=Ee.makeSpan(["fix"],[]);return Ee.makeSpan(["mord","rlap"],[n,r],e)},mathmlBuilder:(t,e)=>{var n=Hr(jn(t.body),e),r=new Ye.MathNode("mphantom",n),o=new Ye.MathNode("mpadded",[r]);return o.setAttribute("width","0px"),o}});dt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=jt(e[0],"size").value,o=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:o}},htmlBuilder(t,e){var n=Qt(t.body,e),r=Dn(t.dy,e);return Ee.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new Ye.MathNode("mpadded",[bn(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}});dt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});dt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,n){var{parser:r}=t,o=n[0],l=jt(e[0],"size"),h=jt(e[1],"size");return{type:"rule",mode:r.mode,shift:o&&jt(o,"size").value,width:l.value,height:h.value}},htmlBuilder(t,e){var n=Ee.makeSpan(["mord","rule"],[],e),r=Dn(t.width,e),o=Dn(t.height,e),l=t.shift?Dn(t.shift,e):0;return n.style.borderRightWidth=at(r),n.style.borderTopWidth=at(o),n.style.bottom=at(l),n.width=r,n.height=o+l,n.depth=-l,n.maxFontSize=o*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=Dn(t.width,e),r=Dn(t.height,e),o=t.shift?Dn(t.shift,e):0,l=e.color&&e.getColor()||"black",h=new Ye.MathNode("mspace");h.setAttribute("mathbackground",l),h.setAttribute("width",at(n)),h.setAttribute("height",at(r));var c=new Ye.MathNode("mpadded",[h]);return o>=0?c.setAttribute("height",at(o)):(c.setAttribute("height",at(o)),c.setAttribute("depth",at(-o))),c.setAttribute("voffset",at(o)),c}});function o2(t,e,n){for(var r=er(t,e,!1),o=e.sizeMultiplier/n.sizeMultiplier,l=0;l<r.length;l++){var h=r[l].classes.indexOf("sizing");h<0?Array.prototype.push.apply(r[l].classes,e.sizingClasses(n)):r[l].classes[h+1]==="reset-size"+e.size&&(r[l].classes[h+1]="reset-size"+n.size),r[l].height*=o,r[l].depth*=o}return Ee.makeFragment(r)}var zg=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],PE=(t,e)=>{var n=e.havingSize(t.size);return o2(t.body,n,e)};dt({type:"sizing",names:zg,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!1,n);return{type:"sizing",mode:o.mode,size:zg.indexOf(r)+1,body:l}},htmlBuilder:PE,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),r=Hr(t.body,n),o=new Ye.MathNode("mstyle",r);return o.setAttribute("mathsize",at(n.sizeMultiplier)),o}});dt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:r}=t,o=!1,l=!1,h=n[0]&&jt(n[0],"ordgroup");if(h)for(var c="",p=0;p<h.body.length;++p){var v=h.body[p];if(c=v.text,c==="t")o=!0;else if(c==="b")l=!0;else{o=!1,l=!1;break}}else o=!0,l=!0;var b=e[0];return{type:"smash",mode:r.mode,body:b,smashHeight:o,smashDepth:l}},htmlBuilder:(t,e)=>{var n=Ee.makeSpan([],[Qt(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return n;if(t.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(t.smashDepth&&(n.depth=0,n.children))for(var o=0;o<n.children.length;o++)n.children[o].depth=0;var l=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e);return Ee.makeSpan(["mord"],[l],e)},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mpadded",[bn(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});dt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,o=n[0],l=e[0];return{type:"sqrt",mode:r.mode,body:l,index:o}},htmlBuilder(t,e){var n=Qt(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=Ee.wrapFragment(n,e);var r=e.fontMetrics(),o=r.defaultRuleThickness,l=o;e.style.id<At.TEXT.id&&(l=e.fontMetrics().xHeight);var h=o+l/4,c=n.height+n.depth+h+o,{span:p,ruleWidth:v,advanceWidth:b}=Ta.sqrtImage(c,e),g=p.height-v;g>n.height+n.depth+h&&(h=(h+g-n.height-n.depth)/2);var m=p.height-n.height-h-v;n.style.paddingLeft=at(b);var x=Ee.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+m)},{type:"elem",elem:p},{type:"kern",size:v}]},e);if(t.index){var w=e.havingStyle(At.SCRIPTSCRIPT),S=Qt(t.index,w,e),k=.6*(x.height-x.depth),C=Ee.makeVList({positionType:"shift",positionData:-k,children:[{type:"elem",elem:S}]},e),T=Ee.makeSpan(["root"],[C]);return Ee.makeSpan(["mord","sqrt"],[T,x],e)}else return Ee.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new Ye.MathNode("mroot",[bn(n,e),bn(r,e)]):new Ye.MathNode("msqrt",[bn(n,e)])}});var Bg={display:At.DISPLAY,text:At.TEXT,script:At.SCRIPT,scriptscript:At.SCRIPTSCRIPT};dt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:o}=t,l=o.parseExpression(!0,n),h=r.slice(1,r.length-5);return{type:"styling",mode:o.mode,style:h,body:l}},htmlBuilder(t,e){var n=Bg[t.style],r=e.havingStyle(n).withFont("");return o2(t.body,r,e)},mathmlBuilder(t,e){var n=Bg[t.style],r=e.havingStyle(n),o=Hr(t.body,r),l=new Ye.MathNode("mstyle",o),h={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},c=h[t.style];return l.setAttribute("scriptlevel",c[0]),l.setAttribute("displaystyle",c[1]),l}});var zE=function(e,n){var r=e.base;if(r)if(r.type==="op"){var o=r.limits&&(n.style.size===At.DISPLAY.size||r.alwaysHandleSupSub);return o?Ss:null}else if(r.type==="operatorname"){var l=r.alwaysHandleSupSub&&(n.style.size===At.DISPLAY.size||r.limits);return l?a2:null}else{if(r.type==="accent")return xt.isCharacterBox(r.base)?o1:null;if(r.type==="horizBrace"){var h=!e.sub;return h===r.isOver?n2:null}else return null}else return null};Ko({type:"supsub",htmlBuilder(t,e){var n=zE(t,e);if(n)return n(t,e);var{base:r,sup:o,sub:l}=t,h=Qt(r,e),c,p,v=e.fontMetrics(),b=0,g=0,m=r&&xt.isCharacterBox(r);if(o){var x=e.havingStyle(e.style.sup());c=Qt(o,x,e),m||(b=h.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(l){var w=e.havingStyle(e.style.sub());p=Qt(l,w,e),m||(g=h.depth+w.fontMetrics().subDrop*w.sizeMultiplier/e.sizeMultiplier)}var S;e.style===At.DISPLAY?S=v.sup1:e.style.cramped?S=v.sup3:S=v.sup2;var k=e.sizeMultiplier,C=at(.5/v.ptPerEm/k),T=null;if(p){var A=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(h instanceof hi||A)&&(T=at(-h.italic))}var M;if(c&&p){b=Math.max(b,S,c.depth+.25*v.xHeight),g=Math.max(g,v.sub2);var y=v.defaultRuleThickness,N=4*y;if(b-c.depth-(p.height-g)<N){g=N-(b-c.depth)+p.height;var z=.8*v.xHeight-(b-c.depth);z>0&&(b+=z,g-=z)}var F=[{type:"elem",elem:p,shift:g,marginRight:C,marginLeft:T},{type:"elem",elem:c,shift:-b,marginRight:C}];M=Ee.makeVList({positionType:"individualShift",children:F},e)}else if(p){g=Math.max(g,v.sub1,p.height-.8*v.xHeight);var P=[{type:"elem",elem:p,marginLeft:T,marginRight:C}];M=Ee.makeVList({positionType:"shift",positionData:g,children:P},e)}else if(c)b=Math.max(b,S,c.depth+.25*v.xHeight),M=Ee.makeVList({positionType:"shift",positionData:-b,children:[{type:"elem",elem:c,marginRight:C}]},e);else throw new Error("supsub must have either sup or sub.");var Y=mp(h,"right")||"mord";return Ee.makeSpan([Y],[h,Ee.makeSpan(["msupsub"],[M])],e)},mathmlBuilder(t,e){var n=!1,r,o;t.base&&t.base.type==="horizBrace"&&(o=!!t.sup,o===t.base.isOver&&(n=!0,r=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var l=[bn(t.base,e)];t.sub&&l.push(bn(t.sub,e)),t.sup&&l.push(bn(t.sup,e));var h;if(n)h=r?"mover":"munder";else if(t.sub)if(t.sup){var v=t.base;v&&v.type==="op"&&v.limits&&e.style===At.DISPLAY||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(e.style===At.DISPLAY||v.limits)?h="munderover":h="msubsup"}else{var p=t.base;p&&p.type==="op"&&p.limits&&(e.style===At.DISPLAY||p.alwaysHandleSupSub)||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(p.limits||e.style===At.DISPLAY)?h="munder":h="msub"}else{var c=t.base;c&&c.type==="op"&&c.limits&&(e.style===At.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===At.DISPLAY)?h="mover":h="msup"}return new Ye.MathNode(h,l)}});Ko({type:"atom",htmlBuilder(t,e){return Ee.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new Ye.MathNode("mo",[pi(t.text,t.mode)]);if(t.family==="bin"){var r=i1(t,e);r==="bold-italic"&&n.setAttribute("mathvariant",r)}else t.family==="punct"?n.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&n.setAttribute("stretchy","false");return n}});var s2={mi:"italic",mn:"normal",mtext:"normal"};Ko({type:"mathord",htmlBuilder(t,e){return Ee.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var n=new Ye.MathNode("mi",[pi(t.text,t.mode,e)]),r=i1(t,e)||"italic";return r!==s2[n.type]&&n.setAttribute("mathvariant",r),n}});Ko({type:"textord",htmlBuilder(t,e){return Ee.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var n=pi(t.text,t.mode,e),r=i1(t,e)||"normal",o;return t.mode==="text"?o=new Ye.MathNode("mtext",[n]):/[0-9]/.test(t.text)?o=new Ye.MathNode("mn",[n]):t.text==="\\prime"?o=new Ye.MathNode("mo",[n]):o=new Ye.MathNode("mi",[n]),r!==s2[o.type]&&o.setAttribute("mathvariant",r),o}});var xh={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},kh={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ko({type:"spacing",htmlBuilder(t,e){if(kh.hasOwnProperty(t.text)){var n=kh[t.text].className||"";if(t.mode==="text"){var r=Ee.makeOrd(t,e,"textord");return r.classes.push(n),r}else return Ee.makeSpan(["mspace",n],[Ee.mathsym(t.text,t.mode,e)],e)}else{if(xh.hasOwnProperty(t.text))return Ee.makeSpan(["mspace",xh[t.text]],[],e);throw new Je('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(kh.hasOwnProperty(t.text))n=new Ye.MathNode("mtext",[new Ye.TextNode(" ")]);else{if(xh.hasOwnProperty(t.text))return new Ye.MathNode("mspace");throw new Je('Unknown type of space "'+t.text+'"')}return n}});var Fg=()=>{var t=new Ye.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};Ko({type:"tag",mathmlBuilder(t,e){var n=new Ye.MathNode("mtable",[new Ye.MathNode("mtr",[Fg(),new Ye.MathNode("mtd",[lo(t.body,e)]),Fg(),new Ye.MathNode("mtd",[lo(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var qg={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},jg={"\\textbf":"textbf","\\textmd":"textmd"},BE={"\\textit":"textit","\\textup":"textup"},$g=(t,e)=>{var n=t.font;if(n){if(qg[n])return e.withTextFontFamily(qg[n]);if(jg[n])return e.withTextFontWeight(jg[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(BE[n])};dt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:n,funcName:r}=t,o=e[0];return{type:"text",mode:n.mode,body:jn(o),font:r}},htmlBuilder(t,e){var n=$g(t,e),r=er(t.body,n,!0);return Ee.makeSpan(["mord","text"],r,n)},mathmlBuilder(t,e){var n=$g(t,e);return lo(t.body,n)}});dt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"underline",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Qt(t.body,e),r=Ee.makeLineSpan("underline-line",e),o=e.fontMetrics().defaultRuleThickness,l=Ee.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:o},{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n}]},e);return Ee.makeSpan(["mord","underline"],[l],e)},mathmlBuilder(t,e){var n=new Ye.MathNode("mo",[new Ye.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Ye.MathNode("munder",[bn(t.body,e),n]);return r.setAttribute("accentunder","true"),r}});dt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:n}=t;return{type:"vcenter",mode:n.mode,body:e[0]}},htmlBuilder(t,e){var n=Qt(t.body,e),r=e.fontMetrics().axisHeight,o=.5*(n.height-r-(n.depth+r));return Ee.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){return new Ye.MathNode("mpadded",[bn(t.body,e)],["vcenter"])}});dt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new Je("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=Ug(t),r=[],o=e.havingStyle(e.style.text()),l=0;l<n.length;l++){var h=n[l];h==="~"&&(h="\\textasciitilde"),r.push(Ee.makeSymbol(h,"Typewriter-Regular",t.mode,o,["mord","texttt"]))}return Ee.makeSpan(["mord","text"].concat(o.sizingClasses(e)),Ee.tryCombineChars(r),o)},mathmlBuilder(t,e){var n=new Ye.TextNode(Ug(t)),r=new Ye.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Ug=t=>t.body.replace(/ /g,t.star?"␣":" "),Ja=_3,l2=`[ \r
|
||
]`,FE="\\\\[a-zA-Z@]+",qE="\\\\[^\uD800-\uDFFF]",jE="("+FE+")"+l2+"*",$E=`\\\\(
|
||
|[ \r ]+
|
||
?)[ \r ]*`,yp="[̀-ͯ]",UE=new RegExp(yp+"+$"),VE="("+l2+"+)|"+($E+"|")+"([!-\\[\\]-‧-豈-]"+(yp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(yp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+jE)+("|"+qE+")");class Vg{constructor(e,n){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=n,this.tokenRegex=new RegExp(VE,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,n){this.catcodes[e]=n}lex(){var e=this.input,n=this.tokenRegex.lastIndex;if(n===e.length)return new li("EOF",new Wr(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new Je("Unexpected character: '"+e[n]+"'",new li(e[n],new Wr(this,n,n+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[o]===14){var l=e.indexOf(`
|
||
`,this.tokenRegex.lastIndex);return l===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=l+1,this.lex()}return new li(o,new Wr(this,n,this.tokenRegex.lastIndex))}}class WE{constructor(e,n){e===void 0&&(e={}),n===void 0&&(n={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=n,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Je("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var n in e)e.hasOwnProperty(n)&&(e[n]==null?delete this.current[n]:this.current[n]=e[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,n,r){if(r===void 0&&(r=!1),r){for(var o=0;o<this.undefStack.length;o++)delete this.undefStack[o][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=n)}else{var l=this.undefStack[this.undefStack.length-1];l&&!l.hasOwnProperty(e)&&(l[e]=this.current[e])}n==null?delete this.current[e]:this.current[e]=n}}var GE=Y3;G("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});G("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});G("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});G("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});G("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var n=t.future();return e[0].length===1&&e[0][0].text===n.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});G("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");G("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var Wg={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};G("\\char",function(t){var e=t.popToken(),n,r="";if(e.text==="'")n=8,e=t.popToken();else if(e.text==='"')n=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")r=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Je("\\char` missing argument");r=e.text.charCodeAt(0)}else n=10;if(n){if(r=Wg[e.text],r==null||r>=n)throw new Je("Invalid base-"+n+" digit "+e.text);for(var o;(o=Wg[t.future().text])!=null&&o<n;)r*=n,r+=o,t.popToken()}return"\\@char{"+r+"}"});var f1=(t,e,n,r)=>{var o=t.consumeArg().tokens;if(o.length!==1)throw new Je("\\newcommand's first argument must be a macro name");var l=o[0].text,h=t.isDefined(l);if(h&&!e)throw new Je("\\newcommand{"+l+"} attempting to redefine "+(l+"; use \\renewcommand"));if(!h&&!n)throw new Je("\\renewcommand{"+l+"} when command "+l+" does not yet exist; use \\newcommand");var c=0;if(o=t.consumeArg().tokens,o.length===1&&o[0].text==="["){for(var p="",v=t.expandNextToken();v.text!=="]"&&v.text!=="EOF";)p+=v.text,v=t.expandNextToken();if(!p.match(/^\s*[0-9]+\s*$/))throw new Je("Invalid number of arguments: "+p);c=parseInt(p),o=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:o,numArgs:c}),""};G("\\newcommand",t=>f1(t,!1,!0,!1));G("\\renewcommand",t=>f1(t,!0,!1,!1));G("\\providecommand",t=>f1(t,!0,!0,!0));G("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});G("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});G("\\show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),Ja[n],xn.math[n],xn.text[n]),""});G("\\bgroup","{");G("\\egroup","}");G("~","\\nobreakspace");G("\\lq","`");G("\\rq","'");G("\\aa","\\r a");G("\\AA","\\r A");G("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");G("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");G("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");G("ℬ","\\mathscr{B}");G("ℰ","\\mathscr{E}");G("ℱ","\\mathscr{F}");G("ℋ","\\mathscr{H}");G("ℐ","\\mathscr{I}");G("ℒ","\\mathscr{L}");G("ℳ","\\mathscr{M}");G("ℛ","\\mathscr{R}");G("ℭ","\\mathfrak{C}");G("ℌ","\\mathfrak{H}");G("ℨ","\\mathfrak{Z}");G("\\Bbbk","\\Bbb{k}");G("·","\\cdotp");G("\\llap","\\mathllap{\\textrm{#1}}");G("\\rlap","\\mathrlap{\\textrm{#1}}");G("\\clap","\\mathclap{\\textrm{#1}}");G("\\mathstrut","\\vphantom{(}");G("\\underbar","\\underline{\\text{#1}}");G("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');G("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");G("\\ne","\\neq");G("≠","\\neq");G("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");G("∉","\\notin");G("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");G("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");G("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");G("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");G("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");G("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");G("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");G("⟂","\\perp");G("‼","\\mathclose{!\\mkern-0.8mu!}");G("∌","\\notni");G("⌜","\\ulcorner");G("⌝","\\urcorner");G("⌞","\\llcorner");G("⌟","\\lrcorner");G("©","\\copyright");G("®","\\textregistered");G("️","\\textregistered");G("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');G("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');G("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');G("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');G("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");G("⋮","\\vdots");G("\\varGamma","\\mathit{\\Gamma}");G("\\varDelta","\\mathit{\\Delta}");G("\\varTheta","\\mathit{\\Theta}");G("\\varLambda","\\mathit{\\Lambda}");G("\\varXi","\\mathit{\\Xi}");G("\\varPi","\\mathit{\\Pi}");G("\\varSigma","\\mathit{\\Sigma}");G("\\varUpsilon","\\mathit{\\Upsilon}");G("\\varPhi","\\mathit{\\Phi}");G("\\varPsi","\\mathit{\\Psi}");G("\\varOmega","\\mathit{\\Omega}");G("\\substack","\\begin{subarray}{c}#1\\end{subarray}");G("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");G("\\boxed","\\fbox{$\\displaystyle{#1}$}");G("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");G("\\implies","\\DOTSB\\;\\Longrightarrow\\;");G("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");G("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");G("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Gg={",":"\\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"};G("\\dots",function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in Gg?e=Gg[n]:(n.slice(0,4)==="\\not"||n in xn.math&&xt.contains(["bin","rel"],xn.math[n].group))&&(e="\\dotsb"),e});var m1={")":!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};G("\\dotso",function(t){var e=t.future().text;return e in m1?"\\ldots\\,":"\\ldots"});G("\\dotsc",function(t){var e=t.future().text;return e in m1&&e!==","?"\\ldots\\,":"\\ldots"});G("\\cdots",function(t){var e=t.future().text;return e in m1?"\\@cdots\\,":"\\@cdots"});G("\\dotsb","\\cdots");G("\\dotsm","\\cdots");G("\\dotsi","\\!\\cdots");G("\\dotsx","\\ldots\\,");G("\\DOTSI","\\relax");G("\\DOTSB","\\relax");G("\\DOTSX","\\relax");G("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");G("\\,","\\tmspace+{3mu}{.1667em}");G("\\thinspace","\\,");G("\\>","\\mskip{4mu}");G("\\:","\\tmspace+{4mu}{.2222em}");G("\\medspace","\\:");G("\\;","\\tmspace+{5mu}{.2777em}");G("\\thickspace","\\;");G("\\!","\\tmspace-{3mu}{.1667em}");G("\\negthinspace","\\!");G("\\negmedspace","\\tmspace-{4mu}{.2222em}");G("\\negthickspace","\\tmspace-{5mu}{.277em}");G("\\enspace","\\kern.5em ");G("\\enskip","\\hskip.5em\\relax");G("\\quad","\\hskip1em\\relax");G("\\qquad","\\hskip2em\\relax");G("\\tag","\\@ifstar\\tag@literal\\tag@paren");G("\\tag@paren","\\tag@literal{({#1})}");G("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new Je("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});G("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");G("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");G("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");G("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");G("\\newline","\\\\\\relax");G("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var c2=at(qi["Main-Regular"]["T".charCodeAt(0)][1]-.7*qi["Main-Regular"]["A".charCodeAt(0)][1]);G("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+c2+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");G("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+c2+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");G("\\hspace","\\@ifstar\\@hspacer\\@hspace");G("\\@hspace","\\hskip #1\\relax");G("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");G("\\ordinarycolon",":");G("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");G("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');G("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');G("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');G("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');G("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');G("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');G("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');G("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');G("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');G("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');G("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');G("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');G("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');G("∷","\\dblcolon");G("∹","\\eqcolon");G("≔","\\coloneqq");G("≕","\\eqqcolon");G("⩴","\\Coloneqq");G("\\ratio","\\vcentcolon");G("\\coloncolon","\\dblcolon");G("\\colonequals","\\coloneqq");G("\\coloncolonequals","\\Coloneqq");G("\\equalscolon","\\eqqcolon");G("\\equalscoloncolon","\\Eqqcolon");G("\\colonminus","\\coloneq");G("\\coloncolonminus","\\Coloneq");G("\\minuscolon","\\eqcolon");G("\\minuscoloncolon","\\Eqcolon");G("\\coloncolonapprox","\\Colonapprox");G("\\coloncolonsim","\\Colonsim");G("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");G("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");G("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");G("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");G("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");G("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");G("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");G("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");G("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");G("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");G("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");G("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");G("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");G("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");G("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");G("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");G("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");G("\\nleqq","\\html@mathml{\\@nleqq}{≰}");G("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");G("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");G("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");G("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");G("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");G("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");G("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");G("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");G("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");G("\\imath","\\html@mathml{\\@imath}{ı}");G("\\jmath","\\html@mathml{\\@jmath}{ȷ}");G("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");G("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");G("⟦","\\llbracket");G("⟧","\\rrbracket");G("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");G("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");G("⦃","\\lBrace");G("⦄","\\rBrace");G("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");G("⦵","\\minuso");G("\\darr","\\downarrow");G("\\dArr","\\Downarrow");G("\\Darr","\\Downarrow");G("\\lang","\\langle");G("\\rang","\\rangle");G("\\uarr","\\uparrow");G("\\uArr","\\Uparrow");G("\\Uarr","\\Uparrow");G("\\N","\\mathbb{N}");G("\\R","\\mathbb{R}");G("\\Z","\\mathbb{Z}");G("\\alef","\\aleph");G("\\alefsym","\\aleph");G("\\Alpha","\\mathrm{A}");G("\\Beta","\\mathrm{B}");G("\\bull","\\bullet");G("\\Chi","\\mathrm{X}");G("\\clubs","\\clubsuit");G("\\cnums","\\mathbb{C}");G("\\Complex","\\mathbb{C}");G("\\Dagger","\\ddagger");G("\\diamonds","\\diamondsuit");G("\\empty","\\emptyset");G("\\Epsilon","\\mathrm{E}");G("\\Eta","\\mathrm{H}");G("\\exist","\\exists");G("\\harr","\\leftrightarrow");G("\\hArr","\\Leftrightarrow");G("\\Harr","\\Leftrightarrow");G("\\hearts","\\heartsuit");G("\\image","\\Im");G("\\infin","\\infty");G("\\Iota","\\mathrm{I}");G("\\isin","\\in");G("\\Kappa","\\mathrm{K}");G("\\larr","\\leftarrow");G("\\lArr","\\Leftarrow");G("\\Larr","\\Leftarrow");G("\\lrarr","\\leftrightarrow");G("\\lrArr","\\Leftrightarrow");G("\\Lrarr","\\Leftrightarrow");G("\\Mu","\\mathrm{M}");G("\\natnums","\\mathbb{N}");G("\\Nu","\\mathrm{N}");G("\\Omicron","\\mathrm{O}");G("\\plusmn","\\pm");G("\\rarr","\\rightarrow");G("\\rArr","\\Rightarrow");G("\\Rarr","\\Rightarrow");G("\\real","\\Re");G("\\reals","\\mathbb{R}");G("\\Reals","\\mathbb{R}");G("\\Rho","\\mathrm{P}");G("\\sdot","\\cdot");G("\\sect","\\S");G("\\spades","\\spadesuit");G("\\sub","\\subset");G("\\sube","\\subseteq");G("\\supe","\\supseteq");G("\\Tau","\\mathrm{T}");G("\\thetasym","\\vartheta");G("\\weierp","\\wp");G("\\Zeta","\\mathrm{Z}");G("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");G("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");G("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");G("\\bra","\\mathinner{\\langle{#1}|}");G("\\ket","\\mathinner{|{#1}\\rangle}");G("\\braket","\\mathinner{\\langle{#1}\\rangle}");G("\\Bra","\\left\\langle#1\\right|");G("\\Ket","\\left|#1\\right\\rangle");var u2=t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,o=e.consumeArg().tokens,l=e.consumeArg().tokens,h=e.macros.get("|"),c=e.macros.get("\\|");e.macros.beginGroup();var p=g=>m=>{t&&(m.macros.set("|",h),o.length&&m.macros.set("\\|",c));var x=g;if(!g&&o.length){var w=m.future();w.text==="|"&&(m.popToken(),x=!0)}return{tokens:x?o:r,numArgs:0}};e.macros.set("|",p(!1)),o.length&&e.macros.set("\\|",p(!0));var v=e.consumeArg().tokens,b=e.expandTokens([...l,...v,...n]);return e.macros.endGroup(),{tokens:b.reverse(),numArgs:0}};G("\\bra@ket",u2(!1));G("\\bra@set",u2(!0));G("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");G("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");G("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");G("\\angln","{\\angl n}");G("\\blue","\\textcolor{##6495ed}{#1}");G("\\orange","\\textcolor{##ffa500}{#1}");G("\\pink","\\textcolor{##ff00af}{#1}");G("\\red","\\textcolor{##df0030}{#1}");G("\\green","\\textcolor{##28ae7b}{#1}");G("\\gray","\\textcolor{gray}{#1}");G("\\purple","\\textcolor{##9d38bd}{#1}");G("\\blueA","\\textcolor{##ccfaff}{#1}");G("\\blueB","\\textcolor{##80f6ff}{#1}");G("\\blueC","\\textcolor{##63d9ea}{#1}");G("\\blueD","\\textcolor{##11accd}{#1}");G("\\blueE","\\textcolor{##0c7f99}{#1}");G("\\tealA","\\textcolor{##94fff5}{#1}");G("\\tealB","\\textcolor{##26edd5}{#1}");G("\\tealC","\\textcolor{##01d1c1}{#1}");G("\\tealD","\\textcolor{##01a995}{#1}");G("\\tealE","\\textcolor{##208170}{#1}");G("\\greenA","\\textcolor{##b6ffb0}{#1}");G("\\greenB","\\textcolor{##8af281}{#1}");G("\\greenC","\\textcolor{##74cf70}{#1}");G("\\greenD","\\textcolor{##1fab54}{#1}");G("\\greenE","\\textcolor{##0d923f}{#1}");G("\\goldA","\\textcolor{##ffd0a9}{#1}");G("\\goldB","\\textcolor{##ffbb71}{#1}");G("\\goldC","\\textcolor{##ff9c39}{#1}");G("\\goldD","\\textcolor{##e07d10}{#1}");G("\\goldE","\\textcolor{##a75a05}{#1}");G("\\redA","\\textcolor{##fca9a9}{#1}");G("\\redB","\\textcolor{##ff8482}{#1}");G("\\redC","\\textcolor{##f9685d}{#1}");G("\\redD","\\textcolor{##e84d39}{#1}");G("\\redE","\\textcolor{##bc2612}{#1}");G("\\maroonA","\\textcolor{##ffbde0}{#1}");G("\\maroonB","\\textcolor{##ff92c6}{#1}");G("\\maroonC","\\textcolor{##ed5fa6}{#1}");G("\\maroonD","\\textcolor{##ca337c}{#1}");G("\\maroonE","\\textcolor{##9e034e}{#1}");G("\\purpleA","\\textcolor{##ddd7ff}{#1}");G("\\purpleB","\\textcolor{##c6b9fc}{#1}");G("\\purpleC","\\textcolor{##aa87ff}{#1}");G("\\purpleD","\\textcolor{##7854ab}{#1}");G("\\purpleE","\\textcolor{##543b78}{#1}");G("\\mintA","\\textcolor{##f5f9e8}{#1}");G("\\mintB","\\textcolor{##edf2df}{#1}");G("\\mintC","\\textcolor{##e0e5cc}{#1}");G("\\grayA","\\textcolor{##f6f7f7}{#1}");G("\\grayB","\\textcolor{##f0f1f2}{#1}");G("\\grayC","\\textcolor{##e3e5e6}{#1}");G("\\grayD","\\textcolor{##d6d8da}{#1}");G("\\grayE","\\textcolor{##babec2}{#1}");G("\\grayF","\\textcolor{##888d93}{#1}");G("\\grayG","\\textcolor{##626569}{#1}");G("\\grayH","\\textcolor{##3b3e40}{#1}");G("\\grayI","\\textcolor{##21242c}{#1}");G("\\kaBlue","\\textcolor{##314453}{#1}");G("\\kaGreen","\\textcolor{##71B307}{#1}");var d2={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class KE{constructor(e,n,r){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=n,this.expansionCount=0,this.feed(e),this.macros=new WE(GE,n.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Vg(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var n,r,o;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:o,end:r}=this.consumeArg(["]"])}else({tokens:o,start:n,end:r}=this.consumeArg());return this.pushToken(new li("EOF",r.loc)),this.pushTokens(o),n.range(r,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var n=[],r=e&&e.length>0;r||this.consumeSpaces();var o=this.future(),l,h=0,c=0;do{if(l=this.popToken(),n.push(l),l.text==="{")++h;else if(l.text==="}"){if(--h,h===-1)throw new Je("Extra }",l)}else if(l.text==="EOF")throw new Je("Unexpected end of input in a macro argument, expected '"+(e&&r?e[c]:"}")+"'",l);if(e&&r)if((h===0||h===1&&e[c]==="{")&&l.text===e[c]){if(++c,c===e.length){n.splice(-c,c);break}}else c=0}while(h!==0||r);return o.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:o,end:l}}consumeArgs(e,n){if(n){if(n.length!==e+1)throw new Je("The length of delimiters doesn't match the number of args!");for(var r=n[0],o=0;o<r.length;o++){var l=this.popToken();if(r[o]!==l.text)throw new Je("Use of the macro doesn't match its definition",l)}}for(var h=[],c=0;c<e;c++)h.push(this.consumeArg(n&&n[c+1]).tokens);return h}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Je("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var n=this.popToken(),r=n.text,o=n.noexpand?null:this._getExpansion(r);if(o==null||e&&o.unexpandable){if(e&&o==null&&r[0]==="\\"&&!this.isDefined(r))throw new Je("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var l=o.tokens,h=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){l=l.slice();for(var c=l.length-1;c>=0;--c){var p=l[c];if(p.text==="#"){if(c===0)throw new Je("Incomplete placeholder at end of macro body",p);if(p=l[--c],p.text==="#")l.splice(c+1,1);else if(/^[1-9]$/.test(p.text))l.splice(c,2,...h[+p.text-1]);else throw new Je("Not a valid argument number",p)}}}return this.pushTokens(l),l.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new li(e)]):void 0}expandTokens(e){var n=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(this.expandOnce(!0)===!1){var o=this.stack.pop();o.treatAsRelax&&(o.noexpand=!1,o.treatAsRelax=!1),n.push(o)}return this.countExpansion(n.length),n}expandMacroAsText(e){var n=this.expandMacro(e);return n&&n.map(r=>r.text).join("")}_getExpansion(e){var n=this.macros.get(e);if(n==null)return n;if(e.length===1){var r=this.lexer.catcodes[e];if(r!=null&&r!==13)return}var o=typeof n=="function"?n(this):n;if(typeof o=="string"){var l=0;if(o.indexOf("#")!==-1)for(var h=o.replace(/##/g,"");h.indexOf("#"+(l+1))!==-1;)++l;for(var c=new Vg(o,this.settings),p=[],v=c.lex();v.text!=="EOF";)p.push(v),v=c.lex();p.reverse();var b={tokens:p,numArgs:l};return b}return o}isDefined(e){return this.macros.has(e)||Ja.hasOwnProperty(e)||xn.math.hasOwnProperty(e)||xn.text.hasOwnProperty(e)||d2.hasOwnProperty(e)}isExpandable(e){var n=this.macros.get(e);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:Ja.hasOwnProperty(e)&&!Ja[e].primitive}}var Kg=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,L0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Sh={"́":{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"}},Xg={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class ou{constructor(e,n){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 KE(e,n,this.mode),this.settings=n,this.leftrightDepth=0}expect(e,n){if(n===void 0&&(n=!0),this.fetch().text!==e)throw new Je("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var n=this.nextToken;this.consume(),this.gullet.pushToken(new li("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=n,r}parseExpression(e,n){for(var r=[];;){this.mode==="math"&&this.consumeSpaces();var o=this.fetch();if(ou.endOfExpression.indexOf(o.text)!==-1||n&&o.text===n||e&&Ja[o.text]&&Ja[o.text].infix)break;var l=this.parseAtom(n);if(l){if(l.type==="internal")continue}else break;r.push(l)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var n=-1,r,o=0;o<e.length;o++)if(e[o].type==="infix"){if(n!==-1)throw new Je("only one infix operator per group",e[o].token);n=o,r=e[o].replaceWith}if(n!==-1&&r){var l,h,c=e.slice(0,n),p=e.slice(n+1);c.length===1&&c[0].type==="ordgroup"?l=c[0]:l={type:"ordgroup",mode:this.mode,body:c},p.length===1&&p[0].type==="ordgroup"?h=p[0]:h={type:"ordgroup",mode:this.mode,body:p};var v;return r==="\\\\abovefrac"?v=this.callFunction(r,[l,e[n],h],[]):v=this.callFunction(r,[l,h],[]),[v]}else return e}handleSupSubscript(e){var n=this.fetch(),r=n.text;this.consume(),this.consumeSpaces();var o;do{var l;o=this.parseGroup(e)}while(((l=o)==null?void 0:l.type)==="internal");if(!o)throw new Je("Expected group after '"+r+"'",n);return o}formatUnsupportedCmd(e){for(var n=[],r=0;r<e.length;r++)n.push({type:"textord",mode:"text",text:e[r]});var o={type:"text",mode:this.mode,body:n},l={type:"color",mode:this.mode,color:this.settings.errorColor,body:[o]};return l}parseAtom(e){var n=this.parseGroup("atom",e);if((n==null?void 0:n.type)==="internal"||this.mode==="text")return n;for(var r,o;;){this.consumeSpaces();var l=this.fetch();if(l.text==="\\limits"||l.text==="\\nolimits"){if(n&&n.type==="op"){var h=l.text==="\\limits";n.limits=h,n.alwaysHandleSupSub=!0}else if(n&&n.type==="operatorname")n.alwaysHandleSupSub&&(n.limits=l.text==="\\limits");else throw new Je("Limit controls must follow a math operator",l);this.consume()}else if(l.text==="^"){if(r)throw new Je("Double superscript",l);r=this.handleSupSubscript("superscript")}else if(l.text==="_"){if(o)throw new Je("Double subscript",l);o=this.handleSupSubscript("subscript")}else if(l.text==="'"){if(r)throw new Je("Double superscript",l);var c={type:"textord",mode:this.mode,text:"\\prime"},p=[c];for(this.consume();this.fetch().text==="'";)p.push(c),this.consume();this.fetch().text==="^"&&p.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:p}}else if(L0[l.text]){var v=Kg.test(l.text),b=[];for(b.push(new li(L0[l.text])),this.consume();;){var g=this.fetch().text;if(!L0[g]||Kg.test(g)!==v)break;b.unshift(new li(L0[g])),this.consume()}var m=this.subparse(b);v?o={type:"ordgroup",mode:"math",body:m}:r={type:"ordgroup",mode:"math",body:m}}else break}return r||o?{type:"supsub",mode:this.mode,base:n,sup:r,sub:o}:n}parseFunction(e,n){var r=this.fetch(),o=r.text,l=Ja[o];if(!l)return null;if(this.consume(),n&&n!=="atom"&&!l.allowedInArgument)throw new Je("Got function '"+o+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!l.allowedInText)throw new Je("Can't use function '"+o+"' in text mode",r);if(this.mode==="math"&&l.allowedInMath===!1)throw new Je("Can't use function '"+o+"' in math mode",r);var{args:h,optArgs:c}=this.parseArguments(o,l);return this.callFunction(o,h,c,r,e)}callFunction(e,n,r,o,l){var h={funcName:e,parser:this,token:o,breakOnTokenText:l},c=Ja[e];if(c&&c.handler)return c.handler(h,n,r);throw new Je("No function handler for "+e)}parseArguments(e,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var o=[],l=[],h=0;h<r;h++){var c=n.argTypes&&n.argTypes[h],p=h<n.numOptionalArgs;(n.primitive&&c==null||n.type==="sqrt"&&h===1&&l[0]==null)&&(c="primitive");var v=this.parseGroupOfType("argument to '"+e+"'",c,p);if(p)l.push(v);else if(v!=null)o.push(v);else throw new Je("Null argument, please report this as a bug")}return{args:o,optArgs:l}}parseGroupOfType(e,n,r){switch(n){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,n);case"hbox":{var o=this.parseArgumentGroup(r,"text");return o!=null?{type:"styling",mode:o.mode,body:[o],style:"text"}:null}case"raw":{var l=this.parseStringGroup("raw",r);return l!=null?{type:"raw",mode:"text",string:l.text}:null}case"primitive":{if(r)throw new Je("A primitive argument cannot be optional");var h=this.parseGroup(e);if(h==null)throw new Je("Expected group as "+e,this.fetch());return h}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Je("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,n){var r=this.gullet.scanArgument(n);if(r==null)return null;for(var o="",l;(l=this.fetch()).text!=="EOF";)o+=l.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,n){for(var r=this.fetch(),o=r,l="",h;(h=this.fetch()).text!=="EOF"&&e.test(l+h.text);)o=h,l+=o.text,this.consume();if(l==="")throw new Je("Invalid "+n+": '"+r.text+"'",r);return r.range(o,l)}parseColorGroup(e){var n=this.parseStringGroup("color",e);if(n==null)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(n.text);if(!r)throw new Je("Invalid color: '"+n.text+"'",n);var o=r[0];return/^[0-9a-f]{6}$/i.test(o)&&(o="#"+o),{type:"color-token",mode:this.mode,color:o}}parseSizeGroup(e){var n,r=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?n=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):n=this.parseStringGroup("size",e),!n)return null;!e&&n.text.length===0&&(n.text="0pt",r=!0);var o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!o)throw new Je("Invalid size: '"+n.text+"'",n);var l={number:+(o[1]+o[2]),unit:o[3]};if(!x3(l))throw new Je("Invalid unit: '"+l.unit+"'",n);return{type:"size",mode:this.mode,value:l,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var n=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),n==null)return null;var r=n.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,n){var r=this.gullet.scanArgument(e);if(r==null)return null;var o=this.mode;n&&this.switchMode(n),this.gullet.beginGroup();var l=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var h={type:"ordgroup",mode:this.mode,loc:r.loc,body:l};return n&&this.switchMode(o),h}parseGroup(e,n){var r=this.fetch(),o=r.text,l;if(o==="{"||o==="\\begingroup"){this.consume();var h=o==="{"?"}":"\\endgroup";this.gullet.beginGroup();var c=this.parseExpression(!1,h),p=this.fetch();this.expect(h),this.gullet.endGroup(),l={type:"ordgroup",mode:this.mode,loc:Wr.range(r,p),body:c,semisimple:o==="\\begingroup"||void 0}}else if(l=this.parseFunction(n,e)||this.parseSymbol(),l==null&&o[0]==="\\"&&!d2.hasOwnProperty(o)){if(this.settings.throwOnError)throw new Je("Undefined control sequence: "+o,r);l=this.formatUnsupportedCmd(o),this.consume()}return l}formLigatures(e){for(var n=e.length-1,r=0;r<n;++r){var o=e[r],l=o.text;l==="-"&&e[r+1].text==="-"&&(r+1<n&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:Wr.range(o,e[r+2]),text:"---"}),n-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Wr.range(o,e[r+1]),text:"--"}),n-=1)),(l==="'"||l==="`")&&e[r+1].text===l&&(e.splice(r,2,{type:"textord",mode:"text",loc:Wr.range(o,e[r+1]),text:l+l}),n-=1)}}parseSymbol(){var e=this.fetch(),n=e.text;if(/^\\verb[^a-zA-Z]/.test(n)){this.consume();var r=n.slice(5),o=r.charAt(0)==="*";if(o&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Je(`\\verb assertion failed --
|
||
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:o}}Xg.hasOwnProperty(n[0])&&!xn[this.mode][n[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+n[0]+'" used in math mode',e),n=Xg[n[0]]+n.slice(1));var l=UE.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var h;if(xn[this.mode][n]){this.settings.strict&&this.mode==="math"&&fp.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=xn[this.mode][n].group,p=Wr.range(e),v;if(HS.hasOwnProperty(c)){var b=c;v={type:"atom",mode:this.mode,family:b,loc:p,text:n}}else v={type:c,mode:this.mode,loc:p,text:n};h=v}else if(n.charCodeAt(0)>=128)this.settings.strict&&(w3(n.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+n[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+n[0]+'"'+(" ("+n.charCodeAt(0)+")"),e)),h={type:"textord",mode:"text",loc:Wr.range(e),text:n};else return null;if(this.consume(),l)for(var g=0;g<l[0].length;g++){var m=l[0][g];if(!Sh[m])throw new Je("Unknown accent ' "+m+"'",e);var x=Sh[m][this.mode]||Sh[m].text;if(!x)throw new Je("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc:Wr.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}ou.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var g1=function(e,n){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new ou(e,n);delete r.gullet.macros.current["\\df@tag"];var o=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 Je("\\tag works only in display equations");o=[{type:"tag",mode:"text",body:o,tag:r.subparse([new li("\\df@tag")])}]}return o},h2=function(e,n,r){n.textContent="";var o=v1(e,r).toNode();n.appendChild(o)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),h2=function(){throw new Je("KaTeX doesn't work in quirks mode.")});var XE=function(e,n){var r=v1(e,n).toMarkup();return r},ZE=function(e,n){var r=new Jf(n);return g1(e,r)},p2=function(e,n,r){if(r.throwOnError||!(e instanceof Je))throw e;var o=Ee.makeSpan(["katex-error"],[new hi(n)]);return o.setAttribute("title",e.toString()),o.setAttribute("style","color:"+r.errorColor),o},v1=function(e,n){var r=new Jf(n);try{var o=g1(e,r);return aE(o,e,r)}catch(l){return p2(l,e,r)}},YE=function(e,n){var r=new Jf(n);try{var o=g1(e,r);return oE(o,e,r)}catch(l){return p2(l,e,r)}},JE="0.16.22",QE={Span:Yl,Anchor:t1,SymbolNode:hi,SvgNode:Na,PathNode:so,LineNode:pp},Zg={version:JE,render:h2,renderToString:XE,ParseError:Je,SETTINGS_SCHEMA:F0,__parse:ZE,__renderToDomTree:v1,__renderToHTMLTree:YE,__setFontMetrics:CS,__defineSymbol:I,__defineFunction:dt,__defineMacro:G,__domTree:QE};Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/});Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}});Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}});Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript"));Prism.languages.js=Prism.languages.javascript;(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))})(Prism);Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};Prism.languages.webmanifest=Prism.languages.json;Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python;Prism.languages.py=Prism.languages.python;Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};const f2=new Zt.Renderer;f2.image=function(t,e,n){console.log("🖼️ 图片渲染器被调用:",{href:t,title:e,text:n,hrefType:typeof t});let r="";if(typeof t=="string")r=t;else{if(t==null)return console.warn("图片href为null或undefined"),'<div class="markdown-error">图片链接为空</div>';if(typeof t=="object")if(t.href)r=String(t.href);else if(t.url)r=String(t.url);else if(t.src)r=String(t.src);else return console.warn("图片href是对象但没有href、url或src属性:",t),'<div class="markdown-error">图片链接格式错误</div>';else if(typeof t.toString=="function")r=t.toString();else return console.warn("图片href无法转换为字符串:",typeof t,t),'<div class="markdown-error">图片链接格式错误</div>'}console.log("🖼️ 处理后的hrefStr:",r);let o=r;r.includes("cdn-mineru.openxlab.org.cn")&&(o=`/proxy-image${r.replace("https://cdn-mineru.openxlab.org.cn","")}`);const l=n||"图片",h=e?` title="${e}"`:"";return console.log("🖼️ 最终生成的图片HTML:",`<img src="${o}" alt="${l}"${h} class="markdown-image" />`),`<img src="${o}" alt="${l}"${h} class="markdown-image" style="max-width: 200px; max-height: 150px; object-fit: contain; display: block; margin: 4px auto; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);" />`};Zt.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:f2});const m2=t=>{if(!t||typeof t!="string")return"";try{const e=eT(t),n=Zt.parse(e);return tT(n)}catch(e){return console.error("Markdown渲染失败:",e),`<div class="markdown-error">渲染失败: ${e.message}</div>`}},eT=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,n)=>{try{return`<div class="math-block">${Zg.renderToString(n.trim(),{displayMode:!0,throwOnError:!1})}</div>`}catch(r){return console.warn("数学公式渲染失败:",r),`<div class="math-error">数学公式错误: ${n}</div>`}}).replace(/\$([^$\n]+?)\$/g,(e,n)=>{if(n.includes("\\")||n.includes("{")||n.includes("}")||n.includes("^")||n.includes("_")||n.includes("=")||n.includes("+")||n.includes("-")||n.includes("*")||n.includes("/")||n.includes("(")||n.includes(")"))try{return`<span class="math-inline">${Zg.renderToString(n.trim(),{displayMode:!1,throwOnError:!1})}</span>`}catch(r){return console.warn("数学公式渲染失败:",r),`<span class="math-error">数学公式错误: ${n}</span>`}return e}),tT=t=>{let e=t.replace(/<table>/g,'<table class="markdown-table">').replace(/<pre><code/g,'<pre class="markdown-code"><code');const n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll("pre code").forEach(o=>{const l=o.className.match(/language-(\w+)/);if(l)try{o.innerHTML=mg.highlight(o.textContent,mg.languages[l[1]],l[1])}catch(h){console.warn("语法高亮失败:",h)}}),n.innerHTML},nT=t=>{if(!t||typeof t!="string")return!1;const e=t.split(`
|
||
`);let n=!1,r=!1;for(const h of e){const c=h.trim();c.includes("|")&&c.split("|").length>=3&&(n=!0),c.includes("|")&&c.includes("-")&&/^[\s\|\-\:]+$/.test(c)&&(r=!0)}const o=(t.match(/\|/g)||[]).length,l=o>=6;return n&&r||n&&l||n&&o>=4},rT=t=>!t||typeof t!="string"?!1:nT(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(n=>n.test(t)),dl=t=>{if(!t||typeof t!="string")return t||"";const e=rT(t),n=t.includes("|")&&t.includes("-");return e||n?(console.log("🎯 同步渲染Markdown内容"),m2(t)):t};function g2(t,e){return function(){return t.apply(e,arguments)}}const{toString:iT}=Object.prototype,{getPrototypeOf:b1}=Object,{iterator:su,toStringTag:v2}=Symbol,lu=(t=>e=>{const n=iT.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ci=t=>(t=t.toLowerCase(),e=>lu(e)===t),cu=t=>e=>typeof e===t,{isArray:Es}=Array,Bl=cu("undefined");function Ql(t){return t!==null&&!Bl(t)&&t.constructor!==null&&!Bl(t.constructor)&&Ir(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const b2=Ci("ArrayBuffer");function aT(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&b2(t.buffer),e}const oT=cu("string"),Ir=cu("function"),y2=cu("number"),e0=t=>t!==null&&typeof t=="object",sT=t=>t===!0||t===!1,j0=t=>{if(lu(t)!=="object")return!1;const e=b1(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(v2 in t)&&!(su in t)},lT=t=>{if(!e0(t)||Ql(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},cT=Ci("Date"),uT=Ci("File"),dT=Ci("Blob"),hT=Ci("FileList"),pT=t=>e0(t)&&Ir(t.pipe),fT=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ir(t.append)&&((e=lu(t))==="formdata"||e==="object"&&Ir(t.toString)&&t.toString()==="[object FormData]"))},mT=Ci("URLSearchParams"),[gT,vT,bT,yT]=["ReadableStream","Request","Response","Headers"].map(Ci),wT=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function t0(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Es(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(Ql(t))return;const l=n?Object.getOwnPropertyNames(t):Object.keys(t),h=l.length;let c;for(r=0;r<h;r++)c=l[r],e.call(null,t[c],c,t)}}function w2(t,e){if(Ql(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const Oo=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),x2=t=>!Bl(t)&&t!==Oo;function wp(){const{caseless:t}=x2(this)&&this||{},e={},n=(r,o)=>{const l=t&&w2(e,o)||o;j0(e[l])&&j0(r)?e[l]=wp(e[l],r):j0(r)?e[l]=wp({},r):Es(r)?e[l]=r.slice():e[l]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&t0(arguments[r],n);return e}const xT=(t,e,n,{allOwnKeys:r}={})=>(t0(e,(o,l)=>{n&&Ir(o)?t[l]=g2(o,n):t[l]=o},{allOwnKeys:r}),t),kT=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ST=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ET=(t,e,n,r)=>{let o,l,h;const c={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),l=o.length;l-- >0;)h=o[l],(!r||r(h,t,e))&&!c[h]&&(e[h]=t[h],c[h]=!0);t=n!==!1&&b1(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},TT=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},AT=t=>{if(!t)return null;if(Es(t))return t;let e=t.length;if(!y2(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},MT=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&b1(Uint8Array)),CT=(t,e)=>{const r=(t&&t[su]).call(t);let o;for(;(o=r.next())&&!o.done;){const l=o.value;e.call(t,l[0],l[1])}},LT=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},_T=Ci("HTMLFormElement"),NT=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Yg=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),DT=Ci("RegExp"),k2=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};t0(n,(o,l)=>{let h;(h=e(o,l,t))!==!1&&(r[l]=h||o)}),Object.defineProperties(t,r)},RT=t=>{k2(t,(e,n)=>{if(Ir(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Ir(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},IT=(t,e)=>{const n={},r=o=>{o.forEach(l=>{n[l]=!0})};return Es(t)?r(t):r(String(t).split(e)),n},OT=()=>{},HT=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function PT(t){return!!(t&&Ir(t.append)&&t[v2]==="FormData"&&t[su])}const zT=t=>{const e=new Array(10),n=(r,o)=>{if(e0(r)){if(e.indexOf(r)>=0)return;if(Ql(r))return r;if(!("toJSON"in r)){e[o]=r;const l=Es(r)?[]:{};return t0(r,(h,c)=>{const p=n(h,o+1);!Bl(p)&&(l[c]=p)}),e[o]=void 0,l}}return r};return n(t,0)},BT=Ci("AsyncFunction"),FT=t=>t&&(e0(t)||Ir(t))&&Ir(t.then)&&Ir(t.catch),S2=((t,e)=>t?setImmediate:e?((n,r)=>(Oo.addEventListener("message",({source:o,data:l})=>{o===Oo&&l===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Oo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ir(Oo.postMessage)),qT=typeof queueMicrotask<"u"?queueMicrotask.bind(Oo):typeof process<"u"&&process.nextTick||S2,jT=t=>t!=null&&Ir(t[su]),_e={isArray:Es,isArrayBuffer:b2,isBuffer:Ql,isFormData:fT,isArrayBufferView:aT,isString:oT,isNumber:y2,isBoolean:sT,isObject:e0,isPlainObject:j0,isEmptyObject:lT,isReadableStream:gT,isRequest:vT,isResponse:bT,isHeaders:yT,isUndefined:Bl,isDate:cT,isFile:uT,isBlob:dT,isRegExp:DT,isFunction:Ir,isStream:pT,isURLSearchParams:mT,isTypedArray:MT,isFileList:hT,forEach:t0,merge:wp,extend:xT,trim:wT,stripBOM:kT,inherits:ST,toFlatObject:ET,kindOf:lu,kindOfTest:Ci,endsWith:TT,toArray:AT,forEachEntry:CT,matchAll:LT,isHTMLForm:_T,hasOwnProperty:Yg,hasOwnProp:Yg,reduceDescriptors:k2,freezeMethods:RT,toObjectSet:IT,toCamelCase:NT,noop:OT,toFiniteNumber:HT,findKey:w2,global:Oo,isContextDefined:x2,isSpecCompliantForm:PT,toJSONObject:zT,isAsyncFn:BT,isThenable:FT,setImmediate:S2,asap:qT,isIterable:jT};function Pt(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}_e.inherits(Pt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const E2=Pt.prototype,T2={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{T2[t]={value:t}});Object.defineProperties(Pt,T2);Object.defineProperty(E2,"isAxiosError",{value:!0});Pt.from=(t,e,n,r,o,l)=>{const h=Object.create(E2);return _e.toFlatObject(t,h,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),Pt.call(h,t.message,e,n,r,o),h.cause=t,h.name=t.name,l&&Object.assign(h,l),h};const $T=null;function xp(t){return _e.isPlainObject(t)||_e.isArray(t)}function A2(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function Jg(t,e,n){return t?t.concat(e).map(function(o,l){return o=A2(o),!n&&l?"["+o+"]":o}).join(n?".":""):e}function UT(t){return _e.isArray(t)&&!t.some(xp)}const VT=_e.toFlatObject(_e,{},null,function(e){return/^is[A-Z]/.test(e)});function uu(t,e,n){if(!_e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,k){return!_e.isUndefined(k[S])});const r=n.metaTokens,o=n.visitor||b,l=n.dots,h=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(o))throw new TypeError("visitor must be a function");function v(w){if(w===null)return"";if(_e.isDate(w))return w.toISOString();if(_e.isBoolean(w))return w.toString();if(!p&&_e.isBlob(w))throw new Pt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(w)||_e.isTypedArray(w)?p&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function b(w,S,k){let C=w;if(w&&!k&&typeof w=="object"){if(_e.endsWith(S,"{}"))S=r?S:S.slice(0,-2),w=JSON.stringify(w);else if(_e.isArray(w)&&UT(w)||(_e.isFileList(w)||_e.endsWith(S,"[]"))&&(C=_e.toArray(w)))return S=A2(S),C.forEach(function(A,M){!(_e.isUndefined(A)||A===null)&&e.append(h===!0?Jg([S],M,l):h===null?S:S+"[]",v(A))}),!1}return xp(w)?!0:(e.append(Jg(k,S,l),v(w)),!1)}const g=[],m=Object.assign(VT,{defaultVisitor:b,convertValue:v,isVisitable:xp});function x(w,S){if(!_e.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+S.join("."));g.push(w),_e.forEach(w,function(C,T){(!(_e.isUndefined(C)||C===null)&&o.call(e,C,_e.isString(T)?T.trim():T,S,m))===!0&&x(C,S?S.concat(T):[T])}),g.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Qg(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function y1(t,e){this._pairs=[],t&&uu(t,this,e)}const M2=y1.prototype;M2.append=function(e,n){this._pairs.push([e,n])};M2.toString=function(e){const n=e?function(r){return e.call(this,r,Qg)}:Qg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function WT(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function C2(t,e,n){if(!e)return t;const r=n&&n.encode||WT;_e.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let l;if(o?l=o(e,n):l=_e.isURLSearchParams(e)?e.toString():new y1(e,n).toString(r),l){const h=t.indexOf("#");h!==-1&&(t=t.slice(0,h)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}class GT{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_e.forEach(this.handlers,function(r){r!==null&&e(r)})}}const e4=GT,L2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},KT=typeof URLSearchParams<"u"?URLSearchParams:y1,XT=typeof FormData<"u"?FormData:null,ZT=typeof Blob<"u"?Blob:null,YT={isBrowser:!0,classes:{URLSearchParams:KT,FormData:XT,Blob:ZT},protocols:["http","https","file","blob","url","data"]},w1=typeof window<"u"&&typeof document<"u",kp=typeof navigator=="object"&&navigator||void 0,JT=w1&&(!kp||["ReactNative","NativeScript","NS"].indexOf(kp.product)<0),QT=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),eA=w1&&window.location.href||"http://localhost",tA=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:w1,hasStandardBrowserEnv:JT,hasStandardBrowserWebWorkerEnv:QT,navigator:kp,origin:eA},Symbol.toStringTag,{value:"Module"})),fr={...tA,...YT};function nA(t,e){return uu(t,new fr.classes.URLSearchParams,{visitor:function(n,r,o,l){return fr.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}function rA(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function iA(t){const e={},n=Object.keys(t);let r;const o=n.length;let l;for(r=0;r<o;r++)l=n[r],e[l]=t[l];return e}function _2(t){function e(n,r,o,l){let h=n[l++];if(h==="__proto__")return!0;const c=Number.isFinite(+h),p=l>=n.length;return h=!h&&_e.isArray(o)?o.length:h,p?(_e.hasOwnProp(o,h)?o[h]=[o[h],r]:o[h]=r,!c):((!o[h]||!_e.isObject(o[h]))&&(o[h]=[]),e(n,r,o[h],l)&&_e.isArray(o[h])&&(o[h]=iA(o[h])),!c)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const n={};return _e.forEachEntry(t,(r,o)=>{e(rA(r),o,n,0)}),n}return null}function aA(t,e,n){if(_e.isString(t))try{return(e||JSON.parse)(t),_e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const x1={transitional:L2,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,l=_e.isObject(e);if(l&&_e.isHTMLForm(e)&&(e=new FormData(e)),_e.isFormData(e))return o?JSON.stringify(_2(e)):e;if(_e.isArrayBuffer(e)||_e.isBuffer(e)||_e.isStream(e)||_e.isFile(e)||_e.isBlob(e)||_e.isReadableStream(e))return e;if(_e.isArrayBufferView(e))return e.buffer;if(_e.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(l){if(r.indexOf("application/x-www-form-urlencoded")>-1)return nA(e,this.formSerializer).toString();if((c=_e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return uu(c?{"files[]":e}:e,p&&new p,this.formSerializer)}}return l||o?(n.setContentType("application/json",!1),aA(e)):e}],transformResponse:[function(e){const n=this.transitional||x1.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(_e.isResponse(e)||_e.isReadableStream(e))return e;if(e&&_e.isString(e)&&(r&&!this.responseType||o)){const h=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(c){if(h)throw c.name==="SyntaxError"?Pt.from(c,Pt.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fr.classes.FormData,Blob:fr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],t=>{x1.headers[t]={}});const k1=x1,oA=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sA=t=>{const e={};let n,r,o;return t&&t.split(`
|
||
`).forEach(function(h){o=h.indexOf(":"),n=h.substring(0,o).trim().toLowerCase(),r=h.substring(o+1).trim(),!(!n||e[n]&&oA[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},t4=Symbol("internals");function hl(t){return t&&String(t).trim().toLowerCase()}function $0(t){return t===!1||t==null?t:_e.isArray(t)?t.map($0):String(t)}function lA(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const cA=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Eh(t,e,n,r,o){if(_e.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function uA(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function dA(t,e){const n=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,l,h){return this[r].call(this,e,o,l,h)},configurable:!0})})}class du{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function l(c,p,v){const b=hl(p);if(!b)throw new Error("header name must be a non-empty string");const g=_e.findKey(o,b);(!g||o[g]===void 0||v===!0||v===void 0&&o[g]!==!1)&&(o[g||p]=$0(c))}const h=(c,p)=>_e.forEach(c,(v,b)=>l(v,b,p));if(_e.isPlainObject(e)||e instanceof this.constructor)h(e,n);else if(_e.isString(e)&&(e=e.trim())&&!cA(e))h(sA(e),n);else if(_e.isObject(e)&&_e.isIterable(e)){let c={},p,v;for(const b of e){if(!_e.isArray(b))throw TypeError("Object iterator must return a key-value pair");c[v=b[0]]=(p=c[v])?_e.isArray(p)?[...p,b[1]]:[p,b[1]]:b[1]}h(c,n)}else e!=null&&l(n,e,r);return this}get(e,n){if(e=hl(e),e){const r=_e.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return lA(o);if(_e.isFunction(n))return n.call(this,o,r);if(_e.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=hl(e),e){const r=_e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Eh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function l(h){if(h=hl(h),h){const c=_e.findKey(r,h);c&&(!n||Eh(r,r[c],c,n))&&(delete r[c],o=!0)}}return _e.isArray(e)?e.forEach(l):l(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const l=n[r];(!e||Eh(this,this[l],l,e,!0))&&(delete this[l],o=!0)}return o}normalize(e){const n=this,r={};return _e.forEach(this,(o,l)=>{const h=_e.findKey(r,l);if(h){n[h]=$0(o),delete n[l];return}const c=e?uA(l):String(l).trim();c!==l&&delete n[l],n[c]=$0(o),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return _e.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&_e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[t4]=this[t4]={accessors:{}}).accessors,o=this.prototype;function l(h){const c=hl(h);r[c]||(dA(o,h),r[c]=!0)}return _e.isArray(e)?e.forEach(l):l(e),this}}du.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(du.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_e.freezeMethods(du);const Mi=du;function Th(t,e){const n=this||k1,r=e||n,o=Mi.from(r.headers);let l=r.data;return _e.forEach(t,function(c){l=c.call(n,l,o.normalize(),e?e.status:void 0)}),o.normalize(),l}function N2(t){return!!(t&&t.__CANCEL__)}function Ts(t,e,n){Pt.call(this,t??"canceled",Pt.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(Ts,Pt,{__CANCEL__:!0});function D2(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Pt("Request failed with status code "+n.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function hA(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function pA(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,l=0,h;return e=e!==void 0?e:1e3,function(p){const v=Date.now(),b=r[l];h||(h=v),n[o]=p,r[o]=v;let g=l,m=0;for(;g!==o;)m+=n[g++],g=g%t;if(o=(o+1)%t,o===l&&(l=(l+1)%t),v-h<e)return;const x=b&&v-b;return x?Math.round(m*1e3/x):void 0}}function fA(t,e){let n=0,r=1e3/e,o,l;const h=(v,b=Date.now())=>{n=b,o=null,l&&(clearTimeout(l),l=null),t(...v)};return[(...v)=>{const b=Date.now(),g=b-n;g>=r?h(v,b):(o=v,l||(l=setTimeout(()=>{l=null,h(o)},r-g)))},()=>o&&h(o)]}const Ec=(t,e,n=3)=>{let r=0;const o=pA(50,250);return fA(l=>{const h=l.loaded,c=l.lengthComputable?l.total:void 0,p=h-r,v=o(p),b=h<=c;r=h;const g={loaded:h,total:c,progress:c?h/c:void 0,bytes:p,rate:v||void 0,estimated:v&&c&&b?(c-h)/v:void 0,event:l,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(g)},n)},n4=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},r4=t=>(...e)=>_e.asap(()=>t(...e)),mA=fr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,fr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(fr.origin),fr.navigator&&/(msie|trident)/i.test(fr.navigator.userAgent)):()=>!0,gA=fr.hasStandardBrowserEnv?{write(t,e,n,r,o,l){const h=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&h.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&h.push("path="+r),_e.isString(o)&&h.push("domain="+o),l===!0&&h.push("secure"),document.cookie=h.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function vA(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function bA(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function R2(t,e,n){let r=!vA(e);return t&&(r||n==!1)?bA(t,e):e}const i4=t=>t instanceof Mi?{...t}:t;function jo(t,e){e=e||{};const n={};function r(v,b,g,m){return _e.isPlainObject(v)&&_e.isPlainObject(b)?_e.merge.call({caseless:m},v,b):_e.isPlainObject(b)?_e.merge({},b):_e.isArray(b)?b.slice():b}function o(v,b,g,m){if(_e.isUndefined(b)){if(!_e.isUndefined(v))return r(void 0,v,g,m)}else return r(v,b,g,m)}function l(v,b){if(!_e.isUndefined(b))return r(void 0,b)}function h(v,b){if(_e.isUndefined(b)){if(!_e.isUndefined(v))return r(void 0,v)}else return r(void 0,b)}function c(v,b,g){if(g in e)return r(v,b);if(g in t)return r(void 0,v)}const p={url:l,method:l,data:l,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:c,headers:(v,b,g)=>o(i4(v),i4(b),g,!0)};return _e.forEach(Object.keys({...t,...e}),function(b){const g=p[b]||o,m=g(t[b],e[b],b);_e.isUndefined(m)&&g!==c||(n[b]=m)}),n}const I2=t=>{const e=jo({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:l,headers:h,auth:c}=e;e.headers=h=Mi.from(h),e.url=C2(R2(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&h.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let p;if(_e.isFormData(n)){if(fr.hasStandardBrowserEnv||fr.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if((p=h.getContentType())!==!1){const[v,...b]=p?p.split(";").map(g=>g.trim()).filter(Boolean):[];h.setContentType([v||"multipart/form-data",...b].join("; "))}}if(fr.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&mA(e.url))){const v=o&&l&&gA.read(l);v&&h.set(o,v)}return e},yA=typeof XMLHttpRequest<"u",wA=yA&&function(t){return new Promise(function(n,r){const o=I2(t);let l=o.data;const h=Mi.from(o.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:v}=o,b,g,m,x,w;function S(){x&&x(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(b),o.signal&&o.signal.removeEventListener("abort",b)}let k=new XMLHttpRequest;k.open(o.method.toUpperCase(),o.url,!0),k.timeout=o.timeout;function C(){if(!k)return;const A=Mi.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),y={data:!c||c==="text"||c==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:A,config:t,request:k};D2(function(z){n(z),S()},function(z){r(z),S()},y),k=null}"onloadend"in k?k.onloadend=C:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(C)},k.onabort=function(){k&&(r(new Pt("Request aborted",Pt.ECONNABORTED,t,k)),k=null)},k.onerror=function(){r(new Pt("Network Error",Pt.ERR_NETWORK,t,k)),k=null},k.ontimeout=function(){let M=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const y=o.transitional||L2;o.timeoutErrorMessage&&(M=o.timeoutErrorMessage),r(new Pt(M,y.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,t,k)),k=null},l===void 0&&h.setContentType(null),"setRequestHeader"in k&&_e.forEach(h.toJSON(),function(M,y){k.setRequestHeader(y,M)}),_e.isUndefined(o.withCredentials)||(k.withCredentials=!!o.withCredentials),c&&c!=="json"&&(k.responseType=o.responseType),v&&([m,w]=Ec(v,!0),k.addEventListener("progress",m)),p&&k.upload&&([g,x]=Ec(p),k.upload.addEventListener("progress",g),k.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(b=A=>{k&&(r(!A||A.type?new Ts(null,t,k):A),k.abort(),k=null)},o.cancelToken&&o.cancelToken.subscribe(b),o.signal&&(o.signal.aborted?b():o.signal.addEventListener("abort",b)));const T=hA(o.url);if(T&&fr.protocols.indexOf(T)===-1){r(new Pt("Unsupported protocol "+T+":",Pt.ERR_BAD_REQUEST,t));return}k.send(l||null)})},xA=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const l=function(v){if(!o){o=!0,c();const b=v instanceof Error?v:this.reason;r.abort(b instanceof Pt?b:new Ts(b instanceof Error?b.message:b))}};let h=e&&setTimeout(()=>{h=null,l(new Pt(`timeout ${e} of ms exceeded`,Pt.ETIMEDOUT))},e);const c=()=>{t&&(h&&clearTimeout(h),h=null,t.forEach(v=>{v.unsubscribe?v.unsubscribe(l):v.removeEventListener("abort",l)}),t=null)};t.forEach(v=>v.addEventListener("abort",l));const{signal:p}=r;return p.unsubscribe=()=>_e.asap(c),p}},kA=xA,SA=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},EA=async function*(t,e){for await(const n of TA(t))yield*SA(n,e)},TA=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},a4=(t,e,n,r)=>{const o=EA(t,e);let l=0,h,c=p=>{h||(h=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:v,value:b}=await o.next();if(v){c(),p.close();return}let g=b.byteLength;if(n){let m=l+=g;n(m)}p.enqueue(new Uint8Array(b))}catch(v){throw c(v),v}},cancel(p){return c(p),o.return()}},{highWaterMark:2})},hu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",O2=hu&&typeof ReadableStream=="function",AA=hu&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),H2=(t,...e)=>{try{return!!t(...e)}catch{return!1}},MA=O2&&H2(()=>{let t=!1;const e=new Request(fr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),o4=64*1024,Sp=O2&&H2(()=>_e.isReadableStream(new Response("").body)),Tc={stream:Sp&&(t=>t.body)};hu&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Tc[e]&&(Tc[e]=_e.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Pt(`Response type '${e}' is not supported`,Pt.ERR_NOT_SUPPORT,r)})})})(new Response);const CA=async t=>{if(t==null)return 0;if(_e.isBlob(t))return t.size;if(_e.isSpecCompliantForm(t))return(await new Request(fr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(t)||_e.isArrayBuffer(t))return t.byteLength;if(_e.isURLSearchParams(t)&&(t=t+""),_e.isString(t))return(await AA(t)).byteLength},LA=async(t,e)=>{const n=_e.toFiniteNumber(t.getContentLength());return n??CA(e)},_A=hu&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:l,timeout:h,onDownloadProgress:c,onUploadProgress:p,responseType:v,headers:b,withCredentials:g="same-origin",fetchOptions:m}=I2(t);v=v?(v+"").toLowerCase():"text";let x=kA([o,l&&l.toAbortSignal()],h),w;const S=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let k;try{if(p&&MA&&n!=="get"&&n!=="head"&&(k=await LA(b,r))!==0){let y=new Request(e,{method:"POST",body:r,duplex:"half"}),N;if(_e.isFormData(r)&&(N=y.headers.get("content-type"))&&b.setContentType(N),y.body){const[z,F]=n4(k,Ec(r4(p)));r=a4(y.body,o4,z,F)}}_e.isString(g)||(g=g?"include":"omit");const C="credentials"in Request.prototype;w=new Request(e,{...m,signal:x,method:n.toUpperCase(),headers:b.normalize().toJSON(),body:r,duplex:"half",credentials:C?g:void 0});let T=await fetch(w,m);const A=Sp&&(v==="stream"||v==="response");if(Sp&&(c||A&&S)){const y={};["status","statusText","headers"].forEach(P=>{y[P]=T[P]});const N=_e.toFiniteNumber(T.headers.get("content-length")),[z,F]=c&&n4(N,Ec(r4(c),!0))||[];T=new Response(a4(T.body,o4,z,()=>{F&&F(),S&&S()}),y)}v=v||"text";let M=await Tc[_e.findKey(Tc,v)||"text"](T,t);return!A&&S&&S(),await new Promise((y,N)=>{D2(y,N,{data:M,headers:Mi.from(T.headers),status:T.status,statusText:T.statusText,config:t,request:w})})}catch(C){throw S&&S(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new Pt("Network Error",Pt.ERR_NETWORK,t,w),{cause:C.cause||C}):Pt.from(C,C&&C.code,t,w)}}),Ep={http:$T,xhr:wA,fetch:_A};_e.forEach(Ep,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const s4=t=>`- ${t}`,NA=t=>_e.isFunction(t)||t===null||t===!1,P2={getAdapter:t=>{t=_e.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let l=0;l<e;l++){n=t[l];let h;if(r=n,!NA(n)&&(r=Ep[(h=String(n)).toLowerCase()],r===void 0))throw new Pt(`Unknown adapter '${h}'`);if(r)break;o[h||"#"+l]=r}if(!r){const l=Object.entries(o).map(([c,p])=>`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let h=e?l.length>1?`since :
|
||
`+l.map(s4).join(`
|
||
`):" "+s4(l[0]):"as no adapter specified";throw new Pt("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return r},adapters:Ep};function Ah(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ts(null,t)}function l4(t){return Ah(t),t.headers=Mi.from(t.headers),t.data=Th.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),P2.getAdapter(t.adapter||k1.adapter)(t).then(function(r){return Ah(t),r.data=Th.call(t,t.transformResponse,r),r.headers=Mi.from(r.headers),r},function(r){return N2(r)||(Ah(t),r&&r.response&&(r.response.data=Th.call(t,t.transformResponse,r.response),r.response.headers=Mi.from(r.response.headers))),Promise.reject(r)})}const z2="1.11.0",pu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{pu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const c4={};pu.transitional=function(e,n,r){function o(l,h){return"[Axios v"+z2+"] Transitional option '"+l+"'"+h+(r?". "+r:"")}return(l,h,c)=>{if(e===!1)throw new Pt(o(h," has been removed"+(n?" in "+n:"")),Pt.ERR_DEPRECATED);return n&&!c4[h]&&(c4[h]=!0,console.warn(o(h," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,h,c):!0}};pu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function DA(t,e,n){if(typeof t!="object")throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const l=r[o],h=e[l];if(h){const c=t[l],p=c===void 0||h(c,l,t);if(p!==!0)throw new Pt("option "+l+" must be "+p,Pt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Pt("Unknown option "+l,Pt.ERR_BAD_OPTION)}}const U0={assertOptions:DA,validators:pu},Ni=U0.validators;class Ac{constructor(e){this.defaults=e||{},this.interceptors={request:new e4,response:new e4}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||
`+l):r.stack=l}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=jo(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:l}=n;r!==void 0&&U0.assertOptions(r,{silentJSONParsing:Ni.transitional(Ni.boolean),forcedJSONParsing:Ni.transitional(Ni.boolean),clarifyTimeoutError:Ni.transitional(Ni.boolean)},!1),o!=null&&(_e.isFunction(o)?n.paramsSerializer={serialize:o}:U0.assertOptions(o,{encode:Ni.function,serialize:Ni.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),U0.assertOptions(n,{baseUrl:Ni.spelling("baseURL"),withXsrfToken:Ni.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let h=l&&_e.merge(l.common,l[n.method]);l&&_e.forEach(["delete","get","head","post","put","patch","common"],w=>{delete l[w]}),n.headers=Mi.concat(h,l);const c=[];let p=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(p=p&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const v=[];this.interceptors.response.forEach(function(S){v.push(S.fulfilled,S.rejected)});let b,g=0,m;if(!p){const w=[l4.bind(this),void 0];for(w.unshift(...c),w.push(...v),m=w.length,b=Promise.resolve(n);g<m;)b=b.then(w[g++],w[g++]);return b}m=c.length;let x=n;for(g=0;g<m;){const w=c[g++],S=c[g++];try{x=w(x)}catch(k){S.call(this,k);break}}try{b=l4.call(this,x)}catch(w){return Promise.reject(w)}for(g=0,m=v.length;g<m;)b=b.then(v[g++],v[g++]);return b}getUri(e){e=jo(this.defaults,e);const n=R2(e.baseURL,e.url,e.allowAbsoluteUrls);return C2(n,e.params,e.paramsSerializer)}}_e.forEach(["delete","get","head","options"],function(e){Ac.prototype[e]=function(n,r){return this.request(jo(r||{},{method:e,url:n,data:(r||{}).data}))}});_e.forEach(["post","put","patch"],function(e){function n(r){return function(l,h,c){return this.request(jo(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:h}))}}Ac.prototype[e]=n(),Ac.prototype[e+"Form"]=n(!0)});const V0=Ac;class S1{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(o=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](o);r._listeners=null}),this.promise.then=o=>{let l;const h=new Promise(c=>{r.subscribe(c),l=c}).then(o);return h.cancel=function(){r.unsubscribe(l)},h},e(function(l,h,c){r.reason||(r.reason=new Ts(l,h,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new S1(function(o){e=o}),cancel:e}}}const RA=S1;function IA(t){return function(n){return t.apply(null,n)}}function OA(t){return _e.isObject(t)&&t.isAxiosError===!0}const Tp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Tp).forEach(([t,e])=>{Tp[e]=t});const HA=Tp;function B2(t){const e=new V0(t),n=g2(V0.prototype.request,e);return _e.extend(n,V0.prototype,e,{allOwnKeys:!0}),_e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return B2(jo(t,o))},n}const Wn=B2(k1);Wn.Axios=V0;Wn.CanceledError=Ts;Wn.CancelToken=RA;Wn.isCancel=N2;Wn.VERSION=z2;Wn.toFormData=uu;Wn.AxiosError=Pt;Wn.Cancel=Wn.CanceledError;Wn.all=function(e){return Promise.all(e)};Wn.spread=IA;Wn.isAxiosError=OA;Wn.mergeConfig=jo;Wn.AxiosHeaders=Mi;Wn.formToJSON=t=>_2(_e.isHTMLForm(t)?new FormData(t):t);Wn.getAdapter=P2.getAdapter;Wn.HttpStatusCode=HA;Wn.default=Wn;const PA=Wn,zA="http://127.0.0.1:8000/api",rs=PA.create({baseURL:zA,timeout:1e4,headers:{"Content-Type":"application/json"}}),Un={createMindmap:(t="思维导图",e=null)=>rs.post("/mindMaps",{title:t,data:e}),getMindmap:t=>rs.get(`/mindMaps/${t}`),getAllMindmaps:()=>rs.get("/mindmaps"),addNodes:(t,e)=>rs.post("/mindMaps/addNodes",{mindMapId:t,nodes:e}),updateNode:(t,e)=>rs.patch("/mindMaps/updateNode",{id:t,...e}),deleteNodes:t=>rs.delete("/mindMaps/deleteNodes",{data:{nodeIds:t}})};const BA={key:0,class:"welcome-page"},FA={class:"ai-input-content"},qA=["disabled","onKeydown"],jA={class:"ai-input-actions"},$A=["disabled"],UA=["disabled"],VA={key:0},WA={key:1},GA={key:3,class:"save-controls"},KA={class:"image-preview-header"},XA={class:"image-preview-title"},ZA={class:"image-preview-body"},YA={key:0,class:"image-preview-loading"},JA={key:1,class:"image-preview-error"},QA=["src","alt"],eM={class:"rich-editor-body"},tM={class:"delete-confirm-footer"},nM={__name:"MindMap",setup(t,{expose:e}){Zt.setOptions({breaks:!0,gfm:!0,tables:!0,pedantic:!1,sanitize:!1,smartLists:!0,smartypants:!1});const n={name:"Light Purple",type:"light",palette:["#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874","#660874"],cssVar:{"--node-gap-x":"30px","--node-gap-y":"10px","--main-gap-x":"65px","--main-gap-y":"45px","--root-radius":"30px","--main-radius":"20px","--root-color":"#ffffff","--root-bgcolor":"#660874","--root-border-color":"rgba(0, 0, 0, 0)","--main-color":"#444446","--main-bgcolor":"#ffffff","--topic-padding":"3px","--color":"#777777","--bgcolor":"#f6f6f6","--selected":"#660874","--accent-color":"#660874","--panel-color":"#444446","--panel-bgcolor":"#ffffff","--panel-border-color":"#eaeaea","--map-padding":"50px","--enable-node-border":"true","--node-border-padding":"8","--node-border-radius":"8","--node-border-color":"#660874","--node-border-fill":"#ffffff","--node-border-width":"1"}},r=yt(null),o=yt(null),l=yt(null),h=yt({}),c=yt({}),p=yt(null),v=yt(1),b=yt(!0),g=yt(!1),m=yt(!1),x=yt(null),w=yt(""),S=yt(!1);yt(new Map),yt(!1),yt({x:0,y:0}),yt(null);const k=yt(!1),C=yt(""),T=yt(""),A=yt(!1),M=yt(""),y=yt(!1),N=yt(""),z=yt(""),F=yt(null),P=yt(null),Y=yt([]),te=yt(!1);yt(-1),yt(""),yt(!1),yt(""),yt(null),yt(null);const de=yt(null);let Ce=null;yt({accept:"image/*",max:5*1024*1024,multiple:!1,fieldName:"file"});const qe=()=>{b.value=!0,r.value&&(r.value.innerHTML=""),o.value&&(o.value=null)},Ge=()=>{b.value=!1},nt=()=>{b.value=!1},je=(q,K="")=>{console.log("🖼️ 打开图片预览:",{imageUrl:q,altText:K});let Q=q;typeof q=="string"&&(q.startsWith("/")||q.startsWith("./")||q.startsWith("../")?Q=new URL(q,window.location.origin).href:(q.startsWith("data:image/")||q.startsWith("http://")||q.startsWith("https://"))&&(Q=q)),console.log("🖼️ 处理后的图片URL:",Q),k.value=!0,T.value=K||"图片预览",A.value=!0,M.value="",J();const ye=new Image;ye.onload=()=>{console.log("✅ 图片预加载成功"),C.value=Q,A.value=!1,ee()},ye.onerror=()=>{console.error("❌ 图片预加载失败:",Q),ee(),A.value=!1,M.value=`图片加载失败: ${Q}`},ye.src=Q},Ne=()=>{ee(),k.value=!1,C.value="",T.value="",A.value=!1,M.value=""},tt=q=>{if(!q||typeof q!="string")return"";try{let K=q.replace(/^#{1,6}\s+/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/```[\s\S]*?```/g,"").replace(/`([^`]*)`/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/!\[([^\]]*)\]\([^)]+\)/g,"").replace(/^\|.*\|$/gm,"").replace(/^[-|:\s]+$/gm,"").replace(/^[-*+]\s+/gm,"").replace(/^\d+\.\s+/gm,"").replace(/^>\s*/gm,"").replace(/\n+/g," ").replace(/\s+/g," ").trim();return K.length>50&&(K=K.substring(0,50)+"..."),K||"无标题"}catch(K){return console.error("❌ 生成标题失败:",K),"无标题"}},lt=(q,K)=>{console.log("📝 打开富文本编辑器:",{nodeObj:q,nodeElement:K}),F.value=q,P.value=K;let Q=q.title;!Q&&q.topic&&(Q=q.topic.replace(/!\[.*?\]\(.*?\)/g,"").trim()),N.value=Q||"编辑节点内容",console.log("📝 节点完整数据:",{title:q.title,topic:q.topic,dangerouslySetInnerHTML:q.dangerouslySetInnerHTML,image:q.image,hasImage:!!q.image,htmlContent:q.htmlContent,allKeys:Object.keys(q)});let ye="";if(q.dangerouslySetInnerHTML)ye=q.dangerouslySetInnerHTML,console.log("📝 使用dangerouslySetInnerHTML内容:",ye.substring(0,200)+"...");else if(q.markdown){console.log("📝 使用markdown内容,转换为HTML:",q.markdown.substring(0,200)+"...");try{ye=Zt.parse(q.markdown),q.dangerouslySetInnerHTML=ye}catch(Me){console.error("❌ Markdown转HTML失败:",Me),ye=q.markdown}}else{const Me=q.data||q.topic||"";if(console.log("📝 使用兼容模式,从data/topic获取内容:",Me.substring(0,200)+"..."),Me.includes("|")&&Me.includes("-")||Me.includes("`;z.value=z.value+`
|
||
`+pe}parseExistingImages(),y.value=!0,console.log("📝 富文本编辑器已打开")},Qe=()=>{y.value=!1,N.value="",z.value="",F.value=null,P.value=null,Y.value=[],Ht()},j=async()=>{if(!de.value){console.error("❌ vditorContainer未找到");return}try{de.value.innerHTML="",Ce=new Qo(de.value,{height:400,placeholder:"请输入节点内容...",mode:"wysiwyg",theme:"classic",toolbarConfig:{pin:!0},cache:{enable:!1},preview:{hljs:{style:"github"}},toolbar:["emoji","headings","bold","italic","strike","|","list","ordered-list","check","|","quote","line","code","inline-code","|","link","table","image","upload","|","undo","redo","fullscreen","edit-mode"],upload:{accept:"image/*",multiple:!1,fieldName:"file",max:5*1024*1024,url:"",linkToImgUrl:"",success:(q,K)=>{console.log("图片上传成功:",K)},error:q=>{console.error("图片上传失败:",q)}},after:()=>{setTimeout(()=>{z.value&&z.value.trim()?Ce.setValue(z.value):Ce.setValue(""),Ce.focus(),Ce.on&&Ce.on("input",q=>{const K=Ce.getValue();z.value=K}),setTimeout(()=>{const q=document.querySelector(".vditor-toolbar"),K=document.querySelector(".vditor-wysiwyg")},100)},100)}})}catch(q){console.error("❌ Vditor编辑器初始化失败:",q),console.error("错误详情:",q.stack)}},Ht=()=>{Ce&&(Ce.destroy(),Ce=null,console.log("🗑️ Vditor编辑器已销毁"))},Rt=async()=>{var ye,Me,He,pe;if(console.log("🚀 saveRichTextChanges函数被调用!"),console.log("🚀 开始保存 Vditor 富文本内容..."),console.log("📝 当前editorTitle:",N.value),console.log("📝 当前editorContent:",z.value.substring(0,100)+"..."),console.log("📝 当前节点:",F.value),console.log("📝 Vditor实例状态:",!!Ce),!F.value){alert("节点信息丢失");return}if(!Ce){console.error("❌ Vditor实例不存在,无法获取内容"),alert("编辑器未初始化,请重试");return}const q=Ce?Ce.getValue():z.value;let K="";try{if(Ce!=null&&Ce.preview){const Re=document.createElement("div");await Qo.preview(Re,q,{mode:"light"}),K=Re.innerHTML}else K=q}catch{K=q}console.log("📝 获取到的HTML内容:",K.substring(0,100)+"..."),console.log("📝 获取到的Markdown内容:",q.substring(0,100)+"...");const Q=N.value!==(F.value.title||"");if(console.log("🔍 标题变化检查:",{editorTitle:N.value,currentNodeTitle:F.value.title||"",titleChanged:Q}),F.value.dangerouslySetInnerHTML=K,F.value.markdown=q||K,F.value.topic=tt(q||K),F.value.title=N.value,P.value&&(P.value.innerHTML=K,Q)){const Re=P.value.querySelector(".tpc");Re&&(Re.textContent=N.value,console.log("📝 DOM文本元素已更新:",N.value))}try{const Re=F.value.id.replace(/^me/,""),Pe={newTitle:N.value,newDes:((ye=F.value.data)==null?void 0:ye.des)||"",newParentId:F.value.parentId||((Me=F.value.parent)==null?void 0:Me.id),newDangerouslySetInnerHTML:K||"",newMarkdown:q||K,newTopic:F.value.topic};console.log("🔍 直接发送到后端的更新数据:",Pe),console.log("🔍 清理后的节点ID:",Re);const ht=await Un.updateNode(Re,Pe);if(ht.data&&ht.data.success){if(console.log("✅ 节点数据已保存到后端"),o.value&&F.value&&P.value){const zt=P.value.querySelector(".tpc");zt&&(zt.innerHTML=K,console.log("📝 节点显示内容已更新 - 直接设置HTML"))}alert("✅ 节点内容保存成功!")}else console.warn("⚠️ 保存节点到后端失败:",ht),alert("❌ 保存失败,请重试")}catch(Re){console.error("❌ 保存节点到后端失败:",Re),alert("❌ 保存失败,请重试");return}(He=o.value)==null||He.bus.fire("operation",{name:"finishEdit",obj:F.value,origin:F.value.topic||""}),Q&&((pe=o.value)==null||pe.bus.fire("operation",{name:"updateNode",obj:F.value,origin:N.value})),console.log("🔄 开始刷新前端节点渲染..."),o.value?Ga(()=>{o.value.refresh(),console.log("🔄 思维导图已刷新"),setTimeout(()=>{Qe(),console.log("✅ 编辑器弹窗已关闭")},100)}):(Qe(),console.log("✅ 编辑器弹窗已关闭(无mindElixir实例)")),console.log("✅ 富文本内容已保存")},Ut=()=>{console.log("✅ 模态框图片加载成功")},Nt=q=>{console.error("❌ 模态框图片加载失败:",q),console.error("❌ 失败的图片URL:",C.value),A.value=!1,M.value=`图片显示失败: ${C.value}`},oe=()=>{console.log("🔄 重试加载图片"),A.value=!0,M.value="",J()};let he=null;const J=()=>{he&&clearTimeout(he),he=setTimeout(()=>{A.value&&(console.warn("⚠️ 图片加载超时"),A.value=!1,M.value="图片加载超时,请检查网络连接或图片URL是否正确")},1e4)},ee=()=>{he&&(clearTimeout(he),he=null)},De=()=>{if(!o.value||!r.value)return null;try{const q=r.value.querySelector(".map-canvas");if(q){const K=q.style.transform,Q=o.value.scaleVal||1;return console.log("📍 保存位置:",{transform:K,scaleVal:Q}),{transform:K,scaleVal:Q}}}catch(q){console.warn("保存位置失败:",q)}return null},se=q=>{if(!(!q||!r.value||!o.value))try{const K=r.value.querySelector(".map-canvas");K&&q.transform&&(K.style.setProperty("transform",q.transform,"important"),q.scaleVal&&o.value.scaleVal!==q.scaleVal&&(o.value.scaleVal=q.scaleVal),K.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:q.transform,scaleVal:q.scaleVal}))}catch(K){console.warn("恢复位置失败:",K)}},V=async(q,K=!1,Q=!0)=>{try{const ye=K?De():null;ye?console.log("📍 保存当前位置用于保持原位:",ye):!K&&!Q&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",q),console.log("🔍 数据字段:",Object.keys(q||{})),q&&q.id?(p.value=q.id,console.log("🔍 设置当前思维导图ID (data.id):",q.id)):q&&q.mindmapId?(p.value=q.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",q.mindmapId)):q&&q.nodeData&&q.nodeData.mindmapId?(p.value=q.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",q.nodeData.mindmapId)):q&&q.nodeData&&q.nodeData.mindmap_id?(p.value=q.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",q.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(q||{})),q&&q.nodeData&&console.log("🔍 nodeData字段:",Object.keys(q.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",p.value),Ge(),await Ga(),r.value||(console.warn("⚠️ 思维导图容器未准备好,等待DOM更新..."),await new Promise(Me=>setTimeout(Me,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){if(o.value&&o.value.data&&o.value.data.mindmapId===p.value){console.log("🔄 使用现有Mind Elixir实例,直接更新数据"),o.value.data=q.nodeData||q,o.value.render(),Ji(),ye&&setTimeout(()=>{se(ye),console.log("📍 已恢复位置和缩放状态")},100);return}if(console.log("🔍 创建新的Mind Elixir实例,设置markdown函数"),o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(pe,Re)=>{if(pe.includes("|")||pe.includes("**")||pe.includes("`")||pe.includes("#")||pe.includes("!["))try{console.log("🎯 检测到Markdown内容,使用同步渲染:",pe.substring(0,100)+"...");const Pe=dl(pe);return console.log("🎯 同步渲染结果:",Pe.substring(0,200)+"..."),Pe}catch(Pe){return console.error("🎯 渲染失败,返回原文:",Pe),pe}return pe},imageProxy:pe=>pe.startsWith("http://")||pe.startsWith("https://")?pe:pe.startsWith("/")?window.location.origin+pe:window.location.origin+"/"+pe}),console.log("✅ Mind Elixir实例创建完成,markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",q),q&&q.nodeData){const pe=Object.keys(q.nodeData);console.log("🔍 节点数量:",pe.length),pe.forEach(Re=>{const Pe=q.nodeData[Re];Pe.dangerouslySetInnerHTML&&console.log(`🔍 节点 ${Re} 有 dangerouslySetInnerHTML:`,Pe.dangerouslySetInnerHTML.substring(0,100))})}const Me=o.value.init(q);console.log("✅ Mind Elixir实例创建成功,初始化结果:",Me),ye?(se(ye),console.log("📍 初始化后立即恢复位置")):!K&&!Q&&console.log("📍 跳过根节点居中,等待居中新节点"),(async()=>{try{await Ga(),!ye&&(K||Q)&&o.value&&o.value.toCenter&&o.value.toCenter()}catch(pe){console.warn("⚠️ 渲染优化过程中出现错误:",pe)}})(),o.value.bus.addListener("showImagePreview",(pe,Re)=>{console.log("🖼️ 收到图片预览事件:",{imageUrl:pe,altText:Re}),je(pe,Re)}),o.value.bus.addListener("showRichTextEditor",(pe,Re)=>{console.log("📝 收到富文本编辑事件:",{nodeObj:pe,nodeElement:Re}),lt(pe,Re)}),setTimeout(()=>{ur()},500)}else{console.warn("⚠️ 容器未准备好,延迟创建Mind Elixir实例..."),setTimeout(()=>{if(r.value){o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(pe,Re)=>{if(pe.includes("|")||pe.includes("**")||pe.includes("`")||pe.includes("#")||pe.includes("!["))try{return console.log("🎯 延迟创建:检测到Markdown内容,使用同步渲染:",pe.substring(0,100)+"..."),dl(pe)}catch(Pe){return console.error("🎯 延迟创建:渲染失败,返回原文:",Pe),pe}return pe}});const Me=o.value.init(q);console.log("✅ Mind Elixir实例延迟创建成功"),ye?(se(ye),console.log("📍 延迟创建后立即恢复位置"),setTimeout(()=>{se(ye),console.log("📍 延迟创建后二次确认位置恢复")},100)):!K&&!Q&&console.log("📍 延迟创建后跳过根节点居中,等待居中新节点"),(async()=>{try{await Ga(),await document.fonts.ready,await new Promise(pe=>requestAnimationFrame(pe)),o.value&&o.value.refresh&&(console.log("🔄 延迟创建实例执行完整DOM稳定后的延迟刷新"),o.value.refresh(),!ye&&(K||Q)&&o.value.toCenter())}catch(pe){console.warn("⚠️ 延迟创建实例的延迟刷新过程中出现错误:",pe),setTimeout(()=>{o.value&&o.value.refresh&&o.value.refresh()},250)}})(),o.value.bus.addListener("showImagePreview",(pe,Re)=>{console.log("🖼️ 收到图片预览事件(延迟创建):",{imageUrl:pe,altText:Re}),je(pe,Re)}),o.value.bus.addListener("showImageEditor",(pe,Re,Pe)=>{console.log("🖼️ 收到图片编辑事件(延迟创建):",{imageUrl:pe,altText:Re}),openImageEditor(pe,Re,Pe)}),setTimeout(()=>{setTimeout(()=>{ur()},500),ye?se(ye):Q&&ve(),Ji(),Z()},300)}},200);return}}catch{setTimeout(()=>{try{if(r.value){o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(pe,Re)=>{if(pe.includes("|")||pe.includes("**")||pe.includes("`")||pe.includes("#")||pe.includes("!["))try{return console.log("🎯 重试创建:检测到Markdown内容,使用同步渲染:",pe.substring(0,100)+"..."),dl(pe)}catch(Pe){return console.error("🎯 重试创建:渲染失败,返回原文:",Pe),pe}return pe}});const He=o.value.init(q);ye?(se(ye),console.log("📍 重试创建后立即恢复位置"),setTimeout(()=>{se(ye),console.log("📍 重试创建后二次确认位置恢复")},100)):!K&&!Q&&console.log("📍 重试创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{ye?se(ye):Q&&ve(),Ji(),Z()},300)}}catch(He){console.error("❌ Mind Elixir实例重试创建失败:",He)}},500);return}setTimeout(()=>{K&&ye?se(ye):Q&&ve(),Ge(),Ji(),setTimeout(()=>{Z()},500)},100)}catch{}},Z=()=>{o.value&&r.value&&setTimeout(()=>{r.value.querySelectorAll("me-tpc, .topic, [data-id]").forEach((K,Q)=>{var pe;const ye=K.getAttribute("data-id")||K.id||K.getAttribute("nodeid")||((pe=K.querySelector("[data-id]"))==null?void 0:pe.getAttribute("data-id"));if(!ye)return;const Me=(Re,Pe)=>{for(const ht of Re){if(ht.id===Pe)return ht;if(ht.children){const Dt=Me(ht.children,Pe);if(Dt)return Dt}}return null},He=Me(o.value.data.nodeData,ye);if(He&&He.data&&He.data.des){let Re=K.querySelector(".node-description");Re||(Re=document.createElement("div"),Re.className="node-description",Re.style.cssText=`
|
||
font-size: 11px;
|
||
color: #666;
|
||
margin-top: 6px;
|
||
padding: 6px 8px;
|
||
background: rgba(0, 0, 0, 0.03);
|
||
border-radius: 4px;
|
||
max-width: 250px;
|
||
word-wrap: break-word;
|
||
line-height: 1.3;
|
||
border-left: 3px solid #e0e0e0;
|
||
display: block;
|
||
`,K.appendChild(Re));const Pe=He.data.des;Pe.length>150?(Re.textContent=Pe.substring(0,150)+"...",Re.title=Pe):Re.textContent=Pe}})},1e3)},ve=()=>{try{if(o.value&&o.value.toCenter){o.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const q=r.value;if(!q)return;const K=q.querySelector(".map-canvas");if(!K)return;const Q=K.querySelectorAll("me-tpc");if(Q.length===0)return;let ye=1/0,Me=-1/0,He=1/0,pe=-1/0;Q.forEach(mi=>{const Qr=mi.getBoundingClientRect(),Br=q.getBoundingClientRect(),_r=Qr.left-Br.left,Ba=Qr.top-Br.top;ye=Math.min(ye,_r),Me=Math.max(Me,_r+Qr.width),He=Math.min(He,Ba),pe=Math.max(pe,Ba+Qr.height)});const Re=(ye+Me)/2,Pe=(He+pe)/2,ht=q.clientWidth/2,Dt=q.clientHeight/2,zt=ht-Re,en=Dt-Pe;K.style.transform=`translate(${zt}px, ${en}px)`,K.style.opacity="1",K.style.transition="opacity 0.3s ease";const Bn=100,On=Math.max(zt,Bn),dr=Math.max(en,Bn);K.style.transform=`translate(${On}px, ${dr}px)`,K.style.opacity="1",K.style.visibility="visible"}catch{}},le=async q=>{if(!(!o.value||!q))try{console.log("🎯 开始处理新节点:",q);let K=null,Q=0;const ye=5;for(;!K&&Q<ye;)K=o.value.findEle(q),K||(Q++,await new Promise(Me=>setTimeout(Me,50)));K?(console.log("✅ 找到节点元素:",K),o.value.scrollIntoView&&(o.value.scrollIntoView(K),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{try{const Me=(q||"").replace(/^me/,""),pe=(o.value.getNodeById?o.value.getNodeById(Me):null)||{id:Me,topic:(K==null?void 0:K.textContent)||""};typeof Yi=="function"?Yi(pe,K):typeof lt=="function"&<(pe,K),console.log("✅ 已打开自定义富文本编辑器")}catch(Me){console.warn("打开自定义编辑器失败,忽略。",Me)}},350)):console.error("❌ 多次尝试后仍未找到节点元素:",q)}catch(K){console.error("❌ 居中显示节点失败:",K)}},we=()=>{if(!l.value)return;if(o.value&&o.value.getNodeById)try{const K=o.value.getNodeById(l.value.id);if(K){const Q=K.getBoundingClientRect(),ye=r.value.getBoundingClientRect(),Me=Q.left-ye.left+Q.width/2,He=Q.bottom-ye.top+10;h.value={left:`${Me}px`,top:`${He}px`};return}}catch{}let q=document.querySelector(`[data-id="${l.value.id}"]`);if(q||(q=document.querySelector(`.topic[data-id="${l.value.id}"]`)),q||(q=document.querySelector(`[data-node-id="${l.value.id}"]`)),q||(q=document.querySelector(`[data-nodeid="me${l.value.id}"]`)),!q){const K=document.querySelectorAll("me-tpc");for(const Q of K)if(Q.getAttribute("data-nodeid")===`me${l.value.id}`){q=Q;break}}if(!q){const K=document.querySelectorAll(".topic");for(const Q of K)if(Q.textContent.trim()===l.value.topic){q=Q;break}}if(q){const K=q.getBoundingClientRect(),Q=r.value.getBoundingClientRect(),ye=K.left-Q.left+K.width/2,Me=K.bottom-Q.top+10;h.value={left:`${ye}px`,top:`${Me}px`}}else h.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},Ae=async()=>{l.value&&(await mo(l.value),l.value=null)},Fe=async()=>{l.value&&(await vr(l.value),l.value=null)},Ke=async()=>{l.value&&(await cr(l.value),l.value=null)},Xe=async()=>{if(!l.value)return;console.log("Ask AI for node:",l.value);const q=parseFloat(h.value.left)||0,K=parseFloat(h.value.top)||0;c.value={left:`${q}px`,top:`${K+60}px`,transform:"translateX(-50%)"},m.value=!0,x.value=l.value},Be=()=>{m.value=!1,x.value=null,w.value="",S.value=!1,l.value=null},ot=q=>{if(!q)return"";const K=[];return q.parent&&q.parent.topic&&K.push(`父节点: ${q.parent.topic}`),q.parent&&q.parent.parent&&q.parent.parent.topic&&K.push(`祖父节点: ${q.parent.parent.topic}`),K.join(" | ")},Ue=q=>{q.ctrlKey||q.metaKey||(q.preventDefault(),Oe())},Oe=async()=>{if(!(!w.value.trim()||!x.value||S.value)){S.value=!0;try{const q="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",K=`节点信息:
|
||
当前节点:${x.value.topic}
|
||
上下文:${ot(x.value)}
|
||
|
||
用户问题:${w.value}
|
||
|
||
请给出详细的回答,回答应该:
|
||
1. 直接回答用户的问题
|
||
2. 提供具体的建议或改进方案
|
||
3. 保持专业和有用的语调
|
||
4. 回答长度适中,便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:q,userPrompt:K});const Q=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:q,user_prompt:K,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!Q.ok)throw new Error(`HTTP error! status: ${Q.status}`);let ye="";const Me=Q.body.getReader(),He=new TextDecoder;let pe="";for(;;){const{done:Re,value:Pe}=await Me.read();if(Re)break;pe+=He.decode(Pe,{stream:!0});const ht=pe.split(`
|
||
`);pe=ht.pop()||"";for(const Dt of ht)if(Dt.startsWith("data: "))try{const zt=JSON.parse(Dt.slice(6));if(zt.type==="chunk")ye+=zt.content;else if(zt.type==="error")throw new Error(zt.content)}catch(zt){console.warn("解析流式数据失败:",zt)}}await $t(x.value,w.value,ye),Be()}catch(q){console.error("AI请求失败:",q),alert("AI请求失败,请稍后重试")}finally{S.value=!1}}},mt=q=>q.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(K,Q)=>{if(Q.includes(":")){const ye=Q.split(":");if(ye.length>1)return`【${ye[0]}】: ${ye.slice(1).join(":")}`}return`【${Q}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
|
||
`).replace(/\n/g,`
|
||
`),Ct=(q,K,Q)=>{const ye=q.split(`
|
||
`);let Me=Q,He=[];for(let pe=0;pe<ye.length;pe++){const Pe=ye[pe].trim(),ht=Pe.match(/^[-*+]\s*【(.+)】/);if(ht){const Dt=ht[1].trim(),zt={id:`node_${Me++}`,topic:Dt,children:[],level:(K.level||0)+1,data:{}};let en=[],Bn=pe+1;for(;Bn<ye.length;){const On=ye[Bn].trim();if(On.match(/^[-*+]\s*【(.+)】/))break;const mi=On.match(/^[-*+]\s+(.+)$/);if(mi){const Qr=mi[1].trim(),Br=mt(Qr);en.push("• "+Br)}Bn++}if(en.length>0){const On=mt(en.join(`
|
||
`));zt.topic=zt.topic+`
|
||
|
||
`+On}K.children.push(zt),pe=Bn-1}else Pe&&He.push(Pe)}if(He.length>0){const pe=He.join(`
|
||
`).trim();pe&&pe.split(`
|
||
|
||
`).filter(Pe=>Pe.trim()).forEach(Pe=>{const ht=mt(Pe.trim());if(ht){const Dt={id:`node_${Me++}`,topic:ht,children:[],level:(K.level||0)+1,data:{}};K.children.push(Dt)}})}return{nodeCounter:Me}},Vt=q=>{const K=q.split(`
|
||
`);let Q=null;const ye=[];let Me=0,He=[];if(K.forEach((pe,Re)=>{const Pe=pe.trim(),ht=Pe.match(/^(#{1,6})\s+(.+)$/);if(ht){if(He.length>0&&ye.length>0){const On=He.join(`
|
||
`).trim();On&&(Me=Ct(On,ye[ye.length-1],Me).nodeCounter),He=[]}const Dt=ht[1].length,zt=ht[2].trim(),en=mt(zt),Bn={id:`node_${Me++}`,topic:en,children:[],level:Dt,data:{}};if(Dt===1&&!Q)Q=Bn,ye.length=0,ye.push(Q);else{for(;ye.length>1&&ye[ye.length-1].level>=Dt;)ye.pop();ye.length>0&&ye[ye.length-1].children.push(Bn),ye.push(Bn)}}else Pe&&He.push(Pe)}),He.length>0&&ye.length>0){const pe=He.join(`
|
||
`).trim();pe&&(Me=Ct(pe,ye[ye.length-1],Me).nodeCounter)}return Q||(Q={id:"root",topic:"根节点",children:[],data:{}}),Q},$t=async(q,K,Q)=>{var ye,Me,He;try{const Re=(dr=>dr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
|
||
|
||
`).trim())(Q),Pe=`# ${K}
|
||
|
||
${Re}`,ht=Vt(Pe),Dt={title:K,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:q.id,isRoot:!1},zt=[];if(ht.children&&ht.children.length>0&&ht.children.forEach(dr=>{zt.push({title:dr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",p.value),!p.value)throw new Error("没有找到当前思维导图ID,无法创建节点");const en=await Un.addNodes(p.value,[Dt]);if(!en.data||!en.data.success)throw new Error("AI父节点创建失败");const Bn=(He=(Me=(ye=en.data.data)==null?void 0:ye.nodes)==null?void 0:Me[0])==null?void 0:He.id;if(!Bn)throw new Error("无法获取创建的父节点ID");zt.forEach(dr=>{dr.parentId=Bn});let On=null;if(zt.length>0&&(On=await Un.addNodes(p.value,zt)),en.data&&en.data.success)await Zo();else throw new Error("AI父节点创建失败")}catch(pe){console.error("创建AI节点失败:",pe),alert("创建AI回答节点失败: "+pe.message)}},$n=async()=>{if(l.value){try{const q=l.value.topic||l.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(q),Mn();else{const K=document.createElement("textarea");K.value=q,K.style.position="fixed",K.style.left="-999999px",K.style.top="-999999px",document.body.appendChild(K),K.focus(),K.select();const Q=document.execCommand("copy");document.body.removeChild(K),Q?Mn():In()}}catch{In()}l.value=null}},Mn=()=>{const q=document.createElement("div");q.textContent="文本已复制到剪贴板",q.style.cssText=`
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
background: #4CAF50;
|
||
color: white;
|
||
padding: 12px 20px;
|
||
border-radius: 6px;
|
||
font-size: 14px;
|
||
z-index: 10000;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
||
animation: slideIn 0.3s ease;
|
||
`;const K=document.createElement("style");K.textContent=`
|
||
@keyframes slideIn {
|
||
from { transform: translateX(100%); opacity: 0; }
|
||
to { transform: translateX(0); opacity: 1; }
|
||
}
|
||
`,document.head.appendChild(K),document.body.appendChild(q),setTimeout(()=>{q.parentNode&&q.parentNode.removeChild(q),K.parentNode&&K.parentNode.removeChild(K)},3e3)},In=()=>{const q=document.createElement("div");q.textContent="复制失败,请手动复制",q.style.cssText=`
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
background: #f44336;
|
||
color: white;
|
||
padding: 12px 20px;
|
||
border-radius: 6px;
|
||
font-size: 14px;
|
||
z-index: 10000;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
||
animation: slideIn 0.3s ease;
|
||
`,document.body.appendChild(q),setTimeout(()=>{q.parentNode&&q.parentNode.removeChild(q)},3e3)},kn=(q,K="success")=>{const Q=document.createElement("div");Q.textContent=q;const ye=K==="success"?"#4CAF50":K==="error"?"#f44336":"#ff9800";Q.style.cssText=`
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
background: ${ye};
|
||
color: white;
|
||
padding: 12px 20px;
|
||
border-radius: 6px;
|
||
font-size: 14px;
|
||
z-index: 10000;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
||
animation: slideIn 0.3s ease;
|
||
`,document.body.appendChild(Q),setTimeout(()=>{Q.parentNode&&Q.parentNode.removeChild(Q)},2e3)},gr=()=>{const q=document.createElement("div");q.textContent="✅ 节点编辑已保存",q.style.cssText=`
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
background: #4CAF50;
|
||
color: white;
|
||
padding: 12px 20px;
|
||
border-radius: 6px;
|
||
font-size: 14px;
|
||
z-index: 10000;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
||
animation: slideIn 0.3s ease;
|
||
`,document.body.appendChild(q),setTimeout(()=>{q.parentNode&&q.parentNode.removeChild(q)},2e3)},nr=()=>{const q=document.createElement("div");q.textContent="❌ 节点编辑保存失败",q.style.cssText=`
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
background: #f44336;
|
||
color: white;
|
||
padding: 12px 20px;
|
||
border-radius: 6px;
|
||
font-size: 14px;
|
||
z-index: 10000;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
||
animation: slideIn 0.3s ease;
|
||
`,document.body.appendChild(q),setTimeout(()=>{q.parentNode&&q.parentNode.removeChild(q)},3e3)},Xn=async q=>{try{console.log("🎯 处理节点拖拽操作:",q.name),console.log("📦 操作详情:",{name:q.name,objs:q.objs,toObj:q.toObj}),setTimeout(async()=>{var K;try{const Q=q.objs||[],ye=q.toObj;if(!Q.length||!ye){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${Q.length} 个节点的父子关系`);let Me=null;q.name==="moveNodeIn"?(Me=ye.id,console.log(`📌 拖入操作:新父节点为 ${Me}`)):(q.name==="moveNodeBefore"||q.name==="moveNodeAfter")&&(Me=((K=ye.parent)==null?void 0:K.id)||null,console.log(`📌 拖到兄弟位置:新父节点为 ${Me||"根节点"}`));const He=Q.map(async ht=>{try{console.log(`🔄 更新节点 ${ht.id} 的父节点为 ${Me||"根节点"}`);const Dt=await Un.updateNode(ht.id,{newParentId:Me});return Dt.data&&Dt.data.success?(console.log(`✅ 节点 ${ht.id} 父子关系更新成功`),{success:!0,nodeId:ht.id}):(console.warn(`⚠️ 节点 ${ht.id} 父子关系更新失败:`,Dt),{success:!1,nodeId:ht.id})}catch(Dt){return console.error(`❌ 节点 ${ht.id} 父子关系更新失败:`,Dt),{success:!1,nodeId:ht.id,error:Dt}}}),pe=await Promise.all(He),Re=pe.filter(ht=>ht.success).length,Pe=pe.filter(ht=>!ht.success).length;console.log(`📊 拖拽保存结果: ${Re} 成功, ${Pe} 失败`)}catch(Q){console.error("❌ 保存拖拽后的结构失败:",Q),kn("❌ 节点拖拽保存失败","error")}},500)}catch(K){console.error("❌ 处理节点拖拽操作失败:",K)}},It=new Set,zn=async q=>{var Q;const K=`${q.name}-${(Q=q.obj)==null?void 0:Q.id}`;if(It.has(K)){console.log("⚠️ 跳过重复的编辑操作:",K);return}It.add(K);try{console.log("🔍 处理编辑完成:",q);const ye=q.obj;ye?(console.log("🔍 保存编辑的节点:",{nodeId:ye.id,nodeTopic:ye.topic,hasDangerouslySetInnerHTML:!!ye.dangerouslySetInnerHTML}),await nn(ye)):console.error("无法解析编辑操作:",q)}catch(ye){console.error("处理编辑完成失败:",ye)}finally{It.delete(K)}},nn=async q=>{var K,Q,ye;try{const Me=q.id.replace(/^me/,"");if(console.log("🔍 更新节点编辑:",{originalNodeId:q.id,cleanNodeId:Me,nodeTopic:q.topic,dangerouslySetInnerHTML:q.dangerouslySetInnerHTML,currentMindmapId:p.value}),!p.value){console.error("无法获取思维导图ID");return}const He={newTitle:q.topic,newDes:((K=q.data)==null?void 0:K.des)||"",newParentId:q.parentId||((Q=q.parent)==null?void 0:Q.id),newDangerouslySetInnerHTML:q.dangerouslySetInnerHTML||""};console.log("🔍 发送到后端的更新数据:",He);const pe=await Un.updateNode(Me,He);if(pe.data&&pe.data.success){if(o.value&&q){let Re=q.id;if(Re.startsWith("me")&&(Re=Re.substring(2)),!Re.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i)){console.error("❌ 无效的UUID格式:",Re,"原始ID:",q.id);return}console.log("🔍 查找DOM元素,纯净ID:",Re,"原始ID:",q.id),console.log("🔍 调试信息 - node对象:",{id:q.id,topic:((ye=q.topic)==null?void 0:ye.substring(0,50))+"...",hasDangerouslySetInnerHTML:!!q.dangerouslySetInnerHTML});try{const Pe=o.value.findEle(Re);console.log("🔍 找到的DOM元素:",Pe),Pe?(console.log("✅ DOM元素存在,直接更新内容..."),q.dangerouslySetInnerHTML?(console.log("🔍 更新HTML内容:",q.dangerouslySetInnerHTML.substring(0,100)+"..."),Pe.innerHTML=q.dangerouslySetInnerHTML,console.log("📝 节点显示内容已更新 (updateNodeEdit) - 直接设置HTML")):q.topic?(console.log("🔍 更新文本内容:",q.topic.substring(0,100)+"..."),Pe.textContent=q.topic,console.log("📝 节点显示内容已更新 (updateNodeEdit) - 设置文本")):console.warn("⚠️ node对象没有dangerouslySetInnerHTML或topic")):console.warn("⚠️ findEle返回了null或undefined")}catch(Pe){console.warn("⚠️ 无法找到DOM元素:",Pe.message,"纯净ID:",Re)}}gr()}else console.error("更新节点编辑失败:",pe.data),nr()}catch(Me){console.error("更新节点编辑失败:",Me),nr()}},mo=async q=>{var K;try{await un();const Q=p.value||q.mindmap_id||q.mindmapId;if(!Q){console.error("无法获取思维导图ID");return}const ye=await Un.addNodes(Q,[{title:"新子节点",des:"子节点描述",parentId:q.id}]);if(ye.data&&ye.data.success){const Me=((K=ye.data.data)==null?void 0:K.nodes)||[];if(Me.length>0){const He=Me[0];try{await new Promise(Re=>setTimeout(Re,800));const pe=await Un.getMindmap(Q);if(pe.data&&pe.data.nodeData){await V(pe.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",He.id),await le(He.id)}catch(Re){console.error("居中显示新节点失败:",Re)}}else throw new Error("无法获取思维导图数据")}catch(pe){console.error("刷新思维导图失败:",pe)}}}}catch(Q){console.error("添加子节点失败:",Q)}},vr=async q=>{var K;try{await un(),console.log("添加兄弟节点到API:",q.id),console.log("节点信息:",{id:q.id,parentId:q.parentId,parent:q.parent,mindmap_id:q.mindmap_id,mindmapId:q.mindmapId});const Q=p.value||q.mindmap_id||q.mindmapId;if(!Q){console.error("无法获取思维导图ID");return}let ye=q.parentId;!ye&&q.parent&&(ye=q.parent.id);const Me=await Un.addNodes(Q,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:ye}]);if(console.log("添加兄弟节点响应:",Me),Me.data&&Me.data.success){const He=((K=Me.data.data)==null?void 0:K.nodes)||[];if(He.length>0){const pe=He[0];console.log("新创建的兄弟节点:",pe),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const Re=await Un.getMindmap(Q);if(Re.data&&Re.data.nodeData){await V(Re.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",pe.id),await le(pe.id)}catch(Pe){console.error("居中显示新节点失败:",Pe)}}else throw new Error("无法获取思维导图数据")}catch(Re){console.error("重新初始化失败,使用完整重新加载:",Re);const Pe=await Un.getMindmap(Q);Pe.data&&Pe.data.nodeData&&await V(Pe.data,!0,!1)}}}}catch(Q){console.error("添加兄弟节点失败:",Q)}},cr=async q=>{try{await un(),console.log("删除节点从API:",q.id);const K=await Un.deleteNodes([q.id]);if(console.log("删除节点响应:",K),K.data&&K.data.success){const Q=p.value||q.mindmap_id||q.mindmapId;if(Q){const ye=await Un.getMindmap(Q);ye.data&&ye.data.nodeData&&(await V(ye.data,!0,!1),console.log("✅ 删除节点后思维导图已刷新,保持当前位置"))}}}catch(K){console.error("删除节点失败:",K)}},un=async()=>{const q=r.value;if(q){const K=q.querySelector("input:focus");if(K&&l.value){const Q=K.value;Q!==l.value.topic&&Q.trim()!==""&&(console.log("保存当前编辑:",Q),l.value.topic=Q,await Pr(l.value))}}},Pr=async q=>{var K,Q,ye,Me,He;try{console.log("保存Mind Elixir编辑,节点ID:",q.id),console.log("编辑内容:",{newTitle:q.topic,newDes:((K=q.data)==null?void 0:K.des)||""});const pe=String(q.id),Re=await Un.updateNode(pe,{newTitle:q.topic,newDes:((Q=q.data)==null?void 0:Q.des)||""});console.log("更新节点API响应:",Re),console.log("节点编辑已保存到后端"),console.log("✅ 节点编辑已保存,无需重新加载")}catch(pe){console.error("保存Mind Elixir编辑失败:",pe),console.error("错误详情:",(ye=pe.response)==null?void 0:ye.data),alert("保存编辑失败: "+(((He=(Me=pe.response)==null?void 0:Me.data)==null?void 0:He.detail)||pe.message))}},Zi=q=>{var K,Q;console.log("打开编辑模态框:",q);try{const ye=(q==null?void 0:q.id)||((K=q==null?void 0:q.nodeObj)==null?void 0:K.id);let Me=null;ye&&(Me=document.querySelector(`[data-nodeid="me${ye}"]`)||document.querySelector(`[data-id="${ye}"]`)||document.querySelector(`.topic[data-id="${ye}"]`)),typeof Yi=="function"?Yi((q==null?void 0:q.nodeObj)||q,Me):typeof lt=="function"&<((q==null?void 0:q.nodeObj)||q,Me)}catch(ye){console.warn("打开自定义编辑器失败,回退到内置编辑。",ye),(Q=o.value)!=null&&Q.editText&&o.value.editText(q)}},Xo=async(q,K,Q)=>{var ye,Me;try{console.log("🚀 开始批量创建节点:",q.topic,"父节点ID:",Q);const He=[];if(((Re,Pe)=>{var Dt;const ht={title:Re.topic||Re.title||"无标题",des:((Dt=Re.data)==null?void 0:Dt.des)||"",parentId:Pe};Re.dangerouslySetInnerHTML&&(ht.dangerouslySetInnerHTML=Re.dangerouslySetInnerHTML),He.push({nodeData:ht,children:Re.children||[]})})(q,Q),He.length>0){const Re=He.map(ht=>ht.nodeData),Pe=await Un.addNodes(K,Re);if(console.log("✅ 批量创建节点响应:",Pe),Pe.data&&Pe.data.success){const ht=((ye=Pe.data.data)==null?void 0:ye.nodes)||[];if(console.log("✅ 成功创建节点数量:",ht.length),q.children&&q.children.length>0){console.log("🔄 开始创建子节点,数量:",q.children.length);const Dt=(Me=ht[0])==null?void 0:Me.id,zt=q.children.map(en=>Xo(en,K,Dt));await Promise.all(zt)}}else console.error("❌ 批量创建节点失败,响应:",Pe)}}catch(He){console.error("❌ 创建节点失败:",He)}};let dn=null,Gt=null;const ur=()=>{if(!r.value)return;console.log("🎯 添加自定义双击编辑事件监听器"),r.value._customDoubleClickHandler&&r.value.removeEventListener("dblclick",r.value._customDoubleClickHandler,!0);const q=K=>{console.log("🎯 检测到双击事件:",K.target);let Q=K.target;for(;Q&&!Q.classList.contains("topic")&&Q.tagName!=="ME-TPC"&&(Q=Q.parentElement,!!Q););if(!Q||!Q.classList.contains("topic")&&Q.tagName!=="ME-TPC")for(Q=K.target;Q&&Q.tagName!=="ME-TPC"&&(Q=Q.parentElement,!!Q););if(console.log("🎯 找到的节点元素:",Q,"标签名:",Q==null?void 0:Q.tagName,"类名:",Q==null?void 0:Q.className),Q&&(Q.classList.contains("topic")||Q.tagName==="ME-TPC")){console.log("🎯 确认是节点元素,阻止默认行为"),K.preventDefault(),K.stopPropagation();const ye=Q.getAttribute("data-nodeid")||Q.getAttribute("data-id");if(console.log("🎯 节点ID:",ye),ye&&o.value){console.log("🎯 Mind Elixir实例存在,尝试获取节点数据"),console.log("🎯 mindElixir.value.data:",o.value.data);let Me=null;try{const He=ye.startsWith("me")?ye.substring(2):ye;console.log("🎯 使用getNodeById获取节点数据,纯ID:",He);const pe=o.value.getNodeById(He);console.log("📌 真正节点数据:",pe),pe&&(Me=pe,console.log("✅ 从Mind Elixir API获取到真实节点数据"))}catch(He){console.warn("⚠️ getNodeById失败:",He)}if(!Me&&o.value.data&&(Me=Pa(o.value.data,ye),console.log("🎯 从findNodeById获取到节点数据")),!Me&&l.value&&l.value.id===ye&&(Me=l.value,console.log("🎯 从selectedNode获取到节点数据")),!Me){const He=Q.innerHTML,pe=Q.textContent||Q.innerText||"";console.log("🎯 从节点元素获取HTML内容:",He.substring(0,200)+"..."),console.log("🎯 从节点元素获取文本内容:",pe.substring(0,100)+"...");const Re=He.includes("<img")||He.includes("!["),Pe=He.includes("<table")||He.includes("|");console.log("🎯 内容分析 - 包含图片:",Re,"包含表格:",Pe),Me={id:ye,topic:pe,data:pe,dangerouslySetInnerHTML:He,hasImage:Re,hasTable:Pe},console.log("🎯 创建包含HTML的完整节点对象:",Me)}console.log("🎯 最终找到的节点数据:",Me),Me?(console.log("🎯 双击节点触发自定义编辑:",Me),Yi(Me,Q)):console.log("🎯 无法获取任何节点数据")}else console.log("🎯 无法获取节点数据,mindElixir:",!!o.value,"nodeId:",ye)}else console.log("🎯 不是节点元素,忽略双击事件")};r.value.addEventListener("dblclick",q,!0),r.value._customDoubleClickHandler=q},Pa=(q,K)=>{if(q.id===K)return q;if(q.children&&q.children.length>0)for(const Q of q.children){const ye=Pa(Q,K);if(ye)return ye}return null},Yi=(q,K)=>{var ye,Me,He,pe;console.log("🎯 打开自定义编辑模态框:",q),console.log("🔍 完整节点对象结构:",q),console.log("🔍 节点data字段:",q.data),console.log("🔍 节点所有属性:",Object.keys(q)),q.dangerouslySetInnerHTML&&console.log("🔍 发现dangerouslySetInnerHTML:",q.dangerouslySetInnerHTML.substring(0,200)+"...");let Q="";if(console.log("🔍 节点对象完整结构:",q),console.log("🔍 节点data字段结构:",q.data),(ye=q.data)!=null&&ye.note)Q=q.data.note,console.log("✅ 从node.data.note获取Markdown源码:",Q.substring(0,100)+"...");else if((Me=q.data)!=null&&Me.markdown)Q=q.data.markdown,console.log("✅ 从node.data.markdown获取Markdown源码:",Q.substring(0,100)+"...");else if((He=q.data)!=null&&He.text)Q=q.data.text,console.log("✅ 从node.data.text获取Markdown源码:",Q.substring(0,100)+"...");else if((pe=q.data)!=null&&pe.content)Q=q.data.content,console.log("✅ 从node.data.content获取Markdown源码:",Q.substring(0,100)+"...");else if(q.note)Q=q.note,console.log("✅ 从node.note获取Markdown源码:",Q.substring(0,100)+"...");else if(q.topic&&!q.dangerouslySetInnerHTML)Q=q.topic,console.log("✅ 从node.topic获取内容:",Q.substring(0,100)+"...");else if(q.dangerouslySetInnerHTML){console.log("⚠️ 没有找到Markdown字段,转换HTML为Markdown:",q.dangerouslySetInnerHTML.substring(0,100)+"...");try{const Re=(q==null?void 0:q.dangerouslySetInnerHTML)||"",ht=(Dt=>{if(!/<table[\s\S]*<\/table>/i.test(Dt))return null;const zt=document.createElement("div");zt.innerHTML=Dt;const en=zt.querySelector("table");if(!en)return null;const Bn=hr=>((hr==null?void 0:hr.textContent)||"").replace(/\n+/g," ").trim();let On=[],dr=[];const mi=en.querySelector("thead"),Qr=en.querySelector("tbody");if(mi){const hr=mi.querySelector("tr");hr&&(On=Array.from(hr.children).map(Bn))}if((Qr||en).querySelectorAll("tr").forEach((hr,vo)=>{const Fa=Array.from(hr.children).map(Bn);vo===0&&On.length===0?On=Fa:dr.push(Fa)}),On.length===0)return null;const _r=`| ${On.join(" | ")} |`,Ba=`| ${On.map(()=>"---").join(" | ")} |`,go=dr.map(hr=>`| ${hr.join(" | ")} |`);return[_r,Ba,...go].join(`
|
||
`)})(Re);ht?(Q=ht,console.log("✅ 使用自定义表格转换为Markdown")):typeof(Qo==null?void 0:Qo.html2md)=="function"?(Q=Qo.html2md(Re),console.log("✅ 使用 Vditor.html2md 转换成功:",Q.substring(0,100)+"...")):(console.warn("⚠️ Vditor.html2md 不可用,使用简单转换逻辑"),Q=String(Re).replace(/<img[^>]*src="([^"]+)"[^>]*alt="([^"]*)"[^>]*>/gi,"").replace(/<img[^>]*src="([^"]+)"[^>]*>/gi,"").replace(/<br\s*\/?>/gi,`
|
||
`).replace(/<\/p>/gi,`
|
||
|
||
`).replace(/<p[^>]*>/gi,"").replace(/<strong>(.*?)<\/strong>/gi,"**$1**").replace(/<b>(.*?)<\/b>/gi,"**$1**").replace(/<em>(.*?)<\/em>/gi,"*$1*").replace(/<i>(.*?)<\/i>/gi,"*$1*").replace(/<ul[^>]*>/gi,`
|
||
`).replace(/<\/ul>/gi,`
|
||
`).replace(/<li[^>]*>/gi,"- ").replace(/<\/li>/gi,`
|
||
`).replace(/<[^>]+>/g,"").replace(/\n{3,}/g,`
|
||
|
||
`).trim(),console.log("✅ 使用简单转换逻辑成功:",Q.substring(0,100)+"..."))}catch(Re){console.error("❌ HTML 转 Markdown 失败:",Re),Q=(q==null?void 0:q.dangerouslySetInnerHTML)||""}}else console.warn("⚠️ 没有找到任何可用的内容字段"),Q="";N.value=q.topic||q.title||"",z.value=Q,F.value=q,P.value=K,console.log("🎯 最终设置的Markdown内容:",Q),console.log("🎯 编辑器标题:",N.value),y.value=!0,Ga(()=>{setTimeout(()=>{if(de.value&&de.value.offsetParent!==null)j();else{let Re=0;const Pe=10,ht=()=>{Re++,de.value&&de.value.offsetParent!==null?j():Re<Pe?setTimeout(ht,100):(console.error("❌ 容器在",Pe,"次尝试后仍未准备好"),alert("编辑器初始化失败,请刷新页面重试"))};setTimeout(ht,100)}},50)})},Ji=()=>{if(!o.value)return;console.log("绑定事件监听器..."),dn&&r.value.removeEventListener("wheel",dn),Gt&&r.value.removeEventListener("click",Gt),dn=Q=>{if(Q.ctrlKey||Q.metaKey){Q.preventDefault();const ye=Q.deltaY>0?.9:1.1,Me=Math.max(.3,Math.min(3,v.value*ye));if(o.value){const He=r.value.querySelector(".map-container");He&&(He.style.transform=`scale(${Me})`,v.value=Me,localStorage.setItem("mindmap-zoom-level",Me.toString()))}}},r.value.addEventListener("wheel",dn),o.value.bus.addListener("select",Q=>{l.value=Q,setTimeout(()=>{we()},50)}),o.value.bus.addListener("selectNode",Q=>{l.value=Q,setTimeout(()=>{we()},50)}),o.value.bus.addListener("scale",Q=>{Math.abs(Q-1)<.01&&Math.abs(v.value-1)>.01&&setTimeout(()=>{Mt()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const q=setInterval(()=>{v.value!==1&&r.value&&As()},500);window.zoomIntervalId=q;let K=0;Gt=Q=>{const ye=Date.now();if(ye-K<100)return;K=ye;const Me=Q.target,He=Me.closest("me-tpc")||Me.closest(".topic")||(Me.classList.contains("topic")?Me:null)||(Me.tagName==="ME-TPC"?Me:null);if(He){const pe=He.nodeObj;if(pe){l.value=pe;const Re=r.value.getBoundingClientRect(),Pe=He.getBoundingClientRect(),ht=Pe.left-Re.left+Pe.width/2,Dt=Pe.bottom-Re.top+8;h.value={left:`${ht}px`,top:`${Dt}px`}}}else l.value=null,m.value&&(m.value=!1,x.value=null,w.value="",S.value=!1)},r.value.addEventListener("click",Gt),o.value.bus.addListener("edit",Q=>{console.log("edit事件触发:",Q),Zi(Q)}),o.value.bus.addListener("editFinish",Q=>{console.log("editFinish事件触发:",Q),zn(Q)}),o.value.bus.addListener("operation",Q=>{console.log("Mind Elixir操作事件:",Q),Q.name==="moveNodeIn"||Q.name==="moveNodeBefore"||Q.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",Q.name,Q),Xn(Q)):(Q.name==="finishEdit"||Q.name==="finishEditTable")&&(console.log("🔍 检测到编辑完成操作:",Q.name,Q),zn(Q))}),o.value.bus.addListener("removeNode",Q=>{console.log("删除节点:",Q),cr(Q)})},Mt=()=>{if(o.value){const q=localStorage.getItem("mindmap-zoom-level");if(q){const K=parseFloat(q);if(K>=.3&&K<=3){const Q=r.value.querySelector(".map-container");Q&&(Q.style.transform=`scale(${K})`,v.value=K)}}}},As=()=>{if(o.value&&v.value!==1&&r.value){const q=r.value.querySelector(".map-container");q&&(q.style.transform=`scale(${v.value})`)}},rr=async()=>{var q;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",o.value),console.log("🔍 currentMindmapId.value:",p.value),console.log("🔍 mindmapEl.value:",r.value),console.log("🔍🔍🔍 全局状态检查开始 🔍🔍🔍"),console.log("🔍 - showWelcome:",b.value),console.log("🔍 - 是否有思维导图容器:",!!r.value),console.log("🔍 - MindElixir实例状态:",!!o.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),o.value&&o.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",o.value.data),console.log("🔍 - 数据字段:",Object.keys(o.value.data)),console.log("🔍 - 是否有nodeData:",!!o.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!o.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!o.value||!p.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!o.value),console.warn("🔍 currentMindmapId.value 状态:",!!p.value),o.value&&o.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",o.value.data),o.value.data.mindmapId?(p.value=o.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",o.value.data.mindmapId)):o.value.data.mindmap_id&&(p.value=o.value.data.mindmap_id,console.log("🔍 从MindElixir数据中获取到mindmap_id:",o.value.data.mindmap_id))),!p.value&&o.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(o.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(o.value))),o.value.getData){const K=o.value.getData();console.log("🔍 通过getData()获取的数据:",K),K&&K.nodeData&&(console.log("🔍 nodeData详情:",K.nodeData),K.nodeData.mindmapId?(p.value=K.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",K.nodeData.mindmapId)):K.nodeData.mindmap_id?(p.value=K.nodeData.mindmap_id,console.log("🔍 从nodeData.mindmap_id获取到ID:",K.nodeData.mindmap_id)):(console.log("🔍 nodeData中没有找到mindmapId字段"),console.log("🔍 nodeData字段:",Object.keys(K.nodeData)))),!p.value&&K&&(console.log("🔍 检查其他可能的ID字段..."),K.id?(p.value=K.id,console.log("🔍 从data.id获取到ID:",K.id)):K.mindmapId&&(p.value=K.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",K.mindmapId)))}o.value.mindElixirData&&(console.log("🔍 mindElixirData:",o.value.mindElixirData),o.value.mindElixirData.id&&(p.value=o.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",o.value.mindElixirData.id)))}if(!p.value){console.warn("⚠️ 仍然无法获取思维导图ID,无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",p.value),console.log("🔍 MindElixir实例:",o.value);let K=null;if(o.value&&o.value.getData?(K=o.value.getData(),console.log("🔍 通过getData()获取的数据:",K)):(K=o.value.data,console.log("🔍 通过data属性获取的数据:",K)),!K){console.warn("⚠️ MindElixir数据为空");return}let Q=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",K.nodeData),console.log("🔍 - currentData.nodes:",K.nodes),console.log("🔍 - currentData.nodeData.children:",(q=K.nodeData)==null?void 0:q.children);const ye=pe=>{pe&&pe.id&&(Q.push(pe),console.log(`🔍 收集节点: ${pe.id} - ${pe.topic||pe.content||"无标题"}`),pe.children&&pe.children.length>0&&pe.children.forEach(Re=>ye(Re)))};if(K.nodeData)ye(K.nodeData),console.log("🔍 从根节点收集到节点数量:",Q.length);else if(K.nodes&&Array.isArray(K.nodes))K.nodes.forEach(pe=>ye(pe)),console.log("🔍 从nodes数组收集到节点数量:",Q.length);else if(Array.isArray(K))K.forEach(pe=>ye(pe)),console.log("🔍 从currentData数组收集到节点数量:",Q.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(K));return}if(Q.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",Q),console.log("🔍 节点数量:",Q.length),console.log("🔍 节点数据类型:",Array.isArray(Q)?"数组":typeof Q);const Me=[];if(Q.forEach((pe,Re)=>{if(console.log(`🔍 处理节点 ${Re}:`,pe),pe&&pe.id){const Pe=pe.topic||pe.content||pe.text||"",ht=pe.x||pe.offsetX||0,Dt=pe.y||pe.offsetY||0;console.log(`🔍 节点 ${pe.id} 内容:`,Pe,"位置:",{x:ht,y:Dt});const zt={content:Pe,position:{x:ht,y:Dt}};(pe.parentId||pe.parent)&&(zt.parentId=pe.parentId||pe.parent,console.log(`🔍 节点 ${pe.id} 父节点:`,zt.parentId)),console.log(`🔍 准备保存节点 ${pe.id}:`,zt),Me.push(Un.updateNode(pe.id,zt).then(en=>{console.log(`✅ 节点 ${pe.id} 保存成功:`,en)}).catch(en=>{console.error(`❌ 节点 ${pe.id} 保存失败:`,en)}))}else console.warn(`⚠️ 节点 ${Re} 缺少ID:`,pe)}),console.log("🔍 准备保存的节点数量:",Me.length),Me.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const He=await Promise.all(Me);console.log("🔍 保存结果:",He),console.log("🎉 思维导图保存完成!")}catch(K){console.error("❌ 保存思维导图失败:",K)}},Zo=async()=>{if(!p.value){console.warn("⚠️ 没有当前思维导图ID,无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const q=await Un.getMindmap(p.value);if(q.data&&q.data.nodeData){console.log("✅ 获取到最新数据,开始刷新显示...");const K=De();await V(q.data,!0,!1),K&&setTimeout(()=>{se(K),console.log("📍 已恢复位置和缩放状态")},100),console.log("🎉 思维导图刷新完成!")}else console.warn("⚠️ 无法获取思维导图数据")}catch(q){console.error("❌ 刷新思维导图失败:",q)}},zr=async(q,K)=>{try{const Q=String(p.value||"");if(o.value&&Q&&Q.startsWith("temp-")){console.log("🔄 检测到实时渲染的思维导图,将保存到数据库并更新ID");const He=De();console.log("📍 保存当前位置:",He);const pe=await Un.createMindmap(K||"预览思维导图",q);if(console.log("🔄 创建思维导图响应:",pe),pe.data&&pe.data.id){const Re=pe.data.id;console.log("🎉 创建思维导图成功,新思维导图的ID是:",Re);const Pe=p.value;if(p.value=Re,o.value&&o.value.data){o.value.data.mindmapId=Re,o.value.data.id=Re;const ht=Dt=>{Dt&&(Dt.mindmapId=Re,Dt.children&&Dt.children.forEach(zt=>ht(zt)))};o.value.data.nodeData&&ht(o.value.data.nodeData)}console.log("✅ 已更新思维导图ID,保持视图状态"),console.log("🔄 从临时ID",Pe,"更新为正式ID",Re),He&&setTimeout(()=>{se(He),console.log("📍 已恢复位置和缩放状态")},100),console.log("✅ 保存完成,保持当前思维导图显示状态"),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Re,title:K,timestamp:Date.now(),fromRealtime:!0}}));return}}console.log("🔄 没有检测到实时渲染的思维导图,使用标准保存流程");const Me=await Un.createMindmap(K||"预览思维导图",q);if(console.log("🔄 创建思维导图响应:",Me),Me.data&&Me.data.id){const He=Me.data.id;if(console.log("🎉 创建思维导图成功,新思维导图的ID是:",He),console.log("📊 响应数据详情:",Me.data),Me.data.nodeData)console.log("✅ 思维导图创建时已包含节点数据,直接加载"),p.value=He,Ge(),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:He,title:K,timestamp:Date.now()}})),console.log("🎉 思维导图保存并加载完成!");else{console.log("🔧 需要递归创建节点"),await Xo(q,He,null),console.log("📥 开始加载新创建的思维导图,ID:",He);const pe=await Un.getMindmap(He);console.log("🔄 加载思维导图响应:",pe),pe.data&&pe.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),p.value=He,Ge(),await V(pe.data,!0,!1),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:He,title:K,timestamp:Date.now()}})),console.log("🎉 思维导图保存并加载完成!")):console.error("❌ 获取思维导图数据失败:",pe)}}}catch(Q){console.error("❌ 保存预览数据到数据库失败:",Q)}},Qi=async q=>{try{if(console.log("📚 开始从历史记录加载思维导图:",q.title),Ge(),q.mindmapId){console.log("🎯 使用思维导图ID加载:",q.mindmapId);const K=await Un.getMindmap(q.mindmapId);if(K.data&&K.data.nodeData)await V(K.data);else throw new Error("无法获取思维导图数据")}else if(q.json)console.log("📊 使用历史记录中的JSON数据"),await V(q.json);else if(q.markdown){console.log("📝 使用历史记录中的Markdown数据,尝试转换为JSON");try{const K=await convertMarkdownToJSON(q.markdown);if(K)await V(K);else throw new Error("Markdown转换失败")}catch(K){console.error("Markdown转换失败:",K)}}}catch(K){console.error("❌ 从历史记录加载思维导图失败:",K)}};Fp(async()=>{window.addEventListener("save-preview-to-database",q=>{console.log("🎯 收到保存到数据库事件:",q.detail),console.log("📋 事件详情 - 标题:",q.detail.title,"来源:",q.detail.source,"时间戳:",new Date(q.detail.timestamp).toLocaleString()),zr(q.detail.data,q.detail.title)}),window.addEventListener("realtime-mindmap-update",q=>{console.log("🔄 收到实时思维导图更新事件:",q.detail),ea(q.detail.data,q.detail.title,q.detail)}),window.addEventListener("loadMindmapFromHistory",q=>{console.log("📚 收到从历史记录加载思维导图事件:",q.detail),console.log("🔍 事件数据详情:",q.detail),Qi(q.detail)}),window.addEventListener("ai-sidebar-toggle",q=>{console.log("🤖 AI侧边栏折叠状态变化:",q.detail.isCollapsed),g.value=q.detail.isCollapsed}),qe()});const za=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null),r.value&&(dn&&(r.value.removeEventListener("wheel",dn),dn=null),Gt&&(r.value.removeEventListener("click",Gt),Gt=null)),console.log("✅ 已清理所有定时器和事件监听器")};Ic(()=>{za()}),e({showMindMapPage:nt,cleanupIntervals:za});const ea=async(q,K,Q=null)=>{try{if(o.value){console.log("🔄 增量更新现有思维导图数据");try{const ye=De();if((Q==null?void 0:Q.isIncremental)&&o.value&&o.value.data){if(console.log("🔄 执行增量更新,避免完整重新渲染"),o.value.data.nodeData&&q.topic){const He=Object.values(o.value.data.nodeData)[0];if(He&&He.topic!==q.topic){He.topic=q.topic;const pe=r.value.querySelector(`[data-id="${He.id}"]`);if(pe){const Re=pe.querySelector(".topic-text");Re&&(Re.textContent=q.topic)}}}q.children&&q.children.length>0&&fi(q.children,o.value.data.nodeData),ye&&setTimeout(()=>{se(ye),console.log("📍 增量更新后恢复位置")},50)}else if(console.log("🔄 尝试增量更新替代完整更新"),o.value&&o.value.data&&o.value.data.nodeData){if(console.log("✅ 使用增量更新,避免页面空白"),o.value.data.nodeData&&q.topic){const He=Object.values(o.value.data.nodeData)[0];if(He&&He.topic!==q.topic){He.topic=q.topic;const pe=r.value.querySelector(`[data-id="${He.id}"]`);if(pe){const Re=pe.querySelector(".topic-text");Re&&(Re.textContent=q.topic)}}}q.children&&q.children.length>0&&fi(q.children,o.value.data.nodeData),ye&&setTimeout(()=>{se(ye),console.log("📍 优化增量更新后恢复位置")},50)}else{console.log("⚠️ 无法增量更新,执行完整更新");const He=String(p.value||""),pe=He&&He.startsWith("temp-")?He:`temp-${Date.now()}`,Re={nodeData:q,mindmapId:pe,id:pe,title:K||"AI生成中..."};(!He||!He.startsWith("temp-"))&&(p.value=pe,console.log("🆔 更新临时思维导图ID:",pe));const Pe=o.value.init(Re);ye&&setTimeout(()=>{se(ye),console.log("📍 完整更新后恢复位置")},100)}}catch(ye){console.error("❌ 更新思维导图数据失败:",ye)}}else{Ge(),await Ga();let ye=0;for(;!r.value&&ye<20;)await new Promise(Re=>setTimeout(Re,50)),await Ga(),ye++;if(!r.value){console.error("❌ 思维导图容器仍未准备好,跳过此次更新");return}o.value=new tr({el:r.value,direction:tr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!0,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,markdown:(Re,Pe)=>Re.includes("|")||Re.includes("**")||Re.includes("`")||Re.includes("#")||Re.includes("$")||Re.includes("![")?dl(Re):Re});const Me=`temp-${Date.now()}`,He={nodeData:q,mindmapId:Me,id:Me,title:K||"AI生成中..."};p.value=Me,console.log("🆔 设置临时思维导图ID:",Me);const pe=o.value.init(He);console.log("✅ 实时思维导图实例创建成功"),Ji(),ve()}}catch(ye){console.error("❌ 实时更新思维导图失败:",ye)}},fi=(q,K)=>{try{q.forEach(Q=>{const ye=Li(K,Q.id);if(ye){if(Q.topic&&ye.topic!==Q.topic){ye.topic=Q.topic;const Me=r.value.querySelector(`[data-id="${Q.id}"]`);if(Me){const He=Me.querySelector(".topic-text");if(He)if(Q.topic.includes("|")||Q.topic.includes("**")||Q.topic.includes("`")||Q.topic.includes("#")||Q.topic.includes("![")){const pe=dl(Q.topic);He.innerHTML=pe}else He.textContent=Q.topic}}Q.children&&Q.children.length>0&&fi(Q.children,K)}else console.log("🆕 检测到新节点,需要添加到现有结构:",Q.id)})}catch(Q){console.error("❌ 增量更新节点失败:",Q)}},Li=(q,K)=>{if(!q)return null;for(const Q in q){const ye=q[Q];if(ye.id===K)return ye;if(ye.children){const Me=Li(ye.children,K);if(Me)return Me}}return null};return(q,K)=>(Xt(),Yt("div",{class:zo(["mindmap-container",{"is-editing":y.value}])},[b.value?(Xt(),Yt("div",BA,[Ie("div",{class:zo(["welcome-content",{"ai-sidebar-collapsed":g.value}])},[...K[7]||(K[7]=[H1('<div class="welcome-header" data-v-b3026d66><h1 data-v-b3026d66>🧠 思维导图工具</h1><p class="welcome-subtitle" data-v-b3026d66>可视化您的想法,构建知识体系</p></div><div class="welcome-features" data-v-b3026d66><div class="feature-item" data-v-b3026d66><div class="feature-icon" data-v-b3026d66>🎯</div><div class="feature-text" data-v-b3026d66><h3 data-v-b3026d66>智能AI生成</h3><p data-v-b3026d66>上传文档,AI自动生成思维导图结构</p></div></div><div class="feature-item" data-v-b3026d66><div class="feature-icon" data-v-b3026d66>✏️</div><div class="feature-text" data-v-b3026d66><h3 data-v-b3026d66>灵活编辑</h3><p data-v-b3026d66>拖拽节点,自由调整思维导图布局</p></div></div><div class="feature-item" data-v-b3026d66><div class="feature-icon" data-v-b3026d66>💾</div><div class="feature-text" data-v-b3026d66><h3 data-v-b3026d66>云端存储</h3><p data-v-b3026d66>自动保存,多设备同步访问</p></div></div></div><div class="welcome-tips" data-v-b3026d66><p data-v-b3026d66>💡 提示:使用左侧AI侧边栏可以快速生成思维导图内容</p></div>',3)])],2)])):ei("",!0),m.value?(Xt(),Yt("div",{key:1,class:"ai-input-area",style:ms(c.value)},[Ie("div",{class:"ai-input-header"},[K[8]||(K[8]=Ie("span",{class:"ai-input-title"},"🤖 询问AI",-1)),Ie("button",{onClick:Be,class:"ai-close-btn"},"×")]),Ie("div",FA,[Z0(Ie("textarea",{"onUpdate:modelValue":K[0]||(K[0]=Q=>w.value=Q),placeholder:"请输入您的问题...",rows:"2",disabled:S.value,onKeydown:[$d(Jo(Ue,["exact"]),["enter"]),$d(Jo(Oe,["ctrl"]),["enter"]),$d(Jo(Oe,["meta"]),["enter"])]},null,40,qA),[[Wp,w.value]]),Ie("div",jA,[Ie("button",{onClick:Be,class:"btn-cancel",disabled:S.value}," 取消 ",8,$A),Ie("button",{onClick:Oe,class:"btn-submit",disabled:!w.value.trim()||S.value},[S.value?(Xt(),Yt("span",VA,"AI思考中...")):(Xt(),Yt("span",WA,"询问AI"))],8,UA)])])],4)):ei("",!0),b.value?ei("",!0):(Xt(),Yt("div",{key:2,ref_key:"mindmapEl",ref:r,class:"mindmap-el"},null,512)),b.value?ei("",!0):(Xt(),Yt("div",GA,[Ie("button",{onClick:rr,class:"save-btn",title:"保存思维导图",style:{display:"none"}},[...K[9]||(K[9]=[Ie("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Ie("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),Ie("polyline",{points:"17,21 17,13 7,13 7,21"}),Ie("polyline",{points:"7,3 7,8 15,8"})],-1),Ie("span",null,"保存",-1)])]),Ie("button",{onClick:Zo,class:"refresh-btn",title:"刷新思维导图",style:{display:"none"}},[...K[10]||(K[10]=[Ie("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Ie("path",{d:"M1 4v6h6"}),Ie("path",{d:"M23 20v-6h-6"}),Ie("path",{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"})],-1),Ie("span",null,"刷新",-1)])])])),l.value?(Xt(),Yt("div",{key:4,class:"context-menu",style:ms(h.value)},[l.value.parentId||l.value.parent?(Xt(),Yt("div",{key:0,class:"context-menu-item",onClick:Fe,title:"Add a sibling card"},[...K[11]||(K[11]=[Ie("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Ie("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.9001 4.5C9.9001 5.74264 8.89274 6.75 7.6501 6.75C6.64263 6.75 5.78981 6.08785 5.5031 5.175H2.7001V11.025H5.4001V9.9C5.4001 8.90589 6.11644 8.1 7.0001 8.1H15.0501C15.9338 8.1 16.6501 8.90589 16.6501 9.9V13.95C16.6501 14.9441 15.9338 15.75 15.0501 15.75H7.0001C6.11644 15.75 5.4001 14.9441 5.4001 13.95V12.375H2.2501C1.75304 12.375 1.3501 11.7471 1.3501 11.475V4.725C1.3501 4.22794 1.75304 3.825 2.2501 3.825H5.5031C5.78981 2.91215 6.64263 2.25 7.6501 2.25C8.89274 2.25 9.9001 3.25736 9.9001 4.5ZM15.0501 9.9H7.0001V13.95H15.0501V9.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])])):ei("",!0),Ie("div",{class:"context-menu-item",onClick:Ae,title:"Add a child card"},[...K[12]||(K[12]=[Ie("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Ie("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9501 6.63691H8.35014V11.3619H15.9501V6.63691ZM8.35014 4.83691C7.46649 4.83691 6.75014 5.6428 6.75014 6.63691V8.32441H4.84719C4.56048 7.41157 3.70766 6.74941 2.7002 6.74941C1.45755 6.74941 0.450195 7.75677 0.450195 8.99941C0.450195 10.2421 1.45755 11.2494 2.7002 11.2494C3.70766 11.2494 4.56048 10.5873 4.84719 9.67441H6.75014V11.3619C6.75014 12.356 7.46649 13.1619 8.35014 13.1619H15.9501C16.8338 13.1619 17.5501 12.356 17.5501 11.3619V6.63691C17.5501 5.6428 16.8338 4.83691 15.9501 4.83691H8.35014Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),Ie("div",{class:"context-menu-item",onClick:$n,title:"Copy text"},[...K[13]||(K[13]=[Ie("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Ie("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.4503 2.99952C16.4016 2.18908 15.7289 1.54688 14.9062 1.54688H6.46875L6.37452 1.5497C5.56408 1.5984 4.92188 2.27108 4.92188 3.09375V3.54688C4.92188 3.68495 5.0338 3.79688 5.17188 3.79688H6.35938C6.49745 3.79688 6.60938 3.68495 6.60938 3.54688V3.375L6.61309 3.34276C6.62766 3.28063 6.68343 3.23438 6.75 3.23438H14.625L14.6572 3.23809C14.7261 3.23438 14.7656 3.30029 14.7656 3.375V11.25L14.7619 11.2822C14.7473 11.3444 14.6916 11.3906 14.625 11.3906H14.4531C14.3151 11.3906 14.2031 11.5026 14.2031 11.6406V12.8281C14.2031 12.9662 14.3151 13.0781 14.4531 13.0781H14.9062L15.0005 13.0753C15.8109 13.0266 16.4531 12.3539 16.4531 11.5312V3.09375L16.4503 2.99952ZM11.5312 4.92188H3.09375C2.23943 4.92188 1.54688 5.61443 1.54688 6.46875V14.9062C1.54688 15.7606 2.23943 16.4531 3.09375 16.4531H11.5312C12.3856 16.4531 13.0781 15.7606 13.0781 14.9062V6.46875C13.0781 5.61443 12.3856 4.92188 11.5312 4.92188ZM3.37032 6.615H11.2635C11.3361 6.615 11.395 6.6739 11.395 6.74655V14.6397C11.395 14.7124 11.3361 14.7712 11.2635 14.7712H3.37032C3.29767 14.7712 3.23877 14.7124 3.23877 14.6397V6.74655C3.23877 6.6739 3.29767 6.615 3.37032 6.615ZM4.5 8.5C4.5 8.27909 4.67909 8.1 4.9 8.1H9.725C9.94591 8.1 10.125 8.27909 10.125 8.5V9.5C10.125 9.72091 9.94591 9.9 9.725 9.9H4.9C4.67909 9.9 4.5 9.72091 4.5 9.5V8.5ZM4.9 11.475C4.67909 11.475 4.5 11.6541 4.5 11.875V12.875C4.5 13.0959 4.67909 13.275 4.9 13.275H9.725C9.94591 13.275 10.125 13.0959 10.125 12.875V11.875C10.125 11.6541 9.94591 11.475 9.725 11.475H4.9Z",fill:"currentColor","fill-opacity":"1"})],-1)])]),Ie("div",{class:"context-menu-item ask-ai",onClick:Xe,title:"Ask AI"},[...K[14]||(K[14]=[H1('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-b3026d66><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" data-v-b3026d66></path><path d="M13 8H7" data-v-b3026d66></path><path d="M17 12H7" data-v-b3026d66></path><circle cx="17" cy="8" r="1" data-v-b3026d66></circle></svg>',1)])]),Ie("div",{class:"context-menu-item delete",onClick:Ke,title:"Delete"},[...K[15]||(K[15]=[Ie("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[Ie("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z",fill:"currentColor"}),Ie("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z",fill:"currentColor"})],-1)])])],4)):ei("",!0),k.value?(Xt(),Yt("div",{key:5,class:"image-preview-modal",onClick:Ne},[Ie("div",{class:"image-preview-content",onClick:K[1]||(K[1]=Jo(()=>{},["stop"]))},[Ie("div",KA,[Ie("span",XA,ti(T.value),1),Ie("button",{onClick:Ne,class:"image-preview-close"},"×")]),Ie("div",ZA,[A.value?(Xt(),Yt("div",YA,[...K[16]||(K[16]=[Ie("div",{class:"loading-spinner"},null,-1),Ie("p",null,"加载图片中...",-1)])])):M.value?(Xt(),Yt("div",JA,[K[17]||(K[17]=Ie("p",null,"❌ 图片加载失败",-1)),Ie("p",null,ti(M.value),1),Ie("button",{onClick:oe,class:"retry-button"},"重试")])):(Xt(),Yt("img",{key:2,src:C.value,alt:T.value,class:"preview-image",onLoad:Ut,onError:Nt},null,40,QA))])])])):ei("",!0),y.value?(Xt(),Yt("div",{key:6,class:"rich-editor-modal",onClick:Qe},[Ie("div",{class:"rich-editor-content",onClick:K[2]||(K[2]=Jo(()=>{},["stop"]))},[Ie("div",{class:"rich-editor-header"},[K[18]||(K[18]=Ie("span",{class:"rich-editor-title"},"编辑节点",-1)),Ie("button",{onClick:Qe,class:"rich-close-btn",title:"关闭 (ESC)"},"×")]),Ie("div",eM,[Ie("div",{ref_key:"vditorContainer",ref:de,class:"vditor-container"},null,512)]),Ie("div",{class:"rich-editor-footer"},[Ie("button",{onClick:Qe,class:"rich-cancel-btn"},"取消"),Ie("button",{onClick:Rt,class:"rich-save-btn"},"保存")])])])):ei("",!0),te.value?(Xt(),Yt("div",{key:7,class:"delete-confirm-modal",onClick:K[6]||(K[6]=(...Q)=>q.cancelDeleteImage&&q.cancelDeleteImage(...Q))},[Ie("div",{class:"delete-confirm-content",onClick:K[5]||(K[5]=Jo(()=>{},["stop"]))},[K[19]||(K[19]=Ie("div",{class:"delete-confirm-header"},[Ie("h3",null,"确认删除")],-1)),K[20]||(K[20]=Ie("div",{class:"delete-confirm-body"},[Ie("p",null,"确定要删除这张图片吗?"),Up("image.png "),Ie("p",{class:"delete-warning"},"删除后无法恢复")],-1)),Ie("div",tM,[Ie("button",{onClick:K[3]||(K[3]=(...Q)=>q.cancelDeleteImage&&q.cancelDeleteImage(...Q)),class:"cancel-btn"},"取消"),Ie("button",{onClick:K[4]||(K[4]=(...Q)=>q.confirmDeleteImage&&q.confirmDeleteImage(...Q)),class:"confirm-btn"},"确定删除")])])])):ei("",!0)],2))}},rM=Gp(nM,[["__scopeId","data-v-b3026d66"]]),iM="modulepreload",aM=function(t){return"/"+t},u4={},d4=function(e,n,r){if(!n||n.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(n.map(l=>{if(l=aM(l),l in u4)return;u4[l]=!0;const h=l.endsWith(".css"),c=h?'[rel="stylesheet"]':"";if(!!r)for(let b=o.length-1;b>=0;b--){const g=o[b];if(g.href===l&&(!h||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":iM,h||(v.as="script",v.crossOrigin=""),v.href=l,document.head.appendChild(v),h)return new Promise((b,g)=>{v.addEventListener("load",b),v.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e()).catch(l=>{const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=l,window.dispatchEvent(h),!h.defaultPrevented)throw l})};const oM={class:"ai-sidebar-wrapper"},sM=["title"],lM={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},cM={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},uM={class:"sidebar-content"},dM={class:"section"},hM={class:"input-group"},pM={key:0,class:"file-info"},fM={class:"file-details"},mM={class:"file-info-left"},gM={class:"file-name"},vM={class:"file-size"},bM={class:"button-group file-action-buttons"},yM=["disabled"],wM={key:0},xM={key:1},kM={key:0,class:"section"},SM={class:"history-list"},EM=["onClick"],TM={class:"history-title"},AM={class:"history-time"},MM={class:"section"},CM={class:"input-group"},LM={class:"button-group"},_M=["disabled"],NM={key:0},DM={key:1},RM={class:"section"},IM={key:0,class:"processing-status"},OM={class:"result-container"},HM={class:"json-result"},PM={class:"button-group"},zM=["disabled"],BM={__name:"AISidebar",emits:["start-realtime-generation"],setup(t,{emit:e}){const n=e,r=yt(!1),o=yt(""),l=yt(""),h=yt(""),c=yt(!1),p=yt(!1),v=yt([]),b=yt(!1);yt(""),yt("");const g=yt(!1),m=yt(""),x=yt(null),w=yt(null),S=()=>{r.value=!r.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:r.value}}))},k=he=>{const J=he.target.files[0];J&&(w.value=J,j("文件上传成功!","success"))},C=he=>{he.preventDefault(),b.value=!1;const J=he.dataTransfer.files;if(J.length>0){const ee=J[0],De=[".txt",".md",".doc",".docx",".pdf"],se="."+ee.name.split(".").pop().toLowerCase();De.includes(se)?(w.value=ee,j("文件拖拽上传成功!","success")):j("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},T=he=>{he.preventDefault(),b.value=!0},A=he=>{he.preventDefault(),b.value=!1},M=()=>{w.value=null,x.value&&(x.value.value="")},y=he=>{if(he===0)return"0 Bytes";const J=1024,ee=["Bytes","KB","MB","GB"],De=Math.floor(Math.log(he)/Math.log(J));return parseFloat((he/Math.pow(J,De)).toFixed(2))+" "+ee[De]},N=async()=>{if(!w.value){j("请先上传文件","error");return}c.value=!0,n("start-realtime-generation");try{const he=await z(w.value);l.value="";const J=`你是一个专业的文档分析专家。请分析上传的文档内容,生成结构化的Markdown格式思维导图。要求:
|
||
1. 提取主要主题和关键概念
|
||
2. 组织成层次分明的结构
|
||
3. 使用清晰的标题和子标题
|
||
4. 保持内容的逻辑性和完整性
|
||
5. 对于长文档,请确保完整处理所有内容,不要截断
|
||
6. **重要:如果原文档中包含图片,请按以下方式处理:
|
||
- 识别图片在文档中的位置和上下文
|
||
- 根据图片内容生成准确的描述文字
|
||
- 在相应位置插入图片占位符:
|
||
- 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符
|
||
- 确保图片占位符放在逻辑上合适的位置**
|
||
7. **重要:如果原文档中包含表格,请完整保留表格结构:
|
||
- 保持表格的Markdown格式
|
||
- 确保所有表格行都被包含
|
||
- 不要省略任何表格内容
|
||
- 对于合并单元格的表格,请使用HTML格式并正确使用rowspan和colspan属性
|
||
- 如果表格结构复杂,优先使用HTML table标签而不是Markdown表格语法**
|
||
8. **重要:确保内容完整性:
|
||
- 不要截断任何内容
|
||
- 保持原文的完整性
|
||
- 所有重要信息都要包含在思维导图中**
|
||
9. 输出格式:直接输出Markdown内容,不要添加任何说明文字或代码块标记`,ee=`请分析以下文档内容并生成结构化Markdown:
|
||
|
||
${he}`;await te(J,ee),await Ce(),Rt(w.value.name,l.value),setTimeout(async()=>{try{await Qe()}catch(De){console.error("自动保存失败:",De)}},1500)}catch(he){console.error("从文件生成Markdown失败:",he),j("生成失败: "+he.message,"error")}finally{c.value=!1}},z=he=>new Promise(async(J,ee)=>{try{const De=he.type.includes("text")||he.name.endsWith(".txt")||he.name.endsWith(".md"),se=he.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||he.type==="application/msword"||he.name.endsWith(".docx")||he.name.endsWith(".doc"),V=he.type==="application/pdf"||he.name.endsWith(".pdf");if(De){const Z=new FileReader;Z.onload=ve=>J(ve.target.result),Z.onerror=()=>ee(new Error("文本文件读取失败")),Z.readAsText(he)}else if(se){const Z=await F(he);J(Z)}else if(V){const Z=await P(he);J(Z)}else{const Z=new FileReader;Z.onload=ve=>J(ve.target.result),Z.onerror=()=>ee(new Error("文件读取失败")),Z.readAsText(he)}}catch(De){ee(De)}}),F=async he=>{try{if(he.name.endsWith(".docx")){const J=await d4(()=>import("./index-4b3889f4.js").then(se=>se.i),[]),ee=await he.arrayBuffer();return(await J.extractRawText({arrayBuffer:ee})).value}else if(he.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式,或安装相应的解析库")}catch(J){throw new Error(`Office文档解析失败: ${J.message}`)}},P=async he=>{try{const J=await d4(()=>import("./pdf-215237d8.js"),[]);J.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const ee=await he.arrayBuffer(),De=await J.getDocument({data:ee}).promise;let se="";for(let V=1;V<=De.numPages;V++){const le=(await(await De.getPage(V)).getTextContent()).items.map(we=>we.str).join(" ");se+=le+`
|
||
`}return se}catch(J){throw new Error(`PDF文件解析失败: ${J.message}`)}},Y=he=>he&&he.replace(/^好的[,,]?作为.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^好的[,,]?作为.*?专业的.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^以下是.*?结构化的.*?思维导图[::]\s*/i,"").replace(/^以下是.*?Markdown.*?思维导图[::]\s*/i,"").replace(/^以下是.*?Markdown.*?格式.*?思维导图[::]\s*/i,"").replace(/^```(?:markdown)?\s*/gm,"").replace(/```\s*$/gm,"").replace(/^「」`markdown\s*/gm,"").replace(/^「」`\s*/gm,"").replace(/^\s*「」`markdown\s*/gm,"").replace(/^\s*「」`\s*/gm,"").replace(/^作为.*?专家[,,]?我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^我已.*?分析.*?内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^根据.*?文档内容.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^基于.*?文档.*?生成了以下.*?思维导图[::]\s*/i,"").replace(/^以下是.*?分析.*?结果[::]\s*/i,"").replace(/^以下是.*?整理.*?结果[::]\s*/i,"").replace(/^以下是.*?结构化.*?内容[::]\s*/i,"").replace(/\n{3,}/g,`
|
||
|
||
`).trim(),te=async(he,J)=>{const De=he||`你是一位Markdown格式转换专家。你的任务是将用户提供的文章内容精确转换为结构化的Markdown格式。请遵循以下步骤:
|
||
|
||
提取主标题: 识别文章最顶层的主标题(通常为文章题目或书名),并使用Markdown的 # 级别表示。
|
||
|
||
识别层级标题: 从文章内容中提取所有层级的内容标题(从主标题后的第一个标题开始,Level 1 至 Level 4)。判断层级依据:
|
||
|
||
视觉与结构特征: 如独立成行/段、位置(行首)、格式(加粗、编号如 1., 1.1, (1), - 等)。
|
||
|
||
语义逻辑: 标题之间的包含和并列关系。
|
||
|
||
在Markdown中,使用相应标题级别:
|
||
|
||
Level 1 标题用 ##
|
||
|
||
Level 2 标题用 ###
|
||
|
||
Level 3 标题用 ####
|
||
|
||
Level 4 标题用 #####
|
||
|
||
精确保留原文标题文字,不得修改、概括或润色。
|
||
|
||
处理正文内容: 对于每个标题下的正文内容区块(从该标题后开始,直到下一个同级或更高级别标题前):
|
||
|
||
直接保留原文文本,但根据内容结构适当格式化为Markdown。
|
||
|
||
如果内容是列表(如项目符号或编号列表),使用Markdown列表语法(例如 - 用于无序列表,1. 用于有序列表)。
|
||
|
||
保持段落和换行不变。
|
||
|
||
**重要:如果原文档中包含图片,请按以下方式处理:
|
||
1. 识别图片在文档中的位置和上下文
|
||
2. 根据图片内容生成准确的描述文字
|
||
3. 在相应位置插入图片占位符:
|
||
4. 图片描述要准确反映图片内容,图片路径可以是相对路径或占位符
|
||
5. 确保图片占位符放在逻辑上合适的位置**
|
||
|
||
输出格式: 输出必须是纯Markdown格式的文本,不得包含任何额外说明、JSON或非Markdown元素。确保输出与示例风格一致。直接输出Markdown内容,不要添加任何说明文字。`,se=J||"请将以下内容转换为结构化的Markdown格式:";try{const V=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:De,user_prompt:se,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!V.ok)throw new Error(`HTTP error! status: ${V.status}`);const Z=V.body.getReader(),ve=new TextDecoder;let le="",we=0;for(;;){const{done:Ae,value:Fe}=await Z.read();if(Ae)break;le+=ve.decode(Fe,{stream:!0});const Ke=le.split(`
|
||
`);le=Ke.pop()||"";for(const Xe of Ke)if(Xe.startsWith("data: "))try{const Be=JSON.parse(Xe.slice(6));if(Be.type==="start")j("AI开始生成内容...","info");else if(Be.type==="chunk"){if(we++,l.value+=Be.content,we%15===0&&l.value.length>100)try{const ot=Y(l.value);if(ot.length<10||!ot.includes("#")){console.log("⚠️ 内容还不够完整,跳过此次转换"),console.log("⚠️ 内容长度:",ot.length),console.log("⚠️ 内容预览:",ot.substring(0,200));return}console.log("🔍 准备转换的内容长度:",ot.length),console.log("🔍 准备转换的内容预览:",ot.substring(0,500)),console.log("🔍 内容是否包含标题:",ot.includes("#")),console.log("🔍 内容行数:",ot.split(`
|
||
`).length);const Ue=await Ne(ot);if(!Ue||!Ue.topic){console.log("⚠️ 转换结果无效,跳过此次更新"),console.log("🔍 转换结果详情:",Ue),console.log("🔍 内容长度:",ot.length),console.log("🔍 内容预览:",ot.substring(0,200));return}h.value=JSON.stringify(Ue,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:Ue,title:Ue.topic||"AI生成中...",source:"ai-streaming",chunkCount:we,isIncremental:!0}}))}catch(ot){if(console.warn("⚠️ 实时转换JSON失败:",ot.message),console.warn("⚠️ 当前内容长度:",l.value.length),console.warn("⚠️ 当前内容预览:",l.value.substring(0,200)),l.value.length>50)try{const Ue=je(l.value);window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:Ue,title:"AI生成中...",source:"ai-streaming-fallback",chunkCount:we,isIncremental:!0}}))}catch(Ue){console.warn("⚠️ 回退处理也失败:",Ue)}}}else if(Be.type==="end")try{const ot=Y(l.value),Ue=qe(ot),Oe=await Ne(ot);h.value=JSON.stringify(Oe,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:Oe,title:Oe.topic||"AI生成完成",source:"ai-final",chunkCount:we}})),setTimeout(()=>{window.dispatchEvent(new CustomEvent("save-preview-to-database",{detail:{data:Oe,title:Oe.topic||"AI生成思维导图",source:"ai-generated",timestamp:Date.now()}}))},2e3),j("AI内容生成完成!正在保存到数据库...","success")}catch(ot){console.error("⚠️ 最终处理失败:",ot),console.error("⚠️ 错误详情:",ot.message);try{const Ue=je(l.value);h.value=JSON.stringify(Ue,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:Ue,title:"AI生成完成(简化版)",source:"ai-final-fallback",chunkCount:we}})),setTimeout(()=>{window.dispatchEvent(new CustomEvent("save-preview-to-database",{detail:{data:Ue,title:Ue.topic||"AI生成思维导图(回退)",source:"ai-final-fallback",timestamp:Date.now()}}))},2e3),j("AI内容生成完成(简化版)!正在保存到数据库...","success")}catch(Ue){console.error("⚠️ 回退处理也失败:",Ue),j("AI内容生成完成,但格式处理遇到问题","warning")}}else if(Be.type==="error")throw new Error(Be.content)}catch(Be){console.warn("解析流式数据失败:",Be)}}}catch(V){throw console.error("流式AI API调用失败:",V),V}},de=he=>{if(he.includes("|")&&he.includes("-")){const J=he.split(`
|
||
`);let ee=!1,De=!1;for(const se of J){const V=se.trim();V.includes("|")&&V.split("|").length>=3&&(ee=!0),V.includes("|")&&V.includes("-")&&/^[\s\|\-\:]+$/.test(V)&&(De=!0)}if(ee&&De)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),he}return he.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(J,ee)=>{if(ee.includes(":")){const De=ee.split(":");if(De.length>1)return`【${De[0]}】: ${De.slice(1).join(":")}`}return`【${ee}】`}).replace(/\*(.*?)\*/g,"《$1》").replace(/^- (.*$)/gim," • $1").replace(/^\d+\. (.*$)/gim," $&").replace(/```(.*?)```/gims,"💻 $1").replace(/`(.*?)`/g,"「$1」").replace(/\[([^\]]+)\]\([^)]+\)/g,"🔗 $1").replace(/\n\n/g,`
|
||
`).replace(/\n/g,`
|
||
`).split(`
|
||
`).map(J=>J.length>80?J.substring(0,77)+"...":J).join(`
|
||
`).trim()},Ce=async()=>{if(!l.value.trim()){j("请输入Markdown内容","error");return}p.value=!0;try{const he=Y(l.value),J=Ne(he);h.value=JSON.stringify(J,null,2)}catch(he){console.error("转换失败:",he),j("转换失败,请检查Markdown格式","error")}finally{p.value=!1}},qe=he=>{const J=/!\[([^\]]*)\]\(([^)]*)\)/g,ee=[];let De;for(;(De=J.exec(he))!==null;){let se=De[2];const V=De[1]||"";if(console.log(`🔍 发现图片匹配: alt="${V}", url="${se}"`),se&&se.trim()){if(se=se.trim(),se.endsWith("...")||se.endsWith("..")||se.length<10){console.log(`⚠️ 检测到不完整的图片URL: ${se}`);continue}se.startsWith("http")||se.startsWith("data:")||se.startsWith("/")||se.startsWith("./")?(ee.push({alt:V,url:se,fullMatch:De[0]}),console.log(`✅ 有效图片URL: ${se}`)):console.warn(`⚠️ 跳过格式不支持的图片URL: ${se}`)}else console.warn("⚠️ 跳过空的图片URL")}return console.log(`🔍 从内容中提取到 ${ee.length} 张图片:`,ee),ee},Ge=he=>{if(!he)return"";let J=he.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"");return J=J.replace(/\n{3,}/g,`
|
||
|
||
`),J.trim()},nt=he=>{if(!he)return"";let J=he;J=J.replace(/!\[([^\]]*)\]\(([^)]*\.\.\.?)\)/g,""),J=J.replace(/!\[([^\]]*)\]\(([^)]*)\)/g,(V,Z,ve)=>!ve||ve.length<10||ve.endsWith("...")||ve.endsWith("..")?(console.log("🔧 移除不完整的图片引用:",V),""):V);const ee=J.split(`
|
||
`);let De=!1;for(const V of ee)if(V.trim().match(/^#{1,6}\s+.+/)){De=!0;break}if(!De&&ee.length>0){const V=ee[0].trim();V&&!V.startsWith("#")&&V.length>0&&(J=`# ${V}
|
||
|
||
${ee.slice(1).join(`
|
||
`)}`,console.log("🔧 修复:将第一行转换为标题"))}J=J.replace(/^[-*+]\s*$/gm,"");const se=J.match(/```/g);return se&&se.length%2===1&&(J+="\n```",console.log("🔧 修复:添加缺失的代码块闭合标记")),J=J.replace(/\*\*([^*]*)$/,"**$1**"),J=J.replace(/\*([^*]*)$/,"*$1*"),J=J.replace(/\n{3,}/g,`
|
||
|
||
`),J&&!J.endsWith(`
|
||
`)&&(J+=`
|
||
`),console.log("🔧 预处理完成,原始长度:",he.length,"处理后长度:",J.length),J},je=he=>{if(!he)return{id:"root",topic:"AI生成中...",children:[{id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}]};const J=he.split(`
|
||
`).filter(V=>V.trim());let ee="AI生成中...";for(const V of J){const Z=V.trim();if(Z.startsWith("#")){ee=Z.replace(/^#+\s*/,"").trim();break}else if(Z.length>5&&!Z.startsWith("```")&&!Z.startsWith("**")){ee=Z.substring(0,30)+(Z.length>30?"...":"");break}}const De=J.filter(V=>{const Z=V.trim();return Z.length>10&&!Z.startsWith("#")&&!Z.startsWith("```")&&!Z.startsWith("**")&&!Z.startsWith("- ")&&!Z.startsWith("* ")&&!Z.startsWith("+ ")}),se=[];return De.slice(0,3).forEach((V,Z)=>{const ve=V.trim().substring(0,50);ve&&se.push({id:`node_${Z+1}`,topic:ve+(V.trim().length>50?"...":""),children:[],level:1,data:{},expanded:!0})}),se.length===0&&se.push({id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}),{id:"root",topic:ee,children:se}},Ne=async he=>{try{if(!he||typeof he!="string")throw new Error("Markdown内容为空或格式错误");const ee=nt(he).split(`
|
||
`);let De=null;const se=[];let V=0,Z=[];for(let we=0;we<ee.length;we++){const Fe=ee[we].trim(),Ke=Fe.match(/^(#{1,6})\s+(.+)$/);if(Ke){if(Z.length>0&&se.length>0){const mt=Z.join(`
|
||
`).trim();if(mt){const Ct={id:`node_${V++}`,topic:mt,children:[],level:(se[se.length-1].level||0)+1,data:{},expanded:!0};se[se.length-1].children.push(Ct)}Z=[]}const Xe=Ke[1].length,Be=Ke[2].trim(),ot=qe(Be),Ue=Ge(de(Be));ot.length>0&&console.log(`🖼️ 在标题中发现 ${ot.length} 张图片: ${Be}`);const Oe={id:`node_${V++}`,topic:Ue,children:[],level:Xe,data:{},expanded:!0};if(ot.length>0){const mt=ot[0];if(mt.url&&mt.url.trim()!==""){let Ct=mt.url;Ct.includes("cdn-mineru.openxlab.org.cn")&&(Ct=`/proxy-image${Ct.replace("https://cdn-mineru.openxlab.org.cn","")}`);const Vt=``;Oe.topic=Ue||"图片节点",Oe.dangerouslySetInnerHTML=Vt,console.log(`✅ 成功为标题节点设置图片Markdown: ${Vt}`)}else console.error("❌ 标题图片URL无效:",mt)}if(Xe===1&&!De)De=Oe,se.length=0,se.push(De);else{for(;se.length>1&&se[se.length-1].level>=Xe;)se.pop();se.length>0&&se[se.length-1].children.push(Oe),se.push(Oe)}}else Fe&&Z.push(Fe)}if(Z.length>0&&se.length>0){const we=Z.join(`
|
||
`).trim();if(we){we.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",we.substring(0,200)+"...");const Ae={id:`node_${V++}`,topic:we,children:[],level:(se[se.length-1].level||0)+1,data:{},expanded:!0};se[se.length-1].children.push(Ae)}}De||(console.warn("⚠️ 没有找到根节点,创建默认结构"),console.log("🔍 原因分析:"),console.log("- Markdown内容长度:",he.length),console.log("- 是否包含标题(#):",he.includes("#")),console.log("- 前几行内容:",he.split(`
|
||
`).slice(0,5)),De={id:"root",topic:"根节点",children:[],data:{},expanded:!0});const ve=we=>{let Ae=1;return we.children&&we.children.forEach(Fe=>{Ae+=ve(Fe)}),Ae},le=ve(De);return console.log("🔍 markdownToJSON返回结果:"),console.log("- 根节点ID:",De.id),console.log("- 根节点topic:",De.topic),console.log("- 子节点数量:",De.children?De.children.length:0),console.log("- 总节点数:",le),De}catch(J){return console.error("❌ Markdown转JSON失败:",J),console.error("❌ 错误详情:",J.message),console.error("❌ 输入内容长度:",(he==null?void 0:he.length)||0),console.error("❌ 输入内容预览:",(he==null?void 0:he.substring(0,200))||"无内容"),je(he||"")}},tt=async()=>{if(!l.value){j("没有Markdown内容可复制","error");return}try{await navigator.clipboard.writeText(l.value),j("Markdown已复制到剪贴板","success")}catch{const J=document.createElement("textarea");J.value=l.value,document.body.appendChild(J),J.select(),document.execCommand("copy"),J.remove(),j("Markdown已复制到剪贴板","success")}},lt=async()=>{try{await navigator.clipboard.writeText(h.value),j("JSON已复制到剪贴板","success")}catch(he){console.error("复制失败:",he),j("复制失败","error")}},Qe=async()=>{if(!h.value){j("请先生成或转换JSON数据","error");return}try{const he=JSON.parse(h.value),J=he.topic||he.title||`AI生成的思维导图_${new Date().toLocaleString()}`,ee=new CustomEvent("save-preview-to-database",{detail:{data:he,title:J,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(ee),setTimeout(()=>{j("思维导图已保存成功!","success"),w.value=null,x.value&&(x.value.value="")},2e3)}catch(he){console.error("JSON解析失败:",he),j("JSON格式错误,请检查数据","error")}},j=(he,J="info")=>{const ee=document.createElement("div");switch(ee.className=`notification notification-${J}`,ee.textContent=he,ee.style.cssText=`
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
padding: 12px 20px;
|
||
border-radius: 8px;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
z-index: 10000;
|
||
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
||
animation: slideIn 0.3s ease;
|
||
max-width: 300px;
|
||
word-wrap: break-word;
|
||
`,J){case"success":ee.style.background="#4CAF50",ee.style.color="white";break;case"error":ee.style.background="#f44336",ee.style.color="white";break;case"info":default:ee.style.background="#2196F3",ee.style.color="white";break}if(!document.querySelector("#notification-styles")){const De=document.createElement("style");De.id="notification-styles",De.textContent=`
|
||
@keyframes slideIn {
|
||
from { transform: translateX(100%); opacity: 0; }
|
||
to { transform: translateX(0); opacity: 1; }
|
||
}
|
||
@keyframes slideOut {
|
||
from { transform: translateX(0); opacity: 1; }
|
||
to { transform: translateX(100%); opacity: 0; }
|
||
}
|
||
`,document.head.appendChild(De)}document.body.appendChild(ee),setTimeout(()=>{ee.style.animation="slideOut 0.3s ease",setTimeout(()=>{ee.parentNode&&ee.parentNode.removeChild(ee)},300)},3e3)},Ht=()=>{l.value="",h.value="",j("内容已清空","info")},Rt=(he,J,ee=null)=>{const De={title:he,content:J,mindmapId:ee,timestamp:new Date};v.value.unshift(De),v.value.length>10&&(v.value=v.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))},Ut=async he=>{he.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:he.mindmapId,title:he.title}})):(l.value=he.content,await Ce(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:he.content,json:h.value,title:he.title}})))},Nt=he=>new Date(he).toLocaleString("zh-CN");Fp(()=>{const he=localStorage.getItem("ai-sidebar-history");if(he)try{v.value=JSON.parse(he)}catch(J){console.error("加载历史记录失败:",J)}window.addEventListener("add-to-history",J=>{const{title:ee,content:De,timestamp:se}=J.detail;Rt(ee,De,null)}),window.addEventListener("mindmap-saved",J=>{const{mindmapId:ee,title:De,timestamp:se}=J.detail,V=v.value.find(Z=>Z.title===De||Z.timestamp&&Math.abs(Z.timestamp-se)<5e3);V?(V.mindmapId=ee,localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))):Rt(De,"",ee)}),Sl(o,(J,ee)=>{}),Sl(l,(J,ee)=>{})});const oe=async()=>{try{const he=await fetch("http://127.0.0.1:8000/api/ai/test-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({test:"data"})});if(!he.ok)throw new Error(`HTTP error! status: ${he.status}`);const J=he.body.getReader(),ee=new TextDecoder;let De="";for(;;){const{done:se,value:V}=await J.read();if(se)break;De+=ee.decode(V,{stream:!0});const Z=De.split(`
|
||
`);De=Z.pop()||"";for(const ve of Z)if(ve.startsWith("data: "))try{const le=JSON.parse(ve.slice(6))}catch(le){console.warn("解析测试数据失败:",le)}}}catch(he){console.error("❌ 测试流式API失败:",he)}};return window.testStreamAPI=oe,Ic(()=>{}),(he,J)=>(Xt(),Yt("div",oM,[Ie("div",{class:"sidebar-toggle",onClick:S,title:r.value?"展开AI助手":"折叠AI助手",style:ms({left:r.value?"10px":"420px"})},[r.value?(Xt(),Yt("svg",lM,[...J[1]||(J[1]=[Ie("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(Xt(),Yt("svg",cM,[...J[2]||(J[2]=[Ie("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,sM),Ie("div",{class:zo(["ai-sidebar",{"sidebar-collapsed":r.value}])},[Z0(Ie("div",uM,[J[12]||(J[12]=Ie("div",{class:"sidebar-header"},[Ie("h3",null,"🤖 AI 助手"),Ie("p",null,"文档转思维导图工具"),Ie("div",{class:"collapse-hint"},[Ie("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),Ie("div",dM,[J[6]||(J[6]=Ie("h4",null,"📁 生成思维导图",-1)),Ie("div",hM,[J[4]||(J[4]=Ie("label",null,"上传文件:",-1)),Ie("div",{class:"file-upload-area",onDrop:C,onDragover:T,onDragleave:A},[Ie("input",{type:"file",ref_key:"fileInput",ref:x,onChange:k,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),Ie("div",{class:zo(["file-upload-placeholder",{"drag-over":b.value}])},[...J[3]||(J[3]=[Ie("span",{class:"upload-icon"},"📎",-1),Ie("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),Ie("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),w.value?(Xt(),Yt("div",pM,[Ie("div",fM,[Ie("div",mM,[Ie("span",gM,"📄 "+ti(w.value.name),1),Ie("span",vM,"("+ti(y(w.value.size))+")",1)]),Ie("button",{onClick:M,class:"btn-remove",title:"删除文件"},[...J[5]||(J[5]=[Ie("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Ie("path",{d:"M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M10 11v6M14 11v6"})],-1)])])])])):ei("",!0),Ie("div",bM,[Ie("button",{onClick:N,disabled:!w.value||c.value,class:"btn-primary"},[c.value?(Xt(),Yt("span",wM,"AI生成中...")):(Xt(),Yt("span",xM,"AI生成思维导图"))],8,yM)])]),v.value.length>0?(Xt(),Yt("div",kM,[J[7]||(J[7]=Ie("h4",null,"📚 历史记录",-1)),Ie("div",SM,[(Xt(!0),Yt(Ei,null,W4(v.value,(ee,De)=>(Xt(),Yt("div",{key:De,class:"history-item",onClick:se=>Ut(ee)},[Ie("div",TM,ti(ee.title),1),Ie("div",AM,ti(Nt(ee.timestamp)),1)],8,EM))),128))])])):ei("",!0),Ie("div",MM,[J[9]||(J[9]=Ie("h4",null,"📝 AI生成的Markdown结果",-1)),Ie("div",CM,[J[8]||(J[8]=Ie("label",null,"Markdown内容:",-1)),Z0(Ie("textarea",{"onUpdate:modelValue":J[0]||(J[0]=ee=>l.value=ee),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Wp,l.value]])]),Ie("div",LM,[Ie("button",{onClick:Ce,disabled:p.value,class:"btn-secondary"},[p.value?(Xt(),Yt("span",NM,"转换中...")):(Xt(),Yt("span",DM,"🔄 转换为JSON"))],8,_M),Ie("button",{onClick:Ht,class:"btn-clear"},"清空"),Ie("button",{onClick:tt,class:"btn-copy"},"📋 复制Markdown")])]),Ie("div",RM,[J[11]||(J[11]=Ie("h4",null,"📊 Markdown转JSON结果",-1)),g.value?(Xt(),Yt("div",IM,[J[10]||(J[10]=Ie("div",{class:"spinner"},null,-1)),Ie("span",null,ti(m.value),1)])):ei("",!0),Ie("div",OM,[Ie("pre",HM,ti(h.value||"JSON转换结果将显示在这里"),1),Ie("div",PM,[Ie("button",{onClick:lt,class:"btn-copy"},"📋 复制JSON"),Ie("button",{onClick:Qe,disabled:g.value,class:"btn-copy"},ti(g.value?"处理中...":"👁️ 预览"),9,zM)])])])],512),[[jb,!r.value]])],2)]))}},FM=Gp(BM,[["__scopeId","data-v-4edf6f37"]]);const qM={class:"markdown-test"},jM={class:"test-section"},$M={class:"test-section"},UM=["innerHTML"],VM={class:"test-section"},WM={class:"test-cases"},GM=["onClick"],KM={__name:"MarkdownTest",setup(t){const e=yt(`# 测试标题
|
||
|
||
这是一个**粗体**和*斜体*的测试。
|
||
|
||
## 表格测试
|
||
|
||
| 产品 | 价格 | 库存 |
|
||
|------|------|------|
|
||
| 苹果 | 4元 | 100个 |
|
||
| 香蕉 | 2元 | 50个 |
|
||
|
||
## 代码测试
|
||
|
||
\`\`\`javascript
|
||
function hello() {
|
||
console.log('Hello World!');
|
||
}
|
||
\`\`\`
|
||
|
||
行内代码:\`const name = 'test'\`
|
||
|
||
## 列表测试
|
||
|
||
- 项目1
|
||
- 项目2
|
||
- 子项目2.1
|
||
- 子项目2.2
|
||
- 项目3
|
||
|
||
## 链接测试
|
||
|
||
- [GitHub](https://github.com)
|
||
- [Vue.js](https://vuejs.org)`),n=yt([{name:"基础表格",content:`# 产品价格表
|
||
|
||
| 产品 | 价格 |
|
||
|------|------|
|
||
| 苹果 | 4元 |
|
||
| 香蕉 | 2元 |`},{name:"复杂表格",content:`# 技术栈对比
|
||
|
||
| 技术 | 前端 | 后端 | 数据库 |
|
||
|------|------|------|--------|
|
||
| Vue.js | ✅ | ❌ | ❌ |
|
||
| Django | ❌ | ✅ | ❌ |
|
||
| PostgreSQL | ❌ | ❌ | ✅ |`},{name:"代码块",content:`# 代码示例
|
||
|
||
\`\`\`javascript
|
||
function markdownToJSON(markdown) {
|
||
const lines = markdown.split('\\n');
|
||
// 处理逻辑...
|
||
return result;
|
||
}
|
||
\`\`\``},{name:"混合内容",content:`# 混合内容测试
|
||
|
||
这是一个包含**粗体**、*斜体*和\`行内代码\`的段落。
|
||
|
||
## 表格
|
||
|
||
| 功能 | 状态 | 说明 |
|
||
|------|------|------|
|
||
| 表格渲染 | ✅ | 支持markdown表格 |
|
||
| 代码高亮 | ✅ | 支持代码块 |
|
||
|
||
## 代码
|
||
|
||
\`\`\`python
|
||
def hello_world():
|
||
print("Hello, World!")
|
||
\`\`\``}]),r=fv(()=>{if(!e.value)return"";try{return m2(e.value)}catch(h){return`<div class="error">渲染失败: ${h.message}</div>`}}),o=()=>{},l=h=>{e.value=h.content};return(h,c)=>(Xt(),Yt("div",qM,[c[4]||(c[4]=Ie("h2",null,"Markdown渲染测试",-1)),Ie("div",jM,[c[1]||(c[1]=Ie("h3",null,"输入Markdown内容",-1)),Z0(Ie("textarea",{"onUpdate:modelValue":c[0]||(c[0]=p=>e.value=p),placeholder:"输入markdown内容...",rows:"10",class:"markdown-input"},null,512),[[Wp,e.value]])]),Ie("div",$M,[c[2]||(c[2]=Ie("h3",null,"渲染结果",-1)),Ie("div",{class:"rendered-content",innerHTML:r.value},null,8,UM)]),Ie("div",VM,[c[3]||(c[3]=Ie("h3",null,"测试用例",-1)),Ie("button",{onClick:o,class:"test-btn"},"加载测试用例"),Ie("div",WM,[(Xt(!0),Yt(Ei,null,W4(n.value,(p,v)=>(Xt(),Yt("button",{key:v,onClick:b=>l(p),class:"test-case-btn"},ti(p.name),9,GM))),128))])])]))}},XM=Gp(KM,[["__scopeId","data-v-68a00828"]]);const ZM={id:"app"},YM={class:"test-mode-toggle",style:{display:"none"}},JM={key:0,class:"test-mode"},QM={key:1},eC={class:"main-content"},tC={__name:"App",setup(t){const e=yt(null),n=yt(!1),r=()=>{n.value=!n.value},o=()=>{e.value&&e.value.showMindMapPage()};return(l,h)=>(Xt(),Yt("div",ZM,[h[0]||(h[0]=Up("« ",-1)),Ie("div",YM,[Ie("button",{onClick:r,class:"test-btn"},ti(n.value?"切换到思维导图":"测试Markdown渲染"),1)]),n.value?(Xt(),Yt("div",JM,[Zr(XM)])):(Xt(),Yt("div",QM,[Zr(FM,{onStartRealtimeGeneration:o}),Ie("div",eC,[Zr(rM,{ref_key:"mindMapRef",ref:e},null,512)])]))]))}};ly(tC).mount("#app");export{d4 as _,Bh as c,rC as g};
|