"use strict";var e=require("obsidian"),t=require("path"),n=require("@codemirror/view"),r=require("@codemirror/state"),i=require("@codemirror/language");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(t);
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function s(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))}class c extends Map{constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof e.maxAge&&0===e.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||Number.POSITIVE_INFINITY,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if("function"==typeof this.onEviction)for(const[t,n]of e)this.onEviction(t,n.value)}_deleteIfExpired(e,t){return"number"==typeof t.expiry&&t.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(e,t.value),this.delete(e))}_getOrDeleteIfExpired(e,t){if(!1===this._deleteIfExpired(e,t))return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){const n=t.get(e);return this._getItemValue(e,n)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(const e of this.oldCache){const[t,n]=e;if(!this.cache.has(t)){!1===this._deleteIfExpired(t,n)&&(yield e)}}for(const e of this.cache){const[t,n]=e;!1===this._deleteIfExpired(t,n)&&(yield e)}}get(e){if(this.cache.has(e)){const t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){const t=this.oldCache.get(e);if(!1===this._deleteIfExpired(e,t))return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:n=this.maxAge}={}){const r="number"==typeof n&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:r}):this._set(e,{value:t,expiry:r})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):!!this.oldCache.has(e)&&!this._deleteIfExpired(e,this.oldCache.get(e))}peek(e){return this.cache.has(e)?this._peek(e,this.cache):this.oldCache.has(e)?this._peek(e,this.oldCache):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");const t=[...this._entriesAscending()],n=t.length-e;n<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(n>0&&this._emitEvictions(t.slice(0,n)),this.oldCache=new Map(t.slice(n)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache){const[t,n]=e;!1===this._deleteIfExpired(t,n)&&(yield[t,n.value])}for(const e of this.oldCache){const[t,n]=e;if(!this.cache.has(t)){!1===this._deleteIfExpired(t,n)&&(yield[t,n.value])}}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){const n=e[t],[r,i]=n;!1===this._deleteIfExpired(r,i)&&(yield[r,i.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){const n=e[t],[r,i]=n;if(!this.cache.has(r)){!1===this._deleteIfExpired(r,i)&&(yield[r,i.value])}}}*entriesAscending(){for(const[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}entries(){return this.entriesAscending()}forEach(e,t=this){for(const[n,r]of this.entriesAscending())e.call(t,r,n,this)}[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}const u={serverUrl:"https://api.languagetool.org",urlMode:"standard",glassBg:!1,shouldAutoCheck:!1,pickyMode:!1};function l(e){return"standard"===e?"https://api.languagetool.org":"premium"===e?"https://api.languagetoolplus.com":""}class f extends e.PluginSettingTab{constructor(e,t){super(e,t),this.plugin=t}requestLanguages(){return s(this,void 0,void 0,(function*(){if(this.languages)return this.languages;const e=yield fetch(`${this.plugin.settings.serverUrl}/v2/languages`).then((e=>e.json()));return this.languages=e,this.languages}))}display(){const{containerEl:t}=this;let n=null;t.empty(),t.createEl("h2",{text:"Settings for LanguageTool"}),new e.Setting(t).setName("Endpoint").setDesc("Endpoint that will be used to make requests to").then((e=>{e.controlEl.style.display="inline-grid";let t=null;e.addDropdown((e=>{n=e,e.addOptions({standard:"(Standard) api.languagetool.org",premium:"(Premium) api.languagetoolplus.com",custom:"Custom URL"}).setValue(this.plugin.settings.urlMode).onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.urlMode=e,this.plugin.settings.serverUrl=l(e),null==t||t.setValue(this.plugin.settings.serverUrl),null==t||t.setDisabled("custom"!==e),yield this.plugin.saveSettings()}))))})),e.addText((e=>{t=e,e.setPlaceholder("https://your-custom-url.com").setValue(this.plugin.settings.serverUrl).setDisabled("custom"===this.plugin.settings.urlMode).onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.serverUrl=e.replace(/\/v2\/check\/$/,"").replace(/\/$/,""),yield this.plugin.saveSettings()}))))}))})),new e.Setting(t).setName("API Username").setDesc("Enter a username/email for API Access").addText((e=>e.setPlaceholder("peterlustig@gmail.com").setValue(this.plugin.settings.username||"").onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.username=e.replace(/\s+/g,""),yield this.plugin.saveSettings()})))))).then((e=>{e.descEl.createEl("br"),e.descEl.createEl("a",{text:"Click here for information about Premium Access",href:"https://github.com/Clemens-E/obsidian-languagetool-plugin#premium-accounts"},(e=>{e.setAttr("target","_blank")}))}));let r=!1;new e.Setting(t).setName("API Key").setDesc("Enter an API Key").addText((t=>t.setValue(this.plugin.settings.apikey||"").onChange((t=>s(this,void 0,void 0,(function*(){if(this.plugin.settings.apikey=t.replace(/\s+/g,""),this.plugin.settings.apikey.length>0&&"premium"!==this.plugin.settings.urlMode&&!r){const i=new e.Modal(this.app);i.titleEl.createEl("span",{text:"Warning"}),i.contentEl.createEl("p",{text:"You have entered an API Key but you are not using the Premium Endpoint"}),i.contentEl.style.display="grid";const o=i.contentEl.createEl("div",{attr:{style:"justify-self:center"}});o.createEl("button",{text:"I know what I'm doing",attr:{style:"justify-self:flex-start; color:red;"}}).onclick=()=>{r=!0,i.close()},o.createEl("button",{text:"Change to Premium",attr:{style:"justify-self:flex-end"}}).onclick=()=>s(this,void 0,void 0,(function*(){return this.plugin.settings.urlMode="premium",null==n||n.setValue("premium"),this.plugin.settings.serverUrl=l(t),yield this.plugin.saveSettings(),i.close()})),i.open()}yield this.plugin.saveSettings()})))))).then((e=>{e.descEl.createEl("br"),e.descEl.createEl("a",{text:"Click here for information about Premium Access",href:"https://github.com/Clemens-E/obsidian-languagetool-plugin#premium-accounts"},(e=>{e.setAttr("target","_blank")}))})),new e.Setting(t).setName("Autocheck Text").setDesc("Check text as you type").addToggle((e=>{e.setValue(this.plugin.settings.shouldAutoCheck).onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.shouldAutoCheck=e,yield this.plugin.saveSettings()}))))})),new e.Setting(t).setName("Glass Background").setDesc("Use the secondary background color of the theme or a glass background").addToggle((e=>{e.setValue(this.plugin.settings.glassBg).onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.glassBg=e,yield this.plugin.saveSettings()}))))})),new e.Setting(t).setName("Static Language").setDesc("Set a static language that will always be used (LanguageTool tries to auto detect the language, this is usually not necessary)").addDropdown((e=>{this.requestLanguages().then((t=>{var n;e.addOption("auto","Auto Detect"),t.forEach((t=>e.addOption(t.longCode,t.name))),e.setValue(null!==(n=this.plugin.settings.staticLanguage)&&void 0!==n?n:"auto"),e.onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.staticLanguage=e,yield this.plugin.saveSettings()}))))})).catch(console.error)})),t.createEl("h3",{text:"Rule Categories"}),new e.Setting(t).setName("Picky Mode").setDesc("Provides more style and tonality suggestions, detects long or complex sentences, recognizes colloquialism and redundancies, proactively suggests synonyms for commonly overused words").addToggle((e=>{e.setValue(this.plugin.settings.pickyMode).onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.pickyMode=e,yield this.plugin.saveSettings()}))))})),new e.Setting(t).setName("Other rule categories").setDesc("Enter a comma-separated list of categories").addText((e=>e.setPlaceholder("Eg. CATEGORY_1,CATEGORY_2").setValue(this.plugin.settings.ruleOtherCategories||"").onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.ruleOtherCategories=e.replace(/\s+/g,""),yield this.plugin.saveSettings()})))))).then((e=>{e.descEl.createEl("br"),e.descEl.createEl("a",{text:"Click here for a list of rules and categories",href:"https://community.languagetool.org/rule/list"},(e=>{e.setAttr("target","_blank")}))})),new e.Setting(t).setName("Enable Specific Rules").setDesc("Enter a comma-separated list of rules").addText((e=>e.setPlaceholder("Eg. RULE_1,RULE_2").setValue(this.plugin.settings.ruleOtherRules||"").onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.ruleOtherRules=e.replace(/\s+/g,""),yield this.plugin.saveSettings()})))))).then((e=>{e.descEl.createEl("br"),e.descEl.createEl("a",{text:"Click here for a list of rules and categories",href:"https://community.languagetool.org/rule/list"},(e=>{e.setAttr("target","_blank")}))})),new e.Setting(t).setName("Disable Specific Rules").setDesc("Enter a comma-separated list of rules").addText((e=>e.setPlaceholder("Eg. RULE_1,RULE_2").setValue(this.plugin.settings.ruleOtherDisabledRules||"").onChange((e=>s(this,void 0,void 0,(function*(){this.plugin.settings.ruleOtherDisabledRules=e.replace(/\s+/g,""),yield this.plugin.saveSettings()})))))).then((e=>{e.descEl.createEl("br"),e.descEl.createEl("a",{text:"Click here for a list of rules and categories",href:"https://community.languagetool.org/rule/list"},(e=>{e.setAttr("target","_blank")}))}))}}const d=/frontmatter|code|math|templater|blockid|hashtag|internal/;function p(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t}function h(e){switch(e){case"COLLOQUIALISMS":case"REDUNDANCY":case"STYLE":return"lt-style";case"PUNCTUATION":case"TYPOS":return"lt-major"}return"lt-minor"}function g(e){var t={exports:{}};return e(t,t.exports),t.exports}var m=g((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=t.composeannotation=t.collecttextnodes=t.build=void 0;const n={children:e=>e.children,annotatetextnode:(e,t)=>"text"===e.type?{offset:{end:e.position.end.offset,start:e.position.start.offset},text:t.substring(e.position.start.offset,e.position.end.offset)}:null,interpretmarkup:(e="")=>e};function r(e,t,r=n){const i=[];return function e(n){const o=r.annotatetextnode(n,t);null!==o&&i.push(o);const a=r.children(n);null!==a&&Array.isArray(a)&&a.forEach(e)}(e),i}function i(e,t,r=n){const i=[];let o={offset:{end:0,start:0}};for(const n of t){const t=e.substring(o.offset.end,n.offset.start);i.push({interpretAs:r.interpretmarkup(t),markup:t,offset:{end:n.offset.start,start:o.offset.end}}),i.push(n),o=n}const a=e.substring(o.offset.end,e.length);return i.push({interpretAs:r.interpretmarkup(a),markup:a,offset:{end:e.length,start:o.offset.end}}),{annotation:i}}t.defaults=n,t.collecttextnodes=r,t.composeannotation=i,t.build=function(e,t,o=n){return i(e,r(t(e),e,o),o)}})),v=g((function(e){!function(){var t;function n(e){for(var t,n,r,i,o=1,a=[].slice.call(arguments),s=0,c=e.length,u="",l=!1,f=!1,d=function(){return a[o++]},p=function(){for(var n="";/\d/.test(e[s]);)n+=e[s++],t=e[s];return n.length>0?parseInt(n):null};s<c;++s)if(t=e[s],l)switch(l=!1,"."==t?(f=!1,t=e[++s]):"0"==t&&"."==e[s+1]?(f=!0,t=e[s+=2]):f=!0,i=p(),t){case"b":u+=parseInt(d(),10).toString(2);break;case"c":u+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":u+=parseInt(d(),10);break;case"f":r=String(parseFloat(d()).toFixed(i||6)),u+=f?r:r.replace(/^0/,"");break;case"j":u+=JSON.stringify(d());break;case"o":u+="0"+parseInt(d(),10).toString(8);break;case"s":u+=d();break;case"x":u+="0x"+parseInt(d(),10).toString(16);break;case"X":u+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()})),y=x(Error),k=y;function x(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=v.apply(null,arguments)),new e(t)}}y.eval=x(EvalError),y.range=x(RangeError),y.reference=x(ReferenceError),y.syntax=x(SyntaxError),y.type=x(TypeError),y.uri=x(URIError),y.create=x;var b=function(e){var t,n=e||"yaml",r=[],i=-1;"string"!=typeof n&&"length"in n||(n=[n]);t=n.length;for(;++i<t;)r[i]=S(n[i]);return r},w={}.hasOwnProperty,E={yaml:"-",toml:"+"};function S(e){var t=e;if("string"==typeof t){if(!w.call(E,t))throw k("Missing matter definition for `%s`",t);t={type:t,marker:E[t]}}else if("object"!=typeof t)throw k("Expected matter to be an object, not `%j`",t);if(!w.call(t,"type"))throw k("Missing `type` in matter `%j`",t);if(!w.call(t,"fence")&&!w.call(t,"marker"))throw k("Missing `marker` or `fence` in matter `%j`",t);return t}var A=function(e){var t,n,r=b(e),i=r.length,o=-1,a={};for(;++o<i;)t=r[o],(n=q(t,"open").charCodeAt(0))in a?a[n].push(C(t)):a[n]=[C(t)];return{flow:a}};function C(e){var t,n=e.type,r=e.anywhere,i=n+"Value",o=n+"Fence",a=o+"Sequence",s={tokenize:function(e,n,r){var i=0;return function(n){if(n===t.charCodeAt(i))return e.enter(o),e.enter(a),s(n);return r(n)};function s(n){return i===t.length?(e.exit(a),-2===n||-1===n||32===n?(e.enter("whitespace"),c(n)):u(n)):n===t.charCodeAt(i)?(e.consume(n),i++,s):r(n)}function c(t){return-2===t||-1===t||32===t?(e.consume(t),c):(e.exit("whitespace"),u(t))}function u(t){return-5===t||-4===t||-3===t||null===t?(e.exit(o),n(t)):r(t)}},partial:!0};return{tokenize:function(o,a,c){var u=this;return function(i){var a=u.now();if(1!==a.column||!r&&1!==a.line)return c(i);return o.enter(n),t=q(e,"open"),o.attempt(s,l,c)(i)};function l(n){return t=q(e,"close"),p(n)}function f(e){return-5===e||-4===e||-3===e||null===e?p(e):(o.enter(i),d(e))}function d(e){return-5===e||-4===e||-3===e||null===e?(o.exit(i),p(e)):(o.consume(e),d)}function p(e){return null===e?c(e):(o.enter("lineEnding"),o.consume(e),o.exit("lineEnding"),o.attempt(s,h,f))}function h(e){return o.exit(n),a(e)}},concrete:!0}}function q(e,t){var n;return e.marker?(n=T(e.marker,t))+n+n:T(e.fence,t)}function T(e,t){return"string"==typeof e?e:e[t]}var D=A,L=function(e){var t,n=b(e),r=n.length,i=-1,o={},a={};for(;++i<r;)t=n[i],o[t.type]=F(t),a[t.type]=I,a[t.type+"Value"]=R;return{enter:o,exit:a}};function F(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function I(e){var t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function R(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}var P=function(e){var t,n=[],r={},i=b(e),o=i.length,a=-1;for(;++a<o;)t=i[a],r[t.type]=B(t),n.push({atBreak:!0,character:O(t,"open").charAt(0)});return{unsafe:n,handlers:r}};function B(e){var t=O(e,"open"),n=O(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+n}}function O(e,t){var n;return e.marker?(n=z(e.marker,t))+n+n:z(e.fence,t)}function z(e,t){return"string"==typeof e?e:e[t]}var M=function(e){var t=this.data();function n(e,n){t[e]?t[e].push(n):t[e]=[n]}n("micromarkExtensions",D(e)),n("fromMarkdownExtensions",L(e)),n("toMarkdownExtensions",P(e))};var _=N;function N(e){return e&&(e.value||e.alt||e.title||"children"in e&&V(e.children)||"length"in e&&V(e))||""}function V(e){for(var t=[],n=-1;++n<e.length;)t[n]=N(e[n]);return t.join("")}var U=Object.assign,j={}.hasOwnProperty;var H=function(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()},G=String.fromCharCode;var W=function(e,t){var n=parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":G(n)};var Q=function(e){return e<-2};var Y=function(e){return-2===e||-1===e||32===e};var $=function(e,t,n,r){var i=r?r-1:1/0,o=0;return function(r){if(Y(r))return e.enter(n),a(r);return t(r)};function a(r){return Y(r)&&o++<i?(e.consume(r),a):(e.exit(n),t(r))}},J=function(e){var t,n=e.attempt(this.parser.constructs.contentInitial,(function(t){if(null===t)return void e.consume(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$(e,n,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));return n;function r(n){var r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,i(n)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Q(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}};var Z=J,K=Object.defineProperty({tokenize:Z},"__esModule",{value:!0});var X={tokenize:function(e,t,n){return $(e,(function(e){return null===e||Q(e)?t(e):n(e)}),"linePrefix")},partial:!0},ee=function(e){var t,n,r,i=this,o=[],a=0,s={tokenize:function(e,r){var a=0;return t={},s;function s(r){return a<o.length?(i.containerState=o[a][1],e.attempt(o[a][0].continuation,c,u)(r)):n.currentConstruct&&n.currentConstruct.concrete?(t.flowContinue=!0,d(r)):(i.interrupt=n.currentConstruct&&n.currentConstruct.interruptible,i.containerState={},e.attempt(te,f,d)(r))}function c(e){return a++,i.containerState._closeFlow?f(e):s(e)}function u(t){return n.currentConstruct&&n.currentConstruct.lazy?(i.containerState={},e.attempt(te,f,e.attempt(ne,f,e.check(X,f,l)))(t)):f(t)}function l(e){return a=o.length,t.lazy=!0,t.flowContinue=!0,d(e)}function f(e){return t.flowEnd=!0,d(e)}function d(e){return t.continued=a,i.interrupt=i.containerState=void 0,r(e)}},partial:!0};return c;function c(t){return a<o.length?(i.containerState=o[a][1],e.attempt(o[a][0].continuation,u,l)(t)):l(t)}function u(e){return a++,c(e)}function l(r){return t&&t.flowContinue?d(r):(i.interrupt=n&&n.currentConstruct&&n.currentConstruct.interruptible,i.containerState={},e.attempt(te,f,d)(r))}function f(e){return o.push([i.currentConstruct,i.containerState]),i.containerState=void 0,l(e)}function d(t){return null===t?(m(0,!0),void e.consume(t)):(n=n||i.parser.flow(i.now()),e.enter("chunkFlow",{contentType:"flow",previous:r,_tokenizer:n}),p(t))}function p(t){return null===t?(g(e.exit("chunkFlow")),d(t)):Q(t)?(e.consume(t),g(e.exit("chunkFlow")),e.check(s,h)):(e.consume(t),p)}function h(e){return m(t.continued,t&&t.flowEnd),a=0,c(e)}function g(e){r&&(r.next=e),r=e,n.lazy=t&&t.lazy,n.defineSkip(e.start),n.write(i.sliceStream(e))}function m(t,a){var s=o.length;for(n&&a&&(n.write([null]),r=n=void 0);s-- >t;)i.containerState=o[s][1],o[s][0].exit.call(i,e);o.length=t}},te={tokenize:function(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},ne={tokenize:function(e,t,n){return $(e,e.lazy(this.parser.constructs.flow,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}};var re=ee,ie=Object.defineProperty({tokenize:re},"__esModule",{value:!0});var oe=function(e){for(var t=-1,n=0;++t<e.length;)n+="string"==typeof e[t]?e[t].length:1;return n};var ae=function(e,t){var n=e[e.length-1];return n&&n[1].type===t?oe(n[2].sliceStream(n[1])):0},se=[].splice;var ce=function(e,t,n,r){var i,o=e.length,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),se.apply(e,i);else for(n&&se.apply(e,[t,n]);a<r.length;)(i=r.slice(a,a+1e4)).unshift(t,0),se.apply(e,i),a+=1e4,t+=1e4};var ue=function(e){return U({},e)};function le(e,t){for(var n,r,i,o,a,s,c=e[t][1],u=e[t][2],l=t-1,f=[],d=c._tokenizer||u.parser[c.contentType](c.start),p=d.events,h=[],g={};c;){for(;e[++l][1]!==c;);f.push(l),c._tokenizer||(n=u.sliceStream(c),c.next||n.push(null),r&&d.defineSkip(c.start),c.isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(n),c.isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),r=c,c=c.next}for(c=r,i=p.length;i--;)"enter"===p[i][0]?o=!0:o&&p[i][1].type===p[i-1][1].type&&p[i][1].start.line!==p[i][1].end.line&&(m(p.slice(i+1,a)),c._tokenizer=c.next=void 0,c=c.previous,a=i+1);for(d.events=c._tokenizer=c.next=void 0,m(p.slice(0,a)),i=-1,s=0;++i<h.length;)g[s+h[i][0]]=s+h[i][1],s+=h[i][1]-h[i][0]-1;return g;function m(t){var n=f.pop();h.unshift([n,n+t.length-1]),ce(e,n,2,t)}}var fe=function(e){for(var t,n,r,i,o,a,s,c={},u=-1;++u<e.length;){for(;u in c;)u=c[u];if(t=e[u],u&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[u-1][1].type&&((r=0)<(a=t[1]._tokenizer.events).length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1].isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(U(c,le(e,u)),u=c[u],s=!0);else if(t[1]._container||t[1]._movePreviousLineEndings){for(r=u,n=void 0;r--&&("lineEnding"===(i=e[r])[1].type||"lineEndingBlank"===i[1].type);)"enter"===i[0]&&(n&&(e[n][1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);n&&(t[1].end=ue(e[n][1].start),(o=e.slice(n,u)).unshift(t),ce(e,n,u-n+1,o))}}return!s},de={tokenize:function(e,t){var n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):Q(t)?e.check(pe,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n=n.next=e.enter("chunkContent",{contentType:"content",previous:n}),r}},resolve:function(e){return fe(e),e},interruptible:!0,lazy:!0},pe={tokenize:function(e,t,n){var r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$(e,i,"linePrefix")};function i(i){return null===i||Q(i)?n(i):r.parser.constructs.disable.null.indexOf("codeIndented")>-1||ae(r.events,"linePrefix")<4?e.interrupt(r.parser.constructs.flow,n,t)(i):t(i)}},partial:!0};var he=de;var ge=function(e){var t=this,n=e.attempt(X,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,$(e,e.attempt(this.parser.constructs.flow,r,e.attempt(he,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}},me=Object.defineProperty({tokenize:ge},"__esModule",{value:!0}),ve=ke("text"),ye=ke("string");function ke(e){return{tokenize:function(t){var n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return c(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return c(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function c(e){var t=r[e],i=-1;if(null===e)return!0;if(t)for(;++i<t.length;)if(!t[i].previous||t[i].previous.call(n,n.previous))return!0}},resolveAll:xe("text"===e?be:void 0)}}function xe(e){return function(t,n){var r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function be(e,t){for(var n,r,i,o,a,s,c,u,l=-1;++l<=e.length;)if((l===e.length||"lineEnding"===e[l][1].type)&&"data"===e[l-1][1].type){for(r=e[l-1][1],o=(n=t.sliceStream(r)).length,a=-1,s=0,c=void 0;o--;)if("string"==typeof(i=n[o])){for(a=i.length;32===i.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===i)c=!0,s++;else if(-1!==i){o++;break}s&&(u={type:l===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:ue(r.end)},r.end=ue(u.start),r.start.offset===r.end.offset?U(r,u):(e.splice(l,0,["enter",u,t],["exit",u,t]),l+=2)),l++}return e}var we={resolveAll:xe()},Ee=ye,Se=ve,Ae=Object.defineProperty({resolver:we,string:Ee,text:Se},"__esModule",{value:!0});var Ce=function(e){return null==e?[]:"length"in e?e:[e]};function qe(e,t){var n,r,i,o;for(n in t)for(o in r=j.call(e,n)?e[n]:e[n]={},i=t[n])r[o]=Te(Ce(i[o]),j.call(r,o)?r[o]:[])}function Te(e,t){for(var n=-1,r=[];++n<e.length;)("after"===e[n].add?t:r).push(e[n]);return ce(t,0,0,r),t}var De=function(e){for(var t={},n=-1;++n<e.length;)qe(t,e[n]);return t};var Le=function(e,t){return e.length?(ce(e,e.length,0,t),e):t};var Fe=function(e,t,n){for(var r,i=[],o=-1;++o<e.length;)(r=e[o].resolveAll)&&i.indexOf(r)<0&&(t=r(t,n),i.push(r));return t};var Ie=function(e){for(var t,n,r,i=-1,o=[];++i<e.length;){if("string"==typeof(t=e[i]))n=t;else if(-5===t)n="\r";else if(-4===t)n="\n";else if(-3===t)n="\r\n";else if(-2===t)n="\t";else if(-1===t){if(r)continue;n=" "}else n=G(t);r=-2===t,o.push(n)}return o.join("")};var Re=function(e,t){var n,r=t.start._index,i=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;return r===o?n=[e[r].slice(i,a)]:(n=e.slice(r,o),i>-1&&(n[0]=n[0].slice(i)),a>0&&n.push(e[o].slice(0,a))),n};var Pe=function(e,t,n){var r=n?ue(n):{line:1,column:1,offset:0},i={},o=[],a=[],s=[],c={consume:function(e){Q(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));u.previous=e},enter:function(e,t){var n=t||{};return n.type=e,n.start=d(),u.events.push(["enter",n,u]),s.push(n),n},exit:function(e){var t=s.pop();return t.end=d(),u.events.push(["exit",t,u]),t},attempt:m((function(e,t){v(e,t.from)})),check:m(g),interrupt:m(g,{interrupt:!0}),lazy:m(g,{lazy:!0})},u={previous:null,events:[],parser:e,sliceStream:f,sliceSerialize:function(e){return Ie(f(e))},now:d,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(a=Le(a,e),p(),null!==a[a.length-1])return[];return v(t,0),u.events=Fe(o,u.events,u),u.events}},l=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),r._index=0,r._bufferIndex=-1,u;function f(e){return Re(a,e)}function d(){return ue(r)}function p(){for(var e,t;r._index<a.length;)if("string"==typeof(t=a[r._index]))for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}function h(e){l=l(e)}function g(e,t){t.restore()}function m(e,t){return function(n,i,o){var a,l,f,p;return n.tokenize||"length"in n?h(Ce(n)):function(e){if(e in n||null in n)return h(n.null?Ce(n[e]).concat(Ce(n.null)):n[e])(e);return o(e)};function h(e){return a=e,g(e[l=0])}function g(e){return function(n){p=function(){var e=d(),t=u.previous,n=u.currentConstruct,i=u.events.length,o=Array.from(s);return{restore:a,from:i};function a(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=i,s=o,y()}}(),f=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.indexOf(e.name)>-1)return v();return e.tokenize.call(t?U({},u,t):u,c,m,v)(n)}}function m(t){return e(f,p),i}function v(e){return p.restore(),++l<a.length?g(a[l]):o}}}function v(e,t){e.resolveAll&&o.indexOf(e)<0&&o.push(e),e.resolve&&ce(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}};var Be=function(e){return e<0||32===e};var Oe=function(e){return function(t){return e.test(G(t))}},ze=Oe(/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/),Me=Oe(/\s/);var _e=function(e){return null===e||Be(e)||Me(e)?1:ze(e)?2:void 0};var Ne=function(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e},Ve={name:"attention",tokenize:function(e,t){var n,r=_e(this.previous);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(o){var a,s,c,u;return o===n?(e.consume(o),i):(a=e.exit("attentionSequence"),c=!(s=_e(o))||2===s&&r,u=!r||2===r&&s,a._open=42===n?c:c&&(r||!u),a._close=42===n?u:u&&(s||!c),t(o))}},resolveAll:function(e,t){var n,r,i,o,a,s,c,u,l=-1;for(;++l<e.length;)if("enter"===e[l][0]&&"attentionSequence"===e[l][1].type&&e[l][1]._close)for(n=l;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[n][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1,o={type:s>1?"strongSequence":"emphasisSequence",start:Ne(ue(e[n][1].end),-s),end:ue(e[n][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:ue(e[l][1].start),end:Ne(ue(e[l][1].start),s)},i={type:s>1?"strongText":"emphasisText",start:ue(e[n][1].end),end:ue(e[l][1].start)},r={type:s>1?"strong":"emphasis",start:ue(o.start),end:ue(a.end)},e[n][1].end=ue(o.start),e[l][1].start=ue(a.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=Le(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=Le(c,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=Le(c,Fe(t.parser.constructs.insideSpan.null,e.slice(n+1,l),t)),c=Le(c,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[l][1].end.offset-e[l][1].start.offset?(u=2,c=Le(c,[["enter",e[l][1],t],["exit",e[l][1],t]])):u=0,ce(e,n-1,l-n+3,c),l=n+c.length-u-2;break}l=-1;for(;++l<e.length;)"attentionSequence"===e[l][1].type&&(e[l][1].type="data");return e}};var Ue=Ve,je=Oe(/[A-Za-z]/),He=Oe(/[\dA-Za-z]/),Ge=Oe(/[#-'*+\--9=?A-Z^-~]/);var We=function(e){return e<32||127===e};var Qe={name:"autolink",tokenize:function(e,t,n){var r=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return je(t)?(e.consume(t),o):Ge(t)?c(t):n(t)}function o(e){return 43===e||45===e||46===e||He(e)?a(e):c(e)}function a(t){return 58===t?(e.consume(t),s):(43===t||45===t||46===t||He(t))&&r++<32?(e.consume(t),a):c(t)}function s(t){return 62===t?(e.exit("autolinkProtocol"),d(t)):32===t||60===t||We(t)?n(t):(e.consume(t),s)}function c(t){return 64===t?(e.consume(t),r=0,u):Ge(t)?(e.consume(t),c):n(t)}function u(e){return He(e)?l(e):n(e)}function l(t){return 46===t?(e.consume(t),r=0,u):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",d(t)):f(t)}function f(t){return(45===t||He(t))&&r++<63?(e.consume(t),45===t?f:l):n(t)}function d(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}},Ye={name:"blockQuote",tokenize:function(e,t,n){var r=this;return function(t){if(62===t)return r.containerState.open||(e.enter("blockQuote",{_container:!0}),r.containerState.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i;return n(t)};function i(n){return Y(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){return $(e,e.attempt(Ye,t,n),"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}},exit:function(e){e.exit("blockQuote")}};var $e=Ye,Je=Oe(/[!-/:-@[-`{-~]/);var Ze={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Je(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},Ke={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"Ĳ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"⁡",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ﬃ",fflig:"ﬀ",ffllig:"ﬄ",ffr:"𝔣",filig:"ﬁ",fjlig:"fj",flat:"♭",fllig:"ﬂ",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"⁣",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ĳ",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ŉ",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"­",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},Xe=function(e){return!!et.call(Ke,e)&&Ke[e]},et={}.hasOwnProperty;var tt=Oe(/\d/),nt=Oe(/[\dA-Fa-f]/);function rt(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var it=rt(Xe),ot={name:"characterReference",tokenize:function(e,t,n){var r,i,o=this,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),r=31,i=He,u(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=nt,u):(e.enter("characterReferenceValue"),r=7,i=tt,u(t))}function u(s){var c;return 59===s&&a?(c=e.exit("characterReferenceValue"),i!==He||it.default(o.sliceSerialize(c))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)):i(s)&&a++<r?(e.consume(s),u):n(s)}}};var at={name:"codeFenced",tokenize:function(e,t,n){var r,i=this,o={tokenize:function(e,t,n){var i=0;return $(e,o,"linePrefix",this.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4);function o(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(t)}function a(t){return t===r?(e.consume(t),i++,a):i<s?n(t):(e.exit("codeFencedFenceSequence"),$(e,c,"whitespace")(t))}function c(r){return null===r||Q(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},a=ae(this.events,"linePrefix"),s=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),r=t,c(t)};function c(t){return t===r?(e.consume(t),s++,c):(e.exit("codeFencedFenceSequence"),s<3?n(t):$(e,u,"whitespace")(t))}function u(t){return null===t||Q(t)?p(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return null===t||Be(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$(e,f,"whitespace")(t)):96===t&&t===r?n(t):(e.consume(t),l)}function f(t){return null===t||Q(t)?p(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Q(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(t)):96===t&&t===r?n(t):(e.consume(t),d)}function p(n){return e.exit("codeFencedFence"),i.interrupt?t(n):h(n)}function h(t){return null===t?m(t):Q(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),e.attempt(o,m,a?$(e,h,"linePrefix",a+1):h)):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||Q(t)?(e.exit("codeFlowValue"),h(t)):(e.consume(t),g)}function m(n){return e.exit("codeFenced"),t(n)}},concrete:!0};var st={name:"codeIndented",tokenize:function(e,t,n){return e.attempt(ct,r,n);function r(n){return null===n?t(n):Q(n)?e.attempt(ct,r,t)(n):(e.enter("codeFlowValue"),i(n))}function i(t){return null===t||Q(t)?(e.exit("codeFlowValue"),r(t)):(e.consume(t),i)}},resolve:function(e,t){var n={type:"codeIndented",start:e[0][1].start,end:e[e.length-1][1].end};return ce(e,0,0,[["enter",n,t]]),ce(e,e.length,0,[["exit",n,t]]),e}},ct={tokenize:function(e,t,n){var r=this;return $(e,(function i(o){if(Q(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),$(e,i,"linePrefix",5);return ae(r.events,"linePrefix")<4?n(o):t(o)}),"linePrefix",5)},partial:!0};var ut={name:"codeText",tokenize:function(e,t,n){var r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):96===t?(i=e.enter("codeTextSequence"),r=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):Q(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),c(t))}function c(t){return null===t||32===t||96===t||Q(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function u(n){return 96===n?(e.consume(n),r++,u):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",c(n))}},resolve:function(e){var t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[r][1].type=e[i][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};var lt=function(e,t,n,r,i,o,a,s,c){var u=c||1/0,l=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(We(t)||41===t)return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function f(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||Q(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function h(i){return 40===i?++l>u?n(i):(e.consume(i),h):41===i?l--?(e.consume(i),h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i)):null===i||Be(i)?l?n(i):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i)):We(i)?n(i):(e.consume(i),92===i?g:h)}function g(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}};var ft=function(e,t,n,r,i,o){var a,s=this,c=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(f){return null===f||91===f||93===f&&!a||94===f&&!c&&"_hiddenFootnoteSupport"in s.parser.constructs||c>999?n(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):Q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(t){return null===t||91===t||93===t||Q(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),a=a||!Y(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,l):l(t)}};var dt=function(e,t){var n;return function r(i){if(Q(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(Y(i))return $(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}};var pt=function(e,t,n,r,i,o){var a;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s};function s(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),c(n))}function c(t){return t===a?(e.exit(o),s(a)):null===t?n(t):Q(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===a||null===t||Q(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return t===a||92===t?(e.consume(t),u):u(t)}},ht={name:"definition",tokenize:function(e,t,n){var r,i=this;return function(t){return e.enter("definition"),ft.call(i,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return r=H(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),dt(e,lt(e,e.attempt(gt,$(e,a,"whitespace"),$(e,a,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function a(o){return null===o||Q(o)?(e.exit("definition"),i.parser.defined.indexOf(r)<0&&i.parser.defined.push(r),t(o)):n(o)}}},gt={tokenize:function(e,t,n){return function(t){return Be(t)?dt(e,r)(t):n(t)};function r(t){return 34===t||39===t||40===t?pt(e,$(e,i,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function i(e){return null===e||Q(e)?t(e):n(e)}},partial:!0};var mt={name:"headingAtx",tokenize:function(e,t,n){var r=this,i=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(s){return 35===s&&i++<6?(e.consume(s),o):null===s||Be(s)?(e.exit("atxHeadingSequence"),r.interrupt?t(s):a(s)):n(s)}function a(n){return 35===n?(e.enter("atxHeadingSequence"),s(n)):null===n||Q(n)?(e.exit("atxHeading"),t(n)):Y(n)?$(e,a,"whitespace")(n):(e.enter("atxHeadingText"),c(n))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),a(t))}function c(t){return null===t||35===t||Be(t)?(e.exit("atxHeadingText"),a(t)):(e.consume(t),c)}},resolve:function(e,t){var n,r,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},ce(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e}};var vt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],yt=["pre","script","style","textarea"],kt={name:"htmlFlow",tokenize:function(e,t,n){var r,i,o,a,s,c=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u};function u(a){return 33===a?(e.consume(a),l):47===a?(e.consume(a),p):63===a?(e.consume(a),r=3,c.interrupt?t:R):je(a)?(e.consume(a),o=G(a),i=!0,h):n(a)}function l(i){return 45===i?(e.consume(i),r=2,f):91===i?(e.consume(i),r=5,o="CDATA[",a=0,d):je(i)?(e.consume(i),r=4,c.interrupt?t:R):n(i)}function f(r){return 45===r?(e.consume(r),c.interrupt?t:R):n(r)}function d(r){return r===o.charCodeAt(a++)?(e.consume(r),a===o.length?c.interrupt?t:C:d):n(r)}function p(t){return je(t)?(e.consume(t),o=G(t),h):n(t)}function h(a){return null===a||47===a||62===a||Be(a)?47!==a&&i&&yt.indexOf(o.toLowerCase())>-1?(r=1,c.interrupt?t(a):C(a)):vt.indexOf(o.toLowerCase())>-1?(r=6,47===a?(e.consume(a),g):c.interrupt?t(a):C(a)):(r=7,c.interrupt?n(a):i?v(a):m(a)):45===a||He(a)?(e.consume(a),o+=G(a),h):n(a)}function g(r){return 62===r?(e.consume(r),c.interrupt?t:C):n(r)}function m(t){return Y(t)?(e.consume(t),m):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||je(t)?(e.consume(t),y):Y(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||He(t)?(e.consume(t),y):k(t)}function k(t){return 61===t?(e.consume(t),x):Y(t)?(e.consume(t),k):v(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,b):Y(t)?(e.consume(t),x):(s=void 0,w(t))}function b(t){return t===s?(e.consume(t),E):null===t||Q(t)?n(t):(e.consume(t),b)}function w(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||Be(t)?k(t):(e.consume(t),w)}function E(e){return 47===e||62===e||Y(e)?v(e):n(e)}function S(t){return 62===t?(e.consume(t),A):n(t)}function A(t){return Y(t)?(e.consume(t),A):null===t||Q(t)?C(t):n(t)}function C(t){return 45===t&&2===r?(e.consume(t),D):60===t&&1===r?(e.consume(t),L):62===t&&4===r?(e.consume(t),P):63===t&&3===r?(e.consume(t),R):93===t&&5===r?(e.consume(t),I):!Q(t)||6!==r&&7!==r?null===t||Q(t)?q(t):(e.consume(t),C):e.check(xt,P,q)(t)}function q(t){return e.exit("htmlFlowData"),T(t)}function T(t){return null===t?B(t):Q(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T):(e.enter("htmlFlowData"),C(t))}function D(t){return 45===t?(e.consume(t),R):C(t)}function L(t){return 47===t?(e.consume(t),o="",F):C(t)}function F(t){return 62===t&&yt.indexOf(o.toLowerCase())>-1?(e.consume(t),P):je(t)&&o.length<8?(e.consume(t),o+=G(t),F):C(t)}function I(t){return 93===t?(e.consume(t),R):C(t)}function R(t){return 62===t?(e.consume(t),P):C(t)}function P(t){return null===t||Q(t)?(e.exit("htmlFlowData"),B(t)):(e.consume(t),P)}function B(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){var t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},concrete:!0},xt={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(X,t,n)}},partial:!0};var bt={name:"htmlText",tokenize:function(e,t,n){var r,i,o,a,s=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),c};function c(t){return 33===t?(e.consume(t),u):47===t?(e.consume(t),w):63===t?(e.consume(t),x):je(t)?(e.consume(t),A):n(t)}function u(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),i="CDATA[",o=0,g):je(t)?(e.consume(t),k):n(t)}function l(t){return 45===t?(e.consume(t),f):n(t)}function f(t){return null===t||62===t?n(t):45===t?(e.consume(t),d):p(t)}function d(e){return null===e||62===e?n(e):p(e)}function p(t){return null===t?n(t):45===t?(e.consume(t),h):Q(t)?(a=p,R(t)):(e.consume(t),p)}function h(t){return 45===t?(e.consume(t),B):p(t)}function g(t){return t===i.charCodeAt(o++)?(e.consume(t),o===i.length?m:g):n(t)}function m(t){return null===t?n(t):93===t?(e.consume(t),v):Q(t)?(a=m,R(t)):(e.consume(t),m)}function v(t){return 93===t?(e.consume(t),y):m(t)}function y(t){return 62===t?B(t):93===t?(e.consume(t),y):m(t)}function k(t){return null===t||62===t?B(t):Q(t)?(a=k,R(t)):(e.consume(t),k)}function x(t){return null===t?n(t):63===t?(e.consume(t),b):Q(t)?(a=x,R(t)):(e.consume(t),x)}function b(e){return 62===e?B(e):x(e)}function w(t){return je(t)?(e.consume(t),E):n(t)}function E(t){return 45===t||He(t)?(e.consume(t),E):S(t)}function S(t){return Q(t)?(a=S,R(t)):Y(t)?(e.consume(t),S):B(t)}function A(t){return 45===t||He(t)?(e.consume(t),A):47===t||62===t||Be(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),B):58===t||95===t||je(t)?(e.consume(t),q):Q(t)?(a=C,R(t)):Y(t)?(e.consume(t),C):B(t)}function q(t){return 45===t||46===t||58===t||95===t||He(t)?(e.consume(t),q):T(t)}function T(t){return 61===t?(e.consume(t),D):Q(t)?(a=T,R(t)):Y(t)?(e.consume(t),T):C(t)}function D(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,L):Q(t)?(a=D,R(t)):Y(t)?(e.consume(t),D):(e.consume(t),r=void 0,I)}function L(t){return t===r?(e.consume(t),F):null===t?n(t):Q(t)?(a=L,R(t)):(e.consume(t),L)}function F(e){return 62===e||47===e||Be(e)?C(e):n(e)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||Be(t)?C(t):(e.consume(t),I)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),$(e,P,"linePrefix",s.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)}function P(t){return e.enter("htmlTextData"),a(t)}function B(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}}};var wt={name:"labelEnd",tokenize:function(e,t,n){var r,i,o=this,a=o.events.length;for(;a--;)if(("labelImage"===o.events[a][1].type||"labelLink"===o.events[a][1].type)&&!o.events[a][1]._balanced){r=o.events[a][1];break}return function(t){if(!r)return n(t);return r._inactive?c(t):(i=o.parser.defined.indexOf(H(o.sliceSerialize({start:r.end,end:o.now()})))>-1,e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s)};function s(n){return 40===n?e.attempt(Et,t,i?t:c)(n):91===n?e.attempt(St,t,i?e.attempt(At,t,c):c)(n):i?t(n):c(n)}function c(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){var n,r,i,o,a,s,c,u=e.length,l=0;for(;u--;)if(o=e[u][1],a){if("link"===o.type||"labelLink"===o.type&&o._inactive)break;"enter"===e[u][0]&&"labelLink"===o.type&&(o._inactive=!0)}else if(s){if("enter"===e[u][0]&&("labelImage"===o.type||"labelLink"===o.type)&&!o._balanced&&(a=u,"labelLink"!==o.type)){l=2;break}}else"labelEnd"===o.type&&(s=u);return n={type:"labelLink"===e[a][1].type?"link":"image",start:ue(e[a][1].start),end:ue(e[e.length-1][1].end)},r={type:"label",start:ue(e[a][1].start),end:ue(e[s][1].end)},i={type:"labelText",start:ue(e[a+l+2][1].end),end:ue(e[s-2][1].start)},c=Le(c=[["enter",n,t],["enter",r,t]],e.slice(a+1,a+l+3)),c=Le(c,[["enter",i,t]]),c=Le(c,Fe(t.parser.constructs.insideSpan.null,e.slice(a+l+4,s-3),t)),c=Le(c,[["exit",i,t],e[s-2],e[s-1],["exit",r,t]]),c=Le(c,e.slice(s+1)),c=Le(c,[["exit",n,t]]),ce(e,a,e.length,c),e},resolveAll:function(e){var t,n=-1;for(;++n<e.length;)(t=e[n][1])._used||"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},Et={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),dt(e,r)};function r(t){return 41===t?a(t):lt(e,i,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function i(t){return Be(t)?dt(e,o)(t):a(t)}function o(t){return 34===t||39===t||40===t?pt(e,dt(e,a),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):a(t)}function a(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},St={tokenize:function(e,t,n){var r=this;return function(t){return ft.call(r,e,i,n,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.indexOf(H(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))<0?n(e):t(e)}}},At={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};var Ct={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),$(e,t,"linePrefix")}}};var qt={name:"thematicBreak",tokenize:function(e,t,n){var r,i=0;return function(t){return e.enter("thematicBreak"),r=t,o(t)};function o(s){return s===r?(e.enter("thematicBreakSequence"),a(s)):Y(s)?$(e,o,"whitespace")(s):i<3||null!==s&&!Q(s)?n(s):(e.exit("thematicBreak"),t(s))}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),o(t))}}};var Tt=qt,Dt={name:"list",tokenize:function(e,t,n){var r=this,i=ae(r.events,"linePrefix"),o=0;return function(t){var i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:tt(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Tt,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return tt(t)&&++o<10?(e.consume(t),a):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(X,r.interrupt?n:c,e.attempt(Lt,l,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,l(e)}function u(t){return Y(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),l):n(t)}function l(n){return r.containerState.size=i+oe(r.sliceStream(e.exit("listItemPrefix"))),t(n)}},continuation:{tokenize:function(e,t,n){var r=this;return r.containerState._closeFlow=void 0,e.check(X,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!Y(n))return r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,i(n);return r.containerState.furtherBlankLines=r.containerState.initialBlankLine=void 0,e.attempt(Ft,t,i)(n)}));function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(Dt,t,n),"linePrefix",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},Lt={tokenize:function(e,t,n){var r=this;return $(e,(function(e){return Y(e)||!ae(r.events,"listItemPrefixWhitespace")?n(e):t(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.indexOf("codeIndented")>-1?void 0:5)},partial:!0},Ft={tokenize:function(e,t,n){var r=this;return $(e,(function(e){return ae(r.events,"listItemIndent")===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0};var It={name:"setextUnderline",tokenize:function(e,t,n){var r,i,o=this,a=o.events.length;for(;a--;)if("lineEnding"!==o.events[a][1].type&&"linePrefix"!==o.events[a][1].type&&"content"!==o.events[a][1].type){i="paragraph"===o.events[a][1].type;break}return function(t){if(!o.lazy&&(o.interrupt||i))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),r=t,s(t);return n(t)};function s(t){return t===r?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),$(e,c,"lineSuffix")(t))}function c(r){return null===r||Q(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){var n,r,i,o,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);o={type:"setextHeading",start:ue(e[r][1].start),end:ue(e[e.length-1][1].end)},e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=ue(e[i][1].end)):e[n][1]=o;return e.push(["exit",o,t]),e}};var Rt={38:ot,92:Ze},Pt={"-5":Ct,"-4":Ct,"-3":Ct,33:{name:"labelStartImage",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:wt.resolveAll},38:ot,42:Ue,60:[Qe,bt],91:{name:"labelStartLink",tokenize:function(e,t,n){var r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:wt.resolveAll},92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),r};function r(r){return Q(r)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(r)):n(r)}}},Ze],93:wt,95:Ue,96:ut},Bt={91:ht},Ot={null:[]},zt={42:Dt,43:Dt,45:Dt,48:Dt,49:Dt,50:Dt,51:Dt,52:Dt,53:Dt,54:Dt,55:Dt,56:Dt,57:Dt,62:$e},Mt={35:mt,42:Tt,45:[It,Tt],60:kt,61:It,95:Tt,96:at,126:at},_t={"-2":st,"-1":st,32:st},Nt={null:[Ue,Ae.resolver]},Vt=Rt,Ut=Pt,jt=Object.defineProperty({contentInitial:Bt,disable:Ot,document:zt,flow:Mt,flowInitial:_t,insideSpan:Nt,string:Vt,text:Ut},"__esModule",{value:!0});var Ht=function(e){var t={defined:[],constructs:De([jt].concat(Ce((e||{}).extensions))),content:n(K),document:n(ie),flow:n(me),string:n(Ae.string),text:n(Ae.text)};return t;function n(e){return function(n){return Pe(t,e,n)}}},Gt=/[\0\t\n\r]/g;var Wt=function(){var e,t=!0,n=1,r="";return function(i,o,a){var s,c,u,l,f,d=[];i=r+i.toString(o),u=0,r="",t&&(65279===i.charCodeAt(0)&&u++,t=void 0);for(;u<i.length;){if(Gt.lastIndex=u,s=Gt.exec(i),l=s?s.index:i.length,f=i.charCodeAt(l),!s){r=i.slice(u);break}if(10===f&&u===l&&e)d.push(-3),e=void 0;else if(e&&(d.push(-5),e=void 0),u<l&&(d.push(i.slice(u,l)),n+=l-u),0===f)d.push(65533),n++;else if(9===f)for(c=4*Math.ceil(n/4),d.push(-2);n++<c;)d.push(-1);else 10===f?(d.push(-4),n=1):(e=!0,n=1);u=l+1}a&&(e&&d.push(-5),r&&d.push(r),d.push(null));return d}};var Qt=function(e){for(;!fe(e););return e},Yt={}.hasOwnProperty,$t=function(e){if(!e||"object"!=typeof e)return"";if(Yt.call(e,"position")||Yt.call(e,"type"))return Zt(e.position);if(Yt.call(e,"start")||Yt.call(e,"end"))return Zt(e);if(Yt.call(e,"line")||Yt.call(e,"column"))return Jt(e);return""};function Jt(e){return e&&"object"==typeof e||(e={}),Kt(e.line)+":"+Kt(e.column)}function Zt(e){return e&&"object"==typeof e||(e={}),Jt(e.start)+"-"+Jt(e.end)}function Kt(e){return e&&"number"==typeof e?e:1}var Xt=function(e,t,n){"string"!=typeof t&&(n=t,t=void 0);return function(e){var t=e||{},n=function(e,t){var n=-1;for(;++n<t.length;)en(e,t[n]);return e}({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(ue),autolinkProtocol:D,autolinkEmail:D,atxHeading:u(oe),blockQuote:u(ee),characterEscape:D,characterReference:D,codeFenced:u(te),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(te,l),codeText:u(ne,l),codeTextData:D,data:D,codeFlowValue:D,definition:u(re),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(ie),hardBreakEscape:u(ae),hardBreakTrailing:u(ae),htmlFlow:u(se,l),htmlFlowData:D,htmlText:u(se,l),htmlTextData:D,image:u(ce),label:l,link:u(ue),listItem:u(fe),listItemValue:m,listOrdered:u(le,g),listUnordered:u(le),paragraph:u(de),reference:Y,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(oe),strong:u(pe),thematicBreak:u(ge)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:X,autolinkProtocol:K,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:Z,codeFenced:d(x),codeFencedFence:k,codeFencedFenceInfo:v,codeFencedFenceMeta:y,codeFlowValue:L,codeIndented:d(b),codeText:d(B),codeTextData:L,data:L,definition:d(),definitionDestinationString:S,definitionLabelString:w,definitionTitleString:E,emphasis:d(),hardBreakEscape:d(I),hardBreakTrailing:d(I),htmlFlow:d(R),htmlFlowData:L,htmlText:d(P),htmlTextData:L,image:d(z),label:N,labelText:M,lineEnding:F,link:d(O),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:$,resourceDestinationString:V,resourceTitleString:G,resource:Q,setextHeading:d(T),setextHeadingLineSequence:q,setextHeadingText:C,strong:d(),thematicBreak:d()}},t.mdastExtensions||[]),r={};return i;function i(e){for(var t,r={type:"root",children:[]},i=[],u=[],d=-1,g={stack:[r],tokenStack:i,config:n,enter:f,exit:p,buffer:l,resume:h,setData:a,getData:s};++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?u.push(d):d=o(e,u.pop(d),d));for(d=-1;++d<e.length;)t=n[e[d][0]],j.call(t,e[d][1].type)&&t[e[d][1].type].call(U({sliceSerialize:e[d][2].sliceSerialize},g),e[d][1]);if(i.length)throw new Error("Cannot close document, a token (`"+i[i.length-1].type+"`, "+$t({start:i[i.length-1].start,end:i[i.length-1].end})+") is still open");for(r.position={start:c(e.length?e[0][1].start:{line:1,column:1,offset:0}),end:c(e.length?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<n.transforms.length;)r=n.transforms[d](r)||r;return r}function o(e,t,n){for(var r,i,o,a,s,u,l,f=t-1,d=-1,p=!1;++f<=n;)if("listUnordered"===(s=e[f])[1].type||"listOrdered"===s[1].type||"blockQuote"===s[1].type?("enter"===s[0]?d++:d--,l=void 0):"lineEndingBlank"===s[1].type?"enter"===s[0]&&(!r||l||d||u||(u=f),l=void 0):"linePrefix"===s[1].type||"listItemValue"===s[1].type||"listItemMarker"===s[1].type||"listItemPrefix"===s[1].type||"listItemPrefixWhitespace"===s[1].type||(l=void 0),!d&&"enter"===s[0]&&"listItemPrefix"===s[1].type||-1===d&&"exit"===s[0]&&("listUnordered"===s[1].type||"listOrdered"===s[1].type)){if(r){for(i=f,o=void 0;i--;)if("lineEnding"===(a=e[i])[1].type||"lineEndingBlank"===a[1].type){if("exit"===a[0])continue;o&&(e[o][1].type="lineEndingBlank",p=!0),a[1].type="lineEnding",o=i}else if("linePrefix"!==a[1].type&&"blockQuotePrefix"!==a[1].type&&"blockQuotePrefixWhitespace"!==a[1].type&&"blockQuoteMarker"!==a[1].type&&"listItemIndent"!==a[1].type)break;u&&(!o||u<o)&&(r._spread=!0),r.end=c(o?e[o][1].start:s[1].end),e.splice(o||f,0,["exit",r,s[2]]),f++,n++}"listItemPrefix"===s[1].type&&(r={type:"listItem",_spread:!1,start:c(s[1].start)},e.splice(f,0,["enter",r,s[2]]),f++,n++,u=void 0,l=!0)}return e[t][1]._spread=p,n}function a(e,t){r[e]=t}function s(e){return r[e]}function c(e){return{line:e.line,column:e.column,offset:e.offset}}function u(e,t){return n;function n(n){f.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function f(e,t){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push(t),e.position={start:c(t.start)},e}function d(e){return t;function t(t){e&&e.call(this,t),p.call(this,t)}}function p(e){var t=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+$t({start:e.start,end:e.end})+"): it’s not open");if(n.type!==e.type)throw new Error("Cannot close `"+e.type+"` ("+$t({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+$t({start:n.start,end:n.end})+") is open");return t.position.end=c(e.end),t}function h(){return _(this.stack.pop())}function g(){a("expectingFirstListItemValue",!0)}function m(e){s("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=parseInt(this.sliceSerialize(e),10),a("expectingFirstListItemValue"))}function v(){var e=this.resume();this.stack[this.stack.length-1].lang=e}function y(){var e=this.resume();this.stack[this.stack.length-1].meta=e}function k(){s("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))}function x(){var e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}function b(){var e=this.resume();this.stack[this.stack.length-1].value=e}function w(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=H(this.sliceSerialize(e)).toLowerCase()}function E(){var e=this.resume();this.stack[this.stack.length-1].title=e}function S(){var e=this.resume();this.stack[this.stack.length-1].url=e}function A(e){this.stack[this.stack.length-1].depth||(this.stack[this.stack.length-1].depth=this.sliceSerialize(e).length)}function C(){a("setextHeadingSlurpLineEnding",!0)}function q(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function T(){a("setextHeadingSlurpLineEnding")}function D(e){var t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n=he()).position={start:c(e.start)},this.stack[this.stack.length-1].children.push(n)),this.stack.push(n)}function L(e){var t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=c(e.end)}function F(e){var t=this.stack[this.stack.length-1];if(s("atHardBreak"))return t.children[t.children.length-1].position.end=c(e.end),void a("atHardBreak");!s("setextHeadingSlurpLineEnding")&&n.canContainEols.indexOf(t.type)>-1&&(D.call(this,e),L.call(this,e))}function I(){a("atHardBreak",!0)}function R(){var e=this.resume();this.stack[this.stack.length-1].value=e}function P(){var e=this.resume();this.stack[this.stack.length-1].value=e}function B(){var e=this.resume();this.stack[this.stack.length-1].value=e}function O(){var e=this.stack[this.stack.length-1];s("inReference")?(e.type+="Reference",e.referenceType=s("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),a("referenceType")}function z(){var e=this.stack[this.stack.length-1];s("inReference")?(e.type+="Reference",e.referenceType=s("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label,delete e.referenceType),a("referenceType")}function M(e){this.stack[this.stack.length-2].identifier=H(this.sliceSerialize(e)).toLowerCase()}function N(){var e=this.stack[this.stack.length-1],t=this.resume();this.stack[this.stack.length-1].label=t,a("inReference",!0),"link"===this.stack[this.stack.length-1].type?this.stack[this.stack.length-1].children=e.children:this.stack[this.stack.length-1].alt=t}function V(){var e=this.resume();this.stack[this.stack.length-1].url=e}function G(){var e=this.resume();this.stack[this.stack.length-1].title=e}function Q(){a("inReference")}function Y(){a("referenceType","collapsed")}function $(e){var t=this.resume();this.stack[this.stack.length-1].label=t,this.stack[this.stack.length-1].identifier=H(this.sliceSerialize(e)).toLowerCase(),a("referenceType","full")}function J(e){a("characterReferenceType",e.type)}function Z(e){var t,n,r=this.sliceSerialize(e),i=s("characterReferenceType");i?(t=W(r,"characterReferenceMarkerNumeric"===i?10:16),a("characterReferenceType")):t=Xe(r),(n=this.stack.pop()).value+=t,n.position.end=c(e.end)}function K(e){L.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function X(e){L.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function ee(){return{type:"blockquote",children:[]}}function te(){return{type:"code",lang:null,meta:null,value:""}}function ne(){return{type:"inlineCode",value:""}}function re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ie(){return{type:"emphasis",children:[]}}function oe(){return{type:"heading",depth:void 0,children:[]}}function ae(){return{type:"break"}}function se(){return{type:"html",value:""}}function ce(){return{type:"image",title:null,url:"",alt:null}}function ue(){return{type:"link",title:null,url:"",children:[]}}function le(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function fe(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function de(){return{type:"paragraph",children:[]}}function pe(){return{type:"strong",children:[]}}function he(){return{type:"text",value:""}}function ge(){return{type:"thematicBreak"}}}(n)(Qt(Ht(n).document().write(Wt()(e,t,!0))))};function en(e,t){var n,r;for(n in t)r=j.call(e,n)?e[n]:e[n]={},"canContainEols"===n||"transforms"===n?e[n]=[].concat(r,t[n]):Object.assign(r,t[n])}var tn=Xt,nn=function(e){var t=this;this.Parser=function(n){return tn(n,Object.assign({},t.data("settings"),e,{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}};var rn=function(e){if(e)throw e}
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */;var on=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},an=Object.prototype.hasOwnProperty,sn=Object.prototype.toString,cn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,ln=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===sn.call(e)},fn=function(e){if(!e||"[object Object]"!==sn.call(e))return!1;var t,n=an.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&an.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||an.call(e,t)},dn=function(e,t){cn&&"__proto__"===t.name?cn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},pn=function(e,t){if("__proto__"===t){if(!an.call(e,t))return;if(un)return un(e,t).value}return e[t]},hn=function e(){var t,n,r,i,o,a,s=arguments[0],c=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},c=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});c<u;++c)if(null!=(t=arguments[c]))for(n in t)r=pn(s,n),s!==(i=pn(t,n))&&(l&&i&&(fn(i)||(o=ln(i)))?(o?(o=!1,a=r&&ln(r)?r:[]):a=r&&fn(r)?r:{},dn(s,{name:n,newValue:e(l,a,i)})):void 0!==i&&dn(s,{name:n,newValue:i}));return s},gn=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},mn=[].slice,vn=function(e,t){var n;return function(){var t,o=mn.call(arguments,0),a=e.length>o.length;a&&o.push(r);try{t=e.apply(null,o)}catch(e){if(a&&n)throw e;return r(e)}a||(t&&"function"==typeof t.then?t.then(i,r):t instanceof Error?r(t):i(t))};function r(){n||(n=!0,t.apply(null,arguments))}function i(e){r(null,e)}};var yn=xn;xn.wrap=vn;var kn=[].slice;function xn(){var e=[],t={run:function(){var t=-1,n=kn.call(arguments,0,-1),r=arguments[arguments.length-1];if("function"!=typeof r)throw new Error("Expected function as last argument, not "+r);function i(o){var a=e[++t],s=kn.call(arguments,0),c=s.slice(1),u=n.length,l=-1;if(o)r(o);else{for(;++l<u;)null!==c[l]&&void 0!==c[l]||(c[l]=n[l]);n=c,a?vn(a,i).apply(null,n):r.apply(null,[null].concat(n))}}i.apply(null,[null].concat(n))},use:function(n){if("function"!=typeof n)throw new Error("Expected `fn` to be a function, not "+n);return e.push(n),t}};return t}var bn=Sn;function wn(){}wn.prototype=Error.prototype,Sn.prototype=new wn;var En=Sn.prototype;function Sn(e,t,n){var r,i,o;"string"==typeof t&&(n=t,t=null),r=function(e){var t,n=[null,null];"string"==typeof e&&(-1===(t=e.indexOf(":"))?n[1]=e:(n[0]=e.slice(0,t),n[1]=e.slice(t+1)));return n}(n),i=$t(t)||"1:1",o={start:{line:null,column:null},end:{line:null,column:null}},t&&t.position&&(t=t.position),t&&(t.start?(o=t,t=t.start):o.start=t),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=i,this.reason=e,this.line=t?t.line:null,this.column=t?t.column:null,this.location=o,this.source=r[0],this.ruleId=r[1]}En.file="",En.name="",En.reason="",En.message="",En.stack="",En.fatal=null,En.column=null,En.line=null;var An=a.default,Cn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function qn(){throw new Error("setTimeout has not been defined")}function Tn(){throw new Error("clearTimeout has not been defined")}var Dn=qn,Ln=Tn;function Fn(e){if(Dn===setTimeout)return setTimeout(e,0);if((Dn===qn||!Dn)&&setTimeout)return Dn=setTimeout,setTimeout(e,0);try{return Dn(e,0)}catch(t){try{return Dn.call(null,e,0)}catch(t){return Dn.call(this,e,0)}}}"function"==typeof Cn.setTimeout&&(Dn=setTimeout),"function"==typeof Cn.clearTimeout&&(Ln=clearTimeout);var In,Rn=[],Pn=!1,Bn=-1;function On(){Pn&&In&&(Pn=!1,In.length?Rn=In.concat(Rn):Bn=-1,Rn.length&&zn())}function zn(){if(!Pn){var e=Fn(On);Pn=!0;for(var t=Rn.length;t;){for(In=Rn,Rn=[];++Bn<t;)In&&In[Bn].run();Bn=-1,t=Rn.length}In=null,Pn=!1,function(e){if(Ln===clearTimeout)return clearTimeout(e);if((Ln===Tn||!Ln)&&clearTimeout)return Ln=clearTimeout,clearTimeout(e);try{Ln(e)}catch(t){try{return Ln.call(null,e)}catch(t){return Ln.call(this,e)}}}(e)}}function Mn(e,t){this.fun=e,this.array=t}Mn.prototype.run=function(){this.fun.apply(null,this.array)};function _n(){}var Nn=_n,Vn=_n,Un=_n,jn=_n,Hn=_n,Gn=_n,Wn=_n;var Qn=Cn.performance||{},Yn=Qn.now||Qn.mozNow||Qn.msNow||Qn.oNow||Qn.webkitNow||function(){return(new Date).getTime()};var $n=new Date;var Jn={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Rn.push(new Mn(e,t)),1!==Rn.length||Pn||Fn(zn)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Nn,addListener:Vn,once:Un,off:jn,removeListener:Hn,removeAllListeners:Gn,emit:Wn,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Yn.call(Qn),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-$n)/1e3}},Zn=er,Kn={}.hasOwnProperty,Xn=["history","path","basename","stem","extname","dirname"];function er(e){var t,n;if(e){if("string"==typeof e||on(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof er))return new er(e);for(this.data={},this.messages=[],this.history=[],this.cwd=Jn.cwd(),n=-1;++n<Xn.length;)t=Xn[n],Kn.call(e,t)&&(this[t]=e[t]);for(t in e)Xn.indexOf(t)<0&&(this[t]=e[t])}function tr(e,t){if(e&&e.indexOf(An.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function nr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rr(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}er.prototype.toString=function(e){return(this.contents||"").toString(e)},Object.defineProperty(er.prototype,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){nr(e,"path"),this.path!==e&&this.history.push(e)}}),Object.defineProperty(er.prototype,"dirname",{get:function(){return"string"==typeof this.path?An.dirname(this.path):void 0},set:function(e){rr(this.path,"dirname"),this.path=An.join(e||"",this.basename)}}),Object.defineProperty(er.prototype,"basename",{get:function(){return"string"==typeof this.path?An.basename(this.path):void 0},set:function(e){nr(e,"basename"),tr(e,"basename"),this.path=An.join(this.dirname||"",e)}}),Object.defineProperty(er.prototype,"extname",{get:function(){return"string"==typeof this.path?An.extname(this.path):void 0},set:function(e){if(tr(e,"extname"),rr(this.path,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=An.join(this.dirname,this.stem+(e||""))}}),Object.defineProperty(er.prototype,"stem",{get:function(){return"string"==typeof this.path?An.basename(this.path,this.extname):void 0},set:function(e){nr(e,"stem"),tr(e,"stem"),this.path=An.join(this.dirname||"",e+(this.extname||""))}});var ir=Zn;Zn.prototype.message=function(e,t,n){var r=new bn(e,t,n);this.path&&(r.name=this.path+":"+r.name,r.file=this.path);return r.fatal=!1,this.messages.push(r),r},Zn.prototype.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},Zn.prototype.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e};var or=ir,ar=function e(){var t,n=[],r=yn(),i={},o=-1;return a.data=function(e,n){if("string"==typeof e)return 2===arguments.length?(pr("data",t),i[e]=n,a):cr.call(i,e)&&i[e]||null;if(e)return pr("data",t),i=e,a;return i},a.freeze=s,a.attachers=n,a.use=function(e){var r;if(pr("use",t),null==e);else if("function"==typeof e)l.apply(null,arguments);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?u(e):o(e)}r&&(i.settings=hn(i.settings||{},r));return a;function o(e){u(e.plugins),e.settings&&(r=hn(r||{},e.settings))}function s(e){if("function"==typeof e)l(e);else{if("object"!=typeof e)throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):o(e)}}function u(e){var t=-1;if(null==e);else{if("object"!=typeof e||!("length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)s(e[t])}}function l(e,t){var r=c(e);r?(gn(r[1])&&gn(t)&&(t=hn(!0,r[1],t)),r[1]=t):n.push(sr.call(arguments))}},a.parse=function(e){var t,n=or(e);if(s(),fr("parse",t=a.Parser),lr(t,"parse"))return new t(String(n),n).parse();return t(String(n),n)},a.stringify=function(e,t){var n,r=or(t);if(s(),dr("stringify",n=a.Compiler),hr(e),lr(n,"compile"))return new n(e,r).compile();return n(e,r)},a.run=u,a.runSync=function(e,t){var n,r;return u(e,t,i),gr("runSync","run",r),n;function i(e,t){r=!0,n=t,rn(e)}},a.process=l,a.processSync=function(e){var t,n;return s(),fr("processSync",a.Parser),dr("processSync",a.Compiler),l(t=or(e),r),gr("processSync","process",n),t;function r(e){n=!0,rn(e)}},a;function a(){for(var t=e(),r=-1;++r<n.length;)t.use.apply(null,n[r]);return t.data(hn(!0,{},i)),t}function s(){var e,i;if(t)return a;for(;++o<n.length;)!1!==(e=n[o])[1]&&(!0===e[1]&&(e[1]=void 0),"function"==typeof(i=e[0].apply(a,e.slice(1)))&&r.use(i));return t=!0,o=1/0,a}function c(e){for(var t=-1;++t<n.length;)if(n[t][0]===e)return n[t]}function u(e,t,n){if(hr(e),s(),n||"function"!=typeof t||(n=t,t=null),!n)return new Promise(i);function i(i,o){r.run(e,or(t),(function(t,r,a){r=r||e,t?o(t):i?i(r):n(null,r,a)}))}i(null,n)}function l(e,t){if(s(),fr("process",a.Parser),dr("process",a.Compiler),!t)return new Promise(n);function n(n,r){var i=or(e);ur.run(a,{file:i},(function(e){e?r(e):n?n(i):t(null,i)}))}n(null,t)}}().freeze(),sr=[].slice,cr={}.hasOwnProperty,ur=yn().use((function(e,t){t.tree=e.parse(t.file)})).use((function(e,t,n){e.run(t.tree,t.file,(function(e,r,i){e?n(e):(t.tree=r,t.file=i,n())}))})).use((function(e,t){var n=e.stringify(t.tree,t.file);null==n||("string"==typeof n||on(n)?("value"in t.file&&(t.file.value=n),t.file.contents=n):t.file.result=n)}));function lr(e,t){return"function"==typeof e&&e.prototype&&(function(e){var t;for(t in e)return!0;return!1}(e.prototype)||t in e.prototype)}function fr(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Parser`")}function dr(e,t){if("function"!=typeof t)throw new Error("Cannot `"+e+"` without `Compiler`")}function pr(e,t){if(t)throw new Error("Cannot invoke `"+e+"` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.")}function hr(e){if(!e||"string"!=typeof e.type)throw new Error("Expected node, got `"+e+"`")}function gr(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}var mr=g((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=t.build=void 0;const n={children:e=>m.defaults.children(e),annotatetextnode:(e,t)=>m.defaults.annotatetextnode(e,t),interpretmarkup:(e="")=>"\n".repeat((e.match(/\n/g)||[]).length),remarkoptions:{}};t.defaults=n,t.build=function(e,t=n){const r=ar().use(nn,t.remarkoptions).use(M,["yaml","toml"]);return m.build(e,r.parse,t)}}));function vr(t,n){return s(this,void 0,void 0,(function*(){const r=mr.build(t,Object.assign(Object.assign({},mr.defaults),{interpretmarkup:(e="")=>/^`[^`]+`$/.test(e)?e:"\n".repeat((e.match(/\n/g)||[]).length)})),i=n(),{enabledCategories:o,disabledCategories:a}=function(e){return{enabledCategories:e.ruleOtherCategories?e.ruleOtherCategories.split(","):[],disabledCategories:e.ruleOtherDisabledRules?e.ruleOtherDisabledRules.split(","):[]}}(i),s={data:JSON.stringify(r),language:"auto",enabledOnly:"false",level:i.pickyMode?"picky":"default"};let c,u;o.length&&(s.enabledCategories=o.join(",")),a.length&&(s.disabledCategories=a.join(",")),i.ruleOtherRules&&(s.enabledRules=i.ruleOtherRules),i.ruleOtherDisabledRules&&(s.disabledRules=i.ruleOtherDisabledRules),i.apikey&&i.username&&i.apikey.length>1&&i.username.length>1&&(s.username=i.username,s.apiKey=i.apikey),i.staticLanguage&&i.staticLanguage.length>0&&"auto"!==i.staticLanguage&&(s.language=i.staticLanguage);try{c=yield fetch(`${i.serverUrl}/v2/check`,{method:"POST",body:Object.keys(s).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(s[e])}`)).join("&"),headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}})}catch(t){return new e.Notice("Request to LanguageTool server failed. Please check your connection and LanguageTool server URL",5e3),Promise.reject(t)}if(!c.ok)return new e.Notice(`request to LanguageTool failed\n${c.statusText}`,5e3),Promise.reject(new Error(`unexpected status ${c.status}, see network tab`));try{u=yield c.json()}catch(t){return new e.Notice("Error processing response from LanguageTool server",5e3),Promise.reject(t)}return u}))}function yr(t){let r=-1,i=1/0,o=-1/0;return n.EditorView.inputHandler.of(((n,a,s,c)=>{if(!t.settings.shouldAutoCheck||!c.trim())return!1;const u=n.state.field(e.editorViewField);return i=Math.min(i,Math.min(a,s)),o=Math.max(o,Math.max(a,s)),clearTimeout(r),r=window.setTimeout((()=>{const e=n.lineBlockAt(i),r=n.lineBlockAt(o);t.runDetection(n,u,e.from,r.to).catch((e=>{console.error(e)}))}),3e3),!1}))}const kr=r.StateEffect.define(),xr=r.StateEffect.define(),br=r.StateEffect.define(),wr=r.StateEffect.define();function Er(e,t,n,r){return!(e>=n&&e<=r)&&(!(t>=n&&t<=r)&&(!(n>=e&&n<=t)&&!(r>=e&&r<=t)))}const Sr=r.StateField.define({create:()=>({marks:n.Decoration.none,ignoredRanges:new Set}),update(e,t){e.marks=e.marks.map(t.changes),e.ignoredRanges.clear(),e.marks.between(0,t.newDoc.length,((t,n)=>{e.ignoredRanges.add(`${t},${n}`)})),t.docChanged&&t.selection&&e.marks.size&&(e.marks=e.marks.update({filter:(n,r)=>{const i=Er(n,r,t.selection.main.from,t.selection.main.to);return i||e.ignoredRanges.delete(`${n},${r}`),i}}));for(const r of t.effects)if(r.is(wr)){const{from:t,to:i}=r.value;e.ignoredRanges.add(`${t},${i}`),e.marks=e.marks.update({add:[n.Decoration.mark({}).range(t,i)]})}return e}}),Ar=r.StateField.define({create:()=>n.Decoration.none,update(e,t){const{ignoredRanges:r}=t.state.field(Sr),o=new Set,a={};let s=null;e=e.map(t.changes);const c=e=>{if(void 0!==a[e])return a[e];s||(s=i.syntaxTree(t.state));const n=s.resolveInner(e,1).type.prop(i.tokenClassNodeProp);return n&&d.test(n)?a[e]=!1:a[e]=!0,a[e]},u=(e,n,r)=>{if("TYPOS"===e.rule.category.id){const e=window.app.vault.getConfig("spellcheckDictionary"),i=t.state.sliceDoc(n,r);if(e&&e.includes(i))return!1}s||(s=i.syntaxTree(t.state));const o=s.resolve(t.newDoc.lineAt(n).from,1).type.prop(i.tokenClassNodeProp);return!(null==o?void 0:o.includes("table"))||"WHITESPACE_RULE"!==e.rule.id};t.docChanged&&t.selection&&e.size&&(e=e.update({filter:(e,n)=>Er(e,n,t.selection.main.from,t.selection.main.to)}));for(const i of t.effects)if(i.is(kr)){const{from:t,to:a,match:s}=i.value,l=`${t},${a}`;!r.has(l)&&!o.has(l)&&c(t)&&c(a)&&u(s,t,a)&&(o.add(l),e=e.update({add:[n.Decoration.mark({class:`lt-underline ${h(s.rule.category.id)}`,match:s}).range(t,a)]}))}else i.is(xr)?e=n.Decoration.none:(i.is(br)||i.is(wr))&&(e=e.update({filter:(e,t)=>Er(e,t,i.value.from,i.value.to)}));return e},provide:e=>n.EditorView.decorations.from(e)});function Cr(t,n,r){const i=r.match,o=i.message,a=i.shortMessage,s=(i.replacements||[]).slice(0,3).map((e=>e.value)).filter((e=>e.trim())),c=i.rule.category.id,u=t.settings.glassBg?"lt-predictions-container-glass":"lt-predictions-container";return createDiv({cls:[u,h(c)]},(i=>{a&&i.createSpan({cls:"lt-title"},(e=>{e.createSpan({text:a})})),o&&i.createSpan({cls:"lt-message",text:o});const u=br.of({from:r.from,to:r.to}),l=wr.of({from:r.from,to:r.to});s.length&&i.createDiv({cls:"lt-buttoncontainer"},(e=>{for(const t of s)e.createEl("button",{text:t},(e=>{e.onclick=()=>{n.dispatch({changes:[{from:r.from,to:r.to,insert:t}],effects:[u]})}}))})),i.createDiv({cls:"lt-ignorecontainer"},(i=>{i.createEl("button",{cls:"lt-ignore-btn"},(i=>{"TYPOS"===c?(e.setIcon(i.createSpan(),"plus-with-circle"),i.createSpan({text:"Add to personal dictionary"}),i.onclick=()=>{const e=t.app.vault.getConfig("spellcheckDictionary")||[];t.app.vault.setConfig("spellcheckDictionary",[...e,n.state.sliceDoc(r.from,r.to)]),n.dispatch({effects:[u]})}):(e.setIcon(i.createSpan(),"cross"),i.createSpan({text:"Ignore suggestion"}),i.onclick=()=>{n.dispatch({effects:[l]})})}))}))}))}function qr(e,t,n){const r=n.field(Ar);if(0===r.size||n.selection.ranges.length>1)return[];let i=null;if(r.between(n.selection.main.from,n.selection.main.to,((e,t,n)=>{i={from:e,to:t,match:n.spec.match}})),null!==i){const{from:n,to:r}=i;if(e.length){const t=e[0];if(t.pos===n&&t.end===r)return e}return[{pos:n,end:r,above:!0,strictSide:!1,arrow:!1,create:e=>({dom:Cr(t,e,i)})}]}return[]}function Tr(e){return r.StateField.define({create:t=>qr([],e,t),update:(t,n)=>qr(t,e,n.state),provide:e=>n.showTooltip.computeN([e],(t=>t.field(e)))})}class Dr{constructor(t,n){const r=t.match.message,i=t.match.shortMessage,o=(t.match.replacements||[]).slice(0,3).map((e=>e.value)),a=t.match.rule.category.id;this.elem=createDiv({cls:[n,h(a)]},(n=>{n.style.setProperty("left",`${t.position.left}px`),n.style.setProperty("top",`${t.position.bottom}px`),i&&n.createSpan({cls:"lt-title"},(e=>{e.createSpan({text:i})})),r&&n.createSpan({cls:"lt-message",text:r}),o.length&&n.createDiv({cls:"lt-buttoncontainer"},(e=>{for(const n of o)e.createEl("button",{text:n},(e=>{e.onclick=()=>{t.onClick(n)}}))})),n.createDiv({cls:"lt-ignorecontainer"},(n=>{n.createEl("button",{cls:"lt-ignore-btn"},(n=>{"TYPOS"===a?(e.setIcon(n.createSpan(),"plus-with-circle"),n.createSpan({text:"Add to personal dictionary"}),n.onclick=()=>{t.addToDictionary(t.matchedString)}):(e.setIcon(n.createSpan(),"cross"),n.createSpan({text:"Ignore suggestion"}),n.onclick=()=>{t.ignoreSuggestion()})}))}))})),document.body.append(this.elem);const s=this.elem.clientHeight,c=this.elem.clientWidth;t.position.bottom+s>window.innerHeight&&this.elem.style.setProperty("top",t.position.top-s+"px"),t.position.left+c>window.innerWidth&&this.elem.style.setProperty("left",window.innerWidth-c-15+"px")}get element(){return this.elem}destroy(){var e;null===(e=this.elem)||void 0===e||e.remove()}}function Lr(e,t){if(!e.getLine(t.line))return!1;const n=e.getTokenTypeAt(t);return!n||!d.test(n)}function Fr(e,t,n,r){const i=t=>{var n;(null===(n=t.attributes)||void 0===n?void 0:n.isIgnored)||(e.delete(t),t.clear())};if(n&&r)return t.findMarks(n,r).forEach(i);t.getAllMarks().forEach(i)}class Ir{constructor(e){this.onCodemirrorChange=(e,t)=>{if(this.openWidget&&(this.openWidget.destroy(),this.openWidget=void 0),this.markerMap.size>0&&t.origin&&"+"===t.origin[0]){const n=e.findMarksAt(t.from);n.length&&n.forEach((e=>e.clear()))}if(this.plugin.settings.shouldAutoCheck&&t.origin&&("+"===t.origin[0]||"paste"===t.origin)){const n=this.dirtyLines.has(e)?this.dirtyLines.get(e):[];t.text.forEach(((r,i)=>{const o=t.from.line+i;Lr(e,Object.assign(Object.assign({},t.from),{line:o}))&&n.push(o)})),this.dirtyLines.set(e,n),this.plugin.setStatusBarWorking(),this.checkLines(e)}},this.runAutoDetection=e=>s(this,void 0,void 0,(function*(){const t=this.dirtyLines.get(e);if(!t||0===t.length)return this.plugin.setStatusBarReady();this.dirtyLines.delete(e);const n=t.sort(((e,t)=>e-t)),r=n[n.length-1],i=e.getLine(r),o={line:n[0],ch:0},a={line:n[n.length-1],ch:i.length};try{yield this.runDetection(e,o,a)}catch(e){console.error(e),this.plugin.setStatusBarReady()}})),this.plugin=e,this.app=e.app}onload(){return s(this,void 0,void 0,(function*(){this.markerMap=new Map,this.hashLru=new c({maxSize:10}),this.dirtyLines=new WeakMap,this.checkLines=e.debounce(this.runAutoDetection,3e3,!0),this.initLegacyEditorHandler()}))}onunload(){this.openWidget&&(this.openWidget.destroy(),this.openWidget=void 0),this.app.workspace.iterateCodeMirrors((e=>{Fr(this.markerMap,e),e.off("change",this.onCodemirrorChange)}))}initLegacyEditorHandler(){this.plugin.registerCodeMirror((e=>{e.on("change",this.onCodemirrorChange)})),this.plugin.registerDomEvent(document,"pointerup",(t=>{var n,r;const i=this.app.workspace.getActiveViewOfType(e.MarkdownView);if(!i)return;if(t.target===(null===(n=this.openWidget)||void 0===n?void 0:n.element)||(null===(r=this.openWidget)||void 0===r?void 0:r.element.contains(t.target)))return;if(this.openWidget&&(this.openWidget.destroy(),this.openWidget=void 0),0===this.markerMap.size||t.target instanceof HTMLElement&&!t.target.hasClass("lt-underline"))return;const o=i.editor.cm;if(!o.getWrapperElement().contains(t.target))return;const a=o.coordsChar({left:t.clientX,top:t.clientY}),s=o.findMarksAt(a);if(0===s.length)return;const c=s[0],u=this.markerMap.get(c);if(!u)return;const{from:l,to:f}=c.find(),d=o.cursorCoords(l),p=o.getRange(l,f);this.openWidget=new Dr({match:u,matchedString:p,position:d,onClick:e=>{var t;o.replaceRange(e,l,f),c.clear(),null===(t=this.openWidget)||void 0===t||t.destroy(),this.openWidget=void 0},addToDictionary:e=>{var t;const n=this.app.vault.getConfig("spellcheckDictionary")||[];this.app.vault.setConfig("spellcheckDictionary",[...n,e]),c.clear(),null===(t=this.openWidget)||void 0===t||t.destroy(),this.openWidget=void 0},ignoreSuggestion:()=>{var e;o.markText(l,f,{clearOnEnter:!1,attributes:{isIgnored:"true"}}),c.clear(),null===(e=this.openWidget)||void 0===e||e.destroy(),this.openWidget=void 0}},this.plugin.settings.glassBg?"lt-predictions-container-glass":"lt-predictions-container")}))}runDetection(e,t,n){return s(this,void 0,void 0,(function*(){this.plugin.setStatusBarWorking();const r=e.getDoc(),i=t&&n?e.getRange(t,n):e.getValue(),o=t&&n?r.indexFromPos(t):0,a=p(i);if(this.hashLru.has(a))return this.hashLru.get(a);let s;try{s=yield vr(i,(()=>this.plugin.settings)),this.hashLru.set(a,s)}catch(e){return this.plugin.setStatusBarReady(),Promise.reject(e)}if(t&&n?Fr(this.markerMap,e,t,n):Fr(this.markerMap,e),!s.matches)return this.plugin.setStatusBarReady();for(const t of s.matches){const n=r.posFromIndex(t.offset+o),i=e.findMarksAt(n);if(i&&i.length>0)continue;const a=r.posFromIndex(t.offset+o+t.length);if(!Lr(e,n)||!Lr(e,a)||!this.matchAllowed(e,t,n,a))continue;const s=e.markText(n,a,{className:`lt-underline ${h(t.rule.category.id)}`,clearOnEnter:!1});this.markerMap.set(s,t)}this.plugin.setStatusBarReady()}))}matchAllowed(e,t,n,r){var i;const o=e.getRange(n,r);if("TYPOS"===t.rule.category.id){const e=this.app.vault.getConfig("spellcheckDictionary");if(e&&e.includes(o))return!1}const a=e.getLineTokens(n.line);return!a.length||!(null===(i=a[0].type)||void 0===i?void 0:i.includes("table"))||"WHITESPACE_RULE"!==t.rule.id}}class Rr extends e.Plugin{constructor(){super(...arguments),this.isloading=!1,this.handleStatusBarClick=()=>{var t;const n=null===(t=this.statusBarText.parentElement)||void 0===t?void 0:t.getBoundingClientRect(),r=this.statusBarText.getBoundingClientRect();new e.Menu(this.app).addItem((t=>{t.setTitle("Check current document"),t.setIcon("checkbox-glyph"),t.onClick((()=>s(this,void 0,void 0,(function*(){const t=this.app.workspace.activeLeaf;if((null==t?void 0:t.view)instanceof e.MarkdownView&&"source"===t.view.getMode())try{this.isLegacyEditor?yield this.legacyPlugin.runDetection(t.view.editor.cm):yield this.runDetection(t.view.editor.cm,t.view)}catch(e){console.error(e)}}))))})).addItem((e=>{e.setTitle(this.settings.shouldAutoCheck?"Disable automatic checking":"Enable automatic checking"),e.setIcon("uppercase-lowercase-a"),e.onClick((()=>s(this,void 0,void 0,(function*(){this.settings.shouldAutoCheck=!this.settings.shouldAutoCheck,yield this.saveSettings()}))))})).addItem((t=>{t.setTitle("Clear suggestions"),t.setIcon("reset"),t.onClick((()=>{const t=this.app.workspace.getActiveViewOfType(e.MarkdownView);if(t)if(this.isLegacyEditor){const e=t.editor.cm;Fr(this.legacyPlugin.markerMap,e)}else{t.editor.cm.dispatch({effects:[xr.of(null)]})}}))})).showAtPosition({x:r.right+5,y:((null==n?void 0:n.top)||0)-5})}}onload(){return s(this,void 0,void 0,(function*(){this.isLegacyEditor=Boolean(!this.app.isMobile&&this.app.vault.getConfig("legacyEditor")),yield this.loadSettings();let t=yield this.loadData();if(t&&0!==Object.keys(t).length||(t=this.settings),!t.urlMode||0===t.urlMode.length){const{serverUrl:t}=this.settings;this.settings.urlMode="https://api.languagetool.org"===t?"standard":"https://api.languagetoolplus.com"===t?"premium":"custom";try{yield this.saveSettings(),yield this.loadSettings(),new e.Notice("updated LanguageTool Settings, please confirm your server URL in the settings tab",1e4)}catch(e){console.error(e)}}if(this.settings.serverUrl.includes("/v2/check")){new e.Notice("invalid or outdated LanguageTool Settings, I'm trying to fix it.\nIf it does not work, simply reinstall the plugin",1e4),this.settings.serverUrl=this.settings.serverUrl.replace("/v2/check","");try{yield this.saveSettings()}catch(e){console.error(e)}}var r;this.addSettingTab(new f(this.app,this)),this.app.workspace.onLayoutReady((()=>{this.statusBarText=this.addStatusBarItem(),this.setStatusBarReady(),this.registerDomEvent(this.statusBarText,"click",this.handleStatusBarClick)})),this.isLegacyEditor?(this.legacyPlugin=new Ir(this),yield this.legacyPlugin.onload()):(this.hashLru=new c({maxSize:10}),this.registerEditorExtension((r=this,[n.tooltips({position:"absolute",tooltipSpace:e=>{const t=e.dom.getBoundingClientRect();return{top:t.top,left:t.left,bottom:t.bottom,right:t.right}}}),Sr,Ar,Tr(r),yr(r)]))),this.registerCommands()}))}onunload(){this.isLegacyEditor&&this.legacyPlugin.onunload(),this.hashLru.clear()}registerCommands(){this.addCommand({id:"ltcheck-text",name:"Check Text",editorCallback:(e,t)=>{if(this.isLegacyEditor){const t=e.cm;e.somethingSelected()?this.legacyPlugin.runDetection(t,t.getCursor("from"),t.getCursor("to")).catch((e=>{console.error(e)})):this.legacyPlugin.runDetection(t).catch((e=>{console.error(e)}))}else this.runDetection(e.cm,t).catch((e=>{console.error(e)}))}}),this.addCommand({id:"ltautocheck-text",name:"Toggle Automatic Checking",callback:()=>s(this,void 0,void 0,(function*(){this.settings.shouldAutoCheck=!this.settings.shouldAutoCheck,yield this.saveSettings()}))}),this.addCommand({id:"ltclear",name:"Clear Suggestions",editorCallback:e=>{if(this.isLegacyEditor){if(this.legacyPlugin.markerMap.size>0){const t=e.cm;Fr(this.legacyPlugin.markerMap,t)}}else{e.cm.dispatch({effects:[xr.of(null)]})}}})}setStatusBarReady(){this.isloading=!1,this.statusBarText.empty(),this.statusBarText.createSpan({cls:"lt-status-bar-btn"},(e=>{e.createSpan({cls:"lt-status-bar-check-icon",text:"Aa"})}))}setStatusBarWorking(){this.isloading||(this.isloading=!0,this.statusBarText.empty(),this.statusBarText.createSpan({cls:["lt-status-bar-btn","lt-loading"]},(t=>{e.setIcon(t,"sync-small")})))}runDetection(e,t,n,r){return s(this,void 0,void 0,(function*(){this.setStatusBarWorking();const i=e.state.selection.main;let o=t.data,a=0,s=!1,c=0,u=0;void 0===n&&i&&i.from!==i.to&&(n=i.from,r=i.to),void 0!==n&&void 0!==r&&(o=e.state.sliceDoc(n,r),a=n,c=n,u=r,s=!0);const l=p(o);if(this.hashLru.has(l))return this.hashLru.get(l);let f;try{f=yield vr(o,(()=>this.settings)),this.hashLru.set(l,f)}catch(e){return this.setStatusBarReady(),Promise.reject(e)}const d=[];if(s?d.push(br.of({from:c,to:u})):d.push(xr.of(null)),f.matches)for(const e of f.matches){const t=e.offset+a,n=e.offset+a+e.length;d.push(kr.of({from:t,to:n,match:e}))}d.length&&e.dispatch({effects:d}),this.setStatusBarReady()}))}loadSettings(){return s(this,void 0,void 0,(function*(){this.settings=Object.assign({},u,yield this.loadData())}))}saveSettings(){return s(this,void 0,void 0,(function*(){yield this.saveData(this.settings)}))}}module.exports=Rr;
