@topwrite/cli 1.0.24-alpha.7 → 1.0.25-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/ttx.js +3 -3
  2. package/package.json +5 -6
package/bin/ttx.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #! /usr/bin/env node
2
- "use strict";var e=require("commander"),t=require("tmp"),r=require("path"),n=require("consola"),i=require("lodash"),a=require("process"),o=require("url"),s=require("assert"),c=require("http"),u=require("https"),l=require("stream"),f=require("zlib"),h=require("cross-spawn"),p=require("fs"),d=require("vm2"),m=require("js-yaml"),g=require("canvas"),v=require("replace-ext"),y=require("fs-extra"),b=require("fstream-ignore"),w=require("archiver"),x=require("tar-pack"),k=require("ejs"),E=require("pinyin-pro"),S=require("lookpath"),P=require("jsdom"),_=require("mime-types"),A=require("os"),C=require("constants"),F=require("util"),D=require("events"),O=require("crypto");function R(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function T(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var I=R(t),j=R(r),L=R(n),q=R(i),z=R(a),M=R(o),N=R(s),B=R(c),$=R(u),U=R(l),V=R(f),H=R(h),Q=T(p),G=R(p),W=R(m),K=R(v),J=R(y),Y=R(b),X=R(w),Z=R(k),ee=R(P),te=R(_),re=R(A),ne=R(C),ie=R(F),ae=R(D),oe=R(O);const se=L.default.create({});var ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function le(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var fe={},he={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function o(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",i="[0-9]",a=t(i,"[A-Fa-f]"),o=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(o+"|"+t(l,s,"[\\:]"))+"*");var f=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),h=r(f+"\\."+f+"\\."+f+"\\."+f),p=r(a+"{1,4}"),d=r(r(p+"\\:"+p)+"|"+h),m=r(r(p+"\\:")+"{6}"+d),g=r("\\:\\:"+r(p+"\\:")+"{5}"+d),v=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+d),y=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+d),b=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+d),w=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+d),x=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+d),k=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),E=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),S=r([m,g,v,y,b,w,x,k,E].join("|")),P=r(r(l+"|"+o)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(o+"|"+t(l,s))+"*");var _=r(o+"|"+t(l,s,"[\\:\\@]"));return r(r(o+"|"+t(l,s,"[\\@]"))+"+"),r(r(_+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+P+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},h=2147483647,p=36,d=1,m=26,g=38,v=700,y=72,b=128,w="-",x=/^xn--/,k=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=p-d,_=Math.floor,A=String.fromCharCode;function C(e){throw new RangeError(S[e])}function F(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function D(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+F((e=e.replace(E,".")).split("."),t).join(".")}function O(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),r--)}else t.push(i)}return t}var R=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},T=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},I=function(e,t,r){var n=0;for(e=r?_(e/v):e>>1,e+=_(e/t);e>P*m>>1;n+=p)e=_(e/P);return _(n+(P+1)*e/(e+g))},j=function(e){var t=[],r=e.length,n=0,i=b,a=y,o=e.lastIndexOf(w);o<0&&(o=0);for(var s=0;s<o;++s)e.charCodeAt(s)>=128&&C("not-basic"),t.push(e.charCodeAt(s));for(var c=o>0?o+1:0;c<r;){for(var u=n,l=1,f=p;;f+=p){c>=r&&C("invalid-input");var g=R(e.charCodeAt(c++));(g>=p||g>_((h-n)/l))&&C("overflow"),n+=g*l;var v=f<=a?d:f>=a+m?m:f-a;if(g<v)break;var x=p-v;l>_(h/x)&&C("overflow"),l*=x}var k=t.length+1;a=I(n-u,k,0==u),_(n/k)>h-i&&C("overflow"),i+=_(n/k),n%=k,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},L=function(e){var t=[],r=(e=O(e)).length,n=b,i=0,a=y,o=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var f=u.value;f<128&&t.push(A(f))}}catch(e){s=!0,c=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,v=g;for(g&&t.push(w);v<r;){var x=h,k=!0,E=!1,S=void 0;try{for(var P,F=e[Symbol.iterator]();!(k=(P=F.next()).done);k=!0){var D=P.value;D>=n&&D<x&&(x=D)}}catch(e){E=!0,S=e}finally{try{!k&&F.return&&F.return()}finally{if(E)throw S}}var R=v+1;x-n>_((h-i)/R)&&C("overflow"),i+=(x-n)*R,n=x;var j=!0,L=!1,q=void 0;try{for(var z,M=e[Symbol.iterator]();!(j=(z=M.next()).done);j=!0){var N=z.value;if(N<n&&++i>h&&C("overflow"),N==n){for(var B=i,$=p;;$+=p){var U=$<=a?d:$>=a+m?m:$-a;if(B<U)break;var V=B-U,H=p-U;t.push(A(T(U+V%H,0))),B=_(V/H)}t.push(A(T(B,0))),a=I(i,R,v==g),i=0,++v}}}catch(e){L=!0,q=e}finally{try{!j&&M.return&&M.return()}finally{if(L)throw q}}++i,++n}return t.join("")},q=function(e){return D(e,(function(e){return x.test(e)?j(e.slice(4).toLowerCase()):e}))},z=function(e){return D(e,(function(e){return k.test(e)?"xn--"+L(e):e}))},M={version:"2.1.0",ucs2:{decode:O,encode:function(e){return String.fromCodePoint.apply(String,f(e))}},decode:j,encode:L,toASCII:z,toUnicode:q},N={};function B(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function $(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var o=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function U(e,t){function r(e){var r=$(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,B).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,B).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,B).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,B).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,B).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(V).join("."):e}function Q(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),i=n[1],a=n[2];if(i){for(var o=i.toLowerCase().split("::").reverse(),s=l(o,2),c=s[0],u=s[1],f=u?u.split(":").map(V):[],h=c.split(":").map(V),p=t.IPV4ADDRESS.test(h[h.length-1]),d=p?7:8,m=h.length-d,g=Array(d),v=0;v<d;++v)g[v]=f[v]||h[m+v]||"";p&&(g[d-1]=H(g[d-1],t));var y=g.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],w=void 0;if(b&&b.length>1){var x=g.slice(0,b.index),k=g.slice(b.index+b.length);w=x.join(":")+"::"+k.join(":")}else w=g.join(":");return a&&(w+="%"+a),w}return e}var G=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,W=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(G);if(i){W?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=Q(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=N[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)U(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=M.toASCII(r.host.replace(n.PCT_ENCODED,$).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}U(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Q(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,X=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(X))e=e.replace(X,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],i=N[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?M.toUnicode(e.host):M.toASCII(e.host.replace(r.PCT_ENCODED,$).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}U(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=J(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var o=e.path;t.absolutePath||i&&i.absolutePath||(o=te(o)),void 0===a&&(o=o.replace(/^\/\//,"/%2F")),n.push(o)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=K(re(e,r),r),t=K(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=o({scheme:"null"},r);return re(ne(K(e,n),K(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(K(e,t),t):"object"===n(e)&&(e=K(re(e,t),t)),e}function oe(e,t,r){return"string"==typeof e?e=re(K(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(K(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,B)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,$)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function fe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=fe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(fe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),i=n[0],a=n[1];e.path=i&&"/"!==i?i:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},pe={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},de={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ve=r(r("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+r("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+r("%"+ge+ge)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(me,"g"),ke=new RegExp(ve,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),Se=new RegExp(t("[^]",me,we),"g"),Pe=Se;function _e(e){var t=$(e);return t.match(xe)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,a={},o=r.query.split("&"),s=0,c=o.length;s<c;++s){var u=o[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),f=0,h=l.length;f<h;++f)n.push(l[f]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:i=!0,a[ce(u[0],t)]=ce(u[1],t)}}i&&(r.headers=a)}r.query=void 0;for(var p=0,d=n.length;p<d;++p){var m=n[p].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=M.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=m.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var o=0,s=n.length;o<s;++o){var c=String(n[o]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(ke,_e).replace(ke,i).replace(Ee,B),f=c.slice(u+1);try{f=t.iri?M.toUnicode(f):M.toASCII(ce(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[o]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var d in h)h[d]!==de[d]&&p.push(d.replace(ke,_e).replace(ke,i).replace(Se,B)+"="+h[d].replace(ke,_e).replace(ke,i).replace(Pe,B));return p.length&&(r.query=p.join("&")),r}},Ce=/^([^\:]+)\:(.*)/,Fe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Ce),n=e;if(r){var i=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),o=r[2],s=i+":"+(t.nid||a),c=N[s];n.nid=a,n.nss=o,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),a=N[i];a&&(e=a.serialize(e,t));var o=e,s=e.nss;return o.path=(n||t.nid)+":"+s,o}},De=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Oe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(De)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};N[ue.scheme]=ue,N[le.scheme]=le,N[he.scheme]=he,N[pe.scheme]=pe,N[Ae.scheme]=Ae,N[Fe.scheme]=Fe,N[Oe.scheme]=Oe,e.SCHEMES=N,e.pctEncChar=B,e.pctDecChars=$,e.parse=K,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=ae,e.equal=oe,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(he.exports);var pe=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;0!=i--;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r},de={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:me,checkDataTypes:function(e,t,r){if(1===e.length)return me(e[0],t,r,!0);var n="",i=ve(e);for(var a in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+me(a,t,r,!0);return n},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++){var i=t[n];(ge[i]||"array"===e&&"array"===i)&&(r[r.length]=i)}if(r.length)return r}else{if(ge[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:ve,getProperty:we,escapeQuotes:xe,equal:pe,ucs2length:function(e){for(var t,r=0,n=e.length,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return r},varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var n in e)if(n!=r&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var r in e)if(!t[r])return r},toQuotedString:ke,getPathExpr:function(e,t,r,n){return Pe(e,r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,r){var n=ke(r?"/"+_e(t):we(t));return Pe(e,n)},getData:function(e,t,r){var n,i,a,o;if(""===e)return"rootData";if("/"==e[0]){if(!Ee.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,a="rootData"}else{if(!(o=e.match(Se)))throw new Error("Invalid JSON-pointer: "+e);if(n=+o[1],"#"==(i=o[2])){if(n>=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!i)return a}for(var s=a,c=i.split("/"),u=0;u<c.length;u++){var l=c[u];l&&(a+=we(Ae(l)),s+=" && "+a)}return s},unescapeFragment:function(e){return Ae(decodeURIComponent(e))},unescapeJsonPointer:Ae,escapeFragment:function(e){return encodeURIComponent(_e(e))},escapeJsonPointer:_e};function me(e,t,r,n){var i=n?" !== ":" === ",a=n?" || ":" && ",o=n?"!":"",s=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+a+"typeof "+t+i+'"object"'+a+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+a+s+"("+t+" % 1)"+a+t+i+t+(r?a+o+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?a+o+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}var ge=ve(["string","number","integer","boolean","null"]);function ve(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var ye=/^[a-z$_][a-z$_0-9]*$/i,be=/'|\\/g;function we(e){return"number"==typeof e?"["+e+"]":ye.test(e)?"."+e:"['"+xe(e)+"']"}function xe(e){return e.replace(be,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function ke(e){return"'"+xe(e)+"'"}var Ee=/^\/(?:[^~]|~0|~1)*$/,Se=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Pe(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function _e(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ae(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var Ce=de,Fe=function(e){Ce.copy(e,this)};var De={exports:{}},Oe=De.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),Re(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function Re(e,t,r,n,i,a,o,s,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,i,a,o,s,c,u),n){var f=n[l];if(Array.isArray(f)){if(l in Oe.arrayKeywords)for(var h=0;h<f.length;h++)Re(e,t,r,f[h],i+"/"+l+"/"+h,a,i,l,n,h)}else if(l in Oe.propsKeywords){if(f&&"object"==typeof f)for(var p in f)Re(e,t,r,f[p],i+"/"+l+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),a,i,l,n,p)}else(l in Oe.keywords||e.allKeys&&!(l in Oe.skipKeywords))&&Re(e,t,r,f,i+"/"+l,a,i,l,n)}r(n,i,a,o,s,c,u)}}Oe.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},Oe.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Oe.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Oe.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var Te=he.exports,Ie=pe,je=de,Le=Fe,qe=De.exports,ze=Me;function Me(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return Me.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof Le)return He(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,a,o,s=Ne.call(this,t,r);return s&&(i=s.schema,t=s.root,o=s.baseId),i instanceof Le?a=i.validate||e.call(this,i.schema,t,void 0,o):void 0!==i&&(a=He(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,o)),a}function Ne(e,t){var r=Te.parse(t),n=Ke(r),i=We(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==i){var a=Ye(n),o=this._refs[a];if("string"==typeof o)return Be.call(this,e,o,r);if(o instanceof Le)o.validate||this._compile(o),e=o;else{if(!((o=this._schemas[a])instanceof Le))return;if(o.validate||this._compile(o),a==Ye(t))return{schema:o,root:e,baseId:i};e=o}if(!e.schema)return;i=We(this._getId(e.schema))}return Ue.call(this,r,i,e.schema,e)}function Be(e,t,r){var n=Ne.call(this,e,t);if(n){var i=n.schema,a=n.baseId;e=n.root;var o=this._getId(i);return o&&(a=Xe(a,o)),Ue.call(this,r,a,i,e)}}Me.normalizeId=Ye,Me.fullPath=We,Me.url=Xe,Me.ids=function(e){var t=Ye(this._getId(e)),r={"":t},n={"":We(t,!1)},i={},a=this;return qe(e,{allKeys:!0},(function(e,t,o,s,c,u,l){if(""!==t){var f=a._getId(e),h=r[s],p=n[s]+"/"+c;if(void 0!==l&&(p+="/"+("number"==typeof l?l:je.escapeFragment(l))),"string"==typeof f){f=h=Ye(h?Te.resolve(h,f):f);var d=a._refs[f];if("string"==typeof d&&(d=a._refs[d]),d&&d.schema){if(!Ie(e,d.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=Ye(p))if("#"==f[0]){if(i[f]&&!Ie(e,i[f]))throw new Error('id "'+f+'" resolves to more than one schema');i[f]=e}else a._refs[f]=p}r[t]=h,n[t]=p}})),i},Me.inlineRef=He,Me.schema=Ne;var $e=je.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Ue(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),a=1;a<i.length;a++){var o=i[a];if(o){if(void 0===(r=r[o=je.unescapeFragment(o)]))break;var s;if(!$e[o]&&((s=this._getId(r))&&(t=Xe(t,s)),r.$ref)){var c=Xe(t,r.$ref),u=Ne.call(this,n,c);u&&(r=u.schema,n=u.root,t=u.baseId)}}}return void 0!==r&&r!==n.schema?{schema:r,root:n,baseId:t}:void 0}}var Ve=je.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function He(e,t){return!1!==t&&(void 0===t||!0===t?Qe(e):t?Ge(e)<=t:void 0)}function Qe(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!Qe(t))return!1}else for(var n in e){if("$ref"==n)return!1;if("object"==typeof(t=e[n])&&!Qe(t))return!1}return!0}function Ge(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(t=e[n])&&(r+=Ge(t)),r==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(Ve[i])r++;else if("object"==typeof(t=e[i])&&(r+=Ge(t)+1),r==1/0)return 1/0}return r}function We(e,t){return!1!==t&&(e=Ye(e)),Ke(Te.parse(e))}function Ke(e){return Te.serialize(e).split("#")[0]+"#"}var Je=/#\/?$/;function Ye(e){return e?e.replace(Je,""):""}function Xe(e,t){return t=Ye(t),Te.resolve(e,t)}var Ze=ze,et={Validation:rt((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:rt(tt)};function tt(e,t,r){this.message=r||tt.message(e,t),this.missingRef=Ze.url(e,t),this.missingSchema=Ze.normalizeId(Ze.fullPath(this.missingRef))}function rt(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}tt.message=function(e,t){return"can't resolve reference "+t+" from id "+e};var nt=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]},a={key:n,value:t[n]};return e(i,a)}}}(t.cmp),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var a,o;if(Array.isArray(t)){for(o="[",a=0;a<t.length;a++)a&&(o+=","),o+=e(t[a])||"null";return o+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,c=Object.keys(t).sort(n&&n(t));for(o="",a=0;a<c.length;a++){var u=c[a],l=e(t[u]);l&&(o&&(o+=","),o+=JSON.stringify(u)+":"+l)}return i.splice(s,1),"{"+o+"}"}}(e)},it=function(e,t,r){var n="",i=!0===e.schema.$async,a=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var c="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(c);e.logger.warn(c)}}if(e.isTop&&(n+=" var validate = ",i&&(e.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(e.opts.sourceCode||e.opts.processCode)&&(n+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof e.schema||!a&&!e.schema.$ref){t="false schema";var u=e.level,l=e.dataLevel,f=e.schema[t],h=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,m="data"+(l||""),g="valid"+u;if(!1===e.schema){e.isTop?d=!0:n+=" var "+g+" = false; ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'boolean schema is false' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n+=i?" return data; ":" validate.errors = null; return true; ":n+=" var "+g+" = true; ";return e.isTop&&(n+=" }; return validate; "),n}if(e.isTop){var y=e.isTop;u=e.level=0,l=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}n+=" var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data; "}else{u=e.level,m="data"+((l=e.dataLevel)||"");if(o&&(e.baseId=e.resolve.url(e.baseId,o)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+u+" = errors;"}g="valid"+u,d=!e.opts.allErrors;var w="",x="",k=e.schema.type,E=Array.isArray(k);if(k&&e.opts.nullable&&!0===e.schema.nullable&&(E?-1==k.indexOf("null")&&(k=k.concat("null")):"null"!=k&&(k=[k,"null"],E=!0)),E&&1==k.length&&(k=k[0],E=!1),e.schema.$ref&&a){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(a=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(n+=" "+e.RULES.all.$comment.code(e,"$comment")),k){if(e.opts.coerceTypes)var S=e.util.coerceToTypes(e.opts.coerceTypes,k);var P=e.RULES.types[k];if(S||E||!0===P||P&&!Y(P)){h=e.schemaPath+".type",p=e.errSchemaPath+"/type",h=e.schemaPath+".type",p=e.errSchemaPath+"/type";var _=E?"checkDataTypes":"checkDataType";if(n+=" if ("+e.util[_](k,m,e.opts.strictNumbers,!0)+") { ",S){var A="dataType"+u,C="coerced"+u;n+=" var "+A+" = typeof "+m+"; var "+C+" = undefined; ","array"==e.opts.coerceTypes&&(n+=" if ("+A+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+A+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+C+" = "+m+"; } "),n+=" if ("+C+" !== undefined) ; ";var F=S;if(F)for(var D,O=-1,R=F.length-1;O<R;)"string"==(D=F[O+=1])?n+=" else if ("+A+" == 'number' || "+A+" == 'boolean') "+C+" = '' + "+m+"; else if ("+m+" === null) "+C+" = ''; ":"number"==D||"integer"==D?(n+=" else if ("+A+" == 'boolean' || "+m+" === null || ("+A+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==D&&(n+=" && !("+m+" % 1)"),n+=")) "+C+" = +"+m+"; "):"boolean"==D?n+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+C+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+C+" = true; ":"null"==D?n+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+C+" = null; ":"array"==e.opts.coerceTypes&&"array"==D&&(n+=" else if ("+A+" == 'string' || "+A+" == 'number' || "+A+" == 'boolean' || "+m+" == null) "+C+" = ["+m+"]; ");n+=" else { ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } if ("+C+" !== undefined) { ";var T=l?"data"+(l-1||""):"parentData";n+=" "+m+" = "+C+"; ",l||(n+="if ("+T+" !== undefined)"),n+=" "+T+"["+(l?e.dataPathArr[l]:"parentDataProperty")+"] = "+C+"; } "}else{(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } "}}if(e.schema.$ref&&!a)n+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(n+=" } if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}");else{var I=e.RULES;if(I)for(var j=-1,L=I.length-1;j<L;)if(Y(P=I[j+=1])){if(P.type&&(n+=" if ("+e.util.checkDataType(P.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==P.type&&e.schema.properties){f=e.schema.properties;var q=Object.keys(f);if(q)for(var z,M=-1,N=q.length-1;M<N;){if(void 0!==(U=f[z=q[M+=1]]).default){var B=m+e.util.getProperty(z);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}else if("array"==P.type&&Array.isArray(e.schema.items)){var $=e.schema.items;if($){O=-1;for(var U,V=$.length-1;O<V;)if(void 0!==(U=$[O+=1]).default){B=m+"["+O+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}var H=P.rules;if(H)for(var Q,G=-1,W=H.length-1;G<W;)if(X(Q=H[G+=1])){var K=Q.code(e,Q.keyword,P.type);K&&(n+=" "+K+" ",d&&(w+="}"))}if(d&&(n+=" "+w+" ",w=""),P.type&&(n+=" } ",k&&k===P.type&&!S)){n+=" else { ";var J;h=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}d&&(n+=" if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}")}}function Y(e){for(var t=e.rules,r=0;r<t.length;r++)if(X(t[r]))return!0}function X(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,n=0;n<r.length;n++)if(void 0!==e.schema[r[n]])return!0}(t)}return d&&(n+=" "+x+" "),y?(i?(n+=" if (errors === 0) return data; ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0; "),n+=" }; return validate;"):n+=" var "+g+" = errors === errs_"+u+";",n},at=ze,ot=de,st=et,ct=nt,ut=it,lt=ot.ucs2length,ft=pe,ht=st.Validation,pt=function e(t,r,n,i){var a=this,o=this._opts,s=[void 0],c={},u=[],l={},f=[],h={},p=[];r=r||{schema:t,refVal:s,refs:c};var d=dt.call(this,t,r,i),m=this._compilations[d.index];if(d.compiling)return m.callValidate=function e(){var t=m.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var g=this._formats,v=this.RULES;try{var y=w(t,r,n,i);m.validate=y;var b=m.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,o.sourceCode&&(b.source=y.source)),y}finally{mt.call(this,t,r,i)}function w(t,n,i,l){var h=!n||n&&n.schema==t;if(n.schema!=r.schema)return e.call(a,t,n,i,l);var d,m=!0===t.$async,y=ut({isTop:!0,schema:t,isRoot:h,baseId:l,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:st.MissingRef,RULES:v,validate:ut,util:ot,resolve:at,resolveRef:x,usePattern:S,useDefault:P,useCustomRule:_,opts:o,formats:g,logger:a.logger,self:a});y=xt(s,bt)+xt(u,vt)+xt(f,yt)+xt(p,wt)+y,o.processCode&&(y=o.processCode(y,t));try{d=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(a,v,g,r,s,f,p,ft,lt,ht),s[0]=d}catch(e){throw a.logger.error("Error compiling schema, function code:",y),e}return d.schema=t,d.errors=null,d.refs=c,d.refVal=s,d.root=h?d:n,m&&(d.$async=!0),!0===o.sourceCode&&(d.source={code:y,patterns:u,defaults:f}),d}function x(t,i,u){i=at.url(t,i);var l,f,h=c[i];if(void 0!==h)return E(l=s[h],f="refVal["+h+"]");if(!u&&r.refs){var p=r.refs[i];if(void 0!==p)return E(l=r.refVal[p],f=k(i,l))}f=k(i);var d=at.call(a,w,r,i);if(void 0===d){var m=n&&n[i];m&&(d=at.inlineRef(m,o.inlineRefs)?m:e.call(a,m,r,n,t))}if(void 0!==d)return function(e,t){var r=c[e];s[r]=t}(i,d),E(d,f);!function(e){delete c[e]}(i)}function k(e,t){var r=s.length;return s[r]=t,c[e]=r,"refVal"+r}function E(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function S(e){var t=l[e];return void 0===t&&(t=l[e]=u.length,u[t]=e),"pattern"+t}function P(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return ot.toQuotedString(e);case"object":if(null===e)return"null";var t=ct(e),r=h[t];return void 0===r&&(r=h[t]=f.length,f[r]=e),"default"+r}}function _(e,t,r,n){if(!1!==a._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s)if(!s(t)){var c="keyword schema is invalid: "+a.errorsText(s.errors);if("log"!=a._opts.validateSchema)throw new Error(c);a.logger.error(c)}}var u,l=e.definition.compile,f=e.definition.inline,h=e.definition.macro;if(l)u=l.call(a,t,r,n);else if(h)u=h.call(a,t,r,n),!1!==o.validateSchema&&a.validateSchema(u,!0);else if(f)u=f.call(a,n,e.keyword,t,r);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var d=p.length;return p[d]=u,{code:"customRule"+d,validate:u}}};function dt(e,t,r){var n=gt.call(this,e,t,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function mt(e,t,r){var n=gt.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function gt(e,t,r){for(var n=0;n<this._compilations.length;n++){var i=this._compilations[n];if(i.schema==e&&i.root==t&&i.baseId==r)return n}return-1}function vt(e,t){return"var pattern"+e+" = new RegExp("+ot.toQuotedString(t[e])+");"}function yt(e){return"var default"+e+" = defaults["+e+"];"}function bt(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function wt(e){return"var customRule"+e+" = customRules["+e+"];"}function xt(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}var kt={exports:{}},Et=kt.exports=function(){this._cache={}};Et.prototype.put=function(e,t){this._cache[e]=t},Et.prototype.get=function(e){return this._cache[e]},Et.prototype.del=function(e){delete this._cache[e]},Et.prototype.clear=function(){this._cache={}};var St=de,Pt=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,_t=[0,31,28,31,30,31,30,31,31,30,31,30,31],At=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,Ct=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,Ft=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Dt=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Ot=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Rt=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Tt=/^(?:\/(?:[^~/]|~0|~1)*)*$/,It=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,jt=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Lt=qt;function qt(e){return e="full"==e?"full":"fast",St.copy(qt[e])}function zt(e){var t=e.match(Pt);if(!t)return!1;var r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:_t[n])}function Mt(e,t){var r=e.match(At);if(!r)return!1;var n=r[1],i=r[2],a=r[3],o=r[5];return(n<=23&&i<=59&&a<=59||23==n&&59==i&&60==a)&&(!t||o)}qt.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Dt,url:Ot,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:Ct,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Ut,uuid:Rt,"json-pointer":Tt,"json-pointer-uri-fragment":It,"relative-json-pointer":jt},qt.full={date:zt,time:Mt,"date-time":function(e){var t=e.split(Nt);return 2==t.length&&zt(t[0])&&Mt(t[1],!0)},uri:function(e){return Bt.test(e)&&Ft.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":Dt,url:Ot,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:Ct,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Ut,uuid:Rt,"json-pointer":Tt,"json-pointer-uri-fragment":It,"relative-json-pointer":jt};var Nt=/t|\s/i;var Bt=/\/|:/;var $t=/[^\\]\\Z/;function Ut(e){if($t.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Vt=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var p="maximum"==t,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.$data&&m&&m.$data,v=p?"<":">",y=p?">":"<",b=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(d+" must be number or boolean");if(g){var w=e.util.getData(m.$data,o,e.dataPathArr),x="exclusive"+a,k="exclType"+a,E="exclIsNumber"+a,S="' + "+(A="op"+a)+" + '";i+=" var schemaExcl"+a+" = "+w+"; ",i+=" var "+x+"; var "+k+" = typeof "+(w="schemaExcl"+a)+"; if ("+k+" != 'boolean' && "+k+" != 'undefined' && "+k+" != 'number') { ";var P;b=d;(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var _=i;i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+k+" == 'number' ? ( ("+x+" = "+n+" === undefined || "+w+" "+v+"= "+n+") ? "+f+" "+y+"= "+w+" : "+f+" "+y+" "+n+" ) : ( ("+x+" = "+w+" === true) ? "+f+" "+y+"= "+n+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { var op"+a+" = "+x+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=d,u=e.errSchemaPath+"/"+d,n=w,h=g)}else{S=v;if((E="number"==typeof m)&&h){var A="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+v+"= "+n+" ? "+f+" "+y+"= "+m+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { "}else{E&&void 0===s?(x=!0,b=d,u=e.errSchemaPath+"/"+d,n=m,y+="="):(E&&(n=Math[p?"min":"max"](m,s)),m===(!E||n)?(x=!0,b=d,u=e.errSchemaPath+"/"+d,y+="="):(x=!1,S+="="));A="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+" "+y+" "+n+" || "+f+" !== "+f+") { "}}b=b||t,(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+A+", limit: "+n+", exclusive: "+x+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+" ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";_=i;return i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i},Ht=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Qt=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+f+".length ":i+=" ucs2length("+f+") ",i+=" "+p+" "+n+") { ";var d=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Gt=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+f+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Wt={$ref:function(e,t,r){var n,i,a=" ",o=e.level,s=e.dataLevel,c=e.schema[t],u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(s||""),h="valid"+o;if("#"==c||"#/"==c)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs){e.logger.error(d),(y=y||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var m=a;a=y.pop(),!e.compositeRule&&l?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(a+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,d);e.logger.warn(d),l&&(a+=" if (true) { ")}}else if(p.inline){var g=e.util.copy(e);g.level++;var v="valid"+g.level;g.schema=p.schema,g.schemaPath="",g.errSchemaPath=c,a+=" "+e.validate(g).replace(/validate\.schema/g,p.code)+" ",l&&(a+=" if ("+v+") { ")}else n=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var y;(y=y||[]).push(a),a="",e.opts.passContext?a+=" "+i+".call(this, ":a+=" "+i+"( ",a+=" "+f+", (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var b=a+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(a=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(a+=" var "+h+"; "),a+=" try { await "+b+"; ",l&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(a+=" "+h+" = false; "),a+=" } ",l&&(a+=" if ("+h+") { ")}else a+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(a+=" else { ")}return a},allOf:function(e,t,r){var n=" ",i=e.schema[t],a=e.schemaPath+e.util.getProperty(t),o=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,c=e.util.copy(e),u="";c.level++;var l="valid"+c.level,f=c.baseId,h=!0,p=i;if(p)for(var d,m=-1,g=p.length-1;m<g;)d=p[m+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,c.schema=d,c.schemaPath=a+"["+m+"]",c.errSchemaPath=o+"/"+m,n+=" "+e.validate(c)+" ",c.baseId=f,s&&(n+=" if ("+l+") { ",u+="}"));return s&&(n+=h?" if (true) { ":" "+u.slice(0,-1)+" "),n},anyOf:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=o.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=p.baseId;n+=" var "+h+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=o;if(b)for(var w,x=-1,k=b.length-1;x<k;)w=b[x+=1],p.schema=w,p.schemaPath=s+"["+x+"]",p.errSchemaPath=c+"/"+x,n+=" "+e.validate(p)+" ",p.baseId=v,n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ",d+="}";e.compositeRule=p.compositeRule=y,n+=" "+d+" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else u&&(n+=" if (true) { ");return n},$comment:function(e,t,r){var n=" ",i=e.schema[t],a=e.errSchemaPath+"/"+t;e.opts.allErrors;var o=e.util.toQuotedString(i);return!0===e.opts.$comment?n+=" console.log("+o+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+o+", "+e.util.toQuotedString(a)+", validate.root.schema);"),n},const:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h=e.opts.$data&&o&&o.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; "),h||(n+=" var schema"+i+" = validate.schema"+s+";"),n+="var "+f+" = equal("+l+", schema"+i+"); if (!"+f+") { ";var p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var d=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},contains:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+i,g=p.dataLevel=e.dataLevel+1,v="data"+g,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all);if(n+="var "+h+" = errors;var "+f+";",b){var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=o,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var x=l+"["+m+"]";p.dataPathArr[g]=m;var k=e.validate(p);p.baseId=y,e.util.varOccurences(k,v)<2?n+=" "+e.util.varReplace(k,v,x)+" ":n+=" var "+v+" = "+x+"; "+k+" ",n+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=w,n+=" if (!"+d+") {"}else n+=" if ("+l+".length == 0) {";var E=E||[];E.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;return n=E.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",b&&(n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n},dependencies:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m={},g={},v=e.opts.ownProperties;for(x in o)if("__proto__"!=x){var y=o[x],b=Array.isArray(y)?g:m;b[x]=y}n+="var "+f+" = errors;";var w=e.errorPath;for(var x in n+="var missing"+i+";",g)if((b=g[x]).length){if(n+=" if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),u){n+=" && ( ";var k=b;if(k)for(var E=-1,S=k.length-1;E<S;){D=k[E+=1],E&&(n+=" || "),n+=" ( ( "+(I=l+(T=e.util.getProperty(D)))+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:T)+") ) "}n+=")) { ";var P="missing"+i,_="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,P,!0):w+" + "+P);var A=A||[];A.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var C=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+C+"]); ":n+=" validate.errors = ["+C+"]; return false; ":n+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var F=b;if(F)for(var D,O=-1,R=F.length-1;O<R;){D=F[O+=1];var T=e.util.getProperty(D),I=(_=e.util.escapeQuotes(D),l+T);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,D,e.opts.jsonPointers)),n+=" if ( "+I+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",u&&(p+="}",n+=" else { ")}e.errorPath=w;var j=h.baseId;for(var x in m){y=m[x];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+d+" = true; if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),n+=") { ",h.schema=y,h.schemaPath=s+e.util.getProperty(x),h.errSchemaPath=c+"/"+e.util.escapeFragment(x),n+=" "+e.validate(h)+" ",h.baseId=j,n+=" } ",u&&(n+=" if ("+d+") { ",p+="}"))}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},enum:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h=e.opts.$data&&o&&o.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ");var p="i"+i,d="schema"+i;h||(n+=" var "+d+" = validate.schema"+s+";"),n+="var "+f+";",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=f+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+l+", "+d+"["+p+"])) { "+f+" = true; break; }",h&&(n+=" } "),n+=" if (!"+f+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var g=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+g+"]); ":n+=" validate.errors = ["+g+"]; return false; ":n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},format:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var f,h=e.opts.$data&&o&&o.$data;h?(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",f="schema"+i):f=o;var p=e.opts.unknownFormats,d=Array.isArray(p);if(h){n+=" var "+(m="format"+i)+" = formats["+f+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(n+=" var async"+i+" = "+m+".async; "),n+=" "+m+" = "+m+".validate; } if ( ",h&&(n+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),n+=" (","ignore"!=p&&(n+=" ("+f+" && !"+m+" ",d&&(n+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),n+=") || "),n+=" ("+m+" && "+v+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+m+"("+l+") : "+m+"("+l+")) ":n+=" "+m+"("+l+") ",n+=" : "+m+".test("+l+"))))) {"}else{var m;if(!(m=e.formats[o])){if("ignore"==p)return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(d&&p.indexOf(o)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,v=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var y=!0===m.async;m=m.validate}if(v!=r)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(b="formats"+e.util.getProperty(o)+".validate")+"("+l+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(o);g&&(b+=".validate"),n+="function"==typeof m?" "+b+"("+l+") ":" "+b+".test("+l+") ",n+=") { "}}var w=w||[];w.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { format: ",n+=h?""+f:""+e.util.toQuotedString(o),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=h?"' + "+f+" + '":""+e.util.escapeQuotes(o),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+e.util.toQuotedString(o),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var x=n;return n=w.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+x+"]); ":n+=" validate.errors = ["+x+"]; return false; ":n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n},if:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,g=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=p.baseId;if(v||y){var w;p.createErrors=!1,p.schema=o,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+h+" = errors; var "+f+" = true; ";var x=e.compositeRule;e.compositeRule=p.compositeRule=!0,n+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=x,v?(n+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'then'; ":w="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+d+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'else'; ":w="'else'",n+=" } "),n+=" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { failingKeyword: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+w+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n},items:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g="i"+i,v=p.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId;if(n+="var "+h+" = errors;var "+f+";",Array.isArray(o)){var w=e.schema.additionalItems;if(!1===w){n+=" "+f+" = "+l+".length <= "+o.length+"; ";var x=c;c=e.errSchemaPath+"/additionalItems",n+=" if (!"+f+") { ";var k=k||[];k.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var E=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c=x,u&&(d+="}",n+=" else { ")}var S=o;if(S)for(var P,_=-1,A=S.length-1;_<A;)if(P=S[_+=1],e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+l+".length > "+_+") { ";var C=l+"["+_+"]";p.schema=P,p.schemaPath=s+"["+_+"]",p.errSchemaPath=c+"/"+_,p.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),p.dataPathArr[v]=_;var F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",n+=" } ",u&&(n+=" if ("+m+") { ",d+="}")}if("object"==typeof w&&(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))){p.schema=w,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+l+".length > "+o.length+") { for (var "+g+" = "+o.length+"; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=l+"["+g+"]";p.dataPathArr[v]=g;F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" } } ",u&&(n+=" if ("+m+") { ",d+="}")}}else if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o,p.schemaPath=s,p.errSchemaPath=c,n+=" for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=l+"["+g+"]";p.dataPathArr[v]=g;F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" }"}return u&&(n+=" "+d+" if ("+h+" == errors) {"),n},maximum:Vt,minimum:Vt,maxItems:Ht,minItems:Ht,maxLength:Qt,minLength:Qt,maxProperties:Gt,minProperties:Gt,multipleOf:function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="var division"+a+";if (",h&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+a+" = "+f+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+a+" !== parseInt(division"+a+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},not:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=s,h.errSchemaPath=c,n+=" var "+f+" = errors; ";var d,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(d=h.opts.allErrors,h.opts.allErrors=!1),n+=" "+e.validate(h)+" ",h.createErrors=!0,d&&(h.opts.allErrors=d),e.compositeRule=h.compositeRule=m,n+=" if ("+p+") { ";var g=g||[];g.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var v=n;n=g.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n},oneOf:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=p.baseId,v="prevValid"+i,y="passingSchemas"+i;n+="var "+h+" = errors , "+v+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var w=o;if(w)for(var x,k=-1,E=w.length-1;k<E;)x=w[k+=1],(e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all))?(p.schema=x,p.schemaPath=s+"["+k+"]",p.errSchemaPath=c+"/"+k,n+=" "+e.validate(p)+" ",p.baseId=g):n+=" var "+m+" = true; ",k&&(n+=" if ("+m+" && "+v+") { "+f+" = false; "+y+" = ["+y+", "+k+"]; } else { ",d+="}"),n+=" if ("+m+") { "+f+" = "+v+" = true; "+y+" = "+k+"; }";return e.compositeRule=p.compositeRule=b,n+=d+"if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n},pattern:function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(h?"(new RegExp("+n+"))":e.usePattern(s))+".test("+f+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=h?""+n:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+n+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},properties:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m="key"+i,g="idx"+i,v=h.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,w=Object.keys(o||{}).filter(T),x=e.schema.patternProperties||{},k=Object.keys(x).filter(T),E=e.schema.additionalProperties,S=w.length||k.length,P=!1===E,_="object"==typeof E&&Object.keys(E).length,A=e.opts.removeAdditional,C=P||_||A,F=e.opts.ownProperties,D=e.baseId,O=e.schema.required;if(O&&(!e.opts.$data||!O.$data)&&O.length<e.opts.loopRequired)var R=e.util.toHash(O);function T(e){return"__proto__"!==e}if(n+="var "+f+" = errors;var "+d+" = true;",F&&(n+=" var "+b+" = undefined;"),C){if(n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",S){if(n+=" var isAdditional"+i+" = !(false ",w.length)if(w.length>8)n+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var I=w;if(I)for(var j=-1,L=I.length-1;j<L;)K=I[j+=1],n+=" || "+m+" == "+e.util.toQuotedString(K)+" "}if(k.length){var q=k;if(q)for(var z=-1,M=q.length-1;z<M;)ae=q[z+=1],n+=" || "+e.usePattern(ae)+".test("+m+") "}n+=" ); if (isAdditional"+i+") { "}if("all"==A)n+=" delete "+l+"["+m+"]; ";else{var N=e.errorPath,B="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),P)if(A)n+=" delete "+l+"["+m+"]; ";else{n+=" "+d+" = false; ";var $=c;c=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+B+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,u&&(n+=" break; ")}else if(_)if("failing"==A){n+=" var "+f+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var H=l+"["+m+"]";h.dataPathArr[v]=m;var Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",n+=" if (!"+d+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+l+"["+m+"]; } ",e.compositeRule=h.compositeRule=V}else{h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; ")}e.errorPath=N}S&&(n+=" } "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}var G=e.opts.useDefaults&&!e.compositeRule;if(w.length){var W=w;if(W)for(var K,J=-1,Y=W.length-1;J<Y;){var X=o[K=W[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Z=e.util.getProperty(K),ee=(H=l+Z,G&&void 0!==X.default);h.schema=X,h.schemaPath=s+Z,h.errSchemaPath=c+"/"+e.util.escapeFragment(K),h.errorPath=e.util.getPath(e.errorPath,K,e.opts.jsonPointers),h.dataPathArr[v]=e.util.toQuotedString(K);Q=e.validate(h);if(h.baseId=D,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,H);var te=H}else{te=y;n+=" var "+y+" = "+H+"; "}if(ee)n+=" "+Q+" ";else{if(R&&R[K]){n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = false; ";N=e.errorPath,$=c;var re,ne=e.util.escapeQuotes(K);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(N,K,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+ne+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,e.errorPath=N,n+=" } else { "}else u?(n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = true; } else { "):(n+=" if ("+te+" !== undefined ",F&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=" ) { ");n+=" "+Q+" } "}}u&&(n+=" if ("+d+") { ",p+="}")}}if(k.length){var ie=k;if(ie)for(var ae,oe=-1,se=ie.length-1;oe<se;){X=x[ae=ie[oe+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){h.schema=X,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ae),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ae),n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",n+=" if ("+e.usePattern(ae)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; "),n+=" } ",u&&(n+=" else "+d+" = true; "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}}}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},propertyNames:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(n+="var "+f+" = errors;",e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=s,h.errSchemaPath=c;var d="key"+i,m="idx"+i,g="i"+i,v="' + "+d+" + '",y="data"+(h.dataLevel=e.dataLevel+1),b="dataProperties"+i,w=e.opts.ownProperties,x=e.baseId;w&&(n+=" var "+b+" = undefined; "),n+=w?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+d+" = "+b+"["+m+"]; ":" for (var "+d+" in "+l+") { ",n+=" var startErrs"+i+" = errors; ";var k=d,E=e.compositeRule;e.compositeRule=h.compositeRule=!0;var S=e.validate(h);h.baseId=x,e.util.varOccurences(S,y)<2?n+=" "+e.util.varReplace(S,y,k)+" ":n+=" var "+y+" = "+k+"; "+S+" ",e.compositeRule=h.compositeRule=E,n+=" if (!"+p+") { for (var "+g+"=startErrs"+i+"; "+g+"<errors; "+g+"++) { vErrors["+g+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { propertyName: '"+v+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+v+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),u&&(n+=" break; "),n+=" } }"}return u&&(n+=" if ("+f+" == errors) {"),n},required:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h=e.opts.$data&&o&&o.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ");var p="schema"+i;if(!h)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],m=o;if(m)for(var g,v=-1,y=m.length-1;v<y;){g=m[v+=1];var b=e.schema.properties[g];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(d[d.length]=g)}}else d=o;if(h||d.length){var w=e.errorPath,x=h||d.length>=e.opts.loopRequired,k=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),n+=" var "+f+" = true; ",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=" for (var "+_+" = 0; "+_+" < "+p+".length; "+_+"++) { "+f+" = "+l+"["+p+"["+_+"]] !== undefined ",k&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", "+p+"["+_+"]) "),n+="; if (!"+f+") break; } ",h&&(n+=" } "),n+=" if (!"+f+") { ",(C=C||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var P=d;if(P)for(var _=-1,A=P.length-1;_<A;){O=P[_+=1],_&&(n+=" || "),n+=" ( ( "+(j=l+(I=e.util.getProperty(O)))+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:I)+") ) "}n+=") { ";var C;E="' + "+(F="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,F,!0):w+" + "+F),(C=C||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var F;E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),h&&(n+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),n+=" for (var "+_+" = 0; "+_+" < "+p+".length; "+_+"++) { if ("+l+"["+p+"["+_+"]] === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", "+p+"["+_+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(n+=" } ")}else{var D=d;if(D)for(var O,R=-1,T=D.length-1;R<T;){O=D[R+=1];var I=e.util.getProperty(O),j=(E=e.util.escapeQuotes(O),l+I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,O,e.opts.jsonPointers)),n+=" if ( "+j+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=w}else u&&(n+=" if (true) {");return n},uniqueItems:function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h="valid"+a,p=e.opts.$data&&s&&s.$data;if(p?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(i+=" var "+h+"; if ("+n+" === false || "+n+" === undefined) "+h+" = true; else if (typeof "+n+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+f+".length , "+h+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+f+"[i], "+f+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+f+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](d,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+h+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i},validate:it},Kt=Wt,Jt=de.toHash,Yt=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Xt=et.MissingRef,Zt=function e(t,r,n){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(n=r,r=void 0);var a=o(t).then((function(){var e=i._addSchema(t,void 0,r);return e.validate||s(e)}));n&&a.then((function(e){n(null,e)}),n);return a;function o(t){var r=t.$schema;return r&&!i.getSchema(r)?e.call(i,{$ref:r},!0):Promise.resolve()}function s(e){try{return i._compile(e)}catch(t){if(t instanceof Xt)return function(t){var n=t.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+t.missingRef+" cannot be resolved");var a=i._loadingSchemas[n];a||(a=i._loadingSchemas[n]=i._opts.loadSchema(n)).then(c,c);return a.then((function(e){if(!u(n))return o(e).then((function(){u(n)||i.addSchema(e,n,void 0,r)}))})).then((function(){return s(e)}));function c(){delete i._loadingSchemas[n]}function u(e){return i._refs[e]||i._schemas[e]}}(t);throw t}}};var er={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},tr=er,rr={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:tr.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:tr.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},nr=/^[a-z_$][a-z0-9_$-]*$/i,ir=function(e,t,r){var n,i,a=" ",o=e.level,s=e.dataLevel,c=e.schema[t],u=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,h="data"+(s||""),p="valid"+o,d="errs__"+o,m=e.opts.$data&&c&&c.$data;m?(a+=" var schema"+o+" = "+e.util.getData(c.$data,s,e.dataPathArr)+"; ",i="schema"+o):i=c;var g,v,y,b,w,x=this,k="definition"+o,E=x.definition,S="";if(m&&E.$data){w="keywordValidate"+o;var P=E.validateSchema;a+=" var "+k+" = RULES.custom['"+t+"'].definition; var "+w+" = "+k+".validate;"}else{if(!(b=e.useCustomRule(x,c,e.schema,e)))return;i="validate.schema"+u,w=b.code,g=E.compile,v=E.inline,y=E.macro}var _=w+".errors",A="i"+o,C="ruleErr"+o,F=E.async;if(F&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(a+=_+" = null;"),a+="var "+d+" = errors;var "+p+";",m&&E.$data&&(S+="}",a+=" if ("+i+" === undefined) { "+p+" = true; } else { ",P&&(S+="}",a+=" "+p+" = "+k+".validateSchema("+i+"); if ("+p+") { ")),v)E.statements?a+=" "+b.validate+" ":a+=" "+p+" = "+b.validate+"; ";else if(y){var D=e.util.copy(e);S="";D.level++;var O="valid"+D.level;D.schema=b.validate,D.schemaPath="";var R=e.compositeRule;e.compositeRule=D.compositeRule=!0;var T=e.validate(D).replace(/validate\.schema/g,w);e.compositeRule=D.compositeRule=R,a+=" "+T}else{(q=q||[]).push(a),a="",a+=" "+w+".call( ",e.opts.passContext?a+="this":a+="self",g||!1===E.schema?a+=" , "+h+" ":a+=" , "+i+" , "+h+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var I=s?"data"+(s-1||""):"parentData",j=s?e.dataPathArr[s]:"parentDataProperty",L=a+=" , "+I+" , "+j+" , rootData ) ";a=q.pop(),!1===E.errors?(a+=" "+p+" = ",F&&(a+="await "),a+=L+"; "):a+=F?" var "+(_="customErrors"+o)+" = null; try { "+p+" = await "+L+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+_+" = e.errors; else throw e; } ":" "+_+" = null; "+p+" = "+L+"; "}if(E.modifying&&(a+=" if ("+I+") "+h+" = "+I+"["+j+"];"),a+=""+S,E.valid)f&&(a+=" if (true) { ");else{var q;a+=" if ( ",void 0===E.valid?(a+=" !",a+=y?""+O:""+p):a+=" "+!E.valid+" ",a+=") { ",n=x.keyword,(q=q||[]).push(a),a="",(q=q||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var z=a;a=q.pop(),!e.compositeRule&&f?e.async?a+=" throw new ValidationError(["+z+"]); ":a+=" validate.errors = ["+z+"]; return false; ":a+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var M=a;a=q.pop(),v?E.errors?"full"!=E.errors&&(a+=" for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(a+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),a+=" } "):!1===E.errors?a+=" "+M+" ":(a+=" if ("+d+" == errors) { "+M+" } else { for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(a+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),a+=" } } "):y?(a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):!1===E.errors?a+=" "+M+" ":(a+=" if (Array.isArray("+_+")) { if (vErrors === null) vErrors = "+_+"; else vErrors = vErrors.concat("+_+"); errors = vErrors.length; for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; "+C+'.schemaPath = "'+l+'"; ',e.opts.verbose&&(a+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),a+=" } } else { "+M+" } "),a+=" } ",f&&(a+=" else { ")}return a},ar=rr,or={add:function(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!nr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var n=t.type;if(Array.isArray(n))for(var i=0;i<n.length;i++)o(e,n[i],t);else o(e,n,t);var a=t.metaSchema;a&&(t.$data&&this._opts.$data&&(a={anyOf:[a,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(a,!0))}function o(e,t,n){for(var i,a=0;a<r.length;a++){var o=r[a];if(o.type==t){i=o;break}}i||(i={type:t,rules:[]},r.push(i));var s={keyword:e,definition:n,custom:!0,code:ir,implements:n.implements};i.rules.push(s),r.custom[e]=s}return r.keywords[e]=r.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var n=t[r].rules,i=0;i<n.length;i++)if(n[i].keyword==e){n.splice(i,1);break}return this},validate:function e(t,r){e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(ar,!0);if(n(t))return!0;if(e.errors=n.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}};var sr={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},cr=pt,ur=ze,lr=kt.exports,fr=Fe,hr=nt,pr=Lt,dr=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=Jt(t),e.types=Jt(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var n;if("object"==typeof r){var i=Object.keys(r)[0];n=r[i],r=i,n.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:Kt[r],implements:n}})),e.all.$comment={keyword:"$comment",code:Kt.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=Jt(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e},mr=function(e,t){for(var r=0;r<t.length;r++){e=JSON.parse(JSON.stringify(e));var n,i=t[r].split("/"),a=e;for(n=1;n<i.length;n++)a=a[i[n]];for(n=0;n<Yt.length;n++){var o=Yt[n],s=a[o];s&&(a[o]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},gr=de,vr=Er;Er.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);!0!==r.$async&&(this.errors=r.errors);return i},Er.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},Er.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],void 0,r,n);return this}var a=this._getId(e);if(void 0!==a&&"string"!=typeof a)throw new Error("schema id must be string");return Fr(this,t=ur.normalizeId(t||a)),this._schemas[t]=this._addSchema(e,r,n,!0),this},Er.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},Er.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(!(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(wr)?wr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,e);if(!n&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return n},Er.prototype.getSchema=function(e){var t=Sr(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=ur.schema.call(e,{schema:{}},t);if(r){var n=r.schema,i=r.root,a=r.baseId,o=cr.call(e,n,i,void 0,a);return e._fragments[t]=new fr({ref:t,fragment:!0,schema:n,root:i,baseId:a,validate:o}),o}}(this,e)}},Er.prototype.removeSchema=function(e){if(e instanceof RegExp)return Pr(this,this._schemas,e),Pr(this,this._refs,e),this;switch(typeof e){case"undefined":return Pr(this,this._schemas),Pr(this,this._refs),this._cache.clear(),this;case"string":var t=Sr(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,n=r?r(e):e;this._cache.del(n);var i=this._getId(e);i&&(i=ur.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},Er.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},Er.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,i="",a=0;a<e.length;a++){var o=e[a];o&&(i+=n+o.dataPath+" "+o.message+r)}return i.slice(0,-r.length)},Er.prototype._addSchema=function(e,t,r,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var i=this._opts.serialize,a=i?i(e):e,o=this._cache.get(a);if(o)return o;n=n||!1!==this._opts.addUsedSchema;var s=ur.normalizeId(this._getId(e));s&&n&&Fr(this,s);var c,u=!1!==this._opts.validateSchema&&!t;u&&!(c=s&&s==ur.normalizeId(e.$schema))&&this.validateSchema(e,!0);var l=ur.ids.call(this,e),f=new fr({id:s,schema:e,localRefs:l,cacheKey:a,meta:r});"#"!=s[0]&&n&&(this._refs[s]=f);this._cache.put(a,f),u&&c&&this.validateSchema(e,!0);return f},Er.prototype._compile=function(e,t){if(e.compiling)return e.validate=i,i.schema=e.schema,i.errors=null,i.root=t||i,!0===e.schema.$async&&(i.$async=!0),i;var r,n;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{n=cr.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=n,e.refs=n.refs,e.refVal=n.refVal,e.root=n.root,n;function i(){var t=e.validate,r=t.apply(this,arguments);return i.errors=t.errors,r}},Er.prototype.compileAsync=Zt;var yr=or;Er.prototype.addKeyword=yr.add,Er.prototype.getKeyword=yr.get,Er.prototype.removeKeyword=yr.remove,Er.prototype.validateKeyword=yr.validate;var br=et;Er.ValidationError=br.Validation,Er.MissingRefError=br.MissingRef,Er.$dataMetaSchema=mr;var wr="http://json-schema.org/draft-07/schema",xr=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],kr=["/properties"];function Er(e){if(!(this instanceof Er))return new Er(e);e=this._opts=gr.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:Dr,warn:Dr,error:Dr};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=pr(e.format),this._cache=e.cache||new lr,this._loadingSchemas={},this._compilations=[],this.RULES=dr(),this._getId=function(e){switch(e.schemaId){case"auto":return Cr;case"id":return _r;default:return Ar}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=hr),this._metaOpts=function(e){for(var t=gr.copy(e._opts),r=0;r<xr.length;r++)delete t[xr[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;e._opts.$data&&(t=sr,e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=er;e._opts.$data&&(r=mr(r,kr));e.addMetaSchema(r,wr,!0),e._refs["http://json-schema.org/schema"]=wr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function Sr(e,t){return t=ur.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function Pr(e,t,r){for(var n in t){var i=t[n];i.meta||r&&!r.test(n)||(e._cache.del(i.cacheKey),delete t[n])}}function _r(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Ar(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function Cr(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function Fr(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function Dr(){}var Or,Rr={exports:{}},Tr={exports:{}};Tr.exports=(Or=Or||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==ce&&ce.crypto&&(r=ce.crypto),!r)try{r=require("crypto")}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},o=a.lib={},s=o.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=o.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a<i;a++){var o=r[a>>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=a.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,a=n.sigBytes,o=this.blockSize,s=a/(4*o),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,l=e.min(4*u,a);if(u){for(var f=0;f<u;f+=o)this._doProcessBlock(i,f);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new d.HMAC.init(e,r).finalize(t)}}});var d=a.algo={};return a}(Math),Or);var Ir={exports:{}};Ir.exports=function(e){return function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],a=0,o=0;o<t;o++)if(o%4){var s=n[e.charCodeAt(o-1)]<<o%4*2|n[e.charCodeAt(o)]>>>6-o%4*2;i[a>>>2]|=s<<24-a%4*8,a++}return r.create(i,a)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a<r;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<r;s++)i.push(n.charAt(o>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a<r.length;a++)i[r.charCodeAt(a)]=a}var o=r.charAt(64);if(o){var s=e.indexOf(o);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(Tr.exports);var jr={exports:{}};jr.exports=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,a=n.Hasher,o=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],d=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],x=e[t+10],k=e[t+11],E=e[t+12],S=e[t+13],P=e[t+14],_=e[t+15],A=a[0],C=a[1],F=a[2],D=a[3];A=u(A,C,F,D,o,7,s[0]),D=u(D,A,C,F,c,12,s[1]),F=u(F,D,A,C,p,17,s[2]),C=u(C,F,D,A,d,22,s[3]),A=u(A,C,F,D,m,7,s[4]),D=u(D,A,C,F,g,12,s[5]),F=u(F,D,A,C,v,17,s[6]),C=u(C,F,D,A,y,22,s[7]),A=u(A,C,F,D,b,7,s[8]),D=u(D,A,C,F,w,12,s[9]),F=u(F,D,A,C,x,17,s[10]),C=u(C,F,D,A,k,22,s[11]),A=u(A,C,F,D,E,7,s[12]),D=u(D,A,C,F,S,12,s[13]),F=u(F,D,A,C,P,17,s[14]),A=l(A,C=u(C,F,D,A,_,22,s[15]),F,D,c,5,s[16]),D=l(D,A,C,F,v,9,s[17]),F=l(F,D,A,C,k,14,s[18]),C=l(C,F,D,A,o,20,s[19]),A=l(A,C,F,D,g,5,s[20]),D=l(D,A,C,F,x,9,s[21]),F=l(F,D,A,C,_,14,s[22]),C=l(C,F,D,A,m,20,s[23]),A=l(A,C,F,D,w,5,s[24]),D=l(D,A,C,F,P,9,s[25]),F=l(F,D,A,C,d,14,s[26]),C=l(C,F,D,A,b,20,s[27]),A=l(A,C,F,D,S,5,s[28]),D=l(D,A,C,F,p,9,s[29]),F=l(F,D,A,C,y,14,s[30]),A=f(A,C=l(C,F,D,A,E,20,s[31]),F,D,g,4,s[32]),D=f(D,A,C,F,b,11,s[33]),F=f(F,D,A,C,k,16,s[34]),C=f(C,F,D,A,P,23,s[35]),A=f(A,C,F,D,c,4,s[36]),D=f(D,A,C,F,m,11,s[37]),F=f(F,D,A,C,y,16,s[38]),C=f(C,F,D,A,x,23,s[39]),A=f(A,C,F,D,S,4,s[40]),D=f(D,A,C,F,o,11,s[41]),F=f(F,D,A,C,d,16,s[42]),C=f(C,F,D,A,v,23,s[43]),A=f(A,C,F,D,w,4,s[44]),D=f(D,A,C,F,E,11,s[45]),F=f(F,D,A,C,_,16,s[46]),A=h(A,C=f(C,F,D,A,p,23,s[47]),F,D,o,6,s[48]),D=h(D,A,C,F,y,10,s[49]),F=h(F,D,A,C,P,15,s[50]),C=h(C,F,D,A,g,21,s[51]),A=h(A,C,F,D,E,6,s[52]),D=h(D,A,C,F,d,10,s[53]),F=h(F,D,A,C,x,15,s[54]),C=h(C,F,D,A,c,21,s[55]),A=h(A,C,F,D,b,6,s[56]),D=h(D,A,C,F,_,10,s[57]),F=h(F,D,A,C,v,15,s[58]),C=h(C,F,D,A,S,21,s[59]),A=h(A,C,F,D,m,6,s[60]),D=h(D,A,C,F,k,10,s[61]),F=h(F,D,A,C,p,15,s[62]),C=h(C,F,D,A,w,21,s[63]),a[0]=a[0]+A|0,a[1]=a[1]+C|0,a[2]=a[2]+F|0,a[3]=a[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var a=t.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<<a|s>>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<<a|s>>>32-a)+t}function h(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<<a|s>>>32-a)+t}r.MD5=a._createHelper(c),r.HmacMD5=a._createHmacHelper(c)}(Math),e.MD5}(Tr.exports);var Lr={exports:{}},qr={exports:{}};qr.exports=function(e){return r=(t=e).lib,n=r.WordArray,i=r.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],c=r[4],u=0;u<80;u++){if(u<16)o[u]=0|e[t+u];else{var l=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=l<<1|l>>>31}var f=(n<<5|n>>>27)+c+o[u];f+=u<20?1518500249+(i&a|~i&s):u<40?1859775393+(i^a^s):u<60?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,c=s,s=a,a=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s),e.SHA1;var t,r,n,i,a,o,s}(Tr.exports);var zr={exports:{}};zr.exports=function(e){var t,r,n;r=(t=e).lib.Base,n=t.enc.Utf8,t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,c=o.words,u=0;u<r;u++)s[u]^=1549556828,c[u]^=909522486;a.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}(Tr.exports),Lr.exports=function(e){return r=(t=e).lib,n=r.Base,i=r.WordArray,a=t.algo,o=a.MD5,s=a.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,a=n.hasher.create(),o=i.create(),s=o.words,c=n.keySize,u=n.iterations;s.length<c;){r&&a.update(r),r=a.update(e).finalize(t),a.reset();for(var l=1;l<u;l++)r=a.finalize(r),a.reset();o.concat(r)}return o.sigBytes=4*c,o}}),t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)},e.EvpKDF;var t,r,n,i,a,o,s}(Tr.exports);var Mr={exports:{}};Mr.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,a=n.WordArray,o=n.BufferedBlockAlgorithm,s=r.enc;s.Utf8;var c=s.Base64,u=r.algo.EvpKDF,l=n.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=r.mode={},h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=f.CBC=function(){var e=h.extend();function r(e,r,n){var i,a=this._iv;a?(i=a,this._iv=t):i=this._prevBlock;for(var o=0;o<n;o++)e[r+o]^=i[o]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,a=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=a}}),e}(),d=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,o=[],s=0;s<n;s+=4)o.push(i);var c=a.create(o,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:d}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?a.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=a.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(r.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=u.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=v.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}()}(Tr.exports),Rr.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],a=[],o=[],s=[],c=[],u=[],l=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,a[d]=r;var m=e[r],g=e[m],v=e[g],y=257*e[d]^16843008*d;o[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[d]=y<<24|y>>>8,f[d]=y<<16|y>>>16,h[d]=y<<8|y>>>24,p[d]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o<n;o++)o<r?a[o]=t[o]:(u=a[o-1],o%r?r>6&&o%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=d[o/r|0]<<24),a[o]=a[o-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(o=n-c,c%4)var u=a[o];else u=a[o-4];s[c]=c<4||o<=4?u:l[i[u>>>24]]^f[i[u>>>16&255]]^h[i[u>>>8&255]]^p[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,p,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d<c;d++){var m=n[u>>>24]^i[l>>>16&255]^a[f>>>8&255]^o[255&h]^r[p++],g=n[l>>>24]^i[f>>>16&255]^a[h>>>8&255]^o[255&u]^r[p++],v=n[f>>>24]^i[h>>>16&255]^a[u>>>8&255]^o[255&l]^r[p++],y=n[h>>>24]^i[u>>>16&255]^a[l>>>8&255]^o[255&f]^r[p++];u=m,l=g,f=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^r[p++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[p++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[p++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[p++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});t.AES=r._createHelper(m)}(),e.AES}(Tr.exports);var Nr={exports:{}};Nr.exports=function(e){return e.enc.Utf8}(Tr.exports);var Br={}.hasOwnProperty;function $r(e,t){var r=t||{};function n(t){var r=n.invalid,i=n.handlers;if(t&&Br.call(t,e)&&(r=Br.call(i,t[e])?i[t[e]]:n.unknown),r)return r.apply(this,arguments)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}function Ur(e){return Array.isArray(e.children)}const Vr={}.hasOwnProperty,Hr=$r("nestingOperator",{unknown:function(e){throw new Error("Unexpected nesting `"+e.nestingOperator+"`")},invalid:function(e,t,r,n,i){if(n)throw new Error("topScan is supposed to be called from the root node");if(!i.iterator)throw new Error("Expected `iterator` to be defined");if("number"!=typeof r)throw new TypeError("Expected `index` to be defined");i.iterator(e,t,r,n,i),i.shallow||Gr(e,t,r,n,i)},handlers:{null:Gr,">":Wr,"+":function(e,t,r,n,i){if("number"!=typeof r)throw new TypeError("Expected `index` to be defined");if(!n)return;new Kr(e,n,i).prefillTypeIndex(0,++r).each(r,++r).prefillTypeIndex(r).done()},"~":function(e,t,r,n,i){if("number"!=typeof r)throw new TypeError("Expected `index` to be defined");if(!n)return;new Kr(e,n,i).prefillTypeIndex(0,++r).each(r).done()}}}),Qr=Hr;function Gr(e,t,r,n,i){if(!i.iterator)throw new Error("Expected `iterator` to be defined");const a=i.iterator;i.iterator=function e(t,r,n,i,o){if(o.iterator=a,a(t,r,n,i,o),o.iterator=e,o.one&&o.found)return;Wr(t,r,n,i,o)},Wr(e,t,r,n,i)}function Wr(e,t,r,n,i){Ur(t)&&0!==t.children.length&&new Kr(e,t,i).each().done()}class Kr{constructor(e,t,r){this.query=e,this.parent=t,this.state=r,this.typeIndex=r.index?new Jr:void 0,this.delayed=[]}prefillTypeIndex(e,t){let[r,n]=this.defaults(e,t);if(this.typeIndex)for(;r<n;)this.typeIndex.index(this.parent.children[r]),r++;return this}each(e,t){const[r,n]=this.defaults(e,t),i=this.parent.children[r];let a,o;if(r>=n)return this;if(this.typeIndex)o=this.typeIndex.nodes,a=this.typeIndex.index(i),this.delayed.push((function(){if(!this.typeIndex)throw new TypeError("Expected `typeIndex` to be defined");if(!this.state.iterator)throw new Error("Expected `iterator` to be defined");this.state.typeIndex=a,this.state.nodeIndex=o,this.state.typeCount=this.typeIndex.count(i),this.state.nodeCount=this.typeIndex.nodes,this.state.iterator(this.query,i,r,this.parent,this.state)}));else{if(!this.state.iterator)throw new Error("Expected `iterator` to be defined");this.state.iterator(this.query,i,r,this.parent,this.state)}return this.state.one&&this.state.found?this:this.each(r+1,n)}done(){let e=-1;for(;++e<this.delayed.length&&(this.delayed[e].call(this),!this.state.one||!this.state.found););return this}defaults(e,t){return(null==e||e<0)&&(e=0),(null==t||t>this.parent.children.length)&&(t=this.parent.children.length),[e,t]}}class Jr{constructor(){this.counts={},this.nodes=0}index(e){const t=e.type;return this.nodes++,Vr.call(this.counts,t)||(this.counts[t]=0),this.counts[t]++}count(e){return this.counts[e.type]}}const Yr=function(e){if(null==e)return Zr;if("string"==typeof e)return function(e){return Xr(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Yr(e[r]);return Xr(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].call(this,...e))return!0;return!1}}(e):function(e){return Xr(t);function t(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}(e);if("function"==typeof e)return Xr(e);throw new Error("Expected function, string, or object as test")};function Xr(e){return function(...t){return Boolean(e.call(this,...t))}}function Zr(){return!0}var en=Object.freeze({__proto__:null,is:function e(t,r,n,i,a){const o=Yr(r);if(null!=n&&("number"!=typeof n||n<0||n===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(!(null==i||e(i)&&i.children))throw new Error("Expected parent node");if(null==i!=(null==n))throw new Error("Expected both parent and index");return!(!t||!t.type||"string"!=typeof t.type)&&Boolean(o.call(a,t,n,i))},convert:Yr});const tn=Yr(),rn=$r("name",{unknown:function(e){if(e.name)throw new Error("Unknown pseudo-selector `"+e.name+"`");throw new Error("Unexpected pseudo-element or empty pseudo-class")},invalid:function(){throw new Error("Invalid pseudo-selector")},handlers:{any:an,blank:on,empty:on,"first-child":function(e,t,r,n,i){return sn(i,e),0===i.nodeIndex},"first-of-type":function(e,t,r,n,i){return sn(i,e),0===i.typeIndex},has:function(e,t,r,n,i){const a=i.shallow,o=i.one,s=i.scopeNodes,c=function(e){const t="ruleSet"===e.type?{type:"selectors",selectors:[e]}:e;let r,n=-1;for(;++n<t.selectors.length;)r=t.selectors[n].rule,r.nestingOperator=null,r.pseudos&&1===r.pseudos.length&&"scope"===r.pseudos[0].name||(t.selectors[n]={type:"ruleSet",rule:{type:"rule",rule:r,pseudos:[{name:"scope"}]}});return t}(e.value),u=i.any;i.shallow=!1,i.one=!0,i.scopeNodes=[t];const l=Boolean(u(c,t,i)[0]);return i.shallow=a,i.one=o,i.scopeNodes=s,l},"last-child":function(e,t,r,n,i){return sn(i,e),"number"==typeof i.nodeCount&&i.nodeIndex===i.nodeCount-1},"last-of-type":function(e,t,r,n,i){return sn(i,e),"number"==typeof i.typeCount&&i.typeIndex===i.typeCount-1},matches:an,not:function(e,t,r,n,i){return!an(e,t,r,n,i)},"nth-child":function(e,t,r,n,i){return sn(i,e),"number"==typeof i.nodeIndex&&e.value(i.nodeIndex)},"nth-last-child":function(e,t,r,n,i){return sn(i,e),"number"==typeof i.nodeCount&&"number"==typeof i.nodeIndex&&e.value(i.nodeCount-i.nodeIndex-1)},"nth-of-type":function(e,t,r,n,i){return sn(i,e),"number"==typeof i.typeIndex&&e.value(i.typeIndex)},"nth-last-of-type":function(e,t,r,n,i){return sn(i,e),"number"==typeof i.typeIndex&&"number"==typeof i.typeCount&&e.value(i.typeCount-1-i.typeIndex)},"only-child":function(e,t,r,n,i){return sn(i,e),1===i.nodeCount},"only-of-type":function(e,t,r,n,i){return sn(i,e),1===i.typeCount},root:function(e,t,r,n){return tn(t)&&!n},scope:function(e,t,r,n,i){return tn(t)&&void 0!==i.scopeNodes&&i.scopeNodes.includes(t)}}});function nn(e,t,r,n,i){const a=e.pseudos;let o=-1;for(;++o<a.length;)if(!rn(a[o],t,r,n,i))return!1;return!0}function an(e,t,r,n,i){const a=i.shallow,o=i.one;i.one=!0,i.shallow=!0;const s=i.any(e.value,t,i)[0]===t;return i.shallow=a,i.one=o,s}function on(e,t){return Ur(t)?0===t.children.length:!("value"in t)}function sn(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}nn.needsIndex=["first-child","first-of-type","last-child","last-of-type","nth-child","nth-last-child","nth-of-type","nth-last-of-type","only-child","only-of-type"];const cn=$r("operator",{unknown:function(e){throw new Error("Unknown operator `"+e.operator+"`")},invalid:un,handlers:{"=":function(e,t){return un(e,t)&&String(t[e.name])===e.value},"^=":function(e,t){const r=t[e.name];return e.value&&"string"==typeof r&&r.slice(0,e.value.length)===e.value},"$=":function(e,t){const r=t[e.name];return e.value&&"string"==typeof r&&r.slice(-e.value.length)===e.value},"*=":function(e,t){const r=t[e.name];return e.value&&"string"==typeof r&&r.includes(e.value)},"~=":function(e,t){const r=t[e.name];if(null==r)return!1;if(Array.isArray(r)&&r.includes(e.value))return!0;return String(r)===e.value}}});function un(e,t){return null!==t[e.name]&&void 0!==t[e.name]}function ln(e,t,r,n,i){if(e.id)throw new Error("Invalid selector: id");if(e.classNames)throw new Error("Invalid selector: class");return Boolean(t&&(!e.tagName||function(e,t){return"*"===e.tagName||e.tagName===t.type}(e,t))&&(!e.attrs||function(e,t){let r=-1;for(;++r<e.attrs.length;)if(!cn(e.attrs[r],t))return!1;return!0}(e,t))&&(!e.pseudos||nn(e,t,r,n,i)))}const fn=$r("type",{unknown:function(e){throw new Error("Unknown type `"+e.type+"`")},invalid:function(){throw new Error("Invalid type")},handlers:{selectors:function(e,t,r){const n=gn(r.one);let i=-1;for(;++i<e.selectors.length;)n(pn(e.selectors[i],t,r));return n.result},ruleSet:pn,rule:dn}});function hn(e,t,r){return e&&t?fn(e,t,r):[]}function pn(e,t,r){return dn(e.rule,t,r)}function dn(e,t,r){const n=gn(r.one);if(r.shallow&&e.rule)throw new Error("Expected selector without nesting");var i;return Qr(e,t,0,null,mn(e,{scopeNodes:(i=t,"RootNode"===i.type||"root"===i.type?t.children:[t]),index:!1,iterator:function(e,t,r,i,a){ln(e,t,r,i,a)&&(e.rule?Qr(e.rule,t,r,i,mn(e.rule,a)):(n(t),a.found=!0))},one:r.one,shallow:r.shallow,any:r.any})),n.result}function mn(e,t){const r=e.pseudos||[];let n=-1;for(;++n<r.length;)if(nn.needsIndex.includes(r[n].name)){t.index=!0;break}return t}function gn(e){const t=[];let r;return n.result=t,n;function n(e){let t=-1;if("length"in e)for(;++t<e.length;)i(e[t]);else i(e)}function i(n){if(e){if(r)throw new Error("Cannot collect multiple nodes");r=!0}t.includes(n)||t.push(n)}}var vn,yn={},bn={},wn={};vn=wn,Object.defineProperty(vn,"__esModule",{value:!0}),vn.isIdentStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e},vn.isIdent=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e},vn.isHex=function(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"},vn.escapeIdentifier=function(e){for(var t=e.length,r="",n=0;n<t;){var i=e.charAt(n);if(vn.identSpecialChars[i])r+="\\"+i;else if("_"===i||"-"===i||i>="A"&&i<="Z"||i>="a"&&i<="z"||0!==n&&i>="0"&&i<="9")r+=i;else{var a=i.charCodeAt(0);if(55296==(63488&a)){var o=e.charCodeAt(n++);if(55296!=(64512&a)||56320!=(64512&o))throw Error("UCS-2(decode): illegal sequence");a=((1023&a)<<10)+(1023&o)+65536}r+="\\"+a.toString(16)+" "}n++}return r},vn.escapeStr=function(e){for(var t,r=e.length,n="",i=0;i<r;){var a=e.charAt(i);'"'===a?a='\\"':"\\"===a?a="\\\\":void 0!==(t=vn.strReplacementsRev[a])&&(a=t),n+=a,i++}return'"'+n+'"'},vn.identSpecialChars={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},vn.strReplacementsRev={"\n":"\\n","\r":"\\r","\t":"\\t","\f":"\\f","\v":"\\v"},vn.singleQuoteEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\","'":"'"},vn.doubleQuotesEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\",'"':'"'},Object.defineProperty(bn,"__esModule",{value:!0});var xn=wn;bn.parseCssSelector=function(e,t,r,n,i,a){var o=e.length,s="";function c(r,n){var i="";for(t++,s=e.charAt(t);t<o;){if(s===r)return t++,i;if("\\"===s){t++;var a=void 0;if((s=e.charAt(t))===r)i+=r;else if(void 0!==(a=n[s]))i+=a;else{if(xn.isHex(s)){var c=s;for(t++,s=e.charAt(t);xn.isHex(s);)c+=s,t++,s=e.charAt(t);" "===s&&(t++,s=e.charAt(t)),i+=String.fromCharCode(parseInt(c,16));continue}i+=s}}else i+=s;t++,s=e.charAt(t)}return i}function u(){var r="";for(s=e.charAt(t);t<o;){if(xn.isIdent(s))r+=s;else{if("\\"!==s)return r;if(++t>=o)throw Error("Expected symbol but end of file reached.");if(s=e.charAt(t),xn.identSpecialChars[s])r+=s;else{if(xn.isHex(s)){var n=s;for(t++,s=e.charAt(t);xn.isHex(s);)n+=s,t++,s=e.charAt(t);" "===s&&(t++,s=e.charAt(t)),r+=String.fromCharCode(parseInt(n,16));continue}r+=s}}t++,s=e.charAt(t)}return r}function l(){s=e.charAt(t);for(var r=!1;" "===s||"\t"===s||"\n"===s||"\r"===s||"\f"===s;)r=!0,t++,s=e.charAt(t);return r}function f(){var r=h();if(!r)return null;var n=r;for(s=e.charAt(t);","===s;){if(t++,l(),"selectors"!==n.type&&(n={type:"selectors",selectors:[r]}),!(r=h()))throw Error('Rule expected after ",".');n.selectors.push(r)}return n}function h(){l();var r={type:"ruleSet"},n=p();if(!n)return null;for(var a=r;n&&(n.type="rule",a.rule=n,a=n,l(),s=e.charAt(t),!(t>=o||","===s||")"===s));)if(i[s]){var c=s;if(t++,l(),!(n=p()))throw Error('Rule expected after "'+c+'".');n.nestingOperator=c}else(n=p())&&(n.nestingOperator=null);return r}function p(){for(var i=null;t<o;)if("*"===(s=e.charAt(t)))t++,(i=i||{}).tagName="*";else if(xn.isIdentStart(s)||"\\"===s)(i=i||{}).tagName=u();else if("."===s)t++,((i=i||{}).classNames=i.classNames||[]).push(u());else if("#"===s)t++,(i=i||{}).id=u();else if("["===s){t++,l();var h={name:u()};if(l(),"]"===s)t++;else{var p="";if(n[s]&&(p=s,t++,s=e.charAt(t)),t>=o)throw Error('Expected "=" but end of file reached.');if("="!==s)throw Error('Expected "=" but "'+s+'" found.');h.operator=p+"=",t++,l();var d="";if(h.valueType="string",'"'===s)d=c('"',xn.doubleQuotesEscapeChars);else if("'"===s)d=c("'",xn.singleQuoteEscapeChars);else if(a&&"$"===s)t++,d=u(),h.valueType="substitute";else{for(;t<o&&"]"!==s;)d+=s,t++,s=e.charAt(t);d=d.trim()}if(l(),t>=o)throw Error('Expected "]" but end of file reached.');if("]"!==s)throw Error('Expected "]" but "'+s+'" found.');t++,h.value=d}((i=i||{}).attrs=i.attrs||[]).push(h)}else{if(":"!==s)break;t++;var m=u(),g={name:m};if("("===s){t++;var v="";if(l(),"selector"===r[m])g.valueType="selector",v=f();else{if(g.valueType=r[m]||"string",'"'===s)v=c('"',xn.doubleQuotesEscapeChars);else if("'"===s)v=c("'",xn.singleQuoteEscapeChars);else if(a&&"$"===s)t++,v=u(),g.valueType="substitute";else{for(;t<o&&")"!==s;)v+=s,t++,s=e.charAt(t);v=v.trim()}l()}if(t>=o)throw Error('Expected ")" but end of file reached.');if(")"!==s)throw Error('Expected ")" but "'+s+'" found.');t++,g.value=v}((i=i||{}).pseudos=i.pseudos||[]).push(g)}return i}return function(){var r=f();if(t<o)throw Error('Rule expected but "'+e.charAt(t)+'" found.');return r}()};var kn={};Object.defineProperty(kn,"__esModule",{value:!0});var En=wn;kn.renderEntity=function e(t){var r="";switch(t.type){case"ruleSet":for(var n=t.rule,i=[];n;)n.nestingOperator&&i.push(n.nestingOperator),i.push(e(n)),n=n.rule;r=i.join(" ");break;case"selectors":r=t.selectors.map(e).join(", ");break;case"rule":t.tagName&&(r="*"===t.tagName?"*":En.escapeIdentifier(t.tagName)),t.id&&(r+="#"+En.escapeIdentifier(t.id)),t.classNames&&(r+=t.classNames.map((function(e){return"."+En.escapeIdentifier(e)})).join("")),t.attrs&&(r+=t.attrs.map((function(e){return"operator"in e?"substitute"===e.valueType?"["+En.escapeIdentifier(e.name)+e.operator+"$"+e.value+"]":"["+En.escapeIdentifier(e.name)+e.operator+En.escapeStr(e.value)+"]":"["+En.escapeIdentifier(e.name)+"]"})).join("")),t.pseudos&&(r+=t.pseudos.map((function(t){return t.valueType?"selector"===t.valueType?":"+En.escapeIdentifier(t.name)+"("+e(t.value)+")":"substitute"===t.valueType?":"+En.escapeIdentifier(t.name)+"($"+t.value+")":"numeric"===t.valueType?":"+En.escapeIdentifier(t.name)+"("+t.value+")":":"+En.escapeIdentifier(t.name)+"("+En.escapeIdentifier(t.value)+")":":"+En.escapeIdentifier(t.name)})).join(""));break;default:throw Error('Unknown entity type: "'+t.type+'".')}return r},Object.defineProperty(yn,"__esModule",{value:!0});var Sn=bn,Pn=kn,_n=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.pseudos[i]="selector"}return this},e.prototype.unregisterSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.pseudos[i]}return this},e.prototype.registerNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.pseudos[i]="numeric"}return this},e.prototype.unregisterNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.pseudos[i]}return this},e.prototype.registerNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.ruleNestingOperators[i]=!0}return this},e.prototype.unregisterNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.ruleNestingOperators[i]}return this},e.prototype.registerAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.attrEqualityMods[i]=!0}return this},e.prototype.unregisterAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.attrEqualityMods[i]}return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},e.prototype.parse=function(e){return Sn.parseCssSelector(e,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},e.prototype.render=function(e){return Pn.renderEntity(e).trim()},e}(),An=yn.CssSelectorParser=_n,Cn={},Fn={};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.parse=void 0;var Dn=new Set([9,10,12,13,32]),On="0".charCodeAt(0),Rn="9".charCodeAt(0);Fn.parse=function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t=0,r=0,n=a(),i=o();if(t<e.length&&"n"===e.charAt(t)&&(t++,r=n*(null!=i?i:1),s(),t<e.length?(n=a(),s(),i=o()):n=i=0),null===i||t<e.length)throw new Error("n-th rule couldn't be parsed ('"+e+"')");return[r,n*i];function a(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function o(){for(var r=t,n=0;t<e.length&&e.charCodeAt(t)>=On&&e.charCodeAt(t)<=Rn;)n=10*n+(e.charCodeAt(t)-On),t++;return t===r?null:n}function s(){for(;t<e.length&&Dn.has(e.charCodeAt(t));)t++}};var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.compile=void 0;var In={trueFunc:function(){return!0},falseFunc:function(){return!1}};Tn.compile=function(e){var t=e[0],r=e[1]-1;if(r<0&&t<=0)return In.falseFunc;if(-1===t)return function(e){return e<=r};if(0===t)return function(e){return e===r};if(1===t)return r<0?In.trueFunc:function(e){return e>=r};var n=Math.abs(t),i=(r%n+n)%n;return t>1?function(e){return e>=r&&e%n===i}:function(e){return e<=r&&e%n===i}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compile=e.parse=void 0;var t=Fn;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return t.parse}});var r=Tn;Object.defineProperty(e,"compile",{enumerable:!0,get:function(){return r.compile}}),e.default=function(e){return(0,r.compile)((0,t.parse)(e))}}(Cn);const jn=ue(Cn).default,Ln=new Set(["nth-child","nth-last-child","nth-of-type","nth-last-of-type"]),qn=new An;qn.registerAttrEqualityMods("~","^","$","*"),qn.registerSelectorPseudos("any","matches","not","has"),qn.registerNestingOperators(">","+","~");const zn=$r("type",{handlers:{selectors:function(e){const t=e.selectors;let r=-1;for(;++r<t.length;)zn(t[r]);return e},ruleSet:function(e){return Nn(e.rule)},rule:Nn}});function Mn(e){if("string"!=typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return zn(qn.parse(e))}function Nn(e){const t=e.pseudos||[];let r,n=-1;for(;++n<t.length;)r=t[n],Ln.has(r.name)&&(r.value=jn(r.value),r.valueType="function");return zn(e.rule),e}var Bn=le(Object.freeze({__proto__:null,matches:function(e,t){return Boolean(hn(Mn(e),t,{one:!0,shallow:!0,any:hn})[0])},select:function(e,t){return hn(Mn(e),t,{one:!0,any:hn})[0]||null},selectAll:function(e,t){return hn(Mn(e),t,{any:hn})}}));function $n(e){if(e)throw e}
2
+ "use strict";var e=require("commander"),t=require("tmp"),r=require("path"),n=require("consola"),i=require("lodash"),a=require("process"),o=require("url"),s=require("assert"),c=require("http"),u=require("https"),l=require("stream"),f=require("zlib"),h=require("cross-spawn"),p=require("fs"),d=require("vm2"),m=require("js-yaml"),g=require("canvas"),v=require("fs-extra"),y=require("pinyin-pro"),b=require("fstream-ignore"),w=require("archiver"),x=require("tar-pack"),k=require("ejs"),E=require("lookpath"),S=require("jsdom"),P=require("mime-types"),_=require("os"),A=require("constants"),C=require("util"),F=require("events"),D=require("crypto");function O(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function R(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var T=O(t),I=O(r),j=O(n),L=O(i),q=O(a),z=O(o),M=O(s),N=O(c),B=O(u),$=O(l),U=O(f),V=O(h),H=R(p),Q=O(p),G=O(m),W=O(v),K=O(b),J=O(w),Y=O(k),X=O(S),Z=O(P),ee=O(_),te=O(A),re=O(C),ne=O(F),ie=O(D);const ae=j.default.create({});var oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function se(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ce(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var ue={},le={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function a(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function o(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function s(e){var n="[A-Za-z]",i="[0-9]",a=t(i,"[A-Fa-f]"),o=r(r("%[EFef]"+a+"%"+a+a+"%"+a+a)+"|"+r("%[89A-Fa-f]"+a+"%"+a+a)+"|"+r("%"+a+a)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",s),u=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(o+"|"+t(l,s,"[\\:]"))+"*");var f=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),h=r(f+"\\."+f+"\\."+f+"\\."+f),p=r(a+"{1,4}"),d=r(r(p+"\\:"+p)+"|"+h),m=r(r(p+"\\:")+"{6}"+d),g=r("\\:\\:"+r(p+"\\:")+"{5}"+d),v=r(r(p)+"?\\:\\:"+r(p+"\\:")+"{4}"+d),y=r(r(r(p+"\\:")+"{0,1}"+p)+"?\\:\\:"+r(p+"\\:")+"{3}"+d),b=r(r(r(p+"\\:")+"{0,2}"+p)+"?\\:\\:"+r(p+"\\:")+"{2}"+d),w=r(r(r(p+"\\:")+"{0,3}"+p)+"?\\:\\:"+p+"\\:"+d),x=r(r(r(p+"\\:")+"{0,4}"+p)+"?\\:\\:"+d),k=r(r(r(p+"\\:")+"{0,5}"+p)+"?\\:\\:"+p),E=r(r(r(p+"\\:")+"{0,6}"+p)+"?\\:\\:"),S=r([m,g,v,y,b,w,x,k,E].join("|")),P=r(r(l+"|"+o)+"+");r("[vV]"+a+"+\\."+t(l,s,"[\\:]")+"+"),r(r(o+"|"+t(l,s))+"*");var _=r(o+"|"+t(l,s,"[\\:\\@]"));return r(r(o+"|"+t(l,s,"[\\@]"))+"+"),r(r(_+"|"+t("[\\/\\?]",u))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",u),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,c),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+S+")"+r(r("\\%25|\\%(?!"+a+"{2})")+"("+P+")")+"?\\]?$")}}var c=s(!1),u=s(!0),l=function(){function e(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},h=2147483647,p=36,d=1,m=26,g=38,v=700,y=72,b=128,w="-",x=/^xn--/,k=/[^\0-\x7E]/,E=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=p-d,_=Math.floor,A=String.fromCharCode;function C(e){throw new RangeError(S[e])}function F(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function D(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+F((e=e.replace(E,".")).split("."),t).join(".")}function O(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var a=e.charCodeAt(r++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),r--)}else t.push(i)}return t}var R=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},T=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},I=function(e,t,r){var n=0;for(e=r?_(e/v):e>>1,e+=_(e/t);e>P*m>>1;n+=p)e=_(e/P);return _(n+(P+1)*e/(e+g))},j=function(e){var t=[],r=e.length,n=0,i=b,a=y,o=e.lastIndexOf(w);o<0&&(o=0);for(var s=0;s<o;++s)e.charCodeAt(s)>=128&&C("not-basic"),t.push(e.charCodeAt(s));for(var c=o>0?o+1:0;c<r;){for(var u=n,l=1,f=p;;f+=p){c>=r&&C("invalid-input");var g=R(e.charCodeAt(c++));(g>=p||g>_((h-n)/l))&&C("overflow"),n+=g*l;var v=f<=a?d:f>=a+m?m:f-a;if(g<v)break;var x=p-v;l>_(h/x)&&C("overflow"),l*=x}var k=t.length+1;a=I(n-u,k,0==u),_(n/k)>h-i&&C("overflow"),i+=_(n/k),n%=k,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},L=function(e){var t=[],r=(e=O(e)).length,n=b,i=0,a=y,o=!0,s=!1,c=void 0;try{for(var u,l=e[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var f=u.value;f<128&&t.push(A(f))}}catch(e){s=!0,c=e}finally{try{!o&&l.return&&l.return()}finally{if(s)throw c}}var g=t.length,v=g;for(g&&t.push(w);v<r;){var x=h,k=!0,E=!1,S=void 0;try{for(var P,F=e[Symbol.iterator]();!(k=(P=F.next()).done);k=!0){var D=P.value;D>=n&&D<x&&(x=D)}}catch(e){E=!0,S=e}finally{try{!k&&F.return&&F.return()}finally{if(E)throw S}}var R=v+1;x-n>_((h-i)/R)&&C("overflow"),i+=(x-n)*R,n=x;var j=!0,L=!1,q=void 0;try{for(var z,M=e[Symbol.iterator]();!(j=(z=M.next()).done);j=!0){var N=z.value;if(N<n&&++i>h&&C("overflow"),N==n){for(var B=i,$=p;;$+=p){var U=$<=a?d:$>=a+m?m:$-a;if(B<U)break;var V=B-U,H=p-U;t.push(A(T(U+V%H,0))),B=_(V/H)}t.push(A(T(B,0))),a=I(i,R,v==g),i=0,++v}}}catch(e){L=!0,q=e}finally{try{!j&&M.return&&M.return()}finally{if(L)throw q}}++i,++n}return t.join("")},q=function(e){return D(e,(function(e){return x.test(e)?j(e.slice(4).toLowerCase()):e}))},z=function(e){return D(e,(function(e){return k.test(e)?"xn--"+L(e):e}))},M={version:"2.1.0",ucs2:{decode:O,encode:function(e){return String.fromCodePoint.apply(String,f(e))}},decode:j,encode:L,toASCII:z,toUnicode:q},N={};function B(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function $(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var o=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function U(e,t){function r(e){var r=$(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,B).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,B).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,B).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,B).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,B).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function H(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=l(r,2)[1];return n?n.split(".").map(V).join("."):e}function Q(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=l(r,3),i=n[1],a=n[2];if(i){for(var o=i.toLowerCase().split("::").reverse(),s=l(o,2),c=s[0],u=s[1],f=u?u.split(":").map(V):[],h=c.split(":").map(V),p=t.IPV4ADDRESS.test(h[h.length-1]),d=p?7:8,m=h.length-d,g=Array(d),v=0;v<d;++v)g[v]=f[v]||h[m+v]||"";p&&(g[d-1]=H(g[d-1],t));var y=g.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),b=y.sort((function(e,t){return t.length-e.length}))[0],w=void 0;if(b&&b.length>1){var x=g.slice(0,b.index),k=g.slice(b.index+b.length);w=x.join(":")+"::"+k.join(":")}else w=g.join(":");return a&&(w+="%"+a),w}return e}var G=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,W=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?u:c;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(G);if(i){W?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=Q(H(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=N[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)U(r,n);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=M.toASCII(r.host.replace(n.PCT_ENCODED,$).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}U(r,c)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function J(e,t){var r=!1!==t.iri?u:c,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(Q(H(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,X=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(X))e=e.replace(X,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?u:c,n=[],i=N[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?M.toUnicode(e.host):M.toASCII(e.host.replace(r.PCT_ENCODED,$).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}U(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=J(e,t);if(void 0!==a&&("suffix"!==t.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var o=e.path;t.absolutePath||i&&i.absolutePath||(o=te(o)),void 0===a&&(o=o.replace(/^\/\//,"/%2F")),n.push(o)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=K(re(e,r),r),t=K(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=o({scheme:"null"},r);return re(ne(K(e,n),K(t,n),n,!0),n)}function ae(e,t){return"string"==typeof e?e=re(K(e,t),t):"object"===n(e)&&(e=K(re(e,t),t)),e}function oe(e,t,r){return"string"==typeof e?e=re(K(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(K(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?u.ESCAPE:c.ESCAPE,B)}function ce(e,t){return e&&e.toString().replace(t&&t.iri?u.PCT_ENCODED:c.PCT_ENCODED,$)}var ue={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize};function fe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var he={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=fe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(fe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=l(r,2),i=n[0],a=n[1];e.path=i&&"/"!==i?i:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},pe={scheme:"wss",domainHost:he.domainHost,parse:he.parse,serialize:he.serialize},de={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",ve=r(r("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+r("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+r("%"+ge+ge)),ye="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",be=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),we="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xe=new RegExp(me,"g"),ke=new RegExp(ve,"g"),Ee=new RegExp(t("[^]",ye,"[\\.]",'[\\"]',be),"g"),Se=new RegExp(t("[^]",me,we),"g"),Pe=Se;function _e(e){var t=$(e);return t.match(xe)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,a={},o=r.query.split("&"),s=0,c=o.length;s<c;++s){var u=o[s].split("=");switch(u[0]){case"to":for(var l=u[1].split(","),f=0,h=l.length;f<h;++f)n.push(l[f]);break;case"subject":r.subject=ce(u[1],t);break;case"body":r.body=ce(u[1],t);break;default:i=!0,a[ce(u[0],t)]=ce(u[1],t)}}i&&(r.headers=a)}r.query=void 0;for(var p=0,d=n.length;p<d;++p){var m=n[p].split("@");if(m[0]=ce(m[0]),t.unicodeSupport)m[1]=ce(m[1],t).toLowerCase();else try{m[1]=M.toASCII(ce(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[p]=m.join("@")}return r},serialize:function(e,t){var r=e,n=a(e.to);if(n){for(var o=0,s=n.length;o<s;++o){var c=String(n[o]),u=c.lastIndexOf("@"),l=c.slice(0,u).replace(ke,_e).replace(ke,i).replace(Ee,B),f=c.slice(u+1);try{f=t.iri?M.toUnicode(f):M.toASCII(ce(f,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[o]=l+"@"+f}r.path=n.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var p=[];for(var d in h)h[d]!==de[d]&&p.push(d.replace(ke,_e).replace(ke,i).replace(Se,B)+"="+h[d].replace(ke,_e).replace(ke,i).replace(Pe,B));return p.length&&(r.query=p.join("&")),r}},Ce=/^([^\:]+)\:(.*)/,Fe={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(Ce),n=e;if(r){var i=t.scheme||n.scheme||"urn",a=r[1].toLowerCase(),o=r[2],s=i+":"+(t.nid||a),c=N[s];n.nid=a,n.nss=o,n.path=void 0,c&&(n=c.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),a=N[i];a&&(e=a.serialize(e,t));var o=e,s=e.nss;return o.path=(n||t.nid)+":"+s,o}},De=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Oe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(De)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};N[ue.scheme]=ue,N[le.scheme]=le,N[he.scheme]=he,N[pe.scheme]=pe,N[Ae.scheme]=Ae,N[Fe.scheme]=Fe,N[Oe.scheme]=Oe,e.SCHEMES=N,e.pctEncChar=B,e.pctDecChars=$,e.parse=K,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=ae,e.equal=oe,e.escapeComponent=se,e.unescapeComponent=ce,Object.defineProperty(e,"__esModule",{value:!0})}(le.exports);var fe=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;0!=i--;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r},he={copy:function(e,t){for(var r in t=t||{},e)t[r]=e[r];return t},checkDataType:pe,checkDataTypes:function(e,t,r){if(1===e.length)return pe(e[0],t,r,!0);var n="",i=me(e);for(var a in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+pe(a,t,r,!0);return n},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;n++){var i=t[n];(de[i]||"array"===e&&"array"===i)&&(r[r.length]=i)}if(r.length)return r}else{if(de[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:me,getProperty:ye,escapeQuotes:be,equal:fe,ucs2length:function(e){for(var t,r=0,n=e.length,i=0;i<n;)r++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<n&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return r},varOccurences:function(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0},varReplace:function(e,t,r){return t+="([^0-9])",r=r.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),r+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var r in e)if(t[r])return!0},schemaHasRulesExcept:function(e,t,r){if("boolean"==typeof e)return!e&&"not"!=r;for(var n in e)if(n!=r&&t[n])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var r in e)if(!t[r])return r},toQuotedString:we,getPathExpr:function(e,t,r,n){return Ee(e,r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,r){var n=we(r?"/"+Se(t):ye(t));return Ee(e,n)},getData:function(e,t,r){var n,i,a,o;if(""===e)return"rootData";if("/"==e[0]){if(!xe.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,a="rootData"}else{if(!(o=e.match(ke)))throw new Error("Invalid JSON-pointer: "+e);if(n=+o[1],"#"==(i=o[2])){if(n>=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!i)return a}for(var s=a,c=i.split("/"),u=0;u<c.length;u++){var l=c[u];l&&(a+=ye(Pe(l)),s+=" && "+a)}return s},unescapeFragment:function(e){return Pe(decodeURIComponent(e))},unescapeJsonPointer:Pe,escapeFragment:function(e){return encodeURIComponent(Se(e))},escapeJsonPointer:Se};function pe(e,t,r,n){var i=n?" !== ":" === ",a=n?" || ":" && ",o=n?"!":"",s=n?"":"!";switch(e){case"null":return t+i+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+a+"typeof "+t+i+'"object"'+a+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+a+s+"("+t+" % 1)"+a+t+i+t+(r?a+o+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(r?a+o+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}var de=me(["string","number","integer","boolean","null"]);function me(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}var ge=/^[a-z$_][a-z$_0-9]*$/i,ve=/'|\\/g;function ye(e){return"number"==typeof e?"["+e+"]":ge.test(e)?"."+e:"['"+be(e)+"']"}function be(e){return e.replace(ve,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function we(e){return"'"+be(e)+"'"}var xe=/^\/(?:[^~]|~0|~1)*$/,ke=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ee(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function Se(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Pe(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}var _e=he,Ae=function(e){_e.copy(e,this)};var Ce={exports:{}},Fe=Ce.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),De(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function De(e,t,r,n,i,a,o,s,c,u){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var l in t(n,i,a,o,s,c,u),n){var f=n[l];if(Array.isArray(f)){if(l in Fe.arrayKeywords)for(var h=0;h<f.length;h++)De(e,t,r,f[h],i+"/"+l+"/"+h,a,i,l,n,h)}else if(l in Fe.propsKeywords){if(f&&"object"==typeof f)for(var p in f)De(e,t,r,f[p],i+"/"+l+"/"+p.replace(/~/g,"~0").replace(/\//g,"~1"),a,i,l,n,p)}else(l in Fe.keywords||e.allKeys&&!(l in Fe.skipKeywords))&&De(e,t,r,f,i+"/"+l,a,i,l,n)}r(n,i,a,o,s,c,u)}}Fe.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},Fe.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Fe.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Fe.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var Oe=le.exports,Re=fe,Te=he,Ie=Ae,je=Ce.exports,Le=qe;function qe(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return qe.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof Ie)return Ue(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,a,o,s=ze.call(this,t,r);return s&&(i=s.schema,t=s.root,o=s.baseId),i instanceof Ie?a=i.validate||e.call(this,i.schema,t,void 0,o):void 0!==i&&(a=Ue(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,o)),a}function ze(e,t){var r=Oe.parse(t),n=Ge(r),i=Qe(this._getId(e.schema));if(0===Object.keys(e.schema).length||n!==i){var a=Ke(n),o=this._refs[a];if("string"==typeof o)return Me.call(this,e,o,r);if(o instanceof Ie)o.validate||this._compile(o),e=o;else{if(!((o=this._schemas[a])instanceof Ie))return;if(o.validate||this._compile(o),a==Ke(t))return{schema:o,root:e,baseId:i};e=o}if(!e.schema)return;i=Qe(this._getId(e.schema))}return Be.call(this,r,i,e.schema,e)}function Me(e,t,r){var n=ze.call(this,e,t);if(n){var i=n.schema,a=n.baseId;e=n.root;var o=this._getId(i);return o&&(a=Je(a,o)),Be.call(this,r,a,i,e)}}qe.normalizeId=Ke,qe.fullPath=Qe,qe.url=Je,qe.ids=function(e){var t=Ke(this._getId(e)),r={"":t},n={"":Qe(t,!1)},i={},a=this;return je(e,{allKeys:!0},(function(e,t,o,s,c,u,l){if(""!==t){var f=a._getId(e),h=r[s],p=n[s]+"/"+c;if(void 0!==l&&(p+="/"+("number"==typeof l?l:Te.escapeFragment(l))),"string"==typeof f){f=h=Ke(h?Oe.resolve(h,f):f);var d=a._refs[f];if("string"==typeof d&&(d=a._refs[d]),d&&d.schema){if(!Re(e,d.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=Ke(p))if("#"==f[0]){if(i[f]&&!Re(e,i[f]))throw new Error('id "'+f+'" resolves to more than one schema');i[f]=e}else a._refs[f]=p}r[t]=h,n[t]=p}})),i},qe.inlineRef=Ue,qe.schema=ze;var Ne=Te.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function Be(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),a=1;a<i.length;a++){var o=i[a];if(o){if(void 0===(r=r[o=Te.unescapeFragment(o)]))break;var s;if(!Ne[o]&&((s=this._getId(r))&&(t=Je(t,s)),r.$ref)){var c=Je(t,r.$ref),u=ze.call(this,n,c);u&&(r=u.schema,n=u.root,t=u.baseId)}}}return void 0!==r&&r!==n.schema?{schema:r,root:n,baseId:t}:void 0}}var $e=Te.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function Ue(e,t){return!1!==t&&(void 0===t||!0===t?Ve(e):t?He(e)<=t:void 0)}function Ve(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(t=e[r])&&!Ve(t))return!1}else for(var n in e){if("$ref"==n)return!1;if("object"==typeof(t=e[n])&&!Ve(t))return!1}return!0}function He(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(t=e[n])&&(r+=He(t)),r==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if($e[i])r++;else if("object"==typeof(t=e[i])&&(r+=He(t)+1),r==1/0)return 1/0}return r}function Qe(e,t){return!1!==t&&(e=Ke(e)),Ge(Oe.parse(e))}function Ge(e){return Oe.serialize(e).split("#")[0]+"#"}var We=/#\/?$/;function Ke(e){return e?e.replace(We,""):""}function Je(e,t){return t=Ke(t),Oe.resolve(e,t)}var Ye=Le,Xe={Validation:et((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:et(Ze)};function Ze(e,t,r){this.message=r||Ze.message(e,t),this.missingRef=Ye.url(e,t),this.missingSchema=Ye.normalizeId(Ye.fullPath(this.missingRef))}function et(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Ze.message=function(e,t){return"can't resolve reference "+t+" from id "+e};var tt=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]},a={key:n,value:t[n]};return e(i,a)}}}(t.cmp),i=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var a,o;if(Array.isArray(t)){for(o="[",a=0;a<t.length;a++)a&&(o+=","),o+=e(t[a])||"null";return o+"]"}if(null===t)return"null";if(-1!==i.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=i.push(t)-1,c=Object.keys(t).sort(n&&n(t));for(o="",a=0;a<c.length;a++){var u=c[a],l=e(t[u]);l&&(o&&(o+=","),o+=JSON.stringify(u)+":"+l)}return i.splice(s,1),"{"+o+"}"}}(e)},rt=function(e,t,r){var n="",i=!0===e.schema.$async,a=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var c="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(c);e.logger.warn(c)}}if(e.isTop&&(n+=" var validate = ",i&&(e.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(e.opts.sourceCode||e.opts.processCode)&&(n+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof e.schema||!a&&!e.schema.$ref){t="false schema";var u=e.level,l=e.dataLevel,f=e.schema[t],h=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,m="data"+(l||""),g="valid"+u;if(!1===e.schema){e.isTop?d=!0:n+=" var "+g+" = false; ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'boolean schema is false' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";var v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?n+=i?" return data; ":" validate.errors = null; return true; ":n+=" var "+g+" = true; ";return e.isTop&&(n+=" }; return validate; "),n}if(e.isTop){var y=e.isTop;u=e.level=0,l=e.dataLevel=0,m="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var b="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}n+=" var vErrors = null; ",n+=" var errors = 0; ",n+=" if (rootData === undefined) rootData = data; "}else{u=e.level,m="data"+((l=e.dataLevel)||"");if(o&&(e.baseId=e.resolve.url(e.baseId,o)),i&&!e.async)throw new Error("async schema in sync schema");n+=" var errs_"+u+" = errors;"}g="valid"+u,d=!e.opts.allErrors;var w="",x="",k=e.schema.type,E=Array.isArray(k);if(k&&e.opts.nullable&&!0===e.schema.nullable&&(E?-1==k.indexOf("null")&&(k=k.concat("null")):"null"!=k&&(k=[k,"null"],E=!0)),E&&1==k.length&&(k=k[0],E=!1),e.schema.$ref&&a){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(a=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(n+=" "+e.RULES.all.$comment.code(e,"$comment")),k){if(e.opts.coerceTypes)var S=e.util.coerceToTypes(e.opts.coerceTypes,k);var P=e.RULES.types[k];if(S||E||!0===P||P&&!Y(P)){h=e.schemaPath+".type",p=e.errSchemaPath+"/type",h=e.schemaPath+".type",p=e.errSchemaPath+"/type";var _=E?"checkDataTypes":"checkDataType";if(n+=" if ("+e.util[_](k,m,e.opts.strictNumbers,!0)+") { ",S){var A="dataType"+u,C="coerced"+u;n+=" var "+A+" = typeof "+m+"; var "+C+" = undefined; ","array"==e.opts.coerceTypes&&(n+=" if ("+A+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+A+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+C+" = "+m+"; } "),n+=" if ("+C+" !== undefined) ; ";var F=S;if(F)for(var D,O=-1,R=F.length-1;O<R;)"string"==(D=F[O+=1])?n+=" else if ("+A+" == 'number' || "+A+" == 'boolean') "+C+" = '' + "+m+"; else if ("+m+" === null) "+C+" = ''; ":"number"==D||"integer"==D?(n+=" else if ("+A+" == 'boolean' || "+m+" === null || ("+A+" == 'string' && "+m+" && "+m+" == +"+m+" ","integer"==D&&(n+=" && !("+m+" % 1)"),n+=")) "+C+" = +"+m+"; "):"boolean"==D?n+=" else if ("+m+" === 'false' || "+m+" === 0 || "+m+" === null) "+C+" = false; else if ("+m+" === 'true' || "+m+" === 1) "+C+" = true; ":"null"==D?n+=" else if ("+m+" === '' || "+m+" === 0 || "+m+" === false) "+C+" = null; ":"array"==e.opts.coerceTypes&&"array"==D&&(n+=" else if ("+A+" == 'string' || "+A+" == 'number' || "+A+" == 'boolean' || "+m+" == null) "+C+" = ["+m+"]; ");n+=" else { ",(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } if ("+C+" !== undefined) { ";var T=l?"data"+(l-1||""):"parentData";n+=" "+m+" = "+C+"; ",l||(n+="if ("+T+" !== undefined)"),n+=" "+T+"["+(l?e.dataPathArr[l]:"parentDataProperty")+"] = "+C+"; } "}else{(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } "}}if(e.schema.$ref&&!a)n+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",d&&(n+=" } if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}");else{var I=e.RULES;if(I)for(var j=-1,L=I.length-1;j<L;)if(Y(P=I[j+=1])){if(P.type&&(n+=" if ("+e.util.checkDataType(P.type,m,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==P.type&&e.schema.properties){f=e.schema.properties;var q=Object.keys(f);if(q)for(var z,M=-1,N=q.length-1;M<N;){if(void 0!==(U=f[z=q[M+=1]]).default){var B=m+e.util.getProperty(z);if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}else if("array"==P.type&&Array.isArray(e.schema.items)){var $=e.schema.items;if($){O=-1;for(var U,V=$.length-1;O<V;)if(void 0!==(U=$[O+=1]).default){B=m+"["+O+"]";if(e.compositeRule){if(e.opts.strictDefaults){b="default is ignored for: "+B;if("log"!==e.opts.strictDefaults)throw new Error(b);e.logger.warn(b)}}else n+=" if ("+B+" === undefined ","empty"==e.opts.useDefaults&&(n+=" || "+B+" === null || "+B+" === '' "),n+=" ) "+B+" = ","shared"==e.opts.useDefaults?n+=" "+e.useDefault(U.default)+" ":n+=" "+JSON.stringify(U.default)+" ",n+="; "}}}var H=P.rules;if(H)for(var Q,G=-1,W=H.length-1;G<W;)if(X(Q=H[G+=1])){var K=Q.code(e,Q.keyword,P.type);K&&(n+=" "+K+" ",d&&(w+="}"))}if(d&&(n+=" "+w+" ",w=""),P.type&&(n+=" } ",k&&k===P.type&&!S)){n+=" else { ";var J;h=e.schemaPath+".type",p=e.errSchemaPath+"/type";(J=J||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { type: '",n+=E?""+k.join(","):""+k,n+="' } ",!1!==e.opts.messages&&(n+=" , message: 'should be ",n+=E?""+k.join(","):""+k,n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+h+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),n+=" } "):n+=" {} ";v=n;n=J.pop(),!e.compositeRule&&d?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}d&&(n+=" if (errors === ",n+=y?"0":"errs_"+u,n+=") { ",x+="}")}}function Y(e){for(var t=e.rules,r=0;r<t.length;r++)if(X(t[r]))return!0}function X(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var r=t.implements,n=0;n<r.length;n++)if(void 0!==e.schema[r[n]])return!0}(t)}return d&&(n+=" "+x+" "),y?(i?(n+=" if (errors === 0) return data; ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0; "),n+=" }; return validate;"):n+=" var "+g+" = errors === errs_"+u+";",n},nt=Le,it=he,at=Xe,ot=tt,st=rt,ct=it.ucs2length,ut=fe,lt=at.Validation,ft=function e(t,r,n,i){var a=this,o=this._opts,s=[void 0],c={},u=[],l={},f=[],h={},p=[];r=r||{schema:t,refVal:s,refs:c};var d=ht.call(this,t,r,i),m=this._compilations[d.index];if(d.compiling)return m.callValidate=function e(){var t=m.validate,r=t.apply(this,arguments);return e.errors=t.errors,r};var g=this._formats,v=this.RULES;try{var y=w(t,r,n,i);m.validate=y;var b=m.callValidate;return b&&(b.schema=y.schema,b.errors=null,b.refs=y.refs,b.refVal=y.refVal,b.root=y.root,b.$async=y.$async,o.sourceCode&&(b.source=y.source)),y}finally{pt.call(this,t,r,i)}function w(t,n,i,l){var h=!n||n&&n.schema==t;if(n.schema!=r.schema)return e.call(a,t,n,i,l);var d,m=!0===t.$async,y=st({isTop:!0,schema:t,isRoot:h,baseId:l,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:at.MissingRef,RULES:v,validate:st,util:it,resolve:nt,resolveRef:x,usePattern:S,useDefault:P,useCustomRule:_,opts:o,formats:g,logger:a.logger,self:a});y=bt(s,vt)+bt(u,mt)+bt(f,gt)+bt(p,yt)+y,o.processCode&&(y=o.processCode(y,t));try{d=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",y)(a,v,g,r,s,f,p,ut,ct,lt),s[0]=d}catch(e){throw a.logger.error("Error compiling schema, function code:",y),e}return d.schema=t,d.errors=null,d.refs=c,d.refVal=s,d.root=h?d:n,m&&(d.$async=!0),!0===o.sourceCode&&(d.source={code:y,patterns:u,defaults:f}),d}function x(t,i,u){i=nt.url(t,i);var l,f,h=c[i];if(void 0!==h)return E(l=s[h],f="refVal["+h+"]");if(!u&&r.refs){var p=r.refs[i];if(void 0!==p)return E(l=r.refVal[p],f=k(i,l))}f=k(i);var d=nt.call(a,w,r,i);if(void 0===d){var m=n&&n[i];m&&(d=nt.inlineRef(m,o.inlineRefs)?m:e.call(a,m,r,n,t))}if(void 0!==d)return function(e,t){var r=c[e];s[r]=t}(i,d),E(d,f);!function(e){delete c[e]}(i)}function k(e,t){var r=s.length;return s[r]=t,c[e]=r,"refVal"+r}function E(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function S(e){var t=l[e];return void 0===t&&(t=l[e]=u.length,u[t]=e),"pattern"+t}function P(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return it.toQuotedString(e);case"object":if(null===e)return"null";var t=ot(e),r=h[t];return void 0===r&&(r=h[t]=f.length,f[r]=e),"default"+r}}function _(e,t,r,n){if(!1!==a._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(r,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var s=e.definition.validateSchema;if(s)if(!s(t)){var c="keyword schema is invalid: "+a.errorsText(s.errors);if("log"!=a._opts.validateSchema)throw new Error(c);a.logger.error(c)}}var u,l=e.definition.compile,f=e.definition.inline,h=e.definition.macro;if(l)u=l.call(a,t,r,n);else if(h)u=h.call(a,t,r,n),!1!==o.validateSchema&&a.validateSchema(u,!0);else if(f)u=f.call(a,n,e.keyword,t,r);else if(!(u=e.definition.validate))return;if(void 0===u)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var d=p.length;return p[d]=u,{code:"customRule"+d,validate:u}}};function ht(e,t,r){var n=dt.call(this,e,t,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function pt(e,t,r){var n=dt.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function dt(e,t,r){for(var n=0;n<this._compilations.length;n++){var i=this._compilations[n];if(i.schema==e&&i.root==t&&i.baseId==r)return n}return-1}function mt(e,t){return"var pattern"+e+" = new RegExp("+it.toQuotedString(t[e])+");"}function gt(e){return"var default"+e+" = defaults["+e+"];"}function vt(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function yt(e){return"var customRule"+e+" = customRules["+e+"];"}function bt(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}var wt={exports:{}},xt=wt.exports=function(){this._cache={}};xt.prototype.put=function(e,t){this._cache[e]=t},xt.prototype.get=function(e){return this._cache[e]},xt.prototype.del=function(e){delete this._cache[e]},xt.prototype.clear=function(){this._cache={}};var kt=he,Et=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,St=[0,31,28,31,30,31,30,31,31,30,31,30,31],Pt=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,_t=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,At=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Ct=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Ft=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Dt=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Ot=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Rt=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Tt=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,It=jt;function jt(e){return e="full"==e?"full":"fast",kt.copy(jt[e])}function Lt(e){var t=e.match(Et);if(!t)return!1;var r=+t[1],n=+t[2],i=+t[3];return n>=1&&n<=12&&i>=1&&i<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:St[n])}function qt(e,t){var r=e.match(Pt);if(!r)return!1;var n=r[1],i=r[2],a=r[3],o=r[5];return(n<=23&&i<=59&&a<=59||23==n&&59==i&&60==a)&&(!t||o)}jt.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Ct,url:Ft,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:_t,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Bt,uuid:Dt,"json-pointer":Ot,"json-pointer-uri-fragment":Rt,"relative-json-pointer":Tt},jt.full={date:Lt,time:qt,"date-time":function(e){var t=e.split(zt);return 2==t.length&&Lt(t[0])&&qt(t[1],!0)},uri:function(e){return Mt.test(e)&&At.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":Ct,url:Ft,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:_t,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Bt,uuid:Dt,"json-pointer":Ot,"json-pointer-uri-fragment":Rt,"relative-json-pointer":Tt};var zt=/t|\s/i;var Mt=/\/|:/;var Nt=/[^\\]\\Z/;function Bt(e){if(Nt.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var $t=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var p="maximum"==t,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.$data&&m&&m.$data,v=p?"<":">",y=p?">":"<",b=void 0;if(!h&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(d+" must be number or boolean");if(g){var w=e.util.getData(m.$data,o,e.dataPathArr),x="exclusive"+a,k="exclType"+a,E="exclIsNumber"+a,S="' + "+(A="op"+a)+" + '";i+=" var schemaExcl"+a+" = "+w+"; ",i+=" var "+x+"; var "+k+" = typeof "+(w="schemaExcl"+a)+"; if ("+k+" != 'boolean' && "+k+" != 'undefined' && "+k+" != 'number') { ";var P;b=d;(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var _=i;i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+k+" == 'number' ? ( ("+x+" = "+n+" === undefined || "+w+" "+v+"= "+n+") ? "+f+" "+y+"= "+w+" : "+f+" "+y+" "+n+" ) : ( ("+x+" = "+w+" === true) ? "+f+" "+y+"= "+n+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { var op"+a+" = "+x+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(b=d,u=e.errSchemaPath+"/"+d,n=w,h=g)}else{S=v;if((E="number"==typeof m)&&h){var A="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+v+"= "+n+" ? "+f+" "+y+"= "+m+" : "+f+" "+y+" "+n+" ) || "+f+" !== "+f+") { "}else{E&&void 0===s?(x=!0,b=d,u=e.errSchemaPath+"/"+d,n=m,y+="="):(E&&(n=Math[p?"min":"max"](m,s)),m===(!E||n)?(x=!0,b=d,u=e.errSchemaPath+"/"+d,y+="="):(x=!1,S+="="));A="'"+S+"'";i+=" if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+" "+y+" "+n+" || "+f+" !== "+f+") { "}}b=b||t,(P=P||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(b||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+A+", limit: "+n+", exclusive: "+x+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+" ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";_=i;return i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i},Ut=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+f+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Vt=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+f+".length ":i+=" ucs2length("+f+") ",i+=" "+p+" "+n+") { ";var d=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Ht=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+f+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=h?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},Qt={$ref:function(e,t,r){var n,i,a=" ",o=e.level,s=e.dataLevel,c=e.schema[t],u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(s||""),h="valid"+o;if("#"==c||"#/"==c)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs){e.logger.error(d),(y=y||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var m=a;a=y.pop(),!e.compositeRule&&l?e.async?a+=" throw new ValidationError(["+m+"]); ":a+=" validate.errors = ["+m+"]; return false; ":a+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(a+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,d);e.logger.warn(d),l&&(a+=" if (true) { ")}}else if(p.inline){var g=e.util.copy(e);g.level++;var v="valid"+g.level;g.schema=p.schema,g.schemaPath="",g.errSchemaPath=c,a+=" "+e.validate(g).replace(/validate\.schema/g,p.code)+" ",l&&(a+=" if ("+v+") { ")}else n=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var y;(y=y||[]).push(a),a="",e.opts.passContext?a+=" "+i+".call(this, ":a+=" "+i+"( ",a+=" "+f+", (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var b=a+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(a=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(a+=" var "+h+"; "),a+=" try { await "+b+"; ",l&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(a+=" "+h+" = false; "),a+=" } ",l&&(a+=" if ("+h+") { ")}else a+=" if (!"+b+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(a+=" else { ")}return a},allOf:function(e,t,r){var n=" ",i=e.schema[t],a=e.schemaPath+e.util.getProperty(t),o=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,c=e.util.copy(e),u="";c.level++;var l="valid"+c.level,f=c.baseId,h=!0,p=i;if(p)for(var d,m=-1,g=p.length-1;m<g;)d=p[m+=1],(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(h=!1,c.schema=d,c.schemaPath=a+"["+m+"]",c.errSchemaPath=o+"/"+m,n+=" "+e.validate(c)+" ",c.baseId=f,s&&(n+=" if ("+l+") { ",u+="}"));return s&&(n+=h?" if (true) { ":" "+u.slice(0,-1)+" "),n},anyOf:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=o.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(g){var v=p.baseId;n+=" var "+h+" = errors; var "+f+" = false; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=o;if(b)for(var w,x=-1,k=b.length-1;x<k;)w=b[x+=1],p.schema=w,p.schemaPath=s+"["+x+"]",p.errSchemaPath=c+"/"+x,n+=" "+e.validate(p)+" ",p.baseId=v,n+=" "+f+" = "+f+" || "+m+"; if (!"+f+") { ",d+="}";e.compositeRule=p.compositeRule=y,n+=" "+d+" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else u&&(n+=" if (true) { ");return n},$comment:function(e,t,r){var n=" ",i=e.schema[t],a=e.errSchemaPath+"/"+t;e.opts.allErrors;var o=e.util.toQuotedString(i);return!0===e.opts.$comment?n+=" console.log("+o+");":"function"==typeof e.opts.$comment&&(n+=" self._opts.$comment("+o+", "+e.util.toQuotedString(a)+", validate.root.schema);"),n},const:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h=e.opts.$data&&o&&o.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; "),h||(n+=" var schema"+i+" = validate.schema"+s+";"),n+="var "+f+" = equal("+l+", schema"+i+"); if (!"+f+") { ";var p=p||[];p.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to constant' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var d=n;return n=p.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+d+"]); ":n+=" validate.errors = ["+d+"]; return false; ":n+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},contains:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+i,g=p.dataLevel=e.dataLevel+1,v="data"+g,y=e.baseId,b=e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all);if(n+="var "+h+" = errors;var "+f+";",b){var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=o,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var x=l+"["+m+"]";p.dataPathArr[g]=m;var k=e.validate(p);p.baseId=y,e.util.varOccurences(k,v)<2?n+=" "+e.util.varReplace(k,v,x)+" ":n+=" var "+v+" = "+x+"; "+k+" ",n+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=w,n+=" if (!"+d+") {"}else n+=" if ("+l+".length == 0) {";var E=E||[];E.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;return n=E.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",b&&(n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n},dependencies:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m={},g={},v=e.opts.ownProperties;for(x in o)if("__proto__"!=x){var y=o[x],b=Array.isArray(y)?g:m;b[x]=y}n+="var "+f+" = errors;";var w=e.errorPath;for(var x in n+="var missing"+i+";",g)if((b=g[x]).length){if(n+=" if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),u){n+=" && ( ";var k=b;if(k)for(var E=-1,S=k.length-1;E<S;){D=k[E+=1],E&&(n+=" || "),n+=" ( ( "+(I=l+(T=e.util.getProperty(D)))+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:T)+") ) "}n+=")) { ";var P="missing"+i,_="' + "+P+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,P,!0):w+" + "+P);var A=A||[];A.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var C=n;n=A.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+C+"]); ":n+=" validate.errors = ["+C+"]; return false; ":n+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var F=b;if(F)for(var D,O=-1,R=F.length-1;O<R;){D=F[O+=1];var T=e.util.getProperty(D),I=(_=e.util.escapeQuotes(D),l+T);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,D,e.opts.jsonPointers)),n+=" if ( "+I+" === undefined ",v&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(D)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes(x)+"', missingProperty: '"+_+"', depsCount: "+b.length+", deps: '"+e.util.escapeQuotes(1==b.length?b[0]:b.join(", "))+"' } ",!1!==e.opts.messages&&(n+=" , message: 'should have ",1==b.length?n+="property "+e.util.escapeQuotes(b[0]):n+="properties "+e.util.escapeQuotes(b.join(", ")),n+=" when property "+e.util.escapeQuotes(x)+" is present' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" } ",u&&(p+="}",n+=" else { ")}e.errorPath=w;var j=h.baseId;for(var x in m){y=m[x];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+d+" = true; if ( "+l+e.util.getProperty(x)+" !== undefined ",v&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(x)+"') "),n+=") { ",h.schema=y,h.schemaPath=s+e.util.getProperty(x),h.errSchemaPath=c+"/"+e.util.escapeFragment(x),n+=" "+e.validate(h)+" ",h.baseId=j,n+=" } ",u&&(n+=" if ("+d+") { ",p+="}"))}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},enum:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h=e.opts.$data&&o&&o.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ");var p="i"+i,d="schema"+i;h||(n+=" var "+d+" = validate.schema"+s+";"),n+="var "+f+";",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=f+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+l+", "+d+"["+p+"])) { "+f+" = true; break; }",h&&(n+=" } "),n+=" if (!"+f+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var g=n;return n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+g+"]); ":n+=" validate.errors = ["+g+"]; return false; ":n+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n},format:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var f,h=e.opts.$data&&o&&o.$data;h?(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",f="schema"+i):f=o;var p=e.opts.unknownFormats,d=Array.isArray(p);if(h){n+=" var "+(m="format"+i)+" = formats["+f+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(n+=" var async"+i+" = "+m+".async; "),n+=" "+m+" = "+m+".validate; } if ( ",h&&(n+=" ("+f+" !== undefined && typeof "+f+" != 'string') || "),n+=" (","ignore"!=p&&(n+=" ("+f+" && !"+m+" ",d&&(n+=" && self._opts.unknownFormats.indexOf("+f+") == -1 "),n+=") || "),n+=" ("+m+" && "+v+" == '"+r+"' && !(typeof "+m+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+m+"("+l+") : "+m+"("+l+")) ":n+=" "+m+"("+l+") ",n+=" : "+m+".test("+l+"))))) {"}else{var m;if(!(m=e.formats[o])){if("ignore"==p)return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(d&&p.indexOf(o)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,v=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var y=!0===m.async;m=m.validate}if(v!=r)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(b="formats"+e.util.getProperty(o)+".validate")+"("+l+"))) { "}else{n+=" if (! ";var b="formats"+e.util.getProperty(o);g&&(b+=".validate"),n+="function"==typeof m?" "+b+"("+l+") ":" "+b+".test("+l+") ",n+=") { "}}var w=w||[];w.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { format: ",n+=h?""+f:""+e.util.toQuotedString(o),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=h?"' + "+f+" + '":""+e.util.escapeQuotes(o),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=h?"validate.schema"+s:""+e.util.toQuotedString(o),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var x=n;return n=w.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+x+"]); ":n+=" validate.errors = ["+x+"]; return false; ":n+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n},if:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,g=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),y=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),b=p.baseId;if(v||y){var w;p.createErrors=!1,p.schema=o,p.schemaPath=s,p.errSchemaPath=c,n+=" var "+h+" = errors; var "+f+" = true; ";var x=e.compositeRule;e.compositeRule=p.compositeRule=!0,n+=" "+e.validate(p)+" ",p.baseId=b,p.createErrors=!0,n+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=x,v?(n+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'then'; ":w="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+d+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(p)+" ",p.baseId=b,n+=" "+f+" = "+d+"; ",v&&y?n+=" var "+(w="ifClause"+i)+" = 'else'; ":w="'else'",n+=" } "),n+=" if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { failingKeyword: "+w+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+w+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { ")}else u&&(n+=" if (true) { ");return n},items:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g="i"+i,v=p.dataLevel=e.dataLevel+1,y="data"+v,b=e.baseId;if(n+="var "+h+" = errors;var "+f+";",Array.isArray(o)){var w=e.schema.additionalItems;if(!1===w){n+=" "+f+" = "+l+".length <= "+o.length+"; ";var x=c;c=e.errSchemaPath+"/additionalItems",n+=" if (!"+f+") { ";var k=k||[];k.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var E=n;n=k.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c=x,u&&(d+="}",n+=" else { ")}var S=o;if(S)for(var P,_=-1,A=S.length-1;_<A;)if(P=S[_+=1],e.opts.strictKeywords?"object"==typeof P&&Object.keys(P).length>0||!1===P:e.util.schemaHasRules(P,e.RULES.all)){n+=" "+m+" = true; if ("+l+".length > "+_+") { ";var C=l+"["+_+"]";p.schema=P,p.schemaPath=s+"["+_+"]",p.errSchemaPath=c+"/"+_,p.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),p.dataPathArr[v]=_;var F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",n+=" } ",u&&(n+=" if ("+m+") { ",d+="}")}if("object"==typeof w&&(e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0||!1===w:e.util.schemaHasRules(w,e.RULES.all))){p.schema=w,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+l+".length > "+o.length+") { for (var "+g+" = "+o.length+"; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=l+"["+g+"]";p.dataPathArr[v]=g;F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" } } ",u&&(n+=" if ("+m+") { ",d+="}")}}else if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){p.schema=o,p.schemaPath=s,p.errSchemaPath=c,n+=" for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);C=l+"["+g+"]";p.dataPathArr[v]=g;F=e.validate(p);p.baseId=b,e.util.varOccurences(F,y)<2?n+=" "+e.util.varReplace(F,y,C)+" ":n+=" var "+y+" = "+C+"; "+F+" ",u&&(n+=" if (!"+m+") break; "),n+=" }"}return u&&(n+=" "+d+" if ("+h+" == errors) {"),n},maximum:$t,minimum:$t,maxItems:Ut,minItems:Ut,maxLength:Vt,minLength:Vt,maxProperties:Ht,minProperties:Ht,multipleOf:function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!h&&"number"!=typeof s)throw new Error(t+" must be number");i+="var division"+a+";if (",h&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+a+" = "+f+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+a+" !== parseInt(division"+a+") ",i+=" ) ",h&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=h?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},not:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=s,h.errSchemaPath=c,n+=" var "+f+" = errors; ";var d,m=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(d=h.opts.allErrors,h.opts.allErrors=!1),n+=" "+e.validate(h)+" ",h.createErrors=!0,d&&(h.opts.allErrors=d),e.compositeRule=h.compositeRule=m,n+=" if ("+p+") { ";var g=g||[];g.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var v=n;n=g.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n},oneOf:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,g=p.baseId,v="prevValid"+i,y="passingSchemas"+i;n+="var "+h+" = errors , "+v+" = false , "+f+" = false , "+y+" = null; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var w=o;if(w)for(var x,k=-1,E=w.length-1;k<E;)x=w[k+=1],(e.opts.strictKeywords?"object"==typeof x&&Object.keys(x).length>0||!1===x:e.util.schemaHasRules(x,e.RULES.all))?(p.schema=x,p.schemaPath=s+"["+k+"]",p.errSchemaPath=c+"/"+k,n+=" "+e.validate(p)+" ",p.baseId=g):n+=" var "+m+" = true; ",k&&(n+=" if ("+m+" && "+v+") { "+f+" = false; "+y+" = ["+y+", "+k+"]; } else { ",d+="}"),n+=" if ("+m+") { "+f+" = "+v+" = true; "+y+" = "+k+"; }";return e.compositeRule=p.compositeRule=b,n+=d+"if (!"+f+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n},pattern:function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h=e.opts.$data&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,i+="if ( ",h&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(h?"(new RegExp("+n+"))":e.usePattern(s))+".test("+f+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=h?""+n:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=h?"' + "+n+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i},properties:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e),p="";h.level++;var d="valid"+h.level,m="key"+i,g="idx"+i,v=h.dataLevel=e.dataLevel+1,y="data"+v,b="dataProperties"+i,w=Object.keys(o||{}).filter(T),x=e.schema.patternProperties||{},k=Object.keys(x).filter(T),E=e.schema.additionalProperties,S=w.length||k.length,P=!1===E,_="object"==typeof E&&Object.keys(E).length,A=e.opts.removeAdditional,C=P||_||A,F=e.opts.ownProperties,D=e.baseId,O=e.schema.required;if(O&&(!e.opts.$data||!O.$data)&&O.length<e.opts.loopRequired)var R=e.util.toHash(O);function T(e){return"__proto__"!==e}if(n+="var "+f+" = errors;var "+d+" = true;",F&&(n+=" var "+b+" = undefined;"),C){if(n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",S){if(n+=" var isAdditional"+i+" = !(false ",w.length)if(w.length>8)n+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var I=w;if(I)for(var j=-1,L=I.length-1;j<L;)K=I[j+=1],n+=" || "+m+" == "+e.util.toQuotedString(K)+" "}if(k.length){var q=k;if(q)for(var z=-1,M=q.length-1;z<M;)ae=q[z+=1],n+=" || "+e.usePattern(ae)+".test("+m+") "}n+=" ); if (isAdditional"+i+") { "}if("all"==A)n+=" delete "+l+"["+m+"]; ";else{var N=e.errorPath,B="' + "+m+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers)),P)if(A)n+=" delete "+l+"["+m+"]; ";else{n+=" "+d+" = false; ";var $=c;c=e.errSchemaPath+"/additionalProperties",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+B+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,u&&(n+=" break; ")}else if(_)if("failing"==A){n+=" var "+f+" = errors; ";var V=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);var H=l+"["+m+"]";h.dataPathArr[v]=m;var Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",n+=" if (!"+d+") { errors = "+f+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+l+"["+m+"]; } ",e.compositeRule=h.compositeRule=V}else{h.schema=E,h.schemaPath=e.schemaPath+".additionalProperties",h.errSchemaPath=e.errSchemaPath+"/additionalProperties",h.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; ")}e.errorPath=N}S&&(n+=" } "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}var G=e.opts.useDefaults&&!e.compositeRule;if(w.length){var W=w;if(W)for(var K,J=-1,Y=W.length-1;J<Y;){var X=o[K=W[J+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){var Z=e.util.getProperty(K),ee=(H=l+Z,G&&void 0!==X.default);h.schema=X,h.schemaPath=s+Z,h.errSchemaPath=c+"/"+e.util.escapeFragment(K),h.errorPath=e.util.getPath(e.errorPath,K,e.opts.jsonPointers),h.dataPathArr[v]=e.util.toQuotedString(K);Q=e.validate(h);if(h.baseId=D,e.util.varOccurences(Q,y)<2){Q=e.util.varReplace(Q,y,H);var te=H}else{te=y;n+=" var "+y+" = "+H+"; "}if(ee)n+=" "+Q+" ";else{if(R&&R[K]){n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = false; ";N=e.errorPath,$=c;var re,ne=e.util.escapeQuotes(K);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(N,K,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(re=re||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+ne+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";U=n;n=re.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+U+"]); ":n+=" validate.errors = ["+U+"]; return false; ":n+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=$,e.errorPath=N,n+=" } else { "}else u?(n+=" if ( "+te+" === undefined ",F&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=") { "+d+" = true; } else { "):(n+=" if ("+te+" !== undefined ",F&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(K)+"') "),n+=" ) { ");n+=" "+Q+" } "}}u&&(n+=" if ("+d+") { ",p+="}")}}if(k.length){var ie=k;if(ie)for(var ae,oe=-1,se=ie.length-1;oe<se;){X=x[ae=ie[oe+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0||!1===X:e.util.schemaHasRules(X,e.RULES.all)){h.schema=X,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ae),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ae),n+=F?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+g+"=0; "+g+"<"+b+".length; "+g+"++) { var "+m+" = "+b+"["+g+"]; ":" for (var "+m+" in "+l+") { ",n+=" if ("+e.usePattern(ae)+".test("+m+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers);H=l+"["+m+"]";h.dataPathArr[v]=m;Q=e.validate(h);h.baseId=D,e.util.varOccurences(Q,y)<2?n+=" "+e.util.varReplace(Q,y,H)+" ":n+=" var "+y+" = "+H+"; "+Q+" ",u&&(n+=" if (!"+d+") break; "),n+=" } ",u&&(n+=" else "+d+" = true; "),n+=" } ",u&&(n+=" if ("+d+") { ",p+="}")}}}return u&&(n+=" "+p+" if ("+f+" == errors) {"),n},propertyNames:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="errs__"+i,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(n+="var "+f+" = errors;",e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0||!1===o:e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=s,h.errSchemaPath=c;var d="key"+i,m="idx"+i,g="i"+i,v="' + "+d+" + '",y="data"+(h.dataLevel=e.dataLevel+1),b="dataProperties"+i,w=e.opts.ownProperties,x=e.baseId;w&&(n+=" var "+b+" = undefined; "),n+=w?" "+b+" = "+b+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+b+".length; "+m+"++) { var "+d+" = "+b+"["+m+"]; ":" for (var "+d+" in "+l+") { ",n+=" var startErrs"+i+" = errors; ";var k=d,E=e.compositeRule;e.compositeRule=h.compositeRule=!0;var S=e.validate(h);h.baseId=x,e.util.varOccurences(S,y)<2?n+=" "+e.util.varReplace(S,y,k)+" ":n+=" var "+y+" = "+k+"; "+S+" ",e.compositeRule=h.compositeRule=E,n+=" if (!"+p+") { for (var "+g+"=startErrs"+i+"; "+g+"<errors; "+g+"++) { vErrors["+g+"].propertyName = "+d+"; } var err = ",!1!==e.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { propertyName: '"+v+"' } ",!1!==e.opts.messages&&(n+=" , message: 'property name \\'"+v+"\\' is invalid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),u&&(n+=" break; "),n+=" } }"}return u&&(n+=" if ("+f+" == errors) {"),n},required:function(e,t,r){var n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),f="valid"+i,h=e.opts.$data&&o&&o.$data;h&&(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ");var p="schema"+i;if(!h)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],m=o;if(m)for(var g,v=-1,y=m.length-1;v<y;){g=m[v+=1];var b=e.schema.properties[g];b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))||(d[d.length]=g)}}else d=o;if(h||d.length){var w=e.errorPath,x=h||d.length>=e.opts.loopRequired,k=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),n+=" var "+f+" = true; ",h&&(n+=" if (schema"+i+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+i+")) "+f+" = false; else {"),n+=" for (var "+_+" = 0; "+_+" < "+p+".length; "+_+"++) { "+f+" = "+l+"["+p+"["+_+"]] !== undefined ",k&&(n+=" && Object.prototype.hasOwnProperty.call("+l+", "+p+"["+_+"]) "),n+="; if (!"+f+") break; } ",h&&(n+=" } "),n+=" if (!"+f+") { ",(C=C||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var P=d;if(P)for(var _=-1,A=P.length-1;_<A;){O=P[_+=1],_&&(n+=" || "),n+=" ( ( "+(j=l+(I=e.util.getProperty(O)))+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:I)+") ) "}n+=") { ";var C;E="' + "+(F="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(w,F,!0):w+" + "+F),(C=C||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(x){h||(n+=" var "+p+" = validate.schema"+s+"; ");var F;E="' + "+(F="schema"+i+"["+(_="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(w,F,e.opts.jsonPointers)),h&&(n+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),n+=" for (var "+_+" = 0; "+_+" < "+p+".length; "+_+"++) { if ("+l+"["+p+"["+_+"]] === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", "+p+"["+_+"]) "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(n+=" } ")}else{var D=d;if(D)for(var O,R=-1,T=D.length-1;R<T;){O=D[R+=1];var I=e.util.getProperty(O),j=(E=e.util.escapeQuotes(O),l+I);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(w,O,e.opts.jsonPointers)),n+=" if ( "+j+" === undefined ",k&&(n+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(O)+"') "),n+=") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+E+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+E+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=w}else u&&(n+=" if (true) {");return n},uniqueItems:function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(o||""),h="valid"+a,p=e.opts.$data&&s&&s.$data;if(p?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,(s||p)&&!1!==e.opts.uniqueItems){p&&(i+=" var "+h+"; if ("+n+" === false || "+n+" === undefined) "+h+" = true; else if (typeof "+n+" != 'boolean') "+h+" = false; else { "),i+=" var i = "+f+".length , "+h+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+f+"[i], "+f+"[j])) { "+h+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+f+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](d,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+h+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i},validate:rt},Gt=Qt,Wt=he.toHash,Kt=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Jt=Xe.MissingRef,Yt=function e(t,r,n){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof r&&(n=r,r=void 0);var a=o(t).then((function(){var e=i._addSchema(t,void 0,r);return e.validate||s(e)}));n&&a.then((function(e){n(null,e)}),n);return a;function o(t){var r=t.$schema;return r&&!i.getSchema(r)?e.call(i,{$ref:r},!0):Promise.resolve()}function s(e){try{return i._compile(e)}catch(t){if(t instanceof Jt)return function(t){var n=t.missingSchema;if(u(n))throw new Error("Schema "+n+" is loaded but "+t.missingRef+" cannot be resolved");var a=i._loadingSchemas[n];a||(a=i._loadingSchemas[n]=i._opts.loadSchema(n)).then(c,c);return a.then((function(e){if(!u(n))return o(e).then((function(){u(n)||i.addSchema(e,n,void 0,r)}))})).then((function(){return s(e)}));function c(){delete i._loadingSchemas[n]}function u(e){return i._refs[e]||i._schemas[e]}}(t);throw t}}};var Xt={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},Zt=Xt,er={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Zt.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Zt.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},tr=/^[a-z_$][a-z0-9_$-]*$/i,rr=function(e,t,r){var n,i,a=" ",o=e.level,s=e.dataLevel,c=e.schema[t],u=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,f=!e.opts.allErrors,h="data"+(s||""),p="valid"+o,d="errs__"+o,m=e.opts.$data&&c&&c.$data;m?(a+=" var schema"+o+" = "+e.util.getData(c.$data,s,e.dataPathArr)+"; ",i="schema"+o):i=c;var g,v,y,b,w,x=this,k="definition"+o,E=x.definition,S="";if(m&&E.$data){w="keywordValidate"+o;var P=E.validateSchema;a+=" var "+k+" = RULES.custom['"+t+"'].definition; var "+w+" = "+k+".validate;"}else{if(!(b=e.useCustomRule(x,c,e.schema,e)))return;i="validate.schema"+u,w=b.code,g=E.compile,v=E.inline,y=E.macro}var _=w+".errors",A="i"+o,C="ruleErr"+o,F=E.async;if(F&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(a+=_+" = null;"),a+="var "+d+" = errors;var "+p+";",m&&E.$data&&(S+="}",a+=" if ("+i+" === undefined) { "+p+" = true; } else { ",P&&(S+="}",a+=" "+p+" = "+k+".validateSchema("+i+"); if ("+p+") { ")),v)E.statements?a+=" "+b.validate+" ":a+=" "+p+" = "+b.validate+"; ";else if(y){var D=e.util.copy(e);S="";D.level++;var O="valid"+D.level;D.schema=b.validate,D.schemaPath="";var R=e.compositeRule;e.compositeRule=D.compositeRule=!0;var T=e.validate(D).replace(/validate\.schema/g,w);e.compositeRule=D.compositeRule=R,a+=" "+T}else{(q=q||[]).push(a),a="",a+=" "+w+".call( ",e.opts.passContext?a+="this":a+="self",g||!1===E.schema?a+=" , "+h+" ":a+=" , "+i+" , "+h+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var I=s?"data"+(s-1||""):"parentData",j=s?e.dataPathArr[s]:"parentDataProperty",L=a+=" , "+I+" , "+j+" , rootData ) ";a=q.pop(),!1===E.errors?(a+=" "+p+" = ",F&&(a+="await "),a+=L+"; "):a+=F?" var "+(_="customErrors"+o)+" = null; try { "+p+" = await "+L+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+_+" = e.errors; else throw e; } ":" "+_+" = null; "+p+" = "+L+"; "}if(E.modifying&&(a+=" if ("+I+") "+h+" = "+I+"["+j+"];"),a+=""+S,E.valid)f&&(a+=" if (true) { ");else{var q;a+=" if ( ",void 0===E.valid?(a+=" !",a+=y?""+O:""+p):a+=" "+!E.valid+" ",a+=") { ",n=x.keyword,(q=q||[]).push(a),a="",(q=q||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var z=a;a=q.pop(),!e.compositeRule&&f?e.async?a+=" throw new ValidationError(["+z+"]); ":a+=" validate.errors = ["+z+"]; return false; ":a+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var M=a;a=q.pop(),v?E.errors?"full"!=E.errors&&(a+=" for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(a+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),a+=" } "):!1===E.errors?a+=" "+M+" ":(a+=" if ("+d+" == errors) { "+M+" } else { for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+C+".schemaPath === undefined) { "+C+'.schemaPath = "'+l+'"; } ',e.opts.verbose&&(a+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),a+=" } } "):y?(a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+x.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+x.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):!1===E.errors?a+=" "+M+" ":(a+=" if (Array.isArray("+_+")) { if (vErrors === null) vErrors = "+_+"; else vErrors = vErrors.concat("+_+"); errors = vErrors.length; for (var "+A+"="+d+"; "+A+"<errors; "+A+"++) { var "+C+" = vErrors["+A+"]; if ("+C+".dataPath === undefined) "+C+".dataPath = (dataPath || '') + "+e.errorPath+"; "+C+'.schemaPath = "'+l+'"; ',e.opts.verbose&&(a+=" "+C+".schema = "+i+"; "+C+".data = "+h+"; "),a+=" } } else { "+M+" } "),a+=" } ",f&&(a+=" else { ")}return a},nr=er,ir={add:function(e,t){var r=this.RULES;if(r.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!tr.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var n=t.type;if(Array.isArray(n))for(var i=0;i<n.length;i++)o(e,n[i],t);else o(e,n,t);var a=t.metaSchema;a&&(t.$data&&this._opts.$data&&(a={anyOf:[a,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(a,!0))}function o(e,t,n){for(var i,a=0;a<r.length;a++){var o=r[a];if(o.type==t){i=o;break}}i||(i={type:t,rules:[]},r.push(i));var s={keyword:e,definition:n,custom:!0,code:rr,implements:n.implements};i.rules.push(s),r.custom[e]=s}return r.keywords[e]=r.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var r=0;r<t.length;r++)for(var n=t[r].rules,i=0;i<n.length;i++)if(n[i].keyword==e){n.splice(i,1);break}return this},validate:function e(t,r){e.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(nr,!0);if(n(t))return!0;if(e.errors=n.errors,r)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}};var ar={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON Schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},or=ft,sr=Le,cr=wt.exports,ur=Ae,lr=tt,fr=It,hr=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=Wt(t),e.types=Wt(["number","integer","string","array","object","boolean","null"]),e.forEach((function(r){r.rules=r.rules.map((function(r){var n;if("object"==typeof r){var i=Object.keys(r)[0];n=r[i],r=i,n.forEach((function(r){t.push(r),e.all[r]=!0}))}return t.push(r),e.all[r]={keyword:r,code:Gt[r],implements:n}})),e.all.$comment={keyword:"$comment",code:Gt.$comment},r.type&&(e.types[r.type]=r)})),e.keywords=Wt(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e},pr=function(e,t){for(var r=0;r<t.length;r++){e=JSON.parse(JSON.stringify(e));var n,i=t[r].split("/"),a=e;for(n=1;n<i.length;n++)a=a[i[n]];for(n=0;n<Kt.length;n++){var o=Kt[n],s=a[o];s&&(a[o]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},dr=he,mr=xr;xr.prototype.validate=function(e,t){var r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);r=n.validate||this._compile(n)}var i=r(t);!0!==r.$async&&(this.errors=r.errors);return i},xr.prototype.compile=function(e,t){var r=this._addSchema(e,void 0,t);return r.validate||this._compile(r)},xr.prototype.addSchema=function(e,t,r,n){if(Array.isArray(e)){for(var i=0;i<e.length;i++)this.addSchema(e[i],void 0,r,n);return this}var a=this._getId(e);if(void 0!==a&&"string"!=typeof a)throw new Error("schema id must be string");return Ar(this,t=sr.normalizeId(t||a)),this._schemas[t]=this._addSchema(e,r,n,!0),this},xr.prototype.addMetaSchema=function(e,t,r){return this.addSchema(e,t,r,!0),this},xr.prototype.validateSchema=function(e,t){var r=e.$schema;if(void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(!(r=r||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(yr)?yr:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,e);if(!n&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return n},xr.prototype.getSchema=function(e){var t=kr(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var r=sr.schema.call(e,{schema:{}},t);if(r){var n=r.schema,i=r.root,a=r.baseId,o=or.call(e,n,i,void 0,a);return e._fragments[t]=new ur({ref:t,fragment:!0,schema:n,root:i,baseId:a,validate:o}),o}}(this,e)}},xr.prototype.removeSchema=function(e){if(e instanceof RegExp)return Er(this,this._schemas,e),Er(this,this._refs,e),this;switch(typeof e){case"undefined":return Er(this,this._schemas),Er(this,this._refs),this._cache.clear(),this;case"string":var t=kr(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var r=this._opts.serialize,n=r?r(e):e;this._cache.del(n);var i=this._getId(e);i&&(i=sr.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},xr.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},xr.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var r=void 0===(t=t||{}).separator?", ":t.separator,n=void 0===t.dataVar?"data":t.dataVar,i="",a=0;a<e.length;a++){var o=e[a];o&&(i+=n+o.dataPath+" "+o.message+r)}return i.slice(0,-r.length)},xr.prototype._addSchema=function(e,t,r,n){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var i=this._opts.serialize,a=i?i(e):e,o=this._cache.get(a);if(o)return o;n=n||!1!==this._opts.addUsedSchema;var s=sr.normalizeId(this._getId(e));s&&n&&Ar(this,s);var c,u=!1!==this._opts.validateSchema&&!t;u&&!(c=s&&s==sr.normalizeId(e.$schema))&&this.validateSchema(e,!0);var l=sr.ids.call(this,e),f=new ur({id:s,schema:e,localRefs:l,cacheKey:a,meta:r});"#"!=s[0]&&n&&(this._refs[s]=f);this._cache.put(a,f),u&&c&&this.validateSchema(e,!0);return f},xr.prototype._compile=function(e,t){if(e.compiling)return e.validate=i,i.schema=e.schema,i.errors=null,i.root=t||i,!0===e.schema.$async&&(i.$async=!0),i;var r,n;e.compiling=!0,e.meta&&(r=this._opts,this._opts=this._metaOpts);try{n=or.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=r)}return e.validate=n,e.refs=n.refs,e.refVal=n.refVal,e.root=n.root,n;function i(){var t=e.validate,r=t.apply(this,arguments);return i.errors=t.errors,r}},xr.prototype.compileAsync=Yt;var gr=ir;xr.prototype.addKeyword=gr.add,xr.prototype.getKeyword=gr.get,xr.prototype.removeKeyword=gr.remove,xr.prototype.validateKeyword=gr.validate;var vr=Xe;xr.ValidationError=vr.Validation,xr.MissingRefError=vr.MissingRef,xr.$dataMetaSchema=pr;var yr="http://json-schema.org/draft-07/schema",br=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],wr=["/properties"];function xr(e){if(!(this instanceof xr))return new xr(e);e=this._opts=dr.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:Cr,warn:Cr,error:Cr};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=fr(e.format),this._cache=e.cache||new cr,this._loadingSchemas={},this._compilations=[],this.RULES=hr(),this._getId=function(e){switch(e.schemaId){case"auto":return _r;case"id":return Sr;default:return Pr}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=lr),this._metaOpts=function(e){for(var t=dr.copy(e._opts),r=0;r<br.length;r++)delete t[br[r]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var r=e._opts.formats[t];e.addFormat(t,r)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var r=e._opts.keywords[t];e.addKeyword(t,r)}}(this),function(e){var t;e._opts.$data&&(t=ar,e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=Xt;e._opts.$data&&(r=pr(r,wr));e.addMetaSchema(r,yr,!0),e._refs["http://json-schema.org/schema"]=yr}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var r in t)e.addSchema(t[r],r)}(this)}function kr(e,t){return t=sr.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function Er(e,t,r){for(var n in t){var i=t[n];i.meta||r&&!r.test(n)||(e._cache.del(i.cacheKey),delete t[n])}}function Sr(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function Pr(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function _r(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function Ar(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function Cr(){}var Fr,Dr={exports:{}},Or={exports:{}};Or.exports=(Fr=Fr||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==oe&&oe.crypto&&(r=oe.crypto),!r)try{r=require("crypto")}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),a={},o=a.lib={},s=o.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=o.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var a=0;a<i;a++){var o=r[a>>>2]>>>24-a%4*8&255;t[n+a>>>2]|=o<<24-(n+a)%4*8}else for(var s=0;s<i;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=a.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i<r;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},h=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=o.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,i=n.words,a=n.sigBytes,o=this.blockSize,s=a/(4*o),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,l=e.min(4*u,a);if(u){for(var f=0;f<u;f+=o)this._doProcessBlock(i,f);r=i.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new d.HMAC.init(e,r).finalize(t)}}});var d=a.algo={};return a}(Math),Fr);var Rr={exports:{}};Rr.exports=function(e){return function(){var t=e,r=t.lib.WordArray;function n(e,t,n){for(var i=[],a=0,o=0;o<t;o++)if(o%4){var s=n[e.charCodeAt(o-1)]<<o%4*2|n[e.charCodeAt(o)]>>>6-o%4*2;i[a>>>2]|=s<<24-a%4*8,a++}return r.create(i,a)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var i=[],a=0;a<r;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<r;s++)i.push(n.charAt(o>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a<r.length;a++)i[r.charCodeAt(a)]=a}var o=r.charAt(64);if(o){var s=e.indexOf(o);-1!==s&&(t=s)}return n(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(Or.exports);var Tr={exports:{}};Tr.exports=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,a=n.Hasher,o=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],d=e[t+3],m=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],x=e[t+10],k=e[t+11],E=e[t+12],S=e[t+13],P=e[t+14],_=e[t+15],A=a[0],C=a[1],F=a[2],D=a[3];A=u(A,C,F,D,o,7,s[0]),D=u(D,A,C,F,c,12,s[1]),F=u(F,D,A,C,p,17,s[2]),C=u(C,F,D,A,d,22,s[3]),A=u(A,C,F,D,m,7,s[4]),D=u(D,A,C,F,g,12,s[5]),F=u(F,D,A,C,v,17,s[6]),C=u(C,F,D,A,y,22,s[7]),A=u(A,C,F,D,b,7,s[8]),D=u(D,A,C,F,w,12,s[9]),F=u(F,D,A,C,x,17,s[10]),C=u(C,F,D,A,k,22,s[11]),A=u(A,C,F,D,E,7,s[12]),D=u(D,A,C,F,S,12,s[13]),F=u(F,D,A,C,P,17,s[14]),A=l(A,C=u(C,F,D,A,_,22,s[15]),F,D,c,5,s[16]),D=l(D,A,C,F,v,9,s[17]),F=l(F,D,A,C,k,14,s[18]),C=l(C,F,D,A,o,20,s[19]),A=l(A,C,F,D,g,5,s[20]),D=l(D,A,C,F,x,9,s[21]),F=l(F,D,A,C,_,14,s[22]),C=l(C,F,D,A,m,20,s[23]),A=l(A,C,F,D,w,5,s[24]),D=l(D,A,C,F,P,9,s[25]),F=l(F,D,A,C,d,14,s[26]),C=l(C,F,D,A,b,20,s[27]),A=l(A,C,F,D,S,5,s[28]),D=l(D,A,C,F,p,9,s[29]),F=l(F,D,A,C,y,14,s[30]),A=f(A,C=l(C,F,D,A,E,20,s[31]),F,D,g,4,s[32]),D=f(D,A,C,F,b,11,s[33]),F=f(F,D,A,C,k,16,s[34]),C=f(C,F,D,A,P,23,s[35]),A=f(A,C,F,D,c,4,s[36]),D=f(D,A,C,F,m,11,s[37]),F=f(F,D,A,C,y,16,s[38]),C=f(C,F,D,A,x,23,s[39]),A=f(A,C,F,D,S,4,s[40]),D=f(D,A,C,F,o,11,s[41]),F=f(F,D,A,C,d,16,s[42]),C=f(C,F,D,A,v,23,s[43]),A=f(A,C,F,D,w,4,s[44]),D=f(D,A,C,F,E,11,s[45]),F=f(F,D,A,C,_,16,s[46]),A=h(A,C=f(C,F,D,A,p,23,s[47]),F,D,o,6,s[48]),D=h(D,A,C,F,y,10,s[49]),F=h(F,D,A,C,P,15,s[50]),C=h(C,F,D,A,g,21,s[51]),A=h(A,C,F,D,E,6,s[52]),D=h(D,A,C,F,d,10,s[53]),F=h(F,D,A,C,x,15,s[54]),C=h(C,F,D,A,c,21,s[55]),A=h(A,C,F,D,b,6,s[56]),D=h(D,A,C,F,_,10,s[57]),F=h(F,D,A,C,v,15,s[58]),C=h(C,F,D,A,S,21,s[59]),A=h(A,C,F,D,m,6,s[60]),D=h(D,A,C,F,k,10,s[61]),F=h(F,D,A,C,p,15,s[62]),C=h(C,F,D,A,w,21,s[63]),a[0]=a[0]+A|0,a[1]=a[1]+C|0,a[2]=a[2]+F|0,a[3]=a[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var a=t.floor(n/4294967296),o=n;r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,r,n,i,a,o){var s=e+(t&r|~t&n)+i+o;return(s<<a|s>>>32-a)+t}function l(e,t,r,n,i,a,o){var s=e+(t&n|r&~n)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,r,n,i,a,o){var s=e+(t^r^n)+i+o;return(s<<a|s>>>32-a)+t}function h(e,t,r,n,i,a,o){var s=e+(r^(t|~n))+i+o;return(s<<a|s>>>32-a)+t}r.MD5=a._createHelper(c),r.HmacMD5=a._createHmacHelper(c)}(Math),e.MD5}(Or.exports);var Ir={exports:{}},jr={exports:{}};jr.exports=function(e){return r=(t=e).lib,n=r.WordArray,i=r.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],c=r[4],u=0;u<80;u++){if(u<16)o[u]=0|e[t+u];else{var l=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=l<<1|l>>>31}var f=(n<<5|n>>>27)+c+o[u];f+=u<20?1518500249+(i&a|~i&s):u<40?1859775393+(i^a^s):u<60?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,c=s,s=a,a=i<<30|i>>>2,i=n,n=f}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s),e.SHA1;var t,r,n,i,a,o,s}(Or.exports);var Lr={exports:{}};Lr.exports=function(e){var t,r,n;r=(t=e).lib.Base,n=t.enc.Utf8,t.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,c=o.words,u=0;u<r;u++)s[u]^=1549556828,c[u]^=909522486;a.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})}(Or.exports),Ir.exports=function(e){return r=(t=e).lib,n=r.Base,i=r.WordArray,a=t.algo,o=a.MD5,s=a.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:o,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,n=this.cfg,a=n.hasher.create(),o=i.create(),s=o.words,c=n.keySize,u=n.iterations;s.length<c;){r&&a.update(r),r=a.update(e).finalize(t),a.reset();for(var l=1;l<u;l++)r=a.finalize(r),a.reset();o.concat(r)}return o.sigBytes=4*c,o}}),t.EvpKDF=function(e,t,r){return s.create(r).compute(e,t)},e.EvpKDF;var t,r,n,i,a,o,s}(Or.exports);var qr={exports:{}};qr.exports=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,a=n.WordArray,o=n.BufferedBlockAlgorithm,s=r.enc;s.Utf8;var c=s.Base64,u=r.algo.EvpKDF,l=n.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:v}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()});n.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var f=r.mode={},h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=f.CBC=function(){var e=h.extend();function r(e,r,n){var i,a=this._iv;a?(i=a,this._iv=t):i=this._prevBlock;for(var o=0;o<n;o++)e[r+o]^=i[o]}return e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize;r.call(this,e,t,i),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),e.Decryptor=e.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,a=e.slice(t,t+i);n.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=a}}),e}(),d=(r.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,n=r-e.sigBytes%r,i=n<<24|n<<16|n<<8|n,o=[],s=0;s<n;s+=4)o.push(i);var c=a.create(o,n);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:p,padding:d}),reset:function(){var e;l.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?a.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=a.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),m.create({ciphertext:r,salt:t})}},v=n.SerializableCipher=i.extend({cfg:i.extend({format:g}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),a=i.finalize(t),o=i.cfg;return m.create({ciphertext:a,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),y=(r.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=a.random(8));var i=u.create({keySize:t+r}).compute(e,n),o=a.create(i.words.slice(t),4*r);return i.sigBytes=4*t,m.create({key:i,iv:o,salt:n})}},b=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var a=v.encrypt.call(this,e,t,i.key,n);return a.mixIn(i),a},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,v.decrypt.call(this,e,t,i.key,n)}})}()}(Or.exports),Dr.exports=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],a=[],o=[],s=[],c=[],u=[],l=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var d=n^n<<1^n<<2^n<<3^n<<4;d=d>>>8^255&d^99,i[r]=d,a[d]=r;var m=e[r],g=e[m],v=e[g],y=257*e[d]^16843008*d;o[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[d]=y<<24|y>>>8,f[d]=y<<16|y>>>16,h[d]=y<<8|y>>>24,p[d]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var d=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),a=this._keySchedule=[],o=0;o<n;o++)o<r?a[o]=t[o]:(u=a[o-1],o%r?r>6&&o%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=d[o/r|0]<<24),a[o]=a[o-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(o=n-c,c%4)var u=a[o];else u=a[o-4];s[c]=c<4||o<=4?u:l[i[u>>>24]]^f[i[u>>>16&255]]^h[i[u>>>8&255]]^p[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,f,h,p,a),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,a,o,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],f=e[t+2]^r[2],h=e[t+3]^r[3],p=4,d=1;d<c;d++){var m=n[u>>>24]^i[l>>>16&255]^a[f>>>8&255]^o[255&h]^r[p++],g=n[l>>>24]^i[f>>>16&255]^a[h>>>8&255]^o[255&u]^r[p++],v=n[f>>>24]^i[h>>>16&255]^a[u>>>8&255]^o[255&l]^r[p++],y=n[h>>>24]^i[u>>>16&255]^a[l>>>8&255]^o[255&f]^r[p++];u=m,l=g,f=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^r[p++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[p++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[p++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^r[p++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});t.AES=r._createHelper(m)}(),e.AES}(Or.exports);var zr={exports:{}};zr.exports=function(e){return e.enc.Utf8}(Or.exports);var Mr={}.hasOwnProperty;function Nr(e,t){var r=t||{};function n(t){var r=n.invalid,i=n.handlers;if(t&&Mr.call(t,e)&&(r=Mr.call(i,t[e])?i[t[e]]:n.unknown),r)return r.apply(this,arguments)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}function Br(e){return Array.isArray(e.children)}const $r={}.hasOwnProperty,Ur=Nr("nestingOperator",{unknown:function(e){throw new Error("Unexpected nesting `"+e.nestingOperator+"`")},invalid:function(e,t,r,n,i){if(n)throw new Error("topScan is supposed to be called from the root node");if(!i.iterator)throw new Error("Expected `iterator` to be defined");if("number"!=typeof r)throw new TypeError("Expected `index` to be defined");i.iterator(e,t,r,n,i),i.shallow||Hr(e,t,r,n,i)},handlers:{null:Hr,">":Qr,"+":function(e,t,r,n,i){if("number"!=typeof r)throw new TypeError("Expected `index` to be defined");if(!n)return;new Gr(e,n,i).prefillTypeIndex(0,++r).each(r,++r).prefillTypeIndex(r).done()},"~":function(e,t,r,n,i){if("number"!=typeof r)throw new TypeError("Expected `index` to be defined");if(!n)return;new Gr(e,n,i).prefillTypeIndex(0,++r).each(r).done()}}}),Vr=Ur;function Hr(e,t,r,n,i){if(!i.iterator)throw new Error("Expected `iterator` to be defined");const a=i.iterator;i.iterator=function e(t,r,n,i,o){if(o.iterator=a,a(t,r,n,i,o),o.iterator=e,o.one&&o.found)return;Qr(t,r,n,i,o)},Qr(e,t,r,n,i)}function Qr(e,t,r,n,i){Br(t)&&0!==t.children.length&&new Gr(e,t,i).each().done()}class Gr{constructor(e,t,r){this.query=e,this.parent=t,this.state=r,this.typeIndex=r.index?new Wr:void 0,this.delayed=[]}prefillTypeIndex(e,t){let[r,n]=this.defaults(e,t);if(this.typeIndex)for(;r<n;)this.typeIndex.index(this.parent.children[r]),r++;return this}each(e,t){const[r,n]=this.defaults(e,t),i=this.parent.children[r];let a,o;if(r>=n)return this;if(this.typeIndex)o=this.typeIndex.nodes,a=this.typeIndex.index(i),this.delayed.push((function(){if(!this.typeIndex)throw new TypeError("Expected `typeIndex` to be defined");if(!this.state.iterator)throw new Error("Expected `iterator` to be defined");this.state.typeIndex=a,this.state.nodeIndex=o,this.state.typeCount=this.typeIndex.count(i),this.state.nodeCount=this.typeIndex.nodes,this.state.iterator(this.query,i,r,this.parent,this.state)}));else{if(!this.state.iterator)throw new Error("Expected `iterator` to be defined");this.state.iterator(this.query,i,r,this.parent,this.state)}return this.state.one&&this.state.found?this:this.each(r+1,n)}done(){let e=-1;for(;++e<this.delayed.length&&(this.delayed[e].call(this),!this.state.one||!this.state.found););return this}defaults(e,t){return(null==e||e<0)&&(e=0),(null==t||t>this.parent.children.length)&&(t=this.parent.children.length),[e,t]}}class Wr{constructor(){this.counts={},this.nodes=0}index(e){const t=e.type;return this.nodes++,$r.call(this.counts,t)||(this.counts[t]=0),this.counts[t]++}count(e){return this.counts[e.type]}}const Kr=function(e){if(null==e)return Yr;if("string"==typeof e)return function(e){return Jr(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Kr(e[r]);return Jr(n);function n(...e){let r=-1;for(;++r<t.length;)if(t[r].call(this,...e))return!0;return!1}}(e):function(e){return Jr(t);function t(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}(e);if("function"==typeof e)return Jr(e);throw new Error("Expected function, string, or object as test")};function Jr(e){return function(...t){return Boolean(e.call(this,...t))}}function Yr(){return!0}var Xr=Object.freeze({__proto__:null,is:function e(t,r,n,i,a){const o=Kr(r);if(null!=n&&("number"!=typeof n||n<0||n===Number.POSITIVE_INFINITY))throw new Error("Expected positive finite index");if(!(null==i||e(i)&&i.children))throw new Error("Expected parent node");if(null==i!=(null==n))throw new Error("Expected both parent and index");return!(!t||!t.type||"string"!=typeof t.type)&&Boolean(o.call(a,t,n,i))},convert:Kr});const Zr=Kr(),en=Nr("name",{unknown:function(e){if(e.name)throw new Error("Unknown pseudo-selector `"+e.name+"`");throw new Error("Unexpected pseudo-element or empty pseudo-class")},invalid:function(){throw new Error("Invalid pseudo-selector")},handlers:{any:rn,blank:nn,empty:nn,"first-child":function(e,t,r,n,i){return an(i,e),0===i.nodeIndex},"first-of-type":function(e,t,r,n,i){return an(i,e),0===i.typeIndex},has:function(e,t,r,n,i){const a=i.shallow,o=i.one,s=i.scopeNodes,c=function(e){const t="ruleSet"===e.type?{type:"selectors",selectors:[e]}:e;let r,n=-1;for(;++n<t.selectors.length;)r=t.selectors[n].rule,r.nestingOperator=null,r.pseudos&&1===r.pseudos.length&&"scope"===r.pseudos[0].name||(t.selectors[n]={type:"ruleSet",rule:{type:"rule",rule:r,pseudos:[{name:"scope"}]}});return t}(e.value),u=i.any;i.shallow=!1,i.one=!0,i.scopeNodes=[t];const l=Boolean(u(c,t,i)[0]);return i.shallow=a,i.one=o,i.scopeNodes=s,l},"last-child":function(e,t,r,n,i){return an(i,e),"number"==typeof i.nodeCount&&i.nodeIndex===i.nodeCount-1},"last-of-type":function(e,t,r,n,i){return an(i,e),"number"==typeof i.typeCount&&i.typeIndex===i.typeCount-1},matches:rn,not:function(e,t,r,n,i){return!rn(e,t,r,n,i)},"nth-child":function(e,t,r,n,i){return an(i,e),"number"==typeof i.nodeIndex&&e.value(i.nodeIndex)},"nth-last-child":function(e,t,r,n,i){return an(i,e),"number"==typeof i.nodeCount&&"number"==typeof i.nodeIndex&&e.value(i.nodeCount-i.nodeIndex-1)},"nth-of-type":function(e,t,r,n,i){return an(i,e),"number"==typeof i.typeIndex&&e.value(i.typeIndex)},"nth-last-of-type":function(e,t,r,n,i){return an(i,e),"number"==typeof i.typeIndex&&"number"==typeof i.typeCount&&e.value(i.typeCount-1-i.typeIndex)},"only-child":function(e,t,r,n,i){return an(i,e),1===i.nodeCount},"only-of-type":function(e,t,r,n,i){return an(i,e),1===i.typeCount},root:function(e,t,r,n){return Zr(t)&&!n},scope:function(e,t,r,n,i){return Zr(t)&&void 0!==i.scopeNodes&&i.scopeNodes.includes(t)}}});function tn(e,t,r,n,i){const a=e.pseudos;let o=-1;for(;++o<a.length;)if(!en(a[o],t,r,n,i))return!1;return!0}function rn(e,t,r,n,i){const a=i.shallow,o=i.one;i.one=!0,i.shallow=!0;const s=i.any(e.value,t,i)[0]===t;return i.shallow=a,i.one=o,s}function nn(e,t){return Br(t)?0===t.children.length:!("value"in t)}function an(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}tn.needsIndex=["first-child","first-of-type","last-child","last-of-type","nth-child","nth-last-child","nth-of-type","nth-last-of-type","only-child","only-of-type"];const on=Nr("operator",{unknown:function(e){throw new Error("Unknown operator `"+e.operator+"`")},invalid:sn,handlers:{"=":function(e,t){return sn(e,t)&&String(t[e.name])===e.value},"^=":function(e,t){const r=t[e.name];return e.value&&"string"==typeof r&&r.slice(0,e.value.length)===e.value},"$=":function(e,t){const r=t[e.name];return e.value&&"string"==typeof r&&r.slice(-e.value.length)===e.value},"*=":function(e,t){const r=t[e.name];return e.value&&"string"==typeof r&&r.includes(e.value)},"~=":function(e,t){const r=t[e.name];if(null==r)return!1;if(Array.isArray(r)&&r.includes(e.value))return!0;return String(r)===e.value}}});function sn(e,t){return null!==t[e.name]&&void 0!==t[e.name]}function cn(e,t,r,n,i){if(e.id)throw new Error("Invalid selector: id");if(e.classNames)throw new Error("Invalid selector: class");return Boolean(t&&(!e.tagName||function(e,t){return"*"===e.tagName||e.tagName===t.type}(e,t))&&(!e.attrs||function(e,t){let r=-1;for(;++r<e.attrs.length;)if(!on(e.attrs[r],t))return!1;return!0}(e,t))&&(!e.pseudos||tn(e,t,r,n,i)))}const un=Nr("type",{unknown:function(e){throw new Error("Unknown type `"+e.type+"`")},invalid:function(){throw new Error("Invalid type")},handlers:{selectors:function(e,t,r){const n=dn(r.one);let i=-1;for(;++i<e.selectors.length;)n(fn(e.selectors[i],t,r));return n.result},ruleSet:fn,rule:hn}});function ln(e,t,r){return e&&t?un(e,t,r):[]}function fn(e,t,r){return hn(e.rule,t,r)}function hn(e,t,r){const n=dn(r.one);if(r.shallow&&e.rule)throw new Error("Expected selector without nesting");var i;return Vr(e,t,0,null,pn(e,{scopeNodes:(i=t,"RootNode"===i.type||"root"===i.type?t.children:[t]),index:!1,iterator:function(e,t,r,i,a){cn(e,t,r,i,a)&&(e.rule?Vr(e.rule,t,r,i,pn(e.rule,a)):(n(t),a.found=!0))},one:r.one,shallow:r.shallow,any:r.any})),n.result}function pn(e,t){const r=e.pseudos||[];let n=-1;for(;++n<r.length;)if(tn.needsIndex.includes(r[n].name)){t.index=!0;break}return t}function dn(e){const t=[];let r;return n.result=t,n;function n(e){let t=-1;if("length"in e)for(;++t<e.length;)i(e[t]);else i(e)}function i(n){if(e){if(r)throw new Error("Cannot collect multiple nodes");r=!0}t.includes(n)||t.push(n)}}var mn,gn={},vn={},yn={};mn=yn,Object.defineProperty(mn,"__esModule",{value:!0}),mn.isIdentStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"-"===e||"_"===e},mn.isIdent=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-"===e||"_"===e},mn.isHex=function(e){return e>="a"&&e<="f"||e>="A"&&e<="F"||e>="0"&&e<="9"},mn.escapeIdentifier=function(e){for(var t=e.length,r="",n=0;n<t;){var i=e.charAt(n);if(mn.identSpecialChars[i])r+="\\"+i;else if("_"===i||"-"===i||i>="A"&&i<="Z"||i>="a"&&i<="z"||0!==n&&i>="0"&&i<="9")r+=i;else{var a=i.charCodeAt(0);if(55296==(63488&a)){var o=e.charCodeAt(n++);if(55296!=(64512&a)||56320!=(64512&o))throw Error("UCS-2(decode): illegal sequence");a=((1023&a)<<10)+(1023&o)+65536}r+="\\"+a.toString(16)+" "}n++}return r},mn.escapeStr=function(e){for(var t,r=e.length,n="",i=0;i<r;){var a=e.charAt(i);'"'===a?a='\\"':"\\"===a?a="\\\\":void 0!==(t=mn.strReplacementsRev[a])&&(a=t),n+=a,i++}return'"'+n+'"'},mn.identSpecialChars={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},mn.strReplacementsRev={"\n":"\\n","\r":"\\r","\t":"\\t","\f":"\\f","\v":"\\v"},mn.singleQuoteEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\","'":"'"},mn.doubleQuotesEscapeChars={n:"\n",r:"\r",t:"\t",f:"\f","\\":"\\",'"':'"'},Object.defineProperty(vn,"__esModule",{value:!0});var bn=yn;vn.parseCssSelector=function(e,t,r,n,i,a){var o=e.length,s="";function c(r,n){var i="";for(t++,s=e.charAt(t);t<o;){if(s===r)return t++,i;if("\\"===s){t++;var a=void 0;if((s=e.charAt(t))===r)i+=r;else if(void 0!==(a=n[s]))i+=a;else{if(bn.isHex(s)){var c=s;for(t++,s=e.charAt(t);bn.isHex(s);)c+=s,t++,s=e.charAt(t);" "===s&&(t++,s=e.charAt(t)),i+=String.fromCharCode(parseInt(c,16));continue}i+=s}}else i+=s;t++,s=e.charAt(t)}return i}function u(){var r="";for(s=e.charAt(t);t<o;){if(bn.isIdent(s))r+=s;else{if("\\"!==s)return r;if(++t>=o)throw Error("Expected symbol but end of file reached.");if(s=e.charAt(t),bn.identSpecialChars[s])r+=s;else{if(bn.isHex(s)){var n=s;for(t++,s=e.charAt(t);bn.isHex(s);)n+=s,t++,s=e.charAt(t);" "===s&&(t++,s=e.charAt(t)),r+=String.fromCharCode(parseInt(n,16));continue}r+=s}}t++,s=e.charAt(t)}return r}function l(){s=e.charAt(t);for(var r=!1;" "===s||"\t"===s||"\n"===s||"\r"===s||"\f"===s;)r=!0,t++,s=e.charAt(t);return r}function f(){var r=h();if(!r)return null;var n=r;for(s=e.charAt(t);","===s;){if(t++,l(),"selectors"!==n.type&&(n={type:"selectors",selectors:[r]}),!(r=h()))throw Error('Rule expected after ",".');n.selectors.push(r)}return n}function h(){l();var r={type:"ruleSet"},n=p();if(!n)return null;for(var a=r;n&&(n.type="rule",a.rule=n,a=n,l(),s=e.charAt(t),!(t>=o||","===s||")"===s));)if(i[s]){var c=s;if(t++,l(),!(n=p()))throw Error('Rule expected after "'+c+'".');n.nestingOperator=c}else(n=p())&&(n.nestingOperator=null);return r}function p(){for(var i=null;t<o;)if("*"===(s=e.charAt(t)))t++,(i=i||{}).tagName="*";else if(bn.isIdentStart(s)||"\\"===s)(i=i||{}).tagName=u();else if("."===s)t++,((i=i||{}).classNames=i.classNames||[]).push(u());else if("#"===s)t++,(i=i||{}).id=u();else if("["===s){t++,l();var h={name:u()};if(l(),"]"===s)t++;else{var p="";if(n[s]&&(p=s,t++,s=e.charAt(t)),t>=o)throw Error('Expected "=" but end of file reached.');if("="!==s)throw Error('Expected "=" but "'+s+'" found.');h.operator=p+"=",t++,l();var d="";if(h.valueType="string",'"'===s)d=c('"',bn.doubleQuotesEscapeChars);else if("'"===s)d=c("'",bn.singleQuoteEscapeChars);else if(a&&"$"===s)t++,d=u(),h.valueType="substitute";else{for(;t<o&&"]"!==s;)d+=s,t++,s=e.charAt(t);d=d.trim()}if(l(),t>=o)throw Error('Expected "]" but end of file reached.');if("]"!==s)throw Error('Expected "]" but "'+s+'" found.');t++,h.value=d}((i=i||{}).attrs=i.attrs||[]).push(h)}else{if(":"!==s)break;t++;var m=u(),g={name:m};if("("===s){t++;var v="";if(l(),"selector"===r[m])g.valueType="selector",v=f();else{if(g.valueType=r[m]||"string",'"'===s)v=c('"',bn.doubleQuotesEscapeChars);else if("'"===s)v=c("'",bn.singleQuoteEscapeChars);else if(a&&"$"===s)t++,v=u(),g.valueType="substitute";else{for(;t<o&&")"!==s;)v+=s,t++,s=e.charAt(t);v=v.trim()}l()}if(t>=o)throw Error('Expected ")" but end of file reached.');if(")"!==s)throw Error('Expected ")" but "'+s+'" found.');t++,g.value=v}((i=i||{}).pseudos=i.pseudos||[]).push(g)}return i}return function(){var r=f();if(t<o)throw Error('Rule expected but "'+e.charAt(t)+'" found.');return r}()};var wn={};Object.defineProperty(wn,"__esModule",{value:!0});var xn=yn;wn.renderEntity=function e(t){var r="";switch(t.type){case"ruleSet":for(var n=t.rule,i=[];n;)n.nestingOperator&&i.push(n.nestingOperator),i.push(e(n)),n=n.rule;r=i.join(" ");break;case"selectors":r=t.selectors.map(e).join(", ");break;case"rule":t.tagName&&(r="*"===t.tagName?"*":xn.escapeIdentifier(t.tagName)),t.id&&(r+="#"+xn.escapeIdentifier(t.id)),t.classNames&&(r+=t.classNames.map((function(e){return"."+xn.escapeIdentifier(e)})).join("")),t.attrs&&(r+=t.attrs.map((function(e){return"operator"in e?"substitute"===e.valueType?"["+xn.escapeIdentifier(e.name)+e.operator+"$"+e.value+"]":"["+xn.escapeIdentifier(e.name)+e.operator+xn.escapeStr(e.value)+"]":"["+xn.escapeIdentifier(e.name)+"]"})).join("")),t.pseudos&&(r+=t.pseudos.map((function(t){return t.valueType?"selector"===t.valueType?":"+xn.escapeIdentifier(t.name)+"("+e(t.value)+")":"substitute"===t.valueType?":"+xn.escapeIdentifier(t.name)+"($"+t.value+")":"numeric"===t.valueType?":"+xn.escapeIdentifier(t.name)+"("+t.value+")":":"+xn.escapeIdentifier(t.name)+"("+xn.escapeIdentifier(t.value)+")":":"+xn.escapeIdentifier(t.name)})).join(""));break;default:throw Error('Unknown entity type: "'+t.type+'".')}return r},Object.defineProperty(gn,"__esModule",{value:!0});var kn=vn,En=wn,Sn=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.pseudos[i]="selector"}return this},e.prototype.unregisterSelectorPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.pseudos[i]}return this},e.prototype.registerNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.pseudos[i]="numeric"}return this},e.prototype.unregisterNumericPseudos=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.pseudos[i]}return this},e.prototype.registerNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.ruleNestingOperators[i]=!0}return this},e.prototype.unregisterNestingOperators=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.ruleNestingOperators[i]}return this},e.prototype.registerAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];this.attrEqualityMods[i]=!0}return this},e.prototype.unregisterAttrEqualityMods=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,n=e;r<n.length;r++){var i=n[r];delete this.attrEqualityMods[i]}return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},e.prototype.parse=function(e){return kn.parseCssSelector(e,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},e.prototype.render=function(e){return En.renderEntity(e).trim()},e}(),Pn=gn.CssSelectorParser=Sn,_n={},An={};Object.defineProperty(An,"__esModule",{value:!0}),An.parse=void 0;var Cn=new Set([9,10,12,13,32]),Fn="0".charCodeAt(0),Dn="9".charCodeAt(0);An.parse=function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t=0,r=0,n=a(),i=o();if(t<e.length&&"n"===e.charAt(t)&&(t++,r=n*(null!=i?i:1),s(),t<e.length?(n=a(),s(),i=o()):n=i=0),null===i||t<e.length)throw new Error("n-th rule couldn't be parsed ('"+e+"')");return[r,n*i];function a(){return"-"===e.charAt(t)?(t++,-1):("+"===e.charAt(t)&&t++,1)}function o(){for(var r=t,n=0;t<e.length&&e.charCodeAt(t)>=Fn&&e.charCodeAt(t)<=Dn;)n=10*n+(e.charCodeAt(t)-Fn),t++;return t===r?null:n}function s(){for(;t<e.length&&Cn.has(e.charCodeAt(t));)t++}};var On={};Object.defineProperty(On,"__esModule",{value:!0}),On.compile=void 0;var Rn={trueFunc:function(){return!0},falseFunc:function(){return!1}};On.compile=function(e){var t=e[0],r=e[1]-1;if(r<0&&t<=0)return Rn.falseFunc;if(-1===t)return function(e){return e<=r};if(0===t)return function(e){return e===r};if(1===t)return r<0?Rn.trueFunc:function(e){return e>=r};var n=Math.abs(t),i=(r%n+n)%n;return t>1?function(e){return e>=r&&e%n===i}:function(e){return e<=r&&e%n===i}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compile=e.parse=void 0;var t=An;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return t.parse}});var r=On;Object.defineProperty(e,"compile",{enumerable:!0,get:function(){return r.compile}}),e.default=function(e){return(0,r.compile)((0,t.parse)(e))}}(_n);const Tn=se(_n).default,In=new Set(["nth-child","nth-last-child","nth-of-type","nth-last-of-type"]),jn=new Pn;jn.registerAttrEqualityMods("~","^","$","*"),jn.registerSelectorPseudos("any","matches","not","has"),jn.registerNestingOperators(">","+","~");const Ln=Nr("type",{handlers:{selectors:function(e){const t=e.selectors;let r=-1;for(;++r<t.length;)Ln(t[r]);return e},ruleSet:function(e){return zn(e.rule)},rule:zn}});function qn(e){if("string"!=typeof e)throw new TypeError("Expected `string` as selector, not `"+e+"`");return Ln(jn.parse(e))}function zn(e){const t=e.pseudos||[];let r,n=-1;for(;++n<t.length;)r=t[n],In.has(r.name)&&(r.value=Tn(r.value),r.valueType="function");return Ln(e.rule),e}var Mn=ce(Object.freeze({__proto__:null,matches:function(e,t){return Boolean(ln(qn(e),t,{one:!0,shallow:!0,any:ln})[0])},select:function(e,t){return ln(qn(e),t,{one:!0,any:ln})[0]||null},selectAll:function(e,t){return ln(qn(e),t,{any:ln})}}));function Nn(e){if(e)throw e}
3
3
  /*!
4
4
  * Determine if an object is a Buffer
5
5
  *
6
6
  * @author Feross Aboukhadijeh <https://feross.org>
7
7
  * @license MIT
8
- */var Un=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},Vn=Object.prototype.hasOwnProperty,Hn=Object.prototype.toString,Qn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Wn=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Hn.call(e)},Kn=function(e){if(!e||"[object Object]"!==Hn.call(e))return!1;var t,r=Vn.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Vn.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Vn.call(e,t)},Jn=function(e,t){Qn&&"__proto__"===t.name?Qn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Yn=function(e,t){if("__proto__"===t){if(!Vn.call(e,t))return;if(Gn)return Gn(e,t).value}return e[t]},Xn=function e(){var t,r,n,i,a,o,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(r in t)n=Yn(s,r),s!==(i=Yn(t,r))&&(l&&i&&(Kn(i)||(a=Wn(i)))?(a?(a=!1,o=n&&Wn(n)?n:[]):o=n&&Kn(n)?n:{},Jn(s,{name:r,newValue:e(l,o,i)})):void 0!==i&&Jn(s,{name:r,newValue:i}));return s};function Zn(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function ei(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(a,...o){const s=e[++r];let c=-1;if(a)n(a);else{for(;++c<t.length;)null!==o[c]&&void 0!==o[c]||(o[c]=t[c]);t=o,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let o;n&&t.push(i);try{o=e(...t)}catch(e){const t=e;if(n&&r)throw t;return i(t)}n||(o instanceof Promise?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...n){r||(r=!0,t(e,...n))}function a(e){i(null,e)}}(s,i)(...o):n(null,...o)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}var ti={}.hasOwnProperty;function ri(e){return e&&"object"==typeof e?ti.call(e,"position")||ti.call(e,"type")?ii(e.position):ti.call(e,"start")||ti.call(e,"end")?ii(e):ti.call(e,"line")||ti.call(e,"column")?ni(e):"":""}function ni(e){return ai(e&&e.line)+":"+ai(e&&e.column)}function ii(e){return ni(e&&e.start)+"-"+ni(e&&e.end)}function ai(e){return e&&"number"==typeof e?e:1}class oi extends Error{constructor(e,t,r){var n,i=[null,null],a={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(r=t,t=null),"string"==typeof r&&(-1===(n=r.indexOf(":"))?i[1]=r:(i[0]=r.slice(0,n),i[1]=r.slice(n+1))),t&&("type"in t||"position"in t?t.position&&(a=t.position):"start"in t||"end"in t?a=t:("line"in t||"column"in t)&&(a.start=t)),this.name=ri(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="object"==typeof e?e.stack:"",this.reason=this.message,this.line=a.start.line,this.column=a.start.column,this.source=i[0],this.ruleId=i[1],this.position=a,this.file,this.fatal,this.url,this.note}}oi.prototype.file="",oi.prototype.name="",oi.prototype.reason="",oi.prototype.message="",oi.prototype.stack="",oi.prototype.fatal=null,oi.prototype.column=null,oi.prototype.line=null,oi.prototype.source=null,oi.prototype.ruleId=null,oi.prototype.position=null;const si=z.default;function ci(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}const ui=["history","path","basename","stem","extname","dirname"];class li{constructor(e){let t;t=e?"string"==typeof e||Un(e)?{value:e}:ci(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=si.cwd(),this.value,this.stored,this.result,this.map;let r,n=-1;for(;++n<ui.length;){const e=ui[n];e in t&&void 0!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)ui.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){ci(e)&&(e=o.fileURLToPath(e)),hi(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?j.default.dirname(this.path):void 0}set dirname(e){pi(this.basename,"dirname"),this.path=j.default.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?j.default.basename(this.path):void 0}set basename(e){hi(e,"basename"),fi(e,"basename"),this.path=j.default.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?j.default.extname(this.path):void 0}set extname(e){if(fi(e,"extname"),pi(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=j.default.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?j.default.basename(this.path,this.extname):void 0}set stem(e){hi(e,"stem"),fi(e,"stem"),this.path=j.default.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,r){const n=new oi(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=null,n}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}}function fi(e,t){if(e&&e.includes(j.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+j.default.sep+"`")}function hi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function pi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const di=function e(){const t=ei(),r=[];let n,i={},a=-1;return o.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(bi("data",n),i[e]=t,o):mi.call(i,e)&&i[e]||null;if(e)return bi("data",n),i=e,o;return i},o.Parser=void 0,o.Compiler=void 0,o.freeze=function(){if(n)return o;for(;++a<r.length;){const[e,...n]=r[a];if(!1===n[0])continue;!0===n[0]&&(n[1]=void 0);const i=e.call(o,...n);"function"==typeof i&&t.use(i)}return n=!0,a=Number.POSITIVE_INFINITY,o},o.attachers=r,o.use=function(e,...t){let a;if(bi("use",n),null==e);else if("function"==typeof e)l(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?u(e):c(e)}a&&(i.settings=Object.assign(i.settings||{},a));return o;function s(e){if("function"==typeof e)l(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;l(t,...r)}else c(e)}}function c(e){u(e.plugins),e.settings&&(a=Object.assign(a||{},e.settings))}function u(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){s(e[t])}}}function l(e,t){let n,i=-1;for(;++i<r.length;)if(r[i][0]===e){n=r[i];break}n?(Zn(n[1])&&Zn(t)&&(t=Xn(!0,n[1],t)),n[1]=t):r.push([...arguments])}},o.parse=function(e){o.freeze();const t=ki(e),r=o.Parser;if(vi("parse",r),gi(r,"parse"))return new r(String(t),t).parse();return r(String(t),t)},o.stringify=function(e,t){o.freeze();const r=ki(t),n=o.Compiler;if(yi("stringify",n),wi(e),gi(n,"compile"))return new n(e,r).compile();return n(e,r)},o.run=function(e,r,n){wi(e),o.freeze(),n||"function"!=typeof r||(n=r,r=void 0);if(!n)return new Promise(i);function i(i,a){function o(t,r,o){r=r||e,t?a(t):i?i(r):n(null,r,o)}t.run(e,ki(r),o)}i(null,n)},o.runSync=function(e,t){let r,n;return o.run(e,t,i),xi("runSync","run",n),r;function i(e,t){$n(e),r=t,n=!0}},o.process=function(e,t){if(o.freeze(),vi("process",o.Parser),yi("process",o.Compiler),!t)return new Promise(r);function r(r,n){const i=ki(e);function a(e,i){e||!i?n(e):r?r(i):t(null,i)}o.run(o.parse(i),i,((e,t,r)=>{if(!e&&t&&r){const n=o.stringify(t,r);null==n||(!function(e){return"string"==typeof e||Un(e)}(n)?r.result=n:r.value=n),a(e,r)}else a(e)}))}r(null,t)},o.processSync=function(e){let t;o.freeze(),vi("processSync",o.Parser),yi("processSync",o.Compiler);const r=ki(e);return o.process(r,n),xi("processSync","process",t),r;function n(e){t=!0,$n(e)}},o;function o(){const t=e();let n=-1;for(;++n<r.length;)t.use(...r[n]);return t.data(Xn(!0,{},i)),t}}().freeze(),mi={}.hasOwnProperty;function gi(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(mi.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function vi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function yi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function bi(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function wi(e){if(!Zn(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function xi(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ki(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new li(e)}var Ei=le(Object.freeze({__proto__:null,unified:di}));function Si(e,t){var{includeImageAlt:r=!0}=t||{};return Pi(e,r)}function Pi(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&_i(e.children,t)||Array.isArray(e)&&_i(e,t))||""}function _i(e,t){for(var r=[],n=-1;++n<e.length;)r[n]=Pi(e[n],t);return r.join("")}function Ai(e,t,r,n){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),[].splice.apply(e,a);else for(r&&[].splice.apply(e,[t,r]);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),[].splice.apply(e,a),o+=1e4,t+=1e4}function Ci(e,t){return e.length>0?(Ai(e,e.length,0,t),e):t}const Fi={}.hasOwnProperty;function Di(e){const t={};let r=-1;for(;++r<e.length;)Oi(t,e[r]);return t}function Oi(e,t){let r;for(r in t){const n=(Fi.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;for(a in i){Fi.call(n,a)||(n[a]=[]);const e=i[a];Ri(n[a],Array.isArray(e)?e:e?[e]:[])}}}function Ri(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);Ai(e,0,0,n)}const Ti=Hi(/[A-Za-z]/),Ii=Hi(/\d/),ji=Hi(/[\dA-Fa-f]/),Li=Hi(/[\dA-Za-z]/),qi=Hi(/[!-/:-@[-`{-~]/),zi=Hi(/[#-'*+\--9=?A-Z^-~]/);function Mi(e){return null!==e&&(e<32||127===e)}function Ni(e){return null!==e&&(e<0||32===e)}function Bi(e){return null!==e&&e<-2}function $i(e){return-2===e||-1===e||32===e}const Ui=Hi(/\s/),Vi=Hi(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\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]/);function Hi(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}var Qi=Object.freeze({__proto__:null,asciiAlpha:Ti,asciiDigit:Ii,asciiHexDigit:ji,asciiAlphanumeric:Li,asciiPunctuation:qi,asciiAtext:zi,asciiControl:Mi,markdownLineEndingOrSpace:Ni,markdownLineEnding:Bi,markdownSpace:$i,unicodeWhitespace:Ui,unicodePunctuation:Vi});function Gi(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return function(n){if($i(n))return e.enter(r),o(n);return t(n)};function o(n){return $i(n)&&a++<i?(e.consume(n),o):(e.exit(r),t(n))}}var Wi=Object.freeze({__proto__:null,factorySpace:Gi});const Ki={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Gi(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),n(t)}));let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Bi(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const Ji={tokenize:function(e){const t=this,r=[];let n,i,a,o=0;return s;function s(n){if(o<r.length){const i=r[o];return t.containerState=i[1],e.attempt(i[0].continuation,c,u)(n)}return u(n)}function c(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,a=r;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}v(o);let s=r;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return Ai(t.events,a+1,0,t.events.slice(r)),t.events.length=s,u(e)}return s(e)}function u(i){if(o===r.length){if(!n)return h(i);if(n.currentConstruct&&n.currentConstruct.concrete)return d(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Yi,l,f)(i)}function l(e){return n&&y(),v(o),h(e)}function f(e){return t.parser.lazy[t.now().line]=o!==r.length,a=t.now().offset,d(e)}function h(r){return t.containerState={},e.attempt(Yi,p,d)(r)}function p(e){return o++,r.push([t.currentConstruct,t.containerState]),h(e)}function d(r){return null===r?(n&&y(),v(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),m(r))}function m(r){return null===r?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(r)):Bi(r)?(e.consume(r),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(r),m)}function g(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<a&&(!n.events[e][1].end||n.events[e][1].end.offset>a))return;const r=t.events.length;let i,s,c=r;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){s=t.events[c][1].end;break}i=!0}for(v(o),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;Ai(t.events,c+1,0,t.events.slice(r)),t.events.length=e}}function v(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Yi={tokenize:function(e,t,r){return Gi(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Xi(e){return null===e||Ni(e)||Ui(e)?1:Vi(e)?2:void 0}function Zi(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const ea={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Xi(n);let a;return function(t){return e.enter("attentionSequence"),a=t,o(t)};function o(s){if(s===a)return e.consume(s),o;const c=e.exit("attentionSequence"),u=Xi(s),l=!u||2===u&&i||r.includes(s),f=!i||2===i&&u||r.includes(n);return c._open=Boolean(42===a?l:l&&(i||!f)),c._close=Boolean(42===a?f:f&&(u||!l)),t(s)}},resolveAll:function(e,t){let r,n,i,a,o,s,c,u,l=-1;for(;++l<e.length;)if("enter"===e[l][0]&&"attentionSequence"===e[l][1].type&&e[l][1]._close)for(r=l;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[l][1].start);ta(f,-s),ta(h,s),a={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:s>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},a.start),e[l][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Ci(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Ci(c,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=Ci(c,Zi(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),c=Ci(c,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(u=2,c=Ci(c,[["enter",e[l][1],t],["exit",e[l][1],t]])):u=0,Ai(e,r-1,l-r+3,c),l=r+c.length-u-2;break}l=-1;for(;++l<e.length;)"attentionSequence"===e[l][1].type&&(e[l][1].type="data");return e}};function ta(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ra={name:"autolink",tokenize:function(e,t,r){let n=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 Ti(t)?(e.consume(t),a):zi(t)?c(t):r(t)}function a(e){return 43===e||45===e||46===e||Li(e)?o(e):c(e)}function o(t){return 58===t?(e.consume(t),s):(43===t||45===t||46===t||Li(t))&&n++<32?(e.consume(t),o):c(t)}function s(t){return 62===t?(e.exit("autolinkProtocol"),h(t)):null===t||32===t||60===t||Mi(t)?r(t):(e.consume(t),s)}function c(t){return 64===t?(e.consume(t),n=0,u):zi(t)?(e.consume(t),c):r(t)}function u(e){return Li(e)?l(e):r(e)}function l(t){return 46===t?(e.consume(t),n=0,u):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",h(t)):f(t)}function f(t){return(45===t||Li(t))&&n++<63?(e.consume(t),45===t?f:l):r(t)}function h(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};const na={tokenize:function(e,t,r){return Gi(e,(function(e){return null===e||Bi(e)?t(e):r(e)}),"linePrefix")},partial:!0};const ia={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return $i(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return Gi(e,e.attempt(ia,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};const aa={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return qi(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const oa={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:"IJ",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:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",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:"ij",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:"ʼn",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:"‌"},sa={}.hasOwnProperty;function ca(e){return!!sa.call(oa,e)&&oa[e]}const ua={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,a,o=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"),i=31,a=Li,u(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=ji,u):(e.enter("characterReferenceValue"),i=7,a=Ii,u(t))}function u(s){let c;return 59===s&&o?(c=e.exit("characterReferenceValue"),a!==Li||ca(n.sliceSerialize(c))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):a(s)&&o++<i?(e.consume(s),u):r(s)}}};const la={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let n=0;return Gi(e,i,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(t)}function a(t){return t===c?(e.consume(t),n++,a):n<u?r(t):(e.exit("codeFencedFenceSequence"),Gi(e,o,"whitespace")(t))}function o(n){return null===n||Bi(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0},a={tokenize:function(e,t,r){const n=this;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a}function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},o=this.events[this.events.length-1],s=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let c,u=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c=t,l(t)};function l(t){return t===c?(e.consume(t),u++,l):(e.exit("codeFencedFenceSequence"),u<3?r(t):Gi(e,f,"whitespace")(t))}function f(t){return null===t||Bi(t)?m(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||Ni(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Gi(e,p,"whitespace")(t)):96===t&&t===c?r(t):(e.consume(t),h)}function p(t){return null===t||Bi(t)?m(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Bi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(t)):96===t&&t===c?r(t):(e.consume(t),d)}function m(r){return e.exit("codeFencedFence"),n.interrupt?t(r):g(r)}function g(t){return null===t?y(t):Bi(t)?e.attempt(a,e.attempt(i,y,s?Gi(e,g,"linePrefix",s+1):g),y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||Bi(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const fa={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),Gi(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):r(e)}function a(t){return null===t?s(t):Bi(t)?e.attempt(ha,a,s)(t):(e.enter("codeFlowValue"),o(t))}function o(t){return null===t||Bi(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),o)}function s(r){return e.exit("codeIndented"),t(r)}}},ha={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):Bi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Gi(e,a,"linePrefix",5)(t)}function a(e){const a=n.events[n.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Bi(e)?i(e):r(e)}},partial:!0};const pa={name:"codeText",tokenize:function(e,t,r){let n,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):Bi(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||Bi(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function u(r){return 96===r?(e.consume(r),n++,u):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",c(r))}},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function da(e){const t={};let r,n,i,a,o,s,c,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(r=e[u],u&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[u-1][1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,ma(e,u)),u=t[u],c=!0);else if(r[1]._container){for(i=u,n=void 0;i--&&(a=e[i],"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type);)"enter"===a[0]&&(n&&(e[n][1].type="lineEndingBlank"),a[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),o=e.slice(n,u),o.unshift(r),Ai(e,n,u-n+1,o))}}return!c}function ma(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const a=[],o=r._tokenizer||n.parser[r.contentType](r.start),s=o.events,c=[],u={};let l,f,h=-1,p=r,d=0,m=0;const g=[m];for(;p;){for(;e[++i][1]!==p;);a.push(i),p._tokenizer||(l=n.sliceStream(p),p.next||l.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(l),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),r=a.pop();c.unshift([r,r+t.length-1]),Ai(e,r,2,t)}for(h=-1;++h<c.length;)u[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return u}const ga={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):Bi(t)?e.check(va,a,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function a(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return da(e),e}},va={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Gi(e,i,"linePrefix")};function i(i){if(null===i||Bi(i))return r(i);const a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};function ya(e,t,r,n,i,a,o,s,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f;if(null===t||41===t||Mi(t))return r(t);return e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(a),e.consume(r),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||Bi(t)?r(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function d(i){return 40===i?++l>u?r(i):(e.consume(i),d):41===i?l--?(e.consume(i),d):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(i)):null===i||Ni(i)?l?r(i):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(i)):Mi(i)?r(i):(e.consume(i),92===i?m:d)}function m(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}var ba=Object.freeze({__proto__:null,factoryDestination:ya});function wa(e,t,r,n,i,a){const o=this;let s,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u};function u(f){return null===f||91===f||93===f&&!s||94===f&&!c&&"_hiddenFootnoteSupport"in o.parser.constructs||c>999?r(f):93===f?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):Bi(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||Bi(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s=s||!$i(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,l):l(t)}}var xa=Object.freeze({__proto__:null,factoryLabel:wa});function ka(e,t,r,n,i,a){let o;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s};function s(r){return r===o?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(a),c(r))}function c(t){return t===o?(e.exit(a),s(o)):null===t?r(t):Bi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Gi(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===o||null===t||Bi(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return t===o||92===t?(e.consume(t),u):u(t)}}var Ea=Object.freeze({__proto__:null,factoryTitle:ka});function Sa(e,t){let r;return function n(i){if(Bi(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if($i(i))return Gi(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}var Pa=Object.freeze({__proto__:null,factoryWhitespace:Sa});function _a(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Aa=Object.freeze({__proto__:null,normalizeIdentifier:_a});const Ca={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),wa.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function a(t){return i=_a(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),Sa(e,ya(e,e.attempt(Fa,Gi(e,o,"whitespace"),Gi(e,o,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function o(a){return null===a||Bi(a)?(e.exit("definition"),n.parser.defined.includes(i)||n.parser.defined.push(i),t(a)):r(a)}}},Fa={tokenize:function(e,t,r){return function(t){return Ni(t)?Sa(e,n)(t):r(t)};function n(t){return 34===t||39===t||40===t?ka(e,Gi(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||Bi(e)?t(e):r(e)}},partial:!0};const Da={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),n};function n(n){return Bi(n)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(n)):r(n)}}};const Oa={name:"headingAtx",tokenize:function(e,t,r){const n=this;let i=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),a(t)};function a(s){return 35===s&&i++<6?(e.consume(s),a):null===s||Ni(s)?(e.exit("atxHeadingSequence"),n.interrupt?t(s):o(s)):r(s)}function o(r){return 35===r?(e.enter("atxHeadingSequence"),s(r)):null===r||Bi(r)?(e.exit("atxHeading"),t(r)):$i(r)?Gi(e,o,"whitespace")(r):(e.enter("atxHeadingText"),c(r))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function c(t){return null===t||35===t||Ni(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),c)}},resolve:function(e,t){let r,n,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},n={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Ai(e,a,i-a+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const Ra=["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"],Ta=["pre","script","style","textarea"],Ia={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,a,o,s,c;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u};function u(s){return 33===s?(e.consume(s),l):47===s?(e.consume(s),p):63===s?(e.consume(s),i=3,n.interrupt?t:I):Ti(s)?(e.consume(s),o=String.fromCharCode(s),a=!0,d):r(s)}function l(a){return 45===a?(e.consume(a),i=2,f):91===a?(e.consume(a),i=5,o="CDATA[",s=0,h):Ti(a)?(e.consume(a),i=4,n.interrupt?t:I):r(a)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:I):r(i)}function h(i){return i===o.charCodeAt(s++)?(e.consume(i),s===o.length?n.interrupt?t:_:h):r(i)}function p(t){return Ti(t)?(e.consume(t),o=String.fromCharCode(t),d):r(t)}function d(s){return null===s||47===s||62===s||Ni(s)?47!==s&&a&&Ta.includes(o.toLowerCase())?(i=1,n.interrupt?t(s):_(s)):Ra.includes(o.toLowerCase())?(i=6,47===s?(e.consume(s),m):n.interrupt?t(s):_(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):a?v(s):g(s)):45===s||Li(s)?(e.consume(s),o+=String.fromCharCode(s),d):r(s)}function m(i){return 62===i?(e.consume(i),n.interrupt?t:_):r(i)}function g(t){return $i(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||Ti(t)?(e.consume(t),y):$i(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||Li(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):$i(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,x):$i(t)?(e.consume(t),w):(c=null,k(t))}function x(t){return null===t||Bi(t)?r(t):t===c?(e.consume(t),E):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||Ni(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||$i(e)?v(e):r(e)}function S(t){return 62===t?(e.consume(t),P):r(t)}function P(t){return $i(t)?(e.consume(t),P):null===t||Bi(t)?_(t):r(t)}function _(t){return 45===t&&2===i?(e.consume(t),D):60===t&&1===i?(e.consume(t),O):62===t&&4===i?(e.consume(t),j):63===t&&3===i?(e.consume(t),I):93===t&&5===i?(e.consume(t),T):!Bi(t)||6!==i&&7!==i?null===t||Bi(t)?A(t):(e.consume(t),_):e.check(ja,j,A)(t)}function A(t){return e.exit("htmlFlowData"),C(t)}function C(t){return null===t?L(t):Bi(t)?e.attempt({tokenize:F,partial:!0},C,L)(t):(e.enter("htmlFlowData"),_(t))}function F(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}function D(t){return 45===t?(e.consume(t),I):_(t)}function O(t){return 47===t?(e.consume(t),o="",R):_(t)}function R(t){return 62===t&&Ta.includes(o.toLowerCase())?(e.consume(t),j):Ti(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),R):_(t)}function T(t){return 93===t?(e.consume(t),I):_(t)}function I(t){return 62===t?(e.consume(t),j):45===t&&2===i?(e.consume(t),I):_(t)}function j(t){return null===t||Bi(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),j)}function L(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let 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},ja={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(na,t,r)}},partial:!0};const La={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,a,o,s;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),k):63===t?(e.consume(t),w):Ti(t)?(e.consume(t),P):r(t)}function u(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),a="CDATA[",o=0,m):Ti(t)?(e.consume(t),b):r(t)}function l(t){return 45===t?(e.consume(t),f):r(t)}function f(t){return null===t||62===t?r(t):45===t?(e.consume(t),h):p(t)}function h(e){return null===e||62===e?r(e):p(e)}function p(t){return null===t?r(t):45===t?(e.consume(t),d):Bi(t)?(s=p,T(t)):(e.consume(t),p)}function d(t){return 45===t?(e.consume(t),j):p(t)}function m(t){return t===a.charCodeAt(o++)?(e.consume(t),o===a.length?g:m):r(t)}function g(t){return null===t?r(t):93===t?(e.consume(t),v):Bi(t)?(s=g,T(t)):(e.consume(t),g)}function v(t){return 93===t?(e.consume(t),y):g(t)}function y(t){return 62===t?j(t):93===t?(e.consume(t),y):g(t)}function b(t){return null===t||62===t?j(t):Bi(t)?(s=b,T(t)):(e.consume(t),b)}function w(t){return null===t?r(t):63===t?(e.consume(t),x):Bi(t)?(s=w,T(t)):(e.consume(t),w)}function x(e){return 62===e?j(e):w(e)}function k(t){return Ti(t)?(e.consume(t),E):r(t)}function E(t){return 45===t||Li(t)?(e.consume(t),E):S(t)}function S(t){return Bi(t)?(s=S,T(t)):$i(t)?(e.consume(t),S):j(t)}function P(t){return 45===t||Li(t)?(e.consume(t),P):47===t||62===t||Ni(t)?_(t):r(t)}function _(t){return 47===t?(e.consume(t),j):58===t||95===t||Ti(t)?(e.consume(t),A):Bi(t)?(s=_,T(t)):$i(t)?(e.consume(t),_):j(t)}function A(t){return 45===t||46===t||58===t||95===t||Li(t)?(e.consume(t),A):C(t)}function C(t){return 61===t?(e.consume(t),F):Bi(t)?(s=C,T(t)):$i(t)?(e.consume(t),C):_(t)}function F(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,D):Bi(t)?(s=F,T(t)):$i(t)?(e.consume(t),F):(e.consume(t),i=void 0,R)}function D(t){return t===i?(e.consume(t),O):null===t?r(t):Bi(t)?(s=D,T(t)):(e.consume(t),D)}function O(e){return 62===e||47===e||Ni(e)?_(e):r(e)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||Ni(t)?_(t):(e.consume(t),R)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Gi(e,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function I(t){return e.enter("htmlTextData"),s(t)}function j(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};const qa={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if(("labelImage"===n.events[o][1].type||"labelLink"===n.events[o][1].type)&&!n.events[o][1]._balanced){i=n.events[o][1];break}return function(t){if(!i)return r(t);return i._inactive?c(t):(a=n.parser.defined.includes(_a(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s)};function s(r){return 40===r?e.attempt(za,t,a?t:c)(r):91===r?e.attempt(Ma,t,a?e.attempt(Na,t,c):c)(r):a?t(r):c(r)}function c(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,a,o=e.length,s=0;for(;o--;)if(r=e[o][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[o][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=o,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=o);const c={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},l={type:"labelText",start:Object.assign({},e[n+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return a=[["enter",c,t],["enter",u,t]],a=Ci(a,e.slice(n+1,n+s+3)),a=Ci(a,[["enter",l,t]]),a=Ci(a,Zi(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),a=Ci(a,[["exit",l,t],e[i-2],e[i-1],["exit",u,t]]),a=Ci(a,e.slice(i+1)),a=Ci(a,[["exit",c,t]]),Ai(e,n,e.length,a),e},resolveAll:function(e){let t,r=-1;for(;++r<e.length;)t=e[r][1],"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(r+1,"labelImage"===t.type?4:2),t.type="data",r++);return e}},za={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),Sa(e,n)};function n(t){return 41===t?o(t):ya(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function i(t){return Ni(t)?Sa(e,a)(t):o(t)}function a(t){return 34===t||39===t||40===t?ka(e,Sa(e,o),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):o(t)}function o(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},Ma={tokenize:function(e,t,r){const n=this;return function(t){return wa.call(n,e,i,r,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(_a(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}}},Na={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const Ba={name:"labelStartImage",tokenize:function(e,t,r){const n=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"),a):r(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:qa.resolveAll};const $a={name:"labelStartLink",tokenize:function(e,t,r){const n=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 n.parser.constructs?r(e):t(e)}},resolveAll:qa.resolveAll};const Ua={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Gi(e,t,"linePrefix")}}};const Va={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),n=t,a(t)};function a(s){return s===n?(e.enter("thematicBreakSequence"),o(s)):$i(s)?Gi(e,a,"whitespace")(s):i<3||null!==s&&!Bi(s)?r(s):(e.exit("thematicBreak"),t(s))}function o(t){return t===n?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),a(t))}}};const Ha={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:Ii(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(Va,r,c)(t):c(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return Ii(t)&&++o<10?(e.consume(t),s):(!n.interrupt||o<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):r(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(na,n.interrupt?r:u,e.attempt(Qa,f,l))}function u(e){return n.containerState.initialBlankLine=!0,a++,f(e)}function l(t){return $i(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(na,i,a);function i(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Gi(e,t,"listItemIndent",n.containerState.size+1)(r)}function a(r){return n.containerState.furtherBlankLines||!$i(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Ga,t,o)(r))}function o(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Gi(e,e.attempt(Ha,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},Qa={tokenize:function(e,t,r){const n=this;return Gi(e,(function(e){const i=n.events[n.events.length-1];return!$i(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Ga={tokenize:function(e,t,r){const n=this;return Gi(e,(function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const Wa={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if("lineEnding"!==n.events[o][1].type&&"linePrefix"!==n.events[o][1].type&&"content"!==n.events[o][1].type){a="paragraph"===n.events[o][1].type;break}return function(t){if(!n.parser.lazy[n.now().line]&&(n.interrupt||a))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,s(t);return r(t)};function s(t){return t===i?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),Gi(e,c,"lineSuffix")(t))}function c(n){return null===n||Bi(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){r=a;break}"paragraph"===e[a][1].type&&(n=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const o={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=o;return e.push(["exit",o,t]),e}};var Ka=Object.freeze({__proto__:null,attention:ea,autolink:ra,blankLine:na,blockQuote:ia,characterEscape:aa,characterReference:ua,codeFenced:la,codeIndented:fa,codeText:pa,content:ga,definition:Ca,hardBreakEscape:Da,headingAtx:Oa,htmlFlow:Ia,htmlText:La,labelEnd:qa,labelStartImage:Ba,labelStartLink:$a,lineEnding:Ua,list:Ha,setextUnderline:Wa,thematicBreak:Va});const Ja={tokenize:function(e){const t=this,r=e.attempt(na,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,Gi(e,e.attempt(this.parser.constructs.flow,n,e.attempt(ga,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const Ya={resolveAll:to()},Xa=eo("string"),Za=eo("text");function eo(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(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){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}},resolveAll:to("text"===e?ro:void 0)}}function to(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function ro(e,t){let r=-1;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let a,o=i.length,s=-1,c=0;for(;o--;){const e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)c++,s--;if(s)break;s=-1}else if(-2===e)a=!0,c++;else if(-1!==e){o++;break}}if(c){const i={type:r===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-c,offset:n.end.offset-c,_index:n.start._index+o,_bufferIndex:o?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},i.start),n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function no(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const c={consume:function(e){Bi(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++));u.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=h(),u.events.push(["enter",r,u]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=h(),u.events.push(["exit",t,u]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,n.push(o)}return n.join("")}(f(e),t)},now:h,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(o=Ci(o,e),p(),null!==o[o.length-1])return[];return v(t,0),u.events=Zi(a,u.events,u),u.events}};let l=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function f(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;r===i?o=[e[r].slice(n,a)]:(o=e.slice(r,i),n>-1&&(o[0]=o[0].slice(n)),a>0&&o.push(e[i].slice(0,a)));return o}(o,e)}function h(){return Object.assign({},n)}function p(){let e;for(;n._index<o.length;){const t=o[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)d(t.charCodeAt(n._bufferIndex));else d(t)}}function d(e){l=l(e)}function m(e,t){t.restore()}function g(e,t){return function(r,i,a){let o,l,f,p;return Array.isArray(r)?d(r):"tokenize"in r?d([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return d([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function d(e){return o=e,l=0,0===e.length?a:m(e[l])}function m(e){return function(r){p=function(){const e=h(),t=u.previous,r=u.currentConstruct,i=u.events.length,a=Array.from(s);return{restore:o,from:i};function o(){n=e,u.previous=t,u.currentConstruct=r,u.events.length=i,s=a,y()}}(),f=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,g,v)(r)}}function g(t){return e(f,p),i}function v(e){return p.restore(),++l<o.length?m(o[l]):a}}}function v(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ai(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(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const io={42:Ha,43:Ha,45:Ha,48:Ha,49:Ha,50:Ha,51:Ha,52:Ha,53:Ha,54:Ha,55:Ha,56:Ha,57:Ha,62:ia},ao={91:Ca},oo={[-2]:fa,[-1]:fa,32:fa},so={35:Oa,42:Va,45:[Wa,Va],60:Ia,61:Wa,95:Va,96:la,126:la},co={38:ua,92:aa},uo={[-5]:Ua,[-4]:Ua,[-3]:Ua,33:Ba,38:ua,42:ea,60:[ra,La],91:$a,92:[Da,aa],93:qa,95:ea,96:pa},lo={null:[ea,Ya]};var fo=Object.freeze({__proto__:null,document:io,contentInitial:ao,flowInitial:oo,flow:so,string:co,text:uo,insideSpan:lo,attentionMarkers:{null:[42,95]},disable:{null:[]}});const ho=/[\0\t\n\r]/g;function po(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535==(65535&r)||65534==(65535&r)||r>1114111?"�":String.fromCharCode(r)}const mo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function go(e){return e.replace(mo,vo)}function vo(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return po(r.slice(t?2:1),t?16:10)}return ca(r)||e}const yo={}.hasOwnProperty,bo=function(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e={}){const t=wo({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(ne),autolinkProtocol:C,autolinkEmail:C,atxHeading:c(Z),blockQuote:c(W),characterEscape:C,characterReference:C,codeFenced:c(K),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:c(K,u),codeText:c(J,u),codeTextData:C,data:C,codeFlowValue:C,definition:c(Y),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:c(X),hardBreakEscape:c(ee),hardBreakTrailing:c(ee),htmlFlow:c(te,u),htmlFlowData:C,htmlText:c(te,u),htmlTextData:C,image:c(re),label:u,link:c(ne),listItem:c(ae),listItemValue:m,listOrdered:c(ie,d),listUnordered:c(ie),paragraph:c(oe),reference:$,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:c(Z),strong:c(se),thematicBreak:c(ue)},exit:{atxHeading:f(),atxHeadingSequence:S,autolink:f(),autolinkEmail:G,autolinkProtocol:Q,blockQuote:f(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:H,codeFenced:f(b),codeFencedFence:y,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:F,codeIndented:f(w),codeText:f(I),codeTextData:F,data:F,definition:f(),definitionDestinationString:E,definitionLabelString:x,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(O),hardBreakTrailing:f(O),htmlFlow:f(R),htmlFlowData:F,htmlText:f(T),htmlTextData:F,image:f(L),label:z,labelText:q,lineEnding:D,link:f(j),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:U,resourceDestinationString:M,resourceTitleString:N,resource:B,setextHeading:f(A),setextHeadingLineSequence:_,setextHeadingText:P,strong:f(),thematicBreak:f()}},e.mdastExtensions||[]),r={};return n;function n(e){let r={type:"root",children:[]};const n=[],c=[],f={stack:[r],tokenStack:n,config:t,enter:l,exit:h,buffer:u,resume:p,setData:a,getData:o};let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])c.push(d);else{d=i(e,c.pop(),d)}for(d=-1;++d<e.length;){const r=t[e[d][0]];yo.call(r,e[d][1].type)&&r[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},f),e[d][1])}if(n.length>0){const e=n[n.length-1];(e[1]||ko).call(f,void 0,e[0])}for(r.position={start:s(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:s(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,r){let n,i,a,o,s=t-1,c=-1,u=!1;for(;++s<=r;){const t=e[s];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?c++:c--,o=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!n||o||c||a||(a=s),o=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(o=void 0),!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let o=s;for(i=void 0;o--;){const t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=o}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}"listItemPrefix"===t[1].type&&(n={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(s,0,["enter",n,t[2]]),s++,r++,a=void 0,o=!0)}}return e[t][1]._spread=u,r}function a(e,t){r[e]=t}function o(e){return r[e]}function s(e){return{line:e.line,column:e.column,offset:e.offset}}function c(e,t){return r;function r(r){l.call(this,e(r),r),t&&t.call(this,r)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(e,t,r){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:s(t.start)},e}function f(e){return t;function t(t){e&&e.call(this,t),h.call(this,t)}}function h(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+ri({start:e.start,end:e.end})+"): it’s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||ko).call(this,e,n[0])}return r.position.end=s(e.end),r}function p(){return Si(this.stack.pop())}function d(){a("expectingFirstListItemValue",!0)}function m(e){if(o("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),a("expectingFirstListItemValue")}}function g(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function v(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function y(){o("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}function w(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function x(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=_a(this.sliceSerialize(e)).toLowerCase()}function k(){const e=this.resume();this.stack[this.stack.length-1].title=e}function E(){const e=this.resume();this.stack[this.stack.length-1].url=e}function S(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function P(){a("setextHeadingSlurpLineEnding",!0)}function _(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function A(){a("setextHeadingSlurpLineEnding")}function C(e){const t=this.stack[this.stack.length-1];let r=t.children[t.children.length-1];r&&"text"===r.type||(r=ce(),r.position={start:s(e.start)},t.children.push(r)),this.stack.push(r)}function F(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=s(e.end)}function D(e){const r=this.stack[this.stack.length-1];if(o("atHardBreak")){return r.children[r.children.length-1].position.end=s(e.end),void a("atHardBreak")}!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(r.type)&&(C.call(this,e),F.call(this,e))}function O(){a("atHardBreak",!0)}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),a("referenceType")}function L(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),a("referenceType")}function q(e){const t=this.stack[this.stack.length-2],r=this.sliceSerialize(e);t.label=go(r),t.identifier=_a(r).toLowerCase()}function z(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];a("inReference",!0),"link"===r.type?r.children=e.children:r.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function B(){a("inReference")}function $(){a("referenceType","collapsed")}function U(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=_a(this.sliceSerialize(e)).toLowerCase(),a("referenceType","full")}function V(e){a("characterReferenceType",e.type)}function H(e){const t=this.sliceSerialize(e),r=o("characterReferenceType");let n;r?(n=po(t,"characterReferenceMarkerNumeric"===r?10:16),a("characterReferenceType")):n=ca(t);const i=this.stack.pop();i.value+=n,i.position.end=s(e.end)}function Q(e){F.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){F.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function J(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:void 0,children:[]}}function ee(){return{type:"break"}}function te(){return{type:"html",value:""}}function re(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function ie(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ae(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function se(){return{type:"strong",children:[]}}function ce(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}(r)(function(e){for(;!da(e););return e}(function(e={}){const t={defined:[],lazy:{},constructs:Di([fo].concat(e.extensions||[])),content:r(Ki),document:r(Ji),flow:r(Ja),string:r(Xa),text:r(Za)};return t;function r(e){return function(r){return no(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,a,o){const s=[];let c,u,l,f,h;for(i=r+i.toString(a),l=0,r="",n&&(65279===i.charCodeAt(0)&&l++,n=void 0);l<i.length;){if(ho.lastIndex=l,c=ho.exec(i),f=c&&void 0!==c.index?c.index:i.length,h=i.charCodeAt(f),!c){r=i.slice(l);break}if(10===h&&l===f&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<f&&(s.push(i.slice(l,f)),t+=f-l),h){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=f+1}return o&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))};function wo(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?wo(e,n):xo(e,n)}return e}function xo(e,t){let r;for(r in t)if(yo.call(t,r)){const n="canContainEols"===r||"transforms"===r,i=(yo.call(e,r)?e[r]:void 0)||(e[r]=n?[]:{}),a=t[r];a&&(n?e[r]=[...i,...a]:Object.assign(i,a))}}function ko(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ri({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ri({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ri({start:t.start,end:t.end})+") is still open")}var Eo=le(Object.freeze({__proto__:null,default:function(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return bo(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}}));const So={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return 87===t||119===t?(e.consume(t),i):r(t)}function i(t){return 87===t||119===t?(e.consume(t),a):r(t)}function a(t){return 46===t?(e.consume(t),o):r(t)}function o(e){return null===e||Bi(e)?r(e):t(e)}},partial:!0},Po={tokenize:function(e,t,r){let n,i;return a;function a(t){return 38===t?e.check(Co,s,o)(t):46===t||95===t?e.check(Ao,s,o)(t):null===t||Mi(t)||Ui(t)||45!==t&&Vi(t)?s(t):(e.consume(t),a)}function o(t){return 46===t?(i=n,n=void 0,e.consume(t),a):(95===t&&(n=!0),e.consume(t),a)}function s(e){return i||n?r(e):t(e)}},partial:!0},_o={tokenize:function(e,t){let r=0;return n;function n(o){return 38===o?e.check(Co,t,i)(o):(40===o&&r++,41===o?e.check(Ao,a,i)(o):Lo(o)?t(o):jo(o)?e.check(Ao,t,i)(o):(e.consume(o),n))}function i(t){return e.consume(t),n}function a(e){return r--,r<0?t(e):i(e)}},partial:!0},Ao={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(i){return jo(i)?(e.consume(i),n):Lo(i)?t(i):r(i)}},partial:!0},Co={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return Ti(t)?(e.consume(t),n):59===t?(e.consume(t),i):r(t)}function i(e){return Lo(e)?t(e):r(e)}},partial:!0},Fo={tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!zo(n.previous)||Bo(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(So,e.attempt(Po,e.attempt(_o,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:zo},Do={tokenize:function(e,t,r){const n=this;return function(t){if(72!==t&&104!==t||!Mo(n.previous)||Bo(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),i};function i(t){return 84===t||116===t?(e.consume(t),a):r(t)}function a(t){return 84===t||116===t?(e.consume(t),o):r(t)}function o(t){return 80===t||112===t?(e.consume(t),s):r(t)}function s(t){return 83===t||115===t?(e.consume(t),c):c(t)}function c(t){return 58===t?(e.consume(t),u):r(t)}function u(t){return 47===t?(e.consume(t),l):r(t)}function l(t){return 47===t?(e.consume(t),f):r(t)}function f(t){return null===t||Mi(t)||Ui(t)||Vi(t)?r(t):e.attempt(Po,e.attempt(_o,h),r)(t)}function h(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:Mo},Oo={tokenize:function(e,t,r){const n=this;let i,a;return function(t){if(!qo(t)||!No(n.previous)||Bo(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)};function o(t){return qo(t)?(e.consume(t),o):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(Ao,f,c)(t):45===t||95===t?e.check(Ao,r,u)(t):Li(t)?(!a&&Ii(t)&&(a=!0),e.consume(t),s):f(t)}function c(t){return e.consume(t),i=!0,a=void 0,s}function u(t){return e.consume(t),l}function l(t){return 46===t?e.check(Ao,r,c)(t):s(t)}function f(n){return i&&!a?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:No},Ro={},To={text:Ro};let Io=48;for(;Io<123;)Ro[Io]=Oo,Io++,58===Io?Io=65:91===Io&&(Io=97);function jo(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function Lo(e){return null===e||60===e||Ni(e)}function qo(e){return 43===e||45===e||46===e||95===e||Li(e)}function zo(e){return null===e||40===e||42===e||95===e||126===e||Ni(e)}function Mo(e){return null===e||!Ti(e)}function No(e){return 47!==e&&Mo(e)}function Bo(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}Ro[43]=Oo,Ro[45]=Oo,Ro[46]=Oo,Ro[95]=Oo,Ro[72]=[Oo,Do],Ro[104]=[Oo,Do],Ro[87]=[Oo,Fo],Ro[119]=[Oo,Fo];const $o={tokenize:function(e,t,r){const n=this;return Gi(e,(function(e){const i=n.events[n.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Uo(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const e=n.events[i][1];if("labelImage"===e.type){o=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!o||!o._balanced)return r(i);const s=_a(n.sliceSerialize({start:o.end,end:n.now()}));if(94!==s.charCodeAt(0)||!a.includes(s.slice(1)))return r(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function Vo(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function Ho(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){let l;return null===s||91===s||o++>999?r(s):93===s?a?(e.exit("chunkString"),l=e.exit("gfmFootnoteCallString"),i.includes(_a(n.sliceSerialize(l)))?function(r){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}(s):r(s)):r(s):(e.consume(s),Ni(s)||(a=!0),92===s?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,c):c(t)}}function Qo(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),u):r(t)}function u(t){let i;return null===t||91===t||s>999?r(t):93===t?o?(i=e.exit("gfmFootnoteDefinitionLabelString"),a=_a(n.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h):r(t):Bi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s++,u):(e.enter("chunkString").contentType="string",l(t))}function l(t){return null===t||Bi(t)||91===t||93===t||s>999?(e.exit("chunkString"),u(t)):(Ni(t)||(o=!0),s++,e.consume(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),Gi(e,p,"gfmFootnoteDefinitionWhitespace")):r(t)}function p(e){return i.includes(a)||i.push(a),t(e)}}function Go(e,t,r){return e.check(na,t,e.attempt($o,t,r))}function Wo(e){e.exit("gfmFootnoteDefinition")}function Ko(e={}){let t=e.singleTilde;const r={tokenize:function(e,r,n){const i=this.previous,a=this.events;let o=0;return function(t){if(126===i&&"characterEscape"!==a[a.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){const c=Xi(i);if(126===a)return o>1?n(a):(e.consume(a),o++,s);if(o<2&&!t)return n(a);const u=e.exit("strikethroughSequenceTemporary"),l=Xi(a);return u._open=!l||2===l&&Boolean(c),u._close=!c||2===c&&Boolean(l),r(a)}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},a={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o=[["enter",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",a,t]];Ai(o,o.length,0,Zi(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),Ai(o,o.length,0,[["exit",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",i,t]]),Ai(e,n-1,r-n+3,o),r=n+o.length-2;break}}r=-1;for(;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}const Jo={flow:{null:{tokenize:function(e,t,r){const n=this,i=[];let a,o,s=0;return function(t){if(e.enter("table")._align=i,e.enter("tableHead"),e.enter("tableRow"),124===t)return c(t);return s++,e.enter("temporaryTableCellContent"),f(t)};function c(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,u}function u(t){return null===t||Bi(t)?function(t){if(null===t)return r(t);e.exit("tableRow"),e.exit("tableHead");const i=n.interrupt;return n.interrupt=!0,e.attempt({tokenize:C,partial:!0},(function(t){return n.interrupt=i,e.enter("tableDelimiterRow"),p(t)}),(function(e){return n.interrupt=i,r(e)}))(t)}(t):$i(t)?(e.enter("whitespace"),e.consume(t),l):(a&&(a=void 0,s++),124===t?c(t):(e.enter("temporaryTableCellContent"),f(t)))}function l(t){return $i(t)?(e.consume(t),l):(e.exit("whitespace"),u(t))}function f(t){return null===t||124===t||Ni(t)?(e.exit("temporaryTableCellContent"),u(t)):(e.consume(t),92===t?h:f)}function h(t){return 92===t||124===t?(e.consume(t),f):f(t)}function p(t){return null===t||Bi(t)?y(t):$i(t)?(e.enter("whitespace"),e.consume(t),d):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),o=!0,i.push(null),m):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i.push("left"),g):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):r(t)}function d(t){return $i(t)?(e.consume(t),d):(e.exit("whitespace"),p(t))}function m(t){return 45===t?(e.consume(t),m):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i[i.length-1]="left"===i[i.length-1]?"center":"right",v):p(t))}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),o=!0,m):r(t)}function v(t){return null===t||Bi(t)?y(t):$i(t)?(e.enter("whitespace"),e.consume(t),d):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):r(t)}function y(t){return e.exit("tableDelimiterRow"),o&&s===i.length?null===t?b(t):e.check(Yo,b,e.attempt({tokenize:C,partial:!0},Gi(e,w,"linePrefix",4),b))(t):r(t)}function b(r){return e.exit("table"),t(r)}function w(t){return e.enter("tableBody"),x(t)}function x(t){return e.enter("tableRow"),124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function k(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),E}function E(t){return null===t||Bi(t)?function(t){if(e.exit("tableRow"),null===t)return A(t);return e.check(Yo,A,e.attempt({tokenize:C,partial:!0},Gi(e,x,"linePrefix",4),A))(t)}(t):$i(t)?(e.enter("whitespace"),e.consume(t),S):124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function S(t){return $i(t)?(e.consume(t),S):(e.exit("whitespace"),E(t))}function P(t){return null===t||124===t||Ni(t)?(e.exit("temporaryTableCellContent"),E(t)):(e.consume(t),92===t?_:P)}function _(t){return 92===t||124===t?(e.consume(t),P):P(t)}function A(t){return e.exit("tableBody"),b(t)}function C(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Gi(e,i,"linePrefix")};function i(i){if(n.parser.lazy[n.now().line]||null===i||Bi(i))return r(i);const a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?r(i):(n._gfmTableDynamicInterruptHack=!0,e.check(n.parser.constructs.flow,(function(e){return n._gfmTableDynamicInterruptHack=!1,r(e)}),(function(e){return n._gfmTableDynamicInterruptHack=!1,t(e)}))(i))}}},resolve:function(e,t){let r,n,i,a,o,s,c,u=-1;for(;++u<e.length;){const l=e[u][1];if(i&&("temporaryTableCellContent"===l.type&&(a=a||u,o=u),("tableCellDivider"===l.type||"tableRow"===l.type)&&o)){const r={type:"tableContent",start:e[a][1].start,end:e[o][1].end},n={type:"chunkText",start:r.start,end:r.end,contentType:"text"};e.splice(a,o-a+1,["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]),u-=o-a-3,a=void 0,o=void 0}if("exit"===e[u][0]&&void 0!==s&&s+(c?0:1)<u&&("tableCellDivider"===l.type||"tableRow"===l.type&&(s+3<u||"whitespace"!==e[s][1].type))){const i={type:n?"tableDelimiter":r?"tableHeader":"tableData",start:e[s][1].start,end:e[u][1].end};e.splice(u+("tableCellDivider"===l.type?1:0),0,["exit",i,t]),e.splice(s,0,["enter",i,t]),u+=2,s=u+1,c=!0}"tableRow"===l.type&&(i="enter"===e[u][0],i&&(s=u+1,c=!1)),"tableDelimiterRow"===l.type&&(n="enter"===e[u][0],n&&(s=u+1,c=!1)),"tableHead"===l.type&&(r="enter"===e[u][0])}return e}}}},Yo={tokenize:function(e,t,r){let n=0;return function(t){return e.enter("check"),e.consume(t),i};function i(a){return-1===a||32===a?(e.consume(a),n++,4===n?t:i):null===a||Ni(a)?t(a):r(a)}},partial:!0};const Xo={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return $i(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):r(t)}function a(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:es},t,r)):r(n)}}},Zo={text:{91:Xo}};function es(e,t,r){const n=this;return Gi(e,(function(e){const i=n.events[n.events.length-1];return i&&"whitespace"===i[1].type&&null!==e&&!Ni(e)?t(e):r(e)}),"whitespace")}function ts(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;-1!==i;)n++,i=r.indexOf(t,i+t.length);return n}const rs=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);var i=Yr(t),a=n?-1:1;!function e(o,s,c){var u,l="object"==typeof o&&null!==o?o:{};"string"==typeof l.type&&(u="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(f=l.type+(u?"<"+u+">":""),""+f+")")}));var f;return h;function h(){var u,l,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)),false===h[0]))return h;if(o.children&&"skip"!==h[0])for(l=(n?o.children.length:-1)+a,f=c.concat(o);l>-1&&l<o.children.length;){if(u=e(o.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+a}return h}}(e,null,[])()};const ns={}.hasOwnProperty,is=function(e,t,r,n){let i,a;"string"==typeof t||t instanceof RegExp?(a=[[t,r]],i=n):(a=t,i=r),i||(i={});const o=Yr(i.ignore||[]),s=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let r=-1;for(;++r<e.length;)t.push([as(e[r][0]),os(e[r][1])])}else{let r;for(r in e)ns.call(e,r)&&t.push([as(r),os(e[r])])}return t}(a);let c=-1;for(;++c<s.length;)rs(e,"text",u);return e;function u(e,t){let r,n=-1;for(;++n<t.length;){const e=t[n];if(o(e,r?r.children.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=s[c][0],n=s[c][1];let i,a=0,o=t.children.indexOf(e),u=[];r.lastIndex=0;let l=r.exec(e.value);for(;l;){i=l.index;let t=n(...l,{index:l.index,input:l.input});if("string"==typeof t&&(t=t.length>0?{type:"text",value:t}:void 0),!1!==t&&(a!==i&&u.push({type:"text",value:e.value.slice(a,i)}),Array.isArray(t)?u.push(...t):t&&u.push(t),a=i+l[0].length),!r.global)break;l=r.exec(e.value)}void 0===i?(u=[e],o--):(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),t.children.splice(o,1,...u));return o+u.length+1}(e,r)}};function as(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function os(e){return"function"==typeof e?e:()=>e}const ss=["autolink","link","image","label"],cs={transforms:[function(e){is(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fs],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,hs]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:ls,literalAutolinkHttp:ls,literalAutolinkWww:ls},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}},us={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:"phrasing",notInConstruct:ss},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:"phrasing",notInConstruct:ss},{character:":",before:"[ps]",after:"\\/",inConstruct:"phrasing",notInConstruct:ss}]};function ls(e){this.config.enter.autolinkProtocol.call(this,e)}function fs(e,t,r,n,i){let a="";if(!ps(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const o=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);let r,n,i,a;if(t)for(e=e.slice(0,t.index),a=t[0],r=a.indexOf(")"),n=ts(e,"("),i=ts(e,")");-1!==r&&n>i;)e+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),i++;return[e,a]}(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function hs(e,t,r,n){return!(!ps(n,!0)||/[_-\d]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function ps(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||Ui(r)||Vi(r))&&(!t||47!==r)}function ds(e){return e.label||!e.identifier?e.label||"":go(e.identifier)}function ms(e,t){const r=t.indexStack,n=e.children||[],i=[];let a=-1;for(r.push(-1);++a<n.length;){const s=n[a];r[r.length-1]=a,i.push(t.handle(s,e,t,{before:"\n",after:"\n"})),"list"!==s.type&&(t.bulletLastUsed=void 0),a<n.length-1&&i.push(o(s,n[a+1]))}return r.pop(),i.join("");function o(r,n){let i=t.join.length;for(;i--;){const a=t.join[i](r,n,e,t);if(!0===a||1===a)break;if("number"==typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}}const gs=/\r?\n|\r/g;function vs(e,t){const r=[];let n,i=0,a=0;for(;n=gs.exec(e);)o(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,a++;return o(e.slice(i)),r.join("");function o(e){r.push(t(e,a,!e))}}function ys(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function bs(e,t){return ws(e,t.inConstruct,!0)&&!ws(e,t.notInConstruct,!1)}function ws(e,t,r){if(!t)return r;"string"==typeof t&&(t=[t]);let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function xs(e,t,r){const n=(r.before||"")+(t||"")+(r.after||""),i=[],a=[],o={};let s=-1;for(;++s<e.unsafe.length;){const t=e.unsafe[s];if(!bs(e.stack,t))continue;const r=ys(t);let a;for(;a=r.exec(n);){const e="before"in t||Boolean(t.atBreak),r="after"in t,n=a.index+(e?a[1].length:0);i.includes(n)?(o[n].before&&!e&&(o[n].before=!1),o[n].after&&!r&&(o[n].after=!1)):(i.push(n),o[n]={before:e,after:r})}}i.sort(ks);let c=r.before?r.before.length:0;const u=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){const e=i[s];e<c||e>=u||(e+1<u&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(Es(n.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||r.encode&&r.encode.includes(n.charAt(e))?(a.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),c++):a.push("\\")))}return a.push(Es(n.slice(c,u),r.after)),a.join("")}function ks(e,t){return e-t}function Es(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],a=e+t;let o,s=-1,c=0;for(;o=r.exec(a);)n.push(o.index);for(;++s<n.length;)c!==n[s]&&i.push(e.slice(c,n[s])),i.push("\\"),c=n[s];return i.push(e.slice(c)),i.join("")}const Ss=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=Yr(t),a=n?-1:1;!function e(o,s,c){const u="object"==typeof o&&null!==o?o:{};let l;"string"==typeof u.type&&(l="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(f=u.type+(l?"<"+l+">":""),""+f+")")}));var f;return h;function h(){let u,l,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)),false===h[0]))return h;if(o.children&&"skip"!==h[0])for(l=(n?o.children.length:-1)+a,f=c.concat(o);l>-1&&l<o.children.length;){if(u=e(o.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+a}return h}}(e,null,[])()};const Ps=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),Ss(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)};var _s=Object.freeze({__proto__:null,CONTINUE:true,SKIP:"skip",EXIT:false,visit:Ps});let As=!1,Cs=!1;function Fs(){return e.peek=function(){return"["},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:function(e,t,r){const n=r.enter("footnoteDefinition"),i=r.enter("label"),a=xs(r,ds(e),{before:"^",after:"]"}),o="[^"+a+"]:";i();const s=vs(ms(e,r),(function(e,t,r){if(t)return(r?"":" ")+e;return(r?o:o+" ")+e}));n(),!As&&a.includes(":")&&(console.warn("[mdast-util-gfm-footnote] Warning: Found a colon in footnote identifier `"+a+"`. GitHub currently crahes on colons in footnotes (see <https://github.com/github/cmark-gfm/issues/241> for more info)"),As=!0);Cs||Ps(e,"list",(()=>(console.warn("[mdast-util-gfm-footnote] Warning: Found a list in a footnote definition. GitHub currently crahes on lists in footnotes (see <https://github.com/github/cmark-gfm/issues/241> for more info)"),Cs=!0,false)));return s},footnoteReference:e}};function e(e,t,r){const n=r.enter("footnoteReference"),i=r.enter("reference"),a=xs(r,ds(e),{before:"^",after:"]"});return i(),n(),"[^"+a+"]"}}function Ds(e,t,r){const n=t.indexStack,i=e.children||[],a=[];let o=-1,s=r.before;for(n.push(-1);++o<i.length;){const c=i[o];let u;if(n[n.length-1]=o,o+1<i.length){let r=t.handle.handlers[i[o+1].type];r&&r.peek&&(r=r.peek),u=r?r(i[o+1],e,t,{before:"",after:""}).charAt(0):""}else u=r.after;a.length>0&&("\r"===s||"\n"===s)&&"html"===c.type&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),s=" "),a.push(t.handle(c,e,t,{before:s,after:u})),s=a[a.length-1].slice(-1)}return n.pop(),a.join("")}const Os={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},Rs={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:Ts}};function Ts(e,t,r){const n=r.enter("emphasis"),i=Ds(e,r,{before:"~",after:"~"});return n(),"~~"+i+"~~"}function Is(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const e=r.unsafe[a],t=ys(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function js(e){return null==e?"":String(e)}function Ls(e){return e.length}function qs(e){const t="string"==typeof e?e.charCodeAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Ts.peek=function(){return"~"},Is.peek=function(){return"`"};const zs={enter:{table:function(e){const t=e._align;this.enter({type:"table",align:t,children:[]},e),this.setData("inTable",!0)},tableData:Ns,tableHeader:Ns,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Bs));this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:Ms,tableHeader:Ms,tableRow:Ms}};function Ms(e){this.exit(e)}function Ns(e){this.enter({type:"tableCell",children:[]},e)}function Bs(e,t){return"|"===t?t:e}function $s(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,r){return s(function(e,t){const r=e.children;let n=-1;const i=[],a=t.enter("table");for(;++n<r.length;)i[n]=c(r[n],t);return a(),i}(e,r),e.align)},tableRow:function(e,t,r){const n=s([c(e,r)]);return n.slice(0,n.indexOf("\n"))},tableCell:o,inlineCode:function(e,t,r){let n=Is(e,0,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n}}};function o(e,t,r){const n=r.enter("tableCell"),i=r.enter("phrasing"),o=Ds(e,r,{before:a,after:a});return i(),n(),o}function s(e,t){return function(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||Ls,a=[];let o=-1;const s=[],c=[],u=[];let l,f,h,p,d,m,g,v,y,b=0;for(;++o<e.length;){for(l=-1,f=[],h=[],e[o].length>b&&(b=e[o].length);++l<e[o].length;)d=js(e[o][l]),!1!==r.alignDelimiters&&(p=i(d),h[l]=p,(void 0===u[l]||p>u[l])&&(u[l]=p)),f.push(d);s[o]=f,c[o]=h}if(l=-1,"object"==typeof n&&"length"in n)for(;++l<b;)a[l]=qs(n[l]);else for(y=qs(n);++l<b;)a[l]=y;for(l=-1,f=[],h=[];++l<b;)y=a[l],g="",v="",99===y?(g=":",v=":"):108===y?g=":":114===y&&(v=":"),p=!1===r.alignDelimiters?1:Math.max(1,u[l]-g.length-v.length),d=g+"-".repeat(p)+v,!1!==r.alignDelimiters&&(p=g.length+p+v.length,p>u[l]&&(u[l]=p),h[l]=p),f[l]=d;s.splice(1,0,f),c.splice(1,0,h),o=-1;const w=[];for(;++o<s.length;){for(f=s[o],h=c[o],l=-1,m=[];++l<b;)d=f[l]||"",g="",v="",!1!==r.alignDelimiters&&(p=u[l]-(h[l]||0),y=a[l],114===y?g=" ".repeat(p):99===y?p%2?(g=" ".repeat(p/2+.5),v=" ".repeat(p/2-.5)):(g=" ".repeat(p/2),v=g):v=" ".repeat(p)),!1===r.delimiterStart||l||m.push("|"),!1===r.padding||!1===r.alignDelimiters&&""===d||!1===r.delimiterStart&&!l||m.push(" "),!1!==r.alignDelimiters&&m.push(g),m.push(d),!1!==r.alignDelimiters&&m.push(v),!1!==r.padding&&m.push(" "),!1===r.delimiterEnd&&l===b-1||m.push("|");w.push(!1===r.delimiterEnd?m.join("").replace(/ +$/,""):m.join(""))}return w.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function c(e,t){const r=e.children;let n=-1;const i=[],a=t.enter("tableRow");for(;++n<r.length;)i[n]=o(r[n],0,t);return a(),i}}function Us(e,t,r){const n=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let i=r.bulletCurrent||function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(r);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===n||"mixed"===n&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const o=r.enter("listItem"),s=vs(ms(e,r),(function(e,t,r){if(t)return(r?"":" ".repeat(a))+e;return(r?i:i+" ".repeat(a-i.length))+e}));return o(),s}const Vs={exit:{taskListCheckValueChecked:Qs,taskListCheckValueUnchecked:Qs,paragraph:function(e){const t=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],n=t.children,i=r.children[0];let a,o=-1;if(t&&"listItem"===t.type&&"boolean"==typeof t.checked&&i&&"text"===i.type){for(;++o<n.length;){const e=n[o];if("paragraph"===e.type){a=e;break}}a===r&&(i.value=i.value.slice(1),0===i.value.length?r.children.shift():(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}this.exit(e)}}},Hs={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(e,t,r){const n=e.children[0];let i=Us(e,t,r);"boolean"==typeof e.checked&&n&&"paragraph"===n.type&&(i=i.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+"["+(e.checked?"x":" ")+"] "})));return i}}};function Qs(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}var Gs=Object.freeze({__proto__:null,default:function(e={}){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){return Di([To,{document:{91:{tokenize:Qo,continuation:{tokenize:Go},exit:Wo}},text:{91:{tokenize:Ho},93:{add:"after",tokenize:Uo,resolveTo:Vo}}},Ko(e),Jo,Zo])}(e)),r("fromMarkdownExtensions",[cs,{enter:{gfmFootnoteDefinition:function(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)},gfmFootnoteDefinitionLabelString:function(){this.buffer()},gfmFootnoteCall:function(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)},gfmFootnoteCallString:function(){this.buffer()}},exit:{gfmFootnoteDefinition:function(e){this.exit(e)},gfmFootnoteDefinitionLabelString:function(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=_a(this.sliceSerialize(e)).toLowerCase()},gfmFootnoteCall:function(e){this.exit(e)},gfmFootnoteCallString:function(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=_a(this.sliceSerialize(e)).toLowerCase()}}},Os,zs,Vs]),r("toMarkdownExtensions",function(e){return{extensions:[us,Fs(),Rs,$s(e),Hs]}}(e))}}),Ws=le(Gs);const Ks=/[\t ]*(?:\r?\n|\r)/g;var Js=Object.freeze({__proto__:null,default:function(){return e=>{Ps(e,"text",((e,t,r)=>{const n=[];let i=0;Ks.lastIndex=0;let a=Ks.exec(e.value);for(;a;){const t=a.index;i!==t&&n.push({type:"text",value:e.value.slice(i,t)}),n.push({type:"break"}),i=t+a[0].length,a=Ks.exec(e.value)}if(n.length>0&&r&&"number"==typeof t)return i<e.value.length&&n.push({type:"text",value:e.value.slice(i)}),r.children.splice(t,1,...n),t+n.length}))}}}),Ys=le(Js),Xs={},Zs={};function ec(e,t,r){var n,i,a,o,s,c="";for("string"!=typeof t&&(r=t,t=ec.defaultChars),void 0===r&&(r=!0),s=function(e){var t,r,n=Zs[e];if(n)return n;for(n=Zs[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}(t),n=0,i=e.length;n<i;n++)if(a=e.charCodeAt(n),r&&37===a&&n+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(n+1,n+3)))c+=e.slice(n,n+3),n+=2;else if(a<128)c+=s[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&n+1<i&&(o=e.charCodeAt(n+1))>=56320&&o<=57343){c+=encodeURIComponent(e[n]+e[n+1]),n++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[n]);return c}ec.defaultChars=";/?:@&=+$,-_.!~*'()#",ec.componentChars="-_.!~*'()";var tc=ec,rc={};function nc(e,t){var r;return"string"!=typeof t&&(t=nc.defaultChars),r=function(e){var t,r,n=rc[e];if(n)return n;for(n=rc[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)n[r=e.charCodeAt(t)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,i,a,o,s,c,u="";for(t=0,n=e.length;t<n;t+=3)(i=parseInt(e.slice(t+1,t+3),16))<128?u+=r[i]:192==(224&i)&&t+3<n&&128==(192&(a=parseInt(e.slice(t+4,t+6),16)))?(u+=(c=i<<6&1984|63&a)<128?"��":String.fromCharCode(c),t+=3):224==(240&i)&&t+6<n&&(a=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),128==(192&a)&&128==(192&o))?(u+=(c=i<<12&61440|a<<6&4032|63&o)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&i)&&t+9<n&&(a=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&a)&&128==(192&o)&&128==(192&s))?((c=i<<18&1835008|a<<12&258048|o<<6&4032|63&s)<65536||c>1114111?u+="����":(c-=65536,u+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),t+=9):u+="�";return u}))}nc.defaultChars=";/?:@&=+$,#",nc.componentChars="";var ic=nc;function ac(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var oc=/^([a-z0-9.+-]+:)/i,sc=/:[0-9]*$/,cc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,uc=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),lc=["'"].concat(uc),fc=["%","/","?",";","#"].concat(lc),hc=["/","?","#"],pc=/^[+a-z0-9A-Z_-]{0,63}$/,dc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,mc={javascript:!0,"javascript:":!0},gc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};ac.prototype.parse=function(e,t){var r,n,i,a,o,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var c=cc.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var u=oc.exec(s);if(u&&(i=(u=u[0]).toLowerCase(),this.protocol=u,s=s.substr(u.length)),(t||u||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(o="//"===s.substr(0,2))||u&&mc[u]||(s=s.substr(2),this.slashes=!0)),!mc[u]&&(o||u&&!gc[u])){var l,f,h=-1;for(r=0;r<hc.length;r++)-1!==(a=s.indexOf(hc[r]))&&(-1===h||a<h)&&(h=a);for(-1!==(f=-1===h?s.lastIndexOf("@"):s.lastIndexOf("@",h))&&(l=s.slice(0,f),s=s.slice(f+1),this.auth=l),h=-1,r=0;r<fc.length;r++)-1!==(a=s.indexOf(fc[r]))&&(-1===h||a<h)&&(h=a);-1===h&&(h=s.length),":"===s[h-1]&&h--;var p=s.slice(0,h);s=s.slice(h),this.parseHost(p),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d){var m=this.hostname.split(/\./);for(r=0,n=m.length;r<n;r++){var g=m[r];if(g&&!g.match(pc)){for(var v="",y=0,b=g.length;y<b;y++)g.charCodeAt(y)>127?v+="x":v+=g[y];if(!v.match(pc)){var w=m.slice(0,r),x=m.slice(r+1),k=g.match(dc);k&&(w.push(k[1]),x.unshift(k[2])),x.length&&(s=x.join(".")+s),this.hostname=w.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var E=s.indexOf("#");-1!==E&&(this.hash=s.substr(E),s=s.slice(0,E));var S=s.indexOf("?");return-1!==S&&(this.search=s.substr(S),s=s.slice(0,S)),s&&(this.pathname=s),gc[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},ac.prototype.parseHost=function(e){var t=sc.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var vc=function(e,t){if(e&&e instanceof ac)return e;var r=new ac;return r.parse(e,t),r};function yc(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function bc(e,t,r){const n=yc(r),i='"'===n?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label"),s="!["+xs(r,e.alt,{before:"[",after:"]"})+"](";return o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),s+="<"+xs(r,e.url,{before:"<",after:">"})+">"):(o=r.enter("destinationRaw"),s+=xs(r,e.url,{before:"(",after:e.title?" ":")"})),o(),e.title&&(o=r.enter("title"+i),s+=" "+n+xs(r,e.title,{before:n,after:n})+n,o()),s+=")",a(),s}Xs.encode=tc,Xs.decode=ic,Xs.format=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},Xs.parse=vc,bc.peek=function(){return"!"};var wc=le(Object.freeze({__proto__:null,image:bc})),xc=le(Ka);var kc=le(Object.freeze({__proto__:null,types:{data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"}}));var Ec=le(Object.freeze({__proto__:null,codes:{carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533}}));var Sc=le(Object.freeze({__proto__:null,constants:{attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:3,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4}})),Pc=le(Aa),_c=le(Pa),Ac=le(ba),Cc=le(Qi),Fc=le(xa),Dc=le(Ea),Oc=le(_s);var Rc=Object.freeze({__proto__:null,paragraph:function(e,t,r){const n=r.enter("paragraph"),i=r.enter("phrasing"),a=Ds(e,r,{before:"\n",after:"\n"});return i(),n(),a}}),Tc=le(Rc);var Ic=Object.freeze({__proto__:null,heading:function(e,t,r){const n=Math.max(Math.min(6,e.depth||1),1);if(function(e,t){let r=!1;return Ps(e,(e=>{if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,!1})),Boolean((!e.depth||e.depth<3)&&Si(e)&&(t.options.setext||r))}(e,r)){const t=r.enter("headingSetext"),i=r.enter("phrasing"),a=Ds(e,r,{before:"\n",after:"\n"});return i(),t(),a+"\n"+(1===n?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const i="#".repeat(n),a=r.enter("headingAtx"),o=r.enter("phrasing");let s=Ds(e,r,{before:"# ",after:"\n"});return/^[\t ]/.test(s)&&(s="&#x"+s.charCodeAt(0).toString(16).toUpperCase()+";"+s.slice(1)),s=s?i+" "+s:i,r.options.closeAtx&&(s+=" "+i),o(),a(),s}}),jc=le(Ic),Lc=le(Wi);function qc(e,t,r){return">"+(r?"":" ")+e}var zc,Mc=Object.freeze({__proto__:null,blockquote:function(e,t,r){const n=r.enter("blockquote"),i=vs(ms(e,r),qc);return n(),i}}),Nc=le(Mc),Bc={exports:{}};zc=Bc,function(){var e;function t(e){for(var t,r,n,i,a=1,o=[].slice.call(arguments),s=0,c=e.length,u="",l=!1,f=!1,h=function(){return o[a++]},p=function(){for(var r="";/\d/.test(e[s]);)r+=e[s++],t=e[s];return r.length>0?parseInt(r):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(h(),10).toString(2);break;case"c":u+="string"==typeof(r=h())||r instanceof String?r:String.fromCharCode(parseInt(r,10));break;case"d":u+=parseInt(h(),10);break;case"f":n=String(parseFloat(h()).toFixed(i||6)),u+=f?n:n.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(e=zc.exports=t).format=t,e.vsprintf=function(e,r){return t.apply(null,[e].concat(r))},"undefined"!=typeof console&&"function"==typeof console.log&&(e.printf=function(){console.log(t.apply(null,arguments))})}();var $c=Bc.exports;const Uc=Object.assign(Vc(Error),{eval:Vc(EvalError),range:Vc(RangeError),reference:Vc(ReferenceError),syntax:Vc(SyntaxError),type:Vc(TypeError),uri:Vc(URIError)});function Vc(e){return t.displayName=e.displayName||e.name,t;function t(t,...r){const n=t?$c(t,...r):t;return new e(n)}}const Hc={}.hasOwnProperty,Qc={yaml:"-",toml:"+"};function Gc(e="yaml"){const t=[];let r=-1;for(Array.isArray(e)||(e=[e]);++r<e.length;)t[r]=Wc(e[r]);return t}function Wc(e){let t=e;if("string"==typeof t){if(!Hc.call(Qc,t))throw Uc("Missing matter definition for `%s`",t);t={type:t,marker:Qc[t]}}else if("object"!=typeof t)throw Uc("Expected matter to be an object, not `%j`",t);if(!Hc.call(t,"type"))throw Uc("Missing `type` in matter `%j`",t);if(!Hc.call(t,"fence")&&!Hc.call(t,"marker"))throw Uc("Missing `marker` or `fence` in matter `%j`",t);return t}function Kc(e){const t=e.type,r=e.anywhere,n=t+"Value",i=t+"Fence",a=i+"Sequence",o={tokenize:function(e,t,r){let n=0;return function(t){if(t===s.charCodeAt(n))return e.enter(i),e.enter(a),o(t);return r(t)};function o(t){return n===s.length?(e.exit(a),$i(t)?(e.enter("whitespace"),c(t)):u(t)):t===s.charCodeAt(n++)?(e.consume(t),o):r(t)}function c(t){return $i(t)?(e.consume(t),c):(e.exit("whitespace"),u(t))}function u(n){return null===n||Bi(n)?(e.exit(i),t(n)):r(n)}},partial:!0};let s;return{tokenize:function(i,a,c){const u=this;return function(n){const a=u.now();if(1!==a.column||!r&&1!==a.line)return c(n);return i.enter(t),s=Jc(e,"open"),i.attempt(o,l,c)(n)};function l(t){return s=Jc(e,"close"),p(t)}function f(e){return null===e||Bi(e)?p(e):(i.enter(n),h(e))}function h(e){return null===e||Bi(e)?(i.exit(n),p(e)):(i.consume(e),h)}function p(e){return null===e?c(e):(i.enter("lineEnding"),i.consume(e),i.exit("lineEnding"),i.attempt(o,d,f))}function d(e){return i.exit(t),a(e)}},concrete:!0}}function Jc(e,t){return e.marker?Yc(e.marker,t).repeat(3):Yc(e.fence,t)}function Yc(e,t){return"string"==typeof e?e:e[t]}function Xc(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function Zc(e){const t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function eu(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function tu(e){const t=ru(e,"open"),r=ru(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+r}}function ru(e,t){return e.marker?nu(e.marker,t).repeat(3):nu(e.fence,t)}function nu(e,t){return"string"==typeof e?e:e[t]}var iu=Object.freeze({__proto__:null,default:function(e="yaml"){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){const t=Gc(e),r={};let n,i,a=-1;for(;++a<t.length;)n=t[a],i=Jc(n,"open").charCodeAt(0),i in r?r[i].push(Kc(n)):r[i]=[Kc(n)];return{flow:r}}(e)),r("fromMarkdownExtensions",function(e){const t=Gc(e),r={},n={};let i=-1;for(;++i<t.length;){const e=t[i];r[e.type]=Xc(e),n[e.type]=Zc,n[e.type+"Value"]=eu}return{enter:r,exit:n}}(e)),r("toMarkdownExtensions",function(e){const t=[],r={},n=Gc(e);let i=-1;for(;++i<n.length;){const e=n[i];r[e.type]=tu(e),t.push({atBreak:!0,character:ru(e,"open").charAt(0)})}return{unsafe:t,handlers:r}}(e))}}),au=le(iu);function ou(e,t,r,n,i,a,o,s,c,u,l,f,h,p,d){let m,g;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),v};function v(t){return 35===t?(m=o,y(t)):46===t?(m=s,y(t)):58===t||95===t||Ti(t)?(e.enter(a),e.enter(c),e.consume(t),x):d&&$i(t)?Gi(e,v,"whitespace")(t):!d&&Ni(t)?Sa(e,v)(t):F(t)}function y(t){return e.enter(a),e.enter(m),e.enter(m+"Marker"),e.consume(t),e.exit(m+"Marker"),b}function b(t){return null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||Ni(t)?r(t):(e.enter(m+"Value"),e.consume(t),w)}function w(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):35===t||46===t||125===t||Ni(t)?(e.exit(m+"Value"),e.exit(m),e.exit(a),v(t)):(e.consume(t),w)}function x(t){return 45===t||46===t||58===t||95===t||Li(t)?(e.consume(t),x):(e.exit(c),d&&$i(t)?Gi(e,k,"whitespace")(t):!d&&Ni(t)?Sa(e,k)(t):k(t))}function k(t){return 61===t?(e.enter(u),e.consume(t),e.exit(u),E):(e.exit(a),v(t))}function E(t){return null===t||60===t||61===t||62===t||96===t||125===t||d&&Bi(t)?r(t):34===t||39===t?(e.enter(l),e.enter(h),e.consume(t),e.exit(h),g=t,P):d&&$i(t)?Gi(e,E,"whitespace")(t):!d&&Ni(t)?Sa(e,E)(t):(e.enter(f),e.enter(p),e.consume(t),g=void 0,S)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):125===t||Ni(t)?(e.exit(p),e.exit(f),e.exit(a),v(t)):(e.consume(t),S)}function P(t){return t===g?(e.enter(h),e.consume(t),e.exit(h),e.exit(l),e.exit(a),C):(e.enter(f),_(t))}function _(t){return t===g?(e.exit(f),P(t)):null===t?r(t):Bi(t)?d?r(t):Sa(e,_)(t):(e.enter(p),e.consume(t),A)}function A(t){return t===g||null===t||Bi(t)?(e.exit(p),_(t)):(e.consume(t),A)}function C(e){return 125===e||Ni(e)?v(e):F(e)}function F(a){return 125===a?(e.enter(i),e.consume(a),e.exit(i),e.exit(n),t):r(a)}}function su(e,t,r,n,i,a,o){let s=0,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),u};function u(r){return 93===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(a),l(r))}function l(t){return null===t||s>999?r(t):93!==t||c--?Bi(t)?o?r(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("chunkText",{contentType:"text"}),f(t)):h(t)}function f(t){return null===t||Bi(t)||s>999?(e.exit("chunkText"),l(t)):91===t&&++c>3?r(t):93!==t||c--?(e.consume(t),92===t?p:f):(e.exit("chunkText"),h(t))}function h(r){return e.exit(a),e.enter(i),e.consume(r),e.exit(i),e.exit(n),t}function p(t){return 91===t||92===t||93===t?(e.consume(t),s++,f):f(t)}}function cu(e,t,r,n){const i=this;return function(t){if(Ti(t))return e.enter(n),e.consume(t),a;return r(t)};function a(o){return 45===o||95===o||Li(o)?(e.consume(o),a):(e.exit(n),45===i.previous||95===i.previous?r(o):t(o))}}const uu={tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0;let o,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),c(t)};function c(t){return 58===t?(e.consume(t),s++,c):s<3?r(t):(e.exit("directiveContainerSequence"),cu.call(n,e,u,r,"directiveContainerName")(t))}function u(t){return 91===t?e.attempt(lu,l,l)(t):l(t)}function l(t){return 123===t?e.attempt(fu,f,f)(t):f(t)}function f(t){return Gi(e,h,"whitespace")(t)}function h(i){return e.exit("directiveContainerFence"),null===i?p(i):Bi(i)?n.interrupt?t(i):e.attempt(hu,d,p)(i):r(i)}function p(r){return e.exit("directiveContainer"),t(r)}function d(r){return null===r?(e.exit("directiveContainer"),t(r)):(e.enter("directiveContainerContent"),m(r))}function m(t){return null===t?w(t):e.attempt({tokenize:x,partial:!0},w,a?Gi(e,g,"linePrefix",a+1):g)(t)}function g(t){if(null===t)return w(t);const r=e.enter("chunkDocument",{contentType:"document",previous:o});return o&&(o.next=r),o=r,v(t)}function v(t){if(null===t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}return Bi(t)?e.check(hu,y,b)(t):(e.consume(t),v)}function y(t){e.consume(t);const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,m}function b(t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}function w(r){return e.exit("directiveContainerContent"),e.exit("directiveContainer"),t(r)}function x(e,t,r){let n=0;return Gi(e,(function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)}),"linePrefix",4);function i(t){return 58===t?(e.consume(t),n++,i):n<s?r(t):(e.exit("directiveContainerSequence"),Gi(e,a,"whitespace")(t))}function a(n){return null===n||Bi(n)?(e.exit("directiveContainerFence"),t(n)):r(n)}}},concrete:!0},lu={tokenize:function(e,t,r){return su(e,t,r,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},fu={tokenize:function(e,t,r){return ou(e,t,r,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},hu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const pu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),i};function i(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),cu.call(n,e,a,r,"directiveLeafName")):r(t)}function a(t){return 91===t?e.attempt(du,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(mu,s,s)(t):s(t)}function s(t){return Gi(e,c,"whitespace")(t)}function c(n){return null===n||Bi(n)?(e.exit("directiveLeaf"),t(n)):r(n)}}},du={tokenize:function(e,t,r){return su(e,t,r,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},mu={tokenize:function(e,t,r){return ou(e,t,r,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0};const gu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),cu.call(n,e,i,r,"directiveTextName")};function i(t){return 58===t?r(t):91===t?e.attempt(vu,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(yu,o,o)(t):o(t)}function o(r){return e.exit("directiveText"),t(r)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},vu={tokenize:function(e,t,r){return su(e,t,r,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},yu={tokenize:function(e,t,r){return ou(e,t,r,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};const bu=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],wu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function xu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function ku(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Eu(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||xu(e)}const Su=String.fromCharCode,Pu=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function _u(e,t={}){const r="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,n=[];let i,a,o=0,s=-1,c="";t.position&&("start"in t.position||"indent"in t.position?(a=t.position.indent,i=t.position.start):i=t.position);let u,l=(i?i.line:0)||1,f=(i?i.column:0)||1,h=p();for(o--;++o<=e.length;)if(10===u&&(f=(a?a[s]:0)||1),u=e.charCodeAt(o),38===u){const i=e.charCodeAt(o+1);if(9===i||10===i||12===i||32===i||38===i||60===i||Number.isNaN(i)||r&&i===r){c+=Su(u),f++;continue}const a=o+1;let s,l=a,g=a;if(35===i){g=++l;const t=e.charCodeAt(g);88===t||120===t?(s="hexadecimal",g=++l):s="decimal"}else s="named";let v="",y="",b="";const w="named"===s?Eu:"decimal"===s?xu:ku;for(g--;++g<=e.length;){const t=e.charCodeAt(g);if(!w(t))break;b+=Su(t),"named"===s&&bu.includes(b)&&(v=b,y=ca(b))}let x=59===e.charCodeAt(g);if(x){g++;const e="named"===s&&ca(b);e&&(v=b,y=e)}let k=1+g-a,E="";if(x||!1!==t.nonTerminated)if(b)if("named"===s){if(x&&!y)d(5,1);else if(v!==b&&(g=l+v.length,k=1+g-l,x=!1),!x){const r=v?1:3;if(t.attribute){const t=e.charCodeAt(g);61===t?(d(r,k),y=""):Eu(t)?y="":d(r,k)}else d(r,k)}E=y}else{x||d(2,k);let e=Number.parseInt(b,"hexadecimal"===s?16:10);if(Au(e))d(7,k),E=Su(65533);else if(e in wu)d(6,k),E=wu[e];else{let t="";Cu(e)&&d(6,k),e>65535&&(e-=65536,t+=Su(e>>>10|55296),e=56320|1023&e),E=t+Su(e)}}else"named"!==s&&d(4,k);else;if(E){m(),h=p(),o=g-1,f+=g-a+1,n.push(E);const r=p();r.offset++,t.reference&&t.reference.call(t.referenceContext,E,{start:h,end:r},e.slice(a-1,g)),h=r}else b=e.slice(a-1,g),c+=b,f+=b.length,o=g-1}else 10===u&&(l++,s++,f=0),Number.isNaN(u)?m():(c+=Su(u),f++);return n.join("");function p(){return{line:l,column:f,offset:o+((i?i.offset:0)||0)}}function d(e,r){let n;t.warning&&(n=p(),n.column+=r,n.offset+=r,t.warning.call(t.warningContext,Pu[e],n,e))}function m(){c&&(n.push(c),t.text&&t.text.call(t.textContext,c,{start:h,end:p()}),c="")}}function Au(e){return e>=55296&&e<=57343||e>1114111}function Cu(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}function Fu(e,t){return e=e.replace(t.subset?function(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly?e:e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,r,n){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charCodeAt(r+2),t)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function r(e,r,n){return t.format(e.charCodeAt(0),n.charCodeAt(r+1),t)}}function Du(e){return"&#x"+e.toString(16).toUpperCase()+";"}const Ou=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=Yr(t),a=n?-1:1;!function e(o,s,c){const u="object"==typeof o&&null!==o?o:{};let l;"string"==typeof u.type&&(l="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(f=u.type+(l?"<"+l+">":""),""+f+")")}));var f;return h;function h(){let u,l,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)),false===h[0]))return h;if(o.children&&"skip"!==h[0])for(l=(n?o.children.length:-1)+a,f=c.concat(o);l>-1&&l<o.children.length;){if(u=e(o.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+a}return h}}(e,null,[])()};const Ru={}.hasOwnProperty,Tu=/^[^\t\n\r "#'.<=>`}]+$/;Hu.peek=function(){return":"};const Iu={canContainEols:["textDirective"],enter:{directiveContainer:function(e){Lu.call(this,"containerDirective",e)},directiveContainerAttributes:zu,directiveContainerLabel:function(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)},directiveLeaf:function(e){Lu.call(this,"leafDirective",e)},directiveLeafAttributes:zu,directiveText:function(e){Lu.call(this,"textDirective",e)},directiveTextAttributes:zu},exit:{directiveContainer:Vu,directiveContainerAttributeClassValue:Nu,directiveContainerAttributeIdValue:Mu,directiveContainerAttributeName:$u,directiveContainerAttributeValue:Bu,directiveContainerAttributes:Uu,directiveContainerLabel:function(e){this.exit(e)},directiveContainerName:qu,directiveLeaf:Vu,directiveLeafAttributeClassValue:Nu,directiveLeafAttributeIdValue:Mu,directiveLeafAttributeName:$u,directiveLeafAttributeValue:Bu,directiveLeafAttributes:Uu,directiveLeafName:qu,directiveText:Vu,directiveTextAttributeClassValue:Nu,directiveTextAttributeIdValue:Mu,directiveTextAttributeName:$u,directiveTextAttributeValue:Bu,directiveTextAttributes:Uu,directiveTextName:qu}},ju={unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:"\n",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}],handlers:{containerDirective:Hu,leafDirective:Hu,textDirective:Hu}};function Lu(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function qu(e){this.stack[this.stack.length-1].name=this.sliceSerialize(e)}function zu(){this.setData("directiveAttributes",[]),this.buffer()}function Mu(e){this.getData("directiveAttributes").push(["id",_u(this.sliceSerialize(e))])}function Nu(e){this.getData("directiveAttributes").push(["class",_u(this.sliceSerialize(e))])}function Bu(e){const t=this.getData("directiveAttributes");t[t.length-1][1]=_u(this.sliceSerialize(e))}function $u(e){this.getData("directiveAttributes").push([this.sliceSerialize(e),""])}function Uu(){const e=this.getData("directiveAttributes"),t={};let r=-1;for(;++r<e.length;){const n=e[r];"class"===n[0]&&t.class?t.class+=" "+n[1]:t[n[0]]=n[1]}this.setData("directiveAttributes"),this.resume();this.stack[this.stack.length-1].attributes=t}function Vu(e){this.exit(e)}function Hu(e,t,r){const n=function(e){let t=0;"containerDirective"===e.type?(Ou(e,"containerDirective",r),t+=3):t="leafDirective"===e.type?2:1;return":".repeat(t);function r(e,r){let n=r.length,i=0;for(;n--;)"containerDirective"===r[n].type&&i++;i>t&&(t=i)}}(e),i=r.enter(e.type);let a=n+(e.name||"")+function(e,t){let r=e;if("containerDirective"===e.type){const t=(e.children||[])[0];if(!Qu(t))return"";r=t}const n=t.enter("label"),i=t.enter(e.type+"Label"),a=Ds(r,t,{before:"[",after:"]"});return i(),n(),a?"["+a+"]":""}(e,r)+function(e,t){const r=yc(t),n="textDirective"===e.type?[r]:[r,"\n","\r"],i=e.attributes||{},a=[];let o,s,c,u;for(u in i)if(Ru.call(i,u)&&void 0!==i[u]&&null!==i[u]){const e=String(i[u]);if("id"===u)c=Tu.test(e)?"#"+e:l("id",e);else if("class"===u){const t=e.split(/[\t\n\r ]+/g),r=[],n=[];let i=-1;for(;++i<t.length;)(Tu.test(t[i])?n:r).push(t[i]);o=r.length>0?l("class",r.join(" ")):"",s=n.length>0?"."+n.join("."):""}else a.push(l(u,e))}o&&a.unshift(o);s&&a.unshift(s);c&&a.unshift(c);return a.length>0?"{"+a.join(" ")+"}":"";function l(e,t){return e+(t?"="+r+function(e,t){return Fu(e,Object.assign({format:Du},t))}(t,{subset:n})+r:"")}}(e,r);if("containerDirective"===e.type){const t=function(e,t){Qu((e.children||[])[0])&&(e=Object.assign({},e,{children:e.children.slice(1)}));return ms(e,t)}(e,r);t&&(a+="\n"+t),a+="\n"+n}return i(),a}function Qu(e){return Boolean(e&&"paragraph"===e.type&&e.data&&e.data.directiveLabel)}var Gu=Object.freeze({__proto__:null,default:function(){const e=this.data();function t(t,r){(e[t]?e[t]:e[t]=[]).push(r)}t("micromarkExtensions",{text:{58:gu},flow:{58:[uu,pu]}}),t("fromMarkdownExtensions",Iu),t("toMarkdownExtensions",ju)}}),Wu=le(Gu);const Ku={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};var Ju=Object.freeze({__proto__:null,remarkHeadingId:function(){const e=this.data();function t(t,r){(e[t]||(e[t]=[])).push(r)}return t("micromarkExtensions",function(){const e={text:{[Ku.leftCurlyBrace]:{name:"headingIdMaybeStart",tokenize:(e,t,r)=>function(n){return e.attempt({tokenize(e,t,r){return function(t){if(t!==Ku.leftCurlyBrace)throw new Error(`Unexpected code ${t}`);return e.enter("id"),e.enter("idMarker"),e.consume(t),n};function n(t){return t!==Ku.numberSign?r(t):(e.consume(t),e.exit("idMarker"),e.enter("idString"),e.enter("chunkString",{contentType:"string"}),i)}function i(n){return[Ku.carriageReturn,Ku.lineFeed,Ku.carriageReturnLineFeed,null,Ku.backslash,Ku.leftCurlyBrace].includes(n)?r(n):n===Ku.rightCurlyBrace?(e.exit("chunkString"),e.exit("idString"),e.enter("idMarker"),e.consume(n),e.exit("idMarker"),e.exit("id"),t):(e.consume(n),i)}}},t,r)(n)}}}};return e}()),t("fromMarkdownExtensions",{enter:{idString(e){this.enter({type:"idString",value:null},e),this.buffer()}},exit:{idString(e){const t=this.resume();this.exit(e).value=t}}}),function(e){Ps(e,"idString",((e,t,r)=>{if(!r)throw new Error("Unexpected idString under no parent.");if("heading"!==r.type)throw new Error(`Unexpected node ${e} under ${r}`)})),Ps(e,"heading",(e=>{const t=e.children.filter((e=>"idString"===e.type));if(0==t.length)return;if(t.length>1)throw new Error(`Found ${t.length} ids under heading ${e}.`);const r=t[0];if(r.value&&r.value.length>0){e.data||(e.data={}),e.data.hProperties||(e.data.hProperties={}),e.data.id=e.data.hProperties.id=r.value,r.value="";const t=e.children.indexOf(r);if(t>=1){const r=e.children[t-1];"text"===r.type&&(r.value=r.value.trimEnd())}e.children.splice(t,1)}}))}}}),Yu=le(Ju),Xu=le(en),Zu={exports:{}},el=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},tl=el,rl=Object.prototype.toString;function nl(e){return"[object Array]"===rl.call(e)}function il(e){return void 0===e}function al(e){return null!==e&&"object"==typeof e}function ol(e){if("[object Object]"!==rl.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function sl(e){return"[object Function]"===rl.call(e)}function cl(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),nl(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var ul={isArray:nl,isArrayBuffer:function(e){return"[object ArrayBuffer]"===rl.call(e)},isBuffer:function(e){return null!==e&&!il(e)&&null!==e.constructor&&!il(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:al,isPlainObject:ol,isUndefined:il,isDate:function(e){return"[object Date]"===rl.call(e)},isFile:function(e){return"[object File]"===rl.call(e)},isBlob:function(e){return"[object Blob]"===rl.call(e)},isFunction:sl,isStream:function(e){return al(e)&&sl(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:cl,merge:function e(){var t={};function r(r,n){ol(t[n])&&ol(r)?t[n]=e(t[n],r):ol(r)?t[n]=e({},r):nl(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)cl(arguments[n],r);return t},extend:function(e,t,r){return cl(t,(function(t,n){e[n]=r&&"function"==typeof t?tl(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},ll=ul;function fl(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var hl=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(ll.isURLSearchParams(t))n=t.toString();else{var i=[];ll.forEach(t,(function(e,t){null!=e&&(ll.isArray(e)?t+="[]":e=[e],ll.forEach(e,(function(e){ll.isDate(e)?e=e.toISOString():ll.isObject(e)&&(e=JSON.stringify(e)),i.push(fl(t)+"="+fl(e))})))})),n=i.join("&")}if(n){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},pl=ul;function dl(){this.handlers=[]}dl.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},dl.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},dl.prototype.forEach=function(e){pl.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var ml=dl,gl=ul,vl=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},yl=vl,bl=function(e,t,r,n,i){var a=new Error(e);return yl(a,t,r,n,i)},wl=bl,xl=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(wl("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},kl=ul,El=kl.isStandardBrowserEnv()?{write:function(e,t,r,n,i,a){var o=[];o.push(e+"="+encodeURIComponent(t)),kl.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),kl.isString(n)&&o.push("path="+n),kl.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Sl=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},Pl=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},_l=function(e,t){return e&&!Sl(t)?Pl(e,t):t},Al=ul,Cl=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Fl=ul,Dl=Fl.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=Fl.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function Ol(e){this.message=e}Ol.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Ol.prototype.__CANCEL__=!0;var Rl,Tl=Ol,Il=ul,jl=xl,Ll=El,ql=hl,zl=_l,Ml=function(e){var t,r,n,i={};return e?(Al.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=Al.trim(e.substr(0,n)).toLowerCase(),r=Al.trim(e.substr(n+1)),t){if(i[t]&&Cl.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i},Nl=Dl,Bl=bl,$l=Mf,Ul=Tl,Vl=function(e){return new Promise((function(t,r){var n,i=e.data,a=e.headers,o=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}Il.isFormData(i)&&delete a["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(u+":"+l)}var f=zl(e.baseURL,e.url);function h(){if(c){var n="getAllResponseHeaders"in c?Ml(c.getAllResponseHeaders()):null,i={data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c};jl((function(e){t(e),s()}),(function(e){r(e),s()}),i),c=null}}if(c.open(e.method.toUpperCase(),ql(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(h)},c.onabort=function(){c&&(r(Bl("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){r(Bl("Network Error",e,null,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||$l.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(Bl(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Il.isStandardBrowserEnv()){var p=(e.withCredentials||Nl(f))&&e.xsrfCookieName?Ll.read(e.xsrfCookieName):void 0;p&&(a[e.xsrfHeaderName]=p)}"setRequestHeader"in c&&Il.forEach(a,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete a[t]:c.setRequestHeader(t,e)})),Il.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&"json"!==o&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){c&&(r(!e||e&&e.type?new Ul("canceled"):e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),i||(i=null),c.send(i)}))},Hl={exports:{}},Ql=M.default,Gl=Ql.URL,Wl=B.default,Kl=$.default,Jl=U.default.Writable,Yl=N.default,Xl=function(){if(!Rl){try{Rl=require("debug")("follow-redirects")}catch(e){}"function"!=typeof Rl&&(Rl=function(){})}Rl.apply(null,arguments)},Zl=["abort","aborted","connect","error","socket","timeout"],ef=Object.create(null);Zl.forEach((function(e){ef[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var tf=ff("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),rf=ff("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),nf=ff("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),af=ff("ERR_STREAM_WRITE_AFTER_END","write after end");function of(e,t){Jl.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function sf(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",a=r[i]=e[n],o=t[n]=Object.create(a);Object.defineProperties(o,{request:{value:function(e,n,a){if("string"==typeof e){var o=e;try{e=uf(new Gl(o))}catch(t){e=Ql.parse(o)}}else Gl&&e instanceof Gl?e=uf(e):(a=n,n=e,e={protocol:i});return"function"==typeof n&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,Yl.equal(n.protocol,i,"protocol mismatch"),Xl("options",n),new of(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=o.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function cf(){}function uf(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function lf(e,t){var r;for(var n in t)e.test(n)&&(r=t[n].toString().trim(),delete t[n]);return r}function ff(e,t){function r(e){Error.captureStackTrace(this,this.constructor),e?(this.message=t+": "+e.message,this.cause=e):this.message=t}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r.prototype.code=e,r}function hf(e){for(var t=0;t<Zl.length;t++)e.removeListener(Zl[t],ef[Zl[t]]);e.on("error",cf),e.abort()}of.prototype=Object.create(Jl.prototype),of.prototype.abort=function(){hf(this._currentRequest),this.emit("abort")},of.prototype.write=function(e,t,r){if(this._ending)throw new af;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new nf),this.abort()):r&&r()},of.prototype.end=function(e,t,r){if("function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},of.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},of.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},of.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),a()}),e),n(t)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",a),this.on("error",a),this.on("response",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){of.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(of.prototype,e,{get:function(){return this._currentRequest[e]}})})),of.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},of.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=Ql.format(this._options),n._redirectable=this;for(var i=0;i<Zl.length;i++)n.on(Zl[i],ef[Zl[i]]);if(this._isRedirect){var a=0,o=this,s=this._requestBodyBuffers;!function e(t){if(n===o._currentRequest)if(t)o.emit("error",t);else if(a<s.length){var r=s[a++];n.finished||n.write(r.data,r.encoding,e)}else o._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},of.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(r&&!1!==this._options.followRedirects&&t>=300&&t<400){if(hf(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new rf);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],lf(/^content-/i,this._options.headers));var n,i=lf(/^host$/i,this._options.headers),a=Ql.parse(this._currentUrl),o=i||a.host,s=/^\w+:/.test(r)?this._currentUrl:Ql.format(Object.assign(a,{host:o}));try{n=Ql.resolve(s,r)}catch(e){return void this.emit("error",new tf(e))}Xl("redirecting to",n),this._isRedirect=!0;var c=Ql.parse(n);if(Object.assign(this._options,c),c.host===o||function(e,t){const r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(c.host,o)||lf(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var u={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,u)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new tf(e))}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]},Hl.exports=sf({http:Wl,https:Kl}),Hl.exports.wrap=sf;var pf="0.24.0",df=ul,mf=xl,gf=_l,vf=hl,yf=B.default,bf=$.default,wf=Hl.exports.http,xf=Hl.exports.https,kf=M.default,Ef=V.default,Sf=pf,Pf=bl,_f=vl,Af=Mf,Cf=Tl,Ff=/https:?/;function Df(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,Df(e,t,e.href)}}var Of=function(e){return new Promise((function(t,r){var n;function i(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}var a=function(e){i(),t(e)},o=function(e){i(),r(e)},s=e.data,c=e.headers,u={};if(Object.keys(c).forEach((function(e){u[e.toLowerCase()]=e})),"user-agent"in u?c[u["user-agent"]]||delete c[u["user-agent"]]:c["User-Agent"]="axios/"+Sf,s&&!df.isStream(s)){if(Buffer.isBuffer(s));else if(df.isArrayBuffer(s))s=Buffer.from(new Uint8Array(s));else{if(!df.isString(s))return o(Pf("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));s=Buffer.from(s,"utf-8")}u["content-length"]||(c["Content-Length"]=s.length)}var l=void 0;e.auth&&(l=(e.auth.username||"")+":"+(e.auth.password||""));var f=gf(e.baseURL,e.url),h=kf.parse(f),p=h.protocol||"http:";if(!l&&h.auth){var d=h.auth.split(":");l=(d[0]||"")+":"+(d[1]||"")}l&&u.authorization&&delete c[u.authorization];var m=Ff.test(p),g=m?e.httpsAgent:e.httpAgent,v={path:vf(h.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:c,agent:g,agents:{http:e.httpAgent,https:e.httpsAgent},auth:l};e.socketPath?v.socketPath=e.socketPath:(v.hostname=h.hostname,v.port=h.port);var y,b=e.proxy;if(!b&&!1!==b){var w=p.slice(0,-1)+"_proxy",x=process.env[w]||process.env[w.toUpperCase()];if(x){var k=kf.parse(x),E=process.env.no_proxy||process.env.NO_PROXY,S=!0;if(E){var P=E.split(",").map((function(e){return e.trim()}));S=!P.some((function(e){return!!e&&("*"===e||("."===e[0]&&h.hostname.substr(h.hostname.length-e.length)===e||h.hostname===e))}))}if(S&&(b={host:k.hostname,port:k.port,protocol:k.protocol},k.auth)){var _=k.auth.split(":");b.auth={username:_[0],password:_[1]}}}}b&&(v.headers.host=h.hostname+(h.port?":"+h.port:""),Df(v,b,p+"//"+h.hostname+(h.port?":"+h.port:"")+v.path));var A=m&&(!b||Ff.test(b.protocol));e.transport?y=e.transport:0===e.maxRedirects?y=A?bf:yf:(e.maxRedirects&&(v.maxRedirects=e.maxRedirects),y=A?xf:wf),e.maxBodyLength>-1&&(v.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(v.insecureHTTPParser=e.insecureHTTPParser);var C=y.request(v,(function(t){if(!C.aborted){var r=t,n=t.req||C;if(204!==t.statusCode&&"HEAD"!==n.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(Ef.createUnzip()),delete t.headers["content-encoding"]}var i={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:n};if("stream"===e.responseType)i.data=r,mf(a,o,i);else{var s=[],c=0;r.on("data",(function(t){s.push(t),c+=t.length,e.maxContentLength>-1&&c>e.maxContentLength&&(r.destroy(),o(Pf("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,n)))})),r.on("error",(function(t){C.aborted||o(_f(t,e,null,n))})),r.on("end",(function(){var t=Buffer.concat(s);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=df.stripBOM(t))),i.data=t,mf(a,o,i)}))}}}));if(C.on("error",(function(t){C.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||o(_f(t,e,null,C))})),e.timeout){var F=parseInt(e.timeout,10);if(isNaN(F))return void o(Pf("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",C));C.setTimeout(F,(function(){C.abort();var t=e.transitional||Af.transitional;o(Pf("timeout of "+F+"ms exceeded",e,t.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",C))}))}(e.cancelToken||e.signal)&&(n=function(e){C.aborted||(C.abort(),o(!e||e&&e.type?new Cf("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),df.isStream(s)?s.on("error",(function(t){o(_f(t,e,null,C))})).pipe(C):C.end(s)}))},Rf=ul,Tf=function(e,t){gl.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},If=vl,jf={"Content-Type":"application/x-www-form-urlencoded"};function Lf(e,t){!Rf.isUndefined(e)&&Rf.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var qf,zf={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?qf=Vl:"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(qf=Of),qf),transformRequest:[function(e,t){return Tf(t,"Accept"),Tf(t,"Content-Type"),Rf.isFormData(e)||Rf.isArrayBuffer(e)||Rf.isBuffer(e)||Rf.isStream(e)||Rf.isFile(e)||Rf.isBlob(e)?e:Rf.isArrayBufferView(e)?e.buffer:Rf.isURLSearchParams(e)?(Lf(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Rf.isObject(e)||t&&"application/json"===t["Content-Type"]?(Lf(t,"application/json"),function(e,t,r){if(Rf.isString(e))try{return(t||JSON.parse)(e),Rf.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||zf.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&Rf.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw If(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Rf.forEach(["delete","get","head"],(function(e){zf.headers[e]={}})),Rf.forEach(["post","put","patch"],(function(e){zf.headers[e]=Rf.merge(jf)}));var Mf=zf,Nf=ul,Bf=Mf,$f=function(e){return!(!e||!e.__CANCEL__)},Uf=ul,Vf=function(e,t,r){var n=this||Bf;return Nf.forEach(r,(function(r){e=r.call(n,e,t)})),e},Hf=$f,Qf=Mf,Gf=Tl;function Wf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gf("canceled")}var Kf=ul,Jf=function(e,t){t=t||{};var r={};function n(e,t){return Kf.isPlainObject(e)&&Kf.isPlainObject(t)?Kf.merge(e,t):Kf.isPlainObject(t)?Kf.merge({},t):Kf.isArray(t)?t.slice():t}function i(r){return Kf.isUndefined(t[r])?Kf.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function a(e){if(!Kf.isUndefined(t[e]))return n(void 0,t[e])}function o(r){return Kf.isUndefined(t[r])?Kf.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function s(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s};return Kf.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,n=t(e);Kf.isUndefined(n)&&t!==s||(r[e]=n)})),r},Yf=pf,Xf={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Xf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var Zf={};Xf.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Yf+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,a){if(!1===e)throw new Error(n(i," has been removed"+(t?" in "+t:"")));return t&&!Zf[i]&&(Zf[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}};var eh={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var a=n[i],o=t[a];if(o){var s=e[a],c=void 0===s||o(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+a)}},validators:Xf},th=ul,rh=hl,nh=ml,ih=function(e){return Wf(e),e.headers=e.headers||{},e.data=Vf.call(e,e.data,e.headers,e.transformRequest),e.headers=Uf.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Uf.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Qf.adapter)(e).then((function(t){return Wf(e),t.data=Vf.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Hf(t)||(Wf(e),t&&t.response&&(t.response.data=Vf.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ah=Jf,oh=eh,sh=oh.validators;function ch(e){this.defaults=e,this.interceptors={request:new nh,response:new nh}}ch.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=ah(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&oh.assertOptions(t,{silentJSONParsing:sh.transitional(sh.boolean),forcedJSONParsing:sh.transitional(sh.boolean),clarifyTimeoutError:sh.transitional(sh.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!n){var o=[ih,void 0];for(Array.prototype.unshift.apply(o,r),o=o.concat(a),i=Promise.resolve(e);o.length;)i=i.then(o.shift(),o.shift());return i}for(var s=e;r.length;){var c=r.shift(),u=r.shift();try{s=c(s)}catch(e){u(e);break}}try{i=ih(s)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},ch.prototype.getUri=function(e){return e=ah(this.defaults,e),rh(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},th.forEach(["delete","get","head","options"],(function(e){ch.prototype[e]=function(t,r){return this.request(ah(r||{},{method:e,url:t,data:(r||{}).data}))}})),th.forEach(["post","put","patch"],(function(e){ch.prototype[e]=function(t,r,n){return this.request(ah(n||{},{method:e,url:t,data:r}))}}));var uh=ch,lh=Tl;function fh(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new lh(e),t(r.reason))}))}fh.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},fh.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},fh.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},fh.source=function(){var e;return{token:new fh((function(t){e=t})),cancel:e}};var hh=fh,ph=ul,dh=el,mh=uh,gh=Jf;var vh=function e(t){var r=new mh(t),n=dh(mh.prototype.request,r);return ph.extend(n,mh.prototype,r),ph.extend(n,r),n.create=function(r){return e(gh(t,r))},n}(Mf);vh.Axios=mh,vh.Cancel=Tl,vh.CancelToken=hh,vh.isCancel=$f,vh.VERSION=pf,vh.all=function(e){return Promise.all(e)},vh.spread=function(e){return function(t){return e.apply(null,t)}},vh.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError},Zu.exports=vh,Zu.exports.default=vh;var yh=Zu.exports;function bh(e){return e}function wh(e){var t=[];if(e)return Array.isArray(e)?e:("object"==typeof e&&Object.keys(e).forEach((function(r){"number"==typeof r&&(t[r]=e[r])})),t)}function xh(e){if(yh.isCancel(e))return Promise.reject(e);var t=Eh(e)||{};if(t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry="number"==typeof t.retry?t.retry:3,t.retryDelay="number"==typeof t.retryDelay?t.retryDelay:100,t.instance=t.instance||yh,t.backoffType=t.backoffType||"exponential",t.httpMethodsToRetry=wh(t.httpMethodsToRetry)||["GET","HEAD","PUT","OPTIONS","DELETE"],t.noResponseRetries="number"==typeof t.noResponseRetries?t.noResponseRetries:2,t.checkRetryAfter="boolean"!=typeof t.checkRetryAfter||t.checkRetryAfter,t.maxRetryAfter="number"==typeof t.maxRetryAfter?t.maxRetryAfter:3e5,t.statusCodesToRetry=wh(t.statusCodesToRetry)||[[100,199],[429,429],[500,599]],e.config=e.config||{},e.config.raxConfig=Object.assign({},t),!(t.shouldRetry||kh)(e))return Promise.reject(e);var r=new Promise((function(r,n){var i=0;if(t.checkRetryAfter&&e.response&&e.response.headers["retry-after"]){var a=function(e){var t=Number(e);if(!Number.isNaN(t))return 1e3*t;var r=Date.parse(e);return Number.isNaN(r)?void 0:r-Date.now()}(e.response.headers["retry-after"]);if(!(a&&a>0&&a<=t.maxRetryAfter))return n(e);i=a}e.config.raxConfig.currentRetryAttempt+=1;var o=e.config.raxConfig.currentRetryAttempt;0===i&&(i="linear"===t.backoffType?1e3*o:"static"===t.backoffType?t.retryDelay:(Math.pow(2,o)-1)/2*1e3,"number"==typeof t.maxRetryDelay&&(i=Math.min(i,t.maxRetryDelay))),setTimeout(r,i)})),n=t.onRetryAttempt?Promise.resolve(t.onRetryAttempt(e)):Promise.resolve();return Promise.resolve().then((function(){return r})).then((function(){return n})).then((function(){return t.instance.request(e.config)}))}function kh(e){var t=e.config.raxConfig;if(!t||0===t.retry)return!1;if(!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries)return!1;if(!e.config.method||t.httpMethodsToRetry.indexOf(e.config.method.toUpperCase())<0)return!1;if(e.response&&e.response.status){for(var r=!1,n=0,i=t.statusCodesToRetry;n<i.length;n+=1){var a=i[n],o=e.response.status;if(o>=a[0]&&o<=a[1]){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}function Eh(e){if(e&&e.config)return e.config.raxConfig}var Sh=Object.freeze({__proto__:null,attach:function(e){return(e=e||yh).interceptors.response.use(bh,xh)},detach:function(e,t){(t=t||yh).interceptors.response.eject(e)},shouldRetryRequest:kh,getConfig:Eh}),Ph=le(Sh);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=q.default,r=vr,n=Rr.exports,i=Nr.exports,a=j.default,o=Bn,s=Ei,c=Eo,u=Ws,l=Ys,f=Xs,h=wc,p=xc,d=kc,m=Ec,g=Sc,v=N.default,y=Pc,b=_c,w=Ac,x=Cc,k=Fc,E=Dc,S=Oc,P=Tc,_=jc,A=Lc,C=Nc,F=au,D=Wu,O=Yu,R=Xu,T=yh,I=Ph,L=jr.exports;function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var M=z(r),B=z(n),$=z(i),U=z(a),V=z(c),H=z(u),Q=z(l),G=z(v),W=z(F),K=z(D),J=z(T),Y=z(I),X=z(L);function Z(e){return"string"==typeof e&&e.startsWith("@encrypted:")}function ee(e,t){return B.default.encrypt(e,t).toString()}function te(e,t){try{return B.default.decrypt(e,t).toString($.default)}catch{return""}}var re=Object.freeze({__proto__:null,encrypt:ee,decrypt:te});class ne{constructor(e,t,r){this.key=void 0,this.values=void 0,this.schema=void 0,this.values=e,this.schema=t,this.key=r}setKey(e){this.key=e}getValues(){return this.values}setValues(e){const r=new M.default({removeAdditional:!0,useDefaults:!0,allErrors:!0}).compile(this.schema);if(!r(e=t.cloneDeep(e)))for(const n of r.errors)e=t.omit(e,n.dataPath.substr(1).split("/"));this.values=e}getValue(e,r){return t.get(this.values,e,r)}setValue(e,r){return t.set(this.values,e,r)}toObject(){const e=new M.default({removeAdditional:!0,useDefaults:!0,allErrors:!0});e.removeKeyword("default"),e.addKeyword("default",{validate:(e,r,n,i,a,o,s)=>(t.isEqual(e,r)&&(delete a[o],t.isEmpty(a)&&function(e,r){const n=[];let i=e;for(let e=0;e<r.length-1;e++)n.push(i),i=i[r[e]];for(let e=r.length-2;e>=0;e--)t.isEmpty(n[e][r[e]])&&delete n[e][r[e]]}(s,t.toPath(i.substr(1)))),!0),modifying:!0,errors:!1}),e.addKeyword("encrypt",{validate:(e,r,n,i,a,o)=>(this.key&&e&&!Z(r)&&a&&o&&t.set(a,o,"@encrypted:"+ee(r,this.key)),!0),modifying:!0,errors:!1});const r=e.compile(this.schema),n=t.cloneDeep(this.values);return r(n),n}static createFromObject(e,r,n){const i=new M.default({removeAdditional:!0,useDefaults:!0,allErrors:!0});i.addKeyword("encrypt",{validate:(e,r,i,a,o,s)=>(n&&e&&Z(r)&&o&&s&&t.set(o,s,te(r.substr(11),n)),!0),modifying:!0,errors:!1});const a=i.compile(r);if(!a(e))for(const r of a.errors)e=t.omit(e,r.dataPath.substr(1).split("/"));return new this(e,r,n)}}class ie extends ne{constructor(){super(...arguments),this.pluginsConfig={}}getStructure(e){return this.getValue(["structure",e])}getPluginConfig(e,r){if(!this.pluginsConfig[e]){const n=this.getValue(["pluginsConfig",e],{});this.pluginsConfig[e]=ne.createFromObject(t.cloneDeep(n),r,this.key+":"+e)}return this.pluginsConfig[e]}setPluginConfig(e,r){const n=r.toObject();t.isEmpty(n)?t.unset(this.values,["pluginsConfig",e]):this.setValue(["pluginsConfig",e],n),delete this.pluginsConfig[e]}static createFromObject(e){return super.createFromObject(e,ie.schema)}}ie.file="book.json",ie.schema={title:"TopWrite Configuration",type:"object",properties:{root:{type:"string",title:"Path from the root folder containing the book's content"},title:{type:"string",title:"Title of the book"},author:{type:"object",title:"attr of the author",properties:{name:{type:"string"},email:{type:"string"},home:{type:"string"}}},theme:{type:"string",title:"Name of the theme",default:"default"},themeConfig:{type:"object",title:"Configuration for theme",properties:{defaultMode:{type:"string",title:"Default mode form theme",default:"light"},primaryColor:{type:"string",title:"Primary Color form theme",default:"#3c60ff"}},default:{}},plugins:{type:"array",items:{type:"string"},default:[]},pluginsConfig:{type:"object",title:"Configuration for plugins",default:{}},structure:{type:"object",properties:{langs:{default:"LANGS.md",type:"string",title:"File to use as languages index",pattern:"^[a-zA-Z-._\\d,\\s]+$"},readme:{default:"README.md",type:"string",title:"File to use as preface",pattern:"^[a-zA-Z-._\\d,\\s]+$"},summary:{default:"SUMMARY.md",type:"string",title:"File to use as table of contents",pattern:"^[a-zA-Z-._\\d,\\s]+$"}},default:{}},pdf:{type:"object",title:"PDF specific configurations",properties:{fontFamily:{type:"string",default:"Microsoft Yahei",title:"Font family for the PDF output"},margin:{type:"object",title:"Margins (unit: pt)",properties:{right:{type:"integer",title:"Right Margin",minimum:0,maximum:100,default:30},left:{type:"integer",title:"Left Margin",minimum:0,maximum:100,default:30},top:{type:"integer",title:"Top Margin",minimum:0,maximum:100,default:40},bottom:{type:"integer",title:"Bottom Margin",minimum:0,maximum:100,default:40}},default:{}},paperSize:{type:"string",enum:["a0","a1","a2","a3","a4","a5","a6","b0","b1","b2","b3","b4","b5","b6","legal","letter"],default:"a4",title:"Paper size for the PDF"},chapterMark:{type:"string",enum:["pagebreak","rule","both","none"],default:"pagebreak",title:"How to mark detected chapters"},pageBreaksBefore:{type:"string",default:"/",title:'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'},pageNumbers:{type:"boolean",default:!0,title:"Add page numbers to the bottom of every page"}},default:{}}},required:[]};class ae{constructor(e){void 0===e&&(e=[]),this.data=void 0,this.data="string"==typeof e?e.split(".").map((e=>parseInt(e,10))):e}getRoot(){return new ae(this.data.slice(0,1))}getParent(){return new ae(this.data.slice(0,-1))}createChild(e){return new ae(this.data.concat(e))}isDescendant(e){return e.toString().startsWith(this.toString()+".")}getNext(){const e=[...this.data];return e[e.length-1]++,new ae(e)}getDepth(){return this.data.length-1}eq(e){return this.toString()===e.toString()}getLeafIndex(){return this.data[this.data.length-1]-1}toString(){return this.data.join(".")}static compare(e,t){for(let r=0;r<Math.max(e.data.length,t.data.length);r++){let n=e.data[r]||0,i=t.data[r]||0;if(n>i)return 1;if(i>n)return-1}return 0}}class oe{constructor(e){let{title:t,ref:r,path:n,children:i=[]}=e;this.level=void 0,this.title=void 0,this.ref=void 0,this.path=void 0,this.children=void 0,this.title=t,this.ref=r,this.path=n,!this.path&&this.ref&&(this.path=a.posix.format({...a.posix.parse(this.ref),ext:".html",base:""})),this.children=i,this.level=new ae}getLevel(){return this.level}getTitle(){return this.title}getRef(){return this.ref}getPath(){return this.path}getArticles(){return this.children}getDepth(){return this.getLevel().getDepth()}createChildLevel(){return this.level.createChild(this.children.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.children.entries())r.indexLevels(e.createChild(t+1))}static findArticle(e,t){return e.getArticles().reduce(((e,r)=>e||(t(r)?r:oe.findArticle(r,t))),void 0)}static createFromObject(e){var t;const r=null==(t=e.children)?void 0:t.map((e=>oe.createFromObject(e)));return new oe({...e,children:r})}}class se{constructor(e,t,r){void 0===t&&(t=[]),this.level=void 0,this.id=void 0,this.title=void 0,this.articles=void 0,this.level=new ae,this.id=r,this.title=e,this.articles=t}getLevel(){return this.level}getTitle(){return this.title}getArticles(){return this.articles}createChildLevel(){return this.level.createChild(this.articles.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.articles.entries())r.indexLevels(e.createChild(t+1))}static createFormObject(e){var t;return new se(e.title,null==(t=e.articles)?void 0:t.map((e=>oe.createFromObject(e))),e.id)}}const ce={tokenize:function(e,t,r){function n(t){return t===m.codes.rightParenthesis?f(t):w.factoryDestination(e,i,r,d.types.resourceDestination,d.types.resourceDestinationLiteral,d.types.resourceDestinationLiteralMarker,d.types.resourceDestinationRaw,d.types.resourceDestinationString,g.constants.linkResourceDestinationBalanceMax)(t)}function i(t){return x.markdownLineEndingOrSpace(t)?b.factoryWhitespace(e,a)(t):f(t)}function a(t){return t===m.codes.quotationMark||t===m.codes.apostrophe||t===m.codes.leftParenthesis?E.factoryTitle(e,b.factoryWhitespace(e,o),r,d.types.resourceTitle,d.types.resourceTitleMarker,d.types.resourceTitleString)(t):o(t)}function o(t){return t===m.codes.equalsTo?(e.enter("resourceSize"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),s):f(t)}function s(t){return t===m.codes.lowercaseX?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),u):t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeWidth"),e.enter(d.types.chunkString,{contentType:"string"}),c(t))}function c(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("resourceSizeWidth"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):t===m.codes.lowercaseX?(e.exit(d.types.chunkString),e.exit("resourceSizeWidth"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),u):(e.consume(t),c)}function u(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeHeight"),e.enter(d.types.chunkString,{contentType:"string"}),l(t))}function l(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("resourceSizeHeight"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.consume(t),l)}function f(n){return n===m.codes.rightParenthesis?(e.enter(d.types.resourceMarker),e.consume(n),e.exit(d.types.resourceMarker),e.exit(d.types.resource),t):r(n)}return function(t){return e.enter(d.types.resource),e.enter(d.types.resourceMarker),e.consume(t),e.exit(d.types.resourceMarker),b.factoryWhitespace(e,n)}}},ue={tokenize:function(e,t,r){const n=this;function i(e){return n.parser.defined.includes(y.normalizeIdentifier(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}return function(t){return G.default.strictEqual(t,m.codes.leftSquareBracket,"expected left bracket"),k.factoryLabel.call(n,e,i,r,d.types.reference,d.types.referenceMarker,d.types.referenceString)(t)}}},le={tokenize:function(e,t,r){function n(n){return 93===n?(e.enter(d.types.referenceMarker),e.consume(n),e.exit(d.types.referenceMarker),e.exit(d.types.reference),t):r(n)}return function(t){return e.enter(d.types.reference),e.enter(d.types.referenceMarker),e.consume(t),e.exit(d.types.referenceMarker),n}}};var fe={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if((n.events[o][1].type===d.types.labelImage||n.events[o][1].type===d.types.labelLink)&&!n.events[o][1]._balanced){i=n.events[o][1];break}function s(e){return i._balanced=!0,r(e)}function c(r){return r===m.codes.leftParenthesis?e.attempt(ce,t,a?t:s)(r):r===m.codes.leftSquareBracket?e.attempt(ue,t,a?e.attempt(le,t,s):s)(r):a?t(r):s(r)}return function(t){return G.default(t===m.codes.rightSquareBracket,"expected `]`"),i?i._inactive?s(t):(a=n.parser.defined.indexOf(y.normalizeIdentifier(n.sliceSerialize({start:i.end,end:n.now()})))>-1,e.enter(d.types.labelEnd),e.enter(d.types.labelMarker),e.consume(t),e.exit(d.types.labelMarker),e.exit(d.types.labelEnd),c):r(t)}},resolveTo:p.labelEnd.resolveTo,resolveAll:p.labelEnd.resolveAll};const he=(e,t,r)=>{const n=h.image(e,t,r);return e.width||e.height?n.replace(/\)$/," ="+(e.width||"")+(e.height?"x"+e.height:"")+")"):n};he.peek=h.image.peek;const pe=e=>{let t;switch(e){case"right":t="--: ";break;case"center":t=":-: ";break;default:t=""}return t},de={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(t===m.codes.greaterThan){const r=n.containerState;return G.default(r,"expected `containerState` to be defined in container"),r.open||(e.enter(d.types.blockQuote,{_container:!0}),r.open=!0),e.enter(d.types.blockQuotePrefix),e.enter(d.types.blockQuoteMarker),e.consume(t),e.exit(d.types.blockQuoteMarker),A.factorySpace(e,i,d.types.whitespace)}return r(t)};function i(t){return t===m.codes.leftSquareBracket?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),a):s(t)}function a(t){return t===m.codes.rightSquareBracket||x.markdownLineEndingOrSpace(t)?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),s):(e.enter("blockQuoteType"),e.enter(d.types.chunkString,{contentType:"string"}),o(t))}function o(t){return t===m.codes.rightSquareBracket||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("blockQuoteType"),e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),s):(e.consume(t),o)}function s(r){return x.markdownSpace(r)?(e.enter(d.types.blockQuotePrefixWhitespace),e.consume(r),e.exit(d.types.blockQuotePrefixWhitespace),e.exit(d.types.blockQuotePrefix),t):(e.exit(d.types.blockQuotePrefix),t(r))}},continuation:{tokenize:function(e,t,r){return A.factorySpace(e,e.attempt(de,t,r),d.types.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:g.constants.tabSize)}},exit:p.blockQuote.exit},me=function(e,t){void 0===t&&(t="text");let r="";return S.visit(e,t,(function(e){r+=e.value})),r},ge=/^\[toc(?:=(\d)(?:,(\d))?)?]$/im,ve=s.unified().use(V.default).use((function(){const e=this.data();e.micromarkExtensions=[],e.fromMarkdownExtensions=[],e.toMarkdownExtensions=[],e.toHastExtensions=[]})).use(K.default).use(W.default,["yaml"]).use(H.default).use(Q.default).use(O.remarkHeadingId).use((function(){return this.data().toHastExtensions.push({xBlock:(e,t)=>e({},"x-block",{name:t.name,value:t.value,parameter:t.parameter}),xInline:(e,t)=>e({},"x-inline",{name:t.name,value:t.value})}),function(e){S.visit(e,((e,t,r)=>{if(null!==t&&null!==r)if((e=>"code"===e.type)(e)&&e.lang){const n=/\[([\w-_]+)(:([\w-_]+))?]/g.exec(e.lang);if(n){const i={type:"xBlock",name:n[1],parameter:n[3]||"",value:e.value,position:e.position};r.children.splice(t,1,i)}}else if((e=>"inlineCode"===e.type)(e)){const n=/^([^\s]+)\s(.*?)\s\1$/.exec(e.value);if(n){const i={type:"xInline",name:n[1],value:n[2],position:e.position};r.children.splice(t,1,i)}}}))}})).use((function(){const e=this.data();e.micromarkExtensions.push({text:{[m.codes.rightSquareBracket]:fe}}),e.fromMarkdownExtensions.push({enter:{resourceSizeWidth:function(){this.buffer()},resourceSizeHeight:function(){this.buffer()}},exit:{resourceSizeWidth:function(){const e=this.resume();this.stack[this.stack.length-1].width=e},resourceSizeHeight:function(){const e=this.resume();this.stack[this.stack.length-1].height=e}}}),e.toMarkdownExtensions.push({handlers:{image:he}}),e.toHastExtensions.push({image:(e,t)=>{const r={src:f.encode(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(r.title=t.title),r.width=t.width,r.height=t.height,e(t,"img",r)}})})).use((function(){return this.data().toMarkdownExtensions.push({handlers:{paragraph:(e,t,r)=>{const n=P.paragraph(e,t,r);return pe(e.align)+n},heading:(e,t,r)=>_.heading(e,t,r).replace(/^#+\s/,"$&"+pe(e.align))}}),function(e){S.visit(e,((e,t,r)=>{if((e=>"paragraph"===e.type||"heading"===e.type)(e)){const t=o.select("text",e);if(t){const n=t.value;n.startsWith("--: ")?e.align="right":n.startsWith(":-: ")?e.align="center":n.startsWith(":-- ")&&(e.align="left"),e.align&&(t.value=n.substr(4),r&&"listItem"===r.type?r.data={...r.data,hProperties:{className:"align-"+e.align}}:e.data={...e.data,hProperties:{className:"align-"+e.align}})}}}))}})).use((function(){const e=this.data();return e.toMarkdownExtensions.push({handlers:{blockquote:(e,t,r)=>{const n=C.blockquote(e,t,r);return e.variant?n.replace(/(^|\s+)>\s/,"$1> ["+e.variant+"] "):n}}}),e.micromarkExtensions.push({document:{[m.codes.greaterThan]:de}}),e.fromMarkdownExtensions.push({enter:{blockQuoteType:function(){this.buffer()}},exit:{blockQuoteType:function(){const e=this.resume();this.stack[this.stack.length-1].variant=e}}}),function(e){S.visit(e,"blockquote",(e=>{e.variant&&(e.data={...e.data,hProperties:{className:e.variant}})}))}})).use((function(){return function(e){S.visit(e,((e,t,r)=>{if(r&&"root"===r.type&&null!==t&&me(e).match(ge))return r.children.splice(t,1),[S.SKIP,t]}))}}));function ye(e){const t=[];for(const r of e.children){const e=r.children,n=o.select("paragraph:first-child>*",r);if(!n)continue;const i=me(n);if(!i)continue;const a=n.url?decodeURI(n.url):void 0;if(a&&a.match(/[\\:*?"<>|]/))continue;let s={title:i,ref:a};if(e.length>1){const t=e[e.length-1];R.is(t,"list")&&(s.children=ye(t))}t.push(s)}return t}const be=ve();class we{constructor(e){void 0===e&&(e=[]),this.parts=void 0,this.parts=e,this.indexLevels()}getParts(){return this.parts}getPart(e){return this.parts[e]}getLastPart(){return this.parts[this.parts.length-1]}getArticles(){const e=[];return this.getArticle((t=>(e.push(t),!1))),e}getArticle(e,t){return this.parts.reduce(((r,n)=>r||(!t||t(n)?oe.findArticle(n,e):void 0)),void 0)}getArticlePart(e){const t=e.getLevel().getRoot();return this.getByLevel(t)}getFirstPath(){const e=this.getArticle((e=>!!e.getPath()));if(e)return e.getPath()}getByLevel(e){const t=t=>t.getLevel().eq(e);return this.parts.reduce(((e,r)=>e||(t(r)?r:oe.findArticle(r,t))),void 0)}getNextArticle(e){const t=e instanceof oe?e.getLevel():e;let r=!1;return this.getArticle((e=>!!r||(r=e.getLevel()==t,!1)))}getPrevArticle(e){const t=e instanceof oe?e.getLevel():e;let r;return this.getArticle((e=>e.getLevel()==t||(r=e,!1))),r}getParent(e){const t=(e instanceof oe?e.getLevel():e).getParent();if(t)return this.getByLevel(t)}indexLevels(){for(const[e,t]of this.parts.entries()){const r=new ae(String(e+1));t.indexLevels(r)}}isSinglePart(){return 1===this.parts.length&&!this.parts[0].title}isEmpty(){return this.isSinglePart()?0===this.parts[0].articles.length:0===this.parts.length}static createFromObject(e){return new we(e.map((e=>se.createFormObject(e))))}static createFromText(e){const t=function(e){const t=be.parse(e),r=[];let n;for(const e of t.children)if(R.is(e,"heading")&&[2,3].includes(e.depth)&&(n&&r.push(n),n={id:me(e,"idString").trim(),title:me(e).trim()}),R.is(e,"list")){const t=ye(e);n?n.articles=(n.articles||[]).concat(t):n={title:"",articles:t}}return n?r.push(n):r.push({title:""}),r}(e);return we.createFromObject(t)}static create(e){return"object"==typeof e?we.createFromObject(e):we.createFromText(e)}}class xe{constructor(e){let{host:t,preset:r}=e;this.host=void 0,this.preset=void 0,this.host=t,this.preset=r}getBuyUrl(e,t){return this.host+"/api/buy?book="+e.id+"&plugin="+t.name}async bought(e,t){try{return await J.default.get(this.host+"/api/bought?book="+e.id+"&plugin="+t.name),!0}catch{return!1}}async queryPlugins(e){let{page:t=1,...r}=e;const{data:n}=await J.default.get(this.host+"/api/query",{params:{...r,page:t}});return n}async getInstalled(e){const{config:t}=e,r=["theme-"+t.getValue("theme"),...t.getValue("plugins")];if(this.preset)for(const[e,n]of Object.entries(this.preset))r.push(e),t.setValue(["pluginsConfig",e],n);const{data:n}=await J.default.get(this.host+"/api/installed",{params:{book:e.id,plugins:r.join(",")}}).catch((e=>{throw new Error("Plugins Check Failed:"+e.message)}));return n.filter((e=>!e.builtin||this.preset&&this.preset[e.name]))}}e.pluginCenter=void 0;class ke{constructor(e,t,r){this.flatColors=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#f39c12","#d35400","#c0392b"],this.letter=void 0,this.size=void 0,this.canvas=void 0,this.letter=e,this.size=t,this.canvas=r,this.generate()}toDataUrl(){return this.canvas.toDataURL()}generate(){const e=this.canvas.getContext("2d");if(!e)throw new Error("getContext failed");const t=this.letter[0].toUpperCase();e.fillStyle=this.flatColors[t.charCodeAt(0)%this.flatColors.length],e.fillRect(0,0,this.size,this.size),e.font=Math.round(this.size/2)+"px Roboto",e.textAlign="center",e.fillStyle="#FFFFFF",e.fillText(this.letter[0].toUpperCase(),this.size/2,this.size/1.5)}static create(e,t,r){return r||(r=function(e){const t=window.document.createElement("canvas");return t.width=e,t.height=e,t}(t)),new ke(e,t,r)}}const Ee=/^(?:\w+:)?\/\/(\S+)$/,Se=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,Pe=/^[^\s\.]+\.\S{2,}$/;Y.default.attach(),J.default.defaults.maxContentLength=1/0,J.default.defaults.maxBodyLength=1/0,Object.defineProperty(e,"request",{enumerable:!0,get:function(){return J.default}}),e.BaseConfig=ne,e.Book=class{constructor(e,t,r){this.id=void 0,this.summary=void 0,this._config=void 0,this.id=e,this.summary=r,this.config=t}get config(){return this._config}set config(e){e.setKey(this.id+":config"),this._config=e}},e.Config=ie,e.File=class{constructor(e){let{path:t,content:r,meta:n={}}=e;this.path=void 0,this.content=void 0,this.meta=void 0,this.path=t,this.content=r,this.meta=n}getMeta(e,r){return t.get(this.meta,e,r)}relative(e){const t="/"===e.slice(-1);return(e=U.default.posix.relative(U.default.posix.dirname(this.path),e)||".")+(t?"/":"")}resolve(e){return U.default.posix.join(U.default.posix.dirname(this.path),e)}},e.LetterAvatar=ke,e.Level=ae,e.Summary=we,e.SummaryArticle=oe,e.SummaryPart=se,e.aes=re,e.createPluginCenter=function(t){return e.pluginCenter=new xe(t)},e.isEncryptedData=Z,e.isUrl=function(e){const t=e.match(Ee);if(!t)return!1;const r=t[1];return!!r&&(Se.test(r)||Pe.test(r))},e.markdown=ve,e.md5=function(e){return X.default(e).toString()}}(fe);class _h{name;version;path;hooks;config;constructor({name:e,version:t,path:r,hooks:n,config:i}){this.name=e,this.version=t,this.path=r,this.hooks=n,this.config=i}getHook(e){return this.hooks[e]}getContext(e){return{...e,getConfig:()=>e.book.config.getPluginConfig(this.name,this.config)}}}async function Ah(e,t){se.info(`installing plugin "${e.name}"`);const r=`npm install ${e.host}.tgz`,{error:n}=H.default.sync(r,{stdio:["inherit"],cwd:t,shell:!0});if(n)throw n;const i=j.default.join(t,"node_modules","topwrite-plugin-"+e.name),a=j.default.join(i,"dist","hooks.js");let o={};if(Q.existsSync(a)){o=new d.NodeVM({require:{builtin:["path/posix","crypto"]},sandbox:{URL:URL,URLSearchParams:URLSearchParams}}).runFile(a)}const s=j.default.join(i,"config.json");let c={};return Q.existsSync(s)&&(c=require(s)),se.info(`plugin "${e.name}@${e.version}" installed with success`),new _h({name:e.name,version:e.version,path:i,hooks:o,config:c})}const Ch=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/;class Fh extends class{book;sourceFS;tmpFS;dest;options;plugins=[];constructor(e,t,r,n,i){this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i}getContext(){return{book:this.book,sourceFS:this.sourceFS,tmpFS:this.tmpFS,request:fe.request,logger:se,format:this.format}}async generate(){await this.initLfs(),await this.initPlugins(),await this.onInit(),await this.callHook("init"),await this.generateLogo(),await this.onSummary(),await this.callHook("summary"),await this.generateArticles(),await this.callHook("articles"),await this.callHook("beforeFinish")&&(await this.onFinish(),await this.callHook("finish")),se.success("generation finished with success!")}async initLfs(){if(this.options.lfs){se.info("generate lfs files...");let e="git lfs ls-files -l";const{config:t}=this.book,r=t.getValue("root","");r&&(e+=` --include ${r}`);const{error:n,stdout:i}=H.default.sync(e,{stdio:["inherit"],encoding:"utf8",cwd:this.sourceFS.root,shell:!0}),a={};n||i.trim().split("\n").forEach((e=>{if(e){const[t,n]=e.trim().split(/\s[-*]\s/);if(t&&n){let e=n.trim();r&&(e=j.default.relative(r,e)),a[e]=t.trim()}}})),this.options.lfs.files=a,se.info(`found ${Object.keys(a).length} files`)}}async initPlugins(){this.plugins=await async function(e,t,r){const n=fe.createPluginCenter(r),i=await n.getInstalled(e),a=[];se.info(`installing ${i.length} plugins from registry`);for(let e of i)try{if(e.disabled){se.warn('plugin "'+e.name+'" has been disabled');continue}a.push(await Ah(e,t))}catch(t){se.warn('plugin "'+e.name+'" installed with fail'),se.warn(t.message)}return a}(this.book,this.tmpFS.root,this.options.plugins)}async generateLogo(){if(!this.tmpFS.exist("logo.png")){const e=this.book.config.getValue("title","Untitled"),t=g.createCanvas(60,60);fe.LetterAvatar.create(e,60,t);const r=t.toBuffer("image/png");await this.tmpFS.writeFile("logo.png",r)}}async generateArticles(){se.info("generate articles ...");const e=this.book.summary.getArticles();se.info(`found ${e.length} articles`);for(const t of e)if(t.ref){se.info('generate article "'+t.getRef()+'"');try{await this.onArticle(t),await this.callHook("article",t)}catch(e){"ENOENT"===e.code?se.warn(`article file [${t.ref}] not exist`):se.warn(`generate article [${t.ref}] failed: ${e.message}`)}}}async callHook(e,...t){return se.debug('calling hook "'+e+'"'),await(async(e,t)=>{for(let r of e)if(!await t(r))return!1;return!0})(this.plugins,(async r=>{const n=r.getHook(e);return!n||await n.apply(r.getContext(this.getContext()),t)}))}async makeFile(e,t){const r=await this.tmpFS.readAsString(t),n=this.parseFileMeta(t,r);return new fe.File({path:e,...n})}parseFileMeta(e,t){const r=t.match(Ch);let n={};if(r){if(void 0!==r[2])try{n=W.default.load(r[2])||{}}catch{}t=void 0!==r[3]?r[3]:""}const i=j.default.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(i),{meta:n,content:t}}}{format="json";async onInit(){this.processSummary()}processSummary(){this.book.summary.getArticle((e=>(e.ref&&(e.path=K.default(e.ref,".json")),!1)))}async onArticle(e){if(e.ref){const t=await this.tmpFS.readAsString(e.ref);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(e.getPath(),JSON.stringify({title:e.title,content:t},null,4))}}async onSummary(){const e=this.book.summary;await this.tmpFS.unlink("SUMMARY.md"),await this.tmpFS.writeFile("SUMMARY.json",JSON.stringify(e.toObject(),null,4))}async onFinish(){await this.packBook()}async packBook(){se.info("pack book ...");const e=J.default.createWriteStream(this.dest);await this.tmpFS.archive(e,"tar")}}class Dh{root;constructor(e){this.root=e}readFileMTime(e){const t=`git log --pretty=format:%cI -1 -- ${e}`,{error:r,stdout:n}=H.default.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0});if(!r)return n}createReadStream(e,t){return J.default.createReadStream(this.resolve(e),t)}async readFile(e){return await J.default.readFile(this.resolve(e))}async readAsObject(e){try{return await J.default.readJSON(this.resolve(e))}catch{return{}}}async readAsString(e){try{return await J.default.readFile(this.resolve(e),"utf-8")}catch{return""}}async writeFile(e,t){return J.default.writeFile(this.resolve(e),t)}createWriteStream(e,t){return e=this.resolve(e),J.default.ensureDirSync(j.default.dirname(e)),J.default.createWriteStream(e,t)}async appendFile(e,t){return J.default.appendFile(this.resolve(e),t)}exist(e){return J.default.pathExistsSync(this.resolve(e))}async unlink(e){try{await J.default.unlink(this.resolve(e))}catch{}}async readDir(e=""){const t=[];return new Promise((r=>{Y.default({path:this.resolve(e),ignoreFiles:[".gitignore",".bookignore"]}).on("child",(function(e){t.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(()=>{r(t)}))}))}resolve(...e){return j.default.join(this.root,...e)}async archive(e,t="tar"){if("tar"==t)return new Promise(((t,r)=>{x.pack(this.root,{fromBase:!0,ignoreFiles:[".gitignore",".bookignore"]}).pipe(e).on("error",(e=>{r(e)})).on("close",(()=>{t()}))}));{const r=await this.readDir();return new Promise(((n,i)=>{e.on("error",(e=>{i(e)})),e.on("close",(()=>{n()}));const a=X.default(t,{gzip:!0,gzipOptions:{level:9},zlib:{level:9}});a.pipe(e);for(const e of r)"File"===e.type&&a.append(this.createReadStream(e.path),{name:e.path});a.finalize()}))}}}class Oh extends Fh{template;scripts=[];stylesheets=[];headScripts=[];format="html";async onInit(){await super.onInit(),await this.installCommonAssets(),await this.installReader(),await this.copyPluginsAssets(),await this.initTemplate()}initTemplate(){const e=J.default.readFileSync(j.default.resolve(__dirname,"../templates/html.ejs"),"utf-8");this.template=Z.default.compile(e)}processSummary(){this.book.summary.getArticle((e=>{if(e.ref){const t=r.posix.parse(e.ref);e.path=r.posix.format({...t,name:E.pinyin(t.name,{toneType:"none",type:"array"}).join("-"),ext:".html",base:""})}return!1}))}async installCommonAssets(){se.info("installing common assets ..."),await this.installPackage("lodash","lodash.min.js","lodash/lodash.min.js"),await this.installPackage("react","umd/react.production.min.js","react/react.production.min.js"),await this.installPackage("react-dom","umd/react-dom.production.min.js","react-dom/react-dom.production.min.js"),se.info("common assets installed with success")}async installReader(){se.info("installing package @topwrite/reader ...");const e=await this.installPackage("@topwrite/reader","dist/","reader");se.info(`package @topwrite/reader@${e.version} installed with success`)}async installPackage(e,t,r){const n=require.resolve(`${e}/package.json`),i=j.default.join(j.default.dirname(n),t),a=j.default.join(this.tmpFS.root,"asset",r);await J.default.copy(i,a);const o=require(n);return t.endsWith("/")&&(r=`${r}/index.js`),this.scripts.push(`asset/${r}?v=${o.version}`),o}async copyPluginsAssets(){for(const e of this.plugins)await J.default.copy(j.default.join(e.path,"dist"),j.default.join(this.tmpFS.root,"asset","plugins",e.name)),this.scripts.push(`asset/plugins/${e.name}/index.js?v=${e.version}`)}async onArticle(e){if(e.ref){const t=e.getPath(),r=await this.makeFile(t,e.ref),n=await this.renderFile(r,e.title);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(t,n)}}async onSummary(){const e=await this.makeFile("index.html","README.md"),t=await this.renderFile(e);await this.tmpFS.unlink("SUMMARY.md"),await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html",t)}async renderFile(e,t){const r={id:this.book.id,summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:e,lfs:this.options.lfs},n=this.scripts.map((t=>fe.isUrl(t)?t:e.relative(t))),i=this.headScripts.map((t=>fe.isUrl(t)?t:e.relative(t))),a=this.stylesheets.map((t=>fe.isUrl(t)?t:e.relative(t))),o=this.book.config.getValue("title","Untitled"),s=e.getMeta("title",t);return this.template({title:(s?`${s} - `:"")+o,keywords:e.getMeta("keywords"),description:e.getMeta("description"),stylesheets:a,headScripts:i,scripts:n,payload:JSON.stringify(r).replace(/\//g,"\\/")})}}const Rh=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));class Th extends ee.default.ResourceLoader{fs;file;constructor(e,t){super(),this.fs=e,this.file=t}async fetch(e,t){const{element:r}=t;if(r&&"IMG"===r.nodeName){if(o.parse(e).protocol?.startsWith("http")){const t=await fe.request.get(e,{responseType:"stream"});let n=`_images/${fe.md5(e)}`;const i=te.default.extension(t.headers["content-type"]);i&&(n+=`.${i}`),r.setAttribute("src",this.file.relative(n));const a=this.fs.createWriteStream(n);return new Promise(((e,r)=>{t.data.pipe(a),a.on("error",(e=>{a.close(),r(e)})),a.on("close",(()=>{e(null)}))}))}return null}return super.fetch(e,t)}}function Ih(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const jh={json:Fh,html:Oh,ebook:class extends Oh{format="ebook";async initPlugins(){this.book.config.setValue("theme","ebook"),this.options.plugins.preset["theme-ebook"]={},await super.initPlugins()}createDOM(e,t){const r=new Th(this.tmpFS,t),n=new P.VirtualConsole;return n.sendTo(console,{omitJSDOMErrors:!0}),new P.JSDOM(e,{virtualConsole:n,url:`file:///${this.tmpFS.resolve(t.path)}`,runScripts:"dangerously",resources:r,pretendToBeVisual:!0,beforeParse(e){e.SC_DISABLE_SPEEDY=!0}})}async renderFile(e,t){const r=await super.renderFile(e,t),n=this.createDOM(r,e);return await function(e,t){const{tryEvery:r,stopAfter:n}=t,i=Date.now(),a=(t,o)=>{setTimeout((async()=>{try{const r=await e();t(r)}catch(e){Date.now()-i>n?o(e):a(t,o)}}),r)};return new Promise(a)}((()=>{const e=n.window.document,t=e.getElementById("root");if(t&&t.innerHTML&&Array.from(e.images).every((e=>e.complete))){for(const e of Array.from(n.window.document.scripts))e.remove();return n.serialize()}throw new Error("render html timeout")}),{stopAfter:5e3,tryEvery:100})}getConvertOptions(e){const{config:t}=this.book,r={title:t.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-chapter')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level1-toc')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level2-toc')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level3-toc')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0};switch(e){case"docx":r["docx-no-toc"]=!0;break;case"epub":r["dont-split-on-page-breaks"]=!0;break;case"pdf":const e=J.default.readFileSync(j.default.resolve(__dirname,"../templates/pdf-header.ejs"),"utf-8"),n=J.default.readFileSync(j.default.resolve(__dirname,"../templates/pdf-footer.ejs"),"utf-8");r["chapter-mark"]=t.getValue(["pdf","chapterMark"]),r["page-breaks-before"]=t.getValue(["pdf","pageBreaksBefore"]),r["pdf-page-margin-left"]=t.getValue(["pdf","margin","left"]),r["pdf-page-margin-right"]=t.getValue(["pdf","margin","right"]),r["pdf-page-margin-top"]=t.getValue(["pdf","margin","top"]),r["pdf-page-margin-bottom"]=t.getValue(["pdf","margin","bottom"]),r["pdf-serif-family"]=t.getValue(["pdf","fontFamily"]),r["paper-size"]=t.getValue(["pdf","paperSize"]),r["pdf-custom-size"]=t.getValue(["pdf","customSize"]),r.unit="millimeter",r["pdf-page-numbers"]=t.getValue(["pdf","pageNumbers"]),r["preserve-cover-aspect-ratio"]=!0,r["pdf-header-template"]=e,r["pdf-footer-template"]=n}return r}async packBook(){const e=j.default.extname(this.dest).substr(1);if(!["pdf","docx","epub"].includes(e))return super.packBook();const t=await S.lookpath("ebook-convert");if(!t)throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");const r=function(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const a=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",a=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+a,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},o=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=a;if((!Array.isArray(t.excludes)||!Rh(t.excludes,r))&&(!Array.isArray(t.includes)||Rh(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=o),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}(this.getConvertOptions(e)),n=this.tmpFS.resolve("index.html");return r.unshift(n,this.dest),new Promise(((e,i)=>{se.info("convert book ...");const a=H.default(t,r,{stdio:["inherit"],cwd:this.tmpFS.root}),o=["^Conversion options ","^ \\w+: ","^Blocking URL ","^Ignoring CSS ","^CSSStyleDeclaration: ","^PropertyValue: ","^CSSVariable: ",Ih(n),Ih(this.dest)].map((e=>`(${e})`)).join("|"),s=new RegExp(`(${o})`);a.stdout?.on("data",(e=>{e.toString().replace(/[\r\n]*$/,"").split("\n").forEach((e=>{if(e){const t=e.trim();e.match(s)?se.debug({message:t,type:"log"}):se.log(t)}}))})),a.stderr?.on("data",(e=>{se.error(e.toString().trimEnd())})),a.on("close",(t=>{0!==t?i("Convert failed"):e()}))}))}}};var Lh=ne.default,qh=process.cwd,zh=null,Mh=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return zh||(zh=qh.call(process)),zh};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Nh=process.chdir;process.chdir=function(e){zh=null,Nh.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Nh)}var Bh=function(e){Lh.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,Lh.O_WRONLY|Lh.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,Lh.O_WRONLY|Lh.O_SYMLINK,r),a=!0;try{n=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){Lh.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,n,i){e.open(t,Lh.O_SYMLINK,(function(t,a){t?i&&i(t):e.futimes(a,r,n,(function(t){e.close(a,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,a=e.openSync(t,Lh.O_SYMLINK),o=!0;try{i=e.futimesSync(a,r,n),o=!1}finally{if(o)try{e.closeSync(a)}catch(e){}else e.closeSync(a)}return i}):(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=s(e.statSync),e.fstatSync=s(e.fstatSync),e.lstatSync=s(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===Mh&&(e.rename=(t=e.rename,function(r,n,i){var a=Date.now(),o=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-a<6e4)return setTimeout((function(){e.stat(n,(function(e,a){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),o),void(o<100&&(o+=10));i&&i(c)}))}));var t;function r(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){c(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function n(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!c(e))throw e}}:t}function i(t){return t?function(r,n,i,a){return t.call(e,r,n,i,(function(e){c(e)&&(e=null),a&&a.apply(this,arguments)}))}:t}function a(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!c(e))throw e}}:t}function o(t){return t?function(r,n,i){function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,a):t.call(e,r,a)}:t}function s(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:t}function c(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=function(t){function r(r,n,i,a,o,s){var c;if(s&&"function"==typeof s){var u=0;c=function(l,f,h){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,r,n,i,a,o,c);s.apply(this,arguments)}}return t.call(e,r,n,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync=(u=e.readSync,function(t,r,n,i,a){for(var o=0;;)try{return u.call(e,t,r,n,i,a)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var u};var $h=U.default.Stream,Uh=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);$h.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var a=Object.keys(n),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);$h.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),a=0,o=i.length;a<o;a++){var s=i[a];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Vh=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:Hh(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},Hh=Object.getPrototypeOf||function(e){return e.__proto__};var Qh,Gh,Wh=G.default,Kh=Bh,Jh=Uh,Yh=Vh,Xh=ie.default;function Zh(e,t){Object.defineProperty(e,Qh,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Qh=Symbol.for("graceful-fs.queue"),Gh=Symbol.for("graceful-fs.previous")):(Qh="___graceful-fs.queue",Gh="___graceful-fs.previous");var ep=function(){};if(Xh.debuglog?ep=Xh.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(ep=function(){var e=Xh.format.apply(Xh,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!Wh[Qh]){var tp=ce[Qh]||[];Zh(Wh,tp),Wh.close=function(e){function t(t,r){return e.call(Wh,t,(function(e){e||op(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,Gh,{value:e}),t}(Wh.close),Wh.closeSync=function(e){function t(t){e.apply(Wh,arguments),op()}return Object.defineProperty(t,Gh,{value:e}),t}(Wh.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){ep(Wh[Qh]),N.default.equal(Wh[Qh].length,0)}))}ce[Qh]||Zh(ce,Wh[Qh]);var rp,np=ip(Yh(Wh));function ip(e){Kh(e),e.gracefulify=ip,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,a){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):ap([e,[r,n,i],t,a||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,a,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof a&&a.apply(this,arguments):ap([e,[t,n,i,a],r,o||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,a,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof a&&a.apply(this,arguments):ap([e,[t,r,i,a],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,a,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof a&&a.apply(this,arguments):ap([e,[t,r,n,a],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var a=e.readdir;if(e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);return function e(t,r,n,i){return a(t,r,(function(a,o){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,a,o)):ap([e,[t,r,n],a,i||Date.now(),Date.now()])}))}(e,t,r)},"v0.8"===process.version.substr(0,4)){var o=Jh(e);f=o.ReadStream,h=o.WriteStream}var s=e.ReadStream;s&&(f.prototype=Object.create(s.prototype),f.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var c=e.WriteStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0});var u=f;Object.defineProperty(e,"FileReadStream",{get:function(){return u},set:function(e){u=e},enumerable:!0,configurable:!0});var l=h;function f(e,t){return this instanceof f?(s.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var p=e.open;function d(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,a){return p(t,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):ap([e,[t,r,n,i],o,a||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=d,e}function ap(e){ep("ENQUEUE",e[0].name,e[1]),Wh[Qh].push(e),sp()}function op(){for(var e=Date.now(),t=0;t<Wh[Qh].length;++t)Wh[Qh][t].length>2&&(Wh[Qh][t][3]=e,Wh[Qh][t][4]=e);sp()}function sp(){if(clearTimeout(rp),rp=void 0,0!==Wh[Qh].length){var e=Wh[Qh].shift(),t=e[0],r=e[1],n=e[2],i=e[3],a=e[4];if(void 0===i)ep("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){ep("TIMEOUT",t.name,r);var o=r.pop();"function"==typeof o&&o.call(null,n)}else{var s=Date.now()-a,c=Math.max(a-i,1);s>=Math.min(1.2*c,100)?(ep("RETRY",t.name,r),t.apply(null,r.concat([i]))):Wh[Qh].push(e)}void 0===rp&&(rp=setTimeout(sp,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Wh.__patched&&(np=ip(Wh),Wh.__patched=!0);var cp=np;const up=re.default.homedir(),{env:lp}=process,fp=lp.XDG_DATA_HOME||(up?j.default.join(up,".local","share"):void 0),hp=lp.XDG_CONFIG_HOME||(up?j.default.join(up,".config"):void 0);lp.XDG_STATE_HOME||up&&j.default.join(up,".local","state"),lp.XDG_CACHE_HOME||up&&j.default.join(up,".cache"),lp.XDG_RUNTIME_DIR;const pp=(lp.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");fp&&pp.unshift(fp);const dp=(lp.XDG_CONFIG_DIRS||"/etc/xdg").split(":");hp&&dp.unshift(hp);var mp={exports:{}},gp={exports:{}};
8
+ */var Bn=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},$n=Object.prototype.hasOwnProperty,Un=Object.prototype.toString,Vn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,Qn=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Un.call(e)},Gn=function(e){if(!e||"[object Object]"!==Un.call(e))return!1;var t,r=$n.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&$n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||$n.call(e,t)},Wn=function(e,t){Vn&&"__proto__"===t.name?Vn(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Kn=function(e,t){if("__proto__"===t){if(!$n.call(e,t))return;if(Hn)return Hn(e,t).value}return e[t]},Jn=function e(){var t,r,n,i,a,o,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(r in t)n=Kn(s,r),s!==(i=Kn(t,r))&&(l&&i&&(Gn(i)||(a=Qn(i)))?(a?(a=!1,o=n&&Qn(n)?n:[]):o=n&&Gn(n)?n:{},Wn(s,{name:r,newValue:e(l,o,i)})):void 0!==i&&Wn(s,{name:r,newValue:i}));return s};function Yn(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function Xn(){const e=[],t={run:function(...t){let r=-1;const n=t.pop();if("function"!=typeof n)throw new TypeError("Expected function as last argument, not "+n);!function i(a,...o){const s=e[++r];let c=-1;if(a)n(a);else{for(;++c<t.length;)null!==o[c]&&void 0!==o[c]||(o[c]=t[c]);t=o,s?function(e,t){let r;return n;function n(...t){const n=e.length>t.length;let o;n&&t.push(i);try{o=e(...t)}catch(e){const t=e;if(n&&r)throw t;return i(t)}n||(o instanceof Promise?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...n){r||(r=!0,t(e,...n))}function a(e){i(null,e)}}(s,i)(...o):n(null,...o)}}(null,...t)},use:function(r){if("function"!=typeof r)throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}};return t}var Zn={}.hasOwnProperty;function ei(e){return e&&"object"==typeof e?Zn.call(e,"position")||Zn.call(e,"type")?ri(e.position):Zn.call(e,"start")||Zn.call(e,"end")?ri(e):Zn.call(e,"line")||Zn.call(e,"column")?ti(e):"":""}function ti(e){return ni(e&&e.line)+":"+ni(e&&e.column)}function ri(e){return ti(e&&e.start)+"-"+ti(e&&e.end)}function ni(e){return e&&"number"==typeof e?e:1}class ii extends Error{constructor(e,t,r){var n,i=[null,null],a={start:{line:null,column:null},end:{line:null,column:null}};super(),"string"==typeof t&&(r=t,t=null),"string"==typeof r&&(-1===(n=r.indexOf(":"))?i[1]=r:(i[0]=r.slice(0,n),i[1]=r.slice(n+1))),t&&("type"in t||"position"in t?t.position&&(a=t.position):"start"in t||"end"in t?a=t:("line"in t||"column"in t)&&(a.start=t)),this.name=ei(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="object"==typeof e?e.stack:"",this.reason=this.message,this.line=a.start.line,this.column=a.start.column,this.source=i[0],this.ruleId=i[1],this.position=a,this.file,this.fatal,this.url,this.note}}ii.prototype.file="",ii.prototype.name="",ii.prototype.reason="",ii.prototype.message="",ii.prototype.stack="",ii.prototype.fatal=null,ii.prototype.column=null,ii.prototype.line=null,ii.prototype.source=null,ii.prototype.ruleId=null,ii.prototype.position=null;const ai=q.default;function oi(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}const si=["history","path","basename","stem","extname","dirname"];class ci{constructor(e){let t;t=e?"string"==typeof e||Bn(e)?{value:e}:oi(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd=ai.cwd(),this.value,this.stored,this.result,this.map;let r,n=-1;for(;++n<si.length;){const e=si[n];e in t&&void 0!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)si.includes(r)||(this[r]=t[r])}get path(){return this.history[this.history.length-1]}set path(e){oi(e)&&(e=o.fileURLToPath(e)),li(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?I.default.dirname(this.path):void 0}set dirname(e){fi(this.basename,"dirname"),this.path=I.default.join(e||"",this.basename)}get basename(){return"string"==typeof this.path?I.default.basename(this.path):void 0}set basename(e){li(e,"basename"),ui(e,"basename"),this.path=I.default.join(this.dirname||"",e)}get extname(){return"string"==typeof this.path?I.default.extname(this.path):void 0}set extname(e){if(ui(e,"extname"),fi(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=I.default.join(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?I.default.basename(this.path,this.extname):void 0}set stem(e){li(e,"stem"),ui(e,"stem"),this.path=I.default.join(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e)}message(e,t,r){const n=new ii(e,t,r);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}info(e,t,r){const n=this.message(e,t,r);return n.fatal=null,n}fail(e,t,r){const n=this.message(e,t,r);throw n.fatal=!0,n}}function ui(e,t){if(e&&e.includes(I.default.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+I.default.sep+"`")}function li(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const hi=function e(){const t=Xn(),r=[];let n,i={},a=-1;return o.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(vi("data",n),i[e]=t,o):pi.call(i,e)&&i[e]||null;if(e)return vi("data",n),i=e,o;return i},o.Parser=void 0,o.Compiler=void 0,o.freeze=function(){if(n)return o;for(;++a<r.length;){const[e,...n]=r[a];if(!1===n[0])continue;!0===n[0]&&(n[1]=void 0);const i=e.call(o,...n);"function"==typeof i&&t.use(i)}return n=!0,a=Number.POSITIVE_INFINITY,o},o.attachers=r,o.use=function(e,...t){let a;if(vi("use",n),null==e);else if("function"==typeof e)l(e,...t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?u(e):c(e)}a&&(i.settings=Object.assign(i.settings||{},a));return o;function s(e){if("function"==typeof e)l(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...r]=e;l(t,...r)}else c(e)}}function c(e){u(e.plugins),e.settings&&(a=Object.assign(a||{},e.settings))}function u(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){s(e[t])}}}function l(e,t){let n,i=-1;for(;++i<r.length;)if(r[i][0]===e){n=r[i];break}n?(Yn(n[1])&&Yn(t)&&(t=Jn(!0,n[1],t)),n[1]=t):r.push([...arguments])}},o.parse=function(e){o.freeze();const t=wi(e),r=o.Parser;if(mi("parse",r),di(r,"parse"))return new r(String(t),t).parse();return r(String(t),t)},o.stringify=function(e,t){o.freeze();const r=wi(t),n=o.Compiler;if(gi("stringify",n),yi(e),di(n,"compile"))return new n(e,r).compile();return n(e,r)},o.run=function(e,r,n){yi(e),o.freeze(),n||"function"!=typeof r||(n=r,r=void 0);if(!n)return new Promise(i);function i(i,a){function o(t,r,o){r=r||e,t?a(t):i?i(r):n(null,r,o)}t.run(e,wi(r),o)}i(null,n)},o.runSync=function(e,t){let r,n;return o.run(e,t,i),bi("runSync","run",n),r;function i(e,t){Nn(e),r=t,n=!0}},o.process=function(e,t){if(o.freeze(),mi("process",o.Parser),gi("process",o.Compiler),!t)return new Promise(r);function r(r,n){const i=wi(e);function a(e,i){e||!i?n(e):r?r(i):t(null,i)}o.run(o.parse(i),i,((e,t,r)=>{if(!e&&t&&r){const n=o.stringify(t,r);null==n||(!function(e){return"string"==typeof e||Bn(e)}(n)?r.result=n:r.value=n),a(e,r)}else a(e)}))}r(null,t)},o.processSync=function(e){let t;o.freeze(),mi("processSync",o.Parser),gi("processSync",o.Compiler);const r=wi(e);return o.process(r,n),bi("processSync","process",t),r;function n(e){t=!0,Nn(e)}},o;function o(){const t=e();let n=-1;for(;++n<r.length;)t.use(...r[n]);return t.data(Jn(!0,{},i)),t}}().freeze(),pi={}.hasOwnProperty;function di(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(pi.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function mi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function gi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function vi(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yi(e){if(!Yn(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function bi(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function wi(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ci(e)}var xi=ce(Object.freeze({__proto__:null,unified:hi}));function ki(e,t){var{includeImageAlt:r=!0}=t||{};return Ei(e,r)}function Ei(e,t){return e&&"object"==typeof e&&(e.value||(t?e.alt:"")||"children"in e&&Si(e.children,t)||Array.isArray(e)&&Si(e,t))||""}function Si(e,t){for(var r=[],n=-1;++n<e.length;)r[n]=Ei(e[n],t);return r.join("")}function Pi(e,t,r,n){const i=e.length;let a,o=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),[].splice.apply(e,a);else for(r&&[].splice.apply(e,[t,r]);o<n.length;)a=n.slice(o,o+1e4),a.unshift(t,0),[].splice.apply(e,a),o+=1e4,t+=1e4}function _i(e,t){return e.length>0?(Pi(e,e.length,0,t),e):t}const Ai={}.hasOwnProperty;function Ci(e){const t={};let r=-1;for(;++r<e.length;)Fi(t,e[r]);return t}function Fi(e,t){let r;for(r in t){const n=(Ai.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;for(a in i){Ai.call(n,a)||(n[a]=[]);const e=i[a];Di(n[a],Array.isArray(e)?e:e?[e]:[])}}}function Di(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);Pi(e,0,0,n)}const Oi=Ui(/[A-Za-z]/),Ri=Ui(/\d/),Ti=Ui(/[\dA-Fa-f]/),Ii=Ui(/[\dA-Za-z]/),ji=Ui(/[!-/:-@[-`{-~]/),Li=Ui(/[#-'*+\--9=?A-Z^-~]/);function qi(e){return null!==e&&(e<32||127===e)}function zi(e){return null!==e&&(e<0||32===e)}function Mi(e){return null!==e&&e<-2}function Ni(e){return-2===e||-1===e||32===e}const Bi=Ui(/\s/),$i=Ui(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\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]/);function Ui(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}var Vi=Object.freeze({__proto__:null,asciiAlpha:Oi,asciiDigit:Ri,asciiHexDigit:Ti,asciiAlphanumeric:Ii,asciiPunctuation:ji,asciiAtext:Li,asciiControl:qi,markdownLineEndingOrSpace:zi,markdownLineEnding:Mi,markdownSpace:Ni,unicodeWhitespace:Bi,unicodePunctuation:$i});function Hi(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return function(n){if(Ni(n))return e.enter(r),o(n);return t(n)};function o(n){return Ni(n)&&a++<i?(e.consume(n),o):(e.exit(r),t(n))}}var Qi=Object.freeze({__proto__:null,factorySpace:Hi});const Gi={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Hi(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),n(t)}));let r;return t;function n(t){const n=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=n),r=n,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Mi(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const Wi={tokenize:function(e){const t=this,r=[];let n,i,a,o=0;return s;function s(n){if(o<r.length){const i=r[o];return t.containerState=i[1],e.attempt(i[0].continuation,c,u)(n)}return u(n)}function c(e){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&y();const r=t.events.length;let i,a=r;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){i=t.events[a][1].end;break}v(o);let s=r;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return Pi(t.events,a+1,0,t.events.slice(r)),t.events.length=s,u(e)}return s(e)}function u(i){if(o===r.length){if(!n)return h(i);if(n.currentConstruct&&n.currentConstruct.concrete)return d(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ki,l,f)(i)}function l(e){return n&&y(),v(o),h(e)}function f(e){return t.parser.lazy[t.now().line]=o!==r.length,a=t.now().offset,d(e)}function h(r){return t.containerState={},e.attempt(Ki,p,d)(r)}function p(e){return o++,r.push([t.currentConstruct,t.containerState]),h(e)}function d(r){return null===r?(n&&y(),v(0),void e.consume(r)):(n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:n}),m(r))}function m(r){return null===r?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(r)):Mi(r)?(e.consume(r),g(e.exit("chunkFlow")),o=0,t.interrupt=void 0,s):(e.consume(r),m)}function g(e,r){const s=t.sliceStream(e);if(r&&s.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(s),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<a&&(!n.events[e][1].end||n.events[e][1].end.offset>a))return;const r=t.events.length;let i,s,c=r;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(i){s=t.events[c][1].end;break}i=!0}for(v(o),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;Pi(t.events,c+1,0,t.events.slice(r)),t.events.length=e}}function v(n){let i=r.length;for(;i-- >n;){const n=r[i];t.containerState=n[1],n[0].exit.call(t,e)}r.length=n}function y(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},Ki={tokenize:function(e,t,r){return Hi(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Ji(e){return null===e||zi(e)||Bi(e)?1:$i(e)?2:void 0}function Yi(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const Xi={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ji(n);let a;return function(t){return e.enter("attentionSequence"),a=t,o(t)};function o(s){if(s===a)return e.consume(s),o;const c=e.exit("attentionSequence"),u=Ji(s),l=!u||2===u&&i||r.includes(s),f=!i||2===i&&u||r.includes(n);return c._open=Boolean(42===a?l:l&&(i||!f)),c._close=Boolean(42===a?f:f&&(u||!l)),t(s)}},resolveAll:function(e,t){let r,n,i,a,o,s,c,u,l=-1;for(;++l<e.length;)if("enter"===e[l][0]&&"attentionSequence"===e[l][1].type&&e[l][1]._close)for(r=l;r--;)if("exit"===e[r][0]&&"attentionSequence"===e[r][1].type&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[r][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),h=Object.assign({},e[l][1].start);Zi(f,-s),Zi(h,s),a={type:s>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},o={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[l][1].start),end:h},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[l][1].start)},n={type:s>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},a.start),e[l][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=_i(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=_i(c,[["enter",n,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=_i(c,Yi(t.parser.constructs.insideSpan.null,e.slice(r+1,l),t)),c=_i(c,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",n,t]]),e[l][1].end.offset-e[l][1].start.offset?(u=2,c=_i(c,[["enter",e[l][1],t],["exit",e[l][1],t]])):u=0,Pi(e,r-1,l-r+3,c),l=r+c.length-u-2;break}l=-1;for(;++l<e.length;)"attentionSequence"===e[l][1].type&&(e[l][1].type="data");return e}};function Zi(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ea={name:"autolink",tokenize:function(e,t,r){let n=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 Oi(t)?(e.consume(t),a):Li(t)?c(t):r(t)}function a(e){return 43===e||45===e||46===e||Ii(e)?o(e):c(e)}function o(t){return 58===t?(e.consume(t),s):(43===t||45===t||46===t||Ii(t))&&n++<32?(e.consume(t),o):c(t)}function s(t){return 62===t?(e.exit("autolinkProtocol"),h(t)):null===t||32===t||60===t||qi(t)?r(t):(e.consume(t),s)}function c(t){return 64===t?(e.consume(t),n=0,u):Li(t)?(e.consume(t),c):r(t)}function u(e){return Ii(e)?l(e):r(e)}function l(t){return 46===t?(e.consume(t),n=0,u):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",h(t)):f(t)}function f(t){return(45===t||Ii(t))&&n++<63?(e.consume(t),45===t?f:l):r(t)}function h(r){return e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t}}};const ta={tokenize:function(e,t,r){return Hi(e,(function(e){return null===e||Mi(e)?t(e):r(e)}),"linePrefix")},partial:!0};const ra={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(62===t){const r=n.containerState;return r.open||(e.enter("blockQuote",{_container:!0}),r.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return r(t)};function i(r){return Ni(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}},continuation:{tokenize:function(e,t,r){return Hi(e,e.attempt(ra,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}};const na={name:"characterEscape",tokenize:function(e,t,r){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),n};function n(n){return ji(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const ia={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:"IJ",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:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",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:"ij",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:"ʼn",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:"‌"},aa={}.hasOwnProperty;function oa(e){return!!aa.call(ia,e)&&ia[e]}const sa={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,a,o=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"),i=31,a=Ii,u(t))}function c(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Ti,u):(e.enter("characterReferenceValue"),i=7,a=Ri,u(t))}function u(s){let c;return 59===s&&o?(c=e.exit("characterReferenceValue"),a!==Ii||oa(n.sliceSerialize(c))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(s)):a(s)&&o++<i?(e.consume(s),u):r(s)}}};const ca={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let n=0;return Hi(e,i,"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(t)}function a(t){return t===c?(e.consume(t),n++,a):n<u?r(t):(e.exit("codeFencedFenceSequence"),Hi(e,o,"whitespace")(t))}function o(n){return null===n||Mi(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0},a={tokenize:function(e,t,r){const n=this;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a}function a(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0},o=this.events[this.events.length-1],s=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let c,u=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c=t,l(t)};function l(t){return t===c?(e.consume(t),u++,l):(e.exit("codeFencedFenceSequence"),u<3?r(t):Hi(e,f,"whitespace")(t))}function f(t){return null===t||Mi(t)?m(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||zi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Hi(e,p,"whitespace")(t)):96===t&&t===c?r(t):(e.consume(t),h)}function p(t){return null===t||Mi(t)?m(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Mi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(t)):96===t&&t===c?r(t):(e.consume(t),d)}function m(r){return e.exit("codeFencedFence"),n.interrupt?t(r):g(r)}function g(t){return null===t?y(t):Mi(t)?e.attempt(a,e.attempt(i,y,s?Hi(e,g,"linePrefix",s+1):g),y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||Mi(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const ua={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),Hi(e,i,"linePrefix",5)(t)};function i(e){const t=n.events[n.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?a(e):r(e)}function a(t){return null===t?s(t):Mi(t)?e.attempt(la,a,s)(t):(e.enter("codeFlowValue"),o(t))}function o(t){return null===t||Mi(t)?(e.exit("codeFlowValue"),a(t)):(e.consume(t),o)}function s(r){return e.exit("codeIndented"),t(r)}}},la={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):Mi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):Hi(e,a,"linePrefix",5)(t)}function a(e){const a=n.events[n.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Mi(e)?i(e):r(e)}},partial:!0};const fa={name:"codeText",tokenize:function(e,t,r){let n,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),o(t)};function o(t){return 96===t?(e.consume(t),a++,o):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?r(t):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):Mi(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||Mi(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),c)}function u(r){return 96===r?(e.consume(r),n++,u):n===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",c(r))}},resolve:function(e){let t,r,n=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[n][1].type&&"space"!==e[n][1].type))for(t=i;++t<n;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}t=i-1,n++;for(;++t<=n;)void 0===r?t!==n&&"lineEnding"!==e[t][1].type&&(r=t):t!==n&&"lineEnding"!==e[t][1].type||(e[r][1].type="codeTextData",t!==r+2&&(e[r][1].end=e[t-1][1].end,e.splice(r+2,t-r-2),n-=t-r-2,t=r+2),r=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function ha(e){const t={};let r,n,i,a,o,s,c,u=-1;for(;++u<e.length;){for(;u in t;)u=t[u];if(r=e[u],u&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[u-1][1].type&&(s=r[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,pa(e,u)),u=t[u],c=!0);else if(r[1]._container){for(i=u,n=void 0;i--&&(a=e[i],"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type);)"enter"===a[0]&&(n&&(e[n][1].type="lineEndingBlank"),a[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),o=e.slice(n,u),o.unshift(r),Pi(e,n,u-n+1,o))}}return!c}function pa(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const a=[],o=r._tokenizer||n.parser[r.contentType](r.start),s=o.events,c=[],u={};let l,f,h=-1,p=r,d=0,m=0;const g=[m];for(;p;){for(;e[++i][1]!==p;);a.push(i),p._tokenizer||(l=n.sliceStream(p),p.next||l.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(l),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=r;++h<s.length;)"exit"===s[h][0]&&"enter"===s[h-1][0]&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){const t=s.slice(g[h],g[h+1]),r=a.pop();c.unshift([r,r+t.length-1]),Pi(e,r,2,t)}for(h=-1;++h<c.length;)u[d+c[h][0]]=d+c[h][1],d+=c[h][1]-c[h][0]-1;return u}const da={tokenize:function(e,t){let r;return function(t){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(t)};function n(t){return null===t?i(t):Mi(t)?e.check(ma,a,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function a(t){return e.consume(t),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}},resolve:function(e){return ha(e),e}},ma={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Hi(e,i,"linePrefix")};function i(i){if(null===i||Mi(i))return r(i);const a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};function ga(e,t,r,n,i,a,o,s,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f;if(null===t||41===t||qi(t))return r(t);return e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(a),e.consume(r),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(s),f(t)):null===t||60===t||Mi(t)?r(t):(e.consume(t),92===t?p:h)}function p(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function d(i){return 40===i?++l>u?r(i):(e.consume(i),d):41===i?l--?(e.consume(i),d):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(i)):null===i||zi(i)?l?r(i):(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(i)):qi(i)?r(i):(e.consume(i),92===i?m:d)}function m(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}var va=Object.freeze({__proto__:null,factoryDestination:ga});function ya(e,t,r,n,i,a){const o=this;let s,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u};function u(f){return null===f||91===f||93===f&&!s||94===f&&!c&&"_hiddenFootnoteSupport"in o.parser.constructs||c>999?r(f):93===f?(e.exit(a),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):Mi(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||Mi(t)||c++>999?(e.exit("chunkString"),u(t)):(e.consume(t),s=s||!Ni(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),c++,l):l(t)}}var ba=Object.freeze({__proto__:null,factoryLabel:ya});function wa(e,t,r,n,i,a){let o;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s};function s(r){return r===o?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(a),c(r))}function c(t){return t===o?(e.exit(a),s(o)):null===t?r(t):Mi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Hi(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===o||null===t||Mi(t)?(e.exit("chunkString"),c(t)):(e.consume(t),92===t?l:u)}function l(t){return t===o||92===t?(e.consume(t),u):u(t)}}var xa=Object.freeze({__proto__:null,factoryTitle:wa});function ka(e,t){let r;return function n(i){if(Mi(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(Ni(i))return Hi(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}var Ea=Object.freeze({__proto__:null,factoryWhitespace:ka});function Sa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Pa=Object.freeze({__proto__:null,normalizeIdentifier:Sa});const _a={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),ya.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function a(t){return i=Sa(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),ka(e,ga(e,e.attempt(Aa,Hi(e,o,"whitespace"),Hi(e,o,"whitespace")),r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):r(t)}function o(a){return null===a||Mi(a)?(e.exit("definition"),n.parser.defined.includes(i)||n.parser.defined.push(i),t(a)):r(a)}}},Aa={tokenize:function(e,t,r){return function(t){return zi(t)?ka(e,n)(t):r(t)};function n(t){return 34===t||39===t||40===t?wa(e,Hi(e,i,"whitespace"),r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):r(t)}function i(e){return null===e||Mi(e)?t(e):r(e)}},partial:!0};const Ca={name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),n};function n(n){return Mi(n)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(n)):r(n)}}};const Fa={name:"headingAtx",tokenize:function(e,t,r){const n=this;let i=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),a(t)};function a(s){return 35===s&&i++<6?(e.consume(s),a):null===s||zi(s)?(e.exit("atxHeadingSequence"),n.interrupt?t(s):o(s)):r(s)}function o(r){return 35===r?(e.enter("atxHeadingSequence"),s(r)):null===r||Mi(r)?(e.exit("atxHeading"),t(r)):Ni(r)?Hi(e,o,"whitespace")(r):(e.enter("atxHeadingText"),c(r))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function c(t){return null===t||35===t||zi(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),c)}},resolve:function(e,t){let r,n,i=e.length-2,a=3;"whitespace"===e[a][1].type&&(a+=2);i-2>a&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4);i>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},n={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},Pi(e,a,i-a+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}};const Da=["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"],Oa=["pre","script","style","textarea"],Ra={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,a,o,s,c;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u};function u(s){return 33===s?(e.consume(s),l):47===s?(e.consume(s),p):63===s?(e.consume(s),i=3,n.interrupt?t:I):Oi(s)?(e.consume(s),o=String.fromCharCode(s),a=!0,d):r(s)}function l(a){return 45===a?(e.consume(a),i=2,f):91===a?(e.consume(a),i=5,o="CDATA[",s=0,h):Oi(a)?(e.consume(a),i=4,n.interrupt?t:I):r(a)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:I):r(i)}function h(i){return i===o.charCodeAt(s++)?(e.consume(i),s===o.length?n.interrupt?t:_:h):r(i)}function p(t){return Oi(t)?(e.consume(t),o=String.fromCharCode(t),d):r(t)}function d(s){return null===s||47===s||62===s||zi(s)?47!==s&&a&&Oa.includes(o.toLowerCase())?(i=1,n.interrupt?t(s):_(s)):Da.includes(o.toLowerCase())?(i=6,47===s?(e.consume(s),m):n.interrupt?t(s):_(s)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(s):a?v(s):g(s)):45===s||Ii(s)?(e.consume(s),o+=String.fromCharCode(s),d):r(s)}function m(i){return 62===i?(e.consume(i),n.interrupt?t:_):r(i)}function g(t){return Ni(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||Oi(t)?(e.consume(t),y):Ni(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||Ii(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),w):Ni(t)?(e.consume(t),b):v(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),c=t,x):Ni(t)?(e.consume(t),w):(c=null,k(t))}function x(t){return null===t||Mi(t)?r(t):t===c?(e.consume(t),E):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||zi(t)?b(t):(e.consume(t),k)}function E(e){return 47===e||62===e||Ni(e)?v(e):r(e)}function S(t){return 62===t?(e.consume(t),P):r(t)}function P(t){return Ni(t)?(e.consume(t),P):null===t||Mi(t)?_(t):r(t)}function _(t){return 45===t&&2===i?(e.consume(t),D):60===t&&1===i?(e.consume(t),O):62===t&&4===i?(e.consume(t),j):63===t&&3===i?(e.consume(t),I):93===t&&5===i?(e.consume(t),T):!Mi(t)||6!==i&&7!==i?null===t||Mi(t)?A(t):(e.consume(t),_):e.check(Ta,j,A)(t)}function A(t){return e.exit("htmlFlowData"),C(t)}function C(t){return null===t?L(t):Mi(t)?e.attempt({tokenize:F,partial:!0},C,L)(t):(e.enter("htmlFlowData"),_(t))}function F(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}}function D(t){return 45===t?(e.consume(t),I):_(t)}function O(t){return 47===t?(e.consume(t),o="",R):_(t)}function R(t){return 62===t&&Oa.includes(o.toLowerCase())?(e.consume(t),j):Oi(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),R):_(t)}function T(t){return 93===t?(e.consume(t),I):_(t)}function I(t){return 62===t?(e.consume(t),j):45===t&&2===i?(e.consume(t),I):_(t)}function j(t){return null===t||Mi(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),j)}function L(r){return e.exit("htmlFlow"),t(r)}},resolveTo:function(e){let 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},Ta={tokenize:function(e,t,r){return function(n){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),e.attempt(ta,t,r)}},partial:!0};const Ia={name:"htmlText",tokenize:function(e,t,r){const n=this;let i,a,o,s;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),k):63===t?(e.consume(t),w):Oi(t)?(e.consume(t),P):r(t)}function u(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),a="CDATA[",o=0,m):Oi(t)?(e.consume(t),b):r(t)}function l(t){return 45===t?(e.consume(t),f):r(t)}function f(t){return null===t||62===t?r(t):45===t?(e.consume(t),h):p(t)}function h(e){return null===e||62===e?r(e):p(e)}function p(t){return null===t?r(t):45===t?(e.consume(t),d):Mi(t)?(s=p,T(t)):(e.consume(t),p)}function d(t){return 45===t?(e.consume(t),j):p(t)}function m(t){return t===a.charCodeAt(o++)?(e.consume(t),o===a.length?g:m):r(t)}function g(t){return null===t?r(t):93===t?(e.consume(t),v):Mi(t)?(s=g,T(t)):(e.consume(t),g)}function v(t){return 93===t?(e.consume(t),y):g(t)}function y(t){return 62===t?j(t):93===t?(e.consume(t),y):g(t)}function b(t){return null===t||62===t?j(t):Mi(t)?(s=b,T(t)):(e.consume(t),b)}function w(t){return null===t?r(t):63===t?(e.consume(t),x):Mi(t)?(s=w,T(t)):(e.consume(t),w)}function x(e){return 62===e?j(e):w(e)}function k(t){return Oi(t)?(e.consume(t),E):r(t)}function E(t){return 45===t||Ii(t)?(e.consume(t),E):S(t)}function S(t){return Mi(t)?(s=S,T(t)):Ni(t)?(e.consume(t),S):j(t)}function P(t){return 45===t||Ii(t)?(e.consume(t),P):47===t||62===t||zi(t)?_(t):r(t)}function _(t){return 47===t?(e.consume(t),j):58===t||95===t||Oi(t)?(e.consume(t),A):Mi(t)?(s=_,T(t)):Ni(t)?(e.consume(t),_):j(t)}function A(t){return 45===t||46===t||58===t||95===t||Ii(t)?(e.consume(t),A):C(t)}function C(t){return 61===t?(e.consume(t),F):Mi(t)?(s=C,T(t)):Ni(t)?(e.consume(t),C):_(t)}function F(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,D):Mi(t)?(s=F,T(t)):Ni(t)?(e.consume(t),F):(e.consume(t),i=void 0,R)}function D(t){return t===i?(e.consume(t),O):null===t?r(t):Mi(t)?(s=D,T(t)):(e.consume(t),D)}function O(e){return 62===e||47===e||zi(e)?_(e):r(e)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):62===t||zi(t)?_(t):(e.consume(t),R)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Hi(e,I,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function I(t){return e.enter("htmlTextData"),s(t)}function j(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}}};const ja={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if(("labelImage"===n.events[o][1].type||"labelLink"===n.events[o][1].type)&&!n.events[o][1]._balanced){i=n.events[o][1];break}return function(t){if(!i)return r(t);return i._inactive?c(t):(a=n.parser.defined.includes(Sa(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s)};function s(r){return 40===r?e.attempt(La,t,a?t:c)(r):91===r?e.attempt(qa,t,a?e.attempt(za,t,c):c)(r):a?t(r):c(r)}function c(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,a,o=e.length,s=0;for(;o--;)if(r=e[o][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[o][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=o,"labelLink"!==r.type)){s=2;break}}else"labelEnd"===r.type&&(i=o);const c={type:"labelLink"===e[n][1].type?"link":"image",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},l={type:"labelText",start:Object.assign({},e[n+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return a=[["enter",c,t],["enter",u,t]],a=_i(a,e.slice(n+1,n+s+3)),a=_i(a,[["enter",l,t]]),a=_i(a,Yi(t.parser.constructs.insideSpan.null,e.slice(n+s+4,i-3),t)),a=_i(a,[["exit",l,t],e[i-2],e[i-1],["exit",u,t]]),a=_i(a,e.slice(i+1)),a=_i(a,[["exit",c,t]]),Pi(e,n,e.length,a),e},resolveAll:function(e){let t,r=-1;for(;++r<e.length;)t=e[r][1],"labelImage"!==t.type&&"labelLink"!==t.type&&"labelEnd"!==t.type||(e.splice(r+1,"labelImage"===t.type?4:2),t.type="data",r++);return e}},La={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),ka(e,n)};function n(t){return 41===t?o(t):ga(e,i,r,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",3)(t)}function i(t){return zi(t)?ka(e,a)(t):o(t)}function a(t){return 34===t||39===t||40===t?wa(e,ka(e,o),r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):o(t)}function o(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},qa={tokenize:function(e,t,r){const n=this;return function(t){return ya.call(n,e,i,r,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(Sa(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}}},za={tokenize:function(e,t,r){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),n};function n(n){return 93===n?(e.enter("referenceMarker"),e.consume(n),e.exit("referenceMarker"),e.exit("reference"),t):r(n)}}};const Ma={name:"labelStartImage",tokenize:function(e,t,r){const n=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"),a):r(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:ja.resolveAll};const Na={name:"labelStartLink",tokenize:function(e,t,r){const n=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 n.parser.constructs?r(e):t(e)}},resolveAll:ja.resolveAll};const Ba={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Hi(e,t,"linePrefix")}}};const $a={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),n=t,a(t)};function a(s){return s===n?(e.enter("thematicBreakSequence"),o(s)):Ni(s)?Hi(e,a,"whitespace")(s):i<3||null!==s&&!Mi(s)?r(s):(e.exit("thematicBreak"),t(s))}function o(t){return t===n?(e.consume(t),i++,o):(e.exit("thematicBreakSequence"),a(t))}}};const Ua={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){const i=n.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!n.containerState.marker||t===n.containerState.marker:Ri(t)){if(n.containerState.type||(n.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check($a,r,c)(t):c(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return r(t)};function s(t){return Ri(t)&&++o<10?(e.consume(t),s):(!n.interrupt||o<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),c(t)):r(t)}function c(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(ta,n.interrupt?r:u,e.attempt(Va,f,l))}function u(e){return n.containerState.initialBlankLine=!0,a++,f(e)}function l(t){return Ni(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(r)}},continuation:{tokenize:function(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(ta,i,a);function i(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Hi(e,t,"listItemIndent",n.containerState.size+1)(r)}function a(r){return n.containerState.furtherBlankLines||!Ni(r)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(r)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Ha,t,o)(r))}function o(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,Hi(e,e.attempt(Ua,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},Va={tokenize:function(e,t,r){const n=this;return Hi(e,(function(e){const i=n.events[n.events.length-1];return!Ni(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Ha={tokenize:function(e,t,r){const n=this;return Hi(e,(function(e){const i=n.events[n.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?t(e):r(e)}),"listItemIndent",n.containerState.size+1)},partial:!0};const Qa={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if("lineEnding"!==n.events[o][1].type&&"linePrefix"!==n.events[o][1].type&&"content"!==n.events[o][1].type){a="paragraph"===n.events[o][1].type;break}return function(t){if(!n.parser.lazy[n.now().line]&&(n.interrupt||a))return e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),i=t,s(t);return r(t)};function s(t){return t===i?(e.consume(t),s):(e.exit("setextHeadingLineSequence"),Hi(e,c,"lineSuffix")(t))}function c(n){return null===n||Mi(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){r=a;break}"paragraph"===e[a][1].type&&(n=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);const o={type:"setextHeading",start:Object.assign({},e[n][1].start),end:Object.assign({},e[e.length-1][1].end)};e[n][1].type="setextHeadingText",i?(e.splice(n,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=o;return e.push(["exit",o,t]),e}};var Ga=Object.freeze({__proto__:null,attention:Xi,autolink:ea,blankLine:ta,blockQuote:ra,characterEscape:na,characterReference:sa,codeFenced:ca,codeIndented:ua,codeText:fa,content:da,definition:_a,hardBreakEscape:Ca,headingAtx:Fa,htmlFlow:Ra,htmlText:Ia,labelEnd:ja,labelStartImage:Ma,labelStartLink:Na,lineEnding:Ba,list:Ua,setextUnderline:Qa,thematicBreak:$a});const Wa={tokenize:function(e){const t=this,r=e.attempt(ta,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEndingBlank"),e.consume(n),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}),e.attempt(this.parser.constructs.flowInitial,n,Hi(e,e.attempt(this.parser.constructs.flow,n,e.attempt(da,n)),"linePrefix")));return r;function n(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),t.currentConstruct=void 0,r;e.consume(n)}}};const Ka={resolveAll:Za()},Ja=Xa("string"),Ya=Xa("text");function Xa(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(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){if(null===e)return!0;const t=n[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(r,r.previous))return!0}return!1}},resolveAll:Za("text"===e?eo:void 0)}}function Za(e){return function(t,r){let n,i=-1;for(;++i<=t.length;)void 0===n?t[i]&&"data"===t[i][1].type&&(n=i,i++):t[i]&&"data"===t[i][1].type||(i!==n+2&&(t[n][1].end=t[i-1][1].end,t.splice(n+2,i-n-2),i=n+2),n=void 0);return e?e(t,r):t}}function eo(e,t){let r=-1;for(;++r<=e.length;)if((r===e.length||"lineEnding"===e[r][1].type)&&"data"===e[r-1][1].type){const n=e[r-1][1],i=t.sliceStream(n);let a,o=i.length,s=-1,c=0;for(;o--;){const e=i[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)c++,s--;if(s)break;s=-1}else if(-2===e)a=!0,c++;else if(-1!==e){o++;break}}if(c){const i={type:r===e.length||a||c<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-c,offset:n.end.offset-c,_index:n.start._index+o,_bufferIndex:o?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},i.start),n.start.offset===n.end.offset?Object.assign(n,i):(e.splice(r,0,["enter",i,t],["exit",i,t]),r+=2)}r++}return e}function to(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const c={consume:function(e){Mi(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,y()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++));u.previous=e},enter:function(e,t){const r=t||{};return r.type=e,r.start=h(),u.events.push(["enter",r,u]),s.push(r),r},exit:function(e){const t=s.pop();return t.end=h(),u.events.push(["exit",t,u]),t},attempt:g((function(e,t){v(e,t.from)})),check:g(m),interrupt:g(m,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if("string"==typeof a)o=a;else switch(a){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&i)continue;o=" ";break;default:o=String.fromCharCode(a)}i=-2===a,n.push(o)}return n.join("")}(f(e),t)},now:h,defineSkip:function(e){i[e.line]=e.column,y()},write:function(e){if(o=_i(o,e),p(),null!==o[o.length-1])return[];return v(t,0),u.events=Yi(a,u.events,u),u.events}};let l=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function f(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;r===i?o=[e[r].slice(n,a)]:(o=e.slice(r,i),n>-1&&(o[0]=o[0].slice(n)),a>0&&o.push(e[i].slice(0,a)));return o}(o,e)}function h(){return Object.assign({},n)}function p(){let e;for(;n._index<o.length;){const t=o[n._index];if("string"==typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)d(t.charCodeAt(n._bufferIndex));else d(t)}}function d(e){l=l(e)}function m(e,t){t.restore()}function g(e,t){return function(r,i,a){let o,l,f,p;return Array.isArray(r)?d(r):"tokenize"in r?d([r]):function(e){return t;function t(t){const r=null!==t&&e[t],n=null!==t&&e.null;return d([...Array.isArray(r)?r:r?[r]:[],...Array.isArray(n)?n:n?[n]:[]])(t)}}(r);function d(e){return o=e,l=0,0===e.length?a:m(e[l])}function m(e){return function(r){p=function(){const e=h(),t=u.previous,r=u.currentConstruct,i=u.events.length,a=Array.from(s);return{restore:o,from:i};function o(){n=e,u.previous=t,u.currentConstruct=r,u.events.length=i,s=a,y()}}(),f=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,g,v)(r)}}function g(t){return e(f,p),i}function v(e){return p.restore(),++l<o.length?m(o[l]):a}}}function v(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Pi(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(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const ro={42:Ua,43:Ua,45:Ua,48:Ua,49:Ua,50:Ua,51:Ua,52:Ua,53:Ua,54:Ua,55:Ua,56:Ua,57:Ua,62:ra},no={91:_a},io={[-2]:ua,[-1]:ua,32:ua},ao={35:Fa,42:$a,45:[Qa,$a],60:Ra,61:Qa,95:$a,96:ca,126:ca},oo={38:sa,92:na},so={[-5]:Ba,[-4]:Ba,[-3]:Ba,33:Ma,38:sa,42:Xi,60:[ea,Ia],91:Na,92:[Ca,na],93:ja,95:Xi,96:fa},co={null:[Xi,Ka]};var uo=Object.freeze({__proto__:null,document:ro,contentInitial:no,flowInitial:io,flow:ao,string:oo,text:so,insideSpan:co,attentionMarkers:{null:[42,95]},disable:{null:[]}});const lo=/[\0\t\n\r]/g;function fo(e,t){const r=Number.parseInt(e,t);return r<9||11===r||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||65535==(65535&r)||65534==(65535&r)||r>1114111?"�":String.fromCharCode(r)}const ho=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function po(e){return e.replace(ho,mo)}function mo(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return fo(r.slice(t?2:1),t?16:10)}return oa(r)||e}const go={}.hasOwnProperty,vo=function(e,t,r){return"string"!=typeof t&&(r=t,t=void 0),function(e={}){const t=yo({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(ne),autolinkProtocol:C,autolinkEmail:C,atxHeading:c(Z),blockQuote:c(W),characterEscape:C,characterReference:C,codeFenced:c(K),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:c(K,u),codeText:c(J,u),codeTextData:C,data:C,codeFlowValue:C,definition:c(Y),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:c(X),hardBreakEscape:c(ee),hardBreakTrailing:c(ee),htmlFlow:c(te,u),htmlFlowData:C,htmlText:c(te,u),htmlTextData:C,image:c(re),label:u,link:c(ne),listItem:c(ae),listItemValue:m,listOrdered:c(ie,d),listUnordered:c(ie),paragraph:c(oe),reference:$,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:c(Z),strong:c(se),thematicBreak:c(ue)},exit:{atxHeading:f(),atxHeadingSequence:S,autolink:f(),autolinkEmail:G,autolinkProtocol:Q,blockQuote:f(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:H,codeFenced:f(b),codeFencedFence:y,codeFencedFenceInfo:g,codeFencedFenceMeta:v,codeFlowValue:F,codeIndented:f(w),codeText:f(I),codeTextData:F,data:F,definition:f(),definitionDestinationString:E,definitionLabelString:x,definitionTitleString:k,emphasis:f(),hardBreakEscape:f(O),hardBreakTrailing:f(O),htmlFlow:f(R),htmlFlowData:F,htmlText:f(T),htmlTextData:F,image:f(L),label:z,labelText:q,lineEnding:D,link:f(j),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:U,resourceDestinationString:M,resourceTitleString:N,resource:B,setextHeading:f(A),setextHeadingLineSequence:_,setextHeadingText:P,strong:f(),thematicBreak:f()}},e.mdastExtensions||[]),r={};return n;function n(e){let r={type:"root",children:[]};const n=[],c=[],f={stack:[r],tokenStack:n,config:t,enter:l,exit:h,buffer:u,resume:p,setData:a,getData:o};let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])c.push(d);else{d=i(e,c.pop(),d)}for(d=-1;++d<e.length;){const r=t[e[d][0]];go.call(r,e[d][1].type)&&r[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},f),e[d][1])}if(n.length>0){const e=n[n.length-1];(e[1]||wo).call(f,void 0,e[0])}for(r.position={start:s(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:s(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,r){let n,i,a,o,s=t-1,c=-1,u=!1;for(;++s<=r;){const t=e[s];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?c++:c--,o=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(!n||o||c||a||(a=s),o=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(o=void 0),!c&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===c&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let o=s;for(i=void 0;o--;){const t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=o}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}a&&(!i||a<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",n,t[2]]),s++,r++}"listItemPrefix"===t[1].type&&(n={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(s,0,["enter",n,t[2]]),s++,r++,a=void 0,o=!0)}}return e[t][1]._spread=u,r}function a(e,t){r[e]=t}function o(e){return r[e]}function s(e){return{line:e.line,column:e.column,offset:e.offset}}function c(e,t){return r;function r(r){l.call(this,e(r),r),t&&t.call(this,r)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(e,t,r){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:s(t.start)},e}function f(e){return t;function t(t){e&&e.call(this,t),h.call(this,t)}}function h(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+ei({start:e.start,end:e.end})+"): it’s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||wo).call(this,e,n[0])}return r.position.end=s(e.end),r}function p(){return ki(this.stack.pop())}function d(){a("expectingFirstListItemValue",!0)}function m(e){if(o("expectingFirstListItemValue")){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),a("expectingFirstListItemValue")}}function g(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function v(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function y(){o("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}function w(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function x(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Sa(this.sliceSerialize(e)).toLowerCase()}function k(){const e=this.resume();this.stack[this.stack.length-1].title=e}function E(){const e=this.resume();this.stack[this.stack.length-1].url=e}function S(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function P(){a("setextHeadingSlurpLineEnding",!0)}function _(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2}function A(){a("setextHeadingSlurpLineEnding")}function C(e){const t=this.stack[this.stack.length-1];let r=t.children[t.children.length-1];r&&"text"===r.type||(r=ce(),r.position={start:s(e.start)},t.children.push(r)),this.stack.push(r)}function F(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=s(e.end)}function D(e){const r=this.stack[this.stack.length-1];if(o("atHardBreak")){return r.children[r.children.length-1].position.end=s(e.end),void a("atHardBreak")}!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(r.type)&&(C.call(this,e),F.call(this,e))}function O(){a("atHardBreak",!0)}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),a("referenceType")}function L(){const e=this.stack[this.stack.length-1];o("inReference")?(e.type+="Reference",e.referenceType=o("referenceType")||"shortcut",delete e.url,delete e.title):(delete e.identifier,delete e.label),a("referenceType")}function q(e){const t=this.stack[this.stack.length-2],r=this.sliceSerialize(e);t.label=po(r),t.identifier=Sa(r).toLowerCase()}function z(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];a("inReference",!0),"link"===r.type?r.children=e.children:r.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function N(){const e=this.resume();this.stack[this.stack.length-1].title=e}function B(){a("inReference")}function $(){a("referenceType","collapsed")}function U(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Sa(this.sliceSerialize(e)).toLowerCase(),a("referenceType","full")}function V(e){a("characterReferenceType",e.type)}function H(e){const t=this.sliceSerialize(e),r=o("characterReferenceType");let n;r?(n=fo(t,"characterReferenceMarkerNumeric"===r?10:16),a("characterReferenceType")):n=oa(t);const i=this.stack.pop();i.value+=n,i.position.end=s(e.end)}function Q(e){F.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){F.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function J(){return{type:"inlineCode",value:""}}function Y(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:void 0,children:[]}}function ee(){return{type:"break"}}function te(){return{type:"html",value:""}}function re(){return{type:"image",title:null,url:"",alt:null}}function ne(){return{type:"link",title:null,url:"",children:[]}}function ie(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function ae(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function se(){return{type:"strong",children:[]}}function ce(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}(r)(function(e){for(;!ha(e););return e}(function(e={}){const t={defined:[],lazy:{},constructs:Ci([uo].concat(e.extensions||[])),content:r(Gi),document:r(Wi),flow:r(Wa),string:r(Ja),text:r(Ya)};return t;function r(e){return function(r){return to(t,e,r)}}}(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,a,o){const s=[];let c,u,l,f,h;for(i=r+i.toString(a),l=0,r="",n&&(65279===i.charCodeAt(0)&&l++,n=void 0);l<i.length;){if(lo.lastIndex=l,c=lo.exec(i),f=c&&void 0!==c.index?c.index:i.length,h=i.charCodeAt(f),!c){r=i.slice(l);break}if(10===h&&l===f&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),l<f&&(s.push(i.slice(l,f)),t+=f-l),h){case 0:s.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),s.push(-2);t++<u;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}l=f+1}return o&&(e&&s.push(-5),r&&s.push(r),s.push(null)),s}}()(e,t,!0))))};function yo(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?yo(e,n):bo(e,n)}return e}function bo(e,t){let r;for(r in t)if(go.call(t,r)){const n="canContainEols"===r||"transforms"===r,i=(go.call(e,r)?e[r]:void 0)||(e[r]=n?[]:{}),a=t[r];a&&(n?e[r]=[...i,...a]:Object.assign(i,a))}}function wo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ei({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ei({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ei({start:t.start,end:t.end})+") is still open")}var xo=ce(Object.freeze({__proto__:null,default:function(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return vo(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}}));const ko={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return 87===t||119===t?(e.consume(t),i):r(t)}function i(t){return 87===t||119===t?(e.consume(t),a):r(t)}function a(t){return 46===t?(e.consume(t),o):r(t)}function o(e){return null===e||Mi(e)?r(e):t(e)}},partial:!0},Eo={tokenize:function(e,t,r){let n,i;return a;function a(t){return 38===t?e.check(_o,s,o)(t):46===t||95===t?e.check(Po,s,o)(t):null===t||qi(t)||Bi(t)||45!==t&&$i(t)?s(t):(e.consume(t),a)}function o(t){return 46===t?(i=n,n=void 0,e.consume(t),a):(95===t&&(n=!0),e.consume(t),a)}function s(e){return i||n?r(e):t(e)}},partial:!0},So={tokenize:function(e,t){let r=0;return n;function n(o){return 38===o?e.check(_o,t,i)(o):(40===o&&r++,41===o?e.check(Po,a,i)(o):Io(o)?t(o):To(o)?e.check(Po,t,i)(o):(e.consume(o),n))}function i(t){return e.consume(t),n}function a(e){return r--,r<0?t(e):i(e)}},partial:!0},Po={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(i){return To(i)?(e.consume(i),n):Io(i)?t(i):r(i)}},partial:!0},_o={tokenize:function(e,t,r){return function(t){return e.consume(t),n};function n(t){return Oi(t)?(e.consume(t),n):59===t?(e.consume(t),i):r(t)}function i(e){return Io(e)?t(e):r(e)}},partial:!0},Ao={tokenize:function(e,t,r){const n=this;return function(t){if(87!==t&&119!==t||!Lo(n.previous)||Mo(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(ko,e.attempt(Eo,e.attempt(So,i),r),r)(t)};function i(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}},previous:Lo},Co={tokenize:function(e,t,r){const n=this;return function(t){if(72!==t&&104!==t||!qo(n.previous)||Mo(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),e.consume(t),i};function i(t){return 84===t||116===t?(e.consume(t),a):r(t)}function a(t){return 84===t||116===t?(e.consume(t),o):r(t)}function o(t){return 80===t||112===t?(e.consume(t),s):r(t)}function s(t){return 83===t||115===t?(e.consume(t),c):c(t)}function c(t){return 58===t?(e.consume(t),u):r(t)}function u(t){return 47===t?(e.consume(t),l):r(t)}function l(t){return 47===t?(e.consume(t),f):r(t)}function f(t){return null===t||qi(t)||Bi(t)||$i(t)?r(t):e.attempt(Eo,e.attempt(So,h),r)(t)}function h(r){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(r)}},previous:qo},Fo={tokenize:function(e,t,r){const n=this;let i,a;return function(t){if(!jo(t)||!zo(n.previous)||Mo(n.events))return r(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(t)};function o(t){return jo(t)?(e.consume(t),o):64===t?(e.consume(t),s):r(t)}function s(t){return 46===t?e.check(Po,f,c)(t):45===t||95===t?e.check(Po,r,u)(t):Ii(t)?(!a&&Ri(t)&&(a=!0),e.consume(t),s):f(t)}function c(t){return e.consume(t),i=!0,a=void 0,s}function u(t){return e.consume(t),l}function l(t){return 46===t?e.check(Po,r,c)(t):s(t)}function f(n){return i&&!a?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(n)):r(n)}},previous:zo},Do={},Oo={text:Do};let Ro=48;for(;Ro<123;)Do[Ro]=Fo,Ro++,58===Ro?Ro=65:91===Ro&&(Ro=97);function To(e){return 33===e||34===e||39===e||41===e||42===e||44===e||46===e||58===e||59===e||60===e||63===e||95===e||126===e}function Io(e){return null===e||60===e||zi(e)}function jo(e){return 43===e||45===e||46===e||95===e||Ii(e)}function Lo(e){return null===e||40===e||42===e||95===e||126===e||zi(e)}function qo(e){return null===e||!Oi(e)}function zo(e){return 47!==e&&qo(e)}function Mo(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if(("labelLink"===n.type||"labelImage"===n.type)&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}Do[43]=Fo,Do[45]=Fo,Do[46]=Fo,Do[95]=Fo,Do[72]=[Fo,Co],Do[104]=[Fo,Co],Do[87]=[Fo,Ao],Do[119]=[Fo,Ao];const No={tokenize:function(e,t,r){const n=this;return Hi(e,(function(e){const i=n.events[n.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):r(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function Bo(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const e=n.events[i][1];if("labelImage"===e.type){o=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!o||!o._balanced)return r(i);const s=Sa(n.sliceSerialize({start:o.end,end:n.now()}));if(94!==s.charCodeAt(0)||!a.includes(s.slice(1)))return r(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function $o(e,t){let r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function Uo(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?r(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(s){let l;return null===s||91===s||o++>999?r(s):93===s?a?(e.exit("chunkString"),l=e.exit("gfmFootnoteCallString"),i.includes(Sa(n.sliceSerialize(l)))?function(r){return e.enter("gfmFootnoteCallLabelMarker"),e.consume(r),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t}(s):r(s)):r(s):(e.consume(s),zi(s)||(a=!0),92===s?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,c):c(t)}}function Vo(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),u):r(t)}function u(t){let i;return null===t||91===t||s>999?r(t):93===t?o?(i=e.exit("gfmFootnoteDefinitionLabelString"),a=Sa(n.sliceSerialize(i)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h):r(t):Mi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s++,u):(e.enter("chunkString").contentType="string",l(t))}function l(t){return null===t||Mi(t)||91===t||93===t||s>999?(e.exit("chunkString"),u(t)):(zi(t)||(o=!0),s++,e.consume(t),92===t?f:l)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,l):l(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),Hi(e,p,"gfmFootnoteDefinitionWhitespace")):r(t)}function p(e){return i.includes(a)||i.push(a),t(e)}}function Ho(e,t,r){return e.check(ta,t,e.attempt(No,t,r))}function Qo(e){e.exit("gfmFootnoteDefinition")}function Go(e={}){let t=e.singleTilde;const r={tokenize:function(e,r,n){const i=this.previous,a=this.events;let o=0;return function(t){if(126===i&&"characterEscape"!==a[a.length-1][1].type)return n(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(a){const c=Ji(i);if(126===a)return o>1?n(a):(e.consume(a),o++,s);if(o<2&&!t)return n(a);const u=e.exit("strikethroughSequenceTemporary"),l=Ji(a);return u._open=!l||2===l&&Boolean(c),u._close=!c||2===c&&Boolean(l),r(a)}},resolveAll:function(e,t){let r=-1;for(;++r<e.length;)if("enter"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._close){let n=r;for(;n--;)if("exit"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._open&&e[r][1].end.offset-e[r][1].start.offset==e[n][1].end.offset-e[n][1].start.offset){e[r][1].type="strikethroughSequence",e[n][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[n][1].start),end:Object.assign({},e[r][1].end)},a={type:"strikethroughText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o=[["enter",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["enter",a,t]];Pi(o,o.length,0,Yi(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),Pi(o,o.length,0,[["exit",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["exit",i,t]]),Pi(e,n-1,r-n+3,o),r=n+o.length-2;break}}r=-1;for(;++r<e.length;)"strikethroughSequenceTemporary"===e[r][1].type&&(e[r][1].type="data");return e}};return null==t&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}}}const Wo={flow:{null:{tokenize:function(e,t,r){const n=this,i=[];let a,o,s=0;return function(t){if(e.enter("table")._align=i,e.enter("tableHead"),e.enter("tableRow"),124===t)return c(t);return s++,e.enter("temporaryTableCellContent"),f(t)};function c(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,u}function u(t){return null===t||Mi(t)?function(t){if(null===t)return r(t);e.exit("tableRow"),e.exit("tableHead");const i=n.interrupt;return n.interrupt=!0,e.attempt({tokenize:C,partial:!0},(function(t){return n.interrupt=i,e.enter("tableDelimiterRow"),p(t)}),(function(e){return n.interrupt=i,r(e)}))(t)}(t):Ni(t)?(e.enter("whitespace"),e.consume(t),l):(a&&(a=void 0,s++),124===t?c(t):(e.enter("temporaryTableCellContent"),f(t)))}function l(t){return Ni(t)?(e.consume(t),l):(e.exit("whitespace"),u(t))}function f(t){return null===t||124===t||zi(t)?(e.exit("temporaryTableCellContent"),u(t)):(e.consume(t),92===t?h:f)}function h(t){return 92===t||124===t?(e.consume(t),f):f(t)}function p(t){return null===t||Mi(t)?y(t):Ni(t)?(e.enter("whitespace"),e.consume(t),d):45===t?(e.enter("tableDelimiterFiller"),e.consume(t),o=!0,i.push(null),m):58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i.push("left"),g):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):r(t)}function d(t){return Ni(t)?(e.consume(t),d):(e.exit("whitespace"),p(t))}function m(t){return 45===t?(e.consume(t),m):(e.exit("tableDelimiterFiller"),58===t?(e.enter("tableDelimiterAlignment"),e.consume(t),e.exit("tableDelimiterAlignment"),i[i.length-1]="left"===i[i.length-1]?"center":"right",v):p(t))}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),e.consume(t),o=!0,m):r(t)}function v(t){return null===t||Mi(t)?y(t):Ni(t)?(e.enter("whitespace"),e.consume(t),d):124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):r(t)}function y(t){return e.exit("tableDelimiterRow"),o&&s===i.length?null===t?b(t):e.check(Ko,b,e.attempt({tokenize:C,partial:!0},Hi(e,w,"linePrefix",4),b))(t):r(t)}function b(r){return e.exit("table"),t(r)}function w(t){return e.enter("tableBody"),x(t)}function x(t){return e.enter("tableRow"),124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function k(t){return e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),E}function E(t){return null===t||Mi(t)?function(t){if(e.exit("tableRow"),null===t)return A(t);return e.check(Ko,A,e.attempt({tokenize:C,partial:!0},Hi(e,x,"linePrefix",4),A))(t)}(t):Ni(t)?(e.enter("whitespace"),e.consume(t),S):124===t?k(t):(e.enter("temporaryTableCellContent"),P(t))}function S(t){return Ni(t)?(e.consume(t),S):(e.exit("whitespace"),E(t))}function P(t){return null===t||124===t||zi(t)?(e.exit("temporaryTableCellContent"),E(t)):(e.consume(t),92===t?_:P)}function _(t){return 92===t||124===t?(e.consume(t),P):P(t)}function A(t){return e.exit("tableBody"),b(t)}function C(e,t,r){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Hi(e,i,"linePrefix")};function i(i){if(n.parser.lazy[n.now().line]||null===i||Mi(i))return r(i);const a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?r(i):(n._gfmTableDynamicInterruptHack=!0,e.check(n.parser.constructs.flow,(function(e){return n._gfmTableDynamicInterruptHack=!1,r(e)}),(function(e){return n._gfmTableDynamicInterruptHack=!1,t(e)}))(i))}}},resolve:function(e,t){let r,n,i,a,o,s,c,u=-1;for(;++u<e.length;){const l=e[u][1];if(i&&("temporaryTableCellContent"===l.type&&(a=a||u,o=u),("tableCellDivider"===l.type||"tableRow"===l.type)&&o)){const r={type:"tableContent",start:e[a][1].start,end:e[o][1].end},n={type:"chunkText",start:r.start,end:r.end,contentType:"text"};e.splice(a,o-a+1,["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]),u-=o-a-3,a=void 0,o=void 0}if("exit"===e[u][0]&&void 0!==s&&s+(c?0:1)<u&&("tableCellDivider"===l.type||"tableRow"===l.type&&(s+3<u||"whitespace"!==e[s][1].type))){const i={type:n?"tableDelimiter":r?"tableHeader":"tableData",start:e[s][1].start,end:e[u][1].end};e.splice(u+("tableCellDivider"===l.type?1:0),0,["exit",i,t]),e.splice(s,0,["enter",i,t]),u+=2,s=u+1,c=!0}"tableRow"===l.type&&(i="enter"===e[u][0],i&&(s=u+1,c=!1)),"tableDelimiterRow"===l.type&&(n="enter"===e[u][0],n&&(s=u+1,c=!1)),"tableHead"===l.type&&(r="enter"===e[u][0])}return e}}}},Ko={tokenize:function(e,t,r){let n=0;return function(t){return e.enter("check"),e.consume(t),i};function i(a){return-1===a||32===a?(e.consume(a),n++,4===n?t:i):null===a||zi(a)?t(a):r(a)}},partial:!0};const Jo={tokenize:function(e,t,r){const n=this;return function(t){if(null!==n.previous||!n._gfmTasklistFirstContentOfListItem)return r(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return Ni(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):r(t)}function a(n){return 93===n?(e.enter("taskListCheckMarker"),e.consume(n),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),e.check({tokenize:Xo},t,r)):r(n)}}},Yo={text:{91:Jo}};function Xo(e,t,r){const n=this;return Hi(e,(function(e){const i=n.events[n.events.length-1];return i&&"whitespace"===i[1].type&&null!==e&&!zi(e)?t(e):r(e)}),"whitespace")}function Zo(e,t){const r=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;-1!==i;)n++,i=r.indexOf(t,i+t.length);return n}const es=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);var i=Kr(t),a=n?-1:1;!function e(o,s,c){var u,l="object"==typeof o&&null!==o?o:{};"string"==typeof l.type&&(u="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(f=l.type+(u?"<"+u+">":""),""+f+")")}));var f;return h;function h(){var u,l,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)),false===h[0]))return h;if(o.children&&"skip"!==h[0])for(l=(n?o.children.length:-1)+a,f=c.concat(o);l>-1&&l<o.children.length;){if(u=e(o.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+a}return h}}(e,null,[])()};const ts={}.hasOwnProperty,rs=function(e,t,r,n){let i,a;"string"==typeof t||t instanceof RegExp?(a=[[t,r]],i=n):(a=t,i=r),i||(i={});const o=Kr(i.ignore||[]),s=function(e){const t=[];if("object"!=typeof e)throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let r=-1;for(;++r<e.length;)t.push([ns(e[r][0]),is(e[r][1])])}else{let r;for(r in e)ts.call(e,r)&&t.push([ns(r),is(e[r])])}return t}(a);let c=-1;for(;++c<s.length;)es(e,"text",u);return e;function u(e,t){let r,n=-1;for(;++n<t.length;){const e=t[n];if(o(e,r?r.children.indexOf(e):void 0,r))return;r=e}if(r)return function(e,t){const r=s[c][0],n=s[c][1];let i,a=0,o=t.children.indexOf(e),u=[];r.lastIndex=0;let l=r.exec(e.value);for(;l;){i=l.index;let t=n(...l,{index:l.index,input:l.input});if("string"==typeof t&&(t=t.length>0?{type:"text",value:t}:void 0),!1!==t&&(a!==i&&u.push({type:"text",value:e.value.slice(a,i)}),Array.isArray(t)?u.push(...t):t&&u.push(t),a=i+l[0].length),!r.global)break;l=r.exec(e.value)}void 0===i?(u=[e],o--):(a<e.value.length&&u.push({type:"text",value:e.value.slice(a)}),t.children.splice(o,1,...u));return o+u.length+1}(e,r)}};function ns(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function is(e){return"function"==typeof e?e:()=>e}const as=["autolink","link","image","label"],os={transforms:[function(e){rs(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,us],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,ls]],{ignore:["link","linkReference"]})}],enter:{literalAutolink:function(e){this.enter({type:"link",title:null,url:"",children:[]},e)},literalAutolinkEmail:cs,literalAutolinkHttp:cs,literalAutolinkWww:cs},exit:{literalAutolink:function(e){this.exit(e)},literalAutolinkEmail:function(e){this.config.exit.autolinkEmail.call(this,e)},literalAutolinkHttp:function(e){this.config.exit.autolinkProtocol.call(this,e)},literalAutolinkWww:function(e){this.config.exit.data.call(this,e);this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}}},ss={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:"phrasing",notInConstruct:as},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:"phrasing",notInConstruct:as},{character:":",before:"[ps]",after:"\\/",inConstruct:"phrasing",notInConstruct:as}]};function cs(e){this.config.enter.autolinkProtocol.call(this,e)}function us(e,t,r,n,i){let a="";if(!fs(i))return!1;if(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(r))return!1;const o=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);let r,n,i,a;if(t)for(e=e.slice(0,t.index),a=t[0],r=a.indexOf(")"),n=Zo(e,"("),i=Zo(e,")");-1!==r&&n>i;)e+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),i++;return[e,a]}(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function ls(e,t,r,n){return!(!fs(n,!0)||/[_-\d]$/.test(r))&&{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function fs(e,t){const r=e.input.charCodeAt(e.index-1);return(0===e.index||Bi(r)||$i(r))&&(!t||47!==r)}function hs(e){return e.label||!e.identifier?e.label||"":po(e.identifier)}function ps(e,t){const r=t.indexStack,n=e.children||[],i=[];let a=-1;for(r.push(-1);++a<n.length;){const s=n[a];r[r.length-1]=a,i.push(t.handle(s,e,t,{before:"\n",after:"\n"})),"list"!==s.type&&(t.bulletLastUsed=void 0),a<n.length-1&&i.push(o(s,n[a+1]))}return r.pop(),i.join("");function o(r,n){let i=t.join.length;for(;i--;){const a=t.join[i](r,n,e,t);if(!0===a||1===a)break;if("number"==typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}}const ds=/\r?\n|\r/g;function ms(e,t){const r=[];let n,i=0,a=0;for(;n=ds.exec(e);)o(e.slice(i,n.index)),r.push(n[0]),i=n.index+n[0].length,a++;return o(e.slice(i)),r.join("");function o(e){r.push(t(e,a,!e))}}function gs(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function vs(e,t){return ys(e,t.inConstruct,!0)&&!ys(e,t.notInConstruct,!1)}function ys(e,t,r){if(!t)return r;"string"==typeof t&&(t=[t]);let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function bs(e,t,r){const n=(r.before||"")+(t||"")+(r.after||""),i=[],a=[],o={};let s=-1;for(;++s<e.unsafe.length;){const t=e.unsafe[s];if(!vs(e.stack,t))continue;const r=gs(t);let a;for(;a=r.exec(n);){const e="before"in t||Boolean(t.atBreak),r="after"in t,n=a.index+(e?a[1].length:0);i.includes(n)?(o[n].before&&!e&&(o[n].before=!1),o[n].after&&!r&&(o[n].after=!1)):(i.push(n),o[n]={before:e,after:r})}}i.sort(ws);let c=r.before?r.before.length:0;const u=n.length-(r.after?r.after.length:0);for(s=-1;++s<i.length;){const e=i[s];e<c||e>=u||(e+1<u&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(xs(n.slice(c,e),"\\")),c=e,!/[!-/:-@[-`{-~]/.test(n.charAt(e))||r.encode&&r.encode.includes(n.charAt(e))?(a.push("&#x"+n.charCodeAt(e).toString(16).toUpperCase()+";"),c++):a.push("\\")))}return a.push(xs(n.slice(c,u),r.after)),a.join("")}function ws(e,t){return e-t}function xs(e,t){const r=/\\(?=[!-/:-@[-`{-~])/g,n=[],i=[],a=e+t;let o,s=-1,c=0;for(;o=r.exec(a);)n.push(o.index);for(;++s<n.length;)c!==n[s]&&i.push(e.slice(c,n[s])),i.push("\\"),c=n[s];return i.push(e.slice(c)),i.join("")}const ks=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=Kr(t),a=n?-1:1;!function e(o,s,c){const u="object"==typeof o&&null!==o?o:{};let l;"string"==typeof u.type&&(l="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(f=u.type+(l?"<"+l+">":""),""+f+")")}));var f;return h;function h(){let u,l,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)),false===h[0]))return h;if(o.children&&"skip"!==h[0])for(l=(n?o.children.length:-1)+a,f=c.concat(o);l>-1&&l<o.children.length;){if(u=e(o.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+a}return h}}(e,null,[])()};const Es=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null),ks(e,t,(function(e,t){const n=t[t.length-1];return r(e,n?n.children.indexOf(e):null,n)}),n)};var Ss=Object.freeze({__proto__:null,CONTINUE:true,SKIP:"skip",EXIT:false,visit:Es});let Ps=!1,_s=!1;function As(){return e.peek=function(){return"["},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:function(e,t,r){const n=r.enter("footnoteDefinition"),i=r.enter("label"),a=bs(r,hs(e),{before:"^",after:"]"}),o="[^"+a+"]:";i();const s=ms(ps(e,r),(function(e,t,r){if(t)return(r?"":" ")+e;return(r?o:o+" ")+e}));n(),!Ps&&a.includes(":")&&(console.warn("[mdast-util-gfm-footnote] Warning: Found a colon in footnote identifier `"+a+"`. GitHub currently crahes on colons in footnotes (see <https://github.com/github/cmark-gfm/issues/241> for more info)"),Ps=!0);_s||Es(e,"list",(()=>(console.warn("[mdast-util-gfm-footnote] Warning: Found a list in a footnote definition. GitHub currently crahes on lists in footnotes (see <https://github.com/github/cmark-gfm/issues/241> for more info)"),_s=!0,false)));return s},footnoteReference:e}};function e(e,t,r){const n=r.enter("footnoteReference"),i=r.enter("reference"),a=bs(r,hs(e),{before:"^",after:"]"});return i(),n(),"[^"+a+"]"}}function Cs(e,t,r){const n=t.indexStack,i=e.children||[],a=[];let o=-1,s=r.before;for(n.push(-1);++o<i.length;){const c=i[o];let u;if(n[n.length-1]=o,o+1<i.length){let r=t.handle.handlers[i[o+1].type];r&&r.peek&&(r=r.peek),u=r?r(i[o+1],e,t,{before:"",after:""}).charAt(0):""}else u=r.after;a.length>0&&("\r"===s||"\n"===s)&&"html"===c.type&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),s=" "),a.push(t.handle(c,e,t,{before:s,after:u})),s=a[a.length-1].slice(-1)}return n.pop(),a.join("")}const Fs={canContainEols:["delete"],enter:{strikethrough:function(e){this.enter({type:"delete",children:[]},e)}},exit:{strikethrough:function(e){this.exit(e)}}},Ds={unsafe:[{character:"~",inConstruct:"phrasing"}],handlers:{delete:Os}};function Os(e,t,r){const n=r.enter("emphasis"),i=Cs(e,r,{before:"~",after:"~"});return n(),"~~"+i+"~~"}function Rs(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const e=r.unsafe[a],t=gs(e);let i;if(e.atBreak)for(;i=t.exec(n);){let e=i.index;10===n.charCodeAt(e)&&13===n.charCodeAt(e-1)&&e--,n=n.slice(0,e)+" "+n.slice(i.index+1)}}return i+n+i}function Ts(e){return null==e?"":String(e)}function Is(e){return e.length}function js(e){const t="string"==typeof e?e.charCodeAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}Os.peek=function(){return"~"},Rs.peek=function(){return"`"};const Ls={enter:{table:function(e){const t=e._align;this.enter({type:"table",align:t,children:[]},e),this.setData("inTable",!0)},tableData:zs,tableHeader:zs,tableRow:function(e){this.enter({type:"tableRow",children:[]},e)}},exit:{codeText:function(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,Ms));this.stack[this.stack.length-1].value=t,this.exit(e)},table:function(e){this.exit(e),this.setData("inTable")},tableData:qs,tableHeader:qs,tableRow:qs}};function qs(e){this.exit(e)}function zs(e){this.enter({type:"tableCell",children:[]},e)}function Ms(e,t){return"|"===t?t:e}function Ns(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:function(e,t,r){return s(function(e,t){const r=e.children;let n=-1;const i=[],a=t.enter("table");for(;++n<r.length;)i[n]=c(r[n],t);return a(),i}(e,r),e.align)},tableRow:function(e,t,r){const n=s([c(e,r)]);return n.slice(0,n.indexOf("\n"))},tableCell:o,inlineCode:function(e,t,r){let n=Rs(e,0,r);r.stack.includes("tableCell")&&(n=n.replace(/\|/g,"\\$&"));return n}}};function o(e,t,r){const n=r.enter("tableCell"),i=r.enter("phrasing"),o=Cs(e,r,{before:a,after:a});return i(),n(),o}function s(e,t){return function(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||Is,a=[];let o=-1;const s=[],c=[],u=[];let l,f,h,p,d,m,g,v,y,b=0;for(;++o<e.length;){for(l=-1,f=[],h=[],e[o].length>b&&(b=e[o].length);++l<e[o].length;)d=Ts(e[o][l]),!1!==r.alignDelimiters&&(p=i(d),h[l]=p,(void 0===u[l]||p>u[l])&&(u[l]=p)),f.push(d);s[o]=f,c[o]=h}if(l=-1,"object"==typeof n&&"length"in n)for(;++l<b;)a[l]=js(n[l]);else for(y=js(n);++l<b;)a[l]=y;for(l=-1,f=[],h=[];++l<b;)y=a[l],g="",v="",99===y?(g=":",v=":"):108===y?g=":":114===y&&(v=":"),p=!1===r.alignDelimiters?1:Math.max(1,u[l]-g.length-v.length),d=g+"-".repeat(p)+v,!1!==r.alignDelimiters&&(p=g.length+p+v.length,p>u[l]&&(u[l]=p),h[l]=p),f[l]=d;s.splice(1,0,f),c.splice(1,0,h),o=-1;const w=[];for(;++o<s.length;){for(f=s[o],h=c[o],l=-1,m=[];++l<b;)d=f[l]||"",g="",v="",!1!==r.alignDelimiters&&(p=u[l]-(h[l]||0),y=a[l],114===y?g=" ".repeat(p):99===y?p%2?(g=" ".repeat(p/2+.5),v=" ".repeat(p/2-.5)):(g=" ".repeat(p/2),v=g):v=" ".repeat(p)),!1===r.delimiterStart||l||m.push("|"),!1===r.padding||!1===r.alignDelimiters&&""===d||!1===r.delimiterStart&&!l||m.push(" "),!1!==r.alignDelimiters&&m.push(g),m.push(d),!1!==r.alignDelimiters&&m.push(v),!1!==r.padding&&m.push(" "),!1===r.delimiterEnd&&l===b-1||m.push("|");w.push(!1===r.delimiterEnd?m.join("").replace(/ +$/,""):m.join(""))}return w.join("\n")}(e,{align:t,alignDelimiters:n,padding:r,stringLength:i})}function c(e,t){const r=e.children;let n=-1;const i=[],a=t.enter("tableRow");for(;++n<r.length;)i[n]=o(r[n],0,t);return a(),i}}function Bs(e,t,r){const n=function(e){const t=e.options.listItemIndent||"tab";if(1===t||"1"===t)return"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(r);let i=r.bulletCurrent||function(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(r);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===r.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===n||"mixed"===n&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const o=r.enter("listItem"),s=ms(ps(e,r),(function(e,t,r){if(t)return(r?"":" ".repeat(a))+e;return(r?i:i+" ".repeat(a-i.length))+e}));return o(),s}const $s={exit:{taskListCheckValueChecked:Vs,taskListCheckValueUnchecked:Vs,paragraph:function(e){const t=this.stack[this.stack.length-2],r=this.stack[this.stack.length-1],n=t.children,i=r.children[0];let a,o=-1;if(t&&"listItem"===t.type&&"boolean"==typeof t.checked&&i&&"text"===i.type){for(;++o<n.length;){const e=n[o];if("paragraph"===e.type){a=e;break}}a===r&&(i.value=i.value.slice(1),0===i.value.length?r.children.shift():(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}this.exit(e)}}},Us={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:function(e,t,r){const n=e.children[0];let i=Bs(e,t,r);"boolean"==typeof e.checked&&n&&"paragraph"===n.type&&(i=i.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(t){return t+"["+(e.checked?"x":" ")+"] "})));return i}}};function Vs(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}var Hs=Object.freeze({__proto__:null,default:function(e={}){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){return Ci([Oo,{document:{91:{tokenize:Vo,continuation:{tokenize:Ho},exit:Qo}},text:{91:{tokenize:Uo},93:{add:"after",tokenize:Bo,resolveTo:$o}}},Go(e),Wo,Yo])}(e)),r("fromMarkdownExtensions",[os,{enter:{gfmFootnoteDefinition:function(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)},gfmFootnoteDefinitionLabelString:function(){this.buffer()},gfmFootnoteCall:function(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)},gfmFootnoteCallString:function(){this.buffer()}},exit:{gfmFootnoteDefinition:function(e){this.exit(e)},gfmFootnoteDefinitionLabelString:function(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Sa(this.sliceSerialize(e)).toLowerCase()},gfmFootnoteCall:function(e){this.exit(e)},gfmFootnoteCallString:function(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Sa(this.sliceSerialize(e)).toLowerCase()}}},Fs,Ls,$s]),r("toMarkdownExtensions",function(e){return{extensions:[ss,As(),Ds,Ns(e),Us]}}(e))}}),Qs=ce(Hs);const Gs=/[\t ]*(?:\r?\n|\r)/g;var Ws=Object.freeze({__proto__:null,default:function(){return e=>{Es(e,"text",((e,t,r)=>{const n=[];let i=0;Gs.lastIndex=0;let a=Gs.exec(e.value);for(;a;){const t=a.index;i!==t&&n.push({type:"text",value:e.value.slice(i,t)}),n.push({type:"break"}),i=t+a[0].length,a=Gs.exec(e.value)}if(n.length>0&&r&&"number"==typeof t)return i<e.value.length&&n.push({type:"text",value:e.value.slice(i)}),r.children.splice(t,1,...n),t+n.length}))}}}),Ks=ce(Ws),Js={},Ys={};function Xs(e,t,r){var n,i,a,o,s,c="";for("string"!=typeof t&&(r=t,t=Xs.defaultChars),void 0===r&&(r=!0),s=function(e){var t,r,n=Ys[e];if(n)return n;for(n=Ys[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}(t),n=0,i=e.length;n<i;n++)if(a=e.charCodeAt(n),r&&37===a&&n+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(n+1,n+3)))c+=e.slice(n,n+3),n+=2;else if(a<128)c+=s[a];else if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&n+1<i&&(o=e.charCodeAt(n+1))>=56320&&o<=57343){c+=encodeURIComponent(e[n]+e[n+1]),n++;continue}c+="%EF%BF%BD"}else c+=encodeURIComponent(e[n]);return c}Xs.defaultChars=";/?:@&=+$,-_.!~*'()#",Xs.componentChars="-_.!~*'()";var Zs=Xs,ec={};function tc(e,t){var r;return"string"!=typeof t&&(t=tc.defaultChars),r=function(e){var t,r,n=ec[e];if(n)return n;for(n=ec[e]=[],t=0;t<128;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)n[r=e.charCodeAt(t)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}(t),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,i,a,o,s,c,u="";for(t=0,n=e.length;t<n;t+=3)(i=parseInt(e.slice(t+1,t+3),16))<128?u+=r[i]:192==(224&i)&&t+3<n&&128==(192&(a=parseInt(e.slice(t+4,t+6),16)))?(u+=(c=i<<6&1984|63&a)<128?"��":String.fromCharCode(c),t+=3):224==(240&i)&&t+6<n&&(a=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),128==(192&a)&&128==(192&o))?(u+=(c=i<<12&61440|a<<6&4032|63&o)<2048||c>=55296&&c<=57343?"���":String.fromCharCode(c),t+=6):240==(248&i)&&t+9<n&&(a=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&a)&&128==(192&o)&&128==(192&s))?((c=i<<18&1835008|a<<12&258048|o<<6&4032|63&s)<65536||c>1114111?u+="����":(c-=65536,u+=String.fromCharCode(55296+(c>>10),56320+(1023&c))),t+=9):u+="�";return u}))}tc.defaultChars=";/?:@&=+$,#",tc.componentChars="";var rc=tc;function nc(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var ic=/^([a-z0-9.+-]+:)/i,ac=/:[0-9]*$/,oc=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,sc=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),cc=["'"].concat(sc),uc=["%","/","?",";","#"].concat(cc),lc=["/","?","#"],fc=/^[+a-z0-9A-Z_-]{0,63}$/,hc=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,pc={javascript:!0,"javascript:":!0},dc={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};nc.prototype.parse=function(e,t){var r,n,i,a,o,s=e;if(s=s.trim(),!t&&1===e.split("#").length){var c=oc.exec(s);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}var u=ic.exec(s);if(u&&(i=(u=u[0]).toLowerCase(),this.protocol=u,s=s.substr(u.length)),(t||u||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(o="//"===s.substr(0,2))||u&&pc[u]||(s=s.substr(2),this.slashes=!0)),!pc[u]&&(o||u&&!dc[u])){var l,f,h=-1;for(r=0;r<lc.length;r++)-1!==(a=s.indexOf(lc[r]))&&(-1===h||a<h)&&(h=a);for(-1!==(f=-1===h?s.lastIndexOf("@"):s.lastIndexOf("@",h))&&(l=s.slice(0,f),s=s.slice(f+1),this.auth=l),h=-1,r=0;r<uc.length;r++)-1!==(a=s.indexOf(uc[r]))&&(-1===h||a<h)&&(h=a);-1===h&&(h=s.length),":"===s[h-1]&&h--;var p=s.slice(0,h);s=s.slice(h),this.parseHost(p),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d){var m=this.hostname.split(/\./);for(r=0,n=m.length;r<n;r++){var g=m[r];if(g&&!g.match(fc)){for(var v="",y=0,b=g.length;y<b;y++)g.charCodeAt(y)>127?v+="x":v+=g[y];if(!v.match(fc)){var w=m.slice(0,r),x=m.slice(r+1),k=g.match(hc);k&&(w.push(k[1]),x.unshift(k[2])),x.length&&(s=x.join(".")+s),this.hostname=w.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var E=s.indexOf("#");-1!==E&&(this.hash=s.substr(E),s=s.slice(0,E));var S=s.indexOf("?");return-1!==S&&(this.search=s.substr(S),s=s.slice(0,S)),s&&(this.pathname=s),dc[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},nc.prototype.parseHost=function(e){var t=ac.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var mc=function(e,t){if(e&&e instanceof nc)return e;var r=new nc;return r.parse(e,t),r};function gc(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function vc(e,t,r){const n=gc(r),i='"'===n?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label"),s="!["+bs(r,e.alt,{before:"[",after:"]"})+"](";return o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),s+="<"+bs(r,e.url,{before:"<",after:">"})+">"):(o=r.enter("destinationRaw"),s+=bs(r,e.url,{before:"(",after:e.title?" ":")"})),o(),e.title&&(o=r.enter("title"+i),s+=" "+n+bs(r,e.title,{before:n,after:n})+n,o()),s+=")",a(),s}Js.encode=Zs,Js.decode=rc,Js.format=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""},Js.parse=mc,vc.peek=function(){return"!"};var yc=ce(Object.freeze({__proto__:null,image:vc})),bc=ce(Ga);var wc=ce(Object.freeze({__proto__:null,types:{data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkDocument:"chunkDocument",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"}}));var xc=ce(Object.freeze({__proto__:null,codes:{carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533}}));var kc=ce(Object.freeze({__proto__:null,constants:{attentionSideBefore:1,attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupWhitespace:1,characterGroupPunctuation:2,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeDocument:"document",contentTypeFlow:"flow",contentTypeContent:"content",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlRaw:1,htmlComment:2,htmlInstruction:3,htmlDeclaration:4,htmlCdata:5,htmlBasic:6,htmlComplete:7,htmlRawSizeMax:8,linkResourceDestinationBalanceMax:3,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4}})),Ec=ce(Pa),Sc=ce(Ea),Pc=ce(va),_c=ce(Vi),Ac=ce(ba),Cc=ce(xa),Fc=ce(Ss);var Dc=Object.freeze({__proto__:null,paragraph:function(e,t,r){const n=r.enter("paragraph"),i=r.enter("phrasing"),a=Cs(e,r,{before:"\n",after:"\n"});return i(),n(),a}}),Oc=ce(Dc);var Rc=Object.freeze({__proto__:null,heading:function(e,t,r){const n=Math.max(Math.min(6,e.depth||1),1);if(function(e,t){let r=!1;return Es(e,(e=>{if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return r=!0,!1})),Boolean((!e.depth||e.depth<3)&&ki(e)&&(t.options.setext||r))}(e,r)){const t=r.enter("headingSetext"),i=r.enter("phrasing"),a=Cs(e,r,{before:"\n",after:"\n"});return i(),t(),a+"\n"+(1===n?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const i="#".repeat(n),a=r.enter("headingAtx"),o=r.enter("phrasing");let s=Cs(e,r,{before:"# ",after:"\n"});return/^[\t ]/.test(s)&&(s="&#x"+s.charCodeAt(0).toString(16).toUpperCase()+";"+s.slice(1)),s=s?i+" "+s:i,r.options.closeAtx&&(s+=" "+i),o(),a(),s}}),Tc=ce(Rc),Ic=ce(Qi);function jc(e,t,r){return">"+(r?"":" ")+e}var Lc,qc=Object.freeze({__proto__:null,blockquote:function(e,t,r){const n=r.enter("blockquote"),i=ms(ps(e,r),jc);return n(),i}}),zc=ce(qc),Mc={exports:{}};Lc=Mc,function(){var e;function t(e){for(var t,r,n,i,a=1,o=[].slice.call(arguments),s=0,c=e.length,u="",l=!1,f=!1,h=function(){return o[a++]},p=function(){for(var r="";/\d/.test(e[s]);)r+=e[s++],t=e[s];return r.length>0?parseInt(r):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(h(),10).toString(2);break;case"c":u+="string"==typeof(r=h())||r instanceof String?r:String.fromCharCode(parseInt(r,10));break;case"d":u+=parseInt(h(),10);break;case"f":n=String(parseFloat(h()).toFixed(i||6)),u+=f?n:n.replace(/^0/,"");break;case"j":u+=JSON.stringify(h());break;case"o":u+="0"+parseInt(h(),10).toString(8);break;case"s":u+=h();break;case"x":u+="0x"+parseInt(h(),10).toString(16);break;case"X":u+="0x"+parseInt(h(),10).toString(16).toUpperCase();break;default:u+=t}else"%"===t?l=!0:u+=t;return u}(e=Lc.exports=t).format=t,e.vsprintf=function(e,r){return t.apply(null,[e].concat(r))},"undefined"!=typeof console&&"function"==typeof console.log&&(e.printf=function(){console.log(t.apply(null,arguments))})}();var Nc=Mc.exports;const Bc=Object.assign($c(Error),{eval:$c(EvalError),range:$c(RangeError),reference:$c(ReferenceError),syntax:$c(SyntaxError),type:$c(TypeError),uri:$c(URIError)});function $c(e){return t.displayName=e.displayName||e.name,t;function t(t,...r){const n=t?Nc(t,...r):t;return new e(n)}}const Uc={}.hasOwnProperty,Vc={yaml:"-",toml:"+"};function Hc(e="yaml"){const t=[];let r=-1;for(Array.isArray(e)||(e=[e]);++r<e.length;)t[r]=Qc(e[r]);return t}function Qc(e){let t=e;if("string"==typeof t){if(!Uc.call(Vc,t))throw Bc("Missing matter definition for `%s`",t);t={type:t,marker:Vc[t]}}else if("object"!=typeof t)throw Bc("Expected matter to be an object, not `%j`",t);if(!Uc.call(t,"type"))throw Bc("Missing `type` in matter `%j`",t);if(!Uc.call(t,"fence")&&!Uc.call(t,"marker"))throw Bc("Missing `marker` or `fence` in matter `%j`",t);return t}function Gc(e){const t=e.type,r=e.anywhere,n=t+"Value",i=t+"Fence",a=i+"Sequence",o={tokenize:function(e,t,r){let n=0;return function(t){if(t===s.charCodeAt(n))return e.enter(i),e.enter(a),o(t);return r(t)};function o(t){return n===s.length?(e.exit(a),Ni(t)?(e.enter("whitespace"),c(t)):u(t)):t===s.charCodeAt(n++)?(e.consume(t),o):r(t)}function c(t){return Ni(t)?(e.consume(t),c):(e.exit("whitespace"),u(t))}function u(n){return null===n||Mi(n)?(e.exit(i),t(n)):r(n)}},partial:!0};let s;return{tokenize:function(i,a,c){const u=this;return function(n){const a=u.now();if(1!==a.column||!r&&1!==a.line)return c(n);return i.enter(t),s=Wc(e,"open"),i.attempt(o,l,c)(n)};function l(t){return s=Wc(e,"close"),p(t)}function f(e){return null===e||Mi(e)?p(e):(i.enter(n),h(e))}function h(e){return null===e||Mi(e)?(i.exit(n),p(e)):(i.consume(e),h)}function p(e){return null===e?c(e):(i.enter("lineEnding"),i.consume(e),i.exit("lineEnding"),i.attempt(o,d,f))}function d(e){return i.exit(t),a(e)}},concrete:!0}}function Wc(e,t){return e.marker?Kc(e.marker,t).repeat(3):Kc(e.fence,t)}function Kc(e,t){return"string"==typeof e?e:e[t]}function Jc(e){return function(t){this.enter({type:e.type,value:""},t),this.buffer()}}function Yc(e){const t=this.resume();this.exit(e).value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Xc(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Zc(e){const t=eu(e,"open"),r=eu(e,"close");return function(e){return t+(e.value?"\n"+e.value:"")+"\n"+r}}function eu(e,t){return e.marker?tu(e.marker,t).repeat(3):tu(e.fence,t)}function tu(e,t){return"string"==typeof e?e:e[t]}var ru=Object.freeze({__proto__:null,default:function(e="yaml"){const t=this.data();function r(e,r){(t[e]?t[e]:t[e]=[]).push(r)}r("micromarkExtensions",function(e){const t=Hc(e),r={};let n,i,a=-1;for(;++a<t.length;)n=t[a],i=Wc(n,"open").charCodeAt(0),i in r?r[i].push(Gc(n)):r[i]=[Gc(n)];return{flow:r}}(e)),r("fromMarkdownExtensions",function(e){const t=Hc(e),r={},n={};let i=-1;for(;++i<t.length;){const e=t[i];r[e.type]=Jc(e),n[e.type]=Yc,n[e.type+"Value"]=Xc}return{enter:r,exit:n}}(e)),r("toMarkdownExtensions",function(e){const t=[],r={},n=Hc(e);let i=-1;for(;++i<n.length;){const e=n[i];r[e.type]=Zc(e),t.push({atBreak:!0,character:eu(e,"open").charAt(0)})}return{unsafe:t,handlers:r}}(e))}}),nu=ce(ru);function iu(e,t,r,n,i,a,o,s,c,u,l,f,h,p,d){let m,g;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),v};function v(t){return 35===t?(m=o,y(t)):46===t?(m=s,y(t)):58===t||95===t||Oi(t)?(e.enter(a),e.enter(c),e.consume(t),x):d&&Ni(t)?Hi(e,v,"whitespace")(t):!d&&zi(t)?ka(e,v)(t):F(t)}function y(t){return e.enter(a),e.enter(m),e.enter(m+"Marker"),e.consume(t),e.exit(m+"Marker"),b}function b(t){return null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||zi(t)?r(t):(e.enter(m+"Value"),e.consume(t),w)}function w(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):35===t||46===t||125===t||zi(t)?(e.exit(m+"Value"),e.exit(m),e.exit(a),v(t)):(e.consume(t),w)}function x(t){return 45===t||46===t||58===t||95===t||Ii(t)?(e.consume(t),x):(e.exit(c),d&&Ni(t)?Hi(e,k,"whitespace")(t):!d&&zi(t)?ka(e,k)(t):k(t))}function k(t){return 61===t?(e.enter(u),e.consume(t),e.exit(u),E):(e.exit(a),v(t))}function E(t){return null===t||60===t||61===t||62===t||96===t||125===t||d&&Mi(t)?r(t):34===t||39===t?(e.enter(l),e.enter(h),e.consume(t),e.exit(h),g=t,P):d&&Ni(t)?Hi(e,E,"whitespace")(t):!d&&zi(t)?ka(e,E)(t):(e.enter(f),e.enter(p),e.consume(t),g=void 0,S)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?r(t):125===t||zi(t)?(e.exit(p),e.exit(f),e.exit(a),v(t)):(e.consume(t),S)}function P(t){return t===g?(e.enter(h),e.consume(t),e.exit(h),e.exit(l),e.exit(a),C):(e.enter(f),_(t))}function _(t){return t===g?(e.exit(f),P(t)):null===t?r(t):Mi(t)?d?r(t):ka(e,_)(t):(e.enter(p),e.consume(t),A)}function A(t){return t===g||null===t||Mi(t)?(e.exit(p),_(t)):(e.consume(t),A)}function C(e){return 125===e||zi(e)?v(e):F(e)}function F(a){return 125===a?(e.enter(i),e.consume(a),e.exit(i),e.exit(n),t):r(a)}}function au(e,t,r,n,i,a,o){let s=0,c=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),u};function u(r){return 93===r?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(a),l(r))}function l(t){return null===t||s>999?r(t):93!==t||c--?Mi(t)?o?r(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("chunkText",{contentType:"text"}),f(t)):h(t)}function f(t){return null===t||Mi(t)||s>999?(e.exit("chunkText"),l(t)):91===t&&++c>3?r(t):93!==t||c--?(e.consume(t),92===t?p:f):(e.exit("chunkText"),h(t))}function h(r){return e.exit(a),e.enter(i),e.consume(r),e.exit(i),e.exit(n),t}function p(t){return 91===t||92===t||93===t?(e.consume(t),s++,f):f(t)}}function ou(e,t,r,n){const i=this;return function(t){if(Oi(t))return e.enter(n),e.consume(t),a;return r(t)};function a(o){return 45===o||95===o||Ii(o)?(e.consume(o),a):(e.exit(n),45===i.previous||95===i.previous?r(o):t(o))}}const su={tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0;let o,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),c(t)};function c(t){return 58===t?(e.consume(t),s++,c):s<3?r(t):(e.exit("directiveContainerSequence"),ou.call(n,e,u,r,"directiveContainerName")(t))}function u(t){return 91===t?e.attempt(cu,l,l)(t):l(t)}function l(t){return 123===t?e.attempt(uu,f,f)(t):f(t)}function f(t){return Hi(e,h,"whitespace")(t)}function h(i){return e.exit("directiveContainerFence"),null===i?p(i):Mi(i)?n.interrupt?t(i):e.attempt(lu,d,p)(i):r(i)}function p(r){return e.exit("directiveContainer"),t(r)}function d(r){return null===r?(e.exit("directiveContainer"),t(r)):(e.enter("directiveContainerContent"),m(r))}function m(t){return null===t?w(t):e.attempt({tokenize:x,partial:!0},w,a?Hi(e,g,"linePrefix",a+1):g)(t)}function g(t){if(null===t)return w(t);const r=e.enter("chunkDocument",{contentType:"document",previous:o});return o&&(o.next=r),o=r,v(t)}function v(t){if(null===t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}return Mi(t)?e.check(lu,y,b)(t):(e.consume(t),v)}function y(t){e.consume(t);const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,m}function b(t){const r=e.exit("chunkDocument");return n.parser.lazy[r.start.line]=!1,w(t)}function w(r){return e.exit("directiveContainerContent"),e.exit("directiveContainer"),t(r)}function x(e,t,r){let n=0;return Hi(e,(function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)}),"linePrefix",4);function i(t){return 58===t?(e.consume(t),n++,i):n<s?r(t):(e.exit("directiveContainerSequence"),Hi(e,a,"whitespace")(t))}function a(n){return null===n||Mi(n)?(e.exit("directiveContainerFence"),t(n)):r(n)}}},concrete:!0},cu={tokenize:function(e,t,r){return au(e,t,r,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)},partial:!0},uu={tokenize:function(e,t,r){return iu(e,t,r,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)},partial:!0},lu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const fu={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),i};function i(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),ou.call(n,e,a,r,"directiveLeafName")):r(t)}function a(t){return 91===t?e.attempt(hu,o,o)(t):o(t)}function o(t){return 123===t?e.attempt(pu,s,s)(t):s(t)}function s(t){return Hi(e,c,"whitespace")(t)}function c(n){return null===n||Mi(n)?(e.exit("directiveLeaf"),t(n)):r(n)}}},hu={tokenize:function(e,t,r){return au(e,t,r,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)},partial:!0},pu={tokenize:function(e,t,r){return iu(e,t,r,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)},partial:!0};const du={tokenize:function(e,t,r){const n=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),ou.call(n,e,i,r,"directiveTextName")};function i(t){return 58===t?r(t):91===t?e.attempt(mu,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(gu,o,o)(t):o(t)}function o(r){return e.exit("directiveText"),t(r)}},previous:function(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}},mu={tokenize:function(e,t,r){return au(e,t,r,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")},partial:!0},gu={tokenize:function(e,t,r){return iu(e,t,r,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")},partial:!0};const vu=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],yu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function bu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function wu(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function xu(e){return function(e){const t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||bu(e)}const ku=String.fromCharCode,Eu=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Su(e,t={}){const r="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,n=[];let i,a,o=0,s=-1,c="";t.position&&("start"in t.position||"indent"in t.position?(a=t.position.indent,i=t.position.start):i=t.position);let u,l=(i?i.line:0)||1,f=(i?i.column:0)||1,h=p();for(o--;++o<=e.length;)if(10===u&&(f=(a?a[s]:0)||1),u=e.charCodeAt(o),38===u){const i=e.charCodeAt(o+1);if(9===i||10===i||12===i||32===i||38===i||60===i||Number.isNaN(i)||r&&i===r){c+=ku(u),f++;continue}const a=o+1;let s,l=a,g=a;if(35===i){g=++l;const t=e.charCodeAt(g);88===t||120===t?(s="hexadecimal",g=++l):s="decimal"}else s="named";let v="",y="",b="";const w="named"===s?xu:"decimal"===s?bu:wu;for(g--;++g<=e.length;){const t=e.charCodeAt(g);if(!w(t))break;b+=ku(t),"named"===s&&vu.includes(b)&&(v=b,y=oa(b))}let x=59===e.charCodeAt(g);if(x){g++;const e="named"===s&&oa(b);e&&(v=b,y=e)}let k=1+g-a,E="";if(x||!1!==t.nonTerminated)if(b)if("named"===s){if(x&&!y)d(5,1);else if(v!==b&&(g=l+v.length,k=1+g-l,x=!1),!x){const r=v?1:3;if(t.attribute){const t=e.charCodeAt(g);61===t?(d(r,k),y=""):xu(t)?y="":d(r,k)}else d(r,k)}E=y}else{x||d(2,k);let e=Number.parseInt(b,"hexadecimal"===s?16:10);if(Pu(e))d(7,k),E=ku(65533);else if(e in yu)d(6,k),E=yu[e];else{let t="";_u(e)&&d(6,k),e>65535&&(e-=65536,t+=ku(e>>>10|55296),e=56320|1023&e),E=t+ku(e)}}else"named"!==s&&d(4,k);else;if(E){m(),h=p(),o=g-1,f+=g-a+1,n.push(E);const r=p();r.offset++,t.reference&&t.reference.call(t.referenceContext,E,{start:h,end:r},e.slice(a-1,g)),h=r}else b=e.slice(a-1,g),c+=b,f+=b.length,o=g-1}else 10===u&&(l++,s++,f=0),Number.isNaN(u)?m():(c+=ku(u),f++);return n.join("");function p(){return{line:l,column:f,offset:o+((i?i.offset:0)||0)}}function d(e,r){let n;t.warning&&(n=p(),n.column+=r,n.offset+=r,t.warning.call(t.warningContext,Eu[e],n,e))}function m(){c&&(n.push(c),t.text&&t.text.call(t.textContext,c,{start:h,end:p()}),c="")}}function Pu(e){return e>=55296&&e<=57343||e>1114111}function _u(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}function Au(e,t){return e=e.replace(t.subset?function(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}(t.subset):/["&'<>`]/g,r),t.subset||t.escapeOnly?e:e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,(function(e,r,n){return t.format(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536,n.charCodeAt(r+2),t)})).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function r(e,r,n){return t.format(e.charCodeAt(0),n.charCodeAt(r+1),t)}}function Cu(e){return"&#x"+e.toString(16).toUpperCase()+";"}const Fu=function(e,t,r,n){"function"==typeof t&&"function"!=typeof r&&(n=r,r=t,t=null);const i=Kr(t),a=n?-1:1;!function e(o,s,c){const u="object"==typeof o&&null!==o?o:{};let l;"string"==typeof u.type&&(l="string"==typeof u.tagName?u.tagName:"string"==typeof u.name?u.name:void 0,Object.defineProperty(h,"name",{value:"node ("+(f=u.type+(l?"<"+l+">":""),""+f+")")}));var f;return h;function h(){let u,l,f,h=[];if((!t||i(o,s,c[c.length-1]||null))&&(h=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return[e]}(r(o,c)),false===h[0]))return h;if(o.children&&"skip"!==h[0])for(l=(n?o.children.length:-1)+a,f=c.concat(o);l>-1&&l<o.children.length;){if(u=e(o.children[l],l,f)(),false===u[0])return u;l="number"==typeof u[1]?u[1]:l+a}return h}}(e,null,[])()};const Du={}.hasOwnProperty,Ou=/^[^\t\n\r "#'.<=>`}]+$/;Uu.peek=function(){return":"};const Ru={canContainEols:["textDirective"],enter:{directiveContainer:function(e){Iu.call(this,"containerDirective",e)},directiveContainerAttributes:Lu,directiveContainerLabel:function(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)},directiveLeaf:function(e){Iu.call(this,"leafDirective",e)},directiveLeafAttributes:Lu,directiveText:function(e){Iu.call(this,"textDirective",e)},directiveTextAttributes:Lu},exit:{directiveContainer:$u,directiveContainerAttributeClassValue:zu,directiveContainerAttributeIdValue:qu,directiveContainerAttributeName:Nu,directiveContainerAttributeValue:Mu,directiveContainerAttributes:Bu,directiveContainerLabel:function(e){this.exit(e)},directiveContainerName:ju,directiveLeaf:$u,directiveLeafAttributeClassValue:zu,directiveLeafAttributeIdValue:qu,directiveLeafAttributeName:Nu,directiveLeafAttributeValue:Mu,directiveLeafAttributes:Bu,directiveLeafName:ju,directiveText:$u,directiveTextAttributeClassValue:zu,directiveTextAttributeIdValue:qu,directiveTextAttributeName:Nu,directiveTextAttributeValue:Mu,directiveTextAttributes:Bu,directiveTextName:ju}},Tu={unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:"\n",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}],handlers:{containerDirective:Uu,leafDirective:Uu,textDirective:Uu}};function Iu(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function ju(e){this.stack[this.stack.length-1].name=this.sliceSerialize(e)}function Lu(){this.setData("directiveAttributes",[]),this.buffer()}function qu(e){this.getData("directiveAttributes").push(["id",Su(this.sliceSerialize(e))])}function zu(e){this.getData("directiveAttributes").push(["class",Su(this.sliceSerialize(e))])}function Mu(e){const t=this.getData("directiveAttributes");t[t.length-1][1]=Su(this.sliceSerialize(e))}function Nu(e){this.getData("directiveAttributes").push([this.sliceSerialize(e),""])}function Bu(){const e=this.getData("directiveAttributes"),t={};let r=-1;for(;++r<e.length;){const n=e[r];"class"===n[0]&&t.class?t.class+=" "+n[1]:t[n[0]]=n[1]}this.setData("directiveAttributes"),this.resume();this.stack[this.stack.length-1].attributes=t}function $u(e){this.exit(e)}function Uu(e,t,r){const n=function(e){let t=0;"containerDirective"===e.type?(Fu(e,"containerDirective",r),t+=3):t="leafDirective"===e.type?2:1;return":".repeat(t);function r(e,r){let n=r.length,i=0;for(;n--;)"containerDirective"===r[n].type&&i++;i>t&&(t=i)}}(e),i=r.enter(e.type);let a=n+(e.name||"")+function(e,t){let r=e;if("containerDirective"===e.type){const t=(e.children||[])[0];if(!Vu(t))return"";r=t}const n=t.enter("label"),i=t.enter(e.type+"Label"),a=Cs(r,t,{before:"[",after:"]"});return i(),n(),a?"["+a+"]":""}(e,r)+function(e,t){const r=gc(t),n="textDirective"===e.type?[r]:[r,"\n","\r"],i=e.attributes||{},a=[];let o,s,c,u;for(u in i)if(Du.call(i,u)&&void 0!==i[u]&&null!==i[u]){const e=String(i[u]);if("id"===u)c=Ou.test(e)?"#"+e:l("id",e);else if("class"===u){const t=e.split(/[\t\n\r ]+/g),r=[],n=[];let i=-1;for(;++i<t.length;)(Ou.test(t[i])?n:r).push(t[i]);o=r.length>0?l("class",r.join(" ")):"",s=n.length>0?"."+n.join("."):""}else a.push(l(u,e))}o&&a.unshift(o);s&&a.unshift(s);c&&a.unshift(c);return a.length>0?"{"+a.join(" ")+"}":"";function l(e,t){return e+(t?"="+r+function(e,t){return Au(e,Object.assign({format:Cu},t))}(t,{subset:n})+r:"")}}(e,r);if("containerDirective"===e.type){const t=function(e,t){Vu((e.children||[])[0])&&(e=Object.assign({},e,{children:e.children.slice(1)}));return ps(e,t)}(e,r);t&&(a+="\n"+t),a+="\n"+n}return i(),a}function Vu(e){return Boolean(e&&"paragraph"===e.type&&e.data&&e.data.directiveLabel)}var Hu=Object.freeze({__proto__:null,default:function(){const e=this.data();function t(t,r){(e[t]?e[t]:e[t]=[]).push(r)}t("micromarkExtensions",{text:{58:du},flow:{58:[su,fu]}}),t("fromMarkdownExtensions",Ru),t("toMarkdownExtensions",Tu)}}),Qu=ce(Hu);const Gu={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533};var Wu=Object.freeze({__proto__:null,remarkHeadingId:function(){const e=this.data();function t(t,r){(e[t]||(e[t]=[])).push(r)}return t("micromarkExtensions",function(){const e={text:{[Gu.leftCurlyBrace]:{name:"headingIdMaybeStart",tokenize:(e,t,r)=>function(n){return e.attempt({tokenize(e,t,r){return function(t){if(t!==Gu.leftCurlyBrace)throw new Error(`Unexpected code ${t}`);return e.enter("id"),e.enter("idMarker"),e.consume(t),n};function n(t){return t!==Gu.numberSign?r(t):(e.consume(t),e.exit("idMarker"),e.enter("idString"),e.enter("chunkString",{contentType:"string"}),i)}function i(n){return[Gu.carriageReturn,Gu.lineFeed,Gu.carriageReturnLineFeed,null,Gu.backslash,Gu.leftCurlyBrace].includes(n)?r(n):n===Gu.rightCurlyBrace?(e.exit("chunkString"),e.exit("idString"),e.enter("idMarker"),e.consume(n),e.exit("idMarker"),e.exit("id"),t):(e.consume(n),i)}}},t,r)(n)}}}};return e}()),t("fromMarkdownExtensions",{enter:{idString(e){this.enter({type:"idString",value:null},e),this.buffer()}},exit:{idString(e){const t=this.resume();this.exit(e).value=t}}}),function(e){Es(e,"idString",((e,t,r)=>{if(!r)throw new Error("Unexpected idString under no parent.");if("heading"!==r.type)throw new Error(`Unexpected node ${e} under ${r}`)})),Es(e,"heading",(e=>{const t=e.children.filter((e=>"idString"===e.type));if(0==t.length)return;if(t.length>1)throw new Error(`Found ${t.length} ids under heading ${e}.`);const r=t[0];if(r.value&&r.value.length>0){e.data||(e.data={}),e.data.hProperties||(e.data.hProperties={}),e.data.id=e.data.hProperties.id=r.value,r.value="";const t=e.children.indexOf(r);if(t>=1){const r=e.children[t-1];"text"===r.type&&(r.value=r.value.trimEnd())}e.children.splice(t,1)}}))}}}),Ku=ce(Wu),Ju=ce(Xr),Yu={exports:{}},Xu=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},Zu=Xu,el=Object.prototype.toString;function tl(e){return Array.isArray(e)}function rl(e){return void 0===e}function nl(e){return"[object ArrayBuffer]"===el.call(e)}function il(e){return null!==e&&"object"==typeof e}function al(e){if("[object Object]"!==el.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function ol(e){return"[object Function]"===el.call(e)}function sl(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),tl(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var cl={isArray:tl,isArrayBuffer:nl,isBuffer:function(e){return null!==e&&!rl(e)&&null!==e.constructor&&!rl(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===el.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&nl(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:il,isPlainObject:al,isUndefined:rl,isDate:function(e){return"[object Date]"===el.call(e)},isFile:function(e){return"[object File]"===el.call(e)},isBlob:function(e){return"[object Blob]"===el.call(e)},isFunction:ol,isStream:function(e){return il(e)&&ol(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===el.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:sl,merge:function e(){var t={};function r(r,n){al(t[n])&&al(r)?t[n]=e(t[n],r):al(r)?t[n]=e({},r):tl(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)sl(arguments[n],r);return t},extend:function(e,t,r){return sl(t,(function(t,n){e[n]=r&&"function"==typeof t?Zu(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},ul=cl;function ll(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var fl=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(ul.isURLSearchParams(t))n=t.toString();else{var i=[];ul.forEach(t,(function(e,t){null!=e&&(ul.isArray(e)?t+="[]":e=[e],ul.forEach(e,(function(e){ul.isDate(e)?e=e.toISOString():ul.isObject(e)&&(e=JSON.stringify(e)),i.push(ll(t)+"="+ll(e))})))})),n=i.join("&")}if(n){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},hl=cl;function pl(){this.handlers=[]}pl.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},pl.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},pl.prototype.forEach=function(e){hl.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var dl=pl,ml=cl,gl=function(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},vl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yl=gl,bl=function(e,t,r,n,i){var a=new Error(e);return yl(a,t,r,n,i)},wl=bl,xl=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(wl("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},kl=cl,El=kl.isStandardBrowserEnv()?{write:function(e,t,r,n,i,a){var o=[];o.push(e+"="+encodeURIComponent(t)),kl.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),kl.isString(n)&&o.push("path="+n),kl.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Sl=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Pl=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},_l=function(e,t){return e&&!Sl(t)?Pl(e,t):t},Al=cl,Cl=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Fl=cl,Dl=Fl.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=Fl.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function Ol(e){this.message=e}Ol.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Ol.prototype.__CANCEL__=!0;var Rl,Tl=Ol,Il=cl,jl=xl,Ll=El,ql=fl,zl=_l,Ml=function(e){var t,r,n,i={};return e?(Al.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=Al.trim(e.substr(0,n)).toLowerCase(),r=Al.trim(e.substr(n+1)),t){if(i[t]&&Cl.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([r]):i[t]?i[t]+", "+r:r}})),i):i},Nl=Dl,Bl=bl,$l=vl,Ul=Tl,Vl=function(e){return new Promise((function(t,r){var n,i=e.data,a=e.headers,o=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}Il.isFormData(i)&&delete a["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(u+":"+l)}var f=zl(e.baseURL,e.url);function h(){if(c){var n="getAllResponseHeaders"in c?Ml(c.getAllResponseHeaders()):null,i={data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c};jl((function(e){t(e),s()}),(function(e){r(e),s()}),i),c=null}}if(c.open(e.method.toUpperCase(),ql(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(h)},c.onabort=function(){c&&(r(Bl("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){r(Bl("Network Error",e,null,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||$l;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(Bl(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},Il.isStandardBrowserEnv()){var p=(e.withCredentials||Nl(f))&&e.xsrfCookieName?Ll.read(e.xsrfCookieName):void 0;p&&(a[e.xsrfHeaderName]=p)}"setRequestHeader"in c&&Il.forEach(a,(function(e,t){void 0===i&&"content-type"===t.toLowerCase()?delete a[t]:c.setRequestHeader(t,e)})),Il.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&"json"!==o&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){c&&(r(!e||e&&e.type?new Ul("canceled"):e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),i||(i=null),c.send(i)}))},Hl={exports:{}},Ql=z.default,Gl=Ql.URL,Wl=N.default,Kl=B.default,Jl=$.default.Writable,Yl=M.default,Xl=function(){if(!Rl){try{Rl=require("debug")("follow-redirects")}catch(e){}"function"!=typeof Rl&&(Rl=function(){})}Rl.apply(null,arguments)},Zl=["abort","aborted","connect","error","socket","timeout"],ef=Object.create(null);Zl.forEach((function(e){ef[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var tf=ff("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),rf=ff("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),nf=ff("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),af=ff("ERR_STREAM_WRITE_AFTER_END","write after end");function of(e,t){Jl.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function sf(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var i=n+":",a=r[i]=e[n],o=t[n]=Object.create(a);Object.defineProperties(o,{request:{value:function(e,n,a){if("string"==typeof e){var o=e;try{e=uf(new Gl(o))}catch(t){e=Ql.parse(o)}}else Gl&&e instanceof Gl?e=uf(e):(a=n,n=e,e={protocol:i});return"function"==typeof n&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,Yl.equal(n.protocol,i,"protocol mismatch"),Xl("options",n),new of(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=o.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function cf(){}function uf(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function lf(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function ff(e,t){function r(e){Error.captureStackTrace(this,this.constructor),e?(this.message=t+": "+e.message,this.cause=e):this.message=t}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r.prototype.code=e,r}function hf(e){for(var t=0;t<Zl.length;t++)e.removeListener(Zl[t],ef[Zl[t]]);e.on("error",cf),e.abort()}of.prototype=Object.create(Jl.prototype),of.prototype.abort=function(){hf(this._currentRequest),this.emit("abort")},of.prototype.write=function(e,t,r){if(this._ending)throw new af;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new nf),this.abort()):r&&r()},of.prototype.end=function(e,t,r){if("function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null),e){var n=this,i=this._currentRequest;this.write(e,t,(function(){n._ended=!0,i.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},of.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},of.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},of.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),a()}),e),n(t)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",a),this.on("error",a),this.on("response",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){of.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(of.prototype,e,{get:function(){return this._currentRequest[e]}})})),of.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},of.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=Ql.format(this._options),n._redirectable=this;for(var i=0;i<Zl.length;i++)n.on(Zl[i],ef[Zl[i]]);if(this._isRedirect){var a=0,o=this,s=this._requestBodyBuffers;!function e(t){if(n===o._currentRequest)if(t)o.emit("error",t);else if(a<s.length){var r=s[a++];n.finished||n.write(r.data,r.encoding,e)}else o._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},of.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(hf(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new rf);else{((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],lf(/^content-/i,this._options.headers));var n,i=lf(/^host$/i,this._options.headers),a=Ql.parse(this._currentUrl),o=i||a.host,s=/^\w+:/.test(r)?this._currentUrl:Ql.format(Object.assign(a,{host:o}));try{n=Ql.resolve(s,r)}catch(e){return void this.emit("error",new tf(e))}Xl("redirecting to",n),this._isRedirect=!0;var c=Ql.parse(n);if(Object.assign(this._options,c),(c.protocol!==a.protocol&&"https:"!==c.protocol||c.host!==o&&!function(e,t){const r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(c.host,o))&&lf(/^(?:authorization|cookie)$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var u={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,u)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new tf(e))}}},Hl.exports=sf({http:Wl,https:Kl}),Hl.exports.wrap=sf;var pf="0.26.1",df=cl,mf=xl,gf=_l,vf=fl,yf=N.default,bf=B.default,wf=Hl.exports.http,xf=Hl.exports.https,kf=z.default,Ef=U.default,Sf=pf,Pf=bl,_f=gl,Af=vl,Cf=Tl,Ff=/https:?/;function Df(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,Df(e,t,e.href)}}var Of=function(e){return new Promise((function(t,r){var n;function i(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}var a=function(e){i(),t(e)},o=!1,s=function(e){i(),o=!0,r(e)},c=e.data,u=e.headers,l={};if(Object.keys(u).forEach((function(e){l[e.toLowerCase()]=e})),"user-agent"in l?u[l["user-agent"]]||delete u[l["user-agent"]]:u["User-Agent"]="axios/"+Sf,c&&!df.isStream(c)){if(Buffer.isBuffer(c));else if(df.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else{if(!df.isString(c))return s(Pf("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c=Buffer.from(c,"utf-8")}if(e.maxBodyLength>-1&&c.length>e.maxBodyLength)return s(Pf("Request body larger than maxBodyLength limit",e));l["content-length"]||(u["Content-Length"]=c.length)}var f=void 0;e.auth&&(f=(e.auth.username||"")+":"+(e.auth.password||""));var h=gf(e.baseURL,e.url),p=kf.parse(h),d=p.protocol||"http:";if(!f&&p.auth){var m=p.auth.split(":");f=(m[0]||"")+":"+(m[1]||"")}f&&l.authorization&&delete u[l.authorization];var g=Ff.test(d),v=g?e.httpsAgent:e.httpAgent;try{vf(p.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){var y=new Error(t.message);y.config=e,y.url=e.url,y.exists=!0,s(y)}var b={path:vf(p.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:u,agent:v,agents:{http:e.httpAgent,https:e.httpsAgent},auth:f};e.socketPath?b.socketPath=e.socketPath:(b.hostname=p.hostname,b.port=p.port);var w,x=e.proxy;if(!x&&!1!==x){var k=d.slice(0,-1)+"_proxy",E=process.env[k]||process.env[k.toUpperCase()];if(E){var S=kf.parse(E),P=process.env.no_proxy||process.env.NO_PROXY,_=!0;if(P){var A=P.split(",").map((function(e){return e.trim()}));_=!A.some((function(e){return!!e&&("*"===e||("."===e[0]&&p.hostname.substr(p.hostname.length-e.length)===e||p.hostname===e))}))}if(_&&(x={host:S.hostname,port:S.port,protocol:S.protocol},S.auth)){var C=S.auth.split(":");x.auth={username:C[0],password:C[1]}}}}x&&(b.headers.host=p.hostname+(p.port?":"+p.port:""),Df(b,x,d+"//"+p.hostname+(p.port?":"+p.port:"")+b.path));var F=g&&(!x||Ff.test(x.protocol));e.transport?w=e.transport:0===e.maxRedirects?w=F?bf:yf:(e.maxRedirects&&(b.maxRedirects=e.maxRedirects),w=F?xf:wf),e.maxBodyLength>-1&&(b.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(b.insecureHTTPParser=e.insecureHTTPParser);var D=w.request(b,(function(t){if(!D.aborted){var r=t,n=t.req||D;if(204!==t.statusCode&&"HEAD"!==n.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(Ef.createUnzip()),delete t.headers["content-encoding"]}var i={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:n};if("stream"===e.responseType)i.data=r,mf(a,s,i);else{var c=[],u=0;r.on("data",(function(t){c.push(t),u+=t.length,e.maxContentLength>-1&&u>e.maxContentLength&&(o=!0,r.destroy(),s(Pf("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,n)))})),r.on("aborted",(function(){o||(r.destroy(),s(Pf("error request aborted",e,"ERR_REQUEST_ABORTED",n)))})),r.on("error",(function(t){D.aborted||s(_f(t,e,null,n))})),r.on("end",(function(){try{var t=1===c.length?c[0]:Buffer.concat(c);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=df.stripBOM(t))),i.data=t}catch(t){s(_f(t,e,t.code,i.request,i))}mf(a,s,i)}))}}}));if(D.on("error",(function(t){D.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||s(_f(t,e,null,D))})),D.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){var O=parseInt(e.timeout,10);if(isNaN(O))return void s(Pf("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",D));D.setTimeout(O,(function(){D.abort();var t="";t=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";var r=e.transitional||Af;s(Pf(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",D))}))}(e.cancelToken||e.signal)&&(n=function(e){D.aborted||(D.abort(),s(!e||e&&e.type?new Cf("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),df.isStream(c)?c.on("error",(function(t){s(_f(t,e,null,D))})).pipe(D):D.end(c)}))},Rf=cl,Tf=function(e,t){ml.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},If=gl,jf={"Content-Type":"application/x-www-form-urlencoded"};function Lf(e,t){!Rf.isUndefined(e)&&Rf.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var qf,zf={transitional:vl,adapter:("undefined"!=typeof XMLHttpRequest?qf=Vl:"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(qf=Of),qf),transformRequest:[function(e,t){return Tf(t,"Accept"),Tf(t,"Content-Type"),Rf.isFormData(e)||Rf.isArrayBuffer(e)||Rf.isBuffer(e)||Rf.isStream(e)||Rf.isFile(e)||Rf.isBlob(e)?e:Rf.isArrayBufferView(e)?e.buffer:Rf.isURLSearchParams(e)?(Lf(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Rf.isObject(e)||t&&"application/json"===t["Content-Type"]?(Lf(t,"application/json"),function(e,t,r){if(Rf.isString(e))try{return(t||JSON.parse)(e),Rf.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||zf.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&Rf.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw If(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Rf.forEach(["delete","get","head"],(function(e){zf.headers[e]={}})),Rf.forEach(["post","put","patch"],(function(e){zf.headers[e]=Rf.merge(jf)}));var Mf=zf,Nf=cl,Bf=Mf,$f=function(e){return!(!e||!e.__CANCEL__)},Uf=cl,Vf=function(e,t,r){var n=this||Bf;return Nf.forEach(r,(function(r){e=r.call(n,e,t)})),e},Hf=$f,Qf=Mf,Gf=Tl;function Wf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gf("canceled")}var Kf=cl,Jf=function(e,t){t=t||{};var r={};function n(e,t){return Kf.isPlainObject(e)&&Kf.isPlainObject(t)?Kf.merge(e,t):Kf.isPlainObject(t)?Kf.merge({},t):Kf.isArray(t)?t.slice():t}function i(r){return Kf.isUndefined(t[r])?Kf.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function a(e){if(!Kf.isUndefined(t[e]))return n(void 0,t[e])}function o(r){return Kf.isUndefined(t[r])?Kf.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function s(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s};return Kf.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,n=t(e);Kf.isUndefined(n)&&t!==s||(r[e]=n)})),r},Yf=pf,Xf={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Xf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var Zf={};Xf.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Yf+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,a){if(!1===e)throw new Error(n(i," has been removed"+(t?" in "+t:"")));return t&&!Zf[i]&&(Zf[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}};var eh={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),i=n.length;i-- >0;){var a=n[i],o=t[a];if(o){var s=e[a],c=void 0===s||o(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+a)}},validators:Xf},th=cl,rh=fl,nh=dl,ih=function(e){return Wf(e),e.headers=e.headers||{},e.data=Vf.call(e,e.data,e.headers,e.transformRequest),e.headers=Uf.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Uf.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Qf.adapter)(e).then((function(t){return Wf(e),t.data=Vf.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Hf(t)||(Wf(e),t&&t.response&&(t.response.data=Vf.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ah=Jf,oh=eh,sh=oh.validators;function ch(e){this.defaults=e,this.interceptors={request:new nh,response:new nh}}ch.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=ah(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&oh.assertOptions(r,{silentJSONParsing:sh.transitional(sh.boolean),forcedJSONParsing:sh.transitional(sh.boolean),clarifyTimeoutError:sh.transitional(sh.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var a,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!i){var s=[ih,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(o),a=Promise.resolve(t);s.length;)a=a.then(s.shift(),s.shift());return a}for(var c=t;n.length;){var u=n.shift(),l=n.shift();try{c=u(c)}catch(e){l(e);break}}try{a=ih(c)}catch(e){return Promise.reject(e)}for(;o.length;)a=a.then(o.shift(),o.shift());return a},ch.prototype.getUri=function(e){return e=ah(this.defaults,e),rh(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},th.forEach(["delete","get","head","options"],(function(e){ch.prototype[e]=function(t,r){return this.request(ah(r||{},{method:e,url:t,data:(r||{}).data}))}})),th.forEach(["post","put","patch"],(function(e){ch.prototype[e]=function(t,r,n){return this.request(ah(n||{},{method:e,url:t,data:r}))}}));var uh=ch,lh=Tl;function fh(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new lh(e),t(r.reason))}))}fh.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},fh.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},fh.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},fh.source=function(){var e;return{token:new fh((function(t){e=t})),cancel:e}};var hh=fh,ph=cl,dh=cl,mh=Xu,gh=uh,vh=Jf;var yh=function e(t){var r=new gh(t),n=mh(gh.prototype.request,r);return dh.extend(n,gh.prototype,r),dh.extend(n,r),n.create=function(r){return e(vh(t,r))},n}(Mf);yh.Axios=gh,yh.Cancel=Tl,yh.CancelToken=hh,yh.isCancel=$f,yh.VERSION=pf,yh.all=function(e){return Promise.all(e)},yh.spread=function(e){return function(t){return e.apply(null,t)}},yh.isAxiosError=function(e){return ph.isObject(e)&&!0===e.isAxiosError},Yu.exports=yh,Yu.exports.default=yh;var bh=Yu.exports;function wh(e){return e}function xh(e){var t=[];if(e)return Array.isArray(e)?e:("object"==typeof e&&Object.keys(e).forEach((function(r){"number"==typeof r&&(t[r]=e[r])})),t)}function kh(e){if(bh.isCancel(e))return Promise.reject(e);var t=Sh(e)||{};if(t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry="number"==typeof t.retry?t.retry:3,t.retryDelay="number"==typeof t.retryDelay?t.retryDelay:100,t.instance=t.instance||bh,t.backoffType=t.backoffType||"exponential",t.httpMethodsToRetry=xh(t.httpMethodsToRetry)||["GET","HEAD","PUT","OPTIONS","DELETE"],t.noResponseRetries="number"==typeof t.noResponseRetries?t.noResponseRetries:2,t.checkRetryAfter="boolean"!=typeof t.checkRetryAfter||t.checkRetryAfter,t.maxRetryAfter="number"==typeof t.maxRetryAfter?t.maxRetryAfter:3e5,t.statusCodesToRetry=xh(t.statusCodesToRetry)||[[100,199],[429,429],[500,599]],e.config=e.config||{},e.config.raxConfig=Object.assign({},t),!(t.shouldRetry||Eh)(e))return Promise.reject(e);var r=new Promise((function(r,n){var i=0;if(t.checkRetryAfter&&e.response&&e.response.headers["retry-after"]){var a=function(e){var t=Number(e);if(!Number.isNaN(t))return 1e3*t;var r=Date.parse(e);return Number.isNaN(r)?void 0:r-Date.now()}(e.response.headers["retry-after"]);if(!(a&&a>0&&a<=t.maxRetryAfter))return n(e);i=a}e.config.raxConfig.currentRetryAttempt+=1;var o=e.config.raxConfig.currentRetryAttempt;0===i&&(i="linear"===t.backoffType?1e3*o:"static"===t.backoffType?t.retryDelay:(Math.pow(2,o)-1)/2*1e3,"number"==typeof t.maxRetryDelay&&(i=Math.min(i,t.maxRetryDelay))),setTimeout(r,i)})),n=t.onRetryAttempt?Promise.resolve(t.onRetryAttempt(e)):Promise.resolve();return Promise.resolve().then((function(){return r})).then((function(){return n})).then((function(){return t.instance.request(e.config)}))}function Eh(e){var t=e.config.raxConfig;if(!t||0===t.retry)return!1;if(!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries)return!1;if(!e.config.method||t.httpMethodsToRetry.indexOf(e.config.method.toUpperCase())<0)return!1;if(e.response&&e.response.status){for(var r=!1,n=0,i=t.statusCodesToRetry;n<i.length;n+=1){var a=i[n],o=e.response.status;if(o>=a[0]&&o<=a[1]){r=!0;break}}if(!r)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}function Sh(e){if(e&&e.config)return e.config.raxConfig}var Ph=Object.freeze({__proto__:null,attach:function(e){return(e=e||bh).interceptors.response.use(wh,kh)},detach:function(e,t){(t=t||bh).interceptors.response.eject(e)},shouldRetryRequest:Eh,getConfig:Sh}),_h=ce(Ph);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=L.default,r=mr,n=Dr.exports,i=zr.exports,a=I.default,o=Mn,s=xi,c=xo,u=Qs,l=Ks,f=Js,h=yc,p=bc,d=wc,m=xc,g=kc,v=M.default,y=Ec,b=Sc,w=Pc,x=_c,k=Ac,E=Cc,S=Fc,P=Oc,_=Tc,A=Ic,C=zc,F=nu,D=Qu,O=Ku,R=Ju,T=bh,j=_h,q=Tr.exports;function z(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var N=z(r),B=z(n),$=z(i),U=z(a),V=z(c),H=z(u),Q=z(l),G=z(v),W=z(F),K=z(D),J=z(T),Y=z(j),X=z(q);function Z(e){return"string"==typeof e&&e.startsWith("@encrypted:")}function ee(e,t){return B.default.encrypt(e,t).toString()}function te(e,t){try{return B.default.decrypt(e,t).toString($.default)}catch{return""}}var re=Object.freeze({__proto__:null,encrypt:ee,decrypt:te});class ne{constructor(e,t,r){this.key=void 0,this.values=void 0,this.schema=void 0,this.values=e,this.schema=t,this.key=r}setKey(e){this.key=e}getValues(){return this.values}setValues(e){const r=new N.default({removeAdditional:!0,useDefaults:!0,allErrors:!0}).compile(this.schema);if(!r(e=t.cloneDeep(e)))for(const n of r.errors)e=t.omit(e,n.dataPath.substr(1).split("/"));this.values=e}getValue(e,r){return t.get(this.values,e,r)}setValue(e,r){return t.set(this.values,e,r)}toObject(){const e=new N.default({removeAdditional:!0,useDefaults:!0,allErrors:!0});e.removeKeyword("default"),e.addKeyword("default",{validate:(e,r,n,i,a,o,s)=>(t.isEqual(e,r)&&(delete a[o],t.isEmpty(a)&&function(e,r){const n=[];let i=e;for(let e=0;e<r.length-1;e++)n.push(i),i=i[r[e]];for(let e=r.length-2;e>=0;e--)t.isEmpty(n[e][r[e]])&&delete n[e][r[e]]}(s,t.toPath(i.substr(1)))),!0),modifying:!0,errors:!1}),e.addKeyword("encrypt",{validate:(e,r,n,i,a,o)=>(this.key&&e&&!Z(r)&&a&&o&&t.set(a,o,"@encrypted:"+ee(r,this.key)),!0),modifying:!0,errors:!1});const r=e.compile(this.schema),n=t.cloneDeep(this.values);return r(n),n}static createFromObject(e,r,n){const i=new N.default({removeAdditional:!0,useDefaults:!0,allErrors:!0});i.addKeyword("encrypt",{validate:(e,r,i,a,o,s)=>(n&&e&&Z(r)&&o&&s&&t.set(o,s,te(r.substr(11),n)),!0),modifying:!0,errors:!1});const a=i.compile(r);if(!a(e))for(const r of a.errors)e=t.omit(e,r.dataPath.substr(1).split("/"));return new this(e,r,n)}}class ie extends ne{constructor(){super(...arguments),this.pluginsConfig={}}getStructure(e){return this.getValue(["structure",e])}getPluginConfig(e,r){if(!this.pluginsConfig[e]){const n=this.getValue(["pluginsConfig",e],{});this.pluginsConfig[e]=ne.createFromObject(t.cloneDeep(n),r,this.key+":"+e)}return this.pluginsConfig[e]}setPluginConfig(e,r){const n=r.toObject();t.isEmpty(n)?t.unset(this.values,["pluginsConfig",e]):this.setValue(["pluginsConfig",e],n),delete this.pluginsConfig[e]}static createFromObject(e){return super.createFromObject(e,ie.schema)}}ie.file="book.json",ie.schema={title:"TopWrite Configuration",type:"object",properties:{root:{type:"string",title:"Path from the root folder containing the book's content"},title:{type:"string",title:"Title of the book"},author:{type:"object",title:"attr of the author",properties:{name:{type:"string"},email:{type:"string"},home:{type:"string"}}},theme:{type:"string",title:"Name of the theme",default:"default"},themeConfig:{type:"object",title:"Configuration for theme",properties:{defaultMode:{type:"string",title:"Default mode form theme",default:"light"},primaryColor:{type:"string",title:"Primary Color form theme",default:"#3c60ff"}},default:{}},plugins:{type:"array",items:{type:"string"},default:[]},pluginsConfig:{type:"object",title:"Configuration for plugins",default:{}},structure:{type:"object",properties:{langs:{default:"LANGS.md",type:"string",title:"File to use as languages index",pattern:"^[a-zA-Z-._\\d,\\s]+$"},readme:{default:"README.md",type:"string",title:"File to use as preface",pattern:"^[a-zA-Z-._\\d,\\s]+$"},summary:{default:"SUMMARY.md",type:"string",title:"File to use as table of contents",pattern:"^[a-zA-Z-._\\d,\\s]+$"}},default:{}},pdf:{type:"object",title:"PDF specific configurations",properties:{fontFamily:{type:"string",default:"Microsoft Yahei",title:"Font family for the PDF output"},margin:{type:"object",title:"Margins (unit: pt)",properties:{right:{type:"integer",title:"Right Margin",minimum:0,maximum:100,default:30},left:{type:"integer",title:"Left Margin",minimum:0,maximum:100,default:30},top:{type:"integer",title:"Top Margin",minimum:0,maximum:100,default:40},bottom:{type:"integer",title:"Bottom Margin",minimum:0,maximum:100,default:40}},default:{}},paperSize:{type:"string",enum:["a0","a1","a2","a3","a4","a5","a6","b0","b1","b2","b3","b4","b5","b6","legal","letter"],default:"a4",title:"Paper size for the PDF"},chapterMark:{type:"string",enum:["pagebreak","rule","both","none"],default:"pagebreak",title:"How to mark detected chapters"},pageBreaksBefore:{type:"string",default:"/",title:'An XPath expression. Page breaks are inserted before the specified elements. To disable use the expression: "/"'},pageNumbers:{type:"boolean",default:!0,title:"Add page numbers to the bottom of every page"}},default:{}}},required:[]};class ae{constructor(e){void 0===e&&(e=[]),this.data=void 0,this.data="string"==typeof e?e.split(".").map((e=>parseInt(e,10))):e}getRoot(){return new ae(this.data.slice(0,1))}getParent(){return new ae(this.data.slice(0,-1))}createChild(e){return new ae(this.data.concat(e))}isDescendant(e){return e.toString().startsWith(this.toString()+".")}getNext(){const e=[...this.data];return e[e.length-1]++,new ae(e)}getDepth(){return this.data.length-1}eq(e){return this.toString()===e.toString()}getLeafIndex(){return this.data[this.data.length-1]-1}toString(){return this.data.join(".")}static compare(e,t){for(let r=0;r<Math.max(e.data.length,t.data.length);r++){let n=e.data[r]||0,i=t.data[r]||0;if(n>i)return 1;if(i>n)return-1}return 0}}class oe{constructor(e){let{title:t,ref:r,path:n,children:i=[]}=e;this.level=void 0,this.title=void 0,this.ref=void 0,this.path=void 0,this.children=void 0,this.title=t,this.ref=r,this.path=n||a.posix.format({...a.posix.parse(this.ref),ext:".html",base:""}),this.children=i,this.level=new ae}getLevel(){return this.level}getTitle(){return this.title}getRef(){return this.ref}getPath(){return this.path}getArticles(){return this.children}getDepth(){return this.getLevel().getDepth()}createChildLevel(){return this.level.createChild(this.children.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.children.entries())r.indexLevels(e.createChild(t+1))}static findArticle(e,t){return e.getArticles().reduce(((e,r)=>e||(t(r)?r:oe.findArticle(r,t))),void 0)}static createFromObject(e){var t;const r=null==(t=e.children)?void 0:t.map((e=>oe.createFromObject(e)));return new oe({...e,children:r})}}class se{constructor(e,t,r){void 0===t&&(t=[]),this.level=void 0,this.id=void 0,this.title=void 0,this.articles=void 0,this.level=new ae,this.id=r,this.title=e,this.articles=t}getLevel(){return this.level}getTitle(){return this.title}getArticles(){return this.articles}createChildLevel(){return this.level.createChild(this.articles.length+1)}indexLevels(e){e?this.level=e:e=this.level;for(const[t,r]of this.articles.entries())r.indexLevels(e.createChild(t+1))}static createFormObject(e){var t;return new se(e.title,null==(t=e.articles)?void 0:t.map((e=>oe.createFromObject(e))),e.id)}}const ce={tokenize:function(e,t,r){function n(t){return t===m.codes.rightParenthesis?f(t):w.factoryDestination(e,i,r,d.types.resourceDestination,d.types.resourceDestinationLiteral,d.types.resourceDestinationLiteralMarker,d.types.resourceDestinationRaw,d.types.resourceDestinationString,g.constants.linkResourceDestinationBalanceMax)(t)}function i(t){return x.markdownLineEndingOrSpace(t)?b.factoryWhitespace(e,a)(t):f(t)}function a(t){return t===m.codes.quotationMark||t===m.codes.apostrophe||t===m.codes.leftParenthesis?E.factoryTitle(e,b.factoryWhitespace(e,o),r,d.types.resourceTitle,d.types.resourceTitleMarker,d.types.resourceTitleString)(t):o(t)}function o(t){return t===m.codes.equalsTo?(e.enter("resourceSize"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),s):f(t)}function s(t){return t===m.codes.lowercaseX?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),u):t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeWidth"),e.enter(d.types.chunkString,{contentType:"string"}),c(t))}function c(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("resourceSizeWidth"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):t===m.codes.lowercaseX?(e.exit(d.types.chunkString),e.exit("resourceSizeWidth"),e.enter("resourceSizeMarker"),e.consume(t),e.exit("resourceSizeMarker"),u):(e.consume(t),c)}function u(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.enter("resourceSizeHeight"),e.enter(d.types.chunkString,{contentType:"string"}),l(t))}function l(t){return t===m.codes.rightParenthesis||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("resourceSizeHeight"),e.exit("resourceSize"),b.factoryWhitespace(e,f)(t)):(e.consume(t),l)}function f(n){return n===m.codes.rightParenthesis?(e.enter(d.types.resourceMarker),e.consume(n),e.exit(d.types.resourceMarker),e.exit(d.types.resource),t):r(n)}return function(t){return e.enter(d.types.resource),e.enter(d.types.resourceMarker),e.consume(t),e.exit(d.types.resourceMarker),b.factoryWhitespace(e,n)}}},ue={tokenize:function(e,t,r){const n=this;function i(e){return n.parser.defined.includes(y.normalizeIdentifier(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}return function(t){return G.default.strictEqual(t,m.codes.leftSquareBracket,"expected left bracket"),k.factoryLabel.call(n,e,i,r,d.types.reference,d.types.referenceMarker,d.types.referenceString)(t)}}},le={tokenize:function(e,t,r){function n(n){return 93===n?(e.enter(d.types.referenceMarker),e.consume(n),e.exit(d.types.referenceMarker),e.exit(d.types.reference),t):r(n)}return function(t){return e.enter(d.types.reference),e.enter(d.types.referenceMarker),e.consume(t),e.exit(d.types.referenceMarker),n}}};var fe={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,a,o=n.events.length;for(;o--;)if((n.events[o][1].type===d.types.labelImage||n.events[o][1].type===d.types.labelLink)&&!n.events[o][1]._balanced){i=n.events[o][1];break}function s(e){return i._balanced=!0,r(e)}function c(r){return r===m.codes.leftParenthesis?e.attempt(ce,t,a?t:s)(r):r===m.codes.leftSquareBracket?e.attempt(ue,t,a?e.attempt(le,t,s):s)(r):a?t(r):s(r)}return function(t){return G.default(t===m.codes.rightSquareBracket,"expected `]`"),i?i._inactive?s(t):(a=n.parser.defined.indexOf(y.normalizeIdentifier(n.sliceSerialize({start:i.end,end:n.now()})))>-1,e.enter(d.types.labelEnd),e.enter(d.types.labelMarker),e.consume(t),e.exit(d.types.labelMarker),e.exit(d.types.labelEnd),c):r(t)}},resolveTo:p.labelEnd.resolveTo,resolveAll:p.labelEnd.resolveAll};const he=(e,t,r)=>{const n=h.image(e,t,r);return e.width||e.height?n.replace(/\)$/," ="+(e.width||"")+(e.height?"x"+e.height:"")+")"):n};he.peek=h.image.peek;const pe=e=>{let t;switch(e){case"right":t="--: ";break;case"center":t=":-: ";break;default:t=""}return t},de={name:"blockQuote",tokenize:function(e,t,r){const n=this;return function(t){if(t===m.codes.greaterThan){const r=n.containerState;return G.default(r,"expected `containerState` to be defined in container"),r.open||(e.enter(d.types.blockQuote,{_container:!0}),r.open=!0),e.enter(d.types.blockQuotePrefix),e.enter(d.types.blockQuoteMarker),e.consume(t),e.exit(d.types.blockQuoteMarker),A.factorySpace(e,i,d.types.whitespace)}return r(t)};function i(t){return t===m.codes.leftSquareBracket?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),a):s(t)}function a(t){return t===m.codes.rightSquareBracket||x.markdownLineEndingOrSpace(t)?(e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),s):(e.enter("blockQuoteType"),e.enter(d.types.chunkString,{contentType:"string"}),o(t))}function o(t){return t===m.codes.rightSquareBracket||x.markdownLineEndingOrSpace(t)?(e.exit(d.types.chunkString),e.exit("blockQuoteType"),e.enter("blockQuoteTypeMarker"),e.consume(t),e.exit("blockQuoteTypeMarker"),s):(e.consume(t),o)}function s(r){return x.markdownSpace(r)?(e.enter(d.types.blockQuotePrefixWhitespace),e.consume(r),e.exit(d.types.blockQuotePrefixWhitespace),e.exit(d.types.blockQuotePrefix),t):(e.exit(d.types.blockQuotePrefix),t(r))}},continuation:{tokenize:function(e,t,r){return A.factorySpace(e,e.attempt(de,t,r),d.types.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:g.constants.tabSize)}},exit:p.blockQuote.exit},me=function(e,t){void 0===t&&(t="text");let r="";return S.visit(e,t,(function(e){r+=e.value})),r},ge=/^\[toc(?:=(\d)(?:,(\d))?)?]$/im,ve=s.unified().use(V.default).use((function(){const e=this.data();e.micromarkExtensions=[],e.fromMarkdownExtensions=[],e.toMarkdownExtensions=[],e.toHastExtensions=[]})).use(K.default).use(W.default,["yaml"]).use(H.default).use(Q.default).use(O.remarkHeadingId).use((function(){return this.data().toHastExtensions.push({xBlock:(e,t)=>e({},"x-block",{name:t.name,value:t.value,parameter:t.parameter}),xInline:(e,t)=>e({},"x-inline",{name:t.name,value:t.value})}),function(e){S.visit(e,((e,t,r)=>{if(null!==t&&null!==r)if((e=>"code"===e.type)(e)&&e.lang){const n=/\[([\w-_]+)(:([\w-_]+))?]/g.exec(e.lang);if(n){const i={type:"xBlock",name:n[1],parameter:n[3]||"",value:e.value,position:e.position};r.children.splice(t,1,i)}}else if((e=>"inlineCode"===e.type)(e)){const n=/^([^\s]+)\s(.*?)\s\1$/.exec(e.value);if(n){const i={type:"xInline",name:n[1],value:n[2],position:e.position};r.children.splice(t,1,i)}}}))}})).use((function(){const e=this.data();e.micromarkExtensions.push({text:{[m.codes.rightSquareBracket]:fe}}),e.fromMarkdownExtensions.push({enter:{resourceSizeWidth:function(){this.buffer()},resourceSizeHeight:function(){this.buffer()}},exit:{resourceSizeWidth:function(){const e=this.resume();this.stack[this.stack.length-1].width=e},resourceSizeHeight:function(){const e=this.resume();this.stack[this.stack.length-1].height=e}}}),e.toMarkdownExtensions.push({handlers:{image:he}}),e.toHastExtensions.push({image:(e,t)=>{const r={src:f.encode(t.url),alt:t.alt};return null!==t.title&&void 0!==t.title&&(r.title=t.title),r.width=t.width,r.height=t.height,e(t,"img",r)}})})).use((function(){return this.data().toMarkdownExtensions.push({handlers:{paragraph:(e,t,r)=>{const n=P.paragraph(e,t,r);return pe(e.align)+n},heading:(e,t,r)=>_.heading(e,t,r).replace(/^#+\s/,"$&"+pe(e.align))}}),function(e){S.visit(e,((e,t,r)=>{if((e=>"paragraph"===e.type||"heading"===e.type)(e)){const t=o.select("text",e);if(t){const n=t.value;n.startsWith("--: ")?e.align="right":n.startsWith(":-: ")?e.align="center":n.startsWith(":-- ")&&(e.align="left"),e.align&&(t.value=n.substr(4),r&&"listItem"===r.type?r.data={...r.data,hProperties:{className:"align-"+e.align}}:e.data={...e.data,hProperties:{className:"align-"+e.align}})}}}))}})).use((function(){const e=this.data();return e.toMarkdownExtensions.push({handlers:{blockquote:(e,t,r)=>{const n=C.blockquote(e,t,r);return e.variant?n.replace(/(^|\s+)>\s/,"$1> ["+e.variant+"] "):n}}}),e.micromarkExtensions.push({document:{[m.codes.greaterThan]:de}}),e.fromMarkdownExtensions.push({enter:{blockQuoteType:function(){this.buffer()}},exit:{blockQuoteType:function(){const e=this.resume();this.stack[this.stack.length-1].variant=e}}}),function(e){S.visit(e,"blockquote",(e=>{e.variant&&(e.data={...e.data,hProperties:{className:e.variant}})}))}})).use((function(){return function(e){S.visit(e,((e,t,r)=>{if(r&&"root"===r.type&&null!==t&&me(e).match(ge))return r.children.splice(t,1),[S.SKIP,t]}))}}));function ye(e){const t=[];for(const r of e.children){const e=r.children,n=o.select("paragraph:first-child>*",r);if(!n||!n.url)continue;const i=me(n);if(!i)continue;const a=decodeURI(n.url);if(a&&a.match(/[\\:*?"<>|]/))continue;let s={title:i,ref:a};if(e.length>1){const t=e[e.length-1];R.is(t,"list")&&(s.children=ye(t))}t.push(s)}return t}const be=ve();class we{constructor(e){void 0===e&&(e=[]),this.parts=void 0,this.parts=e,this.indexLevels()}getParts(){return this.parts}getPart(e){return this.parts[e]}getLastPart(){return this.parts[this.parts.length-1]}getArticles(){const e=[];return this.getArticle((t=>(e.push(t),!1))),e}getArticle(e,t){return this.parts.reduce(((r,n)=>r||(!t||t(n)?oe.findArticle(n,e):void 0)),void 0)}getArticlePart(e){const t=e.getLevel().getRoot();return this.getByLevel(t)}getFirstPath(){const e=this.getArticle((e=>!!e.getPath()));if(e)return e.getPath()}getByLevel(e){const t=t=>t.getLevel().eq(e);return this.parts.reduce(((e,r)=>e||(t(r)?r:oe.findArticle(r,t))),void 0)}getFirstArticle(){return this.getArticle((()=>!0))}getNextArticle(e){const t=e instanceof oe?e.getLevel():e;let r=!1;return this.getArticle((e=>!!r||(r=e.getLevel()==t,!1)))}getPrevArticle(e){const t=e instanceof oe?e.getLevel():e;let r;return this.getArticle((e=>e.getLevel()==t||(r=e,!1))),r}getParent(e){const t=(e instanceof oe?e.getLevel():e).getParent();if(t)return this.getByLevel(t)}indexLevels(){for(const[e,t]of this.parts.entries()){const r=new ae(String(e+1));t.indexLevels(r)}}isSinglePart(){return 1===this.parts.length&&!this.parts[0].title}isEmpty(){return this.isSinglePart()?0===this.parts[0].articles.length:0===this.parts.length}static createFromObject(e){return new we(e.map((e=>se.createFormObject(e))))}static createFromText(e){const t=function(e){const t=be.parse(e),r=[];let n;for(const e of t.children)if(R.is(e,"heading")&&[2,3].includes(e.depth)&&(n&&r.push(n),n={id:me(e,"idString").trim(),title:me(e).trim()}),R.is(e,"list")){const t=ye(e);n?n.articles=(n.articles||[]).concat(t):n={title:"",articles:t}}return n?r.push(n):r.push({title:""}),r}(e);return we.createFromObject(t)}static create(e){return"object"==typeof e?we.createFromObject(e):we.createFromText(e)}}class xe{constructor(e){let{host:t,preset:r}=e;this.host=void 0,this.preset=void 0,this.host=t,this.preset=r}getBuyUrl(e,t){return this.host+"/api/buy?book="+e.id+"&plugin="+t.name}async bought(e,t){try{return await J.default.get(this.host+"/api/bought?book="+e.id+"&plugin="+t.name),!0}catch{return!1}}async queryPlugins(e){let{page:t=1,...r}=e;const{data:n}=await J.default.get(this.host+"/api/query",{params:{...r,page:t}});return n}async getInstalled(e){const{config:t}=e,r=["theme-"+t.getValue("theme"),...t.getValue("plugins")];if(this.preset)for(const[e,n]of Object.entries(this.preset))r.push(e),t.setValue(["pluginsConfig",e],n);const{data:n}=await J.default.get(this.host+"/api/installed",{params:{book:e.id,plugins:r.join(",")}}).catch((e=>{throw new Error("Plugins Check Failed:"+e.message)}));return n.filter((e=>!e.builtin||this.preset&&this.preset[e.name]))}}e.pluginCenter=void 0;class ke{constructor(e,t,r){this.flatColors=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#f39c12","#d35400","#c0392b"],this.letter=void 0,this.size=void 0,this.canvas=void 0,this.letter=e,this.size=t,this.canvas=r,this.generate()}toDataUrl(){return this.canvas.toDataURL()}generate(){const e=this.canvas.getContext("2d");if(!e)throw new Error("getContext failed");const t=this.letter[0].toUpperCase();e.fillStyle=this.flatColors[t.charCodeAt(0)%this.flatColors.length],e.fillRect(0,0,this.size,this.size),e.font=Math.round(this.size/2)+"px Roboto",e.textAlign="center",e.fillStyle="#FFFFFF",e.fillText(this.letter[0].toUpperCase(),this.size/2,this.size/1.5)}static create(e,t,r){return r||(r=function(e){const t=window.document.createElement("canvas");return t.width=e,t.height=e,t}(t)),new ke(e,t,r)}}const Ee=/^(?:\w+:)?\/\/(\S+)$/,Se=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,Pe=/^[^\s\.]+\.\S{2,}$/;Y.default.attach(),J.default.defaults.maxContentLength=1/0,J.default.defaults.maxBodyLength=1/0,Object.defineProperty(e,"request",{enumerable:!0,get:function(){return J.default}}),e.BaseConfig=ne,e.Book=class{constructor(e,t,r){this.id=void 0,this.summary=void 0,this._config=void 0,this.id=e,this.summary=r,this.config=t}get config(){return this._config}set config(e){e.setKey(this.id+":config"),this._config=e}},e.Config=ie,e.File=class{constructor(e){let{path:t,content:r,meta:n={}}=e;this.path=void 0,this.content=void 0,this.meta=void 0,this.path=t,this.content=r,this.meta=n}getMeta(e,r){return t.get(this.meta,e,r)}relative(e){const t="/"===e.slice(-1);return(e=U.default.posix.relative(U.default.posix.dirname(this.path),e)||".")+(t?"/":"")}resolve(e){return U.default.posix.join(U.default.posix.dirname(this.path),e)}},e.LetterAvatar=ke,e.Level=ae,e.Summary=we,e.SummaryArticle=oe,e.SummaryPart=se,e.aes=re,e.createPluginCenter=function(t){return e.pluginCenter=new xe(t)},e.isEncryptedData=Z,e.isUrl=function(e){const t=e.match(Ee);if(!t)return!1;const r=t[1];return!!r&&(Se.test(r)||Pe.test(r))},e.markdown=ve,e.md5=function(e){return X.default(e).toString()}}(ue);class Ah{name;version;path;hooks;config;constructor({name:e,version:t,path:r,hooks:n,config:i}){this.name=e,this.version=t,this.path=r,this.hooks=n,this.config=i}getHook(e){return this.hooks[e]}getContext(e){return{...e,getConfig:()=>e.book.config.getPluginConfig(this.name,this.config)}}}async function Ch(e,t){ae.info(`installing plugin "${e.name}"`);const r=`npm install ${e.host}.tgz`,{error:n}=V.default.sync(r,{stdio:["inherit"],cwd:t,shell:!0});if(n)throw n;const i=I.default.join(t,"node_modules","topwrite-plugin-"+e.name),a=I.default.join(i,"dist","hooks.js");let o={};if(H.existsSync(a)){o=new d.NodeVM({require:{builtin:["path/posix","crypto"]},sandbox:{URL:URL,URLSearchParams:URLSearchParams}}).runFile(a)}const s=I.default.join(i,"config.json");let c={};return H.existsSync(s)&&(c=require(s)),ae.info(`plugin "${e.name}@${e.version}" installed with success`),new Ah({name:e.name,version:e.version,path:i,hooks:o,config:c})}const Fh=/(^-{3}(?:\r\n|\r|\n)([\w\W]*?)-{3}(?:\r\n|\r|\n))?([\w\W]*)*/;class Dh extends class{book;sourceFS;tmpFS;dest;options;plugins=[];constructor(e,t,r,n,i){this.book=e,this.sourceFS=t,this.tmpFS=r,this.options=n,this.dest=i}getContext(){return{book:this.book,sourceFS:this.sourceFS,tmpFS:this.tmpFS,request:ue.request,logger:ae,format:this.format}}async generate(){await this.initLfs(),await this.initPlugins(),await this.onInit(),await this.callHook("init"),await this.generateLogo(),await this.onSummary(),await this.callHook("summary"),await this.generateArticles(),await this.callHook("articles"),await this.callHook("beforeFinish")&&(await this.onFinish(),await this.callHook("finish")),ae.success("generation finished with success!")}async initLfs(){if(this.options.lfs){ae.info("generate lfs files...");let e="git lfs ls-files -l";const{config:t}=this.book,r=t.getValue("root","");r&&(e+=` --include ${r}`);const{error:n,stdout:i}=V.default.sync(e,{stdio:["inherit"],encoding:"utf8",cwd:this.sourceFS.root,shell:!0}),a={};n||i.trim().split("\n").forEach((e=>{if(e){const[t,n]=e.trim().split(/\s[-*]\s/);if(t&&n){let e=n.trim();r&&(e=I.default.relative(r,e)),a[e]=t.trim()}}})),this.options.lfs.files=a,ae.info(`found ${Object.keys(a).length} files`)}}async initPlugins(){this.plugins=await async function(e,t,r){const n=ue.createPluginCenter(r),i=await n.getInstalled(e),a=[];ae.info(`installing ${i.length} plugins from registry`);for(let e of i)try{if(e.disabled){ae.warn('plugin "'+e.name+'" has been disabled');continue}a.push(await Ch(e,t))}catch(t){ae.warn('plugin "'+e.name+'" installed with fail'),ae.warn(t.message)}return a}(this.book,this.tmpFS.root,this.options.plugins)}async generateLogo(){if(!this.tmpFS.exist("logo.png")){const e=this.book.config.getValue("title","Untitled"),t=g.createCanvas(60,60);ue.LetterAvatar.create(e,60,t);const r=t.toBuffer("image/png");await this.tmpFS.writeFile("logo.png",r)}}async generateArticles(){ae.info("generate articles ...");const e=this.book.summary.getArticles();ae.info(`found ${e.length} articles`);for(const t of e)if(t.ref){ae.info('generate article "'+t.getRef()+'"');try{await this.onArticle(t),await this.callHook("article",t)}catch(e){"ENOENT"===e.code?ae.warn(`article file [${t.ref}] not exist`):ae.warn(`generate article [${t.ref}] failed: ${e.message}`)}}}async callHook(e,...t){return ae.debug('calling hook "'+e+'"'),await(async(e,t)=>{for(let r of e)if(!await t(r))return!1;return!0})(this.plugins,(async r=>{const n=r.getHook(e);return!n||await n.apply(r.getContext(this.getContext()),t)}))}async makeFile(e){const t=await this.tmpFS.readAsString(e.ref),r=this.parseFileMeta(e.ref,t);return new ue.File({path:e.path,...r})}parseFileMeta(e,t){const r=t.match(Fh);let n={};if(r){if(void 0!==r[2])try{n=G.default.load(r[2])||{}}catch{}t=void 0!==r[3]?r[3]:""}const i=I.default.join(this.book.config.getValue("root",""),e);return n.mtime=this.sourceFS.readFileMTime(i),{meta:n,content:t}}}{format="json";async onInit(){this.processSummary()}processSummary(){this.book.summary.getArticle((e=>(e.path=y.pinyin(e.path,{toneType:"none",nonZh:"consecutive",type:"array"}).join(""),!1)))}async onArticle(e){const t=await this.makeFile(e);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(e.path+".json",this.stringify(t))}async onSummary(){const e=await this.makeFile({path:"index.html",ref:"README.md"});await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html.json",this.stringify(e));const t=this.book.summary;await this.tmpFS.unlink("SUMMARY.md"),await this.tmpFS.writeFile("SUMMARY.json",this.stringify(t.toObject()))}async onFinish(){await this.packBook()}async packBook(){ae.info("pack book ...");const e=W.default.createWriteStream(this.dest);await this.tmpFS.archive(e,"tar")}stringify(e){return JSON.stringify(e,null,4)}}class Oh{root;constructor(e){this.root=e}readFileMTime(e){const t=`git log --pretty=format:%cI -1 -- ${e}`,{error:r,stdout:n}=V.default.sync(t,{stdio:["inherit"],encoding:"utf8",cwd:this.root,shell:!0});if(!r)return n}createReadStream(e,t){return W.default.createReadStream(this.resolve(e),t)}async readFile(e){return await W.default.readFile(this.resolve(e))}async readAsObject(e){try{return await W.default.readJSON(this.resolve(e))}catch{return{}}}async readAsString(e){try{return await W.default.readFile(this.resolve(e),"utf-8")}catch{return""}}async writeFile(e,t){return W.default.writeFile(this.resolve(e),t)}createWriteStream(e,t){return e=this.resolve(e),W.default.ensureDirSync(I.default.dirname(e)),W.default.createWriteStream(e,t)}async appendFile(e,t){return W.default.appendFile(this.resolve(e),t)}exist(e){return W.default.pathExistsSync(this.resolve(e))}async unlink(e){try{await W.default.unlink(this.resolve(e))}catch{}}async readDir(e=""){const t=[];return new Promise((r=>{K.default({path:this.resolve(e),ignoreFiles:[".gitignore",".bookignore"]}).on("child",(function(e){t.push({type:e.type,path:e.path.substr(e.root.path.length+1)})})).on("close",(()=>{r(t)}))}))}resolve(...e){return I.default.join(this.root,...e)}async archive(e,t="tar"){if("tar"==t)return new Promise(((t,r)=>{x.pack(this.root,{fromBase:!0,ignoreFiles:[".gitignore",".bookignore"]}).pipe(e).on("error",(e=>{r(e)})).on("close",(()=>{t()}))}));{const r=await this.readDir();return new Promise(((n,i)=>{e.on("error",(e=>{i(e)})),e.on("close",(()=>{n()}));const a=J.default(t,{gzip:!0,gzipOptions:{level:9},zlib:{level:9}});a.pipe(e);for(const e of r)"File"===e.type&&a.append(this.createReadStream(e.path),{name:e.path});a.finalize()}))}}}class Rh extends Dh{template;scripts=[];stylesheets=[];headScripts=[];format="html";async onInit(){await super.onInit(),await this.installCommonAssets(),await this.installReader(),await this.copyPluginsAssets(),await this.initTemplate()}initTemplate(){const e=W.default.readFileSync(I.default.resolve(__dirname,"../templates/html.ejs"),"utf-8");this.template=Y.default.compile(e)}async installCommonAssets(){ae.info("installing common assets ..."),await this.installPackage("lodash","lodash.min.js","lodash/lodash.min.js"),await this.installPackage("react","umd/react.production.min.js","react/react.production.min.js"),await this.installPackage("react-dom","umd/react-dom.production.min.js","react-dom/react-dom.production.min.js"),ae.info("common assets installed with success")}async installReader(){ae.info("installing package @topwrite/reader ...");const e=await this.installPackage("@topwrite/reader","dist/","reader");ae.info(`package @topwrite/reader@${e.version} installed with success`)}async installPackage(e,t,r){const n=require.resolve(`${e}/package.json`),i=I.default.join(I.default.dirname(n),t),a=I.default.join(this.tmpFS.root,"asset",r);await W.default.copy(i,a);const o=require(n);return t.endsWith("/")&&(r=`${r}/index.js`),this.scripts.push(`asset/${r}?v=${o.version}`),o}async copyPluginsAssets(){for(const e of this.plugins)await W.default.copy(I.default.join(e.path,"dist"),I.default.join(this.tmpFS.root,"asset","plugins",e.name)),this.scripts.push(`asset/plugins/${e.name}/index.js?v=${e.version}`)}async onArticle(e){const t=await this.makeFile(e),r=await this.renderFile(t,e.title);await this.tmpFS.unlink(e.ref),await this.tmpFS.writeFile(e.path,r)}async onSummary(){const e=await this.makeFile({path:"index.html",ref:"README.md"}),t=await this.renderFile(e);await this.tmpFS.unlink("README.md"),await this.tmpFS.writeFile("index.html",t),await this.tmpFS.unlink("SUMMARY.md")}async renderFile(e,t){const r={id:this.book.id,summary:this.book.summary.toObject(),config:this.book.config.toObject(),file:e,lfs:this.options.lfs},n=this.scripts.map((t=>ue.isUrl(t)?t:e.relative(t))),i=this.headScripts.map((t=>ue.isUrl(t)?t:e.relative(t))),a=this.stylesheets.map((t=>ue.isUrl(t)?t:e.relative(t))),o=this.book.config.getValue("title","Untitled"),s=e.getMeta("title",t);return this.template({title:(s?`${s} - `:"")+o,keywords:e.getMeta("keywords"),description:e.getMeta("description"),stylesheets:a,headScripts:i,scripts:n,payload:JSON.stringify(r).replace(/\//g,"\\/")})}}const Th=(e,t)=>e.some((e=>e instanceof RegExp?e.test(t):e===t));class Ih extends X.default.ResourceLoader{fs;file;constructor(e,t){super(),this.fs=e,this.file=t}async fetch(e,t){const{element:r}=t;if(r&&"IMG"===r.nodeName){if(o.parse(e).protocol?.startsWith("http")){const t=await ue.request.get(e,{responseType:"stream"});let n=`_images/${ue.md5(e)}`;const i=Z.default.extension(t.headers["content-type"]);i&&(n+=`.${i}`),r.setAttribute("src",this.file.relative(n));const a=this.fs.createWriteStream(n);return new Promise(((e,r)=>{t.data.pipe(a),a.on("error",(e=>{a.close(),r(e)})),a.on("close",(()=>{e(null)}))}))}return null}return super.fetch(e,t)}}function jh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Lh={json:Dh,html:Rh,ebook:class extends Rh{format="ebook";async initPlugins(){this.book.config.setValue("theme","ebook"),this.options.plugins.preset["theme-ebook"]={},await super.initPlugins()}createDOM(e,t){const r=new Ih(this.tmpFS,t),n=new S.VirtualConsole;return n.sendTo(console,{omitJSDOMErrors:!0}),new S.JSDOM(e,{virtualConsole:n,url:`file:///${this.tmpFS.resolve(t.path)}`,runScripts:"dangerously",resources:r,pretendToBeVisual:!0,beforeParse(e){e.SC_DISABLE_SPEEDY=!0}})}async renderFile(e,t){const r=await super.renderFile(e,t),n=this.createDOM(r,e);return await function(e,t){const{tryEvery:r,stopAfter:n}=t,i=Date.now(),a=(t,o)=>{setTimeout((async()=>{try{const r=await e();t(r)}catch(e){Date.now()-i>n?o(e):a(t,o)}}),r)};return new Promise(a)}((()=>{const e=n.window.document,t=e.getElementById("root");if(t&&t.innerHTML&&Array.from(e.images).every((e=>e.complete))){for(const e of Array.from(n.window.document.scripts))e.remove();return n.serialize()}throw new Error("render html timeout")}),{stopAfter:5e3,tryEvery:100})}getConvertOptions(e){const{config:t}=this.book,r={title:t.getValue("title"),"book-producer":"TopWrite",publisher:"TopWrite",chapter:"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-chapter')]","level1-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level1-toc')]","level2-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level2-toc')]","level3-toc":"descendant-or-self::*[contains(concat(' ', normalize-space(@class), ' '), 'book-level3-toc')]","max-toc-links":"0","max-levels":"1","no-chapters-in-toc":!0,"breadth-first":!0,"disable-font-rescaling":!0};switch(e){case"docx":r["docx-no-toc"]=!0;break;case"epub":r["dont-split-on-page-breaks"]=!0;break;case"pdf":const e=W.default.readFileSync(I.default.resolve(__dirname,"../templates/pdf-header.ejs"),"utf-8"),n=W.default.readFileSync(I.default.resolve(__dirname,"../templates/pdf-footer.ejs"),"utf-8");r["chapter-mark"]=t.getValue(["pdf","chapterMark"]),r["page-breaks-before"]=t.getValue(["pdf","pageBreaksBefore"]),r["pdf-page-margin-left"]=t.getValue(["pdf","margin","left"]),r["pdf-page-margin-right"]=t.getValue(["pdf","margin","right"]),r["pdf-page-margin-top"]=t.getValue(["pdf","margin","top"]),r["pdf-page-margin-bottom"]=t.getValue(["pdf","margin","bottom"]),r["pdf-serif-family"]=t.getValue(["pdf","fontFamily"]),r["paper-size"]=t.getValue(["pdf","paperSize"]),r["pdf-custom-size"]=t.getValue(["pdf","customSize"]),r.unit="millimeter",r["pdf-page-numbers"]=t.getValue(["pdf","pageNumbers"]),r["preserve-cover-aspect-ratio"]=!0,r["pdf-header-template"]=e,r["pdf-footer-template"]=n}return r}async packBook(){const e=I.default.extname(this.dest).substr(1);if(!["pdf","docx","epub"].includes(e))return super.packBook();const t=await E.lookpath("ebook-convert");if(!t)throw new Error("Install ebook-convert from Calibre: https://calibre-ebook.com");const r=function(e,t){const r=[];let n=[],i=[];t={useEquals:!0,shortFlag:!0,...t};const a=(e,n)=>{const i=t.shortFlag&&1===e.length?"-":"--",a=t.allowCamelCase?e:e.replace(/[A-Z]/g,"-$&").toLowerCase();e=i+a,t.useEquals?r.push(e+(n?`=${n}`:"")):(r.push(e),n&&r.push(n))},o=(e,t)=>{r.push(`-${e}`),t&&r.push(t)};for(let[r,s]of Object.entries(e)){let e=a;if((!Array.isArray(t.excludes)||!Th(t.excludes,r))&&(!Array.isArray(t.includes)||Th(t.includes,r)))if("object"==typeof t.aliases&&t.aliases[r]&&(r=t.aliases[r],e=o),"--"!==r)if("_"!==r){if(!0!==s||t.ignoreTrue||e(r,""),!1!==s||t.ignoreFalse||e(`no-${r}`),"string"==typeof s&&e(r,s),"number"!=typeof s||Number.isNaN(s)||e(r,String(s)),Array.isArray(s))for(const t of s)e(r,t)}else{if(!Array.isArray(s))throw new TypeError("Expected key `_` to be Array, got "+typeof s);n=s}else{if(!Array.isArray(s))throw new TypeError("Expected key `--` to be Array, got "+typeof s);i=s}}for(const e of n)r.push(String(e));i.length>0&&r.push("--");for(const e of i)r.push(String(e));return r}(this.getConvertOptions(e)),n=this.tmpFS.resolve("index.html");return r.unshift(n,this.dest),new Promise(((e,i)=>{ae.info("convert book ...");const a=V.default(t,r,{stdio:["inherit"],cwd:this.tmpFS.root}),o=["^Conversion options ","^ \\w+: ","^Blocking URL ","^Ignoring CSS ","^CSSStyleDeclaration: ","^PropertyValue: ","^CSSVariable: ",jh(n),jh(this.dest)].map((e=>`(${e})`)).join("|"),s=new RegExp(`(${o})`);a.stdout?.on("data",(e=>{e.toString().replace(/[\r\n]*$/,"").split("\n").forEach((e=>{if(e){const t=e.trim();e.match(s)?ae.debug({message:t,type:"log"}):ae.log(t)}}))})),a.stderr?.on("data",(e=>{ae.error(e.toString().trimEnd())})),a.on("close",(t=>{0!==t?i("Convert failed"):e()}))}))}}};var qh=te.default,zh=process.cwd,Mh=null,Nh=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Mh||(Mh=zh.call(process)),Mh};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var Bh=process.chdir;process.chdir=function(e){Mh=null,Bh.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Bh)}var $h=function(e){qh.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,r,n){e.open(t,qh.O_WRONLY|qh.O_SYMLINK,r,(function(t,i){t?n&&n(t):e.fchmod(i,r,(function(t){e.close(i,(function(e){n&&n(t||e)}))}))}))},e.lchmodSync=function(t,r){var n,i=e.openSync(t,qh.O_WRONLY|qh.O_SYMLINK,r),a=!0;try{n=e.fchmodSync(i,r),a=!1}finally{if(a)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return n}}(e);e.lutimes||function(e){qh.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,r,n,i){e.open(t,qh.O_SYMLINK,(function(t,a){t?i&&i(t):e.futimes(a,r,n,(function(t){e.close(a,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,r,n){var i,a=e.openSync(t,qh.O_SYMLINK),o=!0;try{i=e.futimesSync(a,r,n),o=!1}finally{if(o)try{e.closeSync(a)}catch(e){}else e.closeSync(a)}return i}):(e.lutimes=function(e,t,r,n){n&&process.nextTick(n)},e.lutimesSync=function(){})}(e);e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=s(e.statSync),e.fstatSync=s(e.fstatSync),e.lstatSync=s(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,r){r&&process.nextTick(r)},e.lchmodSync=function(){});e.lchown||(e.lchown=function(e,t,r,n){n&&process.nextTick(n)},e.lchownSync=function(){});"win32"===Nh&&(e.rename=(t=e.rename,function(r,n,i){var a=Date.now(),o=0;t(r,n,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code)&&Date.now()-a<6e4)return setTimeout((function(){e.stat(n,(function(e,a){e&&"ENOENT"===e.code?t(r,n,s):i(c)}))}),o),void(o<100&&(o+=10));i&&i(c)}))}));var t;function r(t){return t?function(r,n,i){return t.call(e,r,n,(function(e){c(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function n(t){return t?function(r,n){try{return t.call(e,r,n)}catch(e){if(!c(e))throw e}}:t}function i(t){return t?function(r,n,i,a){return t.call(e,r,n,i,(function(e){c(e)&&(e=null),a&&a.apply(this,arguments)}))}:t}function a(t){return t?function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!c(e))throw e}}:t}function o(t){return t?function(r,n,i){function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?t.call(e,r,n,a):t.call(e,r,a)}:t}function s(t){return t?function(r,n){var i=n?t.call(e,r,n):t.call(e,r);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:t}function c(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read=function(t){function r(r,n,i,a,o,s){var c;if(s&&"function"==typeof s){var u=0;c=function(l,f,h){if(l&&"EAGAIN"===l.code&&u<10)return u++,t.call(e,r,n,i,a,o,c);s.apply(this,arguments)}}return t.call(e,r,n,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,t),r}(e.read),e.readSync=(u=e.readSync,function(t,r,n,i,a){for(var o=0;;)try{return u.call(e,t,r,n,i,a)}catch(e){if("EAGAIN"===e.code&&o<10){o++;continue}throw e}});var u};var Uh=$.default.Stream,Vh=function(e){return{ReadStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Uh.call(this);var i=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,n=n||{};for(var a=Object.keys(n),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=n[c]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){i._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()}))},WriteStream:function t(r,n){if(!(this instanceof t))return new t(r,n);Uh.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,n=n||{};for(var i=Object.keys(n),a=0,o=i.length;a<o;a++){var s=i[a];this[s]=n[s]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var Hh=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:Qh(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t},Qh=Object.getPrototypeOf||function(e){return e.__proto__};var Gh,Wh,Kh=Q.default,Jh=$h,Yh=Vh,Xh=Hh,Zh=re.default;function ep(e,t){Object.defineProperty(e,Gh,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(Gh=Symbol.for("graceful-fs.queue"),Wh=Symbol.for("graceful-fs.previous")):(Gh="___graceful-fs.queue",Wh="___graceful-fs.previous");var tp=function(){};if(Zh.debuglog?tp=Zh.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(tp=function(){var e=Zh.format.apply(Zh,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!Kh[Gh]){var rp=oe[Gh]||[];ep(Kh,rp),Kh.close=function(e){function t(t,r){return e.call(Kh,t,(function(e){e||sp(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,Wh,{value:e}),t}(Kh.close),Kh.closeSync=function(e){function t(t){e.apply(Kh,arguments),sp()}return Object.defineProperty(t,Wh,{value:e}),t}(Kh.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){tp(Kh[Gh]),M.default.equal(Kh[Gh].length,0)}))}oe[Gh]||ep(oe,Kh[Gh]);var np,ip=ap(Xh(Kh));function ap(e){Jh(e),e.gracefulify=ap,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,a){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):op([e,[r,n,i],t,a||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,a,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof a&&a.apply(this,arguments):op([e,[t,n,i,a],r,o||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,a,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof a&&a.apply(this,arguments):op([e,[t,r,i,a],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,a,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof a&&a.apply(this,arguments):op([e,[t,r,n,a],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var a=e.readdir;if(e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);return function e(t,r,n,i){return a(t,r,(function(a,o){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,a,o)):op([e,[t,r,n],a,i||Date.now(),Date.now()])}))}(e,t,r)},"v0.8"===process.version.substr(0,4)){var o=Yh(e);f=o.ReadStream,h=o.WriteStream}var s=e.ReadStream;s&&(f.prototype=Object.create(s.prototype),f.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var c=e.WriteStream;c&&(h.prototype=Object.create(c.prototype),h.prototype.open=function(){var e=this;d(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0});var u=f;Object.defineProperty(e,"FileReadStream",{get:function(){return u},set:function(e){u=e},enumerable:!0,configurable:!0});var l=h;function f(e,t){return this instanceof f?(s.apply(this,arguments),this):f.apply(Object.create(f.prototype),arguments)}function h(e,t){return this instanceof h?(c.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var p=e.open;function d(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,a){return p(t,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):op([e,[t,r,n,i],o,a||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=d,e}function op(e){tp("ENQUEUE",e[0].name,e[1]),Kh[Gh].push(e),cp()}function sp(){for(var e=Date.now(),t=0;t<Kh[Gh].length;++t)Kh[Gh][t].length>2&&(Kh[Gh][t][3]=e,Kh[Gh][t][4]=e);cp()}function cp(){if(clearTimeout(np),np=void 0,0!==Kh[Gh].length){var e=Kh[Gh].shift(),t=e[0],r=e[1],n=e[2],i=e[3],a=e[4];if(void 0===i)tp("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){tp("TIMEOUT",t.name,r);var o=r.pop();"function"==typeof o&&o.call(null,n)}else{var s=Date.now()-a,c=Math.max(a-i,1);s>=Math.min(1.2*c,100)?(tp("RETRY",t.name,r),t.apply(null,r.concat([i]))):Kh[Gh].push(e)}void 0===np&&(np=setTimeout(cp,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Kh.__patched&&(ip=ap(Kh),Kh.__patched=!0);var up=ip;const lp=ee.default.homedir(),{env:fp}=process,hp=fp.XDG_DATA_HOME||(lp?I.default.join(lp,".local","share"):void 0),pp=fp.XDG_CONFIG_HOME||(lp?I.default.join(lp,".config"):void 0);fp.XDG_STATE_HOME||lp&&I.default.join(lp,".local","state"),fp.XDG_CACHE_HOME||lp&&I.default.join(lp,".cache"),fp.XDG_RUNTIME_DIR;const dp=(fp.XDG_DATA_DIRS||"/usr/local/share/:/usr/share/").split(":");hp&&dp.unshift(hp);const mp=(fp.XDG_CONFIG_DIRS||"/etc/xdg").split(":");pp&&mp.unshift(pp);var gp={exports:{}},vp={exports:{}};
9
9
  /**
10
10
  * @preserve
11
11
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
@@ -17,4 +17,4 @@
17
17
  * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
18
18
  * @see http://sites.google.com/site/murmurhash/
19
19
  */
20
- !function(e){!function(){var t;function r(e,n){var i=this instanceof r?this:t;if(i.reset(n),"string"==typeof e&&e.length>0&&i.hash(e),i!==this)return i}r.prototype.hash=function(e){var t,r,n,i,a;switch(a=e.length,this.len+=a,r=this.k1,n=0,this.rem){case 0:r^=a>n?65535&e.charCodeAt(n++):0;case 1:r^=a>n?(65535&e.charCodeAt(n++))<<8:0;case 2:r^=a>n?(65535&e.charCodeAt(n++))<<16:0;case 3:r^=a>n?(255&e.charCodeAt(n))<<24:0,r^=a>n?(65280&e.charCodeAt(n++))>>8:0}if(this.rem=a+this.rem&3,(a-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=r=13715*(r=(r=11601*r+3432906752*(65535&r)&4294967295)<<15|r>>>17)+461832192*(65535&r)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(n>=a);)r=65535&e.charCodeAt(n++)^(65535&e.charCodeAt(n++))<<8^(65535&e.charCodeAt(n++))<<16,r^=(255&(i=e.charCodeAt(n++)))<<24^(65280&i)>>8;switch(r=0,this.rem){case 3:r^=(65535&e.charCodeAt(n+2))<<16;case 2:r^=(65535&e.charCodeAt(n+1))<<8;case 1:r^=65535&e.charCodeAt(n)}this.h1=t}return this.k1=r,this},r.prototype.result=function(){var e,t;return e=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},r.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r}()}(gp);var vp={exports:{}},yp={exports:{}};!function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(yp);var bp=ce.process;const wp=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(wp(bp)){var xp,kp=N.default,Ep=yp.exports,Sp=/^win/i.test(bp.platform),Pp=ae.default;"function"!=typeof Pp&&(Pp=Pp.EventEmitter),bp.__signal_exit_emitter__?xp=bp.__signal_exit_emitter__:((xp=bp.__signal_exit_emitter__=new Pp).count=0,xp.emitted={}),xp.infinite||(xp.setMaxListeners(1/0),xp.infinite=!0),vp.exports=function(e,t){if(wp(ce.process)){kp.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Fp&&Dp();var r="exit";t&&t.alwaysLast&&(r="afterexit");return xp.on(r,e),function(){xp.removeListener(r,e),0===xp.listeners("exit").length&&0===xp.listeners("afterexit").length&&_p()}}};var _p=function(){Fp&&wp(ce.process)&&(Fp=!1,Ep.forEach((function(e){try{bp.removeListener(e,Cp[e])}catch(e){}})),bp.emit=Tp,bp.reallyExit=Op,xp.count-=1)};vp.exports.unload=_p;var Ap=function(e,t,r){xp.emitted[e]||(xp.emitted[e]=!0,xp.emit(e,t,r))},Cp={};Ep.forEach((function(e){Cp[e]=function(){wp(ce.process)&&(bp.listeners(e).length===xp.count&&(_p(),Ap("exit",null,e),Ap("afterexit",null,e),Sp&&"SIGHUP"===e&&(e="SIGINT"),bp.kill(bp.pid,e)))}})),vp.exports.signals=function(){return Ep};var Fp=!1,Dp=function(){!Fp&&wp(ce.process)&&(Fp=!0,xp.count+=1,Ep=Ep.filter((function(e){try{return bp.on(e,Cp[e]),!0}catch(e){return!1}})),bp.emit=Ip,bp.reallyExit=Rp)};vp.exports.load=Dp;var Op=bp.reallyExit,Rp=function(e){wp(ce.process)&&(bp.exitCode=e||0,Ap("exit",bp.exitCode,null),Ap("afterexit",bp.exitCode,null),Op.call(bp,bp.exitCode))},Tp=bp.emit,Ip=function(e,t){if("exit"===e&&wp(ce.process)){void 0!==t&&(bp.exitCode=t);var r=Tp.apply(this,arguments);return Ap("exit",bp.exitCode,null),Ap("afterexit",bp.exitCode,null),r}return Tp.apply(this,arguments)}}else vp.exports=function(){};var jp=zp;zp.strict=Mp,zp.loose=Np;var Lp=Object.prototype.toString,qp={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function zp(e){return Mp(e)||Np(e)}function Mp(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function Np(e){return qp[Lp.call(e)]}var Bp=jp.strict;mp.exports=function(e,t,r,n){r instanceof Function&&(n=r,r={});const i=async function(e,t,r={}){"string"==typeof r&&(r={encoding:r});let n,i;const a=Vp(Zp((()=>i))),o=Hp.resolve(e);try{await function(e){return new Promise((t=>{Kp[e]||(Kp[e]=[]),Kp[e].push(t),1===Kp[e].length&&t()}))}(o);const s=await Wp($p.realpath)(e).catch((()=>e));if(i=Xp(s),!r.mode||!r.chown){const e=await Wp($p.stat)(s).catch((()=>{}));e&&(null==r.mode&&(r.mode=e.mode),null==r.chown&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}n=await Wp($p.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),Qp(t)&&(t=Gp(t)),Buffer.isBuffer(t)?await Wp($p.write)(n,t,0,t.length,0):null!=t&&await Wp($p.write)(n,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&await Wp($p.fsync)(n),await Wp($p.close)(n),n=null,r.chown&&await Wp($p.chown)(i,r.chown.uid,r.chown.gid).catch((e=>{if(!ed(e))throw e})),r.mode&&await Wp($p.chmod)(i,r.mode).catch((e=>{if(!ed(e))throw e})),await Wp($p.rename)(i,s)}finally{n&&await Wp($p.close)(n).catch((()=>{})),a(),await Wp($p.unlink)(i).catch((()=>{})),Kp[o].shift(),Kp[o].length>0?Kp[o][0]():delete Kp[o]}}(e,t,r);n&&i.then(n,n);return i},mp.exports.sync=function(e,t,r){"string"==typeof r?r={encoding:r}:r||(r={});try{e=$p.realpathSync(e)}catch(e){}const n=Xp(e);if(!r.mode||!r.chown)try{const t=$p.statSync(e);(r=Object.assign({},r)).mode||(r.mode=t.mode),!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch(e){}let i;const a=Zp(n),o=Vp(a);let s=!0;try{if(i=$p.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),Qp(t)&&(t=Gp(t)),Buffer.isBuffer(t)?$p.writeSync(i,t,0,t.length,0):null!=t&&$p.writeSync(i,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&$p.fsyncSync(i),$p.closeSync(i),i=null,r.chown)try{$p.chownSync(n,r.chown.uid,r.chown.gid)}catch(e){if(!ed(e))throw e}if(r.mode)try{$p.chmodSync(n,r.mode)}catch(e){if(!ed(e))throw e}$p.renameSync(n,e),s=!1}finally{if(i)try{$p.closeSync(i)}catch(e){}o(),s&&a()}},mp.exports._getTmpname=Xp,mp.exports._cleanupOnExit=Zp;const $p=G.default,Up=gp.exports,Vp=vp.exports,Hp=j.default,Qp=jp,Gp=function(e){if(Bp(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)},{promisify:Wp}=ie.default,Kp={},Jp=function(){try{return require("worker_threads").threadId}catch(e){return 0}}();let Yp=0;function Xp(e){return e+"."+Up(__filename).hash(String(process.pid)).hash(String(Jp)).hash(String(++Yp)).result()}function Zp(e){return()=>{try{$p.unlinkSync("function"==typeof e?e():e)}catch(e){}}}function ed(e){if("ENOSYS"===e.code)return!0;return!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var td=mp.exports;const rd=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},nd=new Set(["__proto__","prototype","constructor"]);function id(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];r.push(n)}return r.some((e=>nd.has(e)))?[]:r}var ad={get(e,t,r){if(!rd(e)||"string"!=typeof t)return void 0===r?e:r;const n=id(t);if(0!==n.length){for(let t=0;t<n.length;t++)if(e=e[n[t]],null==e){if(t!==n.length-1)return r;break}return void 0===e?r:e}},set(e,t,r){if(!rd(e)||"string"!=typeof t)return e;const n=e,i=id(t);for(let t=0;t<i.length;t++){const n=i[t];rd(e[n])||(e[n]={}),t===i.length-1&&(e[n]=r),e=e[n]}return n},delete(e,t){if(!rd(e)||"string"!=typeof t)return!1;const r=id(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return delete e[n],!0;if(e=e[n],!rd(e))return!1}},has(e,t){if(!rd(e)||"string"!=typeof t)return!1;const r=id(t);if(0===r.length)return!1;for(let t=0;t<r.length;t++){if(!rd(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}};const od=F.promisify(oe.default.randomBytes),sd="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),cd="0123456789".split(""),ud="CDEHKMPRTUWXY012458".split(""),ld="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""),fd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),hd=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),pd=(e,t)=>({length:r,type:n,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==n&&void 0!==i)throw new TypeError("Expected either `type` or `characters`");if(void 0!==i&&"string"!=typeof i)throw new TypeError("Expected `characters` to be string");if(!hd.has(n))throw new TypeError(`Unknown type: ${n}`);if(void 0===n&&void 0===i&&(n="hex"),"hex"===n||void 0===n&&void 0===i)return t(Math.ceil(.5*r),"hex",r);if("base64"===n)return t(Math.ceil(.75*r),"base64",r);if("url-safe"===n)return e(r,sd);if("numeric"===n)return e(r,cd);if("distinguishable"===n)return e(r,ud);if("ascii-printable"===n)return e(r,ld);if("alphanumeric"===n)return e(r,fd);if(0===i.length)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i.split(""))},dd=pd(((e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let a="",o=0;for(;o<e;){const s=oe.default.randomBytes(i);let c=0;for(;c<i&&o<e;){const e=s.readUInt16LE(c);c+=2,e>n||(a+=t[e%r],o++)}}return a}),((e,t,r)=>oe.default.randomBytes(e).toString(t).slice(0,r)));dd.async=pd((async(e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let a="",o=0;for(;o<e;){const s=await od(i);let c=0;for(;c<i&&o<e;){const e=s.readUInt16LE(c);c+=2,e>n||(a+=t[e%r],o++)}}return a}),(async(e,t,r)=>(await od(e)).toString(t).slice(0,r)));const md=hp||j.default.join(re.default.tmpdir(),dd({length:32})),gd={mode:448,recursive:!0},vd={mode:384};const yd=new class{constructor(e,t,r={}){const n=r.globalConfigPath?j.default.join(e,"config.json"):j.default.join("configstore",`${e}.json`);this._path=r.configPath||j.default.join(md,n),t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse(cp.readFileSync(this._path,"utf8"))}catch(e){if("ENOENT"===e.code)return{};if("EACCES"===e.code&&(e.message=`${e.message}\nYou don't have access to this file.\n`),"SyntaxError"===e.name)return td.sync(this._path,"",vd),{};throw e}}set all(e){try{cp.mkdirSync(j.default.dirname(this._path),gd),td.sync(this._path,JSON.stringify(e,void 0,"\t"),vd)}catch(e){throw"EACCES"===e.code&&(e.message=`${e.message}\nYou don't have access to this file.\n`),e}}get size(){return Object.keys(this.all||{}).length}get(e){return ad.get(this.all,e)}set(e,t){const r=this.all;if(1===arguments.length)for(const t of Object.keys(e))ad.set(r,t,e[t]);else ad.set(r,e,t);this.all=r}has(e){return ad.has(this.all,e)}delete(e){const t=this.all;ad.delete(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}}("ttx",{plugins_host:"https://plugins.x.topthink.com"});function bd(e){return e?yd.get(e):yd.all}fe.Summary.prototype.toObject=function(){return this.parts.map((function(e){return e.toObject()}))},fe.SummaryPart.prototype.toObject=function(){return{id:this.id,title:this.title,articles:this.articles.map((function(e){return e.toObject()}))}},fe.SummaryArticle.prototype.toObject=function(){return{title:this.title,ref:this.ref,path:this.path,children:this.children.map((function(e){return e.toObject()}))}};const wd=require("../package.json"),xd=new e.Command;xd.version(wd.version),xd.name("ttx"),xd.option("-d, --debug","output extra debugging"),xd.on("option:debug",(function(){se.level=n.LogLevel.Debug})),xd.command("build <id> <dir> <format> [dest]").option("--lfs <lfs>","lfs cdn url").option("--plugins_host <plugins_host>","plugins host").option("--preset_plugins <preset_plugins>","reset plugins").option("--no-clean","not clean").description("build book").action((async function(e,t,r,n,i){i.clean&&I.default.setGracefulCleanup(),se.info(`cli version ${wd.version}`);const a=j.default.resolve(t);n=n?j.default.resolve(n):j.default.join(a,"book.tar.gz");try{const a=i.preset_plugins?JSON.parse(i.preset_plugins):{},o={plugins:{host:i.plugins_host||bd("plugins_host"),preset:a}};i.lfs&&(o.lfs={url:i.lfs,files:{}});const s=await async function(e,t,r,n,i){if(void 0===jh[r])throw new Error("unsupported format: "+r);const a=jh[r],o=new Dh(t),s=fe.Config.createFromObject(await o.readAsObject(fe.Config.file)),c=o.resolve(s.getValue("root","")),u=I.default.dirSync({unsafeCleanup:!0}).name,l=new Dh(u);await J.default.copy(c,u),await J.default.copy(j.default.resolve(__dirname,"../templates/.bookignore"),l.resolve(".bookignore"));const f=fe.Summary.createFromText(await l.readAsString(s.getStructure("summary")));return new a(new fe.Book(e,s,f),o,l,n,i)}(e,t,r,o,n);await s.generate(),process.exit(0)}catch(e){se.error(e),process.exit(1)}}));const kd=xd.command("config");kd.command("list").action((function(){console.log(bd())})),kd.command("set <key> <value>").action((function(e,t){!function(e,t){yd.set(e,t)}(e,t)})),xd.parse(process.argv);
20
+ !function(e){!function(){var t;function r(e,n){var i=this instanceof r?this:t;if(i.reset(n),"string"==typeof e&&e.length>0&&i.hash(e),i!==this)return i}r.prototype.hash=function(e){var t,r,n,i,a;switch(a=e.length,this.len+=a,r=this.k1,n=0,this.rem){case 0:r^=a>n?65535&e.charCodeAt(n++):0;case 1:r^=a>n?(65535&e.charCodeAt(n++))<<8:0;case 2:r^=a>n?(65535&e.charCodeAt(n++))<<16:0;case 3:r^=a>n?(255&e.charCodeAt(n))<<24:0,r^=a>n?(65280&e.charCodeAt(n++))>>8:0}if(this.rem=a+this.rem&3,(a-=this.rem)>0){for(t=this.h1;t=5*(t=(t^=r=13715*(r=(r=11601*r+3432906752*(65535&r)&4294967295)<<15|r>>>17)+461832192*(65535&r)&4294967295)<<13|t>>>19)+3864292196&4294967295,!(n>=a);)r=65535&e.charCodeAt(n++)^(65535&e.charCodeAt(n++))<<8^(65535&e.charCodeAt(n++))<<16,r^=(255&(i=e.charCodeAt(n++)))<<24^(65280&i)>>8;switch(r=0,this.rem){case 3:r^=(65535&e.charCodeAt(n+2))<<16;case 2:r^=(65535&e.charCodeAt(n+1))<<8;case 1:r^=65535&e.charCodeAt(n)}this.h1=t}return this.k1=r,this},r.prototype.result=function(){var e,t;return e=this.k1,t=this.h1,e>0&&(t^=e=13715*(e=(e=11601*e+3432906752*(65535&e)&4294967295)<<15|e>>>17)+461832192*(65535&e)&4294967295),t^=this.len,t=51819*(t^=t>>>16)+2246770688*(65535&t)&4294967295,t=44597*(t^=t>>>13)+3266445312*(65535&t)&4294967295,(t^=t>>>16)>>>0},r.prototype.reset=function(e){return this.h1="number"==typeof e?e:0,this.rem=this.k1=this.len=0,this},t=new r,e.exports=r}()}(vp);var yp={exports:{}},bp={exports:{}};!function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(bp);var wp=oe.process;const xp=function(e){return e&&"object"==typeof e&&"function"==typeof e.removeListener&&"function"==typeof e.emit&&"function"==typeof e.reallyExit&&"function"==typeof e.listeners&&"function"==typeof e.kill&&"number"==typeof e.pid&&"function"==typeof e.on};if(xp(wp)){var kp,Ep=M.default,Sp=bp.exports,Pp=/^win/i.test(wp.platform),_p=ne.default;"function"!=typeof _p&&(_p=_p.EventEmitter),wp.__signal_exit_emitter__?kp=wp.__signal_exit_emitter__:((kp=wp.__signal_exit_emitter__=new _p).count=0,kp.emitted={}),kp.infinite||(kp.setMaxListeners(1/0),kp.infinite=!0),yp.exports=function(e,t){if(xp(oe.process)){Ep.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Dp&&Op();var r="exit";t&&t.alwaysLast&&(r="afterexit");return kp.on(r,e),function(){kp.removeListener(r,e),0===kp.listeners("exit").length&&0===kp.listeners("afterexit").length&&Ap()}}};var Ap=function(){Dp&&xp(oe.process)&&(Dp=!1,Sp.forEach((function(e){try{wp.removeListener(e,Fp[e])}catch(e){}})),wp.emit=Ip,wp.reallyExit=Rp,kp.count-=1)};yp.exports.unload=Ap;var Cp=function(e,t,r){kp.emitted[e]||(kp.emitted[e]=!0,kp.emit(e,t,r))},Fp={};Sp.forEach((function(e){Fp[e]=function(){xp(oe.process)&&(wp.listeners(e).length===kp.count&&(Ap(),Cp("exit",null,e),Cp("afterexit",null,e),Pp&&"SIGHUP"===e&&(e="SIGINT"),wp.kill(wp.pid,e)))}})),yp.exports.signals=function(){return Sp};var Dp=!1,Op=function(){!Dp&&xp(oe.process)&&(Dp=!0,kp.count+=1,Sp=Sp.filter((function(e){try{return wp.on(e,Fp[e]),!0}catch(e){return!1}})),wp.emit=jp,wp.reallyExit=Tp)};yp.exports.load=Op;var Rp=wp.reallyExit,Tp=function(e){xp(oe.process)&&(wp.exitCode=e||0,Cp("exit",wp.exitCode,null),Cp("afterexit",wp.exitCode,null),Rp.call(wp,wp.exitCode))},Ip=wp.emit,jp=function(e,t){if("exit"===e&&xp(oe.process)){void 0!==t&&(wp.exitCode=t);var r=Ip.apply(this,arguments);return Cp("exit",wp.exitCode,null),Cp("afterexit",wp.exitCode,null),r}return Ip.apply(this,arguments)}}else yp.exports=function(){};var Lp=Mp;Mp.strict=Np,Mp.loose=Bp;var qp=Object.prototype.toString,zp={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function Mp(e){return Np(e)||Bp(e)}function Np(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function Bp(e){return zp[qp.call(e)]}var $p=Lp.strict;gp.exports=function(e,t,r,n){r instanceof Function&&(n=r,r={});const i=async function(e,t,r={}){"string"==typeof r&&(r={encoding:r});let n,i;const a=Hp(ed((()=>i))),o=Qp.resolve(e);try{await function(e){return new Promise((t=>{Jp[e]||(Jp[e]=[]),Jp[e].push(t),1===Jp[e].length&&t()}))}(o);const s=await Kp(Up.realpath)(e).catch((()=>e));if(i=Zp(s),!r.mode||!r.chown){const e=await Kp(Up.stat)(s).catch((()=>{}));e&&(null==r.mode&&(r.mode=e.mode),null==r.chown&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}n=await Kp(Up.open)(i,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(i),Gp(t)&&(t=Wp(t)),Buffer.isBuffer(t)?await Kp(Up.write)(n,t,0,t.length,0):null!=t&&await Kp(Up.write)(n,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&await Kp(Up.fsync)(n),await Kp(Up.close)(n),n=null,r.chown&&await Kp(Up.chown)(i,r.chown.uid,r.chown.gid).catch((e=>{if(!td(e))throw e})),r.mode&&await Kp(Up.chmod)(i,r.mode).catch((e=>{if(!td(e))throw e})),await Kp(Up.rename)(i,s)}finally{n&&await Kp(Up.close)(n).catch((()=>{})),a(),await Kp(Up.unlink)(i).catch((()=>{})),Jp[o].shift(),Jp[o].length>0?Jp[o][0]():delete Jp[o]}}(e,t,r);n&&i.then(n,n);return i},gp.exports.sync=function(e,t,r){"string"==typeof r?r={encoding:r}:r||(r={});try{e=Up.realpathSync(e)}catch(e){}const n=Zp(e);if(!r.mode||!r.chown)try{const t=Up.statSync(e);(r=Object.assign({},r)).mode||(r.mode=t.mode),!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch(e){}let i;const a=ed(n),o=Hp(a);let s=!0;try{if(i=Up.openSync(n,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(n),Gp(t)&&(t=Wp(t)),Buffer.isBuffer(t)?Up.writeSync(i,t,0,t.length,0):null!=t&&Up.writeSync(i,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&Up.fsyncSync(i),Up.closeSync(i),i=null,r.chown)try{Up.chownSync(n,r.chown.uid,r.chown.gid)}catch(e){if(!td(e))throw e}if(r.mode)try{Up.chmodSync(n,r.mode)}catch(e){if(!td(e))throw e}Up.renameSync(n,e),s=!1}finally{if(i)try{Up.closeSync(i)}catch(e){}o(),s&&a()}},gp.exports._getTmpname=Zp,gp.exports._cleanupOnExit=ed;const Up=Q.default,Vp=vp.exports,Hp=yp.exports,Qp=I.default,Gp=Lp,Wp=function(e){if($p(e)){var t=Buffer.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),t}return Buffer.from(e)},{promisify:Kp}=re.default,Jp={},Yp=function(){try{return require("worker_threads").threadId}catch(e){return 0}}();let Xp=0;function Zp(e){return e+"."+Vp(__filename).hash(String(process.pid)).hash(String(Yp)).hash(String(++Xp)).result()}function ed(e){return()=>{try{Up.unlinkSync("function"==typeof e?e():e)}catch(e){}}}function td(e){if("ENOSYS"===e.code)return!0;return!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}var rd=gp.exports;const nd=e=>{const t=typeof e;return null!==e&&("object"===t||"function"===t)},id=new Set(["__proto__","prototype","constructor"]);function ad(e){const t=e.split("."),r=[];for(let e=0;e<t.length;e++){let n=t[e];for(;"\\"===n[n.length-1]&&void 0!==t[e+1];)n=n.slice(0,-1)+".",n+=t[++e];r.push(n)}return r.some((e=>id.has(e)))?[]:r}var od={get(e,t,r){if(!nd(e)||"string"!=typeof t)return void 0===r?e:r;const n=ad(t);if(0!==n.length){for(let t=0;t<n.length;t++)if(e=e[n[t]],null==e){if(t!==n.length-1)return r;break}return void 0===e?r:e}},set(e,t,r){if(!nd(e)||"string"!=typeof t)return e;const n=e,i=ad(t);for(let t=0;t<i.length;t++){const n=i[t];nd(e[n])||(e[n]={}),t===i.length-1&&(e[n]=r),e=e[n]}return n},delete(e,t){if(!nd(e)||"string"!=typeof t)return!1;const r=ad(t);for(let t=0;t<r.length;t++){const n=r[t];if(t===r.length-1)return delete e[n],!0;if(e=e[n],!nd(e))return!1}},has(e,t){if(!nd(e)||"string"!=typeof t)return!1;const r=ad(t);if(0===r.length)return!1;for(let t=0;t<r.length;t++){if(!nd(e))return!1;if(!(r[t]in e))return!1;e=e[r[t]]}return!0}};const sd=C.promisify(ie.default.randomBytes),cd="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),ud="0123456789".split(""),ld="CDEHKMPRTUWXY012458".split(""),fd="!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""),hd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),pd=new Set([void 0,"hex","base64","url-safe","numeric","distinguishable","ascii-printable","alphanumeric"]),dd=(e,t)=>({length:r,type:n,characters:i})=>{if(!(r>=0&&Number.isFinite(r)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==n&&void 0!==i)throw new TypeError("Expected either `type` or `characters`");if(void 0!==i&&"string"!=typeof i)throw new TypeError("Expected `characters` to be string");if(!pd.has(n))throw new TypeError(`Unknown type: ${n}`);if(void 0===n&&void 0===i&&(n="hex"),"hex"===n||void 0===n&&void 0===i)return t(Math.ceil(.5*r),"hex",r);if("base64"===n)return t(Math.ceil(.75*r),"base64",r);if("url-safe"===n)return e(r,cd);if("numeric"===n)return e(r,ud);if("distinguishable"===n)return e(r,ld);if("ascii-printable"===n)return e(r,fd);if("alphanumeric"===n)return e(r,hd);if(0===i.length)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(i.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return e(r,i.split(""))},md=dd(((e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let a="",o=0;for(;o<e;){const s=ie.default.randomBytes(i);let c=0;for(;c<i&&o<e;){const e=s.readUInt16LE(c);c+=2,e>n||(a+=t[e%r],o++)}}return a}),((e,t,r)=>ie.default.randomBytes(e).toString(t).slice(0,r)));md.async=dd((async(e,t)=>{const r=t.length,n=Math.floor(65536/r)*r-1,i=2*Math.ceil(1.1*e);let a="",o=0;for(;o<e;){const s=await sd(i);let c=0;for(;c<i&&o<e;){const e=s.readUInt16LE(c);c+=2,e>n||(a+=t[e%r],o++)}}return a}),(async(e,t,r)=>(await sd(e)).toString(t).slice(0,r)));const gd=pp||I.default.join(ee.default.tmpdir(),md({length:32})),vd={mode:448,recursive:!0},yd={mode:384};const bd=new class{constructor(e,t,r={}){const n=r.globalConfigPath?I.default.join(e,"config.json"):I.default.join("configstore",`${e}.json`);this._path=r.configPath||I.default.join(gd,n),t&&(this.all={...t,...this.all})}get all(){try{return JSON.parse(up.readFileSync(this._path,"utf8"))}catch(e){if("ENOENT"===e.code)return{};if("EACCES"===e.code&&(e.message=`${e.message}\nYou don't have access to this file.\n`),"SyntaxError"===e.name)return rd.sync(this._path,"",yd),{};throw e}}set all(e){try{up.mkdirSync(I.default.dirname(this._path),vd),rd.sync(this._path,JSON.stringify(e,void 0,"\t"),yd)}catch(e){throw"EACCES"===e.code&&(e.message=`${e.message}\nYou don't have access to this file.\n`),e}}get size(){return Object.keys(this.all||{}).length}get(e){return od.get(this.all,e)}set(e,t){const r=this.all;if(1===arguments.length)for(const t of Object.keys(e))od.set(r,t,e[t]);else od.set(r,e,t);this.all=r}has(e){return od.has(this.all,e)}delete(e){const t=this.all;od.delete(t,e),this.all=t}clear(){this.all={}}get path(){return this._path}}("ttx",{plugins_host:"https://plugins.x.topthink.com"});function wd(e){return e?bd.get(e):bd.all}ue.Summary.prototype.toObject=function(){return this.parts.map((function(e){return e.toObject()}))},ue.SummaryPart.prototype.toObject=function(){return{id:this.id,title:this.title,articles:this.articles.map((function(e){return e.toObject()}))}},ue.SummaryArticle.prototype.toObject=function(){return{title:this.title,ref:this.ref,path:this.path,children:this.children.map((function(e){return e.toObject()}))}};const xd=require("../package.json"),kd=new e.Command;kd.version(xd.version),kd.name("ttx"),kd.option("-d, --debug","output extra debugging"),kd.on("option:debug",(function(){ae.level=n.LogLevel.Debug})),kd.command("build <id> <dir> <format> [dest]").option("--lfs <lfs>","lfs cdn url").option("--plugins_host <plugins_host>","plugins host").option("--preset_plugins <preset_plugins>","reset plugins").option("--no-clean","not clean").description("build book").action((async function(e,t,r,n,i){i.clean&&T.default.setGracefulCleanup(),ae.info(`cli version ${xd.version}`);const a=I.default.resolve(t);n=n?I.default.resolve(n):I.default.join(a,"book.tar.gz");try{const a=i.preset_plugins?JSON.parse(i.preset_plugins):{},o={plugins:{host:i.plugins_host||wd("plugins_host"),preset:a}};i.lfs&&(o.lfs={url:i.lfs,files:{}});const s=await async function(e,t,r,n,i){if(void 0===Lh[r])throw new Error("unsupported format: "+r);const a=Lh[r],o=new Oh(t),s=ue.Config.createFromObject(await o.readAsObject(ue.Config.file)),c=o.resolve(s.getValue("root","")),u=T.default.dirSync({unsafeCleanup:!0}).name,l=new Oh(u);await W.default.copy(c,u),await W.default.copy(I.default.resolve(__dirname,"../templates/.bookignore"),l.resolve(".bookignore"));const f=ue.Summary.createFromText(await l.readAsString(s.getStructure("summary")));return new a(new ue.Book(e,s,f),o,l,n,i)}(e,t,r,o,n);await s.generate(),process.exit(0)}catch(e){ae.error(e),process.exit(1)}}));const Ed=kd.command("config");Ed.command("list").action((function(){console.log(wd())})),Ed.command("set <key> <value>").action((function(e,t){!function(e,t){bd.set(e,t)}(e,t)})),kd.parse(process.argv);