MindMap/frontend/dist/assets/index-54b52ca8.js

1743 lines
1.6 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Tb=Object.defineProperty;var Ab=(t,e,n)=>e in t?Tb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Sn=(t,e,n)=>(Ab(t,typeof e!="symbol"?e+"":e,n),n);function Mb(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in t)){const l=Object.getOwnPropertyDescriptor(r,a);l&&Object.defineProperty(t,a,l.get?l:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const l of a)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(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(a){if(a.ep)return;a.ep=!0;const l=n(a);fetch(a.href,l)}})();/**
* @vue/shared v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Jp(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const En={},gs=[],Fi=()=>{},G4=()=>!1,jc=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Qp=t=>t.startsWith("onUpdate:"),wr=Object.assign,ef=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},Cb=Object.prototype.hasOwnProperty,dn=(t,e)=>Cb.call(t,e),Ft=Array.isArray,vs=t=>$c(t)==="[object Map]",K4=t=>$c(t)==="[object Set]",Vt=t=>typeof t=="function",nr=t=>typeof t=="string",Eo=t=>typeof t=="symbol",Wn=t=>t!==null&&typeof t=="object",X4=t=>(Wn(t)||Vt(t))&&Vt(t.then)&&Vt(t.catch),Z4=Object.prototype.toString,$c=t=>Z4.call(t),Lb=t=>$c(t).slice(8,-1),Y4=t=>$c(t)==="[object Object]",tf=t=>nr(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,_l=Jp(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Uc=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},_b=/-(\w)/g,mo=Uc(t=>t.replace(_b,(e,n)=>n?n.toUpperCase():"")),Nb=/\B([A-Z])/g,To=Uc(t=>t.replace(Nb,"-$1").toLowerCase()),J4=Uc(t=>t.charAt(0).toUpperCase()+t.slice(1)),Gd=Uc(t=>t?`on${J4(t)}`:""),fo=(t,e)=>!Object.is(t,e),V0=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},Q4=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},Xh=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let X1;const Vc=()=>X1||(X1=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ts(t){if(Ft(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],a=nr(r)?Ib(r):Ts(r);if(a)for(const l in a)e[l]=a[l]}return e}else if(nr(t)||Wn(t))return t}const Db=/;(?![^(]*\))/g,Rb=/:([^]+)/,Ob=/\/\*[^]*?\*\//g;function Ib(t){const e={};return t.replace(Ob,"").split(Db).forEach(n=>{if(n){const r=n.split(Rb);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function Xo(t){let e="";if(nr(t))e=t;else if(Ft(t))for(let n=0;n<t.length;n++){const r=Xo(t[n]);r&&(e+=r+" ")}else if(Wn(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const Hb="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pb=Jp(Hb);function ev(t){return!!t||t===""}const tv=t=>!!(t&&t.__v_isRef===!0),Qi=t=>nr(t)?t:t==null?"":Ft(t)||Wn(t)&&(t.toString===Z4||!Vt(t.toString))?tv(t)?Qi(t.value):JSON.stringify(t,nv,2):String(t),nv=(t,e)=>tv(e)?nv(t,e.value):vs(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,a],l)=>(n[Kd(r,l)+" =>"]=a,n),{})}:K4(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Kd(n))}:Eo(e)?Kd(e):Wn(e)&&!Ft(e)&&!Y4(e)?String(e):e,Kd=(t,e="")=>{var n;return Eo(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 qr;class zb{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=qr,!e&&qr&&(this.index=(qr.scopes||(qr.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=qr;try{return qr=this,e()}finally{qr=n}}}on(){++this._on===1&&(this.prevScope=qr,qr=this)}off(){this._on>0&&--this._on===0&&(qr=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 a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function Bb(){return qr}let _n;const Xd=new WeakSet;class rv{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,qr&&qr.active&&qr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Xd.has(this)&&(Xd.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||av(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Z1(this),ov(this);const e=_n,n=qi;_n=this,qi=!0;try{return this.fn()}finally{sv(this),_n=e,qi=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)af(e);this.deps=this.depsTail=void 0,Z1(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Xd.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Zh(this)&&this.run()}get dirty(){return Zh(this)}}let iv=0,Nl,Dl;function av(t,e=!1){if(t.flags|=8,e){t.next=Dl,Dl=t;return}t.next=Nl,Nl=t}function nf(){iv++}function rf(){if(--iv>0)return;if(Dl){let e=Dl;for(Dl=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Nl;){let e=Nl;for(Nl=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 ov(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function sv(t){let e,n=t.depsTail,r=n;for(;r;){const a=r.prevDep;r.version===-1?(r===n&&(n=a),af(r),Fb(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=a}t.deps=e,t.depsTail=n}function Zh(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(lv(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function lv(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===jl)||(t.globalVersion=jl,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Zh(t))))return;t.flags|=2;const e=t.dep,n=_n,r=qi;_n=t,qi=!0;try{ov(t);const a=t.fn(t._value);(e.version===0||fo(a,t._value))&&(t.flags|=128,t._value=a,e.version++)}catch(a){throw e.version++,a}finally{_n=n,qi=r,sv(t),t.flags&=-3}}function af(t,e=!1){const{dep:n,prevSub:r,nextSub:a}=t;if(r&&(r.nextSub=a,t.prevSub=void 0),a&&(a.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)af(l,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function Fb(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let qi=!0;const cv=[];function $a(){cv.push(qi),qi=!1}function Ua(){const t=cv.pop();qi=t===void 0?!0:t}function Z1(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=_n;_n=void 0;try{e()}finally{_n=n}}}let jl=0;class qb{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 of{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(!_n||!qi||_n===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_n)n=this.activeLink=new qb(_n,this),_n.deps?(n.prevDep=_n.depsTail,_n.depsTail.nextDep=n,_n.depsTail=n):_n.deps=_n.depsTail=n,uv(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=_n.depsTail,n.nextDep=void 0,_n.depsTail.nextDep=n,_n.depsTail=n,_n.deps===n&&(_n.deps=r)}return n}trigger(e){this.version++,jl++,this.notify(e)}notify(e){nf();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{rf()}}}function uv(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)uv(r)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Yh=new WeakMap,Go=Symbol(""),Jh=Symbol(""),$l=Symbol("");function xr(t,e,n){if(qi&&_n){let r=Yh.get(t);r||Yh.set(t,r=new Map);let a=r.get(n);a||(r.set(n,a=new of),a.map=r,a.key=n),a.track()}}function Na(t,e,n,r,a,l){const h=Yh.get(t);if(!h){jl++;return}const c=p=>{p&&p.trigger()};if(nf(),e==="clear")h.forEach(c);else{const p=Ft(t),v=p&&tf(n);if(p&&n==="length"){const b=Number(r);h.forEach((g,m)=>{(m==="length"||m===$l||!Eo(m)&&m>=b)&&c(g)})}else switch((n!==void 0||h.has(void 0))&&c(h.get(n)),v&&c(h.get($l)),e){case"add":p?v&&c(h.get("length")):(c(h.get(Go)),vs(t)&&c(h.get(Jh)));break;case"delete":p||(c(h.get(Go)),vs(t)&&c(h.get(Jh)));break;case"set":vs(t)&&c(h.get(Go));break}}rf()}function os(t){const e=un(t);return e===t?e:(xr(e,"iterate",$l),vi(t)?e:e.map(yr))}function Wc(t){return xr(t=un(t),"iterate",$l),t}const jb={__proto__:null,[Symbol.iterator](){return Zd(this,Symbol.iterator,yr)},concat(...t){return os(this).concat(...t.map(e=>Ft(e)?os(e):e))},entries(){return Zd(this,"entries",t=>(t[1]=yr(t[1]),t))},every(t,e){return Sa(this,"every",t,e,void 0,arguments)},filter(t,e){return Sa(this,"filter",t,e,n=>n.map(yr),arguments)},find(t,e){return Sa(this,"find",t,e,yr,arguments)},findIndex(t,e){return Sa(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Sa(this,"findLast",t,e,yr,arguments)},findLastIndex(t,e){return Sa(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Sa(this,"forEach",t,e,void 0,arguments)},includes(...t){return Yd(this,"includes",t)},indexOf(...t){return Yd(this,"indexOf",t)},join(t){return os(this).join(t)},lastIndexOf(...t){return Yd(this,"lastIndexOf",t)},map(t,e){return Sa(this,"map",t,e,void 0,arguments)},pop(){return cl(this,"pop")},push(...t){return cl(this,"push",t)},reduce(t,...e){return Y1(this,"reduce",t,e)},reduceRight(t,...e){return Y1(this,"reduceRight",t,e)},shift(){return cl(this,"shift")},some(t,e){return Sa(this,"some",t,e,void 0,arguments)},splice(...t){return cl(this,"splice",t)},toReversed(){return os(this).toReversed()},toSorted(t){return os(this).toSorted(t)},toSpliced(...t){return os(this).toSpliced(...t)},unshift(...t){return cl(this,"unshift",t)},values(){return Zd(this,"values",yr)}};function Zd(t,e,n){const r=Wc(t),a=r[e]();return r!==t&&!vi(t)&&(a._next=a.next,a.next=()=>{const l=a._next();return l.value&&(l.value=n(l.value)),l}),a}const $b=Array.prototype;function Sa(t,e,n,r,a,l){const h=Wc(t),c=h!==t&&!vi(t),p=h[e];if(p!==$b[e]){const g=p.apply(t,l);return c?yr(g):g}let v=n;h!==t&&(c?v=function(g,m){return n.call(this,yr(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&&a?a(b):b}function Y1(t,e,n,r){const a=Wc(t);let l=n;return a!==t&&(vi(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,yr(c),p,t)}),a[e](l,...r)}function Yd(t,e,n){const r=un(t);xr(r,"iterate",$l);const a=r[e](...n);return(a===-1||a===!1)&&uf(n[0])?(n[0]=un(n[0]),r[e](...n)):a}function cl(t,e,n=[]){$a(),nf();const r=un(t)[e].apply(t,n);return rf(),Ua(),r}const Ub=Jp("__proto__,__v_isRef,__isVue"),dv=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Eo));function Vb(t){Eo(t)||(t=String(t));const e=un(this);return xr(e,"has",t),e.hasOwnProperty(t)}class hv{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;const a=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return l;if(n==="__v_raw")return r===(a?l?t5:gv:l?mv:fv).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const h=Ft(e);if(!a){let p;if(h&&(p=jb[n]))return p;if(n==="hasOwnProperty")return Vb}const c=Reflect.get(e,n,Sr(e)?e:r);return(Eo(n)?dv.has(n):Ub(n))||(a||xr(e,"get",n),l)?c:Sr(c)?h&&tf(n)?c:c.value:Wn(c)?a?vv(c):lf(c):c}}class pv extends hv{constructor(e=!1){super(!1,e)}set(e,n,r,a){let l=e[n];if(!this._isShallow){const p=go(l);if(!vi(r)&&!go(r)&&(l=un(l),r=un(r)),!Ft(e)&&Sr(l)&&!Sr(r))return p||(l.value=r),!0}const h=Ft(e)&&tf(n)?Number(n)<e.length:dn(e,n),c=Reflect.set(e,n,r,Sr(e)?e:a);return e===un(a)&&(h?fo(r,l)&&Na(e,"set",n,r):Na(e,"add",n,r)),c}deleteProperty(e,n){const r=dn(e,n);e[n];const a=Reflect.deleteProperty(e,n);return a&&r&&Na(e,"delete",n,void 0),a}has(e,n){const r=Reflect.has(e,n);return(!Eo(n)||!dv.has(n))&&xr(e,"has",n),r}ownKeys(e){return xr(e,"iterate",Ft(e)?"length":Go),Reflect.ownKeys(e)}}class Wb extends hv{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const Gb=new pv,Kb=new Wb,Xb=new pv(!0);const Qh=t=>t,m0=t=>Reflect.getPrototypeOf(t);function Zb(t,e,n){return function(...r){const a=this.__v_raw,l=un(a),h=vs(l),c=t==="entries"||t===Symbol.iterator&&h,p=t==="keys"&&h,v=a[t](...r),b=n?Qh:e?lc:yr;return!e&&xr(l,"iterate",p?Jh:Go),{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 g0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Yb(t,e){const n={get(a){const l=this.__v_raw,h=un(l),c=un(a);t||(fo(a,c)&&xr(h,"get",a),xr(h,"get",c));const{has:p}=m0(h),v=e?Qh:t?lc:yr;if(p.call(h,a))return v(l.get(a));if(p.call(h,c))return v(l.get(c));l!==h&&l.get(a)},get size(){const a=this.__v_raw;return!t&&xr(un(a),"iterate",Go),a.size},has(a){const l=this.__v_raw,h=un(l),c=un(a);return t||(fo(a,c)&&xr(h,"has",a),xr(h,"has",c)),a===c?l.has(a):l.has(a)||l.has(c)},forEach(a,l){const h=this,c=h.__v_raw,p=un(c),v=e?Qh:t?lc:yr;return!t&&xr(p,"iterate",Go),c.forEach((b,g)=>a.call(l,v(b),v(g),h))}};return wr(n,t?{add:g0("add"),set:g0("set"),delete:g0("delete"),clear:g0("clear")}:{add(a){!e&&!vi(a)&&!go(a)&&(a=un(a));const l=un(this);return m0(l).has.call(l,a)||(l.add(a),Na(l,"add",a,a)),this},set(a,l){!e&&!vi(l)&&!go(l)&&(l=un(l));const h=un(this),{has:c,get:p}=m0(h);let v=c.call(h,a);v||(a=un(a),v=c.call(h,a));const b=p.call(h,a);return h.set(a,l),v?fo(l,b)&&Na(h,"set",a,l):Na(h,"add",a,l),this},delete(a){const l=un(this),{has:h,get:c}=m0(l);let p=h.call(l,a);p||(a=un(a),p=h.call(l,a)),c&&c.call(l,a);const v=l.delete(a);return p&&Na(l,"delete",a,void 0),v},clear(){const a=un(this),l=a.size!==0,h=a.clear();return l&&Na(a,"clear",void 0,void 0),h}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=Zb(a,t,e)}),n}function sf(t,e){const n=Yb(t,e);return(r,a,l)=>a==="__v_isReactive"?!t:a==="__v_isReadonly"?t:a==="__v_raw"?r:Reflect.get(dn(n,a)&&a in r?n:r,a,l)}const Jb={get:sf(!1,!1)},Qb={get:sf(!1,!0)},e5={get:sf(!0,!1)};const fv=new WeakMap,mv=new WeakMap,gv=new WeakMap,t5=new WeakMap;function n5(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function r5(t){return t.__v_skip||!Object.isExtensible(t)?0:n5(Lb(t))}function lf(t){return go(t)?t:cf(t,!1,Gb,Jb,fv)}function i5(t){return cf(t,!1,Xb,Qb,mv)}function vv(t){return cf(t,!0,Kb,e5,gv)}function cf(t,e,n,r,a){if(!Wn(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const l=r5(t);if(l===0)return t;const h=a.get(t);if(h)return h;const c=new Proxy(t,l===2?r:n);return a.set(t,c),c}function bs(t){return go(t)?bs(t.__v_raw):!!(t&&t.__v_isReactive)}function go(t){return!!(t&&t.__v_isReadonly)}function vi(t){return!!(t&&t.__v_isShallow)}function uf(t){return t?!!t.__v_raw:!1}function un(t){const e=t&&t.__v_raw;return e?un(e):t}function a5(t){return!dn(t,"__v_skip")&&Object.isExtensible(t)&&Q4(t,"__v_skip",!0),t}const yr=t=>Wn(t)?lf(t):t,lc=t=>Wn(t)?vv(t):t;function Sr(t){return t?t.__v_isRef===!0:!1}function Lt(t){return o5(t,!1)}function o5(t,e){return Sr(t)?t:new s5(t,e)}class s5{constructor(e,n){this.dep=new of,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:un(e),this._value=n?e:yr(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,r=this.__v_isShallow||vi(e)||go(e);e=r?e:un(e),fo(e,n)&&(this._rawValue=e,this._value=r?e:yr(e),this.dep.trigger())}}function l5(t){return Sr(t)?t.value:t}const c5={get:(t,e,n)=>e==="__v_raw"?t:l5(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const a=t[e];return Sr(a)&&!Sr(n)?(a.value=n,!0):Reflect.set(t,e,n,r)}};function bv(t){return bs(t)?t:new Proxy(t,c5)}class u5{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new of(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jl-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&_n!==this)return av(this,!0),!0}get value(){const e=this.dep.track();return lv(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function d5(t,e,n=!1){let r,a;return Vt(t)?r=t:(r=t.get,a=t.set),new u5(r,a,n)}const v0={},cc=new WeakMap;let Vo;function h5(t,e=!1,n=Vo){if(n){let r=cc.get(n);r||cc.set(n,r=[]),r.push(t)}}function p5(t,e,n=En){const{immediate:r,deep:a,once:l,scheduler:h,augmentJob:c,call:p}=n,v=M=>a?M:vi(M)||a===!1||a===0?Da(M,1):Da(M);let b,g,m,x,w=!1,S=!1;if(Sr(t)?(g=()=>t.value,w=vi(t)):bs(t)?(g=()=>v(t),w=!0):Ft(t)?(S=!0,w=t.some(M=>bs(M)||vi(M)),g=()=>t.map(M=>{if(Sr(M))return M.value;if(bs(M))return v(M);if(Vt(M))return p?p(M,2):M()})):Vt(t)?e?g=p?()=>p(t,2):t:g=()=>{if(m){$a();try{m()}finally{Ua()}}const M=Vo;Vo=b;try{return p?p(t,3,[x]):t(x)}finally{Vo=M}}:g=Fi,e&&a){const M=g,y=a===!0?1/0:a;g=()=>Da(M(),y)}const k=Bb(),C=()=>{b.stop(),k&&k.active&&ef(k.effects,b)};if(l&&e){const M=e;e=(...y)=>{M(...y),C()}}let A=S?new Array(t.length).fill(v0):v0;const T=M=>{if(!(!(b.flags&1)||!b.dirty&&!M))if(e){const y=b.run();if(a||w||(S?y.some((N,z)=>fo(N,A[z])):fo(y,A))){m&&m();const N=Vo;Vo=b;try{const z=[y,A===v0?void 0:S&&A[0]===v0?[]:A,x];A=y,p?p(e,3,z):e(...z)}finally{Vo=N}}}else b.run()};return c&&c(T),b=new rv(g),b.scheduler=h?()=>h(T,!1):T,x=M=>h5(M,!1,b),m=b.onStop=()=>{const M=cc.get(b);if(M){if(p)p(M,4);else for(const y of M)y();cc.delete(b)}},e?r?T(!0):A=b.run():h?h(T.bind(null,!0),!0):b.run(),C.pause=b.pause.bind(b),C.resume=b.resume.bind(b),C.stop=C,C}function Da(t,e=1/0,n){if(e<=0||!Wn(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Sr(t))Da(t.value,e,n);else if(Ft(t))for(let r=0;r<t.length;r++)Da(t[r],e,n);else if(K4(t)||vs(t))t.forEach(r=>{Da(r,e,n)});else if(Y4(t)){for(const r in t)Da(t[r],e,n);for(const r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Da(t[r],e,n)}return t}/**
* @vue/runtime-core v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Jl(t,e,n,r){try{return r?t(...r):t()}catch(a){Gc(a,e,n)}}function la(t,e,n,r){if(Vt(t)){const a=Jl(t,e,n,r);return a&&X4(a)&&a.catch(l=>{Gc(l,e,n)}),a}if(Ft(t)){const a=[];for(let l=0;l<t.length;l++)a.push(la(t[l],e,n,r));return a}}function Gc(t,e,n,r=!0){const a=e?e.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:h}=e&&e.appContext.config||En;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){$a(),Jl(l,null,10,[t,p,v]),Ua();return}}f5(t,n,a,r,h)}function f5(t,e,n,r=!0,a=!1){if(a)throw t;console.error(t)}const Lr=[];let Ji=-1;const ys=[];let lo=null,hs=0;const yv=Promise.resolve();let uc=null;function Ma(t){const e=uc||yv;return t?e.then(this?t.bind(this):t):e}function m5(t){let e=Ji+1,n=Lr.length;for(;e<n;){const r=e+n>>>1,a=Lr[r],l=Ul(a);l<t||l===t&&a.flags&2?e=r+1:n=r}return e}function df(t){if(!(t.flags&1)){const e=Ul(t),n=Lr[Lr.length-1];!n||!(t.flags&2)&&e>=Ul(n)?Lr.push(t):Lr.splice(m5(e),0,t),t.flags|=1,wv()}}function wv(){uc||(uc=yv.then(kv))}function g5(t){Ft(t)?ys.push(...t):lo&&t.id===-1?lo.splice(hs+1,0,t):t.flags&1||(ys.push(t),t.flags|=1),wv()}function J1(t,e,n=Ji+1){for(;n<Lr.length;n++){const r=Lr[n];if(r&&r.flags&2){if(t&&r.id!==t.uid)continue;Lr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function xv(t){if(ys.length){const e=[...new Set(ys)].sort((n,r)=>Ul(n)-Ul(r));if(ys.length=0,lo){lo.push(...e);return}for(lo=e,hs=0;hs<lo.length;hs++){const n=lo[hs];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}lo=null,hs=0}}const Ul=t=>t.id==null?t.flags&2?-1:1/0:t.id;function kv(t){const e=Fi;try{for(Ji=0;Ji<Lr.length;Ji++){const n=Lr[Ji];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Jl(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Ji<Lr.length;Ji++){const n=Lr[Ji];n&&(n.flags&=-2)}Ji=-1,Lr.length=0,xv(),uc=null,(Lr.length||ys.length)&&kv()}}let fi=null,Sv=null;function dc(t){const e=fi;return fi=t,Sv=t&&t.type.__scopeId||null,e}function v5(t,e=fi,n){if(!e||t._n)return t;const r=(...a)=>{r._d&&om(-1);const l=dc(e);let h;try{h=t(...a)}finally{dc(l),r._d&&om(1)}return h};return r._n=!0,r._c=!0,r._d=!0,r}function ep(t,e){if(fi===null)return t;const n=Jc(fi),r=t.dirs||(t.dirs=[]);for(let a=0;a<e.length;a++){let[l,h,c,p=En]=e[a];l&&(Vt(l)&&(l={mounted:l,updated:l}),l.deep&&Da(h),r.push({dir:l,instance:n,value:h,oldValue:void 0,arg:c,modifiers:p}))}return t}function zo(t,e,n,r){const a=t.dirs,l=e&&e.dirs;for(let h=0;h<a.length;h++){const c=a[h];l&&(c.oldValue=l[h].value);let p=c.dir[r];p&&($a(),la(p,n,8,[t.el,c,t,e]),Ua())}}const b5=Symbol("_vte"),y5=t=>t.__isTeleport,w5=Symbol("_leaveCb");function hf(t,e){t.shapeFlag&6&&t.component?(t.transition=e,hf(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 Ev(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function Rl(t,e,n,r,a=!1){if(Ft(t)){t.forEach((w,S)=>Rl(w,e&&(Ft(e)?e[S]:e),n,r,a));return}if(Ol(r)&&!a){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Rl(t,e,n,r.component.subTree);return}const l=r.shapeFlag&4?Jc(r.component):r.el,h=a?null:l,{i:c,r:p}=t,v=e&&e.r,b=c.refs===En?c.refs={}:c.refs,g=c.setupState,m=un(g),x=g===En?G4:w=>dn(m,w);if(v!=null&&v!==p){if(nr(v))b[v]=null,x(v)&&(g[v]=null);else if(Sr(v)){v.value=null;const w=e;w.k&&(b[w.k]=null)}}if(Vt(p))Jl(p,c,12,[h,b]);else{const w=nr(p),S=Sr(p);if(w||S){const k=()=>{if(t.f){const C=w?x(p)?g[p]:b[p]:p.value;if(a)Ft(C)&&ef(C,l);else if(Ft(C))C.includes(l)||C.push(l);else if(w)b[p]=[l],x(p)&&(g[p]=b[p]);else{const A=[l];p.value=A,t.k&&(b[t.k]=A)}}else w?(b[p]=h,x(p)&&(g[p]=h)):S&&(p.value=h,t.k&&(b[t.k]=h))};h?(k.id=-1,ti(k,n)):k()}}}Vc().requestIdleCallback;Vc().cancelIdleCallback;const Ol=t=>!!t.type.__asyncLoader,Tv=t=>t.type.__isKeepAlive;function x5(t,e){Av(t,"a",e)}function k5(t,e){Av(t,"da",e)}function Av(t,e,n=_r){const r=t.__wdc||(t.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return t()});if(Kc(e,r,n),n){let a=n.parent;for(;a&&a.parent;)Tv(a.parent.vnode)&&S5(r,e,n,a),a=a.parent}}function S5(t,e,n,r){const a=Kc(e,t,r,!0);Ql(()=>{ef(r[e],a)},n)}function Kc(t,e,n=_r,r=!1){if(n){const a=n[t]||(n[t]=[]),l=e.__weh||(e.__weh=(...h)=>{$a();const c=e0(n),p=la(e,n,t,h);return c(),Ua(),p});return r?a.unshift(l):a.push(l),l}}const Ya=t=>(e,n=_r)=>{(!Wl||t==="sp")&&Kc(t,(...r)=>e(...r),n)},E5=Ya("bm"),Xc=Ya("m"),T5=Ya("bu"),A5=Ya("u"),M5=Ya("bum"),Ql=Ya("um"),C5=Ya("sp"),L5=Ya("rtg"),_5=Ya("rtc");function N5(t,e=_r){Kc("ec",t,e)}const D5=Symbol.for("v-ndc");function R5(t,e,n,r){let a;const l=n&&n[r],h=Ft(t);if(h||nr(t)){const c=h&&bs(t);let p=!1,v=!1;c&&(p=!vi(t),v=go(t),t=Wc(t)),a=new Array(t.length);for(let b=0,g=t.length;b<g;b++)a[b]=e(p?v?lc(yr(t[b])):yr(t[b]):t[b],b,void 0,l&&l[b])}else if(typeof t=="number"){a=new Array(t);for(let c=0;c<t;c++)a[c]=e(c+1,c,void 0,l&&l[c])}else if(Wn(t))if(t[Symbol.iterator])a=Array.from(t,(c,p)=>e(c,p,void 0,l&&l[p]));else{const c=Object.keys(t);a=new Array(c.length);for(let p=0,v=c.length;p<v;p++){const b=c[p];a[p]=e(t[b],b,p,l&&l[p])}}else a=[];return n&&(n[r]=a),a}const tp=t=>t?Gv(t)?Jc(t):tp(t.parent):null,Il=wr(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=>tp(t.parent),$root:t=>tp(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>pf(t),$forceUpdate:t=>t.f||(t.f=()=>{df(t.update)}),$nextTick:t=>t.n||(t.n=Ma.bind(t.proxy)),$watch:t=>ty.bind(t)}),Jd=(t,e)=>t!==En&&!t.__isScriptSetup&&dn(t,e),O5={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:r,data:a,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 a[e];case 4:return n[e];case 3:return l[e]}else{if(Jd(r,e))return h[e]=1,r[e];if(a!==En&&dn(a,e))return h[e]=2,a[e];if((v=t.propsOptions[0])&&dn(v,e))return h[e]=3,l[e];if(n!==En&&dn(n,e))return h[e]=4,n[e];np&&(h[e]=0)}}const b=Il[e];let g,m;if(b)return e==="$attrs"&&xr(t.attrs,"get",""),b(t);if((g=c.__cssModules)&&(g=g[e]))return g;if(n!==En&&dn(n,e))return h[e]=4,n[e];if(m=p.config.globalProperties,dn(m,e))return m[e]},set({_:t},e,n){const{data:r,setupState:a,ctx:l}=t;return Jd(a,e)?(a[e]=n,!0):r!==En&&dn(r,e)?(r[e]=n,!0):dn(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:a,propsOptions:l,type:h}},c){let p,v;return!!(n[c]||t!==En&&c[0]!=="$"&&dn(t,c)||Jd(e,c)||(p=l[0])&&dn(p,c)||dn(r,c)||dn(Il,c)||dn(a.config.globalProperties,c)||(v=h.__cssModules)&&v[c])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:dn(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function Q1(t){return Ft(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let np=!0;function I5(t){const e=pf(t),n=t.proxy,r=t.ctx;np=!1,e.beforeCreate&&em(e.beforeCreate,t,"bc");const{data:a,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:A,destroyed:T,unmounted:M,render:y,renderTracked:N,renderTriggered:z,errorCaptured:q,serverPrefetch:P,expose:Y,inheritAttrs:te,components:ue,directives:Le,filters:qe}=e;if(v&&H5(v,r,null),h)for(const $e in h){const De=h[$e];Vt(De)&&(r[$e]=De.bind(n))}if(a){const $e=a.call(n,n);Wn($e)&&(t.data=lf($e))}if(np=!0,l)for(const $e in l){const De=l[$e],nt=Vt(De)?De.bind(n,n):Vt(De.get)?De.get.bind(n,n):Fi,ut=!Vt(De)&&Vt(De.set)?De.set.bind(n):Fi,je=ky({get:nt,set:ut});Object.defineProperty(r,$e,{enumerable:!0,configurable:!0,get:()=>je.value,set:j=>je.value=j})}if(c)for(const $e in c)Mv(c[$e],r,n,$e);if(p){const $e=Vt(p)?p.call(n):p;Reflect.ownKeys($e).forEach(De=>{j5(De,$e[De])})}b&&em(b,t,"c");function it($e,De){Ft(De)?De.forEach(nt=>$e(nt.bind(n))):De&&$e(De.bind(n))}if(it(E5,g),it(Xc,m),it(T5,x),it(A5,w),it(x5,S),it(k5,k),it(N5,q),it(_5,N),it(L5,z),it(M5,A),it(Ql,M),it(C5,P),Ft(Y))if(Y.length){const $e=t.exposed||(t.exposed={});Y.forEach(De=>{Object.defineProperty($e,De,{get:()=>n[De],set:nt=>n[De]=nt,enumerable:!0})})}else t.exposed||(t.exposed={});y&&t.render===Fi&&(t.render=y),te!=null&&(t.inheritAttrs=te),ue&&(t.components=ue),Le&&(t.directives=Le),P&&Ev(t)}function H5(t,e,n=Fi){Ft(t)&&(t=rp(t));for(const r in t){const a=t[r];let l;Wn(a)?"default"in a?l=W0(a.from||r,a.default,!0):l=W0(a.from||r):l=W0(a),Sr(l)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>l.value,set:h=>l.value=h}):e[r]=l}}function em(t,e,n){la(Ft(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function Mv(t,e,n,r){let a=r.includes(".")?Fv(n,r):()=>n[r];if(nr(t)){const l=e[t];Vt(l)&&xs(a,l)}else if(Vt(t))xs(a,t.bind(n));else if(Wn(t))if(Ft(t))t.forEach(l=>Mv(l,e,n,r));else{const l=Vt(t.handler)?t.handler.bind(n):e[t.handler];Vt(l)&&xs(a,l,t)}}function pf(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:a,optionsCache:l,config:{optionMergeStrategies:h}}=t.appContext,c=l.get(e);let p;return c?p=c:!a.length&&!n&&!r?p=e:(p={},a.length&&a.forEach(v=>hc(p,v,h,!0)),hc(p,e,h)),Wn(e)&&l.set(e,p),p}function hc(t,e,n,r=!1){const{mixins:a,extends:l}=e;l&&hc(t,l,n,!0),a&&a.forEach(h=>hc(t,h,n,!0));for(const h in e)if(!(r&&h==="expose")){const c=P5[h]||n&&n[h];t[h]=c?c(t[h],e[h]):e[h]}return t}const P5={data:tm,props:nm,emits:nm,methods:Al,computed:Al,beforeCreate:Cr,created:Cr,beforeMount:Cr,mounted:Cr,beforeUpdate:Cr,updated:Cr,beforeDestroy:Cr,beforeUnmount:Cr,destroyed:Cr,unmounted:Cr,activated:Cr,deactivated:Cr,errorCaptured:Cr,serverPrefetch:Cr,components:Al,directives:Al,watch:B5,provide:tm,inject:z5};function tm(t,e){return e?t?function(){return wr(Vt(t)?t.call(this,this):t,Vt(e)?e.call(this,this):e)}:e:t}function z5(t,e){return Al(rp(t),rp(e))}function rp(t){if(Ft(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Cr(t,e){return t?[...new Set([].concat(t,e))]:e}function Al(t,e){return t?wr(Object.create(null),t,e):e}function nm(t,e){return t?Ft(t)&&Ft(e)?[...new Set([...t,...e])]:wr(Object.create(null),Q1(t),Q1(e??{})):e}function B5(t,e){if(!t)return e;if(!e)return t;const n=wr(Object.create(null),t);for(const r in e)n[r]=Cr(t[r],e[r]);return n}function Cv(){return{app:null,config:{isNativeTag:G4,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 F5=0;function q5(t,e){return function(r,a=null){Vt(r)||(r=wr({},r)),a!=null&&!Wn(a)&&(a=null);const l=Cv(),h=new WeakSet,c=[];let p=!1;const v=l.app={_uid:F5++,_component:r,_props:a,_container:null,_context:l,_instance:null,version:Sy,get config(){return l.config},set config(b){},use(b,...g){return h.has(b)||(b&&Vt(b.install)?(h.add(b),b.install(v,...g)):Vt(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||bi(r,a);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,Jc(x.component)}},onUnmount(b){c.push(b)},unmount(){p&&(la(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=ws;ws=v;try{return b()}finally{ws=g}}};return v}}let ws=null;function j5(t,e){if(_r){let n=_r.provides;const r=_r.parent&&_r.parent.provides;r===n&&(n=_r.provides=Object.create(r)),n[t]=e}}function W0(t,e,n=!1){const r=gy();if(r||ws){let a=ws?ws._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(a&&t in a)return a[t];if(arguments.length>1)return n&&Vt(e)?e.call(r&&r.proxy):e}}const Lv={},_v=()=>Object.create(Lv),Nv=t=>Object.getPrototypeOf(t)===Lv;function $5(t,e,n,r=!1){const a={},l=_v();t.propsDefaults=Object.create(null),Dv(t,e,a,l);for(const h in t.propsOptions[0])h in a||(a[h]=void 0);n?t.props=r?a:i5(a):t.type.props?t.props=a:t.props=l,t.attrs=l}function U5(t,e,n,r){const{props:a,attrs:l,vnode:{patchFlag:h}}=t,c=un(a),[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(Zc(t.emitsOptions,m))continue;const x=e[m];if(p)if(dn(l,m))x!==l[m]&&(l[m]=x,v=!0);else{const w=mo(m);a[w]=ip(p,c,w,x,t,!1)}else x!==l[m]&&(l[m]=x,v=!0)}}}else{Dv(t,e,a,l)&&(v=!0);let b;for(const g in c)(!e||!dn(e,g)&&((b=To(g))===g||!dn(e,b)))&&(p?n&&(n[g]!==void 0||n[b]!==void 0)&&(a[g]=ip(p,c,g,void 0,t,!0)):delete a[g]);if(l!==c)for(const g in l)(!e||!dn(e,g))&&(delete l[g],v=!0)}v&&Na(t.attrs,"set","")}function Dv(t,e,n,r){const[a,l]=t.propsOptions;let h=!1,c;if(e)for(let p in e){if(_l(p))continue;const v=e[p];let b;a&&dn(a,b=mo(p))?!l||!l.includes(b)?n[b]=v:(c||(c={}))[b]=v:Zc(t.emitsOptions,p)||(!(p in r)||v!==r[p])&&(r[p]=v,h=!0)}if(l){const p=un(n),v=c||En;for(let b=0;b<l.length;b++){const g=l[b];n[g]=ip(a,p,g,v[g],t,!dn(v,g))}}return h}function ip(t,e,n,r,a,l){const h=t[n];if(h!=null){const c=dn(h,"default");if(c&&r===void 0){const p=h.default;if(h.type!==Function&&!h.skipFactory&&Vt(p)){const{propsDefaults:v}=a;if(n in v)r=v[n];else{const b=e0(a);r=v[n]=p.call(null,e),b()}}else r=p;a.ce&&a.ce._setProp(n,r)}h[0]&&(l&&!c?r=!1:h[1]&&(r===""||r===To(n))&&(r=!0))}return r}const V5=new WeakMap;function Rv(t,e,n=!1){const r=n?V5:e.propsCache,a=r.get(t);if(a)return a;const l=t.props,h={},c=[];let p=!1;if(!Vt(t)){const b=g=>{p=!0;const[m,x]=Rv(g,e,!0);wr(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 Wn(t)&&r.set(t,gs),gs;if(Ft(l))for(let b=0;b<l.length;b++){const g=mo(l[b]);rm(g)&&(h[g]=En)}else if(l)for(const b in l){const g=mo(b);if(rm(g)){const m=l[b],x=h[g]=Ft(m)||Vt(m)?{type:m}:wr({},m),w=x.type;let S=!1,k=!0;if(Ft(w))for(let C=0;C<w.length;++C){const A=w[C],T=Vt(A)&&A.name;if(T==="Boolean"){S=!0;break}else T==="String"&&(k=!1)}else S=Vt(w)&&w.name==="Boolean";x[0]=S,x[1]=k,(S||dn(x,"default"))&&c.push(g)}}const v=[h,c];return Wn(t)&&r.set(t,v),v}function rm(t){return t[0]!=="$"&&!_l(t)}const ff=t=>t==="_"||t==="_ctx"||t==="$stable",mf=t=>Ft(t)?t.map(ta):[ta(t)],W5=(t,e,n)=>{if(e._n)return e;const r=v5((...a)=>mf(e(...a)),n);return r._c=!1,r},Ov=(t,e,n)=>{const r=t._ctx;for(const a in t){if(ff(a))continue;const l=t[a];if(Vt(l))e[a]=W5(a,l,r);else if(l!=null){const h=mf(l);e[a]=()=>h}}},Iv=(t,e)=>{const n=mf(e);t.slots.default=()=>n},Hv=(t,e,n)=>{for(const r in e)(n||!ff(r))&&(t[r]=e[r])},G5=(t,e,n)=>{const r=t.slots=_v();if(t.vnode.shapeFlag&32){const a=e._;a?(Hv(r,e,n),n&&Q4(r,"_",a,!0)):Ov(e,r)}else e&&Iv(t,e)},K5=(t,e,n)=>{const{vnode:r,slots:a}=t;let l=!0,h=En;if(r.shapeFlag&32){const c=e._;c?n&&c===1?l=!1:Hv(a,e,n):(l=!e.$stable,Ov(e,a)),h=e}else e&&(Iv(t,e),h={default:1});if(l)for(const c in a)!ff(c)&&h[c]==null&&delete a[c]},ti=ly;function X5(t){return Z5(t)}function Z5(t,e){const n=Vc();n.__VUE__=!0;const{insert:r,remove:a,patchProp:l,createElement:h,createText:c,createComment:p,setText:v,setElementText:b,parentNode:g,nextSibling:m,setScopeId:x=Fi,insertStaticContent:w}=t,S=(W,Z,ge,ce=null,ve=null,Ee=null,ze=void 0,We=null,Ze=!!Z.dynamicChildren)=>{if(W===Z)return;W&&!ul(W,Z)&&(ce=se(W),j(W,ve,Ee,!0),W=null),Z.patchFlag===-2&&(Ze=!1,Z.dynamicChildren=null);const{type:Be,ref:at,shapeFlag:Ue}=Z;switch(Be){case Yc:k(W,Z,ge,ce);break;case vo:C(W,Z,ge,ce);break;case G0:W==null&&A(Z,ge,ce,ze);break;case ea:ue(W,Z,ge,ce,ve,Ee,ze,We,Ze);break;default:Ue&1?y(W,Z,ge,ce,ve,Ee,ze,We,Ze):Ue&6?Le(W,Z,ge,ce,ve,Ee,ze,We,Ze):(Ue&64||Ue&128)&&Be.process(W,Z,ge,ce,ve,Ee,ze,We,Ze,Q)}at!=null&&ve?Rl(at,W&&W.ref,Ee,Z||W,!Z):at==null&&W&&W.ref!=null&&Rl(W.ref,null,Ee,W,!0)},k=(W,Z,ge,ce)=>{if(W==null)r(Z.el=c(Z.children),ge,ce);else{const ve=Z.el=W.el;Z.children!==W.children&&v(ve,Z.children)}},C=(W,Z,ge,ce)=>{W==null?r(Z.el=p(Z.children||""),ge,ce):Z.el=W.el},A=(W,Z,ge,ce)=>{[W.el,W.anchor]=w(W.children,Z,ge,ce,W.el,W.anchor)},T=({el:W,anchor:Z},ge,ce)=>{let ve;for(;W&&W!==Z;)ve=m(W),r(W,ge,ce),W=ve;r(Z,ge,ce)},M=({el:W,anchor:Z})=>{let ge;for(;W&&W!==Z;)ge=m(W),a(W),W=ge;a(Z)},y=(W,Z,ge,ce,ve,Ee,ze,We,Ze)=>{Z.type==="svg"?ze="svg":Z.type==="math"&&(ze="mathml"),W==null?N(Z,ge,ce,ve,Ee,ze,We,Ze):P(W,Z,ve,Ee,ze,We,Ze)},N=(W,Z,ge,ce,ve,Ee,ze,We)=>{let Ze,Be;const{props:at,shapeFlag:Ue,transition:He,dirs:gt}=W;if(Ze=W.el=h(W.type,Ee,at&&at.is,at),Ue&8?b(Ze,W.children):Ue&16&&q(W.children,Ze,null,ce,ve,Qd(W,Ee),ze,We),gt&&zo(W,null,ce,"created"),z(Ze,W,W.scopeId,ze,ce),at){for(const jt in at)jt!=="value"&&!_l(jt)&&l(Ze,jt,null,at[jt],Ee,ce);"value"in at&&l(Ze,"value",null,at.value,Ee),(Be=at.onVnodeBeforeMount)&&Gi(Be,ce,W)}gt&&zo(W,null,ce,"beforeMount");const kt=Y5(ve,He);kt&&He.beforeEnter(Ze),r(Ze,Z,ge),((Be=at&&at.onVnodeMounted)||kt||gt)&&ti(()=>{Be&&Gi(Be,ce,W),kt&&He.enter(Ze),gt&&zo(W,null,ce,"mounted")},ve)},z=(W,Z,ge,ce,ve)=>{if(ge&&x(W,ge),ce)for(let Ee=0;Ee<ce.length;Ee++)x(W,ce[Ee]);if(ve){let Ee=ve.subTree;if(Z===Ee||jv(Ee.type)&&(Ee.ssContent===Z||Ee.ssFallback===Z)){const ze=ve.vnode;z(W,ze,ze.scopeId,ze.slotScopeIds,ve.parent)}}},q=(W,Z,ge,ce,ve,Ee,ze,We,Ze=0)=>{for(let Be=Ze;Be<W.length;Be++){const at=W[Be]=We?co(W[Be]):ta(W[Be]);S(null,at,Z,ge,ce,ve,Ee,ze,We)}},P=(W,Z,ge,ce,ve,Ee,ze)=>{const We=Z.el=W.el;let{patchFlag:Ze,dynamicChildren:Be,dirs:at}=Z;Ze|=W.patchFlag&16;const Ue=W.props||En,He=Z.props||En;let gt;if(ge&&Bo(ge,!1),(gt=He.onVnodeBeforeUpdate)&&Gi(gt,ge,Z,W),at&&zo(Z,W,ge,"beforeUpdate"),ge&&Bo(ge,!0),(Ue.innerHTML&&He.innerHTML==null||Ue.textContent&&He.textContent==null)&&b(We,""),Be?Y(W.dynamicChildren,Be,We,ge,ce,Qd(Z,ve),Ee):ze||De(W,Z,We,null,ge,ce,Qd(Z,ve),Ee,!1),Ze>0){if(Ze&16)te(We,Ue,He,ge,ve);else if(Ze&2&&Ue.class!==He.class&&l(We,"class",null,He.class,ve),Ze&4&&l(We,"style",Ue.style,He.style,ve),Ze&8){const kt=Z.dynamicProps;for(let jt=0;jt<kt.length;jt++){const $t=kt[jt],Mn=Ue[$t],gn=He[$t];(gn!==Mn||$t==="value")&&l(We,$t,Mn,gn,ve,ge)}}Ze&1&&W.children!==Z.children&&b(We,Z.children)}else!ze&&Be==null&&te(We,Ue,He,ge,ve);((gt=He.onVnodeUpdated)||at)&&ti(()=>{gt&&Gi(gt,ge,Z,W),at&&zo(Z,W,ge,"updated")},ce)},Y=(W,Z,ge,ce,ve,Ee,ze)=>{for(let We=0;We<Z.length;We++){const Ze=W[We],Be=Z[We],at=Ze.el&&(Ze.type===ea||!ul(Ze,Be)||Ze.shapeFlag&198)?g(Ze.el):ge;S(Ze,Be,at,null,ce,ve,Ee,ze,!0)}},te=(W,Z,ge,ce,ve)=>{if(Z!==ge){if(Z!==En)for(const Ee in Z)!_l(Ee)&&!(Ee in ge)&&l(W,Ee,Z[Ee],null,ve,ce);for(const Ee in ge){if(_l(Ee))continue;const ze=ge[Ee],We=Z[Ee];ze!==We&&Ee!=="value"&&l(W,Ee,We,ze,ve,ce)}"value"in ge&&l(W,"value",Z.value,ge.value,ve)}},ue=(W,Z,ge,ce,ve,Ee,ze,We,Ze)=>{const Be=Z.el=W?W.el:c(""),at=Z.anchor=W?W.anchor:c("");let{patchFlag:Ue,dynamicChildren:He,slotScopeIds:gt}=Z;gt&&(We=We?We.concat(gt):gt),W==null?(r(Be,ge,ce),r(at,ge,ce),q(Z.children||[],ge,at,ve,Ee,ze,We,Ze)):Ue>0&&Ue&64&&He&&W.dynamicChildren?(Y(W.dynamicChildren,He,ge,ve,Ee,ze,We),(Z.key!=null||ve&&Z===ve.subTree)&&Pv(W,Z,!0)):De(W,Z,ge,at,ve,Ee,ze,We,Ze)},Le=(W,Z,ge,ce,ve,Ee,ze,We,Ze)=>{Z.slotScopeIds=We,W==null?Z.shapeFlag&512?ve.ctx.activate(Z,ge,ce,ze,Ze):qe(Z,ge,ce,ve,Ee,ze,Ze):Xe(W,Z,Ze)},qe=(W,Z,ge,ce,ve,Ee,ze)=>{const We=W.component=my(W,ce,ve);if(Tv(W)&&(We.ctx.renderer=Q),vy(We,!1,ze),We.asyncDep){if(ve&&ve.registerDep(We,it,ze),!W.el){const Ze=We.subTree=bi(vo);C(null,Ze,Z,ge),W.placeholder=Ze.el}}else it(We,W,Z,ge,ve,Ee,ze)},Xe=(W,Z,ge)=>{const ce=Z.component=W.component;if(oy(W,Z,ge))if(ce.asyncDep&&!ce.asyncResolved){$e(ce,Z,ge);return}else ce.next=Z,ce.update();else Z.el=W.el,ce.vnode=Z},it=(W,Z,ge,ce,ve,Ee,ze)=>{const We=()=>{if(W.isMounted){let{next:Ue,bu:He,u:gt,parent:kt,vnode:jt}=W;{const ln=zv(W);if(ln){Ue&&(Ue.el=jt.el,$e(W,Ue,ze)),ln.asyncDep.then(()=>{W.isUnmounted||We()});return}}let $t=Ue,Mn;Bo(W,!1),Ue?(Ue.el=jt.el,$e(W,Ue,ze)):Ue=jt,He&&V0(He),(Mn=Ue.props&&Ue.props.onVnodeBeforeUpdate)&&Gi(Mn,kt,Ue,jt),Bo(W,!0);const gn=eh(W),Rn=W.subTree;W.subTree=gn,S(Rn,gn,g(Rn.el),se(Rn),W,ve,Ee),Ue.el=gn.el,$t===null&&sy(W,gn.el),gt&&ti(gt,ve),(Mn=Ue.props&&Ue.props.onVnodeUpdated)&&ti(()=>Gi(Mn,kt,Ue,jt),ve)}else{let Ue;const{el:He,props:gt}=Z,{bm:kt,m:jt,parent:$t,root:Mn,type:gn}=W,Rn=Ol(Z);if(Bo(W,!1),kt&&V0(kt),!Rn&&(Ue=gt&&gt.onVnodeBeforeMount)&&Gi(Ue,$t,Z),Bo(W,!0),He&&de){const ln=()=>{W.subTree=eh(W),de(He,W.subTree,W,ve,null)};Rn&&gn.__asyncHydrate?gn.__asyncHydrate(He,W,ln):ln()}else{Mn.ce&&Mn.ce._def.shadowRoot!==!1&&Mn.ce._injectChildStyle(gn);const ln=W.subTree=eh(W);S(null,ln,ge,ce,W,ve,Ee),Z.el=ln.el}if(jt&&ti(jt,ve),!Rn&&(Ue=gt&&gt.onVnodeMounted)){const ln=Z;ti(()=>Gi(Ue,$t,ln),ve)}(Z.shapeFlag&256||$t&&Ol($t.vnode)&&$t.vnode.shapeFlag&256)&&W.a&&ti(W.a,ve),W.isMounted=!0,Z=ge=ce=null}};W.scope.on();const Ze=W.effect=new rv(We);W.scope.off();const Be=W.update=Ze.run.bind(Ze),at=W.job=Ze.runIfDirty.bind(Ze);at.i=W,at.id=W.uid,Ze.scheduler=()=>df(at),Bo(W,!0),Be()},$e=(W,Z,ge)=>{Z.component=W;const ce=W.vnode.props;W.vnode=Z,W.next=null,U5(W,Z.props,ce,ge),K5(W,Z.children,ge),$a(),J1(W),Ua()},De=(W,Z,ge,ce,ve,Ee,ze,We,Ze=!1)=>{const Be=W&&W.children,at=W?W.shapeFlag:0,Ue=Z.children,{patchFlag:He,shapeFlag:gt}=Z;if(He>0){if(He&128){ut(Be,Ue,ge,ce,ve,Ee,ze,We,Ze);return}else if(He&256){nt(Be,Ue,ge,ce,ve,Ee,ze,We,Ze);return}}gt&8?(at&16&&Mt(Be,ve,Ee),Ue!==Be&&b(ge,Ue)):at&16?gt&16?ut(Be,Ue,ge,ce,ve,Ee,ze,We,Ze):Mt(Be,ve,Ee,!0):(at&8&&b(ge,""),gt&16&&q(Ue,ge,ce,ve,Ee,ze,We,Ze))},nt=(W,Z,ge,ce,ve,Ee,ze,We,Ze)=>{W=W||gs,Z=Z||gs;const Be=W.length,at=Z.length,Ue=Math.min(Be,at);let He;for(He=0;He<Ue;He++){const gt=Z[He]=Ze?co(Z[He]):ta(Z[He]);S(W[He],gt,ge,null,ve,Ee,ze,We,Ze)}Be>at?Mt(W,ve,Ee,!0,!1,Ue):q(Z,ge,ce,ve,Ee,ze,We,Ze,Ue)},ut=(W,Z,ge,ce,ve,Ee,ze,We,Ze)=>{let Be=0;const at=Z.length;let Ue=W.length-1,He=at-1;for(;Be<=Ue&&Be<=He;){const gt=W[Be],kt=Z[Be]=Ze?co(Z[Be]):ta(Z[Be]);if(ul(gt,kt))S(gt,kt,ge,null,ve,Ee,ze,We,Ze);else break;Be++}for(;Be<=Ue&&Be<=He;){const gt=W[Ue],kt=Z[He]=Ze?co(Z[He]):ta(Z[He]);if(ul(gt,kt))S(gt,kt,ge,null,ve,Ee,ze,We,Ze);else break;Ue--,He--}if(Be>Ue){if(Be<=He){const gt=He+1,kt=gt<at?Z[gt].el:ce;for(;Be<=He;)S(null,Z[Be]=Ze?co(Z[Be]):ta(Z[Be]),ge,kt,ve,Ee,ze,We,Ze),Be++}}else if(Be>He)for(;Be<=Ue;)j(W[Be],ve,Ee,!0),Be++;else{const gt=Be,kt=Be,jt=new Map;for(Be=kt;Be<=He;Be++){const xn=Z[Be]=Ze?co(Z[Be]):ta(Z[Be]);xn.key!=null&&jt.set(xn.key,Be)}let $t,Mn=0;const gn=He-kt+1;let Rn=!1,ln=0;const Qn=new Array(gn);for(Be=0;Be<gn;Be++)Qn[Be]=0;for(Be=gt;Be<=Ue;Be++){const xn=W[Be];if(Mn>=gn){j(xn,ve,Ee,!0);continue}let zt;if(xn.key!=null)zt=jt.get(xn.key);else for($t=kt;$t<=He;$t++)if(Qn[$t-kt]===0&&ul(xn,Z[$t])){zt=$t;break}zt===void 0?j(xn,ve,Ee,!0):(Qn[zt-kt]=Be+1,zt>=ln?ln=zt:Rn=!0,S(xn,Z[zt],ge,null,ve,Ee,ze,We,Ze),Mn++)}const Cn=Rn?J5(Qn):gs;for($t=Cn.length-1,Be=gn-1;Be>=0;Be--){const xn=kt+Be,zt=Z[xn],Pn=Z[xn+1],nn=xn+1<at?Pn.el||Pn.placeholder:ce;Qn[Be]===0?S(null,zt,ge,nn,ve,Ee,ze,We,Ze):Rn&&($t<0||Be!==Cn[$t]?je(zt,ge,nn,2):$t--)}}},je=(W,Z,ge,ce,ve=null)=>{const{el:Ee,type:ze,transition:We,children:Ze,shapeFlag:Be}=W;if(Be&6){je(W.component.subTree,Z,ge,ce);return}if(Be&128){W.suspense.move(Z,ge,ce);return}if(Be&64){ze.move(W,Z,ge,Q);return}if(ze===ea){r(Ee,Z,ge);for(let Ue=0;Ue<Ze.length;Ue++)je(Ze[Ue],Z,ge,ce);r(W.anchor,Z,ge);return}if(ze===G0){T(W,Z,ge);return}if(ce!==2&&Be&1&&We)if(ce===0)We.beforeEnter(Ee),r(Ee,Z,ge),ti(()=>We.enter(Ee),ve);else{const{leave:Ue,delayLeave:He,afterLeave:gt}=We,kt=()=>{W.ctx.isUnmounted?a(Ee):r(Ee,Z,ge)},jt=()=>{Ee._isLeaving&&Ee[w5](!0),Ue(Ee,()=>{kt(),gt&&gt()})};He?He(Ee,kt,jt):jt()}else r(Ee,Z,ge)},j=(W,Z,ge,ce=!1,ve=!1)=>{const{type:Ee,props:ze,ref:We,children:Ze,dynamicChildren:Be,shapeFlag:at,patchFlag:Ue,dirs:He,cacheIndex:gt}=W;if(Ue===-2&&(ve=!1),We!=null&&($a(),Rl(We,null,ge,W,!0),Ua()),gt!=null&&(Z.renderCache[gt]=void 0),at&256){Z.ctx.deactivate(W);return}const kt=at&1&&He,jt=!Ol(W);let $t;if(jt&&($t=ze&&ze.onVnodeBeforeUnmount)&&Gi($t,Z,W),at&6)bt(W.component,ge,ce);else{if(at&128){W.suspense.unmount(ge,ce);return}kt&&zo(W,null,Z,"beforeUnmount"),at&64?W.type.remove(W,Z,ge,Q,ce):Be&&!Be.hasOnce&&(Ee!==ea||Ue>0&&Ue&64)?Mt(Be,Z,ge,!1,!0):(Ee===ea&&Ue&384||!ve&&at&16)&&Mt(Ze,Z,ge),ce&&yt(W)}(jt&&($t=ze&&ze.onVnodeUnmounted)||kt)&&ti(()=>{$t&&Gi($t,Z,W),kt&&zo(W,null,Z,"unmounted")},ge)},yt=W=>{const{type:Z,el:ge,anchor:ce,transition:ve}=W;if(Z===ea){It(ge,ce);return}if(Z===G0){M(W);return}const Ee=()=>{a(ge),ve&&!ve.persisted&&ve.afterLeave&&ve.afterLeave()};if(W.shapeFlag&1&&ve&&!ve.persisted){const{leave:ze,delayLeave:We}=ve,Ze=()=>ze(ge,Ee);We?We(W.el,Ee,Ze):Ze()}else Ee()},It=(W,Z)=>{let ge;for(;W!==Z;)ge=m(W),a(W),W=ge;a(Z)},bt=(W,Z,ge)=>{const{bum:ce,scope:ve,job:Ee,subTree:ze,um:We,m:Ze,a:Be}=W;im(Ze),im(Be),ce&&V0(ce),ve.stop(),Ee&&(Ee.flags|=8,j(ze,W,Z,ge)),We&&ti(We,Z),ti(()=>{W.isUnmounted=!0},Z)},Mt=(W,Z,ge,ce=!1,ve=!1,Ee=0)=>{for(let ze=Ee;ze<W.length;ze++)j(W[ze],Z,ge,ce,ve)},se=W=>{if(W.shapeFlag&6)return se(W.component.subTree);if(W.shapeFlag&128)return W.suspense.next();const Z=m(W.anchor||W.el),ge=Z&&Z[b5];return ge?m(ge):Z};let fe=!1;const J=(W,Z,ge)=>{W==null?Z._vnode&&j(Z._vnode,null,null,!0):S(Z._vnode||null,W,Z,null,null,null,ge),Z._vnode=W,fe||(fe=!0,J1(),xv(),fe=!1)},Q={p:S,um:j,m:je,r:yt,mt:qe,mc:q,pc:De,pbc:Y,n:se,o:t};let Ie,de;return e&&([Ie,de]=e(Q)),{render:J,hydrate:Ie,createApp:q5(J,Ie)}}function Qd({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 Bo({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function Y5(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Pv(t,e,n=!1){const r=t.children,a=e.children;if(Ft(r)&&Ft(a))for(let l=0;l<r.length;l++){const h=r[l];let c=a[l];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=a[l]=co(a[l]),c.el=h.el),!n&&c.patchFlag!==-2&&Pv(h,c)),c.type===Yc&&c.patchFlag!==-1&&(c.el=h.el),c.type===vo&&!c.el&&(c.el=h.el)}}function J5(t){const e=t.slice(),n=[0];let r,a,l,h,c;const p=t.length;for(r=0;r<p;r++){const v=t[r];if(v!==0){if(a=n[n.length-1],t[a]<v){e[r]=a,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 zv(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:zv(e)}function im(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}const Q5=Symbol.for("v-scx"),ey=()=>W0(Q5);function xs(t,e,n){return Bv(t,e,n)}function Bv(t,e,n=En){const{immediate:r,deep:a,flush:l,once:h}=n,c=wr({},n),p=e&&r||!e&&l!=="post";let v;if(Wl){if(l==="sync"){const x=ey();v=x.__watcherHandles||(x.__watcherHandles=[])}else if(!p){const x=()=>{};return x.stop=Fi,x.resume=Fi,x.pause=Fi,x}}const b=_r;c.call=(x,w,S)=>la(x,b,w,S);let g=!1;l==="post"?c.scheduler=x=>{ti(x,b&&b.suspense)}:l!=="sync"&&(g=!0,c.scheduler=(x,w)=>{w?x():df(x)}),c.augmentJob=x=>{e&&(x.flags|=4),g&&(x.flags|=2,b&&(x.id=b.uid,x.i=b))};const m=p5(t,e,c);return Wl&&(v?v.push(m):p&&m()),m}function ty(t,e,n){const r=this.proxy,a=nr(t)?t.includes(".")?Fv(r,t):()=>r[t]:t.bind(r,r);let l;Vt(e)?l=e:(l=e.handler,n=e);const h=e0(this),c=Bv(a,l.bind(r),n);return h(),c}function Fv(t,e){const n=e.split(".");return()=>{let r=t;for(let a=0;a<n.length&&r;a++)r=r[n[a]];return r}}const ny=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${mo(e)}Modifiers`]||t[`${To(e)}Modifiers`];function ry(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||En;let a=n;const l=e.startsWith("update:"),h=l&&ny(r,e.slice(7));h&&(h.trim&&(a=n.map(b=>nr(b)?b.trim():b)),h.number&&(a=n.map(Xh)));let c,p=r[c=Gd(e)]||r[c=Gd(mo(e))];!p&&l&&(p=r[c=Gd(To(e))]),p&&la(p,t,6,a);const v=r[c+"Once"];if(v){if(!t.emitted)t.emitted={};else if(t.emitted[c])return;t.emitted[c]=!0,la(v,t,6,a)}}function qv(t,e,n=!1){const r=e.emitsCache,a=r.get(t);if(a!==void 0)return a;const l=t.emits;let h={},c=!1;if(!Vt(t)){const p=v=>{const b=qv(v,e,!0);b&&(c=!0,wr(h,b))};!n&&e.mixins.length&&e.mixins.forEach(p),t.extends&&p(t.extends),t.mixins&&t.mixins.forEach(p)}return!l&&!c?(Wn(t)&&r.set(t,null),null):(Ft(l)?l.forEach(p=>h[p]=null):wr(h,l),Wn(t)&&r.set(t,h),h)}function Zc(t,e){return!t||!jc(e)?!1:(e=e.slice(2).replace(/Once$/,""),dn(t,e[0].toLowerCase()+e.slice(1))||dn(t,To(e))||dn(t,e))}function eh(t){const{type:e,vnode:n,proxy:r,withProxy:a,propsOptions:[l],slots:h,attrs:c,emit:p,render:v,renderCache:b,props:g,data:m,setupState:x,ctx:w,inheritAttrs:S}=t,k=dc(t);let C,A;try{if(n.shapeFlag&4){const M=a||r,y=M;C=ta(v.call(y,M,b,g,x,m,w)),A=c}else{const M=e;C=ta(M.length>1?M(g,{attrs:c,slots:h,emit:p}):M(g,null)),A=e.props?c:iy(c)}}catch(M){Hl.length=0,Gc(M,t,1),C=bi(vo)}let T=C;if(A&&S!==!1){const M=Object.keys(A),{shapeFlag:y}=T;M.length&&y&7&&(l&&M.some(Qp)&&(A=ay(A,l)),T=As(T,A,!1,!0))}return n.dirs&&(T=As(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(n.dirs):n.dirs),n.transition&&hf(T,n.transition),C=T,dc(k),C}const iy=t=>{let e;for(const n in t)(n==="class"||n==="style"||jc(n))&&((e||(e={}))[n]=t[n]);return e},ay=(t,e)=>{const n={};for(const r in t)(!Qp(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function oy(t,e,n){const{props:r,children:a,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?am(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]&&!Zc(v,m))return!0}}}else return(a||c)&&(!c||!c.$stable)?!0:r===h?!1:r?h?am(r,h,v):!0:!!h;return!1}function am(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let a=0;a<r.length;a++){const l=r[a];if(e[l]!==t[l]&&!Zc(n,l))return!0}return!1}function sy({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 jv=t=>t.__isSuspense;function ly(t,e){e&&e.pendingBranch?Ft(t)?e.effects.push(...t):e.effects.push(t):g5(t)}const ea=Symbol.for("v-fgt"),Yc=Symbol.for("v-txt"),vo=Symbol.for("v-cmt"),G0=Symbol.for("v-stc"),Hl=[];let si=null;function on(t=!1){Hl.push(si=t?null:[])}function cy(){Hl.pop(),si=Hl[Hl.length-1]||null}let Vl=1;function om(t,e=!1){Vl+=t,t<0&&si&&e&&(si.hasOnce=!0)}function $v(t){return t.dynamicChildren=Vl>0?si||gs:null,cy(),Vl>0&&si&&si.push(t),t}function yn(t,e,n,r,a,l){return $v(Fe(t,e,n,r,a,l,!0))}function Uv(t,e,n,r,a){return $v(bi(t,e,n,r,a,!0))}function Vv(t){return t?t.__v_isVNode===!0:!1}function ul(t,e){return t.type===e.type&&t.key===e.key}const Wv=({key:t})=>t??null,K0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?nr(t)||Sr(t)||Vt(t)?{i:fi,r:t,k:e,f:!!n}:t:null);function Fe(t,e=null,n=null,r=0,a=null,l=t===ea?0:1,h=!1,c=!1){const p={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Wv(e),ref:e&&K0(e),scopeId:Sv,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:a,dynamicChildren:null,appContext:null,ctx:fi};return c?(vf(p,n),l&128&&t.normalize(p)):n&&(p.shapeFlag|=nr(n)?8:16),Vl>0&&!h&&si&&(p.patchFlag>0||l&6)&&p.patchFlag!==32&&si.push(p),p}const bi=uy;function uy(t,e=null,n=null,r=0,a=null,l=!1){if((!t||t===D5)&&(t=vo),Vv(t)){const c=As(t,e,!0);return n&&vf(c,n),Vl>0&&!l&&si&&(c.shapeFlag&6?si[si.indexOf(t)]=c:si.push(c)),c.patchFlag=-2,c}if(xy(t)&&(t=t.__vccOpts),e){e=dy(e);let{class:c,style:p}=e;c&&!nr(c)&&(e.class=Xo(c)),Wn(p)&&(uf(p)&&!Ft(p)&&(p=wr({},p)),e.style=Ts(p))}const h=nr(t)?1:jv(t)?128:y5(t)?64:Wn(t)?4:Vt(t)?2:0;return Fe(t,e,n,r,a,h,l,!0)}function dy(t){return t?uf(t)||Nv(t)?wr({},t):t:null}function As(t,e,n=!1,r=!1){const{props:a,ref:l,patchFlag:h,children:c,transition:p}=t,v=e?hy(a||{},e):a,b={__v_isVNode:!0,__v_skip:!0,type:t.type,props:v,key:v&&Wv(v),ref:e&&e.ref?n&&l?Ft(l)?l.concat(K0(e)):[l,K0(e)]:K0(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!==ea?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&&As(t.ssContent),ssFallback:t.ssFallback&&As(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return p&&r&&hf(b,p.clone(b)),b}function gf(t=" ",e=0){return bi(Yc,null,t,e)}function sm(t,e){const n=bi(G0,null,t);return n.staticCount=e,n}function ni(t="",e=!1){return e?(on(),Uv(vo,null,t)):bi(vo,null,t)}function ta(t){return t==null||typeof t=="boolean"?bi(vo):Ft(t)?bi(ea,null,t.slice()):Vv(t)?co(t):bi(Yc,null,String(t))}function co(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:As(t)}function vf(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(Ft(e))n=16;else if(typeof e=="object")if(r&65){const a=e.default;a&&(a._c&&(a._d=!1),vf(t,a()),a._c&&(a._d=!0));return}else{n=32;const a=e._;!a&&!Nv(e)?e._ctx=fi:a===3&&fi&&(fi.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Vt(e)?(e={default:e,_ctx:fi},n=32):(e=String(e),r&64?(n=16,e=[gf(e)]):n=8);t.children=e,t.shapeFlag|=n}function hy(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const a in r)if(a==="class")e.class!==r.class&&(e.class=Xo([e.class,r.class]));else if(a==="style")e.style=Ts([e.style,r.style]);else if(jc(a)){const l=e[a],h=r[a];h&&l!==h&&!(Ft(l)&&l.includes(h))&&(e[a]=l?[].concat(l,h):h)}else a!==""&&(e[a]=r[a])}return e}function Gi(t,e,n,r=null){la(t,e,7,[n,r])}const py=Cv();let fy=0;function my(t,e,n){const r=t.type,a=(e?e.appContext:t.appContext)||py,l={uid:fy++,vnode:t,type:r,parent:e,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new zb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(a.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Rv(r,a),emitsOptions:qv(r,a),emit:null,emitted:null,propsDefaults:En,inheritAttrs:r.inheritAttrs,ctx:En,data:En,props:En,attrs:En,slots:En,refs:En,setupState:En,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=ry.bind(null,l),t.ce&&t.ce(l),l}let _r=null;const gy=()=>_r||fi;let pc,ap;{const t=Vc(),e=(n,r)=>{let a;return(a=t[n])||(a=t[n]=[]),a.push(r),l=>{a.length>1?a.forEach(h=>h(l)):a[0](l)}};pc=e("__VUE_INSTANCE_SETTERS__",n=>_r=n),ap=e("__VUE_SSR_SETTERS__",n=>Wl=n)}const e0=t=>{const e=_r;return pc(t),t.scope.on(),()=>{t.scope.off(),pc(e)}},lm=()=>{_r&&_r.scope.off(),pc(null)};function Gv(t){return t.vnode.shapeFlag&4}let Wl=!1;function vy(t,e=!1,n=!1){e&&ap(e);const{props:r,children:a}=t.vnode,l=Gv(t);$5(t,r,l,e),G5(t,a,n||e);const h=l?by(t,e):void 0;return e&&ap(!1),h}function by(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,O5);const{setup:r}=n;if(r){$a();const a=t.setupContext=r.length>1?wy(t):null,l=e0(t),h=Jl(r,t,0,[t.props,a]),c=X4(h);if(Ua(),l(),(c||t.sp)&&!Ol(t)&&Ev(t),c){if(h.then(lm,lm),e)return h.then(p=>{cm(t,p,e)}).catch(p=>{Gc(p,t,0)});t.asyncDep=h}else cm(t,h,e)}else Kv(t,e)}function cm(t,e,n){Vt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Wn(e)&&(t.setupState=bv(e)),Kv(t,n)}let um;function Kv(t,e,n){const r=t.type;if(!t.render){if(!e&&um&&!r.render){const a=r.template||pf(t).template;if(a){const{isCustomElement:l,compilerOptions:h}=t.appContext.config,{delimiters:c,compilerOptions:p}=r,v=wr(wr({isCustomElement:l,delimiters:c},h),p);r.render=um(a,v)}}t.render=r.render||Fi}{const a=e0(t);$a();try{I5(t)}finally{Ua(),a()}}}const yy={get(t,e){return xr(t,"get",""),t[e]}};function wy(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,yy),slots:t.slots,emit:t.emit,expose:e}}function Jc(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(bv(a5(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Il)return Il[n](t)},has(e,n){return n in e||n in Il}})):t.proxy}function xy(t){return Vt(t)&&"__vccOpts"in t}const ky=(t,e)=>d5(t,e,Wl),Sy="3.5.20";/**
* @vue/runtime-dom v3.5.20
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let op;const dm=typeof window<"u"&&window.trustedTypes;if(dm)try{op=dm.createPolicy("vue",{createHTML:t=>t})}catch{}const Xv=op?t=>op.createHTML(t):t=>t,Ey="http://www.w3.org/2000/svg",Ty="http://www.w3.org/1998/Math/MathML",Ca=typeof document<"u"?document:null,hm=Ca&&Ca.createElement("template"),Ay={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 a=e==="svg"?Ca.createElementNS(Ey,t):e==="mathml"?Ca.createElementNS(Ty,t):n?Ca.createElement(t,{is:n}):Ca.createElement(t);return t==="select"&&r&&r.multiple!=null&&a.setAttribute("multiple",r.multiple),a},createText:t=>Ca.createTextNode(t),createComment:t=>Ca.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ca.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,a,l){const h=n?n.previousSibling:e.lastChild;if(a&&(a===l||a.nextSibling))for(;e.insertBefore(a.cloneNode(!0),n),!(a===l||!(a=a.nextSibling)););else{hm.innerHTML=Xv(r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t);const c=hm.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]}},My=Symbol("_vtc");function Cy(t,e,n){const r=t[My];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const fc=Symbol("_vod"),Zv=Symbol("_vsh"),Ly={name:"show",beforeMount(t,{value:e},{transition:n}){t[fc]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):dl(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),dl(t,!0),r.enter(t)):r.leave(t,()=>{dl(t,!1)}):dl(t,e))},beforeUnmount(t,{value:e}){dl(t,e)}};function dl(t,e){t.style.display=e?t[fc]:"none",t[Zv]=!e}const _y=Symbol(""),Ny=/(^|;)\s*display\s*:/;function Dy(t,e,n){const r=t.style,a=nr(n);let l=!1;if(n&&!a){if(e)if(nr(e))for(const h of e.split(";")){const c=h.slice(0,h.indexOf(":")).trim();n[c]==null&&X0(r,c,"")}else for(const h in e)n[h]==null&&X0(r,h,"");for(const h in n)h==="display"&&(l=!0),X0(r,h,n[h])}else if(a){if(e!==n){const h=r[_y];h&&(n+=";"+h),r.cssText=n,l=Ny.test(n)}}else e&&t.removeAttribute("style");fc in t&&(t[fc]=l?r.display:"",t[Zv]&&(r.display="none"))}const pm=/\s*!important$/;function X0(t,e,n){if(Ft(n))n.forEach(r=>X0(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=Ry(t,e);pm.test(n)?t.setProperty(To(r),n.replace(pm,""),"important"):t[r]=n}}const fm=["Webkit","Moz","ms"],th={};function Ry(t,e){const n=th[e];if(n)return n;let r=mo(e);if(r!=="filter"&&r in t)return th[e]=r;r=J4(r);for(let a=0;a<fm.length;a++){const l=fm[a]+r;if(l in t)return th[e]=l}return e}const mm="http://www.w3.org/1999/xlink";function gm(t,e,n,r,a,l=Pb(e)){r&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(mm,e.slice(6,e.length)):t.setAttributeNS(mm,e,n):n==null||l&&!ev(n)?t.removeAttribute(e):t.setAttribute(e,l?"":Eo(n)?String(n):n)}function vm(t,e,n,r,a){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?Xv(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=ev(n):n==null&&c==="string"?(n="",h=!0):c==="number"&&(n=0,h=!0)}try{t[e]=n}catch{}h&&t.removeAttribute(a||e)}function ps(t,e,n,r){t.addEventListener(e,n,r)}function Oy(t,e,n,r){t.removeEventListener(e,n,r)}const bm=Symbol("_vei");function Iy(t,e,n,r,a=null){const l=t[bm]||(t[bm]={}),h=l[e];if(r&&h)h.value=r;else{const[c,p]=Hy(e);if(r){const v=l[e]=By(r,a);ps(t,c,v,p)}else h&&(Oy(t,c,h,p),l[e]=void 0)}}const ym=/(?:Once|Passive|Capture)$/;function Hy(t){let e;if(ym.test(t)){e={};let r;for(;r=t.match(ym);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):To(t.slice(2)),e]}let nh=0;const Py=Promise.resolve(),zy=()=>nh||(Py.then(()=>nh=0),nh=Date.now());function By(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;la(Fy(r,n.value),e,5,[r])};return n.value=t,n.attached=zy(),n}function Fy(t,e){if(Ft(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>a=>!a._stopped&&r&&r(a))}else return e}const wm=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,qy=(t,e,n,r,a,l)=>{const h=a==="svg";e==="class"?Cy(t,r,h):e==="style"?Dy(t,n,r):jc(e)?Qp(e)||Iy(t,e,n,r,l):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):jy(t,e,r,h))?(vm(t,e,r),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&gm(t,e,r,h,l,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!nr(r))?vm(t,mo(e),r,l,e):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),gm(t,e,r,h))};function jy(t,e,n,r){if(r)return!!(e==="innerHTML"||e==="textContent"||e in t&&wm(e)&&Vt(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 a=t.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return wm(e)&&nr(n)?!1:e in t}const xm=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ft(e)?n=>V0(e,n):e};function $y(t){t.target.composing=!0}function km(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const rh=Symbol("_assign"),Yv={created(t,{modifiers:{lazy:e,trim:n,number:r}},a){t[rh]=xm(a);const l=r||a.props&&a.props.type==="number";ps(t,e?"change":"input",h=>{if(h.target.composing)return;let c=t.value;n&&(c=c.trim()),l&&(c=Xh(c)),t[rh](c)}),n&&ps(t,"change",()=>{t.value=t.value.trim()}),e||(ps(t,"compositionstart",$y),ps(t,"compositionend",km),ps(t,"change",km))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:r,trim:a,number:l}},h){if(t[rh]=xm(h),t.composing)return;const c=(l||t.type==="number")&&!/^0\d/.test(t.value)?Xh(t.value):t.value,p=e??"";c!==p&&(document.activeElement===t&&t.type!=="range"&&(r&&e===n||a&&t.value.trim()===p)||(t.value=p))}},Uy=["ctrl","shift","alt","meta"],Vy={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)=>Uy.some(n=>t[`${n}Key`]&&!e.includes(n))},ss=(t,e)=>{const n=t._withMods||(t._withMods={}),r=e.join(".");return n[r]||(n[r]=(a,...l)=>{for(let h=0;h<e.length;h++){const c=Vy[e[h]];if(c&&c(a,e))return}return t(a,...l)})},Wy={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ih=(t,e)=>{const n=t._withKeys||(t._withKeys={}),r=e.join(".");return n[r]||(n[r]=a=>{if(!("key"in a))return;const l=To(a.key);if(e.some(h=>h===l||Wy[h]===l))return t(a)})},Gy=wr({patchProp:qy},Ay);let Sm;function Ky(){return Sm||(Sm=X5(Gy))}const Xy=(...t)=>{const e=Ky().createApp(...t),{mount:n}=e;return e.mount=r=>{const a=Yy(r);if(!a)return;const l=e._component;!Vt(l)&&!l.render&&!l.template&&(l.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const h=n(a,!1,Zy(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),h},e};function Zy(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Yy(t){return nr(t)?document.querySelector(t):t}const Jy="modulepreload",Qy=function(t){return"/"+t},Em={},sp=function(e,n,r){if(!n||n.length===0)return e();const a=document.getElementsByTagName("link");return Promise.all(n.map(l=>{if(l=Qy(l),l in Em)return;Em[l]=!0;const h=l.endsWith(".css"),c=h?'[rel="stylesheet"]':"";if(!!r)for(let b=a.length-1;b>=0;b--){const g=a[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":Jy,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})};var lp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function oL(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 a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}),n}var Qv={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,a){t.exports=a()})(lp,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),A=g.substring(0,C);g=g.substring(C),m=m.substring(C),C=this.diff_commonSuffix(g,m);var T=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 A&&M.unshift(new c.Diff(b,A)),T&&M.push(new c.Diff(b,T)),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,A=k.indexOf(C);if(A!=-1)return S=[new c.Diff(v,k.substring(0,A)),new c.Diff(b,C),new c.Diff(v,k.substring(A+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 T=this.diff_halfMatch_(g,m);if(T){var M=T[0],y=T[1],N=T[2],z=T[3],q=T[4],P=this.diff_main(M,N,x,w),Y=this.diff_main(y,z,x,w);return P.concat([new c.Diff(b,q)],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,A=0,T=0,M="",y="";C<k.length;){switch(k[C][0]){case v:T++,y+=k[C][1];break;case p:A++,M+=k[C][1];break;case b:if(A>=1&&T>=1){k.splice(C-A-T,A+T),C=C-A-T;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}T=0,A=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,A=2*k,T=new Array(A),M=new Array(A),y=0;y<A;y++)T[y]=-1,M[y]=-1;T[C+1]=0,M[C+1]=0;for(var N=w-S,z=N%2!=0,q=0,P=0,Y=0,te=0,ue=0;ue<k&&!(new Date().getTime()>x);ue++){for(var Le=-ue+q;Le<=ue-P;Le+=2){var qe=C+Le,Xe;Le==-ue||Le!=ue&&T[qe-1]<T[qe+1]?Xe=T[qe+1]:Xe=T[qe-1]+1;for(var it=Xe-Le;Xe<w&&it<S&&g.charAt(Xe)==m.charAt(it);)Xe++,it++;if(T[qe]=Xe,Xe>w)P+=2;else if(it>S)q+=2;else if(z){var $e=C+N-Le;if($e>=0&&$e<A&&M[$e]!=-1){var De=w-M[$e];if(Xe>=De)return this.diff_bisectSplit_(g,m,Xe,it,x)}}}for(var nt=-ue+Y;nt<=ue-te;nt+=2){var $e=C+nt,De;nt==-ue||nt!=ue&&M[$e-1]<M[$e+1]?De=M[$e+1]:De=M[$e-1]+1;for(var ut=De-nt;De<w&&ut<S&&g.charAt(w-De-1)==m.charAt(S-ut-1);)De++,ut++;if(M[$e]=De,De>w)te+=2;else if(ut>S)Y+=2;else if(!z){var qe=C+N-nt;if(qe>=0&&qe<A&&T[qe]!=-1){var Xe=T[qe],it=C+Xe-qe;if(De=w-De,Xe>=De)return this.diff_bisectSplit_(g,m,Xe,it,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),A=g.substring(x),T=m.substring(w),M=this.diff_main(k,C,!1,S),y=this.diff_main(A,T,!1,S);return M.concat(y)},c.prototype.diff_linesToChars_=function(g,m){var x=[],w={};x[0]="";function S(T){for(var M="",y=0,N=-1,z=x.length;N<T.length-1;){N=T.indexOf(`
`,y),N==-1&&(N=T.length-1);var q=T.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(q):w[q]!==void 0)?M+=String.fromCharCode(w[q]):(z==k&&(q=T.substring(y),N=T.length),M+=String.fromCharCode(z),w[q]=z,x[z++]=q),y=N+1}return M}var k=4e4,C=S(g);k=65535;var A=S(m);return{chars1:C,chars2:A,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 A=g.substring(S-C),T=m.indexOf(A);if(T==-1)return k;C+=T,(T==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 ue=P.substring(te,te+Math.floor(P.length/4)),Le=-1,qe="",Xe,it,$e,De;(Le=Y.indexOf(ue,Le+1))!=-1;){var nt=S.diff_commonPrefix(P.substring(te),Y.substring(Le)),ut=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Le));qe.length<ut+nt&&(qe=Y.substring(Le-ut,Le)+Y.substring(Le,Le+nt),Xe=P.substring(0,te-ut),it=P.substring(te+nt),$e=Y.substring(0,Le-ut),De=Y.substring(Le+nt))}return qe.length*2>=P.length?[Xe,it,$e,De,qe]:null}var C=k(x,w,Math.ceil(x.length/4)),A=k(x,w,Math.ceil(x.length/2)),T;if(!C&&!A)return null;A?C?T=C[4].length>A[4].length?C:A:T=A:T=C;var M,y,N,z;g.length>m.length?(M=T[0],y=T[1],N=T[2],z=T[3]):(N=T[0],z=T[1],M=T[2],y=T[3]);var q=T[4];return[M,y,N,z,q]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,A=0,T=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=T,A=M,T=0,M=0,S=g[k][1]):(g[k][0]==v?T+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,A)&&S.length<=Math.max(T,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,A=0,T=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),q=this.diff_commonOverlap_(N,y);z>=q?(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++):(q>=y.length/2||q>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,q))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-q),g[k+1][0]=p,g[k+1][1]=y.substring(q),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(q,P){if(!q||!P)return 6;var Y=q.charAt(q.length-1),te=P.charAt(0),ue=Y.match(c.nonAlphaNumericRegex_),Le=te.match(c.nonAlphaNumericRegex_),qe=ue&&Y.match(c.whitespaceRegex_),Xe=Le&&te.match(c.whitespaceRegex_),it=qe&&Y.match(c.linebreakRegex_),$e=Xe&&te.match(c.linebreakRegex_),De=it&&q.match(c.blanklineEndRegex_),nt=$e&&P.match(c.blanklineStartRegex_);return De||nt?5:it||$e?4:ue&&!qe&&Xe?3:qe||Xe?2:ue||Le?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 A=S.substring(S.length-C);w=w.substring(0,w.length-C),S=A+S.substring(0,S.length-C),k=A+k}for(var T=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,T=w,M=S,y=k)}g[x-1][1]!=T&&(T?g[x-1][1]=T:(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,A=!1,T=!1,M=!1;k<g.length;)g[k][0]==b?(g[k][1].length<this.Diff_EditCost&&(T||M)?(x[w++]=k,C=T,A=M,S=g[k][1]):(w=0,S=null),T=M=!1):(g[k][0]==p?M=!0:T=!0,S&&(C&&A&&T&&M||S.length<this.Diff_EditCost/2&&C+A+T+M==3)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,S=null,C&&A?(T=M=!0,w=0):(w--,k=w>0?x[w-1]:-1,T=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 A=!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),A=!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),A=!0)),m++;A&&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 A=g[C][0],T=g[C][1],M=T.replace(x,"&amp;").replace(w,"&lt;").replace(S,"&gt;").replace(k,"&para;<br>");switch(A){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 A=k[C].substring(1);switch(k[C].charAt(0)){case"+":try{x[w++]=new c.Diff(v,decodeURI(A))}catch{throw new Error("Illegal escape in diff_fromDelta: "+A)}break;case"-":case"=":var T=parseInt(A,10);if(isNaN(T)||T<0)throw new Error("Invalid number in diff_fromDelta: "+A);var M=g.substring(S,S+=T);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(Xe,it){var $e=Xe/m.length,De=Math.abs(x-it);return S.Match_Distance?$e+De/S.Match_Distance:De?1:$e}var C=this.Match_Threshold,A=g.indexOf(m,x);A!=-1&&(C=Math.min(k(0,A),C),A=g.lastIndexOf(m,x+m.length),A!=-1&&(C=Math.min(k(0,A),C)));var T=1<<m.length-1;A=-1;for(var M,y,N=m.length+g.length,z,q=0;q<m.length;q++){for(M=0,y=N;M<y;)k(q,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<<q)-1;for(var ue=Y;ue>=P;ue--){var Le=w[g.charAt(ue-1)];if(q===0?te[ue]=(te[ue+1]<<1|1)&Le:te[ue]=(te[ue+1]<<1|1)&Le|((z[ue+1]|z[ue])<<1|1)|z[ue+1],te[ue]&T){var qe=k(q,ue-1);if(qe<=C)if(C=qe,A=ue-1,A>x)P=Math.max(1,2*x-A);else break}}if(k(q+1,x)>C)break;z=te}return A},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,A=0,T=0,M=0,y=w,N=w,z=0;z<S.length;z++){var q=S[z][0],P=S[z][1];switch(!A&&q!==b&&(C.start1=T,C.start2=M),q){case v:C.diffs[A++]=S[z],C.length2+=P.length,N=N.substring(0,M)+P+N.substring(M);break;case p:C.length1+=P.length,C.diffs[A++]=S[z],N=N.substring(0,M)+N.substring(M+P.length);break;case b:P.length<=2*this.Patch_Margin&&A&&S.length!=z+1?(C.diffs[A++]=S[z],C.length1+=P.length,C.length2+=P.length):P.length>=2*this.Patch_Margin&&A&&(this.patch_addContext_(C,y),k.push(C),C=new c.patch_obj,A=0,y=N,T=M);break}q!==v&&(T+=P.length),q!==p&&(M+=P.length)}return A&&(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,A=this.diff_text1(g[k].diffs),T,M=-1;if(A.length>this.Match_MaxBits?(T=this.match_main(m,A.substring(0,this.Match_MaxBits),C),T!=-1&&(M=this.match_main(m,A.substring(A.length-this.Match_MaxBits),C+A.length-this.Match_MaxBits),(M==-1||T>=M)&&(T=-1))):T=this.match_main(m,A,C),T==-1)S[k]=!1,w-=g[k].length2-g[k].length1;else{S[k]=!0,w=T-C;var y;if(M==-1?y=m.substring(T,T+A.length):y=m.substring(T,M+this.Match_MaxBits),A==y)m=m.substring(0,T)+this.diff_text2(g[k].diffs)+m.substring(T+A.length);else{var N=this.diff_main(A,y,!1);if(A.length>this.Match_MaxBits&&this.diff_levenshtein(N)/A.length>this.Patch_DeleteThreshold)S[k]=!1;else{this.diff_cleanupSemanticLossless(N);for(var z=0,q,P=0;P<g[k].diffs.length;P++){var Y=g[k].diffs[P];Y[0]!==b&&(q=this.diff_xIndex(N,z)),Y[0]===v?m=m.substring(0,T+q)+Y[1]+m.substring(T+q):Y[0]===p&&(m=m.substring(0,T+q)+m.substring(T+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 A=new c.patch_obj,T=!0;for(A.start1=S-C.length,A.start2=k-C.length,C!==""&&(A.length1=A.length2=C.length,A.diffs.push(new c.Diff(b,C)));w.diffs.length!==0&&A.length1<m-this.Patch_Margin;){var M=w.diffs[0][0],y=w.diffs[0][1];M===v?(A.length2+=y.length,k+=y.length,A.diffs.push(w.diffs.shift()),T=!1):M===p&&A.diffs.length==1&&A.diffs[0][0]==b&&y.length>2*m?(A.length1+=y.length,S+=y.length,T=!1,A.diffs.push(new c.Diff(M,y)),w.diffs.shift()):(y=y.substring(0,m-A.length1-this.Patch_Margin),A.length1+=y.length,S+=y.length,M===b?(A.length2+=y.length,k+=y.length):T=!1,A.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(A.diffs),C=C.substring(C.length-this.Patch_Margin);var N=this.diff_text1(w.diffs).substring(0,this.Patch_Margin);N!==""&&(A.length1+=N.length,A.length2+=N.length,A.diffs.length!==0&&A.diffs[A.diffs.length-1][0]===b?A.diffs[A.diffs.length-1][1]+=N:A.diffs.push(new c.Diff(b,N))),T||g.splice(++x,0,A)}}},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 A=x[w].charAt(0);try{var T=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+T)}if(A=="-")C.diffs.push(new c.Diff(p,T));else if(A=="+")C.diffs.push(new c.Diff(v,T));else if(A==" ")C.diffs.push(new c.Diff(b,T));else{if(A=="@")break;if(A!=="")throw new Error('Invalid patch mode "'+A+'" in: '+T)}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:()=>Mt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(se){se===void 0&&(se=document);var fe=function(J){var Q=document.createElement("img");Q.src=J.getAttribute("data-src"),Q.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&Q.naturalHeight>Q.naturalWidth&&Q.naturalWidth/Q.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&Q.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=Q.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return se.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&fe(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),se.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(Q){(typeof Q.isIntersecting>"u"?Q.intersectionRatio!==0:Q.isIntersecting)&&Q.target.getAttribute("data-src")&&fe(Q.target)})}),se.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),A=p(280),T=p(637),M=p(825),y=p(11),N=p(194),z=p(436),q=p(229),P=p(145),Y=p(538),te=p(413),ue=p(106),Le=p(673),qe=function(se){document.querySelectorAll(".vditor-anchor").forEach(function(fe){se===1&&fe.classList.add("vditor-anchor--left"),fe.onclick=function(){var J=fe.getAttribute("href").substr(1),Q=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=Q}}),window.onhashchange=function(){var fe=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));fe&&(document.querySelector("html").scrollTop=fe.offsetTop)}},Xe=p(214),it=p(810),$e=function(se,fe){if(fe===void 0&&(fe="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var ge=speechSynthesis.getVoices(),ce,ve;return ge.forEach(function(Ee){Ee.lang===fe.replace("_","-")&&(ce=Ee),Ee.default&&(ve=Ee)}),ce||(ce=ve),ce},Q='<svg><use xlink:href="#vditor-icon-play"></use></svg>',Ie='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(Q='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',Ie='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var de=document.querySelector(".vditor-speech");de||(de=document.createElement("button"),de.className="vditor-speech",se.insertAdjacentElement("beforeend",de),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var W=J(),Z=new SpeechSynthesisUtterance;Z.voice=W,Z.onend=Z.onerror=function(){de.style.display="none",speechSynthesis.cancel(),de.classList.remove("vditor-speech--current"),de.innerHTML=Q},se.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(ge){var ce=ge.target;if(ce.classList.contains("vditor-speech")||ce.parentElement.classList.contains("vditor-speech")){de.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),de.innerHTML=Ie):(speechSynthesis.pause(),de.innerHTML=Q)):(Z.text=de.getAttribute("data-text"),speechSynthesis.speak(Z),de.classList.add("vditor-speech--current"),de.innerHTML=Ie),(0,it.Hc)(window.vditorSpeechRange),se.focus();return}if(de.style.display="none",speechSynthesis.cancel(),de.classList.remove("vditor-speech--current"),de.innerHTML=Q,getSelection().rangeCount!==0){var ve=getSelection().getRangeAt(0),Ee=ve.toString().trim();if(Ee){window.vditorSpeechRange=ve.cloneRange();var ze=ve.getBoundingClientRect();de.innerHTML=Q,de.style.display="block",de.style.top=ze.top+ze.height+document.querySelector("html").scrollTop-20+"px",window.ontouchstart!==void 0?de.style.left=ge.changedTouches[ge.changedTouches.length-1].pageX+2+"px":de.style.left=ge.clientX+2+"px",de.setAttribute("data-text",Ee)}}})}},De=function(se,fe,J,Q){function Ie(de){return de instanceof J?de:new J(function(W){W(de)})}return new(J||(J=Promise))(function(de,W){function Z(ve){try{ce(Q.next(ve))}catch(Ee){W(Ee)}}function ge(ve){try{ce(Q.throw(ve))}catch(Ee){W(Ee)}}function ce(ve){ve.done?de(ve.value):Ie(ve.value).then(Z,ge)}ce((Q=Q.apply(se,fe||[])).next())})},nt=function(se,fe){var J={label:0,sent:function(){if(de[0]&1)throw de[1];return de[1]},trys:[],ops:[]},Q,Ie,de,W;return W={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(W[Symbol.iterator]=function(){return this}),W;function Z(ce){return function(ve){return ge([ce,ve])}}function ge(ce){if(Q)throw new TypeError("Generator is already executing.");for(;W&&(W=0,ce[0]&&(J=0)),J;)try{if(Q=1,Ie&&(de=ce[0]&2?Ie.return:ce[0]?Ie.throw||((de=Ie.return)&&de.call(Ie),0):Ie.next)&&!(de=de.call(Ie,ce[1])).done)return de;switch(Ie=0,de&&(ce=[ce[0]&2,de.value]),ce[0]){case 0:case 1:de=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,Ie=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(de=J.trys,!(de=de.length>0&&de[de.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!de||ce[1]>de[0]&&ce[1]<de[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<de[1]){J.label=de[1],de=ce;break}if(de&&J.label<de[2]){J.label=de[2],J.ops.push(ce);break}de[2]&&J.ops.pop(),J.trys.pop();continue}ce=fe.call(se,J)}catch(ve){ce=[6,ve],Ie=0}finally{Q=de=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},ut=function(se){var fe,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 se.cdn&&(!((fe=se.theme)===null||fe===void 0)&&fe.path||(J.theme.path="".concat(se.cdn,"/dist/css/content-theme")),se.emojiPath||(J.emojiPath="".concat(se.cdn,"/dist/images/emoji"))),(0,Le.T)(J,se)},je=function(se,fe){var J=ut(fe);return(0,te.G)("".concat(J.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){var Q=(0,Xe.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 fe!=null&&fe.renderers&&Q.SetJSRenderers({renderers:{Md2HTML:fe.renderers}}),Q.SetHeadingID(!0),Q.Md2HTML(se)})},j=function(se,fe,J){return De(void 0,void 0,void 0,function(){var Q,Ie,de,W;return nt(this,function(Z){switch(Z.label){case 0:return Q=ut(J),[4,je(fe,Q)];case 1:if(Ie=Z.sent(),Q.transform&&(Ie=Q.transform(Ie)),se.innerHTML=Ie,se.classList.add("vditor-reset"),Q.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(Q.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return de="vditorI18nScript",W=de+Q.lang,document.querySelectorAll('head script[id^="'.concat(de,'"]')).forEach(function(ge){ge.id!==W&&document.head.removeChild(ge)}),[4,(0,te.G)("".concat(Q.cdn,"/dist/js/i18n/").concat(Q.lang,".js"),W)];case 3:Z.sent(),Z.label=4;case 4:return[3,6];case 5:window.VditorI18n=Q.i18n,Z.label=6;case 6:return Q.icon?[4,(0,te.G)("".concat(Q.cdn,"/dist/js/icons/").concat(Q.icon,".js"),"vditorIconScript")]:[3,8];case 7:Z.sent(),Z.label=8;case 8:return(0,Y.Z)(Q.theme.current,Q.theme.path),Q.anchor===1&&se.classList.add("vditor-reset--anchor"),(0,m.O)(se,Q.hljs),(0,S.s)(Q.hljs,se,Q.cdn),(0,C.H)(se,{cdn:Q.cdn,math:Q.math}),(0,T.i)(se,Q.cdn,Q.mode),(0,M.J)(se,Q.cdn,Q.mode),(0,y.K)(se,Q.cdn),(0,x.P)(se,Q.cdn),(0,w.v)(se,Q.cdn),(0,g.p)(se,Q.cdn,Q.mode),(0,N.P)(se,Q.cdn,Q.mode),(0,q.B)(se,Q.cdn),(0,v.Q)(se,Q.cdn),Q.render.media.enable&&(0,A.Y)(se),Q.speech.enable&&$e(se),Q.anchor!==0&&qe(Q.anchor),Q.after&&Q.after(),Q.lazyLoadImage&&k(se),se.addEventListener("click",function(ge){var ce=(0,ue.lG)(ge.target,"SPAN");if(ce&&(0,ue.fb)(ce,"vditor-toc")){var ve=se.querySelector("#"+ce.getAttribute("data-target-id"));ve&&window.scrollTo(window.scrollX,ve.offsetTop);return}}),[2]}})})},yt=p(190),It=p(580),bt=function(){function se(){}return se.adapterRender=b,se.previewImage=yt.E,se.codeRender=m.O,se.graphvizRender=w.v,se.highlightRender=S.s,se.mathRender=C.H,se.mermaidRender=T.i,se.SMILESRender=M.J,se.markmapRender=y.K,se.flowchartRender=x.P,se.chartRender=g.p,se.abcRender=v.Q,se.mindmapRender=N.P,se.plantumlRender=q.B,se.outlineRender=z.k,se.mediaRender=A.Y,se.speechRender=$e,se.lazyLoadImageRender=k,se.md2html=je,se.preview=j,se.setCodeTheme=It.Y,se.setContentTheme=Y.Z,se}();const Mt=bt},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 A=new SmiDrawer({},{});C.forEach(function(T){var M=g.SMILESRenderAdapter.getCode(T).trim();if(!(T.getAttribute("data-processed")==="true"||M.trim()==="")){var y="smiles"+(0,m.Wb)();T.innerHTML='<svg id="'.concat(y,'"></svg>'),A.draw(M,"#"+y,k==="dark"?"dark":void 0),T.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:()=>A});var v={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-math")}},b={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-smiles")}},g={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-mermaid")}},m={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-markmap")}},x={getCode:function(T){return T.getAttribute("data-code")},getElements:function(T){return T.querySelectorAll(".language-mindmap")}},w={getCode:function(T){return T.innerText},getElements:function(T){return T.querySelectorAll(".language-echarts")}},S={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-abc")}},k={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-graphviz")}},C={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-flowchart")}},A={getCode:function(T){return T.textContent},getElements:function(T){return T.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,A,T){function M(y){return y instanceof A?y:new A(function(N){N(y)})}return new(A||(A=Promise))(function(y,N){function z(Y){try{P(T.next(Y))}catch(te){N(te)}}function q(Y){try{P(T.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,q)}P((T=T.apply(k,C||[])).next())})},w=function(k,C){var A={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},T,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 q([P,Y])}}function q(P){if(T)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(A=0)),A;)try{if(T=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 A.label++,{value:P[1],done:!1};case 5:A.label++,M=P[1],P=[0];continue;case 7:P=A.ops.pop(),A.trys.pop();continue;default:if(y=A.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){A=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){A.label=P[1];break}if(P[0]===6&&A.label<y[1]){A.label=y[1],y=P;break}if(y&&A.label<y[2]){A.label=y[2],A.ops.push(P);break}y[2]&&A.ops.pop(),A.trys.pop();continue}P=C.call(k,A)}catch(Y){P=[6,Y],M=0}finally{T=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,A){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.chartRenderAdapter.getElements(k);T.length>0&&(0,b.G)("".concat(C,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){T.forEach(function(M){return x(void 0,void 0,void 0,function(){var y,N,z;return w(this,function(q){switch(q.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];q.label=1;case 1:return q.trys.push([1,3,,4]),M.getAttribute("data-processed")==="true"?[2]:[4,(0,m.Qf)(y)];case 2:return N=q.sent(),echarts.init(M,A==="dark"?"dark":void 0).setOption(N),M.setAttribute("data-processed","true"),[3,4];case 3:return z=q.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,A=w.innerText;if(w.classList.contains("highlight-chroma")){var T=w.cloneNode(!0);T.querySelectorAll(".highlight-ln").forEach(function(z){z.remove()}),A=T.innerText}else A.endsWith(`
`)&&(A=A.substr(0,A.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)(A),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 A=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),T=window.URL||window.webkitURL,M=T.createObjectURL(A),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"),A="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==A&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var T=w.querySelectorAll("pre > code");T.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,q=!1;(z==="pre-wrap"||z==="pre-line")&&(q=!0);var P="",Y=M.textContent.split(/\r\n|\r|\n/g);Y.pop(),Y.map(function(te){var ue="";q&&(N.textContent=te||`
`,ue=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(ue,"></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 A=k.transform(C),T=Object.keys(A.features).filter(function(q){return!m[q]});T.forEach(function(q){m[q]=!0});var M=k.getAssets(T),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),A},w=function(k,C){var A=window.markmap,T=A.Transformer,M=A.Markmap,y=A.deriveOptions;A.globalCSS;var N=new T;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,q=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,ue=te==null?void 0:te.markmap,Le=y(ue);q.setData(Y,Le),q.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.markmapRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){A.forEach(function(T){var M=g.markmapRenderAdapter.getCode(T);if(!(T.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",T.parentNode.appendChild(y),w(y,M),T.parentNode.childNodes[0].nodeName=="CODE"&&T.parentNode.removeChild(T.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 A={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},A.math,k.math)),k=Object.assign({},A,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 q=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",q.innerHTML),z.clipboardData.setData("text/plain",q.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var T=function(y){if(y.length!==0){var N=0,z=y[y.length-1],q=function(){var P=y[N++];P===z?P():P(q)};q()}};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(),q=window.MathJax.getMetricsFor(y);q.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,q).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(q){var P=C[q];!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){q===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);T(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/),A=S.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),T=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(A&&A[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='.concat(A[1],'"></iframe>')),w.remove();else if(T&&T[1])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="//coub.com/embed/`.concat(T[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 q={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,ue){if(te){ue===0&&(te=te.substr(1));var Le=te.split("=");q[Le[0]]=Le[1]}});var P="https://player.bilibili.com/player.html?",Y=Object.keys(q);Y.forEach(function(te,ue){P+="".concat(te,"=").concat(q[te]),ue<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,A,T){function M(y){return y instanceof A?y:new A(function(N){N(y)})}return new(A||(A=Promise))(function(y,N){function z(Y){try{P(T.next(Y))}catch(te){N(te)}}function q(Y){try{P(T.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,q)}P((T=T.apply(k,C||[])).next())})},w=function(k,C){var A={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},T,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 q([P,Y])}}function q(P){if(T)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(A=0)),A;)try{if(T=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 A.label++,{value:P[1],done:!1};case 5:A.label++,M=P[1],P=[0];continue;case 7:P=A.ops.pop(),A.trys.pop();continue;default:if(y=A.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){A=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){A.label=P[1];break}if(P[0]===6&&A.label<y[1]){A.label=y[1],y=P;break}if(y&&A.label<y[2]){A.label=y[2],A.ops.push(P);break}y[2]&&A.ops.pop(),A.trys.pop();continue}P=C.call(k,A)}catch(Y){P=[6,Y],M=0}finally{T=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,A){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.mermaidRenderAdapter.getElements(k);T.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}};A==="dark"&&(M.theme="dark"),mermaid.initialize(M),T.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,q,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 q=te.sent(),y.innerHTML=q.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 A=g.mindmapRenderAdapter.getCode(C);if(A)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(A))],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(T,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(T){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(T)}}})})}},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 A=Lute.New();A.SetToC(!0),C.innerHTML=A.HTML2VditorDOM("<p>[ToC]</p>"+S)}var T=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return T.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,T.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(A){k.className="vditor-reset--error",k.innerHTML="plantuml render error: <br>".concat(A)}}})})}},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 &nbsp;`).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 A=parseInt(C.getAttribute("data-deg"),10)+90;A/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(A,"deg)"):S.style.transform="".concat(k," rotateZ(").concat(A,"deg)"),C.setAttribute("data-deg",A.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(A,T){for(var M=k(A,T),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=k(M.parentElement,T),y?M=y:N=!0;return M||!1},g=function(A,T){for(var M=(0,v.S)(A,T),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=(0,v.S)(M.parentElement,T),y?M=y:N=!0;return M||!1},m=function(A){var T=g(A,"UL"),M=g(A,"OL"),y=T;return M&&(!T||T&&M.contains(T))&&(y=M),y},x=function(A,T,M){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);for(var y=A,N=!1;y&&!N&&!y.classList.contains("vditor-reset");)y.getAttribute(T)===M?N=!0:y=y.parentElement;return N&&y},w=function(A){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);var T=A,M=!1,y=x(A,"data-block","0");if(y)return y;for(;T&&!M&&!T.classList.contains("vditor-reset");)T.tagName==="H1"||T.tagName==="H2"||T.tagName==="H3"||T.tagName==="H4"||T.tagName==="H5"||T.tagName==="H6"||T.tagName==="P"||T.tagName==="BLOCKQUOTE"||T.tagName==="OL"||T.tagName==="UL"?M=!0:T=T.parentElement;return M&&T},S=function(A,T){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);for(var M=A,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.nodeName===T?y=!0:M=M.parentElement;return y&&M},k=function(A,T){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);for(var M=A,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.classList.contains(T)?y=!0:M=M.parentElement;return y&&M},C=function(A){for(;A&&A.lastChild;)A=A.lastChild;return A}},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:()=>A,oC:()=>T});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 q=y.startContainer.parentElement;if(q&&q.getClientRects().length>0)z=q.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 q=N.cloneRange();M.childNodes[0]&&M.childNodes[0].childNodes[0]?q.setStart(M.childNodes[0].childNodes[0],0):q.selectNodeContents(M),q.setEnd(N.startContainer,N.startOffset),z.start=q.toString().length,z.end=z.start+N.toString().length}return z},C=function(M,y,N){var z=0,q=0,P=N.childNodes[q],Y=!1,te=!1;M=Math.max(0,M),y=Math.max(0,y);var ue=N.ownerDocument.createRange();for(ue.setStart(P||N,0),ue.collapse(!0);!te&&P;){var Le=z+P.textContent.length;if(!Y&&M>=z&&M<=Le&&(M===0?ue.setStart(P,0):P.childNodes[0].nodeType===3?ue.setStart(P.childNodes[0],M-z):P.nextSibling?ue.setStartBefore(P.nextSibling):ue.setStartAfter(P),Y=!0,M===y)){te=!0;break}Y&&y>=z&&y<=Le&&(y===0?ue.setEnd(P,0):P.childNodes[0].nodeType===3?ue.setEnd(P.childNodes[0],y-z):P.nextSibling?ue.setEndBefore(P.nextSibling):ue.setEndAfter(P),te=!0),z=Le,P=N.childNodes[++q]}return!te&&N.childNodes[q-1]&&ue.setStartBefore(N.childNodes[q-1]),S(ue),ue},A=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)}},T=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 q=document.createElement("div");q.innerHTML=M;var P=m(y);if(P.toString()!==""&&(y[y.currentMode].preventInput=!0,document.execCommand("delete",!1,"")),q.firstElementChild&&q.firstElementChild.getAttribute("data-block")==="0"){q.lastElementChild.insertAdjacentHTML("beforeend","<wbr>");var Y=(0,g.F9)(P.startContainer);if(!Y)y[y.currentMode].element.insertAdjacentHTML("beforeend",q.innerHTML);else{var te=(0,g.lG)(P.startContainer,"LI");te&&q.firstElementChild.tagName==="UL"?te.insertAdjacentHTML("afterend",q.firstElementChild.innerHTML):Y.insertAdjacentHTML("afterend",q.innerHTML)}A(y[y.currentMode].element,P)}else{var ue=document.createElement("template");ue.innerHTML=M,P.insertNode(ue.content.cloneNode(!0)),P.collapse(!1),S(P)}}}},r={};function a(h){var c=r[h];if(c!==void 0)return c.exports;var p=r[h]={exports:{}};return n[h](p,p.exports,a),p.exports}a.d=(h,c)=>{for(var p in c)a.o(c,p)&&!a.o(h,p)&&Object.defineProperty(h,p,{enumerable:!0,get:c[p]})},a.o=(h,c)=>Object.prototype.hasOwnProperty.call(h,c),a.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var l={};return(()=>{a.d(l,{default:()=>Wd});var h=a(408),c=a(145),p=a(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=a(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(o){var s=this;o.devtools.element.style.display==="block"&&(0,b.G)("".concat(o.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(o.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(o.lute.RenderEChartsJSON(v(o))),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=a(410),x=function(i,o){o.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,o){o.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,o){o.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,o){o.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,o){o.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},A=function(i,o){o.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},T=function(i,o,s){o.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")),o.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&o.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,o,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")}),o.style.display==="block"?o.style.display="none":(T(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),o.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?o.classList.add("vditor-panel--left"):o.classList.remove("vditor-panel--left")))})},y=a(106),N=a(771),z=function(i,o,s,u){u&&console.log("".concat(i," - ").concat(s,": ").concat(o))},q=a(135),P=a(775),Y=a(428),te=a(325),ue=a(483),Le=a(999),qe=a(472),Xe=a(637),it=a(11),$e=a(194),De=a(229),nt=a(825),ut=function(i,o,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=o||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,"&amp;").replace(/</g,"&lt;"),"<wbr></code></pre></div>"):"\n```\n"+E.replace(/&/g,"&amp;").replace(/</g,"&lt;")+"\n```":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&amp;").replace(/</g,"&lt;"),"</code><wbr>"):"`".concat(E,"`")}return!1},je=function(i,o){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,q.Q)(i,o.options.cdn);else if(s==="mermaid")(0,Xe.i)(i,o.options.cdn,o.options.theme);else if(s==="smiles")(0,nt.J)(i,o.options.cdn,o.options.theme);else if(s==="markmap")(0,it.K)(i,o.options.cdn);else if(s==="flowchart")(0,te.P)(i,o.options.cdn);else if(s==="echarts")(0,P.p)(i,o.options.cdn,o.options.theme);else if(s==="mindmap")(0,$e.P)(i,o.options.cdn,o.options.theme);else if(s==="plantuml")(0,De.B)(i,o.options.cdn);else if(s==="graphviz")(0,ue.v)(i,o.options.cdn);else if(s==="math")(0,qe.H)(i,{cdn:o.options.cdn,math:o.options.preview.math});else{var u=o.options.customRenders.find(function(d){if(d.language===s)return d.render(i,o),!0});u||((0,Le.s)(Object.assign({},o.options.preview.hljs),i,o.options.cdn),(0,Y.O)(i,o.options.preview.hljs))}i.setAttribute("data-render","1")}},j=a(810),yt=function(i){if(i.currentMode!=="sv"){var o=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),o.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,qe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},It=function(i,o){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=o[o.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(o.options.height==="auto"){var d=u.offsetTop+o.element.offsetTop;o.options.toolbarConfig.pin||(d+=o.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else o.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,o.element.offsetTop),o[o.currentMode].element.scrollTop=u.offsetTop;return}},bt=function(i,o,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,j.im)(i,o[o.currentMode].element,u).start===0)return i.previousElementSibling.remove(),ct(o),!0;if(Yr(o,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,j.im)(i,o[o.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),ct(o),!0;if(Di(o,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(),ct(o),!0}},Mt=function(i,o,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(o.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(_o(d.innerHTML)&&d.previousElementSibling||No(d.innerHTML))return;for(var f=(0,j.im)(d,i.ir.element,o).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)(o.startContainer,"vditor-ir__marker");if(!_){var F=o.startContainer.previousSibling;F&&F.nodeType!==3&&F.classList.contains("vditor-ir__node--expand")&&F.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(ot){ot.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var X=(0,y.fb)(o.startContainer,"vditor-ir__preview");X?X.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):o.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(ot){ot.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var be=d.isEqualNode(i.ir.element),xe=(0,y.a1)(d,"data-type","footnotes-block"),pe="";if(be)pe=d.innerHTML;else{var Se=(0,N.S)(o.startContainer,"BLOCKQUOTE"),ke=(0,y.O9)(o.startContainer);if(ke&&(d=ke),Se&&(!ke||ke&&!Se.contains(ke))&&(d=Se),xe&&(d=xe),pe=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var me=d.previousElementSibling,Pe=d.nextElementSibling;me&&(me.tagName==="UL"||me.tagName==="OL")&&(pe=me.outerHTML+pe,me.remove()),Pe&&(Pe.tagName==="UL"||Pe.tagName==="OL")&&(pe=pe+Pe.outerHTML,Pe.remove()),pe=pe.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"&&(pe=d.previousElementSibling.outerHTML+pe,d.previousElementSibling.remove());d.innerText.startsWith("```")||(i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(ot){ot&&!d.isEqualNode(ot)&&(pe+=ot.outerHTML,ot.remove())}),i.ir.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(ot){ot&&!d.isEqualNode(ot)&&(pe+=ot.outerHTML,ot.remove())}))}if(z("SpinVditorIRDOM",pe,"argument",i.options.debugger),pe=i.lute.SpinVditorIRDOM(pe),z("SpinVditorIRDOM",pe,"result",i.options.debugger),be)d.innerHTML=pe;else if(d.outerHTML=pe,xe){var Ce=(0,y.a1)(i.ir.element.querySelector("wbr"),"data-type","footnotes-def");if(Ce){var Ve=Ce.textContent,Et=Ve.substring(1,Ve.indexOf("]:")),wt=i.ir.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(Et,'"]'));wt&&wt.setAttribute("aria-label",Ve.substr(Et.length+3).trim().substr(0,24))}}var Ct,vn=i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");vn.forEach(function(ot,Ut){Ut===0?Ct=ot:(Ct.insertAdjacentHTML("beforeend",ot.innerHTML),ot.remove())}),vn.length>0&&i.ir.element.insertAdjacentElement("beforeend",vn[0]);var Yt,bn=i.ir.element.querySelectorAll("[data-type='footnotes-block']");bn.forEach(function(ot,Ut){Ut===0?Yt=ot:(Yt.insertAdjacentHTML("beforeend",ot.innerHTML),ot.remove())}),bn.length>0&&i.ir.element.insertAdjacentElement("beforeend",bn[0]),(0,j.ib)(i.ir.element,o),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(ot){je(ot,i)}),yt(i),lr(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},se=function(i,o){if(i==="")return!1;if(i.indexOf("⇧")===-1&&i.indexOf("⌘")===-1&&i.indexOf("⌥")===-1)return!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&o.code===i;if(i==="⇧Tab")return!!(!(0,m.yl)(o)&&!o.altKey&&o.shiftKey&&o.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)(o):!(0,m.yl)(o))&&o.altKey&&!o.shiftKey&&o.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)(o)&&o.key.toLowerCase()===f.toLowerCase()&&!o.altKey&&(!d&&!o.shiftKey||d&&o.shiftKey))},fe=function(i){var o=i.startContainer;if(o.nodeType===3&&o.nodeValue.length!==i.startOffset)return!1;for(var s=o.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)(o,"vditor-ir__marker");if(u&&!u.nextSibling){var d=o.parentElement.parentElement.nextSibling;if(d&&d.nodeType!==3&&d.classList.contains("vditor-ir__node"))return d}return!1}return!1},J=function(i){var o=i.startContainer,s=o.previousSibling;return o.nodeType===3&&i.startOffset===0&&s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block")?s:!1},Q=function(i,o){o.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=fe(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}}},Ie=function(i,o){if(i.ir.composingLock=o.isComposing,o.isComposing)return!1;o.key.indexOf("Arrow")===-1&&o.key!=="Meta"&&o.key!=="Control"&&o.key!=="Alt"&&o.key!=="Shift"&&o.key!=="CapsLock"&&o.key!=="Escape"&&!/^F\d{1,2}$/.test(o.key)&&i.undo.recordFirstPosition(i,o);var s=(0,j.zh)(i),u=s.startContainer;if(!Wi(o,i,u)||(eo(s,i,o),Xs(s),o.key!=="Enter"&&o.key!=="Tab"&&o.key!=="Backspace"&&o.key.indexOf("Arrow")===-1&&!(0,m.yl)(o)&&o.key!=="Escape"&&o.key!=="Delete"))return!1;var d=(0,y.a1)(u,"data-newline","1");if(!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&o.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(Bs(o,i,L,s)||zs(s,i,L,o)||Ws(i,s,o,L))return!0;var D=(0,y.fb)(u,"vditor-ir__marker--pre");if(D&&D.tagName==="PRE"){var _=D.firstChild;if(Vs(i,o,D,s)||(_.getAttribute("data-type")==="math-block"||_.getAttribute("data-type")==="html-block")&&Yr(i,o,s,_,D.parentElement)||Di(i,o,s,_,D.parentElement))return!0}var F=(0,y.a1)(u,"data-type","code-block-info");if(F){if(o.key==="Enter"||o.key==="Tab")return s.selectNodeContents(F.nextElementSibling.firstChild),s.collapse(!0),o.preventDefault(),T(i,["hint"]),!0;if(o.key==="Backspace"){var X=(0,j.im)(F,i.ir.element).start;X===1&&s.setStart(u,0),X===2&&(i.hint.recentLanguage="")}if(Yr(i,o,s,F,F.parentElement))return T(i,["hint"]),!0}var be=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(o.key.indexOf("Arrow")>-1&&be){var xe=Lu(be);if(xe&&Yr(i,o,s,be,xe))return!0;var pe=_u(be);if(pe&&Di(i,o,s,be,pe))return!0}if(Us(i,o,s)||Gs(i,s,o)||Do(i,s,o))return!0;var Se=(0,N.W)(u);if(Se){if(se("⌘=",o)){var ke=Se.querySelector(".vditor-ir__marker--heading");return ke&&ke.textContent.trim().length>1&&Ri(i,ke.textContent.substr(1)),o.preventDefault(),!0}if(se("⌘-",o)){var ke=Se.querySelector(".vditor-ir__marker--heading");return ke&&ke.textContent.trim().length<6&&Ri(i,ke.textContent.trim()+"# "),o.preventDefault(),!0}}var me=(0,y.F9)(u);if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&s.toString()===""){if(Ks(i,s,o,L))return!0;if(me&&me.previousElementSibling&&me.tagName!=="UL"&&me.tagName!=="OL"&&(me.previousElementSibling.getAttribute("data-type")==="code-block"||me.previousElementSibling.getAttribute("data-type")==="math-block")){var Pe=(0,j.im)(me,i.ir.element,s).start;if(Pe===0||Pe===1&&me.innerText.startsWith(c.g.ZWSP))return s.selectNodeContents(me.previousElementSibling.querySelector(".vditor-ir__marker--pre code")),s.collapse(!1),Q(s,i),me.textContent.trim().replace(c.g.ZWSP,"")===""&&(me.remove(),lr(i)),o.preventDefault(),!0}if(Se){var Ce=Se.firstElementChild.textContent.length;(0,j.im)(Se,i.ir.element).start===Ce&&Ce!==0&&(s.setStart(Se.firstElementChild.firstChild,Ce-1),s.collapse(!0),(0,j.Hc)(s))}}return(o.key==="ArrowUp"||o.key==="ArrowDown")&&me&&(me.querySelectorAll(".vditor-ir__node").forEach(function(Ve){Ve.contains(u)||Ve.classList.add("vditor-ir__node--hidden")}),Zs(o,me,s))?!0:(to(s,o.key),me&&bt(me,i,o,s)?(o.preventDefault(),!0):!1)},de=a(190),W=function(i,o){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()}o&&o(u)})},Z=function(i,o){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&&o&&(o.inputType==="deleteContentBackward"||o.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){ne(i);return}if(o.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 F=B(d,"code-block-open-marker");if(F){F.textContent=_.textContent,ne(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var F=B(d,"code-block-close-marker",!1);if(F){F.textContent=_.textContent,ne(i);return}}}var X=(0,y.a1)(d,"data-type","math-block-open-marker");if(X){var be=X.nextElementSibling.nextElementSibling;be&&be.getAttribute("data-type")==="math-block-close-marker"&&(be.remove(),ne(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(me){me.textContent.length===1&&me.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(me){me.textContent.length===1&&me.remove()});var xe=(0,y.a1)(d,"data-type","heading-marker");if(xe&&xe.textContent.indexOf("#")===-1){ne(i);return}}if((o.data===" "||o.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"))){ne(i);return}}if(f&&f.textContent.trimRight()==="$$"){ne(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(me){me.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(me){me.outerHTML=me.innerHTML});var pe=f.textContent,Se=f.isEqualNode(i.sv.element);if(Se)pe=f.textContent;else{f.previousElementSibling&&(pe=f.previousElementSibling.textContent+pe,f.previousElementSibling.remove()),f.previousElementSibling&&pe.indexOf(`---
`)===0&&(pe=f.previousElementSibling.textContent+pe,f.previousElementSibling.remove());var ke="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(me,Pe){me&&!f.isEqualNode(me.parentElement)&&(ke+=me.parentElement.textContent+`
`,me.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(me,Pe){me&&!f.isEqualNode(me.parentElement)&&(ke+=me.parentElement.textContent+`
`,me.parentElement.remove())}),pe=ke+pe}pe=V(pe,i),Se?f.innerHTML=pe:f.outerHTML=pe,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(me){i.sv.element.insertAdjacentElement("beforeend",me.parentElement)}),W(i.sv.element,function(me){i.sv.element.insertAdjacentElement("beforeend",me)}),(0,j.ib)(i.sv.element,u),Bt(i),ne(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},ge=function(i,o){var s,u,d,f,E;if(i.sv.composingLock=o.isComposing,o.isComposing||(o.key.indexOf("Arrow")===-1&&o.key!=="Meta"&&o.key!=="Control"&&o.key!=="Alt"&&o.key!=="Shift"&&o.key!=="CapsLock"&&o.key!=="Escape"&&!/^F\d{1,2}$/.test(o.key)&&i.undo.recordFirstPosition(i,o),o.key!=="Enter"&&o.key!=="Tab"&&o.key!=="Backspace"&&o.key.indexOf("Arrow")===-1&&!(0,m.yl)(o)&&o.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"),F=(0,y.a1)(D,"data-type","blockquote-marker");if(!F&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(F=_.previousElementSibling),F&&o.key==="Enter"&&!(0,m.yl)(o)&&!o.altKey&&F.nextElementSibling.textContent.trim()===""&&(0,j.im)(F,i.sv.element,L).start===F.textContent.length)return((s=F.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&F.previousElementSibling.setAttribute("data-action","enter-remove"),F.remove(),ne(i),o.preventDefault(),!0;var X=(0,y.a1)(D,"data-type","li-marker"),be=(0,y.a1)(D,"data-type","task-marker"),xe=X;if(xe||be&&be.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(xe=be),!xe&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(xe=_.previousElementSibling),xe){var pe=(0,j.im)(xe,i.sv.element,L).start,Se=xe.getAttribute("data-type")==="task-marker",ke=xe;if(Se&&(ke=xe.previousElementSibling.previousElementSibling.previousElementSibling),pe===xe.textContent.length){if(o.key==="Enter"&&!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&xe.nextElementSibling.textContent.trim()==="")return((u=ke.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(ke.previousElementSibling.remove(),Z(i)):(Se&&(ke.remove(),xe.previousElementSibling.previousElementSibling.remove(),xe.previousElementSibling.remove()),xe.nextElementSibling.remove(),xe.remove(),ne(i)),o.preventDefault(),!0;if(o.key==="Tab")return o.shiftKey?ke.previousElementSibling.getAttribute("data-type")==="padding"&&ke.previousElementSibling.remove():ke.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(ke.textContent.replace(/\S/g," "),"</span>")),/^\d/.test(ke.textContent)&&(ke.textContent=ke.textContent.replace(/^\d{1,}/,"1"),L.selectNodeContents(xe.firstChild),L.collapse(!1)),Z(i),o.preventDefault(),!0}}if(Do(i,L,o))return!0;var me=(0,y.a1)(D,"data-block","0"),Pe=(0,N.S)(D,"SPAN");if(o.key==="Enter"&&!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&me){var Ce=!1,Ve=me.textContent.match(/^\n+/);(0,j.im)(me,i.sv.element).start<=(Ve?Ve[0].length:0)&&(Ce=!0);var Et=`
`;if(Pe){if(((d=Pe.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return Pe.previousElementSibling.remove(),ne(i),o.preventDefault(),!0;Et+=ee(Pe)}return L.insertNode(document.createTextNode(Et)),L.collapse(!1),me&&me.textContent.trim()!==""&&!Ce?Z(i):ne(i),o.preventDefault(),!0}if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey){if(Pe&&((f=Pe.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,j.im)(Pe,i.sv.element,L).start===1&&Pe.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(Pe,0),L.extractContents(),Pe.textContent.trim()!==""?Z(i):ne(i),o.preventDefault(),!0;if(me&&(0,j.im)(me,i.sv.element,L).start===0&&me.previousElementSibling){L.extractContents();var wt=me.previousElementSibling.lastElementChild;return wt.getAttribute("data-type")==="newline"&&(wt.remove(),wt=me.previousElementSibling.lastElementChild),wt.getAttribute("data-type")!=="newline"&&(wt.insertAdjacentHTML("afterend",me.innerHTML),me.remove()),me.textContent.trim()!==""&&!(!((E=me.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?Z(i):(wt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(wt.lastChild),L.collapse(!1)),ne(i)),o.preventDefault(),!0}}return!1},ce=a(538),ve=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ee=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),ve(i),(0,ce.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 o=document.createElement("div");if(o.className="vditor-content",i.options.outline.position==="left"&&o.appendChild(i.outline.element),o.appendChild(i.wysiwyg.element.parentElement),o.appendChild(i.sv.element),o.appendChild(i.ir.element.parentElement),o.appendChild(i.preview.element),i.toolbar.elements.devtools&&o.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),o.appendChild(i.outline.element)),i.upload&&o.appendChild(i.upload.element),i.options.resize.enable&&o.appendChild(i.resize.element),o.appendChild(i.hint.element),o.appendChild(i.tip.element),i.element.appendChild(o),o.addEventListener("click",function(){T(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),Ln(i,i.options.mode,at(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)}},ze=function(i){var o=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(o,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(o,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"},We=function(i){if(i.options.typewriterMode){var o=window.innerHeight;typeof i.options.height=="number"?(o=i.options.height,typeof i.options.minHeight=="number"&&(o=Math.max(o,i.options.minHeight)),o=Math.min(window.innerHeight,o)):o=i.element.clientHeight,i.element.classList.contains("vditor--fullscreen")&&(o=window.innerHeight),i[i.currentMode].element.style.setProperty("--editor-bottom",(o-i.toolbar.element.offsetHeight)/2+"px")}},Ze;function Be(){window.removeEventListener("resize",Ze)}var at=function(i){We(i),Be(),window.addEventListener("resize",Ze=function(){ze(i),We(i)});var o=(0,m.pK)()&&localStorage.getItem(i.options.cache.id);return(!i.options.cache.enable||!o)&&(i.options.value?o=i.options.value:i.originalInnerHTML?o=i.lute.HTML2Md(i.originalInnerHTML):i.options.cache.enable||(o="")),o||""},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 o=(0,j.zh)(i),s=o.startContainer;o.startContainer.nodeType===3&&(s=o.startContainer.parentElement),s.classList.contains("vditor-reset")&&(s=s.childNodes[o.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 F=(0,y.a1)(s,"data-type","code-block");F&&(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 be=(0,y.a1)(s,"data-type","table");be&&k(i.toolbar.elements,["headings","list","ordered-list","check","line","quote","code","table"])}},200)},He=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),o.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"&&o.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),o.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},gt=function(i){for(var o=i.previousSibling;o;){if(o.nodeType!==3&&o.tagName==="A"&&!o.previousSibling&&o.innerHTML.replace(c.g.ZWSP,"")===""&&o.nextSibling)return o;o=o.previousSibling}return!1},kt=function(i){for(var o=i.startContainer.nextSibling;o&&o.textContent==="";)o=o.nextSibling;return!!(o&&o.nodeType!==3&&(o.tagName==="CODE"||o.getAttribute("data-type")==="math-inline"||o.getAttribute("data-type")==="html-entity"||o.getAttribute("data-type")==="html-inline"))},jt=function(i){for(var o="",s=i.nextSibling;s;)s.nodeType===3?o+=s.textContent:o+=s.outerHTML,s=s.nextSibling;return o},$t=function(i){for(var o="",s=i.previousSibling;s;)s.nodeType===3?o=s.textContent+o:o=s.outerHTML+o,s=s.previousSibling;return o},Mn=function(i){for(var o=i;o&&!o.nextSibling;)o=o.parentElement;return o.nextSibling},gn=function(i){var o=$t(i.startContainer),s=jt(i.startContainer),u=i.startContainer.textContent,d=i.startOffset,f="",E="";return(u.substr(0,d)!==""&&u.substr(0,d)!==c.g.ZWSP||o)&&(f="".concat(o).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}},Rn=function(i,o){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=o.startContainer.nodeType===3?o.startOffset:s.textContent.length;return s.parentNode.insertBefore(u,s),s.remove(),o.setStart(u.firstChild,Math.min(u.firstChild.textContent.length,d)),o.collapse(!0),(0,j.Hc)(o),!0}else if(!s.getAttribute("data-block"))return s.tagName==="P"?s.remove():(s.tagName==="DIV"?(o.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>"):(o.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"</p>")),(0,j.ib)(i.wysiwyg.element,o),o=getSelection().getRangeAt(0)),!0})},ln=function(i,o){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(o,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(o,">"):u.outerHTML="<".concat(o,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(o,">"),(0,j.ib)(i.wysiwyg.element,s),yt(i))},Qn=function(i){var o=getSelection().getRangeAt(0),s=(0,y.F9)(o.startContainer);s||(s=o.startContainer.childNodes[o.startOffset]),s&&(o.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>"),(0,j.ib)(i.wysiwyg.element,o)),i.wysiwyg.popover.style.display="none"},Cn=function(i,o,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")&&Bt(o)},xn=function(i,o){if(i.wysiwyg.composingLock=o.isComposing,o.isComposing)return!1;o.key.indexOf("Arrow")===-1&&o.key!=="Meta"&&o.key!=="Control"&&o.key!=="Alt"&&o.key!=="Shift"&&o.key!=="CapsLock"&&o.key!=="Escape"&&!/^F\d{1,2}$/.test(o.key)&&i.undo.recordFirstPosition(i,o);var s=(0,j.zh)(i),u=s.startContainer;if(!Wi(o,i,u)||(eo(s,i,o),Xs(s),o.key!=="Enter"&&o.key!=="Tab"&&o.key!=="Backspace"&&o.key.indexOf("Arrow")===-1&&!(0,m.yl)(o)&&o.key!=="Escape"&&o.key!=="Delete"))return!1;var d=(0,y.F9)(u),f=(0,y.lG)(u,"P");if(Bs(o,i,f,s)||zs(s,i,f,o)||Us(i,o,s))return!0;var E=(0,y.fb)(u,"vditor-wysiwyg__block");if(E){if(o.key==="Escape"&&E.children.length===2)return i.wysiwyg.popover.style.display="none",E.firstElementChild.style.display="none",i.wysiwyg.element.blur(),o.preventDefault(),!0;if(!(0,m.yl)(o)&&!o.shiftKey&&o.altKey&&o.key==="Enter"&&E.getAttribute("data-type")==="code-block"){var L=i.wysiwyg.popover.querySelector(".vditor-input");return L.focus(),L.select(),o.preventDefault(),!0}if(E.getAttribute("data-block")==="0"&&(Vs(i,o,E.firstElementChild,s)||Di(i,o,s,E.firstElementChild,E)||E.getAttribute("data-type")!=="yaml-front-matter"&&Yr(i,o,s,E.firstElementChild,E)))return!0}if(Ws(i,s,o,f))return!0;var D=(0,y.E2)(u,"BLOCKQUOTE");if(D&&!o.shiftKey&&o.altKey&&o.key==="Enter"){(0,m.yl)(o)?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),He(i),Bt(i),o.preventDefault(),!0}var F=(0,N.W)(u);if(F){if(F.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&o.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),He(i),Bt(i),o.preventDefault(),!0}if(se("⌘=",o)){var be=parseInt(F.tagName.substr(1),10)-1;return be>0&&(ln(i,"h".concat(be)),He(i)),o.preventDefault(),!0}if(se("⌘-",o)){var be=parseInt(F.tagName.substr(1),10)+1;return be<7&&(ln(i,"h".concat(be)),He(i)),o.preventDefault(),!0}o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&F.textContent.length===1&&Qn(i)}if(Gs(i,s,o))return!0;if(o.altKey&&o.key==="Enter"&&!(0,m.yl)(o)&&!o.shiftKey){var xe=(0,y.lG)(u,"A"),pe=(0,y.a1)(u,"data-type","link-ref"),Se=(0,y.a1)(u,"data-type","footnotes-ref");if(xe||pe||Se||F&&F.tagName.length===2){var ke=i.wysiwyg.popover.querySelector("input");ke.focus(),ke.select()}}if(zt(i,o))return!0;if(se("⇧⌘U",o)){var me=i.wysiwyg.popover.querySelector('[data-type="up"]');if(me)return me.click(),o.preventDefault(),!0}if(se("⇧⌘D",o)){var me=i.wysiwyg.popover.querySelector('[data-type="down"]');if(me)return me.click(),o.preventDefault(),!0}if(Do(i,s,o))return!0;if(!(0,m.yl)(o)&&o.shiftKey&&!o.altKey&&o.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),He(i),Bt(i),o.preventDefault(),!0;if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&s.toString()===""){if(Ks(i,s,o,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 Pe=(0,j.im)(d,i.wysiwyg.element,s).start;if(Pe===0&&s.startOffset===0||Pe===1&&d.innerText.startsWith(c.g.ZWSP))return Cn(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),He(i)),o.preventDefault(),!0}var Ce=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Ce-2)===`
`&&u.textContent.charAt(Ce-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Ce-1)+c.g.ZWSP,s.setStart(u,Ce),s.collapse(!0),He(i),o.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&kt(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(Et){Et.firstElementChild.style.display="inline",Et.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(Et){Et.firstElementChild.style.display="inline",Et.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"&&(o.key==="Backspace"||o.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),o.preventDefault(),!0;if(Zs(o,d,s))return o.preventDefault(),!0;if(to(s,o.key),o.key==="ArrowDown"){var Ve=u.nextSibling;Ve&&Ve.nodeType!==3&&Ve.getAttribute("data-type")==="math-inline"&&s.setStartAfter(Ve)}return d&&bt(d,i,o,s)?(o.preventDefault(),!0):!1},zt=function(i,o){if(se("⇧⌘X",o)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),o.preventDefault(),!0}},Pn=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 o=getSelection().getRangeAt(0),s=o.startContainer;o.startContainer.nodeType===3?s=o.startContainer.parentElement:s=s.childNodes[o.startOffset>=s.childNodes.length?s.childNodes.length-1:o.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",Jt(u,i),Qt(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(Re){Re.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(Re){if(L.includes(Re))return E=[Re],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Re){Re.getAttribute("data-cmtids").indexOf(E[0])>-1&&Re.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),F=(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"])):F?(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="",Jt(X,i),Qt(i,"vditor-toc"),nn(i,X);return}var be=(0,N.S)(s,"BLOCKQUOTE");if(be&&(i.wysiwyg.popover.innerHTML="",er(o,be,i),or(o,be,i),Jt(be,i),Qt(i,"blockquote"),nn(i,be)),d&&(i.wysiwyg.popover.innerHTML="",er(o,d,i),or(o,d,i),Jt(d,i),Qt(i,"li"),nn(i,d)),_){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var xe=function(){var Re=_.rows.length,dt=_.rows[0].cells.length,vr=parseInt(Ut.value,10)||Re,br=parseInt(kn.value,10)||dt;if(!(vr===Re&&dt===br)){if(dt!==br)for(var Ii=br-dt,Xn=0;Xn<_.rows.length;Xn++)if(Ii>0)for(var ol=0;ol<Ii;ol++)Xn===0?_.rows[Xn].lastElementChild.insertAdjacentHTML("afterend","<th> </th>"):_.rows[Xn].lastElementChild.insertAdjacentHTML("afterend","<td> </td>");else for(var Ho=dt-1;Ho>=br;Ho--)_.rows[Xn].cells[Ho].remove();if(Re!==vr){var sl=vr-Re;if(sl>0){for(var Po="<tr>",ei=0;ei<br;ei++)Po+="<td> </td>";for(var ll=0;ll<sl;ll++)_.querySelector("tbody")?_.querySelector("tbody").insertAdjacentHTML("beforeend",Po):_.querySelector("thead").insertAdjacentHTML("afterend",Po+"</tr>")}else for(var ei=Re-1;ei>=vr;ei--)_.rows[ei].remove(),_.rows.length===1&&_.querySelector("tbody").remove()}typeof i.options.input=="function"&&i.options.input(v(i))}},pe=function(Re){va(_,Re),Re==="right"?(Pe.classList.remove("vditor-icon--current"),Ce.classList.remove("vditor-icon--current"),Ve.classList.add("vditor-icon--current")):Re==="center"?(Pe.classList.remove("vditor-icon--current"),Ve.classList.remove("vditor-icon--current"),Ce.classList.add("vditor-icon--current")):(Ce.classList.remove("vditor-icon--current"),Ve.classList.remove("vditor-icon--current"),Pe.classList.add("vditor-icon--current")),(0,j.Hc)(o),He(i)},Se=(0,y.lG)(s,"TD"),ke=(0,y.lG)(s,"TH"),me="left";Se?me=Se.getAttribute("align")||"left":ke&&(me=ke.getAttribute("align")||"center");var Pe=document.createElement("button");Pe.setAttribute("type","button"),Pe.setAttribute("aria-label",window.VditorI18n.alignLeft+"<"+(0,m.ns)("⇧⌘L")+">"),Pe.setAttribute("data-type","left"),Pe.innerHTML='<svg><use xlink:href="#vditor-icon-align-left"></use></svg>',Pe.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(me==="left"?" vditor-icon--current":""),Pe.onclick=function(){pe("left")};var Ce=document.createElement("button");Ce.setAttribute("type","button"),Ce.setAttribute("aria-label",window.VditorI18n.alignCenter+"<"+(0,m.ns)("⇧⌘C")+">"),Ce.setAttribute("data-type","center"),Ce.innerHTML='<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',Ce.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(me==="center"?" vditor-icon--current":""),Ce.onclick=function(){pe("center")};var Ve=document.createElement("button");Ve.setAttribute("type","button"),Ve.setAttribute("aria-label",window.VditorI18n.alignRight+"<"+(0,m.ns)("⇧⌘R")+">"),Ve.setAttribute("data-type","right"),Ve.innerHTML='<svg><use xlink:href="#vditor-icon-align-right"></use></svg>',Ve.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(me==="right"?" vditor-icon--current":""),Ve.onclick=function(){pe("right")};var Et=document.createElement("button");Et.setAttribute("type","button"),Et.setAttribute("aria-label",window.VditorI18n.insertRowBelow+"<"+(0,m.ns)("⌘=")+">"),Et.setAttribute("data-type","insertRow"),Et.innerHTML='<svg><use xlink:href="#vditor-icon-insert-row"></use></svg>',Et.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Et.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&Fs(i,o,dt)};var wt=document.createElement("button");wt.setAttribute("type","button"),wt.setAttribute("aria-label",window.VditorI18n.insertRowAbove+"<"+(0,m.ns)("⇧⌘F")+">"),wt.setAttribute("data-type","insertRow"),wt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-rowb"></use></svg>',wt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",wt.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&qs(i,o,dt)};var Ct=document.createElement("button");Ct.setAttribute("type","button"),Ct.setAttribute("aria-label",window.VditorI18n.insertColumnRight+"<"+(0,m.ns)("⇧⌘=")+">"),Ct.setAttribute("data-type","insertColumn"),Ct.innerHTML='<svg><use xlink:href="#vditor-icon-insert-column"></use></svg>',Ct.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Ct.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&ba(i,_,dt)};var vn=document.createElement("button");vn.setAttribute("type","button"),vn.setAttribute("aria-label",window.VditorI18n.insertColumnLeft+"<"+(0,m.ns)("⇧⌘G")+">"),vn.setAttribute("data-type","insertColumn"),vn.innerHTML='<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>',vn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",vn.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&ba(i,_,dt,"beforebegin")};var Yt=document.createElement("button");Yt.setAttribute("type","button"),Yt.setAttribute("aria-label",window.VditorI18n["delete-row"]+"<"+(0,m.ns)("⌘-")+">"),Yt.setAttribute("data-type","deleteRow"),Yt.innerHTML='<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>',Yt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Yt.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&js(i,o,dt)};var bn=document.createElement("button");bn.setAttribute("type","button"),bn.setAttribute("aria-label",window.VditorI18n["delete-column"]+"<"+(0,m.ns)("⇧⌘-")+">"),bn.setAttribute("data-type","deleteColumn"),bn.innerHTML='<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>',bn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",bn.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&$s(i,o,_,dt)};var ot=document.createElement("span");ot.setAttribute("aria-label",window.VditorI18n.row),ot.className="vditor-tooltipped vditor-tooltipped__n";var Ut=document.createElement("input");ot.appendChild(Ut),Ut.type="number",Ut.min="1",Ut.className="vditor-input",Ut.style.width="42px",Ut.style.textAlign="center",Ut.setAttribute("placeholder",window.VditorI18n.row),Ut.value=_.rows.length.toString(),Ut.oninput=function(){xe()},Ut.onkeydown=function(Re){if(!Re.isComposing){if(Re.key==="Tab"){kn.focus(),kn.select(),Re.preventDefault();return}zt(i,Re)||an(Re,o)}};var xa=document.createElement("span");xa.setAttribute("aria-label",window.VditorI18n.column),xa.className="vditor-tooltipped vditor-tooltipped__n";var kn=document.createElement("input");xa.appendChild(kn),kn.type="number",kn.min="1",kn.className="vditor-input",kn.style.width="42px",kn.style.textAlign="center",kn.setAttribute("placeholder",window.VditorI18n.column),kn.value=_.rows[0].cells.length.toString(),kn.oninput=function(){xe()},kn.onkeydown=function(Re){if(!Re.isComposing){if(Re.key==="Tab"){Ut.focus(),Ut.select(),Re.preventDefault();return}zt(i,Re)||an(Re,o)}},er(o,_,i),or(o,_,i),Jt(_,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",Pe),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ce),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ve),i.wysiwyg.popover.insertAdjacentElement("beforeend",wt),i.wysiwyg.popover.insertAdjacentElement("beforeend",Et),i.wysiwyg.popover.insertAdjacentElement("beforeend",vn),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ct),i.wysiwyg.popover.insertAdjacentElement("beforeend",Yt),i.wysiwyg.popover.insertAdjacentElement("beforeend",bn),i.wysiwyg.popover.insertAdjacentElement("beforeend",ot),i.wysiwyg.popover.insertAdjacentHTML("beforeend"," x "),i.wysiwyg.popover.insertAdjacentElement("beforeend",xa),Qt(i,"table"),nn(i,_)}var Io=(0,y.a1)(s,"data-type","link-ref");Io&&Gr(i,Io,o);var Jr=(0,y.a1)(s,"data-type","footnotes-ref");if(Jr){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var ot=document.createElement("span");ot.setAttribute("aria-label",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),ot.className="vditor-tooltipped vditor-tooltipped__n";var cr=document.createElement("input");ot.appendChild(cr),cr.className="vditor-input",cr.setAttribute("placeholder",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),cr.style.width="120px",cr.value=Jr.getAttribute("data-footnotes-label"),cr.oninput=function(){cr.value.trim()!==""&&Jr.setAttribute("data-footnotes-label",cr.value),typeof i.options.input=="function"&&i.options.input(v(i))},cr.onkeydown=function(dt){dt.isComposing||zt(i,dt)||an(dt,o)},Jt(Jr,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",ot),Qt(i,"footnotes-ref"),nn(i,Jr)}var Xt=(0,y.fb)(s,"vditor-wysiwyg__block"),il=Xt?Xt.getAttribute("data-type").indexOf("block")>-1:!1;if(i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(Re){if(!Xt||Xt&&il&&!Xt.contains(Re)){var dt=Re.previousElementSibling;dt.style.display="none"}}),Xt&&il){if(i.wysiwyg.popover.innerHTML="",er(o,Xt,i),or(o,Xt,i),Jt(Xt,i),Xt.getAttribute("data-type")==="code-block"){var ka=document.createElement("span");ka.setAttribute("aria-label",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),ka.className="vditor-tooltipped vditor-tooltipped__n";var qn=document.createElement("input");ka.appendChild(qn);var Oi=Xt.firstElementChild.firstElementChild;qn.className="vditor-input",qn.setAttribute("placeholder",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),qn.value=Oi.className.indexOf("language-")>-1?Oi.className.split("-")[1].split(" ")[0]:"",qn.oninput=function(Re){qn.value.trim()!==""?Oi.className="language-".concat(qn.value):(Oi.className="",i.hint.recentLanguage=""),Xt.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(Xt.lastElementChild.innerHTML=Xt.firstElementChild.innerHTML,je(Xt.lastElementChild,i)),He(i),Re.detail===1&&(o.setStart(Oi.firstChild,0),o.collapse(!0),(0,j.Hc)(o))},qn.onkeydown=function(Re){if(!Re.isComposing&&!zt(i,Re)){if(Re.key==="Escape"&&i.hint.element.style.display==="block"){i.hint.element.style.display="none",Re.preventDefault();return}i.hint.select(Re,i),an(Re,o)}},qn.onkeyup=function(Re){var dt,vr;if(!(Re.isComposing||Re.key==="Enter"||Re.key==="ArrowUp"||Re.key==="Escape"||Re.key==="ArrowDown")){var br=[],Ii=qn.value.substring(0,qn.selectionStart);(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((vr=(dt=window.hljs)===null||dt===void 0?void 0:dt.listLanguages())!==null&&vr!==void 0?vr:[]).sort())).forEach(function(Xn){Xn.indexOf(Ii.toLowerCase())>-1&&br.push({html:Xn,value:Xn})}),i.hint.genHTML(br,Ii,i),Re.preventDefault()}},i.wysiwyg.popover.insertAdjacentElement("beforeend",ka),Qt(i,"code-block")}else Qt(i,"block");nn(i,Xt)}else Xt=void 0;if(F){i.wysiwyg.popover.innerHTML="";var ot=document.createElement("span");ot.setAttribute("aria-label","ID<"+(0,m.ns)("⌥Enter")+">"),ot.className="vditor-tooltipped vditor-tooltipped__n";var gr=document.createElement("input");ot.appendChild(gr),gr.className="vditor-input",gr.setAttribute("placeholder","ID<"+(0,m.ns)("⌥Enter")+">"),gr.style.width="120px",gr.value=F.getAttribute("data-id")||"",gr.oninput=function(){F.setAttribute("data-id",gr.value),typeof i.options.input=="function"&&i.options.input(v(i))},gr.onkeydown=function(dt){dt.isComposing||zt(i,dt)||an(dt,o)},er(o,F,i),or(o,F,i),Jt(F,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",ot),Qt(i,"heading"),nn(i,F)}if(D&&Ci(i,D,o),!be&&!d&&!_&&!Xt&&!D&&!Io&&!Jr&&!F&&!X){var Qr=(0,y.a1)(s,"data-block","0");Qr&&Qr.parentElement.isEqualNode(i.wysiwyg.element)?(i.wysiwyg.popover.innerHTML="",er(o,Qr,i),or(o,Qr,i),Jt(Qr,i),Qt(i,"block"),nn(i,Qr)):i.wysiwyg.popover.style.display="none"}i.wysiwyg.element.querySelectorAll('span[data-type="backslash"] > span').forEach(function(Re){Re.style.display="none"});var al=(0,y.a1)(o.startContainer,"data-type","backslash");al&&(al.querySelector("span").style.display="inline")}},200)},nn=function(i,o){var s=o,u=(0,y.lG)(o,"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())},Gr=function(i,o,s){s===void 0&&(s=getSelection().getRangeAt(0)),i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(o.tagName==="IMG"?o.setAttribute("alt",f.value):o.textContent=f.value),L.value.trim()!==""&&o.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=o.getAttribute("alt")||o.textContent,f.oninput=function(){u()},f.onkeydown=function(D){zt(i,D)||an(D,s)||Er(i,o,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=o.getAttribute("data-link-label"),L.oninput=function(){u()},L.onkeydown=function(D){zt(i,D)||an(D,s)||Er(i,o,D,f)},Jt(o,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),Qt(i,"link-ref"),nn(i,o)},er=function(i,o,s){var u=o.previousElementSibling;if(!(!u||!o.parentElement.isEqualNode(s.wysiwyg.element)&&o.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",o),(0,j.ib)(s.wysiwyg.element,i),He(s),Pn(s),Bt(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},or=function(i,o,s){var u=o.nextElementSibling;if(!(!u||!o.parentElement.isEqualNode(s.wysiwyg.element)&&o.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",o),(0,j.ib)(s.wysiwyg.element,i),He(s),Pn(s),Bt(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},Jt=function(i,o){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)(o);u.setStartAfter(i),(0,j.Hc)(u),i.remove(),He(o),Pn(o),["H1","H2","H3","H4","H5","H6"].includes(i.tagName)&&yt(o)},o.wysiwyg.popover.insertAdjacentElement("beforeend",s)},Er=function(i,o,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);o.insertAdjacentHTML("afterend",c.g.ZWSP),d.setStartAfter(o.nextSibling),d.collapse(!0),(0,j.Hc)(d),s.preventDefault()}}},Ci=function(i,o,s){i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(o.innerHTML=f.value),o.setAttribute("href",L.value),o.setAttribute("title",_.value),He(i)};o.querySelectorAll("[data-marker]").forEach(function(F){F.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=o.innerHTML||"",f.oninput=function(){u()},f.onkeydown=function(F){zt(i,F)||an(F,s)||Er(i,o,F,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=o.getAttribute("href")||"",L.oninput=function(){u()},L.onkeydown=function(F){zt(i,F)||an(F,s)||Er(i,o,F,_)};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=o.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(F){zt(i,F)||an(F,s)||Er(i,o,F,f)},Jt(o,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),i.wysiwyg.popover.insertAdjacentElement("beforeend",D),Qt(i,"a"),nn(i,o)},zn=function(i,o){var s=i.target;o.wysiwyg.popover.innerHTML="";var u=function(){s.setAttribute("src",f.value),s.setAttribute("alt",L.value),s.setAttribute("title",_.value),typeof o.options.input=="function"&&o.options.input(v(o))},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(F){zt(o,F)};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(F){zt(o,F)};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(F){zt(o,F)},Jt(s,o),o.wysiwyg.popover.insertAdjacentElement("beforeend",d),o.wysiwyg.popover.insertAdjacentElement("beforeend",E),o.wysiwyg.popover.insertAdjacentElement("beforeend",D),Qt(o,"image"),nn(o,s)},an=function(i,o){if(!(0,m.yl)(i)&&!i.shiftKey&&i.key==="Enter"||i.key==="Escape")return o&&(0,j.Hc)(o),i.preventDefault(),i.stopPropagation(),!0},Qt=function(i,o){i.options.customWysiwygToolbar(o,i.wysiwyg.popover)},pr=function(i){i.currentMode==="wysiwyg"?Pn(i):i.currentMode==="ir"&&Ue(i)},Li=function(i,o,s){s===void 0&&(s={enableAddUndoStack:!0,enableHint:!1,enableInput:!0});var u=i.wysiwyg.element;u.innerHTML=i.lute.Md2VditorDOM(o),u.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(d){je(d,i),d.previousElementSibling.setAttribute("style","display:none")}),He(i,s)},ma=function(i,o,s){for(var u=i.startContainer.parentElement,d=!1,f="",E="",L=gn(i),D=L.beforeHTML,_=L.afterHTML;u&&!d;){var F=u.tagName;if(F==="STRIKE"&&(F="S"),F==="I"&&(F="EM"),F==="B"&&(F="STRONG"),F==="S"||F==="STRONG"||F==="EM"){var X="",be="",xe="";u.parentElement.getAttribute("data-block")!=="0"&&(be=$t(u),xe=jt(u)),(D||be)&&(X="".concat(be,"<").concat(F,">").concat(D,"</").concat(F,">"),D=X),(s==="bold"&&F==="STRONG"||s==="italic"&&F==="EM"||s==="strikeThrough"&&F==="S")&&(X+="".concat(f).concat(c.g.ZWSP,"<wbr>").concat(E),d=!0),(_||xe)&&(_="<".concat(F,">").concat(_,"</").concat(F,">").concat(xe),X+=_),u.parentElement.getAttribute("data-block")!=="0"?(u=u.parentElement,u.innerHTML=X):(u.outerHTML=X,u=u.parentElement),f="<".concat(F,">")+f,E="</".concat(F,">")+E}else d=!0}(0,j.ib)(o.wysiwyg.element,i)},Fr=function(i,o,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=o.getAttribute("data-type");if(o.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,o.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"?(ga(i,f,E),(0,j.ib)(i.wysiwyg.element,f),u=!1,o.classList.remove("vditor-menu--current")):(u=!1,o.classList.remove("vditor-menu--current"),f.toString()===""?ma(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,o.classList.add("vditor-menu--current"),f.insertNode(document.createElement("wbr"));var F=(0,y.lG)(f.startContainer,"LI");F&&_.contains(F)?F.innerHTML='<blockquote data-block="0">'.concat(F.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")ga(i,f,E,!1),(0,j.ib)(i.wysiwyg.element,f),u=!1,x(i.toolbar.elements,["check","list","ordered-list"]),o.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)}o.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(Et){je(Et,i)}),o.classList.add("vditor-menu--disabled")}else if(E==="link"){if(f.toString()===""){var be=document.createElement("a");be.innerText=c.g.ZWSP,f.insertNode(be),f.setStart(be.firstChild,1),f.collapse(!0),Ci(i,be,f);var xe=i.wysiwyg.popover.querySelector("input");xe.value="",xe.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),Ci(i,X,f);var pe=i.wysiwyg.popover.querySelectorAll("input");pe[0].value=X.innerText,pe[1].focus()}u=!1,o.classList.add("vditor-menu--current")}else if(E==="table"){var Se='<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=Se:document.execCommand("insertHTML",!1,Se),f.selectNode(i.wysiwyg.element.querySelector("wbr").previousSibling),i.wysiwyg.element.querySelector("wbr").remove(),(0,j.Hc)(f);else{Se='<table data-block="0"><thead><tr>';var ke=f.toString().split(`
`),me=ke[0].split(",").length>ke[0].split(" ").length?",":" ";ke.forEach(function(Ve,Et){Et===0?(Ve.split(me).forEach(function(wt,Ct){Ct===0?Se+="<th>".concat(wt,"<wbr></th>"):Se+="<th>".concat(wt,"</th>")}),Se+="</tr></thead>"):(Et===1?Se+="<tbody><tr>":Se+="<tr>",Ve.split(me).forEach(function(wt){Se+="<td>".concat(wt,"</td>")}),Se+="</tr>")}),Se+="</tbody></table>",document.execCommand("insertHTML",!1,Se),(0,j.ib)(i.wysiwyg.element,f)}u=!1,o.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var Pe=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;_.innerHTML.trim()===""?_.outerHTML=Pe:_.insertAdjacentHTML("afterend",Pe),(0,j.ib)(i.wysiwyg.element,f)}}else if(u=!1,o.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Ce="strong";E==="italic"?Ce="em":E==="strikeThrough"&&(Ce="s");var X=document.createElement(Ce);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&&Pn(i),d&&He(i)}},xt=function(){function i(o,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?" &lt;".concat((0,m.ns)(s.hotkey),"&gt;"):"");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)&&(o.currentMode==="wysiwyg"?Fr(o,d.element.children[0],_):o.currentMode==="ir"?Du(o,d.element.children[0],s.prefix||"",s.suffix||""):_e(o,d.element.children[0],s.prefix||"",s.suffix||""))})}return i}(),mr=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ln=function(i,o,s){var u;if(typeof s!="string"?(T(i,["subToolbar","hint"]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===o&&typeof s!="string")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode==="both"&&o==="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"]),o==="ir")C(i.toolbar.elements,["both"]),A(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),lr(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){je(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(o==="wysiwyg")C(i.toolbar.elements,["both"]),A(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",ze(i),Li(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(o==="sv"){A(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=V(u,i);d==="<div data-block='0'></div>"&&(d=""),i.sv.element.innerHTML=d,W(i.sv.element),ne(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i)}i.undo.resetIcon(i),typeof s!="string"&&(i[i.currentMode].element.focus(),pr(i)),yt(i),We(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")}},ui=function(i){mr(o,i);function o(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," &lt;").concat((0,m.ns)("⌥⌘7"),`></button>
<button data-mode="ir">`).concat(window.VditorI18n.instantRendering," &lt;").concat((0,m.ns)("⌥⌘8"),`></button>
<button data-mode="sv">`).concat(window.VditorI18n.splitView," &lt;").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return o.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){Ln(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){Ln(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){Ln(s,"sv",E),E.preventDefault(),E.stopPropagation()})},o}(xt),tr=function(i,o){return(0,j.Gb)(i,o)?getSelection().toString():""},Kr=function(i,o){o.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),T(i,["subToolbar","hint"])})},Ui=function(i,o){o.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,de.E)(s.target,i.options.lang,i.options.theme))})},sr=function(i,o){o.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))})},Xr=function(i,o){o.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),o.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?ct(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ya(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},di=function(i,o,s){o.addEventListener("copy",function(u){return s(u,i)})},hi=function(i,o,s){o.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},Bt=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var o=i[i.currentMode].element,s=(0,j.Ny)(o).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"))&&(o.scrollTop=s+o.scrollTop-o.clientHeight/2+10)}},_i=function(i,o){o.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"||se("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(ge(i,s))return}else if(i.currentMode==="wysiwyg"){if(xn(i,s))return}else if(i.currentMode==="ir"&&Ie(i,s))return;if(i.options.ctrlEnter&&se("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(se("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(se("⌘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)?Qn(i):ln(i,u),He(i)}else i.currentMode==="sv"?Te(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&Ri(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"?Ln(i,"wysiwyg",s):s.code==="Digit8"?Ln(i,"ir",s):s.code==="Digit9"&&Ln(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(se(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(se(d.hotkey,s))return i.toolbar.elements[d.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0})}})},vt=function(i,o){o.addEventListener("selectstart",function(s){o.onmouseup=function(){setTimeout(function(){var u=tr(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())})}})},he=function(i,o){var s=(0,j.zh)(i);s.extractContents(),s.insertNode(document.createTextNode(Lute.Caret)),s.insertNode(document.createTextNode(o));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,W(i.sv.element),(0,j.ib)(i.sv.element,s),Bt(i)},B=function(i,o,s){s===void 0&&(s=!0);var u=i;for(u.nodeType===3&&(u=u.parentElement);u;){if(u.getAttribute("data-type")===o)return u;s?u=u.previousElementSibling:u=u.nextElementSibling}return!1},V=function(i,o){z("SpinVditorSVDOM",i,"argument",o.options.debugger);var s=o.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",o.options.debugger),i},ee=function(i){var o=i.getAttribute("data-type"),s=i.previousElementSibling,u=o&&o!=="text"&&o!=="table"&&o!=="heading-marker"&&o!=="newline"&&o!=="yaml-front-matter-open-marker"&&o!=="yaml-front-matter-close-marker"&&o!=="code-block-info"&&o!=="code-block-close-marker"&&o!=="code-block-open-marker"?i.textContent:"",d=!1;for(o==="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"&&(o==="code-block-open-marker"||o==="code-block-info"))u=E.replace(/\S/g," ")+u;else if(o==="code-block-close-marker"&&s.nextElementSibling.isSameNode(i)){var L=B(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},ne=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),o.enableHint&&i.hint.render(i),i.preview.render(i);var s=v(i);typeof i.options.input=="function"&&o.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(){o.enableAddUndoStack&&!i.sv.composingLock&&i.undo.addToUndoStack(i)},i.options.undoDelay)},Te=function(i,o){var s=(0,j.zh)(i),u=(0,N.S)(s.startContainer,"SPAN");u&&u.textContent.trim()!==""&&(o=`
`+o),s.collapse(!0),document.execCommand("insertHTML",!1,o)},_e=function(i,o,s,u){var d=(0,j.zh)(i),f=o.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 F=B(L,"newline");F?F.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),Z(i);return}(0,j.ib)(i.sv.element,d),ne(i)}},le=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}},Ne=function(i,o){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){o.setRequestHeader(s,i.options.upload.headers[s])})},Qe=function(i,o,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(F){try{_(u.next(F))}catch(X){E(X)}}function D(F){try{_(u.throw(F))}catch(X){E(X)}}function _(F){F.done?f(F.value):d(F.value).then(L,D)}_((u=u.apply(i,o||[])).next())})},rt=function(i,o){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(F){return D([_,F])}}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}_=o.call(i,s)}catch(F){_=[6,F],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ot=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),Kt=function(i,o){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,F){var X=o[F],be=!0;X.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),be=!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>"),be=!1);var xe=X.name.lastIndexOf("."),pe=X.name.substr(xe),Se=i.options.upload.filename(X.name.substr(0,xe))+pe;if(i.options.upload.accept){var ke=i.options.upload.accept.split(",").some(function(me){var Pe=me.trim();if(Pe.indexOf(".")===0){if(pe.toLowerCase()===Pe.toLowerCase())return!0}else if(X.type.split("/")[0]===Pe.split("/")[0])return!0;return!1});ke||(u+="<li>".concat(X.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),be=!1)}be&&(s.push(X),d+="<li>".concat(Se," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=o.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},cn=function(i,o){var s=le(o);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=o.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?o.tip.show(d):o.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),F=o.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase(),_.indexOf(".wav")===0||_.indexOf(".mp3")===0||_.indexOf(".ogg")===0?o.currentMode==="wysiwyg"?f+=`<div class="vditor-wysiwyg__block" data-type="html-block"
data-block="0"><pre><code>&lt;audio controls="controls" src="`.concat(L,'"&gt;&lt;/audio&gt;</code></pre><pre class="vditor-wysiwyg__preview" data-render="1"><audio controls="controls" src="').concat(L,`"></audio></pre></div>
`):o.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L,`"></audio>
`):f+="[".concat(F,"](").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?o.currentMode==="wysiwyg"?f+='<img alt="'.concat(F,'" src="').concat(L,`">
`):f+="![".concat(F,"](").concat(L,`)
`):o.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(F,`</a>
`):f+="[".concat(F,"](").concat(L,`)
`)}),(0,j.Hc)(o.upload.range),document.execCommand("insertHTML",!1,f),o.upload.range=getSelection().getRangeAt(0).cloneRange()},wn=function(i,o,s){return Qe(void 0,void 0,void 0,function(){var u,d,pe,f,E,E,L,D,_,F,X,be,xe,pe,Se,ke;return rt(this,function(me){switch(me.label){case 0:for(u=[],d=i.options.upload.multiple===!0?o.length:1,pe=0;pe<d;pe++)f=o[pe],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=me.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=me.sent(),me.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=le(i),i.upload.range=(0,j.zh)(i),D=Kt(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,F=i.options.upload.extraData,X=0,be=Object.keys(F);X<be.length;X++)xe=be[X],_.append(xe,F[xe]);for(pe=0,Se=D.length;pe<Se;pe++)_.append(i.options.upload.fieldName,D[pe]);return ke=new XMLHttpRequest,i.upload.xhr=ke,ke.open("POST",i.options.upload.url),i.options.upload.token&&ke.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(ke.withCredentials=!0),Ne(i,ke),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),ke.onreadystatechange=function(){if(ke.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),ke.status>=200&&ke.status<300)if(i.options.upload.success)i.options.upload.success(L,ke.responseText);else{var Pe=ke.responseText;i.options.upload.format&&(Pe=i.options.upload.format(o,ke.responseText)),cn(Pe,i)}else i.options.upload.error?i.options.upload.error(ke.responseText):i.tip.show(ke.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},ke.upload.onprogress=function(Pe){if(Pe.lengthComputable){var Ce=Pe.loaded/Pe.total*100;i.upload.element.style.display="block";var Ve=i.upload.element;Ve.style.width=Ce+"%"}},ke.send(_),[2]}})})},On=function(i,o,s){var u,d=(0,y.F9)(o.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=gt(o.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Ce){Ce.remove()}),o.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Ce){Ce.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Ce){Ce.textContent.trim()===""&&(Ce.classList.remove("vditor-comment","vditor-comment--focus"),Ce.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Ce){Ce.textContent.trim()===""&&(Ce.classList.remove("vditor-comment","vditor-comment--focus"),Ce.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)(o.startContainer);if(_&&!D){var F=(0,N.S)(o.startContainer,"BLOCKQUOTE");F?d=(0,y.F9)(o.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var X=d.previousElementSibling,be=d.nextElementSibling;X&&(X.tagName==="UL"||X.tagName==="OL")&&(E=X.outerHTML+E,X.remove()),be&&(be.tagName==="UL"||be.tagName==="OL")&&(E=E+be.outerHTML,be.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(Ce){Ce&&!d.isEqualNode(Ce)&&(E+=Ce.outerHTML,Ce.remove())}),i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(Ce){Ce&&!d.isEqualNode(Ce)&&(E+=Ce.outerHTML,Ce.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 xe=(0,y.E2)(i.wysiwyg.element.querySelector("wbr"),"LI");if(xe){var pe=i.wysiwyg.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(xe.getAttribute("data-marker"),'"]'));pe&&pe.setAttribute("aria-label",xe.textContent.trim().substr(0,24))}}var Se,ke=i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']");ke.forEach(function(Ce,Ve){Ve===0?Se=Ce:(Se.insertAdjacentHTML("beforeend",Ce.innerHTML),Ce.remove())}),ke.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",ke[0]);var me,Pe=i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']");Pe.forEach(function(Ce,Ve){Ve===0?me=Ce:(me.insertAdjacentHTML("beforeend",Ce.innerHTML),Ce.remove())}),Pe.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",Pe[0]),(0,j.ib)(i.wysiwyg.element,o),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(Ce){je(Ce,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)))}yt(i),He(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},Zr=function(i,o){return Object.defineProperty?Object.defineProperty(i,"raw",{value:o}):i.raw=o,i},Vi=function(i,o,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(F){try{_(u.next(F))}catch(X){E(X)}}function D(F){try{_(u.throw(F))}catch(X){E(X)}}function _(F){F.done?f(F.value):d(F.value).then(L,D)}_((u=u.apply(i,o||[])).next())})},pi=function(i,o){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(F){return D([_,F])}}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}_=o.call(i,s)}catch(F){_=[6,F],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Wi=function(i,o,s){if(i.keyCode===229&&i.code===""&&i.key==="Unidentified"&&o.currentMode!=="sv"){var u=(0,y.F9)(s);if(u&&u.textContent.trim()==="")return o[o.currentMode].composingLock=!0,!1}return!0},eo=function(i,o,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,o[o.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)}}},to=function(i,o){if(o==="ArrowDown"||o==="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&&(o==="ArrowDown"&&i.setStartAfter(s.parentElement),o==="ArrowUp"&&i.setStartBefore(s.parentElement))}},Ni=function(i,o){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer);u&&(u.insertAdjacentHTML(o,'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
</p>`)),(0,j.ib)(i[i.currentMode].element,s),pr(i),ct(i))},Lu=function(i){var o=(0,y.lG)(i,"TABLE");return o&&o.rows[0].cells[0].isSameNode(i)?o:!1},_u=function(i){var o=(0,y.lG)(i,"TABLE");return o&&o.lastElementChild.lastElementChild.lastElementChild.isSameNode(i)?o:!1},Hs=function(i,o,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&&(o.selectNodeContents(u),s||o.collapse(!1),(0,j.Hc)(o)),u},Di=function(i,o,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(o.key==="ArrowDown"&&u.textContent.trimRight().substr(f.start).indexOf(`
`)===-1||o.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)),o.preventDefault(),!0}return!1},Yr=function(i,o,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(o.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf(`
`)===-1||(o.key==="ArrowLeft"||o.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)),o.preventDefault(),!0}return!1},ga=function(i,o,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(o.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(F){F.remove()}),o.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(F){F.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(F.textContent.indexOf(" ")===0?"":" ")),F.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(F){F.querySelector("input").remove(),F.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)(o.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())}},Ps=function(i,o,s){var u=o.previousElementSibling;if(o&&u){var d=[o];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&o&&D.textContent.trim()!==""&&o.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(o),o=o.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){je(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),ct(i),pr(i)}else i[i.currentMode].element.focus()},Lo=function(i,o,s,u){var d=(0,y.lG)(o.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(X){X.remove()}),s.insertNode(document.createElement("wbr"));var f=o.parentElement,E=f.cloneNode(),L=[o];Array.from(s.cloneContents().children).forEach(function(X,be){X.nodeType!==3&&o&&X.textContent.trim()!==""&&o.getAttribute("data-node-id")===X.getAttribute("data-node-id")&&(be!==0&&L.push(o),o=o.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 F=(0,y.O9)(s.startContainer);F&&F.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(X){je(X,i),i.currentMode==="wysiwyg"&&X.previousElementSibling.setAttribute("style","display:none")}),ct(i),pr(i)}else i[i.currentMode].element.focus()},va=function(i,o){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",o)},_o=function(i){var o=i.trimRight().split(`
`).pop();return o===""?!1:(o.replace(/ |-/g,"")===""||o.replace(/ |_/g,"")===""||o.replace(/ |\*/g,"")==="")&&o.replace(/ /g,"").length>2?!(o.indexOf("-")>-1&&o.trimLeft().indexOf(" ")===-1&&i.trimRight().split(`
`).length>1||o.indexOf(" ")===0||o.indexOf(" ")===0):!1},No=function(i){var o=i.trimRight().split(`
`);return i=o.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||o.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},ct=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?He(i,o):i.currentMode==="ir"?lr(i,o):i.currentMode==="sv"&&ne(i,o)},zs=function(i,o,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),ct(o),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,j.im)(E,o[o.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)(o[o.currentMode].element,i),ct(o),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)(o[o.currentMode].element,i),ct(o),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?Lo(o,E,i,E.parentElement):Ps(o,E,i),u.preventDefault(),!0}}return!1},Do=function(i,o,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(o.toString()===""?(o.insertNode(document.createTextNode(i.options.tab)),o.collapse(!1)):(o.extractContents(),o.insertNode(document.createTextNode(i.options.tab)),o.collapse(!1))),(0,j.Hc)(o),ct(i),s.preventDefault(),!0},Bs=function(i,o,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw(Ys||(Ys=Zr(["",""],["",""])),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=o.lute.SpinVditorDOM(E),(0,j.ib)(o[o.currentMode].element,u),ct(o),Bt(o),i.preventDefault(),!0}if(_o(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)(o[o.currentMode].element,u),ct(o),Bt(o),i.preventDefault(),!0}if(No(s.innerHTML))return o.currentMode==="wysiwyg"?s.outerHTML=o.lute.SpinVditorDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`):s.outerHTML=o.lute.SpinVditorIRDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`),(0,j.ib)(o[o.currentMode].element,u),ct(o),Bt(o),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,o[o.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)(o[o.currentMode].element,u),!1}return!1}},Fs=function(i,o,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>")),ct(i)},qs=function(i,o,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>")),o.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,o)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));ct(i)},ba=function(i,o,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<o.rows.length;E++)E===0?o.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):o.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");ct(i)},js=function(i,o,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?o.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):o.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),o.collapse(!1),(0,j.Hc)(o),ct(i)}},$s=function(i,o,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(o.selectNodeContents(u.previousElementSibling||u.nextElementSibling),o.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),pr(i);break}L[d].remove()}(0,j.Hc)(o),ct(i)},Us=function(i,o,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(o)&&!o.altKey&&o.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),ct(i),Bt(i),o.preventDefault(),!0}if(o.key==="Tab"){if(o.shiftKey)return Hs(d,s),o.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)),o.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(o.key==="ArrowUp"){if(o.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,j.Hc)(s)):Ni(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var F=_.previousElementSibling;return F||(F=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(F.cells[D]),s.collapse(!1),(0,j.Hc)(s),!0}if(o.key==="ArrowDown"){o.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,j.Hc)(s)):Ni(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)(o)&&o.key==="Enter"&&!o.shiftKey&&o.altKey){var X=i.wysiwyg.popover.querySelector(".vditor-input");return X.focus(),X.select(),o.preventDefault(),!0}if(!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&o.key==="Backspace"&&s.startOffset===0&&s.toString()===""){var be=Hs(d,s,!1);return!be&&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)),ct(i)),o.preventDefault(),!0}if(se("⇧⌘F",o))return qs(i,s,d),o.preventDefault(),!0;if(se("⌘=",o))return Fs(i,s,d),o.preventDefault(),!0;if(se("⇧⌘G",o))return ba(i,L,d,"beforebegin"),o.preventDefault(),!0;if(se("⇧⌘=",o))return ba(i,L,d),o.preventDefault(),!0;if(se("⌘-",o))return js(i,s,d),o.preventDefault(),!0;if(se("⇧⌘-",o))return $s(i,s,L,d),o.preventDefault(),!0;if(se("⇧⌘L",o)){if(i.currentMode==="ir")return va(L,"left"),ct(i),o.preventDefault(),!0;var xe=i.wysiwyg.popover.querySelector('[data-type="left"]');if(xe)return xe.click(),o.preventDefault(),!0}if(se("⇧⌘C",o)){if(i.currentMode==="ir")return va(L,"center"),ct(i),o.preventDefault(),!0;var xe=i.wysiwyg.popover.querySelector('[data-type="center"]');if(xe)return xe.click(),o.preventDefault(),!0}if(se("⇧⌘R",o)){if(i.currentMode==="ir")return va(L,"right"),ct(i),o.preventDefault(),!0;var xe=i.wysiwyg.popover.querySelector('[data-type="right"]');if(xe)return xe.click(),o.preventDefault(),!0}}return!1},Vs=function(i,o,s,u){if(s.tagName==="PRE"&&se("⌘A",o))return u.selectNodeContents(s.firstElementChild),o.preventDefault(),!0;if(i.options.tab&&o.key==="Tab"&&!o.shiftKey&&u.toString()==="")return u.insertNode(document.createTextNode(i.options.tab)),u.collapse(!1),ct(i),o.preventDefault(),!0;if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.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),ct(i),o.preventDefault(),!0}return!(0,m.yl)(o)&&!o.altKey&&o.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"?On(i,u):Mt(i,u)),Bt(i),o.preventDefault(),!0):!1},Ws=function(i,o,s,u){var d=o.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&o.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,j.im)(f,i[i.currentMode].element,o).start===0)return o.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,j.ib)(i[i.currentMode].element,o),ct(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,o).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,o),ct(i),s.preventDefault(),!0}var L=(0,y.F9)(d);if(i.currentMode==="wysiwyg"&&L&&se("⇧⌘;",s))return o.insertNode(document.createElement("wbr")),L.outerHTML='<blockquote data-block="0">'.concat(L.outerHTML,"</blockquote>"),(0,j.ib)(i.wysiwyg.element,o),He(i),s.preventDefault(),!0;if(Di(i,s,o,f,f)||Yr(i,s,o,f,f))return!0}return!1},Gs=function(i,o,s){var u=o.startContainer,d=(0,y.lG)(u,"LI");if(d&&d.classList.contains("vditor-task")){if(se("⇧⌘J",s)){var f=d.firstElementChild;return f.checked?f.removeAttribute("checked"):f.setAttribute("checked","checked"),ct(i),s.preventDefault(),!0}if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&o.toString()===""&&o.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,o),ct(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&&Lo(i,d,o,D)}else if(d.nextElementSibling){var _="",F="",X=!1;Array.from(d.parentElement.children).forEach(function(Se){d.isSameNode(Se)?X=!0:X?_+=Se.outerHTML:F+=Se.outerHTML});var be=d.parentElement.tagName,xe=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),pe="";F&&(pe=d.parentElement.tagName==="UL"?"":' start="1"',F="<".concat(be,' data-tight="true"').concat(xe,' data-block="0">').concat(F,"</").concat(be,">")),d.parentElement.outerHTML="".concat(F,`<p data-block="0"><wbr>
</p><`).concat(be,`
data-tight="true"`).concat(xe,' data-block="0"').concat(pe,">").concat(_,"</").concat(be,">")}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&&o.startOffset===0&&u.firstChild.tagName==="INPUT"?o.setStart(u.childNodes[1],1):(o.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(o.extractContents()));return(0,j.ib)(i[i.currentMode].element,o),ct(i),Bt(i),s.preventDefault(),!0}}return!1},Ks=function(i,o,s,u){if(o.startContainer.nodeType!==3){var d=o.startContainer.children[o.startOffset];if(d&&d.tagName==="HR")return o.selectNodeContents(d.previousElementSibling),o.collapse(!1),s.preventDefault(),!0}if(u){var f=u.previousElementSibling;if(f&&(0,j.im)(u,i[i.currentMode].element,o).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,o),ct(i),s.preventDefault(),!0}}return!1},Xs=function(i){(0,m.vU)()&&i.startContainer.nodeType!==3&&i.startContainer.tagName==="HR"&&i.setStartBefore(i.startContainer)},Zs=function(i,o,s){var u,d;if(!(0,m.vU)())return!1;if(i.key==="ArrowUp"&&o&&((u=o.previousElementSibling)===null||u===void 0?void 0:u.tagName)==="TABLE"){var f=o.previousElementSibling;return s.selectNodeContents(f.rows[f.rows.length-1].lastElementChild),s.collapse(!1),i.preventDefault(),!0}return i.key==="ArrowDown"&&o&&((d=o.nextElementSibling)===null||d===void 0?void 0:d.tagName)==="TABLE"?(s.selectNodeContents(o.nextElementSibling.rows[0].cells[0]),s.collapse(!0),i.preventDefault(),!0):!1},ya=function(i,o,s){return Vi(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,F,X,be,xe,pe,Se,me,ke,me,Pe;return pi(this,function(Ce){switch(Ce.label){case 0:return i[i.currentMode].element.getAttribute("contenteditable")!=="true"?[2]:(o.stopPropagation(),o.preventDefault(),"clipboardData"in o?(u=o.clipboardData.getData("text/html"),d=o.clipboardData.getData("text/plain"),f=o.clipboardData.files):(u=o.dataTransfer.getData("text/html"),d=o.dataTransfer.getData("text/plain"),o.dataTransfer.types.includes("Files")&&(f=o.dataTransfer.items)),E={},L=function(Ve,Et){if(!Et)return["",Lute.WalkContinue];if(i.options.upload.renderLinkDest)return i.options.upload.renderLinkDest(i,Ve,Et);var wt=Ve.TokensStr();if(Ve.__internal_object__.Parent.Type===34&&wt&&wt.indexOf("file://")===-1&&i.options.upload.linkToImgUrl){var Ct=new XMLHttpRequest;Ct.open("POST",i.options.upload.linkToImgUrl),i.options.upload.token&&Ct.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(Ct.withCredentials=!0),Ne(i,Ct),Ct.setRequestHeader("Content-Type","application/json; charset=utf-8"),Ct.onreadystatechange=function(){if(Ct.readyState===XMLHttpRequest.DONE){if(Ct.status===200){var vn=Ct.responseText;i.options.upload.linkToImgFormat&&(vn=i.options.upload.linkToImgFormat(Ct.responseText));var Yt=JSON.parse(vn);if(Yt.code!==0){i.tip.show(Yt.msg);return}var bn=Yt.data.originalURL;if(i.currentMode==="sv")i.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(Ut){Ut.textContent===bn&&(Ut.textContent=Yt.data.url)});else{var ot=i[i.currentMode].element.querySelector('img[src="'.concat(bn,'"]'));ot.src=Yt.data.url,i.currentMode==="ir"&&(ot.previousElementSibling.previousElementSibling.innerHTML=Yt.data.url)}ct(i)}else i.tip.show(Ct.responseText);i.options.upload.linkToImgCallback&&i.options.upload.linkToImgCallback(Ct.responseText)}},Ct.send(JSON.stringify({url:wt}))}return i.currentMode==="ir"?['<span class="vditor-ir__marker vditor-ir__marker--link">'.concat(Lute.EscapeHTMLStr(wt),"</span>"),Lute.WalkContinue]:i.currentMode==="wysiwyg"?["",Lute.WalkContinue]:['<span class="vditor-sv__marker--link">'.concat(Lute.EscapeHTMLStr(wt),"</span>"),Lute.WalkContinue]},(u.replace(/&amp;/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<a href="'.concat(d,'">').concat(d,"</a>")||u.replace(/&amp;/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,F=ut(u,d,i.currentMode),X=i.currentMode==="sv"?(0,y.a1)(o.target,"data-type","code-block"):(0,y.lG)(o.target,"CODE"),X?(i.currentMode==="sv"?document.execCommand("insertHTML",!1,d.replace(/&/g,"&amp;").replace(/</g,"&lt;")):(be=(0,j.im)(o.target,i[i.currentMode].element),X.parentElement.tagName!=="PRE"&&(d+=c.g.ZWSP),X.textContent=X.textContent.substring(0,be.start)+d+X.textContent.substring(be.end),(0,j.$j)(be.start+d.length,be.start+d.length,X.parentElement),!((Pe=X.parentElement)===null||Pe===void 0)&&Pe.nextElementSibling.classList.contains("vditor-".concat(i.currentMode,"__preview"))&&(X.parentElement.nextElementSibling.innerHTML=X.outerHTML,je(X.parentElement.nextElementSibling,i))),[3,10]):[3,1]);case 1:return F?(s.pasteCode(F),[3,10]):[3,2];case 2:return u.trim()===""?[3,5]:(xe=document.createElement("div"),xe.innerHTML=u,i.options.upload.base64ToLink?[3,4]:[4,Nu(i,xe,("clipboardData"in o?o.clipboardData:o.dataTransfer).getData("text/rtf"))]);case 3:Ce.sent(),Ce.label=4;case 4:return xe.querySelectorAll("[style]").forEach(function(Ve){Ve.removeAttribute("style")}),xe.querySelectorAll(".vditor-copy").forEach(function(Ve){Ve.remove()}),i.currentMode==="ir"?(E.HTML2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorIRDOM(xe.innerHTML),i)):i.currentMode==="wysiwyg"?(E.HTML2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorDOM(xe.innerHTML),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),he(i,i.lute.HTML2Md(xe.innerHTML).trimRight())),i.outline.render(i),[3,10];case 5:return f.length>0?i.options.upload.url||i.options.upload.handler?[4,wn(i,f)]:[3,7]:[3,9];case 6:return Ce.sent(),[3,8];case 7:pe=new FileReader,"clipboardData"in o?(f=o.clipboardData.files,Se=f[0]):o.dataTransfer.types.includes("Files")&&(f=o.dataTransfer.items,Se=f[0].getAsFile()),Se&&Se.type.startsWith("image")&&(pe.readAsDataURL(Se),pe.onload=function(){var Ve="";i.currentMode==="wysiwyg"?Ve+='<img alt="'.concat(Se.name,'" src="').concat(pe.result.toString(),`">
`):Ve+="![".concat(Se.name,"](").concat(pe.result.toString(),`)
`),document.execCommand("insertHTML",!1,Ve)}),Ce.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(me=(0,j.zh)(i),me.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(me.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}),he(i,d)),i.outline.render(i)),Ce.label=10;case 10:return i.currentMode!=="sv"&&(ke=(0,y.F9)((0,j.zh)(i).startContainer),ke&&(me=(0,j.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(Ve){Ve.remove()}),me.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?ke.outerHTML=i.lute.SpinVditorDOM(ke.outerHTML):ke.outerHTML=i.lute.SpinVditorIRDOM(ke.outerHTML),(0,j.ib)(i[i.currentMode].element,me)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(Ve){je(Ve,i)})),i.wysiwyg.triggerRemoveComment(i),ct(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&Bt(i),[2]}})})},Nu=function(i,o,s){return Vi(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,F,X,Se,be,xe,pe,Se,ke,me;return pi(this,function(Pe){switch(Pe.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],F=void 0,_.includes("\\pngblip")?F="image/png":_.includes("\\jpegblip")&&(F="image/jpeg"),F&&E.push({hex:_.replace(u,"").replace(/[^\da-fA-F]/g,""),type:F});for(X=[],Ro(o,function(Ce){if(Ce.tagName==="V:SHAPE")return Ro(Ce,function(Ve){Ve.tagName==="V:IMAGEDATA"&&X.push({shape:Ce,img:Ve})}),!1}),Se=0;Se<X.length;Se++)be=document.createElement("img"),xe="data:"+E[Se].type+";base64,"+btoa((E[Se].hex.match(/\w{2}/g)||[]).map(function(Ce){return String.fromCharCode(parseInt(Ce,16))}).join("")),be.src=xe,be.title=X[Se].img.getAttribute("title"),X[Se].shape.parentNode.replaceChild(be,X[Se].shape);pe=o.querySelectorAll("img"),Se=0,Pe.label=1;case 1:return Se<pe.length?(ke=pe[Se].src||"",ke?(me=pe[Se],[4,i.options.upload.base64ToLink(ke)]):[3,3]):[3,4];case 2:me.src=Pe.sent(),Pe.label=3;case 3:return Se++,[3,1];case 4:return[2]}})})},Ro=function(i,o){var s=o(i);if(s!==!1)for(var u=0;u<i.children.length;u++)Ro(i.children[u],o)},Ys,Js=function(i){var o,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=(o=window.hljs)===null||o===void 0?void 0:o.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)}},lr=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),o.enableHint&&Js(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&o.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),o.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},Ri=function(i,o){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=o:(u.insertAdjacentText("afterbegin",o),s.selectNodeContents(u),s.collapse(!1)),Mt(i,s.cloneRange()),Ue(i)}},wa=function(i,o,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=o.lute.SpinVditorIRDOM(u.outerHTML),u.outerHTML=d.firstElementChild.innerHTML.trim()}},Du=function(i,o,s,u){var d=(0,j.zh)(i),f=o.getAttribute("data-type"),E=d.startContainer;E.nodeType===3&&(E=E.parentElement);var L=!0;if(o.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 F=(0,y.fb)(d.startContainer,"vditor-ir__link");F?(d.insertNode(document.createElement("wbr")),_.outerHTML=F.innerHTML):_.outerHTML=_.querySelector(".vditor-ir__link").innerHTML+"<wbr>"}}else f==="italic"?wa(d,i,"em"):f==="bold"?wa(d,i,"strong"):f==="strike"?wa(d,i,"s"):f==="inline-code"?wa(d,i,"code"):(f==="check"||f==="list"||f==="ordered-list")&&(ga(i,d,f),L=!1,o.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 be=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;X.innerHTML.trim()===""?X.outerHTML=be:X.insertAdjacentHTML("afterend",be)}}else if(f==="quote")X&&(d.insertNode(document.createElement("wbr")),X.outerHTML='<blockquote data-block="0">'.concat(X.outerHTML,"</blockquote>"),L=!1,o.classList.add("vditor-menu--current"));else if(f==="link"){var xe=void 0;d.toString()===""?xe="".concat(s,"<wbr>").concat(u):xe="".concat(s).concat(d.toString()).concat(u.replace(")","<wbr>)")),document.execCommand("insertHTML",!1,xe),L=!1,o.classList.add("vditor-menu--current")}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"){var xe=void 0;d.toString()===""?xe="".concat(s,"<wbr>").concat(u):(f==="code"?xe="".concat(s,`
`).concat(d.toString(),"<wbr>").concat(u):f==="table"?xe="".concat(s).concat(d.toString(),"<wbr>").concat(u):xe="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(xe=`
`+xe+`
`);var pe=document.createElement("span");pe.innerHTML=xe,d.insertNode(pe),Mt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,j.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(ga(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),o.classList.add("vditor-menu--current"))}(0,j.ib)(i.ir.element,d),lr(i),L&&Ue(i)},Ru=function(i,o,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(F){try{_(u.next(F))}catch(X){E(X)}}function D(F){try{_(u.throw(F))}catch(X){E(X)}}function _(F){F.done?f(F.value):d(F.value).then(L,D)}_((u=u.apply(i,o||[])).next())})},Ou=function(i,o){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(F){return D([_,F])}}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}_=o.call(i,s)}catch(F){_=[6,F],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Iu=function(){function i(o){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),lr(d),L.parentElement.querySelectorAll("code").forEach(function(X){X.className="language-"+f.trimRight()}),je(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 F=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");F&&F.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(F.lastElementChild.innerHTML=F.firstElementChild.innerHTML,je(F.lastElementChild,d))}else if(d.currentMode==="ir"){var F=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");F&&F.nextElementSibling.classList.contains("vditor-ir__preview")&&(F.nextElementSibling.innerHTML=F.innerHTML,je(F.nextElementSibling,d))}ct(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",o.push({key:":"})}return i.prototype.render=function(o){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,o.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?o.options.hint.emoji:o.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,o)}else o.options.hint.extend.forEach(function(D){D.key===s.splitChar&&(clearTimeout(s.timeId),s.timeId=window.setTimeout(function(){return Ru(s,void 0,void 0,function(){var _;return Ou(this,function(F){switch(F.label){case 0:return _=this.genHTML,[4,D.hint(f)];case 1:return _.apply(this,[F.sent(),f,o]),[2]}})})},o.options.hint.delay))})}},i.prototype.genHTML=function(o,s,u){var d=this;if(o.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,_="";o.forEach(function(X,be){if(!(be>7)){var xe=X.html;if(s!==""){var pe=xe.lastIndexOf(">")+1,Se=xe.substr(pe),ke=Se.toLowerCase().indexOf(s.toLowerCase());ke>-1&&(Se=Se.substring(0,ke)+"<b>"+Se.substring(ke,ke+s.length)+"</b>"+Se.substring(ke+s.length),xe=xe.substr(0,pe)+Se)}_+='<button type="button" data-value="'.concat(encodeURIComponent(X.value),` "
`).concat(be===0?"class='vditor-hint--current'":"","> ").concat(xe,"</button>")}}),this.element.innerHTML=_;var F=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(F||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(be){d.fillEmoji(X,u),be.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(o,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(o.key==="ArrowDown")return o.preventDefault(),o.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(o.key==="ArrowUp"){if(o.preventDefault(),o.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)(o)&&!o.shiftKey&&!o.altKey&&o.key==="Enter"&&!o.isComposing)return o.preventDefault(),o.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(o,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var F=o.lastIndexOf(_.key);u.lastIndex<F&&(u.splitChar=_.key,u.lastIndex=F)});var d;if(this.lastIndex===-1)return d;var f=o.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}(),Hu=function(){function i(o){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(o.options.placeholder,`"
contenteditable="true" spellcheck="false"></pre>`),this.element=s.firstElementChild,this.bindEvent(o),Kr(o,this.element),Ui(o,this.element),sr(o,this.element),_i(o,this.element),vt(o,this.element),Xr(o,this.element),di(o,this.element,this.copy),hi(o,this.element,this.copy)}return i.prototype.copy=function(o,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){o.stopPropagation(),o.preventDefault();var d=document.createElement("div");d.appendChild(u.cloneContents()),o.clipboardData.setData("text/plain",s.lute.VditorIRDOM2Md(d.innerHTML).trim()),o.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(o){var s=this;this.element.addEventListener("paste",function(u){ya(o,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){T(o,["hint"])}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Mt(o,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,lr(o,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}s.composingLock||u.data===""||u.data==="“"||u.data==="《"||Mt(o,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,lr(o);return}var d=(0,j.zh)(o),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),Bt(o)),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")){o.options.link.click?o.options.link.click(L.querySelector(":scope > .vditor-ir__marker--link")):o.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()===""?Q(d,o):setTimeout(function(){Q((0,j.zh)(o),o)}),It(u,o),Ue(o)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if(u.key==="Enter"&&Bt(o),Ue(o),(u.key==="Backspace"||u.key==="Delete")&&o.ir.element.innerHTML!==""&&o.ir.element.childNodes.length===1&&o.ir.element.firstElementChild&&o.ir.element.firstElementChild.tagName==="P"&&o.ir.element.firstElementChild.childElementCount===0&&(o.ir.element.textContent===""||o.ir.element.textContent===`
`)){o.ir.element.innerHTML="";return}var d=(0,j.zh)(o);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent="",Q(d,o)),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")&&Js(o),Q(d,o)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&Q(d,o);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}(),Qs=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)},Pu=a(214),el=a(436),zu=function(){function i(o){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(o,`</div>
<div class="vditor-outline__content"></div>`)}return i.prototype.render=function(o){var s="";return o.preview.element.style.display==="block"?s=(0,el.k)(o.preview.previewElement,this.element.lastElementChild,o):s=(0,el.k)(o[o.currentMode].element,this.element.lastElementChild,o),s},i.prototype.toggle=function(o,s,u){var d;s===void 0&&(s=!0),u===void 0&&(u=!0);var f=(d=o.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(o),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);o[o.currentMode].element.contains(E.startContainer)&&(0,j.Hc)(E)}ze(o)},i}(),Bu=a(280),Fu=function(){function i(o){var s=this;this.element=document.createElement("div"),this.element.className="vditor-preview",this.previewElement=document.createElement("div"),this.previewElement.className="vditor-reset",o.options.classes.preview&&this.previewElement.classList.add(o.options.classes.preview),this.previewElement.style.maxWidth=o.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(o,_,"default"),D.preventDefault()}}),this.previewElement.addEventListener("click",function(D){var _=(0,y.lG)(D.target,"SPAN");if(_&&(0,y.fb)(_,"vditor-toc")){var F=s.previewElement.querySelector("#"+_.getAttribute("data-target-id"));F&&(s.element.scrollTop=F.offsetTop);return}if(D.target.tagName==="A"){o.options.link.click?o.options.link.click(D.target):o.options.link.isOpen&&window.open(D.target.getAttribute("href")),D.preventDefault();return}D.target.tagName==="IMG"&&(o.options.image.preview?o.options.image.preview(D.target):o.options.image.isPreview&&(0,de.E)(D.target,o.options.lang,o.options.theme))}),this.element.appendChild(this.previewElement);var u=o.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 F=_.getAttribute("data-type"),X=u.find(function(be){return(be==null?void 0:be.key)===F});if(X){X.click(F);return}if(F==="mp-wechat"||F==="zhihu"){s.copyToX(o,s.previewElement.cloneNode(!0),F);return}F==="desktop"?s.previewElement.style.width="auto":F==="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(o),d.querySelectorAll("button").forEach(function(be){be.classList.remove("vditor-preview__action--current")}),_.classList.add("vditor-preview__action--current")}}),this.element.insertBefore(d,this.previewElement)}}return i.prototype.render=function(o,s){var u=this;if(clearTimeout(this.mdTimeoutId),this.element.style.display==="none"){this.element.getAttribute("data-type")==="renderPerformance"&&o.tip.hide();return}if(s){this.previewElement.innerHTML=s;return}if(v(o).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")===""){this.previewElement.innerHTML="";return}var d=new Date().getTime(),f=v(o);this.mdTimeoutId=window.setTimeout(function(){if(o.options.preview.url){var E=new XMLHttpRequest;E.open("POST",o.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){o.tip.show(D.msg);return}o.options.preview.transform&&(D.data=o.options.preview.transform(D.data)),u.previewElement.innerHTML=D.data,u.afterRender(o,d)}else{var _=o.lute.Md2HTML(f);o.options.preview.transform&&(_=o.options.preview.transform(_)),u.previewElement.innerHTML=_,u.afterRender(o,d)}},E.send(JSON.stringify({markdownText:f}))}else{var L=o.lute.Md2HTML(f);o.options.preview.transform&&(L=o.options.preview.transform(L)),u.previewElement.innerHTML=L,u.afterRender(o,d)}},o.options.preview.delay)},i.prototype.afterRender=function(o,s){o.options.preview.parse&&o.options.preview.parse(this.element);var u=new Date().getTime()-s;new Date().getTime()-s>2600?(o.tip.show(window.VditorI18n.performanceTip.replace("${x}",u.toString())),o.preview.element.setAttribute("data-type","renderPerformance")):o.preview.element.getAttribute("data-type")==="renderPerformance"&&(o.tip.hide(),o.preview.element.removeAttribute("data-type"));var d=o.preview.element.querySelector(".vditor-comment--focus");d&&d.classList.remove("vditor-comment--focus"),(0,Y.O)(o.preview.previewElement,o.options.preview.hljs),(0,Le.s)(o.options.preview.hljs,o.preview.previewElement,o.options.cdn),(0,Xe.i)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,it.K)(o.preview.previewElement,o.options.cdn),(0,nt.J)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,te.P)(o.preview.previewElement,o.options.cdn),(0,ue.v)(o.preview.previewElement,o.options.cdn),(0,P.p)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,$e.P)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,De.B)(o.preview.previewElement,o.options.cdn),(0,q.Q)(o.preview.previewElement,o.options.cdn),o.options.preview.render.media.enable&&(0,Bu.Y)(o.preview.previewElement),o.options.customRenders.forEach(function(L){L.render(o.preview.previewElement,o)});var f=o.preview.element,E=o.outline.render(o);E===""&&(E="[ToC]"),f.querySelectorAll('[data-type="toc-block"]').forEach(function(L){L.innerHTML=E,(0,qe.H)(L,{cdn:o.options.cdn,math:o.options.preview.math})}),(0,qe.H)(o.preview.previewElement,{cdn:o.options.cdn,math:o.options.preview.math})},i.prototype.copyToX=function(o,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(),o.tip.show(["zhihu","mp-wechat"].includes(u)?"已复制,可到".concat(u==="zhihu"?"知乎":"微信公众号平台","进行粘贴"):"已复制到剪切板")},i}(),qu=function(){function i(o){this.element=document.createElement("div"),this.element.className="vditor-resize vditor-resize--".concat(o.options.resize.position),this.element.innerHTML='<div><svg><use xlink:href="#vditor-icon-resize"></use></svg></div>',this.bindEvent(o)}return i.prototype.bindEvent=function(o){var s=this;this.element.addEventListener("mousedown",function(u){var d=document,f=u.clientY,E=o.element.offsetHeight,L=63+o.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){o.options.resize.position==="top"?o.element.style.height=Math.max(L,E+(f-D.clientY))+"px":o.element.style.height=Math.max(L,E+(D.clientY-f))+"px",o.options.typewriterMode&&(o.sv.element.style.paddingBottom=o.sv.element.parentElement.offsetHeight/2+"px")},d.onmouseup=function(){o.options.resize.after&&o.options.resize.after(o.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}(),ju=function(){function i(o){this.composingLock=!1,this.element=document.createElement("pre"),this.element.className="vditor-sv vditor-reset",this.element.setAttribute("placeholder",o.options.placeholder),this.element.setAttribute("contenteditable","true"),this.element.setAttribute("spellcheck","false"),this.bindEvent(o),Kr(o,this.element),sr(o,this.element),_i(o,this.element),vt(o,this.element),Xr(o,this.element),di(o,this.element,this.copy),hi(o,this.element,this.copy)}return i.prototype.copy=function(o,s){o.stopPropagation(),o.preventDefault(),o.clipboardData.setData("text/plain",tr(s[s.currentMode].element))},i.prototype.bindEvent=function(o){var s=this;this.element.addEventListener("paste",function(u){ya(o,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){if(o.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=o.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(o,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,ne(o,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}Z(o,u)}}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if((u.key==="Backspace"||u.key==="Delete")&&o.sv.element.innerHTML!==""&&o.sv.element.childNodes.length===1&&o.sv.element.firstElementChild&&o.sv.element.firstElementChild.tagName==="DIV"&&o.sv.element.firstElementChild.childElementCount===2&&(o.sv.element.firstElementChild.textContent===""||o.sv.element.textContent===`
`)){o.sv.element.innerHTML="";return}u.key==="Enter"&&Bt(o)}})},i}(),tl=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(o,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(o,`
<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(o,"</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}(),Oo=function(i,o){if(o.options.preview.mode!==i){switch(o.options.preview.mode=i,i){case"both":o.sv.element.style.display="block",o.preview.element.style.display="block",o.preview.render(o),w(o.toolbar.elements,["both"]);break;case"editor":o.sv.element.style.display="block",o.preview.element.style.display="none",x(o.toolbar.elements,["both"]);break}o.devtools&&o.devtools.renderEchart(o)}},$u=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Uu=function(i){$u(o,i);function o(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"?Oo("editor",s):Oo("both",s)))}),d}return o}(xt),Vu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__br"}return i}(),nl=a(580),Wu=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Gu=function(i){Wu(o,i);function o(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"&&(T(s,["subToolbar"]),s.options.preview.hljs.style=D.target.textContent,(0,nl.Y)(D.target.textContent,s.options.cdn),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return o}(xt),Ku=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Xu=function(i){Ku(o,i);function o(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"&&(T(s,["subToolbar"]),s.options.preview.theme.current=D.target.getAttribute("data-type"),(0,ce.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 o}(xt),Zu=function(){function i(o){this.element=document.createElement("span"),this.element.className="vditor-counter vditor-tooltipped vditor-tooltipped__nw",this.render(o,"")}return i.prototype.render=function(o,s){var u=s.endsWith(`
`)?s.length-1:s.length;if(o.options.counter.type==="text"&&o[o.currentMode]){var d=o[o.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof o.options.counter.max=="number"?(u>o.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(o.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",o.options.counter.type),o.options.counter.after&&o.options.counter.after(u,{enable:o.options.counter.enable,max:o.options.counter.max,type:o.options.counter.type})},i}(),Yu=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ju=function(i){Yu(o,i);function o(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 o}(xt),Qu=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ed=function(i){Qu(o,i);function o(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",ze(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",ze(s),s.devtools.renderEchart(s)))}),d}return o}(xt),td=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),nd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rd=function(i){nd(o,i);function o(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 o.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)||Rn(s,L);L.collapse(!1),(0,j.Hc)(L),u.element.lastElementChild.style.display="none",ct(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"))})},o}(xt),rl=function(i,o,s){var u=document.createElement("a");"download"in u?(u.download=s,u.style.display="none",u.href=URL.createObjectURL(new Blob([o])),document.body.appendChild(u),u.click(),u.remove()):i.tip.show(window.VditorI18n.downloadTip,0)},id=function(i){var o=v(i);rl(i,o,o.substr(0,10)+".md")},ad=function(i){i.tip.show(window.VditorI18n.generate,3800);var o=document.querySelector("#vditorExportIframe");o.contentDocument.open(),o.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>`)),o.contentDocument.close(),setTimeout(function(){o.contentWindow.postMessage(v(i),"*")},200)},od=function(i){var o=Qs(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(o,`</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>');rl(i,s,o.substr(0,10)+".html")},sd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ld=function(i){sd(o,i);function o(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":id(s);break;case"pdf":ad(s);break;case"html":od(s);break}T(s,["subToolbar"]),L.preventDefault(),L.stopPropagation()}}),d.element.appendChild(E),M(s,E,f,u.level),d}return o}(xt),cd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ud=function(i){cd(o,i);function o(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s,u),d}return o.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),ze(s),We(s)})},o}(xt),dd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),hd=function(i){dd(o,i);function o(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)("&lt;⌥⌘1>"),`</button>
<button data-tag="h2" data-value="## ">`).concat(window.VditorI18n.heading2," &lt;").concat((0,m.ns)("⌥⌘2"),`></button>
<button data-tag="h3" data-value="### ">`).concat(window.VditorI18n.heading3," &lt;").concat((0,m.ns)("⌥⌘3"),`></button>
<button data-tag="h4" data-value="#### ">`).concat(window.VditorI18n.heading4," &lt;").concat((0,m.ns)("⌥⌘4"),`></button>
<button data-tag="h5" data-value="##### ">`).concat(window.VditorI18n.heading5," &lt;").concat((0,m.ns)("⌥⌘5"),`></button>
<button data-tag="h6" data-value="###### ">`).concat(window.VditorI18n.heading6," &lt;").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return o.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"?(Qn(s),He(s)):s.currentMode==="ir"&&Ri(s,""),d.classList.remove("vditor-menu--current")):(T(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"?(ln(s,E.target.getAttribute("data-tag")),He(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(Ri(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):Te(s,E.target.getAttribute("data-value")),u.style.display="none"})},o}(xt),pd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),fd=function(i){pd(o,i);function o(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 o}(xt),md=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),gd=function(i){md(o,i);function o(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&&Ps(s,L,E)}}),d}return o}(xt),vd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),bd=function(i){vd(o,i);function o(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>&nbsp;&nbsp;</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 o}(xt),yd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),wd=function(i){yd(o,i);function o(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")&&Ni(s,"afterend")}),d}return o}(xt),xd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),kd=function(i){xd(o,i);function o(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")&&Ni(s,"beforebegin")}),d}return o}(xt),Sd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ed=function(i){Sd(o,i);function o(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&&Lo(s,L,E,L.parentElement)}}),d}return o}(xt),Td=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ad=function(i){Td(o,i);function o(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 o}(xt),Md=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Cd=function(i){Md(o,i);function o(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return o.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"),T(s,["subToolbar","hint","popover"]),setTimeout(function(){s.outline.render(s)},s.options.preview.delay+10)),ze(s)}})},o}(xt),Ld=function(){function i(o){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(o);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(o,s){this.leftChannel.push(new Float32Array(o)),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 o=this.mergeBuffers(this.leftChannel),s=this.mergeBuffers(this.rightChannel),u=new Float32Array(o.length),d=0;d<o.length;++d)u[d]=.5*(o[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,F=44,X=1,be=0;be<_;be++)L.setInt16(F,u[be]*(32767*X),!0),F+=2;return new Blob([L],{type:"audio/wav"})},i.prototype.downSampleBuffer=function(o,s){if(s===this.DEFAULT_SAMPLE_RATE||s>this.DEFAULT_SAMPLE_RATE)return o;for(var u=this.DEFAULT_SAMPLE_RATE/s,d=Math.round(o.length/u),f=new Float32Array(d),E=0,L=0;E<f.length;){for(var D=Math.round((E+1)*u),_=0,F=0,X=L;X<D&&X<o.length;X++)_+=o[X],F++;f[E]=_/F,E++,L=D}return f},i.prototype.mergeBuffers=function(o){for(var s=new Float32Array(this.recordingLength),u=0,d=o.length,f=0;f<d;++f){var E=o[f];s.set(E,u),u+=E.length}return s},i.prototype.writeUTFBytes=function(o,s,u){for(var d=u.length,f=0;f<d;f++)o.setUint8(s+f,u.charCodeAt(f))},i}(),_d=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Nd=function(i){_d(o,i);function o(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return o.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 Ld(D),d.recorder.onaudioprocess=function(_){if(d.isRecording){var F=_.inputBuffer.getChannelData(0),X=_.inputBuffer.getChannelData(1);d.cloneChannelData(F,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"});wn(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")}})},o}(xt),Dd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Rd=function(i){Dd(o,i);function o(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 o}(xt),Od=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Id=function(i){Od(o,i);function o(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 o}(xt),Hd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pd=function(i){Hd(o,i);function o(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 o.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&&wn(s,d.target.files,d.target)})},o}(xt),zd=function(){function i(o){var s=this,u=o.options;this.elements={},this.element=document.createElement("div"),this.element.className="vditor-toolbar",u.toolbar.forEach(function(d,f){var E=s.genItem(o,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(o,D,f+_))}),E.appendChild(L),M(o,L,E.children[0])}}),o.options.toolbarConfig.hide&&this.element.classList.add("vditor-toolbar--hide"),o.options.toolbarConfig.pin&&this.element.classList.add("vditor-toolbar--pin"),o.options.counter.enable&&(o.counter=new Zu(o),this.element.appendChild(o.counter.element))}return i.prototype.updateConfig=function(o,s){o.options.toolbarConfig=Object.assign({hide:!1,pin:!1},s),o.options.toolbarConfig.hide?this.element.classList.add("vditor-toolbar--hide"):this.element.classList.remove("vditor-toolbar--hide"),o.options.toolbarConfig.pin?this.element.classList.add("vditor-toolbar--pin"):this.element.classList.remove("vditor-toolbar--pin")},i.prototype.genItem=function(o,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 xt(o,s);break;case"emoji":d=new rd(o,s);break;case"headings":d=new hd(o,s);break;case"|":d=new td;break;case"br":d=new Vu;break;case"undo":d=new Id(o,s);break;case"redo":d=new Rd(o,s);break;case"help":d=new fd(o,s);break;case"both":d=new Uu(o,s);break;case"preview":d=new Cd(o,s);break;case"fullscreen":d=new ud(o,s);break;case"upload":d=new Pd(o,s);break;case"record":d=new Nd(o,s);break;case"info":d=new bd(o,s);break;case"edit-mode":d=new ui(o,s);break;case"devtools":d=new ed(o,s);break;case"outdent":d=new Ed(o,s);break;case"indent":d=new gd(o,s);break;case"outline":d=new Ad(o,s);break;case"insert-after":d=new wd(o,s);break;case"insert-before":d=new kd(o,s);break;case"code-theme":d=new Gu(o,s);break;case"content-theme":d=new Xu(o,s);break;case"export":d=new ld(o,s);break;default:d=new Ju(o,s);break}if(d){var f=s.name;return(f==="br"||f==="|")&&(f=f+u),this.elements[f]=d.element,d.element}},i}(),Bd=a(173),Fd=function(){function i(){this.stackSize=50,this.resetStack(),this.dmp=new Bd}return i.prototype.clearStack=function(o){this.resetStack(),this.resetIcon(o)},i.prototype.resetIcon=function(o){o.toolbar&&(this[o.currentMode].undoStack.length>1?S(o.toolbar.elements,["undo"]):k(o.toolbar.elements,["undo"]),this[o.currentMode].redoStack.length!==0?S(o.toolbar.elements,["redo"]):k(o.toolbar.elements,["redo"]))},i.prototype.undo=function(o){if(o[o.currentMode].element.getAttribute("contenteditable")!=="false"&&!(this[o.currentMode].undoStack.length<2)){var s=this[o.currentMode].undoStack.pop();s&&(this[o.currentMode].redoStack.push(s),this.renderDiff(s,o),this[o.currentMode].hasUndo=!0,T(o,["hint"]))}},i.prototype.redo=function(o){if(o[o.currentMode].element.getAttribute("contenteditable")!=="false"){var s=this[o.currentMode].redoStack.pop();s&&(this[o.currentMode].undoStack.push(s),this.renderDiff(s,o,!0))}},i.prototype.recordFirstPosition=function(o,s){if(getSelection().rangeCount!==0&&!(this[o.currentMode].undoStack.length!==1||this[o.currentMode].undoStack[0].length===0||this[o.currentMode].redoStack.length>0)&&!((0,m.vU)()&&s.key==="Backspace")&&!(0,m.G6)()){var u=this.addCaret(o);u.replace("<wbr>","").replace(" vditor-ir__node--expand","")===this[o.currentMode].undoStack[0][0].diffs[0][1].replace("<wbr>","")&&(this[o.currentMode].undoStack[0][0].diffs[0][1]=u,this[o.currentMode].lastText=u)}},i.prototype.addToUndoStack=function(o){var s=this.addCaret(o,!0),u=this.dmp.diff_main(s,this[o.currentMode].lastText,!0),d=this.dmp.patch_make(s,this[o.currentMode].lastText,u);d.length===0&&this[o.currentMode].undoStack.length>0||(this[o.currentMode].lastText=s,this[o.currentMode].undoStack.push(d),this[o.currentMode].undoStack.length>this.stackSize&&this[o.currentMode].undoStack.shift(),this[o.currentMode].hasUndo&&(this[o.currentMode].redoStack=[],this[o.currentMode].hasUndo=!1,k(o.toolbar.elements,["redo"])),this[o.currentMode].undoStack.length>1&&S(o.toolbar.elements,["undo"]))},i.prototype.renderDiff=function(o,s,u){u===void 0&&(u=!1);var d;if(u){var f=this.dmp.patch_deepCopy(o).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(o,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){je(L,s)})),s[s.currentMode].element.querySelector("wbr"))(0,j.ib)(s[s.currentMode].element,s[s.currentMode].element.ownerDocument.createRange()),Bt(s);else{var E=getSelection().getRangeAt(0);E.setEndBefore(s[s.currentMode].element),E.collapse(!1)}yt(s),ct(s,{enableAddUndoStack:!1,enableHint:!1,enableInput:!0}),pr(s),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){je(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(o,s){s===void 0&&(s=!1);var u;if(getSelection().rangeCount!==0&&!o[o.currentMode].element.querySelector("wbr")){var d=getSelection().getRangeAt(0);if(o[o.currentMode].element.contains(d.startContainer)){u=d.cloneRange();var f=document.createElement("span");f.className="vditor-wbr",d.insertNode(f)}}var E=o[o.currentMode].element.cloneNode(!0);E.querySelectorAll(".vditor-".concat(o.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 o[o.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}(),qd=a(673),jd=function(){function i(o){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=o}return i.prototype.merge=function(){var o,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=(o=this.options.preview)===null||o===void 0?void 0:o.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 F=(0,qd.T)(this.defaultOptions,this.options);if(F.cache.enable&&!F.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");return F},i.prototype.mergeToolbar=function(o){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 o.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}(),$d=function(){function i(o){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(o.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(o),Kr(o,this.element),Ui(o,this.element),sr(o,this.element),_i(o,this.element),vt(o,this.element),Xr(o,this.element),di(o,this.element,this.copy),hi(o,this.element,this.copy),o.options.comment.enable&&(this.selectPopover.querySelector("button").onclick=function(){var d=Lute.NewNodeID(),f=getSelection().getRangeAt(0),E=f.cloneRange(),L=f.extractContents(),D,_,F=!1,X=!1;L.childNodes.forEach(function(pe,Se){var ke=!1;if(pe.nodeType===3?ke=!0:pe.classList.contains("vditor-comment")?pe.classList.contains("vditor-comment")&&pe.setAttribute("data-cmtids",pe.getAttribute("data-cmtids")+" "+d):ke=!0,ke)if(pe.nodeType!==3&&pe.getAttribute("data-block")==="0"&&Se===0&&E.startOffset>0)pe.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(pe.innerHTML,"</span>"),D=pe;else if(pe.nodeType!==3&&pe.getAttribute("data-block")==="0"&&Se===L.childNodes.length-1&&E.endOffset<E.endContainer.textContent.length)pe.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(pe.innerHTML,"</span>"),_=pe;else if(pe.nodeType!==3&&pe.getAttribute("data-block")==="0")Se===0?F=!0:Se===L.childNodes.length-1&&(X=!0),pe.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(pe.innerHTML,"</span>");else{var me=document.createElement("span");me.classList.add("vditor-comment"),me.setAttribute("data-cmtids",d),pe.parentNode.insertBefore(me,pe),me.appendChild(pe)}});var be=(0,y.F9)(E.startContainer);be&&(D?(be.insertAdjacentHTML("beforeend",D.innerHTML),D.remove()):be.textContent.trim().replace(c.g.ZWSP,"")===""&&F&&be.remove());var xe=(0,y.F9)(E.endContainer);xe&&(_?(xe.insertAdjacentHTML("afterbegin",_.innerHTML),_.remove()):xe.textContent.trim().replace(c.g.ZWSP,"")===""&&X&&xe.remove()),f.insertNode(L),o.options.comment.add(d,f.toString(),s.getComments(o,!0)),He(o,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),s.hideComment()})}return i.prototype.getComments=function(o,s){var u=this;if(s===void 0&&(s=!1),o.currentMode==="wysiwyg"&&o.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(o){var s=function(f,E){var L=new Set(E);return f.filter(function(D){return!L.has(D)})};if(o.currentMode==="wysiwyg"&&o.options.comment.enable&&o.wysiwyg.commentIds.length>0){var u=JSON.parse(JSON.stringify(this.commentIds));this.getComments(o);var d=s(u,this.commentIds);d.length>0&&o.options.comment.remove(d)}},i.prototype.showComment=function(){var o=(0,j.Ny)(this.element);this.selectPopover.setAttribute("style","left:".concat(o.left,"px;display:block;top:").concat(Math.max(-8,o.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(o,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){o.stopPropagation(),o.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()+"`",o.clipboardData.setData("text/plain",E),o.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(_,'"')),o.clipboardData.setData("text/plain","[".concat(u.toString(),"](").concat(L.getAttribute("href")).concat(_,")")),o.clipboardData.setData("text/html","");return}var F=document.createElement("div");F.appendChild(u.cloneContents()),o.clipboardData.setData("text/plain",s.lute.VditorDOM2Md(F.innerHTML).trim()),o.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(o){var s=this;this.unbindListener(),window.addEventListener("scroll",this.scrollListener=function(){if(T(o,["hint"]),!(s.popover.style.display!=="block"||s.selectPopover.style.display!=="block")){var u=parseInt(s.popover.getAttribute("data-top"),10);if(o.options.height!=="auto"){if(o.options.toolbarConfig.pin&&o.toolbar.element.getBoundingClientRect().top===0){var d=Math.max(window.scrollY-o.element.offsetTop-8,Math.min(u-o.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(!o.options.toolbarConfig.pin)return;var f=Math.max(u,window.scrollY-o.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(T(o,["hint"]),o.options.comment&&o.options.comment.enable&&o.options.comment.scroll&&o.options.comment.scroll(o.wysiwyg.element.scrollTop),s.popover.style.display==="block"){var u=parseInt(s.popover.getAttribute("data-top"),10)-o.wysiwyg.element.scrollTop,d=-8;o.options.toolbarConfig.pin&&o.toolbar.element.getBoundingClientRect().top===0&&(d=window.scrollY-o.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){ya(o,u,{pasteCode:function(d){var f=(0,j.zh)(o),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=o.lute.SpinVditorDOM(L.outerHTML):o.wysiwyg.element.innerHTML=o.lute.SpinVditorDOM(o.wysiwyg.element.innerHTML),(0,j.ib)(o.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===""){yt(o);return}(0,m.vU)()||On(o,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,He(o);return}if(s.composingLock||u.data===""||u.data==="“"||u.data==="《"){He(o);return}var d=getSelection().getRangeAt(0),f=(0,y.F9)(d.startContainer);if(f||(Rn(o,d),f=(0,y.F9)(d.startContainer)),!!f){for(var E=(0,j.im)(f,o.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 F=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(F&&F.textContent===""&&(yt(o),F.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||No(f.innerHTML)||_o(f.innerHTML)&&f.previousElementSibling){typeof o.options.input=="function"&&o.options.input(v(o));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),On(o,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)),He(o);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?Gr(o,u.target):zn(u,o);return}var f=(0,y.lG)(u.target,"A");if(f){o.options.link.click?o.options.link.click(f):o.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,j.zh)(o);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)))}Pn(o);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,j.zh)(o).startContainer,"vditor-wysiwyg__preview")),D&&Cn(D,o),It(u,o)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&Bt(o),(u.key==="Backspace"||u.key==="Delete")&&o.wysiwyg.element.innerHTML!==""&&o.wysiwyg.element.childNodes.length===1&&o.wysiwyg.element.firstElementChild&&o.wysiwyg.element.firstElementChild.tagName==="P"&&o.wysiwyg.element.firstElementChild.childElementCount===0&&(o.wysiwyg.element.textContent===""||o.wysiwyg.element.textContent===`
`)&&(o.wysiwyg.element.innerHTML="");var d=(0,j.zh)(o);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent=""),Rn(o,d),Pn(o),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&o.hint.render(o);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"?Cn(f,o):Cn(f,o,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=Mn(E);if(_&&_.nodeType!==3){var F=_.querySelector(".vditor-wysiwyg__preview");if(F){Cn(F,o);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}(),Ud=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Vd=function(i){Ud(o,i);function o(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 jd(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 o.prototype.showErrorTip=function(s){var u=new tl;document.body.appendChild(u.element),u.show(s,0)},o.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},o.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,ve(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,ce.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,nl.Y)(d,this.vditor.options.cdn))},o.prototype.getValue=function(){return v(this.vditor)},o.prototype.getCurrentMode=function(){return this.vditor.currentMode},o.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()},o.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()},o.prototype.disabled=function(){T(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")},o.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")},o.prototype.getSelection=function(){if(this.vditor.currentMode==="wysiwyg")return tr(this.vditor.wysiwyg.element);if(this.vditor.currentMode==="sv")return tr(this.vditor.sv.element);if(this.vditor.currentMode==="ir")return tr(this.vditor.ir.element)},o.prototype.renderPreview=function(s){this.vditor.preview.render(this.vditor,s)},o.prototype.getCursorPosition=function(){return(0,j.Ny)(this.vditor[this.vditor.currentMode].element)},o.prototype.isUploading=function(){return this.vditor.upload.isUploading},o.prototype.clearCache=function(){this.vditor.options.cache.enable&&(0,m.pK)()&&localStorage.removeItem(this.vditor.options.cache.id)},o.prototype.disabledCache=function(){this.vditor.options.cache.enable=!1},o.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},o.prototype.html2md=function(s){return this.vditor.lute.HTML2Md(s)},o.prototype.exportJSON=function(s){return this.vditor.lute.RenderJSON(s)},o.prototype.getHTML=function(){return Qs(this.vditor)},o.prototype.tip=function(s,u){this.vditor.tip.show(s,u)},o.prototype.setPreviewMode=function(s){Oo(s,this.vditor)},o.prototype.deleteValue=function(){window.getSelection().isCollapsed||document.execCommand("delete",!1)},o.prototype.updateValue=function(s){document.execCommand("insertHTML",!1,s)},o.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&&On(this.vditor,getSelection().getRangeAt(0)):this.vditor.currentMode==="ir"&&(this.vditor.ir.preventInput=!0,u&&Mt(this.vditor,getSelection().getRangeAt(0),!0))},o.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):he(this.vditor,s),this.vditor.outline.render(this.vditor),ct(this.vditor)},o.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>"),ne(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})):this.vditor.currentMode==="wysiwyg"?Li(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){je(f,d.vditor)}),lr(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})),this.vditor.outline.render(this.vditor),s||(T(this.vditor,["emoji","headings","submenu","hint"]),this.vditor.wysiwyg.popover&&(this.vditor.wysiwyg.popover.style.display="none"),this.clearCache()),u&&this.clearStack()},o.prototype.insertEmptyBlock=function(s){Ni(this.vditor,s)},o.prototype.clearStack=function(){this.vditor.undo.clearStack(this.vditor),this.vditor.undo.addToUndoStack(this.vditor)},o.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},o.prototype.getCommentIds=function(){return this.vditor.currentMode!=="wysiwyg"?[]:this.vditor.wysiwyg.getComments(this.vditor,!0)},o.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)})}},o.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)})}},o.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)})}),He(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})}},o.prototype.init=function(s,u){var d=this;this.isDestroyed||(this.vditor={currentMode:u.mode,element:s,hint:new Iu(u.hint.extend),lute:void 0,options:u,originalInnerHTML:s.innerHTML,outline:new zu(window.VditorI18n.outline),tip:new tl},this.vditor.sv=new ju(this.vditor),this.vditor.undo=new Fd,this.vditor.wysiwyg=new $d(this.vditor),this.vditor.ir=new Hu(this.vditor),this.vditor.toolbar=new zd(this.vditor),u.resize.enable&&(this.vditor.resize=new qu(this.vditor)),this.vditor.toolbar.elements.devtools&&(this.vditor.devtools=new g),(u.upload.url||u.upload.handler)&&(this.vditor.upload=new Ot),(0,b.G)(u._lutePath||"".concat(u.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){d.vditor.lute=(0,Pu.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 Fu(d.vditor),Ee(d.vditor),u.after&&u.after(),u.icon&&(0,b.J)("".concat(u.cdn,"/dist/js/icons/").concat(u.icon,".js"),"vditorIconScript")}))},o}(h.default);const Wd=Vd})(),l=l.default,l})()})})(Qv);var e6=Qv.exports;const fs=Jv(e6),e7=Mb({__proto__:null,default:fs},[e6]);const bf=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},t7={class:"vditor-editor"},n7={__name:"VditorEditor",props:{value:{type:String,default:""},height:{type:[String,Number],default:"400px"},placeholder:{type:String,default:"请输入内容..."},upload:{type:Object,default:()=>({})}},emits:["update:value","change","ready"],setup(t,{expose:e,emit:n}){const r=t,a=n,l=Lt(null);let h=null;const c=async()=>{if(l.value)try{h=new fs(l.value,{height:r.height,placeholder:r.placeholder,mode:"wysiwyg",theme:"classic",cache:{enable:!1,id:"vditor-"+Date.now()},customWysiwygToolbar:()=>{},preview:{theme:{current:"light"}},upload:{accept:"image/*",multiple:!1,fieldName:"file",...r.upload},input:g=>{a("update:value",g),a("change",g)},toolbar:["emoji","headings","bold","italic","strike","link","|","list","ordered-list","check","outdent","indent","|","quote","line","code","inline-code","insert-before","insert-after","|","table","|","undo","redo","|","fullscreen","edit-mode",{name:"more",toolbar:["both","code-theme","content-theme","export","outline","preview","devtools","info","help"]}],after:()=>{console.log("🎉 Vditor 编辑器初始化完成"),a("ready",h),r.value&&h.setValue(r.value)}})}catch(g){console.error("❌ Vditor 初始化失败:",g)}},p=g=>{h&&h.setValue(g||"")},v=()=>h?h.getValue():"",b=()=>{h&&(h.destroy(),h=null)};return xs(()=>r.value,g=>{h&&g!==v()&&p(g)}),e({setValue:p,getValue:v,destroy:b}),Xc(async()=>{await Ma(),c()}),Ql(()=>{b()}),(g,m)=>(on(),yn("div",t7,[Fe("div",{ref_key:"vditorContainer",ref:l,class:"vditor-container"},null,512)]))}},r7=bf(n7,[["__scopeId","data-v-07570030"]]);var i7=Object.defineProperty,a7=(t,e,n)=>e in t?i7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,St=(t,e,n)=>(a7(t,typeof e!="symbol"?e+"":e,n),n);const yf={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"}},wf={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 cp(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}const mc=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=mc(t,e.children[n]);if(r)return r}return null}else return null},Ao=(t,e)=>{if(t.parent=e,t.children)for(let n=0;n<t.children.length;n++)Ao(t.children[n],t)},ks=(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(a=>{ks(a,e,r)})}else t.children.forEach(r=>{ks(r,!1)})};function xf(t){if(t.id=es(),t.children)for(let e=0;e<t.children.length;e++)xf(t.children[e])}function gc(t,e,n,r){const a=r-e,l=t-n;let h=Math.atan(Math.abs(a)/Math.abs(l))/3.14*180;if(isNaN(h))return;l<0&&a>0&&(h=180-h),l<0&&a<0&&(h=180+h),l>0&&a<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 es(){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 o7=function(){const t=es();return{topic:this.newTopicName,id:t}};function kf(t){return JSON.parse(JSON.stringify(t,(e,n)=>{if(e!=="parent")return n}))}const t0=(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}},Hn=(t,e)=>{for(const n in e)t.setAttribute(n,e[n])},up=t=>t?t.tagName==="ME-TPC":!1,Qc=t=>t.filter(e=>e.nodeObj.parent).filter((e,n,r)=>{for(let a=0;a<r.length;a++){if(e===r[a])continue;const{parent:l}=e.nodeObj;if(l===r[a].nodeObj)return!1}return!0}),t6=t=>{const e=/translate\(([^,]+),\s*([^)]+)\)/,n=t.match(e);return n?{x:parseFloat(n[1]),y:parseFloat(n[2])}:{x:0,y:0}},Sf=function(t){for(let e=0;e<t.length;e++){const{dom:n,evt:r,func:a}=t[e];n.addEventListener(r,a)}return function(){for(let e=0;e<t.length;e++){const{dom:n,evt:r,func:a}=t[e];n.removeEventListener(r,a)}}},s7=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}},Ef=(t,e)=>{try{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{offsetLeft:r.left-n.left,offsetTop:r.top-n.top}}catch{return t0(t,e)}};var ki=(t=>(t.LHS="lhs",t.RHS="rhs",t))(ki||{});const l7=t=>{const e=t.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},c7=t=>{const e=t.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");t.selectNode(e[Math.ceil(e.length/2)-1])},u7=t=>{t.selectNode(t.map.querySelector("me-root>me-tpc"))},d7=function(t,e){const n=e.parentElement.parentElement.parentElement.previousSibling;if(n){const r=n.firstChild;t.selectNode(r)}},h7=function(t,e){const n=e.parentElement.nextSibling;if(n&&n.firstChild){const r=n.firstChild.firstChild.firstChild;t.selectNode(r)}},Tm=function(t,e){var n,r;const a=t.currentNode||((n=t.currentNodes)==null?void 0:n[0]);if(!a)return;const l=a.nodeObj,h=a.offsetParent.offsetParent.parentElement;l.parent?h.className===e?h7(t,a):(r=l.parent)!=null&&r.parent?d7(t,a):u7(t):e===ki.LHS?l7(t):c7(t)},Am=function(t,e){const n=t.currentNode;if(!n||!n.nodeObj.parent)return;const r=e+"Sibling",a=n.parentElement.parentElement[r];a?t.selectNode(a.firstChild.firstChild):t.selectNode(n)},vc=function(t,e,n){const{scaleVal:r,scaleSensitivity:a}=t;switch(e){case"in":t.scale(r+a,n);break;case"out":t.scale(r-a,n)}};function p7(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,a=null;const l=c=>{const p=t.nodeData;if(c.key==="0")for(const v of p.children)ks(v,!1);if(c.key==="=")for(const v of p.children)ks(v,!0);if(["1","2","3","4","5","6","7","8","9"].includes(c.key))for(const v of p.children)ks(v,!0,Number(c.key)-1);t.refresh(),t.toCenter(),r=!1,a&&(clearTimeout(a),a=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();Am(t,"previous")}},ArrowDown:c=>{c.altKey?t.moveDownNode():Am(t,"next")},ArrowLeft:c=>{if(c.metaKey||c.ctrlKey)return t.initLeft();Tm(t,ki.LHS)},ArrowRight:c=>{if(c.metaKey||c.ctrlKey)return t.initRight();Tm(t,ki.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)&&vc(t,"in")},"-":c=>{(c.metaKey||c.ctrlKey)&&vc(t,"out")},0:c=>{if(c.metaKey||c.ctrlKey){if(r)return;t.scale(1)}},k:c=>{(c.metaKey||c.ctrlKey)&&(r=!0,a&&(clearTimeout(a),t.container.removeEventListener("keydown",l)),a=window.setTimeout(()=>{r=!1,a=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 f7(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;const w=m.target;if(w.tagName==="IMG"){const S=w;S.src,S.alt||S.title;const k=w.closest(".me-tpc");k&&k.nodeObj&&t.bus.fire("showRichTextEditor",k.nodeObj,k);return}if(up(w)){const S=w;t.bus.fire("showRichTextEditor",S.nodeObj||{},S)}if(t.editable){const S=(x=w.parentElement)==null?void 0:x.parentElement;S.getAttribute("class")==="topiclinks"?t.editArrowLabel(w.parentElement):S.getAttribute("class")==="summary"&&t.editSummary(w.parentElement)}};let a=0;const l=m=>{if(m.pointerType==="mouse")return;const x=new Date().getTime(),w=x-a;w<300&&w>0&&r(m),a=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;up(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?vc(t,"in",t.dragMoveHelper):t.scaleVal-t.scaleSensitivity>0&&vc(t,"out",t.dragMoveHelper):m.shiftKey?t.move(-m.deltaY,0):t.move(-m.deltaX,-m.deltaY)},{container:g}=t;return Sf([{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 m7(){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 bc=document,g7=function(){this.nodes.innerHTML="";const t=this.createTopic(this.nodeData);nu.call(this,t,this.nodeData),t.draggable=!1;const e=bc.createElement("me-root");e.appendChild(t);const n=this.nodeData.children||[];if(this.direction===2){let r=0,a=0;n.map(l=>{l.direction===0?r+=1:l.direction===1?a+=1:r<=a?(l.direction=0,r+=1):(l.direction=1,a+=1)})}v7(this,n,e)},v7=function(t,e,n){const r=bc.createElement("me-main");r.className=ki.LHS;const a=bc.createElement("me-main");a.className=ki.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):a.appendChild(c):t.direction===0?r.appendChild(c):a.appendChild(c)}t.nodes.appendChild(r),t.nodes.appendChild(n),t.nodes.appendChild(a),t.nodes.appendChild(t.lines)},b7=function(t,e){const n=bc.createElement("me-children");for(let r=0;r<e.length;r++){const a=e[r],{grp:l}=t.createWrapper(a);n.appendChild(l)}return n};function Tf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ts=Tf();function n6(t){ts=t}var Pl={exec:()=>null};function pn(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(a,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(Nr.caret,"$1"),n=n.replace(a,h),r},getRegex:()=>new RegExp(n,e)};return r}var Nr={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")},y7=/^(?:[ \t]*(?:\n|$))+/,w7=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x7=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,n0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,k7=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Af=/(?:[*+-]|\d{1,9}[.)])/,r6=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,i6=pn(r6).replace(/bull/g,Af).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(),S7=pn(r6).replace(/bull/g,Af).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(),Mf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,E7=/^[^\n]+/,Cf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,T7=pn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Cf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),A7=pn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Af).getRegex(),eu="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",Lf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,M7=pn("^ {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",Lf).replace("tag",eu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a6=pn(Mf).replace("hr",n0).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",eu).getRegex(),C7=pn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",a6).getRegex(),_f={blockquote:C7,code:w7,def:T7,fences:x7,heading:k7,hr:n0,html:M7,lheading:i6,list:A7,newline:y7,paragraph:a6,table:Pl,text:E7},Mm=pn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",n0).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",eu).getRegex(),L7={..._f,lheading:S7,table:Mm,paragraph:pn(Mf).replace("hr",n0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Mm).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",eu).getRegex()},_7={..._f,html:pn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Lf).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:Pl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pn(Mf).replace("hr",n0).replace("heading",` *#{1,6} *[^
]`).replace("lheading",i6).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},N7=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,D7=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,o6=/^( {2,}|\\)\n(?!\s*$)/,R7=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tu=/[\p{P}\p{S}]/u,Nf=/[\s\p{P}\p{S}]/u,s6=/[^\s\p{P}\p{S}]/u,O7=pn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nf).getRegex(),l6=/(?!~)[\p{P}\p{S}]/u,I7=/(?!~)[\s\p{P}\p{S}]/u,H7=/(?:[^\s\p{P}\p{S}]|~)/u,P7=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,c6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,z7=pn(c6,"u").replace(/punct/g,tu).getRegex(),B7=pn(c6,"u").replace(/punct/g,l6).getRegex(),u6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",F7=pn(u6,"gu").replace(/notPunctSpace/g,s6).replace(/punctSpace/g,Nf).replace(/punct/g,tu).getRegex(),q7=pn(u6,"gu").replace(/notPunctSpace/g,H7).replace(/punctSpace/g,I7).replace(/punct/g,l6).getRegex(),j7=pn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,s6).replace(/punctSpace/g,Nf).replace(/punct/g,tu).getRegex(),$7=pn(/\\(punct)/,"gu").replace(/punct/g,tu).getRegex(),U7=pn(/^<(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(),V7=pn(Lf).replace("(?:-->|$)","-->").getRegex(),W7=pn("^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",V7).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,G7=pn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",yc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),d6=pn(/^!?\[(label)\]\[(ref)\]/).replace("label",yc).replace("ref",Cf).getRegex(),h6=pn(/^!?\[(ref)\](?:\[\])?/).replace("ref",Cf).getRegex(),K7=pn("reflink|nolink(?!\\()","g").replace("reflink",d6).replace("nolink",h6).getRegex(),Df={_backpedal:Pl,anyPunctuation:$7,autolink:U7,blockSkip:P7,br:o6,code:D7,del:Pl,emStrongLDelim:z7,emStrongRDelimAst:F7,emStrongRDelimUnd:j7,escape:N7,link:G7,nolink:h6,punctuation:O7,reflink:d6,reflinkSearch:K7,tag:W7,text:R7,url:Pl},X7={...Df,link:pn(/^!?\[(label)\]\((.*?)\)/).replace("label",yc).getRegex(),reflink:pn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yc).getRegex()},dp={...Df,emStrongRDelimAst:q7,emStrongLDelim:B7,url:pn(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Z7={...dp,br:pn(o6).replace("{2,}","*").getRegex(),text:pn(dp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},b0={normal:_f,gfm:L7,pedantic:_7},hl={normal:Df,gfm:dp,breaks:Z7,pedantic:X7},Y7={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cm=t=>Y7[t];function Xi(t,e){if(e){if(Nr.escapeTest.test(t))return t.replace(Nr.escapeReplace,Cm)}else if(Nr.escapeTestNoEncode.test(t))return t.replace(Nr.escapeReplaceNoEncode,Cm);return t}function Lm(t){try{t=encodeURI(t).replace(Nr.percentDecode,"%")}catch{return null}return t}function _m(t,e){var n;let r=t.replace(Nr.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),a=r.split(Nr.splitPipe),l=0;if(a[0].trim()||a.shift(),a.length>0&&!((n=a.at(-1))!=null&&n.trim())&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;l<a.length;l++)a[l]=a[l].trim().replace(Nr.slashPipe,"|");return a}function pl(t,e,n){let r=t.length;if(r===0)return"";let a=0;for(;a<r;){let l=t.charAt(r-a-1);if(l===e&&!n)a++;else if(l!==e&&n)a++;else break}return t.slice(0,r-a)}function J7(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 Nm(t,e,n,r,a){let l=e.href,h=e.title||null,c=t[1].replace(a.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 Q7(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let a=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>=a.length?l.slice(a.length):l}).join(`
`)}var wc=class{constructor(t){St(this,"options"),St(this,"rules"),St(this,"lexer"),this.options=t||ts}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:pl(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=Q7(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=pl(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:pl(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=pl(e[0],`
`).split(`
`),r="",a="",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,a=a?`${a}
${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,a=a.substring(0,a.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,a=a.substring(0,a.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:a}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,a={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),A=this.rules.other.hrRegex(w),T=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," "),T.test(m)||M.test(m)||y.test(m)||C.test(m)||A.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||T.test(g)||M.test(g)||A.test(g))break;b+=`
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
`,t=t.substring(N.length+1),g=z.slice(w)}}a.loose||(h?a.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,""))),a.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),a.raw+=v}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let p=0;p<a.items.length;p++)if(this.lexer.state.top=!1,a.items[p].tokens=this.lexer.blockTokens(a.items[p].text,[]),!a.loose){let v=a.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=b}if(a.loose)for(let p=0;p<a.items.length;p++)a.items[p].loose=!0;return a}}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"):"",a=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:a}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=_m(n[1]),a=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===a.length){for(let c of a)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(_m(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=pl(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=J7(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],a="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],a=l[3])}else a=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)),Nm(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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," "),a=e[r.toLowerCase()];if(!a){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Nm(n,a,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 a=[...r[0]].length-1,l,h,c=a,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+a);(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])&&a%3&&!((a+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,a+r.index+b+h);if(Math.min(a,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),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&a&&(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,a;if(n[2]==="@")r=n[0],a="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."?a="http://"+n[0]:a=n[0]}return{type:"link",raw:n[0],text:r,href:a,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}}}},Ra=class hp{constructor(e){St(this,"tokens"),St(this,"options"),St(this,"state"),St(this,"tokenizer"),St(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ts,this.options.tokenizer=this.options.tokenizer||new wc,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:Nr,block:b0.normal,inline:hl.normal};this.options.pedantic?(n.block=b0.pedantic,n.inline=hl.pedantic):this.options.gfm&&(n.block=b0.gfm,this.options.breaks?n.inline=hl.breaks:n.inline=hl.gfm),this.tokenizer.rules=n}static get rules(){return{block:b0,inline:hl}}static lex(e,n){return new hp(n).lex(e)}static lexInline(e,n){return new hp(n).inlineTokens(e)}lex(e){e=e.replace(Nr.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 a,l,h;for(this.options.pedantic&&(e=e.replace(Nr.tabCharGlobal," ").replace(Nr.spaceLine,""));e;){let c;if((l=(a=this.options.extensions)==null?void 0:a.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,a,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((a=(r=this.options.extensions)==null?void 0:r.inline)!=null&&a.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}},xc=class{constructor(t){St(this,"options"),St(this,"parser"),this.options=t||ts}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let a=(r=(e||"").match(Nr.notSpaceStart))==null?void 0:r[0],l=t.replace(Nr.endingNewline,"")+`
`;return a?'<pre><code class="language-'+Xi(a)+'">'+(n?l:Xi(l,!0))+`</code></pre>
`:"<pre><code>"+(n?l:Xi(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 a=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+a+l+`>
`+r+"</"+a+`>
`}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+" "+Xi(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 a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);e+=this.tablerow({text:n});let r="";for(let a=0;a<t.rows.length;a++){let l=t.rows[a];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>${Xi(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),a=Lm(t);if(a===null)return r;t=a;let l='<a href="'+t+'"';return e&&(l+=' title="'+Xi(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let a=Lm(t);if(a===null)return Xi(n);t=a;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Xi(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Xi(t.text)}},Rf=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""}},Oa=class pp{constructor(e){St(this,"options"),St(this,"renderer"),St(this,"textRenderer"),this.options=e||ts,this.options.renderer=this.options.renderer||new xc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Rf}static parse(e,n){return new pp(n).parse(e)}static parseInline(e,n){return new pp(n).parseInline(e)}parse(e,n=!0){var r,a;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((a=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&a[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,a;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((a=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&a[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}},ah,Z0=(ah=class{constructor(t){St(this,"options"),St(this,"block"),this.options=t||ts}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Ra.lex:Ra.lexInline}provideParser(){return this.block?Oa.parse:Oa.parseInline}},St(ah,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ah),e8=class{constructor(...t){St(this,"defaults",Tf()),St(this,"options",this.setOptions),St(this,"parse",this.parseMarkdown(!0)),St(this,"parseInline",this.parseMarkdown(!1)),St(this,"Parser",Oa),St(this,"Renderer",xc),St(this,"TextRenderer",Rf),St(this,"Lexer",Ra),St(this,"Tokenizer",wc),St(this,"Hooks",Z0),this.use(...t)}walkTokens(t,e){var n,r;let a=[];for(let l of t)switch(a=a.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)a=a.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)a=a.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;a=a.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);a=a.concat(this.walkTokens(p,e))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,e)))}}return a}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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let l=e.renderers[a.name];l?e.renderers[a.name]=function(...h){let c=a.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[a.level];l?l.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),n.renderer){let a=this.defaults.renderer||new xc(this.defaults);for(let l in n.renderer){if(!(l in a))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=a[h];a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b||""}}r.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new wc(this.defaults);for(let l in n.tokenizer){if(!(l in a))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=a[h];a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b}}r.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Z0;for(let l in n.hooks){if(!(l in a))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=a[h];Z0.passThroughHooks.has(l)?a[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(a,v)).then(g=>p.call(a,g));let b=c.call(a,v);return p.call(a,b)}:a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b}}r.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),a&&(c=c.concat(a.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Ra.lex(t,e??this.defaults)}parser(t,e){return Oa.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},a={...this.defaults,...r},l=this.onError(!!a.silent,!!a.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"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let h=a.hooks?a.hooks.provideLexer():t?Ra.lex:Ra.lexInline,c=a.hooks?a.hooks.provideParser():t?Oa.parse:Oa.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(e):e).then(p=>h(p,a)).then(p=>a.hooks?a.hooks.processAllTokens(p):p).then(p=>a.walkTokens?Promise.all(this.walkTokens(p,a.walkTokens)).then(()=>p):p).then(p=>c(p,a)).then(p=>a.hooks?a.hooks.postprocess(p):p).catch(l);try{a.hooks&&(e=a.hooks.preprocess(e));let p=h(e,a);a.hooks&&(p=a.hooks.processAllTokens(p)),a.walkTokens&&this.walkTokens(p,a.walkTokens);let v=c(p,a);return a.hooks&&(v=a.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>"+Xi(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Zo=new e8;function hn(t,e){return Zo.parse(t,e)}hn.options=hn.setOptions=function(t){return Zo.setOptions(t),hn.defaults=Zo.defaults,n6(hn.defaults),hn};hn.getDefaults=Tf;hn.defaults=ts;hn.use=function(...t){return Zo.use(...t),hn.defaults=Zo.defaults,n6(hn.defaults),hn};hn.walkTokens=function(t,e){return Zo.walkTokens(t,e)};hn.parseInline=Zo.parseInline;hn.Parser=Oa;hn.parser=Oa.parse;hn.Renderer=xc;hn.TextRenderer=Rf;hn.Lexer=Ra;hn.lexer=Ra.lex;hn.Tokenizer=wc;hn.Hooks=Z0;hn.parse=hn;hn.options;hn.setOptions;hn.use;hn.walkTokens;hn.parseInline;Oa.parse;Ra.lex;const In=document,p6=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},nu=function(t,e){if(t.innerHTML="",e.style){const r=e.style;for(const a in r)t.style[a]=r[a]}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(()=>Qk).then(({default:a})=>{a.preview(t,r,{mode:"dark",hljs:{style:"github"},after:()=>{t.classList.remove("mindmap-node-rendering"),t.classList.add("mindmap-node-completed")}})}).catch(a=>{n(t,r)})}catch{n(t,r)}return}n(t,r);return}function n(r,a){let l=a;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 a=In.createElement("img");a.src=this.imageProxy?this.imageProxy(r.url):r.url,a.style.width=r.width+"px",a.style.height=r.height+"px",r.fit&&(a.style.objectFit=r.fit),t.appendChild(a),t.image=a}}else t.image&&(t.image=void 0);{const r=In.createElement("span");r.className="text";let a="";this.markdown?a=this.markdown(e.topic,e):a=e.topic||"",a=a.replace(/•\s*【/g,"【"),a=a.replace(/•\s*\[/g,"["),a=a.replace(/•\s*/g,""),a=a.replace(/•\s*\(/g,"("),r.innerHTML=a,t.appendChild(r),t.text=r,e.image,a.includes("<img"),t.classList.add("no-image"),t.classList.remove("has-image")}if(e.hyperLink){const r=In.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=In.createElement("span");r.className="icons",r.innerHTML=e.icons.map(a=>`<span>${cp(a)}</span>`).join(""),t.appendChild(r),t.icons=r}else t.icons&&(t.icons=void 0);if(e.tags&&e.tags.length){const r=In.createElement("div");r.className="tags",e.tags.forEach(a=>{const l=In.createElement("span");typeof a=="string"?l.textContent=a:(l.textContent=a.text,a.className&&(l.className=a.className),a.style&&Object.assign(l.style,a.style)),r.appendChild(l)}),t.appendChild(r),t.tags=r}else t.tags&&(t.tags=void 0)},t8=function(t,e){const n=In.createElement("me-wrapper"),{p:r,tpc:a}=this.createParent(t);if(n.appendChild(r),!e&&t.children&&t.children.length>0){const l=Of(t.expanded);if(r.appendChild(l),t.expanded!==!1){const h=b7(this,t.children);n.appendChild(h)}}return{grp:n,top:r,tpc:a}},n8=function(t){const e=In.createElement("me-parent"),n=this.createTopic(t);return nu.call(this,n,t),e.appendChild(n),{p:e,tpc:n}},r8=function(t){const e=In.createElement("me-children");return e.append(...t),e},i8=function(t){const e=In.createElement("me-tpc");return e.nodeObj=t,e.dataset.nodeid="me"+t.id,e.draggable=this.draggable,e};function f6(t){const e=In.createRange();e.selectNodeContents(t);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e))}const a8=function(t){if(!t)return;const e=In.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 a=getComputedStyle(t);e.style.cssText=`min-width:${t.offsetWidth-8}px;
color:${a.color};
padding:${a.padding};
margin:${a.margin};
font:${a.font};
background-color:${a.backgroundColor!=="rgba(0, 0, 0, 0)"&&a.backgroundColor};
border-radius:${a.borderRadius};`,this.direction===0&&(e.style.right="0"),f6(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(),nu.call(this,t,n),h!==r&&(this.linkDiv(),this.bus.fire("operation",{name:"finishEdit",obj:n,origin:r}))})},Of=function(t){const e=In.createElement("me-epd");return e.expanded=t!==!1,e.className=t!==!1?"minus":"",e},o8=function(t){if(!t)return;const e=t.nodeObj,n=e.dangerouslySetInnerHTML||"",r=In.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 a=In.createElement("div");a.id="table-edit-container",a.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=In.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=In.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=In.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=In.createElement("span");p.textContent="提示: Ctrl+Enter保存, Esc取消",p.style.cssText=`
font-size: 11px;
color: #999;
`;const v=In.createElement("div");v.style.cssText=`
display: flex;
gap: 8px;
`;const b=In.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=In.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),a.appendChild(l),a.appendChild(h),a.appendChild(c),In.body.appendChild(r),In.body.appendChild(a),r.addEventListener("click",()=>{r.remove(),a.remove()}),setTimeout(()=>{h.focus(),h.setSelectionRange(0,0)},50);const m=()=>{const w=h.value.trim();if(w===this.convertTableHTMLToMarkdown(n)){r.remove(),a.remove();return}hn.setOptions({breaks:!1,gfm:!0});const S=hn.parse(w).replace(/<table>/g,'<table class="markdown-table">');r.remove(),a.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(),a.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())})},s8=function(t){const e=In.createElement("div");e.innerHTML=t;const n=e.querySelector("table");if(!n)return t;let r="";const a=n.querySelector("thead");if(a){const h=a.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()},Ko=document,yi="http://www.w3.org/2000/svg",fp=function(t,e,n,r={}){const{anchor:a="middle",color:l,dataType:h}=r,c=document.createElementNS(yi,"text");return Hn(c,{"text-anchor":a,x:e+"",y:n+"",fill:l||(a==="middle"?"rgb(235, 95, 82)":"#666")}),h&&(c.dataset.type=h),c.innerHTML=t,c},m6=function(t,e,n){const r=Ko.createElementNS(yi,"path");return Hn(r,{d:t,stroke:e||"#666",fill:"none","stroke-width":n}),r},Ml=function(t){const e=Ko.createElementNS(yi,"svg");return e.setAttribute("class",t),e.setAttribute("overflow","visible"),e},Dm=function(){const t=Ko.createElementNS(yi,"line");return t.setAttribute("stroke","#4dc4ff"),t.setAttribute("fill","none"),t.setAttribute("stroke-width","2"),t.setAttribute("opacity","0.45"),t},l8=function(t,e,n,r){const a=Ko.createElementNS(yi,"g");return[{name:"line",d:t},{name:"arrow1",d:e},{name:"arrow2",d:n}].forEach((l,h)=>{const c=l.d,p=Ko.createElementNS(yi,"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)),Hn(p,v),h===0&&p.setAttribute("stroke-dasharray",(r==null?void 0:r.strokeDasharray)||"8,2");const b=Ko.createElementNS(yi,"path");Hn(b,{d:c,stroke:"transparent",fill:"none","stroke-width":"15"}),a.appendChild(b),a.appendChild(p),a[l.name]=p}),a},g6=function(t,e,n){if(!e)return;const r=Ko.createElement("div");t.nodes.appendChild(r);const a=e.innerHTML;r.id="input-box",r.textContent=a,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;
`,f6(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=a:n.label=c,r.remove(),c!==a&&(e.innerHTML=n.label,"parent"in n?t.bus.fire("operation",{name:"finishEditSummary",obj:n}):t.bus.fire("operation",{name:"finishEditArrowLabel",obj:n}))})},c8=function(t){const e=this.map.querySelector("me-root"),n=e.offsetTop,r=e.offsetLeft,a=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}=t0(this.nodes,v),m=v.offsetWidth,x=v.offsetHeight,w=p.parentNode.className,S=this.generateMainBranch({pT:n,pL:r,pW:a,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(m6(S,C,"3")),t&&t!==p)continue;const A=Ml("subLines"),T=p.lastChild;T.tagName==="svg"&&T.remove(),p.appendChild(A),v6(this,A,C,p,w,!0)}this.renderArrow(),this.renderSummary(),this.bus.fire("linkDiv")},v6=function(t,e,n,r,a,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,A=w.offsetHeight,T=w.firstChild.nodeObj.branchColor||n,M=t.generateSubBranch({pT:p,pL:v,pW:b,pH:g,cT:S,cL:k,cW:C,cH:A,direction:a,isFirst:l});e.appendChild(m6(M,T,"2"));const y=w.children[1];if(y){if(!y.expanded)continue}else continue;v6(t,e,T,x,a)}},Rm={addChild:"插入子节点",addParent:"插入父节点",addSibling:"插入同级节点",removeNode:"删除节点",focus:"专注",cancelFocus:"取消专注",moveUp:"上移",moveDown:"下移",link:"连接",linkBidirectional:"双向连接",clickTips:"请点击目标节点",summary:"摘要"},Om={cn:Rm,zh_CN:Rm,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 u8(t,e){e=e===!0?{focus:!0,link:!0}:e;const n=q=>{const P=document.createElement("div");return P.innerText=q,P.className="tips",P},r=(q,P,Y)=>{const te=document.createElement("li");return te.id=q,te.innerHTML=`<span>${cp(P)}</span><span ${Y?'class="key"':""}>${cp(Y)}</span>`,te},a=Om[t.locale]?t.locale:"en",l=Om[a],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","预览图片",""),A=r("cm-rich-text-edit","编辑内容",""),T=document.createElement("ul");if(T.className="menu-list",T.appendChild(h),T.appendChild(c),T.appendChild(p),T.appendChild(v),e.focus&&(T.appendChild(b),T.appendChild(g)),T.appendChild(m),T.appendChild(x),T.appendChild(k),T.appendChild(C),T.appendChild(A),e.link&&(T.appendChild(w),T.appendChild(S)),e&&e.extend)for(let q=0;q<e.extend.length;q++){const P=e.extend[q],Y=r(P.name,P.name,P.key||"");T.appendChild(Y),Y.onclick=te=>{P.onclick(te)}}const M=document.createElement("div");M.className="context-menu",M.appendChild(T),M.hidden=!0,t.container.append(M);let y=!0;const N=q=>{var P,Y;const te=q.target;if(up(te)){te.parentElement.tagName==="ME-ROOT"?y=!0:y=!1;const ue=te;(P=ue.nodeObj)!=null&&P.image||(Y=ue.nodeObj)!=null&&Y.dangerouslySetInnerHTML||ue.querySelector("img")?(C.style.display="block",C.className="",A.style.display="block",A.className=""):(C.style.display="none",A.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,T.style.top="",T.style.bottom="",T.style.left="",T.style.right="";const Le=T.getBoundingClientRect(),qe=T.offsetHeight,Xe=T.offsetWidth,it=q.clientY-Le.top,$e=q.clientX-Le.left;qe+it>window.innerHeight?(T.style.top="",T.style.bottom="0px"):(T.style.bottom="",T.style.top=it+15+"px"),Xe+$e>window.innerWidth?(T.style.left="",T.style.right="0px"):(T.style.right="",T.style.left=$e+10+"px")}};t.bus.addListener("showContextMenu",N),M.onclick=q=>{q.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=q=>{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 ue=te.target;(ue.parentElement.tagName==="ME-PARENT"||ue.parentElement.tagName==="ME-ROOT")&&t.createArrow(P,ue,q)},{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 q,P;M.hidden=!0;const Y=t.currentNode;if(Y)if((q=Y.nodeObj)!=null&&q.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 ue=te.src,Le=te.alt||te.title||((P=Y.nodeObj)==null?void 0:P.topic)||"";t.bus.fire("showImagePreview",ue,Le)}}},A.onclick=()=>{M.hidden=!0;const q=t.currentNode;q&&t.bus.fire("showRichTextEditor",q.nodeObj,q)},()=>{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 mp=document,d8=function(t,e){if(!e)return gp(t),t;let n=t.querySelector(".insert-preview");const r=`insert-preview ${e} show`;return n||(n=mp.createElement("div"),t.appendChild(n)),n.className=r,t},gp=function(t){if(!t)return;const e=t.querySelectorAll(".insert-preview");for(const n of e||[])n.remove()},Im=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},h8=function(t){const e=document.createElement("div");return e.className="mind-elixir-ghost",t.container.appendChild(e),e};class p8{constructor(e){St(this,"mind"),St(this,"isMoving",!1),St(this,"interval",null),St(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 f8(t){let e=null,n=null;const r=h8(t),a=new p8(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;a.stop();for(const g of v)g.parentElement.parentElement.style.opacity="1";const b=p.target;b.style.opacity="",n&&(gp(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?a.move(1,0):p.clientX>g.x+g.width-50?a.move(-1,0):p.clientY<g.y+50?a.move(0,1):p.clientY>g.y+g.height-50?a.move(0,-1):a.stop(),gp(n);const m=mp.elementFromPoint(p.clientX,p.clientY-v);if(Im(m,b)){n=m;const x=m.getBoundingClientRect(),w=x.y;p.clientY>w+x.height?e="after":e="in"}else{const x=mp.elementFromPoint(p.clientX,p.clientY+v),w=x.getBoundingClientRect();if(Im(x,b)){n=x;const S=w.y;p.clientY<S?e="before":e="in"}else e=n=null}n&&d8(n,e)};return Sf([{dom:t.map,evt:"dragstart",func:l},{dom:t.map,evt:"dragend",func:h},{dom:t.map,evt:"dragover",func:c}])}const m8=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 g8(t){let e=[],n=-1,r=t.getData(),a=[];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:a.map(g=>g.id),currentTarget:m8(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){a=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 v8='<?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>',b8='<?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>',y8='<?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>',w8='<?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>',x8='<?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>',k8='<?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>',S8='<?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>',E8='<?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>',T8=t=>async e=>{var n;try{const r=`${((n=e.nodeData)==null?void 0:n.topic)||"思维导图"}_${new Date().toISOString().slice(0,10)}`,a=`
.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,a);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()}失败,请重试`)}},A8={side:v8,left:b8,right:y8,full:w8,living:x8,zoomin:k8,zoomout:S8,exportSvg:E8},uo=(t,e)=>{const n=document.createElement("span");return n.id=t,n.innerHTML=A8[e],n};function M8(t){try{const e=document.createElement("div"),n=uo("fullscreen","full"),r=uo("toCenter","living"),a=uo("zoomout","zoomout"),l=uo("zoomin","zoomin"),h=uo("exportSvg","exportSvg");h.title="导出SVG矢量图";const c=document.createElement("span");return c.innerText="100%",e.appendChild(n),e.appendChild(r),e.appendChild(a),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()},a.onclick=()=>{t.scale(t.scaleVal-t.scaleSensitivity)},l.onclick=()=>{t.scale(t.scaleVal+t.scaleSensitivity)},h.onclick=()=>{T8("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 C8(t){const e=document.createElement("div"),n=uo("tbltl","left"),r=uo("tbltr","right"),a=uo("tblts","side");return e.appendChild(n),e.appendChild(r),e.appendChild(a),e.className="mind-elixir-toolbar lt",n.onclick=()=>{t.initLeft()},r.onclick=()=>{t.initRight()},a.onclick=()=>{t.initSide()},e}function L8(t){try{if(!t.container)return;const e=M8(t),n=C8(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 _8=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 Hm=(t,e="px")=>typeof t=="number"?t+e:t,no=({style:t},e,n)=>{if(typeof e=="object")for(const[r,a]of Object.entries(e))a!==void 0&&(t[r]=Hm(a));else n!==void 0&&(t[e]=Hm(n))},Pm=(t=0,e=0,n=0,r=0)=>{const a={x:t,y:e,width:n,height:r,top:e,left:t,right:t+n,bottom:e+r};return{...a,toJSON:()=>JSON.stringify(a)}},N8=t=>{let e,n=-1,r=!1;return{next:(...a)=>{e=a,r||(r=!0,n=requestAnimationFrame(()=>{t(...e),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},zm=(t,e,n="touch")=>{switch(n){case"center":{const r=e.left+e.width/2,a=e.top+e.height/2;return r>=t.left&&r<=t.right&&a>=t.top&&a<=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}},D8=()=>matchMedia("(hover: none), (pointer: coarse)").matches,R8=()=>"safari"in window,vp=t=>Array.isArray(t)?t:[t],b6=t=>(e,n,r,a={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),n=vp(n),e=vp(e);for(const l of e)if(l)for(const h of n)l[t](h,r,{capture:!1,...a})},ro=b6("addEventListener"),Hi=b6("removeEventListener"),y0=t=>{var e;const{clientX:n,clientY:r,target:a}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:r,target:a}},ls=(t,e=document)=>vp(t).map(n=>typeof n=="string"?Array.from(e.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),O8=(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:Fo,max:Bm,min:Fm,ceil:qm}=Math,jm=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),y6=class extends _8{constructor(t){var e,n,r,a,l;super(),this._selection=jm(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=Pm(),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,...(a=(r=t.behaviour)==null?void 0:r.scrolling)==null?void 0:a.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),no(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),no(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=N8(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?ro:Hi;r(e,"mousedown",this._onTapStart),n.touch&&r(e,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(t,e=!1){const{x:n,y:r,target:a}=y0(t),{document:l,startAreas:h,boundaries:c,features:p,behaviour:v}=this._options,b=a.getBoundingClientRect();if(t instanceof MouseEvent&&!O8(t,v.triggers))return;const g=ls(h,l),m=ls(c,l);this._targetElement=m.find(k=>zm(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),ro(l,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),ro(l,["mouseup","touchcancel","touchend"],this._onTapStop),ro(l,"scroll",this._onScroll),p.deselectOnBlur&&(this._targetBoundaryScrolled=!1,ro(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(t){const{singleTap:{intersect:e},range:n}=this._options.features,r=y0(t);let a;if(e==="native")a=r.target;else if(e==="touch"){this.resolveSelectables();const{x:h,y:c}=r;a=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(!a)return;for(this.resolveSelectables();!this._selectables.includes(a);)if(a.parentElement)a=a.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(a)&4?[a,h]:[h,a],v=[...this._selectables.filter(b=>b.compareDocumentPosition(c)&4&&b.compareDocumentPosition(p)&2),c,p];this.select(v),this._latestElement=h}else l.includes(a)&&(l.length===1||t.ctrlKey||l.every(h=>this._selection.stored.includes(h)))?this.deselect(a):(this.select(a),this._latestElement=a)}_delayedTapMove(t){const{container:e,document:n,behaviour:{startThreshold:r}}=this._options,{x1:a,y1:l}=this._areaLocation,{x:h,y:c}=y0(t);if(typeof r=="number"&&Fo(h+c-(a+l))>=r||typeof r=="object"&&Fo(h-a)>=r.x||Fo(c-l)>=r.y){if(Hi(n,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",t)===!1){Hi(n,["mouseup","touchcancel","touchend"],this._onTapStop);return}ro(n,["mousemove","touchmove"],this._onTapMove,{passive:!1}),no(this._area,"display","block"),ls(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&&(ro(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),ro(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?(no(t,{top:r.top,left:r.left,width:r.width,height:r.height}),no(n,{marginTop:-r.top,marginLeft:-r.left})):(no(t,{top:0,left:0,width:"100%",height:"100%"}),no(n,{marginTop:0,marginLeft:0}))}_onTapMove(t){const{_scrollSpeed:e,_areaLocation:n,_options:r,_frame:a}=this,{speedDivider:l}=r.behaviour.scrolling,h=this._targetElement,{x:c,y:p}=y0(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+=qm(e.y/l),n.y1-=h.scrollTop-b),e.x&&(h.scrollLeft+=qm(e.x/l),n.x1-=h.scrollLeft-g),a.next(t),requestAnimationFrame(v)};requestAnimationFrame(v)}else a.next(t);this._handleMoveEvent(t)}_handleMoveEvent(t){const{features:e}=this._options;(e.touch&&D8()||this._scrollAvailable&&R8())&&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,Hi(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:a,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?-Fo(b.left-x+S.x):0,x=x<b.left?b.left:x):x>b.right-S.x?(t.x=p-c-v?Fo(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=a?-Fo(b.top-w+S.y):0,w=w<b.top?b.top:w):w>b.bottom-S.y?(t.y=l-a-h?Fo(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),A=Bm(g,x),T=Bm(m,w);this._areaRect=Pm(k,C,A-k,T-C)}_redrawSelectionArea(){const{x:t,y:e,width:n,height:r}=this._areaRect,{style:a}=this._area;a.left=`${t}px`,a.top=`${e}px`,a.width=`${n}px`,a.height=`${r}px`}_onTapStop(t,e){var n;const{document:r,features:a}=this._options,{_singleClick:l}=this;Hi(this._targetElement,"scroll",this._onStartAreaScroll),Hi(r,["mousemove","touchmove"],this._delayedTapMove),Hi(r,["touchmove","mousemove"],this._onTapMove),Hi(r,["mouseup","touchcancel","touchend"],this._onTapStop),Hi(r,"scroll",this._onScroll),this._keepSelection(),t&&l&&a.singleTap.allow?this._onSingleTap(t):!l&&!e&&(this._updateElementSelection(),this._emitEvent("stop",t)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,Hi(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),Hi(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(n=this._frame)==null||n.cancel(),no(this._area,"display","none")}_updateElementSelection(){const{_selectables:t,_options:e,_selection:n,_areaRect:r}=this,{stored:a,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(zm(r,S.getBoundingClientRect(),c)){if(l.includes(S))a.includes(S)&&!h.includes(S)&&h.push(S);else if(v&&a.includes(S)){m.push(S);continue}else g.push(S);b.push(S)}}v&&g.push(...a.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&&a.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:a,stored:l}=e,h=n.filter(c=>!l.includes(c));switch(t.behaviour.overlap){case"drop":{e.stored=[...h,...l.filter(c=>!a.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=ls(this._options.selectables,this._options.document)}clearSelection(t=!0,e=!1){const{selected:n,stored:r,changed:a}=this._selection;a.added=[],a.removed.push(...n,...t?r:[]),e||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=jm(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:a}=this._selection,l=ls(t,this._options.document).filter(h=>!r.includes(h)&&!a.includes(h));return a.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:a}=this._selection,l=ls(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=>!a.removed.includes(h))),this._latestElement=void 0,e||(this._emitEvent("move",null),this._emitEvent("stop",null))}};y6.version="3.9.0";let I8=y6;function H8(t){const e=t.mouseSelectionButton===2?[2]:[0],n=new I8({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 a;const l=r.target;if(l.id==="input-box"||l.className==="circle"||(a=t.container.querySelector(".context-menu"))!=null&&a.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:a}}})=>{if(r.length>0||a.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(a.length>0){for(const l of a)l.classList.remove("selected");t.currentNodes=t.currentNodes.filter(l=>!(a!=null&&a.includes(l))),t.bus.fire("unselectNodes",a.map(l=>l.nodeObj))}});t.selection=n}const P8=function(t,e=!0){this.theme=t;const n={...(t.type==="dark"?wf:yf).cssVar,...t.cssVar},r=Object.keys(n);for(let a=0;a<r.length;a++){const l=r[a];this.container.style.setProperty(l,n[l])}e&&this.refresh()},Ls=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 z8(t){const{siblings:e,index:n}=Ls(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 B8(t){const{siblings:e,index:n}=Ls(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 w6(t){const{siblings:e,index:n}=Ls(t);return e===void 0?0:(e.splice(n,1),e.length)}function F8(t,e,n){const{siblings:r,index:a}=Ls(n);r!==void 0&&(e==="before"?r.splice(a,0,t):r.splice(a+1,0,t))}function q8(t,e){const{siblings:n,index:r}=Ls(t);n!==void 0&&(n[r]=e,e.children=[t])}function x6(t,e,n){var r;if(w6(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:a,index:l}=Ls(n);if(a===void 0)return;t==="before"?a.splice(l,0,e):a.splice(l+1,0,e)}}const j8=function({map:t,direction:e},n){var r,a;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=((a=t.querySelector(".rhs"))==null?void 0:a.childElementCount)||0;return l<=h?(n.direction=0,0):(n.direction=1,1)}},k6=function(t,e,n){var r,a;const l=n.children[0].children[0],h=e.parentElement;if(h.tagName==="ME-PARENT"){if(r0(l),h.children[1])h.nextSibling.appendChild(n);else{const c=t.createChildren([n]);h.appendChild(Of(!0)),h.insertAdjacentElement("afterend",c)}t.linkDiv(n.offsetParent)}else h.tagName==="ME-ROOT"&&(j8(t,l.nodeObj)===0?(r=t.container.querySelector(".lhs"))==null||r.appendChild(n):(a=t.container.querySelector(".rhs"))==null||a.appendChild(n),t.linkDiv())},$8=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()},S6={before:"beforebegin",after:"afterend"},r0=function(t){const e=t.parentElement.parentElement.lastElementChild;(e==null?void 0:e.tagName)==="svg"&&(e==null||e.remove())},U8=function(t,e){const n=t.nodeObj,r=kf(n);r.style&&e.style&&(e.style=Object.assign(r.style,e.style));const a=Object.assign(n,e);nu.call(this,t,a),this.linkDiv(),this.bus.fire("operation",{name:"reshapeNode",obj:a,origin:r})},If=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 a=n||t.generateNewObj();r.children?r.children.push(a):r.children=[a],Ao(t.nodeData);const{grp:l,top:h}=t.createWrapper(a);return k6(t,e,l),{newTop:h,newNodeObj:a}},V8=function(t,e,n){var r,a,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=(a=p.parent)==null?void 0:a.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===ki.LHS?0:1;v.direction=x}F8(v,t,p),Ao(this.nodeData);const b=c.parentElement,{grp:g,top:m}=this.createWrapper(v);b.parentElement.insertAdjacentElement(S6[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)},W8=function(t,e){const n=t||this.currentNode;if(!n)return;r0(n);const r=n.nodeObj;if(!r.parent)return;const a=e||this.generateNewObj();q8(r,a),Ao(this.nodeData);const l=n.parentElement.parentElement,{grp:h,top:c}=this.createWrapper(a,!0);c.appendChild(Of(!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:a})},G8=function(t,e){const n=t||this.currentNode;if(!n)return;const r=If(this,n,e);if(!r)return;const{newTop:a,newNodeObj:l}=r;this.bus.fire("operation",{name:"addChild",obj:l}),e||this.editTopic(a.firstChild),this.selectNode(a.firstChild,!0)},K8=function(t,e){const n=kf(t.nodeObj);xf(n);const r=If(this,e,n);if(!r)return;const{newNodeObj:a}=r;this.selectNode(this.findEle(a.id)),this.bus.fire("operation",{name:"copyNode",obj:a})},X8=function(t,e){t=Qc(t);const n=[];for(let r=0;r<t.length;r++){const a=t[r],l=kf(a.nodeObj);xf(l);const h=If(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})},Z8=function(t){const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;z8(n);const r=e.parentNode.parentNode;r.parentNode.insertBefore(r,r.previousSibling),this.linkDiv(),this.bus.fire("operation",{name:"moveUpNode",obj:n})},Y8=function(t){const e=t||this.currentNode;if(!e)return;const n=e.nodeObj;B8(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})},J8=function(t){if(t.length===0)return;t=Qc(t);for(const n of t){const r=n.nodeObj,a=w6(r);$8(n,a)}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)})},Q8=function(t,e){t=Qc(t);const n=e.nodeObj;n.expanded===!1&&(this.expandNode(e,!0),e=this.findEle(n.id));for(const r of t){const a=r.nodeObj;x6("in",a,n),Ao(this.nodeData);const l=r.parentElement;k6(this,e,l.parentElement)}this.linkDiv(),this.bus.fire("operation",{name:"moveNodeIn",objs:t.map(r=>r.nodeObj),toObj:n})},E6=(t,e,n,r)=>{t=Qc(t),e==="after"&&(t=t.reverse());const a=n.nodeObj,l=[];for(const h of t){const c=h.nodeObj;x6(e,c,a),Ao(r.nodeData),r0(h);const p=h.parentElement.parentNode;l.includes(p.parentElement)||l.push(p.parentElement),n.parentElement.parentNode.insertAdjacentElement(S6[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:a})},ew=function(t,e){E6(t,"before",e,this)},tw=function(t,e){E6(t,"after",e,this)},nw=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)}},rw=function(t,e){t.text.textContent=e,t.nodeObj.topic=e,this.linkDiv()},T6=Object.freeze(Object.defineProperty({__proto__:null,addChild:G8,beginEdit:nw,copyNode:K8,copyNodes:X8,insertParent:W8,insertSibling:V8,moveDownNode:Y8,moveNodeAfter:tw,moveNodeBefore:ew,moveNodeIn:Q8,moveUpNode:Z8,removeNodes:J8,reshapeNode:U8,rmSubline:r0,setNodeTopic:rw},Symbol.toStringTag,{value:"Module"}));function iw(t){return{nodeData:t.isFocusMode?t.nodeDataBackup:t.nodeData,arrows:t.arrows,summaries:t.summaries,direction:t.direction,theme:t.theme}}const aw=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 a=n.left+n.width/2,l=n.top+n.height/2,h=r.left+r.width/2,c=r.top+r.height/2,p=a-h,v=l-c;this.move(-p,-v,!0)}},ow=function(t,e,n){this.clearSelection(),this.scrollIntoView(t),this.selection.select(t),e&&this.bus.fire("selectNewNode",t.nodeObj)},sw=function(t){this.selection.select(t)},lw=function(t){this.selection.deselect(t)},cw=function(){this.unselectNodes(this.currentNodes),this.unselectSummary(),this.unselectArrow()},uw=function(){const t=iw(this);return JSON.stringify(t,(e,n)=>{if(!(e==="parent"&&typeof n!="string"))return n})},dw=function(){return JSON.parse(this.getDataString())},hw=function(){this.editable=!0},pw=function(){this.editable=!1},fw=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,a=e.y?e.y-n.top-n.height/2:0,{dx:l,dy:h}=A6(this),c=this.map.style.transform,{x:p,y:v}=t6(c),b=p-l,g=v-h,m=this.scaleVal,x=(-r+b)*(1-t/m),w=(-a+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)},mw=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)},gw=function(t,e,n=!1){const{map:r,scaleVal:a,bus:l}=this,h=r.style.transform;let{x:c,y:p}=t6(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(${a})`,l.fire("move",{dx:t,dy:e})},A6=t=>{const{container:e,map:n,nodes:r}=t,a=n.querySelector("me-root"),l=a.offsetTop,h=a.offsetLeft,c=a.offsetWidth,p=a.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}},vw=function(){const{map:t}=this,{dx:e,dy:n}=A6(this);t.style.transform=`translate(${e}px, ${n}px) scale(${this.scaleVal})`},bw=function(t){t(this)},yw=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())},ww=function(){this.isFocusMode=!1,this.tempDirection!==null&&(this.nodeData=this.nodeDataBackup,this.direction=this.tempDirection,this.tempDirection=null,this.refresh(),this.toCenter())},xw=function(){this.direction=0,this.refresh(),this.toCenter()},kw=function(){this.direction=1,this.refresh(),this.toCenter()},Sw=function(){this.direction=2,this.refresh(),this.toCenter()},Ew=function(t){this.locale=t,this.refresh()},Tw=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(),a={x:r.left,y:r.top},l=t.parentNode,h=l.children[1];if(h.expanded=n.expanded,h.className=n.expanded?"minus":"",r0(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=a.x-p.x,b=a.y-p.y;this.move(v,b),this.bus.fire("expandNode",n)},Aw=function(t,e){const n=t.nodeObj,r=t.getBoundingClientRect(),a={x:r.left,y:r.top};ks(n,e??!n.expanded),this.refresh();const l=this.findEle(n.id).getBoundingClientRect(),h={x:l.left,y:l.top},c=a.x-h.x,p=a.y-h.y;this.move(c,p)},Mw=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)),Ao(this.nodeData),this.layout(),this.linkDiv()},Cw=Object.freeze(Object.defineProperty({__proto__:null,cancelFocus:ww,clearSelection:cw,disableEdit:pw,enableEdit:hw,expandNode:Tw,expandNodeAll:Aw,focusNode:yw,getData:dw,getDataString:uw,initLeft:xw,initRight:kw,initSide:Sw,install:bw,move:gw,refresh:Mw,scale:fw,scaleFit:mw,scrollIntoView:aw,selectNode:ow,selectNodes:sw,setLocale:Ew,toCenter:vw,unselectNodes:lw},Symbol.toStringTag,{value:"Module"})),Lw=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=Sf([{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}}},$m={create:Lw},_w="#4dc4ff";function M6(t,e,n,r,a,l,h,c){return{x:t/8+n*3/8+a*3/8+h/8,y:e/8+r*3/8+l*3/8+c/8}}function Nw(t,e,n){Hn(t,{x:e+"",y:n+""})}function w0(t,e,n,r,a){Hn(t,{x1:e+"",y1:n+"",x2:r+"",y2:a+""})}function Um(t,e,n,r,a,l,h,c,p,v){var b;const g=`M ${e} ${n} C ${r} ${a} ${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=gc(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=gc(r,a,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 A=v.style;A.stroke&&t.arrow2.setAttribute("stroke",A.stroke),A.strokeWidth&&t.arrow2.setAttribute("stroke-width",String(A.strokeWidth)),A.strokeLinecap&&t.arrow2.setAttribute("stroke-linecap",A.strokeLinecap),A.opacity!==void 0&&t.arrow2.setAttribute("opacity",String(A.opacity))}}}const{x:w,y:S}=M6(e,n,r,a,l,h,c,p);Nw(t.label,w,S),(b=v.style)!=null&&b.labelColor&&t.label.setAttribute("fill",v.style.labelColor),Bw(t)}function kc(t,e,n){const{offsetLeft:r,offsetTop:a}=t0(t.nodes,e),l=e.offsetWidth,h=e.offsetHeight,c=r+l/2,p=a+h/2,v=c+n.x,b=p+n.y;return{w:l,h,cx:c,cy:p,ctrlX:v,ctrlY:b}}function ms(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,a){var l;if(!e||!n)return;const h=kc(t,e,r.delta1),c=kc(t,n,r.delta2),{x:p,y:v}=ms(h),{ctrlX:b,ctrlY:g}=h,{ctrlX:m,ctrlY:x}=c,{x:w,y:S}=ms(c),k=gc(m,x,w,S);if(!k)return;const C=`M ${k.x1} ${k.y1} L ${w} ${S} L ${k.x2} ${k.y2}`;let A="";if(r.bidirectional){const q=gc(b,g,p,v);if(!q)return;A=`M ${q.x1} ${q.y1} L ${p} ${v} L ${q.x2} ${q.y2}`}const T=l8(`M ${p} ${v} C ${b} ${g} ${m} ${x} ${w} ${S}`,C,A,r.style),{x:M,y}=M6(p,v,b,g,m,x,w,S),N=(l=r.style)==null?void 0:l.labelColor,z=fp(r.label,M,y,{anchor:"middle",color:N,dataType:"custom-link"});T.appendChild(z),T.label=z,T.arrowObj=r,T.dataset.linkid=r.id,t.linkSvgGroup.appendChild(T),a||(t.arrows.push(r),t.currentArrow=T,C6(t,r,h,c))},Dw=function(t,e,n={}){const r={id:es(),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})},Rw=function(t){ru(this);const e={...t,id:es()};Hf(this,this.findEle(e.from),this.findEle(e.to),e),this.bus.fire("operation",{name:"createArrow",obj:e})},Ow=function(t){let e;if(t?e=t:e=this.currentArrow,!e)return;ru(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}})},Iw=function(t){this.currentArrow=t;const e=t.arrowObj,n=this.findEle(e.from),r=this.findEle(e.to),a=kc(this,n,e.delta1),l=kc(this,r,e.delta2);C6(this,e,a,l)},Hw=function(){ru(this),this.currentArrow=null},oh=function(t,e){const n=document.createElementNS(yi,"path");return Hn(n,{d:t,stroke:e,fill:"none","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round"}),n},Pw=function(t,e){const n=document.createElementNS(yi,"g");n.setAttribute("class","arrow-highlight"),n.setAttribute("opacity","0.45");const r=oh(t.line.getAttribute("d"),e);n.appendChild(r);const a=oh(t.arrow1.getAttribute("d"),e);if(n.appendChild(a),t.arrow2.getAttribute("d")){const l=oh(t.arrow2.getAttribute("d"),e);n.appendChild(l)}t.insertBefore(n,t.firstChild)},zw=function(t){const e=t.querySelector(".arrow-highlight");e&&e.remove()},Bw=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"))},ru=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&&zw(t.currentArrow)},C6=function(t,e,n,r){const{linkController:a,P2:l,P3:h,line1:c,line2:p,nodes:v,map:b,currentArrow:g,bus:m}=t;if(!g)return;a.style.display="initial",l.style.display="initial",h.style.display="initial",v.appendChild(a),v.appendChild(l),v.appendChild(h),Pw(g,_w);let{x,y:w}=ms(n),{ctrlX:S,ctrlY:k}=n,{ctrlX:C,ctrlY:A}=r,{x:T,y:M}=ms(r);l.style.cssText=`top:${k}px;left:${S}px;`,h.style.cssText=`top:${A}px;left:${C}px;`,w0(c,x,w,S,k),w0(p,C,A,T,M),t.helper1=$m.create(l),t.helper2=$m.create(h),t.helper1.init(b,(y,N)=>{S=S+y/t.scaleVal,k=k+N/t.scaleVal;const z=ms({...n,ctrlX:S,ctrlY:k});x=z.x,w=z.y,l.style.top=k+"px",l.style.left=S+"px",Um(g,x,w,S,k,C,A,T,M,e),w0(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,A=A+N/t.scaleVal;const z=ms({...r,ctrlX:C,ctrlY:A});T=z.x,M=z.y,h.style.top=A+"px",h.style.left=C+"px",Um(g,x,w,S,k,C,A,T,M,e),w0(p,C,A,T,M),e.delta2.x=C-r.cx,e.delta2.y=A-r.cy,m.fire("updateArrowDelta",e)})};function Fw(){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 qw(t){if(ru(this),!t)return;const e=t.label;g6(this,e,t.arrowObj)}function jw(){this.arrows=this.arrows.filter(t=>mc(t.from,this.nodeData)&&mc(t.to,this.nodeData))}const $w=Object.freeze(Object.defineProperty({__proto__:null,createArrow:Dw,createArrowFrom:Rw,editArrowLabel:qw,removeArrow:Ow,renderArrow:Fw,selectArrow:Iw,tidyArrow:jw,unselectArrow:Hw},Symbol.toStringTag,{value:"Module"})),Uw=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 a=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=a[0][l])==null?void 0:e.node;for(let g=1;g<a.length;g++)if(((n=a[g][l])==null?void 0:n.node)!==b)break e}if(!l)throw new Error("Can not select root node.");const h=a.map(b=>b[l-1].index).sort(),c=h[0]||0,p=h[h.length-1]||0,v=a[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}},Vw=function(t){const e=document.createElementNS(yi,"g");return e.setAttribute("id",t),e},Vm=function(t,e){const n=document.createElementNS(yi,"path");return Hn(n,{d:t,stroke:e||"#666",fill:"none","stroke-linecap":"round","stroke-width":"2"}),n},Ww=t=>t.parentElement.parentElement,Gw=function(t,{parent:e,start:n}){const r=t.findEle(e),a=r.nodeObj;let l;return a.parent?l=r.closest("me-main").className:l=t.findEle(a.children[n].id).closest("me-main").className,l},Pf=function(t,e){var n;const{id:r,label:a,parent:l,start:h,end:c}=e,{nodes:p,theme:v,summarySvg:b}=t,g=t.findEle(l).nodeObj,m=Gw(t,e);let x=1/0,w=0,S=0,k=0;for(let q=h;q<=c;q++){const P=(n=g.children)==null?void 0:n[q];if(!P)return t.removeSummary(r),null;const Y=Ww(t.findEle(P.id)),{offsetLeft:te,offsetTop:ue}=t0(p,Y),Le=h===c?10:20;q===h&&(S=ue+Le),q===c&&(k=ue+Y.offsetHeight-Le),te<x&&(x=te),Y.offsetWidth+te>w&&(w=Y.offsetWidth+te)}let C,A;const T=S+10,M=k+10,y=(T+M)/2,N=v.cssVar["--color"];m===ki.LHS?(C=Vm(`M ${x+10} ${T} c -5 0 -10 5 -10 10 L ${x} ${M-10} c 0 5 5 10 10 10 M ${x} ${y} h -10`,N),A=fp(a,x-20,y+6,{anchor:"end",color:N})):(C=Vm(`M ${w-10} ${T} c 5 0 10 5 10 10 L ${w} ${M-10} c 0 5 -5 10 -10 10 M ${w} ${y} h 10`,N),A=fp(a,w+20,y+6,{anchor:"start",color:N}));const z=Vw("s-"+r);return z.appendChild(C),z.appendChild(A),z.summaryObj=e,b.appendChild(z),z},Kw=function(){if(!this.currentNodes)return;const{currentNodes:t,summaries:e,bus:n}=this,{parent:r,start:a,end:l}=Uw(t),h={id:es(),parent:r,start:a,end:l,label:"summary"},c=Pf(this,h);e.push(h),this.editSummary(c),n.fire("operation",{name:"createSummary",obj:h})},Xw=function(t){const e=es(),n={...t,id:e};Pf(this,n),this.summaries.push(n),this.bus.fire("operation",{name:"createSummary",obj:n})},Zw=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}})},Yw=function(t){const e=t.children[1].getBBox(),n=6,r=3,a=document.createElementNS(yi,"rect");Hn(a,{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(a),this.currentSummary=t},Jw=function(){var t,e;(e=(t=this.currentSummary)==null?void 0:t.querySelector("rect"))==null||e.remove(),this.currentSummary=null},Qw=function(){this.summarySvg.innerHTML="",this.summaries.forEach(t=>{try{Pf(this,t)}catch{}}),this.nodes.insertAdjacentElement("beforeend",this.summarySvg)},e9=function(t){if(!t)return;const e=t.childNodes[1];g6(this,e,t.summaryObj)},t9=Object.freeze(Object.defineProperty({__proto__:null,createSummary:Kw,createSummaryFrom:Xw,editSummary:e9,removeSummary:Zw,renderSummary:Qw,selectSummary:Yw,unselectSummary:Jw},Symbol.toStringTag,{value:"Module"})),ur="http://www.w3.org/2000/svg";function n9(t,e){const n=document.createElementNS(ur,"svg");return Hn(n,{version:"1.1",xmlns:ur,height:t,width:e}),n}function L6(t,e,n,r){const a=document.createElementNS(ur,"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(ur,"rect");return Hn(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"}),a.appendChild(k),h.forEach((C,A)=>{const T=document.createElementNS(ur,"text");Hn(T,{x:m+"",y:r+v+p+c*A+"","text-anchor":"start","font-family":e.fontFamily,"font-size":`${e.fontSize}`,"font-weight":`${e.fontWeight}`,fill:`${e.color}`}),T.innerHTML=C,a.appendChild(T)}),a}function Wm(t){if(!t)return t;let e=t.replace(/<td[^>]*>([^<]*)<br\s*\/?>([^<]*)<\/td>/gi,(n,r,a)=>`<td>${r} ${a}</td>`);return e=e.replace(/<th[^>]*>([^<]*)<br\s*\/?>([^<]*)<\/th>/gi,(n,r,a)=>`<th>${r} ${a}</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 a=["br","hr","img","input","meta","link"],l=r.split(" ")[0].toLowerCase();return a.includes(l)?`<${r} />`:n}),e}function sh(t,e,n,r,a=!1){const l=document.createElementNS(ur,"g");a||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(ur,"rect");Hn(m,{x:n+"",y:r+"",width:b+"",height:g+"",fill:"white",stroke:"#ccc","stroke-width":"1"}),l.appendChild(m);const x=document.createElementNS(ur,"foreignObject");Hn(x,{x:a?n+"":"0",y:a?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,"&quot;")}';
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,"&quot;")}';
font-size: ${e.fontSize};
color: ${e.color};
`,document.body.appendChild(N);const z=(N.textContent||N.innerText||"").split(`
`).filter(q=>q.trim());if(z.length>0){const q=parseFloat(e.fontSize)||14,P=q*1.4,Y=parseInt(e.paddingTop)||8,te=parseInt(e.paddingBottom)||8,ue=parseInt(e.paddingLeft)||8,Le=(z.length-1)*P+q+Y+te,qe=Math.min(Le,x),Xe=b.includes("<img"),it=Xe?n+m/2:n+ue,$e=r+q+Y;z.forEach((nt,ut)=>{const je=document.createElementNS(ur,"text");Hn(je,{x:it+"",y:$e+P*ut+"","text-anchor":Xe?"middle":"start","font-family":e.fontFamily,"font-size":e.fontSize,"font-weight":e.fontWeight,fill:e.color}),je.innerHTML=nt.trim(),l.appendChild(je)});const De=document.createElementNS(ur,"rect");return Hn(De,{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(De,l.firstChild),document.body.removeChild(N),l}document.body.removeChild(N)}catch{}const w=document.createElementNS(ur,"foreignObject");Hn(w,{x:n+"",y:r+"",width:m+"px",height:x+"px"});const S=document.createElement("div");S.innerHTML=b;const k=15,C=15,A=parseInt(e.paddingLeft)||8,T=parseInt(e.paddingRight)||8;S.style.cssText=`
width: 100%;
height: 100%;
font-family: '${(e.fontFamily||"Arial").replace(/"/g,"&quot;")}';
font-size: ${e.fontSize};
color: ${e.color};
background: transparent;
padding: ${k}px ${T}px ${C}px ${A}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,"&quot;")}';
margin: 0 auto 0px auto;
border: 1px solid #ccc;
`,N.querySelectorAll("td, th").forEach(q=>{const P=q;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 q=N,P=m-A-T-5,Y=Math.floor(x*.7);q.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(ur,"rect");Hn(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 L6(t,e,n,r);return l}function x0(t,e,n=!1,r){var a;const l=getComputedStyle(e);let h,c;if(r)h=r.x,c=r.y;else{const{offsetLeft:x,offsetTop:w}=Ef(t.nodes,e);h=x,c=w}s7(e);const p=e;p.nodeObj&&p.nodeObj.dangerouslySetInnerHTML&&((a=p.nodeObj.dangerouslySetInnerHTML)==null||a.includes("<img")),p.nodeObj&&p.nodeObj.image;const v=document.createElementNS(ur,"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 sh(e,l,h,c);b=sh(e,l,h,c)}else n?b=sh(e,l,h,c):b=L6(e,l,h,c);return b&&v.appendChild(b),v}function r9(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:a}=t0(t.nodes,e),l=document.createElementNS(ur,"a"),h=document.createElementNS(ur,"text");return Hn(h,{x:r+"",y:a+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 i9(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:a}=Ef(t.nodes,e);if(!e.nodeObj.image)return null;const l=e.nodeObj.image,h=document.createElementNS(ur,"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,A=parseFloat(n.lineHeight)||parseFloat(n.fontSize)*1.2;parseFloat(n.fontSize);const T=parseInt(n.paddingTop)||8,M=parseInt(n.paddingBottom)||8;x=C*A+T+M}}const w=r+(c-g)/2,S=a+x+0;try{const k=await _6(l.url);Hn(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:k})}catch{Hn(h,{x:w+"",y:S+"",width:g+"",height:m+"",href:l.url})}return h}async function a9(t,e){const n=getComputedStyle(e),{offsetLeft:r,offsetTop:a}=Ef(t.nodes,e),l=document.createElementNS(ur,"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 _6(h);Hn(l,{x:r+"",y:a+"",width:c+"",height:p+"",href:v})}catch{Hn(l,{x:r+"",y:a+"",width:c+"",height:p+"",href:h})}return l}function _6(t){return new Promise((e,n)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{try{const a=document.createElement("canvas");a.width=r.width,a.height=r.height;const l=a.getContext("2d");if(!l){n(new Error("Failed to get canvas context"));return}l.drawImage(r,0,0);const h=a.toDataURL("image/png");e(h)}catch(a){n(a)}},r.onerror=()=>{n(new Error("Failed to load image"))},r.src=t})}const k0=100,o9='<?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">',Gm=(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}},s9=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))},l9=async(t,e=!1)=>{var n,r,a;await s9();const l=t.nodes;l.getBoundingClientRect();const h=l.offsetHeight+k0*2,c=l.offsetWidth+k0*2,p=n9(h+"px",c+"px"),v=document.createElementNS(ur,"svg"),b=document.createElementNS(ur,"rect");Hn(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),A=k.parentElement,T=Gm(A,l);C.setAttribute("x",`${T.x}`),C.setAttribute("y",`${T.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=(a=l.querySelector(".summary"))==null?void 0:a.cloneNode(!0);x&&v.appendChild(x);const w=Array.from(l.querySelectorAll("me-tpc")).map(async k=>{const C=Gm(k,l),A=k.nodeObj.dangerouslySetInnerHTML,T=!!(k.text&&k.text.innerHTML&&k.text.innerHTML!==k.text.textContent),M=k.nodeObj.image;if(A||T){const y=x0(t,k,!e,C);v.appendChild(y)}else v.appendChild(x0(t,k,!1,C));if(M)try{const y=await i9(t,k);y&&v.appendChild(y)}catch{}});await Promise.all(w),l.querySelectorAll(".tags > span").forEach(k=>{v.appendChild(x0(t,k))}),l.querySelectorAll(".icons > span").forEach(k=>{v.appendChild(x0(t,k))}),l.querySelectorAll(".hyper-link").forEach(k=>{v.appendChild(r9(t,k))});const S=Array.from(l.querySelectorAll("img")).map(async(k,C)=>{const A=k.closest("me-tpc"),T=k.closest("foreignObject");return A||T?null:await a9(t,k)});return(await Promise.all(S)).filter(k=>k!==null).forEach(k=>{k&&v.appendChild(k)}),Hn(v,{x:k0+"",y:k0+"",overflow:"visible"}),p.appendChild(v),p},c9=(t,e)=>(e&&t.insertAdjacentHTML("afterbegin","<style>"+e+"</style>"),o9+t.outerHTML);function u9(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=a=>{e(a.target.result)},r.onerror=a=>{n(a)},r.readAsDataURL(t)})}const d9=async function(t=!1,e){const n=await l9(this,t),r=c9(n,e);return new Blob([r],{type:"image/svg+xml"})},h9=async function(t=!1,e){const n=await this.exportSvg(t,e),r=await u9(n);return new Promise((a,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(a,"image/png",1)}catch(p){l(p)}},h.onerror=p=>{clearTimeout(c),l(p)},h.src=r})},p9=Object.freeze(Object.defineProperty({__proto__:null,exportPng:h9,exportSvg:d9},Symbol.toStringTag,{value:"Module"}));function zf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ns=zf();function N6(t){ns=t}var zl={exec:()=>null};function fn(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(a,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(Dr.caret,"$1"),n=n.replace(a,h),r},getRegex:()=>new RegExp(n,e)};return r}var Dr={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")},f9=/^(?:[ \t]*(?:\n|$))+/,m9=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,g9=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,i0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,v9=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Bf=/(?:[*+-]|\d{1,9}[.)])/,D6=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,R6=fn(D6).replace(/bull/g,Bf).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(),b9=fn(D6).replace(/bull/g,Bf).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(),Ff=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y9=/^[^\n]+/,qf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,w9=fn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x9=fn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Bf).getRegex(),iu="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",jf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,k9=fn("^ {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",jf).replace("tag",iu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O6=fn(Ff).replace("hr",i0).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",iu).getRegex(),S9=fn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",O6).getRegex(),$f={blockquote:S9,code:m9,def:w9,fences:g9,heading:v9,hr:i0,html:k9,lheading:R6,list:x9,newline:f9,paragraph:O6,table:zl,text:y9},Km=fn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",i0).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",iu).getRegex(),E9={...$f,lheading:b9,table:Km,paragraph:fn(Ff).replace("hr",i0).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",iu).getRegex()},T9={...$f,html:fn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",jf).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:zl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fn(Ff).replace("hr",i0).replace("heading",` *#{1,6} *[^
]`).replace("lheading",R6).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},A9=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,M9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,I6=/^( {2,}|\\)\n(?!\s*$)/,C9=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,au=/[\p{P}\p{S}]/u,Uf=/[\s\p{P}\p{S}]/u,H6=/[^\s\p{P}\p{S}]/u,L9=fn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Uf).getRegex(),P6=/(?!~)[\p{P}\p{S}]/u,_9=/(?!~)[\s\p{P}\p{S}]/u,N9=/(?:[^\s\p{P}\p{S}]|~)/u,D9=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,z6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,R9=fn(z6,"u").replace(/punct/g,au).getRegex(),O9=fn(z6,"u").replace(/punct/g,P6).getRegex(),B6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",I9=fn(B6,"gu").replace(/notPunctSpace/g,H6).replace(/punctSpace/g,Uf).replace(/punct/g,au).getRegex(),H9=fn(B6,"gu").replace(/notPunctSpace/g,N9).replace(/punctSpace/g,_9).replace(/punct/g,P6).getRegex(),P9=fn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,H6).replace(/punctSpace/g,Uf).replace(/punct/g,au).getRegex(),z9=fn(/\\(punct)/,"gu").replace(/punct/g,au).getRegex(),B9=fn(/^<(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(),F9=fn(jf).replace("(?:-->|$)","-->").getRegex(),q9=fn("^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",F9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Sc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,j9=fn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Sc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),F6=fn(/^!?\[(label)\]\[(ref)\]/).replace("label",Sc).replace("ref",qf).getRegex(),q6=fn(/^!?\[(ref)\](?:\[\])?/).replace("ref",qf).getRegex(),$9=fn("reflink|nolink(?!\\()","g").replace("reflink",F6).replace("nolink",q6).getRegex(),Vf={_backpedal:zl,anyPunctuation:z9,autolink:B9,blockSkip:D9,br:I6,code:M9,del:zl,emStrongLDelim:R9,emStrongRDelimAst:I9,emStrongRDelimUnd:P9,escape:A9,link:j9,nolink:q6,punctuation:L9,reflink:F6,reflinkSearch:$9,tag:q9,text:C9,url:zl},U9={...Vf,link:fn(/^!?\[(label)\]\((.*?)\)/).replace("label",Sc).getRegex(),reflink:fn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sc).getRegex()},bp={...Vf,emStrongRDelimAst:H9,emStrongLDelim:O9,url:fn(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},V9={...bp,br:fn(I6).replace("{2,}","*").getRegex(),text:fn(bp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},S0={normal:$f,gfm:E9,pedantic:T9},fl={normal:Vf,gfm:bp,breaks:V9,pedantic:U9},W9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xm=t=>W9[t];function Zi(t,e){if(e){if(Dr.escapeTest.test(t))return t.replace(Dr.escapeReplace,Xm)}else if(Dr.escapeTestNoEncode.test(t))return t.replace(Dr.escapeReplaceNoEncode,Xm);return t}function Zm(t){try{t=encodeURI(t).replace(Dr.percentDecode,"%")}catch{return null}return t}function Ym(t,e){var n;let r=t.replace(Dr.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),a=r.split(Dr.splitPipe),l=0;if(a[0].trim()||a.shift(),a.length>0&&!((n=a.at(-1))!=null&&n.trim())&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;l<a.length;l++)a[l]=a[l].trim().replace(Dr.slashPipe,"|");return a}function ml(t,e,n){let r=t.length;if(r===0)return"";let a=0;for(;a<r;){let l=t.charAt(r-a-1);if(l===e&&!n)a++;else if(l!==e&&n)a++;else break}return t.slice(0,r-a)}function G9(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 Jm(t,e,n,r,a){let l=e.href,h=e.title||null,c=t[1].replace(a.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 K9(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let a=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>=a.length?l.slice(a.length):l}).join(`
`)}var Ec=class{constructor(t){St(this,"options"),St(this,"rules"),St(this,"lexer"),this.options=t||ns}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:ml(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=K9(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=ml(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:ml(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=ml(e[0],`
`).split(`
`),r="",a="",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,a=a?`${a}
${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,a=a.substring(0,a.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,a=a.substring(0,a.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:a}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,a={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),A=this.rules.other.hrRegex(w),T=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," "),T.test(m)||M.test(m)||y.test(m)||C.test(m)||A.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||T.test(g)||M.test(g)||A.test(g))break;b+=`
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
`,t=t.substring(N.length+1),g=z.slice(w)}}a.loose||(h?a.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,""))),a.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),a.raw+=v}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let p=0;p<a.items.length;p++)if(this.lexer.state.top=!1,a.items[p].tokens=this.lexer.blockTokens(a.items[p].text,[]),!a.loose){let v=a.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=b}if(a.loose)for(let p=0;p<a.items.length;p++)a.items[p].loose=!0;return a}}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"):"",a=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:a}}}table(t){var e;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=Ym(n[1]),a=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===a.length){for(let c of a)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(Ym(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=ml(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=G9(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],a="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],a=l[3])}else a=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)),Jm(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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," "),a=e[r.toLowerCase()];if(!a){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Jm(n,a,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 a=[...r[0]].length-1,l,h,c=a,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+a);(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])&&a%3&&!((a+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,a+r.index+b+h);if(Math.min(a,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),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&a&&(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,a;if(n[2]==="@")r=n[0],a="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."?a="http://"+n[0]:a=n[0]}return{type:"link",raw:n[0],text:r,href:a,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}}}},Ia=class yp{constructor(e){St(this,"tokens"),St(this,"options"),St(this,"state"),St(this,"tokenizer"),St(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ns,this.options.tokenizer=this.options.tokenizer||new Ec,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:Dr,block:S0.normal,inline:fl.normal};this.options.pedantic?(n.block=S0.pedantic,n.inline=fl.pedantic):this.options.gfm&&(n.block=S0.gfm,this.options.breaks?n.inline=fl.breaks:n.inline=fl.gfm),this.tokenizer.rules=n}static get rules(){return{block:S0,inline:fl}}static lex(e,n){return new yp(n).lex(e)}static lexInline(e,n){return new yp(n).inlineTokens(e)}lex(e){e=e.replace(Dr.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 a,l,h;for(this.options.pedantic&&(e=e.replace(Dr.tabCharGlobal," ").replace(Dr.spaceLine,""));e;){let c;if((l=(a=this.options.extensions)==null?void 0:a.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,a,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((a=(r=this.options.extensions)==null?void 0:r.inline)!=null&&a.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}},Tc=class{constructor(t){St(this,"options"),St(this,"parser"),this.options=t||ns}space(t){return""}code({text:t,lang:e,escaped:n}){var r;let a=(r=(e||"").match(Dr.notSpaceStart))==null?void 0:r[0],l=t.replace(Dr.endingNewline,"")+`
`;return a?'<pre><code class="language-'+Zi(a)+'">'+(n?l:Zi(l,!0))+`</code></pre>
`:"<pre><code>"+(n?l:Zi(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 a=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+a+l+`>
`+r+"</"+a+`>
`}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+" "+Zi(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 a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);e+=this.tablerow({text:n});let r="";for(let a=0;a<t.rows.length;a++){let l=t.rows[a];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>${Zi(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),a=Zm(t);if(a===null)return r;t=a;let l='<a href="'+t+'"';return e&&(l+=' title="'+Zi(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let a=Zm(t);if(a===null)return Zi(n);t=a;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Zi(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Zi(t.text)}},Wf=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""}},Ha=class wp{constructor(e){St(this,"options"),St(this,"renderer"),St(this,"textRenderer"),this.options=e||ns,this.options.renderer=this.options.renderer||new Tc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Wf}static parse(e,n){return new wp(n).parse(e)}static parseInline(e,n){return new wp(n).parseInline(e)}parse(e,n=!0){var r,a;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((a=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&a[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,a;let l="";for(let h=0;h<e.length;h++){let c=e[h];if((a=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&a[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}},lh,Y0=(lh=class{constructor(t){St(this,"options"),St(this,"block"),this.options=t||ns}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Ia.lex:Ia.lexInline}provideParser(){return this.block?Ha.parse:Ha.parseInline}},St(lh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),lh),X9=class{constructor(...t){St(this,"defaults",zf()),St(this,"options",this.setOptions),St(this,"parse",this.parseMarkdown(!0)),St(this,"parseInline",this.parseMarkdown(!1)),St(this,"Parser",Ha),St(this,"Renderer",Tc),St(this,"TextRenderer",Wf),St(this,"Lexer",Ia),St(this,"Tokenizer",Ec),St(this,"Hooks",Y0),this.use(...t)}walkTokens(t,e){var n,r;let a=[];for(let l of t)switch(a=a.concat(e.call(this,l)),l.type){case"table":{let h=l;for(let c of h.header)a=a.concat(this.walkTokens(c.tokens,e));for(let c of h.rows)for(let p of c)a=a.concat(this.walkTokens(p.tokens,e));break}case"list":{let h=l;a=a.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);a=a.concat(this.walkTokens(p,e))}):h.tokens&&(a=a.concat(this.walkTokens(h.tokens,e)))}}return a}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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let l=e.renderers[a.name];l?e.renderers[a.name]=function(...h){let c=a.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[a.level];l?l.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),n.renderer){let a=this.defaults.renderer||new Tc(this.defaults);for(let l in n.renderer){if(!(l in a))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=a[h];a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b||""}}r.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Ec(this.defaults);for(let l in n.tokenizer){if(!(l in a))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=a[h];a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b}}r.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new Y0;for(let l in n.hooks){if(!(l in a))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=a[h];Y0.passThroughHooks.has(l)?a[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(a,v)).then(g=>p.call(a,g));let b=c.call(a,v);return p.call(a,b)}:a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b}}r.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),a&&(c=c.concat(a.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Ia.lex(t,e??this.defaults)}parser(t,e){return Ha.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},a={...this.defaults,...r},l=this.onError(!!a.silent,!!a.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"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let h=a.hooks?a.hooks.provideLexer():t?Ia.lex:Ia.lexInline,c=a.hooks?a.hooks.provideParser():t?Ha.parse:Ha.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(e):e).then(p=>h(p,a)).then(p=>a.hooks?a.hooks.processAllTokens(p):p).then(p=>a.walkTokens?Promise.all(this.walkTokens(p,a.walkTokens)).then(()=>p):p).then(p=>c(p,a)).then(p=>a.hooks?a.hooks.postprocess(p):p).catch(l);try{a.hooks&&(e=a.hooks.preprocess(e));let p=h(e,a);a.hooks&&(p=a.hooks.processAllTokens(p)),a.walkTokens&&this.walkTokens(p,a.walkTokens);let v=c(p,a);return a.hooks&&(v=a.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>"+Zi(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Yo=new X9;function sn(t,e){return Yo.parse(t,e)}sn.options=sn.setOptions=function(t){return Yo.setOptions(t),sn.defaults=Yo.defaults,N6(sn.defaults),sn};sn.getDefaults=zf;sn.defaults=ns;sn.use=function(...t){return Yo.use(...t),sn.defaults=Yo.defaults,N6(sn.defaults),sn};sn.walkTokens=function(t,e){return Yo.walkTokens(t,e)};sn.parseInline=Yo.parseInline;sn.Parser=Ha;sn.parser=Ha.parse;sn.Renderer=Tc;sn.TextRenderer=Wf;sn.Lexer=Ia;sn.lexer=Ia.lex;sn.Tokenizer=Ec;sn.Hooks=Y0;sn.parse=sn;sn.options;sn.setOptions;sn.use;sn.walkTokens;sn.parseInline;Ha.parse;Ia.lex;var xp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j6(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $6={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 a=/(?:^|\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 A(T){return T instanceof p?new p(T.type,A(T.content),T.alias):Array.isArray(T)?T.map(A):T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(A){return Object.prototype.toString.call(A).slice(8,-1)},objId:function(A){return A.__id||Object.defineProperty(A,"__id",{value:++l}),A.__id},clone:function A(T,M){M=M||{};var y,N;switch(c.util.type(T)){case"Object":if(N=c.util.objId(T),M[N])return M[N];y={},M[N]=y;for(var z in T)T.hasOwnProperty(z)&&(y[z]=A(T[z],M));return y;case"Array":return N=c.util.objId(T),M[N]?M[N]:(y=[],M[N]=y,T.forEach(function(q,P){y[P]=A(q,M)}),y);default:return T}},getLanguage:function(A){for(;A;){var T=a.exec(A.className);if(T)return T[1].toLowerCase();A=A.parentElement}return"none"},setLanguage:function(A,T){A.className=A.className.replace(RegExp(a,"gi"),""),A.classList.add("language-"+T)},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 A=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(A){var T=document.getElementsByTagName("script");for(var M in T)if(T[M].src==A)return T[M]}return null}},isActive:function(A,T,M){for(var y="no-"+T;A;){var N=A.classList;if(N.contains(T))return!0;if(N.contains(y))return!1;A=A.parentElement}return!!M}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(A,T){var M=c.util.clone(c.languages[A]);for(var y in T)M[y]=T[y];return M},insertBefore:function(A,T,M,y){y=y||c.languages;var N=y[A],z={};for(var q in N)if(N.hasOwnProperty(q)){if(q==T)for(var P in M)M.hasOwnProperty(P)&&(z[P]=M[P]);M.hasOwnProperty(q)||(z[q]=N[q])}var Y=y[A];return y[A]=z,c.languages.DFS(c.languages,function(te,ue){ue===Y&&te!=A&&(this[te]=z)}),z},DFS:function A(T,M,y,N){N=N||{};var z=c.util.objId;for(var q in T)if(T.hasOwnProperty(q)){M.call(T,q,T[q],y||q);var P=T[q],Y=c.util.type(P);Y==="Object"&&!N[z(P)]?(N[z(P)]=!0,A(P,M,null,N)):Y==="Array"&&!N[z(P)]&&(N[z(P)]=!0,A(P,M,q,N))}}},plugins:{},highlightAll:function(A,T){c.highlightAllUnder(document,A,T)},highlightAllUnder:function(A,T,M){var y={callback:M,container:A,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,T===!0,y.callback)},highlightElement:function(A,T,M){var y=c.util.getLanguage(A),N=c.languages[y];c.util.setLanguage(A,y);var z=A.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(z,y);var q=A.textContent,P={element:A,language:y,grammar:N,code:q};function Y(ue){P.highlightedCode=ue,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(T&&r.Worker){var te=new Worker(c.filename);te.onmessage=function(ue){Y(ue.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(A,T,M){var y={code:A,grammar:T,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(A,T){var M=T.rest;if(M){for(var y in M)T[y]=M[y];delete T.rest}var N=new g;return m(N,N.head,A),b(A,N,T,N.head,0),w(N)},hooks:{all:{},add:function(A,T){var M=c.hooks.all;M[A]=M[A]||[],M[A].push(T)},run:function(A,T){var M=c.hooks.all[A];if(!(!M||!M.length))for(var y=0,N;N=M[y++];)N(T)}},Token:p};r.Prism=c;function p(A,T,M,y){this.type=A,this.content=T,this.alias=M,this.length=(y||"").length|0}p.stringify=function A(T,M){if(typeof T=="string")return T;if(Array.isArray(T)){var y="";return T.forEach(function(Y){y+=A(Y,M)}),y}var N={type:T.type,content:A(T.content,M),tag:"span",classes:["token",T.type],attributes:{},language:M},z=T.alias;z&&(Array.isArray(z)?Array.prototype.push.apply(N.classes,z):N.classes.push(z)),c.hooks.run("wrap",N);var q="";for(var P in N.attributes)q+=" "+P+'="'+(N.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+q+">"+N.content+"</"+N.tag+">"};function v(A,T,M,y){A.lastIndex=T;var N=A.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(A,T,M,y,N,z){for(var q in M)if(!(!M.hasOwnProperty(q)||!M[q])){var P=M[q];P=Array.isArray(P)?P:[P];for(var Y=0;Y<P.length;++Y){if(z&&z.cause==q+","+Y)return;var te=P[Y],ue=te.inside,Le=!!te.lookbehind,qe=!!te.greedy,Xe=te.alias;if(qe&&!te.pattern.global){var it=te.pattern.toString().match(/[imsuy]*$/)[0];te.pattern=RegExp(te.pattern.source,it+"g")}for(var $e=te.pattern||te,De=y.next,nt=N;De!==T.tail&&!(z&&nt>=z.reach);nt+=De.value.length,De=De.next){var ut=De.value;if(T.length>A.length)return;if(!(ut instanceof p)){var je=1,j;if(qe){if(j=v($e,nt,A,Le),!j||j.index>=A.length)break;var Mt=j.index,yt=j.index+j[0].length,It=nt;for(It+=De.value.length;Mt>=It;)De=De.next,It+=De.value.length;if(It-=De.value.length,nt=It,De.value instanceof p)continue;for(var bt=De;bt!==T.tail&&(It<yt||typeof bt.value=="string");bt=bt.next)je++,It+=bt.value.length;je--,ut=A.slice(nt,It),j.index-=nt}else if(j=v($e,0,ut,Le),!j)continue;var Mt=j.index,se=j[0],fe=ut.slice(0,Mt),J=ut.slice(Mt+se.length),Q=nt+ut.length;z&&Q>z.reach&&(z.reach=Q);var Ie=De.prev;fe&&(Ie=m(T,Ie,fe),nt+=fe.length),x(T,Ie,je);var de=new p(q,ue?c.tokenize(se,ue):se,Xe,se);if(De=m(T,Ie,de),J&&m(T,De,J),je>1){var W={cause:q+","+Y,reach:Q};b(A,T,M,De.prev,nt,W),z&&W.reach>z.reach&&(z.reach=W.reach)}}}}}}function g(){var A={value:null,prev:null,next:null},T={value:null,prev:A,next:null};A.next=T,this.head=A,this.tail=T,this.length=0}function m(A,T,M){var y=T.next,N={value:M,prev:T,next:y};return T.next=N,y.prev=N,A.length++,N}function x(A,T,M){for(var y=T.next,N=0;N<M&&y!==A.tail;N++)y=y.next;T.next=y,y.prev=T,A.length-=N}function w(A){for(var T=[],M=A.head.next;M!==A.tail;)T.push(M.value),M=M.next;return T}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(A){var T=JSON.parse(A.data),M=T.language,y=T.code,N=T.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 xp<"u"&&(xp.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(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(r,a){var l={};l["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[a]},l.cdata=/^<!\[CDATA\[|\]\]>$/i;var h={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}};h["language-"+a]={pattern:/[\s\S]+/,inside:n.languages[a]};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,a){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:[a,"language-"+a],inside:n.languages[a]},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 a=/(?:"(?:\\(?:\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+"|"+a.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\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,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…",a=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(a(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],A=S[3];return C?A?[k,Number(A)]:[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"),A=w.language;if(A==="none"){var T=(/\.(\w+)$/.exec(C)||[,"none"])[1];A=h[T]||T}n.util.setLanguage(k,A),n.util.setLanguage(S,A);var M=n.plugins.autoloader;M&&M.loadLanguages(A),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),q=N[0],P=N[1]==null?z.length:N[1];q<0&&(q+=z.length),q=Math.max(0,Math.min(q-1,z.length)),P<0&&(P+=z.length),P=Math.max(0,Math.min(P,z.length)),y=z.slice(q,P).join(`
`),S.hasAttribute("data-start")||S.setAttribute("data-start",String(q+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)}}()})($6);var Z9=$6.exports;const Qm=j6(Z9);class ri{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 ri(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class wi{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 wi(n,ri.range(this,e))}}let tt=class U6{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,a,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;a=h.start,l=h.end,a===c.length?r+=" at end of input: ":r+=" at position "+(a+1)+": ";var p=c.slice(a,l).replace(/[^]/g,"$&̲"),v;a>15?v="…"+c.slice(a-15,a):v=c.slice(0,a);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__=U6.prototype,g.position=a,a!=null&&l!=null&&(g.length=l-a),g.rawMessage=e,g}};tt.prototype.__proto__=Error.prototype;var Y9=function(t,e){return t.indexOf(e)!==-1},J9=function(t,e){return t===void 0?e:t},Q9=/([A-Z])/g,ex=function(t){return t.replace(Q9,"-$1").toLowerCase()},tx={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},nx=/[&><"']/g;function rx(t){return String(t).replace(nx,e=>tx[e])}var V6=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},ix=function(t){var e=V6(t);return e.type==="mathord"||e.type==="textord"||e.type==="atom"},ax=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},ox=function(t){var e=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},Tt={contains:Y9,deflt:J9,escape:rx,hyphenate:ex,getBaseElem:V6,isCharacterBox:ix,protocolFromUrl:ox},J0={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 sx(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 Gf{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 J0)if(J0.hasOwnProperty(n)){var r=J0[n];this[n]=e[n]!==void 0?r.processor?r.processor(e[n]):e[n]:sx(r)}}reportNonstrict(e,n,r){var a=this.strict;if(typeof a=="function"&&(a=a(e,n,r)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new tt("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),r);a==="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 '"+a+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,r){var a=this.strict;if(typeof a=="function")try{a=a(e,n,r)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="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 '"+a+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var n=Tt.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 io{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 na[lx[this.id]]}sub(){return na[cx[this.id]]}fracNum(){return na[ux[this.id]]}fracDen(){return na[dx[this.id]]}cramp(){return na[hx[this.id]]}text(){return na[px[this.id]]}isTight(){return this.size>=2}}var Kf=0,Ac=1,Ss=2,Ba=3,Gl=4,mi=5,Ms=6,Rr=7,na=[new io(Kf,0,!1),new io(Ac,0,!0),new io(Ss,1,!1),new io(Ba,1,!0),new io(Gl,2,!1),new io(mi,2,!0),new io(Ms,3,!1),new io(Rr,3,!0)],lx=[Gl,mi,Gl,mi,Ms,Rr,Ms,Rr],cx=[mi,mi,mi,mi,Rr,Rr,Rr,Rr],ux=[Ss,Ba,Gl,mi,Ms,Rr,Ms,Rr],dx=[Ba,Ba,mi,mi,Rr,Rr,Rr,Rr],hx=[Ac,Ac,Ba,Ba,mi,mi,Rr,Rr],px=[Kf,Ac,Ss,Ba,Ss,Ba,Ss,Ba],Dt={DISPLAY:na[Kf],TEXT:na[Ss],SCRIPT:na[Gl],SCRIPTSCRIPT:na[Ms]},kp=[{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 fx(t){for(var e=0;e<kp.length;e++)for(var n=kp[e],r=0;r<n.blocks.length;r++){var a=n.blocks[r];if(t>=a[0]&&t<=a[1])return n.name}return null}var Q0=[];kp.forEach(t=>t.blocks.forEach(e=>Q0.push(...e)));function W6(t){for(var e=0;e<Q0.length;e+=2)if(t>=Q0[e]&&t<=Q0[e+1])return!0;return!1}var cs=80,mx=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"},gx=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"},vx=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"},bx=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"},yx=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"},wx=function(t){var e=t/2;return"M400000 "+t+" H0 L"+e+" 0 l65 45 L145 "+(t-80)+" H400000z"},xx=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"},kx=function(t,e,n){e=1e3*e;var r="";switch(t){case"sqrtMain":r=mx(e,cs);break;case"sqrtSize1":r=gx(e,cs);break;case"sqrtSize2":r=vx(e,cs);break;case"sqrtSize3":r=bx(e,cs);break;case"sqrtSize4":r=yx(e,cs);break;case"sqrtTall":r=xx(e,cs,n)}return r},Sx=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""}},eg={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`},Ex=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 a0{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 Tt.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 ia={"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]}},E0={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]},tg={Å:"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 Tx(t,e){ia[t]=e}function Xf(t,e,n){if(!ia[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),a=ia[e][r];if(!a&&t[0]in tg&&(r=tg[t[0]].charCodeAt(0),a=ia[e][r]),!a&&n==="text"&&W6(r)&&(a=ia[e][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var ch={};function Ax(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!ch[e]){var n=ch[e]={cssEmPerMu:E0.quad[e]/18};for(var r in E0)E0.hasOwnProperty(r)&&(n[r]=E0[r][e])}return ch[e]}var Mx=[[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]],ng=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],rg=function(t,e){return e.size<2?t:Mx[t-1][e.size-1]};class La{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||La.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=ng[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 La(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:rg(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:ng[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=rg(La.BASESIZE,e);return this.size===n&&this.textSize===La.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!==La.BASESIZE?["sizing","reset-size"+this.size,"size"+La.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ax(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}La.BASESIZE=6;var Sp={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},Cx={ex:!0,em:!0,mu:!0},G6=function(t){return typeof t!="string"&&(t=t.unit),t in Sp||t in Cx||t==="ex"},Un=function(t,e){var n;if(t.unit in Sp)n=Sp[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 tt("Invalid unit: '"+t.unit+"'");r!==e&&(n*=r.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*n,e.maxSize)},st=function(t){return+t.toFixed(4)+"em"},bo=function(t){return t.filter(e=>e).join(" ")},K6=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)}},X6=function(t){var e=document.createElement(t);e.className=bo(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 a=0;a<this.children.length;a++)e.appendChild(this.children[a].toNode());return e},Lx=/[\s"'>/=\x00-\x1f]/,Z6=function(t){var e="<"+t;this.classes.length&&(e+=' class="'+Tt.escape(bo(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Tt.hyphenate(r)+":"+this.style[r]+";");n&&(e+=' style="'+Tt.escape(n)+'"');for(var a in this.attributes)if(this.attributes.hasOwnProperty(a)){if(Lx.test(a))throw new tt("Invalid attribute name '"+a+"'");e+=" "+a+'="'+Tt.escape(this.attributes[a])+'"'}e+=">";for(var l=0;l<this.children.length;l++)e+=this.children[l].toMarkup();return e+="</"+t+">",e};class o0{constructor(e,n,r,a){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,K6.call(this,e,r,a),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return Tt.contains(this.classes,e)}toNode(){return X6.call(this,"span")}toMarkup(){return Z6.call(this,"span")}}class Zf{constructor(e,n,r,a){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,K6.call(this,n,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return Tt.contains(this.classes,e)}toNode(){return X6.call(this,"a")}toMarkup(){return Z6.call(this,"a")}}class _x{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 Tt.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="'+Tt.escape(this.src)+'"'+(' alt="'+Tt.escape(this.alt)+'"'),n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Tt.hyphenate(r)+":"+this.style[r]+";");return n&&(e+=' style="'+Tt.escape(n)+'"'),e+="'/>",e}}var Nx={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Si{constructor(e,n,r,a,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=a||0,this.skew=l||0,this.width=h||0,this.classes=c||[],this.style=p||{},this.maxFontSize=0;var v=fx(this.text.charCodeAt(0));v&&this.classes.push(v+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Nx[this.text])}hasClass(e){return Tt.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=st(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=bo(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+=Tt.escape(bo(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=Tt.hyphenate(a)+":"+this.style[a]+";");r&&(e=!0,n+=' style="'+Tt.escape(r)+'"');var l=Tt.escape(this.text);return e?(n+=">",n+=l,n+="</span>",n):l}}class Va{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 a=0;a<this.children.length;a++)n.appendChild(this.children[a].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+'="'+Tt.escape(this.attributes[n])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}}class yo{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",eg[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+Tt.escape(this.alternate)+'"/>':'<path d="'+Tt.escape(eg[this.pathName])+'"/>'}}class Ep{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+'="'+Tt.escape(this.attributes[n])+'"');return e+="/>",e}}function ig(t){if(t instanceof Si)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function Dx(t){if(t instanceof o0)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var Rx={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ox={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Nn={math:{},text:{}};function R(t,e,n,r,a,l){Nn[t][a]={font:e,group:n,replace:r},l&&r&&(Nn[t][r]=Nn[t][a])}var I="math",Ge="text",$="main",re="ams",Bn="accent-token",ft="bin",zr="close",_s="inner",_t="mathord",ir="op-token",li="open",ou="punct",ae="rel",Ja="spacing",ye="textord";R(I,$,ae,"≡","\\equiv",!0);R(I,$,ae,"≺","\\prec",!0);R(I,$,ae,"≻","\\succ",!0);R(I,$,ae,"","\\sim",!0);R(I,$,ae,"⊥","\\perp");R(I,$,ae,"⪯","\\preceq",!0);R(I,$,ae,"⪰","\\succeq",!0);R(I,$,ae,"≃","\\simeq",!0);R(I,$,ae,"","\\mid",!0);R(I,$,ae,"≪","\\ll",!0);R(I,$,ae,"≫","\\gg",!0);R(I,$,ae,"≍","\\asymp",!0);R(I,$,ae,"∥","\\parallel");R(I,$,ae,"⋈","\\bowtie",!0);R(I,$,ae,"⌣","\\smile",!0);R(I,$,ae,"⊑","\\sqsubseteq",!0);R(I,$,ae,"⊒","\\sqsupseteq",!0);R(I,$,ae,"≐","\\doteq",!0);R(I,$,ae,"⌢","\\frown",!0);R(I,$,ae,"∋","\\ni",!0);R(I,$,ae,"∝","\\propto",!0);R(I,$,ae,"⊢","\\vdash",!0);R(I,$,ae,"⊣","\\dashv",!0);R(I,$,ae,"∋","\\owns");R(I,$,ou,".","\\ldotp");R(I,$,ou,"⋅","\\cdotp");R(I,$,ye,"#","\\#");R(Ge,$,ye,"#","\\#");R(I,$,ye,"&","\\&");R(Ge,$,ye,"&","\\&");R(I,$,ye,"ℵ","\\aleph",!0);R(I,$,ye,"∀","\\forall",!0);R(I,$,ye,"ℏ","\\hbar",!0);R(I,$,ye,"∃","\\exists",!0);R(I,$,ye,"∇","\\nabla",!0);R(I,$,ye,"♭","\\flat",!0);R(I,$,ye,"","\\ell",!0);R(I,$,ye,"♮","\\natural",!0);R(I,$,ye,"♣","\\clubsuit",!0);R(I,$,ye,"℘","\\wp",!0);R(I,$,ye,"♯","\\sharp",!0);R(I,$,ye,"♢","\\diamondsuit",!0);R(I,$,ye,"","\\Re",!0);R(I,$,ye,"♡","\\heartsuit",!0);R(I,$,ye,"","\\Im",!0);R(I,$,ye,"♠","\\spadesuit",!0);R(I,$,ye,"§","\\S",!0);R(Ge,$,ye,"§","\\S");R(I,$,ye,"¶","\\P",!0);R(Ge,$,ye,"¶","\\P");R(I,$,ye,"†","\\dag");R(Ge,$,ye,"†","\\dag");R(Ge,$,ye,"†","\\textdagger");R(I,$,ye,"‡","\\ddag");R(Ge,$,ye,"‡","\\ddag");R(Ge,$,ye,"‡","\\textdaggerdbl");R(I,$,zr,"⎱","\\rmoustache",!0);R(I,$,li,"⎰","\\lmoustache",!0);R(I,$,zr,"⟯","\\rgroup",!0);R(I,$,li,"⟮","\\lgroup",!0);R(I,$,ft,"∓","\\mp",!0);R(I,$,ft,"⊖","\\ominus",!0);R(I,$,ft,"⊎","\\uplus",!0);R(I,$,ft,"⊓","\\sqcap",!0);R(I,$,ft,"","\\ast");R(I,$,ft,"⊔","\\sqcup",!0);R(I,$,ft,"◯","\\bigcirc",!0);R(I,$,ft,"∙","\\bullet",!0);R(I,$,ft,"‡","\\ddagger");R(I,$,ft,"≀","\\wr",!0);R(I,$,ft,"⨿","\\amalg");R(I,$,ft,"&","\\And");R(I,$,ae,"⟵","\\longleftarrow",!0);R(I,$,ae,"⇐","\\Leftarrow",!0);R(I,$,ae,"⟸","\\Longleftarrow",!0);R(I,$,ae,"⟶","\\longrightarrow",!0);R(I,$,ae,"⇒","\\Rightarrow",!0);R(I,$,ae,"⟹","\\Longrightarrow",!0);R(I,$,ae,"↔","\\leftrightarrow",!0);R(I,$,ae,"⟷","\\longleftrightarrow",!0);R(I,$,ae,"⇔","\\Leftrightarrow",!0);R(I,$,ae,"⟺","\\Longleftrightarrow",!0);R(I,$,ae,"↦","\\mapsto",!0);R(I,$,ae,"⟼","\\longmapsto",!0);R(I,$,ae,"↗","\\nearrow",!0);R(I,$,ae,"↩","\\hookleftarrow",!0);R(I,$,ae,"↪","\\hookrightarrow",!0);R(I,$,ae,"↘","\\searrow",!0);R(I,$,ae,"↼","\\leftharpoonup",!0);R(I,$,ae,"⇀","\\rightharpoonup",!0);R(I,$,ae,"↙","\\swarrow",!0);R(I,$,ae,"↽","\\leftharpoondown",!0);R(I,$,ae,"⇁","\\rightharpoondown",!0);R(I,$,ae,"↖","\\nwarrow",!0);R(I,$,ae,"⇌","\\rightleftharpoons",!0);R(I,re,ae,"≮","\\nless",!0);R(I,re,ae,"","\\@nleqslant");R(I,re,ae,"","\\@nleqq");R(I,re,ae,"⪇","\\lneq",!0);R(I,re,ae,"≨","\\lneqq",!0);R(I,re,ae,"","\\@lvertneqq");R(I,re,ae,"⋦","\\lnsim",!0);R(I,re,ae,"⪉","\\lnapprox",!0);R(I,re,ae,"⊀","\\nprec",!0);R(I,re,ae,"⋠","\\npreceq",!0);R(I,re,ae,"⋨","\\precnsim",!0);R(I,re,ae,"⪹","\\precnapprox",!0);R(I,re,ae,"≁","\\nsim",!0);R(I,re,ae,"","\\@nshortmid");R(I,re,ae,"∤","\\nmid",!0);R(I,re,ae,"⊬","\\nvdash",!0);R(I,re,ae,"⊭","\\nvDash",!0);R(I,re,ae,"⋪","\\ntriangleleft");R(I,re,ae,"⋬","\\ntrianglelefteq",!0);R(I,re,ae,"⊊","\\subsetneq",!0);R(I,re,ae,"","\\@varsubsetneq");R(I,re,ae,"⫋","\\subsetneqq",!0);R(I,re,ae,"","\\@varsubsetneqq");R(I,re,ae,"≯","\\ngtr",!0);R(I,re,ae,"","\\@ngeqslant");R(I,re,ae,"","\\@ngeqq");R(I,re,ae,"⪈","\\gneq",!0);R(I,re,ae,"≩","\\gneqq",!0);R(I,re,ae,"","\\@gvertneqq");R(I,re,ae,"⋧","\\gnsim",!0);R(I,re,ae,"⪊","\\gnapprox",!0);R(I,re,ae,"⊁","\\nsucc",!0);R(I,re,ae,"⋡","\\nsucceq",!0);R(I,re,ae,"⋩","\\succnsim",!0);R(I,re,ae,"⪺","\\succnapprox",!0);R(I,re,ae,"≆","\\ncong",!0);R(I,re,ae,"","\\@nshortparallel");R(I,re,ae,"∦","\\nparallel",!0);R(I,re,ae,"⊯","\\nVDash",!0);R(I,re,ae,"⋫","\\ntriangleright");R(I,re,ae,"⋭","\\ntrianglerighteq",!0);R(I,re,ae,"","\\@nsupseteqq");R(I,re,ae,"⊋","\\supsetneq",!0);R(I,re,ae,"","\\@varsupsetneq");R(I,re,ae,"⫌","\\supsetneqq",!0);R(I,re,ae,"","\\@varsupsetneqq");R(I,re,ae,"⊮","\\nVdash",!0);R(I,re,ae,"⪵","\\precneqq",!0);R(I,re,ae,"⪶","\\succneqq",!0);R(I,re,ae,"","\\@nsubseteqq");R(I,re,ft,"⊴","\\unlhd");R(I,re,ft,"⊵","\\unrhd");R(I,re,ae,"↚","\\nleftarrow",!0);R(I,re,ae,"↛","\\nrightarrow",!0);R(I,re,ae,"⇍","\\nLeftarrow",!0);R(I,re,ae,"⇏","\\nRightarrow",!0);R(I,re,ae,"↮","\\nleftrightarrow",!0);R(I,re,ae,"⇎","\\nLeftrightarrow",!0);R(I,re,ae,"△","\\vartriangle");R(I,re,ye,"ℏ","\\hslash");R(I,re,ye,"▽","\\triangledown");R(I,re,ye,"◊","\\lozenge");R(I,re,ye,"Ⓢ","\\circledS");R(I,re,ye,"®","\\circledR");R(Ge,re,ye,"®","\\circledR");R(I,re,ye,"∡","\\measuredangle",!0);R(I,re,ye,"∄","\\nexists");R(I,re,ye,"℧","\\mho");R(I,re,ye,"Ⅎ","\\Finv",!0);R(I,re,ye,"⅁","\\Game",!0);R(I,re,ye,"","\\backprime");R(I,re,ye,"▲","\\blacktriangle");R(I,re,ye,"▼","\\blacktriangledown");R(I,re,ye,"■","\\blacksquare");R(I,re,ye,"⧫","\\blacklozenge");R(I,re,ye,"★","\\bigstar");R(I,re,ye,"∢","\\sphericalangle",!0);R(I,re,ye,"∁","\\complement",!0);R(I,re,ye,"ð","\\eth",!0);R(Ge,$,ye,"ð","ð");R(I,re,ye,"","\\diagup");R(I,re,ye,"╲","\\diagdown");R(I,re,ye,"□","\\square");R(I,re,ye,"□","\\Box");R(I,re,ye,"◊","\\Diamond");R(I,re,ye,"¥","\\yen",!0);R(Ge,re,ye,"¥","\\yen",!0);R(I,re,ye,"✓","\\checkmark",!0);R(Ge,re,ye,"✓","\\checkmark");R(I,re,ye,"ℶ","\\beth",!0);R(I,re,ye,"ℸ","\\daleth",!0);R(I,re,ye,"ℷ","\\gimel",!0);R(I,re,ye,"ϝ","\\digamma",!0);R(I,re,ye,"ϰ","\\varkappa");R(I,re,li,"┌","\\@ulcorner",!0);R(I,re,zr,"┐","\\@urcorner",!0);R(I,re,li,"└","\\@llcorner",!0);R(I,re,zr,"┘","\\@lrcorner",!0);R(I,re,ae,"≦","\\leqq",!0);R(I,re,ae,"⩽","\\leqslant",!0);R(I,re,ae,"⪕","\\eqslantless",!0);R(I,re,ae,"≲","\\lesssim",!0);R(I,re,ae,"⪅","\\lessapprox",!0);R(I,re,ae,"≊","\\approxeq",!0);R(I,re,ft,"⋖","\\lessdot");R(I,re,ae,"⋘","\\lll",!0);R(I,re,ae,"≶","\\lessgtr",!0);R(I,re,ae,"⋚","\\lesseqgtr",!0);R(I,re,ae,"⪋","\\lesseqqgtr",!0);R(I,re,ae,"≑","\\doteqdot");R(I,re,ae,"≓","\\risingdotseq",!0);R(I,re,ae,"≒","\\fallingdotseq",!0);R(I,re,ae,"∽","\\backsim",!0);R(I,re,ae,"⋍","\\backsimeq",!0);R(I,re,ae,"⫅","\\subseteqq",!0);R(I,re,ae,"⋐","\\Subset",!0);R(I,re,ae,"⊏","\\sqsubset",!0);R(I,re,ae,"≼","\\preccurlyeq",!0);R(I,re,ae,"⋞","\\curlyeqprec",!0);R(I,re,ae,"≾","\\precsim",!0);R(I,re,ae,"⪷","\\precapprox",!0);R(I,re,ae,"⊲","\\vartriangleleft");R(I,re,ae,"⊴","\\trianglelefteq");R(I,re,ae,"⊨","\\vDash",!0);R(I,re,ae,"⊪","\\Vvdash",!0);R(I,re,ae,"⌣","\\smallsmile");R(I,re,ae,"⌢","\\smallfrown");R(I,re,ae,"≏","\\bumpeq",!0);R(I,re,ae,"≎","\\Bumpeq",!0);R(I,re,ae,"≧","\\geqq",!0);R(I,re,ae,"⩾","\\geqslant",!0);R(I,re,ae,"⪖","\\eqslantgtr",!0);R(I,re,ae,"≳","\\gtrsim",!0);R(I,re,ae,"⪆","\\gtrapprox",!0);R(I,re,ft,"⋗","\\gtrdot");R(I,re,ae,"⋙","\\ggg",!0);R(I,re,ae,"≷","\\gtrless",!0);R(I,re,ae,"⋛","\\gtreqless",!0);R(I,re,ae,"⪌","\\gtreqqless",!0);R(I,re,ae,"≖","\\eqcirc",!0);R(I,re,ae,"≗","\\circeq",!0);R(I,re,ae,"≜","\\triangleq",!0);R(I,re,ae,"","\\thicksim");R(I,re,ae,"≈","\\thickapprox");R(I,re,ae,"⫆","\\supseteqq",!0);R(I,re,ae,"⋑","\\Supset",!0);R(I,re,ae,"⊐","\\sqsupset",!0);R(I,re,ae,"≽","\\succcurlyeq",!0);R(I,re,ae,"⋟","\\curlyeqsucc",!0);R(I,re,ae,"≿","\\succsim",!0);R(I,re,ae,"⪸","\\succapprox",!0);R(I,re,ae,"⊳","\\vartriangleright");R(I,re,ae,"⊵","\\trianglerighteq");R(I,re,ae,"⊩","\\Vdash",!0);R(I,re,ae,"","\\shortmid");R(I,re,ae,"∥","\\shortparallel");R(I,re,ae,"≬","\\between",!0);R(I,re,ae,"⋔","\\pitchfork",!0);R(I,re,ae,"∝","\\varpropto");R(I,re,ae,"◀","\\blacktriangleleft");R(I,re,ae,"∴","\\therefore",!0);R(I,re,ae,"∍","\\backepsilon");R(I,re,ae,"▶","\\blacktriangleright");R(I,re,ae,"∵","\\because",!0);R(I,re,ae,"⋘","\\llless");R(I,re,ae,"⋙","\\gggtr");R(I,re,ft,"⊲","\\lhd");R(I,re,ft,"⊳","\\rhd");R(I,re,ae,"≂","\\eqsim",!0);R(I,$,ae,"⋈","\\Join");R(I,re,ae,"≑","\\Doteq",!0);R(I,re,ft,"∔","\\dotplus",!0);R(I,re,ft,"","\\smallsetminus");R(I,re,ft,"⋒","\\Cap",!0);R(I,re,ft,"⋓","\\Cup",!0);R(I,re,ft,"⩞","\\doublebarwedge",!0);R(I,re,ft,"⊟","\\boxminus",!0);R(I,re,ft,"⊞","\\boxplus",!0);R(I,re,ft,"⋇","\\divideontimes",!0);R(I,re,ft,"⋉","\\ltimes",!0);R(I,re,ft,"⋊","\\rtimes",!0);R(I,re,ft,"⋋","\\leftthreetimes",!0);R(I,re,ft,"⋌","\\rightthreetimes",!0);R(I,re,ft,"⋏","\\curlywedge",!0);R(I,re,ft,"⋎","\\curlyvee",!0);R(I,re,ft,"⊝","\\circleddash",!0);R(I,re,ft,"⊛","\\circledast",!0);R(I,re,ft,"⋅","\\centerdot");R(I,re,ft,"⊺","\\intercal",!0);R(I,re,ft,"⋒","\\doublecap");R(I,re,ft,"⋓","\\doublecup");R(I,re,ft,"⊠","\\boxtimes",!0);R(I,re,ae,"⇢","\\dashrightarrow",!0);R(I,re,ae,"⇠","\\dashleftarrow",!0);R(I,re,ae,"⇇","\\leftleftarrows",!0);R(I,re,ae,"⇆","\\leftrightarrows",!0);R(I,re,ae,"⇚","\\Lleftarrow",!0);R(I,re,ae,"↞","\\twoheadleftarrow",!0);R(I,re,ae,"↢","\\leftarrowtail",!0);R(I,re,ae,"↫","\\looparrowleft",!0);R(I,re,ae,"⇋","\\leftrightharpoons",!0);R(I,re,ae,"↶","\\curvearrowleft",!0);R(I,re,ae,"↺","\\circlearrowleft",!0);R(I,re,ae,"↰","\\Lsh",!0);R(I,re,ae,"⇈","\\upuparrows",!0);R(I,re,ae,"↿","\\upharpoonleft",!0);R(I,re,ae,"⇃","\\downharpoonleft",!0);R(I,$,ae,"⊶","\\origof",!0);R(I,$,ae,"⊷","\\imageof",!0);R(I,re,ae,"⊸","\\multimap",!0);R(I,re,ae,"↭","\\leftrightsquigarrow",!0);R(I,re,ae,"⇉","\\rightrightarrows",!0);R(I,re,ae,"⇄","\\rightleftarrows",!0);R(I,re,ae,"↠","\\twoheadrightarrow",!0);R(I,re,ae,"↣","\\rightarrowtail",!0);R(I,re,ae,"↬","\\looparrowright",!0);R(I,re,ae,"↷","\\curvearrowright",!0);R(I,re,ae,"↻","\\circlearrowright",!0);R(I,re,ae,"↱","\\Rsh",!0);R(I,re,ae,"⇊","\\downdownarrows",!0);R(I,re,ae,"↾","\\upharpoonright",!0);R(I,re,ae,"⇂","\\downharpoonright",!0);R(I,re,ae,"⇝","\\rightsquigarrow",!0);R(I,re,ae,"⇝","\\leadsto");R(I,re,ae,"⇛","\\Rrightarrow",!0);R(I,re,ae,"↾","\\restriction");R(I,$,ye,"","`");R(I,$,ye,"$","\\$");R(Ge,$,ye,"$","\\$");R(Ge,$,ye,"$","\\textdollar");R(I,$,ye,"%","\\%");R(Ge,$,ye,"%","\\%");R(I,$,ye,"_","\\_");R(Ge,$,ye,"_","\\_");R(Ge,$,ye,"_","\\textunderscore");R(I,$,ye,"∠","\\angle",!0);R(I,$,ye,"∞","\\infty",!0);R(I,$,ye,"","\\prime");R(I,$,ye,"△","\\triangle");R(I,$,ye,"Γ","\\Gamma",!0);R(I,$,ye,"Δ","\\Delta",!0);R(I,$,ye,"Θ","\\Theta",!0);R(I,$,ye,"Λ","\\Lambda",!0);R(I,$,ye,"Ξ","\\Xi",!0);R(I,$,ye,"Π","\\Pi",!0);R(I,$,ye,"Σ","\\Sigma",!0);R(I,$,ye,"Υ","\\Upsilon",!0);R(I,$,ye,"Φ","\\Phi",!0);R(I,$,ye,"Ψ","\\Psi",!0);R(I,$,ye,"Ω","\\Omega",!0);R(I,$,ye,"A","Α");R(I,$,ye,"B","Β");R(I,$,ye,"E","Ε");R(I,$,ye,"Z","Ζ");R(I,$,ye,"H","Η");R(I,$,ye,"I","Ι");R(I,$,ye,"K","Κ");R(I,$,ye,"M","Μ");R(I,$,ye,"N","Ν");R(I,$,ye,"O","Ο");R(I,$,ye,"P","Ρ");R(I,$,ye,"T","Τ");R(I,$,ye,"X","Χ");R(I,$,ye,"¬","\\neg",!0);R(I,$,ye,"¬","\\lnot");R(I,$,ye,"","\\top");R(I,$,ye,"⊥","\\bot");R(I,$,ye,"∅","\\emptyset");R(I,re,ye,"∅","\\varnothing");R(I,$,_t,"α","\\alpha",!0);R(I,$,_t,"β","\\beta",!0);R(I,$,_t,"γ","\\gamma",!0);R(I,$,_t,"δ","\\delta",!0);R(I,$,_t,"ϵ","\\epsilon",!0);R(I,$,_t,"ζ","\\zeta",!0);R(I,$,_t,"η","\\eta",!0);R(I,$,_t,"θ","\\theta",!0);R(I,$,_t,"ι","\\iota",!0);R(I,$,_t,"κ","\\kappa",!0);R(I,$,_t,"λ","\\lambda",!0);R(I,$,_t,"μ","\\mu",!0);R(I,$,_t,"ν","\\nu",!0);R(I,$,_t,"ξ","\\xi",!0);R(I,$,_t,"ο","\\omicron",!0);R(I,$,_t,"π","\\pi",!0);R(I,$,_t,"ρ","\\rho",!0);R(I,$,_t,"σ","\\sigma",!0);R(I,$,_t,"τ","\\tau",!0);R(I,$,_t,"υ","\\upsilon",!0);R(I,$,_t,"ϕ","\\phi",!0);R(I,$,_t,"χ","\\chi",!0);R(I,$,_t,"ψ","\\psi",!0);R(I,$,_t,"ω","\\omega",!0);R(I,$,_t,"ε","\\varepsilon",!0);R(I,$,_t,"ϑ","\\vartheta",!0);R(I,$,_t,"ϖ","\\varpi",!0);R(I,$,_t,"ϱ","\\varrho",!0);R(I,$,_t,"ς","\\varsigma",!0);R(I,$,_t,"φ","\\varphi",!0);R(I,$,ft,"","*",!0);R(I,$,ft,"+","+");R(I,$,ft,"","-",!0);R(I,$,ft,"⋅","\\cdot",!0);R(I,$,ft,"∘","\\circ",!0);R(I,$,ft,"÷","\\div",!0);R(I,$,ft,"±","\\pm",!0);R(I,$,ft,"×","\\times",!0);R(I,$,ft,"∩","\\cap",!0);R(I,$,ft,"","\\cup",!0);R(I,$,ft,"","\\setminus",!0);R(I,$,ft,"∧","\\land");R(I,$,ft,"","\\lor");R(I,$,ft,"∧","\\wedge",!0);R(I,$,ft,"","\\vee",!0);R(I,$,ye,"√","\\surd");R(I,$,li,"⟨","\\langle",!0);R(I,$,li,"","\\lvert");R(I,$,li,"∥","\\lVert");R(I,$,zr,"?","?");R(I,$,zr,"!","!");R(I,$,zr,"⟩","\\rangle",!0);R(I,$,zr,"","\\rvert");R(I,$,zr,"∥","\\rVert");R(I,$,ae,"=","=");R(I,$,ae,":",":");R(I,$,ae,"≈","\\approx",!0);R(I,$,ae,"≅","\\cong",!0);R(I,$,ae,"≥","\\ge");R(I,$,ae,"≥","\\geq",!0);R(I,$,ae,"←","\\gets");R(I,$,ae,">","\\gt",!0);R(I,$,ae,"∈","\\in",!0);R(I,$,ae,"","\\@not");R(I,$,ae,"⊂","\\subset",!0);R(I,$,ae,"⊃","\\supset",!0);R(I,$,ae,"⊆","\\subseteq",!0);R(I,$,ae,"⊇","\\supseteq",!0);R(I,re,ae,"⊈","\\nsubseteq",!0);R(I,re,ae,"⊉","\\nsupseteq",!0);R(I,$,ae,"⊨","\\models");R(I,$,ae,"←","\\leftarrow",!0);R(I,$,ae,"≤","\\le");R(I,$,ae,"≤","\\leq",!0);R(I,$,ae,"<","\\lt",!0);R(I,$,ae,"→","\\rightarrow",!0);R(I,$,ae,"→","\\to");R(I,re,ae,"≱","\\ngeq",!0);R(I,re,ae,"≰","\\nleq",!0);R(I,$,Ja," ","\\ ");R(I,$,Ja," ","\\space");R(I,$,Ja," ","\\nobreakspace");R(Ge,$,Ja," ","\\ ");R(Ge,$,Ja," "," ");R(Ge,$,Ja," ","\\space");R(Ge,$,Ja," ","\\nobreakspace");R(I,$,Ja,null,"\\nobreak");R(I,$,Ja,null,"\\allowbreak");R(I,$,ou,",",",");R(I,$,ou,";",";");R(I,re,ft,"⊼","\\barwedge",!0);R(I,re,ft,"⊻","\\veebar",!0);R(I,$,ft,"⊙","\\odot",!0);R(I,$,ft,"⊕","\\oplus",!0);R(I,$,ft,"⊗","\\otimes",!0);R(I,$,ye,"∂","\\partial",!0);R(I,$,ft,"⊘","\\oslash",!0);R(I,re,ft,"⊚","\\circledcirc",!0);R(I,re,ft,"⊡","\\boxdot",!0);R(I,$,ft,"△","\\bigtriangleup");R(I,$,ft,"▽","\\bigtriangledown");R(I,$,ft,"†","\\dagger");R(I,$,ft,"⋄","\\diamond");R(I,$,ft,"⋆","\\star");R(I,$,ft,"◃","\\triangleleft");R(I,$,ft,"▹","\\triangleright");R(I,$,li,"{","\\{");R(Ge,$,ye,"{","\\{");R(Ge,$,ye,"{","\\textbraceleft");R(I,$,zr,"}","\\}");R(Ge,$,ye,"}","\\}");R(Ge,$,ye,"}","\\textbraceright");R(I,$,li,"{","\\lbrace");R(I,$,zr,"}","\\rbrace");R(I,$,li,"[","\\lbrack",!0);R(Ge,$,ye,"[","\\lbrack",!0);R(I,$,zr,"]","\\rbrack",!0);R(Ge,$,ye,"]","\\rbrack",!0);R(I,$,li,"(","\\lparen",!0);R(I,$,zr,")","\\rparen",!0);R(Ge,$,ye,"<","\\textless",!0);R(Ge,$,ye,">","\\textgreater",!0);R(I,$,li,"⌊","\\lfloor",!0);R(I,$,zr,"⌋","\\rfloor",!0);R(I,$,li,"⌈","\\lceil",!0);R(I,$,zr,"⌉","\\rceil",!0);R(I,$,ye,"\\","\\backslash");R(I,$,ye,"","|");R(I,$,ye,"","\\vert");R(Ge,$,ye,"|","\\textbar",!0);R(I,$,ye,"∥","\\|");R(I,$,ye,"∥","\\Vert");R(Ge,$,ye,"∥","\\textbardbl");R(Ge,$,ye,"~","\\textasciitilde");R(Ge,$,ye,"\\","\\textbackslash");R(Ge,$,ye,"^","\\textasciicircum");R(I,$,ae,"↑","\\uparrow",!0);R(I,$,ae,"⇑","\\Uparrow",!0);R(I,$,ae,"↓","\\downarrow",!0);R(I,$,ae,"⇓","\\Downarrow",!0);R(I,$,ae,"↕","\\updownarrow",!0);R(I,$,ae,"⇕","\\Updownarrow",!0);R(I,$,ir,"∐","\\coprod");R(I,$,ir,"","\\bigvee");R(I,$,ir,"⋀","\\bigwedge");R(I,$,ir,"⨄","\\biguplus");R(I,$,ir,"⋂","\\bigcap");R(I,$,ir,"","\\bigcup");R(I,$,ir,"∫","\\int");R(I,$,ir,"∫","\\intop");R(I,$,ir,"∬","\\iint");R(I,$,ir,"∭","\\iiint");R(I,$,ir,"∏","\\prod");R(I,$,ir,"∑","\\sum");R(I,$,ir,"⨂","\\bigotimes");R(I,$,ir,"⨁","\\bigoplus");R(I,$,ir,"⨀","\\bigodot");R(I,$,ir,"∮","\\oint");R(I,$,ir,"∯","\\oiint");R(I,$,ir,"∰","\\oiiint");R(I,$,ir,"⨆","\\bigsqcup");R(I,$,ir,"∫","\\smallint");R(Ge,$,_s,"…","\\textellipsis");R(I,$,_s,"…","\\mathellipsis");R(Ge,$,_s,"…","\\ldots",!0);R(I,$,_s,"…","\\ldots",!0);R(I,$,_s,"⋯","\\@cdots",!0);R(I,$,_s,"⋱","\\ddots",!0);R(I,$,ye,"⋮","\\varvdots");R(Ge,$,ye,"⋮","\\varvdots");R(I,$,Bn,"ˊ","\\acute");R(I,$,Bn,"ˋ","\\grave");R(I,$,Bn,"¨","\\ddot");R(I,$,Bn,"~","\\tilde");R(I,$,Bn,"ˉ","\\bar");R(I,$,Bn,"˘","\\breve");R(I,$,Bn,"ˇ","\\check");R(I,$,Bn,"^","\\hat");R(I,$,Bn,"⃗","\\vec");R(I,$,Bn,"˙","\\dot");R(I,$,Bn,"˚","\\mathring");R(I,$,_t,"","\\@imath");R(I,$,_t,"","\\@jmath");R(I,$,ye,"ı","ı");R(I,$,ye,"ȷ","ȷ");R(Ge,$,ye,"ı","\\i",!0);R(Ge,$,ye,"ȷ","\\j",!0);R(Ge,$,ye,"ß","\\ss",!0);R(Ge,$,ye,"æ","\\ae",!0);R(Ge,$,ye,"œ","\\oe",!0);R(Ge,$,ye,"ø","\\o",!0);R(Ge,$,ye,"Æ","\\AE",!0);R(Ge,$,ye,"Œ","\\OE",!0);R(Ge,$,ye,"Ø","\\O",!0);R(Ge,$,Bn,"ˊ","\\'");R(Ge,$,Bn,"ˋ","\\`");R(Ge,$,Bn,"ˆ","\\^");R(Ge,$,Bn,"˜","\\~");R(Ge,$,Bn,"ˉ","\\=");R(Ge,$,Bn,"˘","\\u");R(Ge,$,Bn,"˙","\\.");R(Ge,$,Bn,"¸","\\c");R(Ge,$,Bn,"˚","\\r");R(Ge,$,Bn,"ˇ","\\v");R(Ge,$,Bn,"¨",'\\"');R(Ge,$,Bn,"˝","\\H");R(Ge,$,Bn,"◯","\\textcircled");var Y6={"--":!0,"---":!0,"``":!0,"''":!0};R(Ge,$,ye,"","--",!0);R(Ge,$,ye,"","\\textendash");R(Ge,$,ye,"—","---",!0);R(Ge,$,ye,"—","\\textemdash");R(Ge,$,ye,"","`",!0);R(Ge,$,ye,"","\\textquoteleft");R(Ge,$,ye,"","'",!0);R(Ge,$,ye,"","\\textquoteright");R(Ge,$,ye,"“","``",!0);R(Ge,$,ye,"“","\\textquotedblleft");R(Ge,$,ye,"”","''",!0);R(Ge,$,ye,"”","\\textquotedblright");R(I,$,ye,"°","\\degree",!0);R(Ge,$,ye,"°","\\degree");R(Ge,$,ye,"°","\\textdegree",!0);R(I,$,ye,"£","\\pounds");R(I,$,ye,"£","\\mathsterling",!0);R(Ge,$,ye,"£","\\pounds");R(Ge,$,ye,"£","\\textsterling",!0);R(I,re,ye,"✠","\\maltese");R(Ge,re,ye,"✠","\\maltese");var ag='0123456789/@."';for(var uh=0;uh<ag.length;uh++){var og=ag.charAt(uh);R(I,$,ye,og,og)}var sg='0123456789!@*()-=+";:?/.,';for(var dh=0;dh<sg.length;dh++){var lg=sg.charAt(dh);R(Ge,$,ye,lg,lg)}var Mc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var hh=0;hh<Mc.length;hh++){var T0=Mc.charAt(hh);R(I,$,_t,T0,T0),R(Ge,$,ye,T0,T0)}R(I,re,ye,"C","");R(Ge,re,ye,"C","");R(I,re,ye,"H","");R(Ge,re,ye,"H","");R(I,re,ye,"N","");R(Ge,re,ye,"N","");R(I,re,ye,"P","");R(Ge,re,ye,"P","");R(I,re,ye,"Q","");R(Ge,re,ye,"Q","");R(I,re,ye,"R","");R(Ge,re,ye,"R","");R(I,re,ye,"Z","");R(Ge,re,ye,"Z","");R(I,$,_t,"h","");R(Ge,$,_t,"h","");var Ht="";for(var Tr=0;Tr<Mc.length;Tr++){var Gn=Mc.charAt(Tr);Ht=String.fromCharCode(55349,56320+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56372+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56424+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56580+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56684+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56736+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56788+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56840+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56944+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Tr<26&&(Ht=String.fromCharCode(55349,56632+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht),Ht=String.fromCharCode(55349,56476+Tr),R(I,$,_t,Gn,Ht),R(Ge,$,ye,Gn,Ht))}Ht=String.fromCharCode(55349,56668);R(I,$,_t,"k",Ht);R(Ge,$,ye,"k",Ht);for(var qo=0;qo<10;qo++){var ao=qo.toString();Ht=String.fromCharCode(55349,57294+qo),R(I,$,_t,ao,Ht),R(Ge,$,ye,ao,Ht),Ht=String.fromCharCode(55349,57314+qo),R(I,$,_t,ao,Ht),R(Ge,$,ye,ao,Ht),Ht=String.fromCharCode(55349,57324+qo),R(I,$,_t,ao,Ht),R(Ge,$,ye,ao,Ht),Ht=String.fromCharCode(55349,57334+qo),R(I,$,_t,ao,Ht),R(Ge,$,ye,ao,Ht)}var Tp="ÐÞþ";for(var ph=0;ph<Tp.length;ph++){var A0=Tp.charAt(ph);R(I,$,_t,A0,A0),R(Ge,$,ye,A0,A0)}var M0=[["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"]],cg=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ix=function(t,e){var n=t.charCodeAt(0),r=t.charCodeAt(1),a=(n-55296)*1024+(r-56320)+65536,l=e==="math"?0:1;if(119808<=a&&a<120484){var h=Math.floor((a-119808)/26);return[M0[h][2],M0[h][l]]}else if(120782<=a&&a<=120831){var c=Math.floor((a-120782)/10);return[cg[c][2],cg[c][l]]}else{if(a===120485||a===120486)return[M0[0][2],M0[0][l]];if(120486<a&&a<120782)return["",""];throw new tt("Unsupported character: "+t)}},su=function(t,e,n){return Nn[n][t]&&Nn[n][t].replace&&(t=Nn[n][t].replace),{value:t,metrics:Xf(t,e,n)}},zi=function(t,e,n,r,a){var l=su(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 Si(t,h.height,h.depth,p,h.skew,h.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+e+"' and mode '"+n+"'")),c=new Si(t,0,0,0,0,0,a);if(r){c.maxFontSize=r.sizeMultiplier,r.style.isTight()&&c.classes.push("mtight");var v=r.getColor();v&&(c.style.color=v)}return c},Hx=function(t,e,n,r){return r===void 0&&(r=[]),n.font==="boldsymbol"&&su(t,"Main-Bold",e).metrics?zi(t,"Main-Bold",e,n,r.concat(["mathbf"])):t==="\\"||Nn[e][t].font==="main"?zi(t,"Main-Regular",e,n,r):zi(t,"AMS-Regular",e,n,r.concat(["amsrm"]))},Px=function(t,e,n,r,a){return a!=="textord"&&su(t,"Math-BoldItalic",e).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},zx=function(t,e,n){var r=t.mode,a=t.text,l=["mord"],h=r==="math"||r==="text"&&e.font,c=h?e.font:e.fontFamily,p="",v="";if(a.charCodeAt(0)===55349&&([p,v]=Ix(a,r)),p.length>0)return zi(a,p,r,e,l.concat(v));if(c){var b,g;if(c==="boldsymbol"){var m=Px(a,r,e,l,n);b=m.fontName,g=[m.fontClass]}else h?(b=e2[c].fontName,g=[c]):(b=C0(c,e.fontWeight,e.fontShape),g=[c,e.fontWeight,e.fontShape]);if(su(a,b,r).metrics)return zi(a,b,r,e,l.concat(g));if(Y6.hasOwnProperty(a)&&b.slice(0,10)==="Typewriter"){for(var x=[],w=0;w<a.length;w++)x.push(zi(a[w],b,r,e,l.concat(g)));return Q6(x)}}if(n==="mathord")return zi(a,"Math-Italic",r,e,l.concat(["mathnormal"]));if(n==="textord"){var S=Nn[r][a]&&Nn[r][a].font;if(S==="ams"){var k=C0("amsrm",e.fontWeight,e.fontShape);return zi(a,k,r,e,l.concat("amsrm",e.fontWeight,e.fontShape))}else if(S==="main"||!S){var C=C0("textrm",e.fontWeight,e.fontShape);return zi(a,C,r,e,l.concat(e.fontWeight,e.fontShape))}else{var A=C0(S,e.fontWeight,e.fontShape);return zi(a,A,r,e,l.concat(A,e.fontWeight,e.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Bx=(t,e)=>{if(bo(t.classes)!==bo(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 a in e.style)if(e.style.hasOwnProperty(a)&&t.style[a]!==e.style[a])return!1;return!0},Fx=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n instanceof Si&&r instanceof Si&&Bx(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},Yf=function(t){for(var e=0,n=0,r=0,a=0;a<t.children.length;a++){var l=t.children[a];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},jr=function(t,e,n,r){var a=new o0(t,e,n,r);return Yf(a),a},J6=(t,e,n,r)=>new o0(t,e,n,r),qx=function(t,e,n){var r=jr([t],[],e);return r.height=Math.max(n||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),r.style.borderBottomWidth=st(r.height),r.maxFontSize=1,r},jx=function(t,e,n,r){var a=new Zf(t,e,n,r);return Yf(a),a},Q6=function(t){var e=new a0(t);return Yf(e),e},$x=function(t,e){return t instanceof a0?jr([],[t],e):t},Ux=function(t){if(t.positionType==="individualShift"){for(var e=t.children,n=[e[0]],r=-e[0].shift-e[0].elem.depth,a=r,l=1;l<e.length;l++){var h=-e[l].shift-a-e[l].elem.depth,c=h-(e[l-1].elem.height+e[l-1].elem.depth);a=a+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}},Vx=function(t,e){for(var{children:n,depth:r}=Ux(t),a=0,l=0;l<n.length;l++){var h=n[l];if(h.type==="elem"){var c=h.elem;a=Math.max(a,c.maxFontSize,c.height)}}a+=2;var p=jr(["pstrut"],[]);p.style.height=st(a);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||{},A=jr(k,[p,S],void 0,C);A.style.top=st(-a-m-S.depth),w.marginLeft&&(A.style.marginLeft=w.marginLeft),w.marginRight&&(A.style.marginRight=w.marginRight),v.push(A),m+=S.height+S.depth}b=Math.min(b,m),g=Math.max(g,m)}var T=jr(["vlist"],v);T.style.height=st(g);var M;if(b<0){var y=jr([],[]),N=jr(["vlist"],[y]);N.style.height=st(-b);var z=jr(["vlist-s"],[new Si("")]);M=[jr(["vlist-r"],[T,z]),jr(["vlist-r"],[N])]}else M=[jr(["vlist-r"],[T])];var q=jr(["vlist-t"],M);return M.length===2&&q.classes.push("vlist-t2"),q.height=g,q.depth=-b,q},Wx=(t,e)=>{var n=jr(["mspace"],[],e),r=Un(t,e);return n.style.marginRight=st(r),n},C0=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 a;return e==="textbf"&&n==="textit"?a="BoldItalic":e==="textbf"?a="Bold":e==="textit"?a="Italic":a="Regular",r+"-"+a},e2={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"}},t2={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Gx=function(t,e){var[n,r,a]=t2[t],l=new yo(n),h=new Va([l],{width:st(r),height:st(a),style:"width:"+st(r),viewBox:"0 0 "+1e3*r+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),c=J6(["overlay"],[h],e);return c.height=a,c.style.height=st(a),c.style.width=st(r),c},Ae={fontMap:e2,makeSymbol:zi,mathsym:Hx,makeSpan:jr,makeSvgSpan:J6,makeLineSpan:qx,makeAnchor:jx,makeFragment:Q6,wrapFragment:$x,makeVList:Vx,makeOrd:zx,makeGlue:Wx,staticSvg:Gx,svgData:t2,tryCombineChars:Fx},jn={number:3,unit:"mu"},jo={number:4,unit:"mu"},Ea={number:5,unit:"mu"},Kx={mord:{mop:jn,mbin:jo,mrel:Ea,minner:jn},mop:{mord:jn,mop:jn,mrel:Ea,minner:jn},mbin:{mord:jo,mop:jo,mopen:jo,minner:jo},mrel:{mord:Ea,mop:Ea,mopen:Ea,minner:Ea},mopen:{},mclose:{mop:jn,mbin:jo,mrel:Ea,minner:jn},mpunct:{mord:jn,mop:jn,mrel:Ea,mopen:jn,mclose:jn,mpunct:jn,minner:jn},minner:{mord:jn,mop:jn,mbin:jo,mrel:Ea,mopen:jn,mpunct:jn,minner:jn}},Xx={mord:{mop:jn},mop:{mord:jn,mop:jn},mbin:{},mrel:{},mopen:{},mclose:{mop:jn},mpunct:{},minner:{mop:jn}},n2={},Cc={},Lc={};function ht(t){for(var{type:e,names:n,props:r,handler:a,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:a},p=0;p<n.length;++p)n2[n[p]]=c;e&&(l&&(Cc[e]=l),h&&(Lc[e]=h))}function rs(t){var{type:e,htmlBuilder:n,mathmlBuilder:r}=t;ht({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var _c=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},Yn=function(t){return t.type==="ordgroup"?t.body:[t]},Wa=Ae.makeSpan,Zx=["leftmost","mbin","mopen","mrel","mop","mpunct"],Yx=["rightmost","mrel","mclose","mpunct"],Jx={display:Dt.DISPLAY,text:Dt.TEXT,script:Dt.SCRIPT,scriptscript:Dt.SCRIPTSCRIPT},Qx={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},dr=function(t,e,n,r){r===void 0&&(r=[null,null]);for(var a=[],l=0;l<t.length;l++){var h=en(t[l],e);if(h instanceof a0){var c=h.children;a.push(...c)}else a.push(h)}if(Ae.tryCombineChars(a),!n)return a;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(Jx[v.style]))}var b=Wa([r[0]||"leftmost"],[],e),g=Wa([r[1]||"rightmost"],[],e),m=n==="root";return ug(a,(x,w)=>{var S=w.classes[0],k=x.classes[0];S==="mbin"&&Tt.contains(Yx,k)?w.classes[0]="mord":k==="mbin"&&Tt.contains(Zx,S)&&(x.classes[0]="mord")},{node:b},g,m),ug(a,(x,w)=>{var S=Ap(w),k=Ap(x),C=S&&k?x.hasClass("mtight")?Xx[S][k]:Kx[S][k]:null;if(C)return Ae.makeGlue(C,p)},{node:b},g,m),a},ug=function t(e,n,r,a,l){a&&e.push(a);for(var h=0;h<e.length;h++){var c=e[h],p=r2(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=Wa(["leftmost"])),r.insertAfter=(g=>m=>{e.splice(g+1,0,m),h++})(h)}a&&e.pop()},r2=function(t){return t instanceof a0||t instanceof Zf||t instanceof o0&&t.hasClass("enclosing")?t:null},ek=function t(e,n){var r=r2(e);if(r){var a=r.children;if(a.length){if(n==="right")return t(a[a.length-1],"right");if(n==="left")return t(a[0],"left")}}return e},Ap=function(t,e){return t?(e&&(t=ek(t,e)),Qx[t.classes[0]]||null):null},Kl=function(t,e){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Wa(e.concat(n))},en=function(t,e,n){if(!t)return Wa();if(Cc[t.type]){var r=Cc[t.type](t,e);if(n&&e.size!==n.size){r=Wa(e.sizingClasses(n),[r],e);var a=e.sizeMultiplier/n.sizeMultiplier;r.height*=a,r.depth*=a}return r}else throw new tt("Got group of unknown type: '"+t.type+"'")};function L0(t,e){var n=Wa(["base"],t,e),r=Wa(["strut"]);return r.style.height=st(n.height+n.depth),n.depth&&(r.style.verticalAlign=st(-n.depth)),n.children.unshift(r),n}function Mp(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var r=dr(t,e,"root"),a;r.length===2&&r[1].hasClass("tag")&&(a=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(L0(h,e)),h=[])}else r[c].hasClass("newline")&&(h.pop(),h.length>0&&(l.push(L0(h,e)),h=[]),l.push(r[c]));h.length>0&&l.push(L0(h,e));var v;n?(v=L0(dr(n,e,!0)),v.classes=["tag"],l.push(v)):a&&l.push(a);var b=Wa(["katex-html"],l);if(b.setAttribute("aria-hidden","true"),v){var g=v.children[0];g.style.height=st(b.height+b.depth),b.depth&&(g.style.verticalAlign=st(-b.depth))}return b}function i2(t){return new a0(t)}class ai{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=bo(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof aa&&this.children[r+1]instanceof aa){for(var a=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof aa;)a+=this.children[++r].toText();e.appendChild(new aa(a).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+=Tt.escape(this.attributes[n]),e+='"');this.classes.length>0&&(e+=' class ="'+Tt.escape(bo(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 aa{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Tt.escape(this.toText())}toText(){return this.text}}class tk{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",st(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+st(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ye={MathNode:ai,TextNode:aa,SpaceNode:tk,newDocumentFragment:i2},Ei=function(t,e,n){return Nn[e][t]&&Nn[e][t].replace&&t.charCodeAt(0)!==55349&&!(Y6.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=Nn[e][t].replace),new Ye.TextNode(t)},Jf=function(t){return t.length===1?t[0]:new Ye.MathNode("mrow",t)},Qf=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 a=t.text;if(Tt.contains(["\\imath","\\jmath"],a))return null;Nn[r][a]&&Nn[r][a].replace&&(a=Nn[r][a].replace);var l=Ae.fontMap[n].fontName;return Xf(a,l,r)?Ae.fontMap[n].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 aa&&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 aa&&n.text===","}else return!1}var Vr=function(t,e,n){if(t.length===1){var r=Tn(t[0],e);return n&&r instanceof ai&&r.type==="mo"&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var a=[],l,h=0;h<t.length;h++){var c=Tn(t[h],e);if(c instanceof ai&&l instanceof ai){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(fh(c)&&l.type==="mn"){l.children.push(...c.children);continue}else if(c.type==="mn"&&fh(l))c.children=[...l.children,...c.children],a.pop();else if((c.type==="msup"||c.type==="msub")&&c.children.length>=1&&(l.type==="mn"||fh(l))){var p=c.children[0];p instanceof ai&&p.type==="mn"&&(p.children=[...l.children,...p.children],a.pop())}else if(l.type==="mi"&&l.children.length===1){var v=l.children[0];if(v instanceof aa&&v.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var b=c.children[0];b instanceof aa&&b.text.length>0&&(b.text=b.text.slice(0,1)+"̸"+b.text.slice(1),a.pop())}}}a.push(c),l=c}return a},wo=function(t,e,n){return Jf(Vr(t,e,n))},Tn=function(t,e){if(!t)return new Ye.MathNode("mrow");if(Lc[t.type]){var n=Lc[t.type](t,e);return n}else throw new tt("Got group of unknown type: '"+t.type+"'")};function dg(t,e,n,r,a){var l=Vr(t,n),h;l.length===1&&l[0]instanceof ai&&Tt.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=a?"katex":"katex-mathml";return Ae.makeSpan([b],[v])}var a2=function(t){return new La({style:t.displayMode?Dt.DISPLAY:Dt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},o2=function(t,e){if(e.displayMode){var n=["katex-display"];e.leqno&&n.push("leqno"),e.fleqn&&n.push("fleqn"),t=Ae.makeSpan(n,[t])}return t},nk=function(t,e,n){var r=a2(n),a;if(n.output==="mathml")return dg(t,e,r,n.displayMode,!0);if(n.output==="html"){var l=Mp(t,r);a=Ae.makeSpan(["katex"],[l])}else{var h=dg(t,e,r,n.displayMode,!1),c=Mp(t,r);a=Ae.makeSpan(["katex"],[h,c])}return o2(a,n)},rk=function(t,e,n){var r=a2(n),a=Mp(t,r),l=Ae.makeSpan(["katex"],[a]);return o2(l,n)},ik={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":"="},ak=function(t){var e=new Ye.MathNode("mo",[new Ye.TextNode(ik[t.replace(/^\\/,"")])]);return e.setAttribute("stretchy","true"),e},ok={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]},sk=function(t){return t.type==="ordgroup"?t.body.length:1},lk=function(t,e){function n(){var h=4e5,c=t.label.slice(1);if(Tt.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=t,v=sk(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 yo(g),S=new Va([w],{width:"100%",height:st(m),viewBox:"0 0 "+h+" "+b,preserveAspectRatio:"none"});return{span:Ae.makeSvgSpan([],[S],e),minWidth:0,height:m}}else{var k=[],C=ok[c],[A,T,M]=C,y=M/1e3,N=A.length,z,q;if(N===1){var P=C[3];z=["hide-tail"],q=[P]}else if(N===2)z=["halfarrow-left","halfarrow-right"],q=["xMinYMin","xMaxYMin"];else if(N===3)z=["brace-left","brace-center","brace-right"],q=["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 yo(A[Y]),ue=new Va([te],{width:"400em",height:st(y),viewBox:"0 0 "+h+" "+M,preserveAspectRatio:q[Y]+" slice"}),Le=Ae.makeSvgSpan([z[Y]],[ue],e);if(N===1)return{span:Le,minWidth:T,height:y};Le.style.height=st(y),k.push(Le)}return{span:Ae.makeSpan(["stretchy"],k,e),minWidth:T,height:y}}}var{span:r,minWidth:a,height:l}=n();return r.height=l,r.style.height=st(l),a>0&&(r.style.minWidth=st(a)),r},ck=function(t,e,n,r,a){var l,h=t.height+t.depth+n+r;if(/fbox|color|angl/.test(e)){if(l=Ae.makeSpan(["stretchy",e],[],a),e==="fbox"){var c=a.color&&a.getColor();c&&(l.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(e)&&p.push(new Ep({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&p.push(new Ep({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var v=new Va(p,{width:"100%",height:st(h)});l=Ae.makeSvgSpan([],[v],a)}return l.height=h,l.style.height=st(h),l},Ga={encloseSpan:ck,mathMLnode:ak,svgSpan:lk};function Wt(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 e1(t){var e=lu(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 lu(t){return t&&(t.type==="atom"||Ox.hasOwnProperty(t.type))?t:null}var t1=(t,e)=>{var n,r,a;t&&t.type==="supsub"?(r=Wt(t.base,"accent"),n=r.base,t.base=n,a=Dx(en(t,e)),t.base=r):(r=Wt(t,"accent"),n=r.base);var l=en(n,e.havingCrampedStyle()),h=r.isShifty&&Tt.isCharacterBox(n),c=0;if(h){var p=Tt.getBaseElem(n),v=en(p,e.havingCrampedStyle());c=ig(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=Ga.svgSpan(r,e),m=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+st(2*c)+")",marginLeft:st(2*c)}:void 0}]},e);else{var x,w;r.label==="\\vec"?(x=Ae.staticSvg("vec",e),w=Ae.svgData.vec[1]):(x=Ae.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=ig(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Ae.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=st(k),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Ae.makeSpan(["mord","accent"],[m],e);return a?(a.children[0]=C,a.height=Math.max(C.height,a.height),a.classes[0]="mord",a):C},s2=(t,e)=>{var n=t.isStretchy?Ga.mathMLnode(t.label):new Ye.MathNode("mo",[Ei(t.label,t.mode)]),r=new Ye.MathNode("mover",[Tn(t.base,e),n]);return r.setAttribute("accent","true"),r},uk=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));ht({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=_c(e[0]),r=!uk.test(t.funcName),a=!r||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:t1,mathmlBuilder:s2});ht({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:t1,mathmlBuilder:s2});ht({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(t,e)=>{var n=en(t.base,e),r=Ga.svgSpan(t,e),a=t.label==="\\utilde"?.12:0,l=Ae.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]},e);return Ae.makeSpan(["mord","accentunder"],[l],e)},mathmlBuilder:(t,e)=>{var n=Ga.mathMLnode(t.label),r=new Ye.MathNode("munder",[Tn(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var _0=t=>{var e=new Ye.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};ht({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:a}=t;return{type:"xArrow",mode:r.mode,label:a,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,r=e.havingStyle(n.sup()),a=Ae.wrapFragment(en(t.body,r,e),e),l=t.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(l+"-arrow-pad");var h;t.below&&(r=e.havingStyle(n.sub()),h=Ae.wrapFragment(en(t.below,r,e),e),h.classes.push(l+"-arrow-pad"));var c=Ga.svgSpan(t,e),p=-e.fontMetrics().axisHeight+.5*c.height,v=-e.fontMetrics().axisHeight-.5*c.height-.111;(a.depth>.25||t.label==="\\xleftequilibrium")&&(v-=a.depth);var b;if(h){var g=-e.fontMetrics().axisHeight+h.height+.5*c.height+.111;b=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:v},{type:"elem",elem:c,shift:p},{type:"elem",elem:h,shift:g}]},e)}else b=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:v},{type:"elem",elem:c,shift:p}]},e);return b.children[0].children[0].children[1].classes.push("svg-align"),Ae.makeSpan(["mrel","x-arrow"],[b],e)},mathmlBuilder(t,e){var n=Ga.mathMLnode(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(t.body){var a=_0(Tn(t.body,e));if(t.below){var l=_0(Tn(t.below,e));r=new Ye.MathNode("munderover",[n,l,a])}else r=new Ye.MathNode("mover",[n,a])}else if(t.below){var h=_0(Tn(t.below,e));r=new Ye.MathNode("munder",[n,h])}else r=_0(),r=new Ye.MathNode("mover",[n,r]);return r}});var dk=Ae.makeSpan;function l2(t,e){var n=dr(t.body,e,!0);return dk([t.mclass],n,e)}function c2(t,e){var n,r=Vr(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}ht({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,a=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Yn(a),isCharacterBox:Tt.isCharacterBox(a)}},htmlBuilder:l2,mathmlBuilder:c2});var cu=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"};ht({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:cu(e[0]),body:Yn(e[1]),isCharacterBox:Tt.isCharacterBox(e[1])}}});ht({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:r}=t,a=e[1],l=e[0],h;r!=="\\stackrel"?h=cu(a):h="mrel";var c={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Yn(a)},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:Tt.isCharacterBox(p)}},htmlBuilder:l2,mathmlBuilder:c2});ht({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:cu(e[0]),body:Yn(e[0])}},htmlBuilder(t,e){var n=dr(t.body,e,!0),r=Ae.makeSpan([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=Vr(t.body,e),r=new Ye.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var hk={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},hg=()=>({type:"styling",body:[],mode:"math",style:"display"}),pg=t=>t.type==="textord"&&t.text==="@",pk=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function fk(t,e,n){var r=hk[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var a=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:[a,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 mk(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 tt("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var r=[],a=[r],l=0;l<e.length;l++){for(var h=e[l],c=hg(),p=0;p<h.length;p++)if(!pg(h[p]))c.body.push(h[p]);else{r.push(c),p+=1;var v=e1(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(pk(h[x],v)){m=!1,p=x;break}if(pg(h[x]))throw new tt("Missing a "+v+" character to complete a CD arrow.",h[x]);b[g].body.push(h[x])}if(m)throw new tt("Missing a "+v+" character to complete a CD arrow.",h[p])}else throw new tt('Expected one of "<>AV=|." after @',h[p]);var w=fk(v,b,t),S={type:"styling",body:[w],mode:"math",style:"display"};r.push(S),c=hg()}l%2===0?r.push(c):r.shift(),r=[],a.push(r)}t.gullet.endGroup(),t.gullet.endGroup();var k=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}ht({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=Ae.wrapFragment(en(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=st(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){var n=new Ye.MathNode("mrow",[Tn(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}});ht({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=Ae.wrapFragment(en(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new Ye.MathNode("mrow",[Tn(t.fragment,e)])}});ht({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,r=Wt(e[0],"ordgroup"),a=r.body,l="",h=0;h<a.length;h++){var c=Wt(a[h],"textord");l+=c.text}var p=parseInt(l),v;if(isNaN(p))throw new tt("\\@char has non-numeric argument "+l);if(p<0||p>=1114111)throw new tt("\\@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 u2=(t,e)=>{var n=dr(t.body,e.withColor(t.color),!1);return Ae.makeFragment(n)},d2=(t,e)=>{var n=Vr(t.body,e.withColor(t.color)),r=new Ye.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r};ht({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=Wt(e[0],"color-token").color,a=e[1];return{type:"color",mode:n.mode,color:r,body:Yn(a)}},htmlBuilder:u2,mathmlBuilder:d2});ht({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,a=Wt(e[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var l=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:l}},htmlBuilder:u2,mathmlBuilder:d2});ht({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,a=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:a&&Wt(a,"size").value}},htmlBuilder(t,e){var n=Ae.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=st(Un(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",st(Un(t.size,e)))),n}});var Cp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},h2=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new tt("Expected a control sequence",t);return e},gk=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},p2=(t,e,n,r)=>{var a=t.gullet.macros.get(n.text);a==null&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,a,r)};ht({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(Cp[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=Cp[r.text]),Wt(e.parseFunction(),"internal");throw new tt("Invalid token after macro prefix",r)}});ht({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(),a=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new tt("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 tt('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==l+1)throw new tt('Argument number "'+r.text+'" out of order');l++,c.push([])}else{if(r.text==="EOF")throw new tt("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(a,{tokens:p,numArgs:l,delimiters:c},n===Cp[n]),{type:"internal",mode:e.mode}}});ht({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=h2(e.gullet.popToken());e.gullet.consumeSpaces();var a=gk(e);return p2(e,r,a,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});ht({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=h2(e.gullet.popToken()),a=e.gullet.popToken(),l=e.gullet.popToken();return p2(e,r,l,n==="\\\\globalfuture"),e.gullet.pushToken(l),e.gullet.pushToken(a),{type:"internal",mode:e.mode}}});var Cl=function(t,e,n){var r=Nn.math[t]&&Nn.math[t].replace,a=Xf(r||t,e,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+e+".");return a},n1=function(t,e,n,r){var a=n.havingBaseStyle(e),l=Ae.makeSpan(r.concat(a.sizingClasses(n)),[t],n),h=a.sizeMultiplier/n.sizeMultiplier;return l.height*=h,l.depth*=h,l.maxFontSize=a.sizeMultiplier,l},f2=function(t,e,n){var r=e.havingBaseStyle(n),a=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=st(a),t.height-=a,t.depth+=a},vk=function(t,e,n,r,a,l){var h=Ae.makeSymbol(t,"Main-Regular",a,r),c=n1(h,e,r,l);return n&&f2(c,r,e),c},bk=function(t,e,n,r){return Ae.makeSymbol(t,"Size"+e+"-Regular",n,r)},m2=function(t,e,n,r,a,l){var h=bk(t,e,a,r),c=n1(Ae.makeSpan(["delimsizing","size"+e],[h],r),Dt.TEXT,r,l);return n&&f2(c,r,Dt.TEXT),c},mh=function(t,e,n){var r;e==="Size1-Regular"?r="delim-size1":r="delim-size4";var a=Ae.makeSpan(["delimsizinginner",r],[Ae.makeSpan([],[Ae.makeSymbol(t,e,n)])]);return{type:"elem",elem:a}},gh=function(t,e,n){var r=ia["Size4-Regular"][t.charCodeAt(0)]?ia["Size4-Regular"][t.charCodeAt(0)][4]:ia["Size1-Regular"][t.charCodeAt(0)][4],a=new yo("inner",Sx(t,Math.round(1e3*e))),l=new Va([a],{width:st(r),height:st(e),style:"width:"+st(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"}),h=Ae.makeSvgSpan([],[l],n);return h.height=e,h.style.height=st(e),h.style.width=st(r),{type:"elem",elem:h}},Lp=.008,N0={type:"kern",size:-1*Lp},yk=["|","\\lvert","\\rvert","\\vert"],wk=["\\|","\\lVert","\\rVert","\\Vert"],g2=function(t,e,n,r,a,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"):Tt.contains(yk,t)?(p="",b="vert",g=333):Tt.contains(wk,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=Cl(h,m,a),w=x.height+x.depth,S=Cl(p,m,a),k=S.height+S.depth,C=Cl(v,m,a),A=C.height+C.depth,T=0,M=1;if(c!==null){var y=Cl(c,m,a);T=y.height+y.depth,M=2}var N=w+A+T,z=Math.max(0,Math.ceil((e-N)/(M*k))),q=N+z*M*k,P=r.fontMetrics().axisHeight;n&&(P*=r.sizeMultiplier);var Y=q/2-P,te=[];if(b.length>0){var ue=q-w-A,Le=Math.round(q*1e3),qe=Ex(b,Math.round(ue*1e3)),Xe=new yo(b,qe),it=(g/1e3).toFixed(3)+"em",$e=(Le/1e3).toFixed(3)+"em",De=new Va([Xe],{width:it,height:$e,viewBox:"0 0 "+g+" "+Le}),nt=Ae.makeSvgSpan([],[De],r);nt.height=Le/1e3,nt.style.width=it,nt.style.height=$e,te.push({type:"elem",elem:nt})}else{if(te.push(mh(v,m,a)),te.push(N0),c===null){var ut=q-w-A+2*Lp;te.push(gh(p,ut,r))}else{var je=(q-w-A-T)/2+2*Lp;te.push(gh(p,je,r)),te.push(N0),te.push(mh(c,m,a)),te.push(N0),te.push(gh(p,je,r))}te.push(N0),te.push(mh(h,m,a))}var j=r.havingBaseStyle(Dt.TEXT),yt=Ae.makeVList({positionType:"bottom",positionData:Y,children:te},j);return n1(Ae.makeSpan(["delimsizing","mult"],[yt],j),Dt.TEXT,r,l)},vh=80,bh=.08,yh=function(t,e,n,r,a){var l=kx(t,r,n),h=new yo(t,l),c=new Va([h],{width:"400em",height:st(e),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ae.makeSvgSpan(["hide-tail"],[c],a)},xk=function(t,e){var n=e.havingBaseSizing(),r=w2("\\surd",t*n.sizeMultiplier,y2,n),a=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+vh,t<1?a=1:t<1.4&&(a=.7),c=(1+l+bh)/a,p=(1+l)/a,h=yh("sqrtMain",c,v,l,e),h.style.minWidth="0.853em",b=.833/a):r.type==="large"?(v=(1e3+vh)*Bl[r.size],p=(Bl[r.size]+l)/a,c=(Bl[r.size]+l+bh)/a,h=yh("sqrtSize"+r.size,c,v,l,e),h.style.minWidth="1.02em",b=1/a):(c=t+l+bh,p=t+l,v=Math.floor(1e3*t+l)+vh,h=yh("sqrtTall",c,v,l,e),h.style.minWidth="0.742em",b=1.056),h.height=p,h.style.height=st(c),{span:h,advanceWidth:b,ruleWidth:(e.fontMetrics().sqrtRuleThickness+l)*a}},v2=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],kk=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],b2=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Bl=[0,1.2,1.8,2.4,3],Sk=function(t,e,n,r,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Tt.contains(v2,t)||Tt.contains(b2,t))return m2(t,e,!1,n,r,a);if(Tt.contains(kk,t))return g2(t,Bl[e],!1,n,r,a);throw new tt("Illegal delimiter: '"+t+"'")},Ek=[{type:"small",style:Dt.SCRIPTSCRIPT},{type:"small",style:Dt.SCRIPT},{type:"small",style:Dt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Tk=[{type:"small",style:Dt.SCRIPTSCRIPT},{type:"small",style:Dt.SCRIPT},{type:"small",style:Dt.TEXT},{type:"stack"}],y2=[{type:"small",style:Dt.SCRIPTSCRIPT},{type:"small",style:Dt.SCRIPT},{type:"small",style:Dt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ak=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.")},w2=function(t,e,n,r){for(var a=Math.min(2,3-r.style.size),l=a;l<n.length&&n[l].type!=="stack";l++){var h=Cl(t,Ak(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]},x2=function(t,e,n,r,a,l){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var h;Tt.contains(b2,t)?h=Ek:Tt.contains(v2,t)?h=y2:h=Tk;var c=w2(t,e,h,r);return c.type==="small"?vk(t,c.style,n,r,a,l):c.type==="large"?m2(t,c.size,n,r,a,l):g2(t,e,n,r,a,l)},Mk=function(t,e,n,r,a,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 x2(t,b,!0,r,a,l)},Fa={sqrtImage:xk,sizedDelim:Sk,sizeToMaxHeight:Bl,customSizedDelim:x2,leftRightDelim:Mk},fg={"\\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}},Ck=["(","\\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 uu(t,e){var n=lu(t);if(n&&Tt.contains(Ck,n.text))return n;throw n?new tt("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new tt("Invalid delimiter type '"+t.type+"'",t)}ht({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=uu(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:fg[t.funcName].size,mclass:fg[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?Ae.makeSpan([t.mclass]):Fa.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Ei(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=st(Fa.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function mg(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ht({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 tt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:uu(e[0],t).text,color:n}}});ht({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=uu(e[0],t),r=t.parser;++r.leftrightDepth;var a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var l=Wt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:l.delim,rightColor:l.color}},htmlBuilder:(t,e)=>{mg(t);for(var n=dr(t.body,e,!0,["mopen","mclose"]),r=0,a=0,l=!1,h=0;h<n.length;h++)n[h].isMiddle?l=!0:(r=Math.max(n[h].height,r),a=Math.max(n[h].depth,a));r*=e.sizeMultiplier,a*=e.sizeMultiplier;var c;if(t.left==="."?c=Kl(e,["mopen"]):c=Fa.leftRightDelim(t.left,r,a,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]=Fa.leftRightDelim(b.delim,r,a,b.options,t.mode,[]))}var g;if(t.right===".")g=Kl(e,["mclose"]);else{var m=t.rightColor?e.withColor(t.rightColor):e;g=Fa.leftRightDelim(t.right,r,a,m,t.mode,["mclose"])}return n.push(g),Ae.makeSpan(["minner"],n,e)},mathmlBuilder:(t,e)=>{mg(t);var n=Vr(t.body,e);if(t.left!=="."){var r=new Ye.MathNode("mo",[Ei(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(t.right!=="."){var a=new Ye.MathNode("mo",[Ei(t.right,t.mode)]);a.setAttribute("fence","true"),t.rightColor&&a.setAttribute("mathcolor",t.rightColor),n.push(a)}return Jf(n)}});ht({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=uu(e[0],t);if(!t.parser.leftrightDepth)throw new tt("\\middle without preceding \\left",n);return{type:"middle",mode:t.parser.mode,delim:n.text}},htmlBuilder:(t,e)=>{var n;if(t.delim===".")n=Kl(e,[]);else{n=Fa.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==="|"?Ei("|","text"):Ei(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 r1=(t,e)=>{var n=Ae.wrapFragment(en(t.body,e),e),r=t.label.slice(1),a=e.sizeMultiplier,l,h=0,c=Tt.isCharacterBox(t.body);if(r==="sout")l=Ae.makeSpan(["stretchy","sout"]),l.height=e.fontMetrics().defaultRuleThickness/a,h=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var p=Un({number:.6,unit:"pt"},e),v=Un({number:.35,unit:"ex"},e),b=e.havingBaseSizing();a=a/b.sizeMultiplier;var g=n.height+n.depth+p+v;n.style.paddingLeft=st(g/2+p);var m=Math.floor(1e3*g*a),x=wx(m),w=new Va([new yo("phase",x)],{width:"400em",height:st(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});l=Ae.makeSvgSpan(["hide-tail"],[w],e),l.style.height=st(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=Ga.encloseSpan(n,r,S,k,e),/fbox|boxed|fcolorbox/.test(r)?(l.style.borderStyle="solid",l.style.borderWidth=st(C)):r==="angl"&&C!==.049&&(l.style.borderTopWidth=st(C),l.style.borderRightWidth=st(C)),h=n.depth+k,t.backgroundColor&&(l.style.backgroundColor=t.backgroundColor,t.borderColor&&(l.style.borderColor=t.borderColor))}var A;if(t.backgroundColor)A=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:h},{type:"elem",elem:n,shift:0}]},e);else{var T=/cancel|phase/.test(r)?["svg-align"]:[];A=Ae.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:l,shift:h,wrapperClasses:T}]},e)}return/cancel/.test(r)&&(A.height=n.height,A.depth=n.depth),/cancel/.test(r)&&!c?Ae.makeSpan(["mord","cancel-lap"],[A],e):Ae.makeSpan(["mord"],[A],e)},i1=(t,e)=>{var n=0,r=new Ye.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Tn(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 a=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+a+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};ht({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:a}=t,l=Wt(e[0],"color-token").color,h=e[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:l,body:h}},htmlBuilder:r1,mathmlBuilder:i1});ht({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:a}=t,l=Wt(e[0],"color-token").color,h=Wt(e[1],"color-token").color,c=e[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:h,borderColor:l,body:c}},htmlBuilder:r1,mathmlBuilder:i1});ht({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]}}});ht({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,a=e[0];return{type:"enclose",mode:n.mode,label:r,body:a}},htmlBuilder:r1,mathmlBuilder:i1});ht({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 k2={};function ca(t){for(var{type:e,names:n,props:r,handler:a,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},p=0;p<n.length;++p)k2[n[p]]=c;l&&(Cc[e]=l),h&&(Lc[e]=h)}var S2={};function G(t,e){S2[t]=e}function gg(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 du=t=>{var e=t.parser.settings;if(!e.displayMode)throw new tt("{"+t.envName+"} can be used only in display mode.")};function a1(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function Mo(t,e,n){var{hskipBeforeAndAfter:r,addJot:a,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 tt("Invalid \\arraystretch: "+x)}t.gullet.beginGroup();var w=[],S=[w],k=[],C=[],A=p!=null?[]:void 0;function T(){p&&t.gullet.macros.set("\\@eqnsw","1",!0)}function M(){A&&(t.gullet.macros.get("\\df@tag")?(A.push(t.subparse([new wi("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):A.push(!!p&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(T(),C.push(gg(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 tt("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(gg(t)),w=[],S.push(w),T()}else throw new tt("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:a,arraystretch:h,body:S,cols:l,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:C,colSeparationType:c,tags:A,leqno:m}}function o1(t){return t.slice(0,1)==="d"?"display":"text"}var ua=function(t,e){var n,r,a=t.body.length,l=t.hLinesBeforeRow,h=0,c=new Array(a),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(Dt.SCRIPT).sizeMultiplier;g=.2778*(m/e.sizeMultiplier)}var x=t.colSeparationType==="CD"?Un({number:3,unit:"ex"},e):12*b,w=3*b,S=t.arraystretch*x,k=.7*S,C=.3*S,A=0;function T(ve){for(var Ee=0;Ee<ve.length;++Ee)Ee>0&&(A+=.25),p.push({pos:A,isDashed:ve[Ee]})}for(T(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 q=en(M[r],e);N<q.depth&&(N=q.depth),y<q.height&&(y=q.height),z[r]=q}var P=t.rowGaps[n],Y=0;P&&(Y=Un(P,e),Y>0&&(Y+=C,N<Y&&(N=Y),Y=0)),t.addJot&&(N+=w),z.height=y,z.depth=N,A+=y,z.pos=A,A+=N+Y,c[n]=z,T(l[n+1])}var te=A/2+e.fontMetrics().axisHeight,ue=t.cols||[],Le=[],qe,Xe,it=[];if(t.tags&&t.tags.some(ve=>ve))for(n=0;n<a;++n){var $e=c[n],De=$e.pos-te,nt=t.tags[n],ut=void 0;nt===!0?ut=Ae.makeSpan(["eqn-num"],[],e):nt===!1?ut=Ae.makeSpan([],[],e):ut=Ae.makeSpan([],dr(nt,e,!0),e),ut.depth=$e.depth,ut.height=$e.height,it.push({type:"elem",elem:ut,shift:De})}for(r=0,Xe=0;r<h||Xe<ue.length;++r,++Xe){for(var je=ue[Xe]||{},j=!0;je.type==="separator";){if(j||(qe=Ae.makeSpan(["arraycolsep"],[]),qe.style.width=st(e.fontMetrics().doubleRuleSep),Le.push(qe)),je.separator==="|"||je.separator===":"){var yt=je.separator==="|"?"solid":"dashed",It=Ae.makeSpan(["vertical-separator"],[],e);It.style.height=st(A),It.style.borderRightWidth=st(v),It.style.borderRightStyle=yt,It.style.margin="0 "+st(-v/2);var bt=A-te;bt&&(It.style.verticalAlign=st(-bt)),Le.push(It)}else throw new tt("Invalid separator type: "+je.separator);Xe++,je=ue[Xe]||{},j=!1}if(!(r>=h)){var Mt=void 0;(r>0||t.hskipBeforeAndAfter)&&(Mt=Tt.deflt(je.pregap,g),Mt!==0&&(qe=Ae.makeSpan(["arraycolsep"],[]),qe.style.width=st(Mt),Le.push(qe)));var se=[];for(n=0;n<a;++n){var fe=c[n],J=fe[r];if(J){var Q=fe.pos-te;J.depth=fe.depth,J.height=fe.height,se.push({type:"elem",elem:J,shift:Q})}}se=Ae.makeVList({positionType:"individualShift",children:se},e),se=Ae.makeSpan(["col-align-"+(je.align||"c")],[se]),Le.push(se),(r<h-1||t.hskipBeforeAndAfter)&&(Mt=Tt.deflt(je.postgap,g),Mt!==0&&(qe=Ae.makeSpan(["arraycolsep"],[]),qe.style.width=st(Mt),Le.push(qe)))}}if(c=Ae.makeSpan(["mtable"],Le),p.length>0){for(var Ie=Ae.makeLineSpan("hline",e,v),de=Ae.makeLineSpan("hdashline",e,v),W=[{type:"elem",elem:c,shift:0}];p.length>0;){var Z=p.pop(),ge=Z.pos-te;Z.isDashed?W.push({type:"elem",elem:de,shift:ge}):W.push({type:"elem",elem:Ie,shift:ge})}c=Ae.makeVList({positionType:"individualShift",children:W},e)}if(it.length===0)return Ae.makeSpan(["mord"],[c],e);var ce=Ae.makeVList({positionType:"individualShift",children:it},e);return ce=Ae.makeSpan(["tag"],[ce],e),Ae.makeFragment([c,ce])},Lk={c:"center ",l:"left ",r:"right "},da=function(t,e){for(var n=[],r=new Ye.MathNode("mtd",[],["mtr-glue"]),a=new Ye.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 Ye.MathNode("mtd",[Tn(h[p],e)]));t.tags&&t.tags[l]&&(c.unshift(r),c.push(r),t.leqno?c.unshift(a):c.push(a)),n.push(new Ye.MathNode("mtr",c))}var v=new Ye.MathNode("mtable",n),b=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);v.setAttribute("rowspacing",st(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 A=k;A<C;A++)x[A].type==="align"?(m+=Lk[x[A].align],S&&(w+="none "),S=!0):x[A].type==="separator"&&S&&(w+=x[A].separator==="|"?"solid ":"dashed ",S=!1);v.setAttribute("columnalign",m.trim()),/[sd]/.test(w)&&v.setAttribute("columnlines",w.trim())}if(t.colSeparationType==="align"){for(var T=t.cols||[],M="",y=1;y<T.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 q=1;q<z.length-1;q++)N+=z[q].length===0?"none ":z[q][0]?"dashed ":"solid ";return/[sd]/.test(N)&&v.setAttribute("rowlines",N.trim()),g!==""&&(v=new Ye.MathNode("menclose",[v]),v.setAttribute("notation",g.trim())),t.arraystretch&&t.arraystretch<1&&(v=new Ye.MathNode("mstyle",[v]),v.setAttribute("scriptlevel","1")),v},E2=function(t,e){t.envName.indexOf("ed")===-1&&du(t);var n=[],r=t.envName.indexOf("at")>-1?"alignat":"align",a=t.envName==="split",l=Mo(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:a1(t.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:a?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=Wt(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 A=Wt(k[C],"styling"),T=Wt(A.body[0],"ordgroup");T.body.unshift(p)}if(m)c<k.length&&(c=k.length);else{var M=k.length/2;if(h<M)throw new tt("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};ca({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=lu(e[0]),r=n?[e[0]]:Wt(e[0],"ordgroup").body,a=r.map(function(h){var c=e1(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 tt("Unknown column alignment: "+p,h)}),l={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return Mo(t.parser,l,o1(t.envName))},htmlBuilder:ua,mathmlBuilder:da});ca({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 a=t.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,"lcr".indexOf(n)===-1)throw new tt("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),r.cols=[{type:"align",align:n}]}}var l=Mo(t.parser,r,o1(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:ua,mathmlBuilder:da});ca({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=Mo(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:ua,mathmlBuilder:da});ca({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=lu(e[0]),r=n?[e[0]]:Wt(e[0],"ordgroup").body,a=r.map(function(h){var c=e1(h),p=c.text;if("lc".indexOf(p)!==-1)return{type:"align",align:p};throw new tt("Unknown column alignment: "+p,h)});if(a.length>1)throw new tt("{subarray} can contain only one column");var l={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5};if(l=Mo(t.parser,l,"script"),l.body.length>0&&l.body[0].length>1)throw new tt("{subarray} can contain only one column");return l},htmlBuilder:ua,mathmlBuilder:da});ca({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=Mo(t.parser,e,o1(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:ua,mathmlBuilder:da});ca({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:E2,htmlBuilder:ua,mathmlBuilder:da});ca({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){Tt.contains(["gather","gather*"],t.envName)&&du(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:a1(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Mo(t.parser,e,"display")},htmlBuilder:ua,mathmlBuilder:da});ca({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:E2,htmlBuilder:ua,mathmlBuilder:da});ca({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){du(t);var e={autoTag:a1(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Mo(t.parser,e,"display")},htmlBuilder:ua,mathmlBuilder:da});ca({type:"array",names:["CD"],props:{numArgs:0},handler(t){return du(t),mk(t.parser)},htmlBuilder:ua,mathmlBuilder:da});G("\\nonumber","\\gdef\\@eqnsw{0}");G("\\notag","\\nonumber");ht({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new tt(t.funcName+" valid only within array environment")}});var vg=k2;ht({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:r}=t,a=e[0];if(a.type!=="ordgroup")throw new tt("Invalid environment name",a);for(var l="",h=0;h<a.body.length;++h)l+=Wt(a.body[h],"textord").text;if(r==="\\begin"){if(!vg.hasOwnProperty(l))throw new tt("No such environment: "+l,a);var c=vg[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=Wt(n.parseFunction(),"environment");if(x.name!==l)throw new tt("Mismatch: \\begin{"+l+"} matched by \\end{"+x.name+"}",m);return g}return{type:"environment",mode:n.mode,name:l,nameGroup:a}}});var T2=(t,e)=>{var n=t.font,r=e.withFont(n);return en(t.body,r)},A2=(t,e)=>{var n=t.font,r=e.withFont(n);return Tn(t.body,r)},bg={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ht({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,a=_c(e[0]),l=r;return l in bg&&(l=bg[l]),{type:"font",mode:n.mode,font:l.slice(1),body:a}},htmlBuilder:T2,mathmlBuilder:A2});ht({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,r=e[0],a=Tt.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:cu(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:a}}});ht({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,breakOnTokenText:a}=t,{mode:l}=n,h=n.parseExpression(!0,a),c="math"+r.slice(1);return{type:"font",mode:l,font:c,body:{type:"ordgroup",mode:n.mode,body:h}}},htmlBuilder:T2,mathmlBuilder:A2});var M2=(t,e)=>{var n=e;return t==="display"?n=n.id>=Dt.SCRIPT.id?n.text():Dt.DISPLAY:t==="text"&&n.size===Dt.DISPLAY.size?n=Dt.TEXT:t==="script"?n=Dt.SCRIPT:t==="scriptscript"&&(n=Dt.SCRIPTSCRIPT),n},s1=(t,e)=>{var n=M2(t.size,e.style),r=n.fracNum(),a=n.fracDen(),l;l=e.havingStyle(r);var h=en(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(a);var v=en(t.denom,l,e),b,g,m;t.hasBarLine?(t.barSize?(g=Un(t.barSize,e),b=Ae.makeLineSpan("frac-line",e,g)):b=Ae.makeLineSpan("frac-line",e),g=b.height,m=b.height):(b=null,g=0,m=e.fontMetrics().defaultRuleThickness);var x,w,S;n.size===Dt.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 A=-(C-.5*g);k=Ae.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 T=x-h.depth-(v.height-S);T<w&&(x+=.5*(w-T),S+=.5*(w-T)),k=Ae.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===Dt.DISPLAY.size?M=e.fontMetrics().delim1:n.size===Dt.SCRIPTSCRIPT.size?M=e.havingStyle(Dt.SCRIPT).fontMetrics().delim2:M=e.fontMetrics().delim2;var y,N;return t.leftDelim==null?y=Kl(e,["mopen"]):y=Fa.customSizedDelim(t.leftDelim,M,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?N=Ae.makeSpan([]):t.rightDelim==null?N=Kl(e,["mclose"]):N=Fa.customSizedDelim(t.rightDelim,M,!0,e.havingStyle(n),t.mode,["mclose"]),Ae.makeSpan(["mord"].concat(l.sizingClasses(e)),[y,Ae.makeSpan(["mfrac"],[k]),N],e)},l1=(t,e)=>{var n=new Ye.MathNode("mfrac",[Tn(t.numer,e),Tn(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var r=Un(t.barSize,e);n.setAttribute("linethickness",st(r))}var a=M2(t.size,e.style);if(a.size!==e.style.size){n=new Ye.MathNode("mstyle",[n]);var l=a.size===Dt.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 Jf(h)}return n};ht({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,a=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:a,denom:l,hasBarLine:h,leftDelim:c,rightDelim:p,size:v,barSize:null}},htmlBuilder:s1,mathmlBuilder:l1});ht({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0],l=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:a,denom:l,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});ht({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:r}=t,a;switch(n){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:a,token:r}}});var yg=["display","text","script","scriptscript"],wg=function(t){var e=null;return t.length>0&&(e=t,e=e==="."?null:e),e};ht({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],a=e[5],l=_c(e[0]),h=l.type==="atom"&&l.family==="open"?wg(l.text):null,c=_c(e[1]),p=c.type==="atom"&&c.family==="close"?wg(c.text):null,v=Wt(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=Wt(x.body[0],"textord");m=yg[Number(w.text)]}}else x=Wt(x,"textord"),m=yg[Number(x.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:b,barSize:g,leftDelim:h,rightDelim:p,size:m}},htmlBuilder:s1,mathmlBuilder:l1});ht({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:a}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Wt(e[0],"size").value,token:a}}});ht({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0],l=ax(Wt(e[1],"infix").size),h=e[2],c=l.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:h,continued:!1,hasBarLine:c,barSize:l,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:s1,mathmlBuilder:l1});var C2=(t,e)=>{var n=e.style,r,a;t.type==="supsub"?(r=t.sup?en(t.sup,e.havingStyle(n.sup()),e):en(t.sub,e.havingStyle(n.sub()),e),a=Wt(t.base,"horizBrace")):a=Wt(t,"horizBrace");var l=en(a.base,e.havingBaseStyle(Dt.DISPLAY)),h=Ga.svgSpan(a,e),c;if(a.isOver?(c=Ae.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=Ae.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=Ae.makeSpan(["mord",a.isOver?"mover":"munder"],[c],e);a.isOver?c=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:r}]},e):c=Ae.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 Ae.makeSpan(["mord",a.isOver?"mover":"munder"],[c],e)},_k=(t,e)=>{var n=Ga.mathMLnode(t.label);return new Ye.MathNode(t.isOver?"mover":"munder",[Tn(t.base,e),n])};ht({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:C2,mathmlBuilder:_k});ht({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[1],a=Wt(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:Yn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=dr(t.body,e,!1);return Ae.makeAnchor(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=wo(t.body,e);return n instanceof ai||(n=new ai("mrow",[n])),n.setAttribute("href",t.href),n}});ht({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=Wt(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var a=[],l=0;l<r.length;l++){var h=r[l];h==="~"&&(h="\\textasciitilde"),a.push({type:"textord",mode:"text",text:h})}var c={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:r,body:Yn(c)}}});ht({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:Yn(e[0])}},htmlBuilder(t,e){var n=dr(t.body,e,!1);return Ae.makeFragment(n)},mathmlBuilder(t,e){return new Ye.MathNode("mrow",Vr(t.body,e))}});ht({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,token:a}=t,l=Wt(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 tt("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:Yn(h)}:n.formatUnsupportedCmd(r)},htmlBuilder:(t,e)=>{var n=dr(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var a=Ae.makeSpan(r,n,e);for(var l in t.attributes)l!=="class"&&t.attributes.hasOwnProperty(l)&&a.setAttribute(l,t.attributes[l]);return a},mathmlBuilder:(t,e)=>wo(t.body,e)});ht({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"htmlmathml",mode:n.mode,html:Yn(e[0]),mathml:Yn(e[1])}},htmlBuilder:(t,e)=>{var n=dr(t.html,e,!1);return Ae.makeFragment(n)},mathmlBuilder:(t,e)=>wo(t.mathml,e)});var wh=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 tt("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(e[1]+e[2]),unit:e[3]};if(!G6(n))throw new tt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};ht({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:r}=t,a={number:0,unit:"em"},l={number:.9,unit:"em"},h={number:0,unit:"em"},c="";if(n[0])for(var p=Wt(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":a=wh(m);break;case"height":l=wh(m);break;case"totalheight":h=wh(m);break;default:throw new tt("Invalid key: '"+g[0]+"' in \\includegraphics.")}}}var x=Wt(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:a,height:l,totalheight:h,src:x}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=Un(t.height,e),r=0;t.totalheight.number>0&&(r=Un(t.totalheight,e)-n);var a=0;t.width.number>0&&(a=Un(t.width,e));var l={height:st(n+r)};a>0&&(l.width=st(a)),r>0&&(l.verticalAlign=st(-r));var h=new _x(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=Un(t.height,e),a=0;if(t.totalheight.number>0&&(a=Un(t.totalheight,e)-r,n.setAttribute("valign",st(-a))),n.setAttribute("height",st(r+a)),t.width.number>0){var l=Un(t.width,e);n.setAttribute("width",st(l))}return n.setAttribute("src",t.src),n}});ht({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,a=Wt(e[0],"size");if(n.settings.strict){var l=r[1]==="m",h=a.value.unit==="mu";l?(h||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+a.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:a.value}},htmlBuilder(t,e){return Ae.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var n=Un(t.dimension,e);return new Ye.SpaceNode(n)}});ht({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=Ae.makeSpan([],[en(t.body,e)]),n=Ae.makeSpan(["inner"],[n],e)):n=Ae.makeSpan(["inner"],[en(t.body,e)]);var r=Ae.makeSpan(["fix"],[]),a=Ae.makeSpan([t.alignment],[n,r],e),l=Ae.makeSpan(["strut"]);return l.style.height=st(a.height+a.depth),a.depth&&(l.style.verticalAlign=st(-a.depth)),a.children.unshift(l),a=Ae.makeSpan(["thinbox"],[a],e),Ae.makeSpan(["mord","vbox"],[a],e)},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mpadded",[Tn(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}});ht({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,a=r.mode;r.switchMode("math");var l=n==="\\("?"\\)":"$",h=r.parseExpression(!1,l);return r.expect(l),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",body:h}}});ht({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new tt("Mismatched "+t.funcName)}});var xg=(t,e)=>{switch(e.style.size){case Dt.DISPLAY.size:return t.display;case Dt.TEXT.size:return t.text;case Dt.SCRIPT.size:return t.script;case Dt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};ht({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:n}=t;return{type:"mathchoice",mode:n.mode,display:Yn(e[0]),text:Yn(e[1]),script:Yn(e[2]),scriptscript:Yn(e[3])}},htmlBuilder:(t,e)=>{var n=xg(t,e),r=dr(n,e,!1);return Ae.makeFragment(r)},mathmlBuilder:(t,e)=>{var n=xg(t,e);return wo(n,e)}});var L2=(t,e,n,r,a,l,h)=>{t=Ae.makeSpan([],[t]);var c=n&&Tt.isCharacterBox(n),p,v;if(e){var b=en(e,r.havingStyle(a.sup()),r);v={elem:b,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-b.depth)}}if(n){var g=en(n,r.havingStyle(a.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=Ae.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:st(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:st(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(p){var w=t.height-h;m=Ae.makeVList({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:st(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t}]},r)}else if(v){var S=t.depth+h;m=Ae.makeVList({positionType:"bottom",positionData:S,children:[{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:st(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return t;var k=[m];if(p&&l!==0&&!c){var C=Ae.makeSpan(["mspace"],[],r);C.style.marginRight=st(l),k.unshift(C)}return Ae.makeSpan(["mop","op-limits"],k,r)},_2=["\\smallint"],Ns=(t,e)=>{var n,r,a=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=Wt(t.base,"op"),a=!0):l=Wt(t,"op");var h=e.style,c=!1;h.size===Dt.DISPLAY.size&&l.symbol&&!Tt.contains(_2,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=Ae.makeSymbol(l.name,v,"math",e,["mop","op-symbol",c?"large-op":"small-op"]),b.length>0){var g=p.italic,m=Ae.staticSvg(b+"Size"+(c?"2":"1"),e);p=Ae.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=dr(l.body,e,!0);x.length===1&&x[0]instanceof Si?(p=x[0],p.classes[0]="mop"):p=Ae.makeSpan(["mop"],x,e)}else{for(var w=[],S=1;S<l.name.length;S++)w.push(Ae.mathsym(l.name[S],l.mode,e));p=Ae.makeSpan(["mop"],w,e)}var k=0,C=0;return(p instanceof Si||l.name==="\\oiint"||l.name==="\\oiiint")&&!l.suppressBaseShift&&(k=(p.height-p.depth)/2-e.fontMetrics().axisHeight,C=p.italic),a?L2(p,n,r,e,h,C,k):(k&&(p.style.position="relative",p.style.top=st(k)),p)},s0=(t,e)=>{var n;if(t.symbol)n=new ai("mo",[Ei(t.name,t.mode)]),Tt.contains(_2,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new ai("mo",Vr(t.body,e));else{n=new ai("mi",[new aa(t.name.slice(1))]);var r=new ai("mo",[Ei("","text")]);t.parentIsSupSub?n=new ai("mrow",[n,r]):n=i2([n,r])}return n},Nk={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ht({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,a=r;return a.length===1&&(a=Nk[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Ns,mathmlBuilder:s0});ht({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:Yn(r)}},htmlBuilder:Ns,mathmlBuilder:s0});var Dk={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ht({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:Ns,mathmlBuilder:s0});ht({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:Ns,mathmlBuilder:s0});ht({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=Dk[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Ns,mathmlBuilder:s0});var N2=(t,e)=>{var n,r,a=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=Wt(t.base,"operatorname"),a=!0):l=Wt(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=dr(c,e.withFont("mathrm"),!0),v=0;v<p.length;v++){var b=p[v];b instanceof Si&&(b.text=b.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}h=Ae.makeSpan(["mop"],p,e)}else h=Ae.makeSpan(["mop"],[],e);return a?L2(h,n,r,e,e.style,0,0):h},Rk=(t,e)=>{for(var n=Vr(t.body,e.withFont("mathrm")),r=!0,a=0;a<n.length;a++){var l=n[a];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",[Ei("","text")]);return t.parentIsSupSub?new Ye.MathNode("mrow",[p,v]):Ye.newDocumentFragment([p,v])};ht({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0];return{type:"operatorname",mode:n.mode,body:Yn(a),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:N2,mathmlBuilder:Rk});G("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");rs({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Ae.makeFragment(dr(t.body,e,!1)):Ae.makeSpan(["mord"],dr(t.body,e,!0),e)},mathmlBuilder(t,e){return wo(t.body,e,!0)}});ht({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=en(t.body,e.havingCrampedStyle()),r=Ae.makeLineSpan("overline-line",e),a=e.fontMetrics().defaultRuleThickness,l=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]},e);return Ae.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",[Tn(t.body,e),n]);return r.setAttribute("accent","true"),r}});ht({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:Yn(r)}},htmlBuilder:(t,e)=>{var n=dr(t.body,e.withPhantom(),!1);return Ae.makeFragment(n)},mathmlBuilder:(t,e)=>{var n=Vr(t.body,e);return new Ye.MathNode("mphantom",n)}});ht({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=Ae.makeSpan([],[en(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=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e),Ae.makeSpan(["mord"],[n],e)},mathmlBuilder:(t,e)=>{var n=Vr(Yn(t.body),e),r=new Ye.MathNode("mphantom",n),a=new Ye.MathNode("mpadded",[r]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}});ht({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=Ae.makeSpan(["inner"],[en(t.body,e.withPhantom())]),r=Ae.makeSpan(["fix"],[]);return Ae.makeSpan(["mord","rlap"],[n,r],e)},mathmlBuilder:(t,e)=>{var n=Vr(Yn(t.body),e),r=new Ye.MathNode("mphantom",n),a=new Ye.MathNode("mpadded",[r]);return a.setAttribute("width","0px"),a}});ht({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=Wt(e[0],"size").value,a=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(t,e){var n=en(t.body,e),r=Un(t.dy,e);return Ae.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new Ye.MathNode("mpadded",[Tn(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}});ht({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});ht({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,a=n[0],l=Wt(e[0],"size"),h=Wt(e[1],"size");return{type:"rule",mode:r.mode,shift:a&&Wt(a,"size").value,width:l.value,height:h.value}},htmlBuilder(t,e){var n=Ae.makeSpan(["mord","rule"],[],e),r=Un(t.width,e),a=Un(t.height,e),l=t.shift?Un(t.shift,e):0;return n.style.borderRightWidth=st(r),n.style.borderTopWidth=st(a),n.style.bottom=st(l),n.width=r,n.height=a+l,n.depth=-l,n.maxFontSize=a*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=Un(t.width,e),r=Un(t.height,e),a=t.shift?Un(t.shift,e):0,l=e.color&&e.getColor()||"black",h=new Ye.MathNode("mspace");h.setAttribute("mathbackground",l),h.setAttribute("width",st(n)),h.setAttribute("height",st(r));var c=new Ye.MathNode("mpadded",[h]);return a>=0?c.setAttribute("height",st(a)):(c.setAttribute("height",st(a)),c.setAttribute("depth",st(-a))),c.setAttribute("voffset",st(a)),c}});function D2(t,e,n){for(var r=dr(t,e,!1),a=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*=a,r[l].depth*=a}return Ae.makeFragment(r)}var kg=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ok=(t,e)=>{var n=e.havingSize(t.size);return D2(t.body,n,e)};ht({type:"sizing",names:kg,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:r,parser:a}=t,l=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:kg.indexOf(r)+1,body:l}},htmlBuilder:Ok,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),r=Vr(t.body,n),a=new Ye.MathNode("mstyle",r);return a.setAttribute("mathsize",st(n.sizeMultiplier)),a}});ht({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:r}=t,a=!1,l=!1,h=n[0]&&Wt(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")a=!0;else if(c==="b")l=!0;else{a=!1,l=!1;break}}else a=!0,l=!0;var b=e[0];return{type:"smash",mode:r.mode,body:b,smashHeight:a,smashDepth:l}},htmlBuilder:(t,e)=>{var n=Ae.makeSpan([],[en(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 a=0;a<n.children.length;a++)n.children[a].depth=0;var l=Ae.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e);return Ae.makeSpan(["mord"],[l],e)},mathmlBuilder:(t,e)=>{var n=new Ye.MathNode("mpadded",[Tn(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});ht({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,a=n[0],l=e[0];return{type:"sqrt",mode:r.mode,body:l,index:a}},htmlBuilder(t,e){var n=en(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=Ae.wrapFragment(n,e);var r=e.fontMetrics(),a=r.defaultRuleThickness,l=a;e.style.id<Dt.TEXT.id&&(l=e.fontMetrics().xHeight);var h=a+l/4,c=n.height+n.depth+h+a,{span:p,ruleWidth:v,advanceWidth:b}=Fa.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=st(b);var x=Ae.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(Dt.SCRIPTSCRIPT),S=en(t.index,w,e),k=.6*(x.height-x.depth),C=Ae.makeVList({positionType:"shift",positionData:-k,children:[{type:"elem",elem:S}]},e),A=Ae.makeSpan(["root"],[C]);return Ae.makeSpan(["mord","sqrt"],[A,x],e)}else return Ae.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new Ye.MathNode("mroot",[Tn(n,e),Tn(r,e)]):new Ye.MathNode("msqrt",[Tn(n,e)])}});var Sg={display:Dt.DISPLAY,text:Dt.TEXT,script:Dt.SCRIPT,scriptscript:Dt.SCRIPTSCRIPT};ht({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:a}=t,l=a.parseExpression(!0,n),h=r.slice(1,r.length-5);return{type:"styling",mode:a.mode,style:h,body:l}},htmlBuilder(t,e){var n=Sg[t.style],r=e.havingStyle(n).withFont("");return D2(t.body,r,e)},mathmlBuilder(t,e){var n=Sg[t.style],r=e.havingStyle(n),a=Vr(t.body,r),l=new Ye.MathNode("mstyle",a),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 Ik=function(t,e){var n=t.base;if(n)if(n.type==="op"){var r=n.limits&&(e.style.size===Dt.DISPLAY.size||n.alwaysHandleSupSub);return r?Ns:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(e.style.size===Dt.DISPLAY.size||n.limits);return a?N2:null}else{if(n.type==="accent")return Tt.isCharacterBox(n.base)?t1:null;if(n.type==="horizBrace"){var l=!t.sub;return l===n.isOver?C2:null}else return null}else return null};rs({type:"supsub",htmlBuilder(t,e){var n=Ik(t,e);if(n)return n(t,e);var{base:r,sup:a,sub:l}=t,h=en(r,e),c,p,v=e.fontMetrics(),b=0,g=0,m=r&&Tt.isCharacterBox(r);if(a){var x=e.havingStyle(e.style.sup());c=en(a,x,e),m||(b=h.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(l){var w=e.havingStyle(e.style.sub());p=en(l,w,e),m||(g=h.depth+w.fontMetrics().subDrop*w.sizeMultiplier/e.sizeMultiplier)}var S;e.style===Dt.DISPLAY?S=v.sup1:e.style.cramped?S=v.sup3:S=v.sup2;var k=e.sizeMultiplier,C=st(.5/v.ptPerEm/k),A=null;if(p){var T=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(h instanceof Si||T)&&(A=st(-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 q=[{type:"elem",elem:p,shift:g,marginRight:C,marginLeft:A},{type:"elem",elem:c,shift:-b,marginRight:C}];M=Ae.makeVList({positionType:"individualShift",children:q},e)}else if(p){g=Math.max(g,v.sub1,p.height-.8*v.xHeight);var P=[{type:"elem",elem:p,marginLeft:A,marginRight:C}];M=Ae.makeVList({positionType:"shift",positionData:g,children:P},e)}else if(c)b=Math.max(b,S,c.depth+.25*v.xHeight),M=Ae.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=Ap(h,"right")||"mord";return Ae.makeSpan([Y],[h,Ae.makeSpan(["msupsub"],[M])],e)},mathmlBuilder(t,e){var n=!1,r,a;t.base&&t.base.type==="horizBrace"&&(a=!!t.sup,a===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=[Tn(t.base,e)];t.sub&&l.push(Tn(t.sub,e)),t.sup&&l.push(Tn(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===Dt.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===Dt.DISPLAY||c.limits)?h="munderover":h="msubsup"}else{var p=t.base;p&&p.type==="op"&&p.limits&&(e.style===Dt.DISPLAY||p.alwaysHandleSupSub)||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(p.limits||e.style===Dt.DISPLAY)?h="munder":h="msub"}else{var v=t.base;v&&v.type==="op"&&v.limits&&(e.style===Dt.DISPLAY||v.alwaysHandleSupSub)||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(v.limits||e.style===Dt.DISPLAY)?h="mover":h="msup"}return new Ye.MathNode(h,l)}});rs({type:"atom",htmlBuilder(t,e){return Ae.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new Ye.MathNode("mo",[Ei(t.text,t.mode)]);if(t.family==="bin"){var r=Qf(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 R2={mi:"italic",mn:"normal",mtext:"normal"};rs({type:"mathord",htmlBuilder(t,e){return Ae.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var n=new Ye.MathNode("mi",[Ei(t.text,t.mode,e)]),r=Qf(t,e)||"italic";return r!==R2[n.type]&&n.setAttribute("mathvariant",r),n}});rs({type:"textord",htmlBuilder(t,e){return Ae.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var n=Ei(t.text,t.mode,e),r=Qf(t,e)||"normal",a;return t.mode==="text"?a=new Ye.MathNode("mtext",[n]):/[0-9]/.test(t.text)?a=new Ye.MathNode("mn",[n]):t.text==="\\prime"?a=new Ye.MathNode("mo",[n]):a=new Ye.MathNode("mi",[n]),r!==R2[a.type]&&a.setAttribute("mathvariant",r),a}});var xh={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},kh={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};rs({type:"spacing",htmlBuilder(t,e){if(kh.hasOwnProperty(t.text)){var n=kh[t.text].className||"";if(t.mode==="text"){var r=Ae.makeOrd(t,e,"textord");return r.classes.push(n),r}else return Ae.makeSpan(["mspace",n],[Ae.mathsym(t.text,t.mode,e)],e)}else{if(xh.hasOwnProperty(t.text))return Ae.makeSpan(["mspace",xh[t.text]],[],e);throw new tt('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 tt('Unknown type of space "'+t.text+'"')}return n}});var Eg=()=>{var t=new Ye.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};rs({type:"tag",mathmlBuilder(t,e){var n=new Ye.MathNode("mtable",[new Ye.MathNode("mtr",[Eg(),new Ye.MathNode("mtd",[wo(t.body,e)]),Eg(),new Ye.MathNode("mtd",[wo(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var Tg={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ag={"\\textbf":"textbf","\\textmd":"textmd"},Hk={"\\textit":"textit","\\textup":"textup"},Mg=(t,e)=>{var n=t.font;if(n){if(Tg[n])return e.withTextFontFamily(Tg[n]);if(Ag[n])return e.withTextFontWeight(Ag[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Hk[n])};ht({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,a=e[0];return{type:"text",mode:n.mode,body:Yn(a),font:r}},htmlBuilder(t,e){var n=Mg(t,e),r=dr(t.body,n,!0);return Ae.makeSpan(["mord","text"],r,n)},mathmlBuilder(t,e){var n=Mg(t,e);return wo(t.body,n)}});ht({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=en(t.body,e),r=Ae.makeLineSpan("underline-line",e),a=e.fontMetrics().defaultRuleThickness,l=Ae.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]},e);return Ae.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",[Tn(t.body,e),n]);return r.setAttribute("accentunder","true"),r}});ht({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=en(t.body,e),r=e.fontMetrics().axisHeight,a=.5*(n.height-r-(n.depth+r));return Ae.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){return new Ye.MathNode("mpadded",[Tn(t.body,e)],["vcenter"])}});ht({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,n){throw new tt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var n=Cg(t),r=[],a=e.havingStyle(e.style.text()),l=0;l<n.length;l++){var h=n[l];h==="~"&&(h="\\textasciitilde"),r.push(Ae.makeSymbol(h,"Typewriter-Regular",t.mode,a,["mord","texttt"]))}return Ae.makeSpan(["mord","text"].concat(a.sizingClasses(e)),Ae.tryCombineChars(r),a)},mathmlBuilder(t,e){var n=new Ye.TextNode(Cg(t)),r=new Ye.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var Cg=t=>t.body.replace(/ /g,t.star?"␣":" "),ho=n2,O2=`[ \r
]`,Pk="\\\\[a-zA-Z@]+",zk="\\\\[^\uD800-\uDFFF]",Bk="("+Pk+")"+O2+"*",Fk=`\\\\(
|[ \r ]+
?)[ \r ]*`,_p="[̀-ͯ]",qk=new RegExp(_p+"+$"),jk="("+O2+"+)|"+(Fk+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(_p+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(_p+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Bk)+("|"+zk+")");class Lg{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(jk,"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 wi("EOF",new ri(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new tt("Unexpected character: '"+e[n]+"'",new wi(e[n],new ri(this,n,n+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[a]===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 wi(a,new ri(this,n,this.tokenRegex.lastIndex))}}class $k{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 tt("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 a=0;a<this.undefStack.length;a++)delete this.undefStack[a][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 Uk=S2;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 _g={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 tt("\\char` missing argument");r=e.text.charCodeAt(0)}else n=10;if(n){if(r=_g[e.text],r==null||r>=n)throw new tt("Invalid base-"+n+" digit "+e.text);for(var a;(a=_g[t.future().text])!=null&&a<n;)r*=n,r+=a,t.popToken()}return"\\@char{"+r+"}"});var c1=(t,e,n,r)=>{var a=t.consumeArg().tokens;if(a.length!==1)throw new tt("\\newcommand's first argument must be a macro name");var l=a[0].text,h=t.isDefined(l);if(h&&!e)throw new tt("\\newcommand{"+l+"} attempting to redefine "+(l+"; use \\renewcommand"));if(!h&&!n)throw new tt("\\renewcommand{"+l+"} when command "+l+" does not yet exist; use \\newcommand");var c=0;if(a=t.consumeArg().tokens,a.length===1&&a[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 tt("Invalid number of arguments: "+p);c=parseInt(p),a=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:a,numArgs:c}),""};G("\\newcommand",t=>c1(t,!1,!0,!1));G("\\renewcommand",t=>c1(t,!0,!1,!1));G("\\providecommand",t=>c1(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),ho[n],Nn.math[n],Nn.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 Ng={",":"\\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 Ng?e=Ng[n]:(n.slice(0,4)==="\\not"||n in Nn.math&&Tt.contains(["bin","rel"],Nn.math[n].group))&&(e="\\dotsb"),e});var u1={")":!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 u1?"\\ldots\\,":"\\ldots"});G("\\dotsc",function(t){var e=t.future().text;return e in u1&&e!==","?"\\ldots\\,":"\\ldots"});G("\\cdots",function(t){var e=t.future().text;return e in u1?"\\@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 tt("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 I2=st(ia["Main-Regular"]["T".charCodeAt(0)][1]-.7*ia["Main-Regular"]["A".charCodeAt(0)][1]);G("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+I2+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");G("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+I2+"}{\\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 H2=t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,a=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),a.length&&m.macros.set("\\|",c));var x=g;if(!g&&a.length){var w=m.future();w.text==="|"&&(m.popToken(),x=!0)}return{tokens:x?a:r,numArgs:0}};e.macros.set("|",p(!1)),a.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",H2(!1));G("\\bra@set",H2(!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 P2={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Vk{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 $k(Uk,n.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Lg(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,a;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:a,end:r}=this.consumeArg(["]"])}else({tokens:a,start:n,end:r}=this.consumeArg());return this.pushToken(new wi("EOF",r.loc)),this.pushTokens(a),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 a=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 tt("Extra }",l)}else if(l.text==="EOF")throw new tt("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 a.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:a,end:l}}consumeArgs(e,n){if(n){if(n.length!==e+1)throw new tt("The length of delimiters doesn't match the number of args!");for(var r=n[0],a=0;a<r.length;a++){var l=this.popToken();if(r[a]!==l.text)throw new tt("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 tt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var n=this.popToken(),r=n.text,a=n.noexpand?null:this._getExpansion(r);if(a==null||e&&a.unexpandable){if(e&&a==null&&r[0]==="\\"&&!this.isDefined(r))throw new tt("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var l=a.tokens,h=this.consumeArgs(a.numArgs,a.delimiters);if(a.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 tt("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 tt("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 wi(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 a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),n.push(a)}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 a=typeof n=="function"?n(this):n;if(typeof a=="string"){var l=0;if(a.indexOf("#")!==-1)for(var h=a.replace(/##/g,"");h.indexOf("#"+(l+1))!==-1;)++l;for(var c=new Lg(a,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 a}isDefined(e){return this.macros.has(e)||ho.hasOwnProperty(e)||Nn.math.hasOwnProperty(e)||Nn.text.hasOwnProperty(e)||P2.hasOwnProperty(e)}isExpandable(e){var n=this.macros.get(e);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:ho.hasOwnProperty(e)&&!ho[e].primitive}}var Dg=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,D0=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"}},Rg={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class hu{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 Vk(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 tt("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 wi("}")),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 a=this.fetch();if(hu.endOfExpression.indexOf(a.text)!==-1||n&&a.text===n||e&&ho[a.text]&&ho[a.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,a=0;a<e.length;a++)if(e[a].type==="infix"){if(n!==-1)throw new tt("only one infix operator per group",e[a].token);n=a,r=e[a].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 a;do{var l;a=this.parseGroup(e)}while(((l=a)==null?void 0:l.type)==="internal");if(!a)throw new tt("Expected group after '"+r+"'",n);return a}formatUnsupportedCmd(e){for(var n=[],r=0;r<e.length;r++)n.push({type:"textord",mode:"text",text:e[r]});var a={type:"text",mode:this.mode,body:n},l={type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]};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,a;;){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 tt("Limit controls must follow a math operator",l);this.consume()}else if(l.text==="^"){if(r)throw new tt("Double superscript",l);r=this.handleSupSubscript("superscript")}else if(l.text==="_"){if(a)throw new tt("Double subscript",l);a=this.handleSupSubscript("subscript")}else if(l.text==="'"){if(r)throw new tt("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(D0[l.text]){var v=Dg.test(l.text),b=[];for(b.push(new wi(D0[l.text])),this.consume();;){var g=this.fetch().text;if(!D0[g]||Dg.test(g)!==v)break;b.unshift(new wi(D0[g])),this.consume()}var m=this.subparse(b);v?a={type:"ordgroup",mode:"math",body:m}:r={type:"ordgroup",mode:"math",body:m}}else break}return r||a?{type:"supsub",mode:this.mode,base:n,sup:r,sub:a}:n}parseFunction(e,n){var r=this.fetch(),a=r.text,l=ho[a];if(!l)return null;if(this.consume(),n&&n!=="atom"&&!l.allowedInArgument)throw new tt("Got function '"+a+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!l.allowedInText)throw new tt("Can't use function '"+a+"' in text mode",r);if(this.mode==="math"&&l.allowedInMath===!1)throw new tt("Can't use function '"+a+"' in math mode",r);var{args:h,optArgs:c}=this.parseArguments(a,l);return this.callFunction(a,h,c,r,e)}callFunction(e,n,r,a,l){var h={funcName:e,parser:this,token:a,breakOnTokenText:l},c=ho[e];if(c&&c.handler)return c.handler(h,n,r);throw new tt("No function handler for "+e)}parseArguments(e,n){var r=n.numArgs+n.numOptionalArgs;if(r===0)return{args:[],optArgs:[]};for(var a=[],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)a.push(v);else throw new tt("Null argument, please report this as a bug")}return{args:a,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 a=this.parseArgumentGroup(r,"text");return a!=null?{type:"styling",mode:a.mode,body:[a],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 tt("A primitive argument cannot be optional");var h=this.parseGroup(e);if(h==null)throw new tt("Expected group as "+e,this.fetch());return h}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new tt("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 a="",l;(l=this.fetch()).text!=="EOF";)a+=l.text,this.consume();return this.consume(),r.text=a,r}parseRegexGroup(e,n){for(var r=this.fetch(),a=r,l="",h;(h=this.fetch()).text!=="EOF"&&e.test(l+h.text);)a=h,l+=a.text,this.consume();if(l==="")throw new tt("Invalid "+n+": '"+r.text+"'",r);return r.range(a,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 tt("Invalid color: '"+n.text+"'",n);var a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}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 a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!a)throw new tt("Invalid size: '"+n.text+"'",n);var l={number:+(a[1]+a[2]),unit:a[3]};if(!G6(l))throw new tt("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 a=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(a),h}parseGroup(e,n){var r=this.fetch(),a=r.text,l;if(a==="{"||a==="\\begingroup"){this.consume();var h=a==="{"?"}":"\\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:ri.range(r,p),body:c,semisimple:a==="\\begingroup"||void 0}}else if(l=this.parseFunction(n,e)||this.parseSymbol(),l==null&&a[0]==="\\"&&!P2.hasOwnProperty(a)){if(this.settings.throwOnError)throw new tt("Undefined control sequence: "+a,r);l=this.formatUnsupportedCmd(a),this.consume()}return l}formLigatures(e){for(var n=e.length-1,r=0;r<n;++r){var a=e[r],l=a.text;l==="-"&&e[r+1].text==="-"&&(r+1<n&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:ri.range(a,e[r+2]),text:"---"}),n-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:ri.range(a,e[r+1]),text:"--"}),n-=1)),(l==="'"||l==="`")&&e[r+1].text===l&&(e.splice(r,2,{type:"textord",mode:"text",loc:ri.range(a,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),a=r.charAt(0)==="*";if(a&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new tt(`\\verb assertion failed --
please report what input caused this bug`);return r=r.slice(1,-1),{type:"verb",mode:"text",body:r,star:a}}Rg.hasOwnProperty(n[0])&&!Nn[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=Rg[n[0]]+n.slice(1));var l=qk.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var h;if(Nn[this.mode][n]){this.settings.strict&&this.mode==="math"&&Tp.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=Nn[this.mode][n].group,p=ri.range(e),v;if(Rx.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&&(W6(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:ri.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 tt("Unknown accent ' "+m+"'",e);var x=Sh[m][this.mode]||Sh[m].text;if(!x)throw new tt("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc:ri.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}hu.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var d1=function(t,e){if(!(typeof t=="string"||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new hu(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 tt("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new wi("\\df@tag")])}]}return r},z2=function(t,e,n){e.textContent="";var r=h1(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."),z2=function(){throw new tt("KaTeX doesn't work in quirks mode.")});var Wk=function(t,e){var n=h1(t,e).toMarkup();return n},Gk=function(t,e){var n=new Gf(e);return d1(t,n)},B2=function(t,e,n){if(n.throwOnError||!(t instanceof tt))throw t;var r=Ae.makeSpan(["katex-error"],[new Si(e)]);return r.setAttribute("title",t.toString()),r.setAttribute("style","color:"+n.errorColor),r},h1=function(t,e){var n=new Gf(e);try{var r=d1(t,n);return nk(r,t,n)}catch(a){return B2(a,t,n)}},Kk=function(t,e){var n=new Gf(e);try{var r=d1(t,n);return rk(r,t,n)}catch(a){return B2(a,t,n)}},Xk="0.16.22",Zk={Span:o0,Anchor:Zf,SymbolNode:Si,SvgNode:Va,PathNode:yo,LineNode:Ep},Og={version:Xk,render:z2,renderToString:Wk,ParseError:tt,SETTINGS_SCHEMA:J0,__parse:Gk,__renderToDomTree:h1,__renderToHTMLTree:Kk,__setFontMetrics:Tx,__defineSymbol:R,__defineFunction:ht,__defineMacro:G,__domTree:Zk},F2={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()})(xp,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),A=g.substring(0,C);g=g.substring(C),m=m.substring(C),C=this.diff_commonSuffix(g,m);var T=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 A&&M.unshift(new c.Diff(b,A)),T&&M.push(new c.Diff(b,T)),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,A=k.indexOf(C);if(A!=-1)return S=[new c.Diff(v,k.substring(0,A)),new c.Diff(b,C),new c.Diff(v,k.substring(A+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 T=this.diff_halfMatch_(g,m);if(T){var M=T[0],y=T[1],N=T[2],z=T[3],q=T[4],P=this.diff_main(M,N,x,w),Y=this.diff_main(y,z,x,w);return P.concat([new c.Diff(b,q)],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,A=0,T=0,M="",y="";C<k.length;){switch(k[C][0]){case v:T++,y+=k[C][1];break;case p:A++,M+=k[C][1];break;case b:if(A>=1&&T>=1){k.splice(C-A-T,A+T),C=C-A-T;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}T=0,A=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,A=2*k,T=new Array(A),M=new Array(A),y=0;y<A;y++)T[y]=-1,M[y]=-1;T[C+1]=0,M[C+1]=0;for(var N=w-S,z=N%2!=0,q=0,P=0,Y=0,te=0,ue=0;ue<k&&!(new Date().getTime()>x);ue++){for(var Le=-ue+q;Le<=ue-P;Le+=2){var qe=C+Le,Xe;Le==-ue||Le!=ue&&T[qe-1]<T[qe+1]?Xe=T[qe+1]:Xe=T[qe-1]+1;for(var it=Xe-Le;Xe<w&&it<S&&g.charAt(Xe)==m.charAt(it);)Xe++,it++;if(T[qe]=Xe,Xe>w)P+=2;else if(it>S)q+=2;else if(z){var $e=C+N-Le;if($e>=0&&$e<A&&M[$e]!=-1){var De=w-M[$e];if(Xe>=De)return this.diff_bisectSplit_(g,m,Xe,it,x)}}}for(var nt=-ue+Y;nt<=ue-te;nt+=2){var $e=C+nt,De;nt==-ue||nt!=ue&&M[$e-1]<M[$e+1]?De=M[$e+1]:De=M[$e-1]+1;for(var ut=De-nt;De<w&&ut<S&&g.charAt(w-De-1)==m.charAt(S-ut-1);)De++,ut++;if(M[$e]=De,De>w)te+=2;else if(ut>S)Y+=2;else if(!z){var qe=C+N-nt;if(qe>=0&&qe<A&&T[qe]!=-1){var Xe=T[qe],it=C+Xe-qe;if(De=w-De,Xe>=De)return this.diff_bisectSplit_(g,m,Xe,it,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),A=g.substring(x),T=m.substring(w),M=this.diff_main(k,C,!1,S),y=this.diff_main(A,T,!1,S);return M.concat(y)},c.prototype.diff_linesToChars_=function(g,m){var x=[],w={};x[0]="";function S(T){for(var M="",y=0,N=-1,z=x.length;N<T.length-1;){N=T.indexOf(`
`,y),N==-1&&(N=T.length-1);var q=T.substring(y,N+1);(w.hasOwnProperty?w.hasOwnProperty(q):w[q]!==void 0)?M+=String.fromCharCode(w[q]):(z==k&&(q=T.substring(y),N=T.length),M+=String.fromCharCode(z),w[q]=z,x[z++]=q),y=N+1}return M}var k=4e4,C=S(g);k=65535;var A=S(m);return{chars1:C,chars2:A,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 A=g.substring(S-C),T=m.indexOf(A);if(T==-1)return k;C+=T,(T==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 ue=P.substring(te,te+Math.floor(P.length/4)),Le=-1,qe="",Xe,it,$e,De;(Le=Y.indexOf(ue,Le+1))!=-1;){var nt=S.diff_commonPrefix(P.substring(te),Y.substring(Le)),ut=S.diff_commonSuffix(P.substring(0,te),Y.substring(0,Le));qe.length<ut+nt&&(qe=Y.substring(Le-ut,Le)+Y.substring(Le,Le+nt),Xe=P.substring(0,te-ut),it=P.substring(te+nt),$e=Y.substring(0,Le-ut),De=Y.substring(Le+nt))}return qe.length*2>=P.length?[Xe,it,$e,De,qe]:null}var C=k(x,w,Math.ceil(x.length/4)),A=k(x,w,Math.ceil(x.length/2)),T;if(!C&&!A)return null;A?C?T=C[4].length>A[4].length?C:A:T=A:T=C;var M,y,N,z;g.length>m.length?(M=T[0],y=T[1],N=T[2],z=T[3]):(N=T[0],z=T[1],M=T[2],y=T[3]);var q=T[4];return[M,y,N,z,q]},c.prototype.diff_cleanupSemantic=function(g){for(var m=!1,x=[],w=0,S=null,k=0,C=0,A=0,T=0,M=0;k<g.length;)g[k][0]==b?(x[w++]=k,C=T,A=M,T=0,M=0,S=g[k][1]):(g[k][0]==v?T+=g[k][1].length:M+=g[k][1].length,S&&S.length<=Math.max(C,A)&&S.length<=Math.max(T,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,A=0,T=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),q=this.diff_commonOverlap_(N,y);z>=q?(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++):(q>=y.length/2||q>=N.length/2)&&(g.splice(k,0,new c.Diff(b,y.substring(0,q))),g[k-1][0]=v,g[k-1][1]=N.substring(0,N.length-q),g[k+1][0]=p,g[k+1][1]=y.substring(q),k++),k++}k++}},c.prototype.diff_cleanupSemanticLossless=function(g){function m(q,P){if(!q||!P)return 6;var Y=q.charAt(q.length-1),te=P.charAt(0),ue=Y.match(c.nonAlphaNumericRegex_),Le=te.match(c.nonAlphaNumericRegex_),qe=ue&&Y.match(c.whitespaceRegex_),Xe=Le&&te.match(c.whitespaceRegex_),it=qe&&Y.match(c.linebreakRegex_),$e=Xe&&te.match(c.linebreakRegex_),De=it&&q.match(c.blanklineEndRegex_),nt=$e&&P.match(c.blanklineStartRegex_);return De||nt?5:it||$e?4:ue&&!qe&&Xe?3:qe||Xe?2:ue||Le?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 A=S.substring(S.length-C);w=w.substring(0,w.length-C),S=A+S.substring(0,S.length-C),k=A+k}for(var T=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,T=w,M=S,y=k)}g[x-1][1]!=T&&(T?g[x-1][1]=T:(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,A=!1,T=!1,M=!1;k<g.length;)g[k][0]==b?(g[k][1].length<this.Diff_EditCost&&(T||M)?(x[w++]=k,C=T,A=M,S=g[k][1]):(w=0,S=null),T=M=!1):(g[k][0]==p?M=!0:T=!0,S&&(C&&A&&T&&M||S.length<this.Diff_EditCost/2&&C+A+T+M==3)&&(g.splice(x[w-1],0,new c.Diff(p,S)),g[x[w-1]+1][0]=v,w--,S=null,C&&A?(T=M=!0,w=0):(w--,k=w>0?x[w-1]:-1,T=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 A=!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),A=!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),A=!0)),m++;A&&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 A=g[C][0],T=g[C][1],M=T.replace(x,"&amp;").replace(w,"&lt;").replace(S,"&gt;").replace(k,"&para;<br>");switch(A){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 A=k[C].substring(1);switch(k[C].charAt(0)){case"+":try{x[w++]=new c.Diff(v,decodeURI(A))}catch{throw new Error("Illegal escape in diff_fromDelta: "+A)}break;case"-":case"=":var T=parseInt(A,10);if(isNaN(T)||T<0)throw new Error("Invalid number in diff_fromDelta: "+A);var M=g.substring(S,S+=T);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(Xe,it){var $e=Xe/m.length,De=Math.abs(x-it);return S.Match_Distance?$e+De/S.Match_Distance:De?1:$e}var C=this.Match_Threshold,A=g.indexOf(m,x);A!=-1&&(C=Math.min(k(0,A),C),A=g.lastIndexOf(m,x+m.length),A!=-1&&(C=Math.min(k(0,A),C)));var T=1<<m.length-1;A=-1;for(var M,y,N=m.length+g.length,z,q=0;q<m.length;q++){for(M=0,y=N;M<y;)k(q,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<<q)-1;for(var ue=Y;ue>=P;ue--){var Le=w[g.charAt(ue-1)];if(q===0?te[ue]=(te[ue+1]<<1|1)&Le:te[ue]=(te[ue+1]<<1|1)&Le|((z[ue+1]|z[ue])<<1|1)|z[ue+1],te[ue]&T){var qe=k(q,ue-1);if(qe<=C)if(C=qe,A=ue-1,A>x)P=Math.max(1,2*x-A);else break}}if(k(q+1,x)>C)break;z=te}return A},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,A=0,T=0,M=0,y=w,N=w,z=0;z<S.length;z++){var q=S[z][0],P=S[z][1];switch(!A&&q!==b&&(C.start1=T,C.start2=M),q){case v:C.diffs[A++]=S[z],C.length2+=P.length,N=N.substring(0,M)+P+N.substring(M);break;case p:C.length1+=P.length,C.diffs[A++]=S[z],N=N.substring(0,M)+N.substring(M+P.length);break;case b:P.length<=2*this.Patch_Margin&&A&&S.length!=z+1?(C.diffs[A++]=S[z],C.length1+=P.length,C.length2+=P.length):P.length>=2*this.Patch_Margin&&A&&(this.patch_addContext_(C,y),k.push(C),C=new c.patch_obj,A=0,y=N,T=M);break}q!==v&&(T+=P.length),q!==p&&(M+=P.length)}return A&&(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,A=this.diff_text1(g[k].diffs),T,M=-1;if(A.length>this.Match_MaxBits?(T=this.match_main(m,A.substring(0,this.Match_MaxBits),C),T!=-1&&(M=this.match_main(m,A.substring(A.length-this.Match_MaxBits),C+A.length-this.Match_MaxBits),(M==-1||T>=M)&&(T=-1))):T=this.match_main(m,A,C),T==-1)S[k]=!1,w-=g[k].length2-g[k].length1;else{S[k]=!0,w=T-C;var y;if(M==-1?y=m.substring(T,T+A.length):y=m.substring(T,M+this.Match_MaxBits),A==y)m=m.substring(0,T)+this.diff_text2(g[k].diffs)+m.substring(T+A.length);else{var N=this.diff_main(A,y,!1);if(A.length>this.Match_MaxBits&&this.diff_levenshtein(N)/A.length>this.Patch_DeleteThreshold)S[k]=!1;else{this.diff_cleanupSemanticLossless(N);for(var z=0,q,P=0;P<g[k].diffs.length;P++){var Y=g[k].diffs[P];Y[0]!==b&&(q=this.diff_xIndex(N,z)),Y[0]===v?m=m.substring(0,T+q)+Y[1]+m.substring(T+q):Y[0]===p&&(m=m.substring(0,T+q)+m.substring(T+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 A=new c.patch_obj,T=!0;for(A.start1=S-C.length,A.start2=k-C.length,C!==""&&(A.length1=A.length2=C.length,A.diffs.push(new c.Diff(b,C)));w.diffs.length!==0&&A.length1<m-this.Patch_Margin;){var M=w.diffs[0][0],y=w.diffs[0][1];M===v?(A.length2+=y.length,k+=y.length,A.diffs.push(w.diffs.shift()),T=!1):M===p&&A.diffs.length==1&&A.diffs[0][0]==b&&y.length>2*m?(A.length1+=y.length,S+=y.length,T=!1,A.diffs.push(new c.Diff(M,y)),w.diffs.shift()):(y=y.substring(0,m-A.length1-this.Patch_Margin),A.length1+=y.length,S+=y.length,M===b?(A.length2+=y.length,k+=y.length):T=!1,A.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(A.diffs),C=C.substring(C.length-this.Patch_Margin);var N=this.diff_text1(w.diffs).substring(0,this.Patch_Margin);N!==""&&(A.length1+=N.length,A.length2+=N.length,A.diffs.length!==0&&A.diffs[A.diffs.length-1][0]===b?A.diffs[A.diffs.length-1][1]+=N:A.diffs.push(new c.Diff(b,N))),T||g.splice(++x,0,A)}}},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 A=x[w].charAt(0);try{var T=decodeURI(x[w].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+T)}if(A=="-")C.diffs.push(new c.Diff(p,T));else if(A=="+")C.diffs.push(new c.Diff(v,T));else if(A==" ")C.diffs.push(new c.Diff(b,T));else{if(A=="@")break;if(A!=="")throw new Error('Invalid patch mode "'+A+'" in: '+T)}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:()=>Mt});var v=p(135),b=p(840),g=p(775),m=p(428),x=p(325),w=p(483),S=p(999),k=function(se){se===void 0&&(se=document);var fe=function(J){var Q=document.createElement("img");Q.src=J.getAttribute("data-src"),Q.addEventListener("load",function(){!J.getAttribute("style")&&!J.getAttribute("class")&&!J.getAttribute("width")&&!J.getAttribute("height")&&Q.naturalHeight>Q.naturalWidth&&Q.naturalWidth/Q.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&Q.naturalHeight>window.innerHeight-40&&(J.style.height=window.innerHeight-40+"px"),J.src=Q.src}),J.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return se.querySelectorAll("img").forEach(function(J){J.getAttribute("data-src")&&fe(J)}),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),se.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)})):(window.vditorImageIntersectionObserver=new IntersectionObserver(function(J){J.forEach(function(Q){(typeof Q.isIntersecting>"u"?Q.intersectionRatio!==0:Q.isIntersecting)&&Q.target.getAttribute("data-src")&&fe(Q.target)})}),se.querySelectorAll("img").forEach(function(J){window.vditorImageIntersectionObserver.observe(J)}))},C=p(472),A=p(280),T=p(637),M=p(825),y=p(11),N=p(194),z=p(436),q=p(229),P=p(145),Y=p(538),te=p(413),ue=p(106),Le=p(673),qe=function(se){document.querySelectorAll(".vditor-anchor").forEach(function(fe){se===1&&fe.classList.add("vditor-anchor--left"),fe.onclick=function(){var J=fe.getAttribute("href").substr(1),Q=document.getElementById("vditorAnchor-"+J).offsetTop;document.querySelector("html").scrollTop=Q}}),window.onhashchange=function(){var fe=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));fe&&(document.querySelector("html").scrollTop=fe.offsetTop)}},Xe=p(214),it=p(810),$e=function(se,fe){if(fe===void 0&&(fe="zh_CN"),!(typeof speechSynthesis>"u"||typeof SpeechSynthesisUtterance>"u")){var J=function(){var ge=speechSynthesis.getVoices(),ce,ve;return ge.forEach(function(Ee){Ee.lang===fe.replace("_","-")&&(ce=Ee),Ee.default&&(ve=Ee)}),ce||(ce=ve),ce},Q='<svg><use xlink:href="#vditor-icon-play"></use></svg>',Ie='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(Q='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',Ie='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var de=document.querySelector(".vditor-speech");de||(de=document.createElement("button"),de.className="vditor-speech",se.insertAdjacentElement("beforeend",de),speechSynthesis.onvoiceschanged!==void 0&&(speechSynthesis.onvoiceschanged=J));var W=J(),Z=new SpeechSynthesisUtterance;Z.voice=W,Z.onend=Z.onerror=function(){de.style.display="none",speechSynthesis.cancel(),de.classList.remove("vditor-speech--current"),de.innerHTML=Q},se.addEventListener(window.ontouchstart!==void 0?"touchend":"click",function(ge){var ce=ge.target;if(ce.classList.contains("vditor-speech")||ce.parentElement.classList.contains("vditor-speech")){de.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),de.innerHTML=Ie):(speechSynthesis.pause(),de.innerHTML=Q)):(Z.text=de.getAttribute("data-text"),speechSynthesis.speak(Z),de.classList.add("vditor-speech--current"),de.innerHTML=Ie),(0,it.Hc)(window.vditorSpeechRange),se.focus();return}if(de.style.display="none",speechSynthesis.cancel(),de.classList.remove("vditor-speech--current"),de.innerHTML=Q,getSelection().rangeCount!==0){var ve=getSelection().getRangeAt(0),Ee=ve.toString().trim();if(Ee){window.vditorSpeechRange=ve.cloneRange();var ze=ve.getBoundingClientRect();de.innerHTML=Q,de.style.display="block",de.style.top=ze.top+ze.height+document.querySelector("html").scrollTop-20+"px",window.ontouchstart!==void 0?de.style.left=ge.changedTouches[ge.changedTouches.length-1].pageX+2+"px":de.style.left=ge.clientX+2+"px",de.setAttribute("data-text",Ee)}}})}},De=function(se,fe,J,Q){function Ie(de){return de instanceof J?de:new J(function(W){W(de)})}return new(J||(J=Promise))(function(de,W){function Z(ve){try{ce(Q.next(ve))}catch(Ee){W(Ee)}}function ge(ve){try{ce(Q.throw(ve))}catch(Ee){W(Ee)}}function ce(ve){ve.done?de(ve.value):Ie(ve.value).then(Z,ge)}ce((Q=Q.apply(se,fe||[])).next())})},nt=function(se,fe){var J={label:0,sent:function(){if(de[0]&1)throw de[1];return de[1]},trys:[],ops:[]},Q,Ie,de,W;return W={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(W[Symbol.iterator]=function(){return this}),W;function Z(ce){return function(ve){return ge([ce,ve])}}function ge(ce){if(Q)throw new TypeError("Generator is already executing.");for(;W&&(W=0,ce[0]&&(J=0)),J;)try{if(Q=1,Ie&&(de=ce[0]&2?Ie.return:ce[0]?Ie.throw||((de=Ie.return)&&de.call(Ie),0):Ie.next)&&!(de=de.call(Ie,ce[1])).done)return de;switch(Ie=0,de&&(ce=[ce[0]&2,de.value]),ce[0]){case 0:case 1:de=ce;break;case 4:return J.label++,{value:ce[1],done:!1};case 5:J.label++,Ie=ce[1],ce=[0];continue;case 7:ce=J.ops.pop(),J.trys.pop();continue;default:if(de=J.trys,!(de=de.length>0&&de[de.length-1])&&(ce[0]===6||ce[0]===2)){J=0;continue}if(ce[0]===3&&(!de||ce[1]>de[0]&&ce[1]<de[3])){J.label=ce[1];break}if(ce[0]===6&&J.label<de[1]){J.label=de[1],de=ce;break}if(de&&J.label<de[2]){J.label=de[2],J.ops.push(ce);break}de[2]&&J.ops.pop(),J.trys.pop();continue}ce=fe.call(se,J)}catch(ve){ce=[6,ve],Ie=0}finally{Q=de=0}if(ce[0]&5)throw ce[1];return{value:ce[0]?ce[1]:void 0,done:!0}}},ut=function(se){var fe,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 se.cdn&&(!((fe=se.theme)===null||fe===void 0)&&fe.path||(J.theme.path="".concat(se.cdn,"/dist/css/content-theme")),se.emojiPath||(J.emojiPath="".concat(se.cdn,"/dist/images/emoji"))),(0,Le.T)(J,se)},je=function(se,fe){var J=ut(fe);return(0,te.G)("".concat(J.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){var Q=(0,Xe.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 fe!=null&&fe.renderers&&Q.SetJSRenderers({renderers:{Md2HTML:fe.renderers}}),Q.SetHeadingID(!0),Q.Md2HTML(se)})},j=function(se,fe,J){return De(void 0,void 0,void 0,function(){var Q,Ie,de,W;return nt(this,function(Z){switch(Z.label){case 0:return Q=ut(J),[4,je(fe,Q)];case 1:if(Ie=Z.sent(),Q.transform&&(Ie=Q.transform(Ie)),se.innerHTML=Ie,se.classList.add("vditor-reset"),Q.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(Q.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return de="vditorI18nScript",W=de+Q.lang,document.querySelectorAll('head script[id^="'.concat(de,'"]')).forEach(function(ge){ge.id!==W&&document.head.removeChild(ge)}),[4,(0,te.G)("".concat(Q.cdn,"/dist/js/i18n/").concat(Q.lang,".js"),W)];case 3:Z.sent(),Z.label=4;case 4:return[3,6];case 5:window.VditorI18n=Q.i18n,Z.label=6;case 6:return Q.icon?[4,(0,te.G)("".concat(Q.cdn,"/dist/js/icons/").concat(Q.icon,".js"),"vditorIconScript")]:[3,8];case 7:Z.sent(),Z.label=8;case 8:return(0,Y.Z)(Q.theme.current,Q.theme.path),Q.anchor===1&&se.classList.add("vditor-reset--anchor"),(0,m.O)(se,Q.hljs),(0,S.s)(Q.hljs,se,Q.cdn),(0,C.H)(se,{cdn:Q.cdn,math:Q.math}),(0,T.i)(se,Q.cdn,Q.mode),(0,M.J)(se,Q.cdn,Q.mode),(0,y.K)(se,Q.cdn),(0,x.P)(se,Q.cdn),(0,w.v)(se,Q.cdn),(0,g.p)(se,Q.cdn,Q.mode),(0,N.P)(se,Q.cdn,Q.mode),(0,q.B)(se,Q.cdn),(0,v.Q)(se,Q.cdn),Q.render.media.enable&&(0,A.Y)(se),Q.speech.enable&&$e(se),Q.anchor!==0&&qe(Q.anchor),Q.after&&Q.after(),Q.lazyLoadImage&&k(se),se.addEventListener("click",function(ge){var ce=(0,ue.lG)(ge.target,"SPAN");if(ce&&(0,ue.fb)(ce,"vditor-toc")){var ve=se.querySelector("#"+ce.getAttribute("data-target-id"));ve&&window.scrollTo(window.scrollX,ve.offsetTop);return}}),[2]}})})},yt=p(190),It=p(580),bt=function(){function se(){}return se.adapterRender=b,se.previewImage=yt.E,se.codeRender=m.O,se.graphvizRender=w.v,se.highlightRender=S.s,se.mathRender=C.H,se.mermaidRender=T.i,se.SMILESRender=M.J,se.markmapRender=y.K,se.flowchartRender=x.P,se.chartRender=g.p,se.abcRender=v.Q,se.mindmapRender=N.P,se.plantumlRender=q.B,se.outlineRender=z.k,se.mediaRender=A.Y,se.speechRender=$e,se.lazyLoadImageRender=k,se.md2html=je,se.preview=j,se.setCodeTheme=It.Y,se.setContentTheme=Y.Z,se}();const Mt=bt},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 A=new SmiDrawer({},{});C.forEach(function(T){var M=g.SMILESRenderAdapter.getCode(T).trim();if(!(T.getAttribute("data-processed")==="true"||M.trim()==="")){var y="smiles"+(0,m.Wb)();T.innerHTML='<svg id="'.concat(y,'"></svg>'),A.draw(M,"#"+y,k==="dark"?"dark":void 0),T.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:()=>A});var v={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-math")}},b={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-smiles")}},g={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-mermaid")}},m={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-markmap")}},x={getCode:function(T){return T.getAttribute("data-code")},getElements:function(T){return T.querySelectorAll(".language-mindmap")}},w={getCode:function(T){return T.innerText},getElements:function(T){return T.querySelectorAll(".language-echarts")}},S={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-abc")}},k={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-graphviz")}},C={getCode:function(T){return T.textContent},getElements:function(T){return T.querySelectorAll(".language-flowchart")}},A={getCode:function(T){return T.textContent},getElements:function(T){return T.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,A,T){function M(y){return y instanceof A?y:new A(function(N){N(y)})}return new(A||(A=Promise))(function(y,N){function z(Y){try{P(T.next(Y))}catch(te){N(te)}}function q(Y){try{P(T.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,q)}P((T=T.apply(k,C||[])).next())})},w=function(k,C){var A={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},T,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 q([P,Y])}}function q(P){if(T)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(A=0)),A;)try{if(T=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 A.label++,{value:P[1],done:!1};case 5:A.label++,M=P[1],P=[0];continue;case 7:P=A.ops.pop(),A.trys.pop();continue;default:if(y=A.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){A=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){A.label=P[1];break}if(P[0]===6&&A.label<y[1]){A.label=y[1],y=P;break}if(y&&A.label<y[2]){A.label=y[2],A.ops.push(P);break}y[2]&&A.ops.pop(),A.trys.pop();continue}P=C.call(k,A)}catch(Y){P=[6,Y],M=0}finally{T=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,A){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.chartRenderAdapter.getElements(k);T.length>0&&(0,b.G)("".concat(C,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){T.forEach(function(M){return x(void 0,void 0,void 0,function(){var y,N,z;return w(this,function(q){switch(q.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];q.label=1;case 1:return q.trys.push([1,3,,4]),M.getAttribute("data-processed")==="true"?[2]:[4,(0,m.Qf)(y)];case 2:return N=q.sent(),echarts.init(M,A==="dark"?"dark":void 0).setOption(N),M.setAttribute("data-processed","true"),[3,4];case 3:return z=q.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,A=w.innerText;if(w.classList.contains("highlight-chroma")){var T=w.cloneNode(!0);T.querySelectorAll(".highlight-ln").forEach(function(z){z.remove()}),A=T.innerText}else A.endsWith(`
`)&&(A=A.substr(0,A.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)(A),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 A=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),T=window.URL||window.webkitURL,M=T.createObjectURL(A),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"),A="".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css");if(C&&C.getAttribute("href")!==A&&C.remove(),(0,g.c)("".concat(S,"/dist/js/highlight.js/styles/").concat(k,".min.css"),"vditorHljsStyle"),x.enable!==!1){var T=w.querySelectorAll("pre > code");T.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,q=!1;(z==="pre-wrap"||z==="pre-line")&&(q=!0);var P="",Y=M.textContent.split(/\r\n|\r|\n/g);Y.pop(),Y.map(function(te){var ue="";q&&(N.textContent=te||`
`,ue=' style="height:'.concat(N.getBoundingClientRect().height,'px"')),P+="<span".concat(ue,"></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 A=k.transform(C),T=Object.keys(A.features).filter(function(q){return!m[q]});T.forEach(function(q){m[q]=!0});var M=k.getAssets(T),y=M.styles,N=M.scripts,z=window.markmap;return y&&z.loadCSS(y),N&&z.loadJS(N),A},w=function(k,C){var A=window.markmap,T=A.Transformer,M=A.Markmap,y=A.deriveOptions;A.globalCSS;var N=new T;k.innerHTML='<svg style="width:100%"></svg>';var z=k.firstChild,q=M.create(z,null),P=x(N,C),Y=P.root,te=P.frontmatter,ue=te==null?void 0:te.markmap,Le=y(ue);q.setData(Y,Le),q.fit()},S=function(k,C){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var A=g.markmapRenderAdapter.getElements(k);A.length!==0&&(0,b.G)("".concat(C,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then(function(){A.forEach(function(T){var M=g.markmapRenderAdapter.getCode(T);if(!(T.getAttribute("data-processed")==="true"||M.trim()==="")){var y=document.createElement("div");y.className="language-markmap",T.parentNode.appendChild(y),w(y,M),T.parentNode.childNodes[0].nodeName=="CODE"&&T.parentNode.removeChild(T.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 A={cdn:v.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(k&&k.math&&(k.math=Object.assign({},A.math,k.math)),k=Object.assign({},A,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 q=z.currentTarget.closest(".language-math");z.clipboardData.setData("text/html",q.innerHTML),z.clipboardData.setData("text/plain",q.getAttribute("data-math"))})}})})});else if(k.math.engine==="MathJax"){var T=function(y){if(y.length!==0){var N=0,z=y[y.length-1],q=function(){var P=y[N++];P===z?P():P(q)};q()}};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(),q=window.MathJax.getMetricsFor(y);q.display=y.tagName==="DIV",window.MathJax.tex2svgPromise(z,q).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(q){var P=C[q];!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){q===C.length-1?M(P):M(P,Y)})},z=0;z<C.length;z++)N(z);T(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/),A=S.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),T=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(A&&A[1])w.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='.concat(A[1],'"></iframe>')),w.remove();else if(T&&T[1])w.insertAdjacentHTML("afterend",`<iframe class="iframe__video"
src="//coub.com/embed/`.concat(T[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 q={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,ue){if(te){ue===0&&(te=te.substr(1));var Le=te.split("=");q[Le[0]]=Le[1]}});var P="https://player.bilibili.com/player.html?",Y=Object.keys(q);Y.forEach(function(te,ue){P+="".concat(te,"=").concat(q[te]),ue<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,A,T){function M(y){return y instanceof A?y:new A(function(N){N(y)})}return new(A||(A=Promise))(function(y,N){function z(Y){try{P(T.next(Y))}catch(te){N(te)}}function q(Y){try{P(T.throw(Y))}catch(te){N(te)}}function P(Y){Y.done?y(Y.value):M(Y.value).then(z,q)}P((T=T.apply(k,C||[])).next())})},w=function(k,C){var A={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},T,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 q([P,Y])}}function q(P){if(T)throw new TypeError("Generator is already executing.");for(;N&&(N=0,P[0]&&(A=0)),A;)try{if(T=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 A.label++,{value:P[1],done:!1};case 5:A.label++,M=P[1],P=[0];continue;case 7:P=A.ops.pop(),A.trys.pop();continue;default:if(y=A.trys,!(y=y.length>0&&y[y.length-1])&&(P[0]===6||P[0]===2)){A=0;continue}if(P[0]===3&&(!y||P[1]>y[0]&&P[1]<y[3])){A.label=P[1];break}if(P[0]===6&&A.label<y[1]){A.label=y[1],y=P;break}if(y&&A.label<y[2]){A.label=y[2],A.ops.push(P);break}y[2]&&A.ops.pop(),A.trys.pop();continue}P=C.call(k,A)}catch(Y){P=[6,Y],M=0}finally{T=y=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},S=function(k,C,A){k===void 0&&(k=document),C===void 0&&(C=v.g.CDN);var T=g.mermaidRenderAdapter.getElements(k);T.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}};A==="dark"&&(M.theme="dark"),mermaid.initialize(M),T.forEach(function(y){return x(void 0,void 0,void 0,function(){var N,z,q,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 q=te.sent(),y.innerHTML=q.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 A=g.mindmapRenderAdapter.getCode(C);if(A)try{if(C.getAttribute("data-processed")==="true")return;echarts.init(C,S==="dark"?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(A))],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(T,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(T){C.className="vditor-reset--error",C.innerHTML="mindmap render error: <br>".concat(T)}}})})}},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 A=Lute.New();A.SetToC(!0),C.innerHTML=A.HTML2VditorDOM("<p>[ToC]</p>"+S)}var T=C.firstElementChild.querySelectorAll("li > span[data-target-id]");return T.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,T.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(A){k.className="vditor-reset--error",k.innerHTML="plantuml render error: <br>".concat(A)}}})})}},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 &nbsp;`).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 A=parseInt(C.getAttribute("data-deg"),10)+90;A/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(A,"deg)"):S.style.transform="".concat(k," rotateZ(").concat(A,"deg)"),C.setAttribute("data-deg",A.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(A,T){for(var M=k(A,T),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=k(M.parentElement,T),y?M=y:N=!0;return M||!1},g=function(A,T){for(var M=(0,v.S)(A,T),y=!1,N=!1;M&&!M.classList.contains("vditor-reset")&&!N;)y=(0,v.S)(M.parentElement,T),y?M=y:N=!0;return M||!1},m=function(A){var T=g(A,"UL"),M=g(A,"OL"),y=T;return M&&(!T||T&&M.contains(T))&&(y=M),y},x=function(A,T,M){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);for(var y=A,N=!1;y&&!N&&!y.classList.contains("vditor-reset");)y.getAttribute(T)===M?N=!0:y=y.parentElement;return N&&y},w=function(A){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);var T=A,M=!1,y=x(A,"data-block","0");if(y)return y;for(;T&&!M&&!T.classList.contains("vditor-reset");)T.tagName==="H1"||T.tagName==="H2"||T.tagName==="H3"||T.tagName==="H4"||T.tagName==="H5"||T.tagName==="H6"||T.tagName==="P"||T.tagName==="BLOCKQUOTE"||T.tagName==="OL"||T.tagName==="UL"?M=!0:T=T.parentElement;return M&&T},S=function(A,T){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);for(var M=A,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.nodeName===T?y=!0:M=M.parentElement;return y&&M},k=function(A,T){if(!A)return!1;A.nodeType===3&&(A=A.parentElement);for(var M=A,y=!1;M&&!y&&!M.classList.contains("vditor-reset");)M.classList.contains(T)?y=!0:M=M.parentElement;return y&&M},C=function(A){for(;A&&A.lastChild;)A=A.lastChild;return A}},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:()=>A,oC:()=>T});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 q=y.startContainer.parentElement;if(q&&q.getClientRects().length>0)z=q.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 q=N.cloneRange();M.childNodes[0]&&M.childNodes[0].childNodes[0]?q.setStart(M.childNodes[0].childNodes[0],0):q.selectNodeContents(M),q.setEnd(N.startContainer,N.startOffset),z.start=q.toString().length,z.end=z.start+N.toString().length}return z},C=function(M,y,N){var z=0,q=0,P=N.childNodes[q],Y=!1,te=!1;M=Math.max(0,M),y=Math.max(0,y);var ue=N.ownerDocument.createRange();for(ue.setStart(P||N,0),ue.collapse(!0);!te&&P;){var Le=z+P.textContent.length;if(!Y&&M>=z&&M<=Le&&(M===0?ue.setStart(P,0):P.childNodes[0].nodeType===3?ue.setStart(P.childNodes[0],M-z):P.nextSibling?ue.setStartBefore(P.nextSibling):ue.setStartAfter(P),Y=!0,M===y)){te=!0;break}Y&&y>=z&&y<=Le&&(y===0?ue.setEnd(P,0):P.childNodes[0].nodeType===3?ue.setEnd(P.childNodes[0],y-z):P.nextSibling?ue.setEndBefore(P.nextSibling):ue.setEndAfter(P),te=!0),z=Le,P=N.childNodes[++q]}return!te&&N.childNodes[q-1]&&ue.setStartBefore(N.childNodes[q-1]),S(ue),ue},A=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)}},T=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 q=document.createElement("div");q.innerHTML=M;var P=m(y);if(P.toString()!==""&&(y[y.currentMode].preventInput=!0,document.execCommand("delete",!1,"")),q.firstElementChild&&q.firstElementChild.getAttribute("data-block")==="0"){q.lastElementChild.insertAdjacentHTML("beforeend","<wbr>");var Y=(0,g.F9)(P.startContainer);if(!Y)y[y.currentMode].element.insertAdjacentHTML("beforeend",q.innerHTML);else{var te=(0,g.lG)(P.startContainer,"LI");te&&q.firstElementChild.tagName==="UL"?te.insertAdjacentHTML("afterend",q.firstElementChild.innerHTML):Y.insertAdjacentHTML("afterend",q.innerHTML)}A(y[y.currentMode].element,P)}else{var ue=document.createElement("template");ue.innerHTML=M,P.insertNode(ue.content.cloneNode(!0)),P.collapse(!1),S(P)}}}},r={};function a(h){var c=r[h];if(c!==void 0)return c.exports;var p=r[h]={exports:{}};return n[h](p,p.exports,a),p.exports}a.d=(h,c)=>{for(var p in c)a.o(c,p)&&!a.o(h,p)&&Object.defineProperty(h,p,{enumerable:!0,get:c[p]})},a.o=(h,c)=>Object.prototype.hasOwnProperty.call(h,c),a.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var l={};return(()=>{a.d(l,{default:()=>Wd});var h=a(408),c=a(145),p=a(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=a(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(o){var s=this;o.devtools.element.style.display==="block"&&(0,b.G)("".concat(o.options.cdn,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then(function(){s.ASTChart||(s.ASTChart=echarts.init(o.devtools.element.lastElementChild));try{s.element.lastElementChild.style.display="block",s.element.firstElementChild.innerHTML="",s.ASTChart.setOption({series:[{data:JSON.parse(o.lute.RenderEChartsJSON(v(o))),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=a(410),x=function(i,o){o.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,o){o.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,o){o.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,o){o.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,o){o.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="none")})},A=function(i,o){o.forEach(function(s){i[s]&&i[s]&&(i[s].style.display="block")})},T=function(i,o,s){o.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")),o.includes("hint")&&(i.hint.element.style.display="none"),i.wysiwyg.popover&&o.includes("popover")&&(i.wysiwyg.popover.style.display="none")},M=function(i,o,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")}),o.style.display==="block"?o.style.display="none":(T(i,["subToolbar","hint","popover"],s.parentElement.parentElement),s.classList.contains("vditor-tooltipped")||s.classList.add("vditor-hint--current"),o.style.display="block",i.toolbar.element.getBoundingClientRect().right-s.getBoundingClientRect().right<250?o.classList.add("vditor-panel--left"):o.classList.remove("vditor-panel--left")))})},y=a(106),N=a(771),z=function(i,o,s,u){},q=a(135),P=a(775),Y=a(428),te=a(325),ue=a(483),Le=a(999),qe=a(472),Xe=a(637),it=a(11),$e=a(194),De=a(229),nt=a(825),ut=function(i,o,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=o||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,"&amp;").replace(/</g,"&lt;"),"<wbr></code></pre></div>"):"\n```\n"+E.replace(/&/g,"&amp;").replace(/</g,"&lt;")+"\n```":s==="wysiwyg"?"<code>".concat(E.replace(/&/g,"&amp;").replace(/</g,"&lt;"),"</code><wbr>"):"`".concat(E,"`")}return!1},je=function(i,o){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,q.Q)(i,o.options.cdn);else if(s==="mermaid")(0,Xe.i)(i,o.options.cdn,o.options.theme);else if(s==="smiles")(0,nt.J)(i,o.options.cdn,o.options.theme);else if(s==="markmap")(0,it.K)(i,o.options.cdn);else if(s==="flowchart")(0,te.P)(i,o.options.cdn);else if(s==="echarts")(0,P.p)(i,o.options.cdn,o.options.theme);else if(s==="mindmap")(0,$e.P)(i,o.options.cdn,o.options.theme);else if(s==="plantuml")(0,De.B)(i,o.options.cdn);else if(s==="graphviz")(0,ue.v)(i,o.options.cdn);else if(s==="math")(0,qe.H)(i,{cdn:o.options.cdn,math:o.options.preview.math});else{var u=o.options.customRenders.find(function(d){if(d.language===s)return d.render(i,o),!0});u||((0,Le.s)(Object.assign({},o.options.preview.hljs),i,o.options.cdn),(0,Y.O)(i,o.options.preview.hljs))}i.setAttribute("data-render","1")}},j=a(810),yt=function(i){if(i.currentMode!=="sv"){var o=i[i.currentMode].element,s=i.outline.render(i);s===""&&(s="[ToC]"),o.querySelectorAll('[data-type="toc-block"]').forEach(function(u){u.innerHTML=s,(0,qe.H)(u,{cdn:i.options.cdn,math:i.options.preview.math})})}},It=function(i,o){var s=(0,y.lG)(i.target,"SPAN");if(s&&(0,y.fb)(s,"vditor-toc")){var u=o[o.currentMode].element.querySelector("#"+s.getAttribute("data-target-id"));if(u)if(o.options.height==="auto"){var d=u.offsetTop+o.element.offsetTop;o.options.toolbarConfig.pin||(d+=o.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,d)}else o.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,o.element.offsetTop),o[o.currentMode].element.scrollTop=u.offsetTop;return}},bt=function(i,o,s,u){if(i.previousElementSibling&&i.previousElementSibling.classList.contains("vditor-toc")){if(s.key==="Backspace"&&(0,j.im)(i,o[o.currentMode].element,u).start===0)return i.previousElementSibling.remove(),ct(o),!0;if(Yr(o,s,u,i,i.previousElementSibling))return!0}if(i.nextElementSibling&&i.nextElementSibling.classList.contains("vditor-toc")){if(s.key==="Delete"&&(0,j.im)(i,o[o.currentMode].element,u).start>=i.textContent.trimRight().length)return i.nextElementSibling.remove(),ct(o),!0;if(Di(o,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(),ct(o),!0}},Mt=function(i,o,s,u){s===void 0&&(s=!1);var d=(0,y.F9)(o.startContainer);if(d&&!s&&d.getAttribute("data-type")!=="code-block"){if(_o(d.innerHTML)&&d.previousElementSibling||No(d.innerHTML))return;for(var f=(0,j.im)(d,i.ir.element,o).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)(o.startContainer,"vditor-ir__marker");if(!_){var F=o.startContainer.previousSibling;F&&F.nodeType!==3&&F.classList.contains("vditor-ir__node--expand")&&F.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(ot){ot.classList.remove("vditor-ir__node--expand")}),d||(d=i.ir.element),!d.querySelector("wbr")){var X=(0,y.fb)(o.startContainer,"vditor-ir__preview");X?X.previousElementSibling.insertAdjacentHTML("beforeend","<wbr>"):o.insertNode(document.createElement("wbr"))}d.querySelectorAll("[style]").forEach(function(ot){ot.removeAttribute("style")}),d.getAttribute("data-type")==="link-ref-defs-block"&&(d=i.ir.element);var be=d.isEqualNode(i.ir.element),xe=(0,y.a1)(d,"data-type","footnotes-block"),pe="";if(be)pe=d.innerHTML;else{var Se=(0,N.S)(o.startContainer,"BLOCKQUOTE"),ke=(0,y.O9)(o.startContainer);if(ke&&(d=ke),Se&&(!ke||ke&&!Se.contains(ke))&&(d=Se),xe&&(d=xe),pe=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var me=d.previousElementSibling,Pe=d.nextElementSibling;me&&(me.tagName==="UL"||me.tagName==="OL")&&(pe=me.outerHTML+pe,me.remove()),Pe&&(Pe.tagName==="UL"||Pe.tagName==="OL")&&(pe=pe+Pe.outerHTML,Pe.remove()),pe=pe.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"&&(pe=d.previousElementSibling.outerHTML+pe,d.previousElementSibling.remove());d.innerText.startsWith("```")||(i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(ot){ot&&!d.isEqualNode(ot)&&(pe+=ot.outerHTML,ot.remove())}),i.ir.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(ot){ot&&!d.isEqualNode(ot)&&(pe+=ot.outerHTML,ot.remove())}))}if(z("SpinVditorIRDOM",pe,"argument",i.options.debugger),pe=i.lute.SpinVditorIRDOM(pe),z("SpinVditorIRDOM",pe,"result",i.options.debugger),be)d.innerHTML=pe;else if(d.outerHTML=pe,xe){var Ce=(0,y.a1)(i.ir.element.querySelector("wbr"),"data-type","footnotes-def");if(Ce){var Ve=Ce.textContent,Et=Ve.substring(1,Ve.indexOf("]:")),wt=i.ir.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(Et,'"]'));wt&&wt.setAttribute("aria-label",Ve.substr(Et.length+3).trim().substr(0,24))}}var Ct,vn=i.ir.element.querySelectorAll("[data-type='link-ref-defs-block']");vn.forEach(function(ot,Ut){Ut===0?Ct=ot:(Ct.insertAdjacentHTML("beforeend",ot.innerHTML),ot.remove())}),vn.length>0&&i.ir.element.insertAdjacentElement("beforeend",vn[0]);var Yt,bn=i.ir.element.querySelectorAll("[data-type='footnotes-block']");bn.forEach(function(ot,Ut){Ut===0?Yt=ot:(Yt.insertAdjacentHTML("beforeend",ot.innerHTML),ot.remove())}),bn.length>0&&i.ir.element.insertAdjacentElement("beforeend",bn[0]),(0,j.ib)(i.ir.element,o),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(ot){je(ot,i)}),yt(i),lr(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},se=function(i,o){if(i==="")return!1;if(i.indexOf("⇧")===-1&&i.indexOf("⌘")===-1&&i.indexOf("⌥")===-1)return!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&o.code===i;if(i==="⇧Tab")return!!(!(0,m.yl)(o)&&!o.altKey&&o.shiftKey&&o.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)(o):!(0,m.yl)(o))&&o.altKey&&!o.shiftKey&&o.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)(o)&&o.key.toLowerCase()===f.toLowerCase()&&!o.altKey&&(!d&&!o.shiftKey||d&&o.shiftKey))},fe=function(i){var o=i.startContainer;if(o.nodeType===3&&o.nodeValue.length!==i.startOffset)return!1;for(var s=o.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)(o,"vditor-ir__marker");if(u&&!u.nextSibling){var d=o.parentElement.parentElement.nextSibling;if(d&&d.nodeType!==3&&d.classList.contains("vditor-ir__node"))return d}return!1}return!1},J=function(i){var o=i.startContainer,s=o.previousSibling;return o.nodeType===3&&i.startOffset===0&&s&&s.nodeType!==3&&s.classList.contains("vditor-ir__node")&&!s.getAttribute("data-block")?s:!1},Q=function(i,o){o.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=fe(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}}},Ie=function(i,o){if(i.ir.composingLock=o.isComposing,o.isComposing)return!1;o.key.indexOf("Arrow")===-1&&o.key!=="Meta"&&o.key!=="Control"&&o.key!=="Alt"&&o.key!=="Shift"&&o.key!=="CapsLock"&&o.key!=="Escape"&&!/^F\d{1,2}$/.test(o.key)&&i.undo.recordFirstPosition(i,o);var s=(0,j.zh)(i),u=s.startContainer;if(!Wi(o,i,u)||(eo(s,i,o),Xs(s),o.key!=="Enter"&&o.key!=="Tab"&&o.key!=="Backspace"&&o.key.indexOf("Arrow")===-1&&!(0,m.yl)(o)&&o.key!=="Escape"&&o.key!=="Delete"))return!1;var d=(0,y.a1)(u,"data-newline","1");if(!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&o.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(Bs(o,i,L,s)||zs(s,i,L,o)||Ws(i,s,o,L))return!0;var D=(0,y.fb)(u,"vditor-ir__marker--pre");if(D&&D.tagName==="PRE"){var _=D.firstChild;if(Vs(i,o,D,s)||(_.getAttribute("data-type")==="math-block"||_.getAttribute("data-type")==="html-block")&&Yr(i,o,s,_,D.parentElement)||Di(i,o,s,_,D.parentElement))return!0}var F=(0,y.a1)(u,"data-type","code-block-info");if(F){if(o.key==="Enter"||o.key==="Tab")return s.selectNodeContents(F.nextElementSibling.firstChild),s.collapse(!0),o.preventDefault(),T(i,["hint"]),!0;if(o.key==="Backspace"){var X=(0,j.im)(F,i.ir.element).start;X===1&&s.setStart(u,0),X===2&&(i.hint.recentLanguage="")}if(Yr(i,o,s,F,F.parentElement))return T(i,["hint"]),!0}var be=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(o.key.indexOf("Arrow")>-1&&be){var xe=Lu(be);if(xe&&Yr(i,o,s,be,xe))return!0;var pe=_u(be);if(pe&&Di(i,o,s,be,pe))return!0}if(Us(i,o,s)||Gs(i,s,o)||Do(i,s,o))return!0;var Se=(0,N.W)(u);if(Se){if(se("⌘=",o)){var ke=Se.querySelector(".vditor-ir__marker--heading");return ke&&ke.textContent.trim().length>1&&Ri(i,ke.textContent.substr(1)),o.preventDefault(),!0}if(se("⌘-",o)){var ke=Se.querySelector(".vditor-ir__marker--heading");return ke&&ke.textContent.trim().length<6&&Ri(i,ke.textContent.trim()+"# "),o.preventDefault(),!0}}var me=(0,y.F9)(u);if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&s.toString()===""){if(Ks(i,s,o,L))return!0;if(me&&me.previousElementSibling&&me.tagName!=="UL"&&me.tagName!=="OL"&&(me.previousElementSibling.getAttribute("data-type")==="code-block"||me.previousElementSibling.getAttribute("data-type")==="math-block")){var Pe=(0,j.im)(me,i.ir.element,s).start;if(Pe===0||Pe===1&&me.innerText.startsWith(c.g.ZWSP))return s.selectNodeContents(me.previousElementSibling.querySelector(".vditor-ir__marker--pre code")),s.collapse(!1),Q(s,i),me.textContent.trim().replace(c.g.ZWSP,"")===""&&(me.remove(),lr(i)),o.preventDefault(),!0}if(Se){var Ce=Se.firstElementChild.textContent.length;(0,j.im)(Se,i.ir.element).start===Ce&&Ce!==0&&(s.setStart(Se.firstElementChild.firstChild,Ce-1),s.collapse(!0),(0,j.Hc)(s))}}return(o.key==="ArrowUp"||o.key==="ArrowDown")&&me&&(me.querySelectorAll(".vditor-ir__node").forEach(function(Ve){Ve.contains(u)||Ve.classList.add("vditor-ir__node--hidden")}),Zs(o,me,s))?!0:(to(s,o.key),me&&bt(me,i,o,s)?(o.preventDefault(),!0):!1)},de=a(190),W=function(i,o){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()}o&&o(u)})},Z=function(i,o){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&&o&&(o.inputType==="deleteContentBackward"||o.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){ne(i);return}if(o.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 F=B(d,"code-block-open-marker");if(F){F.textContent=_.textContent,ne(i);return}}if(_.getAttribute("data-type")==="code-block-open-marker"){var F=B(d,"code-block-close-marker",!1);if(F){F.textContent=_.textContent,ne(i);return}}}var X=(0,y.a1)(d,"data-type","math-block-open-marker");if(X){var be=X.nextElementSibling.nextElementSibling;be&&be.getAttribute("data-type")==="math-block-close-marker"&&(be.remove(),ne(i));return}f.querySelectorAll('[data-type="code-block-open-marker"]').forEach(function(me){me.textContent.length===1&&me.remove()}),f.querySelectorAll('[data-type="code-block-close-marker"]').forEach(function(me){me.textContent.length===1&&me.remove()});var xe=(0,y.a1)(d,"data-type","heading-marker");if(xe&&xe.textContent.indexOf("#")===-1){ne(i);return}}if((o.data===" "||o.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"))){ne(i);return}}if(f&&f.textContent.trimRight()==="$$"){ne(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(me){me.removeAttribute("style")}),f.querySelectorAll("font").forEach(function(me){me.outerHTML=me.innerHTML});var pe=f.textContent,Se=f.isEqualNode(i.sv.element);if(Se)pe=f.textContent;else{f.previousElementSibling&&(pe=f.previousElementSibling.textContent+pe,f.previousElementSibling.remove()),f.previousElementSibling&&pe.indexOf(`---
`)===0&&(pe=f.previousElementSibling.textContent+pe,f.previousElementSibling.remove());var ke="";i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(me,Pe){me&&!f.isEqualNode(me.parentElement)&&(ke+=me.parentElement.textContent+`
`,me.parentElement.remove())}),i.sv.element.querySelectorAll("[data-type='footnotes-link']").forEach(function(me,Pe){me&&!f.isEqualNode(me.parentElement)&&(ke+=me.parentElement.textContent+`
`,me.parentElement.remove())}),pe=ke+pe}pe=V(pe,i),Se?f.innerHTML=pe:f.outerHTML=pe,i.sv.element.querySelectorAll("[data-type='link-ref-defs-block']").forEach(function(me){i.sv.element.insertAdjacentElement("beforeend",me.parentElement)}),W(i.sv.element,function(me){i.sv.element.insertAdjacentElement("beforeend",me)}),(0,j.ib)(i.sv.element,u),Bt(i),ne(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},ge=function(i,o){var s,u,d,f,E;if(i.sv.composingLock=o.isComposing,o.isComposing||(o.key.indexOf("Arrow")===-1&&o.key!=="Meta"&&o.key!=="Control"&&o.key!=="Alt"&&o.key!=="Shift"&&o.key!=="CapsLock"&&o.key!=="Escape"&&!/^F\d{1,2}$/.test(o.key)&&i.undo.recordFirstPosition(i,o),o.key!=="Enter"&&o.key!=="Tab"&&o.key!=="Backspace"&&o.key.indexOf("Arrow")===-1&&!(0,m.yl)(o)&&o.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"),F=(0,y.a1)(D,"data-type","blockquote-marker");if(!F&&L.startOffset===0&&_&&_.previousElementSibling&&_.previousElementSibling.getAttribute("data-type")==="blockquote-marker"&&(F=_.previousElementSibling),F&&o.key==="Enter"&&!(0,m.yl)(o)&&!o.altKey&&F.nextElementSibling.textContent.trim()===""&&(0,j.im)(F,i.sv.element,L).start===F.textContent.length)return((s=F.previousElementSibling)===null||s===void 0?void 0:s.getAttribute("data-type"))==="padding"&&F.previousElementSibling.setAttribute("data-action","enter-remove"),F.remove(),ne(i),o.preventDefault(),!0;var X=(0,y.a1)(D,"data-type","li-marker"),be=(0,y.a1)(D,"data-type","task-marker"),xe=X;if(xe||be&&be.nextElementSibling.getAttribute("data-type")!=="task-marker"&&(xe=be),!xe&&L.startOffset===0&&_&&_.previousElementSibling&&(_.previousElementSibling.getAttribute("data-type")==="li-marker"||_.previousElementSibling.getAttribute("data-type")==="task-marker")&&(xe=_.previousElementSibling),xe){var pe=(0,j.im)(xe,i.sv.element,L).start,Se=xe.getAttribute("data-type")==="task-marker",ke=xe;if(Se&&(ke=xe.previousElementSibling.previousElementSibling.previousElementSibling),pe===xe.textContent.length){if(o.key==="Enter"&&!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&xe.nextElementSibling.textContent.trim()==="")return((u=ke.previousElementSibling)===null||u===void 0?void 0:u.getAttribute("data-type"))==="padding"?(ke.previousElementSibling.remove(),Z(i)):(Se&&(ke.remove(),xe.previousElementSibling.previousElementSibling.remove(),xe.previousElementSibling.remove()),xe.nextElementSibling.remove(),xe.remove(),ne(i)),o.preventDefault(),!0;if(o.key==="Tab")return o.shiftKey?ke.previousElementSibling.getAttribute("data-type")==="padding"&&ke.previousElementSibling.remove():ke.insertAdjacentHTML("beforebegin",'<span data-type="padding">'.concat(ke.textContent.replace(/\S/g," "),"</span>")),/^\d/.test(ke.textContent)&&(ke.textContent=ke.textContent.replace(/^\d{1,}/,"1"),L.selectNodeContents(xe.firstChild),L.collapse(!1)),Z(i),o.preventDefault(),!0}}if(Do(i,L,o))return!0;var me=(0,y.a1)(D,"data-block","0"),Pe=(0,N.S)(D,"SPAN");if(o.key==="Enter"&&!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey&&me){var Ce=!1,Ve=me.textContent.match(/^\n+/);(0,j.im)(me,i.sv.element).start<=(Ve?Ve[0].length:0)&&(Ce=!0);var Et=`
`;if(Pe){if(((d=Pe.previousElementSibling)===null||d===void 0?void 0:d.getAttribute("data-action"))==="enter-remove")return Pe.previousElementSibling.remove(),ne(i),o.preventDefault(),!0;Et+=ee(Pe)}return L.insertNode(document.createTextNode(Et)),L.collapse(!1),me&&me.textContent.trim()!==""&&!Ce?Z(i):ne(i),o.preventDefault(),!0}if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.altKey&&!o.shiftKey){if(Pe&&((f=Pe.previousElementSibling)===null||f===void 0?void 0:f.getAttribute("data-type"))==="newline"&&(0,j.im)(Pe,i.sv.element,L).start===1&&Pe.getAttribute("data-type").indexOf("code-block-")===-1)return L.setStart(Pe,0),L.extractContents(),Pe.textContent.trim()!==""?Z(i):ne(i),o.preventDefault(),!0;if(me&&(0,j.im)(me,i.sv.element,L).start===0&&me.previousElementSibling){L.extractContents();var wt=me.previousElementSibling.lastElementChild;return wt.getAttribute("data-type")==="newline"&&(wt.remove(),wt=me.previousElementSibling.lastElementChild),wt.getAttribute("data-type")!=="newline"&&(wt.insertAdjacentHTML("afterend",me.innerHTML),me.remove()),me.textContent.trim()!==""&&!(!((E=me.previousElementSibling)===null||E===void 0)&&E.querySelector('[data-type="code-block-open-marker"]'))?Z(i):(wt.getAttribute("data-type")!=="newline"&&(L.selectNodeContents(wt.lastChild),L.collapse(!1)),ne(i)),o.preventDefault(),!0}}return!1},ce=a(538),ve=function(i){i.options.theme==="dark"?i.element.classList.add("vditor--dark"):i.element.classList.remove("vditor--dark")},Ee=function(i){i.element.innerHTML="",i.element.classList.add("vditor"),i.options.rtl&&i.element.setAttribute("dir","rtl"),ve(i),(0,ce.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 o=document.createElement("div");if(o.className="vditor-content",i.options.outline.position==="left"&&o.appendChild(i.outline.element),o.appendChild(i.wysiwyg.element.parentElement),o.appendChild(i.sv.element),o.appendChild(i.ir.element.parentElement),o.appendChild(i.preview.element),i.toolbar.elements.devtools&&o.appendChild(i.devtools.element),i.options.outline.position==="right"&&(i.outline.element.classList.add("vditor-outline--right"),o.appendChild(i.outline.element)),i.upload&&o.appendChild(i.upload.element),i.options.resize.enable&&o.appendChild(i.resize.element),o.appendChild(i.hint.element),o.appendChild(i.tip.element),i.element.appendChild(o),o.addEventListener("click",function(){T(i,["subToolbar"])}),i.toolbar.elements.export&&i.element.insertAdjacentHTML("beforeend",'<iframe id="vditorExportIframe" style="width: 100%;height: 0;border: 0"></iframe>'),Ln(i,i.options.mode,at(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)}},ze=function(i){var o=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(o,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(o,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"},We=function(i){if(i.options.typewriterMode){var o=window.innerHeight;typeof i.options.height=="number"?(o=i.options.height,typeof i.options.minHeight=="number"&&(o=Math.max(o,i.options.minHeight)),o=Math.min(window.innerHeight,o)):o=i.element.clientHeight,i.element.classList.contains("vditor--fullscreen")&&(o=window.innerHeight),i[i.currentMode].element.style.setProperty("--editor-bottom",(o-i.toolbar.element.offsetHeight)/2+"px")}},Ze;function Be(){window.removeEventListener("resize",Ze)}var at=function(i){We(i),Be(),window.addEventListener("resize",Ze=function(){ze(i),We(i)});var o=(0,m.pK)()&&localStorage.getItem(i.options.cache.id);return(!i.options.cache.enable||!o)&&(i.options.value?o=i.options.value:i.originalInnerHTML?o=i.lute.HTML2Md(i.originalInnerHTML):i.options.cache.enable||(o="")),o||""},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 o=(0,j.zh)(i),s=o.startContainer;o.startContainer.nodeType===3&&(s=o.startContainer.parentElement),s.classList.contains("vditor-reset")&&(s=s.childNodes[o.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 F=(0,y.a1)(s,"data-type","code-block");F&&(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 be=(0,y.a1)(s,"data-type","table");be&&k(i.toolbar.elements,["headings","list","ordered-list","check","line","quote","code","table"])}},200)},He=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),o.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"&&o.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),o.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},gt=function(i){for(var o=i.previousSibling;o;){if(o.nodeType!==3&&o.tagName==="A"&&!o.previousSibling&&o.innerHTML.replace(c.g.ZWSP,"")===""&&o.nextSibling)return o;o=o.previousSibling}return!1},kt=function(i){for(var o=i.startContainer.nextSibling;o&&o.textContent==="";)o=o.nextSibling;return!!(o&&o.nodeType!==3&&(o.tagName==="CODE"||o.getAttribute("data-type")==="math-inline"||o.getAttribute("data-type")==="html-entity"||o.getAttribute("data-type")==="html-inline"))},jt=function(i){for(var o="",s=i.nextSibling;s;)s.nodeType===3?o+=s.textContent:o+=s.outerHTML,s=s.nextSibling;return o},$t=function(i){for(var o="",s=i.previousSibling;s;)s.nodeType===3?o=s.textContent+o:o=s.outerHTML+o,s=s.previousSibling;return o},Mn=function(i){for(var o=i;o&&!o.nextSibling;)o=o.parentElement;return o.nextSibling},gn=function(i){var o=$t(i.startContainer),s=jt(i.startContainer),u=i.startContainer.textContent,d=i.startOffset,f="",E="";return(u.substr(0,d)!==""&&u.substr(0,d)!==c.g.ZWSP||o)&&(f="".concat(o).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}},Rn=function(i,o){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=o.startContainer.nodeType===3?o.startOffset:s.textContent.length;return s.parentNode.insertBefore(u,s),s.remove(),o.setStart(u.firstChild,Math.min(u.firstChild.textContent.length,d)),o.collapse(!0),(0,j.Hc)(o),!0}else if(!s.getAttribute("data-block"))return s.tagName==="P"?s.remove():(s.tagName==="DIV"?(o.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>"):(o.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.outerHTML,"</p>")),(0,j.ib)(i.wysiwyg.element,o),o=getSelection().getRangeAt(0)),!0})},ln=function(i,o){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(o,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(o,">"):u.outerHTML="<".concat(o,' data-block="0">').concat(u.innerHTML.trim(),"</").concat(o,">"),(0,j.ib)(i.wysiwyg.element,s),yt(i))},Qn=function(i){var o=getSelection().getRangeAt(0),s=(0,y.F9)(o.startContainer);s||(s=o.startContainer.childNodes[o.startOffset]),s&&(o.insertNode(document.createElement("wbr")),s.outerHTML='<p data-block="0">'.concat(s.innerHTML,"</p>"),(0,j.ib)(i.wysiwyg.element,o)),i.wysiwyg.popover.style.display="none"},Cn=function(i,o,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")&&Bt(o)},xn=function(i,o){if(i.wysiwyg.composingLock=o.isComposing,o.isComposing)return!1;o.key.indexOf("Arrow")===-1&&o.key!=="Meta"&&o.key!=="Control"&&o.key!=="Alt"&&o.key!=="Shift"&&o.key!=="CapsLock"&&o.key!=="Escape"&&!/^F\d{1,2}$/.test(o.key)&&i.undo.recordFirstPosition(i,o);var s=(0,j.zh)(i),u=s.startContainer;if(!Wi(o,i,u)||(eo(s,i,o),Xs(s),o.key!=="Enter"&&o.key!=="Tab"&&o.key!=="Backspace"&&o.key.indexOf("Arrow")===-1&&!(0,m.yl)(o)&&o.key!=="Escape"&&o.key!=="Delete"))return!1;var d=(0,y.F9)(u),f=(0,y.lG)(u,"P");if(Bs(o,i,f,s)||zs(s,i,f,o)||Us(i,o,s))return!0;var E=(0,y.fb)(u,"vditor-wysiwyg__block");if(E){if(o.key==="Escape"&&E.children.length===2)return i.wysiwyg.popover.style.display="none",E.firstElementChild.style.display="none",i.wysiwyg.element.blur(),o.preventDefault(),!0;if(!(0,m.yl)(o)&&!o.shiftKey&&o.altKey&&o.key==="Enter"&&E.getAttribute("data-type")==="code-block"){var L=i.wysiwyg.popover.querySelector(".vditor-input");return L.focus(),L.select(),o.preventDefault(),!0}if(E.getAttribute("data-block")==="0"&&(Vs(i,o,E.firstElementChild,s)||Di(i,o,s,E.firstElementChild,E)||E.getAttribute("data-type")!=="yaml-front-matter"&&Yr(i,o,s,E.firstElementChild,E)))return!0}if(Ws(i,s,o,f))return!0;var D=(0,y.E2)(u,"BLOCKQUOTE");if(D&&!o.shiftKey&&o.altKey&&o.key==="Enter"){(0,m.yl)(o)?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),He(i),Bt(i),o.preventDefault(),!0}var F=(0,N.W)(u);if(F){if(F.tagName==="H6"&&u.textContent.length===s.startOffset&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&o.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),He(i),Bt(i),o.preventDefault(),!0}if(se("⌘=",o)){var be=parseInt(F.tagName.substr(1),10)-1;return be>0&&(ln(i,"h".concat(be)),He(i)),o.preventDefault(),!0}if(se("⌘-",o)){var be=parseInt(F.tagName.substr(1),10)+1;return be<7&&(ln(i,"h".concat(be)),He(i)),o.preventDefault(),!0}o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&F.textContent.length===1&&Qn(i)}if(Gs(i,s,o))return!0;if(o.altKey&&o.key==="Enter"&&!(0,m.yl)(o)&&!o.shiftKey){var xe=(0,y.lG)(u,"A"),pe=(0,y.a1)(u,"data-type","link-ref"),Se=(0,y.a1)(u,"data-type","footnotes-ref");if(xe||pe||Se||F&&F.tagName.length===2){var ke=i.wysiwyg.popover.querySelector("input");ke.focus(),ke.select()}}if(zt(i,o))return!0;if(se("⇧⌘U",o)){var me=i.wysiwyg.popover.querySelector('[data-type="up"]');if(me)return me.click(),o.preventDefault(),!0}if(se("⇧⌘D",o)){var me=i.wysiwyg.popover.querySelector('[data-type="down"]');if(me)return me.click(),o.preventDefault(),!0}if(Do(i,s,o))return!0;if(!(0,m.yl)(o)&&o.shiftKey&&!o.altKey&&o.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),He(i),Bt(i),o.preventDefault(),!0;if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&s.toString()===""){if(Ks(i,s,o,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 Pe=(0,j.im)(d,i.wysiwyg.element,s).start;if(Pe===0&&s.startOffset===0||Pe===1&&d.innerText.startsWith(c.g.ZWSP))return Cn(d.previousElementSibling.lastElementChild,i,!1),d.innerHTML.trim().replace(c.g.ZWSP,"")===""&&(d.remove(),He(i)),o.preventDefault(),!0}var Ce=s.startOffset;if(s.toString()===""&&u.nodeType===3&&u.textContent.charAt(Ce-2)===`
`&&u.textContent.charAt(Ce-1)!==c.g.ZWSP&&["STRONG","STRIKE","S","I","EM","B"].includes(u.parentElement.tagName))return u.textContent=u.textContent.substring(0,Ce-1)+c.g.ZWSP,s.setStart(u,Ce),s.collapse(!0),He(i),o.preventDefault(),!0;u.textContent===c.g.ZWSP&&s.startOffset===1&&!u.previousSibling&&kt(s)&&(u.textContent=""),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='math-inline']").forEach(function(Et){Et.firstElementChild.style.display="inline",Et.lastElementChild.style.display="none"}),d.querySelectorAll("span.vditor-wysiwyg__block[data-type='html-entity']").forEach(function(Et){Et.firstElementChild.style.display="inline",Et.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"&&(o.key==="Backspace"||o.key==="ArrowLeft"))return s.selectNodeContents(u.previousSibling),s.collapse(!1),o.preventDefault(),!0;if(Zs(o,d,s))return o.preventDefault(),!0;if(to(s,o.key),o.key==="ArrowDown"){var Ve=u.nextSibling;Ve&&Ve.nodeType!==3&&Ve.getAttribute("data-type")==="math-inline"&&s.setStartAfter(Ve)}return d&&bt(d,i,o,s)?(o.preventDefault(),!0):!1},zt=function(i,o){if(se("⇧⌘X",o)){var s=i.wysiwyg.popover.querySelector('[data-type="remove"]');return s&&s.click(),o.preventDefault(),!0}},Pn=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 o=getSelection().getRangeAt(0),s=o.startContainer;o.startContainer.nodeType===3?s=o.startContainer.parentElement:s=s.childNodes[o.startOffset>=s.childNodes.length?s.childNodes.length-1:o.startOffset];var u=(0,y.a1)(s,"data-type","footnotes-block");if(u){i.wysiwyg.popover.innerHTML="",Jt(u,i),Qt(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(Re){Re.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(Re){if(L.includes(Re))return E=[Re],!0})}i.wysiwyg.element.querySelectorAll(".vditor-comment").forEach(function(Re){Re.getAttribute("data-cmtids").indexOf(E[0])>-1&&Re.classList.add("vditor-comment--focus")})}var D=(0,y.lG)(s,"A");D&&w(i.toolbar.elements,["link"]);var _=(0,y.lG)(s,"TABLE"),F=(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"])):F?(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="",Jt(X,i),Qt(i,"vditor-toc"),nn(i,X);return}var be=(0,N.S)(s,"BLOCKQUOTE");if(be&&(i.wysiwyg.popover.innerHTML="",er(o,be,i),or(o,be,i),Jt(be,i),Qt(i,"blockquote"),nn(i,be)),d&&(i.wysiwyg.popover.innerHTML="",er(o,d,i),or(o,d,i),Jt(d,i),Qt(i,"li"),nn(i,d)),_){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var xe=function(){var Re=_.rows.length,dt=_.rows[0].cells.length,vr=parseInt(Ut.value,10)||Re,br=parseInt(kn.value,10)||dt;if(!(vr===Re&&dt===br)){if(dt!==br)for(var Ii=br-dt,Xn=0;Xn<_.rows.length;Xn++)if(Ii>0)for(var ol=0;ol<Ii;ol++)Xn===0?_.rows[Xn].lastElementChild.insertAdjacentHTML("afterend","<th> </th>"):_.rows[Xn].lastElementChild.insertAdjacentHTML("afterend","<td> </td>");else for(var Ho=dt-1;Ho>=br;Ho--)_.rows[Xn].cells[Ho].remove();if(Re!==vr){var sl=vr-Re;if(sl>0){for(var Po="<tr>",ei=0;ei<br;ei++)Po+="<td> </td>";for(var ll=0;ll<sl;ll++)_.querySelector("tbody")?_.querySelector("tbody").insertAdjacentHTML("beforeend",Po):_.querySelector("thead").insertAdjacentHTML("afterend",Po+"</tr>")}else for(var ei=Re-1;ei>=vr;ei--)_.rows[ei].remove(),_.rows.length===1&&_.querySelector("tbody").remove()}typeof i.options.input=="function"&&i.options.input(v(i))}},pe=function(Re){va(_,Re),Re==="right"?(Pe.classList.remove("vditor-icon--current"),Ce.classList.remove("vditor-icon--current"),Ve.classList.add("vditor-icon--current")):Re==="center"?(Pe.classList.remove("vditor-icon--current"),Ve.classList.remove("vditor-icon--current"),Ce.classList.add("vditor-icon--current")):(Ce.classList.remove("vditor-icon--current"),Ve.classList.remove("vditor-icon--current"),Pe.classList.add("vditor-icon--current")),(0,j.Hc)(o),He(i)},Se=(0,y.lG)(s,"TD"),ke=(0,y.lG)(s,"TH"),me="left";Se?me=Se.getAttribute("align")||"left":ke&&(me=ke.getAttribute("align")||"center");var Pe=document.createElement("button");Pe.setAttribute("type","button"),Pe.setAttribute("aria-label",window.VditorI18n.alignLeft+"<"+(0,m.ns)("⇧⌘L")+">"),Pe.setAttribute("data-type","left"),Pe.innerHTML='<svg><use xlink:href="#vditor-icon-align-left"></use></svg>',Pe.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(me==="left"?" vditor-icon--current":""),Pe.onclick=function(){pe("left")};var Ce=document.createElement("button");Ce.setAttribute("type","button"),Ce.setAttribute("aria-label",window.VditorI18n.alignCenter+"<"+(0,m.ns)("⇧⌘C")+">"),Ce.setAttribute("data-type","center"),Ce.innerHTML='<svg><use xlink:href="#vditor-icon-align-center"></use></svg>',Ce.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(me==="center"?" vditor-icon--current":""),Ce.onclick=function(){pe("center")};var Ve=document.createElement("button");Ve.setAttribute("type","button"),Ve.setAttribute("aria-label",window.VditorI18n.alignRight+"<"+(0,m.ns)("⇧⌘R")+">"),Ve.setAttribute("data-type","right"),Ve.innerHTML='<svg><use xlink:href="#vditor-icon-align-right"></use></svg>',Ve.className="vditor-icon vditor-tooltipped vditor-tooltipped__n"+(me==="right"?" vditor-icon--current":""),Ve.onclick=function(){pe("right")};var Et=document.createElement("button");Et.setAttribute("type","button"),Et.setAttribute("aria-label",window.VditorI18n.insertRowBelow+"<"+(0,m.ns)("⌘=")+">"),Et.setAttribute("data-type","insertRow"),Et.innerHTML='<svg><use xlink:href="#vditor-icon-insert-row"></use></svg>',Et.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Et.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&Fs(i,o,dt)};var wt=document.createElement("button");wt.setAttribute("type","button"),wt.setAttribute("aria-label",window.VditorI18n.insertRowAbove+"<"+(0,m.ns)("⇧⌘F")+">"),wt.setAttribute("data-type","insertRow"),wt.innerHTML='<svg><use xlink:href="#vditor-icon-insert-rowb"></use></svg>',wt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",wt.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&qs(i,o,dt)};var Ct=document.createElement("button");Ct.setAttribute("type","button"),Ct.setAttribute("aria-label",window.VditorI18n.insertColumnRight+"<"+(0,m.ns)("⇧⌘=")+">"),Ct.setAttribute("data-type","insertColumn"),Ct.innerHTML='<svg><use xlink:href="#vditor-icon-insert-column"></use></svg>',Ct.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Ct.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&ba(i,_,dt)};var vn=document.createElement("button");vn.setAttribute("type","button"),vn.setAttribute("aria-label",window.VditorI18n.insertColumnLeft+"<"+(0,m.ns)("⇧⌘G")+">"),vn.setAttribute("data-type","insertColumn"),vn.innerHTML='<svg><use xlink:href="#vditor-icon-insert-columnb"></use></svg>',vn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",vn.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&ba(i,_,dt,"beforebegin")};var Yt=document.createElement("button");Yt.setAttribute("type","button"),Yt.setAttribute("aria-label",window.VditorI18n["delete-row"]+"<"+(0,m.ns)("⌘-")+">"),Yt.setAttribute("data-type","deleteRow"),Yt.innerHTML='<svg><use xlink:href="#vditor-icon-delete-row"></use></svg>',Yt.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",Yt.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&js(i,o,dt)};var bn=document.createElement("button");bn.setAttribute("type","button"),bn.setAttribute("aria-label",window.VditorI18n["delete-column"]+"<"+(0,m.ns)("⇧⌘-")+">"),bn.setAttribute("data-type","deleteColumn"),bn.innerHTML='<svg><use xlink:href="#vditor-icon-delete-column"></use></svg>',bn.className="vditor-icon vditor-tooltipped vditor-tooltipped__n",bn.onclick=function(){var Re=getSelection().getRangeAt(0).startContainer,dt=(0,y.lG)(Re,"TD")||(0,y.lG)(Re,"TH");dt&&$s(i,o,_,dt)};var ot=document.createElement("span");ot.setAttribute("aria-label",window.VditorI18n.row),ot.className="vditor-tooltipped vditor-tooltipped__n";var Ut=document.createElement("input");ot.appendChild(Ut),Ut.type="number",Ut.min="1",Ut.className="vditor-input",Ut.style.width="42px",Ut.style.textAlign="center",Ut.setAttribute("placeholder",window.VditorI18n.row),Ut.value=_.rows.length.toString(),Ut.oninput=function(){xe()},Ut.onkeydown=function(Re){if(!Re.isComposing){if(Re.key==="Tab"){kn.focus(),kn.select(),Re.preventDefault();return}zt(i,Re)||an(Re,o)}};var xa=document.createElement("span");xa.setAttribute("aria-label",window.VditorI18n.column),xa.className="vditor-tooltipped vditor-tooltipped__n";var kn=document.createElement("input");xa.appendChild(kn),kn.type="number",kn.min="1",kn.className="vditor-input",kn.style.width="42px",kn.style.textAlign="center",kn.setAttribute("placeholder",window.VditorI18n.column),kn.value=_.rows[0].cells.length.toString(),kn.oninput=function(){xe()},kn.onkeydown=function(Re){if(!Re.isComposing){if(Re.key==="Tab"){Ut.focus(),Ut.select(),Re.preventDefault();return}zt(i,Re)||an(Re,o)}},er(o,_,i),or(o,_,i),Jt(_,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",Pe),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ce),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ve),i.wysiwyg.popover.insertAdjacentElement("beforeend",wt),i.wysiwyg.popover.insertAdjacentElement("beforeend",Et),i.wysiwyg.popover.insertAdjacentElement("beforeend",vn),i.wysiwyg.popover.insertAdjacentElement("beforeend",Ct),i.wysiwyg.popover.insertAdjacentElement("beforeend",Yt),i.wysiwyg.popover.insertAdjacentElement("beforeend",bn),i.wysiwyg.popover.insertAdjacentElement("beforeend",ot),i.wysiwyg.popover.insertAdjacentHTML("beforeend"," x "),i.wysiwyg.popover.insertAdjacentElement("beforeend",xa),Qt(i,"table"),nn(i,_)}var Io=(0,y.a1)(s,"data-type","link-ref");Io&&Gr(i,Io,o);var Jr=(0,y.a1)(s,"data-type","footnotes-ref");if(Jr){i.options.lang,i.options,i.wysiwyg.popover.innerHTML="";var ot=document.createElement("span");ot.setAttribute("aria-label",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),ot.className="vditor-tooltipped vditor-tooltipped__n";var cr=document.createElement("input");ot.appendChild(cr),cr.className="vditor-input",cr.setAttribute("placeholder",window.VditorI18n.footnoteRef+"<"+(0,m.ns)("⌥Enter")+">"),cr.style.width="120px",cr.value=Jr.getAttribute("data-footnotes-label"),cr.oninput=function(){cr.value.trim()!==""&&Jr.setAttribute("data-footnotes-label",cr.value),typeof i.options.input=="function"&&i.options.input(v(i))},cr.onkeydown=function(dt){dt.isComposing||zt(i,dt)||an(dt,o)},Jt(Jr,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",ot),Qt(i,"footnotes-ref"),nn(i,Jr)}var Xt=(0,y.fb)(s,"vditor-wysiwyg__block"),il=Xt?Xt.getAttribute("data-type").indexOf("block")>-1:!1;if(i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(Re){if(!Xt||Xt&&il&&!Xt.contains(Re)){var dt=Re.previousElementSibling;dt.style.display="none"}}),Xt&&il){if(i.wysiwyg.popover.innerHTML="",er(o,Xt,i),or(o,Xt,i),Jt(Xt,i),Xt.getAttribute("data-type")==="code-block"){var ka=document.createElement("span");ka.setAttribute("aria-label",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),ka.className="vditor-tooltipped vditor-tooltipped__n";var qn=document.createElement("input");ka.appendChild(qn);var Oi=Xt.firstElementChild.firstElementChild;qn.className="vditor-input",qn.setAttribute("placeholder",window.VditorI18n.language+"<"+(0,m.ns)("⌥Enter")+">"),qn.value=Oi.className.indexOf("language-")>-1?Oi.className.split("-")[1].split(" ")[0]:"",qn.oninput=function(Re){qn.value.trim()!==""?Oi.className="language-".concat(qn.value):(Oi.className="",i.hint.recentLanguage=""),Xt.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(Xt.lastElementChild.innerHTML=Xt.firstElementChild.innerHTML,je(Xt.lastElementChild,i)),He(i),Re.detail===1&&(o.setStart(Oi.firstChild,0),o.collapse(!0),(0,j.Hc)(o))},qn.onkeydown=function(Re){if(!Re.isComposing&&!zt(i,Re)){if(Re.key==="Escape"&&i.hint.element.style.display==="block"){i.hint.element.style.display="none",Re.preventDefault();return}i.hint.select(Re,i),an(Re,o)}},qn.onkeyup=function(Re){var dt,vr;if(!(Re.isComposing||Re.key==="Enter"||Re.key==="ArrowUp"||Re.key==="Escape"||Re.key==="ArrowDown")){var br=[],Ii=qn.value.substring(0,qn.selectionStart);(i.options.preview.hljs.langs||c.g.ALIAS_CODE_LANGUAGES.concat(((vr=(dt=window.hljs)===null||dt===void 0?void 0:dt.listLanguages())!==null&&vr!==void 0?vr:[]).sort())).forEach(function(Xn){Xn.indexOf(Ii.toLowerCase())>-1&&br.push({html:Xn,value:Xn})}),i.hint.genHTML(br,Ii,i),Re.preventDefault()}},i.wysiwyg.popover.insertAdjacentElement("beforeend",ka),Qt(i,"code-block")}else Qt(i,"block");nn(i,Xt)}else Xt=void 0;if(F){i.wysiwyg.popover.innerHTML="";var ot=document.createElement("span");ot.setAttribute("aria-label","ID<"+(0,m.ns)("⌥Enter")+">"),ot.className="vditor-tooltipped vditor-tooltipped__n";var gr=document.createElement("input");ot.appendChild(gr),gr.className="vditor-input",gr.setAttribute("placeholder","ID<"+(0,m.ns)("⌥Enter")+">"),gr.style.width="120px",gr.value=F.getAttribute("data-id")||"",gr.oninput=function(){F.setAttribute("data-id",gr.value),typeof i.options.input=="function"&&i.options.input(v(i))},gr.onkeydown=function(dt){dt.isComposing||zt(i,dt)||an(dt,o)},er(o,F,i),or(o,F,i),Jt(F,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",ot),Qt(i,"heading"),nn(i,F)}if(D&&Ci(i,D,o),!be&&!d&&!_&&!Xt&&!D&&!Io&&!Jr&&!F&&!X){var Qr=(0,y.a1)(s,"data-block","0");Qr&&Qr.parentElement.isEqualNode(i.wysiwyg.element)?(i.wysiwyg.popover.innerHTML="",er(o,Qr,i),or(o,Qr,i),Jt(Qr,i),Qt(i,"block"),nn(i,Qr)):i.wysiwyg.popover.style.display="none"}i.wysiwyg.element.querySelectorAll('span[data-type="backslash"] > span').forEach(function(Re){Re.style.display="none"});var al=(0,y.a1)(o.startContainer,"data-type","backslash");al&&(al.querySelector("span").style.display="inline")}},200)},nn=function(i,o){var s=o,u=(0,y.lG)(o,"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())},Gr=function(i,o,s){s===void 0&&(s=getSelection().getRangeAt(0)),i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(o.tagName==="IMG"?o.setAttribute("alt",f.value):o.textContent=f.value),L.value.trim()!==""&&o.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=o.getAttribute("alt")||o.textContent,f.oninput=function(){u()},f.onkeydown=function(D){zt(i,D)||an(D,s)||Er(i,o,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=o.getAttribute("data-link-label"),L.oninput=function(){u()},L.onkeydown=function(D){zt(i,D)||an(D,s)||Er(i,o,D,f)},Jt(o,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),Qt(i,"link-ref"),nn(i,o)},er=function(i,o,s){var u=o.previousElementSibling;if(!(!u||!o.parentElement.isEqualNode(s.wysiwyg.element)&&o.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",o),(0,j.ib)(s.wysiwyg.element,i),He(s),Pn(s),Bt(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},or=function(i,o,s){var u=o.nextElementSibling;if(!(!u||!o.parentElement.isEqualNode(s.wysiwyg.element)&&o.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",o),(0,j.ib)(s.wysiwyg.element,i),He(s),Pn(s),Bt(s)},s.wysiwyg.popover.insertAdjacentElement("beforeend",d)}},Jt=function(i,o){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)(o);u.setStartAfter(i),(0,j.Hc)(u),i.remove(),He(o),Pn(o),["H1","H2","H3","H4","H5","H6"].includes(i.tagName)&&yt(o)},o.wysiwyg.popover.insertAdjacentElement("beforeend",s)},Er=function(i,o,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);o.insertAdjacentHTML("afterend",c.g.ZWSP),d.setStartAfter(o.nextSibling),d.collapse(!0),(0,j.Hc)(d),s.preventDefault()}}},Ci=function(i,o,s){i.wysiwyg.popover.innerHTML="";var u=function(){f.value.trim()!==""&&(o.innerHTML=f.value),o.setAttribute("href",L.value),o.setAttribute("title",_.value),He(i)};o.querySelectorAll("[data-marker]").forEach(function(F){F.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=o.innerHTML||"",f.oninput=function(){u()},f.onkeydown=function(F){zt(i,F)||an(F,s)||Er(i,o,F,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=o.getAttribute("href")||"",L.oninput=function(){u()},L.onkeydown=function(F){zt(i,F)||an(F,s)||Er(i,o,F,_)};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=o.getAttribute("title")||"",_.oninput=function(){u()},_.onkeydown=function(F){zt(i,F)||an(F,s)||Er(i,o,F,f)},Jt(o,i),i.wysiwyg.popover.insertAdjacentElement("beforeend",d),i.wysiwyg.popover.insertAdjacentElement("beforeend",E),i.wysiwyg.popover.insertAdjacentElement("beforeend",D),Qt(i,"a"),nn(i,o)},zn=function(i,o){var s=i.target;o.wysiwyg.popover.innerHTML="";var u=function(){s.setAttribute("src",f.value),s.setAttribute("alt",L.value),s.setAttribute("title",_.value),typeof o.options.input=="function"&&o.options.input(v(o))},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(F){zt(o,F)};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(F){zt(o,F)};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(F){zt(o,F)},Jt(s,o),o.wysiwyg.popover.insertAdjacentElement("beforeend",d),o.wysiwyg.popover.insertAdjacentElement("beforeend",E),o.wysiwyg.popover.insertAdjacentElement("beforeend",D),Qt(o,"image"),nn(o,s)},an=function(i,o){if(!(0,m.yl)(i)&&!i.shiftKey&&i.key==="Enter"||i.key==="Escape")return o&&(0,j.Hc)(o),i.preventDefault(),i.stopPropagation(),!0},Qt=function(i,o){i.options.customWysiwygToolbar(o,i.wysiwyg.popover)},pr=function(i){i.currentMode==="wysiwyg"?Pn(i):i.currentMode==="ir"&&Ue(i)},Li=function(i,o,s){s===void 0&&(s={enableAddUndoStack:!0,enableHint:!1,enableInput:!0});var u=i.wysiwyg.element;u.innerHTML=i.lute.Md2VditorDOM(o),u.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(d){je(d,i),d.previousElementSibling.setAttribute("style","display:none")}),He(i,s)},ma=function(i,o,s){for(var u=i.startContainer.parentElement,d=!1,f="",E="",L=gn(i),D=L.beforeHTML,_=L.afterHTML;u&&!d;){var F=u.tagName;if(F==="STRIKE"&&(F="S"),F==="I"&&(F="EM"),F==="B"&&(F="STRONG"),F==="S"||F==="STRONG"||F==="EM"){var X="",be="",xe="";u.parentElement.getAttribute("data-block")!=="0"&&(be=$t(u),xe=jt(u)),(D||be)&&(X="".concat(be,"<").concat(F,">").concat(D,"</").concat(F,">"),D=X),(s==="bold"&&F==="STRONG"||s==="italic"&&F==="EM"||s==="strikeThrough"&&F==="S")&&(X+="".concat(f).concat(c.g.ZWSP,"<wbr>").concat(E),d=!0),(_||xe)&&(_="<".concat(F,">").concat(_,"</").concat(F,">").concat(xe),X+=_),u.parentElement.getAttribute("data-block")!=="0"?(u=u.parentElement,u.innerHTML=X):(u.outerHTML=X,u=u.parentElement),f="<".concat(F,">")+f,E="</".concat(F,">")+E}else d=!0}(0,j.ib)(o.wysiwyg.element,i)},Fr=function(i,o,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=o.getAttribute("data-type");if(o.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,o.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"?(ga(i,f,E),(0,j.ib)(i.wysiwyg.element,f),u=!1,o.classList.remove("vditor-menu--current")):(u=!1,o.classList.remove("vditor-menu--current"),f.toString()===""?ma(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,o.classList.add("vditor-menu--current"),f.insertNode(document.createElement("wbr"));var F=(0,y.lG)(f.startContainer,"LI");F&&_.contains(F)?F.innerHTML='<blockquote data-block="0">'.concat(F.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")ga(i,f,E,!1),(0,j.ib)(i.wysiwyg.element,f),u=!1,x(i.toolbar.elements,["check","list","ordered-list"]),o.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)}o.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(Et){je(Et,i)}),o.classList.add("vditor-menu--disabled")}else if(E==="link"){if(f.toString()===""){var be=document.createElement("a");be.innerText=c.g.ZWSP,f.insertNode(be),f.setStart(be.firstChild,1),f.collapse(!0),Ci(i,be,f);var xe=i.wysiwyg.popover.querySelector("input");xe.value="",xe.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),Ci(i,X,f);var pe=i.wysiwyg.popover.querySelectorAll("input");pe[0].value=X.innerText,pe[1].focus()}u=!1,o.classList.add("vditor-menu--current")}else if(E==="table"){var Se='<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=Se:document.execCommand("insertHTML",!1,Se),f.selectNode(i.wysiwyg.element.querySelector("wbr").previousSibling),i.wysiwyg.element.querySelector("wbr").remove(),(0,j.Hc)(f);else{Se='<table data-block="0"><thead><tr>';var ke=f.toString().split(`
`),me=ke[0].split(",").length>ke[0].split(" ").length?",":" ";ke.forEach(function(Ve,Et){Et===0?(Ve.split(me).forEach(function(wt,Ct){Ct===0?Se+="<th>".concat(wt,"<wbr></th>"):Se+="<th>".concat(wt,"</th>")}),Se+="</tr></thead>"):(Et===1?Se+="<tbody><tr>":Se+="<tr>",Ve.split(me).forEach(function(wt){Se+="<td>".concat(wt,"</td>")}),Se+="</tr>")}),Se+="</tbody></table>",document.execCommand("insertHTML",!1,Se),(0,j.ib)(i.wysiwyg.element,f)}u=!1,o.classList.add("vditor-menu--disabled")}else if(E==="line"){if(_){var Pe=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;_.innerHTML.trim()===""?_.outerHTML=Pe:_.insertAdjacentHTML("afterend",Pe),(0,j.ib)(i.wysiwyg.element,f)}}else if(u=!1,o.classList.add("vditor-menu--current"),E==="strike"&&(E="strikeThrough"),f.toString()===""&&(E==="bold"||E==="italic"||E==="strikeThrough")){var Ce="strong";E==="italic"?Ce="em":E==="strikeThrough"&&(Ce="s");var X=document.createElement(Ce);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&&Pn(i),d&&He(i)}},xt=function(){function i(o,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?" &lt;".concat((0,m.ns)(s.hotkey),"&gt;"):"");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)&&(o.currentMode==="wysiwyg"?Fr(o,d.element.children[0],_):o.currentMode==="ir"?Du(o,d.element.children[0],s.prefix||"",s.suffix||""):_e(o,d.element.children[0],s.prefix||"",s.suffix||""))})}return i}(),mr=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ln=function(i,o,s){var u;if(typeof s!="string"?(T(i,["subToolbar","hint"]),s.preventDefault(),u=v(i)):u=s,!(i.currentMode===o&&typeof s!="string")){if(i.devtools&&i.devtools.renderEchart(i),i.options.preview.mode==="both"&&o==="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"]),o==="ir")C(i.toolbar.elements,["both"]),A(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),lr(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i),i.ir.element.querySelectorAll(".vditor-ir__preview[data-render='2']").forEach(function(f){je(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(o==="wysiwyg")C(i.toolbar.elements,["both"]),A(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",ze(i),Li(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(o==="sv"){A(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=V(u,i);d==="<div data-block='0'></div>"&&(d=""),i.sv.element.innerHTML=d,W(i.sv.element),ne(i,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),ze(i)}i.undo.resetIcon(i),typeof s!="string"&&(i[i.currentMode].element.focus(),pr(i)),yt(i),We(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")}},ui=function(i){mr(o,i);function o(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," &lt;").concat((0,m.ns)("⌥⌘7"),`></button>
<button data-mode="ir">`).concat(window.VditorI18n.instantRendering," &lt;").concat((0,m.ns)("⌥⌘8"),`></button>
<button data-mode="sv">`).concat(window.VditorI18n.splitView," &lt;").concat((0,m.ns)("⌥⌘9"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f,u),d}return o.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){Ln(s,"wysiwyg",E),E.preventDefault(),E.stopPropagation()}),u.children.item(1).addEventListener((0,m.Le)(),function(E){Ln(s,"ir",E),E.preventDefault(),E.stopPropagation()}),u.children.item(2).addEventListener((0,m.Le)(),function(E){Ln(s,"sv",E),E.preventDefault(),E.stopPropagation()})},o}(xt),tr=function(i,o){return(0,j.Gb)(i,o)?getSelection().toString():""},Kr=function(i,o){o.addEventListener("focus",function(){i.options.focus&&i.options.focus(v(i)),T(i,["subToolbar","hint"])})},Ui=function(i,o){o.addEventListener("dblclick",function(s){s.target.tagName==="IMG"&&(i.options.image.preview?i.options.image.preview(s.target):i.options.image.isPreview&&(0,de.E)(s.target,i.options.lang,i.options.theme))})},sr=function(i,o){o.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))})},Xr=function(i,o){o.addEventListener("dragstart",function(s){s.dataTransfer.setData(c.g.DROP_EDITOR,c.g.DROP_EDITOR)}),o.addEventListener("drop",function(s){s.dataTransfer.getData(c.g.DROP_EDITOR)?ct(i):(s.dataTransfer.types.includes("Files")||s.dataTransfer.types.includes("text/html"))&&ya(i,s,{pasteCode:function(u){document.execCommand("insertHTML",!1,u)}})})},di=function(i,o,s){o.addEventListener("copy",function(u){return s(u,i)})},hi=function(i,o,s){o.addEventListener("cut",function(u){s(u,i),i.options.comment.enable&&i.currentMode==="wysiwyg"&&i.wysiwyg.getComments(i),document.execCommand("delete")})},Bt=function(i){if(i.currentMode==="wysiwyg"&&i.options.comment.enable&&i.options.comment.adjustTop(i.wysiwyg.getComments(i,!0)),!!i.options.typewriterMode){var o=i[i.currentMode].element,s=(0,j.Ny)(o).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"))&&(o.scrollTop=s+o.scrollTop-o.clientHeight/2+10)}},_i=function(i,o){o.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"||se("⌘X",s))&&i.wysiwyg.getComments(i),i.currentMode==="sv"){if(ge(i,s))return}else if(i.currentMode==="wysiwyg"){if(xn(i,s))return}else if(i.currentMode==="ir"&&Ie(i,s))return;if(i.options.ctrlEnter&&se("⌘Enter",s)){i.options.ctrlEnter(v(i)),s.preventDefault();return}if(se("⌘Z",s)&&!i.toolbar.elements.undo){i.undo.undo(i),s.preventDefault();return}if(se("⌘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)?Qn(i):ln(i,u),He(i)}else i.currentMode==="sv"?Te(i,"#".repeat(parseInt(s.code.replace("Digit",""),10))+" "):i.currentMode==="ir"&&Ri(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"?Ln(i,"wysiwyg",s):s.code==="Digit8"?Ln(i,"ir",s):s.code==="Digit9"&&Ln(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(se(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(se(d.hotkey,s))return i.toolbar.elements[d.name].children[0].dispatchEvent(new CustomEvent((0,m.Le)())),s.preventDefault(),!0})}})},vt=function(i,o){o.addEventListener("selectstart",function(s){o.onmouseup=function(){setTimeout(function(){var u=tr(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())})}})},he=function(i,o){var s=(0,j.zh)(i);s.extractContents(),s.insertNode(document.createTextNode(Lute.Caret)),s.insertNode(document.createTextNode(o));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,W(i.sv.element),(0,j.ib)(i.sv.element,s),Bt(i)},B=function(i,o,s){s===void 0&&(s=!0);var u=i;for(u.nodeType===3&&(u=u.parentElement);u;){if(u.getAttribute("data-type")===o)return u;s?u=u.previousElementSibling:u=u.nextElementSibling}return!1},V=function(i,o){z("SpinVditorSVDOM",i,"argument",o.options.debugger);var s=o.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",o.options.debugger),i},ee=function(i){var o=i.getAttribute("data-type"),s=i.previousElementSibling,u=o&&o!=="text"&&o!=="table"&&o!=="heading-marker"&&o!=="newline"&&o!=="yaml-front-matter-open-marker"&&o!=="yaml-front-matter-close-marker"&&o!=="code-block-info"&&o!=="code-block-close-marker"&&o!=="code-block-open-marker"?i.textContent:"",d=!1;for(o==="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"&&(o==="code-block-open-marker"||o==="code-block-info"))u=E.replace(/\S/g," ")+u;else if(o==="code-block-close-marker"&&s.nextElementSibling.isSameNode(i)){var L=B(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},ne=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),o.enableHint&&i.hint.render(i),i.preview.render(i);var s=v(i);typeof i.options.input=="function"&&o.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(){o.enableAddUndoStack&&!i.sv.composingLock&&i.undo.addToUndoStack(i)},i.options.undoDelay)},Te=function(i,o){var s=(0,j.zh)(i),u=(0,N.S)(s.startContainer,"SPAN");u&&u.textContent.trim()!==""&&(o=`
`+o),s.collapse(!0),document.execCommand("insertHTML",!1,o)},_e=function(i,o,s,u){var d=(0,j.zh)(i),f=o.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 F=B(L,"newline");F?F.insertAdjacentText("afterend",_):E.insertAdjacentText("afterbegin",_),Z(i);return}(0,j.ib)(i.sv.element,d),ne(i)}},le=function(i){switch(i.currentMode){case"ir":return i.ir.element;case"wysiwyg":return i.wysiwyg.element;case"sv":return i.sv.element}},Ne=function(i,o){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){o.setRequestHeader(s,i.options.upload.headers[s])})},Qe=function(i,o,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(F){try{_(u.next(F))}catch(X){E(X)}}function D(F){try{_(u.throw(F))}catch(X){E(X)}}function _(F){F.done?f(F.value):d(F.value).then(L,D)}_((u=u.apply(i,o||[])).next())})},rt=function(i,o){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(F){return D([_,F])}}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}_=o.call(i,s)}catch(F){_=[6,F],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Ot=function(){function i(){this.isUploading=!1,this.element=document.createElement("div"),this.element.className="vditor-upload"}return i}(),Kt=function(i,o){i.tip.hide();var s=[],u="",d="";i.options.lang,i.options;for(var f=function(_,F){var X=o[F],be=!0;X.name||(u+="<li>".concat(window.VditorI18n.nameEmpty,"</li>"),be=!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>"),be=!1);var xe=X.name.lastIndexOf("."),pe=X.name.substr(xe),Se=i.options.upload.filename(X.name.substr(0,xe))+pe;if(i.options.upload.accept){var ke=i.options.upload.accept.split(",").some(function(me){var Pe=me.trim();if(Pe.indexOf(".")===0){if(pe.toLowerCase()===Pe.toLowerCase())return!0}else if(X.type.split("/")[0]===Pe.split("/")[0])return!0;return!1});ke||(u+="<li>".concat(X.name," ").concat(window.VditorI18n.fileTypeError,"</li>"),be=!1)}be&&(s.push(X),d+="<li>".concat(Se," ").concat(window.VditorI18n.uploading,' <a class="vditorCancelUpload" href="javascript:void(0)">').concat(window.VditorI18n.cancelUpload,"</a></li>"))},E=o.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},cn=function(i,o){var s=le(o);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=o.options.upload.filename(E.substr(0,L))+E.substr(L);d+="<li>".concat(D," ").concat(window.VditorI18n.uploadError,"</li>")}),d+="</ul>"),d?o.tip.show(d):o.tip.hide();var f="";Object.keys(u.data.succMap).forEach(function(E){var L=u.data.succMap[E],D=E.lastIndexOf("."),_=E.substr(D),F=o.options.upload.filename(E.substr(0,D))+_;_=_.toLowerCase(),_.indexOf(".wav")===0||_.indexOf(".mp3")===0||_.indexOf(".ogg")===0?o.currentMode==="wysiwyg"?f+=`<div class="vditor-wysiwyg__block" data-type="html-block"
data-block="0"><pre><code>&lt;audio controls="controls" src="`.concat(L,'"&gt;&lt;/audio&gt;</code></pre><pre class="vditor-wysiwyg__preview" data-render="1"><audio controls="controls" src="').concat(L,`"></audio></pre></div>
`):o.currentMode==="ir"?f+='<audio controls="controls" src="'.concat(L,`"></audio>
`):f+="[".concat(F,"](").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?o.currentMode==="wysiwyg"?f+='<img alt="'.concat(F,'" src="').concat(L,`">
`):f+="![".concat(F,"](").concat(L,`)
`):o.currentMode==="wysiwyg"?f+='<a href="'.concat(L,'">').concat(F,`</a>
`):f+="[".concat(F,"](").concat(L,`)
`)}),(0,j.Hc)(o.upload.range),document.execCommand("insertHTML",!1,f),o.upload.range=getSelection().getRangeAt(0).cloneRange()},wn=function(i,o,s){return Qe(void 0,void 0,void 0,function(){var u,d,pe,f,E,E,L,D,_,F,X,be,xe,pe,Se,ke;return rt(this,function(me){switch(me.label){case 0:for(u=[],d=i.options.upload.multiple===!0?o.length:1,pe=0;pe<d;pe++)f=o[pe],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=me.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=me.sent(),me.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=le(i),i.upload.range=(0,j.zh)(i),D=Kt(i,u),D.length===0)return s&&(s.value=""),[2];for(_=new FormData,F=i.options.upload.extraData,X=0,be=Object.keys(F);X<be.length;X++)xe=be[X],_.append(xe,F[xe]);for(pe=0,Se=D.length;pe<Se;pe++)_.append(i.options.upload.fieldName,D[pe]);return ke=new XMLHttpRequest,i.upload.xhr=ke,ke.open("POST",i.options.upload.url),i.options.upload.token&&ke.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(ke.withCredentials=!0),Ne(i,ke),i.upload.isUploading=!0,L.setAttribute("contenteditable","false"),ke.onreadystatechange=function(){if(ke.readyState===XMLHttpRequest.DONE){if(i.upload.isUploading=!1,L.setAttribute("contenteditable","true"),ke.status>=200&&ke.status<300)if(i.options.upload.success)i.options.upload.success(L,ke.responseText);else{var Pe=ke.responseText;i.options.upload.format&&(Pe=i.options.upload.format(o,ke.responseText)),cn(Pe,i)}else i.options.upload.error?i.options.upload.error(ke.responseText):i.tip.show(ke.responseText);s&&(s.value=""),i.upload.element.style.display="none",i.upload.xhr=void 0}},ke.upload.onprogress=function(Pe){if(Pe.lengthComputable){var Ce=Pe.loaded/Pe.total*100;i.upload.element.style.display="block";var Ve=i.upload.element;Ve.style.width=Ce+"%"}},ke.send(_),[2]}})})},On=function(i,o,s){var u,d=(0,y.F9)(o.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=gt(o.startContainer);f&&f.remove(),i.wysiwyg.element.querySelectorAll("wbr").forEach(function(Ce){Ce.remove()}),o.insertNode(document.createElement("wbr")),d.querySelectorAll("[style]").forEach(function(Ce){Ce.removeAttribute("style")}),d.querySelectorAll(".vditor-comment").forEach(function(Ce){Ce.textContent.trim()===""&&(Ce.classList.remove("vditor-comment","vditor-comment--focus"),Ce.removeAttribute("data-cmtids"))}),(u=d.previousElementSibling)===null||u===void 0||u.querySelectorAll(".vditor-comment").forEach(function(Ce){Ce.textContent.trim()===""&&(Ce.classList.remove("vditor-comment","vditor-comment--focus"),Ce.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)(o.startContainer);if(_&&!D){var F=(0,N.S)(o.startContainer,"BLOCKQUOTE");F?d=(0,y.F9)(o.startContainer)||d:d=_}if(D&&(d=D),E=d.outerHTML,d.tagName==="UL"||d.tagName==="OL"){var X=d.previousElementSibling,be=d.nextElementSibling;X&&(X.tagName==="UL"||X.tagName==="OL")&&(E=X.outerHTML+E,X.remove()),be&&(be.tagName==="UL"||be.tagName==="OL")&&(E=E+be.outerHTML,be.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(Ce){Ce&&!d.isEqualNode(Ce)&&(E+=Ce.outerHTML,Ce.remove())}),i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']").forEach(function(Ce){Ce&&!d.isEqualNode(Ce)&&(E+=Ce.outerHTML,Ce.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 xe=(0,y.E2)(i.wysiwyg.element.querySelector("wbr"),"LI");if(xe){var pe=i.wysiwyg.element.querySelector('sup[data-type="footnotes-ref"][data-footnotes-label="'.concat(xe.getAttribute("data-marker"),'"]'));pe&&pe.setAttribute("aria-label",xe.textContent.trim().substr(0,24))}}var Se,ke=i.wysiwyg.element.querySelectorAll("[data-type='link-ref-defs-block']");ke.forEach(function(Ce,Ve){Ve===0?Se=Ce:(Se.insertAdjacentHTML("beforeend",Ce.innerHTML),Ce.remove())}),ke.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",ke[0]);var me,Pe=i.wysiwyg.element.querySelectorAll("[data-type='footnotes-block']");Pe.forEach(function(Ce,Ve){Ve===0?me=Ce:(me.insertAdjacentHTML("beforeend",Ce.innerHTML),Ce.remove())}),Pe.length>0&&i.wysiwyg.element.insertAdjacentElement("beforeend",Pe[0]),(0,j.ib)(i.wysiwyg.element,o),i.wysiwyg.element.querySelectorAll(".vditor-wysiwyg__preview[data-render='2']").forEach(function(Ce){je(Ce,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)))}yt(i),He(i,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0})},Zr=function(i,o){return Object.defineProperty?Object.defineProperty(i,"raw",{value:o}):i.raw=o,i},Vi=function(i,o,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(F){try{_(u.next(F))}catch(X){E(X)}}function D(F){try{_(u.throw(F))}catch(X){E(X)}}function _(F){F.done?f(F.value):d(F.value).then(L,D)}_((u=u.apply(i,o||[])).next())})},pi=function(i,o){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(F){return D([_,F])}}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}_=o.call(i,s)}catch(F){_=[6,F],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Wi=function(i,o,s){if(i.keyCode===229&&i.code===""&&i.key==="Unidentified"&&o.currentMode!=="sv"){var u=(0,y.F9)(s);if(u&&u.textContent.trim()==="")return o[o.currentMode].composingLock=!0,!1}return!0},eo=function(i,o,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,o[o.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)}}},to=function(i,o){if(o==="ArrowDown"||o==="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&&(o==="ArrowDown"&&i.setStartAfter(s.parentElement),o==="ArrowUp"&&i.setStartBefore(s.parentElement))}},Ni=function(i,o){var s=(0,j.zh)(i),u=(0,y.F9)(s.startContainer);u&&(u.insertAdjacentHTML(o,'<p data-block="0">'.concat(c.g.ZWSP,`<wbr>
</p>`)),(0,j.ib)(i[i.currentMode].element,s),pr(i),ct(i))},Lu=function(i){var o=(0,y.lG)(i,"TABLE");return o&&o.rows[0].cells[0].isSameNode(i)?o:!1},_u=function(i){var o=(0,y.lG)(i,"TABLE");return o&&o.lastElementChild.lastElementChild.lastElementChild.isSameNode(i)?o:!1},Hs=function(i,o,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&&(o.selectNodeContents(u),s||o.collapse(!1),(0,j.Hc)(o)),u},Di=function(i,o,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(o.key==="ArrowDown"&&u.textContent.trimRight().substr(f.start).indexOf(`
`)===-1||o.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)),o.preventDefault(),!0}return!1},Yr=function(i,o,s,u,d){var f=(0,j.im)(u,i[i.currentMode].element,s);if(o.key==="ArrowUp"&&u.textContent.substr(0,f.start).indexOf(`
`)===-1||(o.key==="ArrowLeft"||o.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)),o.preventDefault(),!0}return!1},ga=function(i,o,s,u){u===void 0&&(u=!0);var d=(0,y.lG)(o.startContainer,"LI");if(i[i.currentMode].element.querySelectorAll("wbr").forEach(function(F){F.remove()}),o.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(F){F.insertAdjacentHTML("afterbegin",'<input type="checkbox" />'.concat(F.textContent.indexOf(" ")===0?"":" ")),F.classList.add("vditor-task")});else{d.querySelector("input")&&d.parentElement.querySelectorAll("li").forEach(function(F){F.querySelector("input").remove(),F.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)(o.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())}},Ps=function(i,o,s){var u=o.previousElementSibling;if(o&&u){var d=[o];Array.from(s.cloneContents().children).forEach(function(D,_){D.nodeType!==3&&o&&D.textContent.trim()!==""&&o.getAttribute("data-node-id")===D.getAttribute("data-node-id")&&(_!==0&&d.push(o),o=o.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){je(D,i),i.currentMode==="wysiwyg"&&D.previousElementSibling.setAttribute("style","display:none")}),ct(i),pr(i)}else i[i.currentMode].element.focus()},Lo=function(i,o,s,u){var d=(0,y.lG)(o.parentElement,"LI");if(d){i[i.currentMode].element.querySelectorAll("wbr").forEach(function(X){X.remove()}),s.insertNode(document.createElement("wbr"));var f=o.parentElement,E=f.cloneNode(),L=[o];Array.from(s.cloneContents().children).forEach(function(X,be){X.nodeType!==3&&o&&X.textContent.trim()!==""&&o.getAttribute("data-node-id")===X.getAttribute("data-node-id")&&(be!==0&&L.push(o),o=o.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 F=(0,y.O9)(s.startContainer);F&&F.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(X){je(X,i),i.currentMode==="wysiwyg"&&X.previousElementSibling.setAttribute("style","display:none")}),ct(i),pr(i)}else i[i.currentMode].element.focus()},va=function(i,o){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",o)},_o=function(i){var o=i.trimRight().split(`
`).pop();return o===""?!1:(o.replace(/ |-/g,"")===""||o.replace(/ |_/g,"")===""||o.replace(/ |\*/g,"")==="")&&o.replace(/ /g,"").length>2?!(o.indexOf("-")>-1&&o.trimLeft().indexOf(" ")===-1&&i.trimRight().split(`
`).length>1||o.indexOf(" ")===0||o.indexOf(" ")===0):!1},No=function(i){var o=i.trimRight().split(`
`);return i=o.pop(),i.indexOf(" ")===0||i.indexOf(" ")===0||(i=i.trimLeft(),i===""||o.length===0)?!1:i.replace(/-/g,"")===""||i.replace(/=/g,"")===""},ct=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),i.currentMode==="wysiwyg"?He(i,o):i.currentMode==="ir"?lr(i,o):i.currentMode==="sv"&&ne(i,o)},zs=function(i,o,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),ct(o),u.preventDefault(),!0;if(!(0,m.yl)(u)&&!u.shiftKey&&!u.altKey&&u.key==="Backspace"&&!E.previousElementSibling&&i.toString()===""&&(0,j.im)(E,o[o.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)(o[o.currentMode].element,i),ct(o),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)(o[o.currentMode].element,i),ct(o),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?Lo(o,E,i,E.parentElement):Ps(o,E,i),u.preventDefault(),!0}}return!1},Do=function(i,o,s){if(i.options.tab&&s.key==="Tab")return s.shiftKey||(o.toString()===""?(o.insertNode(document.createTextNode(i.options.tab)),o.collapse(!1)):(o.extractContents(),o.insertNode(document.createTextNode(i.options.tab)),o.collapse(!1))),(0,j.Hc)(o),ct(i),s.preventDefault(),!0},Bs=function(i,o,s,u){if(s){if(!(0,m.yl)(i)&&!i.altKey&&i.key==="Enter"){var d=String.raw(Ys||(Ys=Zr(["",""],["",""])),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=o.lute.SpinVditorDOM(E),(0,j.ib)(o[o.currentMode].element,u),ct(o),Bt(o),i.preventDefault(),!0}if(_o(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)(o[o.currentMode].element,u),ct(o),Bt(o),i.preventDefault(),!0}if(No(s.innerHTML))return o.currentMode==="wysiwyg"?s.outerHTML=o.lute.SpinVditorDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`):s.outerHTML=o.lute.SpinVditorIRDOM(s.innerHTML+`<p data-block="0"><wbr>
</p>`),(0,j.ib)(o[o.currentMode].element,u),ct(o),Bt(o),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,o[o.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)(o[o.currentMode].element,u),!1}return!1}},Fs=function(i,o,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>")),ct(i)},qs=function(i,o,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>")),o.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,o)}else s.parentElement.insertAdjacentHTML("beforebegin","<tr>".concat(u,"</tr>"));ct(i)},ba=function(i,o,s,u){u===void 0&&(u="afterend");for(var d=0,f=s.previousElementSibling;f;)d++,f=f.previousElementSibling;for(var E=0;E<o.rows.length;E++)E===0?o.rows[E].cells[d].insertAdjacentHTML(u,"<th> </th>"):o.rows[E].cells[d].insertAdjacentHTML(u,"<td> </td>");ct(i)},js=function(i,o,s){if(s.tagName==="TD"){var u=s.parentElement.parentElement;s.parentElement.previousElementSibling?o.selectNodeContents(s.parentElement.previousElementSibling.lastElementChild):o.selectNodeContents(u.previousElementSibling.lastElementChild.lastElementChild),u.childElementCount===1?u.remove():s.parentElement.remove(),o.collapse(!1),(0,j.Hc)(o),ct(i)}},$s=function(i,o,s,u){for(var d=0,f=u.previousElementSibling;f;)d++,f=f.previousElementSibling;(u.previousElementSibling||u.nextElementSibling)&&(o.selectNodeContents(u.previousElementSibling||u.nextElementSibling),o.collapse(!0));for(var E=0;E<s.rows.length;E++){var L=s.rows[E].cells;if(L.length===1){s.remove(),pr(i);break}L[d].remove()}(0,j.Hc)(o),ct(i)},Us=function(i,o,s){var u=s.startContainer,d=(0,y.lG)(u,"TD")||(0,y.lG)(u,"TH");if(d){if(!(0,m.yl)(o)&&!o.altKey&&o.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),ct(i),Bt(i),o.preventDefault(),!0}if(o.key==="Tab"){if(o.shiftKey)return Hs(d,s),o.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)),o.preventDefault(),!0}var L=d.parentElement.parentElement.parentElement;if(o.key==="ArrowUp"){if(o.preventDefault(),d.tagName==="TH")return L.previousElementSibling?(s.selectNodeContents(L.previousElementSibling),s.collapse(!1),(0,j.Hc)(s)):Ni(i,"beforebegin"),!0;for(var D=0,_=d.parentElement;D<_.cells.length&&!_.cells[D].isSameNode(d);D++);var F=_.previousElementSibling;return F||(F=_.parentElement.previousElementSibling.firstChild),s.selectNodeContents(F.cells[D]),s.collapse(!1),(0,j.Hc)(s),!0}if(o.key==="ArrowDown"){o.preventDefault();var _=d.parentElement;if(!_.nextElementSibling&&d.tagName==="TD")return L.nextElementSibling?(s.selectNodeContents(L.nextElementSibling),s.collapse(!0),(0,j.Hc)(s)):Ni(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)(o)&&o.key==="Enter"&&!o.shiftKey&&o.altKey){var X=i.wysiwyg.popover.querySelector(".vditor-input");return X.focus(),X.select(),o.preventDefault(),!0}if(!(0,m.yl)(o)&&!o.shiftKey&&!o.altKey&&o.key==="Backspace"&&s.startOffset===0&&s.toString()===""){var be=Hs(d,s,!1);return!be&&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)),ct(i)),o.preventDefault(),!0}if(se("⇧⌘F",o))return qs(i,s,d),o.preventDefault(),!0;if(se("⌘=",o))return Fs(i,s,d),o.preventDefault(),!0;if(se("⇧⌘G",o))return ba(i,L,d,"beforebegin"),o.preventDefault(),!0;if(se("⇧⌘=",o))return ba(i,L,d),o.preventDefault(),!0;if(se("⌘-",o))return js(i,s,d),o.preventDefault(),!0;if(se("⇧⌘-",o))return $s(i,s,L,d),o.preventDefault(),!0;if(se("⇧⌘L",o)){if(i.currentMode==="ir")return va(L,"left"),ct(i),o.preventDefault(),!0;var xe=i.wysiwyg.popover.querySelector('[data-type="left"]');if(xe)return xe.click(),o.preventDefault(),!0}if(se("⇧⌘C",o)){if(i.currentMode==="ir")return va(L,"center"),ct(i),o.preventDefault(),!0;var xe=i.wysiwyg.popover.querySelector('[data-type="center"]');if(xe)return xe.click(),o.preventDefault(),!0}if(se("⇧⌘R",o)){if(i.currentMode==="ir")return va(L,"right"),ct(i),o.preventDefault(),!0;var xe=i.wysiwyg.popover.querySelector('[data-type="right"]');if(xe)return xe.click(),o.preventDefault(),!0}}return!1},Vs=function(i,o,s,u){if(s.tagName==="PRE"&&se("⌘A",o))return u.selectNodeContents(s.firstElementChild),o.preventDefault(),!0;if(i.options.tab&&o.key==="Tab"&&!o.shiftKey&&u.toString()==="")return u.insertNode(document.createTextNode(i.options.tab)),u.collapse(!1),ct(i),o.preventDefault(),!0;if(o.key==="Backspace"&&!(0,m.yl)(o)&&!o.shiftKey&&!o.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),ct(i),o.preventDefault(),!0}return!(0,m.yl)(o)&&!o.altKey&&o.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"?On(i,u):Mt(i,u)),Bt(i),o.preventDefault(),!0):!1},Ws=function(i,o,s,u){var d=o.startContainer,f=(0,y.lG)(d,"BLOCKQUOTE");if(f&&o.toString()===""){if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&(0,j.im)(f,i[i.currentMode].element,o).start===0)return o.insertNode(document.createElement("wbr")),f.outerHTML=f.innerHTML,(0,j.ib)(i[i.currentMode].element,o),ct(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,o).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,o),ct(i),s.preventDefault(),!0}var L=(0,y.F9)(d);if(i.currentMode==="wysiwyg"&&L&&se("⇧⌘;",s))return o.insertNode(document.createElement("wbr")),L.outerHTML='<blockquote data-block="0">'.concat(L.outerHTML,"</blockquote>"),(0,j.ib)(i.wysiwyg.element,o),He(i),s.preventDefault(),!0;if(Di(i,s,o,f,f)||Yr(i,s,o,f,f))return!0}return!1},Gs=function(i,o,s){var u=o.startContainer,d=(0,y.lG)(u,"LI");if(d&&d.classList.contains("vditor-task")){if(se("⇧⌘J",s)){var f=d.firstElementChild;return f.checked?f.removeAttribute("checked"):f.setAttribute("checked","checked"),ct(i),s.preventDefault(),!0}if(s.key==="Backspace"&&!(0,m.yl)(s)&&!s.shiftKey&&!s.altKey&&o.toString()===""&&o.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,o),ct(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&&Lo(i,d,o,D)}else if(d.nextElementSibling){var _="",F="",X=!1;Array.from(d.parentElement.children).forEach(function(Se){d.isSameNode(Se)?X=!0:X?_+=Se.outerHTML:F+=Se.outerHTML});var be=d.parentElement.tagName,xe=d.parentElement.tagName==="OL"?"":' data-marker="'.concat(d.parentElement.getAttribute("data-marker"),'"'),pe="";F&&(pe=d.parentElement.tagName==="UL"?"":' start="1"',F="<".concat(be,' data-tight="true"').concat(xe,' data-block="0">').concat(F,"</").concat(be,">")),d.parentElement.outerHTML="".concat(F,`<p data-block="0"><wbr>
</p><`).concat(be,`
data-tight="true"`).concat(xe,' data-block="0"').concat(pe,">").concat(_,"</").concat(be,">")}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&&o.startOffset===0&&u.firstChild.tagName==="INPUT"?o.setStart(u.childNodes[1],1):(o.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(o.extractContents()));return(0,j.ib)(i[i.currentMode].element,o),ct(i),Bt(i),s.preventDefault(),!0}}return!1},Ks=function(i,o,s,u){if(o.startContainer.nodeType!==3){var d=o.startContainer.children[o.startOffset];if(d&&d.tagName==="HR")return o.selectNodeContents(d.previousElementSibling),o.collapse(!1),s.preventDefault(),!0}if(u){var f=u.previousElementSibling;if(f&&(0,j.im)(u,i[i.currentMode].element,o).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,o),ct(i),s.preventDefault(),!0}}return!1},Xs=function(i){(0,m.vU)()&&i.startContainer.nodeType!==3&&i.startContainer.tagName==="HR"&&i.setStartBefore(i.startContainer)},Zs=function(i,o,s){var u,d;if(!(0,m.vU)())return!1;if(i.key==="ArrowUp"&&o&&((u=o.previousElementSibling)===null||u===void 0?void 0:u.tagName)==="TABLE"){var f=o.previousElementSibling;return s.selectNodeContents(f.rows[f.rows.length-1].lastElementChild),s.collapse(!1),i.preventDefault(),!0}return i.key==="ArrowDown"&&o&&((d=o.nextElementSibling)===null||d===void 0?void 0:d.tagName)==="TABLE"?(s.selectNodeContents(o.nextElementSibling.rows[0].cells[0]),s.collapse(!0),i.preventDefault(),!0):!1},ya=function(i,o,s){return Vi(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,F,X,be,xe,pe,Se,me,ke,me,Pe;return pi(this,function(Ce){switch(Ce.label){case 0:return i[i.currentMode].element.getAttribute("contenteditable")!=="true"?[2]:(o.stopPropagation(),o.preventDefault(),"clipboardData"in o?(u=o.clipboardData.getData("text/html"),d=o.clipboardData.getData("text/plain"),f=o.clipboardData.files):(u=o.dataTransfer.getData("text/html"),d=o.dataTransfer.getData("text/plain"),o.dataTransfer.types.includes("Files")&&(f=o.dataTransfer.items)),E={},L=function(Ve,Et){if(!Et)return["",Lute.WalkContinue];if(i.options.upload.renderLinkDest)return i.options.upload.renderLinkDest(i,Ve,Et);var wt=Ve.TokensStr();if(Ve.__internal_object__.Parent.Type===34&&wt&&wt.indexOf("file://")===-1&&i.options.upload.linkToImgUrl){var Ct=new XMLHttpRequest;Ct.open("POST",i.options.upload.linkToImgUrl),i.options.upload.token&&Ct.setRequestHeader("X-Upload-Token",i.options.upload.token),i.options.upload.withCredentials&&(Ct.withCredentials=!0),Ne(i,Ct),Ct.setRequestHeader("Content-Type","application/json; charset=utf-8"),Ct.onreadystatechange=function(){if(Ct.readyState===XMLHttpRequest.DONE){if(Ct.status===200){var vn=Ct.responseText;i.options.upload.linkToImgFormat&&(vn=i.options.upload.linkToImgFormat(Ct.responseText));var Yt=JSON.parse(vn);if(Yt.code!==0){i.tip.show(Yt.msg);return}var bn=Yt.data.originalURL;if(i.currentMode==="sv")i.sv.element.querySelectorAll(".vditor-sv__marker--link").forEach(function(Ut){Ut.textContent===bn&&(Ut.textContent=Yt.data.url)});else{var ot=i[i.currentMode].element.querySelector('img[src="'.concat(bn,'"]'));ot.src=Yt.data.url,i.currentMode==="ir"&&(ot.previousElementSibling.previousElementSibling.innerHTML=Yt.data.url)}ct(i)}else i.tip.show(Ct.responseText);i.options.upload.linkToImgCallback&&i.options.upload.linkToImgCallback(Ct.responseText)}},Ct.send(JSON.stringify({url:wt}))}return i.currentMode==="ir"?['<span class="vditor-ir__marker vditor-ir__marker--link">'.concat(Lute.EscapeHTMLStr(wt),"</span>"),Lute.WalkContinue]:i.currentMode==="wysiwyg"?["",Lute.WalkContinue]:['<span class="vditor-sv__marker--link">'.concat(Lute.EscapeHTMLStr(wt),"</span>"),Lute.WalkContinue]},(u.replace(/&amp;/g,"&").replace(/<(|\/)(html|body|meta)[^>]*?>/ig,"").trim()==='<a href="'.concat(d,'">').concat(d,"</a>")||u.replace(/&amp;/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,F=ut(u,d,i.currentMode),X=i.currentMode==="sv"?(0,y.a1)(o.target,"data-type","code-block"):(0,y.lG)(o.target,"CODE"),X?(i.currentMode==="sv"?document.execCommand("insertHTML",!1,d.replace(/&/g,"&amp;").replace(/</g,"&lt;")):(be=(0,j.im)(o.target,i[i.currentMode].element),X.parentElement.tagName!=="PRE"&&(d+=c.g.ZWSP),X.textContent=X.textContent.substring(0,be.start)+d+X.textContent.substring(be.end),(0,j.$j)(be.start+d.length,be.start+d.length,X.parentElement),!((Pe=X.parentElement)===null||Pe===void 0)&&Pe.nextElementSibling.classList.contains("vditor-".concat(i.currentMode,"__preview"))&&(X.parentElement.nextElementSibling.innerHTML=X.outerHTML,je(X.parentElement.nextElementSibling,i))),[3,10]):[3,1]);case 1:return F?(s.pasteCode(F),[3,10]):[3,2];case 2:return u.trim()===""?[3,5]:(xe=document.createElement("div"),xe.innerHTML=u,i.options.upload.base64ToLink?[3,4]:[4,Nu(i,xe,("clipboardData"in o?o.clipboardData:o.dataTransfer).getData("text/rtf"))]);case 3:Ce.sent(),Ce.label=4;case 4:return xe.querySelectorAll("[style]").forEach(function(Ve){Ve.removeAttribute("style")}),xe.querySelectorAll(".vditor-copy").forEach(function(Ve){Ve.remove()}),i.currentMode==="ir"?(E.HTML2VditorIRDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorIRDOM(xe.innerHTML),i)):i.currentMode==="wysiwyg"?(E.HTML2VditorDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),(0,j.oC)(i.lute.HTML2VditorDOM(xe.innerHTML),i)):(E.Md2VditorSVDOM={renderLinkDest:L},i.lute.SetJSRenderers({renderers:E}),he(i,i.lute.HTML2Md(xe.innerHTML).trimRight())),i.outline.render(i),[3,10];case 5:return f.length>0?i.options.upload.url||i.options.upload.handler?[4,wn(i,f)]:[3,7]:[3,9];case 6:return Ce.sent(),[3,8];case 7:pe=new FileReader,"clipboardData"in o?(f=o.clipboardData.files,Se=f[0]):o.dataTransfer.types.includes("Files")&&(f=o.dataTransfer.items,Se=f[0].getAsFile()),Se&&Se.type.startsWith("image")&&(pe.readAsDataURL(Se),pe.onload=function(){var Ve="";i.currentMode==="wysiwyg"?Ve+='<img alt="'.concat(Se.name,'" src="').concat(pe.result.toString(),`">
`):Ve+="![".concat(Se.name,"](").concat(pe.result.toString(),`)
`),document.execCommand("insertHTML",!1,Ve)}),Ce.label=8;case 8:return[3,10];case 9:d.trim()!==""&&f.length===0&&(me=(0,j.zh)(i),me.toString()!==""&&i.lute.IsValidLinkDest(d)&&(d="[".concat(me.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}),he(i,d)),i.outline.render(i)),Ce.label=10;case 10:return i.currentMode!=="sv"&&(ke=(0,y.F9)((0,j.zh)(i).startContainer),ke&&(me=(0,j.zh)(i),i[i.currentMode].element.querySelectorAll("wbr").forEach(function(Ve){Ve.remove()}),me.insertNode(document.createElement("wbr")),i.currentMode==="wysiwyg"?ke.outerHTML=i.lute.SpinVditorDOM(ke.outerHTML):ke.outerHTML=i.lute.SpinVditorIRDOM(ke.outerHTML),(0,j.ib)(i[i.currentMode].element,me)),i[i.currentMode].element.querySelectorAll(".vditor-".concat(i.currentMode,"__preview[data-render='2']")).forEach(function(Ve){je(Ve,i)})),i.wysiwyg.triggerRemoveComment(i),ct(i),i[i.currentMode].element.scrollHeight-_>Math.min(i[i.currentMode].element.clientHeight,window.innerHeight)/2&&Bt(i),[2]}})})},Nu=function(i,o,s){return Vi(void 0,void 0,void 0,function(){var u,d,f,E,L,D,_,F,X,Se,be,xe,pe,Se,ke,me;return pi(this,function(Pe){switch(Pe.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],F=void 0,_.includes("\\pngblip")?F="image/png":_.includes("\\jpegblip")&&(F="image/jpeg"),F&&E.push({hex:_.replace(u,"").replace(/[^\da-fA-F]/g,""),type:F});for(X=[],Ro(o,function(Ce){if(Ce.tagName==="V:SHAPE")return Ro(Ce,function(Ve){Ve.tagName==="V:IMAGEDATA"&&X.push({shape:Ce,img:Ve})}),!1}),Se=0;Se<X.length;Se++)be=document.createElement("img"),xe="data:"+E[Se].type+";base64,"+btoa((E[Se].hex.match(/\w{2}/g)||[]).map(function(Ce){return String.fromCharCode(parseInt(Ce,16))}).join("")),be.src=xe,be.title=X[Se].img.getAttribute("title"),X[Se].shape.parentNode.replaceChild(be,X[Se].shape);pe=o.querySelectorAll("img"),Se=0,Pe.label=1;case 1:return Se<pe.length?(ke=pe[Se].src||"",ke?(me=pe[Se],[4,i.options.upload.base64ToLink(ke)]):[3,3]):[3,4];case 2:me.src=Pe.sent(),Pe.label=3;case 3:return Se++,[3,1];case 4:return[2]}})})},Ro=function(i,o){var s=o(i);if(s!==!1)for(var u=0;u<i.children.length;u++)Ro(i.children[u],o)},Ys,Js=function(i){var o,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=(o=window.hljs)===null||o===void 0?void 0:o.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)}},lr=function(i,o){o===void 0&&(o={enableAddUndoStack:!0,enableHint:!1,enableInput:!0}),o.enableHint&&Js(i),clearTimeout(i.ir.processTimeoutId),i.ir.processTimeoutId=window.setTimeout(function(){if(!i.ir.composingLock){var s=v(i);typeof i.options.input=="function"&&o.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),o.enableAddUndoStack&&i.undo.addToUndoStack(i)}},i.options.undoDelay)},Ri=function(i,o){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=o:(u.insertAdjacentText("afterbegin",o),s.selectNodeContents(u),s.collapse(!1)),Mt(i,s.cloneRange()),Ue(i)}},wa=function(i,o,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=o.lute.SpinVditorIRDOM(u.outerHTML),u.outerHTML=d.firstElementChild.innerHTML.trim()}},Du=function(i,o,s,u){var d=(0,j.zh)(i),f=o.getAttribute("data-type"),E=d.startContainer;E.nodeType===3&&(E=E.parentElement);var L=!0;if(o.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 F=(0,y.fb)(d.startContainer,"vditor-ir__link");F?(d.insertNode(document.createElement("wbr")),_.outerHTML=F.innerHTML):_.outerHTML=_.querySelector(".vditor-ir__link").innerHTML+"<wbr>"}}else f==="italic"?wa(d,i,"em"):f==="bold"?wa(d,i,"strong"):f==="strike"?wa(d,i,"s"):f==="inline-code"?wa(d,i,"code"):(f==="check"||f==="list"||f==="ordered-list")&&(ga(i,d,f),L=!1,o.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 be=`<hr data-block="0"><p data-block="0"><wbr>
</p>`;X.innerHTML.trim()===""?X.outerHTML=be:X.insertAdjacentHTML("afterend",be)}}else if(f==="quote")X&&(d.insertNode(document.createElement("wbr")),X.outerHTML='<blockquote data-block="0">'.concat(X.outerHTML,"</blockquote>"),L=!1,o.classList.add("vditor-menu--current"));else if(f==="link"){var xe=void 0;d.toString()===""?xe="".concat(s,"<wbr>").concat(u):xe="".concat(s).concat(d.toString()).concat(u.replace(")","<wbr>)")),document.execCommand("insertHTML",!1,xe),L=!1,o.classList.add("vditor-menu--current")}else if(f==="italic"||f==="bold"||f==="strike"||f==="inline-code"||f==="code"||f==="table"){var xe=void 0;d.toString()===""?xe="".concat(s,"<wbr>").concat(u):(f==="code"?xe="".concat(s,`
`).concat(d.toString(),"<wbr>").concat(u):f==="table"?xe="".concat(s).concat(d.toString(),"<wbr>").concat(u):xe="".concat(s).concat(d.toString()).concat(u,"<wbr>"),d.deleteContents()),(f==="table"||f==="code")&&(xe=`
`+xe+`
`);var pe=document.createElement("span");pe.innerHTML=xe,d.insertNode(pe),Mt(i,d),f==="table"&&(d.selectNodeContents(getSelection().getRangeAt(0).startContainer.parentElement),(0,j.Hc)(d))}else(f==="check"||f==="list"||f==="ordered-list")&&(ga(i,d,f,!1),L=!1,x(i.toolbar.elements,["check","list","ordered-list"]),o.classList.add("vditor-menu--current"))}(0,j.ib)(i.ir.element,d),lr(i),L&&Ue(i)},Ru=function(i,o,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(F){try{_(u.next(F))}catch(X){E(X)}}function D(F){try{_(u.throw(F))}catch(X){E(X)}}function _(F){F.done?f(F.value):d(F.value).then(L,D)}_((u=u.apply(i,o||[])).next())})},Ou=function(i,o){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(F){return D([_,F])}}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}_=o.call(i,s)}catch(F){_=[6,F],d=0}finally{u=f=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}},Iu=function(){function i(o){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),lr(d),L.parentElement.querySelectorAll("code").forEach(function(X){X.className="language-"+f.trimRight()}),je(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 F=(0,y.fb)(E.startContainer,"vditor-wysiwyg__block");F&&F.lastElementChild.classList.contains("vditor-wysiwyg__preview")&&(F.lastElementChild.innerHTML=F.firstElementChild.innerHTML,je(F.lastElementChild,d))}else if(d.currentMode==="ir"){var F=(0,y.fb)(E.startContainer,"vditor-ir__marker--pre");F&&F.nextElementSibling.classList.contains("vditor-ir__preview")&&(F.nextElementSibling.innerHTML=F.innerHTML,je(F.nextElementSibling,d))}ct(d)},this.timeId=-1,this.element=document.createElement("div"),this.element.className="vditor-hint",this.recentLanguage="",o.push({key:":"})}return i.prototype.render=function(o){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,o.options.hint.extend);if(typeof f>"u")this.element.style.display="none",clearTimeout(this.timeId);else if(this.splitChar===":"){var E=f===""?o.options.hint.emoji:o.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,o)}else o.options.hint.extend.forEach(function(D){D.key===s.splitChar&&(clearTimeout(s.timeId),s.timeId=window.setTimeout(function(){return Ru(s,void 0,void 0,function(){var _;return Ou(this,function(F){switch(F.label){case 0:return _=this.genHTML,[4,D.hint(f)];case 1:return _.apply(this,[F.sent(),f,o]),[2]}})})},o.options.hint.delay))})}},i.prototype.genHTML=function(o,s,u){var d=this;if(o.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,_="";o.forEach(function(X,be){if(!(be>7)){var xe=X.html;if(s!==""){var pe=xe.lastIndexOf(">")+1,Se=xe.substr(pe),ke=Se.toLowerCase().indexOf(s.toLowerCase());ke>-1&&(Se=Se.substring(0,ke)+"<b>"+Se.substring(ke,ke+s.length)+"</b>"+Se.substring(ke+s.length),xe=xe.substr(0,pe)+Se)}_+='<button type="button" data-value="'.concat(encodeURIComponent(X.value),` "
`).concat(be===0?"class='vditor-hint--current'":"","> ").concat(xe,"</button>")}}),this.element.innerHTML=_;var F=parseInt(document.defaultView.getComputedStyle(f,null).getPropertyValue("line-height"),10);this.element.style.top="".concat(D+(F||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(be){d.fillEmoji(X,u),be.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(o,s){if(this.element.querySelectorAll("button").length===0||this.element.style.display==="none")return!1;var u=this.element.querySelector(".vditor-hint--current");if(o.key==="ArrowDown")return o.preventDefault(),o.stopPropagation(),u.removeAttribute("class"),u.nextElementSibling?u.nextElementSibling.className="vditor-hint--current":this.element.children[0].className="vditor-hint--current",!0;if(o.key==="ArrowUp"){if(o.preventDefault(),o.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)(o)&&!o.shiftKey&&!o.altKey&&o.key==="Enter"&&!o.isComposing)return o.preventDefault(),o.stopPropagation(),this.fillEmoji(u,s),!0;return!1},i.prototype.getKey=function(o,s){var u=this;this.lastIndex=-1,this.splitChar="",s.forEach(function(_){var F=o.lastIndexOf(_.key);u.lastIndex<F&&(u.splitChar=_.key,u.lastIndex=F)});var d;if(this.lastIndex===-1)return d;var f=o.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}(),Hu=function(){function i(o){this.composingLock=!1;var s=document.createElement("div");s.className="vditor-ir",s.innerHTML='<pre class="vditor-reset" placeholder="'.concat(o.options.placeholder,`"
contenteditable="true" spellcheck="false"></pre>`),this.element=s.firstElementChild,this.bindEvent(o),Kr(o,this.element),Ui(o,this.element),sr(o,this.element),_i(o,this.element),vt(o,this.element),Xr(o,this.element),di(o,this.element,this.copy),hi(o,this.element,this.copy)}return i.prototype.copy=function(o,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){o.stopPropagation(),o.preventDefault();var d=document.createElement("div");d.appendChild(u.cloneContents()),o.clipboardData.setData("text/plain",s.lute.VditorIRDOM2Md(d.innerHTML).trim()),o.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(o){var s=this;this.element.addEventListener("paste",function(u){ya(o,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){T(o,["hint"])}),this.element.addEventListener("compositionstart",function(u){s.composingLock=!0}),this.element.addEventListener("compositionend",function(u){(0,m.vU)()||Mt(o,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,lr(o,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}s.composingLock||u.data===""||u.data==="“"||u.data==="《"||Mt(o,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,lr(o);return}var d=(0,j.zh)(o),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),Bt(o)),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")){o.options.link.click?o.options.link.click(L.querySelector(":scope > .vditor-ir__marker--link")):o.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()===""?Q(d,o):setTimeout(function(){Q((0,j.zh)(o),o)}),It(u,o),Ue(o)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if(u.key==="Enter"&&Bt(o),Ue(o),(u.key==="Backspace"||u.key==="Delete")&&o.ir.element.innerHTML!==""&&o.ir.element.childNodes.length===1&&o.ir.element.firstElementChild&&o.ir.element.firstElementChild.tagName==="P"&&o.ir.element.firstElementChild.childElementCount===0&&(o.ir.element.textContent===""||o.ir.element.textContent===`
`)){o.ir.element.innerHTML="";return}var d=(0,j.zh)(o);u.key==="Backspace"?((0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent="",Q(d,o)),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")&&Js(o),Q(d,o)):u.keyCode===229&&u.code===""&&u.key==="Unidentified"&&Q(d,o);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}(),Qs=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)},Pu=a(214),el=a(436),zu=function(){function i(o){this.element=document.createElement("div"),this.element.className="vditor-outline",this.element.innerHTML='<div class="vditor-outline__title">'.concat(o,`</div>
<div class="vditor-outline__content"></div>`)}return i.prototype.render=function(o){var s="";return o.preview.element.style.display==="block"?s=(0,el.k)(o.preview.previewElement,this.element.lastElementChild,o):s=(0,el.k)(o[o.currentMode].element,this.element.lastElementChild,o),s},i.prototype.toggle=function(o,s,u){var d;s===void 0&&(s=!0),u===void 0&&(u=!0);var f=(d=o.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(o),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);o[o.currentMode].element.contains(E.startContainer)&&(0,j.Hc)(E)}ze(o)},i}(),Bu=a(280),Fu=function(){function i(o){var s=this;this.element=document.createElement("div"),this.element.className="vditor-preview",this.previewElement=document.createElement("div"),this.previewElement.className="vditor-reset",o.options.classes.preview&&this.previewElement.classList.add(o.options.classes.preview),this.previewElement.style.maxWidth=o.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(o,_,"default"),D.preventDefault()}}),this.previewElement.addEventListener("click",function(D){var _=(0,y.lG)(D.target,"SPAN");if(_&&(0,y.fb)(_,"vditor-toc")){var F=s.previewElement.querySelector("#"+_.getAttribute("data-target-id"));F&&(s.element.scrollTop=F.offsetTop);return}if(D.target.tagName==="A"){o.options.link.click?o.options.link.click(D.target):o.options.link.isOpen&&window.open(D.target.getAttribute("href")),D.preventDefault();return}D.target.tagName==="IMG"&&(o.options.image.preview?o.options.image.preview(D.target):o.options.image.isPreview&&(0,de.E)(D.target,o.options.lang,o.options.theme))}),this.element.appendChild(this.previewElement);var u=o.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 F=_.getAttribute("data-type"),X=u.find(function(be){return(be==null?void 0:be.key)===F});if(X){X.click(F);return}if(F==="mp-wechat"||F==="zhihu"){s.copyToX(o,s.previewElement.cloneNode(!0),F);return}F==="desktop"?s.previewElement.style.width="auto":F==="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(o),d.querySelectorAll("button").forEach(function(be){be.classList.remove("vditor-preview__action--current")}),_.classList.add("vditor-preview__action--current")}}),this.element.insertBefore(d,this.previewElement)}}return i.prototype.render=function(o,s){var u=this;if(clearTimeout(this.mdTimeoutId),this.element.style.display==="none"){this.element.getAttribute("data-type")==="renderPerformance"&&o.tip.hide();return}if(s){this.previewElement.innerHTML=s;return}if(v(o).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")===""){this.previewElement.innerHTML="";return}var d=new Date().getTime(),f=v(o);this.mdTimeoutId=window.setTimeout(function(){if(o.options.preview.url){var E=new XMLHttpRequest;E.open("POST",o.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){o.tip.show(D.msg);return}o.options.preview.transform&&(D.data=o.options.preview.transform(D.data)),u.previewElement.innerHTML=D.data,u.afterRender(o,d)}else{var _=o.lute.Md2HTML(f);o.options.preview.transform&&(_=o.options.preview.transform(_)),u.previewElement.innerHTML=_,u.afterRender(o,d)}},E.send(JSON.stringify({markdownText:f}))}else{var L=o.lute.Md2HTML(f);o.options.preview.transform&&(L=o.options.preview.transform(L)),u.previewElement.innerHTML=L,u.afterRender(o,d)}},o.options.preview.delay)},i.prototype.afterRender=function(o,s){o.options.preview.parse&&o.options.preview.parse(this.element);var u=new Date().getTime()-s;new Date().getTime()-s>2600?(o.tip.show(window.VditorI18n.performanceTip.replace("${x}",u.toString())),o.preview.element.setAttribute("data-type","renderPerformance")):o.preview.element.getAttribute("data-type")==="renderPerformance"&&(o.tip.hide(),o.preview.element.removeAttribute("data-type"));var d=o.preview.element.querySelector(".vditor-comment--focus");d&&d.classList.remove("vditor-comment--focus"),(0,Y.O)(o.preview.previewElement,o.options.preview.hljs),(0,Le.s)(o.options.preview.hljs,o.preview.previewElement,o.options.cdn),(0,Xe.i)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,it.K)(o.preview.previewElement,o.options.cdn),(0,nt.J)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,te.P)(o.preview.previewElement,o.options.cdn),(0,ue.v)(o.preview.previewElement,o.options.cdn),(0,P.p)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,$e.P)(o.preview.previewElement,o.options.cdn,o.options.theme),(0,De.B)(o.preview.previewElement,o.options.cdn),(0,q.Q)(o.preview.previewElement,o.options.cdn),o.options.preview.render.media.enable&&(0,Bu.Y)(o.preview.previewElement),o.options.customRenders.forEach(function(L){L.render(o.preview.previewElement,o)});var f=o.preview.element,E=o.outline.render(o);E===""&&(E="[ToC]"),f.querySelectorAll('[data-type="toc-block"]').forEach(function(L){L.innerHTML=E,(0,qe.H)(L,{cdn:o.options.cdn,math:o.options.preview.math})}),(0,qe.H)(o.preview.previewElement,{cdn:o.options.cdn,math:o.options.preview.math})},i.prototype.copyToX=function(o,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(),o.tip.show(["zhihu","mp-wechat"].includes(u)?"已复制,可到".concat(u==="zhihu"?"知乎":"微信公众号平台","进行粘贴"):"已复制到剪切板")},i}(),qu=function(){function i(o){this.element=document.createElement("div"),this.element.className="vditor-resize vditor-resize--".concat(o.options.resize.position),this.element.innerHTML='<div><svg><use xlink:href="#vditor-icon-resize"></use></svg></div>',this.bindEvent(o)}return i.prototype.bindEvent=function(o){var s=this;this.element.addEventListener("mousedown",function(u){var d=document,f=u.clientY,E=o.element.offsetHeight,L=63+o.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){o.options.resize.position==="top"?o.element.style.height=Math.max(L,E+(f-D.clientY))+"px":o.element.style.height=Math.max(L,E+(D.clientY-f))+"px",o.options.typewriterMode&&(o.sv.element.style.paddingBottom=o.sv.element.parentElement.offsetHeight/2+"px")},d.onmouseup=function(){o.options.resize.after&&o.options.resize.after(o.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}(),ju=function(){function i(o){this.composingLock=!1,this.element=document.createElement("pre"),this.element.className="vditor-sv vditor-reset",this.element.setAttribute("placeholder",o.options.placeholder),this.element.setAttribute("contenteditable","true"),this.element.setAttribute("spellcheck","false"),this.bindEvent(o),Kr(o,this.element),sr(o,this.element),_i(o,this.element),vt(o,this.element),Xr(o,this.element),di(o,this.element,this.copy),hi(o,this.element,this.copy)}return i.prototype.copy=function(o,s){o.stopPropagation(),o.preventDefault(),o.clipboardData.setData("text/plain",tr(s[s.currentMode].element))},i.prototype.bindEvent=function(o){var s=this;this.element.addEventListener("paste",function(u){ya(o,u,{pasteCode:function(d){document.execCommand("insertHTML",!1,d)}})}),this.element.addEventListener("scroll",function(){if(o.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=o.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(o,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,ne(o,{enableAddUndoStack:!0,enableHint:!0,enableInput:!0});return}Z(o,u)}}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){if((u.key==="Backspace"||u.key==="Delete")&&o.sv.element.innerHTML!==""&&o.sv.element.childNodes.length===1&&o.sv.element.firstElementChild&&o.sv.element.firstElementChild.tagName==="DIV"&&o.sv.element.firstElementChild.childElementCount===2&&(o.sv.element.firstElementChild.textContent===""||o.sv.element.textContent===`
`)){o.sv.element.innerHTML="";return}u.key==="Enter"&&Bt(o)}})},i}(),tl=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-tip"}return i.prototype.show=function(o,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(o,`
<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(o,"</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}(),Oo=function(i,o){if(o.options.preview.mode!==i){switch(o.options.preview.mode=i,i){case"both":o.sv.element.style.display="block",o.preview.element.style.display="block",o.preview.render(o),w(o.toolbar.elements,["both"]);break;case"editor":o.sv.element.style.display="block",o.preview.element.style.display="none",x(o.toolbar.elements,["both"]);break}o.devtools&&o.devtools.renderEchart(o)}},$u=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Uu=function(i){$u(o,i);function o(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"?Oo("editor",s):Oo("both",s)))}),d}return o}(xt),Vu=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__br"}return i}(),nl=a(580),Wu=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Gu=function(i){Wu(o,i);function o(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"&&(T(s,["subToolbar"]),s.options.preview.hljs.style=D.target.textContent,(0,nl.Y)(D.target.textContent,s.options.cdn),D.preventDefault(),D.stopPropagation())}),d.element.appendChild(E),M(s,E,f,u.level),d}return o}(xt),Ku=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Xu=function(i){Ku(o,i);function o(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"&&(T(s,["subToolbar"]),s.options.preview.theme.current=D.target.getAttribute("data-type"),(0,ce.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 o}(xt),Zu=function(){function i(o){this.element=document.createElement("span"),this.element.className="vditor-counter vditor-tooltipped vditor-tooltipped__nw",this.render(o,"")}return i.prototype.render=function(o,s){var u=s.endsWith(`
`)?s.length-1:s.length;if(o.options.counter.type==="text"&&o[o.currentMode]){var d=o[o.currentMode].element.cloneNode(!0);d.querySelectorAll(".vditor-wysiwyg__preview").forEach(function(f){f.remove()}),u=d.textContent.length}typeof o.options.counter.max=="number"?(u>o.options.counter.max?this.element.className="vditor-counter vditor-counter--error":this.element.className="vditor-counter",this.element.innerHTML="".concat(u,"/").concat(o.options.counter.max)):this.element.innerHTML="".concat(u),this.element.setAttribute("aria-label",o.options.counter.type),o.options.counter.after&&o.options.counter.after(u,{enable:o.options.counter.enable,max:o.options.counter.max,type:o.options.counter.type})},i}(),Yu=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ju=function(i){Yu(o,i);function o(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 o}(xt),Qu=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ed=function(i){Qu(o,i);function o(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",ze(s)):(E.classList.add("vditor-menu--current"),s.devtools.element.style.display="block",ze(s),s.devtools.renderEchart(s)))}),d}return o}(xt),td=function(){function i(){this.element=document.createElement("div"),this.element.className="vditor-toolbar__divider"}return i}(),nd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),rd=function(i){nd(o,i);function o(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 o.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)||Rn(s,L);L.collapse(!1),(0,j.Hc)(L),u.element.lastElementChild.style.display="none",ct(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"))})},o}(xt),rl=function(i,o,s){var u=document.createElement("a");"download"in u?(u.download=s,u.style.display="none",u.href=URL.createObjectURL(new Blob([o])),document.body.appendChild(u),u.click(),u.remove()):i.tip.show(window.VditorI18n.downloadTip,0)},id=function(i){var o=v(i);rl(i,o,o.substr(0,10)+".md")},ad=function(i){i.tip.show(window.VditorI18n.generate,3800);var o=document.querySelector("#vditorExportIframe");o.contentDocument.open(),o.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>`)),o.contentDocument.close(),setTimeout(function(){o.contentWindow.postMessage(v(i),"*")},200)},od=function(i){var o=Qs(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(o,`</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>');rl(i,s,o.substr(0,10)+".html")},sd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ld=function(i){sd(o,i);function o(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":id(s);break;case"pdf":ad(s);break;case"html":od(s);break}T(s,["subToolbar"]),L.preventDefault(),L.stopPropagation()}}),d.element.appendChild(E),M(s,E,f,u.level),d}return o}(xt),cd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),ud=function(i){cd(o,i);function o(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s,u),d}return o.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),ze(s),We(s)})},o}(xt),dd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),hd=function(i){dd(o,i);function o(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)("&lt;⌥⌘1>"),`</button>
<button data-tag="h2" data-value="## ">`).concat(window.VditorI18n.heading2," &lt;").concat((0,m.ns)("⌥⌘2"),`></button>
<button data-tag="h3" data-value="### ">`).concat(window.VditorI18n.heading3," &lt;").concat((0,m.ns)("⌥⌘3"),`></button>
<button data-tag="h4" data-value="#### ">`).concat(window.VditorI18n.heading4," &lt;").concat((0,m.ns)("⌥⌘4"),`></button>
<button data-tag="h5" data-value="##### ">`).concat(window.VditorI18n.heading5," &lt;").concat((0,m.ns)("⌥⌘5"),`></button>
<button data-tag="h6" data-value="###### ">`).concat(window.VditorI18n.heading6," &lt;").concat((0,m.ns)("⌥⌘6"),"></button>"),d.element.appendChild(f),d._bindEvent(s,f),d}return o.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"?(Qn(s),He(s)):s.currentMode==="ir"&&Ri(s,""),d.classList.remove("vditor-menu--current")):(T(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"?(ln(s,E.target.getAttribute("data-tag")),He(s),d.classList.add("vditor-menu--current")):s.currentMode==="ir"?(Ri(s,E.target.getAttribute("data-value")),d.classList.add("vditor-menu--current")):Te(s,E.target.getAttribute("data-value")),u.style.display="none"})},o}(xt),pd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),fd=function(i){pd(o,i);function o(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 o}(xt),md=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),gd=function(i){md(o,i);function o(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&&Ps(s,L,E)}}),d}return o}(xt),vd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),bd=function(i){vd(o,i);function o(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>&nbsp;&nbsp;</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 o}(xt),yd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),wd=function(i){yd(o,i);function o(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")&&Ni(s,"afterend")}),d}return o}(xt),xd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),kd=function(i){xd(o,i);function o(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")&&Ni(s,"beforebegin")}),d}return o}(xt),Sd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ed=function(i){Sd(o,i);function o(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&&Lo(s,L,E,L.parentElement)}}),d}return o}(xt),Td=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Ad=function(i){Td(o,i);function o(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 o}(xt),Md=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Cd=function(i){Md(o,i);function o(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return o.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"),T(s,["subToolbar","hint","popover"]),setTimeout(function(){s.outline.render(s)},s.options.preview.delay+10)),ze(s)}})},o}(xt),Ld=function(){function i(o){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(o);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(o,s){this.leftChannel.push(new Float32Array(o)),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 o=this.mergeBuffers(this.leftChannel),s=this.mergeBuffers(this.rightChannel),u=new Float32Array(o.length),d=0;d<o.length;++d)u[d]=.5*(o[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,F=44,X=1,be=0;be<_;be++)L.setInt16(F,u[be]*(32767*X),!0),F+=2;return new Blob([L],{type:"audio/wav"})},i.prototype.downSampleBuffer=function(o,s){if(s===this.DEFAULT_SAMPLE_RATE||s>this.DEFAULT_SAMPLE_RATE)return o;for(var u=this.DEFAULT_SAMPLE_RATE/s,d=Math.round(o.length/u),f=new Float32Array(d),E=0,L=0;E<f.length;){for(var D=Math.round((E+1)*u),_=0,F=0,X=L;X<D&&X<o.length;X++)_+=o[X],F++;f[E]=_/F,E++,L=D}return f},i.prototype.mergeBuffers=function(o){for(var s=new Float32Array(this.recordingLength),u=0,d=o.length,f=0;f<d;++f){var E=o[f];s.set(E,u),u+=E.length}return s},i.prototype.writeUTFBytes=function(o,s,u){for(var d=u.length,f=0;f<d;f++)o.setUint8(s+f,u.charCodeAt(f))},i}(),_d=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Nd=function(i){_d(o,i);function o(s,u){var d=i.call(this,s,u)||this;return d._bindEvent(s),d}return o.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 Ld(D),d.recorder.onaudioprocess=function(_){if(d.isRecording){var F=_.inputBuffer.getChannelData(0),X=_.inputBuffer.getChannelData(1);d.cloneChannelData(F,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"});wn(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")}})},o}(xt),Dd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Rd=function(i){Dd(o,i);function o(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 o}(xt),Od=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Id=function(i){Od(o,i);function o(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 o}(xt),Hd=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Pd=function(i){Hd(o,i);function o(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 o.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&&wn(s,d.target.files,d.target)})},o}(xt),zd=function(){function i(o){var s=this,u=o.options;this.elements={},this.element=document.createElement("div"),this.element.className="vditor-toolbar",u.toolbar.forEach(function(d,f){var E=s.genItem(o,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(o,D,f+_))}),E.appendChild(L),M(o,L,E.children[0])}}),o.options.toolbarConfig.hide&&this.element.classList.add("vditor-toolbar--hide"),o.options.toolbarConfig.pin&&this.element.classList.add("vditor-toolbar--pin"),o.options.counter.enable&&(o.counter=new Zu(o),this.element.appendChild(o.counter.element))}return i.prototype.updateConfig=function(o,s){o.options.toolbarConfig=Object.assign({hide:!1,pin:!1},s),o.options.toolbarConfig.hide?this.element.classList.add("vditor-toolbar--hide"):this.element.classList.remove("vditor-toolbar--hide"),o.options.toolbarConfig.pin?this.element.classList.add("vditor-toolbar--pin"):this.element.classList.remove("vditor-toolbar--pin")},i.prototype.genItem=function(o,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 xt(o,s);break;case"emoji":d=new rd(o,s);break;case"headings":d=new hd(o,s);break;case"|":d=new td;break;case"br":d=new Vu;break;case"undo":d=new Id(o,s);break;case"redo":d=new Rd(o,s);break;case"help":d=new fd(o,s);break;case"both":d=new Uu(o,s);break;case"preview":d=new Cd(o,s);break;case"fullscreen":d=new ud(o,s);break;case"upload":d=new Pd(o,s);break;case"record":d=new Nd(o,s);break;case"info":d=new bd(o,s);break;case"edit-mode":d=new ui(o,s);break;case"devtools":d=new ed(o,s);break;case"outdent":d=new Ed(o,s);break;case"indent":d=new gd(o,s);break;case"outline":d=new Ad(o,s);break;case"insert-after":d=new wd(o,s);break;case"insert-before":d=new kd(o,s);break;case"code-theme":d=new Gu(o,s);break;case"content-theme":d=new Xu(o,s);break;case"export":d=new ld(o,s);break;default:d=new Ju(o,s);break}if(d){var f=s.name;return(f==="br"||f==="|")&&(f=f+u),this.elements[f]=d.element,d.element}},i}(),Bd=a(173),Fd=function(){function i(){this.stackSize=50,this.resetStack(),this.dmp=new Bd}return i.prototype.clearStack=function(o){this.resetStack(),this.resetIcon(o)},i.prototype.resetIcon=function(o){o.toolbar&&(this[o.currentMode].undoStack.length>1?S(o.toolbar.elements,["undo"]):k(o.toolbar.elements,["undo"]),this[o.currentMode].redoStack.length!==0?S(o.toolbar.elements,["redo"]):k(o.toolbar.elements,["redo"]))},i.prototype.undo=function(o){if(o[o.currentMode].element.getAttribute("contenteditable")!=="false"&&!(this[o.currentMode].undoStack.length<2)){var s=this[o.currentMode].undoStack.pop();s&&(this[o.currentMode].redoStack.push(s),this.renderDiff(s,o),this[o.currentMode].hasUndo=!0,T(o,["hint"]))}},i.prototype.redo=function(o){if(o[o.currentMode].element.getAttribute("contenteditable")!=="false"){var s=this[o.currentMode].redoStack.pop();s&&(this[o.currentMode].undoStack.push(s),this.renderDiff(s,o,!0))}},i.prototype.recordFirstPosition=function(o,s){if(getSelection().rangeCount!==0&&!(this[o.currentMode].undoStack.length!==1||this[o.currentMode].undoStack[0].length===0||this[o.currentMode].redoStack.length>0)&&!((0,m.vU)()&&s.key==="Backspace")&&!(0,m.G6)()){var u=this.addCaret(o);u.replace("<wbr>","").replace(" vditor-ir__node--expand","")===this[o.currentMode].undoStack[0][0].diffs[0][1].replace("<wbr>","")&&(this[o.currentMode].undoStack[0][0].diffs[0][1]=u,this[o.currentMode].lastText=u)}},i.prototype.addToUndoStack=function(o){var s=this.addCaret(o,!0),u=this.dmp.diff_main(s,this[o.currentMode].lastText,!0),d=this.dmp.patch_make(s,this[o.currentMode].lastText,u);d.length===0&&this[o.currentMode].undoStack.length>0||(this[o.currentMode].lastText=s,this[o.currentMode].undoStack.push(d),this[o.currentMode].undoStack.length>this.stackSize&&this[o.currentMode].undoStack.shift(),this[o.currentMode].hasUndo&&(this[o.currentMode].redoStack=[],this[o.currentMode].hasUndo=!1,k(o.toolbar.elements,["redo"])),this[o.currentMode].undoStack.length>1&&S(o.toolbar.elements,["undo"]))},i.prototype.renderDiff=function(o,s,u){u===void 0&&(u=!1);var d;if(u){var f=this.dmp.patch_deepCopy(o).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(o,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){je(L,s)})),s[s.currentMode].element.querySelector("wbr"))(0,j.ib)(s[s.currentMode].element,s[s.currentMode].element.ownerDocument.createRange()),Bt(s);else{var E=getSelection().getRangeAt(0);E.setEndBefore(s[s.currentMode].element),E.collapse(!1)}yt(s),ct(s,{enableAddUndoStack:!1,enableHint:!1,enableInput:!0}),pr(s),s[s.currentMode].element.querySelectorAll(".vditor-".concat(s.currentMode,"__preview[data-render='2']")).forEach(function(L){je(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(o,s){s===void 0&&(s=!1);var u;if(getSelection().rangeCount!==0&&!o[o.currentMode].element.querySelector("wbr")){var d=getSelection().getRangeAt(0);if(o[o.currentMode].element.contains(d.startContainer)){u=d.cloneRange();var f=document.createElement("span");f.className="vditor-wbr",d.insertNode(f)}}var E=o[o.currentMode].element.cloneNode(!0);E.querySelectorAll(".vditor-".concat(o.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 o[o.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}(),qd=a(673),jd=function(){function i(o){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=o}return i.prototype.merge=function(){var o,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=(o=this.options.preview)===null||o===void 0?void 0:o.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 F=(0,qd.T)(this.defaultOptions,this.options);if(F.cache.enable&&!F.cache.id)throw new Error("need options.cache.id, see https://ld246.com/article/1549638745630#options");return F},i.prototype.mergeToolbar=function(o){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 o.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}(),$d=function(){function i(o){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(o.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(o),Kr(o,this.element),Ui(o,this.element),sr(o,this.element),_i(o,this.element),vt(o,this.element),Xr(o,this.element),di(o,this.element,this.copy),hi(o,this.element,this.copy),o.options.comment.enable&&(this.selectPopover.querySelector("button").onclick=function(){var d=Lute.NewNodeID(),f=getSelection().getRangeAt(0),E=f.cloneRange(),L=f.extractContents(),D,_,F=!1,X=!1;L.childNodes.forEach(function(pe,Se){var ke=!1;if(pe.nodeType===3?ke=!0:pe.classList.contains("vditor-comment")?pe.classList.contains("vditor-comment")&&pe.setAttribute("data-cmtids",pe.getAttribute("data-cmtids")+" "+d):ke=!0,ke)if(pe.nodeType!==3&&pe.getAttribute("data-block")==="0"&&Se===0&&E.startOffset>0)pe.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(pe.innerHTML,"</span>"),D=pe;else if(pe.nodeType!==3&&pe.getAttribute("data-block")==="0"&&Se===L.childNodes.length-1&&E.endOffset<E.endContainer.textContent.length)pe.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(pe.innerHTML,"</span>"),_=pe;else if(pe.nodeType!==3&&pe.getAttribute("data-block")==="0")Se===0?F=!0:Se===L.childNodes.length-1&&(X=!0),pe.innerHTML='<span class="vditor-comment" data-cmtids="'.concat(d,'">').concat(pe.innerHTML,"</span>");else{var me=document.createElement("span");me.classList.add("vditor-comment"),me.setAttribute("data-cmtids",d),pe.parentNode.insertBefore(me,pe),me.appendChild(pe)}});var be=(0,y.F9)(E.startContainer);be&&(D?(be.insertAdjacentHTML("beforeend",D.innerHTML),D.remove()):be.textContent.trim().replace(c.g.ZWSP,"")===""&&F&&be.remove());var xe=(0,y.F9)(E.endContainer);xe&&(_?(xe.insertAdjacentHTML("afterbegin",_.innerHTML),_.remove()):xe.textContent.trim().replace(c.g.ZWSP,"")===""&&X&&xe.remove()),f.insertNode(L),o.options.comment.add(d,f.toString(),s.getComments(o,!0)),He(o,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1}),s.hideComment()})}return i.prototype.getComments=function(o,s){var u=this;if(s===void 0&&(s=!1),o.currentMode==="wysiwyg"&&o.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(o){var s=function(f,E){var L=new Set(E);return f.filter(function(D){return!L.has(D)})};if(o.currentMode==="wysiwyg"&&o.options.comment.enable&&o.wysiwyg.commentIds.length>0){var u=JSON.parse(JSON.stringify(this.commentIds));this.getComments(o);var d=s(u,this.commentIds);d.length>0&&o.options.comment.remove(d)}},i.prototype.showComment=function(){var o=(0,j.Ny)(this.element);this.selectPopover.setAttribute("style","left:".concat(o.left,"px;display:block;top:").concat(Math.max(-8,o.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(o,s){var u=getSelection().getRangeAt(0);if(u.toString()!==""){o.stopPropagation(),o.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()+"`",o.clipboardData.setData("text/plain",E),o.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(_,'"')),o.clipboardData.setData("text/plain","[".concat(u.toString(),"](").concat(L.getAttribute("href")).concat(_,")")),o.clipboardData.setData("text/html","");return}var F=document.createElement("div");F.appendChild(u.cloneContents()),o.clipboardData.setData("text/plain",s.lute.VditorDOM2Md(F.innerHTML).trim()),o.clipboardData.setData("text/html","")}},i.prototype.bindEvent=function(o){var s=this;this.unbindListener(),window.addEventListener("scroll",this.scrollListener=function(){if(T(o,["hint"]),!(s.popover.style.display!=="block"||s.selectPopover.style.display!=="block")){var u=parseInt(s.popover.getAttribute("data-top"),10);if(o.options.height!=="auto"){if(o.options.toolbarConfig.pin&&o.toolbar.element.getBoundingClientRect().top===0){var d=Math.max(window.scrollY-o.element.offsetTop-8,Math.min(u-o.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(!o.options.toolbarConfig.pin)return;var f=Math.max(u,window.scrollY-o.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(T(o,["hint"]),o.options.comment&&o.options.comment.enable&&o.options.comment.scroll&&o.options.comment.scroll(o.wysiwyg.element.scrollTop),s.popover.style.display==="block"){var u=parseInt(s.popover.getAttribute("data-top"),10)-o.wysiwyg.element.scrollTop,d=-8;o.options.toolbarConfig.pin&&o.toolbar.element.getBoundingClientRect().top===0&&(d=window.scrollY-o.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){ya(o,u,{pasteCode:function(d){var f=(0,j.zh)(o),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=o.lute.SpinVditorDOM(L.outerHTML):o.wysiwyg.element.innerHTML=o.lute.SpinVditorDOM(o.wysiwyg.element.innerHTML),(0,j.ib)(o.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===""){yt(o);return}(0,m.vU)()||On(o,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,He(o);return}if(s.composingLock||u.data===""||u.data==="“"||u.data==="《"){He(o);return}var d=getSelection().getRangeAt(0),f=(0,y.F9)(d.startContainer);if(f||(Rn(o,d),f=(0,y.F9)(d.startContainer)),!!f){for(var E=(0,j.im)(f,o.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 F=(0,N.W)(getSelection().getRangeAt(0).startContainer);if(F&&F.textContent===""&&(yt(o),F.remove()),L&&f.getAttribute("data-type")!=="code-block"||_||No(f.innerHTML)||_o(f.innerHTML)&&f.previousElementSibling){typeof o.options.input=="function"&&o.options.input(v(o));return}u.inputType==="insertParagraph"&&s.element.innerHTML==="<p><br></p><p><br></p>"&&f.previousElementSibling.remove(),On(o,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)),He(o);return}if(u.target.tagName==="IMG"&&!u.target.parentElement.classList.contains("vditor-wysiwyg__preview")){u.target.getAttribute("data-type")==="link-ref"?Gr(o,u.target):zn(u,o);return}var f=(0,y.lG)(u.target,"A");if(f){o.options.link.click?o.options.link.click(f):o.options.link.isOpen&&window.open(f.getAttribute("href")),u.preventDefault();return}var E=(0,j.zh)(o);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)))}Pn(o);var D=(0,y.fb)(u.target,"vditor-wysiwyg__preview");D||(D=(0,y.fb)((0,j.zh)(o).startContainer,"vditor-wysiwyg__preview")),D&&Cn(D,o),It(u,o)}),this.element.addEventListener("keyup",function(u){if(!(u.isComposing||(0,m.yl)(u))){u.key==="Enter"&&Bt(o),(u.key==="Backspace"||u.key==="Delete")&&o.wysiwyg.element.innerHTML!==""&&o.wysiwyg.element.childNodes.length===1&&o.wysiwyg.element.firstElementChild&&o.wysiwyg.element.firstElementChild.tagName==="P"&&o.wysiwyg.element.firstElementChild.childElementCount===0&&(o.wysiwyg.element.textContent===""||o.wysiwyg.element.textContent===`
`)&&(o.wysiwyg.element.innerHTML="");var d=(0,j.zh)(o);if(u.key==="Backspace"&&(0,m.vU)()&&d.startContainer.textContent===`
`&&d.startOffset===1&&(d.startContainer.textContent=""),Rn(o,d),Pn(o),!(u.key!=="ArrowDown"&&u.key!=="ArrowRight"&&u.key!=="Backspace"&&u.key!=="ArrowLeft"&&u.key!=="ArrowUp")){(u.key==="ArrowLeft"||u.key==="ArrowRight")&&o.hint.render(o);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"?Cn(f,o):Cn(f,o,!1);return}var D=f.previousElementSibling;if(D.tagName==="PRE"&&(D=D.firstElementChild),u.key==="ArrowDown"||u.key==="ArrowRight"){var E=f.parentElement,_=Mn(E);if(_&&_.nodeType!==3){var F=_.querySelector(".vditor-wysiwyg__preview");if(F){Cn(F,o);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}(),Ud=function(){var i=function(o,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(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");i(o,s);function u(){this.constructor=o}o.prototype=s===null?Object.create(s):(u.prototype=s.prototype,new u)}}(),Vd=function(i){Ud(o,i);function o(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 jd(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 o.prototype.showErrorTip=function(s){var u=new tl;document.body.appendChild(u.element),u.show(s,0)},o.prototype.updateToolbarConfig=function(s){this.vditor.toolbar.updateConfig(this.vditor,s)},o.prototype.setTheme=function(s,u,d,f){this.vditor.options.theme=s,ve(this.vditor),u&&(this.vditor.options.preview.theme.current=u,(0,ce.Z)(u,f||this.vditor.options.preview.theme.path)),d&&(this.vditor.options.preview.hljs.style=d,(0,nl.Y)(d,this.vditor.options.cdn))},o.prototype.getValue=function(){return v(this.vditor)},o.prototype.getCurrentMode=function(){return this.vditor.currentMode},o.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()},o.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()},o.prototype.disabled=function(){T(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")},o.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")},o.prototype.getSelection=function(){if(this.vditor.currentMode==="wysiwyg")return tr(this.vditor.wysiwyg.element);if(this.vditor.currentMode==="sv")return tr(this.vditor.sv.element);if(this.vditor.currentMode==="ir")return tr(this.vditor.ir.element)},o.prototype.renderPreview=function(s){this.vditor.preview.render(this.vditor,s)},o.prototype.getCursorPosition=function(){return(0,j.Ny)(this.vditor[this.vditor.currentMode].element)},o.prototype.isUploading=function(){return this.vditor.upload.isUploading},o.prototype.clearCache=function(){this.vditor.options.cache.enable&&(0,m.pK)()&&localStorage.removeItem(this.vditor.options.cache.id)},o.prototype.disabledCache=function(){this.vditor.options.cache.enable=!1},o.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},o.prototype.html2md=function(s){return this.vditor.lute.HTML2Md(s)},o.prototype.exportJSON=function(s){return this.vditor.lute.RenderJSON(s)},o.prototype.getHTML=function(){return Qs(this.vditor)},o.prototype.tip=function(s,u){this.vditor.tip.show(s,u)},o.prototype.setPreviewMode=function(s){Oo(s,this.vditor)},o.prototype.deleteValue=function(){window.getSelection().isCollapsed||document.execCommand("delete",!1)},o.prototype.updateValue=function(s){document.execCommand("insertHTML",!1,s)},o.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&&On(this.vditor,getSelection().getRangeAt(0)):this.vditor.currentMode==="ir"&&(this.vditor.ir.preventInput=!0,u&&Mt(this.vditor,getSelection().getRangeAt(0),!0))},o.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):he(this.vditor,s),this.vditor.outline.render(this.vditor),ct(this.vditor)},o.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>"),ne(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})):this.vditor.currentMode==="wysiwyg"?Li(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){je(f,d.vditor)}),lr(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})),this.vditor.outline.render(this.vditor),s||(T(this.vditor,["emoji","headings","submenu","hint"]),this.vditor.wysiwyg.popover&&(this.vditor.wysiwyg.popover.style.display="none"),this.clearCache()),u&&this.clearStack()},o.prototype.insertEmptyBlock=function(s){Ni(this.vditor,s)},o.prototype.clearStack=function(){this.vditor.undo.clearStack(this.vditor),this.vditor.undo.addToUndoStack(this.vditor)},o.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},o.prototype.getCommentIds=function(){return this.vditor.currentMode!=="wysiwyg"?[]:this.vditor.wysiwyg.getComments(this.vditor,!0)},o.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)})}},o.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)})}},o.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)})}),He(this.vditor,{enableAddUndoStack:!0,enableHint:!1,enableInput:!1})}},o.prototype.init=function(s,u){var d=this;this.isDestroyed||(this.vditor={currentMode:u.mode,element:s,hint:new Iu(u.hint.extend),lute:void 0,options:u,originalInnerHTML:s.innerHTML,outline:new zu(window.VditorI18n.outline),tip:new tl},this.vditor.sv=new ju(this.vditor),this.vditor.undo=new Fd,this.vditor.wysiwyg=new $d(this.vditor),this.vditor.ir=new Hu(this.vditor),this.vditor.toolbar=new zd(this.vditor),u.resize.enable&&(this.vditor.resize=new qu(this.vditor)),this.vditor.toolbar.elements.devtools&&(this.vditor.devtools=new g),(u.upload.url||u.upload.handler)&&(this.vditor.upload=new Ot),(0,b.G)(u._lutePath||"".concat(u.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then(function(){d.vditor.lute=(0,Pu.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 Fu(d.vditor),Ee(d.vditor),u.after&&u.after(),u.icon&&(0,b.J)("".concat(u.cdn,"/dist/js/icons/").concat(u.icon,".js"),"vditorIconScript")}))},o}(h.default);const Wd=Vd})(),l=l.default,l})()})})(F2);var Yk=F2.exports;const Jk=j6(Yk),Qk=Object.freeze(Object.defineProperty({__proto__:null,default:Jk},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:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};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 q2=new sn.Renderer;q2.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 a=r;r.includes("cdn-mineru.openxlab.org.cn")&&(a=`/proxy-image${r.replace("https://cdn-mineru.openxlab.org.cn","")}`);const l=n||"图片",h=e?` title="${e}"`:"";return`<img src="${a}" 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);" />`};sn.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:q2});const eS=t=>{if(!t||typeof t!="string")return"";try{const e=tS(t),n=sn.parse(e);return nS(n)}catch(e){return`<div class="markdown-error">渲染失败: ${e.message}</div>`}},tS=t=>t.replace(/\$\$([\s\S]*?)\$\$/g,(e,n)=>{try{return`<div class="math-block">${Og.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">${Og.renderToString(n.trim(),{displayMode:!1,throwOnError:!1})}</span>`}catch{return`<span class="math-error">数学公式错误: ${n}</span>`}return e}),nS=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 a=r.className.match(/language-(\w+)/);if(a)try{r.innerHTML=Qm.highlight(r.textContent,Qm.languages[a[1]],a[1])}catch{}}),n.innerHTML};function rS(t,e){return async function(...n){const r=this.before[e];r&&!await r.apply(this,n)||t.apply(this,n)}}const Ig=Object.keys(T6),j2={};for(let t=0;t<Ig.length;t++){const e=Ig[t];j2[e]=rS(T6[e],e)}const iS={getObjById:mc,generateNewObj:o7,layout:g7,linkDiv:c8,editTopic:a8,editTableNode:o8,convertTableHTMLToMarkdown:s8,renderMarkdownToHTML:eS,createWrapper:t8,createParent:n8,createChildren:r8,createTopic:i8,findEle:p6,changeTheme:P8,...Cw,...j2,...$w,...t9,...p9,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,Ao(this.nodeData),this.arrows=t.arrows||[],this.summaries=t.summaries||[],this.tidyArrow(),this.toolBar&&L8(this),this.keypress&&p7(this,this.keypress),this.editable&&H8(this),this.contextMenu&&this.disposable.push(u8(this,this.contextMenu)),this.draggable&&this.disposable.push(f8(this)),this.allowUndo&&this.disposable.push(g8(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 aS({pT:t,pL:e,pW:n,pH:r,cT:a,cL:l,cW:h,cH:c,direction:p,containerHeight:v}){let b=e+n/2;const g=t+r/2;let m;p===ki.LHS?m=l+h:m=l;const x=a+c/2,w=(1-Math.abs(x-g)/v)*.25*(n/2);return p===ki.LHS?b=b-n/10-w:b=b+n/10+w,`M ${b} ${g} Q ${b} ${x} ${m} ${x}`}function oS({pT:t,pL:e,pW:n,pH:r,cT:a,cL:l,cW:h,cH:c,direction:p,isFirst:v}){let b=e+n/2;const g=t+r/2;let m;p===ki.LHS?m=l+h-31:m=l+31;const x=a+c/2,w=this.container.offsetHeight||1e3,S=(1-Math.abs(x-g)/w)*.25*(n/2);return p===ki.LHS?b=b-n/10-S:b=b+n/10+S,`M ${b} ${g} Q ${b} ${x} ${m} ${x}`}const sS="5.1.1";function lS(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 gl=document;function fr({el:t,direction:e,locale:n,draggable:r,editable:a,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:A,scaleMax:T,scaleMin:M,handleWheel:y,markdown:N,imageProxy:z,enableNodeBorder:q}){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=a??!0,this.allowUndo=m??!0,this.scaleSensitivity=A??.1,this.scaleMax=T??1.4,this.scaleMin=M??.2,this.generateMainBranch=x||aS,this.generateSubBranch=w||oS,this.overflowHidden=S??!1,this.alignment=C??"root",this.handleWheel=y??!0,this.markdown=N||void 0,this.imageProxy=z||void 0,this.enableNodeBorder=q??!1,this.currentNodes=[],this.currentArrow=null,this.scaleVal=1,this.tempDirection=null,this.dragMoveHelper=lS(this),this.bus=m7(),this.container=gl.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?wf:yf);const ue=gl.createElement("div");ue.className="map-canvas",this.map=ue,this.container.setAttribute("tabindex","0"),this.container.appendChild(this.map),this.el.appendChild(this.container),this.nodes=gl.createElement("me-nodes"),this.lines=Ml("lines"),this.summarySvg=Ml("summary"),this.linkController=Ml("linkcontroller"),this.P2=gl.createElement("div"),this.P3=gl.createElement("div"),this.P2.className=this.P3.className="circle",this.P2.style.display=this.P3.style.display="none",this.line1=Dm(),this.line2=Dm(),this.linkController.appendChild(this.line1),this.linkController.appendChild(this.line2),this.linkSvgGroup=Ml("topiclinks"),this.map.appendChild(this.nodes),this.overflowHidden?this.container.style.overflow="hidden":this.disposable.push(f7(this))}fr.prototype=iS;Object.defineProperty(fr.prototype,"currentNode",{get(){return this.currentNodes[this.currentNodes.length-1]},enumerable:!0});fr.LEFT=0;fr.RIGHT=1;fr.SIDE=2;fr.THEME=yf;fr.DARK_THEME=wf;fr.version=sS;fr.E=p6;fr.new=t=>({nodeData:{id:es(),topic:t||"new topic",children:[]}});function p1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var is=p1();function $2(t){is=t}var Fl={exec:()=>null};function mn(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(a,l)=>{let h=typeof l=="string"?l:l.source;return h=h.replace(Or.caret,"$1"),n=n.replace(a,h),r},getRegex:()=>new RegExp(n,e)};return r}var Or={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")},cS=/^(?:[ \t]*(?:\n|$))+/,uS=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,dS=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,l0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hS=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,f1=/(?:[*+-]|\d{1,9}[.)])/,U2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,V2=mn(U2).replace(/bull/g,f1).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(),pS=mn(U2).replace(/bull/g,f1).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(),m1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,fS=/^[^\n]+/,g1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,mS=mn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",g1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gS=mn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,f1).getRegex(),pu="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",v1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,vS=mn("^ {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",v1).replace("tag",pu).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W2=mn(m1).replace("hr",l0).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",pu).getRegex(),bS=mn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",W2).getRegex(),b1={blockquote:bS,code:uS,def:mS,fences:dS,heading:hS,hr:l0,html:vS,lheading:V2,list:gS,newline:cS,paragraph:W2,table:Fl,text:fS},Hg=mn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",l0).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",pu).getRegex(),yS={...b1,lheading:pS,table:Hg,paragraph:mn(m1).replace("hr",l0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hg).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",pu).getRegex()},wS={...b1,html:mn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",v1).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:Fl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:mn(m1).replace("hr",l0).replace("heading",` *#{1,6} *[^
]`).replace("lheading",V2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},xS=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kS=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,G2=/^( {2,}|\\)\n(?!\s*$)/,SS=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fu=/[\p{P}\p{S}]/u,y1=/[\s\p{P}\p{S}]/u,K2=/[^\s\p{P}\p{S}]/u,ES=mn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,y1).getRegex(),X2=/(?!~)[\p{P}\p{S}]/u,TS=/(?!~)[\s\p{P}\p{S}]/u,AS=/(?:[^\s\p{P}\p{S}]|~)/u,MS=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Z2=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,CS=mn(Z2,"u").replace(/punct/g,fu).getRegex(),LS=mn(Z2,"u").replace(/punct/g,X2).getRegex(),Y2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_S=mn(Y2,"gu").replace(/notPunctSpace/g,K2).replace(/punctSpace/g,y1).replace(/punct/g,fu).getRegex(),NS=mn(Y2,"gu").replace(/notPunctSpace/g,AS).replace(/punctSpace/g,TS).replace(/punct/g,X2).getRegex(),DS=mn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,K2).replace(/punctSpace/g,y1).replace(/punct/g,fu).getRegex(),RS=mn(/\\(punct)/,"gu").replace(/punct/g,fu).getRegex(),OS=mn(/^<(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(),IS=mn(v1).replace("(?:-->|$)","-->").getRegex(),HS=mn("^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",IS).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Nc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,PS=mn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Nc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J2=mn(/^!?\[(label)\]\[(ref)\]/).replace("label",Nc).replace("ref",g1).getRegex(),Q2=mn(/^!?\[(ref)\](?:\[\])?/).replace("ref",g1).getRegex(),zS=mn("reflink|nolink(?!\\()","g").replace("reflink",J2).replace("nolink",Q2).getRegex(),w1={_backpedal:Fl,anyPunctuation:RS,autolink:OS,blockSkip:MS,br:G2,code:kS,del:Fl,emStrongLDelim:CS,emStrongRDelimAst:_S,emStrongRDelimUnd:DS,escape:xS,link:PS,nolink:Q2,punctuation:ES,reflink:J2,reflinkSearch:zS,tag:HS,text:SS,url:Fl},BS={...w1,link:mn(/^!?\[(label)\]\((.*?)\)/).replace("label",Nc).getRegex(),reflink:mn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nc).getRegex()},Np={...w1,emStrongRDelimAst:NS,emStrongLDelim:LS,url:mn(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},FS={...Np,br:mn(G2).replace("{2,}","*").getRegex(),text:mn(Np.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},R0={normal:b1,gfm:yS,pedantic:wS},vl={normal:w1,gfm:Np,breaks:FS,pedantic:BS},qS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Pg=t=>qS[t];function Yi(t,e){if(e){if(Or.escapeTest.test(t))return t.replace(Or.escapeReplace,Pg)}else if(Or.escapeTestNoEncode.test(t))return t.replace(Or.escapeReplaceNoEncode,Pg);return t}function zg(t){try{t=encodeURI(t).replace(Or.percentDecode,"%")}catch{return null}return t}function Bg(t,e){var l;let n=t.replace(Or.findPipe,(h,c,p)=>{let v=!1,b=c;for(;--b>=0&&p[b]==="\\";)v=!v;return v?"|":" |"}),r=n.split(Or.splitPipe),a=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(;a<r.length;a++)r[a]=r[a].trim().replace(Or.slashPipe,"|");return r}function bl(t,e,n){let r=t.length;if(r===0)return"";let a=0;for(;a<r;){let l=t.charAt(r-a-1);if(l===e&&!n)a++;else if(l!==e&&n)a++;else break}return t.slice(0,r-a)}function jS(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,a){let l=e.href,h=e.title||null,c=t[1].replace(a.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 $S(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let a=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>=a.length?l.slice(a.length):l}).join(`
`)}var Dc=class{constructor(t){Sn(this,"options");Sn(this,"rules");Sn(this,"lexer");this.options=t||is}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:bl(n,`
`)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=$S(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=bl(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:bl(e[0],`
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=bl(e[0],`
`).split(`
`),r="",a="",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,a=a?`${a}
${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,a=a.substring(0,a.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,a=a.substring(0,a.length-x.raw.length)+S.raw,n=w.substring(l.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:r,tokens:l,text:a}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,a={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),A=this.rules.other.hrRegex(w),T=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," "),T.test(m)||M.test(m)||y.test(m)||C.test(m)||A.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||T.test(g)||M.test(g)||A.test(g))break;b+=`
`+m}!x&&!m.trim()&&(x=!0),v+=N+`
`,t=t.substring(N.length+1),g=z.slice(w)}}a.loose||(h?a.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,""))),a.items.push({type:"list_item",raw:v,task:!!S,checked:k,loose:!1,text:b,tokens:[]}),a.raw+=v}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let p=0;p<a.items.length;p++)if(this.lexer.state.top=!1,a.items[p].tokens=this.lexer.blockTokens(a.items[p].text,[]),!a.loose){let v=a.items[p].tokens.filter(g=>g.type==="space"),b=v.length>0&&v.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=b}if(a.loose)for(let p=0;p<a.items.length;p++)a.items[p].loose=!0;return a}}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"):"",a=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:a}}}table(t){var h;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Bg(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(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 a)l.rows.push(Bg(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=bl(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=jS(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],a="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(r);l&&(r=l[1],a=l[3])}else a=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:a&&a.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," "),a=e[r.toLowerCase()];if(!a){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return Fg(n,a,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 a=[...r[0]].length-1,l,h,c=a,p=0,v=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(v.lastIndex=0,e=e.slice(-1*t.length+a);(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])&&a%3&&!((a+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,a+r.index+b+h);if(Math.min(a,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),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&a&&(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,a;if(e[2]==="@")r=e[0],a="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."?a="http://"+e[0]:a=e[0]}return{type:"link",raw:e[0],text:r,href:a,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}}}},Pa=class Dp{constructor(e){Sn(this,"tokens");Sn(this,"options");Sn(this,"state");Sn(this,"tokenizer");Sn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||is,this.options.tokenizer=this.options.tokenizer||new Dc,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:Or,block:R0.normal,inline:vl.normal};this.options.pedantic?(n.block=R0.pedantic,n.inline=vl.pedantic):this.options.gfm&&(n.block=R0.gfm,this.options.breaks?n.inline=vl.breaks:n.inline=vl.gfm),this.tokenizer.rules=n}static get rules(){return{block:R0,inline:vl}}static lex(e,n){return new Dp(n).lex(e)}static lexInline(e,n){return new Dp(n).inlineTokens(e)}lex(e){e=e.replace(Or.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 a,l,h;for(this.options.pedantic&&(e=e.replace(Or.tabCharGlobal," ").replace(Or.spaceLine,""));e;){let c;if((l=(a=this.options.extensions)==null?void 0:a.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,a=null;if(this.tokens.links){let b=Object.keys(this.tokens.links);if(b.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)b.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,a.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,a.index)+"["+"a".repeat(a[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}},Rc=class{constructor(t){Sn(this,"options");Sn(this,"parser");this.options=t||is}space(t){return""}code({text:t,lang:e,escaped:n}){var l;let r=(l=(e||"").match(Or.notSpaceStart))==null?void 0:l[0],a=t.replace(Or.endingNewline,"")+`
`;return r?'<pre><code class="language-'+Yi(r)+'">'+(n?a:Yi(a,!0))+`</code></pre>
`:"<pre><code>"+(n?a:Yi(a,!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 a=e?"ol":"ul",l=e&&n!==1?' start="'+n+'"':"";return"<"+a+l+`>
`+r+"</"+a+`>
`}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+" "+Yi(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 a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);e+=this.tablerow({text:n});let r="";for(let a=0;a<t.rows.length;a++){let l=t.rows[a];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>${Yi(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),a=zg(t);if(a===null)return r;t=a;let l='<a href="'+t+'"';return e&&(l+=' title="'+Yi(e)+'"'),l+=">"+r+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let a=zg(t);if(a===null)return Yi(n);t=a;let l=`<img src="${t}" alt="${n}"`;return e&&(l+=` title="${Yi(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Yi(t.text)}},x1=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""}},za=class Rp{constructor(e){Sn(this,"options");Sn(this,"renderer");Sn(this,"textRenderer");this.options=e||is,this.options.renderer=this.options.renderer||new Rc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new x1}static parse(e,n){return new Rp(n).parse(e)}static parseInline(e,n){return new Rp(n).parseInline(e)}parse(e,n=!0){var a,l;let r="";for(let h=0;h<e.length;h++){let c=e[h];if((l=(a=this.options.extensions)==null?void 0:a.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 a,l;let r="";for(let h=0;h<e.length;h++){let c=e[h];if((l=(a=this.options.extensions)==null?void 0:a.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}},Kh,ec=(Kh=class{constructor(t){Sn(this,"options");Sn(this,"block");this.options=t||is}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Pa.lex:Pa.lexInline}provideParser(){return this.block?za.parse:za.parseInline}},Sn(Kh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Kh),US=class{constructor(...t){Sn(this,"defaults",p1());Sn(this,"options",this.setOptions);Sn(this,"parse",this.parseMarkdown(!0));Sn(this,"parseInline",this.parseMarkdown(!1));Sn(this,"Parser",za);Sn(this,"Renderer",Rc);Sn(this,"TextRenderer",x1);Sn(this,"Lexer",Pa);Sn(this,"Tokenizer",Dc);Sn(this,"Hooks",ec);this.use(...t)}walkTokens(t,e){var r,a;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;(a=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&a[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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let l=e.renderers[a.name];l?e.renderers[a.name]=function(...h){let c=a.renderer.apply(this,h);return c===!1&&(c=l.apply(this,h)),c}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[a.level];l?l.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),n.renderer){let a=this.defaults.renderer||new Rc(this.defaults);for(let l in n.renderer){if(!(l in a))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let h=l,c=n.renderer[h],p=a[h];a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b||""}}r.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Dc(this.defaults);for(let l in n.tokenizer){if(!(l in a))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let h=l,c=n.tokenizer[h],p=a[h];a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b}}r.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new ec;for(let l in n.hooks){if(!(l in a))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let h=l,c=n.hooks[h],p=a[h];ec.passThroughHooks.has(l)?a[h]=v=>{if(this.defaults.async)return Promise.resolve(c.call(a,v)).then(g=>p.call(a,g));let b=c.call(a,v);return p.call(a,b)}:a[h]=(...v)=>{let b=c.apply(a,v);return b===!1&&(b=p.apply(a,v)),b}}r.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,l=n.walkTokens;r.walkTokens=function(h){let c=[];return c.push(l.call(this,h)),a&&(c=c.concat(a.call(this,h))),c}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Pa.lex(t,e??this.defaults)}parser(t,e){return za.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},a={...this.defaults,...r},l=this.onError(!!a.silent,!!a.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"));a.hooks&&(a.hooks.options=a,a.hooks.block=t);let h=a.hooks?a.hooks.provideLexer():t?Pa.lex:Pa.lexInline,c=a.hooks?a.hooks.provideParser():t?za.parse:za.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(e):e).then(p=>h(p,a)).then(p=>a.hooks?a.hooks.processAllTokens(p):p).then(p=>a.walkTokens?Promise.all(this.walkTokens(p,a.walkTokens)).then(()=>p):p).then(p=>c(p,a)).then(p=>a.hooks?a.hooks.postprocess(p):p).catch(l);try{a.hooks&&(e=a.hooks.preprocess(e));let p=h(e,a);a.hooks&&(p=a.hooks.processAllTokens(p)),a.walkTokens&&this.walkTokens(p,a.walkTokens);let v=c(p,a);return a.hooks&&(v=a.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>"+Yi(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},Jo=new US;function rn(t,e){return Jo.parse(t,e)}rn.options=rn.setOptions=function(t){return Jo.setOptions(t),rn.defaults=Jo.defaults,$2(rn.defaults),rn};rn.getDefaults=p1;rn.defaults=is;rn.use=function(...t){return Jo.use(...t),rn.defaults=Jo.defaults,$2(rn.defaults),rn};rn.walkTokens=function(t,e){return Jo.walkTokens(t,e)};rn.parseInline=Jo.parseInline;rn.Parser=za;rn.parser=za.parse;rn.Renderer=Rc;rn.TextRenderer=x1;rn.Lexer=Pa;rn.lexer=Pa.lex;rn.Tokenizer=Dc;rn.Hooks=ec;rn.parse=rn;rn.options;rn.setOptions;rn.use;rn.walkTokens;rn.parseInline;za.parse;Pa.lex;var e3={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 a=/(?:^|\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 A(T){return T instanceof p?new p(T.type,A(T.content),T.alias):Array.isArray(T)?T.map(A):T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(A){return Object.prototype.toString.call(A).slice(8,-1)},objId:function(A){return A.__id||Object.defineProperty(A,"__id",{value:++l}),A.__id},clone:function A(T,M){M=M||{};var y,N;switch(c.util.type(T)){case"Object":if(N=c.util.objId(T),M[N])return M[N];y={},M[N]=y;for(var z in T)T.hasOwnProperty(z)&&(y[z]=A(T[z],M));return y;case"Array":return N=c.util.objId(T),M[N]?M[N]:(y=[],M[N]=y,T.forEach(function(q,P){y[P]=A(q,M)}),y);default:return T}},getLanguage:function(A){for(;A;){var T=a.exec(A.className);if(T)return T[1].toLowerCase();A=A.parentElement}return"none"},setLanguage:function(A,T){A.className=A.className.replace(RegExp(a,"gi"),""),A.classList.add("language-"+T)},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 A=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack)||[])[1];if(A){var T=document.getElementsByTagName("script");for(var M in T)if(T[M].src==A)return T[M]}return null}},isActive:function(A,T,M){for(var y="no-"+T;A;){var N=A.classList;if(N.contains(T))return!0;if(N.contains(y))return!1;A=A.parentElement}return!!M}},languages:{plain:h,plaintext:h,text:h,txt:h,extend:function(A,T){var M=c.util.clone(c.languages[A]);for(var y in T)M[y]=T[y];return M},insertBefore:function(A,T,M,y){y=y||c.languages;var N=y[A],z={};for(var q in N)if(N.hasOwnProperty(q)){if(q==T)for(var P in M)M.hasOwnProperty(P)&&(z[P]=M[P]);M.hasOwnProperty(q)||(z[q]=N[q])}var Y=y[A];return y[A]=z,c.languages.DFS(c.languages,function(te,ue){ue===Y&&te!=A&&(this[te]=z)}),z},DFS:function A(T,M,y,N){N=N||{};var z=c.util.objId;for(var q in T)if(T.hasOwnProperty(q)){M.call(T,q,T[q],y||q);var P=T[q],Y=c.util.type(P);Y==="Object"&&!N[z(P)]?(N[z(P)]=!0,A(P,M,null,N)):Y==="Array"&&!N[z(P)]&&(N[z(P)]=!0,A(P,M,q,N))}}},plugins:{},highlightAll:function(A,T){c.highlightAllUnder(document,A,T)},highlightAllUnder:function(A,T,M){var y={callback:M,container:A,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,T===!0,y.callback)},highlightElement:function(A,T,M){var y=c.util.getLanguage(A),N=c.languages[y];c.util.setLanguage(A,y);var z=A.parentElement;z&&z.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(z,y);var q=A.textContent,P={element:A,language:y,grammar:N,code:q};function Y(ue){P.highlightedCode=ue,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(T&&r.Worker){var te=new Worker(c.filename);te.onmessage=function(ue){Y(ue.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(A,T,M){var y={code:A,grammar:T,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(A,T){var M=T.rest;if(M){for(var y in M)T[y]=M[y];delete T.rest}var N=new g;return m(N,N.head,A),b(A,N,T,N.head,0),w(N)},hooks:{all:{},add:function(A,T){var M=c.hooks.all;M[A]=M[A]||[],M[A].push(T)},run:function(A,T){var M=c.hooks.all[A];if(!(!M||!M.length))for(var y=0,N;N=M[y++];)N(T)}},Token:p};r.Prism=c;function p(A,T,M,y){this.type=A,this.content=T,this.alias=M,this.length=(y||"").length|0}p.stringify=function A(T,M){if(typeof T=="string")return T;if(Array.isArray(T)){var y="";return T.forEach(function(Y){y+=A(Y,M)}),y}var N={type:T.type,content:A(T.content,M),tag:"span",classes:["token",T.type],attributes:{},language:M},z=T.alias;z&&(Array.isArray(z)?Array.prototype.push.apply(N.classes,z):N.classes.push(z)),c.hooks.run("wrap",N);var q="";for(var P in N.attributes)q+=" "+P+'="'+(N.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+N.tag+' class="'+N.classes.join(" ")+'"'+q+">"+N.content+"</"+N.tag+">"};function v(A,T,M,y){A.lastIndex=T;var N=A.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(A,T,M,y,N,z){for(var q in M)if(!(!M.hasOwnProperty(q)||!M[q])){var P=M[q];P=Array.isArray(P)?P:[P];for(var Y=0;Y<P.length;++Y){if(z&&z.cause==q+","+Y)return;var te=P[Y],ue=te.inside,Le=!!te.lookbehind,qe=!!te.greedy,Xe=te.alias;if(qe&&!te.pattern.global){var it=te.pattern.toString().match(/[imsuy]*$/)[0];te.pattern=RegExp(te.pattern.source,it+"g")}for(var $e=te.pattern||te,De=y.next,nt=N;De!==T.tail&&!(z&&nt>=z.reach);nt+=De.value.length,De=De.next){var ut=De.value;if(T.length>A.length)return;if(!(ut instanceof p)){var je=1,j;if(qe){if(j=v($e,nt,A,Le),!j||j.index>=A.length)break;var Mt=j.index,yt=j.index+j[0].length,It=nt;for(It+=De.value.length;Mt>=It;)De=De.next,It+=De.value.length;if(It-=De.value.length,nt=It,De.value instanceof p)continue;for(var bt=De;bt!==T.tail&&(It<yt||typeof bt.value=="string");bt=bt.next)je++,It+=bt.value.length;je--,ut=A.slice(nt,It),j.index-=nt}else if(j=v($e,0,ut,Le),!j)continue;var Mt=j.index,se=j[0],fe=ut.slice(0,Mt),J=ut.slice(Mt+se.length),Q=nt+ut.length;z&&Q>z.reach&&(z.reach=Q);var Ie=De.prev;fe&&(Ie=m(T,Ie,fe),nt+=fe.length),x(T,Ie,je);var de=new p(q,ue?c.tokenize(se,ue):se,Xe,se);if(De=m(T,Ie,de),J&&m(T,De,J),je>1){var W={cause:q+","+Y,reach:Q};b(A,T,M,De.prev,nt,W),z&&W.reach>z.reach&&(z.reach=W.reach)}}}}}}function g(){var A={value:null,prev:null,next:null},T={value:null,prev:A,next:null};A.next=T,this.head=A,this.tail=T,this.length=0}function m(A,T,M){var y=T.next,N={value:M,prev:T,next:y};return T.next=N,y.prev=N,A.length++,N}function x(A,T,M){for(var y=T.next,N=0;N<M&&y!==A.tail;N++)y=y.next;T.next=y,y.prev=T,A.length-=N}function w(A){for(var T=[],M=A.head.next;M!==A.tail;)T.push(M.value),M=M.next;return T}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(A){var T=JSON.parse(A.data),M=T.language,y=T.code,N=T.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 lp<"u"&&(lp.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(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(a,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[a]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:c},n.languages.insertBefore("markup","cdata",p)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,a){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:[a,"language-"+a],inside:n.languages[a]},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 a=/(?:"(?:\\(?:\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+"|"+a.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\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,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…",a=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 A=new XMLHttpRequest;A.open("GET",S,!0),A.onreadystatechange=function(){A.readyState==4&&(A.status<400&&A.responseText?k(A.responseText):A.status>=400?C(a(A.status,A.statusText)):C(l))},A.send(null)}function x(S){var k=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S||"");if(k){var C=Number(k[1]),A=k[2],T=k[3];return A?T?[C,Number(T)]:[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 A=k.getAttribute("data-src"),T=S.language;if(T==="none"){var M=(/\.(\w+)$/.exec(A)||[,"none"])[1];T=h[M]||M}n.util.setLanguage(C,T),n.util.setLanguage(k,T);var y=n.plugins.autoloader;y&&y.loadLanguages(T),m(A,function(N){k.setAttribute(c,v);var z=x(k.getAttribute("data-range"));if(z){var q=N.split(/\r\n?|\n/g),P=z[0],Y=z[1]==null?q.length:z[1];P<0&&(P+=q.length),P=Math.max(0,Math.min(P-1,q.length)),Y<0&&(Y+=q.length),Y=Math.max(0,Math.min(Y,q.length)),N=q.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),A=0,T;T=C[A++];)n.highlightElement(T)}};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)}}()})(e3);var VS=e3.exports;const qg=Jv(VS);class ii{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 ii(e.loc.lexer,e.loc.start,n.loc.end):e&&e.loc}}class xi{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 xi(n,ii.range(this,e))}}class et{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,a,l,h=n&&n.loc;if(h&&h.start<=h.end){var c=h.lexer.input;a=h.start,l=h.end,a===c.length?r+=" at end of input: ":r+=" at position "+(a+1)+": ";var p=c.slice(a,l).replace(/[^]/g,"$&̲"),v;a>15?v="…"+c.slice(a-15,a):v=c.slice(0,a);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__=et.prototype,g.position=a,a!=null&&l!=null&&(g.length=l-a),g.rawMessage=e,g}}et.prototype.__proto__=Error.prototype;var WS=function(e,n){return e.indexOf(n)!==-1},GS=function(e,n){return e===void 0?n:e},KS=/([A-Z])/g,XS=function(e){return e.replace(KS,"-$1").toLowerCase()},ZS={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},YS=/[&><"']/g;function JS(t){return String(t).replace(YS,e=>ZS[e])}var t3=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},QS=function(e){var n=t3(e);return n.type==="mathord"||n.type==="textord"||n.type==="atom"},eE=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},tE=function(e){var n=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return n?n[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(n[1])?null:n[1].toLowerCase():"_relative"},At={contains:WS,deflt:GS,escape:JS,hyphenate:XS,getBaseElem:t3,isCharacterBox:QS,protocolFromUrl:tE},tc={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 nE(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 k1{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 tc)if(tc.hasOwnProperty(n)){var r=tc[n];this[n]=e[n]!==void 0?r.processor?r.processor(e[n]):e[n]:nE(r)}}reportNonstrict(e,n,r){var a=this.strict;if(typeof a=="function"&&(a=a(e,n,r)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new et("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+e+"]"),r);a==="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 '"+a+"': "+n+" ["+e+"]"))}}useStrictBehavior(e,n,r){var a=this.strict;if(typeof a=="function")try{a=a(e,n,r)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="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 '"+a+"': "+n+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var n=At.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 oo{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 ra[rE[this.id]]}sub(){return ra[iE[this.id]]}fracNum(){return ra[aE[this.id]]}fracDen(){return ra[oE[this.id]]}cramp(){return ra[sE[this.id]]}text(){return ra[lE[this.id]]}isTight(){return this.size>=2}}var S1=0,Oc=1,Es=2,qa=3,Xl=4,gi=5,Cs=6,Ir=7,ra=[new oo(S1,0,!1),new oo(Oc,0,!0),new oo(Es,1,!1),new oo(qa,1,!0),new oo(Xl,2,!1),new oo(gi,2,!0),new oo(Cs,3,!1),new oo(Ir,3,!0)],rE=[Xl,gi,Xl,gi,Cs,Ir,Cs,Ir],iE=[gi,gi,gi,gi,Ir,Ir,Ir,Ir],aE=[Es,qa,Xl,gi,Cs,Ir,Cs,Ir],oE=[qa,qa,gi,gi,Ir,Ir,Ir,Ir],sE=[Oc,Oc,qa,qa,gi,gi,Ir,Ir],lE=[S1,Oc,Es,qa,Es,qa,Es,qa],Rt={DISPLAY:ra[S1],TEXT:ra[Es],SCRIPT:ra[Xl],SCRIPTSCRIPT:ra[Cs]},Op=[{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 cE(t){for(var e=0;e<Op.length;e++)for(var n=Op[e],r=0;r<n.blocks.length;r++){var a=n.blocks[r];if(t>=a[0]&&t<=a[1])return n.name}return null}var nc=[];Op.forEach(t=>t.blocks.forEach(e=>nc.push(...e)));function n3(t){for(var e=0;e<nc.length;e+=2)if(t>=nc[e]&&t<=nc[e+1])return!0;return!1}var us=80,uE=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"},dE=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"},hE=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"},pE=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"},fE=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"},mE=function(e){var n=e/2;return"M400000 "+e+" H0 L"+n+" 0 l65 45 L145 "+(e-80)+" H400000z"},gE=function(e,n,r){var a=r-54-n-e;return"M702 "+(e+n)+"H400000"+(40+e)+`
H742v`+a+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+n+"H400000v"+(40+e)+"H742z"},vE=function(e,n,r){n=1e3*n;var a="";switch(e){case"sqrtMain":a=uE(n,us);break;case"sqrtSize1":a=dE(n,us);break;case"sqrtSize2":a=hE(n,us);break;case"sqrtSize3":a=pE(n,us);break;case"sqrtSize4":a=fE(n,us);break;case"sqrtTall":a=gE(n,us,r)}return a},bE=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""}},jg={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`},yE=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 c0{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 At.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 oa={"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]}},O0={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]},$g={Å:"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 wE(t,e){oa[t]=e}function E1(t,e,n){if(!oa[e])throw new Error("Font metrics not found for font: "+e+".");var r=t.charCodeAt(0),a=oa[e][r];if(!a&&t[0]in $g&&(r=$g[t[0]].charCodeAt(0),a=oa[e][r]),!a&&n==="text"&&n3(r)&&(a=oa[e][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var Eh={};function xE(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!Eh[e]){var n=Eh[e]={cssEmPerMu:O0.quad[e]/18};for(var r in O0)O0.hasOwnProperty(r)&&(n[r]=O0[r][e])}return Eh[e]}var kE=[[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]],Ug=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Vg=function(e,n){return n.size<2?e:kE[e-1][n.size-1]};class _a{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||_a.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=Ug[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 _a(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Vg(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:Ug[e-1]})}havingBaseStyle(e){e=e||this.style.text();var n=Vg(_a.BASESIZE,e);return this.size===n&&this.textSize===_a.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!==_a.BASESIZE?["sizing","reset-size"+this.size,"size"+_a.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=xE(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}_a.BASESIZE=6;var Ip={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},SE={ex:!0,em:!0,mu:!0},r3=function(e){return typeof e!="string"&&(e=e.unit),e in Ip||e in SE||e==="ex"},Vn=function(e,n){var r;if(e.unit in Ip)r=Ip[e.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(e.unit==="mu")r=n.fontMetrics().cssEmPerMu;else{var a;if(n.style.isTight()?a=n.havingStyle(n.style.text()):a=n,e.unit==="ex")r=a.fontMetrics().xHeight;else if(e.unit==="em")r=a.fontMetrics().quad;else throw new et("Invalid unit: '"+e.unit+"'");a!==n&&(r*=a.sizeMultiplier/n.sizeMultiplier)}return Math.min(e.number*r,n.maxSize)},lt=function(e){return+e.toFixed(4)+"em"},xo=function(e){return e.filter(n=>n).join(" ")},i3=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 a=n.getColor();a&&(this.style.color=a)}},a3=function(e){var n=document.createElement(e);n.className=xo(this.classes);for(var r in this.style)this.style.hasOwnProperty(r)&&(n.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&n.setAttribute(a,this.attributes[a]);for(var l=0;l<this.children.length;l++)n.appendChild(this.children[l].toNode());return n},EE=/[\s"'>/=\x00-\x1f]/,o3=function(e){var n="<"+e;this.classes.length&&(n+=' class="'+At.escape(xo(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=At.hyphenate(a)+":"+this.style[a]+";");r&&(n+=' style="'+At.escape(r)+'"');for(var l in this.attributes)if(this.attributes.hasOwnProperty(l)){if(EE.test(l))throw new et("Invalid attribute name '"+l+"'");n+=" "+l+'="'+At.escape(this.attributes[l])+'"'}n+=">";for(var h=0;h<this.children.length;h++)n+=this.children[h].toMarkup();return n+="</"+e+">",n};class u0{constructor(e,n,r,a){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,i3.call(this,e,r,a),this.children=n||[]}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return At.contains(this.classes,e)}toNode(){return a3.call(this,"span")}toMarkup(){return o3.call(this,"span")}}class T1{constructor(e,n,r,a){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,i3.call(this,n,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,n){this.attributes[e]=n}hasClass(e){return At.contains(this.classes,e)}toNode(){return a3.call(this,"a")}toMarkup(){return o3.call(this,"a")}}class TE{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 At.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="'+At.escape(this.src)+'"'+(' alt="'+At.escape(this.alt)+'"'),n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=At.hyphenate(r)+":"+this.style[r]+";");return n&&(e+=' style="'+At.escape(n)+'"'),e+="'/>",e}}var AE={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class Ti{constructor(e,n,r,a,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=a||0,this.skew=l||0,this.width=h||0,this.classes=c||[],this.style=p||{},this.maxFontSize=0;var v=cE(this.text.charCodeAt(0));v&&this.classes.push(v+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=AE[this.text])}hasClass(e){return At.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),n=null;this.italic>0&&(n=document.createElement("span"),n.style.marginRight=lt(this.italic)),this.classes.length>0&&(n=n||document.createElement("span"),n.className=xo(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+=At.escape(xo(this.classes)),n+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=At.hyphenate(a)+":"+this.style[a]+";");r&&(e=!0,n+=' style="'+At.escape(r)+'"');var l=At.escape(this.text);return e?(n+=">",n+=l,n+="</span>",n):l}}class Ka{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 a=0;a<this.children.length;a++)n.appendChild(this.children[a].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+'="'+At.escape(this.attributes[n])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>",e}}class ko{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",jg[this.pathName]),n}toMarkup(){return this.alternate?'<path d="'+At.escape(this.alternate)+'"/>':'<path d="'+At.escape(jg[this.pathName])+'"/>'}}class Hp{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+'="'+At.escape(this.attributes[n])+'"');return e+="/>",e}}function Wg(t){if(t instanceof Ti)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function ME(t){if(t instanceof u0)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var CE={bin:1,close:1,inner:1,open:1,punct:1,rel:1},LE={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Dn={math:{},text:{}};function O(t,e,n,r,a,l){Dn[t][a]={font:e,group:n,replace:r},l&&r&&(Dn[t][r]=Dn[t][a])}var H="math",Ke="text",U="main",ie="ams",Fn="accent-token",mt="bin",Br="close",Ds="inner",Nt="mathord",ar="op-token",ci="open",mu="punct",oe="rel",Qa="spacing",we="textord";O(H,U,oe,"≡","\\equiv",!0);O(H,U,oe,"≺","\\prec",!0);O(H,U,oe,"≻","\\succ",!0);O(H,U,oe,"","\\sim",!0);O(H,U,oe,"⊥","\\perp");O(H,U,oe,"⪯","\\preceq",!0);O(H,U,oe,"⪰","\\succeq",!0);O(H,U,oe,"≃","\\simeq",!0);O(H,U,oe,"","\\mid",!0);O(H,U,oe,"≪","\\ll",!0);O(H,U,oe,"≫","\\gg",!0);O(H,U,oe,"≍","\\asymp",!0);O(H,U,oe,"∥","\\parallel");O(H,U,oe,"⋈","\\bowtie",!0);O(H,U,oe,"⌣","\\smile",!0);O(H,U,oe,"⊑","\\sqsubseteq",!0);O(H,U,oe,"⊒","\\sqsupseteq",!0);O(H,U,oe,"≐","\\doteq",!0);O(H,U,oe,"⌢","\\frown",!0);O(H,U,oe,"∋","\\ni",!0);O(H,U,oe,"∝","\\propto",!0);O(H,U,oe,"⊢","\\vdash",!0);O(H,U,oe,"⊣","\\dashv",!0);O(H,U,oe,"∋","\\owns");O(H,U,mu,".","\\ldotp");O(H,U,mu,"⋅","\\cdotp");O(H,U,we,"#","\\#");O(Ke,U,we,"#","\\#");O(H,U,we,"&","\\&");O(Ke,U,we,"&","\\&");O(H,U,we,"ℵ","\\aleph",!0);O(H,U,we,"∀","\\forall",!0);O(H,U,we,"ℏ","\\hbar",!0);O(H,U,we,"∃","\\exists",!0);O(H,U,we,"∇","\\nabla",!0);O(H,U,we,"♭","\\flat",!0);O(H,U,we,"","\\ell",!0);O(H,U,we,"♮","\\natural",!0);O(H,U,we,"♣","\\clubsuit",!0);O(H,U,we,"℘","\\wp",!0);O(H,U,we,"♯","\\sharp",!0);O(H,U,we,"♢","\\diamondsuit",!0);O(H,U,we,"","\\Re",!0);O(H,U,we,"♡","\\heartsuit",!0);O(H,U,we,"","\\Im",!0);O(H,U,we,"♠","\\spadesuit",!0);O(H,U,we,"§","\\S",!0);O(Ke,U,we,"§","\\S");O(H,U,we,"¶","\\P",!0);O(Ke,U,we,"¶","\\P");O(H,U,we,"†","\\dag");O(Ke,U,we,"†","\\dag");O(Ke,U,we,"†","\\textdagger");O(H,U,we,"‡","\\ddag");O(Ke,U,we,"‡","\\ddag");O(Ke,U,we,"‡","\\textdaggerdbl");O(H,U,Br,"⎱","\\rmoustache",!0);O(H,U,ci,"⎰","\\lmoustache",!0);O(H,U,Br,"⟯","\\rgroup",!0);O(H,U,ci,"⟮","\\lgroup",!0);O(H,U,mt,"∓","\\mp",!0);O(H,U,mt,"⊖","\\ominus",!0);O(H,U,mt,"⊎","\\uplus",!0);O(H,U,mt,"⊓","\\sqcap",!0);O(H,U,mt,"","\\ast");O(H,U,mt,"⊔","\\sqcup",!0);O(H,U,mt,"◯","\\bigcirc",!0);O(H,U,mt,"∙","\\bullet",!0);O(H,U,mt,"‡","\\ddagger");O(H,U,mt,"≀","\\wr",!0);O(H,U,mt,"⨿","\\amalg");O(H,U,mt,"&","\\And");O(H,U,oe,"⟵","\\longleftarrow",!0);O(H,U,oe,"⇐","\\Leftarrow",!0);O(H,U,oe,"⟸","\\Longleftarrow",!0);O(H,U,oe,"⟶","\\longrightarrow",!0);O(H,U,oe,"⇒","\\Rightarrow",!0);O(H,U,oe,"⟹","\\Longrightarrow",!0);O(H,U,oe,"↔","\\leftrightarrow",!0);O(H,U,oe,"⟷","\\longleftrightarrow",!0);O(H,U,oe,"⇔","\\Leftrightarrow",!0);O(H,U,oe,"⟺","\\Longleftrightarrow",!0);O(H,U,oe,"↦","\\mapsto",!0);O(H,U,oe,"⟼","\\longmapsto",!0);O(H,U,oe,"↗","\\nearrow",!0);O(H,U,oe,"↩","\\hookleftarrow",!0);O(H,U,oe,"↪","\\hookrightarrow",!0);O(H,U,oe,"↘","\\searrow",!0);O(H,U,oe,"↼","\\leftharpoonup",!0);O(H,U,oe,"⇀","\\rightharpoonup",!0);O(H,U,oe,"↙","\\swarrow",!0);O(H,U,oe,"↽","\\leftharpoondown",!0);O(H,U,oe,"⇁","\\rightharpoondown",!0);O(H,U,oe,"↖","\\nwarrow",!0);O(H,U,oe,"⇌","\\rightleftharpoons",!0);O(H,ie,oe,"≮","\\nless",!0);O(H,ie,oe,"","\\@nleqslant");O(H,ie,oe,"","\\@nleqq");O(H,ie,oe,"⪇","\\lneq",!0);O(H,ie,oe,"≨","\\lneqq",!0);O(H,ie,oe,"","\\@lvertneqq");O(H,ie,oe,"⋦","\\lnsim",!0);O(H,ie,oe,"⪉","\\lnapprox",!0);O(H,ie,oe,"⊀","\\nprec",!0);O(H,ie,oe,"⋠","\\npreceq",!0);O(H,ie,oe,"⋨","\\precnsim",!0);O(H,ie,oe,"⪹","\\precnapprox",!0);O(H,ie,oe,"≁","\\nsim",!0);O(H,ie,oe,"","\\@nshortmid");O(H,ie,oe,"∤","\\nmid",!0);O(H,ie,oe,"⊬","\\nvdash",!0);O(H,ie,oe,"⊭","\\nvDash",!0);O(H,ie,oe,"⋪","\\ntriangleleft");O(H,ie,oe,"⋬","\\ntrianglelefteq",!0);O(H,ie,oe,"⊊","\\subsetneq",!0);O(H,ie,oe,"","\\@varsubsetneq");O(H,ie,oe,"⫋","\\subsetneqq",!0);O(H,ie,oe,"","\\@varsubsetneqq");O(H,ie,oe,"≯","\\ngtr",!0);O(H,ie,oe,"","\\@ngeqslant");O(H,ie,oe,"","\\@ngeqq");O(H,ie,oe,"⪈","\\gneq",!0);O(H,ie,oe,"≩","\\gneqq",!0);O(H,ie,oe,"","\\@gvertneqq");O(H,ie,oe,"⋧","\\gnsim",!0);O(H,ie,oe,"⪊","\\gnapprox",!0);O(H,ie,oe,"⊁","\\nsucc",!0);O(H,ie,oe,"⋡","\\nsucceq",!0);O(H,ie,oe,"⋩","\\succnsim",!0);O(H,ie,oe,"⪺","\\succnapprox",!0);O(H,ie,oe,"≆","\\ncong",!0);O(H,ie,oe,"","\\@nshortparallel");O(H,ie,oe,"∦","\\nparallel",!0);O(H,ie,oe,"⊯","\\nVDash",!0);O(H,ie,oe,"⋫","\\ntriangleright");O(H,ie,oe,"⋭","\\ntrianglerighteq",!0);O(H,ie,oe,"","\\@nsupseteqq");O(H,ie,oe,"⊋","\\supsetneq",!0);O(H,ie,oe,"","\\@varsupsetneq");O(H,ie,oe,"⫌","\\supsetneqq",!0);O(H,ie,oe,"","\\@varsupsetneqq");O(H,ie,oe,"⊮","\\nVdash",!0);O(H,ie,oe,"⪵","\\precneqq",!0);O(H,ie,oe,"⪶","\\succneqq",!0);O(H,ie,oe,"","\\@nsubseteqq");O(H,ie,mt,"⊴","\\unlhd");O(H,ie,mt,"⊵","\\unrhd");O(H,ie,oe,"↚","\\nleftarrow",!0);O(H,ie,oe,"↛","\\nrightarrow",!0);O(H,ie,oe,"⇍","\\nLeftarrow",!0);O(H,ie,oe,"⇏","\\nRightarrow",!0);O(H,ie,oe,"↮","\\nleftrightarrow",!0);O(H,ie,oe,"⇎","\\nLeftrightarrow",!0);O(H,ie,oe,"△","\\vartriangle");O(H,ie,we,"ℏ","\\hslash");O(H,ie,we,"▽","\\triangledown");O(H,ie,we,"◊","\\lozenge");O(H,ie,we,"Ⓢ","\\circledS");O(H,ie,we,"®","\\circledR");O(Ke,ie,we,"®","\\circledR");O(H,ie,we,"∡","\\measuredangle",!0);O(H,ie,we,"∄","\\nexists");O(H,ie,we,"℧","\\mho");O(H,ie,we,"Ⅎ","\\Finv",!0);O(H,ie,we,"⅁","\\Game",!0);O(H,ie,we,"","\\backprime");O(H,ie,we,"▲","\\blacktriangle");O(H,ie,we,"▼","\\blacktriangledown");O(H,ie,we,"■","\\blacksquare");O(H,ie,we,"⧫","\\blacklozenge");O(H,ie,we,"★","\\bigstar");O(H,ie,we,"∢","\\sphericalangle",!0);O(H,ie,we,"∁","\\complement",!0);O(H,ie,we,"ð","\\eth",!0);O(Ke,U,we,"ð","ð");O(H,ie,we,"","\\diagup");O(H,ie,we,"╲","\\diagdown");O(H,ie,we,"□","\\square");O(H,ie,we,"□","\\Box");O(H,ie,we,"◊","\\Diamond");O(H,ie,we,"¥","\\yen",!0);O(Ke,ie,we,"¥","\\yen",!0);O(H,ie,we,"✓","\\checkmark",!0);O(Ke,ie,we,"✓","\\checkmark");O(H,ie,we,"ℶ","\\beth",!0);O(H,ie,we,"ℸ","\\daleth",!0);O(H,ie,we,"ℷ","\\gimel",!0);O(H,ie,we,"ϝ","\\digamma",!0);O(H,ie,we,"ϰ","\\varkappa");O(H,ie,ci,"┌","\\@ulcorner",!0);O(H,ie,Br,"┐","\\@urcorner",!0);O(H,ie,ci,"└","\\@llcorner",!0);O(H,ie,Br,"┘","\\@lrcorner",!0);O(H,ie,oe,"≦","\\leqq",!0);O(H,ie,oe,"⩽","\\leqslant",!0);O(H,ie,oe,"⪕","\\eqslantless",!0);O(H,ie,oe,"≲","\\lesssim",!0);O(H,ie,oe,"⪅","\\lessapprox",!0);O(H,ie,oe,"≊","\\approxeq",!0);O(H,ie,mt,"⋖","\\lessdot");O(H,ie,oe,"⋘","\\lll",!0);O(H,ie,oe,"≶","\\lessgtr",!0);O(H,ie,oe,"⋚","\\lesseqgtr",!0);O(H,ie,oe,"⪋","\\lesseqqgtr",!0);O(H,ie,oe,"≑","\\doteqdot");O(H,ie,oe,"≓","\\risingdotseq",!0);O(H,ie,oe,"≒","\\fallingdotseq",!0);O(H,ie,oe,"∽","\\backsim",!0);O(H,ie,oe,"⋍","\\backsimeq",!0);O(H,ie,oe,"⫅","\\subseteqq",!0);O(H,ie,oe,"⋐","\\Subset",!0);O(H,ie,oe,"⊏","\\sqsubset",!0);O(H,ie,oe,"≼","\\preccurlyeq",!0);O(H,ie,oe,"⋞","\\curlyeqprec",!0);O(H,ie,oe,"≾","\\precsim",!0);O(H,ie,oe,"⪷","\\precapprox",!0);O(H,ie,oe,"⊲","\\vartriangleleft");O(H,ie,oe,"⊴","\\trianglelefteq");O(H,ie,oe,"⊨","\\vDash",!0);O(H,ie,oe,"⊪","\\Vvdash",!0);O(H,ie,oe,"⌣","\\smallsmile");O(H,ie,oe,"⌢","\\smallfrown");O(H,ie,oe,"≏","\\bumpeq",!0);O(H,ie,oe,"≎","\\Bumpeq",!0);O(H,ie,oe,"≧","\\geqq",!0);O(H,ie,oe,"⩾","\\geqslant",!0);O(H,ie,oe,"⪖","\\eqslantgtr",!0);O(H,ie,oe,"≳","\\gtrsim",!0);O(H,ie,oe,"⪆","\\gtrapprox",!0);O(H,ie,mt,"⋗","\\gtrdot");O(H,ie,oe,"⋙","\\ggg",!0);O(H,ie,oe,"≷","\\gtrless",!0);O(H,ie,oe,"⋛","\\gtreqless",!0);O(H,ie,oe,"⪌","\\gtreqqless",!0);O(H,ie,oe,"≖","\\eqcirc",!0);O(H,ie,oe,"≗","\\circeq",!0);O(H,ie,oe,"≜","\\triangleq",!0);O(H,ie,oe,"","\\thicksim");O(H,ie,oe,"≈","\\thickapprox");O(H,ie,oe,"⫆","\\supseteqq",!0);O(H,ie,oe,"⋑","\\Supset",!0);O(H,ie,oe,"⊐","\\sqsupset",!0);O(H,ie,oe,"≽","\\succcurlyeq",!0);O(H,ie,oe,"⋟","\\curlyeqsucc",!0);O(H,ie,oe,"≿","\\succsim",!0);O(H,ie,oe,"⪸","\\succapprox",!0);O(H,ie,oe,"⊳","\\vartriangleright");O(H,ie,oe,"⊵","\\trianglerighteq");O(H,ie,oe,"⊩","\\Vdash",!0);O(H,ie,oe,"","\\shortmid");O(H,ie,oe,"∥","\\shortparallel");O(H,ie,oe,"≬","\\between",!0);O(H,ie,oe,"⋔","\\pitchfork",!0);O(H,ie,oe,"∝","\\varpropto");O(H,ie,oe,"◀","\\blacktriangleleft");O(H,ie,oe,"∴","\\therefore",!0);O(H,ie,oe,"∍","\\backepsilon");O(H,ie,oe,"▶","\\blacktriangleright");O(H,ie,oe,"∵","\\because",!0);O(H,ie,oe,"⋘","\\llless");O(H,ie,oe,"⋙","\\gggtr");O(H,ie,mt,"⊲","\\lhd");O(H,ie,mt,"⊳","\\rhd");O(H,ie,oe,"≂","\\eqsim",!0);O(H,U,oe,"⋈","\\Join");O(H,ie,oe,"≑","\\Doteq",!0);O(H,ie,mt,"∔","\\dotplus",!0);O(H,ie,mt,"","\\smallsetminus");O(H,ie,mt,"⋒","\\Cap",!0);O(H,ie,mt,"⋓","\\Cup",!0);O(H,ie,mt,"⩞","\\doublebarwedge",!0);O(H,ie,mt,"⊟","\\boxminus",!0);O(H,ie,mt,"⊞","\\boxplus",!0);O(H,ie,mt,"⋇","\\divideontimes",!0);O(H,ie,mt,"⋉","\\ltimes",!0);O(H,ie,mt,"⋊","\\rtimes",!0);O(H,ie,mt,"⋋","\\leftthreetimes",!0);O(H,ie,mt,"⋌","\\rightthreetimes",!0);O(H,ie,mt,"⋏","\\curlywedge",!0);O(H,ie,mt,"⋎","\\curlyvee",!0);O(H,ie,mt,"⊝","\\circleddash",!0);O(H,ie,mt,"⊛","\\circledast",!0);O(H,ie,mt,"⋅","\\centerdot");O(H,ie,mt,"⊺","\\intercal",!0);O(H,ie,mt,"⋒","\\doublecap");O(H,ie,mt,"⋓","\\doublecup");O(H,ie,mt,"⊠","\\boxtimes",!0);O(H,ie,oe,"⇢","\\dashrightarrow",!0);O(H,ie,oe,"⇠","\\dashleftarrow",!0);O(H,ie,oe,"⇇","\\leftleftarrows",!0);O(H,ie,oe,"⇆","\\leftrightarrows",!0);O(H,ie,oe,"⇚","\\Lleftarrow",!0);O(H,ie,oe,"↞","\\twoheadleftarrow",!0);O(H,ie,oe,"↢","\\leftarrowtail",!0);O(H,ie,oe,"↫","\\looparrowleft",!0);O(H,ie,oe,"⇋","\\leftrightharpoons",!0);O(H,ie,oe,"↶","\\curvearrowleft",!0);O(H,ie,oe,"↺","\\circlearrowleft",!0);O(H,ie,oe,"↰","\\Lsh",!0);O(H,ie,oe,"⇈","\\upuparrows",!0);O(H,ie,oe,"↿","\\upharpoonleft",!0);O(H,ie,oe,"⇃","\\downharpoonleft",!0);O(H,U,oe,"⊶","\\origof",!0);O(H,U,oe,"⊷","\\imageof",!0);O(H,ie,oe,"⊸","\\multimap",!0);O(H,ie,oe,"↭","\\leftrightsquigarrow",!0);O(H,ie,oe,"⇉","\\rightrightarrows",!0);O(H,ie,oe,"⇄","\\rightleftarrows",!0);O(H,ie,oe,"↠","\\twoheadrightarrow",!0);O(H,ie,oe,"↣","\\rightarrowtail",!0);O(H,ie,oe,"↬","\\looparrowright",!0);O(H,ie,oe,"↷","\\curvearrowright",!0);O(H,ie,oe,"↻","\\circlearrowright",!0);O(H,ie,oe,"↱","\\Rsh",!0);O(H,ie,oe,"⇊","\\downdownarrows",!0);O(H,ie,oe,"↾","\\upharpoonright",!0);O(H,ie,oe,"⇂","\\downharpoonright",!0);O(H,ie,oe,"⇝","\\rightsquigarrow",!0);O(H,ie,oe,"⇝","\\leadsto");O(H,ie,oe,"⇛","\\Rrightarrow",!0);O(H,ie,oe,"↾","\\restriction");O(H,U,we,"","`");O(H,U,we,"$","\\$");O(Ke,U,we,"$","\\$");O(Ke,U,we,"$","\\textdollar");O(H,U,we,"%","\\%");O(Ke,U,we,"%","\\%");O(H,U,we,"_","\\_");O(Ke,U,we,"_","\\_");O(Ke,U,we,"_","\\textunderscore");O(H,U,we,"∠","\\angle",!0);O(H,U,we,"∞","\\infty",!0);O(H,U,we,"","\\prime");O(H,U,we,"△","\\triangle");O(H,U,we,"Γ","\\Gamma",!0);O(H,U,we,"Δ","\\Delta",!0);O(H,U,we,"Θ","\\Theta",!0);O(H,U,we,"Λ","\\Lambda",!0);O(H,U,we,"Ξ","\\Xi",!0);O(H,U,we,"Π","\\Pi",!0);O(H,U,we,"Σ","\\Sigma",!0);O(H,U,we,"Υ","\\Upsilon",!0);O(H,U,we,"Φ","\\Phi",!0);O(H,U,we,"Ψ","\\Psi",!0);O(H,U,we,"Ω","\\Omega",!0);O(H,U,we,"A","Α");O(H,U,we,"B","Β");O(H,U,we,"E","Ε");O(H,U,we,"Z","Ζ");O(H,U,we,"H","Η");O(H,U,we,"I","Ι");O(H,U,we,"K","Κ");O(H,U,we,"M","Μ");O(H,U,we,"N","Ν");O(H,U,we,"O","Ο");O(H,U,we,"P","Ρ");O(H,U,we,"T","Τ");O(H,U,we,"X","Χ");O(H,U,we,"¬","\\neg",!0);O(H,U,we,"¬","\\lnot");O(H,U,we,"","\\top");O(H,U,we,"⊥","\\bot");O(H,U,we,"∅","\\emptyset");O(H,ie,we,"∅","\\varnothing");O(H,U,Nt,"α","\\alpha",!0);O(H,U,Nt,"β","\\beta",!0);O(H,U,Nt,"γ","\\gamma",!0);O(H,U,Nt,"δ","\\delta",!0);O(H,U,Nt,"ϵ","\\epsilon",!0);O(H,U,Nt,"ζ","\\zeta",!0);O(H,U,Nt,"η","\\eta",!0);O(H,U,Nt,"θ","\\theta",!0);O(H,U,Nt,"ι","\\iota",!0);O(H,U,Nt,"κ","\\kappa",!0);O(H,U,Nt,"λ","\\lambda",!0);O(H,U,Nt,"μ","\\mu",!0);O(H,U,Nt,"ν","\\nu",!0);O(H,U,Nt,"ξ","\\xi",!0);O(H,U,Nt,"ο","\\omicron",!0);O(H,U,Nt,"π","\\pi",!0);O(H,U,Nt,"ρ","\\rho",!0);O(H,U,Nt,"σ","\\sigma",!0);O(H,U,Nt,"τ","\\tau",!0);O(H,U,Nt,"υ","\\upsilon",!0);O(H,U,Nt,"ϕ","\\phi",!0);O(H,U,Nt,"χ","\\chi",!0);O(H,U,Nt,"ψ","\\psi",!0);O(H,U,Nt,"ω","\\omega",!0);O(H,U,Nt,"ε","\\varepsilon",!0);O(H,U,Nt,"ϑ","\\vartheta",!0);O(H,U,Nt,"ϖ","\\varpi",!0);O(H,U,Nt,"ϱ","\\varrho",!0);O(H,U,Nt,"ς","\\varsigma",!0);O(H,U,Nt,"φ","\\varphi",!0);O(H,U,mt,"","*",!0);O(H,U,mt,"+","+");O(H,U,mt,"","-",!0);O(H,U,mt,"⋅","\\cdot",!0);O(H,U,mt,"∘","\\circ",!0);O(H,U,mt,"÷","\\div",!0);O(H,U,mt,"±","\\pm",!0);O(H,U,mt,"×","\\times",!0);O(H,U,mt,"∩","\\cap",!0);O(H,U,mt,"","\\cup",!0);O(H,U,mt,"","\\setminus",!0);O(H,U,mt,"∧","\\land");O(H,U,mt,"","\\lor");O(H,U,mt,"∧","\\wedge",!0);O(H,U,mt,"","\\vee",!0);O(H,U,we,"√","\\surd");O(H,U,ci,"⟨","\\langle",!0);O(H,U,ci,"","\\lvert");O(H,U,ci,"∥","\\lVert");O(H,U,Br,"?","?");O(H,U,Br,"!","!");O(H,U,Br,"⟩","\\rangle",!0);O(H,U,Br,"","\\rvert");O(H,U,Br,"∥","\\rVert");O(H,U,oe,"=","=");O(H,U,oe,":",":");O(H,U,oe,"≈","\\approx",!0);O(H,U,oe,"≅","\\cong",!0);O(H,U,oe,"≥","\\ge");O(H,U,oe,"≥","\\geq",!0);O(H,U,oe,"←","\\gets");O(H,U,oe,">","\\gt",!0);O(H,U,oe,"∈","\\in",!0);O(H,U,oe,"","\\@not");O(H,U,oe,"⊂","\\subset",!0);O(H,U,oe,"⊃","\\supset",!0);O(H,U,oe,"⊆","\\subseteq",!0);O(H,U,oe,"⊇","\\supseteq",!0);O(H,ie,oe,"⊈","\\nsubseteq",!0);O(H,ie,oe,"⊉","\\nsupseteq",!0);O(H,U,oe,"⊨","\\models");O(H,U,oe,"←","\\leftarrow",!0);O(H,U,oe,"≤","\\le");O(H,U,oe,"≤","\\leq",!0);O(H,U,oe,"<","\\lt",!0);O(H,U,oe,"→","\\rightarrow",!0);O(H,U,oe,"→","\\to");O(H,ie,oe,"≱","\\ngeq",!0);O(H,ie,oe,"≰","\\nleq",!0);O(H,U,Qa," ","\\ ");O(H,U,Qa," ","\\space");O(H,U,Qa," ","\\nobreakspace");O(Ke,U,Qa," ","\\ ");O(Ke,U,Qa," "," ");O(Ke,U,Qa," ","\\space");O(Ke,U,Qa," ","\\nobreakspace");O(H,U,Qa,null,"\\nobreak");O(H,U,Qa,null,"\\allowbreak");O(H,U,mu,",",",");O(H,U,mu,";",";");O(H,ie,mt,"⊼","\\barwedge",!0);O(H,ie,mt,"⊻","\\veebar",!0);O(H,U,mt,"⊙","\\odot",!0);O(H,U,mt,"⊕","\\oplus",!0);O(H,U,mt,"⊗","\\otimes",!0);O(H,U,we,"∂","\\partial",!0);O(H,U,mt,"⊘","\\oslash",!0);O(H,ie,mt,"⊚","\\circledcirc",!0);O(H,ie,mt,"⊡","\\boxdot",!0);O(H,U,mt,"△","\\bigtriangleup");O(H,U,mt,"▽","\\bigtriangledown");O(H,U,mt,"†","\\dagger");O(H,U,mt,"⋄","\\diamond");O(H,U,mt,"⋆","\\star");O(H,U,mt,"◃","\\triangleleft");O(H,U,mt,"▹","\\triangleright");O(H,U,ci,"{","\\{");O(Ke,U,we,"{","\\{");O(Ke,U,we,"{","\\textbraceleft");O(H,U,Br,"}","\\}");O(Ke,U,we,"}","\\}");O(Ke,U,we,"}","\\textbraceright");O(H,U,ci,"{","\\lbrace");O(H,U,Br,"}","\\rbrace");O(H,U,ci,"[","\\lbrack",!0);O(Ke,U,we,"[","\\lbrack",!0);O(H,U,Br,"]","\\rbrack",!0);O(Ke,U,we,"]","\\rbrack",!0);O(H,U,ci,"(","\\lparen",!0);O(H,U,Br,")","\\rparen",!0);O(Ke,U,we,"<","\\textless",!0);O(Ke,U,we,">","\\textgreater",!0);O(H,U,ci,"⌊","\\lfloor",!0);O(H,U,Br,"⌋","\\rfloor",!0);O(H,U,ci,"⌈","\\lceil",!0);O(H,U,Br,"⌉","\\rceil",!0);O(H,U,we,"\\","\\backslash");O(H,U,we,"","|");O(H,U,we,"","\\vert");O(Ke,U,we,"|","\\textbar",!0);O(H,U,we,"∥","\\|");O(H,U,we,"∥","\\Vert");O(Ke,U,we,"∥","\\textbardbl");O(Ke,U,we,"~","\\textasciitilde");O(Ke,U,we,"\\","\\textbackslash");O(Ke,U,we,"^","\\textasciicircum");O(H,U,oe,"↑","\\uparrow",!0);O(H,U,oe,"⇑","\\Uparrow",!0);O(H,U,oe,"↓","\\downarrow",!0);O(H,U,oe,"⇓","\\Downarrow",!0);O(H,U,oe,"↕","\\updownarrow",!0);O(H,U,oe,"⇕","\\Updownarrow",!0);O(H,U,ar,"∐","\\coprod");O(H,U,ar,"","\\bigvee");O(H,U,ar,"⋀","\\bigwedge");O(H,U,ar,"⨄","\\biguplus");O(H,U,ar,"⋂","\\bigcap");O(H,U,ar,"","\\bigcup");O(H,U,ar,"∫","\\int");O(H,U,ar,"∫","\\intop");O(H,U,ar,"∬","\\iint");O(H,U,ar,"∭","\\iiint");O(H,U,ar,"∏","\\prod");O(H,U,ar,"∑","\\sum");O(H,U,ar,"⨂","\\bigotimes");O(H,U,ar,"⨁","\\bigoplus");O(H,U,ar,"⨀","\\bigodot");O(H,U,ar,"∮","\\oint");O(H,U,ar,"∯","\\oiint");O(H,U,ar,"∰","\\oiiint");O(H,U,ar,"⨆","\\bigsqcup");O(H,U,ar,"∫","\\smallint");O(Ke,U,Ds,"…","\\textellipsis");O(H,U,Ds,"…","\\mathellipsis");O(Ke,U,Ds,"…","\\ldots",!0);O(H,U,Ds,"…","\\ldots",!0);O(H,U,Ds,"⋯","\\@cdots",!0);O(H,U,Ds,"⋱","\\ddots",!0);O(H,U,we,"⋮","\\varvdots");O(Ke,U,we,"⋮","\\varvdots");O(H,U,Fn,"ˊ","\\acute");O(H,U,Fn,"ˋ","\\grave");O(H,U,Fn,"¨","\\ddot");O(H,U,Fn,"~","\\tilde");O(H,U,Fn,"ˉ","\\bar");O(H,U,Fn,"˘","\\breve");O(H,U,Fn,"ˇ","\\check");O(H,U,Fn,"^","\\hat");O(H,U,Fn,"⃗","\\vec");O(H,U,Fn,"˙","\\dot");O(H,U,Fn,"˚","\\mathring");O(H,U,Nt,"","\\@imath");O(H,U,Nt,"","\\@jmath");O(H,U,we,"ı","ı");O(H,U,we,"ȷ","ȷ");O(Ke,U,we,"ı","\\i",!0);O(Ke,U,we,"ȷ","\\j",!0);O(Ke,U,we,"ß","\\ss",!0);O(Ke,U,we,"æ","\\ae",!0);O(Ke,U,we,"œ","\\oe",!0);O(Ke,U,we,"ø","\\o",!0);O(Ke,U,we,"Æ","\\AE",!0);O(Ke,U,we,"Œ","\\OE",!0);O(Ke,U,we,"Ø","\\O",!0);O(Ke,U,Fn,"ˊ","\\'");O(Ke,U,Fn,"ˋ","\\`");O(Ke,U,Fn,"ˆ","\\^");O(Ke,U,Fn,"˜","\\~");O(Ke,U,Fn,"ˉ","\\=");O(Ke,U,Fn,"˘","\\u");O(Ke,U,Fn,"˙","\\.");O(Ke,U,Fn,"¸","\\c");O(Ke,U,Fn,"˚","\\r");O(Ke,U,Fn,"ˇ","\\v");O(Ke,U,Fn,"¨",'\\"');O(Ke,U,Fn,"˝","\\H");O(Ke,U,Fn,"◯","\\textcircled");var s3={"--":!0,"---":!0,"``":!0,"''":!0};O(Ke,U,we,"","--",!0);O(Ke,U,we,"","\\textendash");O(Ke,U,we,"—","---",!0);O(Ke,U,we,"—","\\textemdash");O(Ke,U,we,"","`",!0);O(Ke,U,we,"","\\textquoteleft");O(Ke,U,we,"","'",!0);O(Ke,U,we,"","\\textquoteright");O(Ke,U,we,"“","``",!0);O(Ke,U,we,"“","\\textquotedblleft");O(Ke,U,we,"”","''",!0);O(Ke,U,we,"”","\\textquotedblright");O(H,U,we,"°","\\degree",!0);O(Ke,U,we,"°","\\degree");O(Ke,U,we,"°","\\textdegree",!0);O(H,U,we,"£","\\pounds");O(H,U,we,"£","\\mathsterling",!0);O(Ke,U,we,"£","\\pounds");O(Ke,U,we,"£","\\textsterling",!0);O(H,ie,we,"✠","\\maltese");O(Ke,ie,we,"✠","\\maltese");var Gg='0123456789/@."';for(var Th=0;Th<Gg.length;Th++){var Kg=Gg.charAt(Th);O(H,U,we,Kg,Kg)}var Xg='0123456789!@*()-=+";:?/.,';for(var Ah=0;Ah<Xg.length;Ah++){var Zg=Xg.charAt(Ah);O(Ke,U,we,Zg,Zg)}var Ic="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var Mh=0;Mh<Ic.length;Mh++){var I0=Ic.charAt(Mh);O(H,U,Nt,I0,I0),O(Ke,U,we,I0,I0)}O(H,ie,we,"C","");O(Ke,ie,we,"C","");O(H,ie,we,"H","");O(Ke,ie,we,"H","");O(H,ie,we,"N","");O(Ke,ie,we,"N","");O(H,ie,we,"P","");O(Ke,ie,we,"P","");O(H,ie,we,"Q","");O(Ke,ie,we,"Q","");O(H,ie,we,"R","");O(Ke,ie,we,"R","");O(H,ie,we,"Z","");O(Ke,ie,we,"Z","");O(H,U,Nt,"h","");O(Ke,U,Nt,"h","");var Pt="";for(var Ar=0;Ar<Ic.length;Ar++){var Kn=Ic.charAt(Ar);Pt=String.fromCharCode(55349,56320+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56372+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56424+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56580+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56684+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56736+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56788+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56840+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56944+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Ar<26&&(Pt=String.fromCharCode(55349,56632+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt),Pt=String.fromCharCode(55349,56476+Ar),O(H,U,Nt,Kn,Pt),O(Ke,U,we,Kn,Pt))}Pt=String.fromCharCode(55349,56668);O(H,U,Nt,"k",Pt);O(Ke,U,we,"k",Pt);for(var $o=0;$o<10;$o++){var so=$o.toString();Pt=String.fromCharCode(55349,57294+$o),O(H,U,Nt,so,Pt),O(Ke,U,we,so,Pt),Pt=String.fromCharCode(55349,57314+$o),O(H,U,Nt,so,Pt),O(Ke,U,we,so,Pt),Pt=String.fromCharCode(55349,57324+$o),O(H,U,Nt,so,Pt),O(Ke,U,we,so,Pt),Pt=String.fromCharCode(55349,57334+$o),O(H,U,Nt,so,Pt),O(Ke,U,we,so,Pt)}var Pp="ÐÞþ";for(var Ch=0;Ch<Pp.length;Ch++){var H0=Pp.charAt(Ch);O(H,U,Nt,H0,H0),O(Ke,U,we,H0,H0)}var P0=[["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"]],Yg=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],_E=function(e,n){var r=e.charCodeAt(0),a=e.charCodeAt(1),l=(r-55296)*1024+(a-56320)+65536,h=n==="math"?0:1;if(119808<=l&&l<120484){var c=Math.floor((l-119808)/26);return[P0[c][2],P0[c][h]]}else if(120782<=l&&l<=120831){var p=Math.floor((l-120782)/10);return[Yg[p][2],Yg[p][h]]}else{if(l===120485||l===120486)return[P0[0][2],P0[0][h]];if(120486<l&&l<120782)return["",""];throw new et("Unsupported character: "+e)}},gu=function(e,n,r){return Dn[r][e]&&Dn[r][e].replace&&(e=Dn[r][e].replace),{value:e,metrics:E1(e,n,r)}},Bi=function(e,n,r,a,l){var h=gu(e,n,r),c=h.metrics;e=h.value;var p;if(c){var v=c.italic;(r==="text"||a&&a.font==="mathit")&&(v=0),p=new Ti(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 Ti(e,0,0,0,0,0,l);if(a){p.maxFontSize=a.sizeMultiplier,a.style.isTight()&&p.classes.push("mtight");var b=a.getColor();b&&(p.style.color=b)}return p},NE=function(e,n,r,a){return a===void 0&&(a=[]),r.font==="boldsymbol"&&gu(e,"Main-Bold",n).metrics?Bi(e,"Main-Bold",n,r,a.concat(["mathbf"])):e==="\\"||Dn[n][e].font==="main"?Bi(e,"Main-Regular",n,r,a):Bi(e,"AMS-Regular",n,r,a.concat(["amsrm"]))},DE=function(e,n,r,a,l){return l!=="textord"&&gu(e,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},RE=function(e,n,r){var a=e.mode,l=e.text,h=["mord"],c=a==="math"||a==="text"&&n.font,p=c?n.font:n.fontFamily,v="",b="";if(l.charCodeAt(0)===55349&&([v,b]=_E(l,a)),v.length>0)return Bi(l,v,a,n,h.concat(b));if(p){var g,m;if(p==="boldsymbol"){var x=DE(l,a,n,h,r);g=x.fontName,m=[x.fontClass]}else c?(g=u3[p].fontName,m=[p]):(g=z0(p,n.fontWeight,n.fontShape),m=[p,n.fontWeight,n.fontShape]);if(gu(l,g,a).metrics)return Bi(l,g,a,n,h.concat(m));if(s3.hasOwnProperty(l)&&g.slice(0,10)==="Typewriter"){for(var w=[],S=0;S<l.length;S++)w.push(Bi(l[S],g,a,n,h.concat(m)));return c3(w)}}if(r==="mathord")return Bi(l,"Math-Italic",a,n,h.concat(["mathnormal"]));if(r==="textord"){var k=Dn[a][l]&&Dn[a][l].font;if(k==="ams"){var C=z0("amsrm",n.fontWeight,n.fontShape);return Bi(l,C,a,n,h.concat("amsrm",n.fontWeight,n.fontShape))}else if(k==="main"||!k){var A=z0("textrm",n.fontWeight,n.fontShape);return Bi(l,A,a,n,h.concat(n.fontWeight,n.fontShape))}else{var T=z0(k,n.fontWeight,n.fontShape);return Bi(l,T,a,n,h.concat(T,n.fontWeight,n.fontShape))}}else throw new Error("unexpected type: "+r+" in makeOrd")},OE=(t,e)=>{if(xo(t.classes)!==xo(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 a in e.style)if(e.style.hasOwnProperty(a)&&t.style[a]!==e.style[a])return!1;return!0},IE=t=>{for(var e=0;e<t.length-1;e++){var n=t[e],r=t[e+1];n instanceof Ti&&r instanceof Ti&&OE(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},A1=function(e){for(var n=0,r=0,a=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>a&&(a=h.maxFontSize)}e.height=n,e.depth=r,e.maxFontSize=a},$r=function(e,n,r,a){var l=new u0(e,n,r,a);return A1(l),l},l3=(t,e,n,r)=>new u0(t,e,n,r),HE=function(e,n,r){var a=$r([e],[],n);return a.height=Math.max(r||n.fontMetrics().defaultRuleThickness,n.minRuleThickness),a.style.borderBottomWidth=lt(a.height),a.maxFontSize=1,a},PE=function(e,n,r,a){var l=new T1(e,n,r,a);return A1(l),l},c3=function(e){var n=new c0(e);return A1(n),n},zE=function(e,n){return e instanceof c0?$r([],[e],n):e},BE=function(e){if(e.positionType==="individualShift"){for(var n=e.children,r=[n[0]],a=-n[0].shift-n[0].elem.depth,l=a,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:a}}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}},FE=function(e,n){for(var{children:r,depth:a}=BE(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=$r(["pstrut"],[]);v.style.height=lt(l);for(var b=[],g=a,m=a,x=a,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||[],A=S.wrapperStyle||{},T=$r(C,[v,k],void 0,A);T.style.top=lt(-l-x-k.depth),S.marginLeft&&(T.style.marginLeft=S.marginLeft),S.marginRight&&(T.style.marginRight=S.marginRight),b.push(T),x+=k.height+k.depth}g=Math.min(g,x),m=Math.max(m,x)}var M=$r(["vlist"],b);M.style.height=lt(m);var y;if(g<0){var N=$r([],[]),z=$r(["vlist"],[N]);z.style.height=lt(-g);var q=$r(["vlist-s"],[new Ti("")]);y=[$r(["vlist-r"],[M,q]),$r(["vlist-r"],[z])]}else y=[$r(["vlist-r"],[M])];var P=$r(["vlist-t"],y);return y.length===2&&P.classes.push("vlist-t2"),P.height=m,P.depth=-g,P},qE=(t,e)=>{var n=$r(["mspace"],[],e),r=Vn(t,e);return n.style.marginRight=lt(r),n},z0=function(e,n,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}var l;return n==="textbf"&&r==="textit"?l="BoldItalic":n==="textbf"?l="Bold":n==="textit"?l="Italic":l="Regular",a+"-"+l},u3={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"}},d3={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},jE=function(e,n){var[r,a,l]=d3[e],h=new ko(r),c=new Ka([h],{width:lt(a),height:lt(l),style:"width:"+lt(a),viewBox:"0 0 "+1e3*a+" "+1e3*l,preserveAspectRatio:"xMinYMin"}),p=l3(["overlay"],[c],n);return p.height=l,p.style.height=lt(l),p.style.width=lt(a),p},Me={fontMap:u3,makeSymbol:Bi,mathsym:NE,makeSpan:$r,makeSvgSpan:l3,makeLineSpan:HE,makeAnchor:PE,makeFragment:c3,wrapFragment:zE,makeVList:FE,makeOrd:RE,makeGlue:qE,staticSvg:jE,svgData:d3,tryCombineChars:IE},$n={number:3,unit:"mu"},Uo={number:4,unit:"mu"},Ta={number:5,unit:"mu"},$E={mord:{mop:$n,mbin:Uo,mrel:Ta,minner:$n},mop:{mord:$n,mop:$n,mrel:Ta,minner:$n},mbin:{mord:Uo,mop:Uo,mopen:Uo,minner:Uo},mrel:{mord:Ta,mop:Ta,mopen:Ta,minner:Ta},mopen:{},mclose:{mop:$n,mbin:Uo,mrel:Ta,minner:$n},mpunct:{mord:$n,mop:$n,mrel:Ta,mopen:$n,mclose:$n,mpunct:$n,minner:$n},minner:{mord:$n,mop:$n,mbin:Uo,mrel:Ta,mopen:$n,mpunct:$n,minner:$n}},UE={mord:{mop:$n},mop:{mord:$n,mop:$n},mbin:{},mrel:{},mopen:{},mclose:{mop:$n},mpunct:{},minner:{mop:$n}},h3={},Hc={},Pc={};function pt(t){for(var{type:e,names:n,props:r,handler:a,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:a},p=0;p<n.length;++p)h3[n[p]]=c;e&&(l&&(Hc[e]=l),h&&(Pc[e]=h))}function as(t){var{type:e,htmlBuilder:n,mathmlBuilder:r}=t;pt({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var zc=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},Jn=function(e){return e.type==="ordgroup"?e.body:[e]},Xa=Me.makeSpan,VE=["leftmost","mbin","mopen","mrel","mop","mpunct"],WE=["rightmost","mrel","mclose","mpunct"],GE={display:Rt.DISPLAY,text:Rt.TEXT,script:Rt.SCRIPT,scriptscript:Rt.SCRIPTSCRIPT},KE={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},hr=function(e,n,r,a){a===void 0&&(a=[null,null]);for(var l=[],h=0;h<e.length;h++){var c=tn(e[h],n);if(c instanceof c0){var p=c.children;l.push(...p)}else l.push(c)}if(Me.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(GE[b.style]))}var g=Xa([a[0]||"leftmost"],[],n),m=Xa([a[1]||"rightmost"],[],n),x=r==="root";return Jg(l,(w,S)=>{var k=S.classes[0],C=w.classes[0];k==="mbin"&&At.contains(WE,C)?S.classes[0]="mord":C==="mbin"&&At.contains(VE,k)&&(w.classes[0]="mord")},{node:g},m,x),Jg(l,(w,S)=>{var k=zp(S),C=zp(w),A=k&&C?w.hasClass("mtight")?UE[k][C]:$E[k][C]:null;if(A)return Me.makeGlue(A,v)},{node:g},m,x),l},Jg=function t(e,n,r,a,l){a&&e.push(a);for(var h=0;h<e.length;h++){var c=e[h],p=p3(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=Xa(["leftmost"])),r.insertAfter=(g=>m=>{e.splice(g+1,0,m),h++})(h)}a&&e.pop()},p3=function(e){return e instanceof c0||e instanceof T1||e instanceof u0&&e.hasClass("enclosing")?e:null},XE=function t(e,n){var r=p3(e);if(r){var a=r.children;if(a.length){if(n==="right")return t(a[a.length-1],"right");if(n==="left")return t(a[0],"left")}}return e},zp=function(e,n){return e?(n&&(e=XE(e,n)),KE[e.classes[0]]||null):null},Zl=function(e,n){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Xa(n.concat(r))},tn=function(e,n,r){if(!e)return Xa();if(Hc[e.type]){var a=Hc[e.type](e,n);if(r&&n.size!==r.size){a=Xa(n.sizingClasses(r),[a],n);var l=n.sizeMultiplier/r.sizeMultiplier;a.height*=l,a.depth*=l}return a}else throw new et("Got group of unknown type: '"+e.type+"'")};function B0(t,e){var n=Xa(["base"],t,e),r=Xa(["strut"]);return r.style.height=lt(n.height+n.depth),n.depth&&(r.style.verticalAlign=lt(-n.depth)),n.children.unshift(r),n}function Bp(t,e){var n=null;t.length===1&&t[0].type==="tag"&&(n=t[0].tag,t=t[0].body);var r=hr(t,e,"root"),a;r.length===2&&r[1].hasClass("tag")&&(a=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(B0(h,e)),h=[])}else r[c].hasClass("newline")&&(h.pop(),h.length>0&&(l.push(B0(h,e)),h=[]),l.push(r[c]));h.length>0&&l.push(B0(h,e));var v;n?(v=B0(hr(n,e,!0)),v.classes=["tag"],l.push(v)):a&&l.push(a);var b=Xa(["katex-html"],l);if(b.setAttribute("aria-hidden","true"),v){var g=v.children[0];g.style.height=lt(b.height+b.depth),b.depth&&(g.style.verticalAlign=lt(-b.depth))}return b}function f3(t){return new c0(t)}class oi{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=xo(this.classes));for(var r=0;r<this.children.length;r++)if(this.children[r]instanceof sa&&this.children[r+1]instanceof sa){for(var a=this.children[r].toText()+this.children[++r].toText();this.children[r+1]instanceof sa;)a+=this.children[++r].toText();e.appendChild(new sa(a).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+=At.escape(this.attributes[n]),e+='"');this.classes.length>0&&(e+=' class ="'+At.escape(xo(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 sa{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return At.escape(this.toText())}toText(){return this.text}}class ZE{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",lt(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+lt(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Je={MathNode:oi,TextNode:sa,SpaceNode:ZE,newDocumentFragment:f3},Ai=function(e,n,r){return Dn[n][e]&&Dn[n][e].replace&&e.charCodeAt(0)!==55349&&!(s3.hasOwnProperty(e)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(e=Dn[n][e].replace),new Je.TextNode(e)},M1=function(e){return e.length===1?e[0]:new Je.MathNode("mrow",e)},C1=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 a=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(At.contains(["\\imath","\\jmath"],l))return null;Dn[a][l]&&Dn[a][l].replace&&(l=Dn[a][l].replace);var h=Me.fontMap[r].fontName;return E1(l,h,a)?Me.fontMap[r].variant:null};function Lh(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof sa&&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 sa&&n.text===","}else return!1}var Wr=function(e,n,r){if(e.length===1){var a=An(e[0],n);return r&&a instanceof oi&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var l=[],h,c=0;c<e.length;c++){var p=An(e[c],n);if(p instanceof oi&&h instanceof oi){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(Lh(p)&&h.type==="mn"){h.children.push(...p.children);continue}else if(p.type==="mn"&&Lh(h))p.children=[...h.children,...p.children],l.pop();else if((p.type==="msup"||p.type==="msub")&&p.children.length>=1&&(h.type==="mn"||Lh(h))){var v=p.children[0];v instanceof oi&&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 sa&&b.text==="̸"&&(p.type==="mo"||p.type==="mi"||p.type==="mn")){var g=p.children[0];g instanceof sa&&g.text.length>0&&(g.text=g.text.slice(0,1)+"̸"+g.text.slice(1),l.pop())}}}l.push(p),h=p}return l},So=function(e,n,r){return M1(Wr(e,n,r))},An=function(e,n){if(!e)return new Je.MathNode("mrow");if(Pc[e.type]){var r=Pc[e.type](e,n);return r}else throw new et("Got group of unknown type: '"+e.type+"'")};function Qg(t,e,n,r,a){var l=Wr(t,n),h;l.length===1&&l[0]instanceof oi&&At.contains(["mrow","mtable"],l[0].type)?h=l[0]:h=new Je.MathNode("mrow",l);var c=new Je.MathNode("annotation",[new Je.TextNode(e)]);c.setAttribute("encoding","application/x-tex");var p=new Je.MathNode("semantics",[h,c]),v=new Je.MathNode("math",[p]);v.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&v.setAttribute("display","block");var b=a?"katex":"katex-mathml";return Me.makeSpan([b],[v])}var m3=function(e){return new _a({style:e.displayMode?Rt.DISPLAY:Rt.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},g3=function(e,n){if(n.displayMode){var r=["katex-display"];n.leqno&&r.push("leqno"),n.fleqn&&r.push("fleqn"),e=Me.makeSpan(r,[e])}return e},YE=function(e,n,r){var a=m3(r),l;if(r.output==="mathml")return Qg(e,n,a,r.displayMode,!0);if(r.output==="html"){var h=Bp(e,a);l=Me.makeSpan(["katex"],[h])}else{var c=Qg(e,n,a,r.displayMode,!1),p=Bp(e,a);l=Me.makeSpan(["katex"],[c,p])}return g3(l,r)},JE=function(e,n,r){var a=m3(r),l=Bp(e,a),h=Me.makeSpan(["katex"],[l]);return g3(h,r)},QE={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":"="},eT=function(e){var n=new Je.MathNode("mo",[new Je.TextNode(QE[e.replace(/^\\/,"")])]);return n.setAttribute("stretchy","true"),n},tT={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]},nT=function(e){return e.type==="ordgroup"?e.body.length:1},rT=function(e,n){function r(){var c=4e5,p=e.label.slice(1);if(At.contains(["widehat","widecheck","widetilde","utilde"],p)){var v=e,b=nT(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 ko(m),k=new Ka([S],{width:"100%",height:lt(x),viewBox:"0 0 "+c+" "+g,preserveAspectRatio:"none"});return{span:Me.makeSvgSpan([],[k],n),minWidth:0,height:x}}else{var C=[],A=tT[p],[T,M,y]=A,N=y/1e3,z=T.length,q,P;if(z===1){var Y=A[3];q=["hide-tail"],P=[Y]}else if(z===2)q=["halfarrow-left","halfarrow-right"],P=["xMinYMin","xMaxYMin"];else if(z===3)q=["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 ue=new ko(T[te]),Le=new Ka([ue],{width:"400em",height:lt(N),viewBox:"0 0 "+c+" "+y,preserveAspectRatio:P[te]+" slice"}),qe=Me.makeSvgSpan([q[te]],[Le],n);if(z===1)return{span:qe,minWidth:M,height:N};qe.style.height=lt(N),C.push(qe)}return{span:Me.makeSpan(["stretchy"],C,n),minWidth:M,height:N}}}var{span:a,minWidth:l,height:h}=r();return a.height=h,a.style.height=lt(h),l>0&&(a.style.minWidth=lt(l)),a},iT=function(e,n,r,a,l){var h,c=e.height+e.depth+r+a;if(/fbox|color|angl/.test(n)){if(h=Me.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 Hp({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(n)&&v.push(new Hp({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var b=new Ka(v,{width:"100%",height:lt(c)});h=Me.makeSvgSpan([],[b],l)}return h.height=c,h.style.height=lt(c),h},Za={encloseSpan:iT,mathMLnode:eT,svgSpan:rT};function Gt(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 L1(t){var e=vu(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 vu(t){return t&&(t.type==="atom"||LE.hasOwnProperty(t.type))?t:null}var _1=(t,e)=>{var n,r,a;t&&t.type==="supsub"?(r=Gt(t.base,"accent"),n=r.base,t.base=n,a=ME(tn(t,e)),t.base=r):(r=Gt(t,"accent"),n=r.base);var l=tn(n,e.havingCrampedStyle()),h=r.isShifty&&At.isCharacterBox(n),c=0;if(h){var p=At.getBaseElem(n),v=tn(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=Za.svgSpan(r,e),m=Me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+lt(2*c)+")",marginLeft:lt(2*c)}:void 0}]},e);else{var x,w;r.label==="\\vec"?(x=Me.staticSvg("vec",e),w=Me.svgData.vec[1]):(x=Me.makeOrd({mode:r.mode,text:r.label},e,"textord"),x=Wg(x),x.italic=0,w=x.width,b&&(g+=x.depth)),m=Me.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=lt(k),r.label==="\\textcircled"&&(m.style.top=".2em"),m=Me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:-g},{type:"elem",elem:m}]},e)}var C=Me.makeSpan(["mord","accent"],[m],e);return a?(a.children[0]=C,a.height=Math.max(C.height,a.height),a.classes[0]="mord",a):C},v3=(t,e)=>{var n=t.isStretchy?Za.mathMLnode(t.label):new Je.MathNode("mo",[Ai(t.label,t.mode)]),r=new Je.MathNode("mover",[An(t.base,e),n]);return r.setAttribute("accent","true"),r},aT=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));pt({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=zc(e[0]),r=!aT.test(t.funcName),a=!r||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:_1,mathmlBuilder:v3});pt({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:_1,mathmlBuilder:v3});pt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(t,e)=>{var n=tn(t.base,e),r=Za.svgSpan(t,e),a=t.label==="\\utilde"?.12:0,l=Me.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]},e);return Me.makeSpan(["mord","accentunder"],[l],e)},mathmlBuilder:(t,e)=>{var n=Za.mathMLnode(t.label),r=new Je.MathNode("munder",[An(t.base,e),n]);return r.setAttribute("accentunder","true"),r}});var F0=t=>{var e=new Je.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};pt({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:a}=t;return{type:"xArrow",mode:r.mode,label:a,body:e[0],below:n[0]}},htmlBuilder(t,e){var n=e.style,r=e.havingStyle(n.sup()),a=Me.wrapFragment(tn(t.body,r,e),e),l=t.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(l+"-arrow-pad");var h;t.below&&(r=e.havingStyle(n.sub()),h=Me.wrapFragment(tn(t.below,r,e),e),h.classes.push(l+"-arrow-pad"));var c=Za.svgSpan(t,e),p=-e.fontMetrics().axisHeight+.5*c.height,v=-e.fontMetrics().axisHeight-.5*c.height-.111;(a.depth>.25||t.label==="\\xleftequilibrium")&&(v-=a.depth);var b;if(h){var g=-e.fontMetrics().axisHeight+h.height+.5*c.height+.111;b=Me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:v},{type:"elem",elem:c,shift:p},{type:"elem",elem:h,shift:g}]},e)}else b=Me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:v},{type:"elem",elem:c,shift:p}]},e);return b.children[0].children[0].children[1].classes.push("svg-align"),Me.makeSpan(["mrel","x-arrow"],[b],e)},mathmlBuilder(t,e){var n=Za.mathMLnode(t.label);n.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(t.body){var a=F0(An(t.body,e));if(t.below){var l=F0(An(t.below,e));r=new Je.MathNode("munderover",[n,l,a])}else r=new Je.MathNode("mover",[n,a])}else if(t.below){var h=F0(An(t.below,e));r=new Je.MathNode("munder",[n,h])}else r=F0(),r=new Je.MathNode("mover",[n,r]);return r}});var oT=Me.makeSpan;function b3(t,e){var n=hr(t.body,e,!0);return oT([t.mclass],n,e)}function y3(t,e){var n,r=Wr(t.body,e);return t.mclass==="minner"?n=new Je.MathNode("mpadded",r):t.mclass==="mord"?t.isCharacterBox?(n=r[0],n.type="mi"):n=new Je.MathNode("mi",r):(t.isCharacterBox?(n=r[0],n.type="mo"):n=new Je.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}pt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:n,funcName:r}=t,a=e[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Jn(a),isCharacterBox:At.isCharacterBox(a)}},htmlBuilder:b3,mathmlBuilder:y3});var bu=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"};pt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:n}=t;return{type:"mclass",mode:n.mode,mclass:bu(e[0]),body:Jn(e[1]),isCharacterBox:At.isCharacterBox(e[1])}}});pt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:n,funcName:r}=t,a=e[1],l=e[0],h;r!=="\\stackrel"?h=bu(a):h="mrel";var c={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Jn(a)},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:At.isCharacterBox(p)}},htmlBuilder:b3,mathmlBuilder:y3});pt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:n}=t;return{type:"pmb",mode:n.mode,mclass:bu(e[0]),body:Jn(e[0])}},htmlBuilder(t,e){var n=hr(t.body,e,!0),r=Me.makeSpan([t.mclass],n,e);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(t,e){var n=Wr(t.body,e),r=new Je.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var sT={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},e4=()=>({type:"styling",body:[],mode:"math",style:"display"}),t4=t=>t.type==="textord"&&t.text==="@",lT=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function cT(t,e,n){var r=sT[t];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var a=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:[a,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 uT(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=[],a=[r],l=0;l<e.length;l++){for(var h=e[l],c=e4(),p=0;p<h.length;p++)if(!t4(h[p]))c.body.push(h[p]);else{r.push(c),p+=1;var v=L1(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(lT(h[x],v)){m=!1,p=x;break}if(t4(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=cT(v,b,t),S={type:"styling",body:[w],mode:"math",style:"display"};r.push(S),c=e4()}l%2===0?r.push(c):r.shift(),r=[],a.push(r)}t.gullet.endGroup(),t.gullet.endGroup();var k=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:k,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}pt({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=Me.wrapFragment(tn(t.label,n,e),e);return r.classes.push("cd-label-"+t.side),r.style.bottom=lt(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){var n=new Je.MathNode("mrow",[An(t.label,e)]);return n=new Je.MathNode("mpadded",[n]),n.setAttribute("width","0"),t.side==="left"&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),n=new Je.MathNode("mstyle",[n]),n.setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}});pt({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=Me.wrapFragment(tn(t.fragment,e),e);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder(t,e){return new Je.MathNode("mrow",[An(t.fragment,e)])}});pt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:n}=t,r=Gt(e[0],"ordgroup"),a=r.body,l="",h=0;h<a.length;h++){var c=Gt(a[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 w3=(t,e)=>{var n=hr(t.body,e.withColor(t.color),!1);return Me.makeFragment(n)},x3=(t,e)=>{var n=Wr(t.body,e.withColor(t.color)),r=new Je.MathNode("mstyle",n);return r.setAttribute("mathcolor",t.color),r};pt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:n}=t,r=Gt(e[0],"color-token").color,a=e[1];return{type:"color",mode:n.mode,color:r,body:Jn(a)}},htmlBuilder:w3,mathmlBuilder:x3});pt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:n,breakOnTokenText:r}=t,a=Gt(e[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var l=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:l}},htmlBuilder:w3,mathmlBuilder:x3});pt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,n){var{parser:r}=t,a=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:a&&Gt(a,"size").value}},htmlBuilder(t,e){var n=Me.makeSpan(["mspace"],[],e);return t.newLine&&(n.classes.push("newline"),t.size&&(n.style.marginTop=lt(Vn(t.size,e)))),n},mathmlBuilder(t,e){var n=new Je.MathNode("mspace");return t.newLine&&(n.setAttribute("linebreak","newline"),t.size&&n.setAttribute("height",lt(Vn(t.size,e)))),n}});var Fp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},k3=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new et("Expected a control sequence",t);return e},dT=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},S3=(t,e,n,r)=>{var a=t.gullet.macros.get(n.text);a==null&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!t.gullet.isExpandable(n.text)}),t.gullet.macros.set(e,a,r)};pt({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(Fp[r.text])return(n==="\\global"||n==="\\\\globallong")&&(r.text=Fp[r.text]),Gt(e.parseFunction(),"internal");throw new et("Invalid token after macro prefix",r)}});pt({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(),a=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))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(a,{tokens:p,numArgs:l,delimiters:c},n===Fp[n]),{type:"internal",mode:e.mode}}});pt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=k3(e.gullet.popToken());e.gullet.consumeSpaces();var a=dT(e);return S3(e,r,a,n==="\\\\globallet"),{type:"internal",mode:e.mode}}});pt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:n}=t,r=k3(e.gullet.popToken()),a=e.gullet.popToken(),l=e.gullet.popToken();return S3(e,r,l,n==="\\\\globalfuture"),e.gullet.pushToken(l),e.gullet.pushToken(a),{type:"internal",mode:e.mode}}});var Ll=function(e,n,r){var a=Dn.math[e]&&Dn.math[e].replace,l=E1(a||e,n,r);if(!l)throw new Error("Unsupported symbol "+e+" and font size "+n+".");return l},N1=function(e,n,r,a){var l=r.havingBaseStyle(n),h=Me.makeSpan(a.concat(l.sizingClasses(r)),[e],r),c=l.sizeMultiplier/r.sizeMultiplier;return h.height*=c,h.depth*=c,h.maxFontSize=l.sizeMultiplier,h},E3=function(e,n,r){var a=n.havingBaseStyle(r),l=(1-n.sizeMultiplier/a.sizeMultiplier)*n.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=lt(l),e.height-=l,e.depth+=l},hT=function(e,n,r,a,l,h){var c=Me.makeSymbol(e,"Main-Regular",l,a),p=N1(c,n,a,h);return r&&E3(p,a,n),p},pT=function(e,n,r,a){return Me.makeSymbol(e,"Size"+n+"-Regular",r,a)},T3=function(e,n,r,a,l,h){var c=pT(e,n,l,a),p=N1(Me.makeSpan(["delimsizing","size"+n],[c],a),Rt.TEXT,a,h);return r&&E3(p,a,Rt.TEXT),p},_h=function(e,n,r){var a;n==="Size1-Regular"?a="delim-size1":a="delim-size4";var l=Me.makeSpan(["delimsizinginner",a],[Me.makeSpan([],[Me.makeSymbol(e,n,r)])]);return{type:"elem",elem:l}},Nh=function(e,n,r){var a=oa["Size4-Regular"][e.charCodeAt(0)]?oa["Size4-Regular"][e.charCodeAt(0)][4]:oa["Size1-Regular"][e.charCodeAt(0)][4],l=new ko("inner",bE(e,Math.round(1e3*n))),h=new Ka([l],{width:lt(a),height:lt(n),style:"width:"+lt(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*n),preserveAspectRatio:"xMinYMin"}),c=Me.makeSvgSpan([],[h],r);return c.height=n,c.style.height=lt(n),c.style.width=lt(a),{type:"elem",elem:c}},qp=.008,q0={type:"kern",size:-1*qp},fT=["|","\\lvert","\\rvert","\\vert"],mT=["\\|","\\lVert","\\rVert","\\Vert"],A3=function(e,n,r,a,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"):At.contains(fT,e)?(v="",g="vert",m=333):At.contains(mT,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=Ll(c,x,l),S=w.height+w.depth,k=Ll(v,x,l),C=k.height+k.depth,A=Ll(b,x,l),T=A.height+A.depth,M=0,y=1;if(p!==null){var N=Ll(p,x,l);M=N.height+N.depth,y=2}var z=S+T+M,q=Math.max(0,Math.ceil((n-z)/(y*C))),P=z+q*y*C,Y=a.fontMetrics().axisHeight;r&&(Y*=a.sizeMultiplier);var te=P/2-Y,ue=[];if(g.length>0){var Le=P-S-T,qe=Math.round(P*1e3),Xe=yE(g,Math.round(Le*1e3)),it=new ko(g,Xe),$e=(m/1e3).toFixed(3)+"em",De=(qe/1e3).toFixed(3)+"em",nt=new Ka([it],{width:$e,height:De,viewBox:"0 0 "+m+" "+qe}),ut=Me.makeSvgSpan([],[nt],a);ut.height=qe/1e3,ut.style.width=$e,ut.style.height=De,ue.push({type:"elem",elem:ut})}else{if(ue.push(_h(b,x,l)),ue.push(q0),p===null){var je=P-S-T+2*qp;ue.push(Nh(v,je,a))}else{var j=(P-S-T-M)/2+2*qp;ue.push(Nh(v,j,a)),ue.push(q0),ue.push(_h(p,x,l)),ue.push(q0),ue.push(Nh(v,j,a))}ue.push(q0),ue.push(_h(c,x,l))}var yt=a.havingBaseStyle(Rt.TEXT),It=Me.makeVList({positionType:"bottom",positionData:te,children:ue},yt);return N1(Me.makeSpan(["delimsizing","mult"],[It],yt),Rt.TEXT,a,h)},Dh=80,Rh=.08,Oh=function(e,n,r,a,l){var h=vE(e,a,r),c=new ko(e,h),p=new Ka([c],{width:"400em",height:lt(n),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Me.makeSvgSpan(["hide-tail"],[p],l)},gT=function(e,n){var r=n.havingBaseSizing(),a=_3("\\surd",e*r.sizeMultiplier,L3,r),l=r.sizeMultiplier,h=Math.max(0,n.minRuleThickness-n.fontMetrics().sqrtRuleThickness),c,p=0,v=0,b=0,g;return a.type==="small"?(b=1e3+1e3*h+Dh,e<1?l=1:e<1.4&&(l=.7),p=(1+h+Rh)/l,v=(1+h)/l,c=Oh("sqrtMain",p,b,h,n),c.style.minWidth="0.853em",g=.833/l):a.type==="large"?(b=(1e3+Dh)*ql[a.size],v=(ql[a.size]+h)/l,p=(ql[a.size]+h+Rh)/l,c=Oh("sqrtSize"+a.size,p,b,h,n),c.style.minWidth="1.02em",g=1/l):(p=e+h+Rh,v=e+h,b=Math.floor(1e3*e+h)+Dh,c=Oh("sqrtTall",p,b,h,n),c.style.minWidth="0.742em",g=1.056),c.height=v,c.style.height=lt(p),{span:c,advanceWidth:g,ruleWidth:(n.fontMetrics().sqrtRuleThickness+h)*l}},M3=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],vT=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],C3=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ql=[0,1.2,1.8,2.4,3],bT=function(e,n,r,a,l){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),At.contains(M3,e)||At.contains(C3,e))return T3(e,n,!1,r,a,l);if(At.contains(vT,e))return A3(e,ql[n],!1,r,a,l);throw new et("Illegal delimiter: '"+e+"'")},yT=[{type:"small",style:Rt.SCRIPTSCRIPT},{type:"small",style:Rt.SCRIPT},{type:"small",style:Rt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wT=[{type:"small",style:Rt.SCRIPTSCRIPT},{type:"small",style:Rt.SCRIPT},{type:"small",style:Rt.TEXT},{type:"stack"}],L3=[{type:"small",style:Rt.SCRIPTSCRIPT},{type:"small",style:Rt.SCRIPT},{type:"small",style:Rt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],xT=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.")},_3=function(e,n,r,a){for(var l=Math.min(2,3-a.style.size),h=l;h<r.length&&r[h].type!=="stack";h++){var c=Ll(e,xT(r[h]),"math"),p=c.height+c.depth;if(r[h].type==="small"){var v=a.havingBaseStyle(r[h].style);p*=v.sizeMultiplier}if(p>n)return r[h]}return r[r.length-1]},N3=function(e,n,r,a,l,h){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var c;At.contains(C3,e)?c=yT:At.contains(M3,e)?c=L3:c=wT;var p=_3(e,n,c,a);return p.type==="small"?hT(e,p.style,r,a,l,h):p.type==="large"?T3(e,p.size,r,a,l,h):A3(e,n,r,a,l,h)},kT=function(e,n,r,a,l,h){var c=a.fontMetrics().axisHeight*a.sizeMultiplier,p=901,v=5/a.fontMetrics().ptPerEm,b=Math.max(n-c,r+c),g=Math.max(b/500*p,2*b-v);return N3(e,g,!0,a,l,h)},ja={sqrtImage:gT,sizedDelim:bT,sizeToMaxHeight:ql,customSizedDelim:N3,leftRightDelim:kT},n4={"\\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}},ST=["(","\\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 yu(t,e){var n=vu(t);if(n&&At.contains(ST,n.text))return n;throw n?new et("Invalid delimiter '"+n.text+"' after '"+e.funcName+"'",t):new et("Invalid delimiter type '"+t.type+"'",t)}pt({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=yu(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:n4[t.funcName].size,mclass:n4[t.funcName].mclass,delim:n.text}},htmlBuilder:(t,e)=>t.delim==="."?Me.makeSpan([t.mclass]):ja.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Ai(t.delim,t.mode));var n=new Je.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=lt(ja.sizeToMaxHeight[t.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}});function r4(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}pt({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:yu(e[0],t).text,color:n}}});pt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=yu(e[0],t),r=t.parser;++r.leftrightDepth;var a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var l=Gt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:l.delim,rightColor:l.color}},htmlBuilder:(t,e)=>{r4(t);for(var n=hr(t.body,e,!0,["mopen","mclose"]),r=0,a=0,l=!1,h=0;h<n.length;h++)n[h].isMiddle?l=!0:(r=Math.max(n[h].height,r),a=Math.max(n[h].depth,a));r*=e.sizeMultiplier,a*=e.sizeMultiplier;var c;if(t.left==="."?c=Zl(e,["mopen"]):c=ja.leftRightDelim(t.left,r,a,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]=ja.leftRightDelim(b.delim,r,a,b.options,t.mode,[]))}var g;if(t.right===".")g=Zl(e,["mclose"]);else{var m=t.rightColor?e.withColor(t.rightColor):e;g=ja.leftRightDelim(t.right,r,a,m,t.mode,["mclose"])}return n.push(g),Me.makeSpan(["minner"],n,e)},mathmlBuilder:(t,e)=>{r4(t);var n=Wr(t.body,e);if(t.left!=="."){var r=new Je.MathNode("mo",[Ai(t.left,t.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if(t.right!=="."){var a=new Je.MathNode("mo",[Ai(t.right,t.mode)]);a.setAttribute("fence","true"),t.rightColor&&a.setAttribute("mathcolor",t.rightColor),n.push(a)}return M1(n)}});pt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var n=yu(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=Zl(e,[]);else{n=ja.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==="|"?Ai("|","text"):Ai(t.delim,t.mode),r=new Je.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var D1=(t,e)=>{var n=Me.wrapFragment(tn(t.body,e),e),r=t.label.slice(1),a=e.sizeMultiplier,l,h=0,c=At.isCharacterBox(t.body);if(r==="sout")l=Me.makeSpan(["stretchy","sout"]),l.height=e.fontMetrics().defaultRuleThickness/a,h=-.5*e.fontMetrics().xHeight;else if(r==="phase"){var p=Vn({number:.6,unit:"pt"},e),v=Vn({number:.35,unit:"ex"},e),b=e.havingBaseSizing();a=a/b.sizeMultiplier;var g=n.height+n.depth+p+v;n.style.paddingLeft=lt(g/2+p);var m=Math.floor(1e3*g*a),x=mE(m),w=new Ka([new ko("phase",x)],{width:"400em",height:lt(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});l=Me.makeSvgSpan(["hide-tail"],[w],e),l.style.height=lt(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=Za.encloseSpan(n,r,S,k,e),/fbox|boxed|fcolorbox/.test(r)?(l.style.borderStyle="solid",l.style.borderWidth=lt(C)):r==="angl"&&C!==.049&&(l.style.borderTopWidth=lt(C),l.style.borderRightWidth=lt(C)),h=n.depth+k,t.backgroundColor&&(l.style.backgroundColor=t.backgroundColor,t.borderColor&&(l.style.borderColor=t.borderColor))}var A;if(t.backgroundColor)A=Me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:h},{type:"elem",elem:n,shift:0}]},e);else{var T=/cancel|phase/.test(r)?["svg-align"]:[];A=Me.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:0},{type:"elem",elem:l,shift:h,wrapperClasses:T}]},e)}return/cancel/.test(r)&&(A.height=n.height,A.depth=n.depth),/cancel/.test(r)&&!c?Me.makeSpan(["mord","cancel-lap"],[A],e):Me.makeSpan(["mord"],[A],e)},R1=(t,e)=>{var n=0,r=new Je.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[An(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 a=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);r.setAttribute("style","border: "+a+"em solid "+String(t.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&r.setAttribute("mathbackground",t.backgroundColor),r};pt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,n){var{parser:r,funcName:a}=t,l=Gt(e[0],"color-token").color,h=e[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:l,body:h}},htmlBuilder:D1,mathmlBuilder:R1});pt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,n){var{parser:r,funcName:a}=t,l=Gt(e[0],"color-token").color,h=Gt(e[1],"color-token").color,c=e[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:h,borderColor:l,body:c}},htmlBuilder:D1,mathmlBuilder:R1});pt({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]}}});pt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:n,funcName:r}=t,a=e[0];return{type:"enclose",mode:n.mode,label:r,body:a}},htmlBuilder:D1,mathmlBuilder:R1});pt({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 D3={};function ha(t){for(var{type:e,names:n,props:r,handler:a,htmlBuilder:l,mathmlBuilder:h}=t,c={type:e,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},p=0;p<n.length;++p)D3[n[p]]=c;l&&(Hc[e]=l),h&&(Pc[e]=h)}var R3={};function K(t,e){R3[t]=e}function i4(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 wu=t=>{var e=t.parser.settings;if(!e.displayMode)throw new et("{"+t.envName+"} can be used only in display mode.")};function O1(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function Co(t,e,n){var{hskipBeforeAndAfter:r,addJot:a,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=[],A=p!=null?[]:void 0;function T(){p&&t.gullet.macros.set("\\@eqnsw","1",!0)}function M(){A&&(t.gullet.macros.get("\\df@tag")?(A.push(t.subparse([new xi("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):A.push(!!p&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(T(),C.push(i4(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(i4(t)),w=[],S.push(w),T()}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:a,arraystretch:h,body:S,cols:l,rowGaps:k,hskipBeforeAndAfter:r,hLinesBeforeRow:C,colSeparationType:c,tags:A,leqno:m}}function I1(t){return t.slice(0,1)==="d"?"display":"text"}var pa=function(e,n){var r,a,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(Rt.SCRIPT).sizeMultiplier;m=.2778*(x/n.sizeMultiplier)}var w=e.colSeparationType==="CD"?Vn({number:3,unit:"ex"},n):12*g,S=3*g,k=e.arraystretch*w,C=.7*k,A=.3*k,T=0;function M(Ee){for(var ze=0;ze<Ee.length;++ze)ze>0&&(T+=.25),v.push({pos:T,isDashed:Ee[ze]})}for(M(h[0]),r=0;r<e.body.length;++r){var y=e.body[r],N=C,z=A;c<y.length&&(c=y.length);var q=new Array(y.length);for(a=0;a<y.length;++a){var P=tn(y[a],n);z<P.depth&&(z=P.depth),N<P.height&&(N=P.height),q[a]=P}var Y=e.rowGaps[r],te=0;Y&&(te=Vn(Y,n),te>0&&(te+=A,z<te&&(z=te),te=0)),e.addJot&&(z+=S),q.height=N,q.depth=z,T+=N,q.pos=T,T+=z+te,p[r]=q,M(h[r+1])}var ue=T/2+n.fontMetrics().axisHeight,Le=e.cols||[],qe=[],Xe,it,$e=[];if(e.tags&&e.tags.some(Ee=>Ee))for(r=0;r<l;++r){var De=p[r],nt=De.pos-ue,ut=e.tags[r],je=void 0;ut===!0?je=Me.makeSpan(["eqn-num"],[],n):ut===!1?je=Me.makeSpan([],[],n):je=Me.makeSpan([],hr(ut,n,!0),n),je.depth=De.depth,je.height=De.height,$e.push({type:"elem",elem:je,shift:nt})}for(a=0,it=0;a<c||it<Le.length;++a,++it){for(var j=Le[it]||{},yt=!0;j.type==="separator";){if(yt||(Xe=Me.makeSpan(["arraycolsep"],[]),Xe.style.width=lt(n.fontMetrics().doubleRuleSep),qe.push(Xe)),j.separator==="|"||j.separator===":"){var It=j.separator==="|"?"solid":"dashed",bt=Me.makeSpan(["vertical-separator"],[],n);bt.style.height=lt(T),bt.style.borderRightWidth=lt(b),bt.style.borderRightStyle=It,bt.style.margin="0 "+lt(-b/2);var Mt=T-ue;Mt&&(bt.style.verticalAlign=lt(-Mt)),qe.push(bt)}else throw new et("Invalid separator type: "+j.separator);it++,j=Le[it]||{},yt=!1}if(!(a>=c)){var se=void 0;(a>0||e.hskipBeforeAndAfter)&&(se=At.deflt(j.pregap,m),se!==0&&(Xe=Me.makeSpan(["arraycolsep"],[]),Xe.style.width=lt(se),qe.push(Xe)));var fe=[];for(r=0;r<l;++r){var J=p[r],Q=J[a];if(Q){var Ie=J.pos-ue;Q.depth=J.depth,Q.height=J.height,fe.push({type:"elem",elem:Q,shift:Ie})}}fe=Me.makeVList({positionType:"individualShift",children:fe},n),fe=Me.makeSpan(["col-align-"+(j.align||"c")],[fe]),qe.push(fe),(a<c-1||e.hskipBeforeAndAfter)&&(se=At.deflt(j.postgap,m),se!==0&&(Xe=Me.makeSpan(["arraycolsep"],[]),Xe.style.width=lt(se),qe.push(Xe)))}}if(p=Me.makeSpan(["mtable"],qe),v.length>0){for(var de=Me.makeLineSpan("hline",n,b),W=Me.makeLineSpan("hdashline",n,b),Z=[{type:"elem",elem:p,shift:0}];v.length>0;){var ge=v.pop(),ce=ge.pos-ue;ge.isDashed?Z.push({type:"elem",elem:W,shift:ce}):Z.push({type:"elem",elem:de,shift:ce})}p=Me.makeVList({positionType:"individualShift",children:Z},n)}if($e.length===0)return Me.makeSpan(["mord"],[p],n);var ve=Me.makeVList({positionType:"individualShift",children:$e},n);return ve=Me.makeSpan(["tag"],[ve],n),Me.makeFragment([p,ve])},ET={c:"center ",l:"left ",r:"right "},fa=function(e,n){for(var r=[],a=new Je.MathNode("mtd",[],["mtr-glue"]),l=new Je.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 Je.MathNode("mtd",[An(c[v],n)]));e.tags&&e.tags[h]&&(p.unshift(a),p.push(a),e.leqno?p.unshift(l):p.push(l)),r.push(new Je.MathNode("mtr",p))}var b=new Je.MathNode("mtable",r),g=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);b.setAttribute("rowspacing",lt(g));var m="",x="";if(e.cols&&e.cols.length>0){var w=e.cols,S="",k=!1,C=0,A=w.length;w[0].type==="separator"&&(m+="top ",C=1),w[w.length-1].type==="separator"&&(m+="bottom ",A-=1);for(var T=C;T<A;T++)w[T].type==="align"?(x+=ET[w[T].align],k&&(S+="none "),k=!0):w[T].type==="separator"&&k&&(S+=w[T].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="",q=e.hLinesBeforeRow;m+=q[0].length>0?"left ":"",m+=q[q.length-1].length>0?"right ":"";for(var P=1;P<q.length-1;P++)z+=q[P].length===0?"none ":q[P][0]?"dashed ":"solid ";return/[sd]/.test(z)&&b.setAttribute("rowlines",z.trim()),m!==""&&(b=new Je.MathNode("menclose",[b]),b.setAttribute("notation",m.trim())),e.arraystretch&&e.arraystretch<1&&(b=new Je.MathNode("mstyle",[b]),b.setAttribute("scriptlevel","1")),b},O3=function(e,n){e.envName.indexOf("ed")===-1&&wu(e);var r=[],a=e.envName.indexOf("at")>-1?"alignat":"align",l=e.envName==="split",h=Co(e.parser,{cols:r,addJot:!0,autoTag:l?void 0:O1(e.envName),emptySingleRow:!0,colSeparationType:a,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=Gt(n[0].body[g],"textord");b+=m.text}c=Number(b),p=c*2}var x=!p;h.body.forEach(function(C){for(var A=1;A<C.length;A+=2){var T=Gt(C[A],"styling"),M=Gt(T.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 et("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};ha({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var n=vu(e[0]),r=n?[e[0]]:Gt(e[0],"ordgroup").body,a=r.map(function(h){var c=L1(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:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return Co(t.parser,l,I1(t.envName))},htmlBuilder:pa,mathmlBuilder:fa});ha({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 a=t.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,"lcr".indexOf(n)===-1)throw new et("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),r.cols=[{type:"align",align:n}]}}var l=Co(t.parser,r,I1(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:pa,mathmlBuilder:fa});ha({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},n=Co(t.parser,e,"script");return n.colSeparationType="small",n},htmlBuilder:pa,mathmlBuilder:fa});ha({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var n=vu(e[0]),r=n?[e[0]]:Gt(e[0],"ordgroup").body,a=r.map(function(h){var c=L1(h),p=c.text;if("lc".indexOf(p)!==-1)return{type:"align",align:p};throw new et("Unknown column alignment: "+p,h)});if(a.length>1)throw new et("{subarray} can contain only one column");var l={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5};if(l=Co(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:pa,mathmlBuilder:fa});ha({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=Co(t.parser,e,I1(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:pa,mathmlBuilder:fa});ha({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:O3,htmlBuilder:pa,mathmlBuilder:fa});ha({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){At.contains(["gather","gather*"],t.envName)&&wu(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:O1(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Co(t.parser,e,"display")},htmlBuilder:pa,mathmlBuilder:fa});ha({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:O3,htmlBuilder:pa,mathmlBuilder:fa});ha({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){wu(t);var e={autoTag:O1(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Co(t.parser,e,"display")},htmlBuilder:pa,mathmlBuilder:fa});ha({type:"array",names:["CD"],props:{numArgs:0},handler(t){return wu(t),uT(t.parser)},htmlBuilder:pa,mathmlBuilder:fa});K("\\nonumber","\\gdef\\@eqnsw{0}");K("\\notag","\\nonumber");pt({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 a4=D3;pt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:n,funcName:r}=t,a=e[0];if(a.type!=="ordgroup")throw new et("Invalid environment name",a);for(var l="",h=0;h<a.body.length;++h)l+=Gt(a.body[h],"textord").text;if(r==="\\begin"){if(!a4.hasOwnProperty(l))throw new et("No such environment: "+l,a);var c=a4[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=Gt(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:a}}});var I3=(t,e)=>{var n=t.font,r=e.withFont(n);return tn(t.body,r)},H3=(t,e)=>{var n=t.font,r=e.withFont(n);return An(t.body,r)},o4={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};pt({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,a=zc(e[0]),l=r;return l in o4&&(l=o4[l]),{type:"font",mode:n.mode,font:l.slice(1),body:a}},htmlBuilder:I3,mathmlBuilder:H3});pt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:n}=t,r=e[0],a=At.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:bu(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:a}}});pt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,breakOnTokenText:a}=t,{mode:l}=n,h=n.parseExpression(!0,a),c="math"+r.slice(1);return{type:"font",mode:l,font:c,body:{type:"ordgroup",mode:n.mode,body:h}}},htmlBuilder:I3,mathmlBuilder:H3});var P3=(t,e)=>{var n=e;return t==="display"?n=n.id>=Rt.SCRIPT.id?n.text():Rt.DISPLAY:t==="text"&&n.size===Rt.DISPLAY.size?n=Rt.TEXT:t==="script"?n=Rt.SCRIPT:t==="scriptscript"&&(n=Rt.SCRIPTSCRIPT),n},H1=(t,e)=>{var n=P3(t.size,e.style),r=n.fracNum(),a=n.fracDen(),l;l=e.havingStyle(r);var h=tn(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(a);var v=tn(t.denom,l,e),b,g,m;t.hasBarLine?(t.barSize?(g=Vn(t.barSize,e),b=Me.makeLineSpan("frac-line",e,g)):b=Me.makeLineSpan("frac-line",e),g=b.height,m=b.height):(b=null,g=0,m=e.fontMetrics().defaultRuleThickness);var x,w,S;n.size===Rt.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 A=e.fontMetrics().axisHeight;x-h.depth-(A+.5*g)<w&&(x+=w-(x-h.depth-(A+.5*g))),A-.5*g-(v.height-S)<w&&(S+=w-(A-.5*g-(v.height-S)));var T=-(A-.5*g);k=Me.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 C=x-h.depth-(v.height-S);C<w&&(x+=.5*(w-C),S+=.5*(w-C)),k=Me.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===Rt.DISPLAY.size?M=e.fontMetrics().delim1:n.size===Rt.SCRIPTSCRIPT.size?M=e.havingStyle(Rt.SCRIPT).fontMetrics().delim2:M=e.fontMetrics().delim2;var y,N;return t.leftDelim==null?y=Zl(e,["mopen"]):y=ja.customSizedDelim(t.leftDelim,M,!0,e.havingStyle(n),t.mode,["mopen"]),t.continued?N=Me.makeSpan([]):t.rightDelim==null?N=Zl(e,["mclose"]):N=ja.customSizedDelim(t.rightDelim,M,!0,e.havingStyle(n),t.mode,["mclose"]),Me.makeSpan(["mord"].concat(l.sizingClasses(e)),[y,Me.makeSpan(["mfrac"],[k]),N],e)},P1=(t,e)=>{var n=new Je.MathNode("mfrac",[An(t.numer,e),An(t.denom,e)]);if(!t.hasBarLine)n.setAttribute("linethickness","0px");else if(t.barSize){var r=Vn(t.barSize,e);n.setAttribute("linethickness",lt(r))}var a=P3(t.size,e.style);if(a.size!==e.style.size){n=new Je.MathNode("mstyle",[n]);var l=a.size===Rt.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 Je.MathNode("mo",[new Je.TextNode(t.leftDelim.replace("\\",""))]);c.setAttribute("fence","true"),h.push(c)}if(h.push(n),t.rightDelim!=null){var p=new Je.MathNode("mo",[new Je.TextNode(t.rightDelim.replace("\\",""))]);p.setAttribute("fence","true"),h.push(p)}return M1(h)}return n};pt({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,a=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:a,denom:l,hasBarLine:h,leftDelim:c,rightDelim:p,size:v,barSize:null}},htmlBuilder:H1,mathmlBuilder:P1});pt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0],l=e[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:a,denom:l,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});pt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:n,token:r}=t,a;switch(n){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:a,token:r}}});var s4=["display","text","script","scriptscript"],l4=function(e){var n=null;return e.length>0&&(n=e,n=n==="."?null:n),n};pt({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],a=e[5],l=zc(e[0]),h=l.type==="atom"&&l.family==="open"?l4(l.text):null,c=zc(e[1]),p=c.type==="atom"&&c.family==="close"?l4(c.text):null,v=Gt(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=Gt(x.body[0],"textord");m=s4[Number(w.text)]}}else x=Gt(x,"textord"),m=s4[Number(x.text)];return{type:"genfrac",mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:b,barSize:g,leftDelim:h,rightDelim:p,size:m}},htmlBuilder:H1,mathmlBuilder:P1});pt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:n,funcName:r,token:a}=t;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Gt(e[0],"size").value,token:a}}});pt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0],l=eE(Gt(e[1],"infix").size),h=e[2],c=l.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:h,continued:!1,hasBarLine:c,barSize:l,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:H1,mathmlBuilder:P1});var z3=(t,e)=>{var n=e.style,r,a;t.type==="supsub"?(r=t.sup?tn(t.sup,e.havingStyle(n.sup()),e):tn(t.sub,e.havingStyle(n.sub()),e),a=Gt(t.base,"horizBrace")):a=Gt(t,"horizBrace");var l=tn(a.base,e.havingBaseStyle(Rt.DISPLAY)),h=Za.svgSpan(a,e),c;if(a.isOver?(c=Me.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=Me.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=Me.makeSpan(["mord",a.isOver?"mover":"munder"],[c],e);a.isOver?c=Me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:r}]},e):c=Me.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 Me.makeSpan(["mord",a.isOver?"mover":"munder"],[c],e)},TT=(t,e)=>{var n=Za.mathMLnode(t.label);return new Je.MathNode(t.isOver?"mover":"munder",[An(t.base,e),n])};pt({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:z3,mathmlBuilder:TT});pt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=e[1],a=Gt(e[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:Jn(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var n=hr(t.body,e,!1);return Me.makeAnchor(t.href,[],n,e)},mathmlBuilder:(t,e)=>{var n=So(t.body,e);return n instanceof oi||(n=new oi("mrow",[n])),n.setAttribute("href",t.href),n}});pt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:n}=t,r=Gt(e[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var a=[],l=0;l<r.length;l++){var h=r[l];h==="~"&&(h="\\textasciitilde"),a.push({type:"textord",mode:"text",text:h})}var c={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:r,body:Jn(c)}}});pt({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=hr(t.body,e,!1);return Me.makeFragment(n)},mathmlBuilder(t,e){return new Je.MathNode("mrow",Wr(t.body,e))}});pt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r,token:a}=t,l=Gt(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:Jn(h)}:n.formatUnsupportedCmd(r)},htmlBuilder:(t,e)=>{var n=hr(t.body,e,!1),r=["enclosing"];t.attributes.class&&r.push(...t.attributes.class.trim().split(/\s+/));var a=Me.makeSpan(r,n,e);for(var l in t.attributes)l!=="class"&&t.attributes.hasOwnProperty(l)&&a.setAttribute(l,t.attributes[l]);return a},mathmlBuilder:(t,e)=>So(t.body,e)});pt({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=hr(t.html,e,!1);return Me.makeFragment(n)},mathmlBuilder:(t,e)=>So(t.mathml,e)});var Ih=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 et("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(n[1]+n[2]),unit:n[3]};if(!r3(r))throw new et("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};pt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{var{parser:r}=t,a={number:0,unit:"em"},l={number:.9,unit:"em"},h={number:0,unit:"em"},c="";if(n[0])for(var p=Gt(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":a=Ih(m);break;case"height":l=Ih(m);break;case"totalheight":h=Ih(m);break;default:throw new et("Invalid key: '"+g[0]+"' in \\includegraphics.")}}}var x=Gt(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:a,height:l,totalheight:h,src:x}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var n=Vn(t.height,e),r=0;t.totalheight.number>0&&(r=Vn(t.totalheight,e)-n);var a=0;t.width.number>0&&(a=Vn(t.width,e));var l={height:lt(n+r)};a>0&&(l.width=lt(a)),r>0&&(l.verticalAlign=lt(-r));var h=new TE(t.src,t.alt,l);return h.height=n,h.depth=r,h},mathmlBuilder:(t,e)=>{var n=new Je.MathNode("mglyph",[]);n.setAttribute("alt",t.alt);var r=Vn(t.height,e),a=0;if(t.totalheight.number>0&&(a=Vn(t.totalheight,e)-r,n.setAttribute("valign",lt(-a))),n.setAttribute("height",lt(r+a)),t.width.number>0){var l=Vn(t.width,e);n.setAttribute("width",lt(l))}return n.setAttribute("src",t.src),n}});pt({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,a=Gt(e[0],"size");if(n.settings.strict){var l=r[1]==="m",h=a.value.unit==="mu";l?(h||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, "+("not "+a.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:a.value}},htmlBuilder(t,e){return Me.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var n=Vn(t.dimension,e);return new Je.SpaceNode(n)}});pt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(t,e)=>{var n;t.alignment==="clap"?(n=Me.makeSpan([],[tn(t.body,e)]),n=Me.makeSpan(["inner"],[n],e)):n=Me.makeSpan(["inner"],[tn(t.body,e)]);var r=Me.makeSpan(["fix"],[]),a=Me.makeSpan([t.alignment],[n,r],e),l=Me.makeSpan(["strut"]);return l.style.height=lt(a.height+a.depth),a.depth&&(l.style.verticalAlign=lt(-a.depth)),a.children.unshift(l),a=Me.makeSpan(["thinbox"],[a],e),Me.makeSpan(["mord","vbox"],[a],e)},mathmlBuilder:(t,e)=>{var n=new Je.MathNode("mpadded",[An(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}});pt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:n,parser:r}=t,a=r.mode;r.switchMode("math");var l=n==="\\("?"\\)":"$",h=r.parseExpression(!1,l);return r.expect(l),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",body:h}}});pt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new et("Mismatched "+t.funcName)}});var c4=(t,e)=>{switch(e.style.size){case Rt.DISPLAY.size:return t.display;case Rt.TEXT.size:return t.text;case Rt.SCRIPT.size:return t.script;case Rt.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};pt({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=c4(t,e),r=hr(n,e,!1);return Me.makeFragment(r)},mathmlBuilder:(t,e)=>{var n=c4(t,e);return So(n,e)}});var B3=(t,e,n,r,a,l,h)=>{t=Me.makeSpan([],[t]);var c=n&&At.isCharacterBox(n),p,v;if(e){var b=tn(e,r.havingStyle(a.sup()),r);v={elem:b,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-b.depth)}}if(n){var g=tn(n,r.havingStyle(a.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=Me.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:lt(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:lt(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(p){var w=t.height-h;m=Me.makeVList({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:p.elem,marginLeft:lt(-l)},{type:"kern",size:p.kern},{type:"elem",elem:t}]},r)}else if(v){var S=t.depth+h;m=Me.makeVList({positionType:"bottom",positionData:S,children:[{type:"elem",elem:t},{type:"kern",size:v.kern},{type:"elem",elem:v.elem,marginLeft:lt(l)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else return t;var k=[m];if(p&&l!==0&&!c){var C=Me.makeSpan(["mspace"],[],r);C.style.marginRight=lt(l),k.unshift(C)}return Me.makeSpan(["mop","op-limits"],k,r)},F3=["\\smallint"],Rs=(t,e)=>{var n,r,a=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=Gt(t.base,"op"),a=!0):l=Gt(t,"op");var h=e.style,c=!1;h.size===Rt.DISPLAY.size&&l.symbol&&!At.contains(F3,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=Me.makeSymbol(l.name,v,"math",e,["mop","op-symbol",c?"large-op":"small-op"]),b.length>0){var g=p.italic,m=Me.staticSvg(b+"Size"+(c?"2":"1"),e);p=Me.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=hr(l.body,e,!0);x.length===1&&x[0]instanceof Ti?(p=x[0],p.classes[0]="mop"):p=Me.makeSpan(["mop"],x,e)}else{for(var w=[],S=1;S<l.name.length;S++)w.push(Me.mathsym(l.name[S],l.mode,e));p=Me.makeSpan(["mop"],w,e)}var k=0,C=0;return(p instanceof Ti||l.name==="\\oiint"||l.name==="\\oiiint")&&!l.suppressBaseShift&&(k=(p.height-p.depth)/2-e.fontMetrics().axisHeight,C=p.italic),a?B3(p,n,r,e,h,C,k):(k&&(p.style.position="relative",p.style.top=lt(k)),p)},d0=(t,e)=>{var n;if(t.symbol)n=new oi("mo",[Ai(t.name,t.mode)]),At.contains(F3,t.name)&&n.setAttribute("largeop","false");else if(t.body)n=new oi("mo",Wr(t.body,e));else{n=new oi("mi",[new sa(t.name.slice(1))]);var r=new oi("mo",[Ai("","text")]);t.parentIsSupSub?n=new oi("mrow",[n,r]):n=f3([n,r])}return n},AT={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","":"\\bigvee","⋂":"\\bigcap","":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};pt({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,a=r;return a.length===1&&(a=AT[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Rs,mathmlBuilder:d0});pt({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:Rs,mathmlBuilder:d0});var MT={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};pt({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:Rs,mathmlBuilder:d0});pt({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:Rs,mathmlBuilder:d0});pt({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=MT[r]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Rs,mathmlBuilder:d0});var q3=(t,e)=>{var n,r,a=!1,l;t.type==="supsub"?(n=t.sup,r=t.sub,l=Gt(t.base,"operatorname"),a=!0):l=Gt(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=hr(c,e.withFont("mathrm"),!0),v=0;v<p.length;v++){var b=p[v];b instanceof Ti&&(b.text=b.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}h=Me.makeSpan(["mop"],p,e)}else h=Me.makeSpan(["mop"],[],e);return a?B3(h,n,r,e,e.style,0,0):h},CT=(t,e)=>{for(var n=Wr(t.body,e.withFont("mathrm")),r=!0,a=0;a<n.length;a++){var l=n[a];if(!(l instanceof Je.SpaceNode))if(l instanceof Je.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 Je.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 Je.TextNode(c)]}var p=new Je.MathNode("mi",n);p.setAttribute("mathvariant","normal");var v=new Je.MathNode("mo",[Ai("","text")]);return t.parentIsSupSub?new Je.MathNode("mrow",[p,v]):Je.newDocumentFragment([p,v])};pt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:n,funcName:r}=t,a=e[0];return{type:"operatorname",mode:n.mode,body:Jn(a),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:q3,mathmlBuilder:CT});K("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");as({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Me.makeFragment(hr(t.body,e,!1)):Me.makeSpan(["mord"],hr(t.body,e,!0),e)},mathmlBuilder(t,e){return So(t.body,e,!0)}});pt({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=tn(t.body,e.havingCrampedStyle()),r=Me.makeLineSpan("overline-line",e),a=e.fontMetrics().defaultRuleThickness,l=Me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]},e);return Me.makeSpan(["mord","overline"],[l],e)},mathmlBuilder(t,e){var n=new Je.MathNode("mo",[new Je.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Je.MathNode("mover",[An(t.body,e),n]);return r.setAttribute("accent","true"),r}});pt({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=hr(t.body,e.withPhantom(),!1);return Me.makeFragment(n)},mathmlBuilder:(t,e)=>{var n=Wr(t.body,e);return new Je.MathNode("mphantom",n)}});pt({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=Me.makeSpan([],[tn(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=Me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e),Me.makeSpan(["mord"],[n],e)},mathmlBuilder:(t,e)=>{var n=Wr(Jn(t.body),e),r=new Je.MathNode("mphantom",n),a=new Je.MathNode("mpadded",[r]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}});pt({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=Me.makeSpan(["inner"],[tn(t.body,e.withPhantom())]),r=Me.makeSpan(["fix"],[]);return Me.makeSpan(["mord","rlap"],[n,r],e)},mathmlBuilder:(t,e)=>{var n=Wr(Jn(t.body),e),r=new Je.MathNode("mphantom",n),a=new Je.MathNode("mpadded",[r]);return a.setAttribute("width","0px"),a}});pt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:n}=t,r=Gt(e[0],"size").value,a=e[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(t,e){var n=tn(t.body,e),r=Vn(t.dy,e);return Me.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){var n=new Je.MathNode("mpadded",[An(t.body,e)]),r=t.dy.number+t.dy.unit;return n.setAttribute("voffset",r),n}});pt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});pt({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,a=n[0],l=Gt(e[0],"size"),h=Gt(e[1],"size");return{type:"rule",mode:r.mode,shift:a&&Gt(a,"size").value,width:l.value,height:h.value}},htmlBuilder(t,e){var n=Me.makeSpan(["mord","rule"],[],e),r=Vn(t.width,e),a=Vn(t.height,e),l=t.shift?Vn(t.shift,e):0;return n.style.borderRightWidth=lt(r),n.style.borderTopWidth=lt(a),n.style.bottom=lt(l),n.width=r,n.height=a+l,n.depth=-l,n.maxFontSize=a*1.125*e.sizeMultiplier,n},mathmlBuilder(t,e){var n=Vn(t.width,e),r=Vn(t.height,e),a=t.shift?Vn(t.shift,e):0,l=e.color&&e.getColor()||"black",h=new Je.MathNode("mspace");h.setAttribute("mathbackground",l),h.setAttribute("width",lt(n)),h.setAttribute("height",lt(r));var c=new Je.MathNode("mpadded",[h]);return a>=0?c.setAttribute("height",lt(a)):(c.setAttribute("height",lt(a)),c.setAttribute("depth",lt(-a))),c.setAttribute("voffset",lt(a)),c}});function j3(t,e,n){for(var r=hr(t,e,!1),a=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*=a,r[l].depth*=a}return Me.makeFragment(r)}var u4=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],LT=(t,e)=>{var n=e.havingSize(t.size);return j3(t.body,n,e)};pt({type:"sizing",names:u4,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:n,funcName:r,parser:a}=t,l=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:u4.indexOf(r)+1,body:l}},htmlBuilder:LT,mathmlBuilder:(t,e)=>{var n=e.havingSize(t.size),r=Wr(t.body,n),a=new Je.MathNode("mstyle",r);return a.setAttribute("mathsize",lt(n.sizeMultiplier)),a}});pt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,n)=>{var{parser:r}=t,a=!1,l=!1,h=n[0]&&Gt(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")a=!0;else if(c==="b")l=!0;else{a=!1,l=!1;break}}else a=!0,l=!0;var b=e[0];return{type:"smash",mode:r.mode,body:b,smashHeight:a,smashDepth:l}},htmlBuilder:(t,e)=>{var n=Me.makeSpan([],[tn(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 a=0;a<n.children.length;a++)n.children[a].depth=0;var l=Me.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},e);return Me.makeSpan(["mord"],[l],e)},mathmlBuilder:(t,e)=>{var n=new Je.MathNode("mpadded",[An(t.body,e)]);return t.smashHeight&&n.setAttribute("height","0px"),t.smashDepth&&n.setAttribute("depth","0px"),n}});pt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,n){var{parser:r}=t,a=n[0],l=e[0];return{type:"sqrt",mode:r.mode,body:l,index:a}},htmlBuilder(t,e){var n=tn(t.body,e.havingCrampedStyle());n.height===0&&(n.height=e.fontMetrics().xHeight),n=Me.wrapFragment(n,e);var r=e.fontMetrics(),a=r.defaultRuleThickness,l=a;e.style.id<Rt.TEXT.id&&(l=e.fontMetrics().xHeight);var h=a+l/4,c=n.height+n.depth+h+a,{span:p,ruleWidth:v,advanceWidth:b}=ja.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=lt(b);var x=Me.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(Rt.SCRIPTSCRIPT),S=tn(t.index,w,e),k=.6*(x.height-x.depth),C=Me.makeVList({positionType:"shift",positionData:-k,children:[{type:"elem",elem:S}]},e),A=Me.makeSpan(["root"],[C]);return Me.makeSpan(["mord","sqrt"],[A,x],e)}else return Me.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(t,e){var{body:n,index:r}=t;return r?new Je.MathNode("mroot",[An(n,e),An(r,e)]):new Je.MathNode("msqrt",[An(n,e)])}});var d4={display:Rt.DISPLAY,text:Rt.TEXT,script:Rt.SCRIPT,scriptscript:Rt.SCRIPTSCRIPT};pt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:n,funcName:r,parser:a}=t,l=a.parseExpression(!0,n),h=r.slice(1,r.length-5);return{type:"styling",mode:a.mode,style:h,body:l}},htmlBuilder(t,e){var n=d4[t.style],r=e.havingStyle(n).withFont("");return j3(t.body,r,e)},mathmlBuilder(t,e){var n=d4[t.style],r=e.havingStyle(n),a=Wr(t.body,r),l=new Je.MathNode("mstyle",a),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 _T=function(e,n){var r=e.base;if(r)if(r.type==="op"){var a=r.limits&&(n.style.size===Rt.DISPLAY.size||r.alwaysHandleSupSub);return a?Rs:null}else if(r.type==="operatorname"){var l=r.alwaysHandleSupSub&&(n.style.size===Rt.DISPLAY.size||r.limits);return l?q3:null}else{if(r.type==="accent")return At.isCharacterBox(r.base)?_1:null;if(r.type==="horizBrace"){var h=!e.sub;return h===r.isOver?z3:null}else return null}else return null};as({type:"supsub",htmlBuilder(t,e){var n=_T(t,e);if(n)return n(t,e);var{base:r,sup:a,sub:l}=t,h=tn(r,e),c,p,v=e.fontMetrics(),b=0,g=0,m=r&&At.isCharacterBox(r);if(a){var x=e.havingStyle(e.style.sup());c=tn(a,x,e),m||(b=h.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(l){var w=e.havingStyle(e.style.sub());p=tn(l,w,e),m||(g=h.depth+w.fontMetrics().subDrop*w.sizeMultiplier/e.sizeMultiplier)}var S;e.style===Rt.DISPLAY?S=v.sup1:e.style.cramped?S=v.sup3:S=v.sup2;var k=e.sizeMultiplier,C=lt(.5/v.ptPerEm/k),A=null;if(p){var T=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(h instanceof Ti||T)&&(A=lt(-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 q=[{type:"elem",elem:p,shift:g,marginRight:C,marginLeft:A},{type:"elem",elem:c,shift:-b,marginRight:C}];M=Me.makeVList({positionType:"individualShift",children:q},e)}else if(p){g=Math.max(g,v.sub1,p.height-.8*v.xHeight);var P=[{type:"elem",elem:p,marginLeft:A,marginRight:C}];M=Me.makeVList({positionType:"shift",positionData:g,children:P},e)}else if(c)b=Math.max(b,S,c.depth+.25*v.xHeight),M=Me.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=zp(h,"right")||"mord";return Me.makeSpan([Y],[h,Me.makeSpan(["msupsub"],[M])],e)},mathmlBuilder(t,e){var n=!1,r,a;t.base&&t.base.type==="horizBrace"&&(a=!!t.sup,a===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=[An(t.base,e)];t.sub&&l.push(An(t.sub,e)),t.sup&&l.push(An(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===Rt.DISPLAY||v&&v.type==="operatorname"&&v.alwaysHandleSupSub&&(e.style===Rt.DISPLAY||v.limits)?h="munderover":h="msubsup"}else{var p=t.base;p&&p.type==="op"&&p.limits&&(e.style===Rt.DISPLAY||p.alwaysHandleSupSub)||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(p.limits||e.style===Rt.DISPLAY)?h="munder":h="msub"}else{var c=t.base;c&&c.type==="op"&&c.limits&&(e.style===Rt.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===Rt.DISPLAY)?h="mover":h="msup"}return new Je.MathNode(h,l)}});as({type:"atom",htmlBuilder(t,e){return Me.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var n=new Je.MathNode("mo",[Ai(t.text,t.mode)]);if(t.family==="bin"){var r=C1(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 $3={mi:"italic",mn:"normal",mtext:"normal"};as({type:"mathord",htmlBuilder(t,e){return Me.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var n=new Je.MathNode("mi",[Ai(t.text,t.mode,e)]),r=C1(t,e)||"italic";return r!==$3[n.type]&&n.setAttribute("mathvariant",r),n}});as({type:"textord",htmlBuilder(t,e){return Me.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var n=Ai(t.text,t.mode,e),r=C1(t,e)||"normal",a;return t.mode==="text"?a=new Je.MathNode("mtext",[n]):/[0-9]/.test(t.text)?a=new Je.MathNode("mn",[n]):t.text==="\\prime"?a=new Je.MathNode("mo",[n]):a=new Je.MathNode("mi",[n]),r!==$3[a.type]&&a.setAttribute("mathvariant",r),a}});var Hh={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ph={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};as({type:"spacing",htmlBuilder(t,e){if(Ph.hasOwnProperty(t.text)){var n=Ph[t.text].className||"";if(t.mode==="text"){var r=Me.makeOrd(t,e,"textord");return r.classes.push(n),r}else return Me.makeSpan(["mspace",n],[Me.mathsym(t.text,t.mode,e)],e)}else{if(Hh.hasOwnProperty(t.text))return Me.makeSpan(["mspace",Hh[t.text]],[],e);throw new et('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var n;if(Ph.hasOwnProperty(t.text))n=new Je.MathNode("mtext",[new Je.TextNode(" ")]);else{if(Hh.hasOwnProperty(t.text))return new Je.MathNode("mspace");throw new et('Unknown type of space "'+t.text+'"')}return n}});var h4=()=>{var t=new Je.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};as({type:"tag",mathmlBuilder(t,e){var n=new Je.MathNode("mtable",[new Je.MathNode("mtr",[h4(),new Je.MathNode("mtd",[So(t.body,e)]),h4(),new Je.MathNode("mtd",[So(t.tag,e)])])]);return n.setAttribute("width","100%"),n}});var p4={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},f4={"\\textbf":"textbf","\\textmd":"textmd"},NT={"\\textit":"textit","\\textup":"textup"},m4=(t,e)=>{var n=t.font;if(n){if(p4[n])return e.withTextFontFamily(p4[n]);if(f4[n])return e.withTextFontWeight(f4[n]);if(n==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(NT[n])};pt({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,a=e[0];return{type:"text",mode:n.mode,body:Jn(a),font:r}},htmlBuilder(t,e){var n=m4(t,e),r=hr(t.body,n,!0);return Me.makeSpan(["mord","text"],r,n)},mathmlBuilder(t,e){var n=m4(t,e);return So(t.body,n)}});pt({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=tn(t.body,e),r=Me.makeLineSpan("underline-line",e),a=e.fontMetrics().defaultRuleThickness,l=Me.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]},e);return Me.makeSpan(["mord","underline"],[l],e)},mathmlBuilder(t,e){var n=new Je.MathNode("mo",[new Je.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new Je.MathNode("munder",[An(t.body,e),n]);return r.setAttribute("accentunder","true"),r}});pt({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=tn(t.body,e),r=e.fontMetrics().axisHeight,a=.5*(n.height-r-(n.depth+r));return Me.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]},e)},mathmlBuilder(t,e){return new Je.MathNode("mpadded",[An(t.body,e)],["vcenter"])}});pt({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=g4(t),r=[],a=e.havingStyle(e.style.text()),l=0;l<n.length;l++){var h=n[l];h==="~"&&(h="\\textasciitilde"),r.push(Me.makeSymbol(h,"Typewriter-Regular",t.mode,a,["mord","texttt"]))}return Me.makeSpan(["mord","text"].concat(a.sizingClasses(e)),Me.tryCombineChars(r),a)},mathmlBuilder(t,e){var n=new Je.TextNode(g4(t)),r=new Je.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var g4=t=>t.body.replace(/ /g,t.star?"␣":" "),po=h3,U3=`[ \r
]`,DT="\\\\[a-zA-Z@]+",RT="\\\\[^\uD800-\uDFFF]",OT="("+DT+")"+U3+"*",IT=`\\\\(
|[ \r ]+
?)[ \r ]*`,jp="[̀-ͯ]",HT=new RegExp(jp+"+$"),PT="("+U3+"+)|"+(IT+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(jp+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(jp+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+OT)+("|"+RT+")");class v4{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(PT,"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 xi("EOF",new ii(this,n,n));var r=this.tokenRegex.exec(e);if(r===null||r.index!==n)throw new et("Unexpected character: '"+e[n]+"'",new xi(e[n],new ii(this,n,n+1)));var a=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[a]===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 xi(a,new ii(this,n,this.tokenRegex.lastIndex))}}class zT{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 a=0;a<this.undefStack.length;a++)delete this.undefStack[a][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 BT=R3;K("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});K("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});K("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});K("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});K("\\@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}});K("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");K("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var b4={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};K("\\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=b4[e.text],r==null||r>=n)throw new et("Invalid base-"+n+" digit "+e.text);for(var a;(a=b4[t.future().text])!=null&&a<n;)r*=n,r+=a,t.popToken()}return"\\@char{"+r+"}"});var z1=(t,e,n,r)=>{var a=t.consumeArg().tokens;if(a.length!==1)throw new et("\\newcommand's first argument must be a macro name");var l=a[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(a=t.consumeArg().tokens,a.length===1&&a[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),a=t.consumeArg().tokens}return h&&r||t.macros.set(l,{tokens:a,numArgs:c}),""};K("\\newcommand",t=>z1(t,!1,!0,!1));K("\\renewcommand",t=>z1(t,!0,!1,!1));K("\\providecommand",t=>z1(t,!0,!0,!0));K("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(n=>n.text).join("")),""});K("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(n=>n.text).join("")),""});K("\\show",t=>{var e=t.popToken(),n=e.text;return console.log(e,t.macros.get(n),po[n],Dn.math[n],Dn.text[n]),""});K("\\bgroup","{");K("\\egroup","}");K("~","\\nobreakspace");K("\\lq","`");K("\\rq","'");K("\\aa","\\r a");K("\\AA","\\r A");K("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");K("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");K("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");K("","\\mathscr{B}");K("","\\mathscr{E}");K("","\\mathscr{F}");K("","\\mathscr{H}");K("","\\mathscr{I}");K("","\\mathscr{L}");K("","\\mathscr{M}");K("","\\mathscr{R}");K("","\\mathfrak{C}");K("","\\mathfrak{H}");K("","\\mathfrak{Z}");K("\\Bbbk","\\Bbb{k}");K("·","\\cdotp");K("\\llap","\\mathllap{\\textrm{#1}}");K("\\rlap","\\mathrlap{\\textrm{#1}}");K("\\clap","\\mathclap{\\textrm{#1}}");K("\\mathstrut","\\vphantom{(}");K("\\underbar","\\underline{\\text{#1}}");K("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');K("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");K("\\ne","\\neq");K("≠","\\neq");K("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");K("∉","\\notin");K("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");K("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");K("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");K("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");K("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");K("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");K("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");K("⟂","\\perp");K("‼","\\mathclose{!\\mkern-0.8mu!}");K("∌","\\notni");K("⌜","\\ulcorner");K("⌝","\\urcorner");K("⌞","\\llcorner");K("⌟","\\lrcorner");K("©","\\copyright");K("®","\\textregistered");K("","\\textregistered");K("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');K("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');K("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');K("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');K("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");K("⋮","\\vdots");K("\\varGamma","\\mathit{\\Gamma}");K("\\varDelta","\\mathit{\\Delta}");K("\\varTheta","\\mathit{\\Theta}");K("\\varLambda","\\mathit{\\Lambda}");K("\\varXi","\\mathit{\\Xi}");K("\\varPi","\\mathit{\\Pi}");K("\\varSigma","\\mathit{\\Sigma}");K("\\varUpsilon","\\mathit{\\Upsilon}");K("\\varPhi","\\mathit{\\Phi}");K("\\varPsi","\\mathit{\\Psi}");K("\\varOmega","\\mathit{\\Omega}");K("\\substack","\\begin{subarray}{c}#1\\end{subarray}");K("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");K("\\boxed","\\fbox{$\\displaystyle{#1}$}");K("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");K("\\implies","\\DOTSB\\;\\Longrightarrow\\;");K("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");K("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");K("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var y4={",":"\\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"};K("\\dots",function(t){var e="\\dotso",n=t.expandAfterFuture().text;return n in y4?e=y4[n]:(n.slice(0,4)==="\\not"||n in Dn.math&&At.contains(["bin","rel"],Dn.math[n].group))&&(e="\\dotsb"),e});var B1={")":!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};K("\\dotso",function(t){var e=t.future().text;return e in B1?"\\ldots\\,":"\\ldots"});K("\\dotsc",function(t){var e=t.future().text;return e in B1&&e!==","?"\\ldots\\,":"\\ldots"});K("\\cdots",function(t){var e=t.future().text;return e in B1?"\\@cdots\\,":"\\@cdots"});K("\\dotsb","\\cdots");K("\\dotsm","\\cdots");K("\\dotsi","\\!\\cdots");K("\\dotsx","\\ldots\\,");K("\\DOTSI","\\relax");K("\\DOTSB","\\relax");K("\\DOTSX","\\relax");K("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");K("\\,","\\tmspace+{3mu}{.1667em}");K("\\thinspace","\\,");K("\\>","\\mskip{4mu}");K("\\:","\\tmspace+{4mu}{.2222em}");K("\\medspace","\\:");K("\\;","\\tmspace+{5mu}{.2777em}");K("\\thickspace","\\;");K("\\!","\\tmspace-{3mu}{.1667em}");K("\\negthinspace","\\!");K("\\negmedspace","\\tmspace-{4mu}{.2222em}");K("\\negthickspace","\\tmspace-{5mu}{.277em}");K("\\enspace","\\kern.5em ");K("\\enskip","\\hskip.5em\\relax");K("\\quad","\\hskip1em\\relax");K("\\qquad","\\hskip2em\\relax");K("\\tag","\\@ifstar\\tag@literal\\tag@paren");K("\\tag@paren","\\tag@literal{({#1})}");K("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new et("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});K("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");K("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");K("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");K("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");K("\\newline","\\\\\\relax");K("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var V3=lt(oa["Main-Regular"]["T".charCodeAt(0)][1]-.7*oa["Main-Regular"]["A".charCodeAt(0)][1]);K("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+V3+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");K("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+V3+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");K("\\hspace","\\@ifstar\\@hspacer\\@hspace");K("\\@hspace","\\hskip #1\\relax");K("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");K("\\ordinarycolon",":");K("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");K("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');K("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');K("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');K("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');K("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');K("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');K("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');K("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');K("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');K("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');K("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');K("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');K("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');K("∷","\\dblcolon");K("∹","\\eqcolon");K("≔","\\coloneqq");K("≕","\\eqqcolon");K("⩴","\\Coloneqq");K("\\ratio","\\vcentcolon");K("\\coloncolon","\\dblcolon");K("\\colonequals","\\coloneqq");K("\\coloncolonequals","\\Coloneqq");K("\\equalscolon","\\eqqcolon");K("\\equalscoloncolon","\\Eqqcolon");K("\\colonminus","\\coloneq");K("\\coloncolonminus","\\Coloneq");K("\\minuscolon","\\eqcolon");K("\\minuscoloncolon","\\Eqcolon");K("\\coloncolonapprox","\\Colonapprox");K("\\coloncolonsim","\\Colonsim");K("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");K("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");K("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");K("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");K("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");K("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");K("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");K("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");K("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");K("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");K("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");K("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");K("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");K("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");K("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");K("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");K("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");K("\\nleqq","\\html@mathml{\\@nleqq}{≰}");K("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");K("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");K("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");K("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");K("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");K("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");K("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");K("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");K("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");K("\\imath","\\html@mathml{\\@imath}{ı}");K("\\jmath","\\html@mathml{\\@jmath}{ȷ}");K("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");K("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");K("⟦","\\llbracket");K("⟧","\\rrbracket");K("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");K("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");K("⦃","\\lBrace");K("⦄","\\rBrace");K("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");K("⦵","\\minuso");K("\\darr","\\downarrow");K("\\dArr","\\Downarrow");K("\\Darr","\\Downarrow");K("\\lang","\\langle");K("\\rang","\\rangle");K("\\uarr","\\uparrow");K("\\uArr","\\Uparrow");K("\\Uarr","\\Uparrow");K("\\N","\\mathbb{N}");K("\\R","\\mathbb{R}");K("\\Z","\\mathbb{Z}");K("\\alef","\\aleph");K("\\alefsym","\\aleph");K("\\Alpha","\\mathrm{A}");K("\\Beta","\\mathrm{B}");K("\\bull","\\bullet");K("\\Chi","\\mathrm{X}");K("\\clubs","\\clubsuit");K("\\cnums","\\mathbb{C}");K("\\Complex","\\mathbb{C}");K("\\Dagger","\\ddagger");K("\\diamonds","\\diamondsuit");K("\\empty","\\emptyset");K("\\Epsilon","\\mathrm{E}");K("\\Eta","\\mathrm{H}");K("\\exist","\\exists");K("\\harr","\\leftrightarrow");K("\\hArr","\\Leftrightarrow");K("\\Harr","\\Leftrightarrow");K("\\hearts","\\heartsuit");K("\\image","\\Im");K("\\infin","\\infty");K("\\Iota","\\mathrm{I}");K("\\isin","\\in");K("\\Kappa","\\mathrm{K}");K("\\larr","\\leftarrow");K("\\lArr","\\Leftarrow");K("\\Larr","\\Leftarrow");K("\\lrarr","\\leftrightarrow");K("\\lrArr","\\Leftrightarrow");K("\\Lrarr","\\Leftrightarrow");K("\\Mu","\\mathrm{M}");K("\\natnums","\\mathbb{N}");K("\\Nu","\\mathrm{N}");K("\\Omicron","\\mathrm{O}");K("\\plusmn","\\pm");K("\\rarr","\\rightarrow");K("\\rArr","\\Rightarrow");K("\\Rarr","\\Rightarrow");K("\\real","\\Re");K("\\reals","\\mathbb{R}");K("\\Reals","\\mathbb{R}");K("\\Rho","\\mathrm{P}");K("\\sdot","\\cdot");K("\\sect","\\S");K("\\spades","\\spadesuit");K("\\sub","\\subset");K("\\sube","\\subseteq");K("\\supe","\\supseteq");K("\\Tau","\\mathrm{T}");K("\\thetasym","\\vartheta");K("\\weierp","\\wp");K("\\Zeta","\\mathrm{Z}");K("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");K("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");K("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");K("\\bra","\\mathinner{\\langle{#1}|}");K("\\ket","\\mathinner{|{#1}\\rangle}");K("\\braket","\\mathinner{\\langle{#1}\\rangle}");K("\\Bra","\\left\\langle#1\\right|");K("\\Ket","\\left|#1\\right\\rangle");var W3=t=>e=>{var n=e.consumeArg().tokens,r=e.consumeArg().tokens,a=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),a.length&&m.macros.set("\\|",c));var x=g;if(!g&&a.length){var w=m.future();w.text==="|"&&(m.popToken(),x=!0)}return{tokens:x?a:r,numArgs:0}};e.macros.set("|",p(!1)),a.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}};K("\\bra@ket",W3(!1));K("\\bra@set",W3(!0));K("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");K("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");K("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");K("\\angln","{\\angl n}");K("\\blue","\\textcolor{##6495ed}{#1}");K("\\orange","\\textcolor{##ffa500}{#1}");K("\\pink","\\textcolor{##ff00af}{#1}");K("\\red","\\textcolor{##df0030}{#1}");K("\\green","\\textcolor{##28ae7b}{#1}");K("\\gray","\\textcolor{gray}{#1}");K("\\purple","\\textcolor{##9d38bd}{#1}");K("\\blueA","\\textcolor{##ccfaff}{#1}");K("\\blueB","\\textcolor{##80f6ff}{#1}");K("\\blueC","\\textcolor{##63d9ea}{#1}");K("\\blueD","\\textcolor{##11accd}{#1}");K("\\blueE","\\textcolor{##0c7f99}{#1}");K("\\tealA","\\textcolor{##94fff5}{#1}");K("\\tealB","\\textcolor{##26edd5}{#1}");K("\\tealC","\\textcolor{##01d1c1}{#1}");K("\\tealD","\\textcolor{##01a995}{#1}");K("\\tealE","\\textcolor{##208170}{#1}");K("\\greenA","\\textcolor{##b6ffb0}{#1}");K("\\greenB","\\textcolor{##8af281}{#1}");K("\\greenC","\\textcolor{##74cf70}{#1}");K("\\greenD","\\textcolor{##1fab54}{#1}");K("\\greenE","\\textcolor{##0d923f}{#1}");K("\\goldA","\\textcolor{##ffd0a9}{#1}");K("\\goldB","\\textcolor{##ffbb71}{#1}");K("\\goldC","\\textcolor{##ff9c39}{#1}");K("\\goldD","\\textcolor{##e07d10}{#1}");K("\\goldE","\\textcolor{##a75a05}{#1}");K("\\redA","\\textcolor{##fca9a9}{#1}");K("\\redB","\\textcolor{##ff8482}{#1}");K("\\redC","\\textcolor{##f9685d}{#1}");K("\\redD","\\textcolor{##e84d39}{#1}");K("\\redE","\\textcolor{##bc2612}{#1}");K("\\maroonA","\\textcolor{##ffbde0}{#1}");K("\\maroonB","\\textcolor{##ff92c6}{#1}");K("\\maroonC","\\textcolor{##ed5fa6}{#1}");K("\\maroonD","\\textcolor{##ca337c}{#1}");K("\\maroonE","\\textcolor{##9e034e}{#1}");K("\\purpleA","\\textcolor{##ddd7ff}{#1}");K("\\purpleB","\\textcolor{##c6b9fc}{#1}");K("\\purpleC","\\textcolor{##aa87ff}{#1}");K("\\purpleD","\\textcolor{##7854ab}{#1}");K("\\purpleE","\\textcolor{##543b78}{#1}");K("\\mintA","\\textcolor{##f5f9e8}{#1}");K("\\mintB","\\textcolor{##edf2df}{#1}");K("\\mintC","\\textcolor{##e0e5cc}{#1}");K("\\grayA","\\textcolor{##f6f7f7}{#1}");K("\\grayB","\\textcolor{##f0f1f2}{#1}");K("\\grayC","\\textcolor{##e3e5e6}{#1}");K("\\grayD","\\textcolor{##d6d8da}{#1}");K("\\grayE","\\textcolor{##babec2}{#1}");K("\\grayF","\\textcolor{##888d93}{#1}");K("\\grayG","\\textcolor{##626569}{#1}");K("\\grayH","\\textcolor{##3b3e40}{#1}");K("\\grayI","\\textcolor{##21242c}{#1}");K("\\kaBlue","\\textcolor{##314453}{#1}");K("\\kaGreen","\\textcolor{##71B307}{#1}");var G3={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class FT{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 zT(BT,n.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new v4(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,a;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;n=this.popToken(),{tokens:a,end:r}=this.consumeArg(["]"])}else({tokens:a,start:n,end:r}=this.consumeArg());return this.pushToken(new xi("EOF",r.loc)),this.pushTokens(a),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 a=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 a.text==="{"&&n[n.length-1].text==="}"&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:a,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],a=0;a<r.length;a++){var l=this.popToken();if(r[a]!==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,a=n.noexpand?null:this._getExpansion(r);if(a==null||e&&a.unexpandable){if(e&&a==null&&r[0]==="\\"&&!this.isDefined(r))throw new et("Undefined control sequence: "+r);return this.pushToken(n),!1}this.countExpansion(1);var l=a.tokens,h=this.consumeArgs(a.numArgs,a.delimiters);if(a.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 xi(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 a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),n.push(a)}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 a=typeof n=="function"?n(this):n;if(typeof a=="string"){var l=0;if(a.indexOf("#")!==-1)for(var h=a.replace(/##/g,"");h.indexOf("#"+(l+1))!==-1;)++l;for(var c=new v4(a,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 a}isDefined(e){return this.macros.has(e)||po.hasOwnProperty(e)||Dn.math.hasOwnProperty(e)||Dn.text.hasOwnProperty(e)||G3.hasOwnProperty(e)}isExpandable(e){var n=this.macros.get(e);return n!=null?typeof n=="string"||typeof n=="function"||!n.unexpandable:po.hasOwnProperty(e)&&!po[e].primitive}}var w4=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,j0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),zh={"́":{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"}},x4={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class xu{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 FT(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 xi("}")),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 a=this.fetch();if(xu.endOfExpression.indexOf(a.text)!==-1||n&&a.text===n||e&&po[a.text]&&po[a.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,a=0;a<e.length;a++)if(e[a].type==="infix"){if(n!==-1)throw new et("only one infix operator per group",e[a].token);n=a,r=e[a].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 a;do{var l;a=this.parseGroup(e)}while(((l=a)==null?void 0:l.type)==="internal");if(!a)throw new et("Expected group after '"+r+"'",n);return a}formatUnsupportedCmd(e){for(var n=[],r=0;r<e.length;r++)n.push({type:"textord",mode:"text",text:e[r]});var a={type:"text",mode:this.mode,body:n},l={type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]};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,a;;){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(a)throw new et("Double subscript",l);a=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(j0[l.text]){var v=w4.test(l.text),b=[];for(b.push(new xi(j0[l.text])),this.consume();;){var g=this.fetch().text;if(!j0[g]||w4.test(g)!==v)break;b.unshift(new xi(j0[g])),this.consume()}var m=this.subparse(b);v?a={type:"ordgroup",mode:"math",body:m}:r={type:"ordgroup",mode:"math",body:m}}else break}return r||a?{type:"supsub",mode:this.mode,base:n,sup:r,sub:a}:n}parseFunction(e,n){var r=this.fetch(),a=r.text,l=po[a];if(!l)return null;if(this.consume(),n&&n!=="atom"&&!l.allowedInArgument)throw new et("Got function '"+a+"' with no arguments"+(n?" as "+n:""),r);if(this.mode==="text"&&!l.allowedInText)throw new et("Can't use function '"+a+"' in text mode",r);if(this.mode==="math"&&l.allowedInMath===!1)throw new et("Can't use function '"+a+"' in math mode",r);var{args:h,optArgs:c}=this.parseArguments(a,l);return this.callFunction(a,h,c,r,e)}callFunction(e,n,r,a,l){var h={funcName:e,parser:this,token:a,breakOnTokenText:l},c=po[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 a=[],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)a.push(v);else throw new et("Null argument, please report this as a bug")}return{args:a,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 a=this.parseArgumentGroup(r,"text");return a!=null?{type:"styling",mode:a.mode,body:[a],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 a="",l;(l=this.fetch()).text!=="EOF";)a+=l.text,this.consume();return this.consume(),r.text=a,r}parseRegexGroup(e,n){for(var r=this.fetch(),a=r,l="",h;(h=this.fetch()).text!=="EOF"&&e.test(l+h.text);)a=h,l+=a.text,this.consume();if(l==="")throw new et("Invalid "+n+": '"+r.text+"'",r);return r.range(a,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 a=r[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}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 a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(n.text);if(!a)throw new et("Invalid size: '"+n.text+"'",n);var l={number:+(a[1]+a[2]),unit:a[3]};if(!r3(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 a=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(a),h}parseGroup(e,n){var r=this.fetch(),a=r.text,l;if(a==="{"||a==="\\begingroup"){this.consume();var h=a==="{"?"}":"\\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:ii.range(r,p),body:c,semisimple:a==="\\begingroup"||void 0}}else if(l=this.parseFunction(n,e)||this.parseSymbol(),l==null&&a[0]==="\\"&&!G3.hasOwnProperty(a)){if(this.settings.throwOnError)throw new et("Undefined control sequence: "+a,r);l=this.formatUnsupportedCmd(a),this.consume()}return l}formLigatures(e){for(var n=e.length-1,r=0;r<n;++r){var a=e[r],l=a.text;l==="-"&&e[r+1].text==="-"&&(r+1<n&&e[r+2].text==="-"?(e.splice(r,3,{type:"textord",mode:"text",loc:ii.range(a,e[r+2]),text:"---"}),n-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:ii.range(a,e[r+1]),text:"--"}),n-=1)),(l==="'"||l==="`")&&e[r+1].text===l&&(e.splice(r,2,{type:"textord",mode:"text",loc:ii.range(a,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),a=r.charAt(0)==="*";if(a&&(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:a}}x4.hasOwnProperty(n[0])&&!Dn[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=x4[n[0]]+n.slice(1));var l=HT.exec(n);l&&(n=n.substring(0,l.index),n==="i"?n="ı":n==="j"&&(n="ȷ"));var h;if(Dn[this.mode][n]){this.settings.strict&&this.mode==="math"&&Pp.indexOf(n)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+n[0]+'" used in math mode',e);var c=Dn[this.mode][n].group,p=ii.range(e),v;if(CE.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&&(n3(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:ii.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(!zh[m])throw new et("Unknown accent ' "+m+"'",e);var x=zh[m][this.mode]||zh[m].text;if(!x)throw new et("Accent "+m+" unsupported in "+this.mode+" mode",e);h={type:"accent",mode:this.mode,loc:ii.range(e),label:x,isStretchy:!1,isShifty:!0,base:h}}return h}}xu.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var F1=function(e,n){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new xu(e,n);delete r.gullet.macros.current["\\df@tag"];var a=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 et("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:r.subparse([new xi("\\df@tag")])}]}return a},K3=function(e,n,r){n.textContent="";var a=q1(e,r).toNode();n.appendChild(a)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),K3=function(){throw new et("KaTeX doesn't work in quirks mode.")});var qT=function(e,n){var r=q1(e,n).toMarkup();return r},jT=function(e,n){var r=new k1(n);return F1(e,r)},X3=function(e,n,r){if(r.throwOnError||!(e instanceof et))throw e;var a=Me.makeSpan(["katex-error"],[new Ti(n)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+r.errorColor),a},q1=function(e,n){var r=new k1(n);try{var a=F1(e,r);return YE(a,e,r)}catch(l){return X3(l,e,r)}},$T=function(e,n){var r=new k1(n);try{var a=F1(e,r);return JE(a,e,r)}catch(l){return X3(l,e,r)}},UT="0.16.22",VT={Span:u0,Anchor:T1,SymbolNode:Ti,SvgNode:Ka,PathNode:ko,LineNode:Hp},k4={version:UT,render:K3,renderToString:qT,ParseError:et,SETTINGS_SCHEMA:tc,__parse:jT,__renderToDomTree:q1,__renderToHTMLTree:$T,__setFontMetrics:wE,__defineSymbol:O,__defineFunction:pt,__defineMacro:K,__domTree:VT};/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:Z3,setPrototypeOf:S4,isFrozen:WT,getPrototypeOf:GT,getOwnPropertyDescriptor:KT}=Object;let{freeze:Hr,seal:Mi,create:$p}=Object,{apply:Up,construct:Vp}=typeof Reflect<"u"&&Reflect;Hr||(Hr=function(e){return e});Mi||(Mi=function(e){return e});Up||(Up=function(e,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l<r;l++)a[l-2]=arguments[l];return e.apply(n,a)});Vp||(Vp=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return new e(...r)});const $0=Pr(Array.prototype.forEach),XT=Pr(Array.prototype.lastIndexOf),E4=Pr(Array.prototype.pop),yl=Pr(Array.prototype.push),ZT=Pr(Array.prototype.splice),rc=Pr(String.prototype.toLowerCase),Bh=Pr(String.prototype.toString),Fh=Pr(String.prototype.match),wl=Pr(String.prototype.replace),YT=Pr(String.prototype.indexOf),JT=Pr(String.prototype.trim),Pi=Pr(Object.prototype.hasOwnProperty),Mr=Pr(RegExp.prototype.test),xl=QT(TypeError);function Pr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return Up(t,e,r)}}function QT(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vp(t,n)}}function Zt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rc;S4&&S4(t,null);let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){const l=n(a);l!==a&&(WT(e)||(e[r]=l),a=l)}t[a]=!0}return t}function eA(t){for(let e=0;e<t.length;e++)Pi(t,e)||(t[e]=null);return t}function Aa(t){const e=$p(null);for(const[n,r]of Z3(t))Pi(t,n)&&(Array.isArray(r)?e[n]=eA(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=Aa(r):e[n]=r);return e}function kl(t,e){for(;t!==null;){const r=KT(t,e);if(r){if(r.get)return Pr(r.get);if(typeof r.value=="function")return Pr(r.value)}t=GT(t)}function n(){return null}return n}const T4=Hr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),qh=Hr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jh=Hr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),tA=Hr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$h=Hr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),nA=Hr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),A4=Hr(["#text"]),M4=Hr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Uh=Hr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),C4=Hr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U0=Hr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rA=Mi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),iA=Mi(/<%[\w\W]*|[\w\W]*%>/gm),aA=Mi(/\$\{[\w\W]*/gm),oA=Mi(/^data-[\-\w.\u00B7-\uFFFF]+$/),sA=Mi(/^aria-[\-\w]+$/),Y3=Mi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lA=Mi(/^(?:\w+script|data):/i),cA=Mi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J3=Mi(/^html$/i),uA=Mi(/^[a-z][.\w]*(-[.\w]+)+$/i);var L4=Object.freeze({__proto__:null,ARIA_ATTR:sA,ATTR_WHITESPACE:cA,CUSTOM_ELEMENT:uA,DATA_ATTR:oA,DOCTYPE_NAME:J3,ERB_EXPR:iA,IS_ALLOWED_URI:Y3,IS_SCRIPT_OR_DATA:lA,MUSTACHE_EXPR:rA,TMPLIT_EXPR:aA});const Sl={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},dA=function(){return typeof window>"u"?null:window},hA=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));const l="dompurify"+(r?"#"+r:"");try{return e.createPolicy(l,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},_4=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Q3(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dA();const e=vt=>Q3(vt);if(e.version="3.3.0",e.removed=[],!t||!t.document||t.document.nodeType!==Sl.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,a=r.currentScript,{DocumentFragment:l,HTMLTemplateElement:h,Node:c,Element:p,NodeFilter:v,NamedNodeMap:b=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:m,trustedTypes:x}=t,w=p.prototype,S=kl(w,"cloneNode"),k=kl(w,"remove"),C=kl(w,"nextSibling"),A=kl(w,"childNodes"),T=kl(w,"parentNode");if(typeof h=="function"){const vt=n.createElement("template");vt.content&&vt.content.ownerDocument&&(n=vt.content.ownerDocument)}let M,y="";const{implementation:N,createNodeIterator:z,createDocumentFragment:q,getElementsByTagName:P}=n,{importNode:Y}=r;let te=_4();e.isSupported=typeof Z3=="function"&&typeof T=="function"&&N&&N.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ue,ERB_EXPR:Le,TMPLIT_EXPR:qe,DATA_ATTR:Xe,ARIA_ATTR:it,IS_SCRIPT_OR_DATA:$e,ATTR_WHITESPACE:De,CUSTOM_ELEMENT:nt}=L4;let{IS_ALLOWED_URI:ut}=L4,je=null;const j=Zt({},[...T4,...qh,...jh,...$h,...A4]);let yt=null;const It=Zt({},[...M4,...Uh,...C4,...U0]);let bt=Object.seal($p(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Mt=null,se=null;const fe=Object.seal($p(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let J=!0,Q=!0,Ie=!1,de=!0,W=!1,Z=!0,ge=!1,ce=!1,ve=!1,Ee=!1,ze=!1,We=!1,Ze=!0,Be=!1;const at="user-content-";let Ue=!0,He=!1,gt={},kt=null;const jt=Zt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $t=null;const Mn=Zt({},["audio","video","img","source","image","track"]);let gn=null;const Rn=Zt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ln="http://www.w3.org/1998/Math/MathML",Qn="http://www.w3.org/2000/svg",Cn="http://www.w3.org/1999/xhtml";let xn=Cn,zt=!1,Pn=null;const nn=Zt({},[ln,Qn,Cn],Bh);let Gr=Zt({},["mi","mo","mn","ms","mtext"]),er=Zt({},["annotation-xml"]);const or=Zt({},["title","style","font","a","script"]);let Jt=null;const Er=["application/xhtml+xml","text/html"],Ci="text/html";let zn=null,an=null;const Qt=n.createElement("form"),pr=function(he){return he instanceof RegExp||he instanceof Function},Li=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(an&&an===he)){if((!he||typeof he!="object")&&(he={}),he=Aa(he),Jt=Er.indexOf(he.PARSER_MEDIA_TYPE)===-1?Ci:he.PARSER_MEDIA_TYPE,zn=Jt==="application/xhtml+xml"?Bh:rc,je=Pi(he,"ALLOWED_TAGS")?Zt({},he.ALLOWED_TAGS,zn):j,yt=Pi(he,"ALLOWED_ATTR")?Zt({},he.ALLOWED_ATTR,zn):It,Pn=Pi(he,"ALLOWED_NAMESPACES")?Zt({},he.ALLOWED_NAMESPACES,Bh):nn,gn=Pi(he,"ADD_URI_SAFE_ATTR")?Zt(Aa(Rn),he.ADD_URI_SAFE_ATTR,zn):Rn,$t=Pi(he,"ADD_DATA_URI_TAGS")?Zt(Aa(Mn),he.ADD_DATA_URI_TAGS,zn):Mn,kt=Pi(he,"FORBID_CONTENTS")?Zt({},he.FORBID_CONTENTS,zn):jt,Mt=Pi(he,"FORBID_TAGS")?Zt({},he.FORBID_TAGS,zn):Aa({}),se=Pi(he,"FORBID_ATTR")?Zt({},he.FORBID_ATTR,zn):Aa({}),gt=Pi(he,"USE_PROFILES")?he.USE_PROFILES:!1,J=he.ALLOW_ARIA_ATTR!==!1,Q=he.ALLOW_DATA_ATTR!==!1,Ie=he.ALLOW_UNKNOWN_PROTOCOLS||!1,de=he.ALLOW_SELF_CLOSE_IN_ATTR!==!1,W=he.SAFE_FOR_TEMPLATES||!1,Z=he.SAFE_FOR_XML!==!1,ge=he.WHOLE_DOCUMENT||!1,Ee=he.RETURN_DOM||!1,ze=he.RETURN_DOM_FRAGMENT||!1,We=he.RETURN_TRUSTED_TYPE||!1,ve=he.FORCE_BODY||!1,Ze=he.SANITIZE_DOM!==!1,Be=he.SANITIZE_NAMED_PROPS||!1,Ue=he.KEEP_CONTENT!==!1,He=he.IN_PLACE||!1,ut=he.ALLOWED_URI_REGEXP||Y3,xn=he.NAMESPACE||Cn,Gr=he.MATHML_TEXT_INTEGRATION_POINTS||Gr,er=he.HTML_INTEGRATION_POINTS||er,bt=he.CUSTOM_ELEMENT_HANDLING||{},he.CUSTOM_ELEMENT_HANDLING&&pr(he.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(bt.tagNameCheck=he.CUSTOM_ELEMENT_HANDLING.tagNameCheck),he.CUSTOM_ELEMENT_HANDLING&&pr(he.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(bt.attributeNameCheck=he.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),he.CUSTOM_ELEMENT_HANDLING&&typeof he.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(bt.allowCustomizedBuiltInElements=he.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),W&&(Q=!1),ze&&(Ee=!0),gt&&(je=Zt({},A4),yt=[],gt.html===!0&&(Zt(je,T4),Zt(yt,M4)),gt.svg===!0&&(Zt(je,qh),Zt(yt,Uh),Zt(yt,U0)),gt.svgFilters===!0&&(Zt(je,jh),Zt(yt,Uh),Zt(yt,U0)),gt.mathMl===!0&&(Zt(je,$h),Zt(yt,C4),Zt(yt,U0))),he.ADD_TAGS&&(typeof he.ADD_TAGS=="function"?fe.tagCheck=he.ADD_TAGS:(je===j&&(je=Aa(je)),Zt(je,he.ADD_TAGS,zn))),he.ADD_ATTR&&(typeof he.ADD_ATTR=="function"?fe.attributeCheck=he.ADD_ATTR:(yt===It&&(yt=Aa(yt)),Zt(yt,he.ADD_ATTR,zn))),he.ADD_URI_SAFE_ATTR&&Zt(gn,he.ADD_URI_SAFE_ATTR,zn),he.FORBID_CONTENTS&&(kt===jt&&(kt=Aa(kt)),Zt(kt,he.FORBID_CONTENTS,zn)),Ue&&(je["#text"]=!0),ge&&Zt(je,["html","head","body"]),je.table&&(Zt(je,["tbody"]),delete Mt.tbody),he.TRUSTED_TYPES_POLICY){if(typeof he.TRUSTED_TYPES_POLICY.createHTML!="function")throw xl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof he.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');M=he.TRUSTED_TYPES_POLICY,y=M.createHTML("")}else M===void 0&&(M=hA(x,a)),M!==null&&typeof y=="string"&&(y=M.createHTML(""));Hr&&Hr(he),an=he}},ma=Zt({},[...qh,...jh,...tA]),Fr=Zt({},[...$h,...nA]),xt=function(he){let B=T(he);(!B||!B.tagName)&&(B={namespaceURI:xn,tagName:"template"});const V=rc(he.tagName),ee=rc(B.tagName);return Pn[he.namespaceURI]?he.namespaceURI===Qn?B.namespaceURI===Cn?V==="svg":B.namespaceURI===ln?V==="svg"&&(ee==="annotation-xml"||Gr[ee]):!!ma[V]:he.namespaceURI===ln?B.namespaceURI===Cn?V==="math":B.namespaceURI===Qn?V==="math"&&er[ee]:!!Fr[V]:he.namespaceURI===Cn?B.namespaceURI===Qn&&!er[ee]||B.namespaceURI===ln&&!Gr[ee]?!1:!Fr[V]&&(or[V]||!ma[V]):!!(Jt==="application/xhtml+xml"&&Pn[he.namespaceURI]):!1},mr=function(he){yl(e.removed,{element:he});try{T(he).removeChild(he)}catch{k(he)}},Ln=function(he,B){try{yl(e.removed,{attribute:B.getAttributeNode(he),from:B})}catch{yl(e.removed,{attribute:null,from:B})}if(B.removeAttribute(he),he==="is")if(Ee||ze)try{mr(B)}catch{}else try{B.setAttribute(he,"")}catch{}},ui=function(he){let B=null,V=null;if(ve)he="<remove></remove>"+he;else{const Te=Fh(he,/^[\r\n\t ]+/);V=Te&&Te[0]}Jt==="application/xhtml+xml"&&xn===Cn&&(he='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+he+"</body></html>");const ee=M?M.createHTML(he):he;if(xn===Cn)try{B=new m().parseFromString(ee,Jt)}catch{}if(!B||!B.documentElement){B=N.createDocument(xn,"template",null);try{B.documentElement.innerHTML=zt?y:ee}catch{}}const ne=B.body||B.documentElement;return he&&V&&ne.insertBefore(n.createTextNode(V),ne.childNodes[0]||null),xn===Cn?P.call(B,ge?"html":"body")[0]:ge?B.documentElement:ne},tr=function(he){return z.call(he.ownerDocument||he,he,v.SHOW_ELEMENT|v.SHOW_COMMENT|v.SHOW_TEXT|v.SHOW_PROCESSING_INSTRUCTION|v.SHOW_CDATA_SECTION,null)},Kr=function(he){return he instanceof g&&(typeof he.nodeName!="string"||typeof he.textContent!="string"||typeof he.removeChild!="function"||!(he.attributes instanceof b)||typeof he.removeAttribute!="function"||typeof he.setAttribute!="function"||typeof he.namespaceURI!="string"||typeof he.insertBefore!="function"||typeof he.hasChildNodes!="function")},Ui=function(he){return typeof c=="function"&&he instanceof c};function sr(vt,he,B){$0(vt,V=>{V.call(e,he,B,an)})}const Xr=function(he){let B=null;if(sr(te.beforeSanitizeElements,he,null),Kr(he))return mr(he),!0;const V=zn(he.nodeName);if(sr(te.uponSanitizeElement,he,{tagName:V,allowedTags:je}),Z&&he.hasChildNodes()&&!Ui(he.firstElementChild)&&Mr(/<[/\w!]/g,he.innerHTML)&&Mr(/<[/\w!]/g,he.textContent)||he.nodeType===Sl.progressingInstruction||Z&&he.nodeType===Sl.comment&&Mr(/<[/\w]/g,he.data))return mr(he),!0;if(!(fe.tagCheck instanceof Function&&fe.tagCheck(V))&&(!je[V]||Mt[V])){if(!Mt[V]&&hi(V)&&(bt.tagNameCheck instanceof RegExp&&Mr(bt.tagNameCheck,V)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(V)))return!1;if(Ue&&!kt[V]){const ee=T(he)||he.parentNode,ne=A(he)||he.childNodes;if(ne&&ee){const Te=ne.length;for(let _e=Te-1;_e>=0;--_e){const le=S(ne[_e],!0);le.__removalCount=(he.__removalCount||0)+1,ee.insertBefore(le,C(he))}}}return mr(he),!0}return he instanceof p&&!xt(he)||(V==="noscript"||V==="noembed"||V==="noframes")&&Mr(/<\/no(script|embed|frames)/i,he.innerHTML)?(mr(he),!0):(W&&he.nodeType===Sl.text&&(B=he.textContent,$0([ue,Le,qe],ee=>{B=wl(B,ee," ")}),he.textContent!==B&&(yl(e.removed,{element:he.cloneNode()}),he.textContent=B)),sr(te.afterSanitizeElements,he,null),!1)},di=function(he,B,V){if(Ze&&(B==="id"||B==="name")&&(V in n||V in Qt))return!1;if(!(Q&&!se[B]&&Mr(Xe,B))){if(!(J&&Mr(it,B))){if(!(fe.attributeCheck instanceof Function&&fe.attributeCheck(B,he))){if(!yt[B]||se[B]){if(!(hi(he)&&(bt.tagNameCheck instanceof RegExp&&Mr(bt.tagNameCheck,he)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(he))&&(bt.attributeNameCheck instanceof RegExp&&Mr(bt.attributeNameCheck,B)||bt.attributeNameCheck instanceof Function&&bt.attributeNameCheck(B,he))||B==="is"&&bt.allowCustomizedBuiltInElements&&(bt.tagNameCheck instanceof RegExp&&Mr(bt.tagNameCheck,V)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(V))))return!1}else if(!gn[B]){if(!Mr(ut,wl(V,De,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&he!=="script"&&YT(V,"data:")===0&&$t[he])){if(!(Ie&&!Mr($e,wl(V,De,"")))){if(V)return!1}}}}}}}return!0},hi=function(he){return he!=="annotation-xml"&&Fh(he,nt)},Bt=function(he){sr(te.beforeSanitizeAttributes,he,null);const{attributes:B}=he;if(!B||Kr(he))return;const V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yt,forceKeepAttr:void 0};let ee=B.length;for(;ee--;){const ne=B[ee],{name:Te,namespaceURI:_e,value:le}=ne,Ne=zn(Te),Qe=le;let rt=Te==="value"?Qe:JT(Qe);if(V.attrName=Ne,V.attrValue=rt,V.keepAttr=!0,V.forceKeepAttr=void 0,sr(te.uponSanitizeAttribute,he,V),rt=V.attrValue,Be&&(Ne==="id"||Ne==="name")&&(Ln(Te,he),rt=at+rt),Z&&Mr(/((--!?|])>)|<\/(style|title|textarea)/i,rt)){Ln(Te,he);continue}if(Ne==="attributename"&&Fh(rt,"href")){Ln(Te,he);continue}if(V.forceKeepAttr)continue;if(!V.keepAttr){Ln(Te,he);continue}if(!de&&Mr(/\/>/i,rt)){Ln(Te,he);continue}W&&$0([ue,Le,qe],Kt=>{rt=wl(rt,Kt," ")});const Ot=zn(he.nodeName);if(!di(Ot,Ne,rt)){Ln(Te,he);continue}if(M&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!_e)switch(x.getAttributeType(Ot,Ne)){case"TrustedHTML":{rt=M.createHTML(rt);break}case"TrustedScriptURL":{rt=M.createScriptURL(rt);break}}if(rt!==Qe)try{_e?he.setAttributeNS(_e,Te,rt):he.setAttribute(Te,rt),Kr(he)?mr(he):E4(e.removed)}catch{Ln(Te,he)}}sr(te.afterSanitizeAttributes,he,null)},_i=function vt(he){let B=null;const V=tr(he);for(sr(te.beforeSanitizeShadowDOM,he,null);B=V.nextNode();)sr(te.uponSanitizeShadowNode,B,null),Xr(B),Bt(B),B.content instanceof l&&vt(B.content);sr(te.afterSanitizeShadowDOM,he,null)};return e.sanitize=function(vt){let he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,V=null,ee=null,ne=null;if(zt=!vt,zt&&(vt="<!-->"),typeof vt!="string"&&!Ui(vt))if(typeof vt.toString=="function"){if(vt=vt.toString(),typeof vt!="string")throw xl("dirty is not a string, aborting")}else throw xl("toString is not a function");if(!e.isSupported)return vt;if(ce||Li(he),e.removed=[],typeof vt=="string"&&(He=!1),He){if(vt.nodeName){const le=zn(vt.nodeName);if(!je[le]||Mt[le])throw xl("root node is forbidden and cannot be sanitized in-place")}}else if(vt instanceof c)B=ui("<!---->"),V=B.ownerDocument.importNode(vt,!0),V.nodeType===Sl.element&&V.nodeName==="BODY"||V.nodeName==="HTML"?B=V:B.appendChild(V);else{if(!Ee&&!W&&!ge&&vt.indexOf("<")===-1)return M&&We?M.createHTML(vt):vt;if(B=ui(vt),!B)return Ee?null:We?y:""}B&&ve&&mr(B.firstChild);const Te=tr(He?vt:B);for(;ee=Te.nextNode();)Xr(ee),Bt(ee),ee.content instanceof l&&_i(ee.content);if(He)return vt;if(Ee){if(ze)for(ne=q.call(B.ownerDocument);B.firstChild;)ne.appendChild(B.firstChild);else ne=B;return(yt.shadowroot||yt.shadowrootmode)&&(ne=Y.call(r,ne,!0)),ne}let _e=ge?B.outerHTML:B.innerHTML;return ge&&je["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&Mr(J3,B.ownerDocument.doctype.name)&&(_e="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
`+_e),W&&$0([ue,Le,qe],le=>{_e=wl(_e,le," ")}),M&&We?M.createHTML(_e):_e},e.setConfig=function(){let vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Li(vt),ce=!0},e.clearConfig=function(){an=null,ce=!1},e.isValidAttribute=function(vt,he,B){an||Li({});const V=zn(vt),ee=zn(he);return di(V,ee,B)},e.addHook=function(vt,he){typeof he=="function"&&yl(te[vt],he)},e.removeHook=function(vt,he){if(he!==void 0){const B=XT(te[vt],he);return B===-1?void 0:ZT(te[vt],B,1)[0]}return E4(te[vt])},e.removeHooks=function(vt){te[vt]=[]},e.removeAllHooks=function(){te=_4()},e}var pA=Q3();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:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};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 eb=new rn.Renderer;eb.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 a=r;r.includes("cdn-mineru.openxlab.org.cn")&&(a=`/proxy-image${r.replace("https://cdn-mineru.openxlab.org.cn","")}`);const l=n||"图片",h=e?` title="${e}"`:"";return console.log("🖼️ 最终生成的图片HTML:",`<img src="${a}" alt="${l}"${h} class="markdown-image" />`),`<img src="${a}" 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);" />`};rn.setOptions({breaks:!1,gfm:!0,tables:!0,sanitize:!1,renderer:eb});const j1=t=>{if(!t||typeof t!="string")return"";try{if(mA(t))return N4(R4(t));const e=fA(t),n=rn.parse(e),r=R4(n);return N4(r)}catch(e){return console.error("Markdown渲染失败:",e),`<div class="markdown-error">渲染失败: ${e.message}</div>`}},N4=t=>{try{return pA.sanitize(t,{ALLOWED_ATTR:["href","src","alt","title","width","height","style","class","target","rel","colspan","rowspan","align"],ALLOWED_TAGS:["div","span","p","h1","h2","h3","h4","h5","h6","ul","ol","li","strong","em","code","pre","br","hr","table","thead","tbody","tr","th","td","img","a","blockquote"],FORBID_ATTR:[/^on/i],FORBID_TAGS:["script","iframe","object","embed"]})}catch(e){return console.warn("sanitize 失败使用原始HTML",e),t}},fA=t=>vA(gA(String(t??""))).replace(/\$\$([\s\S]*?)\$\$/g,(n,r)=>{try{return`<div class="math-block">${k4.renderToString(r.trim(),{displayMode:!0,throwOnError:!1})}</div>`}catch(a){return console.warn("数学公式渲染失败:",a),`<div class="math-error">数学公式错误: ${r}</div>`}}).replace(/\$([^$\n]+?)\$/g,(n,r)=>{if(r.includes("\\")||r.includes("{")||r.includes("}")||r.includes("^")||r.includes("_")||r.includes("=")||r.includes("+")||r.includes("-")||r.includes("*")||r.includes("/")||r.includes("(")||r.includes(")"))try{return`<span class="math-inline">${k4.renderToString(r.trim(),{displayMode:!1,throwOnError:!1})}</span>`}catch(a){return console.warn("数学公式渲染失败:",a),`<span class="math-error">数学公式错误: ${r}</span>`}return n}),mA=t=>{const e=String(t??"").trim();if(!e||e.indexOf("<")===-1)return!1;if(/<\/?(table|thead|tbody|tr|td|th)\b/i.test(e))return!0;try{return!!new DOMParser().parseFromString(e,"text/html").body.querySelector("table")}catch{return!1}},gA=t=>t.replace(/[\uFF5C\u2223\uFFE8]/g,"|").replace(/[\u2014\u2015\u2212\uFF0D\u2500\u2013]/g,"-").replace(/[\u3000\u00A0\u200B\uFEFF]/g," "),vA=t=>{const e=String(t).split(`
`),n=[];let r=!1;const a=l=>(l.replace(/\\\|/g,"").match(/\|/g)||[]).length>=2;for(let l=0;l<e.length;l++){let h=e[l];if(/^\s*```/.test(h)){r=!r,n.push(h);continue}if(r){n.push(h);continue}if(a(h)){const c=h.replace(/^\t|^ {1,4}/,"").trim(),p=l+1<e.length?e[l+1]:"",v=/^\s*\|?\s*[:\-\| ]+\|?\s*$/.test(p),b=c.split("|").filter(g=>g.trim()!=="").length;if(!v&&b>=2){const g="|"+Array.from({length:b}).map(()=>" --- ").join("|")+"|";n.push(c),n.push(g),p&&!/^\s*```/.test(p)&&(n.push(D4(p,b)),l++);continue}if(n.push(c),v){const g="|"+Array.from({length:b}).map(()=>" --- ").join("|")+"|";n.push(g),l++;let m=l+0;for(;m+1<=e.length-1&&a(e[m+1]);)m++;for(let x=l+1;x<=m;x++)n.push(D4(e[x],b));l=m;continue}}n.push(h)}return n.join(`
`)},D4=(t,e)=>{const n=t.replace(/^\t|^ {1,4}/,"").split("|"),r=n.filter((a,l)=>!(l===0&&a.trim()==="")&&!(l===n.length-1&&a.trim()===""));for(;r.length<e;)r.push(" ");return"|"+r.slice(0,e).map(a=>" "+a.trim()+" ").join("|")+"|"},R4=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(a=>{const l=a.className.match(/language-(\w+)/);if(l)try{a.innerHTML=qg.highlight(a.textContent,qg.languages[l[1]],l[1])}catch(h){console.warn("语法高亮失败:",h)}}),n.innerHTML},bA=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 a=(t.match(/\|/g)||[]).length,l=a>=6;return n&&r||n&&l||n&&a>=4},yA=t=>!t||typeof t!="string"?!1:bA(t)?!0:[/#{1,6}\s+/,/\*\*.*?\*\*/,/\*.*?\*/,/`.*?`/,/```[\s\S]*?```/,/^\s*[-*+]\s+/m,/^\s*\d+\.\s+/m,/\[.*?\]\(.*?\)/,/!\[.*?\]\(.*?\)/,/\$\$.*?\$\$/,/\$.*?\$/].some(n=>n.test(t)),El=t=>{if(!t||typeof t!="string")return t||"";const e=yA(t),n=t.includes("|")&&t.includes("-");return e||n?(console.log("🎯 同步渲染Markdown内容"),j1(t)):t};function tb(t,e){return function(){return t.apply(e,arguments)}}const{toString:wA}=Object.prototype,{getPrototypeOf:$1}=Object,{iterator:ku,toStringTag:nb}=Symbol,Su=(t=>e=>{const n=wA.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$i=t=>(t=t.toLowerCase(),e=>Su(e)===t),Eu=t=>e=>typeof e===t,{isArray:Os}=Array,Yl=Eu("undefined");function h0(t){return t!==null&&!Yl(t)&&t.constructor!==null&&!Yl(t.constructor)&&Ur(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rb=$i("ArrayBuffer");function xA(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rb(t.buffer),e}const kA=Eu("string"),Ur=Eu("function"),ib=Eu("number"),p0=t=>t!==null&&typeof t=="object",SA=t=>t===!0||t===!1,ic=t=>{if(Su(t)!=="object")return!1;const e=$1(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(nb in t)&&!(ku in t)},EA=t=>{if(!p0(t)||h0(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},TA=$i("Date"),AA=$i("File"),MA=$i("Blob"),CA=$i("FileList"),LA=t=>p0(t)&&Ur(t.pipe),_A=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ur(t.append)&&((e=Su(t))==="formdata"||e==="object"&&Ur(t.toString)&&t.toString()==="[object FormData]"))},NA=$i("URLSearchParams"),[DA,RA,OA,IA]=["ReadableStream","Request","Response","Headers"].map($i),HA=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function f0(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,a;if(typeof t!="object"&&(t=[t]),Os(t))for(r=0,a=t.length;r<a;r++)e.call(null,t[r],r,t);else{if(h0(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 ab(t,e){if(h0(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,a;for(;r-- >0;)if(a=n[r],e===a.toLowerCase())return a;return null}const Wo=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ob=t=>!Yl(t)&&t!==Wo;function Wp(){const{caseless:t}=ob(this)&&this||{},e={},n=(r,a)=>{const l=t&&ab(e,a)||a;ic(e[l])&&ic(r)?e[l]=Wp(e[l],r):ic(r)?e[l]=Wp({},r):Os(r)?e[l]=r.slice():e[l]=r};for(let r=0,a=arguments.length;r<a;r++)arguments[r]&&f0(arguments[r],n);return e}const PA=(t,e,n,{allOwnKeys:r}={})=>(f0(e,(a,l)=>{n&&Ur(a)?t[l]=tb(a,n):t[l]=a},{allOwnKeys:r}),t),zA=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),BA=(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)},FA=(t,e,n,r)=>{let a,l,h;const c={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),l=a.length;l-- >0;)h=a[l],(!r||r(h,t,e))&&!c[h]&&(e[h]=t[h],c[h]=!0);t=n!==!1&&$1(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},qA=(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},jA=t=>{if(!t)return null;if(Os(t))return t;let e=t.length;if(!ib(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},$A=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&$1(Uint8Array)),UA=(t,e)=>{const r=(t&&t[ku]).call(t);let a;for(;(a=r.next())&&!a.done;){const l=a.value;e.call(t,l[0],l[1])}},VA=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},WA=$i("HTMLFormElement"),GA=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),O4=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),KA=$i("RegExp"),sb=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};f0(n,(a,l)=>{let h;(h=e(a,l,t))!==!1&&(r[l]=h||a)}),Object.defineProperties(t,r)},XA=t=>{sb(t,(e,n)=>{if(Ur(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Ur(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+"'")})}})},ZA=(t,e)=>{const n={},r=a=>{a.forEach(l=>{n[l]=!0})};return Os(t)?r(t):r(String(t).split(e)),n},YA=()=>{},JA=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function QA(t){return!!(t&&Ur(t.append)&&t[nb]==="FormData"&&t[ku])}const eM=t=>{const e=new Array(10),n=(r,a)=>{if(p0(r)){if(e.indexOf(r)>=0)return;if(h0(r))return r;if(!("toJSON"in r)){e[a]=r;const l=Os(r)?[]:{};return f0(r,(h,c)=>{const p=n(h,a+1);!Yl(p)&&(l[c]=p)}),e[a]=void 0,l}}return r};return n(t,0)},tM=$i("AsyncFunction"),nM=t=>t&&(p0(t)||Ur(t))&&Ur(t.then)&&Ur(t.catch),lb=((t,e)=>t?setImmediate:e?((n,r)=>(Wo.addEventListener("message",({source:a,data:l})=>{a===Wo&&l===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Wo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ur(Wo.postMessage)),rM=typeof queueMicrotask<"u"?queueMicrotask.bind(Wo):typeof process<"u"&&process.nextTick||lb,iM=t=>t!=null&&Ur(t[ku]),Oe={isArray:Os,isArrayBuffer:rb,isBuffer:h0,isFormData:_A,isArrayBufferView:xA,isString:kA,isNumber:ib,isBoolean:SA,isObject:p0,isPlainObject:ic,isEmptyObject:EA,isReadableStream:DA,isRequest:RA,isResponse:OA,isHeaders:IA,isUndefined:Yl,isDate:TA,isFile:AA,isBlob:MA,isRegExp:KA,isFunction:Ur,isStream:LA,isURLSearchParams:NA,isTypedArray:$A,isFileList:CA,forEach:f0,merge:Wp,extend:PA,trim:HA,stripBOM:zA,inherits:BA,toFlatObject:FA,kindOf:Su,kindOfTest:$i,endsWith:qA,toArray:jA,forEachEntry:UA,matchAll:VA,isHTMLForm:WA,hasOwnProperty:O4,hasOwnProp:O4,reduceDescriptors:sb,freezeMethods:XA,toObjectSet:ZA,toCamelCase:GA,noop:YA,toFiniteNumber:JA,findKey:ab,global:Wo,isContextDefined:ob,isSpecCompliantForm:QA,toJSONObject:eM,isAsyncFn:tM,isThenable:nM,setImmediate:lb,asap:rM,isIterable:iM};function qt(t,e,n,r,a){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),a&&(this.response=a,this.status=a.status?a.status:null)}Oe.inherits(qt,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:Oe.toJSONObject(this.config),code:this.code,status:this.status}}});const cb=qt.prototype,ub={};["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=>{ub[t]={value:t}});Object.defineProperties(qt,ub);Object.defineProperty(cb,"isAxiosError",{value:!0});qt.from=(t,e,n,r,a,l)=>{const h=Object.create(cb);return Oe.toFlatObject(t,h,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),qt.call(h,t.message,e,n,r,a),h.cause=t,h.name=t.name,l&&Object.assign(h,l),h};const aM=null;function Gp(t){return Oe.isPlainObject(t)||Oe.isArray(t)}function db(t){return Oe.endsWith(t,"[]")?t.slice(0,-2):t}function I4(t,e,n){return t?t.concat(e).map(function(a,l){return a=db(a),!n&&l?"["+a+"]":a}).join(n?".":""):e}function oM(t){return Oe.isArray(t)&&!t.some(Gp)}const sM=Oe.toFlatObject(Oe,{},null,function(e){return/^is[A-Z]/.test(e)});function Tu(t,e,n){if(!Oe.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Oe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,k){return!Oe.isUndefined(k[S])});const r=n.metaTokens,a=n.visitor||b,l=n.dots,h=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&Oe.isSpecCompliantForm(e);if(!Oe.isFunction(a))throw new TypeError("visitor must be a function");function v(w){if(w===null)return"";if(Oe.isDate(w))return w.toISOString();if(Oe.isBoolean(w))return w.toString();if(!p&&Oe.isBlob(w))throw new qt("Blob is not supported. Use a Buffer instead.");return Oe.isArrayBuffer(w)||Oe.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(Oe.endsWith(S,"{}"))S=r?S:S.slice(0,-2),w=JSON.stringify(w);else if(Oe.isArray(w)&&oM(w)||(Oe.isFileList(w)||Oe.endsWith(S,"[]"))&&(C=Oe.toArray(w)))return S=db(S),C.forEach(function(T,M){!(Oe.isUndefined(T)||T===null)&&e.append(h===!0?I4([S],M,l):h===null?S:S+"[]",v(T))}),!1}return Gp(w)?!0:(e.append(I4(k,S,l),v(w)),!1)}const g=[],m=Object.assign(sM,{defaultVisitor:b,convertValue:v,isVisitable:Gp});function x(w,S){if(!Oe.isUndefined(w)){if(g.indexOf(w)!==-1)throw Error("Circular reference detected in "+S.join("."));g.push(w),Oe.forEach(w,function(C,A){(!(Oe.isUndefined(C)||C===null)&&a.call(e,C,Oe.isString(A)?A.trim():A,S,m))===!0&&x(C,S?S.concat(A):[A])}),g.pop()}}if(!Oe.isObject(t))throw new TypeError("data must be an object");return x(t),e}function H4(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function U1(t,e){this._pairs=[],t&&Tu(t,this,e)}const hb=U1.prototype;hb.append=function(e,n){this._pairs.push([e,n])};hb.toString=function(e){const n=e?function(r){return e.call(this,r,H4)}:H4;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function lM(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pb(t,e,n){if(!e)return t;const r=n&&n.encode||lM;Oe.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let l;if(a?l=a(e,n):l=Oe.isURLSearchParams(e)?e.toString():new U1(e,n).toString(r),l){const h=t.indexOf("#");h!==-1&&(t=t.slice(0,h)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}class cM{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){Oe.forEach(this.handlers,function(r){r!==null&&e(r)})}}const P4=cM,fb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},uM=typeof URLSearchParams<"u"?URLSearchParams:U1,dM=typeof FormData<"u"?FormData:null,hM=typeof Blob<"u"?Blob:null,pM={isBrowser:!0,classes:{URLSearchParams:uM,FormData:dM,Blob:hM},protocols:["http","https","file","blob","url","data"]},V1=typeof window<"u"&&typeof document<"u",Kp=typeof navigator=="object"&&navigator||void 0,fM=V1&&(!Kp||["ReactNative","NativeScript","NS"].indexOf(Kp.product)<0),mM=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),gM=V1&&window.location.href||"http://localhost",vM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:V1,hasStandardBrowserEnv:fM,hasStandardBrowserWebWorkerEnv:mM,navigator:Kp,origin:gM},Symbol.toStringTag,{value:"Module"})),kr={...vM,...pM};function bM(t,e){return Tu(t,new kr.classes.URLSearchParams,{visitor:function(n,r,a,l){return kr.isNode&&Oe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}function yM(t){return Oe.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function wM(t){const e={},n=Object.keys(t);let r;const a=n.length;let l;for(r=0;r<a;r++)l=n[r],e[l]=t[l];return e}function mb(t){function e(n,r,a,l){let h=n[l++];if(h==="__proto__")return!0;const c=Number.isFinite(+h),p=l>=n.length;return h=!h&&Oe.isArray(a)?a.length:h,p?(Oe.hasOwnProp(a,h)?a[h]=[a[h],r]:a[h]=r,!c):((!a[h]||!Oe.isObject(a[h]))&&(a[h]=[]),e(n,r,a[h],l)&&Oe.isArray(a[h])&&(a[h]=wM(a[h])),!c)}if(Oe.isFormData(t)&&Oe.isFunction(t.entries)){const n={};return Oe.forEachEntry(t,(r,a)=>{e(yM(r),a,n,0)}),n}return null}function xM(t,e,n){if(Oe.isString(t))try{return(e||JSON.parse)(t),Oe.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const W1={transitional:fb,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,l=Oe.isObject(e);if(l&&Oe.isHTMLForm(e)&&(e=new FormData(e)),Oe.isFormData(e))return a?JSON.stringify(mb(e)):e;if(Oe.isArrayBuffer(e)||Oe.isBuffer(e)||Oe.isStream(e)||Oe.isFile(e)||Oe.isBlob(e)||Oe.isReadableStream(e))return e;if(Oe.isArrayBufferView(e))return e.buffer;if(Oe.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 bM(e,this.formSerializer).toString();if((c=Oe.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Tu(c?{"files[]":e}:e,p&&new p,this.formSerializer)}}return l||a?(n.setContentType("application/json",!1),xM(e)):e}],transformResponse:[function(e){const n=this.transitional||W1.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(Oe.isResponse(e)||Oe.isReadableStream(e))return e;if(e&&Oe.isString(e)&&(r&&!this.responseType||a)){const h=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(c){if(h)throw c.name==="SyntaxError"?qt.from(c,qt.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:kr.classes.FormData,Blob:kr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Oe.forEach(["delete","get","head","post","put","patch"],t=>{W1.headers[t]={}});const G1=W1,kM=Oe.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"]),SM=t=>{const e={};let n,r,a;return t&&t.split(`
`).forEach(function(h){a=h.indexOf(":"),n=h.substring(0,a).trim().toLowerCase(),r=h.substring(a+1).trim(),!(!n||e[n]&&kM[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},z4=Symbol("internals");function Tl(t){return t&&String(t).trim().toLowerCase()}function ac(t){return t===!1||t==null?t:Oe.isArray(t)?t.map(ac):String(t)}function EM(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 TM=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Vh(t,e,n,r,a){if(Oe.isFunction(r))return r.call(this,e,n);if(a&&(e=n),!!Oe.isString(e)){if(Oe.isString(r))return e.indexOf(r)!==-1;if(Oe.isRegExp(r))return r.test(e)}}function AM(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function MM(t,e){const n=Oe.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(a,l,h){return this[r].call(this,e,a,l,h)},configurable:!0})})}class Au{constructor(e){e&&this.set(e)}set(e,n,r){const a=this;function l(c,p,v){const b=Tl(p);if(!b)throw new Error("header name must be a non-empty string");const g=Oe.findKey(a,b);(!g||a[g]===void 0||v===!0||v===void 0&&a[g]!==!1)&&(a[g||p]=ac(c))}const h=(c,p)=>Oe.forEach(c,(v,b)=>l(v,b,p));if(Oe.isPlainObject(e)||e instanceof this.constructor)h(e,n);else if(Oe.isString(e)&&(e=e.trim())&&!TM(e))h(SM(e),n);else if(Oe.isObject(e)&&Oe.isIterable(e)){let c={},p,v;for(const b of e){if(!Oe.isArray(b))throw TypeError("Object iterator must return a key-value pair");c[v=b[0]]=(p=c[v])?Oe.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=Tl(e),e){const r=Oe.findKey(this,e);if(r){const a=this[r];if(!n)return a;if(n===!0)return EM(a);if(Oe.isFunction(n))return n.call(this,a,r);if(Oe.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Tl(e),e){const r=Oe.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Vh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let a=!1;function l(h){if(h=Tl(h),h){const c=Oe.findKey(r,h);c&&(!n||Vh(r,r[c],c,n))&&(delete r[c],a=!0)}}return Oe.isArray(e)?e.forEach(l):l(e),a}clear(e){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const l=n[r];(!e||Vh(this,this[l],l,e,!0))&&(delete this[l],a=!0)}return a}normalize(e){const n=this,r={};return Oe.forEach(this,(a,l)=>{const h=Oe.findKey(r,l);if(h){n[h]=ac(a),delete n[l];return}const c=e?AM(l):String(l).trim();c!==l&&delete n[l],n[c]=ac(a),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Oe.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=e&&Oe.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(a=>r.set(a)),r}static accessor(e){const r=(this[z4]=this[z4]={accessors:{}}).accessors,a=this.prototype;function l(h){const c=Tl(h);r[c]||(MM(a,h),r[c]=!0)}return Oe.isArray(e)?e.forEach(l):l(e),this}}Au.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Oe.reduceDescriptors(Au.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Oe.freezeMethods(Au);const ji=Au;function Wh(t,e){const n=this||G1,r=e||n,a=ji.from(r.headers);let l=r.data;return Oe.forEach(t,function(c){l=c.call(n,l,a.normalize(),e?e.status:void 0)}),a.normalize(),l}function gb(t){return!!(t&&t.__CANCEL__)}function Is(t,e,n){qt.call(this,t??"canceled",qt.ERR_CANCELED,e,n),this.name="CanceledError"}Oe.inherits(Is,qt,{__CANCEL__:!0});function vb(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new qt("Request failed with status code "+n.status,[qt.ERR_BAD_REQUEST,qt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function CM(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function LM(t,e){t=t||10;const n=new Array(t),r=new Array(t);let a=0,l=0,h;return e=e!==void 0?e:1e3,function(p){const v=Date.now(),b=r[l];h||(h=v),n[a]=p,r[a]=v;let g=l,m=0;for(;g!==a;)m+=n[g++],g=g%t;if(a=(a+1)%t,a===l&&(l=(l+1)%t),v-h<e)return;const x=b&&v-b;return x?Math.round(m*1e3/x):void 0}}function _M(t,e){let n=0,r=1e3/e,a,l;const h=(v,b=Date.now())=>{n=b,a=null,l&&(clearTimeout(l),l=null),t(...v)};return[(...v)=>{const b=Date.now(),g=b-n;g>=r?h(v,b):(a=v,l||(l=setTimeout(()=>{l=null,h(a)},r-g)))},()=>a&&h(a)]}const Bc=(t,e,n=3)=>{let r=0;const a=LM(50,250);return _M(l=>{const h=l.loaded,c=l.lengthComputable?l.total:void 0,p=h-r,v=a(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)},B4=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},F4=t=>(...e)=>Oe.asap(()=>t(...e)),NM=kr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,kr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(kr.origin),kr.navigator&&/(msie|trident)/i.test(kr.navigator.userAgent)):()=>!0,DM=kr.hasStandardBrowserEnv?{write(t,e,n,r,a,l){const h=[t+"="+encodeURIComponent(e)];Oe.isNumber(n)&&h.push("expires="+new Date(n).toGMTString()),Oe.isString(r)&&h.push("path="+r),Oe.isString(a)&&h.push("domain="+a),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 RM(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function OM(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function bb(t,e,n){let r=!RM(e);return t&&(r||n==!1)?OM(t,e):e}const q4=t=>t instanceof ji?{...t}:t;function Qo(t,e){e=e||{};const n={};function r(v,b,g,m){return Oe.isPlainObject(v)&&Oe.isPlainObject(b)?Oe.merge.call({caseless:m},v,b):Oe.isPlainObject(b)?Oe.merge({},b):Oe.isArray(b)?b.slice():b}function a(v,b,g,m){if(Oe.isUndefined(b)){if(!Oe.isUndefined(v))return r(void 0,v,g,m)}else return r(v,b,g,m)}function l(v,b){if(!Oe.isUndefined(b))return r(void 0,b)}function h(v,b){if(Oe.isUndefined(b)){if(!Oe.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)=>a(q4(v),q4(b),g,!0)};return Oe.forEach(Object.keys({...t,...e}),function(b){const g=p[b]||a,m=g(t[b],e[b],b);Oe.isUndefined(m)&&g!==c||(n[b]=m)}),n}const yb=t=>{const e=Qo({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:l,headers:h,auth:c}=e;e.headers=h=ji.from(h),e.url=pb(bb(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(Oe.isFormData(n)){if(kr.hasStandardBrowserEnv||kr.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(kr.hasStandardBrowserEnv&&(r&&Oe.isFunction(r)&&(r=r(e)),r||r!==!1&&NM(e.url))){const v=a&&l&&DM.read(l);v&&h.set(a,v)}return e},IM=typeof XMLHttpRequest<"u",HM=IM&&function(t){return new Promise(function(n,r){const a=yb(t);let l=a.data;const h=ji.from(a.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:v}=a,b,g,m,x,w;function S(){x&&x(),w&&w(),a.cancelToken&&a.cancelToken.unsubscribe(b),a.signal&&a.signal.removeEventListener("abort",b)}let k=new XMLHttpRequest;k.open(a.method.toUpperCase(),a.url,!0),k.timeout=a.timeout;function C(){if(!k)return;const T=ji.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),y={data:!c||c==="text"||c==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:T,config:t,request:k};vb(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 qt("Request aborted",qt.ECONNABORTED,t,k)),k=null)},k.onerror=function(){r(new qt("Network Error",qt.ERR_NETWORK,t,k)),k=null},k.ontimeout=function(){let M=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const y=a.transitional||fb;a.timeoutErrorMessage&&(M=a.timeoutErrorMessage),r(new qt(M,y.clarifyTimeoutError?qt.ETIMEDOUT:qt.ECONNABORTED,t,k)),k=null},l===void 0&&h.setContentType(null),"setRequestHeader"in k&&Oe.forEach(h.toJSON(),function(M,y){k.setRequestHeader(y,M)}),Oe.isUndefined(a.withCredentials)||(k.withCredentials=!!a.withCredentials),c&&c!=="json"&&(k.responseType=a.responseType),v&&([m,w]=Bc(v,!0),k.addEventListener("progress",m)),p&&k.upload&&([g,x]=Bc(p),k.upload.addEventListener("progress",g),k.upload.addEventListener("loadend",x)),(a.cancelToken||a.signal)&&(b=T=>{k&&(r(!T||T.type?new Is(null,t,k):T),k.abort(),k=null)},a.cancelToken&&a.cancelToken.subscribe(b),a.signal&&(a.signal.aborted?b():a.signal.addEventListener("abort",b)));const A=CM(a.url);if(A&&kr.protocols.indexOf(A)===-1){r(new qt("Unsupported protocol "+A+":",qt.ERR_BAD_REQUEST,t));return}k.send(l||null)})},PM=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,a;const l=function(v){if(!a){a=!0,c();const b=v instanceof Error?v:this.reason;r.abort(b instanceof qt?b:new Is(b instanceof Error?b.message:b))}};let h=e&&setTimeout(()=>{h=null,l(new qt(`timeout ${e} of ms exceeded`,qt.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=()=>Oe.asap(c),p}},zM=PM,BM=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,a;for(;r<n;)a=r+e,yield t.slice(r,a),r=a},FM=async function*(t,e){for await(const n of qM(t))yield*BM(n,e)},qM=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()}},j4=(t,e,n,r)=>{const a=FM(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 a.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),a.return()}},{highWaterMark:2})},Mu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wb=Mu&&typeof ReadableStream=="function",jM=Mu&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),xb=(t,...e)=>{try{return!!t(...e)}catch{return!1}},$M=wb&&xb(()=>{let t=!1;const e=new Request(kr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),$4=64*1024,Xp=wb&&xb(()=>Oe.isReadableStream(new Response("").body)),Fc={stream:Xp&&(t=>t.body)};Mu&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Fc[e]&&(Fc[e]=Oe.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new qt(`Response type '${e}' is not supported`,qt.ERR_NOT_SUPPORT,r)})})})(new Response);const UM=async t=>{if(t==null)return 0;if(Oe.isBlob(t))return t.size;if(Oe.isSpecCompliantForm(t))return(await new Request(kr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Oe.isArrayBufferView(t)||Oe.isArrayBuffer(t))return t.byteLength;if(Oe.isURLSearchParams(t)&&(t=t+""),Oe.isString(t))return(await jM(t)).byteLength},VM=async(t,e)=>{const n=Oe.toFiniteNumber(t.getContentLength());return n??UM(e)},WM=Mu&&(async t=>{let{url:e,method:n,data:r,signal:a,cancelToken:l,timeout:h,onDownloadProgress:c,onUploadProgress:p,responseType:v,headers:b,withCredentials:g="same-origin",fetchOptions:m}=yb(t);v=v?(v+"").toLowerCase():"text";let x=zM([a,l&&l.toAbortSignal()],h),w;const S=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let k;try{if(p&&$M&&n!=="get"&&n!=="head"&&(k=await VM(b,r))!==0){let y=new Request(e,{method:"POST",body:r,duplex:"half"}),N;if(Oe.isFormData(r)&&(N=y.headers.get("content-type"))&&b.setContentType(N),y.body){const[z,q]=B4(k,Bc(F4(p)));r=j4(y.body,$4,z,q)}}Oe.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 A=await fetch(w,m);const T=Xp&&(v==="stream"||v==="response");if(Xp&&(c||T&&S)){const y={};["status","statusText","headers"].forEach(P=>{y[P]=A[P]});const N=Oe.toFiniteNumber(A.headers.get("content-length")),[z,q]=c&&B4(N,Bc(F4(c),!0))||[];A=new Response(j4(A.body,$4,z,()=>{q&&q(),S&&S()}),y)}v=v||"text";let M=await Fc[Oe.findKey(Fc,v)||"text"](A,t);return!T&&S&&S(),await new Promise((y,N)=>{vb(y,N,{data:M,headers:ji.from(A.headers),status:A.status,statusText:A.statusText,config:t,request:w})})}catch(C){throw S&&S(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new qt("Network Error",qt.ERR_NETWORK,t,w),{cause:C.cause||C}):qt.from(C,C&&C.code,t,w)}}),Zp={http:aM,xhr:HM,fetch:WM};Oe.forEach(Zp,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const U4=t=>`- ${t}`,GM=t=>Oe.isFunction(t)||t===null||t===!1,kb={getAdapter:t=>{t=Oe.isArray(t)?t:[t];const{length:e}=t;let n,r;const a={};for(let l=0;l<e;l++){n=t[l];let h;if(r=n,!GM(n)&&(r=Zp[(h=String(n)).toLowerCase()],r===void 0))throw new qt(`Unknown adapter '${h}'`);if(r)break;a[h||"#"+l]=r}if(!r){const l=Object.entries(a).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(U4).join(`
`):" "+U4(l[0]):"as no adapter specified";throw new qt("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return r},adapters:Zp};function Gh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Is(null,t)}function V4(t){return Gh(t),t.headers=ji.from(t.headers),t.data=Wh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),kb.getAdapter(t.adapter||G1.adapter)(t).then(function(r){return Gh(t),r.data=Wh.call(t,t.transformResponse,r),r.headers=ji.from(r.headers),r},function(r){return gb(r)||(Gh(t),r&&r.response&&(r.response.data=Wh.call(t,t.transformResponse,r.response),r.response.headers=ji.from(r.response.headers))),Promise.reject(r)})}const Sb="1.11.0",Cu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Cu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const W4={};Cu.transitional=function(e,n,r){function a(l,h){return"[Axios v"+Sb+"] Transitional option '"+l+"'"+h+(r?". "+r:"")}return(l,h,c)=>{if(e===!1)throw new qt(a(h," has been removed"+(n?" in "+n:"")),qt.ERR_DEPRECATED);return n&&!W4[h]&&(W4[h]=!0,console.warn(a(h," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,h,c):!0}};Cu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function KM(t,e,n){if(typeof t!="object")throw new qt("options must be an object",qt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let a=r.length;for(;a-- >0;){const l=r[a],h=e[l];if(h){const c=t[l],p=c===void 0||h(c,l,t);if(p!==!0)throw new qt("option "+l+" must be "+p,qt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qt("Unknown option "+l,qt.ERR_BAD_OPTION)}}const oc={assertOptions:KM,validators:Cu},Ki=oc.validators;class qc{constructor(e){this.defaults=e||{},this.interceptors={request:new P4,response:new P4}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const l=a.stack?a.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=Qo(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:l}=n;r!==void 0&&oc.assertOptions(r,{silentJSONParsing:Ki.transitional(Ki.boolean),forcedJSONParsing:Ki.transitional(Ki.boolean),clarifyTimeoutError:Ki.transitional(Ki.boolean)},!1),a!=null&&(Oe.isFunction(a)?n.paramsSerializer={serialize:a}:oc.assertOptions(a,{encode:Ki.function,serialize:Ki.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),oc.assertOptions(n,{baseUrl:Ki.spelling("baseURL"),withXsrfToken:Ki.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let h=l&&Oe.merge(l.common,l[n.method]);l&&Oe.forEach(["delete","get","head","post","put","patch","common"],w=>{delete l[w]}),n.headers=ji.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=[V4.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=V4.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=Qo(this.defaults,e);const n=bb(e.baseURL,e.url,e.allowAbsoluteUrls);return pb(n,e.params,e.paramsSerializer)}}Oe.forEach(["delete","get","head","options"],function(e){qc.prototype[e]=function(n,r){return this.request(Qo(r||{},{method:e,url:n,data:(r||{}).data}))}});Oe.forEach(["post","put","patch"],function(e){function n(r){return function(l,h,c){return this.request(Qo(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:h}))}}qc.prototype[e]=n(),qc.prototype[e+"Form"]=n(!0)});const sc=qc;class K1{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(a=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](a);r._listeners=null}),this.promise.then=a=>{let l;const h=new Promise(c=>{r.subscribe(c),l=c}).then(a);return h.cancel=function(){r.unsubscribe(l)},h},e(function(l,h,c){r.reason||(r.reason=new Is(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 K1(function(a){e=a}),cancel:e}}}const XM=K1;function ZM(t){return function(n){return t.apply(null,n)}}function YM(t){return Oe.isObject(t)&&t.isAxiosError===!0}const Yp={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(Yp).forEach(([t,e])=>{Yp[e]=t});const JM=Yp;function Eb(t){const e=new sc(t),n=tb(sc.prototype.request,e);return Oe.extend(n,sc.prototype,e,{allOwnKeys:!0}),Oe.extend(n,e,null,{allOwnKeys:!0}),n.create=function(a){return Eb(Qo(t,a))},n}const rr=Eb(G1);rr.Axios=sc;rr.CanceledError=Is;rr.CancelToken=XM;rr.isCancel=gb;rr.VERSION=Sb;rr.toFormData=Tu;rr.AxiosError=qt;rr.Cancel=rr.CanceledError;rr.all=function(e){return Promise.all(e)};rr.spread=ZM;rr.isAxiosError=YM;rr.mergeConfig=Qo;rr.AxiosHeaders=ji;rr.formToJSON=t=>mb(Oe.isHTMLForm(t)?new FormData(t):t);rr.getAdapter=kb.getAdapter;rr.HttpStatusCode=JM;rr.default=rr;const QM=rr,eC="http://127.0.0.1:8000/api",ds=QM.create({baseURL:eC,timeout:1e4,headers:{"Content-Type":"application/json"}}),Zn={createMindmap:(t="思维导图",e=null)=>ds.post("/mindMaps",{title:t,data:e}),getMindmap:t=>ds.get(`/mindMaps/${t}`),getAllMindmaps:()=>ds.get("/mindmaps"),addNodes:(t,e)=>ds.post("/mindMaps/addNodes",{mindMapId:t,nodes:e}),updateNode:(t,e)=>ds.patch("/mindMaps/updateNode",{id:t,...e}),deleteNodes:t=>ds.delete("/mindMaps/deleteNodes",{data:{nodeIds:t}})};const tC={key:0,class:"welcome-page"},nC={class:"ai-input-content"},rC=["disabled","onKeydown"],iC={class:"ai-input-actions"},aC=["disabled"],oC=["disabled"],sC={key:0},lC={key:1},cC={key:3,class:"save-controls"},uC={class:"image-preview-header"},dC={class:"image-preview-title"},hC={class:"image-preview-body"},pC={key:0,class:"image-preview-loading"},fC={key:1,class:"image-preview-error"},mC=["src","alt"],gC={class:"rich-editor-body"},vC={class:"delete-confirm-footer"},bC=3,yC={__name:"MindMap",setup(t,{expose:e}){rn.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=Lt(null),a=Lt(null),l=Lt(null),h=Lt({}),c=Lt({}),p=Lt(null),v=Lt(1),b=Lt(!0),g=Lt(!1),m=Lt(!1),x=Lt(null),w=Lt(""),S=Lt(!1);Lt(new Map),Lt(!1),Lt({x:0,y:0}),Lt(null);const k=Lt(!1),C=Lt(""),A=Lt(""),T=Lt(!1),M=Lt(""),y=Lt(!1),N=Lt(""),z=Lt(""),q=Lt(null),P=Lt(null),Y=Lt([]),te=Lt(!1);Lt(-1),Lt(""),Lt(!1),Lt(""),Lt(null),Lt(null);const ue=Lt(null);let Le=null;Lt({accept:"image/*",max:5*1024*1024,multiple:!1,fieldName:"file"});const qe=()=>{b.value=!0,r.value&&(r.value.innerHTML=""),a.value&&(a.value=null)},Xe=()=>{b.value=!1},it=()=>{b.value=!1},$e=(B,V="")=>{console.log("🖼️ 打开图片预览:",{imageUrl:B,altText:V});let ee=B;typeof B=="string"&&(B.startsWith("/")||B.startsWith("./")||B.startsWith("../")?ee=new URL(B,window.location.origin).href:(B.startsWith("data:image/")||B.startsWith("http://")||B.startsWith("https://"))&&(ee=B)),console.log("🖼️ 处理后的图片URL:",ee),k.value=!0,A.value=V||"图片预览",T.value=!0,M.value="",Z();const ne=new Image;ne.onload=()=>{console.log("✅ 图片预加载成功"),C.value=ee,T.value=!1,ge()},ne.onerror=()=>{console.error("❌ 图片预加载失败:",ee),ge(),T.value=!1,M.value=`图片加载失败: ${ee}`},ne.src=ee},De=()=>{ge(),k.value=!1,C.value="",A.value="",T.value=!1,M.value=""},nt=B=>{if(!B||typeof B!="string")return"";try{let V=B.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 V.length>50&&(V=V.substring(0,50)+"..."),V||"无标题"}catch(V){return console.error("❌ 生成标题失败:",V),"无标题"}},ut=B=>{if(!B||typeof B!="string")return"";try{if(typeof(fs==null?void 0:fs.html2md)=="function")return console.log("✅ 使用Vditor.html2md转换HTML"),fs.html2md(B);console.log("⚠️ Vditor.html2md不可用使用改进的转换逻辑");const V=document.createElement("div");V.innerHTML=B;let ee="";V.querySelectorAll("table").forEach((Ne,Qe)=>{console.log(`📊 处理表格 ${Qe+1}`);const rt=Ne.querySelector("thead");if(rt){const cn=rt.querySelector("tr");if(cn){const wn=Array.from(cn.querySelectorAll("th, td")).map(On=>(On.textContent||"").trim().replace(/\|/g,"\\|"));ee+="| "+wn.join(" | ")+` |
`,ee+="| "+wn.map(()=>"---").join(" | ")+` |
`}}(Ne.querySelector("tbody")||Ne).querySelectorAll("tr").forEach(cn=>{if(rt&&rt.contains(cn))return;const wn=Array.from(cn.querySelectorAll("td, th")).map(On=>(On.textContent||"").trim().replace(/\|/g,"\\|"));wn.length>0&&(ee+="| "+wn.join(" | ")+` |
`)}),ee+=`
`}),V.querySelectorAll("img").forEach(Ne=>{const Qe=Ne.src||Ne.getAttribute("src")||"",rt=Ne.alt||Ne.getAttribute("alt")||"";Qe&&(ee+=`![${rt}](${Qe})
`)});const _e=V.cloneNode(!0);_e.querySelectorAll("table, img").forEach(Ne=>Ne.remove());let le=_e.innerHTML;return le=le.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(/<h1[^>]*>(.*?)<\/h1>/gi,`# $1
`).replace(/<h2[^>]*>(.*?)<\/h2>/gi,`## $1
`).replace(/<h3[^>]*>(.*?)<\/h3>/gi,`### $1
`).replace(/<h4[^>]*>(.*?)<\/h4>/gi,`#### $1
`).replace(/<h5[^>]*>(.*?)<\/h5>/gi,`##### $1
`).replace(/<h6[^>]*>(.*?)<\/h6>/gi,`###### $1
`).replace(/<a[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/gi,"[$2]($1)").replace(/<code[^>]*>(.*?)<\/code>/gi,"`$1`").replace(/<pre[^>]*>(.*?)<\/pre>/gi,"```\n$1\n```\n\n").replace(/<[^>]+>/g,"").replace(/\n{3,}/g,`
`).trim(),ee+=le,console.log("✅ HTML转Markdown转换完成:",ee.substring(0,200)+"..."),ee}catch(V){return console.error("❌ HTML转Markdown转换失败:",V),B}},je=(B,V)=>{console.log("📝 打开富文本编辑器:",{nodeObj:B,nodeElement:V}),q.value=B,P.value=V;let ee=B.title;!ee&&B.topic&&(ee=B.topic.replace(/!\[.*?\]\(.*?\)/g,"").trim()),N.value=ee||"编辑节点内容",console.log("📝 节点完整数据:",{title:B.title,topic:B.topic,image:B.image,hasImage:!!B.image,htmlContent:B.htmlContent,allKeys:Object.keys(B)});let ne="";if(typeof B.markdown=="string"&&B.markdown.trim())ne=B.markdown;else if(typeof B.topic=="string"&&/<\w|<table/i.test(B.topic))try{ne=ut(B.topic)}catch{ne=B.topic}else if(typeof B.dangerouslySetInnerHTML=="string"&&B.dangerouslySetInnerHTML.trim())try{ne=ut(B.dangerouslySetInnerHTML)}catch{ne=B.dangerouslySetInnerHTML}else typeof B.data=="string"?ne=B.data:B.data&&typeof B.data=="object"?(ne=B.data.markdown||B.data.note||B.data.text||B.data.content||"",!ne&&typeof B.topic=="string"&&(ne=B.topic)):typeof B.topic=="string"?ne=B.topic:ne="";if(z.value=ne||"",console.log("📝 设置编辑器 Markdown 源:",String(z.value).substring(0,200)+"..."),B.image&&!z.value.includes("![")){console.log("📝 发现MindElixir原生图片添加到编辑器中");const Te=typeof B.image=="string"?B.image:B.image.url,le=`![${B.image.alt||B.topic||"图片"}](${Te})`;z.value=z.value+`
`+le}try{typeof window<"u"&&typeof window.parseExistingImages=="function"&&window.parseExistingImages()}catch{}y.value=!0,console.log("📝 富文本编辑器已打开")},j=()=>{y.value=!1,N.value="",z.value="",q.value=null,P.value=null,Y.value=[],fe()},yt=B=>{z.value=B,console.log("📝 编辑器内容变化:",B.substring(0,100)+"...")},It=()=>{console.log("✅ Vditor编辑器准备就绪")};let bt=0;const Mt=()=>{try{return ue.value&&(ue.value.querySelector(".vditor")||ue.value.querySelector(".vditor-wysiwyg"))?(bt=0,!0):!1}catch{return!1}},se=async()=>{if(!ue.value){console.error("❌ vditorContainer未找到");return}try{ue.value.style.width="100%",ue.value.style.minHeight="360px",ue.value.style.display="block"}catch{}try{ue.value.innerHTML="";const B=document.createElement("div");B.className="vditor-root",B.style.width="100%",B.style.minHeight="360px",ue.value.appendChild(B),console.log("🧩 准备初始化Vditor容器尺寸:",ue.value.getBoundingClientRect());const V=await sp(()=>Promise.resolve().then(()=>e7),void 0),ee=V&&(V.default||V);console.log("🧩 Vditor 构造器类型:",typeof ee),Le=new ee(B,{height:400,placeholder:"请输入节点内容...",mode:"wysiwyg",theme:"classic",value:String(z.value||""),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:(ne,Te)=>{console.log("图片上传成功:",Te)},error:ne=>{console.error("图片上传失败:",ne)}},after:()=>{setTimeout(()=>{z.value&&z.value.trim()?Le.setValue(z.value):Le.setValue(""),Le.focus(),Le.on&&Le.on("input",ne=>{const Te=Le.getValue();z.value=Te}),setTimeout(()=>{const ne=Mt();if(!ne&&bt<bC){try{Le&&Le.destroy&&Le.destroy()}catch{}Le=null,bt+=1,console.warn("⚠️ Vditor未挂载成功重试第",bt,"次"),setTimeout(()=>se(),120)}else ne?(bt=0,console.log("✅ Vditor挂载成功")):console.error("❌ Vditor多次重试仍未挂载成功")},200)},100)}})}catch(B){console.error("❌ Vditor编辑器初始化失败:",B),console.error("错误详情:",B.stack)}},fe=()=>{Le&&(Le.destroy(),Le=null,console.log("🗑️ Vditor编辑器已销毁"))},J=async()=>{var V,ee,ne,Te;if(console.log("🚀 saveRichTextChanges函数被调用"),console.log("🚀 开始保存 Vditor 富文本内容..."),console.log("📝 当前editorTitle:",N.value),console.log("📝 当前editorContent:",z.value.substring(0,100)+"..."),console.log("📝 当前节点:",q.value),console.log("📝 Vditor实例状态:",!!Le),!q.value){alert("节点信息丢失");return}if(!Le){console.error("❌ Vditor实例不存在无法获取内容"),alert("编辑器未初始化,请重试");return}const B=Le?Le.getValue():String(z.value||"");if(updateNodeModelAndRefresh(q.value,B,a.value),q.value.dangerouslySetInnerHTML=q.value.topic,q.value.title=N.value,P.value&&(P.value.innerHTML=q.value.topic||"",titleChanged)){const _e=P.value.querySelector(".tpc");_e&&(_e.textContent=N.value,console.log("📝 DOM文本元素已更新:",N.value))}try{const _e=q.value.id.replace(/^me/,""),le=j1(B||""),Ne={newTitle:q.value.title||nt(B||le),newDes:((V=q.value.data)==null?void 0:V.des)||"",newParentId:q.value.parentId||((ee=q.value.parent)==null?void 0:ee.id),newDangerouslySetInnerHTML:le,newMarkdown:B||le};console.log("🔍 直接发送到后端的更新数据:",Ne),console.log("🔍 清理后的节点ID:",_e);const Qe=await Zn.updateNode(_e,Ne);if(Qe.data&&Qe.data.success){if(console.log("✅ 节点数据已保存到后端"),a.value&&q.value&&P.value){const Ot=P.value.querySelector(".tpc");Ot&&(Ot.innerHTML=htmlContent,console.log("📝 节点显示内容已更新 - 直接设置HTML"))}alert("✅ 节点内容保存成功!")}else console.warn("⚠️ 保存节点到后端失败:",Qe),alert("❌ 保存失败,请重试")}catch(_e){console.error("❌ 保存节点到后端失败:",_e),alert("❌ 保存失败,请重试");return}(ne=a.value)==null||ne.bus.fire("operation",{name:"finishEdit",obj:q.value,origin:q.value.topic||""}),titleChanged&&((Te=a.value)==null||Te.bus.fire("operation",{name:"updateNode",obj:q.value,origin:N.value})),console.log("🔄 开始刷新前端节点渲染..."),a.value?Ma(()=>{a.value.refresh(),console.log("🔄 思维导图已刷新"),setTimeout(()=>{j(),console.log("✅ 编辑器弹窗已关闭")},100)}):(j(),console.log("✅ 编辑器弹窗已关闭无mindElixir实例")),console.log("✅ 富文本内容已保存")},Q=()=>{console.log("✅ 模态框图片加载成功")},Ie=B=>{console.error("❌ 模态框图片加载失败:",B),console.error("❌ 失败的图片URL:",C.value),T.value=!1,M.value=`图片显示失败: ${C.value}`},de=()=>{console.log("🔄 重试加载图片"),T.value=!0,M.value="",Z()};let W=null;const Z=()=>{W&&clearTimeout(W),W=setTimeout(()=>{T.value&&(console.warn("⚠️ 图片加载超时"),T.value=!1,M.value="图片加载超时请检查网络连接或图片URL是否正确")},1e4)},ge=()=>{W&&(clearTimeout(W),W=null)},ce=()=>{if(!a.value||!r.value)return null;try{const B=r.value.querySelector(".map-canvas");if(B){const V=B.style.transform,ee=a.value.scaleVal||1;return console.log("📍 保存位置:",{transform:V,scaleVal:ee}),{transform:V,scaleVal:ee}}}catch(B){console.warn("保存位置失败:",B)}return null},ve=B=>{if(!(!B||!r.value||!a.value))try{const V=r.value.querySelector(".map-canvas");V&&B.transform&&(V.style.setProperty("transform",B.transform,"important"),B.scaleVal&&a.value.scaleVal!==B.scaleVal&&(a.value.scaleVal=B.scaleVal),V.style.setProperty("transform-origin","center center","important"),console.log("📍 恢复位置:",{transform:B.transform,scaleVal:B.scaleVal}))}catch(V){console.warn("恢复位置失败:",V)}},Ee=async(B,V=!1,ee=!0)=>{try{const ne=V?ce():null;ne?console.log("📍 保存当前位置用于保持原位:",ne):!V&&!ee&&console.log("📍 添加节点模式:不保存位置,等待居中到新节点"),console.log("🔍 loadMindmapData 被调用,数据:",B),console.log("🔍 数据字段:",Object.keys(B||{})),B&&B.id?(p.value=B.id,console.log("🔍 设置当前思维导图ID (data.id):",B.id)):B&&B.mindmapId?(p.value=B.mindmapId,console.log("🔍 设置当前思维导图ID (data.mindmapId):",B.mindmapId)):B&&B.nodeData&&B.nodeData.mindmapId?(p.value=B.nodeData.mindmapId,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmapId):",B.nodeData.mindmapId)):B&&B.nodeData&&B.nodeData.mindmap_id?(p.value=B.nodeData.mindmap_id,console.log("🔍 设置当前思维导图ID (data.nodeData.mindmap_id):",B.nodeData.mindmap_id)):(console.warn("⚠️ 数据中没有找到 id 或 mindmapId 字段"),console.log("🔍 可用的字段:",Object.keys(B||{})),B&&B.nodeData&&console.log("🔍 nodeData字段:",Object.keys(B.nodeData||{}))),console.log("🔍 设置后的 currentMindmapId.value:",p.value),Xe(),await Ma(),r.value||(console.warn("⚠️ 思维导图容器未准备好等待DOM更新..."),await new Promise(Te=>setTimeout(Te,100)),r.value||console.warn("⚠️ 思维导图容器仍未准备好,尝试继续执行..."));try{if(r.value){if(a.value&&a.value.data&&a.value.data.mindmapId===p.value){console.log("🔄 使用现有Mind Elixir实例直接更新数据"),a.value.data=B.nodeData||B,a.value.render(),tr(),ne&&setTimeout(()=>{ve(ne),console.log("📍 已恢复位置和缩放状态")},100);return}console.log("🔍 创建新的Mind Elixir实例设置markdown函数"),a.value=new fr({el:r.value,direction:fr.RIGHT,editable:!0,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(le,Ne)=>{if(le.includes("|")||le.includes("**")||le.includes("`")||le.includes("#")||le.includes("!["))try{console.log("🎯 检测到Markdown内容使用同步渲染:",le.substring(0,100)+"...");const Qe=El(le);return console.log("🎯 同步渲染结果:",Qe.substring(0,200)+"..."),Qe}catch(Qe){return console.error("🎯 渲染失败,返回原文:",Qe),le}return le},imageProxy:le=>le.startsWith("http://")||le.startsWith("https://")?le:le.startsWith("/")?window.location.origin+le:window.location.origin+"/"+le}),console.log("✅ Mind Elixir实例创建完成markdown函数已设置"),console.log("🔍 初始化Mind Elixir数据:",B);const Te=a.value.init(B);console.log("✅ Mind Elixir实例创建成功初始化结果:",Te),ne?(ve(ne),console.log("📍 初始化后立即恢复位置")):!V&&!ee&&console.log("📍 跳过根节点居中,等待居中新节点"),(async()=>{try{await Ma(),!ne&&(V||ee)&&a.value&&a.value.toCenter&&a.value.toCenter()}catch(le){console.warn("⚠️ 渲染优化过程中出现错误:",le)}})(),a.value.bus.addListener("showImagePreview",(le,Ne)=>{console.log("🖼️ 收到图片预览事件:",{imageUrl:le,altText:Ne}),$e(le,Ne)}),a.value.bus.addListener("showRichTextEditor",(le,Ne)=>{console.log("📝 收到富文本编辑事件:",{nodeObj:le,nodeElement:Ne}),je(le,Ne)}),setTimeout(()=>{mr()},500)}else{console.warn("⚠️ 容器未准备好延迟创建Mind Elixir实例..."),setTimeout(()=>{if(r.value){a.value=new fr({el:r.value,direction:fr.RIGHT,editable:!0,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(le,Ne)=>{if(le.includes("|")||le.includes("**")||le.includes("`")||le.includes("#")||le.includes("!["))try{return console.log("🎯 延迟创建检测到Markdown内容使用同步渲染:",le.substring(0,100)+"..."),El(le)}catch(Qe){return console.error("🎯 延迟创建:渲染失败,返回原文:",Qe),le}return le}});const Te=a.value.init(B);console.log("✅ Mind Elixir实例延迟创建成功"),ne?(ve(ne),console.log("📍 延迟创建后立即恢复位置"),setTimeout(()=>{ve(ne),console.log("📍 延迟创建后二次确认位置恢复")},100)):!V&&!ee&&console.log("📍 延迟创建后跳过根节点居中,等待居中新节点"),(async()=>{try{await Ma(),await document.fonts.ready,await new Promise(le=>requestAnimationFrame(le)),a.value&&a.value.refresh&&(console.log("🔄 延迟创建实例执行完整DOM稳定后的延迟刷新"),a.value.refresh(),!ne&&(V||ee)&&a.value.toCenter())}catch(le){console.warn("⚠️ 延迟创建实例的延迟刷新过程中出现错误:",le),setTimeout(()=>{a.value&&a.value.refresh&&a.value.refresh()},250)}})(),a.value.bus.addListener("showImagePreview",(le,Ne)=>{console.log("🖼️ 收到图片预览事件(延迟创建):",{imageUrl:le,altText:Ne}),$e(le,Ne)}),a.value.bus.addListener("showImageEditor",(le,Ne,Qe)=>{console.log("🖼️ 收到图片编辑事件(延迟创建):",{imageUrl:le,altText:Ne}),openImageEditor(le,Ne,Qe)}),setTimeout(()=>{setTimeout(()=>{mr()},500),ne?ve(ne):ee&&We(),tr(),ze()},300)}},200);return}}catch{setTimeout(()=>{try{if(r.value){a.value=new fr({el:r.value,direction:fr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!1,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,enableNodeBorder:!0,markdown:(le,Ne)=>{if(le.includes("|")||le.includes("**")||le.includes("`")||le.includes("#")||le.includes("!["))try{return console.log("🎯 重试创建检测到Markdown内容使用同步渲染:",le.substring(0,100)+"..."),El(le)}catch(Qe){return console.error("🎯 重试创建:渲染失败,返回原文:",Qe),le}return le}});const _e=a.value.init(B);ne?(ve(ne),console.log("📍 重试创建后立即恢复位置"),setTimeout(()=>{ve(ne),console.log("📍 重试创建后二次确认位置恢复")},100)):!V&&!ee&&console.log("📍 重试创建后跳过根节点居中,等待居中新节点"),setTimeout(()=>{ne?ve(ne):ee&&We(),tr(),ze()},300)}}catch(_e){console.error("❌ Mind Elixir实例重试创建失败:",_e)}},500);return}setTimeout(()=>{V&&ne?ve(ne):ee&&We(),Xe(),tr(),setTimeout(()=>{ze()},500)},100)}catch{}},ze=()=>{a.value&&r.value&&setTimeout(()=>{r.value.querySelectorAll("me-tpc, .topic, [data-id]").forEach((V,ee)=>{var le;const ne=V.getAttribute("data-id")||V.id||V.getAttribute("nodeid")||((le=V.querySelector("[data-id]"))==null?void 0:le.getAttribute("data-id"));if(!ne)return;const Te=(Ne,Qe)=>{for(const rt of Ne){if(rt.id===Qe)return rt;if(rt.children){const Ot=Te(rt.children,Qe);if(Ot)return Ot}}return null},_e=Te(a.value.data.nodeData,ne);if(_e&&_e.data&&_e.data.des){let Ne=V.querySelector(".node-description");Ne||(Ne=document.createElement("div"),Ne.className="node-description",Ne.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;
`,V.appendChild(Ne));const Qe=_e.data.des;Qe.length>150?(Ne.textContent=Qe.substring(0,150)+"...",Ne.title=Qe):Ne.textContent=Qe}})},1e3)},We=()=>{try{if(a.value&&a.value.toCenter){a.value.toCenter(),console.log("✅ 使用 MindElixir toCenter 方法实现根节点居中");return}const B=r.value;if(!B)return;const V=B.querySelector(".map-canvas");if(!V)return;const ee=V.querySelectorAll("me-tpc");if(ee.length===0)return;let ne=1/0,Te=-1/0,_e=1/0,le=-1/0;ee.forEach(Vi=>{const pi=Vi.getBoundingClientRect(),Wi=B.getBoundingClientRect(),eo=pi.left-Wi.left,to=pi.top-Wi.top;ne=Math.min(ne,eo),Te=Math.max(Te,eo+pi.width),_e=Math.min(_e,to),le=Math.max(le,to+pi.height)});const Ne=(ne+Te)/2,Qe=(_e+le)/2,rt=B.clientWidth/2,Ot=B.clientHeight/2,Kt=rt-Ne,cn=Ot-Qe;V.style.transform=`translate(${Kt}px, ${cn}px)`,V.style.opacity="1",V.style.transition="opacity 0.3s ease";const wn=100,On=Math.max(Kt,wn),Zr=Math.max(cn,wn);V.style.transform=`translate(${On}px, ${Zr}px)`,V.style.opacity="1",V.style.visibility="visible"}catch{}},Ze=async B=>{if(!(!a.value||!B))try{console.log("🎯 开始处理新节点:",B);let V=null,ee=0;const ne=5;for(;!V&&ee<ne;)V=a.value.findEle(B),V||(ee++,await new Promise(Te=>setTimeout(Te,50)));V?(console.log("✅ 找到节点元素:",V),a.value.scrollIntoView&&(a.value.scrollIntoView(V),console.log("✅ 节点已平滑居中显示")),setTimeout(()=>{try{const Te=(B||"").replace(/^me/,""),le=(a.value.getNodeById?a.value.getNodeById(Te):null)||{id:Te,topic:(V==null?void 0:V.textContent)||""};typeof ui=="function"?ui(le,V):typeof je=="function"&&je(le,V),console.log("✅ 已打开自定义富文本编辑器")}catch(Te){console.warn("打开自定义编辑器失败,忽略。",Te)}},350)):console.error("❌ 多次尝试后仍未找到节点元素:",B)}catch(V){console.error("❌ 居中显示节点失败:",V)}},Be=()=>{if(!l.value)return;if(a.value&&a.value.getNodeById)try{const V=a.value.getNodeById(l.value.id);if(V){const ee=V.getBoundingClientRect(),ne=r.value.getBoundingClientRect(),Te=ee.left-ne.left+ee.width/2,_e=ee.bottom-ne.top+10;h.value={left:`${Te}px`,top:`${_e}px`};return}}catch{}let B=document.querySelector(`[data-id="${l.value.id}"]`);if(B||(B=document.querySelector(`.topic[data-id="${l.value.id}"]`)),B||(B=document.querySelector(`[data-node-id="${l.value.id}"]`)),B||(B=document.querySelector(`[data-nodeid="me${l.value.id}"]`)),!B){const V=document.querySelectorAll("me-tpc");for(const ee of V)if(ee.getAttribute("data-nodeid")===`me${l.value.id}`){B=ee;break}}if(!B){const V=document.querySelectorAll(".topic");for(const ee of V)if(ee.textContent.trim()===l.value.topic){B=ee;break}}if(B){const V=B.getBoundingClientRect(),ee=r.value.getBoundingClientRect(),ne=V.left-ee.left+V.width/2,Te=V.bottom-ee.top+10;h.value={left:`${ne}px`,top:`${Te}px`}}else h.value={left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},at=async()=>{l.value&&(await Ci(l.value),l.value=null)},Ue=async()=>{l.value&&(await zn(l.value),l.value=null)},He=async()=>{l.value&&(await an(l.value),l.value=null)},gt=async()=>{if(!l.value)return;console.log("Ask AI for node:",l.value);const B=parseFloat(h.value.left)||0,V=parseFloat(h.value.top)||0;c.value={left:`${B}px`,top:`${V+60}px`,transform:"translateX(-50%)"},m.value=!0,x.value=l.value},kt=()=>{m.value=!1,x.value=null,w.value="",S.value=!1,l.value=null},jt=B=>{if(!B)return"";const V=[];return B.parent&&B.parent.topic&&V.push(`父节点: ${B.parent.topic}`),B.parent&&B.parent.parent&&B.parent.parent.topic&&V.push(`祖父节点: ${B.parent.parent.topic}`),V.join(" | ")},$t=B=>{B.ctrlKey||B.metaKey||(B.preventDefault(),Mn())},Mn=async()=>{if(!(!w.value.trim()||!x.value||S.value)){S.value=!0;try{const B="你是一个专业的思维导图分析助手。请根据用户的问题和提供的节点信息,给出专业、有用的回答。",V=`节点信息:
当前节点:${x.value.topic}
上下文:${jt(x.value)}
用户问题:${w.value}
请给出详细的回答,回答应该:
1. 直接回答用户的问题
2. 提供具体的建议或改进方案
3. 保持专业和有用的语调
4. 回答长度适中,便于在思维导图中展示`;console.log("发送AI请求:",{systemPrompt:B,userPrompt:V});const ee=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:B,user_prompt:V,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!ee.ok)throw new Error(`HTTP error! status: ${ee.status}`);let ne="";const Te=ee.body.getReader(),_e=new TextDecoder;let le="";for(;;){const{done:Ne,value:Qe}=await Te.read();if(Ne)break;le+=_e.decode(Qe,{stream:!0});const rt=le.split(`
`);le=rt.pop()||"";for(const Ot of rt)if(Ot.startsWith("data: "))try{const Kt=JSON.parse(Ot.slice(6));if(Kt.type==="chunk")ne+=Kt.content;else if(Kt.type==="error")throw new Error(Kt.content)}catch(Kt){console.warn("解析流式数据失败:",Kt)}}await Qn(x.value,w.value,ne),kt()}catch(B){console.error("AI请求失败:",B),alert("AI请求失败请稍后重试")}finally{S.value=!1}}},gn=B=>B.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(V,ee)=>{if(ee.includes(":")){const ne=ee.split(":");if(ne.length>1)return`【${ne[0]}】: ${ne.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,`
`),Rn=(B,V,ee)=>{const ne=B.split(`
`);let Te=ee,_e=[];for(let le=0;le<ne.length;le++){const Qe=ne[le].trim(),rt=Qe.match(/^[-*+]\s*【(.+)】/);if(rt){const Ot=rt[1].trim(),Kt={id:`node_${Te++}`,topic:Ot,children:[],level:(V.level||0)+1,data:{}};let cn=[],wn=le+1;for(;wn<ne.length;){const On=ne[wn].trim();if(On.match(/^[-*+]\s*【(.+)】/))break;const Vi=On.match(/^[-*+]\s+(.+)$/);if(Vi){const pi=Vi[1].trim(),Wi=gn(pi);cn.push("• "+Wi)}wn++}if(cn.length>0){const On=gn(cn.join(`
`));Kt.topic=Kt.topic+`
`+On}V.children.push(Kt),le=wn-1}else Qe&&_e.push(Qe)}if(_e.length>0){const le=_e.join(`
`).trim();le&&le.split(`
`).filter(Qe=>Qe.trim()).forEach(Qe=>{const rt=gn(Qe.trim());if(rt){const Ot={id:`node_${Te++}`,topic:rt,children:[],level:(V.level||0)+1,data:{}};V.children.push(Ot)}})}return{nodeCounter:Te}},ln=B=>{const V=B.split(`
`);let ee=null;const ne=[];let Te=0,_e=[];if(V.forEach((le,Ne)=>{const Qe=le.trim(),rt=Qe.match(/^(#{1,6})\s+(.+)$/);if(rt){if(_e.length>0&&ne.length>0){const On=_e.join(`
`).trim();On&&(Te=Rn(On,ne[ne.length-1],Te).nodeCounter),_e=[]}const Ot=rt[1].length,Kt=rt[2].trim(),cn=gn(Kt),wn={id:`node_${Te++}`,topic:cn,children:[],level:Ot,data:{}};if(Ot===1&&!ee)ee=wn,ne.length=0,ne.push(ee);else{for(;ne.length>1&&ne[ne.length-1].level>=Ot;)ne.pop();ne.length>0&&ne[ne.length-1].children.push(wn),ne.push(wn)}}else Qe&&_e.push(Qe)}),_e.length>0&&ne.length>0){const le=_e.join(`
`).trim();le&&(Te=Rn(le,ne[ne.length-1],Te).nodeCounter)}return ee||(ee={id:"root",topic:"根节点",children:[],data:{}}),ee},Qn=async(B,V,ee)=>{var ne,Te,_e;try{const Ne=(Zr=>Zr.replace(/^#+\s*/gm,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/^\s*[-*+]\s*(?![|])/gm,"• ").replace(/\n{3,}/g,`
`).trim())(ee),Qe=`# ${V}
${Ne}`,rt=ln(Qe),Ot={title:V,des:`AI追问产生的节点 - ${new Date().toLocaleString()}`,parentId:B.id,isRoot:!1},Kt=[];if(rt.children&&rt.children.length>0&&rt.children.forEach(Zr=>{Kt.push({title:Zr.topic,des:"",parentId:null,isRoot:!1})}),console.log("当前思维导图ID:",p.value),!p.value)throw new Error("没有找到当前思维导图ID无法创建节点");const cn=await Zn.addNodes(p.value,[Ot]);if(!cn.data||!cn.data.success)throw new Error("AI父节点创建失败");const wn=(_e=(Te=(ne=cn.data.data)==null?void 0:ne.nodes)==null?void 0:Te[0])==null?void 0:_e.id;if(!wn)throw new Error("无法获取创建的父节点ID");Kt.forEach(Zr=>{Zr.parentId=wn});let On=null;if(Kt.length>0&&(On=await Zn.addNodes(p.value,Kt)),cn.data&&cn.data.success)await Xr();else throw new Error("AI父节点创建失败")}catch(le){console.error("创建AI节点失败:",le),alert("创建AI回答节点失败: "+le.message)}},Cn=async()=>{if(l.value){try{const B=l.value.topic||l.value.title||"无标题";if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(B),xn();else{const V=document.createElement("textarea");V.value=B,V.style.position="fixed",V.style.left="-999999px",V.style.top="-999999px",document.body.appendChild(V),V.focus(),V.select();const ee=document.execCommand("copy");document.body.removeChild(V),ee?xn():zt()}}catch{zt()}l.value=null}},xn=()=>{const B=document.createElement("div");B.textContent="文本已复制到剪贴板",B.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 V=document.createElement("style");V.textContent=`
@keyframes slideIn {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
`,document.head.appendChild(V),document.body.appendChild(B),setTimeout(()=>{B.parentNode&&B.parentNode.removeChild(B),V.parentNode&&V.parentNode.removeChild(V)},3e3)},zt=()=>{const B=document.createElement("div");B.textContent="复制失败,请手动复制",B.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(B),setTimeout(()=>{B.parentNode&&B.parentNode.removeChild(B)},3e3)},Pn=(B,V="success")=>{const ee=document.createElement("div");ee.textContent=B;const ne=V==="success"?"#4CAF50":V==="error"?"#f44336":"#ff9800";ee.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background: ${ne};
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(ee),setTimeout(()=>{ee.parentNode&&ee.parentNode.removeChild(ee)},2e3)},nn=()=>{const B=document.createElement("div");B.textContent="✅ 节点编辑已保存",B.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(B),setTimeout(()=>{B.parentNode&&B.parentNode.removeChild(B)},2e3)},Gr=()=>{const B=document.createElement("div");B.textContent="❌ 节点编辑保存失败",B.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(B),setTimeout(()=>{B.parentNode&&B.parentNode.removeChild(B)},3e3)},er=async B=>{try{console.log("🎯 处理节点拖拽操作:",B.name),console.log("📦 操作详情:",{name:B.name,objs:B.objs,toObj:B.toObj}),setTimeout(async()=>{var V;try{const ee=B.objs||[],ne=B.toObj;if(!ee.length||!ne){console.warn("⚠️ 拖拽操作缺少必要信息");return}console.log(`📦 准备保存 ${ee.length} 个节点的父子关系`);let Te=null;B.name==="moveNodeIn"?(Te=ne.id,console.log(`📌 拖入操作:新父节点为 ${Te}`)):(B.name==="moveNodeBefore"||B.name==="moveNodeAfter")&&(Te=((V=ne.parent)==null?void 0:V.id)||null,console.log(`📌 拖到兄弟位置:新父节点为 ${Te||"根节点"}`));const _e=ee.map(async rt=>{try{console.log(`🔄 更新节点 ${rt.id} 的父节点为 ${Te||"根节点"}`);const Ot=await Zn.updateNode(rt.id,{newParentId:Te});return Ot.data&&Ot.data.success?(console.log(`✅ 节点 ${rt.id} 父子关系更新成功`),{success:!0,nodeId:rt.id}):(console.warn(`⚠️ 节点 ${rt.id} 父子关系更新失败:`,Ot),{success:!1,nodeId:rt.id})}catch(Ot){return console.error(`❌ 节点 ${rt.id} 父子关系更新失败:`,Ot),{success:!1,nodeId:rt.id,error:Ot}}}),le=await Promise.all(_e),Ne=le.filter(rt=>rt.success).length,Qe=le.filter(rt=>!rt.success).length;console.log(`📊 拖拽保存结果: ${Ne} 成功, ${Qe} 失败`)}catch(ee){console.error("❌ 保存拖拽后的结构失败:",ee),Pn("❌ 节点拖拽保存失败","error")}},500)}catch(V){console.error("❌ 处理节点拖拽操作失败:",V)}},or=new Set,Jt=async B=>{var ee;const V=`${B.name}-${(ee=B.obj)==null?void 0:ee.id}`;if(or.has(V)){console.log("⚠️ 跳过重复的编辑操作:",V);return}or.add(V);try{console.log("🔍 处理编辑完成:",B);const ne=B.obj;ne?(console.log("🔍 保存编辑的节点:",{nodeId:ne.id,nodeTopic:ne.topic,hasHtml:/<\\w+[^>]*>/.test(ne.topic||"")}),await Er(ne)):console.error("无法解析编辑操作:",B)}catch(ne){console.error("处理编辑完成失败:",ne)}finally{or.delete(V)}},Er=async B=>{var V,ee,ne;try{const Te=B.id.replace(/^me/,"");if(console.log("🔍 更新节点编辑:",{originalNodeId:B.id,cleanNodeId:Te,nodeTopic:B.topic,currentMindmapId:p.value}),!p.value){console.error("无法获取思维导图ID");return}const _e={newTitle:B.topic,newDes:((V=B.data)==null?void 0:V.des)||"",newParentId:B.parentId||((ee=B.parent)==null?void 0:ee.id),newDangerouslySetInnerHTML:B.topic||""};console.log("🔍 发送到后端的更新数据:",_e);const le=await Zn.updateNode(Te,_e);if(le.data&&le.data.success){if(a.value&&B){let Ne=B.id;if(Ne.startsWith("me")&&(Ne=Ne.substring(2)),!Ne.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格式:",Ne,"原始ID:",B.id);return}console.log("🔍 查找DOM元素纯净ID:",Ne,"原始ID:",B.id),console.log("🔍 调试信息 - node对象:",{id:B.id,topic:((ne=B.topic)==null?void 0:ne.substring(0,50))+"...",hasHtml:/<\w+[^>]*>/.test(B.topic||"")});try{const Qe=a.value.findEle(Ne);console.log("🔍 找到的DOM元素:",Qe),Qe?(console.log("✅ DOM元素存在直接更新内容..."),B.topic?(console.log("🔍 更新文本内容:",B.topic.substring(0,100)+"..."),Qe.innerHTML=B.topic,console.log("📝 节点显示内容已更新 (updateNodeEdit) - 设置HTML")):console.warn("⚠️ node对象没有topic")):console.warn("⚠️ findEle返回了null或undefined")}catch(Qe){console.warn("⚠️ 无法找到DOM元素:",Qe.message,"纯净ID:",Ne)}}nn()}else console.error("更新节点编辑失败:",le.data),Gr()}catch(Te){console.error("更新节点编辑失败:",Te),Gr()}},Ci=async B=>{var V;try{await Qt();const ee=p.value||B.mindmap_id||B.mindmapId;if(!ee){console.error("无法获取思维导图ID");return}const ne=await Zn.addNodes(ee,[{title:"新子节点",des:"子节点描述",parentId:B.id}]);if(ne.data&&ne.data.success){const Te=((V=ne.data.data)==null?void 0:V.nodes)||[];if(Te.length>0){const _e=Te[0];try{await new Promise(Ne=>setTimeout(Ne,800));const le=await Zn.getMindmap(ee);if(le.data&&le.data.nodeData){await Ee(le.data,!1,!1);try{console.log("🎯 开始居中显示新子节点:",_e.id),await Ze(_e.id)}catch(Ne){console.error("居中显示新节点失败:",Ne)}}else throw new Error("无法获取思维导图数据")}catch(le){console.error("刷新思维导图失败:",le)}}}}catch(ee){console.error("添加子节点失败:",ee)}},zn=async B=>{var V;try{await Qt(),console.log("添加兄弟节点到API:",B.id),console.log("节点信息:",{id:B.id,parentId:B.parentId,parent:B.parent,mindmap_id:B.mindmap_id,mindmapId:B.mindmapId});const ee=p.value||B.mindmap_id||B.mindmapId;if(!ee){console.error("无法获取思维导图ID");return}let ne=B.parentId;!ne&&B.parent&&(ne=B.parent.id);const Te=await Zn.addNodes(ee,[{title:"新兄弟节点",des:"兄弟节点描述",parentId:ne}]);if(console.log("添加兄弟节点响应:",Te),Te.data&&Te.data.success){const _e=((V=Te.data.data)==null?void 0:V.nodes)||[];if(_e.length>0){const le=_e[0];console.log("新创建的兄弟节点:",le),console.log("🎯 使用MindElixir init方法重新初始化数据...");try{const Ne=await Zn.getMindmap(ee);if(Ne.data&&Ne.data.nodeData){await Ee(Ne.data,!1,!1),console.log("✅ 思维导图刷新成功");try{console.log("🎯 开始居中显示新兄弟节点:",le.id),await Ze(le.id)}catch(Qe){console.error("居中显示新节点失败:",Qe)}}else throw new Error("无法获取思维导图数据")}catch(Ne){console.error("重新初始化失败,使用完整重新加载:",Ne);const Qe=await Zn.getMindmap(ee);Qe.data&&Qe.data.nodeData&&await Ee(Qe.data,!0,!1)}}}}catch(ee){console.error("添加兄弟节点失败:",ee)}},an=async B=>{try{await Qt(),console.log("删除节点从API:",B.id);const V=await Zn.deleteNodes([B.id]);if(console.log("删除节点响应:",V),V.data&&V.data.success){const ee=p.value||B.mindmap_id||B.mindmapId;if(ee){const ne=await Zn.getMindmap(ee);ne.data&&ne.data.nodeData&&(await Ee(ne.data,!0,!1),console.log("✅ 删除节点后思维导图已刷新,保持当前位置"))}}}catch(V){console.error("删除节点失败:",V)}},Qt=async()=>{const B=r.value;if(B){const V=B.querySelector("input:focus");if(V&&l.value){const ee=V.value;ee!==l.value.topic&&ee.trim()!==""&&(console.log("保存当前编辑:",ee),l.value.topic=ee,await pr(l.value))}}},pr=async B=>{var V,ee,ne,Te,_e;try{console.log("保存Mind Elixir编辑节点ID:",B.id),console.log("编辑内容:",{newTitle:B.topic,newDes:((V=B.data)==null?void 0:V.des)||""});const le=String(B.id),Ne=await Zn.updateNode(le,{newTitle:B.topic,newDes:((ee=B.data)==null?void 0:ee.des)||""});console.log("更新节点API响应:",Ne),console.log("节点编辑已保存到后端"),console.log("✅ 节点编辑已保存,无需重新加载")}catch(le){console.error("保存Mind Elixir编辑失败:",le),console.error("错误详情:",(ne=le.response)==null?void 0:ne.data),alert("保存编辑失败: "+(((_e=(Te=le.response)==null?void 0:Te.data)==null?void 0:_e.detail)||le.message))}},Li=B=>{var V,ee;console.log("打开编辑模态框:",B);try{const ne=(B==null?void 0:B.id)||((V=B==null?void 0:B.nodeObj)==null?void 0:V.id);let Te=null;ne&&(Te=document.querySelector(`[data-nodeid="me${ne}"]`)||document.querySelector(`[data-id="${ne}"]`)||document.querySelector(`.topic[data-id="${ne}"]`)),typeof ui=="function"?ui((B==null?void 0:B.nodeObj)||B,Te):typeof je=="function"&&je((B==null?void 0:B.nodeObj)||B,Te)}catch(ne){console.warn("打开自定义编辑器失败,回退到内置编辑。",ne),(ee=a.value)!=null&&ee.editText&&a.value.editText(B)}},ma=async(B,V,ee)=>{var ne,Te;try{console.log("🚀 开始批量创建节点:",B.topic,"父节点ID:",ee);const _e=[];if(((Ne,Qe)=>{var Ot;const rt={title:Ne.topic||Ne.title||"无标题",des:((Ot=Ne.data)==null?void 0:Ot.des)||"",parentId:Qe};Ne.topic&&(rt.dangerouslySetInnerHTML=Ne.topic),_e.push({nodeData:rt,children:Ne.children||[]})})(B,ee),_e.length>0){const Ne=_e.map(rt=>rt.nodeData),Qe=await Zn.addNodes(V,Ne);if(console.log("✅ 批量创建节点响应:",Qe),Qe.data&&Qe.data.success){const rt=((ne=Qe.data.data)==null?void 0:ne.nodes)||[];if(console.log("✅ 成功创建节点数量:",rt.length),B.children&&B.children.length>0){console.log("🔄 开始创建子节点,数量:",B.children.length);const Ot=(Te=rt[0])==null?void 0:Te.id,Kt=B.children.map(cn=>ma(cn,V,Ot));await Promise.all(Kt)}}else console.error("❌ 批量创建节点失败,响应:",Qe)}}catch(_e){console.error("❌ 创建节点失败:",_e)}};let Fr=null,xt=null;const mr=()=>{if(!r.value)return;console.log("🎯 添加自定义双击编辑事件监听器"),r.value._customDoubleClickHandler&&r.value.removeEventListener("dblclick",r.value._customDoubleClickHandler,!0);const B=ee=>{console.log("🎯 检测到双击事件:",ee.target);let ne=ee.target&&ee.target.closest?ee.target.closest(".me-tpc"):null;if(ne||(ne=ee.target&&ee.target.closest?ee.target.closest(".topic"):null),console.log("🎯 找到的节点元素:",ne,"标签名:",ne==null?void 0:ne.tagName,"类名:",ne==null?void 0:ne.className),ne){console.log("🎯 确认是节点元素,交由内置与自定义编辑处理");const Te=ne.getAttribute("data-nodeid")||ne.getAttribute("data-id");if(console.log("🎯 节点ID:",Te),Te&&a.value){console.log("🎯 Mind Elixir实例存在尝试获取节点数据"),console.log("🎯 mindElixir.value.data:",a.value.data);let _e=null;try{const le=Te.startsWith("me")?Te.substring(2):Te;console.log("🎯 使用getNodeById获取节点数据纯ID:",le);const Ne=a.value.getNodeById(le);console.log("📌 真正节点数据:",Ne),Ne&&(_e=Ne,console.log("✅ 从Mind Elixir API获取到真实节点数据"))}catch(le){console.warn("⚠️ getNodeById失败:",le)}if(!_e&&a.value.data&&(_e=Ln(a.value.data,Te),console.log("🎯 从findNodeById获取到节点数据")),!_e&&l.value&&l.value.id===Te&&(_e=l.value,console.log("🎯 从selectedNode获取到节点数据")),!_e){const le=ne.innerHTML,Ne=ne.textContent||ne.innerText||"";console.log("🎯 从节点元素获取HTML内容:",le.substring(0,200)+"..."),console.log("🎯 从节点元素获取文本内容:",Ne.substring(0,100)+"...");const Qe=le.includes("<img")||le.includes("!["),rt=le.includes("<table")||le.includes("|");console.log("🎯 内容分析 - 包含图片:",Qe,"包含表格:",rt),_e={id:Te,topic:Ne,data:Ne,dangerouslySetInnerHTML:void 0,hasImage:Qe,hasTable:rt},console.log("🎯 创建包含HTML的完整节点对象:",_e)}console.log("🎯 最终找到的节点数据:",_e),_e?(console.log("🎯 双击节点触发自定义编辑:",_e),ui(_e,ne)):console.log("🎯 无法获取任何节点数据")}else console.log("🎯 无法获取节点数据mindElixir:",!!a.value,"nodeId:",Te)}else console.log("🎯 不是节点元素,忽略双击事件")};r.value.addEventListener("dblclick",B,!0),r.value._customDoubleClickHandler=B;const V=ee=>{try{const ne=ee.target;if(!ne||!ne.closest)return;const Te=ne.closest("me-tpc");if(!Te)return;const _e=Te.getAttribute("data-nodeid")||"",le=_e.startsWith("me")?_e.substring(2):_e;if(a.value&&typeof a.value.getNodeById=="function"){const Ne=a.value.getNodeById(le);Ne&&(console.log("🎯 document层兜底打开编辑器:",le),a.value.bus.fire("showRichTextEditor",Ne,Te))}}catch{}};document.addEventListener("dblclick",V,!0),r.value._docDblClickHandler=V},Ln=(B,V)=>{if(B.id===V)return B;if(B.children&&B.children.length>0)for(const ee of B.children){const ne=Ln(ee,V);if(ne)return ne}return null},ui=(B,V)=>{var ne,Te,_e,le;console.log("🎯 打开自定义编辑模态框:",B),console.log("🔍 完整节点对象结构:",B),console.log("🔍 节点data字段:",B.data),console.log("🔍 节点所有属性:",Object.keys(B)),B.dangerouslySetInnerHTML&&console.log("🔍 发现dangerouslySetInnerHTML:",B.dangerouslySetInnerHTML.substring(0,200)+"...");let ee="";console.log("🔍 节点对象完整结构:",B),console.log("🔍 节点data字段结构:",B.data),(ne=B.data)!=null&&ne.note?(ee=B.data.note,console.log("✅ 从node.data.note获取Markdown源码:",ee.substring(0,100)+"...")):(Te=B.data)!=null&&Te.markdown?(ee=B.data.markdown,console.log("✅ 从node.data.markdown获取Markdown源码:",ee.substring(0,100)+"...")):(_e=B.data)!=null&&_e.text?(ee=B.data.text,console.log("✅ 从node.data.text获取Markdown源码:",ee.substring(0,100)+"...")):(le=B.data)!=null&&le.content?(ee=B.data.content,console.log("✅ 从node.data.content获取Markdown源码:",ee.substring(0,100)+"...")):B.note?(ee=B.note,console.log("✅ 从node.note获取Markdown源码:",ee.substring(0,100)+"...")):B.topic?(ee=B.topic,console.log("✅ 从node.topic获取内容:",ee.substring(0,100)+"...")):(console.warn("⚠️ 没有找到任何可用的内容字段"),ee=""),N.value=B.topic||B.title||"",z.value=ee,q.value=B,P.value=V,console.log("🎯 最终设置的Markdown内容:",ee),console.log("🎯 编辑器标题:",N.value),y.value=!0,Ma(()=>{setTimeout(()=>{if(ue.value&&ue.value.offsetParent!==null)se();else{let Ne=0;const Qe=10,rt=()=>{Ne++,ue.value&&ue.value.offsetParent!==null?se():Ne<Qe?setTimeout(rt,100):(console.error("❌ 容器在",Qe,"次尝试后仍未准备好"),alert("编辑器初始化失败,请刷新页面重试"))};setTimeout(rt,100)}try{window.__forceInitVditor=()=>se()}catch{}setTimeout(se,0),setTimeout(se,80),setTimeout(se,160)},50)})},tr=()=>{if(!a.value)return;console.log("绑定事件监听器..."),Fr&&r.value.removeEventListener("wheel",Fr),xt&&r.value.removeEventListener("click",xt),Fr=ee=>{if(ee.ctrlKey||ee.metaKey){ee.preventDefault();const ne=ee.deltaY>0?.9:1.1,Te=Math.max(.3,Math.min(3,v.value*ne));if(a.value){const _e=r.value.querySelector(".map-container");_e&&(_e.style.transform=`scale(${Te})`,v.value=Te,localStorage.setItem("mindmap-zoom-level",Te.toString()))}}},r.value.addEventListener("wheel",Fr),a.value.bus.addListener("select",ee=>{l.value=ee,setTimeout(()=>{Be()},50)}),a.value.bus.addListener("selectNode",ee=>{l.value=ee,setTimeout(()=>{Be()},50)}),a.value.bus.addListener("scale",ee=>{Math.abs(ee-1)<.01&&Math.abs(v.value-1)>.01&&setTimeout(()=>{Kr()},50)}),window.zoomIntervalId&&clearInterval(window.zoomIntervalId);const B=setInterval(()=>{v.value!==1&&r.value&&Ui()},500);window.zoomIntervalId=B;let V=0;xt=ee=>{const ne=Date.now();if(ne-V<100)return;V=ne;const Te=ee.target,_e=Te.closest("me-tpc")||Te.closest(".topic")||(Te.classList.contains("topic")?Te:null)||(Te.tagName==="ME-TPC"?Te:null);if(_e){const le=_e.nodeObj;if(le){l.value=le;const Ne=r.value.getBoundingClientRect(),Qe=_e.getBoundingClientRect(),rt=Qe.left-Ne.left+Qe.width/2,Ot=Qe.bottom-Ne.top+8;h.value={left:`${rt}px`,top:`${Ot}px`}}}else l.value=null,m.value&&(m.value=!1,x.value=null,w.value="",S.value=!1)},r.value.addEventListener("click",xt),a.value.bus.addListener("edit",ee=>{console.log("edit事件触发:",ee),Li(ee)}),a.value.bus.addListener("editFinish",ee=>{console.log("editFinish事件触发:",ee),Jt(ee)}),a.value.bus.addListener("operation",ee=>{console.log("Mind Elixir操作事件:",ee),ee.name==="moveNodeIn"||ee.name==="moveNodeBefore"||ee.name==="moveNodeAfter"?(console.log("检测到节点拖拽操作:",ee.name,ee),er(ee)):(ee.name==="finishEdit"||ee.name==="finishEditTable")&&(console.log("🔍 检测到编辑完成操作:",ee.name,ee),Jt(ee))}),a.value.bus.addListener("removeNode",ee=>{console.log("删除节点:",ee),an(ee)})},Kr=()=>{if(a.value){const B=localStorage.getItem("mindmap-zoom-level");if(B){const V=parseFloat(B);if(V>=.3&&V<=3){const ee=r.value.querySelector(".map-container");ee&&(ee.style.transform=`scale(${V})`,v.value=V)}}}},Ui=()=>{if(a.value&&v.value!==1&&r.value){const B=r.value.querySelector(".map-container");B&&(B.style.transform=`scale(${v.value})`)}},sr=async()=>{var B;if(console.log("🚀🚀🚀 保存函数被调用 🚀🚀🚀"),console.log("🔍 mindElixir.value:",a.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实例状态:",!!a.value),console.log("🔍🔍🔍 全局状态检查结束 🔍🔍🔍"),a.value&&a.value.data?(console.log("🔍🔍🔍 MindElixir数据检查开始 🔍🔍🔍"),console.log("🔍 - 数据对象:",a.value.data),console.log("🔍 - 数据字段:",Object.keys(a.value.data)),console.log("🔍 - 是否有nodeData:",!!a.value.data.nodeData),console.log("🔍 - 是否有nodes:",!!a.value.data.nodes),console.log("🔍🔍🔍 MindElixir数据检查结束 🔍🔍🔍")):console.log("⚠️ MindElixir数据不存在或为空"),!a.value||!p.value){if(console.warn("⚠️ 没有可保存的思维导图数据"),console.warn("🔍 mindElixir.value 状态:",!!a.value),console.warn("🔍 currentMindmapId.value 状态:",!!p.value),a.value&&a.value.data&&(console.log("🔍 尝试从MindElixir数据中获取ID"),console.log("🔍 MindElixir数据:",a.value.data),a.value.data.mindmapId?(p.value=a.value.data.mindmapId,console.log("🔍 从MindElixir数据中获取到mindmapId:",a.value.data.mindmapId)):a.value.data.mindmap_id&&(p.value=a.value.data.mindmap_id,console.log("🔍 从MindElixir数据中获取到mindmap_id:",a.value.data.mindmap_id))),!p.value&&a.value){if(console.log("🔍 尝试重新初始化MindElixir数据..."),console.log("🔍 MindElixir实例属性:",Object.keys(a.value)),console.log("🔍 MindElixir实例方法:",Object.getOwnPropertyNames(Object.getPrototypeOf(a.value))),a.value.getData){const V=a.value.getData();console.log("🔍 通过getData()获取的数据:",V),V&&V.nodeData&&(console.log("🔍 nodeData详情:",V.nodeData),V.nodeData.mindmapId?(p.value=V.nodeData.mindmapId,console.log("🔍 从nodeData.mindmapId获取到ID:",V.nodeData.mindmapId)):V.nodeData.mindmap_id?(p.value=V.nodeData.mindmap_id,console.log("🔍 从nodeData.mindmap_id获取到ID:",V.nodeData.mindmap_id)):(console.log("🔍 nodeData中没有找到mindmapId字段"),console.log("🔍 nodeData字段:",Object.keys(V.nodeData)))),!p.value&&V&&(console.log("🔍 检查其他可能的ID字段..."),V.id?(p.value=V.id,console.log("🔍 从data.id获取到ID:",V.id)):V.mindmapId&&(p.value=V.mindmapId,console.log("🔍 从data.mindmapId获取到ID:",V.mindmapId)))}a.value.mindElixirData&&(console.log("🔍 mindElixirData:",a.value.mindElixirData),a.value.mindElixirData.id&&(p.value=a.value.mindElixirData.id,console.log("🔍 从mindElixirData获取到ID:",a.value.mindElixirData.id)))}if(!p.value){console.warn("⚠️ 仍然无法获取思维导图ID无法保存"),console.warn("🔍 建议:请先加载一个思维导图,然后再尝试保存");return}}try{console.log("💾 开始保存思维导图..."),console.log("🔍 当前思维导图ID:",p.value),console.log("🔍 MindElixir实例:",a.value);let V=null;if(a.value&&a.value.getData?(V=a.value.getData(),console.log("🔍 通过getData()获取的数据:",V)):(V=a.value.data,console.log("🔍 通过data属性获取的数据:",V)),!V){console.warn("⚠️ MindElixir数据为空");return}let ee=[];console.log("🔍 数据结构分析:"),console.log("🔍 - currentData.nodeData:",V.nodeData),console.log("🔍 - currentData.nodes:",V.nodes),console.log("🔍 - currentData.nodeData.children:",(B=V.nodeData)==null?void 0:B.children);const ne=le=>{le&&le.id&&(ee.push(le),console.log(`🔍 收集节点: ${le.id} - ${le.topic||le.content||"无标题"}`),le.children&&le.children.length>0&&le.children.forEach(Ne=>ne(Ne)))};if(V.nodeData)ne(V.nodeData),console.log("🔍 从根节点收集到节点数量:",ee.length);else if(V.nodes&&Array.isArray(V.nodes))V.nodes.forEach(le=>ne(le)),console.log("🔍 从nodes数组收集到节点数量:",ee.length);else if(Array.isArray(V))V.forEach(le=>ne(le)),console.log("🔍 从currentData数组收集到节点数量:",ee.length);else{console.warn("⚠️ 无法找到节点数据"),console.log("🔍 可用的数据字段:",Object.keys(V));return}if(ee.length===0){console.warn("⚠️ 没有收集到任何节点");return}console.log("🔍 找到节点数据:",ee),console.log("🔍 节点数量:",ee.length),console.log("🔍 节点数据类型:",Array.isArray(ee)?"数组":typeof ee);const Te=[];if(ee.forEach((le,Ne)=>{if(console.log(`🔍 处理节点 ${Ne}:`,le),le&&le.id){const Qe=le.topic||le.content||le.text||"",rt=le.x||le.offsetX||0,Ot=le.y||le.offsetY||0;console.log(`🔍 节点 ${le.id} 内容:`,Qe,"位置:",{x:rt,y:Ot});const Kt={content:Qe,position:{x:rt,y:Ot}};(le.parentId||le.parent)&&(Kt.parentId=le.parentId||le.parent,console.log(`🔍 节点 ${le.id} 父节点:`,Kt.parentId)),console.log(`🔍 准备保存节点 ${le.id}:`,Kt),Te.push(Zn.updateNode(le.id,Kt).then(cn=>{console.log(`✅ 节点 ${le.id} 保存成功:`,cn)}).catch(cn=>{console.error(`❌ 节点 ${le.id} 保存失败:`,cn)}))}else console.warn(`⚠️ 节点 ${Ne} 缺少ID:`,le)}),console.log("🔍 准备保存的节点数量:",Te.length),Te.length===0){console.warn("⚠️ 没有找到需要保存的节点");return}const _e=await Promise.all(Te);console.log("🔍 保存结果:",_e),console.log("🎉 思维导图保存完成!")}catch(V){console.error("❌ 保存思维导图失败:",V)}},Xr=async()=>{if(!p.value){console.warn("⚠️ 没有当前思维导图ID无法刷新");return}try{console.log("🔄 开始刷新思维导图...");const B=await Zn.getMindmap(p.value);if(B.data&&B.data.nodeData){console.log("✅ 获取到最新数据,开始刷新显示...");const V=ce();await Ee(B.data,!0,!1),V&&setTimeout(()=>{ve(V),console.log("📍 已恢复位置和缩放状态")},100),console.log("🎉 思维导图刷新完成!")}else console.warn("⚠️ 无法获取思维导图数据")}catch(B){console.error("❌ 刷新思维导图失败:",B)}},di=async(B,V)=>{try{const ee=String(p.value||"");if(a.value&&ee&&ee.startsWith("temp-")){console.log("🔄 检测到实时渲染的思维导图将保存到数据库并更新ID");const _e=ce();console.log("📍 保存当前位置:",_e);const le=await Zn.createMindmap(V||"预览思维导图",B);if(console.log("🔄 创建思维导图响应:",le),le.data&&le.data.id){const Ne=le.data.id;console.log("🎉 创建思维导图成功新思维导图的ID是:",Ne);const Qe=p.value;if(p.value=Ne,a.value&&a.value.data){a.value.data.mindmapId=Ne,a.value.data.id=Ne;const rt=Ot=>{Ot&&(Ot.mindmapId=Ne,Ot.children&&Ot.children.forEach(Kt=>rt(Kt)))};a.value.data.nodeData&&rt(a.value.data.nodeData)}console.log("✅ 已更新思维导图ID保持视图状态"),console.log("🔄 从临时ID",Qe,"更新为正式ID",Ne),_e&&setTimeout(()=>{ve(_e),console.log("📍 已恢复位置和缩放状态")},100),console.log("✅ 保存完成,保持当前思维导图显示状态"),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:Ne,title:V,timestamp:Date.now(),fromRealtime:!0}}));return}}console.log("🔄 没有检测到实时渲染的思维导图,使用标准保存流程");const Te=await Zn.createMindmap(V||"预览思维导图",B);if(console.log("🔄 创建思维导图响应:",Te),Te.data&&Te.data.id){const _e=Te.data.id;if(console.log("🎉 创建思维导图成功新思维导图的ID是:",_e),console.log("📊 响应数据详情:",Te.data),Te.data.nodeData){console.log("✅ 思维导图创建时已包含节点数据,直接加载"),p.value=_e,Xe();try{const le=await Zn.getMindmap(_e);le.data&&le.data.nodeData&&await Ee(le.data,!0,!1)}catch{console.warn("获取完整导图数据失败,改用响应数据加载"),await Ee(Te.data,!0,!1)}window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:_e,title:V,timestamp:Date.now()}})),console.log("🎉 思维导图保存并加载完成!")}else{console.log("🔧 需要递归创建节点"),await ma(B,_e,null),console.log("📥 开始加载新创建的思维导图ID:",_e);const le=await Zn.getMindmap(_e);console.log("🔄 加载思维导图响应:",le),le.data&&le.data.nodeData?(console.log("✅ 成功获取思维导图数据,开始加载显示"),p.value=_e,Xe(),await Ee(le.data,!0,!1),window.dispatchEvent(new CustomEvent("mindmap-saved",{detail:{mindmapId:_e,title:V,timestamp:Date.now()}})),console.log("🎉 思维导图保存并加载完成!")):console.error("❌ 获取思维导图数据失败:",le)}}}catch(ee){console.error("❌ 保存预览数据到数据库失败:",ee)}},hi=async B=>{try{if(console.log("📚 开始从历史记录加载思维导图:",B.title),Xe(),B.mindmapId){console.log("🎯 使用思维导图ID加载:",B.mindmapId);const V=await Zn.getMindmap(B.mindmapId);if(V.data&&V.data.nodeData)await Ee(V.data);else throw new Error("无法获取思维导图数据")}else if(B.json)console.log("📊 使用历史记录中的JSON数据"),await Ee(B.json);else if(B.markdown){console.log("📝 使用历史记录中的Markdown数据尝试转换为JSON");try{const V=await convertMarkdownToJSON(B.markdown);if(V)await Ee(V);else throw new Error("Markdown转换失败")}catch(V){console.error("Markdown转换失败:",V)}}}catch(V){console.error("❌ 从历史记录加载思维导图失败:",V)}};Xc(async()=>{window.addEventListener("save-preview-to-database",B=>{console.log("🎯 收到保存到数据库事件:",B.detail),console.log("📋 事件详情 - 标题:",B.detail.title,"来源:",B.detail.source,"时间戳:",new Date(B.detail.timestamp).toLocaleString()),di(B.detail.data,B.detail.title)}),window.addEventListener("realtime-mindmap-update",B=>{console.log("🔄 收到实时思维导图更新事件:",B.detail),_i(B.detail.data,B.detail.title,B.detail)}),window.addEventListener("loadMindmapFromHistory",B=>{console.log("📚 收到从历史记录加载思维导图事件:",B.detail),console.log("🔍 事件数据详情:",B.detail),hi(B.detail)}),window.addEventListener("ai-sidebar-toggle",B=>{console.log("🤖 AI侧边栏折叠状态变化:",B.detail.isCollapsed),g.value=B.detail.isCollapsed}),qe()});const Bt=()=>{window.zoomIntervalId&&(clearInterval(window.zoomIntervalId),window.zoomIntervalId=null),r.value&&(Fr&&(r.value.removeEventListener("wheel",Fr),Fr=null),xt&&(r.value.removeEventListener("click",xt),xt=null)),console.log("✅ 已清理所有定时器和事件监听器")};Ql(()=>{Bt()}),e({showMindMapPage:it,cleanupIntervals:Bt});const _i=async(B,V,ee=null)=>{try{if(a.value){console.log("🔄 增量更新现有思维导图数据");try{const ne=ce();if((ee==null?void 0:ee.isIncremental)&&a.value&&a.value.data){if(console.log("🔄 执行增量更新,避免完整重新渲染"),a.value.data.nodeData&&B.topic){const _e=Object.values(a.value.data.nodeData)[0];if(_e&&_e.topic!==B.topic){_e.topic=B.topic;const le=r.value.querySelector(`[data-id="${_e.id}"]`);if(le){const Ne=le.querySelector(".topic-text");Ne&&(Ne.textContent=B.topic)}}}B.children&&B.children.length>0&&vt(B.children,a.value.data.nodeData),ne&&setTimeout(()=>{ve(ne),console.log("📍 增量更新后恢复位置")},50)}else if(console.log("🔄 尝试增量更新替代完整更新"),a.value&&a.value.data&&a.value.data.nodeData){if(console.log("✅ 使用增量更新,避免页面空白"),a.value.data.nodeData&&B.topic){const _e=Object.values(a.value.data.nodeData)[0];if(_e&&_e.topic!==B.topic){_e.topic=B.topic;const le=r.value.querySelector(`[data-id="${_e.id}"]`);if(le){const Ne=le.querySelector(".topic-text");Ne&&(Ne.textContent=B.topic)}}}B.children&&B.children.length>0&&vt(B.children,a.value.data.nodeData),ne&&setTimeout(()=>{ve(ne),console.log("📍 优化增量更新后恢复位置")},50)}else{console.log("⚠️ 无法增量更新,执行完整更新");const _e=String(p.value||""),le=_e&&_e.startsWith("temp-")?_e:`temp-${Date.now()}`,Ne={nodeData:B,mindmapId:le,id:le,title:V||"AI生成中..."};(!_e||!_e.startsWith("temp-"))&&(p.value=le,console.log("🆔 更新临时思维导图ID:",le));const Qe=a.value.init(Ne);ne&&setTimeout(()=>{ve(ne),console.log("📍 完整更新后恢复位置")},100)}}catch(ne){console.error("❌ 更新思维导图数据失败:",ne)}}else{Xe(),await Ma();let ne=0;for(;!r.value&&ne<20;)await new Promise(Ne=>setTimeout(Ne,50)),await Ma(),ne++;if(!r.value){console.error("❌ 思维导图容器仍未准备好,跳过此次更新");return}a.value=new fr({el:r.value,direction:fr.RIGHT,draggable:!0,contextMenu:!1,toolBar:!0,nodeMenu:!0,keypress:!1,autoCenter:!1,infinite:!0,maxScale:5,minScale:.1,theme:n,markdown:(Ne,Qe)=>Ne.includes("|")||Ne.includes("**")||Ne.includes("`")||Ne.includes("#")||Ne.includes("$")||Ne.includes("![")?El(Ne):Ne});const Te=`temp-${Date.now()}`,_e={nodeData:B,mindmapId:Te,id:Te,title:V||"AI生成中..."};p.value=Te,console.log("🆔 设置临时思维导图ID:",Te);const le=a.value.init(_e);console.log("✅ 实时思维导图实例创建成功"),tr(),We()}}catch(ne){console.error("❌ 实时更新思维导图失败:",ne)}},vt=(B,V)=>{try{B.forEach(ee=>{const ne=he(V,ee.id);if(ne){if(ee.topic&&ne.topic!==ee.topic){ne.topic=ee.topic;const Te=r.value.querySelector(`[data-id="${ee.id}"]`);if(Te){const _e=Te.querySelector(".topic-text");if(_e)if(ee.topic.includes("|")||ee.topic.includes("**")||ee.topic.includes("`")||ee.topic.includes("#")||ee.topic.includes("![")){const le=El(ee.topic);_e.innerHTML=le}else _e.textContent=ee.topic}}ee.children&&ee.children.length>0&&vt(ee.children,V)}else console.log("🆕 检测到新节点,需要添加到现有结构:",ee.id)})}catch(ee){console.error("❌ 增量更新节点失败:",ee)}},he=(B,V)=>{if(!B)return null;for(const ee in B){const ne=B[ee];if(ne.id===V)return ne;if(ne.children){const Te=he(ne.children,V);if(Te)return Te}}return null};return(B,V)=>{var ee;return on(),yn("div",{class:Xo(["mindmap-container",{"is-editing":y.value}])},[b.value?(on(),yn("div",tC,[Fe("div",{class:Xo(["welcome-content",{"ai-sidebar-collapsed":g.value}])},[...V[7]||(V[7]=[sm('<div class="welcome-header" data-v-957c471a><h1 data-v-957c471a>🧠 思维导图工具</h1><p class="welcome-subtitle" data-v-957c471a>可视化您的想法,构建知识体系</p></div><div class="welcome-features" data-v-957c471a><div class="feature-item" data-v-957c471a><div class="feature-icon" data-v-957c471a>🎯</div><div class="feature-text" data-v-957c471a><h3 data-v-957c471a>智能AI生成</h3><p data-v-957c471a>上传文档AI自动生成思维导图结构</p></div></div><div class="feature-item" data-v-957c471a><div class="feature-icon" data-v-957c471a>✏️</div><div class="feature-text" data-v-957c471a><h3 data-v-957c471a>灵活编辑</h3><p data-v-957c471a>拖拽节点,自由调整思维导图布局</p></div></div><div class="feature-item" data-v-957c471a><div class="feature-icon" data-v-957c471a>💾</div><div class="feature-text" data-v-957c471a><h3 data-v-957c471a>云端存储</h3><p data-v-957c471a>自动保存,多设备同步访问</p></div></div></div><div class="welcome-tips" data-v-957c471a><p data-v-957c471a>💡 提示使用左侧AI侧边栏可以快速生成思维导图内容</p></div>',3)])],2)])):ni("",!0),m.value?(on(),yn("div",{key:1,class:"ai-input-area",style:Ts(c.value)},[Fe("div",{class:"ai-input-header"},[V[8]||(V[8]=Fe("span",{class:"ai-input-title"},"🤖 询问AI",-1)),Fe("button",{onClick:kt,class:"ai-close-btn"},"×")]),Fe("div",nC,[ep(Fe("textarea",{"onUpdate:modelValue":V[0]||(V[0]=ne=>w.value=ne),placeholder:"请输入您的问题...",rows:"2",disabled:S.value,onKeydown:[ih(ss($t,["exact"]),["enter"]),ih(ss(Mn,["ctrl"]),["enter"]),ih(ss(Mn,["meta"]),["enter"])]},null,40,rC),[[Yv,w.value]]),Fe("div",iC,[Fe("button",{onClick:kt,class:"btn-cancel",disabled:S.value}," 取消 ",8,aC),Fe("button",{onClick:Mn,class:"btn-submit",disabled:!w.value.trim()||S.value},[S.value?(on(),yn("span",sC,"AI思考中...")):(on(),yn("span",lC,"询问AI"))],8,oC)])])],4)):ni("",!0),b.value?ni("",!0):(on(),yn("div",{key:2,ref_key:"mindmapEl",ref:r,class:"mindmap-el"},null,512)),b.value?ni("",!0):(on(),yn("div",cC,[Fe("button",{onClick:sr,class:"save-btn",title:"保存思维导图",style:{display:"none"}},[...V[9]||(V[9]=[Fe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Fe("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),Fe("polyline",{points:"17,21 17,13 7,13 7,21"}),Fe("polyline",{points:"7,3 7,8 15,8"})],-1),Fe("span",null,"保存",-1)])]),Fe("button",{onClick:Xr,class:"refresh-btn",title:"刷新思维导图",style:{display:"none"}},[...V[10]||(V[10]=[Fe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Fe("path",{d:"M1 4v6h6"}),Fe("path",{d:"M23 20v-6h-6"}),Fe("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),Fe("span",null,"刷新",-1)])])])),l.value?(on(),yn("div",{key:4,class:"context-menu",style:Ts(h.value)},[l.value.parentId||l.value.parent?(on(),yn("div",{key:0,class:"context-menu-item",onClick:Ue,title:"Add a sibling card"},[...V[11]||(V[11]=[Fe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Fe("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)])])):ni("",!0),Fe("div",{class:"context-menu-item",onClick:at,title:"Add a child card"},[...V[12]||(V[12]=[Fe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Fe("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)])]),Fe("div",{class:"context-menu-item",onClick:Cn,title:"Copy text"},[...V[13]||(V[13]=[Fe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 18 18",fill:"none"},[Fe("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)])]),Fe("div",{class:"context-menu-item ask-ai",onClick:gt,title:"Ask AI"},[...V[14]||(V[14]=[sm('<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-957c471a><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-957c471a></path><path d="M13 8H7" data-v-957c471a></path><path d="M17 12H7" data-v-957c471a></path><circle cx="17" cy="8" r="1" data-v-957c471a></circle></svg>',1)])]),Fe("div",{class:"context-menu-item delete",onClick:He,title:"Delete"},[...V[15]||(V[15]=[Fe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[Fe("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"}),Fe("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)):ni("",!0),k.value?(on(),yn("div",{key:5,class:"image-preview-modal",onClick:De},[Fe("div",{class:"image-preview-content",onClick:V[1]||(V[1]=ss(()=>{},["stop"]))},[Fe("div",uC,[Fe("span",dC,Qi(A.value),1),Fe("button",{onClick:De,class:"image-preview-close"},"×")]),Fe("div",hC,[T.value?(on(),yn("div",pC,[...V[16]||(V[16]=[Fe("div",{class:"loading-spinner"},null,-1),Fe("p",null,"加载图片中...",-1)])])):M.value?(on(),yn("div",fC,[V[17]||(V[17]=Fe("p",null,"❌ 图片加载失败",-1)),Fe("p",null,Qi(M.value),1),Fe("button",{onClick:de,class:"retry-button"},"重试")])):(on(),yn("img",{key:2,src:C.value,alt:A.value,class:"preview-image",onLoad:Q,onError:Ie},null,40,mC))])])])):ni("",!0),y.value?(on(),yn("div",{key:6,class:"rich-editor-modal",onClick:j},[Fe("div",{class:"rich-editor-content",onClick:V[2]||(V[2]=ss(()=>{},["stop"]))},[Fe("div",{class:"rich-editor-header"},[V[18]||(V[18]=Fe("span",{class:"rich-editor-title"},"编辑节点",-1)),Fe("button",{onClick:j,class:"rich-close-btn",title:"关闭 (ESC)"},"×")]),Fe("div",gC,[y.value?(on(),Uv(r7,{key:((ee=q.value)==null?void 0:ee.id)||"editor",value:z.value,height:420,placeholder:"请输入节点内容...",onChange:yt,onReady:It},null,8,["value"])):ni("",!0)]),Fe("div",{class:"rich-editor-footer"},[Fe("button",{onClick:j,class:"rich-cancel-btn"},"取消"),Fe("button",{onClick:J,class:"rich-save-btn"},"保存")])])])):ni("",!0),te.value?(on(),yn("div",{key:7,class:"delete-confirm-modal",onClick:V[6]||(V[6]=(...ne)=>B.cancelDeleteImage&&B.cancelDeleteImage(...ne))},[Fe("div",{class:"delete-confirm-content",onClick:V[5]||(V[5]=ss(()=>{},["stop"]))},[V[19]||(V[19]=Fe("div",{class:"delete-confirm-header"},[Fe("h3",null,"确认删除")],-1)),V[20]||(V[20]=Fe("div",{class:"delete-confirm-body"},[Fe("p",null,"确定要删除这张图片吗?"),gf("image.png "),Fe("p",{class:"delete-warning"},"删除后无法恢复")],-1)),Fe("div",vC,[Fe("button",{onClick:V[3]||(V[3]=(...ne)=>B.cancelDeleteImage&&B.cancelDeleteImage(...ne)),class:"cancel-btn"},"取消"),Fe("button",{onClick:V[4]||(V[4]=(...ne)=>B.confirmDeleteImage&&B.confirmDeleteImage(...ne)),class:"confirm-btn"},"确定删除")])])])):ni("",!0)],2)}}},wC=bf(yC,[["__scopeId","data-v-957c471a"]]);const xC={class:"ai-sidebar-wrapper"},kC=["title"],SC={key:0,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},EC={key:1,width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},TC={class:"sidebar-content"},AC={class:"section"},MC={class:"input-group"},CC={key:0,class:"file-info"},LC={class:"file-details"},_C={class:"file-info-left"},NC={class:"file-name"},DC={class:"file-size"},RC={class:"button-group file-action-buttons"},OC=["disabled"],IC={key:0},HC={key:1},PC={key:0,class:"section"},zC={class:"history-list"},BC=["onClick"],FC={class:"history-title"},qC={class:"history-time"},jC={class:"section"},$C={class:"input-group"},UC={class:"button-group"},VC=["disabled"],WC={key:0},GC={key:1},KC={class:"section"},XC={key:0,class:"processing-status"},ZC={class:"result-container"},YC={class:"json-result"},JC={class:"button-group"},QC=["disabled"],eL={__name:"AISidebar",emits:["start-realtime-generation"],setup(t,{emit:e}){const n=e,r=Lt(!1),a=Lt(""),l=Lt(""),h=Lt(""),c=Lt(!1),p=Lt(!1),v=Lt([]),b=Lt(!1);Lt(""),Lt("");const g=Lt(!1),m=Lt(""),x=Lt(null),w=Lt(null),S=()=>{r.value=!r.value,window.dispatchEvent(new CustomEvent("ai-sidebar-toggle",{detail:{isCollapsed:r.value}}))},k=fe=>{const J=fe.target.files[0];J&&(w.value=J,j("文件上传成功!","success"))},C=fe=>{fe.preventDefault(),b.value=!1;const J=fe.dataTransfer.files;if(J.length>0){const Q=J[0],Ie=[".txt",".md",".doc",".docx",".pdf"],de="."+Q.name.split(".").pop().toLowerCase();Ie.includes(de)?(w.value=Q,j("文件拖拽上传成功!","success")):j("不支持的文件格式!请上传 .txt, .md, .doc, .docx, .pdf 格式的文件","error")}},A=fe=>{fe.preventDefault(),b.value=!0},T=fe=>{fe.preventDefault(),b.value=!1},M=()=>{w.value=null,x.value&&(x.value.value="")},y=fe=>{if(fe===0)return"0 Bytes";const J=1024,Q=["Bytes","KB","MB","GB"],Ie=Math.floor(Math.log(fe)/Math.log(J));return parseFloat((fe/Math.pow(J,Ie)).toFixed(2))+" "+Q[Ie]},N=async()=>{if(!w.value){j("请先上传文件","error");return}c.value=!0,n("start-realtime-generation");try{const fe=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内容不要添加任何说明文字或代码块标记`,Q=`请分析以下文档内容并生成结构化Markdown
${fe}`;await te(J,Q),await Le(),It(w.value.name,l.value),setTimeout(async()=>{try{await je()}catch(Ie){console.error("自动保存失败:",Ie)}},1500)}catch(fe){console.error("从文件生成Markdown失败:",fe),j("生成失败: "+fe.message,"error")}finally{c.value=!1}},z=fe=>new Promise(async(J,Q)=>{try{const Ie=fe.type.includes("text")||fe.name.endsWith(".txt")||fe.name.endsWith(".md"),de=fe.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||fe.type==="application/msword"||fe.name.endsWith(".docx")||fe.name.endsWith(".doc"),W=fe.type==="application/pdf"||fe.name.endsWith(".pdf");if(Ie){const Z=new FileReader;Z.onload=ge=>J(ge.target.result),Z.onerror=()=>Q(new Error("文本文件读取失败")),Z.readAsText(fe)}else if(de){const Z=await q(fe);J(Z)}else if(W){const Z=await P(fe);J(Z)}else{const Z=new FileReader;Z.onload=ge=>J(ge.target.result),Z.onerror=()=>Q(new Error("文件读取失败")),Z.readAsText(fe)}}catch(Ie){Q(Ie)}}),q=async fe=>{try{if(fe.name.endsWith(".docx")){const J=await sp(()=>import("./index-394d79f1.js").then(de=>de.i),[]),Q=await fe.arrayBuffer();return(await J.extractRawText({arrayBuffer:Q})).value}else if(fe.name.endsWith(".doc"))throw new Error("请将.doc文件转换为.docx格式或安装相应的解析库")}catch(J){throw new Error(`Office文档解析失败: ${J.message}`)}},P=async fe=>{try{const J=await sp(()=>import("./pdf-4d9c7501.js"),[]);J.GlobalWorkerOptions.workerSrc="/pdf.worker.min.mjs";const Q=await fe.arrayBuffer(),Ie=await J.getDocument({data:Q}).promise;let de="";for(let W=1;W<=Ie.numPages;W++){const ce=(await(await Ie.getPage(W)).getTextContent()).items.map(ve=>ve.str).join(" ");de+=ce+`
`}return de}catch(J){throw new Error(`PDF文件解析失败: ${J.message}`)}},Y=fe=>fe&&fe.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(fe,J)=>{const Ie=fe||`你是一位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内容不要添加任何说明文字。`,de=J||"请将以下内容转换为结构化的Markdown格式";try{const W=await fetch("http://127.0.0.1:8000/api/ai/generate-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({system_prompt:Ie,user_prompt:de,model:"glm-4.5",base_url:"https://open.bigmodel.cn/api/paas/v4/",api_key:"ce39bdd4fcf34ec0aec75072bc9ff988.hAp7HZTVUwy7vImn"})});if(!W.ok)throw new Error(`HTTP error! status: ${W.status}`);const Z=W.body.getReader(),ge=new TextDecoder;let ce="",ve=0;for(;;){const{done:Ee,value:ze}=await Z.read();if(Ee)break;ce+=ge.decode(ze,{stream:!0});const We=ce.split(`
`);ce=We.pop()||"";for(const Ze of We)if(Ze.startsWith("data: "))try{const Be=JSON.parse(Ze.slice(6));if(Be.type==="start")j("AI开始生成内容...","info");else if(Be.type==="chunk"){if(ve++,l.value+=Be.content,ve%15===0&&l.value.length>100)try{const at=Y(l.value);if(at.length<10||!at.includes("#")){console.log("⚠️ 内容还不够完整,跳过此次转换"),console.log("⚠️ 内容长度:",at.length),console.log("⚠️ 内容预览:",at.substring(0,200));return}console.log("🔍 准备转换的内容长度:",at.length),console.log("🔍 准备转换的内容预览:",at.substring(0,500)),console.log("🔍 内容是否包含标题:",at.includes("#")),console.log("🔍 内容行数:",at.split(`
`).length);const Ue=await De(at);if(!Ue||!Ue.topic){console.log("⚠️ 转换结果无效,跳过此次更新"),console.log("🔍 转换结果详情:",Ue),console.log("🔍 内容长度:",at.length),console.log("🔍 内容预览:",at.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:ve,isIncremental:!0}}))}catch(at){if(console.warn("⚠️ 实时转换JSON失败:",at.message),console.warn("⚠️ 当前内容长度:",l.value.length),console.warn("⚠️ 当前内容预览:",l.value.substring(0,200)),l.value.length>50)try{const Ue=$e(l.value);window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:Ue,title:"AI生成中...",source:"ai-streaming-fallback",chunkCount:ve,isIncremental:!0}}))}catch(Ue){console.warn("⚠️ 回退处理也失败:",Ue)}}}else if(Be.type==="end")try{const at=Y(l.value),Ue=qe(at),He=await De(at);h.value=JSON.stringify(He,null,2),window.dispatchEvent(new CustomEvent("realtime-mindmap-update",{detail:{data:He,title:He.topic||"AI生成完成",source:"ai-final",chunkCount:ve}})),setTimeout(()=>{window.dispatchEvent(new CustomEvent("save-preview-to-database",{detail:{data:He,title:He.topic||"AI生成思维导图",source:"ai-generated",timestamp:Date.now()}}))},2e3),j("AI内容生成完成正在保存到数据库...","success")}catch(at){console.error("⚠️ 最终处理失败:",at),console.error("⚠️ 错误详情:",at.message);try{const Ue=$e(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:ve}})),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(W){throw console.error("流式AI API调用失败:",W),W}},ue=fe=>{if(fe.includes("|")&&fe.includes("-")){const J=fe.split(`
`);let Q=!1,Ie=!1;for(const de of J){const W=de.trim();W.includes("|")&&W.split("|").length>=3&&(Q=!0),W.includes("|")&&W.includes("-")&&/^[\s\|\-\:]+$/.test(W)&&(Ie=!0)}if(Q&&Ie)return console.log("🚫 formatMarkdownToText: 检测到表格内容,跳过转换"),fe}return fe.replace(/^### (.*$)/gim,"📋 $1").replace(/^## (.*$)/gim,"📌 $1").replace(/^# (.*$)/gim,"🎯 $1").replace(/\*\*(.*?)\*\*/g,(J,Q)=>{if(Q.includes(":")){const Ie=Q.split(":");if(Ie.length>1)return`【${Ie[0]}】: ${Ie.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,`
`).split(`
`).map(J=>J.length>80?J.substring(0,77)+"...":J).join(`
`).trim()},Le=async()=>{if(!l.value.trim()){j("请输入Markdown内容","error");return}p.value=!0;try{const fe=Y(l.value),J=De(fe);h.value=JSON.stringify(J,null,2)}catch(fe){console.error("转换失败:",fe),j("转换失败请检查Markdown格式","error")}finally{p.value=!1}},qe=fe=>{const J=/!\[([^\]]*)\]\(([^)]*)\)/g,Q=[];let Ie;for(;(Ie=J.exec(fe))!==null;){let de=Ie[2];const W=Ie[1]||"";if(console.log(`🔍 发现图片匹配: alt="${W}", url="${de}"`),de&&de.trim()){if(de=de.trim(),de.endsWith("...")||de.endsWith("..")||de.length<10){console.log(`⚠️ 检测到不完整的图片URL: ${de}`);continue}de.startsWith("http")||de.startsWith("data:")||de.startsWith("/")||de.startsWith("./")?(Q.push({alt:W,url:de,fullMatch:Ie[0]}),console.log(`✅ 有效图片URL: ${de}`)):console.warn(`⚠️ 跳过格式不支持的图片URL: ${de}`)}else console.warn("⚠️ 跳过空的图片URL")}return console.log(`🔍 从内容中提取到 ${Q.length} 张图片:`,Q),Q},Xe=fe=>{if(!fe)return"";let J=fe.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,"");return J=J.replace(/\n{3,}/g,`
`),J.trim()},it=fe=>{if(!fe)return"";let J=fe;J=J.replace(/!\[([^\]]*)\]\(([^)]*\.\.\.?)\)/g,""),J=J.replace(/!\[([^\]]*)\]\(([^)]*)\)/g,(W,Z,ge)=>!ge||ge.length<10||ge.endsWith("...")||ge.endsWith("..")?(console.log("🔧 移除不完整的图片引用:",W),""):W);const Q=J.split(`
`);let Ie=!1;for(const W of Q)if(W.trim().match(/^#{1,6}\s+.+/)){Ie=!0;break}if(!Ie&&Q.length>0){const W=Q[0].trim();W&&!W.startsWith("#")&&W.length>0&&(J=`# ${W}
${Q.slice(1).join(`
`)}`,console.log("🔧 修复:将第一行转换为标题"))}J=J.replace(/^[-*+]\s*$/gm,"");const de=J.match(/```/g);return de&&de.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("🔧 预处理完成,原始长度:",fe.length,"处理后长度:",J.length),J},$e=fe=>{if(!fe)return{id:"root",topic:"AI生成中...",children:[{id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}]};const J=fe.split(`
`).filter(W=>W.trim());let Q="AI生成中...";for(const W of J){const Z=W.trim();if(Z.startsWith("#")){Q=Z.replace(/^#+\s*/,"").trim();break}else if(Z.length>5&&!Z.startsWith("```")&&!Z.startsWith("**")){Q=Z.substring(0,30)+(Z.length>30?"...":"");break}}const Ie=J.filter(W=>{const Z=W.trim();return Z.length>10&&!Z.startsWith("#")&&!Z.startsWith("```")&&!Z.startsWith("**")&&!Z.startsWith("- ")&&!Z.startsWith("* ")&&!Z.startsWith("+ ")}),de=[];return Ie.slice(0,3).forEach((W,Z)=>{const ge=W.trim().substring(0,50);ge&&de.push({id:`node_${Z+1}`,topic:ge+(W.trim().length>50?"...":""),children:[],level:1,data:{},expanded:!0})}),de.length===0&&de.push({id:"node_1",topic:"内容生成中,请稍候...",children:[],level:1,data:{},expanded:!0}),{id:"root",topic:Q,children:de}},De=async fe=>{try{if(!fe||typeof fe!="string")throw new Error("Markdown内容为空或格式错误");const Q=it(fe).split(`
`);let Ie=null;const de=[];let W=0,Z=[];for(let ve=0;ve<Q.length;ve++){const ze=Q[ve].trim(),We=ze.match(/^(#{1,6})\s+(.+)$/);if(We){if(Z.length>0&&de.length>0){const gt=Z.join(`
`).trim();if(gt){const kt={id:`node_${W++}`,topic:gt,children:[],level:(de[de.length-1].level||0)+1,data:{},expanded:!0};de[de.length-1].children.push(kt)}Z=[]}const Ze=We[1].length,Be=We[2].trim(),at=qe(Be),Ue=Xe(ue(Be));at.length>0&&console.log(`🖼️ 在标题中发现 ${at.length} 张图片: ${Be}`);const He={id:`node_${W++}`,topic:Ue,children:[],level:Ze,data:{},expanded:!0};if(at.length>0){const gt=at[0];if(gt.url&&gt.url.trim()!==""){let kt=gt.url;kt.includes("cdn-mineru.openxlab.org.cn")&&(kt=`/proxy-image${kt.replace("https://cdn-mineru.openxlab.org.cn","")}`);const jt=`![${gt.alt||Ue}](${kt})`;He.topic=j1(jt),He.markdown=jt,console.log(`✅ 成功为标题节点设置图片Markdown: ${jt}`)}else console.error("❌ 标题图片URL无效:",gt)}if(Ze===1&&!Ie)Ie=He,de.length=0,de.push(Ie);else{for(;de.length>1&&de[de.length-1].level>=Ze;)de.pop();de.length>0&&de[de.length-1].children.push(He),de.push(He)}}else ze&&Z.push(ze)}if(Z.length>0&&de.length>0){const ve=Z.join(`
`).trim();if(ve){ve.includes("|")&&console.log("🔍 处理最后的内容(包含表格):",ve.substring(0,200)+"...");const Ee={id:`node_${W++}`,topic:ve,children:[],level:(de[de.length-1].level||0)+1,data:{},expanded:!0};de[de.length-1].children.push(Ee)}}Ie||(console.warn("⚠️ 没有找到根节点,创建默认结构"),console.log("🔍 原因分析:"),console.log("- Markdown内容长度:",fe.length),console.log("- 是否包含标题(#):",fe.includes("#")),console.log("- 前几行内容:",fe.split(`
`).slice(0,5)),Ie={id:"root",topic:"根节点",children:[],data:{},expanded:!0});const ge=ve=>{let Ee=1;return ve.children&&ve.children.forEach(ze=>{Ee+=ge(ze)}),Ee},ce=ge(Ie);return console.log("🔍 markdownToJSON返回结果:"),console.log("- 根节点ID:",Ie.id),console.log("- 根节点topic:",Ie.topic),console.log("- 子节点数量:",Ie.children?Ie.children.length:0),console.log("- 总节点数:",ce),Ie}catch(J){return console.error("❌ Markdown转JSON失败:",J),console.error("❌ 错误详情:",J.message),console.error("❌ 输入内容长度:",(fe==null?void 0:fe.length)||0),console.error("❌ 输入内容预览:",(fe==null?void 0:fe.substring(0,200))||"无内容"),$e(fe||"")}},nt=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")}},ut=async()=>{try{await navigator.clipboard.writeText(h.value),j("JSON已复制到剪贴板","success")}catch(fe){console.error("复制失败:",fe),j("复制失败","error")}},je=async()=>{if(!h.value){j("请先生成或转换JSON数据","error");return}try{const fe=JSON.parse(h.value),J=fe.topic||fe.title||`AI生成的思维导图_${new Date().toLocaleString()}`,Q=new CustomEvent("save-preview-to-database",{detail:{data:fe,title:J,source:"ai-generated",timestamp:Date.now()}});window.dispatchEvent(Q),setTimeout(()=>{j("思维导图已保存成功!","success"),w.value=null,x.value&&(x.value.value="")},2e3)}catch(fe){console.error("JSON解析失败:",fe),j("JSON格式错误请检查数据","error")}},j=(fe,J="info")=>{const Q=document.createElement("div");switch(Q.className=`notification notification-${J}`,Q.textContent=fe,Q.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":Q.style.background="#4CAF50",Q.style.color="white";break;case"error":Q.style.background="#f44336",Q.style.color="white";break;case"info":default:Q.style.background="#2196F3",Q.style.color="white";break}if(!document.querySelector("#notification-styles")){const Ie=document.createElement("style");Ie.id="notification-styles",Ie.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(Ie)}document.body.appendChild(Q),setTimeout(()=>{Q.style.animation="slideOut 0.3s ease",setTimeout(()=>{Q.parentNode&&Q.parentNode.removeChild(Q)},300)},3e3)},yt=()=>{l.value="",h.value="",j("内容已清空","info")},It=(fe,J,Q=null)=>{const Ie={title:fe,content:J,mindmapId:Q,timestamp:new Date};v.value.unshift(Ie),v.value.length>10&&(v.value=v.value.slice(0,10)),localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))},bt=async fe=>{fe.mindmapId?window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{mindmapId:fe.mindmapId,title:fe.title}})):(l.value=fe.content,await Le(),window.dispatchEvent(new CustomEvent("loadMindmapFromHistory",{detail:{markdown:fe.content,json:h.value,title:fe.title}})))},Mt=fe=>new Date(fe).toLocaleString("zh-CN");Xc(()=>{const fe=localStorage.getItem("ai-sidebar-history");if(fe)try{v.value=JSON.parse(fe)}catch(J){console.error("加载历史记录失败:",J)}window.addEventListener("add-to-history",J=>{const{title:Q,content:Ie,timestamp:de}=J.detail;It(Q,Ie,null)}),window.addEventListener("mindmap-saved",J=>{const{mindmapId:Q,title:Ie,timestamp:de}=J.detail,W=v.value.find(Z=>Z.title===Ie||Z.timestamp&&Math.abs(Z.timestamp-de)<5e3);W?(W.mindmapId=Q,localStorage.setItem("ai-sidebar-history",JSON.stringify(v.value))):It(Ie,"",Q)}),xs(a,(J,Q)=>{}),xs(l,(J,Q)=>{})});const se=async()=>{try{const fe=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(!fe.ok)throw new Error(`HTTP error! status: ${fe.status}`);const J=fe.body.getReader(),Q=new TextDecoder;let Ie="";for(;;){const{done:de,value:W}=await J.read();if(de)break;Ie+=Q.decode(W,{stream:!0});const Z=Ie.split(`
`);Ie=Z.pop()||"";for(const ge of Z)if(ge.startsWith("data: "))try{const ce=JSON.parse(ge.slice(6))}catch(ce){console.warn("解析测试数据失败:",ce)}}}catch(fe){console.error("❌ 测试流式API失败:",fe)}};return window.testStreamAPI=se,Ql(()=>{}),(fe,J)=>(on(),yn("div",xC,[Fe("div",{class:"sidebar-toggle",onClick:S,title:r.value?"展开AI助手":"折叠AI助手",style:Ts({left:r.value?"10px":"420px"})},[r.value?(on(),yn("svg",SC,[...J[1]||(J[1]=[Fe("path",{d:"M9 18l6-6-6-6"},null,-1)])])):(on(),yn("svg",EC,[...J[2]||(J[2]=[Fe("path",{d:"M15 18l-6-6 6-6"},null,-1)])]))],12,kC),Fe("div",{class:Xo(["ai-sidebar",{"sidebar-collapsed":r.value}])},[ep(Fe("div",TC,[J[12]||(J[12]=Fe("div",{class:"sidebar-header"},[Fe("h3",null,"🤖 AI 助手"),Fe("p",null,"文档转思维导图工具"),Fe("div",{class:"collapse-hint"},[Fe("small",null,"💡 点击右侧按钮可折叠侧边栏")])],-1)),Fe("div",AC,[J[6]||(J[6]=Fe("h4",null,"📁 生成思维导图",-1)),Fe("div",MC,[J[4]||(J[4]=Fe("label",null,"上传文件:",-1)),Fe("div",{class:"file-upload-area",onDrop:C,onDragover:A,onDragleave:T},[Fe("input",{type:"file",ref_key:"fileInput",ref:x,onChange:k,accept:".txt,.md,.doc,.docx,.pdf",class:"file-input"},null,544),Fe("div",{class:Xo(["file-upload-placeholder",{"drag-over":b.value}])},[...J[3]||(J[3]=[Fe("span",{class:"upload-icon"},"📎",-1),Fe("span",{class:"upload-text"},"点击选择文件或拖拽文件到此处",-1),Fe("span",{class:"upload-hint"},"支持 .txt, .md, .doc, .docx, .pdf 格式",-1)])],2)],32)]),w.value?(on(),yn("div",CC,[Fe("div",LC,[Fe("div",_C,[Fe("span",NC,"📄 "+Qi(w.value.name),1),Fe("span",DC,"("+Qi(y(w.value.size))+")",1)]),Fe("button",{onClick:M,class:"btn-remove",title:"删除文件"},[...J[5]||(J[5]=[Fe("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[Fe("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)])])])])):ni("",!0),Fe("div",RC,[Fe("button",{onClick:N,disabled:!w.value||c.value,class:"btn-primary"},[c.value?(on(),yn("span",IC,"AI生成中...")):(on(),yn("span",HC,"AI生成思维导图"))],8,OC)])]),v.value.length>0?(on(),yn("div",PC,[J[7]||(J[7]=Fe("h4",null,"📚 历史记录",-1)),Fe("div",zC,[(on(!0),yn(ea,null,R5(v.value,(Q,Ie)=>(on(),yn("div",{key:Ie,class:"history-item",onClick:de=>bt(Q)},[Fe("div",FC,Qi(Q.title),1),Fe("div",qC,Qi(Mt(Q.timestamp)),1)],8,BC))),128))])])):ni("",!0),Fe("div",jC,[J[9]||(J[9]=Fe("h4",null,"📝 AI生成的Markdown结果",-1)),Fe("div",$C,[J[8]||(J[8]=Fe("label",null,"Markdown内容",-1)),ep(Fe("textarea",{"onUpdate:modelValue":J[0]||(J[0]=Q=>l.value=Q),placeholder:"AI生成的Markdown内容将显示在这里",rows:"6",readonly:"",class:"markdown-result"},null,512),[[Yv,l.value]])]),Fe("div",UC,[Fe("button",{onClick:Le,disabled:p.value,class:"btn-secondary"},[p.value?(on(),yn("span",WC,"转换中...")):(on(),yn("span",GC,"🔄 转换为JSON"))],8,VC),Fe("button",{onClick:yt,class:"btn-clear"},"清空"),Fe("button",{onClick:nt,class:"btn-copy"},"📋 复制Markdown")])]),Fe("div",KC,[J[11]||(J[11]=Fe("h4",null,"📊 Markdown转JSON结果",-1)),g.value?(on(),yn("div",XC,[J[10]||(J[10]=Fe("div",{class:"spinner"},null,-1)),Fe("span",null,Qi(m.value),1)])):ni("",!0),Fe("div",ZC,[Fe("pre",YC,Qi(h.value||"JSON转换结果将显示在这里"),1),Fe("div",JC,[Fe("button",{onClick:ut,class:"btn-copy"},"📋 复制JSON"),Fe("button",{onClick:je,disabled:g.value,class:"btn-copy"},Qi(g.value?"处理中...":"👁️ 预览"),9,QC)])])])],512),[[Ly,!r.value]])],2)]))}},tL=bf(eL,[["__scopeId","data-v-9f62a011"]]);const nL={id:"app"},rL={class:"main-content"},iL={__name:"App",setup(t){const e=Lt(null),n=()=>{e.value&&e.value.showMindMapPage()};return(r,a)=>(on(),yn("div",nL,[a[0]||(a[0]=gf("« ",-1)),bi(tL,{onStartRealtimeGeneration:n}),Fe("div",rL,[bi(wC,{ref_key:"mindMapRef",ref:e},null,512)])]))}};Xy(iL).mount("#app");export{sp as _,lp as c,oL as g};