@player-ui/markdown-plugin 0.7.4-next.0 → 0.7.4-next.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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see markdown-plugin.prod.js.LICENSE.txt */
2
- !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.MarkdownPlugin=t():e.MarkdownPlugin=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=27)}([function(e,t,r){"use strict";function n(e,t,r){return e.context?e.callback(r,...t):e.callback(...t)}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return l}));class i{constructor(){this.interceptions=[],this.interceptionKeySet=new Set}isUsed(){return this.interceptions.length>0}intercept(e){this.interceptions.push(e),Object.keys(e).forEach((e=>{this.interceptionKeySet.add(e)}))}tap(e){this.interceptionKeySet.has("tap")&&this.interceptions.forEach((t=>{var r;null==(r=t.tap)||r.call(t,e)}))}call(e,...t){this.interceptionKeySet.has("call")&&this.interceptions.forEach((r=>{var n,i;r.context?null==(n=r.call)||n.call(r,e,...t):null==(i=r.call)||i.call(r,...t)}))}loop(...e){this.interceptionKeySet.has("loop")&&this.interceptions.forEach((t=>{var r;null==(r=t.loop)||r.call(t,...e)}))}error(e){if(this.interceptionKeySet.has("error")&&e instanceof Error){const t=e;this.interceptions.forEach((e=>{var r;null==(r=e.error)||r.call(e,t)}))}}result(e){this.interceptionKeySet.has("result")&&this.interceptions.forEach((t=>{var r;null==(r=t.result)||r.call(t,e)}))}done(){this.interceptionKeySet.has("done")&&this.interceptions.forEach((e=>{var t;null==(t=e.done)||t.call(e)}))}}class o{constructor(){this.taps=[],this.interceptions=new i}tap(e,t){const r="string"===typeof e?{name:e,context:!1}:{context:!1,...e},n={key:Symbol(r.name),...r,callback:t};if(n.before){let e=this.taps.length;const t=new Set(Array.isArray(n.before)?n.before:[n.before]);for(;e>0&&t.size>0;e--){const r=this.taps[e-1];if(t.has(r.name)&&t.delete(r.name),r.before&&(i=n.name,o=r.before,Array.isArray(o)?o.includes(i):o===i))break}this.taps.splice(e,0,n)}else this.taps.push(n);var i,o;return this.interceptions.tap(n),n}untap(e){this.taps=this.taps.filter((t=>t.key!==e.key))}isUsed(){return this.taps.length>0||this.interceptions.isUsed()}intercept(e){this.interceptions.intercept(e)}}class s extends o{call(...e){if(!this.isUsed())return;const t={};this.interceptions.call(t,...e);try{this.taps.forEach((r=>{n(r,e,t)}))}catch(r){throw this.interceptions.error(r),r}this.interceptions.done()}}class a extends o{call(...e){if(!this.isUsed())return;const t={};this.interceptions.call(t,...e);for(let r=0;r<this.taps.length;r+=1){const i=n(this.taps[r],e,t);if(void 0!==i)return this.interceptions.result(i),i}this.interceptions.done()}}class l extends o{call(...e){const t={};this.interceptions.call(t,...e);let[r,...i]=e;for(let o=0;o<this.taps.length;o+=1){const e=n(this.taps[o],[r,...i],t);void 0!==e&&(r=e)}return this.interceptions.result(r),r}}},function(e,t,r){(function(t){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,r,n){"use strict";function i(e){if(!(this instanceof i))return new i(e);this._=e}var o=i.prototype;function s(e,t){for(var r=0;r<e;r++)t(r)}function a(e,t,r){return function(e,t){s(t.length,(function(r){e(t[r],r,t)}))}((function(r,n,i){t=e(t,r,n,i)}),r),t}function l(e,t){return a((function(t,r,n,i){return t.concat([e(r,n,i)])}),[],t)}function u(e,r){var n={v:0,buf:r};return s(e,(function(){var e;n={v:n.v<<1|(e=n.buf,e[0]>>7),buf:function(e){var r=a((function(e,r,n,i){return e.concat(n===i.length-1?t.from([r,0]).readUInt16BE(0):i.readUInt16BE(n))}),[],e);return t.from(l((function(e){return(e<<1&65535)>>8}),r))}(n.buf)}})),n}function c(){return"undefined"!=typeof t}function f(){if(!c())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function h(e){f();var t=a((function(e,t){return e+t}),0,e);if(t%8!=0)throw new Error("The bits ["+e.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var r,n=t/8,o=(r=function(e){return e>48},a((function(e,t){return e||(r(t)?t:e)}),null,e));if(o)throw new Error(o+" bit range requested exceeds 48 bit (6 byte) Number max.");return new i((function(t,r){var i=n+r;return i>t.length?k(r,n.toString()+" bytes"):x(i,a((function(e,t){var r=u(t,e.buf);return{coll:e.coll.concat(r.v),buf:r.buf}}),{coll:[],buf:t.slice(r,i)},e).coll)}))}function p(e,t){return new i((function(r,n){return f(),n+t>r.length?k(n,t+" bytes for "+e):x(n+t,r.slice(n,n+t))}))}function d(e,t){if("number"!=typeof(r=t)||Math.floor(r)!==r||t<0||t>6)throw new Error(e+" requires integer length in range [0, 6].");var r}function g(e){return d("uintBE",e),p("uintBE("+e+")",e).map((function(t){return t.readUIntBE(0,e)}))}function m(e){return d("uintLE",e),p("uintLE("+e+")",e).map((function(t){return t.readUIntLE(0,e)}))}function v(e){return d("intBE",e),p("intBE("+e+")",e).map((function(t){return t.readIntBE(0,e)}))}function y(e){return d("intLE",e),p("intLE("+e+")",e).map((function(t){return t.readIntLE(0,e)}))}function b(e){return e instanceof i}function w(e){return"[object Array]"==={}.toString.call(e)}function E(e){return c()&&t.isBuffer(e)}function x(e,t){return{status:!0,index:e,value:t,furthest:-1,expected:[]}}function k(e,t){return w(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:e,expected:t}}function S(e,t){if(!t)return e;if(e.furthest>t.furthest)return e;var r=e.furthest===t.furthest?function(e,t){if(function(){if(void 0!==i._supportsSet)return i._supportsSet;var e="undefined"!=typeof Set;return i._supportsSet=e,e}()&&Array.from){for(var r=new Set(e),n=0;n<t.length;n++)r.add(t[n]);var o=Array.from(r);return o.sort(),o}for(var s={},a=0;a<e.length;a++)s[e[a]]=!0;for(var l=0;l<t.length;l++)s[t[l]]=!0;var u=[];for(var c in s)({}).hasOwnProperty.call(s,c)&&u.push(c);return u.sort(),u}(e.expected,t.expected):t.expected;return{status:e.status,index:e.index,value:e.value,furthest:t.furthest,expected:r}}var A={};function O(e,t){if(E(e))return{offset:t,line:-1,column:-1};e in A||(A[e]={});for(var r=A[e],n=0,i=0,o=0,s=t;s>=0;){if(s in r){n=r[s].line,0===o&&(o=r[s].lineStart);break}("\n"===e.charAt(s)||"\r"===e.charAt(s)&&"\n"!==e.charAt(s+1))&&(i++,0===o&&(o=s+1)),s--}var a=n+i,l=t-o;return r[t]={line:a,lineStart:o},{offset:t,line:a+1,column:l+1}}function R(e){if(!b(e))throw new Error("not a parser: "+e)}function T(e,t){return"string"==typeof e?e.charAt(t):e[t]}function P(e){if("number"!=typeof e)throw new Error("not a number: "+e)}function _(e){if("function"!=typeof e)throw new Error("not a function: "+e)}function C(e){if("string"!=typeof e)throw new Error("not a string: "+e)}var L=2,j=3,N=8,I=5*N,U=4*N,B=" ";function D(e,t){return new Array(t+1).join(e)}function q(e,t,r){var n=t-e.length;return n<=0?e:D(r,n)+e}function M(e,t,r,n){return{from:e-t>0?e-t:0,to:e+r>n?n:e+r}}function V(e,t){var r,n,i,o,s,u=t.index,c=u.offset,f=1;if(c===e.length)return"Got the end of the input";if(E(e)){var h=c-c%N,p=c-h,d=M(h,I,U+N,e.length),g=l((function(e){return l((function(e){return q(e.toString(16),2,"0")}),e)}),function(e,t){var r=e.length,n=[],i=0;if(r<=t)return[e.slice()];for(var o=0;o<r;o++)n[i]||n.push([]),n[i].push(e[o]),(o+1)%t==0&&i++;return n}(e.slice(d.from,d.to).toJSON().data,N));o=function(e){return 0===e.from&&1===e.to?{from:e.from,to:e.to}:{from:e.from/N,to:Math.floor(e.to/N)}}(d),n=h/N,r=3*p,p>=4&&(r+=1),f=2,i=l((function(e){return e.length<=4?e.join(" "):e.slice(0,4).join(" ")+" "+e.slice(4).join(" ")}),g),(s=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(s=2)}else{var m=e.split(/\r\n|[\n\r\u2028\u2029]/);r=u.column-1,n=u.line-1,o=M(n,L,j,m.length),i=m.slice(o.from,o.to),s=o.to.toString().length}var v=n-o.from;return E(e)&&(s=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(s=2),a((function(t,n,i){var a,l=i===v,u=l?"> ":B;return a=E(e)?q((8*(o.from+i)).toString(16),s,"0"):q((o.from+i+1).toString(),s," "),[].concat(t,[u+a+" | "+n],l?[B+D(" ",s)+" | "+q("",r," ")+D("^",f)]:[])}),[],i).join("\n")}function F(e,t){return["\n","-- PARSING FAILED "+D("-",50),"\n\n",V(e,t),"\n\n",(r=t.expected,1===r.length?"Expected:\n\n"+r[0]:"Expected one of the following: \n\n"+r.join(", ")),"\n"].join("");var r}function z(e){return void 0!==e.flags?e.flags:[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.unicode?"u":"",e.sticky?"y":""].join("")}function H(){for(var e=[].slice.call(arguments),t=e.length,r=0;r<t;r+=1)R(e[r]);return i((function(r,n){for(var i,o=new Array(t),s=0;s<t;s+=1){if(!(i=S(e[s]._(r,n),i)).status)return i;o[s]=i.value,n=i.index}return S(x(n,o),i)}))}function $(){var e=[].slice.call(arguments);if(0===e.length)throw new Error("seqMap needs at least one argument");var t=e.pop();return _(t),H.apply(null,e).map((function(e){return t.apply(null,e)}))}function W(){var e=[].slice.call(arguments),t=e.length;if(0===t)return J("zero alternates");for(var r=0;r<t;r+=1)R(e[r]);return i((function(t,r){for(var n,i=0;i<e.length;i+=1)if((n=S(e[i]._(t,r),n)).status)return n;return n}))}function G(e,t){return Y(e,t).or(K([]))}function Y(e,t){return R(e),R(t),$(e,t.then(e).many(),(function(e,t){return[e].concat(t)}))}function Z(e){C(e);var t="'"+e+"'";return i((function(r,n){var i=n+e.length,o=r.slice(n,i);return o===e?x(i,o):k(n,t)}))}function Q(e,t){!function(e){if(!(e instanceof RegExp))throw new Error("not a regexp: "+e);for(var t=z(e),r=0;r<t.length;r++){var n=t.charAt(r);if("i"!==n&&"m"!==n&&"u"!==n&&"s"!==n)throw new Error('unsupported regexp flag "'+n+'": '+e)}}(e),arguments.length>=2?P(t):t=0;var r=function(e){return RegExp("^(?:"+e.source+")",z(e))}(e),n=""+e;return i((function(e,i){var o=r.exec(e.slice(i));if(o){if(0<=t&&t<=o.length){var s=o[0],a=o[t];return x(i+s.length,a)}return k(i,"valid match group (0 to "+o.length+") in "+n)}return k(i,n)}))}function K(e){return i((function(t,r){return x(r,e)}))}function J(e){return i((function(t,r){return k(r,e)}))}function X(e){if(b(e))return i((function(t,r){var n=e._(t,r);return n.index=r,n.value="",n}));if("string"==typeof e)return X(Z(e));if(e instanceof RegExp)return X(Q(e));throw new Error("not a string, regexp, or parser: "+e)}function ee(e){return R(e),i((function(t,r){var n=e._(t,r),i=t.slice(r,n.index);return n.status?k(r,'not "'+i+'"'):x(r,null)}))}function te(e){return _(e),i((function(t,r){var n=T(t,r);return r<t.length&&e(n)?x(r+1,n):k(r,"a character/byte matching "+e)}))}function re(e,t){arguments.length<2&&(t=e,e=void 0);var r=i((function(e,n){return r._=t()._,r._(e,n)}));return e?r.desc(e):r}function ne(){return J("fantasy-land/empty")}o.parse=function(e){if("string"!=typeof e&&!E(e))throw new Error(".parse must be called with a string or Buffer as its argument");var t,r=this.skip(ae)._(e,0);return t=r.status?{status:!0,value:r.value}:{status:!1,index:O(e,r.furthest),expected:r.expected},delete A[e],t},o.tryParse=function(e){var t=this.parse(e);if(t.status)return t.value;var r=F(e,t),n=new Error(r);throw n.type="ParsimmonError",n.result=t,n},o.assert=function(e,t){return this.chain((function(r){return e(r)?K(r):J(t)}))},o.or=function(e){return W(this,e)},o.trim=function(e){return this.wrap(e,e)},o.wrap=function(e,t){return $(e,this,t,(function(e,t){return t}))},o.thru=function(e){return e(this)},o.then=function(e){return R(e),H(this,e).map((function(e){return e[1]}))},o.many=function(){var e=this;return i((function(t,r){for(var n=[],i=void 0;;){if(!(i=S(e._(t,r),i)).status)return S(x(r,n),i);if(r===i.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");r=i.index,n.push(i.value)}}))},o.tieWith=function(e){return C(e),this.map((function(t){if(function(e){if(!w(e))throw new Error("not an array: "+e)}(t),t.length){C(t[0]);for(var r=t[0],n=1;n<t.length;n++)C(t[n]),r+=e+t[n];return r}return""}))},o.tie=function(){return this.tieWith("")},o.times=function(e,t){var r=this;return arguments.length<2&&(t=e),P(e),P(t),i((function(n,i){for(var o=[],s=void 0,a=void 0,l=0;l<e;l+=1){if(a=S(s=r._(n,i),a),!s.status)return a;i=s.index,o.push(s.value)}for(;l<t&&(a=S(s=r._(n,i),a),s.status);l+=1)i=s.index,o.push(s.value);return S(x(i,o),a)}))},o.result=function(e){return this.map((function(){return e}))},o.atMost=function(e){return this.times(0,e)},o.atLeast=function(e){return $(this.times(e),this.many(),(function(e,t){return e.concat(t)}))},o.map=function(e){_(e);var t=this;return i((function(r,n){var i=t._(r,n);return i.status?S(x(i.index,e(i.value)),i):i}))},o.contramap=function(e){_(e);var t=this;return i((function(r,n){var i=t.parse(e(r.slice(n)));return i.status?x(n+r.length,i.value):i}))},o.promap=function(e,t){return _(e),_(t),this.contramap(e).map(t)},o.skip=function(e){return H(this,e).map((function(e){return e[0]}))},o.mark=function(){return $(ie,this,ie,(function(e,t,r){return{start:e,value:t,end:r}}))},o.node=function(e){return $(ie,this,ie,(function(t,r,n){return{name:e,value:r,start:t,end:n}}))},o.sepBy=function(e){return G(this,e)},o.sepBy1=function(e){return Y(this,e)},o.lookahead=function(e){return this.skip(X(e))},o.notFollowedBy=function(e){return this.skip(ee(e))},o.desc=function(e){w(e)||(e=[e]);var t=this;return i((function(r,n){var i=t._(r,n);return i.status||(i.expected=e),i}))},o.fallback=function(e){return this.or(K(e))},o.ap=function(e){return $(e,this,(function(e,t){return e(t)}))},o.chain=function(e){var t=this;return i((function(r,n){var i=t._(r,n);return i.status?S(e(i.value)._(r,i.index),i):i}))},o.concat=o.or,o.empty=ne,o.of=K,o["fantasy-land/ap"]=o.ap,o["fantasy-land/chain"]=o.chain,o["fantasy-land/concat"]=o.concat,o["fantasy-land/empty"]=o.empty,o["fantasy-land/of"]=o.of,o["fantasy-land/map"]=o.map;var ie=i((function(e,t){return x(t,O(e,t))})),oe=i((function(e,t){return t>=e.length?k(t,"any character/byte"):x(t+1,T(e,t))})),se=i((function(e,t){return x(e.length,e.slice(t))})),ae=i((function(e,t){return t<e.length?k(t,"EOF"):x(t,null)})),le=Q(/[0-9]/).desc("a digit"),ue=Q(/[0-9]*/).desc("optional digits"),ce=Q(/[a-z]/i).desc("a letter"),fe=Q(/[a-z]*/i).desc("optional letters"),he=Q(/\s*/).desc("optional whitespace"),pe=Q(/\s+/).desc("whitespace"),de=Z("\r"),ge=Z("\n"),me=Z("\r\n"),ve=W(me,ge,de).desc("newline"),ye=W(ve,ae);i.all=se,i.alt=W,i.any=oe,i.cr=de,i.createLanguage=function(e){var t={};for(var r in e)({}).hasOwnProperty.call(e,r)&&function(r){t[r]=re((function(){return e[r](t)}))}(r);return t},i.crlf=me,i.custom=function(e){return i(e(x,k))},i.digit=le,i.digits=ue,i.empty=ne,i.end=ye,i.eof=ae,i.fail=J,i.formatError=F,i.index=ie,i.isParser=b,i.lazy=re,i.letter=ce,i.letters=fe,i.lf=ge,i.lookahead=X,i.makeFailure=k,i.makeSuccess=x,i.newline=ve,i.noneOf=function(e){return te((function(t){return e.indexOf(t)<0})).desc("none of '"+e+"'")},i.notFollowedBy=ee,i.of=K,i.oneOf=function(e){for(var t=e.split(""),r=0;r<t.length;r++)t[r]="'"+t[r]+"'";return te((function(t){return e.indexOf(t)>=0})).desc(t)},i.optWhitespace=he,i.Parser=i,i.range=function(e,t){return te((function(r){return e<=r&&r<=t})).desc(e+"-"+t)},i.regex=Q,i.regexp=Q,i.sepBy=G,i.sepBy1=Y,i.seq=H,i.seqMap=$,i.seqObj=function(){for(var e,t={},r=0,n=(e=arguments,Array.prototype.slice.call(e)),o=n.length,s=0;s<o;s+=1){var a=n[s];if(!b(a)){if(w(a)&&2===a.length&&"string"==typeof a[0]&&b(a[1])){var l=a[0];if(Object.prototype.hasOwnProperty.call(t,l))throw new Error("seqObj: duplicate key "+l);t[l]=!0,r++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(0===r)throw new Error("seqObj expects at least one named parser, found zero");return i((function(e,t){for(var r,i={},s=0;s<o;s+=1){var a,l;if(w(n[s])?(a=n[s][0],l=n[s][1]):(a=null,l=n[s]),!(r=S(l._(e,t),r)).status)return r;a&&(i[a]=r.value),t=r.index}return S(x(t,i),r)}))},i.string=Z,i.succeed=K,i.takeWhile=function(e){return _(e),i((function(t,r){for(var n=r;n<t.length&&e(T(t,n));)n++;return x(n,t.slice(r,n))}))},i.test=te,i.whitespace=pe,i["fantasy-land/empty"]=ne,i["fantasy-land/of"]=K,i.Binary={bitSeq:h,bitSeqObj:function(e){f();var t={},r=0,n=l((function(e){if(w(e)){var n=e;if(2!==n.length)throw new Error("["+n.join(", ")+"] should be length 2, got length "+n.length);if(C(n[0]),P(n[1]),Object.prototype.hasOwnProperty.call(t,n[0]))throw new Error("duplicate key in bitSeqObj: "+n[0]);return t[n[0]]=!0,r++,n}return P(e),[null,e]}),e);if(r<1)throw new Error("bitSeqObj expects at least one named pair, got ["+e.join(", ")+"]");var i=l((function(e){return e[0]}),n);return h(l((function(e){return e[1]}),n)).map((function(e){return a((function(e,t){return null!==t[0]&&(e[t[0]]=t[1]),e}),{},l((function(t,r){return[t,e[r]]}),i))}))},byte:function(e){if(f(),P(e),e>255)throw new Error("Value specified to byte constructor ("+e+"=0x"+e.toString(16)+") is larger in value than a single byte.");var t=(e>15?"0x":"0x0")+e.toString(16);return i((function(r,n){var i=T(r,n);return i===e?x(n+1,i):k(n,t)}))},buffer:function(e){return p("buffer",e).map((function(e){return t.from(e)}))},encodedString:function(e,t){return p("string",t).map((function(t){return t.toString(e)}))},uintBE:g,uint8BE:g(1),uint16BE:g(2),uint32BE:g(4),uintLE:m,uint8LE:m(1),uint16LE:m(2),uint32LE:m(4),intBE:v,int8BE:v(1),int16BE:v(2),int32BE:v(4),intLE:y,int8LE:y(1),int16LE:y(2),int32LE:y(4),floatBE:p("floatBE",4).map((function(e){return e.readFloatBE(0)})),floatLE:p("floatLE",4).map((function(e){return e.readFloatLE(0)})),doubleBE:p("doubleBE",8).map((function(e){return e.readDoubleBE(0)})),doubleLE:p("doubleLE",8).map((function(e){return e.readDoubleLE(0)}))},e.exports=i}])}).call(this,r(18).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=a,t.addLast=u,t.addFirst=c,t.removeLast=f,t.removeFirst=h,t.insert=p,t.removeAt=d,t.replaceAt=g,t.getIn=m,t.set=v,t.setIn=y,t.update=w,t.updateIn=E,t.merge=x,t.mergeDeep=k,t.mergeIn=S,t.omit=A,t.addDefaults=O,t.default=void 0;const n="INVALID_ARGS";function i(e){throw new Error(e)}function o(e){const t=Object.keys(e);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}const s={}.hasOwnProperty;function a(e){if(Array.isArray(e))return e.slice();const t=e,r=o(t),n={};for(let i=0;i<r.length;i++){const e=r[i];n[e]=t[e]}return n}function l(e){return null!=e&&"object"===typeof e}function u(e,t){return Array.isArray(t)?e.concat(t):e.concat([t])}function c(e,t){return Array.isArray(t)?t.concat(e):[t].concat(e)}function f(e){return e.length?e.slice(0,e.length-1):e}function h(e){return e.length?e.slice(1):e}function p(e,t,r){return e.slice(0,t).concat(Array.isArray(r)?r:[r]).concat(e.slice(t))}function d(e,t){return t>=e.length||t<0?e:e.slice(0,t).concat(e.slice(t+1))}function g(e,t,r){if(e[t]===r)return e;const n=e.length,i=Array(n);for(let o=0;o<n;o++)i[o]=e[o];return i[t]=r,i}function m(e,t){if(Array.isArray(t)||i(n),null==e)return;let r=e;for(let n=0;n<t.length;n++){const e=t[n];if(r=null!=r?r[e]:void 0,void 0===r)return r}return r}function v(e,t,r){let n=e;if(null==n&&(n="number"===typeof t?[]:{}),n[t]===r)return n;const i=a(n);return i[t]=r,i}function y(e,t,r){return t.length?b(e,t,r,0):r}function b(e,t,r,n){let i;const o=t[n];if(n===t.length-1)i=r;else{i=b(l(e)&&l(e[o])?e[o]:"number"===typeof t[n+1]?[]:{},t,r,n+1)}return v(e,o,i)}function w(e,t,r){return v(e,t,r(null==e?void 0:e[t]))}function E(e,t,r){return y(e,t,r(m(e,t)))}function x(e,t,r,n,i,o,...s){return s.length?R.call(null,!1,!1,e,t,r,n,i,o,...s):R(!1,!1,e,t,r,n,i,o)}function k(e,t,r,n,i,o,...s){return s.length?R.call(null,!1,!0,e,t,r,n,i,o,...s):R(!1,!0,e,t,r,n,i,o)}function S(e,t,r,n,i,o,s,...a){let l,u=m(e,t);return null==u&&(u={}),l=a.length?R.call(null,!1,!1,u,r,n,i,o,s,...a):R(!1,!1,u,r,n,i,o,s),y(e,t,l)}function A(e,t){const r=Array.isArray(t)?t:[t];let n=!1;for(let o=0;o<r.length;o++)if(s.call(e,r[o])){n=!0;break}if(!n)return e;const i={},a=o(e);for(let o=0;o<a.length;o++){const t=a[o];r.indexOf(t)>=0||(i[t]=e[t])}return i}function O(e,t,r,n,i,o,...s){return s.length?R.call(null,!0,!1,e,t,r,n,i,o,...s):R(!0,!1,e,t,r,n,i,o)}function R(e,t,r,...s){let u=r;null==u&&i(n);let c=!1;for(let n=0;n<s.length;n++){const r=s[n];if(null==r)continue;const i=o(r);if(i.length)for(let n=0;n<=i.length;n++){const o=i[n];if(e&&void 0!==u[o])continue;let s=r[o];t&&l(u[o])&&l(s)&&(s=R(e,t,u[o],s)),void 0!==s&&s!==u[o]&&(c||(c=!0,u=a(u)),u[o]=s)}}return u}var T={clone:a,addLast:u,addFirst:c,removeLast:f,removeFirst:h,insert:p,removeAt:d,replaceAt:g,getIn:m,set:v,setIn:y,update:w,updateIn:E,merge:x,mergeDeep:k,mergeIn:S,omit:A,addDefaults:O};t.default=T},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toError=t.NestedError=void 0;class n extends Error{constructor(e,...t){super(e);const r=n.getErrorReport(this);if(1===t.length){const e=i(t[0]);this.innerErrors=[e];const o=n.getErrorReport(e);return void(this.stack=`${r}\n\n======= INNER ERROR =======\n\n${o}`)}this.innerErrors=t.map((e=>i(e)));const o=this.innerErrors.map(((e,r)=>{const i=n.getErrorReport(e);return`======= INNER ERROR (${r+1} of ${t.length}) =======\n\n${i}`})).join("\n\n");this.stack=`${r}\n\n${o}`}get innerError(){return 0===this.innerErrors.length?null:this.innerErrors[0]}static rethrow(e){return(...t)=>{throw new this(e,...t)}}}function i(e){try{return e instanceof Error?e:new Error(`Value that is not an instance of Error was thrown: ${e}`)}catch{return new Error("Failed to stringify non-instance of Error that was thrown.This is possibly due to the fact that toString() method of the valuedoesn't return a primitive value.")}}t.NestedError=n,n.getErrorReport="string"===typeof(new Error).stack?e=>e.stack:e=>`${e.name}: ${e.message}`,n.prototype.name="NestedError",t.toError=i},function(e,t,r){e.exports=function(e,t,r,n,i){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:i;return e===i?r:e}},function(e,t,r){"use strict";r.d(t,"NodeType",(function(){return mt})),r.d(t,"resolveDataRefsInString",(function(){return ht}));var n=r(0),i=r(3),o=r(9),s=r.n(o),a=r(1),l=r.n(a),u=r(12),c=r(4),f=r.n(c),h=r(2),p=r(7),d=r(10),g=r.n(d),m=r(13),v=r.n(m),y=r(14);const b=e=>({name:"Value",value:e}),w=e=>({name:"Expression",value:e}),E=e=>({name:"PathNode",path:e}),x=(e,t)=>({name:"Query",key:e,value:t}),k=e=>1===e.length?e[0]:{name:"Concatenated",value:e},S=l.a.string('"'),A=l.a.string("'"),O=l.a.string("`"),R=l.a.regex(/[\w\-@]+/).desc("identifier").map(b);let T;const P=l.a.lazy((()=>T)).trim(l.a.optWhitespace).wrap(l.a.string("{{"),l.a.string("}}")).map(E),_=l.a.regex(/[^`]*/).wrap(O,O).map(w),C=l.a.alt(R,P,_).atLeast(1).map(s.a).map(k),L=l.a.alt(l.a.regex(/[^"]*/).wrap(S,S).map(b),l.a.regex(/[^']*/).wrap(A,A).map(b),C),j=l.a.seq(L,l.a.string("=").times(1,3).trim(l.a.optWhitespace),L).map((([e,,t])=>x(e,t))),N=l.a.alt(j,L).trim(l.a.optWhitespace).wrap(l.a.string("["),l.a.string("]")).many(),I=l.a.seqMap(C,N,((e,t)=>[e,...t]));T=l.a.sepBy(I,l.a.string(".")).map(s.a),new u.Grammars.W3C.Parser('\nvalue ::= segment_and_bracket (SEGMENT_SEPARATOR segment_and_bracket)*\nsegment ::= concatenated | expression | modelRef | identifier \nconcatenated ::= (expression | modelRef | identifier)+ \nmodelRef ::= OPEN_CURL OPEN_CURL value CLOSE_CURL CLOSE_CURL \nidentifier ::= [\\w\\-@]+\nquery ::= WHITESPACE* optionally_quoted_segment WHITESPACE* EQUALS EQUALS? EQUALS? WHITESPACE* optionally_quoted_segment WHITESPACE*\nbrackets ::= OPEN_BRACKET WHITESPACE* (query | optionally_quoted_segment) WHITESPACE* CLOSE_BRACKET \nsegment_and_bracket ::= segment brackets*\nquoted_value ::= [^"\']*\noptionally_quoted_segment ::= WHITESPACE* SINGLE_QUOTE quoted_value SINGLE_QUOTE WHITESPACE* | WHITESPACE* DOUBLE_QUOTE quoted_value DOUBLE_QUOTE WHITESPACE* | WHITESPACE* segment WHITESPACE*\nexpression_value ::= [^`]*\nexpression ::= BACK_TICK expression_value BACK_TICK\n\nEQUALS ::= "="\nSEGMENT_SEPARATOR ::= "."\nSINGLE_QUOTE ::= "\'"\nDOUBLE_QUOTE ::= \'"\'\nWHITESPACE ::= " "\nOPEN_CURL ::= "{"\nCLOSE_CURL ::= "}" \nOPEN_BRACKET ::= "[" \nCLOSE_BRACKET ::= "]"\nBACK_TICK ::= "`" \n');const U="'",B="`",D=e=>{if(!e)return!1;const t=e.charCodeAt(0);return!(32===t||34===t||39===t||40===t||41===t||42===t||46===t||61===t||91===t||93===t||96===t||123===t||125===t)},q=e=>{let t=1,r=e.charAt(0);const n=n=>{if(n&&r!==n)throw new Error(`Expected char: ${n} but got: ${r}`);return r=e.charAt(t),t+=1,r},i=()=>{for(;" "===r;)n()},o=()=>{var e,t;return null!=(t=null!=(e=(()=>{if("{"===r){n("{"),n("{");const e=u();return n("}"),n("}"),e}})())?e:(()=>{if(r===B){n(B);let e=r;for(;n()&&r!==B;)e+=r;if(n(B),e)return w(e)}})())?t:(()=>{if(!D(r))return;let e=r;for(;n()&&D(r);)e+=r;return e?b(e):void 0})()},s=()=>{if(i(),r===U||'"'===r){const e=r===U;n(e?U:'"');const t=(e=>{if(!(null==r?void 0:r.match(e)))return;let t=r;for(;n()&&(null==r?void 0:r.match(e));)t+=r;return t?b(t):void 0})(/[^'"]+/);return n(e?U:'"'),t}return o()},a=()=>{if("["===r){n("["),i();let e=s();if(!e)throw new Error("Expected identifier");if(i(),(()=>{if("="!==r)return!1;for(;"="===r;)n();return!0})()){i();const t=s();e=x(e,t),i()}return e&&n("]"),e}},l=()=>{const e=[],t=(()=>{const e=[];let t=o();for(;void 0!==t;)e.push(t),t=o();if(0!==e.length)return k(e)})();if(t){e.push(t);let r=a();for(;void 0!==r;)e.push(r),r=a()}return e},u=()=>{const e=[];let t=l();for(;void 0!==t&&(e.push(...t),r&&"}"!==r);){if(0===t.length&&r)throw new Error(`Unexpected character: ${r}`);n("."),t=l()}return E(e)};try{return{status:!0,path:u()}}catch(c){return{status:!1,error:c.message}}};function M(e){return!("string"===typeof e||Array.isArray(e))}class V{constructor(e,t=(e=>new V(e))){const r=Array.isArray(e)?e:e.split(".");this.split=r.map((e=>{if("number"===typeof e)return e;const t=Number(e);return isNaN(t)?e:t})),Object.freeze(this.split),this.joined=this.split.join("."),this.factory=t}asArray(){return this.split}asString(){return this.joined}contains(e){const t=e.asArray();if(t.length<this.split.length)return!1;for(let r=0;r<this.split.length;r++)if(this.split[r]!==t[r])return!1;return!0}relative(e){return this.asArray().slice(e.asArray().length)}parent(){return this.factory(this.split.slice(0,-1))}key(){return this.split[this.split.length-1]}descendent(e){const t=(r=e,Array.isArray(r)?r:"string"===typeof r?r.split("."):r.asArray());var r;return this.factory(this.split.concat(t))}}var F=Object.defineProperty,z=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,W=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G=(e,t)=>{for(var r in t||(t={}))H.call(t,r)&&W(e,r,t[r]);if(z)for(var r of z(t))$.call(t,r)&&W(e,r,t[r]);return e};function Y(e,t,r){var n;const o={updates:{},path:[]};function s(e){if("Value"===e.name)return e.value;if("PathNode"===e.name){const n=Y(e,t);n.updates&&(o.updates=G(G({},o.updates),n.updates));try{return t.convertToPath(t.getValue(n.path))}catch(r){throw new i.NestedError(`Unable to resolve path segment: ${n.path}`,r)}}if("Expression"===e.name)try{const r=t.evaluate(e.value);return t.convertToPath(r)}catch(r){throw new i.NestedError(`Unable to resolve path: ${e.value}`,r)}throw new Error(`Unable to resolve value for node: ${e.name}`)}function a(e){"string"===typeof e&&e.indexOf(".")>-1?e.split(".").forEach((e=>{o.path.push(function(e){const t=parseInt(e,10);return isNaN(t)?e:t}(e))})):o.path.push(e)}return e.path.forEach((function(e){var n,i;const l=null!=(n=null==r?void 0:r.beforeResolveNode.call(e,G(G({},o),t)))?n:e;switch(l.name){case"Expression":case"PathNode":a(s(l));break;case"Value":a(l.value);break;case"Query":{const e=null!=(i=t.getValue(o.path))?i:[],{key:r,value:n}=l,a=s(r),u=n&&s(n),c=function(e,t,r){return e.findIndex((e=>!(!e||"object"!==typeof e)&&e[t]==r))}(e,a,u);void 0===c||-1===c?(o.updates[[...o.path,e.length,a].join(".")]=u,o.path.push(e.length)):o.path.push(c);break}case"Concatenated":o.path.push(l.value.map(s).join(""));break;default:throw new Error(`Unsupported node type: ${l.name}`)}})),{path:o.path,updates:Object.keys(null!=(n=o.updates)?n:{}).length>0?o.updates:void 0}}var Z=Object.defineProperty,Q=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t)=>{for(var r in t||(t={}))K.call(t,r)&&X(e,r,t[r]);if(Q)for(var r of Q(t))J.call(t,r)&&X(e,r,t[r]);return e};const te=/[\s()*=`{}'"[\]]/,re=/^[^.]+(\..+)*$/,ne={get:()=>{throw new Error("Not Implemented")},set:()=>{throw new Error("Not Implemented")},evaluate:()=>{throw new Error("Not Implemented")}};class ie{constructor(e){this.hooks={skipOptimization:new n.a,beforeResolveNode:new n.c},this.parserOptions=ee(ee({},ne),e),this.cache={},this.parseCache={},this.parse=this.parse.bind(this)}normalizePath(e,t){var r,n;if(!te.test(e)&&re.test(e)&&!0!==this.hooks.skipOptimization.call(e))return{path:e.split("."),updates:void 0};const o=null!=(r=this.parseCache[e])?r:q(e);if(this.parseCache[e]=o,"object"!==typeof o||!(null==o?void 0:o.status))throw new TypeError(`Cannot normalize path "${e}": ${null!=(n=null==o?void 0:o.error)?n:"Unknown Error."}`);try{return Y(o.path,t,this.hooks)}catch(s){throw new i.NestedError(`Cannot resolve binding: ${e}`,s)}}getBindingForNormalizedResult(e){const t=e.path.join(".");if(this.cache[t])return this.cache[t];const r=new V(""===t?[]:e.path,this.parse);return this.cache[t]=r,r}parse(e,t={}){if(M(e))return e;const r=ee(ee({},this.parserOptions),t);let n={};const i=Array.isArray(e)?e.join("."):String(e),o={getValue:e=>{const t=this.normalizePath(e.join("."),o);return r.get(this.getBindingForNormalizedResult(t))},evaluate:e=>r.evaluate(e),convertToPath:e=>{if(void 0===e)throw new Error("Attempted to convert undefined value to binding path");if("string"!==typeof e&&"number"!==typeof e&&"boolean"!==typeof e)throw new Error(`Attempting to convert ${typeof e} to a binding path.`);const t=this.normalizePath(String(e),o);t.updates&&(n=ee(ee({},n),t.updates));const r=t.path.join(".");if(""===r)throw new Error("Nested path resolved to an empty path");return r}},s=this.normalizePath(i,o);s.updates&&(n=ee(ee({},n),s.updates));const a=Object.keys(n);if(!r.readOnly&&a.length>0){const e=a.map((e=>[this.parse(e),n[e]]));r.set(e)}return this.getBindingForNormalizedResult(s)}}class oe{constructor(){this.readDeps=new Set,this.writeDeps=new Set,this.namedDependencySets={},this.namedSet="core",this.createSubset("core"),this.createSubset("children")}createSubset(e,t=!1){!t&&this.namedDependencySets[e]||(this.namedDependencySets[e]={readDeps:new Set,writeDeps:new Set})}getDependencies(e){var t,r,n;return void 0!==e?null!=(n=null==(r=null==(t=this.namedDependencySets)?void 0:t[e])?void 0:r.readDeps)?n:new Set:this.readDeps}trackSubset(e){this.createSubset(e),this.namedSet=e}trackDefault(){this.namedSet="core"}getModified(e){var t,r,n;return void 0!==e?null!=(n=null==(r=null==(t=this.namedDependencySets)?void 0:t[e])?void 0:r.writeDeps)?n:new Set:this.writeDeps}readsBinding(e){return this.readDeps.has(e)}writesBinding(e){return this.writeDeps.has(e)}reset(){this.readDeps=new Set,this.writeDeps=new Set,this.namedDependencySets={},this.namedSet="core",this.createSubset("core",!0),this.createSubset("children",!0)}addReadDep(e,t=this.namedSet){var r,n;t&&(null==(n=null==(r=this.namedDependencySets)?void 0:r[t])||n.readDeps.add(e)),this.readDeps.add(e)}addWriteDep(e,t=this.namedSet){var r,n;t&&(null==(n=null==(r=this.namedDependencySets)?void 0:r[t])||n.writeDeps.add(e)),this.writeDeps.add(e)}addChildReadDep(e){this.addReadDep(e,"children")}}class se extends oe{constructor(e){super(),this.rootModel=e,this.set=this.set.bind(this),this.get=this.get.bind(this)}set(e,t){return e.forEach((([e])=>this.addWriteDep(e))),this.rootModel.set(e,t)}get(e,t){return this.addReadDep(e),this.rootModel.get(e,t)}delete(e,t){return this.addWriteDep(e),this.rootModel.delete(e,t)}}const ae=new class{get(){}set(){return[]}delete(){}},le=new V([]);function ue(e,t,r){return r?{get:(n,i)=>{const o=null!=i?i:t;return e.get?e.get(n,o,r):null==r?void 0:r.get(n,o)},set:(n,i)=>{const o=null!=i?i:t;return e.set?e.set(n,o,r):null==r?void 0:r.set(n,o)},delete:(n,i)=>{const o=null!=i?i:t;return e.delete?e.delete(n,o,r):null==r?void 0:r.delete(n,o)}}:e}function ce(e){if(0===e.length)return ae;if(1===e.length)return ue(e[0]);function t(t){var r;return null!=(r=e.reduce(((e,r)=>ue(r,t,e)),void 0))?r:ae}return{get:(e,r)=>{var n;return null==(n=t(r))?void 0:n.get(e,r)},set:(e,r)=>{var n;return null==(n=t(r))?void 0:n.set(e,r)},delete:(e,r)=>{var n;return null==(n=t(r))?void 0:n.delete(e,r)}}}class fe{constructor(e=[]){this.hooks={onSet:new n.b},this.pipeline=e,this.effectiveDataModel=ce(this.pipeline)}setMiddleware(e){this.pipeline=e,this.effectiveDataModel=ce(e)}addMiddleware(e){this.pipeline=[...this.pipeline,e],this.effectiveDataModel=ce(this.pipeline)}reset(e={}){this.pipeline.forEach((e=>{var t;"reset"in e&&(null==(t=e.reset)||t.call(e))})),this.set([[le,e]])}set(e,t){const r=this.effectiveDataModel.set(e,t);return this.hooks.onSet.call(e),r}get(e,t){return this.effectiveDataModel.get(e,t)}delete(e,t){return this.effectiveDataModel.delete(e,t)}}class he{constructor(e={}){this.model=e,this.get=this.get.bind(this),this.set=this.set.bind(this)}reset(e={}){this.model=e}get(e){return e&&e.asString()?f()(this.model,e.asArray()):this.model}set(e){const t=[];return e.forEach((([e,r])=>{const n=this.get(e);this.model=Object(h.setIn)(this.model,e.asArray(),r),t.push({binding:e,oldValue:n,newValue:r})})),t}delete(e){const t=e.parent();if(t){const r=this.get(t);void 0!==r&&(Array.isArray(r)?this.model=Object(h.setIn)(this.model,t.asArray(),Object(h.removeAt)(r,e.key())):this.model=Object(h.setIn)(this.model,t.asArray(),Object(h.omit)(r,e.key())))}}}const pe=Symbol("Expression Node ID");function de(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&e.__id===pe}const ge=46,me=40,ve=123,ye=125,be=!0,we={"-":be,"!":be,"~":be,"+":be},Ee={"=":3,"+=":3,"-=":3,"&=":3,"|=":3,"||":5,"&&":6,"|":7,"^":8,"&":9,"==":10,"!=":10,"===":10,"!==":10,"<":11,">":11,"<=":11,">=":11,"<<":12,">>":12,">>>":12,"+":13,"-":13,"*":14,"/":14,"%":14};function xe(e,t){const r=new Error(`${e} at character ${t}`);throw r.index=t,r.description=e,r}function ke(e,t){if(e&&t)return{start:e.start,end:t.end}}function Se(e){let t=0;return Object.keys(e).forEach((r=>{r.length>t&&Object.prototype.hasOwnProperty.call(e,r)&&(t=r.length)})),t}const Ae=Se(we),Oe=Se(Ee),Re={true:!0,false:!1,null:null,undefined:void 0};function Te(e){return Ee[e]||0}function Pe(e,t,r,n){let i;return i="||"===e||"&&"===e?"LogicalExpression":"="===e?"Assignment":"+="===e||"-="===e||"&="===e||"|="===e?"Modification":"BinaryExpression",{__id:pe,type:i,operator:e,left:t,right:r,location:n}}function _e(e){return e>=48&&e<=57}function Ce(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122}function Le(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function je(e,t){var r;const n=null==(r=null==t?void 0:t.strict)||r,i=e.charAt,o=e.charCodeAt,{length:s}=e;let a=0;const l=e=>({start:{character:e},end:{character:a}});function u(t){return i.call(e,t)}function c(t){return o.call(e,t)}function f(){let e=c(a);for(;32===e||9===e;)e=c(++a)}function h(){const e=function(){let e,t,r,n=d(),i=p();if(!i)return n;let o={value:i,prec:Te(i)},s=d();s||xe(`Expected expression after ${i}`,a);const l=[n,o,s];i=p();for(;i&&(t=Te(i),0!==t);){for(o={value:i,prec:t};l.length>2&&t<=l[l.length-2].prec;)s=l.pop(),i=l.pop().value,n=l.pop(),e=Pe(i,n,s,ke(n.location,s.location)),l.push(e);e=d(),e||xe(`Expected expression after ${i}`,a),l.push(o,e),i=p()}r=l.length-1,e=l[r];for(;r>1;)e=Pe(l[r-1].value,l[r-2],e,ke(l[r-2].location,e.location)),r-=2;return e}();f();const t=a;if(a<s&&63===c(a)){a++;const r=h();if(r||xe("Expected expression",a),f(),58===c(a)){a++;const n=h();return n||xe("Expected expression",a),{__id:pe,type:"ConditionalExpression",test:e,consequent:r,alternate:n,location:l(t)}}xe("Expected :",a)}return e}function p(){f();let t=e.substr(a,Oe),r=t.length;for(;r>0;){if(Object.prototype.hasOwnProperty.call(Ee,t))return a+=r,t;t=t.substr(0,--r)}return!1}function d(){f();const t=c(a),r=a;if(_e(t)||46===t)return function(){let e="";const t=a;for(;_e(c(a));)e+=u(a++);if(c(a)===ge)for(e+=u(a++);_e(c(a));)e+=u(a++);let r=u(a);if("e"===r||"E"===r){for(e+=u(a++),r=u(a),"+"!==r&&"-"!==r||(e+=u(a++));_e(c(a));)e+=u(a++);_e(c(a-1))||xe(`Expected exponent (${e}${u(a)})`,a)}const n=c(a);Ce(n)?xe(`Variable names cannot start with a number (${e}${u(a)})`,a):n===ge&&xe("Unexpected period",a);return{__id:pe,type:"Literal",value:parseFloat(e),raw:e,location:l(t)}}();if(39===t||34===t)return g();if(Ce(t)||40===t)return function(){let e=c(a),t=e===me?function(){a++;const e=h();if(f(),41===c(a))return a++,e;xe("Unclosed (",a)}():m();const r=a;f(),e=c(a);for(;e===ge||91===e||e===me;)a++,e===ge?(f(),t={__id:pe,type:"MemberExpression",computed:!1,object:t,property:m(),location:l(r)}):91===e?(t={__id:pe,type:"MemberExpression",computed:!0,object:t,property:h(),location:l(r)},f(),e=c(a),93!==e&&xe("Unclosed [",a),a++):e===me&&(t={__id:pe,type:"CallExpression",args:v(41),callTarget:t,location:l(r)}),f(),e=c(a);return t}();if(91===t)return function(){const e=a;return a++,{__id:pe,type:"ArrayExpression",elements:v(93),location:l(e)}}();if(n=t,i=c(a+1),n===ve&&i===ve)return function(){let e="",t=!1,r=1;const n=a;a+=2;for(;a<s;){const n=u(a++);if("}"===n&&c(a)===ye){if(a++,r--,0===r){t=!0;break}e+="}}"}else"{"===n&&c(a)===ve?(r++,e+="{{",a++):e+=n}t||xe(`Unclosed brace after "${e}"`,a);return{__id:pe,type:"ModelRef",ref:e,location:l(n)}}();var n,i;if(t===ve)return function(){const e=[];let t,r,n,i=!1,o=!0;const u=a;for(++a;a<s;){if(f(),n=c(a),125===n){t&&xe("A key was defined but a value was not",a),a++,i=!0;break}o?(39!==n&&34!==n&&xe("An object must start wtih a key",a),t=g(),f(),58===c(a)?(a++,o=!1):xe("A colon must follow an object key",a)):(r=h(),e.push({key:t,value:r}),f(),n=c(a),44===n?a++:125!==n&&xe("Please add a comma to add another key",a),o=!0,t=void 0,r=void 0),n=c(a)}return i||xe("Unclosed brace in object",a),{__id:pe,type:"Object",attributes:e,location:l(u)}}();let o=e.substr(a,Ae),p=o.length;for(;p>0;){if(Object.prototype.hasOwnProperty.call(we,o))return a+=p,{__id:pe,type:"UnaryExpression",operator:o,argument:d(),prefix:!0,location:l(r)};o=o.substr(0,--p)}return!1}function g(){const e=u(a++);let t="",r=!1;const n=a;for(;a<s;){let n=u(a++);if(n===e){r=!0;break}if("\\"===n)switch(n=u(a++),n){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v"}else t+=n}return r||xe(`Unclosed quote after "${t}"`,a),{__id:pe,type:"Literal",value:t,raw:`${e}${t}${e}`,location:l(n)}}function m(){const t=a;let r=c(t);for(Ce(r)?a++:xe(`Unexpected ${u(a)}`,a);a<s&&(r=c(a),Le(r));)a++;const n=e.slice(t,a);return Object.prototype.hasOwnProperty.call(Re,n)?{__id:pe,type:"Literal",value:Re[n],raw:n,location:l(t)}:"this"===n?{__id:pe,type:"ThisExpression",location:l(t)}:{__id:pe,type:"Identifier",name:n,location:l(t)}}function v(e){const t=[];let r,i;for(;a<s;){if(f(),r=c(a),r===e){a++;break}44!==r?(i=h(),i&&"Compound"!==i.type||xe("Expected comma",a),t.push(i)):a++}return n&&r!==e&&xe(`Expected ${String.fromCharCode(e)}`,a),t}const y=[];try{for(;a<s;){const e=c(a);if(59===e||44===e){a++;continue}const t=h();t?y.push(t):n&&a<s&&xe(`Unexpected "${u(a)}"`,a)}return 1===y.length?y[0]:{__id:pe,type:"Compound",body:y,location:l(0)}}catch(b){if(n||!(b instanceof Error))throw b;return{__id:pe,type:"Compound",body:y,location:l(0),error:b}}}const Ne=(e,t,r,n)=>e.evaluate(t)?e.evaluate(r):n?e.evaluate(n):null;Ne.resolveParams=!1;var Ie=Object.freeze({__proto__:null,setDataVal:(e,t,r)=>{e.model.set([[t,r]])},getDataVal:(e,t)=>e.model.get(t),deleteDataVal:(e,t)=>e.model.delete(t),conditional:Ne});function Ue(e){return!de(e)&&("object"===typeof e&&null!==e&&!Array.isArray(e)&&"value"in e)}var Be=Object.defineProperty,De=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,ze=(e,t,r)=>t in e?Be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,He=(e,t)=>{for(var r in t||(t={}))Ve.call(t,r)&&ze(e,r,t[r]);if(Me)for(var r of Me(t))Fe.call(t,r)&&ze(e,r,t[r]);return e},$e=(e,t)=>De(e,qe(t));const We=(e,t,r)=>e.evaluate(t)&&e.evaluate(r);We.resolveParams=!1;const Ge=(e,t,r)=>e.evaluate(t)||e.evaluate(r);Ge.resolveParams=!1;const Ye={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"&&":We,"||":Ge,"!==":(e,t)=>e!==t,"===":(e,t)=>e===t,"|":(e,t)=>e|t,"&":(e,t)=>e&t,"+=":(e,t)=>e+t,"-=":(e,t)=>e-t,"&=":(e,t)=>e&t,"|=":(e,t)=>e|t},Ze={"-":e=>-e,"+":e=>Number(e),"!":e=>!e};class Qe{constructor(e){this.vars={},this.hooks={resolve:new n.c,resolveOptions:new n.c,beforeEvaluate:new n.c,onError:new n.a},this.expressionsCache=new Map,this.operators={binary:new Map(Object.entries(Ye)),unary:new Map(Object.entries(Ze)),expressions:new Map(Object.entries(Ie))},this.defaultHookOptions=$e(He({},e),{evaluate:e=>this.evaluate(e,this.defaultHookOptions),resolveNode:e=>this._execAST(e,this.defaultHookOptions)}),this.hooks.resolve.tap("ExpressionEvaluator",this._resolveNode.bind(this)),this.evaluate=this.evaluate.bind(this)}reset(){this.expressionsCache.clear()}evaluate(e,t){var r;const n=this.hooks.resolveOptions.call($e(He(He({},this.defaultHookOptions),t),{resolveNode:e=>this._execAST(e,n)}));let i=null!=(r=this.hooks.beforeEvaluate.call(e,n))?r:e;for(;Ue(i);)i=i.value;return"number"===typeof i||"boolean"===typeof i||void 0===i||null===i?i:de(i)?this._execAST(i,n):Array.isArray(i)?i.reduce(((e,r)=>this.evaluate(r,t)),null):this._execString(String(i),n)}addExpressionFunction(e,t){this.operators.expressions.set(e,t)}addBinaryOperator(e,t){this.operators.binary.set(e,t)}addUnaryOperator(e,t){this.operators.unary.set(e,t)}setExpressionVariable(e,t){this.vars[e]=t}getExpressionVariable(e){return this.vars[e]}_execAST(e,t){return this.hooks.resolve.call(void 0,e,t)}_execString(e,t){var r;if(""===e)return e;const n=e.match(/^@\[(.*)\]@$/);let o,s=e;n&&([,s]=Array.from(n));try{o=null!=(r=this.expressionsCache.get(s))?r:je(s,{strict:t.strict}),this.expressionsCache.set(s,o)}catch(a){if(t.throwErrors||!this.hooks.onError.call(a))throw new i.NestedError(`Error parsing expression: ${e}`,a);return}try{return this._execAST(o,t)}catch(a){if(t.throwErrors||!this.hooks.onError.call(a))throw new i.NestedError(`Error evaluating expression: ${e}`,a)}}_resolveNode(e,t,r){const{resolveNode:n,model:i}=r,o=$e(He({},r),{evaluate:e=>this.evaluate(e,r)});if("Literal"===t.type)return t.value;if("Identifier"===t.type)return this.vars[t.name];if("Compound"===t.type||"ThisExpression"===t.type)throw new Error(`Expression type: ${t.type} is not supported`);if("BinaryExpression"===t.type||"LogicalExpression"===t.type){const e=this.operators.binary.get(t.operator);return e?"resolveParams"in e?!1===e.resolveParams?e(o,t.left,t.right):e(o,n(t.left),n(t.right)):e(n(t.left),n(t.right)):void 0}if("UnaryExpression"===t.type){const e=this.operators.unary.get(t.operator);return e?"resolveParams"in e?e(o,!1===e.resolveParams?t.argument:n(t.argument)):e(n(t.argument)):void 0}if("Object"===t.type){const{attributes:e}=t,r={};return e.forEach((e=>{const t=n(e.key),i=n(e.value);r[t]=i})),r}if("CallExpression"===t.type){const e=t.callTarget.name,r=this.operators.expressions.get(e);if(!r)throw new Error(`Unknown expression function: ${e}`);if("resolveParams"in r&&!1===r.resolveParams)return r(o,...t.args);return r(o,...t.args.map((e=>n(e))))}if("ModelRef"===t.type)return i.get(t.ref,{context:{model:r.model}});if("MemberExpression"===t.type){return n(t.object)[n(t.property)]}if("Assignment"!==t.type){if("ConditionalExpression"===t.type){const e=n(t.test)?t.consequent:t.alternate;return n(e)}if("ArrayExpression"===t.type)return t.elements.map((e=>n(e)));if("Modification"===t.type){const e=this.operators.binary.get(t.operator);if(e){let r;return r="resolveParams"in e?!1===e.resolveParams?e(o,t.left,t.right):e(o,n(t.left),n(t.right)):e(n(t.left),n(t.right)),"ModelRef"===t.left.type?i.set([[t.left.ref,r]]):"Identifier"===t.left.type&&(this.vars[t.left.name]=r),r}return n(t.left)}}else{if("ModelRef"===t.left.type){const e=n(t.right);return i.set([[t.left.ref,e]]),e}if("Identifier"===t.left.type){const e=n(t.right);return this.vars[t.left.name]=e,e}}}}class Ke{constructor(){this.hooks={trace:new n.b,debug:new n.b,info:new n.b,warn:new n.b,error:new n.b,log:new n.b},this.logHandlers=new Set,this.trace=this.createHandler("trace"),this.debug=this.createHandler("debug"),this.info=this.createHandler("info"),this.warn=this.createHandler("warn"),this.error=this.createHandler("error")}createHandler(e){return(...t)=>{this.hooks[e].call(t),this.hooks.log.call(e,t),this.logHandlers.forEach((r=>r[e](...t)))}}addHandler(e){this.logHandlers.add(e)}removeHandler(e){this.logHandlers.delete(e)}}class Je{constructor(e){this.trace=this.createHandler("trace"),this.debug=this.createHandler("debug"),this.info=this.createHandler("info"),this.warn=this.createHandler("warn"),this.error=this.createHandler("error"),this.proxiedLoggerProvider=e}createHandler(e){return(...t)=>{const r=this.proxiedLoggerProvider();null==r||r[e](...t)}}}var Xe=Object.defineProperty,et=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,ot=(e,t,r)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,st=(e,t)=>{for(var r in t||(t={}))nt.call(t,r)&&ot(e,r,t[r]);if(rt)for(var r of rt(t))it.call(t,r)&&ot(e,r,t[r]);return e};const at=e=>e;class lt{constructor(e){this.formatters=new Map,this.types=new Map,this.schema=new Map,this.bindingSchemaNormalizedCache=new Map,this.hooks={resolveTypeForBinding:new n.c},this.schema=e?function(e){const t=new Map;if(!e.ROOT)return t;const r=[{node:e.ROOT,path:[],visited:new Set}];for(;r.length>0;){const n=r.shift();if(!n)break;const{node:i,path:o,visited:s}=n;Object.entries(i).forEach((([n,i])=>{const a=[...o,n],l=a.join(".");if(t.has(l))throw new Error("Path has already been processed. There's either a loop somewhere or a bug");if(s.has(i.type))throw new Error(`Path already contained type: ${i.type}. This likely indicates a loop in the schema`);t.set(l,i),i.isArray&&a.push("[]"),i.isRecord&&a.push("{}"),i.type&&e[i.type]&&r.push({path:a,node:e[i.type],visited:new Set([...s,i.type])})}))}return t}(e):new Map}addFormatters(e){e.forEach((e=>{this.formatters.set(e.name,e)}))}addDataTypes(e){e.forEach((e=>{this.types.set(e.type,e)}))}getValidationsForBinding(e){var t;const r=this.getApparentType(e);if(null==(t=null==r?void 0:r.validation)?void 0:t.length)return r.validation.map((e=>st({severity:"error",trigger:"change"},e)))}normalizeBinding(e){const t=this.bindingSchemaNormalizedCache.get(e);if(t)return t;let r=e.asArray(),n=r.map((e=>"number"===typeof e?"[]":e)).join(".");return n&&(this.bindingSchemaNormalizedCache.set(e,n),r=n.split(".")),r.forEach((t=>{const i=r.map((e=>e===t?"{}":e)).join(".");this.schema.get(i)&&(this.bindingSchemaNormalizedCache.set(e,i),r=i.split("."),n=i)})),n}getType(e){return this.hooks.resolveTypeForBinding.call(this.schema.get(this.normalizeBinding(e)),e)}getApparentType(e){var t,r;const n=this.getType(e);if(void 0===n)return;const i=this.getTypeDefinition(null==n?void 0:n.type);return void 0===i?n:(o=st(st({},i),n),s={validation:[...null!=(t=n.validation)?t:[],...null!=(r=i.validation)?r:[]]},et(o,tt(s)));var o,s}getTypeDefinition(e){return this.types.get(e)}getFormatterForType(e){const t=e,{type:r}=t,n=((e,t)=>{var r={};for(var n in e)nt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&rt)for(var n of rt(e))t.indexOf(n)<0&&it.call(e,n)&&(r[n]=e[n]);return r})(t,["type"]),i=this.formatters.get(r);if(i)return{format:i.format?e=>{var t;return null==(t=i.format)?void 0:t.call(i,e,n)}:at,deformat:i.deformat?e=>{var t;return null==(t=i.deformat)?void 0:t.call(i,e,n)}:at}}getFormatter(e){const t=this.getApparentType(e);if(null==t?void 0:t.format)return this.getFormatterForType(t.format)}}const ut="{{",ct="}}";function ft(e){const t=e.indexOf(ut);if(-1===t)return;let r=1,n=t+ut.length,i=e.substring(t+ut.length);for(;r>0&&i.length>0;){const e=i.indexOf(ct);if(-1===e)break;const t=i.indexOf(ut);-1!==t&&t<e?(r++,i=i.substring(t+ut.length),n+=t+ut.length):(r--,i=i.substring(e+ct.length),n+=e+ct.length)}if(0!==r)throw new Error(`Unbalanced {{ and }} in exp: ${e}`);return{start:t,end:n}}function ht(e,t){const{model:r,formatted:n=!0}=t;let i=function(e,{evaluate:t}){if(!t)return e;const r=/@\[.*?\]@/;let n=e,i=n.match(r);for(;null!==i;){const o=i[0],s=n.indexOf(o),a=t(o.substr("@[".length,o.length-"@[".length-"]@".length));if(0===s&&o===e&&"string"!==typeof a)return a;n=n.substr(0,s)+a+n.substr(s+o.length),i=n.match(r)}return n}(e,t);if(!r||"string"!==typeof i||-1===i.indexOf(ut))return i;for(;-1!==i.indexOf(ut);){const e=ft(i);if(!e)return i;const{start:t,end:o}=e,s=i.substring(t+ut.length,o-ut.length).trim(),a=r.get(s,{formatted:n});if(0===t&&o===i.length&&"string"!==typeof a)return a;i=i.substr(0,t)+a+i.substr(o)}return i}function pt(e,t){switch(typeof e){case"string":return ht(e,t);case"object":{if(!e)return e;const r=Object.keys(e);let n=e;return r.length>0&&r.forEach((r=>{n=Object(h.setIn)(n,[r],pt(e[r],t))})),n}default:return e}}function dt(e,t){return pt(e,t)}function gt(e,t){const r=new Map(e),n=t.parent(),i=t.key();if(r.forEach(((e,n)=>{(t===n||t.contains(n))&&r.delete(n)})),"number"===typeof i){Array.from(e.keys()).filter((e=>{if(n.contains(e)){const[t]=e.relative(n);return"number"===typeof t&&t>i}return!1})).sort().forEach((e=>{const[t,...i]=e.relative(n);if("number"===typeof t){const o=[t-1,...i],s=n.descendent(o);r.set(s,r.get(e)),r.delete(e)}}))}return r}var mt,vt,yt=Object.defineProperty,bt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,St=(e,t,r)=>t in e?yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class At{constructor(e,t){this.validator=e,this.shadowModelPaths=new Map,this.logger=null==t?void 0:t.logger,this.shouldIncludeInvalid=null==t?void 0:t.shouldIncludeInvalid}set(e,t,r){const n=ue(this,(i=((e,t)=>{for(var r in t||(t={}))xt.call(t,r)&&St(e,r,t[r]);if(Et)for(var r of Et(t))kt.call(t,r)&&St(e,r,t[r]);return e})({},t),bt(i,wt({includeInvalid:!0}))),r);var i;const o=[],s=new Set;e.forEach((([e,t])=>{this.shadowModelPaths.set(e,t),s.add(e)}));const a=[];this.shadowModelPaths.forEach(((e,t)=>{var r;const i=this.validator(t,n);void 0===i?o.push([t,e]):i instanceof Set?i.forEach((r=>{a.push(r.binding),r.isStrong||r.binding.asString()!==t.asString()||o.push([r.binding,e])})):s.has(t)&&(a.push(t),null==(r=this.logger)||r.debug(`Invalid value for path: ${t.asString()} - ${i.severity} - ${i.message}`))}));let l=[];if(r&&o.length>0){o.forEach((([e])=>this.shadowModelPaths.delete(e)));const e=r.set(o,t);if(0===a.length)return e;l=e}const u=a.map((e=>({binding:e,oldValue:n.get(e),newValue:n.get(e),force:!0})));return[...l,...u]}get(e,t,r){var n,i;let o=null==r?void 0:r.get(e,t);return(null!=(i=null==(n=this.shouldIncludeInvalid)?void 0:n.call(this,t))?i:!0===(null==t?void 0:t.includeInvalid))&&this.shadowModelPaths.forEach(((t,r)=>{r!==e?e.contains(r)&&(o=Object(h.setIn)(o,r.relative(e),t)):o=t})),o}delete(e,t,r){return this.shadowModelPaths=gt(this.shadowModelPaths,e),null==r?void 0:r.delete(e,t)}}class Ot{constructor(){this.registry=new Map}get(e){return this.registry.get(e)}register(e,t){this.registry.set(e,t)}}function Rt(e){var t;if(e)return"value"in e&&"object"===typeof e.value&&"string"===typeof(null==(t=e.value)?void 0:t.id)?e.value.id:void 0}(vt=mt||(mt={})).Asset="asset",vt.View="view",vt.Applicability="applicability",vt.Template="template",vt.Value="value",vt.MultiNode="multi-node",vt.Switch="switch",vt.Async="async",vt.Unknown="unknown",vt.Empty="empty";var Tt=Object.defineProperty,Pt=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Nt=(e,t,r)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,It=(e,t)=>{for(var r in t||(t={}))Lt.call(t,r)&&Nt(e,r,t[r]);if(Ct)for(var r of Ct(t))jt.call(t,r)&&Nt(e,r,t[r]);return e},Ut=(e,t)=>Pt(e,_t(t));const Bt={type:mt.Empty};class Dt{constructor(){this.hooks={onParseObject:new n.c,onCreateASTNode:new n.c,determineNodeType:new n.a,parseNode:new n.a}}parseView(e){const t=this.parseObject(e,mt.View);if(!t)throw new Error("Unable to parse object into a view");return t}parseAsync(e,t,r){const n=this.parseObject(Object(h.omit)(e,"async"),t,r),i=Rt(n);return null!==n&&i?this.createASTNode({id:i,type:mt.Async,value:n},e):null}createASTNode(e,t){const r=this.hooks.onCreateASTNode.call(e,t);return void 0===r?e:r}hasTemplateValues(e,t){return Object.hasOwnProperty.call(e,"template")&&Array.isArray(null==e?void 0:e.template)&&e.template.length&&e.template.find((e=>e.output===t))}hasSwitchKey(e){return"staticSwitch"===e}parseObject(e,t=mt.Value,r={templateDepth:0}){var n;const i=this.hooks.determineNodeType.call(e);if(void 0!==i){const n=this.hooks.parseNode.call(e,t,r,i);if(n)return n}const o=(e,n,i=[])=>{if("object"!==typeof n||null===n)return{value:n,children:[]};const s=this.hooks.onParseObject.call(n,t);if(!s)return e;const a={children:[],value:e},l=(Array.isArray(s)?s.map(((e,t)=>[t,e])):[...Object.entries(s),...Object.getOwnPropertySymbols(s).map((e=>[e,s[e]]))]).reduce(((e,t)=>{var n;const a=e,{children:l}=a,u=((e,t)=>{var r={};for(var n in e)Lt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Ct)for(var n of Ct(e))t.indexOf(n)<0&&jt.call(e,n)&&(r[n]=e[n]);return r})(a,["children"]),[c,f]=t;if("asset"===c&&"object"===typeof f){const e=this.parseObject(f,mt.Asset,r);if(e)return Ut(It({},u),{children:[...l,{path:[...i,"asset"],value:e}]})}else{if(this.hooks.determineNodeType.call(c)===mt.Template&&Array.isArray(f)){const e=f.map((e=>{var t,n;const o=this.hooks.onCreateASTNode.call({type:mt.Template,depth:null!=(t=r.templateDepth)?t:0,data:e.data,template:e.value,dynamic:null!=(n=e.dynamic)&&n},e);if((null==o?void 0:o.type)===mt.MultiNode&&o.values.forEach((e=>{e.parent=o})),o)return{path:[...i,e.output],value:o}})).filter((e=>!!e));return Ut(It({},u),{children:[...l,...e]})}if(f&&this.hooks.determineNodeType.call(f)===mt.Switch||this.hasSwitchKey(c)){const e=this.hooks.parseNode.call(this.hasSwitchKey(c)?{[c]:f}:f,mt.Value,r,mt.Switch);if(e&&e.type===mt.Value&&1===(null==(n=e.children)?void 0:n.length)&&void 0===e.value){const t=e.children[0];return Ut(It({},u),{children:[...l,{path:[...i,c,...t.path],value:t.value}]})}if(e)return Ut(It({},u),{children:[...l,{path:[...i,c],value:e}]})}else if(f&&function(e){return Object.prototype.hasOwnProperty.call(e,"async")}(f)){const e=this.parseAsync(f,mt.Value,r);e&&l.push({path:[...i,c],value:e})}else if(f&&Array.isArray(f)){const e=f.map((e=>this.parseObject(e,mt.Value,r))).filter((e=>!!e));if(e.length>0){const t=this.hooks.onCreateASTNode.call({type:mt.MultiNode,override:!this.hasTemplateValues(s,c),values:e},f);if((null==t?void 0:t.type)===mt.MultiNode&&t.values.forEach((e=>{e.parent=t})),t)return Ut(It({},u),{children:[...l,{path:[...i,c],value:t}]})}}else{if(!f||"object"!==typeof f){return{children:l,value:Object(h.setIn)(e.value,[...i,c],f)}}{const t=this.hooks.determineNodeType.call(f);if(t!==mt.Applicability){const t=o(e.value,f,[...i,c]);return{value:t.value,children:[...l,...t.children]}}{const e=this.hooks.parseNode.call(f,mt.Value,r,t);if(e)return Ut(It({},u),{children:[...l,{path:[...i,c],value:e}]})}}}}return e}),a);return l},{value:s,children:a}=o(void 0,e),l=void 0===s&&0===a.length?void 0:{type:t,value:s};if(void 0!==l&&a.length>0){const e=l;e.children=a,a.forEach((t=>{t.value.parent=e}))}return null!=(n=this.hooks.onCreateASTNode.call(l,e))?n:null}}var qt=Object.defineProperty,Mt=Object.defineProperties,Vt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,$t=(e,t,r)=>t in e?qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function Wt(e,t){if(!e||!t)return!0;const r=Array.from(t.values()),n=Array.from(e.values());return void 0!==r.find((e=>!!n.find((t=>t===e||t.contains(e)||e.contains(t)))))}function Gt(e){return t=((e,t)=>{for(var r in t||(t={}))zt.call(t,r)&&$t(e,r,t[r]);if(Ft)for(var r of Ft(t))Ht.call(t,r)&&$t(e,r,t[r]);return e})({},e),r={data:{model:e.model,formatValue:(t,r)=>e.formatValue?e.formatValue(t,r):r,format:(t,r)=>e.format?e.format(M(t)?t:e.parseBinding(t),r):r},evaluate:t=>e.evaluator.evaluate(t,e)},Mt(t,Vt(r));var t,r}function Yt(e,t){Array.isArray(e)?e.forEach((e=>{Yt(e,t)})):t.push(e)}var Zt=Object.defineProperty,Qt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,tr=(e,t,r)=>t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rr=(e,t)=>{for(var r in t||(t={}))Xt.call(t,r)&&tr(e,r,t[r]);if(Jt)for(var r of Jt(t))er.call(t,r)&&tr(e,r,t[r]);return e},nr=(e,t)=>Qt(e,Kt(t));class ir{constructor(e,t){this.hooks={skipResolve:new n.c,beforeUpdate:new n.b,afterUpdate:new n.b,resolveOptions:new n.c,beforeResolve:new n.c,resolve:new n.c,afterResolve:new n.c,afterNodeUpdate:new n.b},this.root=e,this.options=t,this.resolveCache=new Map,this.ASTMap=new Map,this.logger=t.logger,this.idCache=new Set}getSourceNode(e){return this.ASTMap.get(e)}update(e){this.hooks.beforeUpdate.call(e);const t=new Map;this.idCache.clear();const r=new Map(this.ASTMap);this.ASTMap.clear();const n=this.computeTree(this.root,void 0,e,t,Gt(this.options),void 0,r);return this.resolveCache=t,this.hooks.afterUpdate.call(n.value),n.value}getResolveCache(){return new Map(this.resolveCache)}getPreviousResult(e){var t,r;if(!e)return;const n=0===this.resolveCache.size,i=Rt(e);if(i){if(this.idCache.has(i))return void(n&&(e.type===mt.Asset||e.type===mt.View?null==(t=this.logger)||t.error(`Cache conflict: Found Asset/View nodes that have conflicting ids: ${i}, may cause cache issues.`):e.type===mt.Value&&(null==(r=this.logger)||r.info(`Cache conflict: Found Value nodes that have conflicting ids: ${i}, may cause cache issues. To improve performance make value node IDs globally unique.`))));this.idCache.add(i)}return this.resolveCache.get(e)}cloneNode(e){const t=Object(h.clone)(e);return Object.keys(t).forEach((e=>{if("parent"===e)return;const r=t[e];"object"===typeof r&&null!==r&&(t[e]=Array.isArray(r)?[...r]:rr({},r))})),t}computeTree(e,t,r,n,i,o,s){var a,l,u;const c=new se(i.data.model);c.trackSubset("core");const d=(g=function(e,t){function r(r,n){const i=M(r)?r:t(r,{get:e.get,set:e.set,readOnly:n});if(!i)throw new Error("Unable to parse binding");return i}return{get:(t,n)=>e.get(r(t,!0),n),set:(t,n)=>e.set(t.map((([e,t])=>[r(e,!1),t])),n),delete:(t,n)=>e.delete(r(t,!1),n)}}(c,this.options.parseBinding),{get:(e,t)=>g.get(e,rr({context:{model:g}},t)),set:(e,t)=>g.set(e,rr({context:{model:g}},t)),delete:(e,t)=>g.delete(e,rr({context:{model:g}},t))});var g;const m=this.hooks.resolveOptions.call(nr(rr({},i),{data:nr(rr({},i.data),{model:d}),evaluate:e=>this.options.evaluator.evaluate(e,{model:d}),node:e}),e),v=this.getPreviousResult(e),y=null==v?void 0:v.dependencies,b=Wt(r,y),w=this.hooks.skipResolve.call(!b,e,m),E=nr(rr({},this.cloneNode(e)),{parent:o}),x=null!=(a=this.hooks.beforeResolve.call(E,m))?a:{type:mt.Empty},k=x.type===mt.MultiNode&&(null==(l=null==o?void 0:o.parent)?void 0:l.type)===mt.MultiNode&&o.type===mt.Value;if(v&&w){const r=nr(rr({},v),{updated:!1}),i=(e,t,r)=>{var o;const{node:a}=e;this.ASTMap.set(a,t);const l=nr(rr({},e),{updated:!1});n.set(t,l);const u=e=>{var r;const n=null!=(r=s.get(e))?r:e,o=this.getPreviousResult(n);o&&i(o,n,t)};"children"in a?null==(o=a.children)||o.forEach((({value:e})=>u(e))):a.type===mt.MultiNode&&a.values.forEach(u),this.hooks.afterNodeUpdate.call(t,r,l)};return v.node.parent=o,i(v,e,t),r}x.parent=o,m.node=x,this.ASTMap.set(x,e);let S=this.hooks.resolve.call(void 0,x,m),A=!Object(p.a)(null==v?void 0:v.value,S);v&&!A&&(S=null==v?void 0:v.value);const O=new Set;if(c.trackSubset("children"),"children"in x){const t=null==(u=x.children)?void 0:u.map((t=>{const i=this.computeTree(t.value,e,r,n,m,x,s),{dependencies:o,node:a,updated:l,value:u}=i;if(o.forEach((e=>O.add(e))),u)if(a.type!==mt.MultiNode||a.override)S=Object(h.setIn)(S,t.path,u);else{const e=Object(h.addLast)(f()(S,t.path,[]),u);S=Object(h.setIn)(S,t.path,e)}return A=A||l,nr(rr({},t),{value:a})}));x.children=t}else if(x.type===mt.MultiNode){const t=[],i=k?null==o?void 0:o.parent:e,a=x.values.map((e=>{var o;const a=this.computeTree(e,i,r,n,m,x,s);return void 0!==a.value&&null!==a.value&&((null==(o=a.node.parent)?void 0:o.type)===mt.MultiNode&&Array.isArray(a.value)?a.value.forEach((e=>{Yt(e,t)})):t.push(a.value)),a.dependencies.forEach((e=>O.add(e))),A=A||a.updated,a.node}));x.values=a,S=t}O.forEach((e=>c.addChildReadDep(e))),c.trackSubset("core"),v&&!A&&(S=null==v?void 0:v.value),S=this.hooks.afterResolve.call(S,x,nr(rr({},m),{getDependencies:e=>c.getDependencies(e)}));const R={node:x,updated:A,value:S,dependencies:new Set([...c.getDependencies(),...O])};return this.hooks.afterNodeUpdate.call(e,k?null==o?void 0:o.parent:t,R),n.set(e,R),R}}class or{constructor(e){this.hooks={resolveTemplateSubstitutions:new n.c},this.options=e}parseTemplate(e,t,r){const{template:n,depth:i}=t,o=r.data.model.get(t.data);if(!o)return null;if(!Array.isArray(o))throw new Error(`Template using '${t.data}' but is not an array`);const s=[];o.forEach(((r,o)=>{const a=this.hooks.resolveTemplateSubstitutions.call([{expression:new RegExp(`_index${i||""}_`),value:String(o)}],{depth:i,data:r,index:o});let l=JSON.stringify(n);for(const{expression:e,value:t}of a){let r="g";"object"===typeof e&&(r=`${e.flags}${e.global?"":"g"}`),l=l.replace(new RegExp(e,r),t)}const u=e(JSON.parse(l),mt.Value,{templateDepth:t.depth+1});u&&s.push(u)}));return{type:mt.MultiNode,override:!1,values:s}}applyParser(e){e.hooks.onCreateASTNode.tap("template",(t=>t&&t.type===mt.Template&&!t.dynamic?this.parseTemplate(e.parseObject.bind(e),t,this.options):t)),e.hooks.determineNodeType.tap("template",(e=>{if("template"===e)return mt.Template})),e.hooks.parseNode.tap("template",((t,r,n,i)=>{var o,s;if(i===mt.Template){const r=e.createASTNode({type:mt.Template,depth:null!=(o=n.templateDepth)?o:0,data:t.data,template:t.value,dynamic:null!=(s=t.dynamic)&&s},t);if(r)return r}}))}applyResolverHooks(e){e.hooks.beforeResolve.tap("template",((e,t)=>e&&e.type===mt.Template&&e.dynamic?this.parseTemplate(t.parseNode,e,t):e))}apply(e){e.hooks.parser.tap("template",this.applyParser.bind(this)),e.hooks.resolver.tap("template",this.applyResolverHooks.bind(this))}}const sr=(e,t)=>r=>{const n=r.indexOf(e);if(-1===n)return!1;const i=r.indexOf(t);return-1!==i&&n<i},ar=sr("{{","}}"),lr=sr("@[","]@");function ur(e,t){return function(e){return ar(e)||lr(e)}(e)?dt(e,{model:t.data.model,evaluate:t.evaluate}):e}function cr(e,t,r){if(null===e||void 0===e||"object"!==typeof e&&"string"!==typeof e)return e;if("string"===typeof e)return ur(e,t);let n=e;return Object.keys(e).forEach((i=>{if(r.has(i))return;const o=e[i];let s=o;"object"===typeof o?s=cr(o,t,r):"string"===typeof o&&(s=ur(o,t)),s!==o&&(n=Object(h.set)(n,i,s))})),n}const fr=(e,t)=>{var r,n,i;const o=e.parent;if(!o)return[];if("children"in o){const s=t.getSourceNode(e);return null!=(i=null==(n=null==(r=o.children)?void 0:r.find((e=>e.value===s)))?void 0:n.path)?i:[]}return o.type!==mt.MultiNode?[]:fr(o,t)};class hr{constructor(){this.propertiesToSkipCache=new Map}applyResolver(e){e.hooks.resolve.tap("string-resolver",((t,r,n)=>{var i,o,s,a,l,u,c,f,h,p;if(r.type===mt.Empty||r.type===mt.Unknown)return null;if(r.type===mt.Value||r.type===mt.Asset||r.type===mt.View){let t;r.type===mt.Asset||r.type===mt.View?(t=new Set(null!=(s=null==(o=null==(i=r.plugins)?void 0:i.stringResolver)?void 0:o.propertiesToSkip)?s:["exp"]),(null==(a=r.value)?void 0:a.id)&&this.propertiesToSkipCache.set(r.value.id,t)):t=(null==(l=r.parent)?void 0:l.type)===mt.MultiNode&&((null==(c=null==(u=r.parent)?void 0:u.parent)?void 0:c.type)===mt.Asset||(null==(h=null==(f=r.parent)?void 0:f.parent)?void 0:h.type)===mt.View)&&(null==(p=r.parent.parent.value)?void 0:p.id)&&this.propertiesToSkipCache.has(r.parent.parent.value.id)?this.propertiesToSkipCache.get(r.parent.parent.value.id):new Set(["exp"]);const d=fr(r,e);return d.length>0&&d.some((e=>t.has(e.toString())))?r.value:cr(r.value,n,t)}return t}))}apply(e){e.hooks.resolver.tap("string-resolver",this.applyResolver.bind(this))}}class pr{applyResolver(e){e.hooks.beforeResolve.tap("applicability",((e,t)=>{let r=e;if((null==e?void 0:e.type)===mt.Applicability){if(!1===t.evaluate(e.expression))return null;r=e.value}return r}))}applyParser(e){e.hooks.determineNodeType.tap("applicability",(e=>{if(Object.prototype.hasOwnProperty.call(e,"applicability"))return mt.Applicability})),e.hooks.parseNode.tap("applicability",((t,r,n,i)=>{if(i===mt.Applicability){const i=e.parseObject(Object(h.omit)(t,"applicability"),r,n);if(null!==i){const r=e.createASTNode({type:mt.Applicability,expression:t.applicability,value:i},t);return(null==r?void 0:r.type)===mt.Applicability&&(r.value.parent=r),r}}}))}apply(e){e.hooks.resolver.tap("applicability",this.applyResolver.bind(this)),e.hooks.parser.tap("applicability",this.applyParser.bind(this))}}var dr=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable;class vr{constructor(e){this.options=e}resolveSwitch(e,t){for(const r of e.cases){if(t.evaluate(r.case))return r.value}return Bt}applyParser(e){e.hooks.onCreateASTNode.tap("switch",(e=>e&&e.type===mt.Switch&&!e.dynamic?this.resolveSwitch(e,this.options):e)),e.hooks.determineNodeType.tap("switch",(e=>{if(Object.prototype.hasOwnProperty.call(e,"dynamicSwitch")||Object.prototype.hasOwnProperty.call(e,"staticSwitch"))return mt.Switch})),e.hooks.parseNode.tap("switch",((t,r,n,i)=>{if(i===mt.Switch){const r="dynamicSwitch"in t,i="dynamicSwitch"in t?t.dynamicSwitch:t.staticSwitch,o=[];i.forEach((t=>{const r=t,{case:i}=r,s=((e,t)=>{var r={};for(var n in e)gr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&dr)for(var n of dr(e))t.indexOf(n)<0&&mr.call(e,n)&&(r[n]=e[n]);return r})(r,["case"]),a=e.parseObject(s,mt.Value,n);a&&o.push({case:i,value:a})}));const s=e.hooks.onCreateASTNode.call({type:mt.Switch,dynamic:r,cases:o},t);return(null==s?void 0:s.type)===mt.Switch&&s.cases.forEach((e=>{e.value.parent=s})),(null==s?void 0:s.type)===mt.Empty?null:null!=s?s:null}}))}applyResolver(e){e.hooks.beforeResolve.tap("switch",((e,t)=>e&&e.type===mt.Switch&&e.dynamic?this.resolveSwitch(e,t):e))}apply(e){e.hooks.parser.tap("switch",this.applyParser.bind(this)),e.hooks.resolver.tap("switch",this.applyResolver.bind(this))}}var yr=Object.defineProperty,br=Object.defineProperties,wr=Object.getOwnPropertyDescriptors,Er=Object.getOwnPropertySymbols,xr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Sr=(e,t,r)=>t in e?yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ar=(e,t)=>{for(var r in t||(t={}))xr.call(t,r)&&Sr(e,r,t[r]);if(Er)for(var r of Er(t))kr.call(t,r)&&Sr(e,r,t[r]);return e};class Or{constructor(e,t,r){this.allValidations=new Set,this.byBinding=new Map,this.logger=r,this.parse(e,t)}parse(e,t){var r;const n=e.validation;void 0!==n&&(Array.isArray(n)?n.forEach((e=>{var r;const n=Ar({trigger:"navigation",severity:"error"},e);this.allValidations.add(n);const{ref:i}=e;if(i){const e=t(i);this.byBinding.has(e)?null==(r=this.byBinding.get(e))||r.push(n):this.byBinding.set(e,[n])}})):null==(r=this.logger)||r.warn(`Unable to register view validations for id: ${e.id}. 'validation' property must be an Array.`))}getValidationsForBinding(e){return this.byBinding.get(e)}}class Rr{constructor(e,t){this.hooks={onUpdate:new n.b,parser:new n.b,resolver:new n.b,templatePlugin:new n.b},this.initialView=e,this.resolverOptions=t;const r=Gt(t);new vr(r).apply(this),(new pr).apply(this),(new hr).apply(this),this.templatePlugin=new or(r),this.templatePlugin.apply(this)}updateAsync(){var e;const t=null==(e=this.resolver)?void 0:e.update();this.lastUpdate=t,this.hooks.onUpdate.call(t)}update(e){var t,r,n;if(void 0===this.rootNode){this.validationProvider=new Or(this.initialView,this.resolverOptions.parseBinding,this.resolverOptions.logger),this.hooks.templatePlugin.call(this.templatePlugin);const e=new Dt;this.hooks.parser.call(e),this.rootNode=e.parseView(this.initialView),this.resolver=new ir(this.rootNode,(r=Ar({},this.resolverOptions),n={parseNode:e.parseObject.bind(e)},br(r,wr(n)))),this.hooks.resolver.call(this.resolver)}const i=null==(t=this.resolver)?void 0:t.update(e);return this.lastUpdate===i?this.lastUpdate:(this.lastUpdate=i,this.hooks.onUpdate.call(i),i)}getValidationsForBinding(e){var t;return null==(t=this.validationProvider)?void 0:t.getValidationsForBinding(e)}}var Tr=Object.defineProperty,Pr=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,Cr=Object.prototype.propertyIsEnumerable,Lr=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jr=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{a(r.next(e))}catch(t){i(t)}},s=e=>{try{a(r.throw(e))}catch(t){i(t)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())}));class Nr{constructor(e,t,r){this.isTransitioning=!1,this.hooks={beforeStart:new n.a,onStart:new n.b,onEnd:new n.b,skipTransition:new n.a,beforeTransition:new n.c,resolveTransitionNode:new n.c,transition:new n.b,afterTransition:new n.b},this.id=e,this.flow=t,this.log=null==r?void 0:r.logger,this.history=[],this.hooks.transition.tap("startPromise",((e,t)=>jr(this,null,(function*(){const e=t.value;this.flowPromise&&"END"===e.state_type&&this.flowPromise.resolve(e)}))))}start(){return jr(this,null,(function*(){var e;if(this.flowPromise)return null==(e=this.log)||e.warn("Already called start for flow"),this.flowPromise.promise;this.flow=this.hooks.beforeStart.call(this.flow)||this.flow,this.flow.onStart&&this.hooks.onStart.call(this.flow.onStart);const t=this.flow.startState;return t?(this.flowPromise=g()(),this.pushHistory(t),this.flowPromise.promise):Promise.reject(new Error("No 'startState' defined for flow"))}))}transition(e,t){var r,n,i,o,s,a,l;if(this.isTransitioning)throw new Error(`Transitioning while ongoing transition from ${null==(r=this.currentState)?void 0:r.name} is in progress is not supported`);if("END"===(null==(n=this.currentState)?void 0:n.value.state_type))return void(null==(i=this.log)||i.warn(`Skipping transition using ${e}. Already at and END state`));if(void 0===this.currentState)throw new Error("Cannot transition when there's no current state");if(null==t?void 0:t.force)null==(o=this.log)||o.debug("Forced transition. Skipping validation checks");else{if(this.hooks.skipTransition.call(this.currentState))return void(null==(s=this.log)||s.debug(`Skipping transition from ${this.currentState.name} b/c hook told us to`))}const u=this.hooks.beforeTransition.call(this.currentState.value,e);if(!("transitions"in u))throw new Error(`No transitions defined for ${this.currentState.value}`);const{transitions:c}=u,f=c[e]||c["*"];if(void 0!==f)return null==(l=this.log)||l.debug(`Transitioning from ${this.currentState.name} to ${f} using ${e} `),this.pushHistory(f,t);null==(a=this.log)||a.warn(`No transition from ${this.currentState.name} using ${e} or *`)}pushHistory(e,t){var r;if(!Object.prototype.hasOwnProperty.call(this.flow,e))throw new Error(`No flow definition for: ${e} was found.`);let n=this.flow[e];if(!this.flow[e]||"object"!==typeof n||!("state_type"in n))return void(null==(r=this.log)||r.error(`Flow doesn't contain any states named: ${e}`));const i=this.currentState;this.isTransitioning=!0,n=this.hooks.resolveTransitionNode.call(n);const o={name:e,value:n};this.currentState=o,this.history.push(e),"END"===o.value.state_type&&this.flow.onEnd&&this.hooks.onEnd.call(this.flow.onEnd),this.hooks.transition.call(i,((e,t)=>{for(var r in t||(t={}))_r.call(t,r)&&Lr(e,r,t[r]);if(Pr)for(var r of Pr(t))Cr.call(t,r)&&Lr(e,r,t[r]);return e})({},o)),this.isTransitioning=!1,this.hooks.afterTransition.call(this)}}var Ir=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{a(r.next(e))}catch(t){i(t)}},s=e=>{try{a(r.throw(e))}catch(t){i(t)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())}));class Ur{constructor(e,t){this.hooks={flow:new n.b},this.navigation=e,this.navStack=[],this.log=null==t?void 0:t.logger,this.start=this.start.bind(this),this.run=this.run.bind(this),this.transition=this.transition.bind(this),this.addNewFlow=this.addNewFlow.bind(this)}transition(e,t){if(void 0===this.current)throw new Error("Not currently in a flow. Cannot transition.");this.current.transition(e,t)}addNewFlow(e){this.navStack.push(e),this.current=e,this.hooks.flow.call(e)}run(e){return Ir(this,null,(function*(){var t;if(!Object.prototype.hasOwnProperty.call(this.navigation,e))return Promise.reject(new Error(`No flow defined for: ${e}`));const r=this.navigation[e];if(null===r||"object"!==typeof r)return Promise.reject(new Error(`Flow: ${e} needs to be an object`));null==(t=this.log)||t.debug(`Starting flow: ${e}`);const n=new Nr(e,r,{logger:this.log});this.addNewFlow(n),n.hooks.afterTransition.tap("flow-controller",(e=>{var t,r,n;if("FLOW"===(null==(t=e.currentState)?void 0:t.value.state_type)){const t=null==(r=e.currentState)?void 0:r.value.ref;null==(n=this.log)||n.debug(`Loading subflow ${t}`),this.run(t).then((t=>{var r;null==(r=this.log)||r.debug(`Subflow ended. Using outcome: ${t.outcome}`),e.transition(null==t?void 0:t.outcome)}))}}));const i=yield n.start();if(this.navStack.pop(),this.navStack.length>0){const e=0;this.current=this.navStack[e]}return i}))}start(){return Ir(this,null,(function*(){return this.navigation.BEGIN?this.run(this.navigation.BEGIN):Promise.reject(new Error("Must supply a BEGIN state"))}))}}const Br=/%([a-zA-Z]+)/g;var Dr=Object.defineProperty,qr=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,Vr=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Hr=(e,t,r)=>t in e?Dr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$r=(e,t)=>{for(var r in t||(t={}))Fr.call(t,r)&&Hr(e,r,t[r]);if(Vr)for(var r of Vr(t))zr.call(t,r)&&Hr(e,r,t[r]);return e},Wr=(e,t)=>qr(e,Mr(t));const Gr="validation-binding-tracker";class Yr{constructor(e){this.trackedBindings=new Set,this.options=e}getBindings(){return this.trackedBindings}trackBinding(e){var t,r;this.trackedBindings.has(e)||(this.trackedBindings.add(e),null==(r=null==(t=this.options.callbacks)?void 0:t.onAdd)||r.call(t,e))}applyResolver(e){this.trackedBindings.clear();const t=new Map,r=new Map;let n;const i=new Map;let o=new Map,s=new Map;const a=new Map;e.hooks.beforeUpdate.tap(Gr,(e=>{n=e})),e.hooks.skipResolve.tap(Gr,((e,t)=>{const r=o.get(t);if(!e||!n||!r)return e;return 0===new Set([...n].filter((e=>r.has(e)))).size})),e.hooks.resolveOptions.tap(Gr,((e,n)=>{if(void 0===e.validation)return e;t.delete(n);const i=e=>{var i,o,s,a;const l=M(e)?e:this.options.parseBinding(e);t.has(n)?null==(i=t.get(n))||i.add(l):t.set(n,new Set([l]));let{parent:u}=n;for(;u;){if(r.has(u)){null==(o=r.get(u))||o.add(n);break}u=u.parent}this.trackedBindings.add(l),null==(a=null==(s=this.options.callbacks)?void 0:s.onAdd)||a.call(s,l)};return Wr($r({},e),{validation:Wr($r({},e.validation),{get:(t,r)=>{var n,o;(null==r?void 0:r.track)&&i(t);const s=null==(o=null==(n=e.validation)?void 0:n._getValidationForBinding(t))?void 0:o.getAll(r);return null==s?void 0:s.find((e=>"field"===e.displayTarget||void 0===e.displayTarget))},getValidationsForBinding(t,r){var n,o,s;return(null==r?void 0:r.track)&&i(t),null!=(s=null==(o=null==(n=e.validation)?void 0:n._getValidationForBinding(t))?void 0:o.getAll(r))?s:[]},getChildren:t=>{var r;const i=new Array;return null==(r=o.get(n))||r.forEach((r=>{var n,o;const s=null==(o=null==(n=e.validation)?void 0:n._getValidationForBinding(r))?void 0:o.get();!s||void 0!==t&&t!==s.displayTarget||i.push(s)})),i},getValidationsForSection:()=>{var t;const r=new Array;return null==(t=a.get(n))||t.forEach((t=>{var n,i;const o=null==(i=null==(n=e.validation)?void 0:n._getValidationForBinding(t))?void 0:i.get();o&&"section"===o.displayTarget&&r.push(o)})),r},register:e=>{"section"===(null==e?void 0:e.type)&&(r.has(n)||r.set(n,new Set))},track:i})})})),e.hooks.afterNodeUpdate.tap(Gr,((n,l,u)=>{var c,f;if(l&&function(e,t){var r;i.has(t)?null==(r=i.get(t))||r.add(e):i.set(t,new Set([e]))}(n,l),u.updated){const e=new Set(t.get(n));null==(c=i.get(n))||c.forEach((t=>{var r;null==(r=s.get(t))||r.forEach((t=>e.add(t)))})),s.set(n,e)}else s.set(n,null!=(f=o.get(n))?f:new Set);n===e.root&&(this.trackedBindings=new Set(s.get(n)),o=s,a.clear(),r.forEach(((e,r)=>{const n=new Set;e.forEach((e=>{var r;null==(r=t.get(e))||r.forEach(n.add,n)})),a.set(r,n)})),i.clear(),t.clear(),r.clear(),s=new Map)}))}apply(e){e.hooks.resolver.tap(Gr,this.applyResolver.bind(this))}}var Zr=Object.defineProperty,Qr=Object.defineProperties,Kr=Object.getOwnPropertyDescriptors,Jr=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,tn=(e,t,r)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rn=(e,t)=>{for(var r in t||(t={}))Xr.call(t,r)&&tn(e,r,t[r]);if(Jr)for(var r of Jr(t))en.call(t,r)&&tn(e,r,t[r]);return e},nn=(e,t)=>Qr(e,Kr(t));const on=Symbol.for("validation-provider-name");class sn{constructor(e,t,r,n){this.applicableValidations=[],this.validationsByState={load:[],change:[],navigation:[]},this.onDismiss=t,e.forEach((e=>{const{trigger:t}=e;if(this.validationsByState[t]){const r={value:n=e,type:n.severity,state:"none",isBlockingNavigation:!1};this.validationsByState[t].push(r)}else null==r||r.warn(`Unknown validation trigger: ${t}`);var n})),this.weakBindings=null!=n?n:new Set}get allValidations(){return Object.values(this.validationsByState).flat()}checkIfBlocking(e){if("active"===e.state){const{isBlockingNavigation:t}=e;return t}return!1}getAll(){return this.applicableValidations.reduce(((e,t)=>("active"===t.state&&t.response&&e.push(nn(rn({},t.response),{blocking:this.checkIfBlocking(t)})),e)),[])}get(){const e=this.applicableValidations.find((e=>"active"===e.state&&e.response));if("active"===(null==e?void 0:e.state))return nn(rn({},e.response),{blocking:this.checkIfBlocking(e)})}runApplicableValidations(e,t,r){this.applicableValidations=this.applicableValidations.map((n=>{var i,o,s;if("dismissed"===n.state)return n;const a=null!=(i=n.value.blocking)?i:"warning"!==n.value.severity||"once",l=Object(h.setIn)(n,["value","blocking"],a),u=!0===a||"once"===a&&!t;if("navigation"===r&&"active"===l.state&&!0!==l.value.blocking&&"warning"===l.value.severity){const e=l;return!e.dismissable||!e.response.dismiss||"once"===e.response.blocking&&e.response.blocking?("once"===(null==e?void 0:e.response.blocking)&&(e.response.blocking=!1),e.dismissable=!0):e.response.dismiss(),e}const c=e(l.value),f={type:l.type,value:l.value,state:c?"active":"none",isBlockingNavigation:u,dismissable:"warning"===l.value.severity&&"navigation"===r,response:c?nn(rn({},l.value),{message:null!=(o=c.message)?o:"Something is broken",severity:l.value.severity,displayTarget:null!=(s=l.value.displayTarget)?s:"field"}):void 0};return"active"===f.state&&"warning"===l.value.severity&&(f.response.dismiss=()=>{var e;f.state="dismissed",null==(e=this.onDismiss)||e.call(this)}),f}))}update(e,t,r){const n=[];"load"===e&&void 0!==this.currentPhase||("navigation"!==this.currentPhase&&e!==this.currentPhase?("load"===e?(this.currentPhase="load",this.applicableValidations=[...this.validationsByState.load]):"change"===e&&"load"===this.currentPhase?(this.currentPhase="change",this.applicableValidations=[...this.applicableValidations,...this.validationsByState.change]):"navigation"!==e||"load"!==this.currentPhase&&"change"!==this.currentPhase||(this.applicableValidations.forEach((e=>{"error"===e.type&&"active"===e.state&&!1===e.isBlockingNavigation||n.push(e)})),this.applicableValidations=[...n,...this.validationsByState.navigation,..."load"===this.currentPhase?this.validationsByState.change:[]],this.currentPhase="navigation"),this.runApplicableValidations(r,t,e)):this.runApplicableValidations(r,t,e))}}class an{constructor(e,t){this.hooks={createValidatorRegistry:new n.b,onAddValidation:new n.c,onRemoveValidation:new n.c,resolveValidationProviders:new n.c,onTrackBinding:new n.b},this.validations=new Map,this.weakBindingTracker=new Set,this.schema=e,this.options=t,this.reset()}setOptions(e){this.options=e}getDataMiddleware(){return[{set:(e,t,r)=>{var n;return null!=(n=null==r?void 0:r.set(e,t))?n:[]},get:(e,t,r)=>null==r?void 0:r.get(e,t),delete:(e,t,r)=>(this.validations=gt(this.validations,e),null==r?void 0:r.delete(e,t))},new At((e=>{var t;if(!this.options)return;this.updateValidationsForBinding(e,"change",this.options);const r=this.getValidationForBinding(e);if("error"===(null==(t=null==r?void 0:r.get())?void 0:t.severity))return r.get();const n=new Set;return this.validations.forEach(((t,r)=>{var i;Wt(new Set([e]),t.weakBindings)&&"error"===(null==(i=null==t?void 0:t.get())?void 0:i.severity)&&(null==t||t.weakBindings.forEach((e=>{e===r?n.add({binding:e,isStrong:!0}):n.add({binding:e,isStrong:!1})})))})),n.size>0?n:void 0}),{logger:new Je((()=>{var e;return null==(e=this.options)?void 0:e.logger}))})]}getValidationProviders(){return this.providers||(this.providers=this.hooks.resolveValidationProviders.call([{source:"schema",provider:this.schema},{source:"view",provider:{getValidationsForBinding:e=>{var t,r;return null==(r=null==(t=this.viewValidationProvider)?void 0:t.getValidationsForBinding)?void 0:r.call(t,e)},getValidationsForView:()=>{var e,t;return null==(t=null==(e=this.viewValidationProvider)?void 0:e.getValidationsForView)?void 0:t.call(e)}}}])),this.providers}reset(){this.validations.clear(),this.tracker=void 0}onView(e){if(this.validations.clear(),!this.options)return;const t=new Yr(nn(rn({},this.options),{callbacks:{onAdd:t=>{if(!this.options||void 0!==this.getValidationForBinding(t))return;const r=this.options.model.get(t);r!==this.options.model.get(t,{ignoreDefaultValue:!0})&&this.options.model.set([[t,r]],{silent:!0}),this.updateValidationsForBinding(t,"load",this.options,(()=>{e.update(new Set([t]))})),this.hooks.onTrackBinding.call(t)}}}));this.tracker=t,this.viewValidationProvider=e,t.apply(e)}updateValidationsForBinding(e,t,r,n){var i;const o=null!=r?r:this.options;if(!o)throw new Error("Context is required for executing validations");if("load"===t){const t=this.getValidationProviders().reduce(((t,r)=>{var n,i,o,s;return t.push(...null!=(s=null==(o=null==(i=(n=r.provider).getValidationsForBinding)?void 0:i.call(n,e))?void 0:o.map((e=>nn(rn({},e),{[on]:r.source}))))?s:[]),t}),[]);if(0===t.length)return;this.validations.set(e,new sn(t,n,null==(i=this.options)?void 0:i.logger))}const s=this.validations.get(e);null==s||s.update(t,!0,(t=>{const r=this.validationRunner(t,e,o);if(this.weakBindingTracker.size>0){const t=this.validations.get(e);this.weakBindingTracker.forEach((e=>t.weakBindings.add(e)))}return r?{message:r.message}:void 0})),"load"!==t&&this.validations.forEach(((r,n)=>{n!==e&&Wt(new Set([e]),r.weakBindings)&&r.update(t,!0,(e=>{const t=this.validationRunner(e,n,o);return t?{message:t.message}:void 0}))}))}validationRunner(e,t,r=this.options){var n;if(!r)throw new Error("No context provided to validation runner");const i=null!=(n=e.handler)?n:this.getValidator(e.type),o=new Set,s={get:(e,n)=>(o.add(M(e)?t:r.parseBinding(e)),r.model.get(e,nn(rn({},n),{includeInvalid:!0}))),set:r.model.set,delete:r.model.delete},a=null==i?void 0:i(nn(rn({},r),{evaluate:(e,t={model:s})=>r.evaluate(e,t),model:s,validation:e,schemaType:this.schema.getType(t)}),r.model.get(t,{includeInvalid:!0,formatted:"formatted"===e.dataTarget}),e);if(this.weakBindingTracker=o,a){let{message:t}=a;const{parameters:n}=a;return e.message&&(t=dt(e.message,{model:s,evaluate:r.evaluate}),n&&(t=function(e,t){return e.slice().replace(Br,(e=>t[e.slice(1)]||e))}(t,n))),{message:t}}}updateValidationsForView(e){const t="navigation"===e,r=this.activeBindings,n=t=>{this.getBindings().forEach((r=>{var n;null==(n=this.validations.get(r))||n.update(e,t,(e=>{if(this.options)return this.validationRunner(e,r,this.options)}))}))};if(n(!t),t){const{activeBindings:e}=this;(function(e,t){if(e.size>t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0})(e,r)&&n(!0)}}get activeBindings(){return new Set(Array.from(this.getBindings()).filter((e=>{var t;return void 0!==(null==(t=this.validations.get(e))?void 0:t.get())})))}getValidator(e){if(this.validatorRegistry)return this.validatorRegistry.get(e);const t=new Ot;return this.hooks.createValidatorRegistry.call(t),this.validatorRegistry=t,t.get(e)}getBindings(){var e,t;return null!=(t=null==(e=this.tracker)?void 0:e.getBindings())?t:new Set}trackBinding(e){var t;null==(t=this.tracker)||t.trackBinding(e)}validateView(e="navigation"){this.updateValidationsForView(e);const t=new Map;let r=!0;return this.getBindings().forEach((n=>{var i;const o=null==(i=this.getValidationForBinding(n))?void 0:i.getAll();null==o||o.forEach((i=>{var o;"navigation"===e&&i.blocking&&(null==(o=this.options)||o.logger.debug(`Validation on binding: ${n.asString()} is preventing navigation. ${JSON.stringify(i)}`),r=!1),t.has(n)||t.set(n,i)}))})),{canTransition:r,validations:t.size?t:void 0}}getValidationForBinding(e){return this.validations.get(e)}forView(e){return{_getValidationForBinding:t=>this.getValidationForBinding(M(t)?t:e(t)),getAll:()=>{const e=this.getBindings();if(0===e.size)return;const t=new Map;return e.forEach((e=>{var r;const n=null==(r=this.getValidationForBinding(e))?void 0:r.get();n&&t.set(e,n)})),0===t.size?void 0:t},get(){throw new Error("Error Access be provided by the view plugin")},getValidationsForBinding(){throw new Error("Error rollup should be provided by the view plugin")},getChildren(){throw new Error("Error rollup should be provided by the view plugin")},getValidationsForSection(){throw new Error("Error rollup should be provided by the view plugin")},track:()=>{throw new Error("Tracking should be provided by the view plugin")},register:()=>{throw new Error("Section functionality should be provided by the view plugin")},type:t=>this.schema.getType(M(t)?t:e(t))}}}class ln{constructor(e){this.updateCallback=e,this.state=new Map}removeKey(e){this.state.delete(e)}reset(){this.state.clear()}useSharedState(e){return t=>(this.state.has(e)||this.state.set(e,t),[this.state.get(e),t=>{var r;const n=this.state.get(e);this.state.set(e,t),n!==t&&(null==(r=this.updateCallback)||r.call(this))}])}getLocalStateFunction(e,t){return r=>{this.state.has(e)||this.state.set(e,[]),this.state.has(t)||this.state.set(t,0);const n=this.state.get(e),i=this.state.get(t);this.state.set(t,i+1),n.length<=i&&n.push(r);return[n[i],e=>{var t;const r=n[i];n[i]=e,r!==e&&(null==(t=this.updateCallback)||t.call(this))}]}}}function un(e,t){return e===t||!!e.parent&&un(e.parent,t)}class cn{constructor(e){this.registry=e,this.stateStore=new Map,this.beforeResolveSymbol=Symbol("before resolve"),this.resolveSymbol=Symbol("resolve"),this.beforeResolveCountSymbol=Symbol("before resolve count"),this.resolveCountSymbol=Symbol("resolve count")}apply(e){e.hooks.view.tap("asset-transform",(e=>{this.stateStore.clear(),e.hooks.resolver.tap("asset-transform",(t=>{let r;const n=(t,n)=>{let i;const o=n===this.resolveSymbol?this.resolveCountSymbol:this.beforeResolveCountSymbol,s=this.stateStore.get(t);return s?(i=s,i.removeKey(o)):(i=new ln((()=>{(t=>{r=t,e.update(new Set)})(t)})),this.stateStore.set(t,i)),{useSharedState:e=>i.useSharedState(e),useLocalState:e=>i.getLocalStateFunction(n,o)(e)}};t.hooks.beforeResolve.tap("asset-transform",((e,t)=>{var r;if(e&&("asset"===e.type||"view"===e.type)){const i=this.registry.get(e.value);if(null==i?void 0:i.beforeResolve){const o=n(null!=(r=t.node)?r:e,this.beforeResolveSymbol);return i.beforeResolve(e,t,o)}}return e})),t.hooks.afterUpdate.tap("asset-transform",(()=>{r=void 0})),t.hooks.skipResolve.tap("asset-transform",((e,t)=>{if(!e||!r)return e;const n=un(r,t),i=un(t,r);return!n&&!i})),t.hooks.afterResolve.tap("asset-transform",((e,r,i)=>{if(r.type!==mt.Asset&&r.type!==mt.View)return e;const o=t.getSourceNode(r);if(!o)return e;const s=this.registry.get(e);if(null==s?void 0:s.resolve){const t=n(o,this.resolveSymbol);return null==s?void 0:s.resolve(e,i,t)}return e}))}))}))}}class fn{constructor(e,t){this.hooks={resolveView:new n.c,view:new n.b},this.transformRegistry=new y.a,this.optimizeUpdates=!0,this.viewOptions=t,this.viewMap=e.reduce(((e,t)=>(e[t.id]=t,e)),{}),new cn(this.transformRegistry).apply(this),t.flowController.hooks.flow.tap("viewController",(e=>{e.hooks.transition.tap("viewController",((e,t)=>{"VIEW"===t.value.state_type?this.onView(t.value):this.currentView=void 0}))}));const r=(e,t=!1)=>{this.currentView&&(this.optimizeUpdates?this.queueUpdate(e,t):this.currentView.update())};t.model.hooks.onUpdate.tap("viewController",((e,t)=>{var n;r(new Set(e.map((e=>e.binding))),null!=(n=null==t?void 0:t.silent)&&n)})),t.model.hooks.onDelete.tap("viewController",(e=>{const t=e.parent(),n=e.key();r("number"===typeof n&&t?new Set([t]):new Set([e]))}))}queueUpdate(e,t=!1){var r;(null==(r=this.pendingUpdate)?void 0:r.changedBindings)?this.pendingUpdate.changedBindings=new Set([...this.pendingUpdate.changedBindings,...e]):this.pendingUpdate={changedBindings:e,scheduled:!1},this.pendingUpdate.scheduled||t||(this.pendingUpdate.scheduled=!0,v()((()=>{var e,t;const r=null==(e=this.pendingUpdate)?void 0:e.changedBindings;this.pendingUpdate=void 0,null==(t=this.currentView)||t.update(r)})))}getViewForRef(e){if(this.viewMap[e])return this.viewMap[e];const t=Object.keys(this.viewMap).find((t=>e===ht(t,{model:this.viewOptions.model,evaluate:this.viewOptions.evaluator.evaluate})));return t&&this.viewMap[t]?this.viewMap[t]:void 0}onView(e){const t=e.ref,r=this.hooks.resolveView.call(this.getViewForRef(t),t,e);if(!r)throw new Error(`No view with id ${t}`);const n=new Rr(r,this.viewOptions);this.currentView=n,this.hooks.view.call(n),n.update()}}class hn{constructor(e,t){this.controller=e,this.logger=t}get(e,t){return this.controller.get(e,t)}set(e,t){var r;return null==(r=this.logger)||r.error("Error: Tried to set in a read only instance of the DataController"),[]}delete(e,t){var r;null==(r=this.logger)||r.error("Error: Tried to delete in a read only instance of the DataController")}}class pn{constructor(e,t){this.hooks={resolve:new n.c,resolveDataStages:new n.c,resolveDefaultValue:new n.a,onDelete:new n.b,onSet:new n.b,onGet:new n.b,onUpdate:new n.b,format:new n.c,deformat:new n.c,serialize:new n.c},this.logger=t.logger;const r=t.middleware||[];this.baseMiddleware=[new he(e),...r],this.trash=new Set,this.pathResolver=t.pathResolver}getModel(){if(!this.model){const e=this.hooks.resolveDataStages.call(this.baseMiddleware),t=new fe;t.setMiddleware(e),this.model=t}return this.model}resolveDataValue(e,t,r){return r?this.hooks.deformat.call(t,e):t}set(e,t){let r=[];r=Array.isArray(e)?e.map((([e,r])=>{const n=this.pathResolver.parse(e);return[n,this.resolveDataValue(n,r,Boolean(null==t?void 0:t.formatted))]})):Object.keys(e).map((r=>{const n=this.pathResolver.parse(r),i=e[r];return[n,this.resolveDataValue(n,i,Boolean(null==t?void 0:t.formatted))]}));const n=r.reduce(((e,[t,r])=>{var n,i;const o=this.get(t,{includeInvalid:!0}),s={binding:t,newValue:r,oldValue:o};return Object(p.a)(o,r)?null==(n=this.logger)||n.debug(`Skipping update for path: ${t.asString()}. Value was unchanged: ${o}`):(e.push(s),null==(i=this.logger)||i.debug(`Setting path: ${t.asString()} from: ${o} to: ${r}`)),e}),[]),i=this.getModel().set(r,t),o=new Set(n.map((e=>e.binding)));return i.forEach((e=>{var t;o.has(e.binding)||!0!==e.force&&Object(p.a)(e.oldValue,e.newValue)||(null==(t=this.logger)||t.debug(`Path: ${e.binding.asString()} was changed from: ${e.oldValue} to: ${e.newValue}`),n.push(e))})),this.hooks.onSet.call(r),n.length>0&&this.hooks.onUpdate.call(n,t),i}resolve(e,t){return Array.isArray(e)||"string"===typeof e?this.pathResolver.parse(e,{readOnly:t}):e}get(e,t){const r=e instanceof V?e:this.resolve(e,!0);let n=this.getModel().get(r,t);if(void 0===n&&!(null==t?void 0:t.ignoreDefaultValue)){const e=this.hooks.resolveDefaultValue.call(r);e!==n&&(n=e)}return(null==t?void 0:t.formatted)?n=this.hooks.format.call(n,r):!1===(null==t?void 0:t.formatted)&&(n=this.hooks.deformat.call(n,r)),this.hooks.onGet.call(e,n),n}delete(e,t){if("string"!==typeof e&&!Array.isArray(e)&&!(e instanceof V))throw new Error("Invalid arguments: delete expects a data path (string)");const r=e instanceof V?e:this.resolve(e,!1),n=r.parent(),i=r.key(),o=this.get(n),s="object"===typeof o&&null!==o&&Object.prototype.hasOwnProperty.call(o,i);this.getModel().delete(r,t),s&&!this.get(r)&&this.trash.add(r),this.hooks.onDelete.call(r)}serialize(){return this.hooks.serialize.call(this.get(""))}makeReadOnly(){return new hn(this,this.logger)}}var dn=Object.defineProperty,gn=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,yn=(e,t,r)=>t in e?dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bn=(e,t)=>{for(var r in t||(t={}))mn.call(t,r)&&yn(e,r,t[r]);if(gn)for(var r of gn(t))vn.call(t,r)&&yn(e,r,t[r]);return e};function wn(e,t=[],r="."){return Object.keys(e).reduce(((n,i)=>bn(bn({},n),"[object Object]"===Object.prototype.toString.call(e[i])?wn(e[i],t.concat([i])):{[t.concat([i]).join(r)]:e[i]})),{})}function En(e){const t=wn(e),r=[];return Object.keys(t).forEach((e=>{r.push([new V(e),t[e]])})),r}class xn{constructor(){this.store=new Map,this.tempStore=new Map}addConstants(e,t){var r;this.store.has(t)?null==(r=this.store.get(t))||r.set(En(e)):this.store.set(t,new he(e))}getConstants(e,t,r){var n,i,o,s;const a=new V(e);return null!=(s=null!=(o=null==(n=this.tempStore.get(t))?void 0:n.get(a))?o:null==(i=this.store.get(t))?void 0:i.get(a))?s:r}setTemporaryValues(e,t){var r;this.tempStore.has(t)?null==(r=this.tempStore.get(t))||r.set(En(e)):this.tempStore.set(t,new he(e))}clearTemporaryValues(e){var t;e?null==(t=this.tempStore.get(e))||t.reset():this.tempStore.forEach((e=>{e.reset()}))}}class kn{constructor(){this.name="flow-exp-plugin"}apply(e){let t;const r=e=>{e&&("object"===typeof e&&"exp"in e?null==t||t.evaluate(e.exp):null==t||t.evaluate(e))};e.hooks.expressionEvaluator.tap(this.name,(e=>{t=e})),e.hooks.flowController.tap(this.name,(e=>{e.hooks.flow.tap(this.name,(e=>{e.hooks.onStart.tap(this.name,(e=>r(e))),e.hooks.onEnd.tap(this.name,(e=>r(e))),e.hooks.resolveTransitionNode.intercept({call:e=>{(null==e?void 0:e.onStart)&&r(e.onStart)}})}))}))}}class Sn{constructor(){this.name="flow-exp-plugin"}apply(e){let t;e.hooks.schema.tap(this.name,(e=>{var r;r=e,t=(e,t,n)=>{var i,o;return null!=(o=null==(i=r.getFormatterForType({type:n}))?void 0:i.format(t))?o:t}})),e.hooks.expressionEvaluator.tap(this.name,(r=>{t&&r.addExpressionFunction("format",t),r.addExpressionFunction("log",((t,...r)=>{e.logger.info(...r)})),r.addExpressionFunction("debug",((t,...r)=>{e.logger.debug(...r)})),r.addExpressionFunction("eval",((e,...t)=>e.evaluate(...t)))}))}}const An={ref:Symbol("not-started"),status:"not-started"};var On=Object.defineProperty,Rn=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,Pn=Object.getOwnPropertySymbols,_n=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,Ln=(e,t,r)=>t in e?On(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jn=(e,t)=>{for(var r in t||(t={}))_n.call(t,r)&&Ln(e,r,t[r]);if(Pn)for(var r of Pn(t))Cn.call(t,r)&&Ln(e,r,t[r]);return e};const Nn=class{constructor(e){var t;this.logger=new Ke,this.constantsController=new xn,this.state=An,this.hooks={flowController:new n.b,viewController:new n.b,view:new n.b,expressionEvaluator:new n.b,dataController:new n.b,schema:new n.b,validationController:new n.b,bindingParser:new n.b,state:new n.b,onStart:new n.b,onEnd:new n.b,resolveFlowContent:new n.c},(null==e?void 0:e.logger)&&this.logger.addHandler(e.logger),this.config=e||{},this.config.plugins=[new Sn,...this.config.plugins||[],new kn],null==(t=this.config.plugins)||t.forEach((e=>{e.apply(this)}))}getPlugins(){var e;return null!=(e=this.config.plugins)?e:[]}findPlugin(e){var t;return null==(t=this.config.plugins)?void 0:t.find((t=>t.symbol===e))}applyTo(e,t){const r=this.findPlugin(e);r&&t(r)}registerPlugin(e){var t;e.apply(this),null==(t=this.config.plugins)||t.push(e)}getVersion(){return Nn.info.version}getCommit(){return Nn.info.commit}getState(){return this.state}setState(e){this.state=e,this.hooks.state.call(e)}setupFlow(e){const t=this.hooks.resolveFlowContent.call(e),r=new Ur(t.navigation,{logger:this.logger});let n,i;this.hooks.onStart.call(t),this.hooks.flowController.call(r);const o=new ie({get:e=>i.get(e),set:e=>i.set(e),evaluate:e=>n.evaluate(e)});this.hooks.bindingParser.call(o);const s=o.parse,a=g()(),l=new lt(t.schema);this.hooks.schema.call(l);const u=new an(l);let c;function f(e,t){return dt(e,{model:i,evaluate:n.evaluate,formatted:t})}var p,d;return this.hooks.validationController.call(u),i=new pn(t.data,{pathResolver:o,middleware:u.getDataMiddleware(),logger:this.logger}),i.hooks.format.tap("player",((e,t)=>{const r=l.getFormatter(t);return r?r.format(e):e})),i.hooks.deformat.tap("player",((e,t)=>{const r=l.getFormatter(t);return r?r.deformat(e):e})),i.hooks.resolveDefaultValue.tap("player",(e=>{var t;return null==(t=l.getApparentType(e))?void 0:t.default})),n=new Qe({model:i,logger:this.logger}),this.hooks.expressionEvaluator.call(n),n.hooks.onError.tap("player",(e=>(a.reject(e),!0))),r.hooks.flow.tap("player",(e=>{e.hooks.beforeTransition.tap("player",((e,t)=>{const r=e.transitions[t]?t:"*";return e.onEnd&&e.transitions[r]&&("object"===typeof e.onEnd&&"exp"in e.onEnd?null==n||n.evaluate(e.onEnd.exp):null==n||n.evaluate(e.onEnd)),"transitions"in e&&e.transitions[r]?Object(h.setIn)(e,["transitions",r],f(e.transitions[r])):e})),e.hooks.skipTransition.tap("validation",(e=>{var t;if("VIEW"===(null==e?void 0:e.value.state_type)){const{canTransition:e,validations:r}=u.validateView("navigation");if(!e&&r){const e=new Set(r.keys());return null==(t=null==c?void 0:c.currentView)||t.update(e),!0}}})),e.hooks.resolveTransitionNode.tap("player",(e=>{let t=e;return"ref"in e&&(t=Object(h.setIn)(e,["ref"],f(e.ref))),"param"in e&&(t=Object(h.setIn)(e,["param"],f(e.param,!1))),t})),e.hooks.transition.tap("player",((e,t)=>{"VIEW"!==t.value.state_type&&u.reset()})),e.hooks.afterTransition.tap("player",(e=>{var t;const i=null==(t=e.currentState)?void 0:t.value;if(i&&"ACTION"===i.state_type){const{exp:e}=i;null==r||r.transition(String(null==n?void 0:n.evaluate(e)))}n.reset()}))})),this.hooks.dataController.call(i),u.setOptions({parseBinding:s,model:i,logger:this.logger,evaluate:n.evaluate,constants:this.constantsController}),c=new fn(t.views||[],{evaluator:n,parseBinding:s,transition:r.transition,model:i,utils:{findPlugin:e=>this.findPlugin(e)},logger:this.logger,flowController:r,schema:l,format:(e,t)=>{const r=l.getFormatter(e);return(null==r?void 0:r.format)?r.format(t):t},formatValue:(e,t)=>{const r=l.getFormatterForType(e);return(null==r?void 0:r.format)?r.format(t):t},validation:(p=jn({},u.forView(s)),d={type:e=>l.getType(s(e))},Rn(p,Tn(d))),constants:this.constantsController}),c.hooks.view.tap("player",(e=>{u.onView(e),this.hooks.view.call(e)})),this.hooks.viewController.call(c),{start:()=>{r.start().then((e=>({endState:f(e,!1),data:i.serialize()}))).then(a.resolve).catch((e=>{throw this.logger.error(`Something went wrong: ${e.message}`),e})).catch(a.reject).finally((()=>this.hooks.onEnd.call()))},state:{status:"in-progress",flowResult:a.promise,controllers:{data:i,view:c,flow:r,schema:l,expression:n,binding:o,validation:u},fail:a.reject,flow:t,logger:this.logger}}}start(e){return t=this,r=null,n=function*(){var t;const r=Symbol(null!=(t=null==e?void 0:e.id)?t:"payload"),n=e=>this.state.ref!==r?(this.logger.warn("Received update for a flow that's not the current one"),e):(this.setState(e),e);this.setState({status:"not-started",ref:r});try{const{state:t,start:i}=this.setupFlow(e);this.setState(jn({ref:r},t)),i();const o={ref:r,status:"completed",flow:t.flow,controllers:{data:t.controllers.data.makeReadOnly()}};return n(jn(jn({},yield t.flowResult),o))}catch(i){throw n({status:"error",ref:r,flow:e,error:i}),i}},new Promise(((e,i)=>{var o=e=>{try{a(n.next(e))}catch(t){i(t)}},s=e=>{try{a(n.throw(e))}catch(t){i(t)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,s);a((n=n.apply(t,r)).next())}));var t,r,n}};Nn.info={version:"0.7.4-next.0",commit:"cef2a5f638272ce982de648c8be7112a0990fbdf"}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Parser=exports.findRuleByName=exports.parseRuleName=exports.escapeRegExp=exports.readToken=void 0;const UPPER_SNAKE_RE=/^[A-Z0-9_]+$/,decorationRE=/(\?|\+|\*)$/,preDecorationRE=/^(@|&|!)/,WS_RULE="WS",TokenError_1=__webpack_require__(8);function readToken(e,t){let r=t.exec(e);return r&&0==r.index?0==r[0].length&&t.source.length>0?null:{type:null,text:r[0],rest:e.substr(r[0].length),start:0,end:r[0].length-1,fullText:r[0],errors:[],children:[],parent:null}:null}function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function fixRest(e){e.rest="",e.children&&e.children.forEach((e=>fixRest(e)))}function fixPositions(e,t){e.start+=t,e.end+=t,e.children&&e.children.forEach((t=>fixPositions(t,e.start)))}function agregateErrors(e,t){t.errors&&t.errors.length&&t.errors.forEach((t=>e.push(t))),t.children&&t.children.forEach((t=>agregateErrors(e,t)))}function parseRuleName(e){let t=decorationRE.exec(e),r=preDecorationRE.exec(e),n=t&&t[0]||"",i=r&&r[0]||"",o={raw:e,name:e.replace(decorationRE,"").replace(preDecorationRE,""),isOptional:"?"==n||"*"==n,allowRepetition:"+"==n||"*"==n,atLeastOne:"+"==n,lookupPositive:"&"==i,lookupNegative:"!"==i,pinned:"@"==i,lookup:!1,isLiteral:!1};return o.isLiteral="'"==o.name[0]||'"'==o.name[0],o.lookup=o.lookupNegative||o.lookupPositive,o}function findRuleByName(e,t){let r=parseRuleName(e);return t.cachedRules[r.name]||null}function stripRules(e,t){if(e.children){let r=e.children.filter((e=>e.type&&t.test(e.type)));for(let t=0;t<r.length;t++){let n=e.children.indexOf(r[t]);-1!=n&&e.children.splice(n,1)}e.children.forEach((e=>stripRules(e,t)))}}exports.readToken=readToken,exports.escapeRegExp=escapeRegExp,exports.parseRuleName=parseRuleName,exports.findRuleByName=findRuleByName;const ignoreMissingRules=["EOF"];class Parser{constructor(e,t){this.grammarRules=e,this.options=t,this.cachedRules={},this.debug=!!t&&!0===t.debug;let r=[],n=[];if(e.forEach((e=>{let t=parseRuleName(e.name);if(t.name in this.cachedRules)r.push("Duplicated rule "+t.name);else{if(this.cachedRules[t.name]=e,e.bnf&&e.bnf.length)e.bnf.forEach((t=>{if("string"===typeof t[0]){if(parseRuleName(t[0]).name==e.name){let t="Left recursion is not allowed, rule: "+e.name;-1==r.indexOf(t)&&r.push(t)}}t.forEach((e=>{if("string"==typeof e){let t=parseRuleName(e);t.isLiteral||-1!=n.indexOf(t.name)||-1!=ignoreMissingRules.indexOf(t.name)||n.push(t.name)}}))}));else{let t="Missing rule content, rule: "+e.name;-1==r.indexOf(t)&&r.push(t)}WS_RULE==e.name&&(e.implicitWs=!1),e.implicitWs&&-1==n.indexOf(WS_RULE)&&n.push(WS_RULE),e.recover&&-1==n.indexOf(e.recover)&&n.push(e.recover)}})),n.forEach((e=>{e in this.cachedRules||r.push("Missing rule "+e)})),r.length)throw new Error(r.join("\n"))}getAST(e,t){t||(t=this.grammarRules.filter((e=>!e.fragment&&0!=e.name.indexOf("%")))[0].name);let r=this.parse(e,t);if(r){agregateErrors(r.errors,r),fixPositions(r,0),stripRules(r,/^%/),this.options&&this.options.keepUpperRules||stripRules(r,UPPER_SNAKE_RE);let e=r.rest;e&&new TokenError_1.TokenError("Unexpected end of input: \n"+e,r),fixRest(r),r.rest=e}return r}emitSource(){return"CANNOT EMIT SOURCE FROM BASE Parser"}parse(txt,target,recursion=0){let out=null,type=parseRuleName(target),expr,printable=this.debug&&!UPPER_SNAKE_RE.test(type.name);printable&&console.log(new Array(recursion).join("\u2502 ")+"Trying to get "+target+" from "+JSON.stringify(txt.split("\n")[0]));let realType=type.name,targetLex=findRuleByName(type.name,this);if("EOF"==type.name){if(txt.length)return null;if(0==txt.length)return{type:"EOF",text:"",rest:"",start:0,end:0,fullText:"",errors:[],children:[],parent:null}}try{if(!targetLex&&type.isLiteral){let src=eval(type.name);if(""===src)return{type:"%%EMPTY%%",text:"",rest:txt,start:0,end:0,fullText:"",errors:[],children:[],parent:null};expr=new RegExp(escapeRegExp(src)),realType=null}}catch(e){return e instanceof ReferenceError&&console.error(e),null}if(expr){let e=readToken(txt,expr);if(e)return e.type=realType,e}else{let e=targetLex.bnf;e instanceof Array&&e.forEach((e=>{if(out)return;let t=null,r={type:type.name,text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:txt};targetLex.fragment&&(r.fragment=!0);let n=txt,i=0,o=e.length>0,s=!1;for(let a=0;a<e.length;a++)if("string"==typeof e[a]){let l,u=parseRuleName(e[a]);o=o&&u.isOptional;let c=!1;do{if(l=null,targetLex.implicitWs&&(l=this.parse(n,u.name,recursion+1),!l)){let e;do{if(e=this.parse(n,WS_RULE,recursion+1),!e)break;r.text=r.text+e.text,r.end=r.text.length,e.parent=r,r.children.push(e),n=n.substr(e.text.length),i+=e.text.length}while(e&&e.text.length)}if(l=l||this.parse(n,u.name,recursion+1),u.lookupNegative){if(l)return;break}if(u.lookupPositive&&!l)return;if(!l){if(u.isOptional)break;if(u.atLeastOne&&c)break}if(l&&targetLex.pinned==a+1&&(t=l,printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514\u2500 "+l.type+" PINNED")),l||(l=this.parseRecovery(targetLex,n,recursion+1)),!l){if(!t)return;out=r,l={type:"SyntaxError",text:n,children:[],end:n.length,errors:[],fullText:"",parent:null,start:0,rest:""},n.length?new TokenError_1.TokenError(`Unexpected end of input. Expecting ${u.name} Got: ${n}`,l):new TokenError_1.TokenError(`Unexpected end of input. Missing ${u.name}`,l),printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514\u2500 "+l.type+" "+JSON.stringify(l.text))}if(c=!0,s=!0,"%%EMPTY%%"==l.type)break;l.start+=i,l.end+=i,!u.lookupPositive&&l.type&&(l.fragment?l.children&&l.children.forEach((e=>{e.start+=i,e.end+=i,e.parent=r,r.children.push(e)})):(l.parent=r,r.children.push(l))),u.lookup&&(l.lookup=!0),printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514\u2500 "+l.type+" "+JSON.stringify(l.text)),u.lookup||l.lookup||(r.text=r.text+l.text,r.end=r.text.length,n=n.substr(l.text.length),i+=l.text.length),r.rest=n}while(l&&u.allowRepetition&&n.length&&!l.lookup)}else{let t=readToken(n,e[a]);if(!t)return;printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514> "+JSON.stringify(t.text)+e[a].source),s=!0,t.start+=i,t.end+=i,r.text=r.text+t.text,r.end=r.text.length,n=n.substr(t.text.length),i+=t.text.length,r.rest=n}s&&(out=r,printable&&console.log(new Array(recursion).join("\u2502 ")+"\u251c<\u2500\u2534< PUSHING "+out.type+" "+JSON.stringify(out.text)))})),out&&targetLex.simplifyWhenOneChildren&&1==out.children.length&&(out=out.children[0])}return out||printable&&console.log(target+" NOT RESOLVED FROM "+txt),out}parseRecovery(e,t,r){if(e.recover&&t.length){let n=this.debug;n&&console.log(new Array(r+1).join("\u2502 ")+"Trying to recover until token "+e.recover+" from "+JSON.stringify(t.split("\n")[0]+t.split("\n")[1]));let i,o={type:"SyntaxError",text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:""};do{if(i=this.parse(t,e.recover,r+1),i){new TokenError_1.TokenError('Unexpected input: "'+o.text+`" Expecting: ${e.name}`,o);break}o.text=o.text+t[0],o.end=o.text.length,t=t.substr(1)}while(!i&&t.length>0);if(o.text.length>0&&i)return n&&console.log(new Array(r+1).join("\u2502 ")+"Recovered text: "+JSON.stringify(o.text)),o}return null}}exports.Parser=Parser,exports.default=Parser},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=Object.prototype.hasOwnProperty;function i(e,t,r){for(r of e.keys())if(o(r,t))return r}function o(e,t){var r,s,a;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((s=e.length)===t.length)for(;s--&&o(e[s],t[s]););return-1===s}if(r===Set){if(e.size!==t.size)return!1;for(s of e){if((a=s)&&"object"===typeof a&&!(a=i(t,a)))return!1;if(!t.has(a))return!1}return!0}if(r===Map){if(e.size!==t.size)return!1;for(s of e){if((a=s[0])&&"object"===typeof a&&!(a=i(t,a)))return!1;if(!o(s[1],t.get(a)))return!1}return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((s=e.byteLength)===t.byteLength)for(;s--&&e.getInt8(s)===t.getInt8(s););return-1===s}if(ArrayBuffer.isView(e)){if((s=e.byteLength)===t.byteLength)for(;s--&&e[s]===t[s];);return-1===s}if(!r||"object"===typeof e){for(r in s=0,e){if(n.call(e,r)&&++s&&!n.call(t,r))return!1;if(!(r in t)||!o(e[r],t[r]))return!1}return Object.keys(t).length===s}}return e!==e&&t!==t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenError=void 0;class n extends Error{constructor(e,t){if(super(e),this.message=e,this.token=t,!t||!t.errors)throw this;t.errors.push(this)}inspect(){return"SyntaxError: "+this.message}}t.TokenError=n},function(e,t,r){"use strict";function n(e,t){for(var r,i=0,o=e.length;i<o;i++)r=e[i],Array.isArray(r)?n(r,t):t.push(r);return t}e.exports=function(e){return n(e,[])}},function(e,t,r){"use strict";e.exports=()=>{const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return n.Parser}});var i=r(8);Object.defineProperty(t,"TokenError",{enumerable:!0,get:function(){return i.TokenError}}),t.Grammars=r(22)},function(e,t,r){(function(t){let r;e.exports="function"===typeof queueMicrotask?queueMicrotask.bind("undefined"!==typeof window?window:t):e=>(r||(r=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))}).call(this,r(11))},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(15),i=r.n(n),o=r(4),s=r.n(o);function a(e,t=[],r=new Map){for(const n of Object.keys(e)){const i=e[n],o=[...t,n];"object"===typeof i?a(i,o,r):r.set(o,i)}return r}function l(e){const t=a(e),r=e=>{for(const r of t){const[t,n]=r;if(s()(e,t)!==n)return!1}return!0};return r.count=t.size,r}const u=()=>new i.a([],(e=>e.matcher.count));class c{constructor(e){this.store=u(),null==e||e.forEach((([e,t])=>{this.set(e,t)}))}set(e,t){const r="object"===typeof e?l(e):function(e){const t=t=>e===t;return t.count=1,t}(e);this.store.insert({key:e,value:t,matcher:r})}get(e){for(const t of this.store.array)if(t.matcher(e))return t.value}forEach(e){for(const t of this.store.array)e(t)}clear(){this.store=u()}}},function(e,t,r){var n,i=function(){var e=function(e){var t=e.constructor;return t.prototype=e,t}({constructor:function(e,r){this.array=[],this.compare=r||t;for(var n=e.length,i=0;i<n;)this.insert(e[i++])},insert:function(e){for(var t,r,n=this.array,i=this.compare,o=n.length-1,s=0,a=-1;o>=s;)if((r=i(n[t=(o+s)/2>>>0],e))<0)s=t+1;else{if(!(r>0)){a=t;break}o=t-1}for(-1===a&&(a=o),a++,o=n.length-1;a<o&&0===i(e,n[a]);)a++;for(t=n.length,n.push(e);t>a;)n[t]=n[--t];return n[a]=e,this},search:function(e){for(var t,r,n=this.array,i=this.compare,o=n.length-1,s=0;o>=s;)if((r=i(n[t=(o+s)/2>>>0],e))<0)s=t+1;else{if(!(r>0))return t;o=t-1}return-1},remove:function(e){var t=this.search(e);return t>=0&&this.array.splice(t,1),this}});return e.comparing=function(r,n){return new e(n,(function(e,n){return t(e[r],n[r])}))},e;function t(e,t){return e<t?-1:e>t?1:0}}();e.exports=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},,,function(e,t,r){"use strict";(function(e){var n=r(19),i=r(20),o=r(21);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,r){if(!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l))return new l(e,t,r);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,r)}function u(e,t,r,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,r,n):"string"===typeof t?function(e,t,r){"string"===typeof r&&""!==r||(r="utf8");if(!l.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),i=(e=a(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(l.isBuffer(t)){var r=0|p(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(n=t.length)!==n?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(l.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"===typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var f=!0,h=0;h<l;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function w(e,t,r,n){return z(V(t,e.length-r),e,r,n)}function E(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function x(e,t,r,n){return E(e,t,r,n)}function k(e,t,r,n){return z(F(t),e,r,n)}function S(e,t,r,n){return z(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,l,u=e[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128===(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],s=e[i+2],128===(192&o)&&128===(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,r){return u(null,e,t,r)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,r){return function(e,t,r,n){return c(t),t<=0?a(e,t):void 0!==r?"string"===typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}(null,e,t,r)},l.allocUnsafe=function(e){return f(null,e)},l.allocUnsafeSlow=function(e){return f(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=l.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},l.byteLength=d,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,r,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r),f=0;f<a;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"===typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function P(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function _(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=M(e[o]);return i}function C(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function I(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;r=new l(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},l.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},l.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},l.prototype.fill=function(e,t,r,n){if("string"===typeof e){if("string"===typeof t?(n=t,t=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=l.isBuffer(e)?e:V(new l(e,n).toString()),a=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(11))},function(e,t,r){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=u(e),s=n[0],a=n[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),c=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,l=r-i;a<l;a+=s)o.push(c(e,a,a+s>l?l:a+s));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<<a)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23);Object.defineProperty(t,"BNF",{enumerable:!0,get:function(){return n.default}});var i=r(25);Object.defineProperty(t,"W3C",{enumerable:!0,get:function(){return i.default}});var o=r(26);Object.defineProperty(t,"Custom",{enumerable:!0,get:function(){return o.default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(24),i=r(6);var o;!function(e){function t(e){let r=n.findChildrenByType(e,"term").map((e=>n.findChildrenByType(e,"literal").concat(n.findChildrenByType(e,"rule-name"))[0].text));return n.findChildrenByType(e,"list").forEach((e=>{r=r.concat(t(e))})),r}function r(r,i=e.defaultParser){let o=i.getAST(r);if(!o)throw new Error("Could not parse "+r);if(o.errors&&o.errors.length)throw o.errors[0];let s=n.findChildrenByType(o,"rule").map((e=>{let r=n.findChildrenByType(e,"rule-name")[0].text,i=n.findChildrenByType(e,"firstExpression").concat(n.findChildrenByType(e,"otherExpression")),o=[];return i.forEach((e=>{o.push(t(e))})),{name:r,bnf:o}}));return s.some((e=>"EOL"==e.name))||s.push({name:"EOL",bnf:[['"\\r\\n"','"\\r"','"\\n"']]}),s}e.RULES=[{name:"syntax",bnf:[["RULE_EOL*","rule+"]]},{name:"rule",bnf:[['" "*','"<"',"rule-name",'">"','" "*','"::="',"firstExpression","otherExpression*",'" "*',"RULE_EOL+",'" "*']]},{name:"firstExpression",bnf:[['" "*',"list"]]},{name:"otherExpression",bnf:[['" "*','"|"','" "*',"list"]]},{name:"RULE_EOL",bnf:[['"\\r"'],['"\\n"']]},{name:"list",bnf:[["term",'" "*',"list"],["term"]]},{name:"term",bnf:[["literal"],['"<"',"rule-name",'">"']]},{name:"literal",bnf:[["'\"'","RULE_CHARACTER1*","'\"'"],['"\'"',"RULE_CHARACTER2*",'"\'"']]},{name:"RULE_CHARACTER",bnf:[['" "'],["RULE_LETTER"],["RULE_DIGIT"],["RULE_SYMBOL"]]},{name:"RULE_LETTER",bnf:[['"A"'],['"B"'],['"C"'],['"D"'],['"E"'],['"F"'],['"G"'],['"H"'],['"I"'],['"J"'],['"K"'],['"L"'],['"M"'],['"N"'],['"O"'],['"P"'],['"Q"'],['"R"'],['"S"'],['"T"'],['"U"'],['"V"'],['"W"'],['"X"'],['"Y"'],['"Z"'],['"a"'],['"b"'],['"c"'],['"d"'],['"e"'],['"f"'],['"g"'],['"h"'],['"i"'],['"j"'],['"k"'],['"l"'],['"m"'],['"n"'],['"o"'],['"p"'],['"q"'],['"r"'],['"s"'],['"t"'],['"u"'],['"v"'],['"w"'],['"x"'],['"y"'],['"z"']]},{name:"RULE_DIGIT",bnf:[['"0"'],['"1"'],['"2"'],['"3"'],['"4"'],['"5"'],['"6"'],['"7"'],['"8"'],['"9"']]},{name:"RULE_SYMBOL",bnf:[['"-"'],['"_"'],['"!"'],['"#"'],['"$"'],['"%"'],['"&"'],['"("'],['")"'],['"*"'],['"+"'],['","'],['"-"'],['"."'],['"/"'],['":"'],['";"'],['"<"'],['"="'],['">"'],['"?"'],['"@"'],['"["'],['"\\"'],['"]"'],['"^"'],['"_"'],['"`"'],['"{"'],['"|"'],['"}"'],['"~"']]},{name:"RULE_CHARACTER1",bnf:[["RULE_CHARACTER"],['"\'"']]},{name:"RULE_CHARACTER2",bnf:[["RULE_CHARACTER"],["'\"'"]]},{name:"rule-name",bnf:[["RULE_LETTER","RULE_CHAR*"]]},{name:"RULE_CHAR",bnf:[["RULE_LETTER"],["RULE_DIGIT"],['"_"'],['"-"']]}],e.defaultParser=new i.Parser(e.RULES,{debug:!1}),e.getRules=r,e.Transform=function(t,n=e.defaultParser){return r(t.join(""),n)};class o extends i.Parser{constructor(t,n){super(r(t,n&&!0===n.debugRulesParser?new i.Parser(e.RULES,{debug:!0}):e.defaultParser),n),this.source=t}emitSource(){return this.source}}e.Parser=o}(o||(o={})),t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findChildrenByType=void 0,t.findChildrenByType=function(e,t){return e.children?e.children.filter((e=>e.type==t)):[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6);var i;!function(e){e.RULES=[{name:"Grammar",bnf:[["RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_WHITESPACE*",'"|"',"RULE_WHITESPACE*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","Item"],["Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"Item",bnf:[["RULE_WHITESPACE*","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"DecorationName",bnf:[['"ebnf://"',/[^\x5D#]+/]]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*",'")"']]},{name:"StringLiteral",bnf:[["'\"'",/[^"]*/,"'\"'"],['"\'"',/[^']*/,'"\'"']],pinned:1},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[['!"*/"',/[^*]/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],e.defaultParser=new n.Parser(e.RULES,{debug:!1});const t=/^(!|&)/,r=/(\?|\+|\*)$/,i=/^%/;function o(e,o){if("string"==typeof e){if(t.test(e))return"";if(i.test(e)){let t=r.exec(e),i=t?t[0]+" ":"",a=function(e,t){let r=n.findRuleByName(e,t);return r&&1==r.bnf.length&&1==r.bnf[0].length&&(r.bnf[0][0]instanceof RegExp||'"'==r.bnf[0][0][0]||"'"==r.bnf[0][0][0])}(e,o);return a?s(e,o)+i:"("+s(e,o)+")"+i}return e}return e.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]")}function s(e,t){let r=n.findRuleByName(e,t);return r?r.bnf.map((e=>function(e,t){return e.map((e=>o(e,t))).join(" ")}(e,t))).join(" | "):"RULE_NOT_FOUND {"+e+"}"}function a(e){let t=[];return e.grammarRules.forEach((r=>{if(!/^%/.test(r.name)){let n=r.recover?" /* { recoverUntil="+r.recover+" } */":"";t.push(r.name+" ::= "+s(r.name,e)+n)}})),t.join("\n")}e.emit=a;let l=0;function u(e){return new RegExp(e.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function c(e,t,r){let n=null,i=[];return t.children.forEach(((o,s)=>{"Minus"==o.type&&function(e,t){throw console.log("reberia restar "+t+" a "+e),new Error("Difference not supported yet")}(n,o);let a=t.children[s+1];a=a&&"PrimaryDecoration"==a.type&&a.text||"";switch(o.type){case"SubItem":let t="%"+(r+l++);f(e,o,t),i.push(""+t+a);break;case"NCName":case"StringLiteral":i.push(""+o.text+a);break;case"CharCode":case"CharClass":if(a){let t={name:"%"+(r+l++),bnf:[[u(o.text)]]};e.push(t),i.push(""+t.name+a)}else i.push(u(o.text));break;case"PrimaryDecoration":break;default:throw new Error(" HOW SHOULD I PARSE THIS? "+o.type+" -> "+JSON.stringify(o.text))}n=o})),i}function f(e,t,r){let n=t.children.filter((e=>"SequenceOrDifference"==e.type)).map((t=>c(e,t,r))),i={name:r,bnf:n},o=null;n.forEach((e=>{o=o||e.recover,delete e.recover})),0==r.indexOf("%")&&(i.fragment=!0),o&&(i.recover=o),e.push(i)}function h(t,r=e.defaultParser){let n=r.getAST(t);if(!n)throw new Error("Could not parse "+t);if(n.errors&&n.errors.length)throw n.errors[0];let i=[];return n.children.filter((e=>"Production"==e.type)).map((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;f(i,e,t)})),i}e.getRules=h,e.Transform=function(t,r=e.defaultParser){return h(t.join(""),r)};class p extends n.Parser{constructor(t,r){super(h(t,r&&!0===r.debugRulesParser?new n.Parser(e.RULES,{debug:!0}):e.defaultParser),r)}emitSource(){return a(this)}}e.Parser=p}(i||(i={})),t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8),i=r(6);var o;!function(e){e.RULES=[{name:"Grammar",bnf:[["RULE_S*","Attributes?","RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","%Choice","RULE_WHITESPACE*","Attributes?","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Attributes",bnf:[['"{"',"Attribute","%Attributes*","RULE_S*",'"}"']]},{name:"%Attributes",bnf:[["RULE_S*",'","',"Attribute"]],fragment:!0},{name:"Attribute",bnf:[["RULE_S*","NCName","RULE_WHITESPACE*",'"="',"RULE_WHITESPACE*","AttributeValue"]]},{name:"AttributeValue",bnf:[["NCName"],[/[1-9][0-9]*/]]},{name:"%Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_S*",'"|"',"RULE_S*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["%Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","%Item"],["%Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"%Item",bnf:[["RULE_WHITESPACE*","PrimaryPreDecoration?","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"PrimaryPreDecoration",bnf:[['"&"'],['"!"'],['"~"']]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_S*","%Choice","RULE_S*",'")"']]},{name:"StringLiteral",bnf:[["'\"'",/[^"]*/,"'\"'"],['"\'"',/[^']*/,'"\'"']]},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[[/[^*]/],['"*"+',/[^/]*/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],e.defaultParser=new i.Parser(e.RULES,{debug:!1});const t=/^(!|&)/,r=/(\?|\+|\*)$/,o=/^%/;function s(e,n){if("string"==typeof e){let s=r.exec(e),l=t.exec(e),u=l?l[0]:"",c=s?s[0]+" ":"";if(o.test(e)){let t=function(e,t){let r=i.findRuleByName(e,t);return r&&1==r.bnf.length&&1==r.bnf[0].length&&(r.bnf[0][0]instanceof RegExp||'"'==r.bnf[0][0][0]||"'"==r.bnf[0][0][0])}(e,n);return t?u+a(e,n)+c:u+"("+a(e,n)+")"+c}return e.replace(t,u)}return e.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]")}function a(e,t){let r=i.findRuleByName(e,t);return r?r.bnf.map((e=>function(e,t){return e.map((e=>s(e,t))).join(" ")}(e,t))).join(" | "):"RULE_NOT_FOUND {"+e+"}"}function l(e){let t=[];return e.grammarRules.forEach((r=>{if(!/^%/.test(r.name)){let n=r.recover?" { recoverUntil="+r.recover+" }":"";t.push(r.name+" ::= "+a(r.name,e)+n)}})),t.join("\n")}e.emit=l;let u=0;function c(e){return new RegExp(e.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function f(e,t,r,n){let o=null,s=[];return t.children.forEach(((a,l)=>{"Minus"==a.type&&function(e,t){throw console.log("reberia restar "+t+" a "+e),new Error("Difference not supported yet")}(o,a);let f=t.children[l+1];f=f&&"PrimaryDecoration"==f.type&&f.text||"";let p="";o&&"PrimaryPreDecoration"==o.type&&(p=o.text);let d="~"==p?1:void 0;switch(d&&(p=""),a.type){case"SubItem":let t="%"+(r+u++);h(e,a,t,n),s.push(p+t+f);break;case"NCName":s.push(p+a.text+f);break;case"StringLiteral":if(f||p||!/^['"/()a-zA-Z0-9&_.:=,+*\-\^\\]+$/.test(a.text))s.push(p+a.text+f);else for(const e of a.text.slice(1,-1))n&&"true"==n.ignoreCase&&/[a-zA-Z]/.test(e)?s.push(new RegExp("["+e.toUpperCase()+e.toLowerCase()+"]")):s.push(new RegExp(i.escapeRegExp(e)));break;case"CharCode":case"CharClass":if(f||p){let t={name:"%"+(r+u++),bnf:[[c(a.text)]],pinned:d};e.push(t),s.push(p+t.name+f)}else s.push(c(a.text));break;case"PrimaryPreDecoration":case"PrimaryDecoration":break;default:throw new Error(" HOW SHOULD I PARSE THIS? "+a.type+" -> "+JSON.stringify(a.text))}o=a})),s}function h(e,t,r,i){let o=t.children.filter((e=>"Attributes"==e.type))[0],s={};o&&o.children.forEach((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;if(t in s)throw new n.TokenError("Duplicated attribute "+t,e);s[t]=e.children.filter((e=>"AttributeValue"==e.type))[0].text}));let a=t.children.filter((e=>"SequenceOrDifference"==e.type)).map((t=>f(e,t,r,i||s))),l={name:r,bnf:a};if(0==r.indexOf("%")&&(l.fragment=!0),s.recoverUntil&&(l.recover=s.recoverUntil,l.bnf.length>1))throw new n.TokenError("only one-option productions are suitable for error recovering",t);if("pin"in s){let e=parseInt(s.pin);if(isNaN(e)||(l.pinned=e),l.bnf.length>1)throw new n.TokenError("only one-option productions are suitable for pinning",t)}l.implicitWs="ws"in s?"explicit"!=s.ws:null,l.fragment=l.fragment||"true"==s.fragment,l.simplifyWhenOneChildren="true"==s.simplifyWhenOneChildren,e.push(l)}function p(t,r=e.defaultParser){let i=r.getAST(t);if(!i)throw new Error("Could not parse "+t);if(i.errors&&i.errors.length)throw i.errors[0];let o=null,s=i.children.filter((e=>"Attributes"==e.type))[0],a={};s&&s.children.forEach((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;if(t in a)throw new n.TokenError("Duplicated attribute "+t,e);a[t]=e.children.filter((e=>"AttributeValue"==e.type))[0].text})),o="implicit"==a.ws;let l=[];return i.children.filter((e=>"Production"==e.type)).map((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;h(l,e,t)})),l.forEach((e=>{null===e.implicitWs&&(e.implicitWs=o)})),l}e.getRules=p,e.Transform=function(t,r=e.defaultParser){return p(t.join(""),r)};class d extends i.Parser{constructor(t,r){super(p(t,r&&!0===r.debugRulesParser?new i.Parser(e.RULES,{debug:!0}):e.defaultParser),r)}emitSource(){return l(this)}}e.Parser=d}(o||(o={})),t.default=o},function(e,t,r){"use strict";r.r(t),r.d(t,"MarkdownPlugin",(function(){return ht}));var n={};r.r(n),r.d(n,"document",(function(){return Ae})),r.d(n,"contentInitial",(function(){return Oe})),r.d(n,"flowInitial",(function(){return Re})),r.d(n,"flow",(function(){return Te})),r.d(n,"string",(function(){return Pe})),r.d(n,"text",(function(){return _e})),r.d(n,"insideSpan",(function(){return Ce})),r.d(n,"attentionMarkers",(function(){return Le})),r.d(n,"disable",(function(){return je}));var i=r(5);const o={};function s(e,t,r){if(function(e){return Boolean(e&&"object"===typeof e)}(e)){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return a(e.children,t,r)}return Array.isArray(e)?a(e,t,r):""}function a(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=s(e[i],t,r);return n.join("")}function l(e,t,r,n){const i=e.length;let o,s=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);s<n.length;)o=n.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function u(e,t){return e.length>0?(l(e,e.length,0,t),e):t}function c(e){const t={};let r,n,i,o,s,a,u,c=-1;for(;++c<e.length;){for(;c in t;)c=t[c];if(r=e[c],c&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[c-1][1].type&&(a=r[1]._tokenizer.events,i=0,i<a.length&&"lineEndingBlank"===a[i][1].type&&(i+=2),i<a.length&&"content"===a[i][1].type))for(;++i<a.length&&"content"!==a[i][1].type;)"chunkText"===a[i][1].type&&(a[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,f(e,c)),c=t[c],u=!0);else if(r[1]._container){for(i=c,n=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(n&&(e[n][1].type="lineEndingBlank"),o[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),s=e.slice(n,c),s.unshift(r),l(e,n,c-n+1,s))}}return!u}function f(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const o=[],s=r._tokenizer||n.parser[r.contentType](r.start),a=s.events,u=[],c={};let f,h,p=-1,d=r,g=0,m=0;const v=[m];for(;d;){for(;e[++i][1]!==d;);o.push(i),d._tokenizer||(f=n.sliceStream(d),d.next||f.push(null),h&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=d,d=d.next}for(d=r;++p<a.length;)"exit"===a[p][0]&&"enter"===a[p-1][0]&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(m=p+1,v.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):v.pop(),p=v.length;p--;){const t=a.slice(v[p],v[p+1]),r=o.pop();u.unshift([r,r+t.length-1]),l(e,r,2,t)}for(p=-1;++p<u.length;)c[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return c}const h={}.hasOwnProperty;function p(e,t){let r;for(r in t){const n=(h.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let o;if(i)for(o in i){h.call(n,o)||(n[o]=[]);const e=i[o];d(n[o],Array.isArray(e)?e:e?[e]:[])}}}function d(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);l(e,0,0,n)}const g=R(/\p{P}/u),m=R(/[A-Za-z]/),v=R(/[\dA-Za-z]/),y=R(/[#-'*+\--9=?A-Z^-~]/);function b(e){return null!==e&&(e<32||127===e)}const w=R(/\d/),E=R(/[\dA-Fa-f]/),x=R(/[!-/:-@[-`{-~]/);function k(e){return null!==e&&e<-2}function S(e){return null!==e&&(e<0||32===e)}function A(e){return-2===e||-1===e||32===e}const O=R(/\s/);function R(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function T(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let o=0;return function(n){if(A(n))return e.enter(r),s(n);return t(n)};function s(n){return A(n)&&o++<i?(e.consume(n),s):(e.exit(r),t(n))}}const P={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"),T(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)):k(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const _={tokenize:function(e){const t=this,r=[];let n,i,o,s=0;return a;function a(n){if(s<r.length){const i=r[s];return t.containerState=i[1],e.attempt(i[0].continuation,u,c)(n)}return c(n)}function u(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&b();const r=t.events.length;let i,o=r;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}y(s);let a=r;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},i),a++;return l(t.events,o+1,0,t.events.slice(r)),t.events.length=a,c(e)}return a(e)}function c(i){if(s===r.length){if(!n)return p(i);if(n.currentConstruct&&n.currentConstruct.concrete)return g(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(C,f,h)(i)}function f(e){return n&&b(),y(s),p(e)}function h(e){return t.parser.lazy[t.now().line]=s!==r.length,o=t.now().offset,g(e)}function p(r){return t.containerState={},e.attempt(C,d,g)(r)}function d(e){return s++,r.push([t.currentConstruct,t.containerState]),p(e)}function g(r){return null===r?(n&&b(),y(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?(v(e.exit("chunkFlow"),!0),y(0),void e.consume(r)):k(r)?(e.consume(r),v(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(r),m)}function v(e,r){const a=t.sliceStream(e);if(r&&a.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(a),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<o&&(!n.events[e][1].end||n.events[e][1].end.offset>o))return;const r=t.events.length;let i,a,u=r;for(;u--;)if("exit"===t.events[u][0]&&"chunkFlow"===t.events[u][1].type){if(i){a=t.events[u][1].end;break}i=!0}for(y(s),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},a),e++;l(t.events,u+1,0,t.events.slice(r)),t.events.length=e}}function y(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 b(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},C={tokenize:function(e,t,r){return T(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const L={tokenize:function(e,t,r){return function(t){return A(t)?T(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||k(e)?t(e):r(e)}},partial:!0};const j={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):k(t)?e.check(N,o,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function o(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 c(e),e}},N={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T(e,i,"linePrefix")};function i(i){if(null===i||k(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};const I={tokenize:function(e){const t=this,r=e.attempt(L,(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,T(e,e.attempt(this.parser.constructs.flow,n,e.attempt(j,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 U={resolveAll:M()},B=q("string"),D=q("text");function q(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,o,s);return o;function o(e){return l(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function l(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:M("text"===e?V:void 0)}}function M(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 V(e,t){let r=0;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 o,s=i.length,a=-1,l=0;for(;s--;){const e=i[s];if("string"===typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)o=!0,l++;else if(-1!==e){s++;break}}if(l){const i={type:r===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-l,offset:n.end.offset-l,_index:n.start._index+s,_bufferIndex:s?a:n.start._bufferIndex+a},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 F(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}function z(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let s=[],a=[],c=!0;const f={consume:function(e){k(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,x()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++));h.previous=e,c=!0},enter:function(e,t){const r=t||{};return r.type=e,r.start=m(),h.events.push(["enter",r,h]),a.push(r),r},exit:function(e){const t=a.pop();return t.end=m(),h.events.push(["exit",t,h]),t},attempt:w((function(e,t){E(e,t.from)})),check:w(b),interrupt:w(b,{interrupt:!0})},h={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:g,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const o=e[r];let s;if("string"===typeof o)s=o;else switch(o){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&i)continue;s=" ";break;default:s=String.fromCharCode(o)}i=-2===o,n.push(s)}return n.join("")}(g(e),t)},now:m,defineSkip:function(e){i[e.line]=e.column,x()},write:function(e){if(s=u(s,e),v(),null!==s[s.length-1])return[];return E(t,0),h.events=F(o,h.events,h),h.events}};let p,d=t.tokenize.call(h,f);return t.resolveAll&&o.push(t),h;function g(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(r===i)s=[e[r].slice(n,o)];else{if(s=e.slice(r,i),n>-1){const e=s[0];"string"===typeof e?s[0]=e.slice(n):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}(s,e)}function m(){const{line:e,column:t,offset:r,_index:i,_bufferIndex:o}=n;return{line:e,column:t,offset:r,_index:i,_bufferIndex:o}}function v(){let e;for(;n._index<s.length;){const t=s[n._index];if("string"===typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)y(t.charCodeAt(n._bufferIndex));else y(t)}}function y(e){c=void 0,p=e,d=d(e)}function b(e,t){t.restore()}function w(e,t){return function(r,i,o){let s,l,u,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 s=e,l=0,0===e.length?o:g(e[l])}function g(e){return function(r){p=function(){const e=m(),t=h.previous,r=h.currentConstruct,i=h.events.length,o=Array.from(a);return{restore:s,from:i};function s(){n=e,h.previous=t,h.currentConstruct=r,h.events.length=i,a=o,x()}}(),u=e,e.partial||(h.currentConstruct=e);if(e.name&&h.parser.constructs.disable.null.includes(e.name))return y(r);return e.tokenize.call(t?Object.assign(Object.create(h),t):h,f,v,y)(r)}}function v(t){return c=!0,e(u,p),i}function y(e){return c=!0,p.restore(),++l<s.length?g(s[l]):o}}}function E(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&l(h.events,t,h.events.length-t,e.resolve(h.events.slice(t),h)),e.resolveTo&&(h.events=e.resolveTo(h.events,h))}function x(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const H={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),function(e){return n=e,o(e)}(t)};function o(o){return o===n?(e.enter("thematicBreakSequence"),s(o)):i>=3&&(null===o||k(o))?(e.exit("thematicBreak"),t(o)):r(o)}function s(t){return t===n?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),A(t)?T(e,o,"whitespace")(t):o(t))}}};const $={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=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:w(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(H,r,l)(t):l(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return r(t)};function a(t){return w(t)&&++s<10?(e.consume(t),a):(!n.interrupt||s<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):r(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(L,n.interrupt?r:u,e.attempt(W,f,c))}function u(e){return n.containerState.initialBlankLine=!0,o++,f(e)}function c(t){return A(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=o+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(L,(function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,T(e,t,"listItemIndent",n.containerState.size+1)(r)}),(function(r){if(n.containerState.furtherBlankLines||!A(r))return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(r);return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(G,t,i)(r)}));function i(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,T(e,e.attempt($,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},W={tokenize:function(e,t,r){const n=this;return T(e,(function(e){const i=n.events[n.events.length-1];return!A(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},G={tokenize:function(e,t,r){const n=this;return T(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 Y={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 A(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){const n=this;return function(t){if(A(t))return T(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(n){return e.attempt(Y,t,r)(n)}}},exit:function(e){e.exit("blockQuote")}};function Z(e,t,r,n,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||32===t||41===t||b(t))return r(t);return e.enter(n),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(o),e.consume(r),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),f(t)):null===t||60===t||k(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 c||null!==i&&41!==i&&!S(i)?c<u&&40===i?(e.consume(i),c++,d):41===i?(e.consume(i),c--,d):null===i||32===i||40===i||b(i)?r(i):(e.consume(i),92===i?g:d):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(n),t(i))}function g(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}function Q(e,t,r,n,i,o){const s=this;let a,l=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(f){return l>999||null===f||91===f||93===f&&!a||94===f&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):k(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||k(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),a||(a=!A(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function K(e,t,r,n,i,o){let s;return function(t){if(34===t||39===t||40===t)return e.enter(n),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,a;return r(t)};function a(r){return r===s?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),l(r))}function l(t){return t===s?(e.exit(o),a(s)):null===t?r(t):k(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===s||null===t||k(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return t===s||92===t?(e.consume(t),u):u(t)}}function J(e,t){let r;return function n(i){if(k(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(A(i))return T(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}function X(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ee={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),function(t){return Q.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=X(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):r(t)}function s(t){return S(t)?J(e,a)(t):a(t)}function a(t){return Z(e,l,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(te,u,u)(t)}function u(t){return A(t)?T(e,c,"whitespace")(t):c(t)}function c(o){return null===o||k(o)?(e.exit("definition"),n.parser.defined.push(i),t(o)):r(o)}}},te={tokenize:function(e,t,r){return function(t){return S(t)?J(e,n)(t):r(t)};function n(t){return K(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return A(t)?T(e,o,"whitespace")(t):o(t)}function o(e){return null===e||k(e)?t(e):r(e)}},partial:!0};const re={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),T(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?o(e):r(e)}function o(t){return null===t?a(t):k(t)?e.attempt(ne,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||k(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(r){return e.exit("codeIndented"),t(r)}}},ne={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):k(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):T(e,o,"linePrefix",5)(t)}function o(e){const o=n.events[n.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):k(e)?i(e):r(e)}},partial:!0};const ie={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i;return function(t){let s,a=n.events.length;for(;a--;)if("lineEnding"!==n.events[a][1].type&&"linePrefix"!==n.events[a][1].type&&"content"!==n.events[a][1].type){s="paragraph"===n.events[a][1].type;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||s))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return r(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),A(t)?T(e,s,"lineSuffix")(t):s(t))}function s(n){return null===n||k(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const s={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",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=s;return e.push(["exit",s,t]),e}};const oe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],se=["pre","script","style","textarea"],ae={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,o,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u}(t)};function u(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),o=!0,p):63===a?(e.consume(a),i=3,n.interrupt?t:q):m(a)?(e.consume(a),s=String.fromCharCode(a),d):r(a)}function c(o){return 45===o?(e.consume(o),i=2,f):91===o?(e.consume(o),i=5,a=0,h):m(o)?(e.consume(o),i=4,n.interrupt?t:q):r(o)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:q):r(i)}function h(i){const o="CDATA[";return i===o.charCodeAt(a++)?(e.consume(i),a===o.length?n.interrupt?t:C:h):r(i)}function p(t){return m(t)?(e.consume(t),s=String.fromCharCode(t),d):r(t)}function d(a){if(null===a||47===a||62===a||S(a)){const l=47===a,u=s.toLowerCase();return l||o||!se.includes(u)?oe.includes(s.toLowerCase())?(i=6,l?(e.consume(a),g):n.interrupt?t(a):C(a)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(a):o?y(a):b(a)):(i=1,n.interrupt?t(a):C(a))}return 45===a||v(a)?(e.consume(a),s+=String.fromCharCode(a),d):r(a)}function g(i){return 62===i?(e.consume(i),n.interrupt?t:C):r(i)}function y(t){return A(t)?(e.consume(t),y):P(t)}function b(t){return 47===t?(e.consume(t),P):58===t||95===t||m(t)?(e.consume(t),w):A(t)?(e.consume(t),b):P(t)}function w(t){return 45===t||46===t||58===t||95===t||v(t)?(e.consume(t),w):E(t)}function E(t){return 61===t?(e.consume(t),x):A(t)?(e.consume(t),E):b(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),l=t,O):A(t)?(e.consume(t),x):R(t)}function O(t){return t===l?(e.consume(t),l=null,T):null===t||k(t)?r(t):(e.consume(t),O)}function R(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||S(t)?E(t):(e.consume(t),R)}function T(e){return 47===e||62===e||A(e)?b(e):r(e)}function P(t){return 62===t?(e.consume(t),_):r(t)}function _(t){return null===t||k(t)?C(t):A(t)?(e.consume(t),_):r(t)}function C(t){return 45===t&&2===i?(e.consume(t),I):60===t&&1===i?(e.consume(t),U):62===t&&4===i?(e.consume(t),M):63===t&&3===i?(e.consume(t),q):93===t&&5===i?(e.consume(t),D):!k(t)||6!==i&&7!==i?null===t||k(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(le,V,L)(t))}function L(t){return e.check(ue,j,V)(t)}function j(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||k(t)?L(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),q):C(t)}function U(t){return 47===t?(e.consume(t),s="",B):C(t)}function B(t){if(62===t){const r=s.toLowerCase();return se.includes(r)?(e.consume(t),M):C(t)}return m(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),B):C(t)}function D(t){return 93===t?(e.consume(t),q):C(t)}function q(t){return 62===t?(e.consume(t),M):45===t&&2===i?(e.consume(t),q):C(t)}function M(t){return null===t||k(t)?(e.exit("htmlFlowData"),V(t)):(e.consume(t),M)}function V(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},le={tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(L,t,r)}},partial:!0},ue={tokenize:function(e,t,r){const n=this;return function(t){if(k(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return r(t)};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const ce={tokenize:function(e,t,r){const n=this;return function(t){if(null===t)return r(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},fe={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let i=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),A(t)?T(e,u,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):r(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=a?(e.exit("codeFencedFenceSequence"),A(t)?T(e,f,"whitespace")(t):f(t)):r(t)}function f(n){return null===n||k(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0};let o,s=0,a=0;return function(t){return function(t){const r=n.events[n.events.length-1];return s=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(a++,e.consume(t),l):a<3?r(t):(e.exit("codeFencedFenceSequence"),A(t)?T(e,u,"whitespace")(t):u(t))}function u(r){return null===r||k(r)?(e.exit("codeFencedFence"),n.interrupt?t(r):e.check(ce,p,y)(r)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(r))}function c(t){return null===t||k(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):A(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),T(e,f,"whitespace")(t)):96===t&&t===o?r(t):(e.consume(t),c)}function f(t){return null===t||k(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||k(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===o?r(t):(e.consume(t),h)}function p(t){return e.attempt(i,y,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return s>0&&A(t)?T(e,m,"linePrefix",s+1)(t):m(t)}function m(t){return null===t||k(t)?e.check(ce,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||k(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const he={AElig:"\xc6",AMP:"&",Aacute:"\xc1",Abreve:"\u0102",Acirc:"\xc2",Acy:"\u0410",Afr:"\ud835\udd04",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\ud835\udd38",ApplyFunction:"\u2061",Aring:"\xc5",Ascr:"\ud835\udc9c",Assign:"\u2254",Atilde:"\xc3",Auml:"\xc4",Backslash:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212c",Beta:"\u0392",Bfr:"\ud835\udd05",Bopf:"\ud835\udd39",Breve:"\u02d8",Bscr:"\u212c",Bumpeq:"\u224e",CHcy:"\u0427",COPY:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",Cayleys:"\u212d",Ccaron:"\u010c",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",CenterDot:"\xb7",Cfr:"\u212d",Chi:"\u03a7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2a74",Congruent:"\u2261",Conint:"\u222f",ContourIntegral:"\u222e",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2a2f",Cscr:"\ud835\udc9e",Cup:"\u22d3",CupCap:"\u224d",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\ud835\udd07",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",Diamond:"\u22c4",DifferentialD:"\u2146",Dopf:"\ud835\udd3b",Dot:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",Downarrow:"\u21d3",Dscr:"\ud835\udc9f",Dstrok:"\u0110",ENG:"\u014a",ETH:"\xd0",Eacute:"\xc9",Ecaron:"\u011a",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\ud835\udd08",Egrave:"\xc8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\ud835\udd3c",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",Equilibrium:"\u21cc",Escr:"\u2130",Esim:"\u2a73",Eta:"\u0397",Euml:"\xcb",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\ud835\udd09",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",Fopf:"\ud835\udd3d",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\ud835\udd0a",Gg:"\u22d9",Gopf:"\ud835\udd3e",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",Gt:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",HilbertSpace:"\u210b",Hopf:"\u210d",HorizontalLine:"\u2500",Hscr:"\u210b",Hstrok:"\u0126",HumpDownHump:"\u224e",HumpEqual:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xcd",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xcc",Im:"\u2111",Imacr:"\u012a",ImaginaryI:"\u2148",Implies:"\u21d2",Int:"\u222c",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012e",Iopf:"\ud835\udd40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\ud835\udd0d",Jopf:"\ud835\udd41",Jscr:"\ud835\udca5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\ud835\udd0e",Kopf:"\ud835\udd42",Kscr:"\ud835\udca6",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Larr:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Lfr:"\ud835\udd0f",Ll:"\u22d8",Lleftarrow:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lopf:"\ud835\udd43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",MinusPlus:"\u2213",Mopf:"\ud835\udd44",Mscr:"\u2133",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",Nfr:"\ud835\udd11",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\ud835\udca9",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\ud835\udd12",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",Omicron:"\u039f",Oopf:"\ud835\udd46",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",Or:"\u2a54",Oscr:"\ud835\udcaa",Oslash:"\xd8",Otilde:"\xd5",Otimes:"\u2a37",Ouml:"\xd6",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",Pcy:"\u041f",Pfr:"\ud835\udd13",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Poincareplane:"\u210c",Popf:"\u2119",Pr:"\u2abb",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Prime:"\u2033",Product:"\u220f",Proportion:"\u2237",Proportional:"\u221d",Pscr:"\ud835\udcab",Psi:"\u03a8",QUOT:'"',Qfr:"\ud835\udd14",Qopf:"\u211a",Qscr:"\ud835\udcac",RBarr:"\u2910",REG:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",Rfr:"\u211c",Rho:"\u03a1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",Rightarrow:"\u21d2",Ropf:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",Rscr:"\u211b",Rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\ud835\udd16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",Sopf:"\ud835\udd4a",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\ud835\udcae",Star:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Sup:"\u22d1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",THORN:"\xde",TRADE:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\ud835\udd17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\ud835\udd4b",TripleDot:"\u20db",Tscr:"\ud835\udcaf",Tstrok:"\u0166",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\ud835\udd18",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",Uopf:"\ud835\udd4c",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",UpEquilibrium:"\u296e",UpTee:"\u22a5",UpTeeArrow:"\u21a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\ud835\udcb0",Utilde:"\u0168",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",Vopf:"\ud835\udd4d",Vscr:"\ud835\udcb1",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",Wfr:"\ud835\udd1a",Wopf:"\ud835\udd4e",Wscr:"\ud835\udcb2",Xfr:"\ud835\udd1b",Xi:"\u039e",Xopf:"\ud835\udd4f",Xscr:"\ud835\udcb3",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\ud835\udd1c",Yopf:"\ud835\udd50",Yscr:"\ud835\udcb4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",ZeroWidthSpace:"\u200b",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\ud835\udcb5",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acirc:"\xe2",acute:"\xb4",acy:"\u0430",aelig:"\xe6",af:"\u2061",afr:"\ud835\udd1e",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",amp:"&",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",aogon:"\u0105",aopf:"\ud835\udd52",ap:"\u2248",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",apid:"\u224b",apos:"'",approx:"\u2248",approxeq:"\u224a",aring:"\xe5",ascr:"\ud835\udcb6",ast:"*",asymp:"\u2248",asympeq:"\u224d",atilde:"\xe3",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",beta:"\u03b2",beth:"\u2136",between:"\u226c",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",bprime:"\u2035",breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",bumpeq:"\u224f",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",ccaps:"\u2a4d",ccaron:"\u010d",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cedil:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",cfr:"\ud835\udd20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",conint:"\u222e",copf:"\ud835\udd54",coprod:"\u2210",copy:"\xa9",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dArr:"\u21d3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",dcaron:"\u010f",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",ddotseq:"\u2a77",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\ud835\udd21",dharl:"\u21c3",dharr:"\u21c2",diam:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\ud835\udd55",dot:"\u02d9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",dscr:"\ud835\udcb9",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eDDot:"\u2a77",eDot:"\u2251",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\u2256",ecirc:"\xea",ecolon:"\u2255",ecy:"\u044d",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\ud835\udd22",eg:"\u2a9a",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",equals:"=",equest:"\u225f",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",erarr:"\u2971",escr:"\u212f",esdot:"\u2250",esim:"\u2242",eta:"\u03b7",eth:"\xf0",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\ud835\udd23",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\ud835\udd57",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",gE:"\u2267",gEl:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gammad:"\u03dd",gap:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\ud835\udd24",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",gopf:"\ud835\udd58",grave:"`",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hArr:"\u21d4",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",hardcy:"\u044a",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",hbar:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",horbar:"\u2015",hscr:"\ud835\udcbd",hslash:"\u210f",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xed",ic:"\u2063",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",int:"\u222b",intcal:"\u22ba",integers:"\u2124",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\ud835\udd5a",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",isin:"\u2208",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\ud835\udd27",jmath:"\u0237",jopf:"\ud835\udd5b",jscr:"\ud835\udcbf",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\ud835\udd28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\ud835\udd5c",kscr:"\ud835\udcc0",lAarr:"\u21da",lArr:"\u21d0",lAtail:"\u291b",lBarr:"\u290e",lE:"\u2266",lEg:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",lambda:"\u03bb",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",laquo:"\xab",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lceil:"\u2308",lcub:"{",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21a2",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",leftthreetimes:"\u22cb",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297c",lfloor:"\u230a",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",lstrok:"\u0142",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",measuredangle:"\u2221",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",mstpos:"\u223e",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nGtv:"\u226b\u0338",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nLtv:"\u226a\u0338",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",neArr:"\u21d7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",ngsim:"\u2275",ngt:"\u226f",ngtr:"\u226f",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",njcy:"\u045a",nlArr:"\u21cd",nlE:"\u2266\u0338",nlarr:"\u219a",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219a",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nlsim:"\u2274",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nmid:"\u2224",nopf:"\ud835\udd5f",not:"\xac",notin:"\u2209",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24c8",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",ocirc:"\xf4",ocy:"\u043e",odash:"\u229d",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\ud835\udd2c",ogon:"\u02db",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",oopf:"\ud835\udd60",opar:"\u29b7",operp:"\u29b9",oplus:"\u2295",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oscr:"\u2134",oslash:"\xf8",osol:"\u2298",otilde:"\xf5",otimes:"\u2297",otimesas:"\u2a36",ouml:"\xf6",ovbar:"\u233d",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",pfr:"\ud835\udd2d",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",pointint:"\u2a15",popf:"\ud835\udd61",pound:"\xa3",pr:"\u227a",prE:"\u2ab3",prap:"\u2ab7",prcue:"\u227c",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",prime:"\u2032",primes:"\u2119",prnE:"\u2ab5",prnap:"\u2ab9",prnsim:"\u22e8",prod:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",pscr:"\ud835\udcc5",psi:"\u03c8",puncsp:"\u2008",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",qprime:"\u2057",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',rAarr:"\u21db",rArr:"\u21d2",rAtail:"\u291c",rBarr:"\u290f",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",reg:"\xae",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",rightarrow:"\u2192",rightarrowtail:"\u21a3",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",rightthreetimes:"\u22cc",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",rsaquo:"\u203a",rscr:"\ud835\udcc7",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",sbquo:"\u201a",sc:"\u227b",scE:"\u2ab4",scap:"\u2ab8",scaron:"\u0161",sccue:"\u227d",sce:"\u2ab0",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",seArr:"\u21d8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",square:"\u25a1",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",subE:"\u2ac5",subdot:"\u2abd",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",supE:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supe:"\u2287",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tbrk:"\u23b4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",thorn:"\xfe",tilde:"\u02dc",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\ud835\udcc9",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",uArr:"\u21d1",uHar:"\u2963",uacute:"\xfa",uarr:"\u2191",ubrcy:"\u045e",ubreve:"\u016d",ucirc:"\xfb",ucy:"\u0443",udarr:"\u21c5",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",ufr:"\ud835\udd32",ugrave:"\xf9",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",uml:"\xa8",uogon:"\u0173",uopf:"\ud835\udd66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",upsi:"\u03c5",upsih:"\u03d2",upsilon:"\u03c5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\ud835\udcca",utdot:"\u22f0",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",uuml:"\xfc",uwangle:"\u29a7",vArr:"\u21d5",vBar:"\u2ae8",vBarv:"\u2ae9",vDash:"\u22a8",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vcy:"\u0432",vdash:"\u22a2",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",vert:"|",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\ud835\udd34",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",yen:"\xa5",yfr:"\ud835\udd36",yicy:"\u0457",yopf:"\ud835\udd6a",yscr:"\ud835\udcce",yucy:"\u044e",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeetrf:"\u2128",zeta:"\u03b6",zfr:"\ud835\udd37",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},pe={}.hasOwnProperty;function de(e){return!!pe.call(he,e)&&he[e]}const ge={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,o,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=v,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=E,u):(e.enter("characterReferenceValue"),i=7,o=w,u(t))}function u(a){if(59===a&&s){const i=e.exit("characterReferenceValue");return o!==v||de(n.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(a)}return o(a)&&s++<i?(e.consume(a),u):r(a)}}};const me={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 x(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const ve={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),T(e,t,"linePrefix")}}};const ye={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,s=n.events.length;for(;s--;)if(("labelImage"===n.events[s][1].type||"labelLink"===n.events[s][1].type)&&!n.events[s][1]._balanced){i=n.events[s][1];break}return function(t){if(!i)return r(t);if(i._inactive)return c(t);return o=n.parser.defined.includes(X(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(be,u,o?u:c)(t):91===t?e.attempt(we,u,o?l:c)(t):o?u(t):c(t)}function l(t){return e.attempt(Ee,u,c)(t)}function u(e){return t(e)}function c(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,o,s=e.length,a=0;for(;s--;)if(r=e[s][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[s][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=s,"labelLink"!==r.type)){a=2;break}}else"labelEnd"===r.type&&(i=s);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)},f={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},h={type:"labelText",start:Object.assign({},e[n+a+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",c,t],["enter",f,t]],o=u(o,e.slice(n+1,n+a+3)),o=u(o,[["enter",h,t]]),o=u(o,F(t.parser.constructs.insideSpan.null,e.slice(n+a+4,i-3),t)),o=u(o,[["exit",h,t],e[i-2],e[i-1],["exit",f,t]]),o=u(o,e.slice(i+1)),o=u(o,[["exit",c,t]]),l(e,n,e.length,o),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const r=e[t][1];"labelImage"!==r.type&&"labelLink"!==r.type&&"labelEnd"!==r.type||(e.splice(t+1,"labelImage"===r.type?4:2),r.type="data",t++)}return e}},be={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),n};function n(t){return S(t)?J(e,i)(t):i(t)}function i(t){return 41===t?u(t):Z(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return S(t)?J(e,a)(t):u(t)}function s(e){return r(e)}function a(t){return 34===t||39===t||40===t?K(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return S(t)?J(e,u)(t):u(t)}function u(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},we={tokenize:function(e,t,r){const n=this;return function(t){return Q.call(n,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(X(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function o(e){return r(e)}}},Ee={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)}}};function xe(e){return null===e||S(e)||O(e)?1:function(e){return x(e)||g(e)}(e)?2:void 0}const ke={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=xe(n);let o;return function(t){return o=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===o)return e.consume(a),s;const l=e.exit("attentionSequence"),u=xe(a),c=!u||2===u&&i||r.includes(a),f=!i||2===i&&u||r.includes(n);return l._open=Boolean(42===o?c:c&&(i||!f)),l._close=Boolean(42===o?f:f&&(u||!c)),t(a)}},resolveAll:function(e,t){let r,n,i,o,s,a,c,f,h=-1;for(;++h<e.length;)if("enter"===e[h][0]&&"attentionSequence"===e[h][1].type&&e[h][1]._close)for(r=h;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[h][1]).charCodeAt(0)){if((e[r][1]._close||e[h][1]._open)&&(e[h][1].end.offset-e[h][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[h][1].end.offset-e[h][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),d=Object.assign({},e[h][1].start);Se(p,-a),Se(d,a),o={type:a>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[h][1].start),end:d},i={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[h][1].start)},n={type:a>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[h][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=u(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=u(c,[["enter",n,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=u(c,F(t.parser.constructs.insideSpan.null,e.slice(r+1,h),t)),c=u(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[h][1].end.offset-e[h][1].start.offset?(f=2,c=u(c,[["enter",e[h][1],t],["exit",e[h][1],t]])):f=0,l(e,r-1,h-r+3,c),h=r+c.length-f-2;break}h=-1;for(;++h<e.length;)"attentionSequence"===e[h][1].type&&(e[h][1].type="data");return e}};function Se(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ae={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:Y},Oe={91:ee},Re={[-2]:re,[-1]:re,32:re},Te={35:{name:"headingAtx",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&n++<6?(e.consume(t),i):null===t||S(t)?(e.exit("atxHeadingSequence"),o(t)):r(t)}function o(r){return 35===r?(e.enter("atxHeadingSequence"),s(r)):null===r||k(r)?(e.exit("atxHeading"),t(r)):A(r)?T(e,o,"whitespace")(r):(e.enter("atxHeadingText"),a(r))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function a(t){return null===t||35===t||S(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),a)}},resolve:function(e,t){let r,n,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},n={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},l(e,o,i-o+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}},42:H,45:[ie,H],60:ae,61:ie,95:H,96:fe,126:fe},Pe={38:ge,92:me},_e={[-5]:ve,[-4]:ve,[-3]:ve,33:{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"),o):r(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:ye.resolveAll},38:ge,42:ke,60:[{name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return m(t)?(e.consume(t),o):l(t)}function o(e){return 43===e||45===e||46===e||v(e)?(n=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),n=0,a):(43===t||45===t||46===t||v(t))&&n++<32?(e.consume(t),s):(n=0,l(t))}function a(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||b(n)?r(n):(e.consume(n),a)}function l(t){return 64===t?(e.consume(t),u):y(t)?(e.consume(t),l):r(t)}function u(e){return v(e)?c(e):r(e)}function c(r){return 46===r?(e.consume(r),n=0,u):62===r?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):f(r)}function f(t){if((45===t||v(t))&&n++<63){const r=45===t?f:c;return e.consume(t),r}return r(t)}}},{name:"htmlText",tokenize:function(e,t,r){const n=this;let i,o,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),w):m(t)?(e.consume(t),P):r(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),o=0,p):m(t)?(e.consume(t),b):r(t)}function u(t){return 45===t?(e.consume(t),h):r(t)}function c(t){return null===t?r(t):45===t?(e.consume(t),f):k(t)?(s=c,D(t)):(e.consume(t),c)}function f(t){return 45===t?(e.consume(t),h):c(t)}function h(e){return 62===e?B(e):45===e?f(e):c(e)}function p(t){const n="CDATA[";return t===n.charCodeAt(o++)?(e.consume(t),o===n.length?d:p):r(t)}function d(t){return null===t?r(t):93===t?(e.consume(t),g):k(t)?(s=d,D(t)):(e.consume(t),d)}function g(t){return 93===t?(e.consume(t),y):d(t)}function y(t){return 62===t?B(t):93===t?(e.consume(t),y):d(t)}function b(t){return null===t||62===t?B(t):k(t)?(s=b,D(t)):(e.consume(t),b)}function w(t){return null===t?r(t):63===t?(e.consume(t),E):k(t)?(s=w,D(t)):(e.consume(t),w)}function E(e){return 62===e?B(e):w(e)}function x(t){return m(t)?(e.consume(t),O):r(t)}function O(t){return 45===t||v(t)?(e.consume(t),O):R(t)}function R(t){return k(t)?(s=R,D(t)):A(t)?(e.consume(t),R):B(t)}function P(t){return 45===t||v(t)?(e.consume(t),P):47===t||62===t||S(t)?_(t):r(t)}function _(t){return 47===t?(e.consume(t),B):58===t||95===t||m(t)?(e.consume(t),C):k(t)?(s=_,D(t)):A(t)?(e.consume(t),_):B(t)}function C(t){return 45===t||46===t||58===t||95===t||v(t)?(e.consume(t),C):L(t)}function L(t){return 61===t?(e.consume(t),j):k(t)?(s=L,D(t)):A(t)?(e.consume(t),L):_(t)}function j(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,N):k(t)?(s=j,D(t)):A(t)?(e.consume(t),j):(e.consume(t),I)}function N(t){return t===i?(e.consume(t),i=void 0,U):null===t?r(t):k(t)?(s=N,D(t)):(e.consume(t),N)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||S(t)?_(t):(e.consume(t),I)}function U(e){return 47===e||62===e||S(e)?_(e):r(e)}function B(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function D(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),q}function q(t){return A(t)?T(e,M,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),s(t)}}}],91:{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:ye.resolveAll},92:[{name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return k(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}},me],93:ye,95:ke,96:{name:"codeText",tokenize:function(e,t,r){let n,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?r(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):k(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||k(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function u(r){return 96===r?(e.consume(r),n++,u):n===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",l(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}}},Ce={null:[ke,U]},Le={null:[42,95]},je={null:[]};function Ne(e){const t={defined:[],lazy:{},constructs:function(e){const t={};let r=-1;for(;++r<e.length;)p(t,e[r]);return t}([n,...(e||{}).extensions||[]]),content:r(P),document:r(_),flow:r(I),string:r(B),text:r(D)};return t;function r(e){return function(r){return z(t,e,r)}}}const Ie=/[\0\t\n\r]/g;function Ue(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?"\ufffd":String.fromCharCode(r)}const Be=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function De(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return Ue(r.slice(t?2:1),t?16:10)}return de(r)||e}function qe(e){return e&&"object"===typeof e?"position"in e||"type"in e?Ve(e.position):"start"in e||"end"in e?Ve(e):"line"in e||"column"in e?Me(e):"":""}function Me(e){return Fe(e&&e.line)+":"+Fe(e&&e.column)}function Ve(e){return Me(e&&e.start)+"-"+Me(e&&e.end)}function Fe(e){return e&&"number"===typeof e?e:1}const ze={}.hasOwnProperty;function He(e,t,r){return"string"!==typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ne),autolinkProtocol:R,autolinkEmail:R,atxHeading:a(J),blockQuote:a(G),characterEscape:R,characterReference:R,codeFenced:a(Y),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Y,l),codeText:a(Z,l),codeTextData:R,data:R,codeFlowValue:R,definition:a(Q),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(K),hardBreakEscape:a(ee),hardBreakTrailing:a(ee),htmlFlow:a(te,l),htmlFlowData:R,htmlText:a(te,l),htmlTextData:R,image:a(re),label:l,link:a(ne),listItem:a(oe),listItemValue:d,listOrdered:a(ie,p),listUnordered:a(ie),paragraph:a(se),reference:V,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(J),strong:a(ae),thematicBreak:a(ue)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:W,autolinkProtocol:$,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:H,codeFenced:c(y),codeFencedFence:v,codeFencedFenceInfo:g,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:c(b),codeText:c(j),codeTextData:T,data:T,definition:c(),definitionDestinationString:x,definitionLabelString:w,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(_),hardBreakTrailing:c(_),htmlFlow:c(C),htmlFlowData:T,htmlText:c(L),htmlTextData:T,image:c(I),label:B,labelText:U,lineEnding:P,link:c(N),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:F,resourceDestinationString:D,resourceTitleString:q,resource:M,setextHeading:c(O),setextHeadingLineSequence:A,setextHeadingText:S,strong:c(),thematicBreak:c()}};We(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let n={type:"root",children:[]};const o={stack:[n],tokenStack:[],config:t,enter:u,exit:f,buffer:l,resume:h,data:r},s=[];let a=-1;for(;++a<e.length;)if("listOrdered"===e[a][1].type||"listUnordered"===e[a][1].type)if("enter"===e[a][0])s.push(a);else{a=i(e,s.pop(),a)}for(a=-1;++a<e.length;){const r=t[e[a][0]];ze.call(r,e[a][1].type)&&r[e[a][1].type].call(Object.assign({sliceSerialize:e[a][2].sliceSerialize},o),e[a][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Ye).call(o,void 0,e[0])}for(n.position={start:$e(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$e(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},a=-1;++a<t.transforms.length;)n=t.transforms[a](n)||n;return n}function i(e,t,r){let n,i,o,s,a=t-1,l=-1,u=!1;for(;++a<=r;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!n||s||l||o||(o=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let s=a;for(i=void 0;s--;){const t=e[s];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=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",n,t[2]]),a++,r++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};n=i,e.splice(a,0,["enter",i,t[2]]),a++,r++,o=void 0,s=!0}}}return e[t][1]._spread=u,r}function a(e,t){return r;function r(r){u.call(this,e(r),r),t&&t.call(this,r)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(e,t,r){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:$e(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),f.call(this,t)}}function f(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+qe({start:e.start,end:e.end})+"): it\u2019s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||Ye).call(this,e,n[0])}r.position.end=$e(e.end)}function h(){return function(e,t){const r=t||o;return s(e,"boolean"!==typeof r.includeImageAlt||r.includeImageAlt,"boolean"!==typeof r.includeHtml||r.includeHtml)}(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function g(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function m(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function w(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=X(this.sliceSerialize(e)).toLowerCase()}function E(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function k(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function A(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function R(e){const t=this.stack[this.stack.length-1].children;let r=t[t.length-1];r&&"text"===r.type||(r=le(),r.position={start:$e(e.start),end:void 0},t.push(r)),this.stack.push(r)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$e(e.end)}function P(e){const r=this.stack[this.stack.length-1];if(this.data.atHardBreak){return r.children[r.children.length-1].position.end=$e(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(R.call(this,e),T.call(this,e))}function _(){this.data.atHardBreak=!0}function C(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function U(e){const t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=function(e){return e.replace(Be,De)}(t),r.identifier=X(t).toLowerCase()}function B(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===r.type){const t=e.children;r.children=t}else r.alt=t}function D(){const e=this.resume();this.stack[this.stack.length-1].url=e}function q(){const e=this.resume();this.stack[this.stack.length-1].title=e}function M(){this.data.inReference=void 0}function V(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=X(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),r=this.data.characterReferenceType;let n;if(r)n=Ue(t,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0;else{n=de(t)}const i=this.stack.pop();i.value+=n,i.position.end=$e(e.end)}function $(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function Q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth: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 oe(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function se(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}(r)(function(e){for(;!c(e););return e}(Ne(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,o,s){const a=[];let l,u,c,f,h;for(i=r+("string"===typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),c=0,r="",n&&(65279===i.charCodeAt(0)&&c++,n=void 0);c<i.length;){if(Ie.lastIndex=c,l=Ie.exec(i),f=l&&void 0!==l.index?l.index:i.length,h=i.charCodeAt(f),!l){r=i.slice(c);break}if(10===h&&c===f&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<f&&(a.push(i.slice(c,f)),t+=f-c),h){case 0:a.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),a.push(-2);t++<u;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=f+1}return s&&(e&&a.push(-5),r&&a.push(r),a.push(null)),a}}()(e,t,!0))))}function $e(e){return{line:e.line,column:e.column,offset:e.offset}}function We(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?We(e,n):Ge(e,n)}}function Ge(e,t){let r;for(r in t)if(ze.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function Ye(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qe({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qe({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qe({start:t.start,end:t.end})+") is still open")}var Ze=Object.defineProperty,Qe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,tt=(e,t,r)=>t in e?Ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function rt(e){return t=((e,t)=>{for(var r in t||(t={}))Xe.call(t,r)&&tt(e,r,t[r]);if(Je)for(var r of Je(t))et.call(t,r)&&tt(e,r,t[r]);return e})({},e),Qe(t,Ke({type:"text"}));var t}const nt={horizontalRule:({asset:e,mappers:t})=>t.horizontalRule?t.horizontalRule({originalAsset:e,value:"---"}):rt(e),text:({astNode:e,asset:t,mappers:r})=>{const{value:n}=e;return r.text({originalAsset:t,value:n})},emphasis:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.emphasis){const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.emphasis({originalAsset:t,value:o})}return rt(t)},strong:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.strong){const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.strong({originalAsset:t,value:o})}return rt(t)},blockquote:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.blockquote){const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.blockquote({originalAsset:t,value:o})}return rt(t)},list:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.list){const{children:i,ordered:o,start:s}=e,a=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.list({originalAsset:t,value:a,ordered:Boolean(o),start:s||void 0})}return rt(t)},listItem:({astNode:e,asset:t,mappers:r,transformers:n})=>{const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return(r.listItem||r.paragraph)({originalAsset:t,value:o})},link:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.link){const{children:i,url:o}=e,s=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.link({originalAsset:t,href:o,value:s})}return rt(t)},image:({astNode:e,asset:t,mappers:r})=>{if(r.image){const{title:n,url:i,alt:o}=e;return r.image({originalAsset:t,src:i,value:n||o||""})}return rt(t)},paragraph:({astNode:e,asset:t,mappers:r,transformers:n})=>{const{children:i}=e;if(i.every((({type:e})=>Boolean(r[e])))){const e=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.paragraph({originalAsset:t,value:e})}return rt(t)},code:({astNode:e,asset:t,mappers:r})=>{if(r.code){const{value:n,lang:i}=e;return r.code({originalAsset:t,value:n,lang:i||void 0})}return rt(t)},heading:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.heading){const{children:i,depth:o}=e,s=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.heading({originalAsset:t,value:s,depth:o})}return rt(t)},inlineCode:({astNode:e,asset:t,mappers:r})=>{if(r.inlineCode){const{value:n}=e;return r.inlineCode({originalAsset:t,value:n})}return rt(t)}};var it=Object.defineProperty,ot=Object.defineProperties,st=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ct=(e,t,r)=>t in e?it(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ft=(e,t)=>{for(var r in t||(t={}))lt.call(t,r)&&ct(e,r,t[r]);if(at)for(var r of at(t))ut.call(t,r)&&ct(e,r,t[r]);return e};class ht{constructor(e){this.name="MarkdownPlugin",this.mappers=e}apply(e){e.hooks.view.tap(this.name,(e=>{e.hooks.resolver.tap(this.name,(e=>{e.hooks.beforeResolve.tap(this.name,((e,t)=>{if((null==e?void 0:e.type)===i.NodeType.Asset&&"markdown"===e.value.type){const o=Object(i.resolveDataRefsInString)(e.value.value,{evaluate:t.evaluate,model:t.data.model}),s=function({asset:e,mappers:t,parser:r}){const{children:n}=He(e.value);if(n.length>1){const o=n.map((r=>(0,nt[r.type])({astNode:r,asset:e,mappers:t,transformers:nt}))),s=t.collection({originalAsset:e,value:o});return(null==r?void 0:r(s,i.NodeType.Asset))||null}const o=(0,nt[n[0].type])({astNode:n[0],asset:e,mappers:t,transformers:nt});return(null==r?void 0:r(o,i.NodeType.Asset))||null}({asset:(r=ft({},e.value),n={value:o},ot(r,st(n))),mappers:this.mappers,parser:t.parseNode});return s}var r,n;return e}))}))}))}}}])}));
2
+ !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.MarkdownPlugin=t():e.MarkdownPlugin=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=27)}([function(e,t,r){"use strict";function n(e,t,r){return e.context?e.callback(r,...t):e.callback(...t)}r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return l}));class i{constructor(){this.interceptions=[],this.interceptionKeySet=new Set}isUsed(){return this.interceptions.length>0}intercept(e){this.interceptions.push(e),Object.keys(e).forEach((e=>{this.interceptionKeySet.add(e)}))}tap(e){this.interceptionKeySet.has("tap")&&this.interceptions.forEach((t=>{var r;null==(r=t.tap)||r.call(t,e)}))}call(e,...t){this.interceptionKeySet.has("call")&&this.interceptions.forEach((r=>{var n,i;r.context?null==(n=r.call)||n.call(r,e,...t):null==(i=r.call)||i.call(r,...t)}))}loop(...e){this.interceptionKeySet.has("loop")&&this.interceptions.forEach((t=>{var r;null==(r=t.loop)||r.call(t,...e)}))}error(e){if(this.interceptionKeySet.has("error")&&e instanceof Error){const t=e;this.interceptions.forEach((e=>{var r;null==(r=e.error)||r.call(e,t)}))}}result(e){this.interceptionKeySet.has("result")&&this.interceptions.forEach((t=>{var r;null==(r=t.result)||r.call(t,e)}))}done(){this.interceptionKeySet.has("done")&&this.interceptions.forEach((e=>{var t;null==(t=e.done)||t.call(e)}))}}class o{constructor(){this.taps=[],this.interceptions=new i}tap(e,t){const r="string"===typeof e?{name:e,context:!1}:{context:!1,...e},n={key:Symbol(r.name),...r,callback:t};if(n.before){let e=this.taps.length;const t=new Set(Array.isArray(n.before)?n.before:[n.before]);for(;e>0&&t.size>0;e--){const r=this.taps[e-1];if(t.has(r.name)&&t.delete(r.name),r.before&&(i=n.name,o=r.before,Array.isArray(o)?o.includes(i):o===i))break}this.taps.splice(e,0,n)}else this.taps.push(n);var i,o;return this.interceptions.tap(n),n}untap(e){this.taps=this.taps.filter((t=>t.key!==e.key))}isUsed(){return this.taps.length>0||this.interceptions.isUsed()}intercept(e){this.interceptions.intercept(e)}}class s extends o{call(...e){if(!this.isUsed())return;const t={};this.interceptions.call(t,...e);try{this.taps.forEach((r=>{n(r,e,t)}))}catch(r){throw this.interceptions.error(r),r}this.interceptions.done()}}class a extends o{call(...e){if(!this.isUsed())return;const t={};this.interceptions.call(t,...e);for(let r=0;r<this.taps.length;r+=1){const i=n(this.taps[r],e,t);if(void 0!==i)return this.interceptions.result(i),i}this.interceptions.done()}}class l extends o{call(...e){const t={};this.interceptions.call(t,...e);let[r,...i]=e;for(let o=0;o<this.taps.length;o+=1){const e=n(this.taps[o],[r,...i],t);void 0!==e&&(r=e)}return this.interceptions.result(r),r}}},function(e,t,r){(function(t){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,r,n){"use strict";function i(e){if(!(this instanceof i))return new i(e);this._=e}var o=i.prototype;function s(e,t){for(var r=0;r<e;r++)t(r)}function a(e,t,r){return function(e,t){s(t.length,(function(r){e(t[r],r,t)}))}((function(r,n,i){t=e(t,r,n,i)}),r),t}function l(e,t){return a((function(t,r,n,i){return t.concat([e(r,n,i)])}),[],t)}function u(e,r){var n={v:0,buf:r};return s(e,(function(){var e;n={v:n.v<<1|(e=n.buf,e[0]>>7),buf:function(e){var r=a((function(e,r,n,i){return e.concat(n===i.length-1?t.from([r,0]).readUInt16BE(0):i.readUInt16BE(n))}),[],e);return t.from(l((function(e){return(e<<1&65535)>>8}),r))}(n.buf)}})),n}function c(){return"undefined"!=typeof t}function f(){if(!c())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function h(e){f();var t=a((function(e,t){return e+t}),0,e);if(t%8!=0)throw new Error("The bits ["+e.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var r,n=t/8,o=(r=function(e){return e>48},a((function(e,t){return e||(r(t)?t:e)}),null,e));if(o)throw new Error(o+" bit range requested exceeds 48 bit (6 byte) Number max.");return new i((function(t,r){var i=n+r;return i>t.length?k(r,n.toString()+" bytes"):x(i,a((function(e,t){var r=u(t,e.buf);return{coll:e.coll.concat(r.v),buf:r.buf}}),{coll:[],buf:t.slice(r,i)},e).coll)}))}function p(e,t){return new i((function(r,n){return f(),n+t>r.length?k(n,t+" bytes for "+e):x(n+t,r.slice(n,n+t))}))}function d(e,t){if("number"!=typeof(r=t)||Math.floor(r)!==r||t<0||t>6)throw new Error(e+" requires integer length in range [0, 6].");var r}function g(e){return d("uintBE",e),p("uintBE("+e+")",e).map((function(t){return t.readUIntBE(0,e)}))}function m(e){return d("uintLE",e),p("uintLE("+e+")",e).map((function(t){return t.readUIntLE(0,e)}))}function v(e){return d("intBE",e),p("intBE("+e+")",e).map((function(t){return t.readIntBE(0,e)}))}function y(e){return d("intLE",e),p("intLE("+e+")",e).map((function(t){return t.readIntLE(0,e)}))}function b(e){return e instanceof i}function w(e){return"[object Array]"==={}.toString.call(e)}function E(e){return c()&&t.isBuffer(e)}function x(e,t){return{status:!0,index:e,value:t,furthest:-1,expected:[]}}function k(e,t){return w(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:e,expected:t}}function S(e,t){if(!t)return e;if(e.furthest>t.furthest)return e;var r=e.furthest===t.furthest?function(e,t){if(function(){if(void 0!==i._supportsSet)return i._supportsSet;var e="undefined"!=typeof Set;return i._supportsSet=e,e}()&&Array.from){for(var r=new Set(e),n=0;n<t.length;n++)r.add(t[n]);var o=Array.from(r);return o.sort(),o}for(var s={},a=0;a<e.length;a++)s[e[a]]=!0;for(var l=0;l<t.length;l++)s[t[l]]=!0;var u=[];for(var c in s)({}).hasOwnProperty.call(s,c)&&u.push(c);return u.sort(),u}(e.expected,t.expected):t.expected;return{status:e.status,index:e.index,value:e.value,furthest:t.furthest,expected:r}}var A={};function O(e,t){if(E(e))return{offset:t,line:-1,column:-1};e in A||(A[e]={});for(var r=A[e],n=0,i=0,o=0,s=t;s>=0;){if(s in r){n=r[s].line,0===o&&(o=r[s].lineStart);break}("\n"===e.charAt(s)||"\r"===e.charAt(s)&&"\n"!==e.charAt(s+1))&&(i++,0===o&&(o=s+1)),s--}var a=n+i,l=t-o;return r[t]={line:a,lineStart:o},{offset:t,line:a+1,column:l+1}}function R(e){if(!b(e))throw new Error("not a parser: "+e)}function T(e,t){return"string"==typeof e?e.charAt(t):e[t]}function P(e){if("number"!=typeof e)throw new Error("not a number: "+e)}function _(e){if("function"!=typeof e)throw new Error("not a function: "+e)}function C(e){if("string"!=typeof e)throw new Error("not a string: "+e)}var L=2,j=3,N=8,I=5*N,U=4*N,B=" ";function D(e,t){return new Array(t+1).join(e)}function q(e,t,r){var n=t-e.length;return n<=0?e:D(r,n)+e}function M(e,t,r,n){return{from:e-t>0?e-t:0,to:e+r>n?n:e+r}}function V(e,t){var r,n,i,o,s,u=t.index,c=u.offset,f=1;if(c===e.length)return"Got the end of the input";if(E(e)){var h=c-c%N,p=c-h,d=M(h,I,U+N,e.length),g=l((function(e){return l((function(e){return q(e.toString(16),2,"0")}),e)}),function(e,t){var r=e.length,n=[],i=0;if(r<=t)return[e.slice()];for(var o=0;o<r;o++)n[i]||n.push([]),n[i].push(e[o]),(o+1)%t==0&&i++;return n}(e.slice(d.from,d.to).toJSON().data,N));o=function(e){return 0===e.from&&1===e.to?{from:e.from,to:e.to}:{from:e.from/N,to:Math.floor(e.to/N)}}(d),n=h/N,r=3*p,p>=4&&(r+=1),f=2,i=l((function(e){return e.length<=4?e.join(" "):e.slice(0,4).join(" ")+" "+e.slice(4).join(" ")}),g),(s=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(s=2)}else{var m=e.split(/\r\n|[\n\r\u2028\u2029]/);r=u.column-1,n=u.line-1,o=M(n,L,j,m.length),i=m.slice(o.from,o.to),s=o.to.toString().length}var v=n-o.from;return E(e)&&(s=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(s=2),a((function(t,n,i){var a,l=i===v,u=l?"> ":B;return a=E(e)?q((8*(o.from+i)).toString(16),s,"0"):q((o.from+i+1).toString(),s," "),[].concat(t,[u+a+" | "+n],l?[B+D(" ",s)+" | "+q("",r," ")+D("^",f)]:[])}),[],i).join("\n")}function F(e,t){return["\n","-- PARSING FAILED "+D("-",50),"\n\n",V(e,t),"\n\n",(r=t.expected,1===r.length?"Expected:\n\n"+r[0]:"Expected one of the following: \n\n"+r.join(", ")),"\n"].join("");var r}function z(e){return void 0!==e.flags?e.flags:[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.unicode?"u":"",e.sticky?"y":""].join("")}function H(){for(var e=[].slice.call(arguments),t=e.length,r=0;r<t;r+=1)R(e[r]);return i((function(r,n){for(var i,o=new Array(t),s=0;s<t;s+=1){if(!(i=S(e[s]._(r,n),i)).status)return i;o[s]=i.value,n=i.index}return S(x(n,o),i)}))}function $(){var e=[].slice.call(arguments);if(0===e.length)throw new Error("seqMap needs at least one argument");var t=e.pop();return _(t),H.apply(null,e).map((function(e){return t.apply(null,e)}))}function W(){var e=[].slice.call(arguments),t=e.length;if(0===t)return J("zero alternates");for(var r=0;r<t;r+=1)R(e[r]);return i((function(t,r){for(var n,i=0;i<e.length;i+=1)if((n=S(e[i]._(t,r),n)).status)return n;return n}))}function G(e,t){return Y(e,t).or(K([]))}function Y(e,t){return R(e),R(t),$(e,t.then(e).many(),(function(e,t){return[e].concat(t)}))}function Z(e){C(e);var t="'"+e+"'";return i((function(r,n){var i=n+e.length,o=r.slice(n,i);return o===e?x(i,o):k(n,t)}))}function Q(e,t){!function(e){if(!(e instanceof RegExp))throw new Error("not a regexp: "+e);for(var t=z(e),r=0;r<t.length;r++){var n=t.charAt(r);if("i"!==n&&"m"!==n&&"u"!==n&&"s"!==n)throw new Error('unsupported regexp flag "'+n+'": '+e)}}(e),arguments.length>=2?P(t):t=0;var r=function(e){return RegExp("^(?:"+e.source+")",z(e))}(e),n=""+e;return i((function(e,i){var o=r.exec(e.slice(i));if(o){if(0<=t&&t<=o.length){var s=o[0],a=o[t];return x(i+s.length,a)}return k(i,"valid match group (0 to "+o.length+") in "+n)}return k(i,n)}))}function K(e){return i((function(t,r){return x(r,e)}))}function J(e){return i((function(t,r){return k(r,e)}))}function X(e){if(b(e))return i((function(t,r){var n=e._(t,r);return n.index=r,n.value="",n}));if("string"==typeof e)return X(Z(e));if(e instanceof RegExp)return X(Q(e));throw new Error("not a string, regexp, or parser: "+e)}function ee(e){return R(e),i((function(t,r){var n=e._(t,r),i=t.slice(r,n.index);return n.status?k(r,'not "'+i+'"'):x(r,null)}))}function te(e){return _(e),i((function(t,r){var n=T(t,r);return r<t.length&&e(n)?x(r+1,n):k(r,"a character/byte matching "+e)}))}function re(e,t){arguments.length<2&&(t=e,e=void 0);var r=i((function(e,n){return r._=t()._,r._(e,n)}));return e?r.desc(e):r}function ne(){return J("fantasy-land/empty")}o.parse=function(e){if("string"!=typeof e&&!E(e))throw new Error(".parse must be called with a string or Buffer as its argument");var t,r=this.skip(ae)._(e,0);return t=r.status?{status:!0,value:r.value}:{status:!1,index:O(e,r.furthest),expected:r.expected},delete A[e],t},o.tryParse=function(e){var t=this.parse(e);if(t.status)return t.value;var r=F(e,t),n=new Error(r);throw n.type="ParsimmonError",n.result=t,n},o.assert=function(e,t){return this.chain((function(r){return e(r)?K(r):J(t)}))},o.or=function(e){return W(this,e)},o.trim=function(e){return this.wrap(e,e)},o.wrap=function(e,t){return $(e,this,t,(function(e,t){return t}))},o.thru=function(e){return e(this)},o.then=function(e){return R(e),H(this,e).map((function(e){return e[1]}))},o.many=function(){var e=this;return i((function(t,r){for(var n=[],i=void 0;;){if(!(i=S(e._(t,r),i)).status)return S(x(r,n),i);if(r===i.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");r=i.index,n.push(i.value)}}))},o.tieWith=function(e){return C(e),this.map((function(t){if(function(e){if(!w(e))throw new Error("not an array: "+e)}(t),t.length){C(t[0]);for(var r=t[0],n=1;n<t.length;n++)C(t[n]),r+=e+t[n];return r}return""}))},o.tie=function(){return this.tieWith("")},o.times=function(e,t){var r=this;return arguments.length<2&&(t=e),P(e),P(t),i((function(n,i){for(var o=[],s=void 0,a=void 0,l=0;l<e;l+=1){if(a=S(s=r._(n,i),a),!s.status)return a;i=s.index,o.push(s.value)}for(;l<t&&(a=S(s=r._(n,i),a),s.status);l+=1)i=s.index,o.push(s.value);return S(x(i,o),a)}))},o.result=function(e){return this.map((function(){return e}))},o.atMost=function(e){return this.times(0,e)},o.atLeast=function(e){return $(this.times(e),this.many(),(function(e,t){return e.concat(t)}))},o.map=function(e){_(e);var t=this;return i((function(r,n){var i=t._(r,n);return i.status?S(x(i.index,e(i.value)),i):i}))},o.contramap=function(e){_(e);var t=this;return i((function(r,n){var i=t.parse(e(r.slice(n)));return i.status?x(n+r.length,i.value):i}))},o.promap=function(e,t){return _(e),_(t),this.contramap(e).map(t)},o.skip=function(e){return H(this,e).map((function(e){return e[0]}))},o.mark=function(){return $(ie,this,ie,(function(e,t,r){return{start:e,value:t,end:r}}))},o.node=function(e){return $(ie,this,ie,(function(t,r,n){return{name:e,value:r,start:t,end:n}}))},o.sepBy=function(e){return G(this,e)},o.sepBy1=function(e){return Y(this,e)},o.lookahead=function(e){return this.skip(X(e))},o.notFollowedBy=function(e){return this.skip(ee(e))},o.desc=function(e){w(e)||(e=[e]);var t=this;return i((function(r,n){var i=t._(r,n);return i.status||(i.expected=e),i}))},o.fallback=function(e){return this.or(K(e))},o.ap=function(e){return $(e,this,(function(e,t){return e(t)}))},o.chain=function(e){var t=this;return i((function(r,n){var i=t._(r,n);return i.status?S(e(i.value)._(r,i.index),i):i}))},o.concat=o.or,o.empty=ne,o.of=K,o["fantasy-land/ap"]=o.ap,o["fantasy-land/chain"]=o.chain,o["fantasy-land/concat"]=o.concat,o["fantasy-land/empty"]=o.empty,o["fantasy-land/of"]=o.of,o["fantasy-land/map"]=o.map;var ie=i((function(e,t){return x(t,O(e,t))})),oe=i((function(e,t){return t>=e.length?k(t,"any character/byte"):x(t+1,T(e,t))})),se=i((function(e,t){return x(e.length,e.slice(t))})),ae=i((function(e,t){return t<e.length?k(t,"EOF"):x(t,null)})),le=Q(/[0-9]/).desc("a digit"),ue=Q(/[0-9]*/).desc("optional digits"),ce=Q(/[a-z]/i).desc("a letter"),fe=Q(/[a-z]*/i).desc("optional letters"),he=Q(/\s*/).desc("optional whitespace"),pe=Q(/\s+/).desc("whitespace"),de=Z("\r"),ge=Z("\n"),me=Z("\r\n"),ve=W(me,ge,de).desc("newline"),ye=W(ve,ae);i.all=se,i.alt=W,i.any=oe,i.cr=de,i.createLanguage=function(e){var t={};for(var r in e)({}).hasOwnProperty.call(e,r)&&function(r){t[r]=re((function(){return e[r](t)}))}(r);return t},i.crlf=me,i.custom=function(e){return i(e(x,k))},i.digit=le,i.digits=ue,i.empty=ne,i.end=ye,i.eof=ae,i.fail=J,i.formatError=F,i.index=ie,i.isParser=b,i.lazy=re,i.letter=ce,i.letters=fe,i.lf=ge,i.lookahead=X,i.makeFailure=k,i.makeSuccess=x,i.newline=ve,i.noneOf=function(e){return te((function(t){return e.indexOf(t)<0})).desc("none of '"+e+"'")},i.notFollowedBy=ee,i.of=K,i.oneOf=function(e){for(var t=e.split(""),r=0;r<t.length;r++)t[r]="'"+t[r]+"'";return te((function(t){return e.indexOf(t)>=0})).desc(t)},i.optWhitespace=he,i.Parser=i,i.range=function(e,t){return te((function(r){return e<=r&&r<=t})).desc(e+"-"+t)},i.regex=Q,i.regexp=Q,i.sepBy=G,i.sepBy1=Y,i.seq=H,i.seqMap=$,i.seqObj=function(){for(var e,t={},r=0,n=(e=arguments,Array.prototype.slice.call(e)),o=n.length,s=0;s<o;s+=1){var a=n[s];if(!b(a)){if(w(a)&&2===a.length&&"string"==typeof a[0]&&b(a[1])){var l=a[0];if(Object.prototype.hasOwnProperty.call(t,l))throw new Error("seqObj: duplicate key "+l);t[l]=!0,r++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(0===r)throw new Error("seqObj expects at least one named parser, found zero");return i((function(e,t){for(var r,i={},s=0;s<o;s+=1){var a,l;if(w(n[s])?(a=n[s][0],l=n[s][1]):(a=null,l=n[s]),!(r=S(l._(e,t),r)).status)return r;a&&(i[a]=r.value),t=r.index}return S(x(t,i),r)}))},i.string=Z,i.succeed=K,i.takeWhile=function(e){return _(e),i((function(t,r){for(var n=r;n<t.length&&e(T(t,n));)n++;return x(n,t.slice(r,n))}))},i.test=te,i.whitespace=pe,i["fantasy-land/empty"]=ne,i["fantasy-land/of"]=K,i.Binary={bitSeq:h,bitSeqObj:function(e){f();var t={},r=0,n=l((function(e){if(w(e)){var n=e;if(2!==n.length)throw new Error("["+n.join(", ")+"] should be length 2, got length "+n.length);if(C(n[0]),P(n[1]),Object.prototype.hasOwnProperty.call(t,n[0]))throw new Error("duplicate key in bitSeqObj: "+n[0]);return t[n[0]]=!0,r++,n}return P(e),[null,e]}),e);if(r<1)throw new Error("bitSeqObj expects at least one named pair, got ["+e.join(", ")+"]");var i=l((function(e){return e[0]}),n);return h(l((function(e){return e[1]}),n)).map((function(e){return a((function(e,t){return null!==t[0]&&(e[t[0]]=t[1]),e}),{},l((function(t,r){return[t,e[r]]}),i))}))},byte:function(e){if(f(),P(e),e>255)throw new Error("Value specified to byte constructor ("+e+"=0x"+e.toString(16)+") is larger in value than a single byte.");var t=(e>15?"0x":"0x0")+e.toString(16);return i((function(r,n){var i=T(r,n);return i===e?x(n+1,i):k(n,t)}))},buffer:function(e){return p("buffer",e).map((function(e){return t.from(e)}))},encodedString:function(e,t){return p("string",t).map((function(t){return t.toString(e)}))},uintBE:g,uint8BE:g(1),uint16BE:g(2),uint32BE:g(4),uintLE:m,uint8LE:m(1),uint16LE:m(2),uint32LE:m(4),intBE:v,int8BE:v(1),int16BE:v(2),int32BE:v(4),intLE:y,int8LE:y(1),int16LE:y(2),int32LE:y(4),floatBE:p("floatBE",4).map((function(e){return e.readFloatBE(0)})),floatLE:p("floatLE",4).map((function(e){return e.readFloatLE(0)})),doubleBE:p("doubleBE",8).map((function(e){return e.readDoubleBE(0)})),doubleLE:p("doubleLE",8).map((function(e){return e.readDoubleLE(0)}))},e.exports=i}])}).call(this,r(18).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=a,t.addLast=u,t.addFirst=c,t.removeLast=f,t.removeFirst=h,t.insert=p,t.removeAt=d,t.replaceAt=g,t.getIn=m,t.set=v,t.setIn=y,t.update=w,t.updateIn=E,t.merge=x,t.mergeDeep=k,t.mergeIn=S,t.omit=A,t.addDefaults=O,t.default=void 0;const n="INVALID_ARGS";function i(e){throw new Error(e)}function o(e){const t=Object.keys(e);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t}const s={}.hasOwnProperty;function a(e){if(Array.isArray(e))return e.slice();const t=e,r=o(t),n={};for(let i=0;i<r.length;i++){const e=r[i];n[e]=t[e]}return n}function l(e){return null!=e&&"object"===typeof e}function u(e,t){return Array.isArray(t)?e.concat(t):e.concat([t])}function c(e,t){return Array.isArray(t)?t.concat(e):[t].concat(e)}function f(e){return e.length?e.slice(0,e.length-1):e}function h(e){return e.length?e.slice(1):e}function p(e,t,r){return e.slice(0,t).concat(Array.isArray(r)?r:[r]).concat(e.slice(t))}function d(e,t){return t>=e.length||t<0?e:e.slice(0,t).concat(e.slice(t+1))}function g(e,t,r){if(e[t]===r)return e;const n=e.length,i=Array(n);for(let o=0;o<n;o++)i[o]=e[o];return i[t]=r,i}function m(e,t){if(Array.isArray(t)||i(n),null==e)return;let r=e;for(let n=0;n<t.length;n++){const e=t[n];if(r=null!=r?r[e]:void 0,void 0===r)return r}return r}function v(e,t,r){let n=e;if(null==n&&(n="number"===typeof t?[]:{}),n[t]===r)return n;const i=a(n);return i[t]=r,i}function y(e,t,r){return t.length?b(e,t,r,0):r}function b(e,t,r,n){let i;const o=t[n];if(n===t.length-1)i=r;else{i=b(l(e)&&l(e[o])?e[o]:"number"===typeof t[n+1]?[]:{},t,r,n+1)}return v(e,o,i)}function w(e,t,r){return v(e,t,r(null==e?void 0:e[t]))}function E(e,t,r){return y(e,t,r(m(e,t)))}function x(e,t,r,n,i,o,...s){return s.length?R.call(null,!1,!1,e,t,r,n,i,o,...s):R(!1,!1,e,t,r,n,i,o)}function k(e,t,r,n,i,o,...s){return s.length?R.call(null,!1,!0,e,t,r,n,i,o,...s):R(!1,!0,e,t,r,n,i,o)}function S(e,t,r,n,i,o,s,...a){let l,u=m(e,t);return null==u&&(u={}),l=a.length?R.call(null,!1,!1,u,r,n,i,o,s,...a):R(!1,!1,u,r,n,i,o,s),y(e,t,l)}function A(e,t){const r=Array.isArray(t)?t:[t];let n=!1;for(let o=0;o<r.length;o++)if(s.call(e,r[o])){n=!0;break}if(!n)return e;const i={},a=o(e);for(let o=0;o<a.length;o++){const t=a[o];r.indexOf(t)>=0||(i[t]=e[t])}return i}function O(e,t,r,n,i,o,...s){return s.length?R.call(null,!0,!1,e,t,r,n,i,o,...s):R(!0,!1,e,t,r,n,i,o)}function R(e,t,r,...s){let u=r;null==u&&i(n);let c=!1;for(let n=0;n<s.length;n++){const r=s[n];if(null==r)continue;const i=o(r);if(i.length)for(let n=0;n<=i.length;n++){const o=i[n];if(e&&void 0!==u[o])continue;let s=r[o];t&&l(u[o])&&l(s)&&(s=R(e,t,u[o],s)),void 0!==s&&s!==u[o]&&(c||(c=!0,u=a(u)),u[o]=s)}}return u}var T={clone:a,addLast:u,addFirst:c,removeLast:f,removeFirst:h,insert:p,removeAt:d,replaceAt:g,getIn:m,set:v,setIn:y,update:w,updateIn:E,merge:x,mergeDeep:k,mergeIn:S,omit:A,addDefaults:O};t.default=T},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toError=t.NestedError=void 0;class n extends Error{constructor(e,...t){super(e);const r=n.getErrorReport(this);if(1===t.length){const e=i(t[0]);this.innerErrors=[e];const o=n.getErrorReport(e);return void(this.stack=`${r}\n\n======= INNER ERROR =======\n\n${o}`)}this.innerErrors=t.map((e=>i(e)));const o=this.innerErrors.map(((e,r)=>{const i=n.getErrorReport(e);return`======= INNER ERROR (${r+1} of ${t.length}) =======\n\n${i}`})).join("\n\n");this.stack=`${r}\n\n${o}`}get innerError(){return 0===this.innerErrors.length?null:this.innerErrors[0]}static rethrow(e){return(...t)=>{throw new this(e,...t)}}}function i(e){try{return e instanceof Error?e:new Error(`Value that is not an instance of Error was thrown: ${e}`)}catch{return new Error("Failed to stringify non-instance of Error that was thrown.This is possibly due to the fact that toString() method of the valuedoesn't return a primitive value.")}}t.NestedError=n,n.getErrorReport="string"===typeof(new Error).stack?e=>e.stack:e=>`${e.name}: ${e.message}`,n.prototype.name="NestedError",t.toError=i},function(e,t,r){e.exports=function(e,t,r,n,i){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:i;return e===i?r:e}},function(e,t,r){"use strict";r.d(t,"NodeType",(function(){return mt})),r.d(t,"resolveDataRefsInString",(function(){return ht}));var n=r(0),i=r(3),o=r(9),s=r.n(o),a=r(1),l=r.n(a),u=r(12),c=r(4),f=r.n(c),h=r(2),p=r(7),d=r(10),g=r.n(d),m=r(13),v=r.n(m),y=r(14);const b=e=>({name:"Value",value:e}),w=e=>({name:"Expression",value:e}),E=e=>({name:"PathNode",path:e}),x=(e,t)=>({name:"Query",key:e,value:t}),k=e=>1===e.length?e[0]:{name:"Concatenated",value:e},S=l.a.string('"'),A=l.a.string("'"),O=l.a.string("`"),R=l.a.regex(/[\w\-@]+/).desc("identifier").map(b);let T;const P=l.a.lazy((()=>T)).trim(l.a.optWhitespace).wrap(l.a.string("{{"),l.a.string("}}")).map(E),_=l.a.regex(/[^`]*/).wrap(O,O).map(w),C=l.a.alt(R,P,_).atLeast(1).map(s.a).map(k),L=l.a.alt(l.a.regex(/[^"]*/).wrap(S,S).map(b),l.a.regex(/[^']*/).wrap(A,A).map(b),C),j=l.a.seq(L,l.a.string("=").times(1,3).trim(l.a.optWhitespace),L).map((([e,,t])=>x(e,t))),N=l.a.alt(j,L).trim(l.a.optWhitespace).wrap(l.a.string("["),l.a.string("]")).many(),I=l.a.seqMap(C,N,((e,t)=>[e,...t]));T=l.a.sepBy(I,l.a.string(".")).map(s.a),new u.Grammars.W3C.Parser('\nvalue ::= segment_and_bracket (SEGMENT_SEPARATOR segment_and_bracket)*\nsegment ::= concatenated | expression | modelRef | identifier \nconcatenated ::= (expression | modelRef | identifier)+ \nmodelRef ::= OPEN_CURL OPEN_CURL value CLOSE_CURL CLOSE_CURL \nidentifier ::= [\\w\\-@]+\nquery ::= WHITESPACE* optionally_quoted_segment WHITESPACE* EQUALS EQUALS? EQUALS? WHITESPACE* optionally_quoted_segment WHITESPACE*\nbrackets ::= OPEN_BRACKET WHITESPACE* (query | optionally_quoted_segment) WHITESPACE* CLOSE_BRACKET \nsegment_and_bracket ::= segment brackets*\nquoted_value ::= [^"\']*\noptionally_quoted_segment ::= WHITESPACE* SINGLE_QUOTE quoted_value SINGLE_QUOTE WHITESPACE* | WHITESPACE* DOUBLE_QUOTE quoted_value DOUBLE_QUOTE WHITESPACE* | WHITESPACE* segment WHITESPACE*\nexpression_value ::= [^`]*\nexpression ::= BACK_TICK expression_value BACK_TICK\n\nEQUALS ::= "="\nSEGMENT_SEPARATOR ::= "."\nSINGLE_QUOTE ::= "\'"\nDOUBLE_QUOTE ::= \'"\'\nWHITESPACE ::= " "\nOPEN_CURL ::= "{"\nCLOSE_CURL ::= "}" \nOPEN_BRACKET ::= "[" \nCLOSE_BRACKET ::= "]"\nBACK_TICK ::= "`" \n');const U="'",B="`",D=e=>{if(!e)return!1;const t=e.charCodeAt(0);return!(32===t||34===t||39===t||40===t||41===t||42===t||46===t||61===t||91===t||93===t||96===t||123===t||125===t)},q=e=>{let t=1,r=e.charAt(0);const n=n=>{if(n&&r!==n)throw new Error(`Expected char: ${n} but got: ${r}`);return r=e.charAt(t),t+=1,r},i=()=>{for(;" "===r;)n()},o=()=>{var e,t;return null!=(t=null!=(e=(()=>{if("{"===r){n("{"),n("{");const e=u();return n("}"),n("}"),e}})())?e:(()=>{if(r===B){n(B);let e=r;for(;n()&&r!==B;)e+=r;if(n(B),e)return w(e)}})())?t:(()=>{if(!D(r))return;let e=r;for(;n()&&D(r);)e+=r;return e?b(e):void 0})()},s=()=>{if(i(),r===U||'"'===r){const e=r===U;n(e?U:'"');const t=(e=>{if(!(null==r?void 0:r.match(e)))return;let t=r;for(;n()&&(null==r?void 0:r.match(e));)t+=r;return t?b(t):void 0})(/[^'"]+/);return n(e?U:'"'),t}return o()},a=()=>{if("["===r){n("["),i();let e=s();if(!e)throw new Error("Expected identifier");if(i(),(()=>{if("="!==r)return!1;for(;"="===r;)n();return!0})()){i();const t=s();e=x(e,t),i()}return e&&n("]"),e}},l=()=>{const e=[],t=(()=>{const e=[];let t=o();for(;void 0!==t;)e.push(t),t=o();if(0!==e.length)return k(e)})();if(t){e.push(t);let r=a();for(;void 0!==r;)e.push(r),r=a()}return e},u=()=>{const e=[];let t=l();for(;void 0!==t&&(e.push(...t),r&&"}"!==r);){if(0===t.length&&r)throw new Error(`Unexpected character: ${r}`);n("."),t=l()}return E(e)};try{return{status:!0,path:u()}}catch(c){return{status:!1,error:c.message}}};function M(e){return!("string"===typeof e||Array.isArray(e))}class V{constructor(e,t=(e=>new V(e))){const r=Array.isArray(e)?e:e.split(".");this.split=r.map((e=>{if("number"===typeof e)return e;const t=Number(e);return isNaN(t)?e:t})),Object.freeze(this.split),this.joined=this.split.join("."),this.factory=t}asArray(){return this.split}asString(){return this.joined}contains(e){const t=e.asArray();if(t.length<this.split.length)return!1;for(let r=0;r<this.split.length;r++)if(this.split[r]!==t[r])return!1;return!0}relative(e){return this.asArray().slice(e.asArray().length)}parent(){return this.factory(this.split.slice(0,-1))}key(){return this.split[this.split.length-1]}descendent(e){const t=(r=e,Array.isArray(r)?r:"string"===typeof r?r.split("."):r.asArray());var r;return this.factory(this.split.concat(t))}}var F=Object.defineProperty,z=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,W=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G=(e,t)=>{for(var r in t||(t={}))H.call(t,r)&&W(e,r,t[r]);if(z)for(var r of z(t))$.call(t,r)&&W(e,r,t[r]);return e};function Y(e,t,r){var n;const o={updates:{},path:[]};function s(e){if("Value"===e.name)return e.value;if("PathNode"===e.name){const n=Y(e,t);n.updates&&(o.updates=G(G({},o.updates),n.updates));try{return t.convertToPath(t.getValue(n.path))}catch(r){throw new i.NestedError(`Unable to resolve path segment: ${n.path}`,r)}}if("Expression"===e.name)try{const r=t.evaluate(e.value);return t.convertToPath(r)}catch(r){throw new i.NestedError(`Unable to resolve path: ${e.value}`,r)}throw new Error(`Unable to resolve value for node: ${e.name}`)}function a(e){"string"===typeof e&&e.indexOf(".")>-1?e.split(".").forEach((e=>{o.path.push(function(e){const t=parseInt(e,10);return isNaN(t)?e:t}(e))})):o.path.push(e)}return e.path.forEach((function(e){var n,i;const l=null!=(n=null==r?void 0:r.beforeResolveNode.call(e,G(G({},o),t)))?n:e;switch(l.name){case"Expression":case"PathNode":a(s(l));break;case"Value":a(l.value);break;case"Query":{const e=null!=(i=t.getValue(o.path))?i:[],{key:r,value:n}=l,a=s(r),u=n&&s(n),c=function(e,t,r){return e.findIndex((e=>!(!e||"object"!==typeof e)&&e[t]==r))}(e,a,u);void 0===c||-1===c?(o.updates[[...o.path,e.length,a].join(".")]=u,o.path.push(e.length)):o.path.push(c);break}case"Concatenated":o.path.push(l.value.map(s).join(""));break;default:throw new Error(`Unsupported node type: ${l.name}`)}})),{path:o.path,updates:Object.keys(null!=(n=o.updates)?n:{}).length>0?o.updates:void 0}}var Z=Object.defineProperty,Q=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,X=(e,t,r)=>t in e?Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ee=(e,t)=>{for(var r in t||(t={}))K.call(t,r)&&X(e,r,t[r]);if(Q)for(var r of Q(t))J.call(t,r)&&X(e,r,t[r]);return e};const te=/[\s()*=`{}'"[\]]/,re=/^[^.]+(\..+)*$/,ne={get:()=>{throw new Error("Not Implemented")},set:()=>{throw new Error("Not Implemented")},evaluate:()=>{throw new Error("Not Implemented")}};class ie{constructor(e){this.hooks={skipOptimization:new n.a,beforeResolveNode:new n.c},this.parserOptions=ee(ee({},ne),e),this.cache={},this.parseCache={},this.parse=this.parse.bind(this)}normalizePath(e,t){var r,n;if(!te.test(e)&&re.test(e)&&!0!==this.hooks.skipOptimization.call(e))return{path:e.split("."),updates:void 0};const o=null!=(r=this.parseCache[e])?r:q(e);if(this.parseCache[e]=o,"object"!==typeof o||!(null==o?void 0:o.status))throw new TypeError(`Cannot normalize path "${e}": ${null!=(n=null==o?void 0:o.error)?n:"Unknown Error."}`);try{return Y(o.path,t,this.hooks)}catch(s){throw new i.NestedError(`Cannot resolve binding: ${e}`,s)}}getBindingForNormalizedResult(e){const t=e.path.join(".");if(this.cache[t])return this.cache[t];const r=new V(""===t?[]:e.path,this.parse);return this.cache[t]=r,r}parse(e,t={}){if(M(e))return e;const r=ee(ee({},this.parserOptions),t);let n={};const i=Array.isArray(e)?e.join("."):String(e),o={getValue:e=>{const t=this.normalizePath(e.join("."),o);return r.get(this.getBindingForNormalizedResult(t))},evaluate:e=>r.evaluate(e),convertToPath:e=>{if(void 0===e)throw new Error("Attempted to convert undefined value to binding path");if("string"!==typeof e&&"number"!==typeof e&&"boolean"!==typeof e)throw new Error(`Attempting to convert ${typeof e} to a binding path.`);const t=this.normalizePath(String(e),o);t.updates&&(n=ee(ee({},n),t.updates));const r=t.path.join(".");if(""===r)throw new Error("Nested path resolved to an empty path");return r}},s=this.normalizePath(i,o);s.updates&&(n=ee(ee({},n),s.updates));const a=Object.keys(n);if(!r.readOnly&&a.length>0){const e=a.map((e=>[this.parse(e),n[e]]));r.set(e)}return this.getBindingForNormalizedResult(s)}}class oe{constructor(){this.readDeps=new Set,this.writeDeps=new Set,this.namedDependencySets={},this.namedSet="core",this.createSubset("core"),this.createSubset("children")}createSubset(e,t=!1){!t&&this.namedDependencySets[e]||(this.namedDependencySets[e]={readDeps:new Set,writeDeps:new Set})}getDependencies(e){var t,r,n;return void 0!==e?null!=(n=null==(r=null==(t=this.namedDependencySets)?void 0:t[e])?void 0:r.readDeps)?n:new Set:this.readDeps}trackSubset(e){this.createSubset(e),this.namedSet=e}trackDefault(){this.namedSet="core"}getModified(e){var t,r,n;return void 0!==e?null!=(n=null==(r=null==(t=this.namedDependencySets)?void 0:t[e])?void 0:r.writeDeps)?n:new Set:this.writeDeps}readsBinding(e){return this.readDeps.has(e)}writesBinding(e){return this.writeDeps.has(e)}reset(){this.readDeps=new Set,this.writeDeps=new Set,this.namedDependencySets={},this.namedSet="core",this.createSubset("core",!0),this.createSubset("children",!0)}addReadDep(e,t=this.namedSet){var r,n;t&&(null==(n=null==(r=this.namedDependencySets)?void 0:r[t])||n.readDeps.add(e)),this.readDeps.add(e)}addWriteDep(e,t=this.namedSet){var r,n;t&&(null==(n=null==(r=this.namedDependencySets)?void 0:r[t])||n.writeDeps.add(e)),this.writeDeps.add(e)}addChildReadDep(e){this.addReadDep(e,"children")}}class se extends oe{constructor(e){super(),this.rootModel=e,this.set=this.set.bind(this),this.get=this.get.bind(this)}set(e,t){return e.forEach((([e])=>this.addWriteDep(e))),this.rootModel.set(e,t)}get(e,t){return this.addReadDep(e),this.rootModel.get(e,t)}delete(e,t){return this.addWriteDep(e),this.rootModel.delete(e,t)}}const ae=new class{get(){}set(){return[]}delete(){}},le=new V([]);function ue(e,t,r){return r?{get:(n,i)=>{const o=null!=i?i:t;return e.get?e.get(n,o,r):null==r?void 0:r.get(n,o)},set:(n,i)=>{const o=null!=i?i:t;return e.set?e.set(n,o,r):null==r?void 0:r.set(n,o)},delete:(n,i)=>{const o=null!=i?i:t;return e.delete?e.delete(n,o,r):null==r?void 0:r.delete(n,o)}}:e}function ce(e){if(0===e.length)return ae;if(1===e.length)return ue(e[0]);function t(t){var r;return null!=(r=e.reduce(((e,r)=>ue(r,t,e)),void 0))?r:ae}return{get:(e,r)=>{var n;return null==(n=t(r))?void 0:n.get(e,r)},set:(e,r)=>{var n;return null==(n=t(r))?void 0:n.set(e,r)},delete:(e,r)=>{var n;return null==(n=t(r))?void 0:n.delete(e,r)}}}class fe{constructor(e=[]){this.hooks={onSet:new n.b},this.pipeline=e,this.effectiveDataModel=ce(this.pipeline)}setMiddleware(e){this.pipeline=e,this.effectiveDataModel=ce(e)}addMiddleware(e){this.pipeline=[...this.pipeline,e],this.effectiveDataModel=ce(this.pipeline)}reset(e={}){this.pipeline.forEach((e=>{var t;"reset"in e&&(null==(t=e.reset)||t.call(e))})),this.set([[le,e]])}set(e,t){const r=this.effectiveDataModel.set(e,t);return this.hooks.onSet.call(e),r}get(e,t){return this.effectiveDataModel.get(e,t)}delete(e,t){return this.effectiveDataModel.delete(e,t)}}class he{constructor(e={}){this.model=e,this.get=this.get.bind(this),this.set=this.set.bind(this)}reset(e={}){this.model=e}get(e){return e&&e.asString()?f()(this.model,e.asArray()):this.model}set(e){const t=[];return e.forEach((([e,r])=>{const n=this.get(e);this.model=Object(h.setIn)(this.model,e.asArray(),r),t.push({binding:e,oldValue:n,newValue:r})})),t}delete(e){const t=e.parent();if(t){const r=this.get(t);void 0!==r&&(Array.isArray(r)?this.model=Object(h.setIn)(this.model,t.asArray(),Object(h.removeAt)(r,e.key())):this.model=Object(h.setIn)(this.model,t.asArray(),Object(h.omit)(r,e.key())))}}}const pe=Symbol("Expression Node ID");function de(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&e.__id===pe}const ge=46,me=40,ve=123,ye=125,be=!0,we={"-":be,"!":be,"~":be,"+":be},Ee={"=":3,"+=":3,"-=":3,"&=":3,"|=":3,"||":5,"&&":6,"|":7,"^":8,"&":9,"==":10,"!=":10,"===":10,"!==":10,"<":11,">":11,"<=":11,">=":11,"<<":12,">>":12,">>>":12,"+":13,"-":13,"*":14,"/":14,"%":14};function xe(e,t){const r=new Error(`${e} at character ${t}`);throw r.index=t,r.description=e,r}function ke(e,t){if(e&&t)return{start:e.start,end:t.end}}function Se(e){let t=0;return Object.keys(e).forEach((r=>{r.length>t&&Object.prototype.hasOwnProperty.call(e,r)&&(t=r.length)})),t}const Ae=Se(we),Oe=Se(Ee),Re={true:!0,false:!1,null:null,undefined:void 0};function Te(e){return Ee[e]||0}function Pe(e,t,r,n){let i;return i="||"===e||"&&"===e?"LogicalExpression":"="===e?"Assignment":"+="===e||"-="===e||"&="===e||"|="===e?"Modification":"BinaryExpression",{__id:pe,type:i,operator:e,left:t,right:r,location:n}}function _e(e){return e>=48&&e<=57}function Ce(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122}function Le(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function je(e,t){var r;const n=null==(r=null==t?void 0:t.strict)||r,i=e.charAt,o=e.charCodeAt,{length:s}=e;let a=0;const l=e=>({start:{character:e},end:{character:a}});function u(t){return i.call(e,t)}function c(t){return o.call(e,t)}function f(){let e=c(a);for(;32===e||9===e;)e=c(++a)}function h(){const e=function(){let e,t,r,n=d(),i=p();if(!i)return n;let o={value:i,prec:Te(i)},s=d();s||xe(`Expected expression after ${i}`,a);const l=[n,o,s];i=p();for(;i&&(t=Te(i),0!==t);){for(o={value:i,prec:t};l.length>2&&t<=l[l.length-2].prec;)s=l.pop(),i=l.pop().value,n=l.pop(),e=Pe(i,n,s,ke(n.location,s.location)),l.push(e);e=d(),e||xe(`Expected expression after ${i}`,a),l.push(o,e),i=p()}r=l.length-1,e=l[r];for(;r>1;)e=Pe(l[r-1].value,l[r-2],e,ke(l[r-2].location,e.location)),r-=2;return e}();f();const t=a;if(a<s&&63===c(a)){a++;const r=h();if(r||xe("Expected expression",a),f(),58===c(a)){a++;const n=h();return n||xe("Expected expression",a),{__id:pe,type:"ConditionalExpression",test:e,consequent:r,alternate:n,location:l(t)}}xe("Expected :",a)}return e}function p(){f();let t=e.substr(a,Oe),r=t.length;for(;r>0;){if(Object.prototype.hasOwnProperty.call(Ee,t))return a+=r,t;t=t.substr(0,--r)}return!1}function d(){f();const t=c(a),r=a;if(_e(t)||46===t)return function(){let e="";const t=a;for(;_e(c(a));)e+=u(a++);if(c(a)===ge)for(e+=u(a++);_e(c(a));)e+=u(a++);let r=u(a);if("e"===r||"E"===r){for(e+=u(a++),r=u(a),"+"!==r&&"-"!==r||(e+=u(a++));_e(c(a));)e+=u(a++);_e(c(a-1))||xe(`Expected exponent (${e}${u(a)})`,a)}const n=c(a);Ce(n)?xe(`Variable names cannot start with a number (${e}${u(a)})`,a):n===ge&&xe("Unexpected period",a);return{__id:pe,type:"Literal",value:parseFloat(e),raw:e,location:l(t)}}();if(39===t||34===t)return g();if(Ce(t)||40===t)return function(){let e=c(a),t=e===me?function(){a++;const e=h();if(f(),41===c(a))return a++,e;xe("Unclosed (",a)}():m();const r=a;f(),e=c(a);for(;e===ge||91===e||e===me;)a++,e===ge?(f(),t={__id:pe,type:"MemberExpression",computed:!1,object:t,property:m(),location:l(r)}):91===e?(t={__id:pe,type:"MemberExpression",computed:!0,object:t,property:h(),location:l(r)},f(),e=c(a),93!==e&&xe("Unclosed [",a),a++):e===me&&(t={__id:pe,type:"CallExpression",args:v(41),callTarget:t,location:l(r)}),f(),e=c(a);return t}();if(91===t)return function(){const e=a;return a++,{__id:pe,type:"ArrayExpression",elements:v(93),location:l(e)}}();if(n=t,i=c(a+1),n===ve&&i===ve)return function(){let e="",t=!1,r=1;const n=a;a+=2;for(;a<s;){const n=u(a++);if("}"===n&&c(a)===ye){if(a++,r--,0===r){t=!0;break}e+="}}"}else"{"===n&&c(a)===ve?(r++,e+="{{",a++):e+=n}t||xe(`Unclosed brace after "${e}"`,a);return{__id:pe,type:"ModelRef",ref:e,location:l(n)}}();var n,i;if(t===ve)return function(){const e=[];let t,r,n,i=!1,o=!0;const u=a;for(++a;a<s;){if(f(),n=c(a),125===n){t&&xe("A key was defined but a value was not",a),a++,i=!0;break}o?(39!==n&&34!==n&&xe("An object must start wtih a key",a),t=g(),f(),58===c(a)?(a++,o=!1):xe("A colon must follow an object key",a)):(r=h(),e.push({key:t,value:r}),f(),n=c(a),44===n?a++:125!==n&&xe("Please add a comma to add another key",a),o=!0,t=void 0,r=void 0),n=c(a)}return i||xe("Unclosed brace in object",a),{__id:pe,type:"Object",attributes:e,location:l(u)}}();let o=e.substr(a,Ae),p=o.length;for(;p>0;){if(Object.prototype.hasOwnProperty.call(we,o))return a+=p,{__id:pe,type:"UnaryExpression",operator:o,argument:d(),prefix:!0,location:l(r)};o=o.substr(0,--p)}return!1}function g(){const e=u(a++);let t="",r=!1;const n=a;for(;a<s;){let n=u(a++);if(n===e){r=!0;break}if("\\"===n)switch(n=u(a++),n){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v"}else t+=n}return r||xe(`Unclosed quote after "${t}"`,a),{__id:pe,type:"Literal",value:t,raw:`${e}${t}${e}`,location:l(n)}}function m(){const t=a;let r=c(t);for(Ce(r)?a++:xe(`Unexpected ${u(a)}`,a);a<s&&(r=c(a),Le(r));)a++;const n=e.slice(t,a);return Object.prototype.hasOwnProperty.call(Re,n)?{__id:pe,type:"Literal",value:Re[n],raw:n,location:l(t)}:"this"===n?{__id:pe,type:"ThisExpression",location:l(t)}:{__id:pe,type:"Identifier",name:n,location:l(t)}}function v(e){const t=[];let r,i;for(;a<s;){if(f(),r=c(a),r===e){a++;break}44!==r?(i=h(),i&&"Compound"!==i.type||xe("Expected comma",a),t.push(i)):a++}return n&&r!==e&&xe(`Expected ${String.fromCharCode(e)}`,a),t}const y=[];try{for(;a<s;){const e=c(a);if(59===e||44===e){a++;continue}const t=h();t?y.push(t):n&&a<s&&xe(`Unexpected "${u(a)}"`,a)}return 1===y.length?y[0]:{__id:pe,type:"Compound",body:y,location:l(0)}}catch(b){if(n||!(b instanceof Error))throw b;return{__id:pe,type:"Compound",body:y,location:l(0),error:b}}}const Ne=(e,t,r,n)=>e.evaluate(t)?e.evaluate(r):n?e.evaluate(n):null;Ne.resolveParams=!1;var Ie=Object.freeze({__proto__:null,setDataVal:(e,t,r)=>{e.model.set([[t,r]])},getDataVal:(e,t)=>e.model.get(t),deleteDataVal:(e,t)=>e.model.delete(t),conditional:Ne});function Ue(e){return!de(e)&&("object"===typeof e&&null!==e&&!Array.isArray(e)&&"value"in e)}var Be=Object.defineProperty,De=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,ze=(e,t,r)=>t in e?Be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,He=(e,t)=>{for(var r in t||(t={}))Ve.call(t,r)&&ze(e,r,t[r]);if(Me)for(var r of Me(t))Fe.call(t,r)&&ze(e,r,t[r]);return e},$e=(e,t)=>De(e,qe(t));const We=(e,t,r)=>e.evaluate(t)&&e.evaluate(r);We.resolveParams=!1;const Ge=(e,t,r)=>e.evaluate(t)||e.evaluate(r);Ge.resolveParams=!1;const Ye={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"&&":We,"||":Ge,"!==":(e,t)=>e!==t,"===":(e,t)=>e===t,"|":(e,t)=>e|t,"&":(e,t)=>e&t,"+=":(e,t)=>e+t,"-=":(e,t)=>e-t,"&=":(e,t)=>e&t,"|=":(e,t)=>e|t},Ze={"-":e=>-e,"+":e=>Number(e),"!":e=>!e};class Qe{constructor(e){this.vars={},this.hooks={resolve:new n.c,resolveOptions:new n.c,beforeEvaluate:new n.c,onError:new n.a},this.expressionsCache=new Map,this.operators={binary:new Map(Object.entries(Ye)),unary:new Map(Object.entries(Ze)),expressions:new Map(Object.entries(Ie))},this.defaultHookOptions=$e(He({},e),{evaluate:e=>this.evaluate(e,this.defaultHookOptions),resolveNode:e=>this._execAST(e,this.defaultHookOptions)}),this.hooks.resolve.tap("ExpressionEvaluator",this._resolveNode.bind(this)),this.evaluate=this.evaluate.bind(this)}reset(){this.expressionsCache.clear()}evaluate(e,t){var r;const n=this.hooks.resolveOptions.call($e(He(He({},this.defaultHookOptions),t),{resolveNode:e=>this._execAST(e,n)}));let i=null!=(r=this.hooks.beforeEvaluate.call(e,n))?r:e;for(;Ue(i);)i=i.value;return"number"===typeof i||"boolean"===typeof i||void 0===i||null===i?i:de(i)?this._execAST(i,n):Array.isArray(i)?i.reduce(((e,r)=>this.evaluate(r,t)),null):this._execString(String(i),n)}addExpressionFunction(e,t){this.operators.expressions.set(e,t)}addBinaryOperator(e,t){this.operators.binary.set(e,t)}addUnaryOperator(e,t){this.operators.unary.set(e,t)}setExpressionVariable(e,t){this.vars[e]=t}getExpressionVariable(e){return this.vars[e]}_execAST(e,t){return this.hooks.resolve.call(void 0,e,t)}_execString(e,t){var r;if(""===e)return e;const n=e.match(/^@\[(.*)\]@$/);let o,s=e;n&&([,s]=Array.from(n));try{o=null!=(r=this.expressionsCache.get(s))?r:je(s,{strict:t.strict}),this.expressionsCache.set(s,o)}catch(a){if(t.throwErrors||!this.hooks.onError.call(a))throw new i.NestedError(`Error parsing expression: ${e}`,a);return}try{return this._execAST(o,t)}catch(a){if(t.throwErrors||!this.hooks.onError.call(a))throw new i.NestedError(`Error evaluating expression: ${e}`,a)}}_resolveNode(e,t,r){const{resolveNode:n,model:i}=r,o=$e(He({},r),{evaluate:e=>this.evaluate(e,r)});if("Literal"===t.type)return t.value;if("Identifier"===t.type)return this.vars[t.name];if("Compound"===t.type||"ThisExpression"===t.type)throw new Error(`Expression type: ${t.type} is not supported`);if("BinaryExpression"===t.type||"LogicalExpression"===t.type){const e=this.operators.binary.get(t.operator);return e?"resolveParams"in e?!1===e.resolveParams?e(o,t.left,t.right):e(o,n(t.left),n(t.right)):e(n(t.left),n(t.right)):void 0}if("UnaryExpression"===t.type){const e=this.operators.unary.get(t.operator);return e?"resolveParams"in e?e(o,!1===e.resolveParams?t.argument:n(t.argument)):e(n(t.argument)):void 0}if("Object"===t.type){const{attributes:e}=t,r={};return e.forEach((e=>{const t=n(e.key),i=n(e.value);r[t]=i})),r}if("CallExpression"===t.type){const e=t.callTarget.name,r=this.operators.expressions.get(e);if(!r)throw new Error(`Unknown expression function: ${e}`);if("resolveParams"in r&&!1===r.resolveParams)return r(o,...t.args);return r(o,...t.args.map((e=>n(e))))}if("ModelRef"===t.type)return i.get(t.ref,{context:{model:r.model}});if("MemberExpression"===t.type){return n(t.object)[n(t.property)]}if("Assignment"!==t.type){if("ConditionalExpression"===t.type){const e=n(t.test)?t.consequent:t.alternate;return n(e)}if("ArrayExpression"===t.type)return t.elements.map((e=>n(e)));if("Modification"===t.type){const e=this.operators.binary.get(t.operator);if(e){let r;return r="resolveParams"in e?!1===e.resolveParams?e(o,t.left,t.right):e(o,n(t.left),n(t.right)):e(n(t.left),n(t.right)),"ModelRef"===t.left.type?i.set([[t.left.ref,r]]):"Identifier"===t.left.type&&(this.vars[t.left.name]=r),r}return n(t.left)}}else{if("ModelRef"===t.left.type){const e=n(t.right);return i.set([[t.left.ref,e]]),e}if("Identifier"===t.left.type){const e=n(t.right);return this.vars[t.left.name]=e,e}}}}class Ke{constructor(){this.hooks={trace:new n.b,debug:new n.b,info:new n.b,warn:new n.b,error:new n.b,log:new n.b},this.logHandlers=new Set,this.trace=this.createHandler("trace"),this.debug=this.createHandler("debug"),this.info=this.createHandler("info"),this.warn=this.createHandler("warn"),this.error=this.createHandler("error")}createHandler(e){return(...t)=>{this.hooks[e].call(t),this.hooks.log.call(e,t),this.logHandlers.forEach((r=>r[e](...t)))}}addHandler(e){this.logHandlers.add(e)}removeHandler(e){this.logHandlers.delete(e)}}class Je{constructor(e){this.trace=this.createHandler("trace"),this.debug=this.createHandler("debug"),this.info=this.createHandler("info"),this.warn=this.createHandler("warn"),this.error=this.createHandler("error"),this.proxiedLoggerProvider=e}createHandler(e){return(...t)=>{const r=this.proxiedLoggerProvider();null==r||r[e](...t)}}}var Xe=Object.defineProperty,et=Object.defineProperties,tt=Object.getOwnPropertyDescriptors,rt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,ot=(e,t,r)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,st=(e,t)=>{for(var r in t||(t={}))nt.call(t,r)&&ot(e,r,t[r]);if(rt)for(var r of rt(t))it.call(t,r)&&ot(e,r,t[r]);return e};const at=e=>e;class lt{constructor(e){this.formatters=new Map,this.types=new Map,this.schema=new Map,this.bindingSchemaNormalizedCache=new Map,this.hooks={resolveTypeForBinding:new n.c},this.schema=e?function(e){const t=new Map;if(!e.ROOT)return t;const r=[{node:e.ROOT,path:[],visited:new Set}];for(;r.length>0;){const n=r.shift();if(!n)break;const{node:i,path:o,visited:s}=n;Object.entries(i).forEach((([n,i])=>{const a=[...o,n],l=a.join(".");if(t.has(l))throw new Error("Path has already been processed. There's either a loop somewhere or a bug");if(s.has(i.type))throw new Error(`Path already contained type: ${i.type}. This likely indicates a loop in the schema`);t.set(l,i),i.isArray&&a.push("[]"),i.isRecord&&a.push("{}"),i.type&&e[i.type]&&r.push({path:a,node:e[i.type],visited:new Set([...s,i.type])})}))}return t}(e):new Map}addFormatters(e){e.forEach((e=>{this.formatters.set(e.name,e)}))}addDataTypes(e){e.forEach((e=>{this.types.set(e.type,e)}))}getValidationsForBinding(e){var t;const r=this.getApparentType(e);if(null==(t=null==r?void 0:r.validation)?void 0:t.length)return r.validation.map((e=>st({severity:"error",trigger:"change"},e)))}normalizeBinding(e){const t=this.bindingSchemaNormalizedCache.get(e);if(t)return t;let r=e.asArray(),n=r.map((e=>"number"===typeof e?"[]":e)).join(".");return n&&(this.bindingSchemaNormalizedCache.set(e,n),r=n.split(".")),r.forEach((t=>{const i=r.map((e=>e===t?"{}":e)).join(".");this.schema.get(i)&&(this.bindingSchemaNormalizedCache.set(e,i),r=i.split("."),n=i)})),n}getType(e){return this.hooks.resolveTypeForBinding.call(this.schema.get(this.normalizeBinding(e)),e)}getApparentType(e){var t,r;const n=this.getType(e);if(void 0===n)return;const i=this.getTypeDefinition(null==n?void 0:n.type);return void 0===i?n:(o=st(st({},i),n),s={validation:[...null!=(t=n.validation)?t:[],...null!=(r=i.validation)?r:[]]},et(o,tt(s)));var o,s}getTypeDefinition(e){return this.types.get(e)}getFormatterForType(e){const t=e,{type:r}=t,n=((e,t)=>{var r={};for(var n in e)nt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&rt)for(var n of rt(e))t.indexOf(n)<0&&it.call(e,n)&&(r[n]=e[n]);return r})(t,["type"]),i=this.formatters.get(r);if(i)return{format:i.format?e=>{var t;return null==(t=i.format)?void 0:t.call(i,e,n)}:at,deformat:i.deformat?e=>{var t;return null==(t=i.deformat)?void 0:t.call(i,e,n)}:at}}getFormatter(e){const t=this.getApparentType(e);if(null==t?void 0:t.format)return this.getFormatterForType(t.format)}}const ut="{{",ct="}}";function ft(e){const t=e.indexOf(ut);if(-1===t)return;let r=1,n=t+ut.length,i=e.substring(t+ut.length);for(;r>0&&i.length>0;){const e=i.indexOf(ct);if(-1===e)break;const t=i.indexOf(ut);-1!==t&&t<e?(r++,i=i.substring(t+ut.length),n+=t+ut.length):(r--,i=i.substring(e+ct.length),n+=e+ct.length)}if(0!==r)throw new Error(`Unbalanced {{ and }} in exp: ${e}`);return{start:t,end:n}}function ht(e,t){const{model:r,formatted:n=!0}=t;let i=function(e,{evaluate:t}){if(!t)return e;const r=/@\[.*?\]@/;let n=e,i=n.match(r);for(;null!==i;){const o=i[0],s=n.indexOf(o),a=t(o.substr("@[".length,o.length-"@[".length-"]@".length));if(0===s&&o===e&&"string"!==typeof a)return a;n=n.substr(0,s)+a+n.substr(s+o.length),i=n.match(r)}return n}(e,t);if(!r||"string"!==typeof i||-1===i.indexOf(ut))return i;for(;-1!==i.indexOf(ut);){const e=ft(i);if(!e)return i;const{start:t,end:o}=e,s=i.substring(t+ut.length,o-ut.length).trim(),a=r.get(s,{formatted:n});if(0===t&&o===i.length&&"string"!==typeof a)return a;i=i.substr(0,t)+a+i.substr(o)}return i}function pt(e,t){switch(typeof e){case"string":return ht(e,t);case"object":{if(!e)return e;const r=Object.keys(e);let n=e;return r.length>0&&r.forEach((r=>{n=Object(h.setIn)(n,[r],pt(e[r],t))})),n}default:return e}}function dt(e,t){return pt(e,t)}function gt(e,t){const r=new Map(e),n=t.parent(),i=t.key();if(r.forEach(((e,n)=>{(t===n||t.contains(n))&&r.delete(n)})),"number"===typeof i){Array.from(e.keys()).filter((e=>{if(n.contains(e)){const[t]=e.relative(n);return"number"===typeof t&&t>i}return!1})).sort().forEach((e=>{const[t,...i]=e.relative(n);if("number"===typeof t){const o=[t-1,...i],s=n.descendent(o);r.set(s,r.get(e)),r.delete(e)}}))}return r}var mt,vt,yt=Object.defineProperty,bt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,St=(e,t,r)=>t in e?yt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;class At{constructor(e,t){this.validator=e,this.shadowModelPaths=new Map,this.logger=null==t?void 0:t.logger,this.shouldIncludeInvalid=null==t?void 0:t.shouldIncludeInvalid}set(e,t,r){const n=ue(this,(i=((e,t)=>{for(var r in t||(t={}))xt.call(t,r)&&St(e,r,t[r]);if(Et)for(var r of Et(t))kt.call(t,r)&&St(e,r,t[r]);return e})({},t),bt(i,wt({includeInvalid:!0}))),r);var i;const o=[],s=new Set;e.forEach((([e,t])=>{this.shadowModelPaths.set(e,t),s.add(e)}));const a=[];this.shadowModelPaths.forEach(((e,t)=>{var r;const i=this.validator(t,n);void 0===i?o.push([t,e]):i instanceof Set?i.forEach((r=>{a.push(r.binding),r.isStrong||r.binding.asString()!==t.asString()||o.push([r.binding,e])})):s.has(t)&&(a.push(t),null==(r=this.logger)||r.debug(`Invalid value for path: ${t.asString()} - ${i.severity} - ${i.message}`))}));let l=[];if(r&&o.length>0){o.forEach((([e])=>this.shadowModelPaths.delete(e)));const e=r.set(o,t);if(0===a.length)return e;l=e}const u=a.map((e=>({binding:e,oldValue:n.get(e),newValue:n.get(e),force:!0})));return[...l,...u]}get(e,t,r){var n,i;let o=null==r?void 0:r.get(e,t);return(null!=(i=null==(n=this.shouldIncludeInvalid)?void 0:n.call(this,t))?i:!0===(null==t?void 0:t.includeInvalid))&&this.shadowModelPaths.forEach(((t,r)=>{r!==e?e.contains(r)&&(o=Object(h.setIn)(o,r.relative(e),t)):o=t})),o}delete(e,t,r){return this.shadowModelPaths=gt(this.shadowModelPaths,e),null==r?void 0:r.delete(e,t)}}class Ot{constructor(){this.registry=new Map}get(e){return this.registry.get(e)}register(e,t){this.registry.set(e,t)}}function Rt(e){var t;if(e)return"value"in e&&"object"===typeof e.value&&"string"===typeof(null==(t=e.value)?void 0:t.id)?e.value.id:void 0}(vt=mt||(mt={})).Asset="asset",vt.View="view",vt.Applicability="applicability",vt.Template="template",vt.Value="value",vt.MultiNode="multi-node",vt.Switch="switch",vt.Async="async",vt.Unknown="unknown",vt.Empty="empty";var Tt=Object.defineProperty,Pt=Object.defineProperties,_t=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Nt=(e,t,r)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,It=(e,t)=>{for(var r in t||(t={}))Lt.call(t,r)&&Nt(e,r,t[r]);if(Ct)for(var r of Ct(t))jt.call(t,r)&&Nt(e,r,t[r]);return e},Ut=(e,t)=>Pt(e,_t(t));const Bt={type:mt.Empty};class Dt{constructor(){this.hooks={onParseObject:new n.c,onCreateASTNode:new n.c,determineNodeType:new n.a,parseNode:new n.a}}parseView(e){const t=this.parseObject(e,mt.View);if(!t)throw new Error("Unable to parse object into a view");return t}parseAsync(e,t,r){const n=this.parseObject(Object(h.omit)(e,"async"),t,r),i=Rt(n);return null!==n&&i?this.createASTNode({id:i,type:mt.Async,value:n},e):null}createASTNode(e,t){const r=this.hooks.onCreateASTNode.call(e,t);return void 0===r?e:r}hasTemplateValues(e,t){return Object.hasOwnProperty.call(e,"template")&&Array.isArray(null==e?void 0:e.template)&&e.template.length&&e.template.find((e=>e.output===t))}hasSwitchKey(e){return"staticSwitch"===e}parseObject(e,t=mt.Value,r={templateDepth:0}){var n;const i=this.hooks.determineNodeType.call(e);if(void 0!==i){const n=this.hooks.parseNode.call(e,t,r,i);if(n)return n}const o=(e,n,i=[])=>{if("object"!==typeof n||null===n)return{value:n,children:[]};const s=this.hooks.onParseObject.call(n,t);if(!s)return e;const a={children:[],value:e},l=(Array.isArray(s)?s.map(((e,t)=>[t,e])):[...Object.entries(s),...Object.getOwnPropertySymbols(s).map((e=>[e,s[e]]))]).reduce(((e,t)=>{var n;const a=e,{children:l}=a,u=((e,t)=>{var r={};for(var n in e)Lt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Ct)for(var n of Ct(e))t.indexOf(n)<0&&jt.call(e,n)&&(r[n]=e[n]);return r})(a,["children"]),[c,f]=t;if("asset"===c&&"object"===typeof f){const e=this.parseObject(f,mt.Asset,r);if(e)return Ut(It({},u),{children:[...l,{path:[...i,"asset"],value:e}]})}else{if(this.hooks.determineNodeType.call(c)===mt.Template&&Array.isArray(f)){const e=f.map((e=>{var t,n;const o=this.hooks.onCreateASTNode.call({type:mt.Template,depth:null!=(t=r.templateDepth)?t:0,data:e.data,template:e.value,dynamic:null!=(n=e.dynamic)&&n},e);if((null==o?void 0:o.type)===mt.MultiNode&&o.values.forEach((e=>{e.parent=o})),o)return{path:[...i,e.output],value:o}})).filter((e=>!!e));return Ut(It({},u),{children:[...l,...e]})}if(f&&this.hooks.determineNodeType.call(f)===mt.Switch||this.hasSwitchKey(c)){const e=this.hooks.parseNode.call(this.hasSwitchKey(c)?{[c]:f}:f,mt.Value,r,mt.Switch);if(e&&e.type===mt.Value&&1===(null==(n=e.children)?void 0:n.length)&&void 0===e.value){const t=e.children[0];return Ut(It({},u),{children:[...l,{path:[...i,c,...t.path],value:t.value}]})}if(e)return Ut(It({},u),{children:[...l,{path:[...i,c],value:e}]})}else if(f&&function(e){return Object.prototype.hasOwnProperty.call(e,"async")}(f)){const e=this.parseAsync(f,mt.Value,r);e&&l.push({path:[...i,c],value:e})}else if(f&&Array.isArray(f)){const e=f.map((e=>this.parseObject(e,mt.Value,r))).filter((e=>!!e));if(e.length>0){const t=this.hooks.onCreateASTNode.call({type:mt.MultiNode,override:!this.hasTemplateValues(s,c),values:e},f);if((null==t?void 0:t.type)===mt.MultiNode&&t.values.forEach((e=>{e.parent=t})),t)return Ut(It({},u),{children:[...l,{path:[...i,c],value:t}]})}}else{if(!f||"object"!==typeof f){return{children:l,value:Object(h.setIn)(e.value,[...i,c],f)}}{const t=this.hooks.determineNodeType.call(f);if(t!==mt.Applicability){const t=o(e.value,f,[...i,c]);return{value:t.value,children:[...l,...t.children]}}{const e=this.hooks.parseNode.call(f,mt.Value,r,t);if(e)return Ut(It({},u),{children:[...l,{path:[...i,c],value:e}]})}}}}return e}),a);return l},{value:s,children:a}=o(void 0,e),l=void 0===s&&0===a.length?void 0:{type:t,value:s};if(void 0!==l&&a.length>0){const e=l;e.children=a,a.forEach((t=>{t.value.parent=e}))}return null!=(n=this.hooks.onCreateASTNode.call(l,e))?n:null}}var qt=Object.defineProperty,Mt=Object.defineProperties,Vt=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,Ht=Object.prototype.propertyIsEnumerable,$t=(e,t,r)=>t in e?qt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function Wt(e,t){if(!e||!t)return!0;const r=Array.from(t.values()),n=Array.from(e.values());return void 0!==r.find((e=>!!n.find((t=>t===e||t.contains(e)||e.contains(t)))))}function Gt(e){return t=((e,t)=>{for(var r in t||(t={}))zt.call(t,r)&&$t(e,r,t[r]);if(Ft)for(var r of Ft(t))Ht.call(t,r)&&$t(e,r,t[r]);return e})({},e),r={data:{model:e.model,formatValue:(t,r)=>e.formatValue?e.formatValue(t,r):r,format:(t,r)=>e.format?e.format(M(t)?t:e.parseBinding(t),r):r},evaluate:t=>e.evaluator.evaluate(t,e)},Mt(t,Vt(r));var t,r}function Yt(e,t){Array.isArray(e)?e.forEach((e=>{Yt(e,t)})):t.push(e)}var Zt=Object.defineProperty,Qt=Object.defineProperties,Kt=Object.getOwnPropertyDescriptors,Jt=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,tr=(e,t,r)=>t in e?Zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rr=(e,t)=>{for(var r in t||(t={}))Xt.call(t,r)&&tr(e,r,t[r]);if(Jt)for(var r of Jt(t))er.call(t,r)&&tr(e,r,t[r]);return e},nr=(e,t)=>Qt(e,Kt(t));class ir{constructor(e,t){this.hooks={skipResolve:new n.c,beforeUpdate:new n.b,afterUpdate:new n.b,resolveOptions:new n.c,beforeResolve:new n.c,resolve:new n.c,afterResolve:new n.c,afterNodeUpdate:new n.b},this.root=e,this.options=t,this.resolveCache=new Map,this.ASTMap=new Map,this.logger=t.logger,this.idCache=new Set}getSourceNode(e){return this.ASTMap.get(e)}update(e){this.hooks.beforeUpdate.call(e);const t=new Map;this.idCache.clear();const r=new Map(this.ASTMap);this.ASTMap.clear();const n=this.computeTree(this.root,void 0,e,t,Gt(this.options),void 0,r);return this.resolveCache=t,this.hooks.afterUpdate.call(n.value),n.value}getResolveCache(){return new Map(this.resolveCache)}getPreviousResult(e){var t,r;if(!e)return;const n=0===this.resolveCache.size,i=Rt(e);if(i){if(this.idCache.has(i))return void(n&&(e.type===mt.Asset||e.type===mt.View?null==(t=this.logger)||t.error(`Cache conflict: Found Asset/View nodes that have conflicting ids: ${i}, may cause cache issues.`):e.type===mt.Value&&(null==(r=this.logger)||r.info(`Cache conflict: Found Value nodes that have conflicting ids: ${i}, may cause cache issues. To improve performance make value node IDs globally unique.`))));this.idCache.add(i)}return this.resolveCache.get(e)}cloneNode(e){const t=Object(h.clone)(e);return Object.keys(t).forEach((e=>{if("parent"===e)return;const r=t[e];"object"===typeof r&&null!==r&&(t[e]=Array.isArray(r)?[...r]:rr({},r))})),t}computeTree(e,t,r,n,i,o,s){var a,l,u;const c=new se(i.data.model);c.trackSubset("core");const d=(g=function(e,t){function r(r,n){const i=M(r)?r:t(r,{get:e.get,set:e.set,readOnly:n});if(!i)throw new Error("Unable to parse binding");return i}return{get:(t,n)=>e.get(r(t,!0),n),set:(t,n)=>e.set(t.map((([e,t])=>[r(e,!1),t])),n),delete:(t,n)=>e.delete(r(t,!1),n)}}(c,this.options.parseBinding),{get:(e,t)=>g.get(e,rr({context:{model:g}},t)),set:(e,t)=>g.set(e,rr({context:{model:g}},t)),delete:(e,t)=>g.delete(e,rr({context:{model:g}},t))});var g;const m=this.hooks.resolveOptions.call(nr(rr({},i),{data:nr(rr({},i.data),{model:d}),evaluate:e=>this.options.evaluator.evaluate(e,{model:d}),node:e}),e),v=this.getPreviousResult(e),y=null==v?void 0:v.dependencies,b=Wt(r,y),w=this.hooks.skipResolve.call(!b,e,m),E=nr(rr({},this.cloneNode(e)),{parent:o}),x=null!=(a=this.hooks.beforeResolve.call(E,m))?a:{type:mt.Empty},k=x.type===mt.MultiNode&&(null==(l=null==o?void 0:o.parent)?void 0:l.type)===mt.MultiNode&&o.type===mt.Value;if(v&&w){const r=nr(rr({},v),{updated:!1}),i=(e,t,r)=>{var o;const{node:a}=e;this.ASTMap.set(a,t);const l=nr(rr({},e),{updated:!1});n.set(t,l);const u=e=>{var r;const n=null!=(r=s.get(e))?r:e,o=this.getPreviousResult(n);o&&i(o,n,t)};"children"in a?null==(o=a.children)||o.forEach((({value:e})=>u(e))):a.type===mt.MultiNode&&a.values.forEach(u),this.hooks.afterNodeUpdate.call(t,r,l)};return v.node.parent=o,i(v,e,t),r}x.parent=o,m.node=x,this.ASTMap.set(x,e);let S=this.hooks.resolve.call(void 0,x,m),A=!Object(p.a)(null==v?void 0:v.value,S);v&&!A&&(S=null==v?void 0:v.value);const O=new Set;if(c.trackSubset("children"),"children"in x){const t=null==(u=x.children)?void 0:u.map((t=>{const i=this.computeTree(t.value,e,r,n,m,x,s),{dependencies:o,node:a,updated:l,value:u}=i;if(o.forEach((e=>O.add(e))),u)if(a.type!==mt.MultiNode||a.override)S=Object(h.setIn)(S,t.path,u);else{const e=Object(h.addLast)(f()(S,t.path,[]),u);S=Object(h.setIn)(S,t.path,e)}return A=A||l,nr(rr({},t),{value:a})}));x.children=t}else if(x.type===mt.MultiNode){const t=[],i=k?null==o?void 0:o.parent:e,a=x.values.map((e=>{var o;const a=this.computeTree(e,i,r,n,m,x,s);return void 0!==a.value&&null!==a.value&&((null==(o=a.node.parent)?void 0:o.type)===mt.MultiNode&&Array.isArray(a.value)?a.value.forEach((e=>{Yt(e,t)})):t.push(a.value)),a.dependencies.forEach((e=>O.add(e))),A=A||a.updated,a.node}));x.values=a,S=t}O.forEach((e=>c.addChildReadDep(e))),c.trackSubset("core"),v&&!A&&(S=null==v?void 0:v.value),S=this.hooks.afterResolve.call(S,x,nr(rr({},m),{getDependencies:e=>c.getDependencies(e)}));const R={node:x,updated:A,value:S,dependencies:new Set([...c.getDependencies(),...O])};return this.hooks.afterNodeUpdate.call(e,k?null==o?void 0:o.parent:t,R),n.set(e,R),R}}class or{constructor(e){this.hooks={resolveTemplateSubstitutions:new n.c},this.options=e}parseTemplate(e,t,r){const{template:n,depth:i}=t,o=r.data.model.get(t.data);if(!o)return null;if(!Array.isArray(o))throw new Error(`Template using '${t.data}' but is not an array`);const s=[];o.forEach(((r,o)=>{const a=this.hooks.resolveTemplateSubstitutions.call([{expression:new RegExp(`_index${i||""}_`),value:String(o)}],{depth:i,data:r,index:o});let l=JSON.stringify(n);for(const{expression:e,value:t}of a){let r="g";"object"===typeof e&&(r=`${e.flags}${e.global?"":"g"}`),l=l.replace(new RegExp(e,r),t)}const u=e(JSON.parse(l),mt.Value,{templateDepth:t.depth+1});u&&s.push(u)}));return{type:mt.MultiNode,override:!1,values:s}}applyParser(e){e.hooks.onCreateASTNode.tap("template",(t=>t&&t.type===mt.Template&&!t.dynamic?this.parseTemplate(e.parseObject.bind(e),t,this.options):t)),e.hooks.determineNodeType.tap("template",(e=>{if("template"===e)return mt.Template})),e.hooks.parseNode.tap("template",((t,r,n,i)=>{var o,s;if(i===mt.Template){const r=e.createASTNode({type:mt.Template,depth:null!=(o=n.templateDepth)?o:0,data:t.data,template:t.value,dynamic:null!=(s=t.dynamic)&&s},t);if(r)return r}}))}applyResolverHooks(e){e.hooks.beforeResolve.tap("template",((e,t)=>e&&e.type===mt.Template&&e.dynamic?this.parseTemplate(t.parseNode,e,t):e))}apply(e){e.hooks.parser.tap("template",this.applyParser.bind(this)),e.hooks.resolver.tap("template",this.applyResolverHooks.bind(this))}}const sr=(e,t)=>r=>{const n=r.indexOf(e);if(-1===n)return!1;const i=r.indexOf(t);return-1!==i&&n<i},ar=sr("{{","}}"),lr=sr("@[","]@");function ur(e,t){return function(e){return ar(e)||lr(e)}(e)?dt(e,{model:t.data.model,evaluate:t.evaluate}):e}function cr(e,t,r){if(null===e||void 0===e||"object"!==typeof e&&"string"!==typeof e)return e;if("string"===typeof e)return ur(e,t);let n=e;return Object.keys(e).forEach((i=>{if(r.has(i))return;const o=e[i];let s=o;"object"===typeof o?s=cr(o,t,r):"string"===typeof o&&(s=ur(o,t)),s!==o&&(n=Object(h.set)(n,i,s))})),n}const fr=(e,t)=>{var r,n,i;const o=e.parent;if(!o)return[];if("children"in o){const s=t.getSourceNode(e);return null!=(i=null==(n=null==(r=o.children)?void 0:r.find((e=>e.value===s)))?void 0:n.path)?i:[]}return o.type!==mt.MultiNode?[]:fr(o,t)};class hr{constructor(){this.propertiesToSkipCache=new Map}applyResolver(e){e.hooks.resolve.tap("string-resolver",((t,r,n)=>{var i,o,s,a,l,u,c,f,h,p;if(r.type===mt.Empty||r.type===mt.Unknown)return null;if(r.type===mt.Value||r.type===mt.Asset||r.type===mt.View){let t;r.type===mt.Asset||r.type===mt.View?(t=new Set(null!=(s=null==(o=null==(i=r.plugins)?void 0:i.stringResolver)?void 0:o.propertiesToSkip)?s:["exp"]),(null==(a=r.value)?void 0:a.id)&&this.propertiesToSkipCache.set(r.value.id,t)):t=(null==(l=r.parent)?void 0:l.type)===mt.MultiNode&&((null==(c=null==(u=r.parent)?void 0:u.parent)?void 0:c.type)===mt.Asset||(null==(h=null==(f=r.parent)?void 0:f.parent)?void 0:h.type)===mt.View)&&(null==(p=r.parent.parent.value)?void 0:p.id)&&this.propertiesToSkipCache.has(r.parent.parent.value.id)?this.propertiesToSkipCache.get(r.parent.parent.value.id):new Set(["exp"]);const d=fr(r,e);return d.length>0&&d.some((e=>t.has(e.toString())))?r.value:cr(r.value,n,t)}return t}))}apply(e){e.hooks.resolver.tap("string-resolver",this.applyResolver.bind(this))}}class pr{applyResolver(e){e.hooks.beforeResolve.tap("applicability",((e,t)=>{let r=e;if((null==e?void 0:e.type)===mt.Applicability){if(!1===t.evaluate(e.expression))return null;r=e.value}return r}))}applyParser(e){e.hooks.determineNodeType.tap("applicability",(e=>{if(Object.prototype.hasOwnProperty.call(e,"applicability"))return mt.Applicability})),e.hooks.parseNode.tap("applicability",((t,r,n,i)=>{if(i===mt.Applicability){const i=e.parseObject(Object(h.omit)(t,"applicability"),r,n);if(null!==i){const r=e.createASTNode({type:mt.Applicability,expression:t.applicability,value:i},t);return(null==r?void 0:r.type)===mt.Applicability&&(r.value.parent=r),r}}}))}apply(e){e.hooks.resolver.tap("applicability",this.applyResolver.bind(this)),e.hooks.parser.tap("applicability",this.applyParser.bind(this))}}var dr=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable;class vr{constructor(e){this.options=e}resolveSwitch(e,t){for(const r of e.cases){if(t.evaluate(r.case))return r.value}return Bt}applyParser(e){e.hooks.onCreateASTNode.tap("switch",(e=>e&&e.type===mt.Switch&&!e.dynamic?this.resolveSwitch(e,this.options):e)),e.hooks.determineNodeType.tap("switch",(e=>{if(Object.prototype.hasOwnProperty.call(e,"dynamicSwitch")||Object.prototype.hasOwnProperty.call(e,"staticSwitch"))return mt.Switch})),e.hooks.parseNode.tap("switch",((t,r,n,i)=>{if(i===mt.Switch){const r="dynamicSwitch"in t,i="dynamicSwitch"in t?t.dynamicSwitch:t.staticSwitch,o=[];i.forEach((t=>{const r=t,{case:i}=r,s=((e,t)=>{var r={};for(var n in e)gr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&dr)for(var n of dr(e))t.indexOf(n)<0&&mr.call(e,n)&&(r[n]=e[n]);return r})(r,["case"]),a=e.parseObject(s,mt.Value,n);a&&o.push({case:i,value:a})}));const s=e.hooks.onCreateASTNode.call({type:mt.Switch,dynamic:r,cases:o},t);return(null==s?void 0:s.type)===mt.Switch&&s.cases.forEach((e=>{e.value.parent=s})),(null==s?void 0:s.type)===mt.Empty?null:null!=s?s:null}}))}applyResolver(e){e.hooks.beforeResolve.tap("switch",((e,t)=>e&&e.type===mt.Switch&&e.dynamic?this.resolveSwitch(e,t):e))}apply(e){e.hooks.parser.tap("switch",this.applyParser.bind(this)),e.hooks.resolver.tap("switch",this.applyResolver.bind(this))}}var yr=Object.defineProperty,br=Object.defineProperties,wr=Object.getOwnPropertyDescriptors,Er=Object.getOwnPropertySymbols,xr=Object.prototype.hasOwnProperty,kr=Object.prototype.propertyIsEnumerable,Sr=(e,t,r)=>t in e?yr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ar=(e,t)=>{for(var r in t||(t={}))xr.call(t,r)&&Sr(e,r,t[r]);if(Er)for(var r of Er(t))kr.call(t,r)&&Sr(e,r,t[r]);return e};class Or{constructor(e,t,r){this.allValidations=new Set,this.byBinding=new Map,this.logger=r,this.parse(e,t)}parse(e,t){var r;const n=e.validation;void 0!==n&&(Array.isArray(n)?n.forEach((e=>{var r;const n=Ar({trigger:"navigation",severity:"error"},e);this.allValidations.add(n);const{ref:i}=e;if(i){const e=t(i);this.byBinding.has(e)?null==(r=this.byBinding.get(e))||r.push(n):this.byBinding.set(e,[n])}})):null==(r=this.logger)||r.warn(`Unable to register view validations for id: ${e.id}. 'validation' property must be an Array.`))}getValidationsForBinding(e){return this.byBinding.get(e)}}class Rr{constructor(e,t){this.hooks={onUpdate:new n.b,parser:new n.b,resolver:new n.b,templatePlugin:new n.b},this.initialView=e,this.resolverOptions=t;const r=Gt(t);new vr(r).apply(this),(new pr).apply(this),(new hr).apply(this),this.templatePlugin=new or(r),this.templatePlugin.apply(this)}updateAsync(){var e;const t=null==(e=this.resolver)?void 0:e.update();this.lastUpdate=t,this.hooks.onUpdate.call(t)}update(e){var t,r,n;if(void 0===this.rootNode){this.validationProvider=new Or(this.initialView,this.resolverOptions.parseBinding,this.resolverOptions.logger),this.hooks.templatePlugin.call(this.templatePlugin);const e=new Dt;this.hooks.parser.call(e),this.rootNode=e.parseView(this.initialView),this.resolver=new ir(this.rootNode,(r=Ar({},this.resolverOptions),n={parseNode:e.parseObject.bind(e)},br(r,wr(n)))),this.hooks.resolver.call(this.resolver)}const i=null==(t=this.resolver)?void 0:t.update(e);return this.lastUpdate===i?this.lastUpdate:(this.lastUpdate=i,this.hooks.onUpdate.call(i),i)}getValidationsForBinding(e){var t;return null==(t=this.validationProvider)?void 0:t.getValidationsForBinding(e)}}var Tr=Object.defineProperty,Pr=Object.getOwnPropertySymbols,_r=Object.prototype.hasOwnProperty,Cr=Object.prototype.propertyIsEnumerable,Lr=(e,t,r)=>t in e?Tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jr=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{a(r.next(e))}catch(t){i(t)}},s=e=>{try{a(r.throw(e))}catch(t){i(t)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())}));class Nr{constructor(e,t,r){this.isTransitioning=!1,this.hooks={beforeStart:new n.a,onStart:new n.b,onEnd:new n.b,skipTransition:new n.a,beforeTransition:new n.c,resolveTransitionNode:new n.c,transition:new n.b,afterTransition:new n.b},this.id=e,this.flow=t,this.log=null==r?void 0:r.logger,this.history=[],this.hooks.transition.tap("startPromise",((e,t)=>jr(this,null,(function*(){const e=t.value;this.flowPromise&&"END"===e.state_type&&this.flowPromise.resolve(e)}))))}start(){return jr(this,null,(function*(){var e;if(this.flowPromise)return null==(e=this.log)||e.warn("Already called start for flow"),this.flowPromise.promise;this.flow=this.hooks.beforeStart.call(this.flow)||this.flow,this.flow.onStart&&this.hooks.onStart.call(this.flow.onStart);const t=this.flow.startState;return t?(this.flowPromise=g()(),this.pushHistory(t),this.flowPromise.promise):Promise.reject(new Error("No 'startState' defined for flow"))}))}transition(e,t){var r,n,i,o,s,a,l;if(this.isTransitioning)throw new Error(`Transitioning while ongoing transition from ${null==(r=this.currentState)?void 0:r.name} is in progress is not supported`);if("END"===(null==(n=this.currentState)?void 0:n.value.state_type))return void(null==(i=this.log)||i.warn(`Skipping transition using ${e}. Already at and END state`));if(void 0===this.currentState)throw new Error("Cannot transition when there's no current state");if(null==t?void 0:t.force)null==(o=this.log)||o.debug("Forced transition. Skipping validation checks");else{if(this.hooks.skipTransition.call(this.currentState))return void(null==(s=this.log)||s.debug(`Skipping transition from ${this.currentState.name} b/c hook told us to`))}const u=this.hooks.beforeTransition.call(this.currentState.value,e);if(!("transitions"in u))throw new Error(`No transitions defined for ${this.currentState.value}`);const{transitions:c}=u,f=c[e]||c["*"];if(void 0!==f)return null==(l=this.log)||l.debug(`Transitioning from ${this.currentState.name} to ${f} using ${e} `),this.pushHistory(f,t);null==(a=this.log)||a.warn(`No transition from ${this.currentState.name} using ${e} or *`)}pushHistory(e,t){var r;if(!Object.prototype.hasOwnProperty.call(this.flow,e))throw new Error(`No flow definition for: ${e} was found.`);let n=this.flow[e];if(!this.flow[e]||"object"!==typeof n||!("state_type"in n))return void(null==(r=this.log)||r.error(`Flow doesn't contain any states named: ${e}`));const i=this.currentState;this.isTransitioning=!0,n=this.hooks.resolveTransitionNode.call(n);const o={name:e,value:n};this.currentState=o,this.history.push(e),"END"===o.value.state_type&&this.flow.onEnd&&this.hooks.onEnd.call(this.flow.onEnd),this.hooks.transition.call(i,((e,t)=>{for(var r in t||(t={}))_r.call(t,r)&&Lr(e,r,t[r]);if(Pr)for(var r of Pr(t))Cr.call(t,r)&&Lr(e,r,t[r]);return e})({},o)),this.isTransitioning=!1,this.hooks.afterTransition.call(this)}}var Ir=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{a(r.next(e))}catch(t){i(t)}},s=e=>{try{a(r.throw(e))}catch(t){i(t)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,s);a((r=r.apply(e,t)).next())}));class Ur{constructor(e,t){this.hooks={flow:new n.b},this.navigation=e,this.navStack=[],this.log=null==t?void 0:t.logger,this.start=this.start.bind(this),this.run=this.run.bind(this),this.transition=this.transition.bind(this),this.addNewFlow=this.addNewFlow.bind(this)}transition(e,t){if(void 0===this.current)throw new Error("Not currently in a flow. Cannot transition.");this.current.transition(e,t)}addNewFlow(e){this.navStack.push(e),this.current=e,this.hooks.flow.call(e)}run(e){return Ir(this,null,(function*(){var t;if(!Object.prototype.hasOwnProperty.call(this.navigation,e))return Promise.reject(new Error(`No flow defined for: ${e}`));const r=this.navigation[e];if(null===r||"object"!==typeof r)return Promise.reject(new Error(`Flow: ${e} needs to be an object`));null==(t=this.log)||t.debug(`Starting flow: ${e}`);const n=new Nr(e,r,{logger:this.log});this.addNewFlow(n),n.hooks.afterTransition.tap("flow-controller",(e=>{var t,r,n;if("FLOW"===(null==(t=e.currentState)?void 0:t.value.state_type)){const t=null==(r=e.currentState)?void 0:r.value.ref;null==(n=this.log)||n.debug(`Loading subflow ${t}`),this.run(t).then((t=>{var r;null==(r=this.log)||r.debug(`Subflow ended. Using outcome: ${t.outcome}`),e.transition(null==t?void 0:t.outcome)}))}}));const i=yield n.start();if(this.navStack.pop(),this.navStack.length>0){const e=0;this.current=this.navStack[e]}return i}))}start(){return Ir(this,null,(function*(){return this.navigation.BEGIN?this.run(this.navigation.BEGIN):Promise.reject(new Error("Must supply a BEGIN state"))}))}}const Br=/%([a-zA-Z]+)/g;var Dr=Object.defineProperty,qr=Object.defineProperties,Mr=Object.getOwnPropertyDescriptors,Vr=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Hr=(e,t,r)=>t in e?Dr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$r=(e,t)=>{for(var r in t||(t={}))Fr.call(t,r)&&Hr(e,r,t[r]);if(Vr)for(var r of Vr(t))zr.call(t,r)&&Hr(e,r,t[r]);return e},Wr=(e,t)=>qr(e,Mr(t));const Gr="validation-binding-tracker";class Yr{constructor(e){this.trackedBindings=new Set,this.options=e}getBindings(){return this.trackedBindings}trackBinding(e){var t,r;this.trackedBindings.has(e)||(this.trackedBindings.add(e),null==(r=null==(t=this.options.callbacks)?void 0:t.onAdd)||r.call(t,e))}applyResolver(e){this.trackedBindings.clear();const t=new Map,r=new Map;let n;const i=new Map;let o=new Map,s=new Map;const a=new Map;e.hooks.beforeUpdate.tap(Gr,(e=>{n=e})),e.hooks.skipResolve.tap(Gr,((e,t)=>{const r=o.get(t);if(!e||!n||!r)return e;return 0===new Set([...n].filter((e=>r.has(e)))).size})),e.hooks.resolveOptions.tap(Gr,((e,n)=>{if(void 0===e.validation)return e;t.delete(n);const i=e=>{var i,o,s,a;const l=M(e)?e:this.options.parseBinding(e);t.has(n)?null==(i=t.get(n))||i.add(l):t.set(n,new Set([l]));let{parent:u}=n;for(;u;){if(r.has(u)){null==(o=r.get(u))||o.add(n);break}u=u.parent}this.trackedBindings.add(l),null==(a=null==(s=this.options.callbacks)?void 0:s.onAdd)||a.call(s,l)};return Wr($r({},e),{validation:Wr($r({},e.validation),{get:(t,r)=>{var n,o;(null==r?void 0:r.track)&&i(t);const s=null==(o=null==(n=e.validation)?void 0:n._getValidationForBinding(t))?void 0:o.getAll(r);return null==s?void 0:s.find((e=>"field"===e.displayTarget||void 0===e.displayTarget))},getValidationsForBinding(t,r){var n,o,s;return(null==r?void 0:r.track)&&i(t),null!=(s=null==(o=null==(n=e.validation)?void 0:n._getValidationForBinding(t))?void 0:o.getAll(r))?s:[]},getChildren:t=>{var r;const i=new Array;return null==(r=o.get(n))||r.forEach((r=>{var n,o;const s=null==(o=null==(n=e.validation)?void 0:n._getValidationForBinding(r))?void 0:o.get();!s||void 0!==t&&t!==s.displayTarget||i.push(s)})),i},getValidationsForSection:()=>{var t;const r=new Array;return null==(t=a.get(n))||t.forEach((t=>{var n,i;const o=null==(i=null==(n=e.validation)?void 0:n._getValidationForBinding(t))?void 0:i.get();o&&"section"===o.displayTarget&&r.push(o)})),r},register:e=>{"section"===(null==e?void 0:e.type)&&(r.has(n)||r.set(n,new Set))},track:i})})})),e.hooks.afterNodeUpdate.tap(Gr,((n,l,u)=>{var c,f;if(l&&function(e,t){var r;i.has(t)?null==(r=i.get(t))||r.add(e):i.set(t,new Set([e]))}(n,l),u.updated){const e=new Set(t.get(n));null==(c=i.get(n))||c.forEach((t=>{var r;null==(r=s.get(t))||r.forEach((t=>e.add(t)))})),s.set(n,e)}else s.set(n,null!=(f=o.get(n))?f:new Set);n===e.root&&(this.trackedBindings=new Set(s.get(n)),o=s,a.clear(),r.forEach(((e,r)=>{const n=new Set;e.forEach((e=>{var r;null==(r=t.get(e))||r.forEach(n.add,n)})),a.set(r,n)})),i.clear(),t.clear(),r.clear(),s=new Map)}))}apply(e){e.hooks.resolver.tap(Gr,this.applyResolver.bind(this))}}var Zr=Object.defineProperty,Qr=Object.defineProperties,Kr=Object.getOwnPropertyDescriptors,Jr=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,tn=(e,t,r)=>t in e?Zr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rn=(e,t)=>{for(var r in t||(t={}))Xr.call(t,r)&&tn(e,r,t[r]);if(Jr)for(var r of Jr(t))en.call(t,r)&&tn(e,r,t[r]);return e},nn=(e,t)=>Qr(e,Kr(t));const on=Symbol.for("validation-provider-name");class sn{constructor(e,t,r,n){this.applicableValidations=[],this.validationsByState={load:[],change:[],navigation:[]},this.onDismiss=t,e.forEach((e=>{const{trigger:t}=e;if(this.validationsByState[t]){const r={value:n=e,type:n.severity,state:"none",isBlockingNavigation:!1};this.validationsByState[t].push(r)}else null==r||r.warn(`Unknown validation trigger: ${t}`);var n})),this.weakBindings=null!=n?n:new Set}get allValidations(){return Object.values(this.validationsByState).flat()}checkIfBlocking(e){if("active"===e.state){const{isBlockingNavigation:t}=e;return t}return!1}getAll(){return this.applicableValidations.reduce(((e,t)=>("active"===t.state&&t.response&&e.push(nn(rn({},t.response),{blocking:this.checkIfBlocking(t)})),e)),[])}get(){const e=this.applicableValidations.find((e=>"active"===e.state&&e.response));if("active"===(null==e?void 0:e.state))return nn(rn({},e.response),{blocking:this.checkIfBlocking(e)})}runApplicableValidations(e,t,r){this.applicableValidations=this.applicableValidations.map((n=>{var i,o,s;if("dismissed"===n.state)return n;const a=null!=(i=n.value.blocking)?i:"warning"!==n.value.severity||"once",l=Object(h.setIn)(n,["value","blocking"],a),u=!0===a||"once"===a&&!t;if("navigation"===r&&"active"===l.state&&!0!==l.value.blocking&&"warning"===l.value.severity){const e=l;return!e.dismissable||!e.response.dismiss||"once"===e.response.blocking&&e.response.blocking?("once"===(null==e?void 0:e.response.blocking)&&(e.response.blocking=!1),e.dismissable=!0):e.response.dismiss(),e}const c=e(l.value),f={type:l.type,value:l.value,state:c?"active":"none",isBlockingNavigation:u,dismissable:"warning"===l.value.severity&&"navigation"===r,response:c?nn(rn({},l.value),{message:null!=(o=c.message)?o:"Something is broken",severity:l.value.severity,displayTarget:null!=(s=l.value.displayTarget)?s:"field"}):void 0};return"active"===f.state&&"warning"===l.value.severity&&(f.response.dismiss=()=>{var e;f.state="dismissed",null==(e=this.onDismiss)||e.call(this)}),f}))}update(e,t,r){const n=[];"load"===e&&void 0!==this.currentPhase||("navigation"!==this.currentPhase&&e!==this.currentPhase?("load"===e?(this.currentPhase="load",this.applicableValidations=[...this.validationsByState.load]):"change"===e&&"load"===this.currentPhase?(this.currentPhase="change",this.applicableValidations=[...this.applicableValidations,...this.validationsByState.change]):"navigation"!==e||"load"!==this.currentPhase&&"change"!==this.currentPhase||(this.applicableValidations.forEach((e=>{"error"===e.type&&"active"===e.state&&!1===e.isBlockingNavigation||n.push(e)})),this.applicableValidations=[...n,...this.validationsByState.navigation,..."load"===this.currentPhase?this.validationsByState.change:[]],this.currentPhase="navigation"),this.runApplicableValidations(r,t,e)):this.runApplicableValidations(r,t,e))}}class an{constructor(e,t){this.hooks={createValidatorRegistry:new n.b,onAddValidation:new n.c,onRemoveValidation:new n.c,resolveValidationProviders:new n.c,onTrackBinding:new n.b},this.validations=new Map,this.weakBindingTracker=new Set,this.schema=e,this.options=t,this.reset()}setOptions(e){this.options=e}getDataMiddleware(){return[{set:(e,t,r)=>{var n;return null!=(n=null==r?void 0:r.set(e,t))?n:[]},get:(e,t,r)=>null==r?void 0:r.get(e,t),delete:(e,t,r)=>(this.validations=gt(this.validations,e),null==r?void 0:r.delete(e,t))},new At((e=>{var t;if(!this.options)return;this.updateValidationsForBinding(e,"change",this.options);const r=this.getValidationForBinding(e);if("error"===(null==(t=null==r?void 0:r.get())?void 0:t.severity))return r.get();const n=new Set;return this.validations.forEach(((t,r)=>{var i;Wt(new Set([e]),t.weakBindings)&&"error"===(null==(i=null==t?void 0:t.get())?void 0:i.severity)&&(null==t||t.weakBindings.forEach((e=>{e===r?n.add({binding:e,isStrong:!0}):n.add({binding:e,isStrong:!1})})))})),n.size>0?n:void 0}),{logger:new Je((()=>{var e;return null==(e=this.options)?void 0:e.logger}))})]}getValidationProviders(){return this.providers||(this.providers=this.hooks.resolveValidationProviders.call([{source:"schema",provider:this.schema},{source:"view",provider:{getValidationsForBinding:e=>{var t,r;return null==(r=null==(t=this.viewValidationProvider)?void 0:t.getValidationsForBinding)?void 0:r.call(t,e)},getValidationsForView:()=>{var e,t;return null==(t=null==(e=this.viewValidationProvider)?void 0:e.getValidationsForView)?void 0:t.call(e)}}}])),this.providers}reset(){this.validations.clear(),this.tracker=void 0}onView(e){if(this.validations.clear(),!this.options)return;const t=new Yr(nn(rn({},this.options),{callbacks:{onAdd:t=>{if(!this.options||void 0!==this.getValidationForBinding(t))return;const r=this.options.model.get(t);r!==this.options.model.get(t,{ignoreDefaultValue:!0})&&this.options.model.set([[t,r]],{silent:!0}),this.updateValidationsForBinding(t,"load",this.options,(()=>{e.update(new Set([t]))})),this.hooks.onTrackBinding.call(t)}}}));this.tracker=t,this.viewValidationProvider=e,t.apply(e)}updateValidationsForBinding(e,t,r,n){var i;const o=null!=r?r:this.options;if(!o)throw new Error("Context is required for executing validations");if("load"===t){const t=this.getValidationProviders().reduce(((t,r)=>{var n,i,o,s;return t.push(...null!=(s=null==(o=null==(i=(n=r.provider).getValidationsForBinding)?void 0:i.call(n,e))?void 0:o.map((e=>nn(rn({},e),{[on]:r.source}))))?s:[]),t}),[]);if(0===t.length)return;this.validations.set(e,new sn(t,n,null==(i=this.options)?void 0:i.logger))}const s=this.validations.get(e);null==s||s.update(t,!0,(t=>{const r=this.validationRunner(t,e,o);if(this.weakBindingTracker.size>0){const t=this.validations.get(e);this.weakBindingTracker.forEach((e=>t.weakBindings.add(e)))}return r?{message:r.message}:void 0})),"load"!==t&&this.validations.forEach(((r,n)=>{n!==e&&Wt(new Set([e]),r.weakBindings)&&r.update(t,!0,(e=>{const t=this.validationRunner(e,n,o);return t?{message:t.message}:void 0}))}))}validationRunner(e,t,r=this.options){var n;if(!r)throw new Error("No context provided to validation runner");const i=null!=(n=e.handler)?n:this.getValidator(e.type),o=new Set,s={get:(e,n)=>(o.add(M(e)?t:r.parseBinding(e)),r.model.get(e,nn(rn({},n),{includeInvalid:!0}))),set:r.model.set,delete:r.model.delete},a=null==i?void 0:i(nn(rn({},r),{evaluate:(e,t={model:s})=>r.evaluate(e,t),model:s,validation:e,schemaType:this.schema.getType(t)}),r.model.get(t,{includeInvalid:!0,formatted:"formatted"===e.dataTarget}),e);if(this.weakBindingTracker=o,a){let{message:t}=a;const{parameters:n}=a;return e.message&&(t=dt(e.message,{model:s,evaluate:r.evaluate}),n&&(t=function(e,t){return e.slice().replace(Br,(e=>t[e.slice(1)]||e))}(t,n))),{message:t}}}updateValidationsForView(e){const t="navigation"===e,r=this.activeBindings,n=t=>{this.getBindings().forEach((r=>{var n;null==(n=this.validations.get(r))||n.update(e,t,(e=>{if(this.options)return this.validationRunner(e,r,this.options)}))}))};if(n(!t),t){const{activeBindings:e}=this;(function(e,t){if(e.size>t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0})(e,r)&&n(!0)}}get activeBindings(){return new Set(Array.from(this.getBindings()).filter((e=>{var t;return void 0!==(null==(t=this.validations.get(e))?void 0:t.get())})))}getValidator(e){if(this.validatorRegistry)return this.validatorRegistry.get(e);const t=new Ot;return this.hooks.createValidatorRegistry.call(t),this.validatorRegistry=t,t.get(e)}getBindings(){var e,t;return null!=(t=null==(e=this.tracker)?void 0:e.getBindings())?t:new Set}trackBinding(e){var t;null==(t=this.tracker)||t.trackBinding(e)}validateView(e="navigation"){this.updateValidationsForView(e);const t=new Map;let r=!0;return this.getBindings().forEach((n=>{var i;const o=null==(i=this.getValidationForBinding(n))?void 0:i.getAll();null==o||o.forEach((i=>{var o;"navigation"===e&&i.blocking&&(null==(o=this.options)||o.logger.debug(`Validation on binding: ${n.asString()} is preventing navigation. ${JSON.stringify(i)}`),r=!1),t.has(n)||t.set(n,i)}))})),{canTransition:r,validations:t.size?t:void 0}}getValidationForBinding(e){return this.validations.get(e)}forView(e){return{_getValidationForBinding:t=>this.getValidationForBinding(M(t)?t:e(t)),getAll:()=>{const e=this.getBindings();if(0===e.size)return;const t=new Map;return e.forEach((e=>{var r;const n=null==(r=this.getValidationForBinding(e))?void 0:r.get();n&&t.set(e,n)})),0===t.size?void 0:t},get(){throw new Error("Error Access be provided by the view plugin")},getValidationsForBinding(){throw new Error("Error rollup should be provided by the view plugin")},getChildren(){throw new Error("Error rollup should be provided by the view plugin")},getValidationsForSection(){throw new Error("Error rollup should be provided by the view plugin")},track:()=>{throw new Error("Tracking should be provided by the view plugin")},register:()=>{throw new Error("Section functionality should be provided by the view plugin")},type:t=>this.schema.getType(M(t)?t:e(t))}}}class ln{constructor(e){this.updateCallback=e,this.state=new Map}removeKey(e){this.state.delete(e)}reset(){this.state.clear()}useSharedState(e){return t=>(this.state.has(e)||this.state.set(e,t),[this.state.get(e),t=>{var r;const n=this.state.get(e);this.state.set(e,t),n!==t&&(null==(r=this.updateCallback)||r.call(this))}])}getLocalStateFunction(e,t){return r=>{this.state.has(e)||this.state.set(e,[]),this.state.has(t)||this.state.set(t,0);const n=this.state.get(e),i=this.state.get(t);this.state.set(t,i+1),n.length<=i&&n.push(r);return[n[i],e=>{var t;const r=n[i];n[i]=e,r!==e&&(null==(t=this.updateCallback)||t.call(this))}]}}}function un(e,t){return e===t||!!e.parent&&un(e.parent,t)}class cn{constructor(e){this.registry=e,this.stateStore=new Map,this.beforeResolveSymbol=Symbol("before resolve"),this.resolveSymbol=Symbol("resolve"),this.beforeResolveCountSymbol=Symbol("before resolve count"),this.resolveCountSymbol=Symbol("resolve count")}apply(e){e.hooks.view.tap("asset-transform",(e=>{this.stateStore.clear(),e.hooks.resolver.tap("asset-transform",(t=>{let r;const n=(t,n)=>{let i;const o=n===this.resolveSymbol?this.resolveCountSymbol:this.beforeResolveCountSymbol,s=this.stateStore.get(t);return s?(i=s,i.removeKey(o)):(i=new ln((()=>{(t=>{r=t,e.update(new Set)})(t)})),this.stateStore.set(t,i)),{useSharedState:e=>i.useSharedState(e),useLocalState:e=>i.getLocalStateFunction(n,o)(e)}};t.hooks.beforeResolve.tap("asset-transform",((e,t)=>{var r;if(e&&("asset"===e.type||"view"===e.type)){const i=this.registry.get(e.value);if(null==i?void 0:i.beforeResolve){const o=n(null!=(r=t.node)?r:e,this.beforeResolveSymbol);return i.beforeResolve(e,t,o)}}return e})),t.hooks.afterUpdate.tap("asset-transform",(()=>{r=void 0})),t.hooks.skipResolve.tap("asset-transform",((e,t)=>{if(!e||!r)return e;const n=un(r,t),i=un(t,r);return!n&&!i})),t.hooks.afterResolve.tap("asset-transform",((e,r,i)=>{if(r.type!==mt.Asset&&r.type!==mt.View)return e;const o=t.getSourceNode(r);if(!o)return e;const s=this.registry.get(e);if(null==s?void 0:s.resolve){const t=n(o,this.resolveSymbol);return null==s?void 0:s.resolve(e,i,t)}return e}))}))}))}}class fn{constructor(e,t){this.hooks={resolveView:new n.c,view:new n.b},this.transformRegistry=new y.a,this.optimizeUpdates=!0,this.viewOptions=t,this.viewMap=e.reduce(((e,t)=>(e[t.id]=t,e)),{}),new cn(this.transformRegistry).apply(this),t.flowController.hooks.flow.tap("viewController",(e=>{e.hooks.transition.tap("viewController",((e,t)=>{"VIEW"===t.value.state_type?this.onView(t.value):this.currentView=void 0}))}));const r=(e,t=!1)=>{this.currentView&&(this.optimizeUpdates?this.queueUpdate(e,t):this.currentView.update())};t.model.hooks.onUpdate.tap("viewController",((e,t)=>{var n;r(new Set(e.map((e=>e.binding))),null!=(n=null==t?void 0:t.silent)&&n)})),t.model.hooks.onDelete.tap("viewController",(e=>{const t=e.parent(),n=e.key();r("number"===typeof n&&t?new Set([t]):new Set([e]))}))}queueUpdate(e,t=!1){var r;(null==(r=this.pendingUpdate)?void 0:r.changedBindings)?this.pendingUpdate.changedBindings=new Set([...this.pendingUpdate.changedBindings,...e]):this.pendingUpdate={changedBindings:e,scheduled:!1},this.pendingUpdate.scheduled||t||(this.pendingUpdate.scheduled=!0,v()((()=>{var e,t;const r=null==(e=this.pendingUpdate)?void 0:e.changedBindings;this.pendingUpdate=void 0,null==(t=this.currentView)||t.update(r)})))}getViewForRef(e){if(this.viewMap[e])return this.viewMap[e];const t=Object.keys(this.viewMap).find((t=>e===ht(t,{model:this.viewOptions.model,evaluate:this.viewOptions.evaluator.evaluate})));return t&&this.viewMap[t]?this.viewMap[t]:void 0}onView(e){const t=e.ref,r=this.hooks.resolveView.call(this.getViewForRef(t),t,e);if(!r)throw new Error(`No view with id ${t}`);const n=new Rr(r,this.viewOptions);this.currentView=n,this.hooks.view.call(n),n.update()}}class hn{constructor(e,t){this.controller=e,this.logger=t}get(e,t){return this.controller.get(e,t)}set(e,t){var r;return null==(r=this.logger)||r.error("Error: Tried to set in a read only instance of the DataController"),[]}delete(e,t){var r;null==(r=this.logger)||r.error("Error: Tried to delete in a read only instance of the DataController")}}class pn{constructor(e,t){this.hooks={resolve:new n.c,resolveDataStages:new n.c,resolveDefaultValue:new n.a,onDelete:new n.b,onSet:new n.b,onGet:new n.b,onUpdate:new n.b,format:new n.c,deformat:new n.c,serialize:new n.c},this.logger=t.logger;const r=t.middleware||[];this.baseMiddleware=[new he(e),...r],this.trash=new Set,this.pathResolver=t.pathResolver}getModel(){if(!this.model){const e=this.hooks.resolveDataStages.call(this.baseMiddleware),t=new fe;t.setMiddleware(e),this.model=t}return this.model}resolveDataValue(e,t,r){return r?this.hooks.deformat.call(t,e):t}set(e,t){let r=[];r=Array.isArray(e)?e.map((([e,r])=>{const n=this.pathResolver.parse(e);return[n,this.resolveDataValue(n,r,Boolean(null==t?void 0:t.formatted))]})):Object.keys(e).map((r=>{const n=this.pathResolver.parse(r),i=e[r];return[n,this.resolveDataValue(n,i,Boolean(null==t?void 0:t.formatted))]}));const n=r.reduce(((e,[t,r])=>{var n,i;const o=this.get(t,{includeInvalid:!0}),s={binding:t,newValue:r,oldValue:o};return Object(p.a)(o,r)?null==(n=this.logger)||n.debug(`Skipping update for path: ${t.asString()}. Value was unchanged: ${o}`):(e.push(s),null==(i=this.logger)||i.debug(`Setting path: ${t.asString()} from: ${o} to: ${r}`)),e}),[]),i=this.getModel().set(r,t),o=new Set(n.map((e=>e.binding)));return i.forEach((e=>{var t;o.has(e.binding)||!0!==e.force&&Object(p.a)(e.oldValue,e.newValue)||(null==(t=this.logger)||t.debug(`Path: ${e.binding.asString()} was changed from: ${e.oldValue} to: ${e.newValue}`),n.push(e))})),this.hooks.onSet.call(r),n.length>0&&this.hooks.onUpdate.call(n,t),i}resolve(e,t){return Array.isArray(e)||"string"===typeof e?this.pathResolver.parse(e,{readOnly:t}):e}get(e,t){const r=e instanceof V?e:this.resolve(e,!0);let n=this.getModel().get(r,t);if(void 0===n&&!(null==t?void 0:t.ignoreDefaultValue)){const e=this.hooks.resolveDefaultValue.call(r);e!==n&&(n=e)}return(null==t?void 0:t.formatted)?n=this.hooks.format.call(n,r):!1===(null==t?void 0:t.formatted)&&(n=this.hooks.deformat.call(n,r)),this.hooks.onGet.call(e,n),n}delete(e,t){if("string"!==typeof e&&!Array.isArray(e)&&!(e instanceof V))throw new Error("Invalid arguments: delete expects a data path (string)");const r=e instanceof V?e:this.resolve(e,!1),n=r.parent(),i=r.key(),o=this.get(n),s="object"===typeof o&&null!==o&&Object.prototype.hasOwnProperty.call(o,i);this.getModel().delete(r,t),s&&!this.get(r)&&this.trash.add(r),this.hooks.onDelete.call(r)}serialize(){return this.hooks.serialize.call(this.get(""))}makeReadOnly(){return new hn(this,this.logger)}}var dn=Object.defineProperty,gn=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,yn=(e,t,r)=>t in e?dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bn=(e,t)=>{for(var r in t||(t={}))mn.call(t,r)&&yn(e,r,t[r]);if(gn)for(var r of gn(t))vn.call(t,r)&&yn(e,r,t[r]);return e};function wn(e,t=[],r="."){return Object.keys(e).reduce(((n,i)=>bn(bn({},n),"[object Object]"===Object.prototype.toString.call(e[i])?wn(e[i],t.concat([i])):{[t.concat([i]).join(r)]:e[i]})),{})}function En(e){const t=wn(e),r=[];return Object.keys(t).forEach((e=>{r.push([new V(e),t[e]])})),r}class xn{constructor(){this.store=new Map,this.tempStore=new Map}addConstants(e,t){var r;this.store.has(t)?null==(r=this.store.get(t))||r.set(En(e)):this.store.set(t,new he(e))}getConstants(e,t,r){var n,i,o,s;const a=new V(e);return null!=(s=null!=(o=null==(n=this.tempStore.get(t))?void 0:n.get(a))?o:null==(i=this.store.get(t))?void 0:i.get(a))?s:r}setTemporaryValues(e,t){var r;this.tempStore.has(t)?null==(r=this.tempStore.get(t))||r.set(En(e)):this.tempStore.set(t,new he(e))}clearTemporaryValues(e){var t;e?null==(t=this.tempStore.get(e))||t.reset():this.tempStore.forEach((e=>{e.reset()}))}}class kn{constructor(){this.name="flow-exp-plugin"}apply(e){let t;const r=e=>{e&&("object"===typeof e&&"exp"in e?null==t||t.evaluate(e.exp):null==t||t.evaluate(e))};e.hooks.expressionEvaluator.tap(this.name,(e=>{t=e})),e.hooks.flowController.tap(this.name,(e=>{e.hooks.flow.tap(this.name,(e=>{e.hooks.onStart.tap(this.name,(e=>r(e))),e.hooks.onEnd.tap(this.name,(e=>r(e))),e.hooks.resolveTransitionNode.intercept({call:e=>{(null==e?void 0:e.onStart)&&r(e.onStart)}})}))}))}}class Sn{constructor(){this.name="flow-exp-plugin"}apply(e){let t;e.hooks.schema.tap(this.name,(e=>{var r;r=e,t=(e,t,n)=>{var i,o;return null!=(o=null==(i=r.getFormatterForType({type:n}))?void 0:i.format(t))?o:t}})),e.hooks.expressionEvaluator.tap(this.name,(r=>{t&&r.addExpressionFunction("format",t),r.addExpressionFunction("log",((t,...r)=>{e.logger.info(...r)})),r.addExpressionFunction("debug",((t,...r)=>{e.logger.debug(...r)})),r.addExpressionFunction("eval",((e,...t)=>e.evaluate(...t)))}))}}const An={ref:Symbol("not-started"),status:"not-started"};var On=Object.defineProperty,Rn=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,Pn=Object.getOwnPropertySymbols,_n=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,Ln=(e,t,r)=>t in e?On(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jn=(e,t)=>{for(var r in t||(t={}))_n.call(t,r)&&Ln(e,r,t[r]);if(Pn)for(var r of Pn(t))Cn.call(t,r)&&Ln(e,r,t[r]);return e};const Nn=class{constructor(e){var t;this.logger=new Ke,this.constantsController=new xn,this.state=An,this.hooks={flowController:new n.b,viewController:new n.b,view:new n.b,expressionEvaluator:new n.b,dataController:new n.b,schema:new n.b,validationController:new n.b,bindingParser:new n.b,state:new n.b,onStart:new n.b,onEnd:new n.b,resolveFlowContent:new n.c},(null==e?void 0:e.logger)&&this.logger.addHandler(e.logger),this.config=e||{},this.config.plugins=[new Sn,...this.config.plugins||[],new kn],null==(t=this.config.plugins)||t.forEach((e=>{e.apply(this)}))}getPlugins(){var e;return null!=(e=this.config.plugins)?e:[]}findPlugin(e){var t;return null==(t=this.config.plugins)?void 0:t.find((t=>t.symbol===e))}applyTo(e,t){const r=this.findPlugin(e);r&&t(r)}registerPlugin(e){var t;e.apply(this),null==(t=this.config.plugins)||t.push(e)}getVersion(){return Nn.info.version}getCommit(){return Nn.info.commit}getState(){return this.state}setState(e){this.state=e,this.hooks.state.call(e)}setupFlow(e){const t=this.hooks.resolveFlowContent.call(e),r=new Ur(t.navigation,{logger:this.logger});let n,i;this.hooks.onStart.call(t),this.hooks.flowController.call(r);const o=new ie({get:e=>i.get(e),set:e=>i.set(e),evaluate:e=>n.evaluate(e)});this.hooks.bindingParser.call(o);const s=o.parse,a=g()(),l=new lt(t.schema);this.hooks.schema.call(l);const u=new an(l);let c;function f(e,t){return dt(e,{model:i,evaluate:n.evaluate,formatted:t})}var p,d;return this.hooks.validationController.call(u),i=new pn(t.data,{pathResolver:o,middleware:u.getDataMiddleware(),logger:this.logger}),i.hooks.format.tap("player",((e,t)=>{const r=l.getFormatter(t);return r?r.format(e):e})),i.hooks.deformat.tap("player",((e,t)=>{const r=l.getFormatter(t);return r?r.deformat(e):e})),i.hooks.resolveDefaultValue.tap("player",(e=>{var t;return null==(t=l.getApparentType(e))?void 0:t.default})),n=new Qe({model:i,logger:this.logger}),this.hooks.expressionEvaluator.call(n),n.hooks.onError.tap("player",(e=>(a.reject(e),!0))),r.hooks.flow.tap("player",(e=>{e.hooks.beforeTransition.tap("player",((e,t)=>{const r=e.transitions[t]?t:"*";return e.onEnd&&e.transitions[r]&&("object"===typeof e.onEnd&&"exp"in e.onEnd?null==n||n.evaluate(e.onEnd.exp):null==n||n.evaluate(e.onEnd)),"transitions"in e&&e.transitions[r]?Object(h.setIn)(e,["transitions",r],f(e.transitions[r])):e})),e.hooks.skipTransition.tap("validation",(e=>{var t;if("VIEW"===(null==e?void 0:e.value.state_type)){const{canTransition:e,validations:r}=u.validateView("navigation");if(!e&&r){const e=new Set(r.keys());return null==(t=null==c?void 0:c.currentView)||t.update(e),!0}}})),e.hooks.resolveTransitionNode.tap("player",(e=>{let t=e;return"ref"in e&&(t=Object(h.setIn)(e,["ref"],f(e.ref))),"param"in e&&(t=Object(h.setIn)(e,["param"],f(e.param,!1))),t})),e.hooks.transition.tap("player",((e,t)=>{"VIEW"!==t.value.state_type&&u.reset()})),e.hooks.afterTransition.tap("player",(e=>{var t;const i=null==(t=e.currentState)?void 0:t.value;if(i&&"ACTION"===i.state_type){const{exp:e}=i;null==r||r.transition(String(null==n?void 0:n.evaluate(e)))}n.reset()}))})),this.hooks.dataController.call(i),u.setOptions({parseBinding:s,model:i,logger:this.logger,evaluate:n.evaluate,constants:this.constantsController}),c=new fn(t.views||[],{evaluator:n,parseBinding:s,transition:r.transition,model:i,utils:{findPlugin:e=>this.findPlugin(e)},logger:this.logger,flowController:r,schema:l,format:(e,t)=>{const r=l.getFormatter(e);return(null==r?void 0:r.format)?r.format(t):t},formatValue:(e,t)=>{const r=l.getFormatterForType(e);return(null==r?void 0:r.format)?r.format(t):t},validation:(p=jn({},u.forView(s)),d={type:e=>l.getType(s(e))},Rn(p,Tn(d))),constants:this.constantsController}),c.hooks.view.tap("player",(e=>{u.onView(e),this.hooks.view.call(e)})),this.hooks.viewController.call(c),{start:()=>{r.start().then((e=>({endState:f(e,!1),data:i.serialize()}))).then(a.resolve).catch((e=>{throw this.logger.error(`Something went wrong: ${e.message}`),e})).catch(a.reject).finally((()=>this.hooks.onEnd.call()))},state:{status:"in-progress",flowResult:a.promise,controllers:{data:i,view:c,flow:r,schema:l,expression:n,binding:o,validation:u},fail:a.reject,flow:t,logger:this.logger}}}start(e){return t=this,r=null,n=function*(){var t;const r=Symbol(null!=(t=null==e?void 0:e.id)?t:"payload"),n=e=>this.state.ref!==r?(this.logger.warn("Received update for a flow that's not the current one"),e):(this.setState(e),e);this.setState({status:"not-started",ref:r});try{const{state:t,start:i}=this.setupFlow(e);this.setState(jn({ref:r},t)),i();const o={ref:r,status:"completed",flow:t.flow,controllers:{data:t.controllers.data.makeReadOnly()}};return n(jn(jn({},yield t.flowResult),o))}catch(i){throw n({status:"error",ref:r,flow:e,error:i}),i}},new Promise(((e,i)=>{var o=e=>{try{a(n.next(e))}catch(t){i(t)}},s=e=>{try{a(n.throw(e))}catch(t){i(t)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,s);a((n=n.apply(t,r)).next())}));var t,r,n}};Nn.info={version:"0.7.4-next.1",commit:"5eab9a87e898ee0b01ccee09c158dbaeaec5563e"}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Parser=exports.findRuleByName=exports.parseRuleName=exports.escapeRegExp=exports.readToken=void 0;const UPPER_SNAKE_RE=/^[A-Z0-9_]+$/,decorationRE=/(\?|\+|\*)$/,preDecorationRE=/^(@|&|!)/,WS_RULE="WS",TokenError_1=__webpack_require__(8);function readToken(e,t){let r=t.exec(e);return r&&0==r.index?0==r[0].length&&t.source.length>0?null:{type:null,text:r[0],rest:e.substr(r[0].length),start:0,end:r[0].length-1,fullText:r[0],errors:[],children:[],parent:null}:null}function escapeRegExp(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function fixRest(e){e.rest="",e.children&&e.children.forEach((e=>fixRest(e)))}function fixPositions(e,t){e.start+=t,e.end+=t,e.children&&e.children.forEach((t=>fixPositions(t,e.start)))}function agregateErrors(e,t){t.errors&&t.errors.length&&t.errors.forEach((t=>e.push(t))),t.children&&t.children.forEach((t=>agregateErrors(e,t)))}function parseRuleName(e){let t=decorationRE.exec(e),r=preDecorationRE.exec(e),n=t&&t[0]||"",i=r&&r[0]||"",o={raw:e,name:e.replace(decorationRE,"").replace(preDecorationRE,""),isOptional:"?"==n||"*"==n,allowRepetition:"+"==n||"*"==n,atLeastOne:"+"==n,lookupPositive:"&"==i,lookupNegative:"!"==i,pinned:"@"==i,lookup:!1,isLiteral:!1};return o.isLiteral="'"==o.name[0]||'"'==o.name[0],o.lookup=o.lookupNegative||o.lookupPositive,o}function findRuleByName(e,t){let r=parseRuleName(e);return t.cachedRules[r.name]||null}function stripRules(e,t){if(e.children){let r=e.children.filter((e=>e.type&&t.test(e.type)));for(let t=0;t<r.length;t++){let n=e.children.indexOf(r[t]);-1!=n&&e.children.splice(n,1)}e.children.forEach((e=>stripRules(e,t)))}}exports.readToken=readToken,exports.escapeRegExp=escapeRegExp,exports.parseRuleName=parseRuleName,exports.findRuleByName=findRuleByName;const ignoreMissingRules=["EOF"];class Parser{constructor(e,t){this.grammarRules=e,this.options=t,this.cachedRules={},this.debug=!!t&&!0===t.debug;let r=[],n=[];if(e.forEach((e=>{let t=parseRuleName(e.name);if(t.name in this.cachedRules)r.push("Duplicated rule "+t.name);else{if(this.cachedRules[t.name]=e,e.bnf&&e.bnf.length)e.bnf.forEach((t=>{if("string"===typeof t[0]){if(parseRuleName(t[0]).name==e.name){let t="Left recursion is not allowed, rule: "+e.name;-1==r.indexOf(t)&&r.push(t)}}t.forEach((e=>{if("string"==typeof e){let t=parseRuleName(e);t.isLiteral||-1!=n.indexOf(t.name)||-1!=ignoreMissingRules.indexOf(t.name)||n.push(t.name)}}))}));else{let t="Missing rule content, rule: "+e.name;-1==r.indexOf(t)&&r.push(t)}WS_RULE==e.name&&(e.implicitWs=!1),e.implicitWs&&-1==n.indexOf(WS_RULE)&&n.push(WS_RULE),e.recover&&-1==n.indexOf(e.recover)&&n.push(e.recover)}})),n.forEach((e=>{e in this.cachedRules||r.push("Missing rule "+e)})),r.length)throw new Error(r.join("\n"))}getAST(e,t){t||(t=this.grammarRules.filter((e=>!e.fragment&&0!=e.name.indexOf("%")))[0].name);let r=this.parse(e,t);if(r){agregateErrors(r.errors,r),fixPositions(r,0),stripRules(r,/^%/),this.options&&this.options.keepUpperRules||stripRules(r,UPPER_SNAKE_RE);let e=r.rest;e&&new TokenError_1.TokenError("Unexpected end of input: \n"+e,r),fixRest(r),r.rest=e}return r}emitSource(){return"CANNOT EMIT SOURCE FROM BASE Parser"}parse(txt,target,recursion=0){let out=null,type=parseRuleName(target),expr,printable=this.debug&&!UPPER_SNAKE_RE.test(type.name);printable&&console.log(new Array(recursion).join("\u2502 ")+"Trying to get "+target+" from "+JSON.stringify(txt.split("\n")[0]));let realType=type.name,targetLex=findRuleByName(type.name,this);if("EOF"==type.name){if(txt.length)return null;if(0==txt.length)return{type:"EOF",text:"",rest:"",start:0,end:0,fullText:"",errors:[],children:[],parent:null}}try{if(!targetLex&&type.isLiteral){let src=eval(type.name);if(""===src)return{type:"%%EMPTY%%",text:"",rest:txt,start:0,end:0,fullText:"",errors:[],children:[],parent:null};expr=new RegExp(escapeRegExp(src)),realType=null}}catch(e){return e instanceof ReferenceError&&console.error(e),null}if(expr){let e=readToken(txt,expr);if(e)return e.type=realType,e}else{let e=targetLex.bnf;e instanceof Array&&e.forEach((e=>{if(out)return;let t=null,r={type:type.name,text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:txt};targetLex.fragment&&(r.fragment=!0);let n=txt,i=0,o=e.length>0,s=!1;for(let a=0;a<e.length;a++)if("string"==typeof e[a]){let l,u=parseRuleName(e[a]);o=o&&u.isOptional;let c=!1;do{if(l=null,targetLex.implicitWs&&(l=this.parse(n,u.name,recursion+1),!l)){let e;do{if(e=this.parse(n,WS_RULE,recursion+1),!e)break;r.text=r.text+e.text,r.end=r.text.length,e.parent=r,r.children.push(e),n=n.substr(e.text.length),i+=e.text.length}while(e&&e.text.length)}if(l=l||this.parse(n,u.name,recursion+1),u.lookupNegative){if(l)return;break}if(u.lookupPositive&&!l)return;if(!l){if(u.isOptional)break;if(u.atLeastOne&&c)break}if(l&&targetLex.pinned==a+1&&(t=l,printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514\u2500 "+l.type+" PINNED")),l||(l=this.parseRecovery(targetLex,n,recursion+1)),!l){if(!t)return;out=r,l={type:"SyntaxError",text:n,children:[],end:n.length,errors:[],fullText:"",parent:null,start:0,rest:""},n.length?new TokenError_1.TokenError(`Unexpected end of input. Expecting ${u.name} Got: ${n}`,l):new TokenError_1.TokenError(`Unexpected end of input. Missing ${u.name}`,l),printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514\u2500 "+l.type+" "+JSON.stringify(l.text))}if(c=!0,s=!0,"%%EMPTY%%"==l.type)break;l.start+=i,l.end+=i,!u.lookupPositive&&l.type&&(l.fragment?l.children&&l.children.forEach((e=>{e.start+=i,e.end+=i,e.parent=r,r.children.push(e)})):(l.parent=r,r.children.push(l))),u.lookup&&(l.lookup=!0),printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514\u2500 "+l.type+" "+JSON.stringify(l.text)),u.lookup||l.lookup||(r.text=r.text+l.text,r.end=r.text.length,n=n.substr(l.text.length),i+=l.text.length),r.rest=n}while(l&&u.allowRepetition&&n.length&&!l.lookup)}else{let t=readToken(n,e[a]);if(!t)return;printable&&console.log(new Array(recursion+1).join("\u2502 ")+"\u2514> "+JSON.stringify(t.text)+e[a].source),s=!0,t.start+=i,t.end+=i,r.text=r.text+t.text,r.end=r.text.length,n=n.substr(t.text.length),i+=t.text.length,r.rest=n}s&&(out=r,printable&&console.log(new Array(recursion).join("\u2502 ")+"\u251c<\u2500\u2534< PUSHING "+out.type+" "+JSON.stringify(out.text)))})),out&&targetLex.simplifyWhenOneChildren&&1==out.children.length&&(out=out.children[0])}return out||printable&&console.log(target+" NOT RESOLVED FROM "+txt),out}parseRecovery(e,t,r){if(e.recover&&t.length){let n=this.debug;n&&console.log(new Array(r+1).join("\u2502 ")+"Trying to recover until token "+e.recover+" from "+JSON.stringify(t.split("\n")[0]+t.split("\n")[1]));let i,o={type:"SyntaxError",text:"",children:[],end:0,errors:[],fullText:"",parent:null,start:0,rest:""};do{if(i=this.parse(t,e.recover,r+1),i){new TokenError_1.TokenError('Unexpected input: "'+o.text+`" Expecting: ${e.name}`,o);break}o.text=o.text+t[0],o.end=o.text.length,t=t.substr(1)}while(!i&&t.length>0);if(o.text.length>0&&i)return n&&console.log(new Array(r+1).join("\u2502 ")+"Recovered text: "+JSON.stringify(o.text)),o}return null}}exports.Parser=Parser,exports.default=Parser},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=Object.prototype.hasOwnProperty;function i(e,t,r){for(r of e.keys())if(o(r,t))return r}function o(e,t){var r,s,a;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((s=e.length)===t.length)for(;s--&&o(e[s],t[s]););return-1===s}if(r===Set){if(e.size!==t.size)return!1;for(s of e){if((a=s)&&"object"===typeof a&&!(a=i(t,a)))return!1;if(!t.has(a))return!1}return!0}if(r===Map){if(e.size!==t.size)return!1;for(s of e){if((a=s[0])&&"object"===typeof a&&!(a=i(t,a)))return!1;if(!o(s[1],t.get(a)))return!1}return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((s=e.byteLength)===t.byteLength)for(;s--&&e.getInt8(s)===t.getInt8(s););return-1===s}if(ArrayBuffer.isView(e)){if((s=e.byteLength)===t.byteLength)for(;s--&&e[s]===t[s];);return-1===s}if(!r||"object"===typeof e){for(r in s=0,e){if(n.call(e,r)&&++s&&!n.call(t,r))return!1;if(!(r in t)||!o(e[r],t[r]))return!1}return Object.keys(t).length===s}}return e!==e&&t!==t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenError=void 0;class n extends Error{constructor(e,t){if(super(e),this.message=e,this.token=t,!t||!t.errors)throw this;t.errors.push(this)}inspect(){return"SyntaxError: "+this.message}}t.TokenError=n},function(e,t,r){"use strict";function n(e,t){for(var r,i=0,o=e.length;i<o;i++)r=e[i],Array.isArray(r)?n(r,t):t.push(r);return t}e.exports=function(e){return n(e,[])}},function(e,t,r){"use strict";e.exports=()=>{const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return n.Parser}});var i=r(8);Object.defineProperty(t,"TokenError",{enumerable:!0,get:function(){return i.TokenError}}),t.Grammars=r(22)},function(e,t,r){(function(t){let r;e.exports="function"===typeof queueMicrotask?queueMicrotask.bind("undefined"!==typeof window?window:t):e=>(r||(r=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)))}).call(this,r(11))},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(15),i=r.n(n),o=r(4),s=r.n(o);function a(e,t=[],r=new Map){for(const n of Object.keys(e)){const i=e[n],o=[...t,n];"object"===typeof i?a(i,o,r):r.set(o,i)}return r}function l(e){const t=a(e),r=e=>{for(const r of t){const[t,n]=r;if(s()(e,t)!==n)return!1}return!0};return r.count=t.size,r}const u=()=>new i.a([],(e=>e.matcher.count));class c{constructor(e){this.store=u(),null==e||e.forEach((([e,t])=>{this.set(e,t)}))}set(e,t){const r="object"===typeof e?l(e):function(e){const t=t=>e===t;return t.count=1,t}(e);this.store.insert({key:e,value:t,matcher:r})}get(e){for(const t of this.store.array)if(t.matcher(e))return t.value}forEach(e){for(const t of this.store.array)e(t)}clear(){this.store=u()}}},function(e,t,r){var n,i=function(){var e=function(e){var t=e.constructor;return t.prototype=e,t}({constructor:function(e,r){this.array=[],this.compare=r||t;for(var n=e.length,i=0;i<n;)this.insert(e[i++])},insert:function(e){for(var t,r,n=this.array,i=this.compare,o=n.length-1,s=0,a=-1;o>=s;)if((r=i(n[t=(o+s)/2>>>0],e))<0)s=t+1;else{if(!(r>0)){a=t;break}o=t-1}for(-1===a&&(a=o),a++,o=n.length-1;a<o&&0===i(e,n[a]);)a++;for(t=n.length,n.push(e);t>a;)n[t]=n[--t];return n[a]=e,this},search:function(e){for(var t,r,n=this.array,i=this.compare,o=n.length-1,s=0;o>=s;)if((r=i(n[t=(o+s)/2>>>0],e))<0)s=t+1;else{if(!(r>0))return t;o=t-1}return-1},remove:function(e){var t=this.search(e);return t>=0&&this.array.splice(t,1),this}});return e.comparing=function(r,n){return new e(n,(function(e,n){return t(e[r],n[r])}))},e;function t(e,t){return e<t?-1:e>t?1:0}}();e.exports=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},,,function(e,t,r){"use strict";(function(e){var n=r(19),i=r(20),o=r(21);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,r){if(!l.TYPED_ARRAY_SUPPORT&&!(this instanceof l))return new l(e,t,r);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,r)}function u(e,t,r,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,r,n):"string"===typeof t?function(e,t,r){"string"===typeof r&&""!==r||(r="utf8");if(!l.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(t,r),i=(e=a(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(l.isBuffer(t)){var r=0|p(t.length);return 0===(e=a(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(n=t.length)!==n?a(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=a(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function h(e,t){var r=t.length<0?0:0|p(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(l.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"===typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=r;o<a;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var f=!0,h=0;h<l;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[r+s]=a}return s}function w(e,t,r,n){return z(V(t,e.length-r),e,r,n)}function E(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function x(e,t,r,n){return E(e,t,r,n)}function k(e,t,r,n){return z(F(t),e,r,n)}function S(e,t,r,n){return z(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,l,u=e[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128===(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],s=e[i+2],128===(192&o)&&128===(192&s)&&(l=(15&u)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(l=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=s(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,r){return u(null,e,t,r)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,r){return function(e,t,r,n){return c(t),t<=0?a(e,t):void 0!==r?"string"===typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}(null,e,t,r)},l.allocUnsafe=function(e){return f(null,e)},l.allocUnsafeSlow=function(e){return f(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=l.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(!l.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},l.byteLength=d,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,r,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(n,i),c=e.slice(t,r),f=0;f<a;++f)if(u[f]!==c[f]){o=u[f],s=c[f];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"===typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function P(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function _(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=M(e[o]);return i}function C(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function L(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function I(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;r=new l(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},l.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},l.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||L(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},l.prototype.fill=function(e,t,r,n){if("string"===typeof e){if("string"===typeof t?(n=t,t=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=l.isBuffer(e)?e:V(new l(e,n).toString()),a=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function F(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(11))},function(e,t,r){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=u(e),s=n[0],a=n[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),c=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,l=r-i;a<l;a+=s)o.push(c(e,a,a+s>l?l:a+s));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a<l;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<<a)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,p=e[t+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+e[t+f],f+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=u}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*l-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(23);Object.defineProperty(t,"BNF",{enumerable:!0,get:function(){return n.default}});var i=r(25);Object.defineProperty(t,"W3C",{enumerable:!0,get:function(){return i.default}});var o=r(26);Object.defineProperty(t,"Custom",{enumerable:!0,get:function(){return o.default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(24),i=r(6);var o;!function(e){function t(e){let r=n.findChildrenByType(e,"term").map((e=>n.findChildrenByType(e,"literal").concat(n.findChildrenByType(e,"rule-name"))[0].text));return n.findChildrenByType(e,"list").forEach((e=>{r=r.concat(t(e))})),r}function r(r,i=e.defaultParser){let o=i.getAST(r);if(!o)throw new Error("Could not parse "+r);if(o.errors&&o.errors.length)throw o.errors[0];let s=n.findChildrenByType(o,"rule").map((e=>{let r=n.findChildrenByType(e,"rule-name")[0].text,i=n.findChildrenByType(e,"firstExpression").concat(n.findChildrenByType(e,"otherExpression")),o=[];return i.forEach((e=>{o.push(t(e))})),{name:r,bnf:o}}));return s.some((e=>"EOL"==e.name))||s.push({name:"EOL",bnf:[['"\\r\\n"','"\\r"','"\\n"']]}),s}e.RULES=[{name:"syntax",bnf:[["RULE_EOL*","rule+"]]},{name:"rule",bnf:[['" "*','"<"',"rule-name",'">"','" "*','"::="',"firstExpression","otherExpression*",'" "*',"RULE_EOL+",'" "*']]},{name:"firstExpression",bnf:[['" "*',"list"]]},{name:"otherExpression",bnf:[['" "*','"|"','" "*',"list"]]},{name:"RULE_EOL",bnf:[['"\\r"'],['"\\n"']]},{name:"list",bnf:[["term",'" "*',"list"],["term"]]},{name:"term",bnf:[["literal"],['"<"',"rule-name",'">"']]},{name:"literal",bnf:[["'\"'","RULE_CHARACTER1*","'\"'"],['"\'"',"RULE_CHARACTER2*",'"\'"']]},{name:"RULE_CHARACTER",bnf:[['" "'],["RULE_LETTER"],["RULE_DIGIT"],["RULE_SYMBOL"]]},{name:"RULE_LETTER",bnf:[['"A"'],['"B"'],['"C"'],['"D"'],['"E"'],['"F"'],['"G"'],['"H"'],['"I"'],['"J"'],['"K"'],['"L"'],['"M"'],['"N"'],['"O"'],['"P"'],['"Q"'],['"R"'],['"S"'],['"T"'],['"U"'],['"V"'],['"W"'],['"X"'],['"Y"'],['"Z"'],['"a"'],['"b"'],['"c"'],['"d"'],['"e"'],['"f"'],['"g"'],['"h"'],['"i"'],['"j"'],['"k"'],['"l"'],['"m"'],['"n"'],['"o"'],['"p"'],['"q"'],['"r"'],['"s"'],['"t"'],['"u"'],['"v"'],['"w"'],['"x"'],['"y"'],['"z"']]},{name:"RULE_DIGIT",bnf:[['"0"'],['"1"'],['"2"'],['"3"'],['"4"'],['"5"'],['"6"'],['"7"'],['"8"'],['"9"']]},{name:"RULE_SYMBOL",bnf:[['"-"'],['"_"'],['"!"'],['"#"'],['"$"'],['"%"'],['"&"'],['"("'],['")"'],['"*"'],['"+"'],['","'],['"-"'],['"."'],['"/"'],['":"'],['";"'],['"<"'],['"="'],['">"'],['"?"'],['"@"'],['"["'],['"\\"'],['"]"'],['"^"'],['"_"'],['"`"'],['"{"'],['"|"'],['"}"'],['"~"']]},{name:"RULE_CHARACTER1",bnf:[["RULE_CHARACTER"],['"\'"']]},{name:"RULE_CHARACTER2",bnf:[["RULE_CHARACTER"],["'\"'"]]},{name:"rule-name",bnf:[["RULE_LETTER","RULE_CHAR*"]]},{name:"RULE_CHAR",bnf:[["RULE_LETTER"],["RULE_DIGIT"],['"_"'],['"-"']]}],e.defaultParser=new i.Parser(e.RULES,{debug:!1}),e.getRules=r,e.Transform=function(t,n=e.defaultParser){return r(t.join(""),n)};class o extends i.Parser{constructor(t,n){super(r(t,n&&!0===n.debugRulesParser?new i.Parser(e.RULES,{debug:!0}):e.defaultParser),n),this.source=t}emitSource(){return this.source}}e.Parser=o}(o||(o={})),t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findChildrenByType=void 0,t.findChildrenByType=function(e,t){return e.children?e.children.filter((e=>e.type==t)):[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6);var i;!function(e){e.RULES=[{name:"Grammar",bnf:[["RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_WHITESPACE*",'"|"',"RULE_WHITESPACE*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","Item"],["Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"Item",bnf:[["RULE_WHITESPACE*","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"DecorationName",bnf:[['"ebnf://"',/[^\x5D#]+/]]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_WHITESPACE*","Choice","RULE_WHITESPACE*",'")"']]},{name:"StringLiteral",bnf:[["'\"'",/[^"]*/,"'\"'"],['"\'"',/[^']*/,'"\'"']],pinned:1},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[['!"*/"',/[^*]/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],e.defaultParser=new n.Parser(e.RULES,{debug:!1});const t=/^(!|&)/,r=/(\?|\+|\*)$/,i=/^%/;function o(e,o){if("string"==typeof e){if(t.test(e))return"";if(i.test(e)){let t=r.exec(e),i=t?t[0]+" ":"",a=function(e,t){let r=n.findRuleByName(e,t);return r&&1==r.bnf.length&&1==r.bnf[0].length&&(r.bnf[0][0]instanceof RegExp||'"'==r.bnf[0][0][0]||"'"==r.bnf[0][0][0])}(e,o);return a?s(e,o)+i:"("+s(e,o)+")"+i}return e}return e.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]")}function s(e,t){let r=n.findRuleByName(e,t);return r?r.bnf.map((e=>function(e,t){return e.map((e=>o(e,t))).join(" ")}(e,t))).join(" | "):"RULE_NOT_FOUND {"+e+"}"}function a(e){let t=[];return e.grammarRules.forEach((r=>{if(!/^%/.test(r.name)){let n=r.recover?" /* { recoverUntil="+r.recover+" } */":"";t.push(r.name+" ::= "+s(r.name,e)+n)}})),t.join("\n")}e.emit=a;let l=0;function u(e){return new RegExp(e.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function c(e,t,r){let n=null,i=[];return t.children.forEach(((o,s)=>{"Minus"==o.type&&function(e,t){throw console.log("reberia restar "+t+" a "+e),new Error("Difference not supported yet")}(n,o);let a=t.children[s+1];a=a&&"PrimaryDecoration"==a.type&&a.text||"";switch(o.type){case"SubItem":let t="%"+(r+l++);f(e,o,t),i.push(""+t+a);break;case"NCName":case"StringLiteral":i.push(""+o.text+a);break;case"CharCode":case"CharClass":if(a){let t={name:"%"+(r+l++),bnf:[[u(o.text)]]};e.push(t),i.push(""+t.name+a)}else i.push(u(o.text));break;case"PrimaryDecoration":break;default:throw new Error(" HOW SHOULD I PARSE THIS? "+o.type+" -> "+JSON.stringify(o.text))}n=o})),i}function f(e,t,r){let n=t.children.filter((e=>"SequenceOrDifference"==e.type)).map((t=>c(e,t,r))),i={name:r,bnf:n},o=null;n.forEach((e=>{o=o||e.recover,delete e.recover})),0==r.indexOf("%")&&(i.fragment=!0),o&&(i.recover=o),e.push(i)}function h(t,r=e.defaultParser){let n=r.getAST(t);if(!n)throw new Error("Could not parse "+t);if(n.errors&&n.errors.length)throw n.errors[0];let i=[];return n.children.filter((e=>"Production"==e.type)).map((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;f(i,e,t)})),i}e.getRules=h,e.Transform=function(t,r=e.defaultParser){return h(t.join(""),r)};class p extends n.Parser{constructor(t,r){super(h(t,r&&!0===r.debugRulesParser?new n.Parser(e.RULES,{debug:!0}):e.defaultParser),r)}emitSource(){return a(this)}}e.Parser=p}(i||(i={})),t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8),i=r(6);var o;!function(e){e.RULES=[{name:"Grammar",bnf:[["RULE_S*","Attributes?","RULE_S*","%Atomic*","EOF"]]},{name:"%Atomic",bnf:[["Production","RULE_S*"]],fragment:!0},{name:"Production",bnf:[["NCName","RULE_S*",'"::="',"RULE_WHITESPACE*","%Choice","RULE_WHITESPACE*","Attributes?","RULE_EOL+","RULE_S*"]]},{name:"NCName",bnf:[[/[a-zA-Z][a-zA-Z_0-9]*/]]},{name:"Attributes",bnf:[['"{"',"Attribute","%Attributes*","RULE_S*",'"}"']]},{name:"%Attributes",bnf:[["RULE_S*",'","',"Attribute"]],fragment:!0},{name:"Attribute",bnf:[["RULE_S*","NCName","RULE_WHITESPACE*",'"="',"RULE_WHITESPACE*","AttributeValue"]]},{name:"AttributeValue",bnf:[["NCName"],[/[1-9][0-9]*/]]},{name:"%Choice",bnf:[["SequenceOrDifference","%_Choice_1*"]],fragment:!0},{name:"%_Choice_1",bnf:[["RULE_S*",'"|"',"RULE_S*","SequenceOrDifference"]],fragment:!0},{name:"SequenceOrDifference",bnf:[["%Item","RULE_WHITESPACE*","%_Item_1?"]]},{name:"%_Item_1",bnf:[["Minus","%Item"],["%Item*"]],fragment:!0},{name:"Minus",bnf:[['"-"']]},{name:"%Item",bnf:[["RULE_WHITESPACE*","PrimaryPreDecoration?","%Primary","PrimaryDecoration?"]],fragment:!0},{name:"PrimaryDecoration",bnf:[['"?"'],['"*"'],['"+"']]},{name:"PrimaryPreDecoration",bnf:[['"&"'],['"!"'],['"~"']]},{name:"%Primary",bnf:[["NCName"],["StringLiteral"],["CharCode"],["CharClass"],["SubItem"]],fragment:!0},{name:"SubItem",bnf:[['"("',"RULE_S*","%Choice","RULE_S*",'")"']]},{name:"StringLiteral",bnf:[["'\"'",/[^"]*/,"'\"'"],['"\'"',/[^']*/,'"\'"']]},{name:"CharCode",bnf:[['"#x"',/[0-9a-zA-Z]+/]]},{name:"CharClass",bnf:[["'['","'^'?","%RULE_CharClass_1+",'"]"']]},{name:"%RULE_CharClass_1",bnf:[["CharCodeRange"],["CharRange"],["CharCode"],["RULE_Char"]],fragment:!0},{name:"RULE_Char",bnf:[[/\x09/],[/\x0A/],[/\x0D/],[/[\x20-\x5c]/],[/[\x5e-\uD7FF]/],[/[\uE000-\uFFFD]/]]},{name:"CharRange",bnf:[["RULE_Char",'"-"',"RULE_Char"]]},{name:"CharCodeRange",bnf:[["CharCode",'"-"',"CharCode"]]},{name:"RULE_WHITESPACE",bnf:[["%RULE_WHITESPACE_CHAR*"],["Comment","RULE_WHITESPACE*"]]},{name:"RULE_S",bnf:[["RULE_WHITESPACE","RULE_S*"],["RULE_EOL","RULE_S*"]]},{name:"%RULE_WHITESPACE_CHAR",bnf:[[/\x09/],[/\x20/]],fragment:!0},{name:"Comment",bnf:[['"/*"',"%RULE_Comment_Body*",'"*/"']]},{name:"%RULE_Comment_Body",bnf:[[/[^*]/],['"*"+',/[^/]*/]],fragment:!0},{name:"RULE_EOL",bnf:[[/\x0D/,/\x0A/],[/\x0A/],[/\x0D/]]},{name:"Link",bnf:[["'['","Url","']'"]]},{name:"Url",bnf:[[/[^\x5D:/?#]/,'"://"',/[^\x5D#]+/,"%Url1?"]]},{name:"%Url1",bnf:[['"#"',"NCName"]],fragment:!0}],e.defaultParser=new i.Parser(e.RULES,{debug:!1});const t=/^(!|&)/,r=/(\?|\+|\*)$/,o=/^%/;function s(e,n){if("string"==typeof e){let s=r.exec(e),l=t.exec(e),u=l?l[0]:"",c=s?s[0]+" ":"";if(o.test(e)){let t=function(e,t){let r=i.findRuleByName(e,t);return r&&1==r.bnf.length&&1==r.bnf[0].length&&(r.bnf[0][0]instanceof RegExp||'"'==r.bnf[0][0][0]||"'"==r.bnf[0][0][0])}(e,n);return t?u+a(e,n)+c:u+"("+a(e,n)+")"+c}return e.replace(t,u)}return e.source.replace(/\\(?:x|u)([a-zA-Z0-9]+)/g,"#x$1").replace(/\[\\(?:x|u)([a-zA-Z0-9]+)-\\(?:x|u)([a-zA-Z0-9]+)\]/g,"[#x$1-#x$2]")}function a(e,t){let r=i.findRuleByName(e,t);return r?r.bnf.map((e=>function(e,t){return e.map((e=>s(e,t))).join(" ")}(e,t))).join(" | "):"RULE_NOT_FOUND {"+e+"}"}function l(e){let t=[];return e.grammarRules.forEach((r=>{if(!/^%/.test(r.name)){let n=r.recover?" { recoverUntil="+r.recover+" }":"";t.push(r.name+" ::= "+a(r.name,e)+n)}})),t.join("\n")}e.emit=l;let u=0;function c(e){return new RegExp(e.replace(/#x([a-zA-Z0-9]{4})/g,"\\u$1").replace(/#x([a-zA-Z0-9]{3})/g,"\\u0$1").replace(/#x([a-zA-Z0-9]{2})/g,"\\x$1").replace(/#x([a-zA-Z0-9]{1})/g,"\\x0$1"))}function f(e,t,r,n){let o=null,s=[];return t.children.forEach(((a,l)=>{"Minus"==a.type&&function(e,t){throw console.log("reberia restar "+t+" a "+e),new Error("Difference not supported yet")}(o,a);let f=t.children[l+1];f=f&&"PrimaryDecoration"==f.type&&f.text||"";let p="";o&&"PrimaryPreDecoration"==o.type&&(p=o.text);let d="~"==p?1:void 0;switch(d&&(p=""),a.type){case"SubItem":let t="%"+(r+u++);h(e,a,t,n),s.push(p+t+f);break;case"NCName":s.push(p+a.text+f);break;case"StringLiteral":if(f||p||!/^['"/()a-zA-Z0-9&_.:=,+*\-\^\\]+$/.test(a.text))s.push(p+a.text+f);else for(const e of a.text.slice(1,-1))n&&"true"==n.ignoreCase&&/[a-zA-Z]/.test(e)?s.push(new RegExp("["+e.toUpperCase()+e.toLowerCase()+"]")):s.push(new RegExp(i.escapeRegExp(e)));break;case"CharCode":case"CharClass":if(f||p){let t={name:"%"+(r+u++),bnf:[[c(a.text)]],pinned:d};e.push(t),s.push(p+t.name+f)}else s.push(c(a.text));break;case"PrimaryPreDecoration":case"PrimaryDecoration":break;default:throw new Error(" HOW SHOULD I PARSE THIS? "+a.type+" -> "+JSON.stringify(a.text))}o=a})),s}function h(e,t,r,i){let o=t.children.filter((e=>"Attributes"==e.type))[0],s={};o&&o.children.forEach((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;if(t in s)throw new n.TokenError("Duplicated attribute "+t,e);s[t]=e.children.filter((e=>"AttributeValue"==e.type))[0].text}));let a=t.children.filter((e=>"SequenceOrDifference"==e.type)).map((t=>f(e,t,r,i||s))),l={name:r,bnf:a};if(0==r.indexOf("%")&&(l.fragment=!0),s.recoverUntil&&(l.recover=s.recoverUntil,l.bnf.length>1))throw new n.TokenError("only one-option productions are suitable for error recovering",t);if("pin"in s){let e=parseInt(s.pin);if(isNaN(e)||(l.pinned=e),l.bnf.length>1)throw new n.TokenError("only one-option productions are suitable for pinning",t)}l.implicitWs="ws"in s?"explicit"!=s.ws:null,l.fragment=l.fragment||"true"==s.fragment,l.simplifyWhenOneChildren="true"==s.simplifyWhenOneChildren,e.push(l)}function p(t,r=e.defaultParser){let i=r.getAST(t);if(!i)throw new Error("Could not parse "+t);if(i.errors&&i.errors.length)throw i.errors[0];let o=null,s=i.children.filter((e=>"Attributes"==e.type))[0],a={};s&&s.children.forEach((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;if(t in a)throw new n.TokenError("Duplicated attribute "+t,e);a[t]=e.children.filter((e=>"AttributeValue"==e.type))[0].text})),o="implicit"==a.ws;let l=[];return i.children.filter((e=>"Production"==e.type)).map((e=>{let t=e.children.filter((e=>"NCName"==e.type))[0].text;h(l,e,t)})),l.forEach((e=>{null===e.implicitWs&&(e.implicitWs=o)})),l}e.getRules=p,e.Transform=function(t,r=e.defaultParser){return p(t.join(""),r)};class d extends i.Parser{constructor(t,r){super(p(t,r&&!0===r.debugRulesParser?new i.Parser(e.RULES,{debug:!0}):e.defaultParser),r)}emitSource(){return l(this)}}e.Parser=d}(o||(o={})),t.default=o},function(e,t,r){"use strict";r.r(t),r.d(t,"MarkdownPlugin",(function(){return ht}));var n={};r.r(n),r.d(n,"document",(function(){return Ae})),r.d(n,"contentInitial",(function(){return Oe})),r.d(n,"flowInitial",(function(){return Re})),r.d(n,"flow",(function(){return Te})),r.d(n,"string",(function(){return Pe})),r.d(n,"text",(function(){return _e})),r.d(n,"insideSpan",(function(){return Ce})),r.d(n,"attentionMarkers",(function(){return Le})),r.d(n,"disable",(function(){return je}));var i=r(5);const o={};function s(e,t,r){if(function(e){return Boolean(e&&"object"===typeof e)}(e)){if("value"in e)return"html"!==e.type||r?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return a(e.children,t,r)}return Array.isArray(e)?a(e,t,r):""}function a(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=s(e[i],t,r);return n.join("")}function l(e,t,r,n){const i=e.length;let o,s=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);s<n.length;)o=n.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function u(e,t){return e.length>0?(l(e,e.length,0,t),e):t}function c(e){const t={};let r,n,i,o,s,a,u,c=-1;for(;++c<e.length;){for(;c in t;)c=t[c];if(r=e[c],c&&"chunkFlow"===r[1].type&&"listItemPrefix"===e[c-1][1].type&&(a=r[1]._tokenizer.events,i=0,i<a.length&&"lineEndingBlank"===a[i][1].type&&(i+=2),i<a.length&&"content"===a[i][1].type))for(;++i<a.length&&"content"!==a[i][1].type;)"chunkText"===a[i][1].type&&(a[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===r[0])r[1].contentType&&(Object.assign(t,f(e,c)),c=t[c],u=!0);else if(r[1]._container){for(i=c,n=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(n&&(e[n][1].type="lineEndingBlank"),o[1].type="lineEnding",n=i);n&&(r[1].end=Object.assign({},e[n][1].start),s=e.slice(n,c),s.unshift(r),l(e,n,c-n+1,s))}}return!u}function f(e,t){const r=e[t][1],n=e[t][2];let i=t-1;const o=[],s=r._tokenizer||n.parser[r.contentType](r.start),a=s.events,u=[],c={};let f,h,p=-1,d=r,g=0,m=0;const v=[m];for(;d;){for(;e[++i][1]!==d;);o.push(i),d._tokenizer||(f=n.sliceStream(d),d.next||f.push(null),h&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=d,d=d.next}for(d=r;++p<a.length;)"exit"===a[p][0]&&"enter"===a[p-1][0]&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(m=p+1,v.push(m),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):v.pop(),p=v.length;p--;){const t=a.slice(v[p],v[p+1]),r=o.pop();u.unshift([r,r+t.length-1]),l(e,r,2,t)}for(p=-1;++p<u.length;)c[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return c}const h={}.hasOwnProperty;function p(e,t){let r;for(r in t){const n=(h.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let o;if(i)for(o in i){h.call(n,o)||(n[o]=[]);const e=i[o];d(n[o],Array.isArray(e)?e:e?[e]:[])}}}function d(e,t){let r=-1;const n=[];for(;++r<t.length;)("after"===t[r].add?e:n).push(t[r]);l(e,0,0,n)}const g=R(/\p{P}/u),m=R(/[A-Za-z]/),v=R(/[\dA-Za-z]/),y=R(/[#-'*+\--9=?A-Z^-~]/);function b(e){return null!==e&&(e<32||127===e)}const w=R(/\d/),E=R(/[\dA-Fa-f]/),x=R(/[!-/:-@[-`{-~]/);function k(e){return null!==e&&e<-2}function S(e){return null!==e&&(e<0||32===e)}function A(e){return-2===e||-1===e||32===e}const O=R(/\s/);function R(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function T(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let o=0;return function(n){if(A(n))return e.enter(r),s(n);return t(n)};function s(n){return A(n)&&o++<i?(e.consume(n),s):(e.exit(r),t(n))}}const P={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"),T(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)):k(t)?(e.consume(t),e.exit("chunkText"),n):(e.consume(t),i)}}};const _={tokenize:function(e){const t=this,r=[];let n,i,o,s=0;return a;function a(n){if(s<r.length){const i=r[s];return t.containerState=i[1],e.attempt(i[0].continuation,u,c)(n)}return c(n)}function u(e){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&b();const r=t.events.length;let i,o=r;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}y(s);let a=r;for(;a<t.events.length;)t.events[a][1].end=Object.assign({},i),a++;return l(t.events,o+1,0,t.events.slice(r)),t.events.length=a,c(e)}return a(e)}function c(i){if(s===r.length){if(!n)return p(i);if(n.currentConstruct&&n.currentConstruct.concrete)return g(i);t.interrupt=Boolean(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(C,f,h)(i)}function f(e){return n&&b(),y(s),p(e)}function h(e){return t.parser.lazy[t.now().line]=s!==r.length,o=t.now().offset,g(e)}function p(r){return t.containerState={},e.attempt(C,d,g)(r)}function d(e){return s++,r.push([t.currentConstruct,t.containerState]),p(e)}function g(r){return null===r?(n&&b(),y(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?(v(e.exit("chunkFlow"),!0),y(0),void e.consume(r)):k(r)?(e.consume(r),v(e.exit("chunkFlow")),s=0,t.interrupt=void 0,a):(e.consume(r),m)}function v(e,r){const a=t.sliceStream(e);if(r&&a.push(null),e.previous=i,i&&(i.next=e),i=e,n.defineSkip(e.start),n.write(a),t.parser.lazy[e.start.line]){let e=n.events.length;for(;e--;)if(n.events[e][1].start.offset<o&&(!n.events[e][1].end||n.events[e][1].end.offset>o))return;const r=t.events.length;let i,a,u=r;for(;u--;)if("exit"===t.events[u][0]&&"chunkFlow"===t.events[u][1].type){if(i){a=t.events[u][1].end;break}i=!0}for(y(s),e=r;e<t.events.length;)t.events[e][1].end=Object.assign({},a),e++;l(t.events,u+1,0,t.events.slice(r)),t.events.length=e}}function y(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 b(){n.write([null]),i=void 0,n=void 0,t.containerState._closeFlow=void 0}}},C={tokenize:function(e,t,r){return T(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};const L={tokenize:function(e,t,r){return function(t){return A(t)?T(e,n,"linePrefix")(t):n(t)};function n(e){return null===e||k(e)?t(e):r(e)}},partial:!0};const j={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):k(t)?e.check(N,o,i)(t):(e.consume(t),n)}function i(r){return e.exit("chunkContent"),e.exit("content"),t(r)}function o(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 c(e),e}},N={tokenize:function(e,t,r){const n=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T(e,i,"linePrefix")};function i(i){if(null===i||k(i))return r(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(n.parser.constructs.flow,r,t)(i)}},partial:!0};const I={tokenize:function(e){const t=this,r=e.attempt(L,(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,T(e,e.attempt(this.parser.constructs.flow,n,e.attempt(j,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 U={resolveAll:M()},B=q("string"),D=q("text");function q(e){return{tokenize:function(t){const r=this,n=this.parser.constructs[e],i=t.attempt(n,o,s);return o;function o(e){return l(e)?i(e):s(e)}function s(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),a)}function l(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:M("text"===e?V:void 0)}}function M(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 V(e,t){let r=0;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 o,s=i.length,a=-1,l=0;for(;s--;){const e=i[s];if("string"===typeof e){for(a=e.length;32===e.charCodeAt(a-1);)l++,a--;if(a)break;a=-1}else if(-2===e)o=!0,l++;else if(-1!==e){s++;break}}if(l){const i={type:r===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-l,offset:n.end.offset-l,_index:n.start._index+s,_bufferIndex:s?a:n.start._bufferIndex+a},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 F(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!n.includes(o)&&(t=o(t,r),n.push(o))}return t}function z(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let s=[],a=[],c=!0;const f={consume:function(e){k(e)?(n.line++,n.column=1,n.offset+=-3===e?2:1,x()):-1!==e&&(n.column++,n.offset++);n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++));h.previous=e,c=!0},enter:function(e,t){const r=t||{};return r.type=e,r.start=m(),h.events.push(["enter",r,h]),a.push(r),r},exit:function(e){const t=a.pop();return t.end=m(),h.events.push(["exit",t,h]),t},attempt:w((function(e,t){E(e,t.from)})),check:w(b),interrupt:w(b,{interrupt:!0})},h={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:g,sliceSerialize:function(e,t){return function(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const o=e[r];let s;if("string"===typeof o)s=o;else switch(o){case-5:s="\r";break;case-4:s="\n";break;case-3:s="\r\n";break;case-2:s=t?" ":"\t";break;case-1:if(!t&&i)continue;s=" ";break;default:s=String.fromCharCode(o)}i=-2===o,n.push(s)}return n.join("")}(g(e),t)},now:m,defineSkip:function(e){i[e.line]=e.column,x()},write:function(e){if(s=u(s,e),v(),null!==s[s.length-1])return[];return E(t,0),h.events=F(o,h.events,h),h.events}};let p,d=t.tokenize.call(h,f);return t.resolveAll&&o.push(t),h;function g(e){return function(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(r===i)s=[e[r].slice(n,o)];else{if(s=e.slice(r,i),n>-1){const e=s[0];"string"===typeof e?s[0]=e.slice(n):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}(s,e)}function m(){const{line:e,column:t,offset:r,_index:i,_bufferIndex:o}=n;return{line:e,column:t,offset:r,_index:i,_bufferIndex:o}}function v(){let e;for(;n._index<s.length;){const t=s[n._index];if("string"===typeof t)for(e=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===e&&n._bufferIndex<t.length;)y(t.charCodeAt(n._bufferIndex));else y(t)}}function y(e){c=void 0,p=e,d=d(e)}function b(e,t){t.restore()}function w(e,t){return function(r,i,o){let s,l,u,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 s=e,l=0,0===e.length?o:g(e[l])}function g(e){return function(r){p=function(){const e=m(),t=h.previous,r=h.currentConstruct,i=h.events.length,o=Array.from(a);return{restore:s,from:i};function s(){n=e,h.previous=t,h.currentConstruct=r,h.events.length=i,a=o,x()}}(),u=e,e.partial||(h.currentConstruct=e);if(e.name&&h.parser.constructs.disable.null.includes(e.name))return y(r);return e.tokenize.call(t?Object.assign(Object.create(h),t):h,f,v,y)(r)}}function v(t){return c=!0,e(u,p),i}function y(e){return c=!0,p.restore(),++l<s.length?g(s[l]):o}}}function E(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&l(h.events,t,h.events.length-t,e.resolve(h.events.slice(t),h)),e.resolveTo&&(h.events=e.resolveTo(h.events,h))}function x(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}const H={name:"thematicBreak",tokenize:function(e,t,r){let n,i=0;return function(t){return e.enter("thematicBreak"),function(e){return n=e,o(e)}(t)};function o(o){return o===n?(e.enter("thematicBreakSequence"),s(o)):i>=3&&(null===o||k(o))?(e.exit("thematicBreak"),t(o)):r(o)}function s(t){return t===n?(e.consume(t),i++,s):(e.exit("thematicBreakSequence"),A(t)?T(e,o,"whitespace")(t):o(t))}}};const $={name:"list",tokenize:function(e,t,r){const n=this,i=n.events[n.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,s=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:w(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(H,r,l)(t):l(t);if(!n.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return r(t)};function a(t){return w(t)&&++s<10?(e.consume(t),a):(!n.interrupt||s<2)&&(n.containerState.marker?t===n.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):r(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||t,e.check(L,n.interrupt?r:u,e.attempt(W,f,c))}function u(e){return n.containerState.initialBlankLine=!0,o++,f(e)}function c(t){return A(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):r(t)}function f(r){return n.containerState.size=o+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(L,(function(r){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,T(e,t,"listItemIndent",n.containerState.size+1)(r)}),(function(r){if(n.containerState.furtherBlankLines||!A(r))return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(r);return n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(G,t,i)(r)}));function i(i){return n.containerState._closeFlow=!0,n.interrupt=void 0,T(e,e.attempt($,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},W={tokenize:function(e,t,r){const n=this;return T(e,(function(e){const i=n.events[n.events.length-1];return!A(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):r(e)}),"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},G={tokenize:function(e,t,r){const n=this;return T(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 Y={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 A(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){const n=this;return function(t){if(A(t))return T(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(n){return e.attempt(Y,t,r)(n)}}},exit:function(e){e.exit("blockQuote")}};function Z(e,t,r,n,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(n),e.enter(i),e.enter(o),e.consume(t),e.exit(o),f;if(null===t||32===t||41===t||b(t))return r(t);return e.enter(n),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),d(t)};function f(r){return 62===r?(e.enter(o),e.consume(r),e.exit(o),e.exit(i),e.exit(n),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(r))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(a),f(t)):null===t||60===t||k(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 c||null!==i&&41!==i&&!S(i)?c<u&&40===i?(e.consume(i),c++,d):41===i?(e.consume(i),c--,d):null===i||32===i||40===i||b(i)?r(i):(e.consume(i),92===i?g:d):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(n),t(i))}function g(t){return 40===t||41===t||92===t?(e.consume(t),d):d(t)}}function Q(e,t,r,n,i,o){const s=this;let a,l=0;return function(t){return e.enter(n),e.enter(i),e.consume(t),e.exit(i),e.enter(o),u};function u(f){return l>999||null===f||91===f||93===f&&!a||94===f&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?r(f):93===f?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(n),t):k(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(t){return null===t||91===t||93===t||k(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),a||(a=!A(t)),92===t?f:c)}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function K(e,t,r,n,i,o){let s;return function(t){if(34===t||39===t||40===t)return e.enter(n),e.enter(i),e.consume(t),e.exit(i),s=40===t?41:t,a;return r(t)};function a(r){return r===s?(e.enter(i),e.consume(r),e.exit(i),e.exit(n),t):(e.enter(o),l(r))}function l(t){return t===s?(e.exit(o),a(s)):null===t?r(t):k(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),T(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===s||null===t||k(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?c:u)}function c(t){return t===s||92===t?(e.consume(t),u):u(t)}}function J(e,t){let r;return function n(i){if(k(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n;if(A(i))return T(e,n,r?"linePrefix":"lineSuffix")(i);return t(i)}}function X(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ee={name:"definition",tokenize:function(e,t,r){const n=this;let i;return function(t){return e.enter("definition"),function(t){return Q.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=X(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s):r(t)}function s(t){return S(t)?J(e,a)(t):a(t)}function a(t){return Z(e,l,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(te,u,u)(t)}function u(t){return A(t)?T(e,c,"whitespace")(t):c(t)}function c(o){return null===o||k(o)?(e.exit("definition"),n.parser.defined.push(i),t(o)):r(o)}}},te={tokenize:function(e,t,r){return function(t){return S(t)?J(e,n)(t):r(t)};function n(t){return K(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return A(t)?T(e,o,"whitespace")(t):o(t)}function o(e){return null===e||k(e)?t(e):r(e)}},partial:!0};const re={name:"codeIndented",tokenize:function(e,t,r){const n=this;return function(t){return e.enter("codeIndented"),T(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?o(e):r(e)}function o(t){return null===t?a(t):k(t)?e.attempt(ne,o,a)(t):(e.enter("codeFlowValue"),s(t))}function s(t){return null===t||k(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),s)}function a(r){return e.exit("codeIndented"),t(r)}}},ne={tokenize:function(e,t,r){const n=this;return i;function i(t){return n.parser.lazy[n.now().line]?r(t):k(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):T(e,o,"linePrefix",5)(t)}function o(e){const o=n.events[n.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):k(e)?i(e):r(e)}},partial:!0};const ie={name:"setextUnderline",tokenize:function(e,t,r){const n=this;let i;return function(t){let s,a=n.events.length;for(;a--;)if("lineEnding"!==n.events[a][1].type&&"linePrefix"!==n.events[a][1].type&&"content"!==n.events[a][1].type){s="paragraph"===n.events[a][1].type;break}if(!n.parser.lazy[n.now().line]&&(n.interrupt||s))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return r(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),A(t)?T(e,s,"lineSuffix")(t):s(t))}function s(n){return null===n||k(n)?(e.exit("setextHeadingLine"),t(n)):r(n)}},resolveTo:function(e,t){let r,n,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){r=o;break}"paragraph"===e[o][1].type&&(n=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const s={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",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=s;return e.push(["exit",s,t]),e}};const oe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],se=["pre","script","style","textarea"],ae={name:"htmlFlow",tokenize:function(e,t,r){const n=this;let i,o,s,a,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),u}(t)};function u(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),o=!0,p):63===a?(e.consume(a),i=3,n.interrupt?t:q):m(a)?(e.consume(a),s=String.fromCharCode(a),d):r(a)}function c(o){return 45===o?(e.consume(o),i=2,f):91===o?(e.consume(o),i=5,a=0,h):m(o)?(e.consume(o),i=4,n.interrupt?t:q):r(o)}function f(i){return 45===i?(e.consume(i),n.interrupt?t:q):r(i)}function h(i){const o="CDATA[";return i===o.charCodeAt(a++)?(e.consume(i),a===o.length?n.interrupt?t:C:h):r(i)}function p(t){return m(t)?(e.consume(t),s=String.fromCharCode(t),d):r(t)}function d(a){if(null===a||47===a||62===a||S(a)){const l=47===a,u=s.toLowerCase();return l||o||!se.includes(u)?oe.includes(s.toLowerCase())?(i=6,l?(e.consume(a),g):n.interrupt?t(a):C(a)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(a):o?y(a):b(a)):(i=1,n.interrupt?t(a):C(a))}return 45===a||v(a)?(e.consume(a),s+=String.fromCharCode(a),d):r(a)}function g(i){return 62===i?(e.consume(i),n.interrupt?t:C):r(i)}function y(t){return A(t)?(e.consume(t),y):P(t)}function b(t){return 47===t?(e.consume(t),P):58===t||95===t||m(t)?(e.consume(t),w):A(t)?(e.consume(t),b):P(t)}function w(t){return 45===t||46===t||58===t||95===t||v(t)?(e.consume(t),w):E(t)}function E(t){return 61===t?(e.consume(t),x):A(t)?(e.consume(t),E):b(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),l=t,O):A(t)?(e.consume(t),x):R(t)}function O(t){return t===l?(e.consume(t),l=null,T):null===t||k(t)?r(t):(e.consume(t),O)}function R(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||S(t)?E(t):(e.consume(t),R)}function T(e){return 47===e||62===e||A(e)?b(e):r(e)}function P(t){return 62===t?(e.consume(t),_):r(t)}function _(t){return null===t||k(t)?C(t):A(t)?(e.consume(t),_):r(t)}function C(t){return 45===t&&2===i?(e.consume(t),I):60===t&&1===i?(e.consume(t),U):62===t&&4===i?(e.consume(t),M):63===t&&3===i?(e.consume(t),q):93===t&&5===i?(e.consume(t),D):!k(t)||6!==i&&7!==i?null===t||k(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(le,V,L)(t))}function L(t){return e.check(ue,j,V)(t)}function j(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||k(t)?L(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),q):C(t)}function U(t){return 47===t?(e.consume(t),s="",B):C(t)}function B(t){if(62===t){const r=s.toLowerCase();return se.includes(r)?(e.consume(t),M):C(t)}return m(t)&&s.length<8?(e.consume(t),s+=String.fromCharCode(t),B):C(t)}function D(t){return 93===t?(e.consume(t),q):C(t)}function q(t){return 62===t?(e.consume(t),M):45===t&&2===i?(e.consume(t),q):C(t)}function M(t){return null===t||k(t)?(e.exit("htmlFlowData"),V(t)):(e.consume(t),M)}function V(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},le={tokenize:function(e,t,r){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(L,t,r)}},partial:!0},ue={tokenize:function(e,t,r){const n=this;return function(t){if(k(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return r(t)};function i(e){return n.parser.lazy[n.now().line]?r(e):t(e)}},partial:!0};const ce={tokenize:function(e,t,r){const n=this;return function(t){if(null===t)return r(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},fe={name:"codeFenced",tokenize:function(e,t,r){const n=this,i={tokenize:function(e,t,r){let i=0;return s;function s(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),A(t)?T(e,u,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):u(t)}function u(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):r(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=a?(e.exit("codeFencedFenceSequence"),A(t)?T(e,f,"whitespace")(t):f(t)):r(t)}function f(n){return null===n||k(n)?(e.exit("codeFencedFence"),t(n)):r(n)}},partial:!0};let o,s=0,a=0;return function(t){return function(t){const r=n.events[n.events.length-1];return s=r&&"linePrefix"===r[1].type?r[2].sliceSerialize(r[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(a++,e.consume(t),l):a<3?r(t):(e.exit("codeFencedFenceSequence"),A(t)?T(e,u,"whitespace")(t):u(t))}function u(r){return null===r||k(r)?(e.exit("codeFencedFence"),n.interrupt?t(r):e.check(ce,p,y)(r)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(r))}function c(t){return null===t||k(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(t)):A(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),T(e,f,"whitespace")(t)):96===t&&t===o?r(t):(e.consume(t),c)}function f(t){return null===t||k(t)?u(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(t))}function h(t){return null===t||k(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(t)):96===t&&t===o?r(t):(e.consume(t),h)}function p(t){return e.attempt(i,y,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return s>0&&A(t)?T(e,m,"linePrefix",s+1)(t):m(t)}function m(t){return null===t||k(t)?e.check(ce,p,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||k(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),v)}function y(r){return e.exit("codeFenced"),t(r)}},concrete:!0};const he={AElig:"\xc6",AMP:"&",Aacute:"\xc1",Abreve:"\u0102",Acirc:"\xc2",Acy:"\u0410",Afr:"\ud835\udd04",Agrave:"\xc0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2a53",Aogon:"\u0104",Aopf:"\ud835\udd38",ApplyFunction:"\u2061",Aring:"\xc5",Ascr:"\ud835\udc9c",Assign:"\u2254",Atilde:"\xc3",Auml:"\xc4",Backslash:"\u2216",Barv:"\u2ae7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212c",Beta:"\u0392",Bfr:"\ud835\udd05",Bopf:"\ud835\udd39",Breve:"\u02d8",Bscr:"\u212c",Bumpeq:"\u224e",CHcy:"\u0427",COPY:"\xa9",Cacute:"\u0106",Cap:"\u22d2",CapitalDifferentialD:"\u2145",Cayleys:"\u212d",Ccaron:"\u010c",Ccedil:"\xc7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010a",Cedilla:"\xb8",CenterDot:"\xb7",Cfr:"\u212d",Chi:"\u03a7",CircleDot:"\u2299",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",Colon:"\u2237",Colone:"\u2a74",Congruent:"\u2261",Conint:"\u222f",ContourIntegral:"\u222e",Copf:"\u2102",Coproduct:"\u2210",CounterClockwiseContourIntegral:"\u2233",Cross:"\u2a2f",Cscr:"\ud835\udc9e",Cup:"\u22d3",CupCap:"\u224d",DD:"\u2145",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040f",Dagger:"\u2021",Darr:"\u21a1",Dashv:"\u2ae4",Dcaron:"\u010e",Dcy:"\u0414",Del:"\u2207",Delta:"\u0394",Dfr:"\ud835\udd07",DiacriticalAcute:"\xb4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",Diamond:"\u22c4",DifferentialD:"\u2146",Dopf:"\ud835\udd3b",Dot:"\xa8",DotDot:"\u20dc",DotEqual:"\u2250",DoubleContourIntegral:"\u222f",DoubleDot:"\xa8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0",DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",Downarrow:"\u21d3",Dscr:"\ud835\udc9f",Dstrok:"\u0110",ENG:"\u014a",ETH:"\xd0",Eacute:"\xc9",Ecaron:"\u011a",Ecirc:"\xca",Ecy:"\u042d",Edot:"\u0116",Efr:"\ud835\udd08",Egrave:"\xc8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25fb",EmptyVerySmallSquare:"\u25ab",Eogon:"\u0118",Eopf:"\ud835\udd3c",Epsilon:"\u0395",Equal:"\u2a75",EqualTilde:"\u2242",Equilibrium:"\u21cc",Escr:"\u2130",Esim:"\u2a73",Eta:"\u0397",Euml:"\xcb",Exists:"\u2203",ExponentialE:"\u2147",Fcy:"\u0424",Ffr:"\ud835\udd09",FilledSmallSquare:"\u25fc",FilledVerySmallSquare:"\u25aa",Fopf:"\ud835\udd3d",ForAll:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",Gamma:"\u0393",Gammad:"\u03dc",Gbreve:"\u011e",Gcedil:"\u0122",Gcirc:"\u011c",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\ud835\udd0a",Gg:"\u22d9",Gopf:"\ud835\udd3e",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",Gt:"\u226b",HARDcy:"\u042a",Hacek:"\u02c7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210c",HilbertSpace:"\u210b",Hopf:"\u210d",HorizontalLine:"\u2500",Hscr:"\u210b",Hstrok:"\u0126",HumpDownHump:"\u224e",HumpEqual:"\u224f",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xcd",Icirc:"\xce",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Igrave:"\xcc",Im:"\u2111",Imacr:"\u012a",ImaginaryI:"\u2148",Implies:"\u21d2",Int:"\u222c",Integral:"\u222b",Intersection:"\u22c2",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",Iogon:"\u012e",Iopf:"\ud835\udd40",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xcf",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\ud835\udd0d",Jopf:"\ud835\udd41",Jscr:"\ud835\udca5",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040c",Kappa:"\u039a",Kcedil:"\u0136",Kcy:"\u041a",Kfr:"\ud835\udd0e",Kopf:"\ud835\udd42",Kscr:"\ud835\udca6",LJcy:"\u0409",LT:"<",Lacute:"\u0139",Lambda:"\u039b",Lang:"\u27ea",Laplacetrf:"\u2112",Larr:"\u219e",Lcaron:"\u013d",Lcedil:"\u013b",Lcy:"\u041b",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",LeftRightArrow:"\u2194",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4",LeftTeeVector:"\u295a",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",Leftarrow:"\u21d0",Leftrightarrow:"\u21d4",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",LessLess:"\u2aa1",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",Lfr:"\ud835\udd0f",Ll:"\u22d8",Lleftarrow:"\u21da",Lmidot:"\u013f",LongLeftArrow:"\u27f5",LongLeftRightArrow:"\u27f7",LongRightArrow:"\u27f6",Longleftarrow:"\u27f8",Longleftrightarrow:"\u27fa",Longrightarrow:"\u27f9",Lopf:"\ud835\udd43",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21b0",Lstrok:"\u0141",Lt:"\u226a",Map:"\u2905",Mcy:"\u041c",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",MinusPlus:"\u2213",Mopf:"\ud835\udd44",Mscr:"\u2133",Mu:"\u039c",NJcy:"\u040a",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041d",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",Nfr:"\ud835\udd11",NoBreak:"\u2060",NonBreakingSpace:"\xa0",Nopf:"\u2115",Not:"\u2aec",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u0338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338",NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\ud835\udca9",Ntilde:"\xd1",Nu:"\u039d",OElig:"\u0152",Oacute:"\xd3",Ocirc:"\xd4",Ocy:"\u041e",Odblac:"\u0150",Ofr:"\ud835\udd12",Ograve:"\xd2",Omacr:"\u014c",Omega:"\u03a9",Omicron:"\u039f",Oopf:"\ud835\udd46",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",Or:"\u2a54",Oscr:"\ud835\udcaa",Oslash:"\xd8",Otilde:"\xd5",Otimes:"\u2a37",Ouml:"\xd6",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",PartialD:"\u2202",Pcy:"\u041f",Pfr:"\ud835\udd13",Phi:"\u03a6",Pi:"\u03a0",PlusMinus:"\xb1",Poincareplane:"\u210c",Popf:"\u2119",Pr:"\u2abb",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",Prime:"\u2033",Product:"\u220f",Proportion:"\u2237",Proportional:"\u221d",Pscr:"\ud835\udcab",Psi:"\u03a8",QUOT:'"',Qfr:"\ud835\udd14",Qopf:"\u211a",Qscr:"\ud835\udcac",RBarr:"\u2910",REG:"\xae",Racute:"\u0154",Rang:"\u27eb",Rarr:"\u21a0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211c",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",Rfr:"\u211c",Rho:"\u03a1",RightAngleBracket:"\u27e9",RightArrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",Rightarrow:"\u21d2",Ropf:"\u211d",RoundImplies:"\u2970",Rrightarrow:"\u21db",Rscr:"\u211b",Rsh:"\u21b1",RuleDelayed:"\u29f4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042c",Sacute:"\u015a",Sc:"\u2abc",Scaron:"\u0160",Scedil:"\u015e",Scirc:"\u015c",Scy:"\u0421",Sfr:"\ud835\udd16",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03a3",SmallCircle:"\u2218",Sopf:"\ud835\udd4a",Sqrt:"\u221a",Square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\ud835\udcae",Star:"\u22c6",Sub:"\u22d0",Subset:"\u22d0",SubsetEqual:"\u2286",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",SuchThat:"\u220b",Sum:"\u2211",Sup:"\u22d1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22d1",THORN:"\xde",TRADE:"\u2122",TSHcy:"\u040b",TScy:"\u0426",Tab:"\t",Tau:"\u03a4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\ud835\udd17",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205f\u200a",ThinSpace:"\u2009",Tilde:"\u223c",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\ud835\udd4b",TripleDot:"\u20db",Tscr:"\ud835\udcaf",Tstrok:"\u0166",Uacute:"\xda",Uarr:"\u219f",Uarrocir:"\u2949",Ubrcy:"\u040e",Ubreve:"\u016c",Ucirc:"\xdb",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\ud835\udd18",Ugrave:"\xd9",Umacr:"\u016a",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",Uopf:"\ud835\udd4c",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",UpEquilibrium:"\u296e",UpTee:"\u22a5",UpTeeArrow:"\u21a5",Uparrow:"\u21d1",Updownarrow:"\u21d5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",Upsilon:"\u03a5",Uring:"\u016e",Uscr:"\ud835\udcb0",Utilde:"\u0168",Uuml:"\xdc",VDash:"\u22ab",Vbar:"\u2aeb",Vcy:"\u0412",Vdash:"\u22a9",Vdashl:"\u2ae6",Vee:"\u22c1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",Vopf:"\ud835\udd4d",Vscr:"\ud835\udcb1",Vvdash:"\u22aa",Wcirc:"\u0174",Wedge:"\u22c0",Wfr:"\ud835\udd1a",Wopf:"\ud835\udd4e",Wscr:"\ud835\udcb2",Xfr:"\ud835\udd1b",Xi:"\u039e",Xopf:"\ud835\udd4f",Xscr:"\ud835\udcb3",YAcy:"\u042f",YIcy:"\u0407",YUcy:"\u042e",Yacute:"\xdd",Ycirc:"\u0176",Ycy:"\u042b",Yfr:"\ud835\udd1c",Yopf:"\ud835\udd50",Yscr:"\ud835\udcb4",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017d",Zcy:"\u0417",Zdot:"\u017b",ZeroWidthSpace:"\u200b",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\ud835\udcb5",aacute:"\xe1",abreve:"\u0103",ac:"\u223e",acE:"\u223e\u0333",acd:"\u223f",acirc:"\xe2",acute:"\xb4",acy:"\u0430",aelig:"\xe6",af:"\u2061",afr:"\ud835\udd1e",agrave:"\xe0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03b1",amacr:"\u0101",amalg:"\u2a3f",amp:"&",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa",angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\xc5",angzarr:"\u237c",aogon:"\u0105",aopf:"\ud835\udd52",ap:"\u2248",apE:"\u2a70",apacir:"\u2a6f",ape:"\u224a",apid:"\u224b",apos:"'",approx:"\u2248",approxeq:"\u224a",aring:"\xe5",ascr:"\ud835\udcb6",ast:"*",asymp:"\u2248",asympeq:"\u224d",atilde:"\xe3",auml:"\xe4",awconint:"\u2233",awint:"\u2a11",bNot:"\u2aed",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",barvee:"\u22bd",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",beta:"\u03b2",beth:"\u2136",between:"\u226c",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20e5",bnequiv:"\u2261\u20e5",bnot:"\u2310",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxDL:"\u2557",boxDR:"\u2554",boxDl:"\u2556",boxDr:"\u2553",boxH:"\u2550",boxHD:"\u2566",boxHU:"\u2569",boxHd:"\u2564",boxHu:"\u2567",boxUL:"\u255d",boxUR:"\u255a",boxUl:"\u255c",boxUr:"\u2559",boxV:"\u2551",boxVH:"\u256c",boxVL:"\u2563",boxVR:"\u2560",boxVh:"\u256b",boxVl:"\u2562",boxVr:"\u255f",boxbox:"\u29c9",boxdL:"\u2555",boxdR:"\u2552",boxdl:"\u2510",boxdr:"\u250c",boxh:"\u2500",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252c",boxhu:"\u2534",boxminus:"\u229f",boxplus:"\u229e",boxtimes:"\u22a0",boxuL:"\u255b",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256a",boxvL:"\u2561",boxvR:"\u255e",boxvh:"\u253c",boxvl:"\u2524",boxvr:"\u251c",bprime:"\u2035",breve:"\u02d8",brvbar:"\xa6",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd",bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",bumpeq:"\u224f",cacute:"\u0107",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",ccaps:"\u2a4d",ccaron:"\u010d",ccedil:"\xe7",ccirc:"\u0109",ccups:"\u2a4c",ccupssm:"\u2a50",cdot:"\u010b",cedil:"\xb8",cemptyv:"\u29b2",cent:"\xa2",centerdot:"\xb7",cfr:"\ud835\udd20",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03c7",cir:"\u25cb",cirE:"\u29c3",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledR:"\xae",circledS:"\u24c8",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",clubs:"\u2663",clubsuit:"\u2663",colon:":",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",conint:"\u222e",copf:"\ud835\udd54",coprod:"\u2210",copy:"\xa9",copysr:"\u2117",crarr:"\u21b5",cross:"\u2717",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",cup:"\u222a",cupbrcap:"\u2a48",cupcap:"\u2a46",cupcup:"\u2a4a",cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\xa4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",dArr:"\u21d3",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",darr:"\u2193",dash:"\u2010",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",dcaron:"\u010f",dcy:"\u0434",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",ddotseq:"\u2a77",deg:"\xb0",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",dfr:"\ud835\udd21",dharl:"\u21c3",dharr:"\u21c2",diam:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666",die:"\xa8",digamma:"\u03dd",disin:"\u22f2",div:"\xf7",divide:"\xf7",divideontimes:"\u22c7",divonx:"\u22c7",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",dopf:"\ud835\udd55",dot:"\u02d9",doteq:"\u2250",doteqdot:"\u2251",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",downarrow:"\u2193",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",dscr:"\ud835\udcb9",dscy:"\u0455",dsol:"\u29f6",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",dzcy:"\u045f",dzigrarr:"\u27ff",eDDot:"\u2a77",eDot:"\u2251",eacute:"\xe9",easter:"\u2a6e",ecaron:"\u011b",ecir:"\u2256",ecirc:"\xea",ecolon:"\u2255",ecy:"\u044d",edot:"\u0117",ee:"\u2147",efDot:"\u2252",efr:"\ud835\udd22",eg:"\u2a9a",egrave:"\xe8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014b",ensp:"\u2002",eogon:"\u0119",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",equals:"=",equest:"\u225f",equiv:"\u2261",equivDD:"\u2a78",eqvparsl:"\u29e5",erDot:"\u2253",erarr:"\u2971",escr:"\u212f",esdot:"\u2250",esim:"\u2242",eta:"\u03b7",eth:"\xf0",euml:"\xeb",euro:"\u20ac",excl:"!",exist:"\u2203",expectation:"\u2130",exponentiale:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",ffr:"\ud835\udd23",filig:"\ufb01",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",fopf:"\ud835\udd57",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",fpartint:"\u2a0d",frac12:"\xbd",frac13:"\u2153",frac14:"\xbc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\xbe",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322",fscr:"\ud835\udcbb",gE:"\u2267",gEl:"\u2a8c",gacute:"\u01f5",gamma:"\u03b3",gammad:"\u03dd",gap:"\u2a86",gbreve:"\u011f",gcirc:"\u011d",gcy:"\u0433",gdot:"\u0121",ge:"\u2265",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",gfr:"\ud835\udd24",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",gjcy:"\u0453",gl:"\u2277",glE:"\u2a92",gla:"\u2aa5",glj:"\u2aa4",gnE:"\u2269",gnap:"\u2a8a",gnapprox:"\u2a8a",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",gopf:"\ud835\udd58",grave:"`",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e",gsiml:"\u2a90",gt:">",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",hArr:"\u21d4",hairsp:"\u200a",half:"\xbd",hamilt:"\u210b",hardcy:"\u044a",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",hbar:"\u210f",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",hfr:"\ud835\udd25",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",hopf:"\ud835\udd59",horbar:"\u2015",hscr:"\ud835\udcbd",hslash:"\u210f",hstrok:"\u0127",hybull:"\u2043",hyphen:"\u2010",iacute:"\xed",ic:"\u2063",icirc:"\xee",icy:"\u0438",iecy:"\u0435",iexcl:"\xa1",iff:"\u21d4",ifr:"\ud835\udd26",igrave:"\xec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012b",image:"\u2111",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd",inodot:"\u0131",int:"\u222b",intcal:"\u22ba",integers:"\u2124",intercal:"\u22ba",intlarhk:"\u2a17",intprod:"\u2a3c",iocy:"\u0451",iogon:"\u012f",iopf:"\ud835\udd5a",iota:"\u03b9",iprod:"\u2a3c",iquest:"\xbf",iscr:"\ud835\udcbe",isin:"\u2208",isinE:"\u22f9",isindot:"\u22f5",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",iukcy:"\u0456",iuml:"\xef",jcirc:"\u0135",jcy:"\u0439",jfr:"\ud835\udd27",jmath:"\u0237",jopf:"\ud835\udd5b",jscr:"\ud835\udcbf",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03ba",kappav:"\u03f0",kcedil:"\u0137",kcy:"\u043a",kfr:"\ud835\udd28",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045c",kopf:"\ud835\udd5c",kscr:"\ud835\udcc0",lAarr:"\u21da",lArr:"\u21d0",lAtail:"\u291b",lBarr:"\u290e",lE:"\u2266",lEg:"\u2a8b",lHar:"\u2962",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",lambda:"\u03bb",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",laquo:"\xab",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2",lat:"\u2aab",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",lcaron:"\u013e",lcedil:"\u013c",lceil:"\u2308",lcub:"{",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",le:"\u2264",leftarrow:"\u2190",leftarrowtail:"\u21a2",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",leftthreetimes:"\u22cb",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da",lesseqqgtr:"\u2a8b",lessgtr:"\u2276",lesssim:"\u2272",lfisht:"\u297c",lfloor:"\u230a",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",ljcy:"\u0459",ll:"\u226a",llarr:"\u21c7",llcorner:"\u231e",llhard:"\u296b",lltri:"\u25fa",lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnE:"\u2268",lnap:"\u2a89",lnapprox:"\u2a89",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",longleftarrow:"\u27f5",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",lscr:"\ud835\udcc1",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",lstrok:"\u0142",lt:"<",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltrPar:"\u2996",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",mDDot:"\u223a",macr:"\xaf",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",mcy:"\u043c",mdash:"\u2014",measuredangle:"\u2221",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\xb5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\xb7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",mopf:"\ud835\udd5e",mp:"\u2213",mscr:"\ud835\udcc2",mstpos:"\u223e",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8",nGg:"\u22d9\u0338",nGt:"\u226b\u20d2",nGtv:"\u226b\u0338",nLeftarrow:"\u21cd",nLeftrightarrow:"\u21ce",nLl:"\u22d8\u0338",nLt:"\u226a\u20d2",nLtv:"\u226a\u0338",nRightarrow:"\u21cf",nVDash:"\u22af",nVdash:"\u22ae",nabla:"\u2207",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\xa0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",ncaron:"\u0148",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",neArr:"\u21d7",nearhk:"\u2924",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",nexist:"\u2204",nexists:"\u2204",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",ngsim:"\u2275",ngt:"\u226f",ngtr:"\u226f",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",njcy:"\u045a",nlArr:"\u21cd",nlE:"\u2266\u0338",nlarr:"\u219a",nldr:"\u2025",nle:"\u2270",nleftarrow:"\u219a",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nlsim:"\u2274",nlt:"\u226e",nltri:"\u22ea",nltrie:"\u22ec",nmid:"\u2224",nopf:"\ud835\udd5f",not:"\xac",notin:"\u2209",notinE:"\u22f9\u0338",notindot:"\u22f5\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",notni:"\u220c",notniva:"\u220c",notnivb:"\u22fe",notnivc:"\u22fd",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281",nsccue:"\u22e1",nsce:"\u2ab0\u0338",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338",ntgl:"\u2279",ntilde:"\xf1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",nu:"\u03bd",num:"#",numero:"\u2116",numsp:"\u2007",nvDash:"\u22ad",nvHarr:"\u2904",nvap:"\u224d\u20d2",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:">\u20d2",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"<\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2",nwArr:"\u21d6",nwarhk:"\u2923",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",oS:"\u24c8",oacute:"\xf3",oast:"\u229b",ocir:"\u229a",ocirc:"\xf4",ocy:"\u043e",odash:"\u229d",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",oelig:"\u0153",ofcir:"\u29bf",ofr:"\ud835\udd2c",ogon:"\u02db",ograve:"\xf2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb",oline:"\u203e",olt:"\u29c0",omacr:"\u014d",omega:"\u03c9",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",oopf:"\ud835\udd60",opar:"\u29b7",operp:"\u29b9",oplus:"\u2295",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\xaa",ordm:"\xba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oscr:"\u2134",oslash:"\xf8",osol:"\u2298",otilde:"\xf5",otimes:"\u2297",otimesas:"\u2a36",ouml:"\xf6",ovbar:"\u233d",par:"\u2225",para:"\xb6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",pfr:"\ud835\udd2d",phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",plusmn:"\xb1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\xb1",pointint:"\u2a15",popf:"\ud835\udd61",pound:"\xa3",pr:"\u227a",prE:"\u2ab3",prap:"\u2ab7",prcue:"\u227c",pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",prime:"\u2032",primes:"\u2119",prnE:"\u2ab5",prnap:"\u2ab9",prnsim:"\u22e8",prod:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",propto:"\u221d",prsim:"\u227e",prurel:"\u22b0",pscr:"\ud835\udcc5",psi:"\u03c8",puncsp:"\u2008",qfr:"\ud835\udd2e",qint:"\u2a0c",qopf:"\ud835\udd62",qprime:"\u2057",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",quot:'"',rAarr:"\u21db",rArr:"\u21d2",rAtail:"\u291c",rBarr:"\u290f",rHar:"\u2964",race:"\u223d\u0331",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\xbb",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21a3",rarrw:"\u219d",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rceil:"\u2309",rcub:"}",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",reg:"\xae",rfisht:"\u297d",rfloor:"\u230b",rfr:"\ud835\udd2f",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",rho:"\u03c1",rhov:"\u03f1",rightarrow:"\u2192",rightarrowtail:"\u21a3",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",rightthreetimes:"\u22cc",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",rsaquo:"\u203a",rscr:"\ud835\udcc7",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",ruluhar:"\u2968",rx:"\u211e",sacute:"\u015b",sbquo:"\u201a",sc:"\u227b",scE:"\u2ab4",scap:"\u2ab8",scaron:"\u0161",sccue:"\u227d",sce:"\u2ab0",scedil:"\u015f",scirc:"\u015d",scnE:"\u2ab6",scnap:"\u2aba",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",seArr:"\u21d8",searhk:"\u2925",searr:"\u2198",searrow:"\u2198",sect:"\xa7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",shchcy:"\u0449",shcy:"\u0448",shortmid:"\u2223",shortparallel:"\u2225",shy:"\xad",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",square:"\u25a1",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\xaf",sub:"\u2282",subE:"\u2ac5",subdot:"\u2abd",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2ac5",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",sum:"\u2211",sung:"\u266a",sup1:"\xb9",sup2:"\xb2",sup3:"\xb3",sup:"\u2283",supE:"\u2ac6",supdot:"\u2abe",supdsub:"\u2ad8",supe:"\u2287",supedot:"\u2ac4",suphsol:"\u27c9",suphsub:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swArr:"\u21d9",swarhk:"\u2926",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\xdf",target:"\u2316",tau:"\u03c4",tbrk:"\u23b4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",tfr:"\ud835\udd31",there4:"\u2234",therefore:"\u2234",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223c",thorn:"\xfe",tilde:"\u02dc",times:"\xd7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",tscr:"\ud835\udcc9",tscy:"\u0446",tshcy:"\u045b",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",uArr:"\u21d1",uHar:"\u2963",uacute:"\xfa",uarr:"\u2191",ubrcy:"\u045e",ubreve:"\u016d",ucirc:"\xfb",ucy:"\u0443",udarr:"\u21c5",udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",ufr:"\ud835\udd32",ugrave:"\xf9",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",umacr:"\u016b",uml:"\xa8",uogon:"\u0173",uopf:"\ud835\udd66",uparrow:"\u2191",updownarrow:"\u2195",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",upsi:"\u03c5",upsih:"\u03d2",upsilon:"\u03c5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",uring:"\u016f",urtri:"\u25f9",uscr:"\ud835\udcca",utdot:"\u22f0",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",uuml:"\xfc",uwangle:"\u29a7",vArr:"\u21d5",vBar:"\u2ae8",vBarv:"\u2ae9",vDash:"\u22a8",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3",vcy:"\u0432",vdash:"\u22a2",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",verbar:"|",vert:"|",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",vopf:"\ud835\udd67",vprop:"\u221d",vrtri:"\u22b3",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",vzigzag:"\u299a",wcirc:"\u0175",wedbar:"\u2a5f",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",wfr:"\ud835\udd34",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xodot:"\u2a00",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",yacute:"\xfd",yacy:"\u044f",ycirc:"\u0177",ycy:"\u044b",yen:"\xa5",yfr:"\ud835\udd36",yicy:"\u0457",yopf:"\ud835\udd6a",yscr:"\ud835\udcce",yucy:"\u044e",yuml:"\xff",zacute:"\u017a",zcaron:"\u017e",zcy:"\u0437",zdot:"\u017c",zeetrf:"\u2128",zeta:"\u03b6",zfr:"\ud835\udd37",zhcy:"\u0436",zigrarr:"\u21dd",zopf:"\ud835\udd6b",zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"},pe={}.hasOwnProperty;function de(e){return!!pe.call(he,e)&&he[e]}const ge={name:"characterReference",tokenize:function(e,t,r){const n=this;let i,o,s=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=v,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=E,u):(e.enter("characterReferenceValue"),i=7,o=w,u(t))}function u(a){if(59===a&&s){const i=e.exit("characterReferenceValue");return o!==v||de(n.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):r(a)}return o(a)&&s++<i?(e.consume(a),u):r(a)}}};const me={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 x(n)?(e.enter("characterEscapeValue"),e.consume(n),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(n)}}};const ve={name:"lineEnding",tokenize:function(e,t){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),T(e,t,"linePrefix")}}};const ye={name:"labelEnd",tokenize:function(e,t,r){const n=this;let i,o,s=n.events.length;for(;s--;)if(("labelImage"===n.events[s][1].type||"labelLink"===n.events[s][1].type)&&!n.events[s][1]._balanced){i=n.events[s][1];break}return function(t){if(!i)return r(t);if(i._inactive)return c(t);return o=n.parser.defined.includes(X(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(be,u,o?u:c)(t):91===t?e.attempt(we,u,o?l:c)(t):o?u(t):c(t)}function l(t){return e.attempt(Ee,u,c)(t)}function u(e){return t(e)}function c(e){return i._balanced=!0,r(e)}},resolveTo:function(e,t){let r,n,i,o,s=e.length,a=0;for(;s--;)if(r=e[s][1],n){if("link"===r.type||"labelLink"===r.type&&r._inactive)break;"enter"===e[s][0]&&"labelLink"===r.type&&(r._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===r.type||"labelLink"===r.type)&&!r._balanced&&(n=s,"labelLink"!==r.type)){a=2;break}}else"labelEnd"===r.type&&(i=s);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)},f={type:"label",start:Object.assign({},e[n][1].start),end:Object.assign({},e[i][1].end)},h={type:"labelText",start:Object.assign({},e[n+a+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",c,t],["enter",f,t]],o=u(o,e.slice(n+1,n+a+3)),o=u(o,[["enter",h,t]]),o=u(o,F(t.parser.constructs.insideSpan.null,e.slice(n+a+4,i-3),t)),o=u(o,[["exit",h,t],e[i-2],e[i-1],["exit",f,t]]),o=u(o,e.slice(i+1)),o=u(o,[["exit",c,t]]),l(e,n,e.length,o),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const r=e[t][1];"labelImage"!==r.type&&"labelLink"!==r.type&&"labelEnd"!==r.type||(e.splice(t+1,"labelImage"===r.type?4:2),r.type="data",t++)}return e}},be={tokenize:function(e,t,r){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),n};function n(t){return S(t)?J(e,i)(t):i(t)}function i(t){return 41===t?u(t):Z(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return S(t)?J(e,a)(t):u(t)}function s(e){return r(e)}function a(t){return 34===t||39===t||40===t?K(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return S(t)?J(e,u)(t):u(t)}function u(n){return 41===n?(e.enter("resourceMarker"),e.consume(n),e.exit("resourceMarker"),e.exit("resource"),t):r(n)}}},we={tokenize:function(e,t,r){const n=this;return function(t){return Q.call(n,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return n.parser.defined.includes(X(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(e):r(e)}function o(e){return r(e)}}},Ee={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)}}};function xe(e){return null===e||S(e)||O(e)?1:function(e){return x(e)||g(e)}(e)?2:void 0}const ke={name:"attention",tokenize:function(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=xe(n);let o;return function(t){return o=t,e.enter("attentionSequence"),s(t)};function s(a){if(a===o)return e.consume(a),s;const l=e.exit("attentionSequence"),u=xe(a),c=!u||2===u&&i||r.includes(a),f=!i||2===i&&u||r.includes(n);return l._open=Boolean(42===o?c:c&&(i||!f)),l._close=Boolean(42===o?f:f&&(u||!c)),t(a)}},resolveAll:function(e,t){let r,n,i,o,s,a,c,f,h=-1;for(;++h<e.length;)if("enter"===e[h][0]&&"attentionSequence"===e[h][1].type&&e[h][1]._close)for(r=h;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[h][1]).charCodeAt(0)){if((e[r][1]._close||e[h][1]._open)&&(e[h][1].end.offset-e[h][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[h][1].end.offset-e[h][1].start.offset)%3))continue;a=e[r][1].end.offset-e[r][1].start.offset>1&&e[h][1].end.offset-e[h][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),d=Object.assign({},e[h][1].start);Se(p,-a),Se(d,a),o={type:a>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},s={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[h][1].start),end:d},i={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[h][1].start)},n={type:a>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[h][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=u(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=u(c,[["enter",n,t],["enter",o,t],["exit",o,t],["enter",i,t]]),c=u(c,F(t.parser.constructs.insideSpan.null,e.slice(r+1,h),t)),c=u(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[h][1].end.offset-e[h][1].start.offset?(f=2,c=u(c,[["enter",e[h][1],t],["exit",e[h][1],t]])):f=0,l(e,r-1,h-r+3,c),h=r+c.length-f-2;break}h=-1;for(;++h<e.length;)"attentionSequence"===e[h][1].type&&(e[h][1].type="data");return e}};function Se(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ae={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:Y},Oe={91:ee},Re={[-2]:re,[-1]:re,32:re},Te={35:{name:"headingAtx",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&n++<6?(e.consume(t),i):null===t||S(t)?(e.exit("atxHeadingSequence"),o(t)):r(t)}function o(r){return 35===r?(e.enter("atxHeadingSequence"),s(r)):null===r||k(r)?(e.exit("atxHeading"),t(r)):A(r)?T(e,o,"whitespace")(r):(e.enter("atxHeadingText"),a(r))}function s(t){return 35===t?(e.consume(t),s):(e.exit("atxHeadingSequence"),o(t))}function a(t){return null===t||35===t||S(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),a)}},resolve:function(e,t){let r,n,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},n={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},l(e,o,i-o+1,[["enter",r,t],["enter",n,t],["exit",n,t],["exit",r,t]]));return e}},42:H,45:[ie,H],60:ae,61:ie,95:H,96:fe,126:fe},Pe={38:ge,92:me},_e={[-5]:ve,[-4]:ve,[-3]:ve,33:{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"),o):r(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in n.parser.constructs?r(e):t(e)}},resolveAll:ye.resolveAll},38:ge,42:ke,60:[{name:"autolink",tokenize:function(e,t,r){let n=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return m(t)?(e.consume(t),o):l(t)}function o(e){return 43===e||45===e||46===e||v(e)?(n=1,s(e)):l(e)}function s(t){return 58===t?(e.consume(t),n=0,a):(43===t||45===t||46===t||v(t))&&n++<32?(e.consume(t),s):(n=0,l(t))}function a(n){return 62===n?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):null===n||32===n||60===n||b(n)?r(n):(e.consume(n),a)}function l(t){return 64===t?(e.consume(t),u):y(t)?(e.consume(t),l):r(t)}function u(e){return v(e)?c(e):r(e)}function c(r){return 46===r?(e.consume(r),n=0,u):62===r?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):f(r)}function f(t){if((45===t||v(t))&&n++<63){const r=45===t?f:c;return e.consume(t),r}return r(t)}}},{name:"htmlText",tokenize:function(e,t,r){const n=this;let i,o,s;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),w):m(t)?(e.consume(t),P):r(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),o=0,p):m(t)?(e.consume(t),b):r(t)}function u(t){return 45===t?(e.consume(t),h):r(t)}function c(t){return null===t?r(t):45===t?(e.consume(t),f):k(t)?(s=c,D(t)):(e.consume(t),c)}function f(t){return 45===t?(e.consume(t),h):c(t)}function h(e){return 62===e?B(e):45===e?f(e):c(e)}function p(t){const n="CDATA[";return t===n.charCodeAt(o++)?(e.consume(t),o===n.length?d:p):r(t)}function d(t){return null===t?r(t):93===t?(e.consume(t),g):k(t)?(s=d,D(t)):(e.consume(t),d)}function g(t){return 93===t?(e.consume(t),y):d(t)}function y(t){return 62===t?B(t):93===t?(e.consume(t),y):d(t)}function b(t){return null===t||62===t?B(t):k(t)?(s=b,D(t)):(e.consume(t),b)}function w(t){return null===t?r(t):63===t?(e.consume(t),E):k(t)?(s=w,D(t)):(e.consume(t),w)}function E(e){return 62===e?B(e):w(e)}function x(t){return m(t)?(e.consume(t),O):r(t)}function O(t){return 45===t||v(t)?(e.consume(t),O):R(t)}function R(t){return k(t)?(s=R,D(t)):A(t)?(e.consume(t),R):B(t)}function P(t){return 45===t||v(t)?(e.consume(t),P):47===t||62===t||S(t)?_(t):r(t)}function _(t){return 47===t?(e.consume(t),B):58===t||95===t||m(t)?(e.consume(t),C):k(t)?(s=_,D(t)):A(t)?(e.consume(t),_):B(t)}function C(t){return 45===t||46===t||58===t||95===t||v(t)?(e.consume(t),C):L(t)}function L(t){return 61===t?(e.consume(t),j):k(t)?(s=L,D(t)):A(t)?(e.consume(t),L):_(t)}function j(t){return null===t||60===t||61===t||62===t||96===t?r(t):34===t||39===t?(e.consume(t),i=t,N):k(t)?(s=j,D(t)):A(t)?(e.consume(t),j):(e.consume(t),I)}function N(t){return t===i?(e.consume(t),i=void 0,U):null===t?r(t):k(t)?(s=N,D(t)):(e.consume(t),N)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?r(t):47===t||62===t||S(t)?_(t):(e.consume(t),I)}function U(e){return 47===e||62===e||S(e)?_(e):r(e)}function B(n){return 62===n?(e.consume(n),e.exit("htmlTextData"),e.exit("htmlText"),t):r(n)}function D(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),q}function q(t){return A(t)?T(e,M,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),s(t)}}}],91:{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:ye.resolveAll},92:[{name:"hardBreakEscape",tokenize:function(e,t,r){return function(t){return e.enter("hardBreakEscape"),e.consume(t),n};function n(n){return k(n)?(e.exit("hardBreakEscape"),t(n)):r(n)}}},me],93:ye,95:ke,96:{name:"codeText",tokenize:function(e,t,r){let n,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),s(t)};function s(t){return 96===t?(e.consume(t),o++,s):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?r(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(i=e.enter("codeTextSequence"),n=0,u(t)):k(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||k(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),l)}function u(r){return 96===r?(e.consume(r),n++,u):n===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(r)):(i.type="codeTextData",l(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}}},Ce={null:[ke,U]},Le={null:[42,95]},je={null:[]};function Ne(e){const t={defined:[],lazy:{},constructs:function(e){const t={};let r=-1;for(;++r<e.length;)p(t,e[r]);return t}([n,...(e||{}).extensions||[]]),content:r(P),document:r(_),flow:r(I),string:r(B),text:r(D)};return t;function r(e){return function(r){return z(t,e,r)}}}const Ie=/[\0\t\n\r]/g;function Ue(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?"\ufffd":String.fromCharCode(r)}const Be=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function De(e,t,r){if(t)return t;if(35===r.charCodeAt(0)){const e=r.charCodeAt(1),t=120===e||88===e;return Ue(r.slice(t?2:1),t?16:10)}return de(r)||e}function qe(e){return e&&"object"===typeof e?"position"in e||"type"in e?Ve(e.position):"start"in e||"end"in e?Ve(e):"line"in e||"column"in e?Me(e):"":""}function Me(e){return Fe(e&&e.line)+":"+Fe(e&&e.column)}function Ve(e){return Me(e&&e.start)+"-"+Me(e&&e.end)}function Fe(e){return e&&"number"===typeof e?e:1}const ze={}.hasOwnProperty;function He(e,t,r){return"string"!==typeof t&&(r=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ne),autolinkProtocol:R,autolinkEmail:R,atxHeading:a(J),blockQuote:a(G),characterEscape:R,characterReference:R,codeFenced:a(Y),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(Y,l),codeText:a(Z,l),codeTextData:R,data:R,codeFlowValue:R,definition:a(Q),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(K),hardBreakEscape:a(ee),hardBreakTrailing:a(ee),htmlFlow:a(te,l),htmlFlowData:R,htmlText:a(te,l),htmlTextData:R,image:a(re),label:l,link:a(ne),listItem:a(oe),listItemValue:d,listOrdered:a(ie,p),listUnordered:a(ie),paragraph:a(se),reference:V,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(J),strong:a(ae),thematicBreak:a(ue)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:W,autolinkProtocol:$,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:H,codeFenced:c(y),codeFencedFence:v,codeFencedFenceInfo:g,codeFencedFenceMeta:m,codeFlowValue:T,codeIndented:c(b),codeText:c(j),codeTextData:T,data:T,definition:c(),definitionDestinationString:x,definitionLabelString:w,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(_),hardBreakTrailing:c(_),htmlFlow:c(C),htmlFlowData:T,htmlText:c(L),htmlTextData:T,image:c(I),label:B,labelText:U,lineEnding:P,link:c(N),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:F,resourceDestinationString:D,resourceTitleString:q,resource:M,setextHeading:c(O),setextHeadingLineSequence:A,setextHeadingText:S,strong:c(),thematicBreak:c()}};We(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(e){let n={type:"root",children:[]};const o={stack:[n],tokenStack:[],config:t,enter:u,exit:f,buffer:l,resume:h,data:r},s=[];let a=-1;for(;++a<e.length;)if("listOrdered"===e[a][1].type||"listUnordered"===e[a][1].type)if("enter"===e[a][0])s.push(a);else{a=i(e,s.pop(),a)}for(a=-1;++a<e.length;){const r=t[e[a][0]];ze.call(r,e[a][1].type)&&r[e[a][1].type].call(Object.assign({sliceSerialize:e[a][2].sliceSerialize},o),e[a][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Ye).call(o,void 0,e[0])}for(n.position={start:$e(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$e(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},a=-1;++a<t.transforms.length;)n=t.transforms[a](n)||n;return n}function i(e,t,r){let n,i,o,s,a=t-1,l=-1,u=!1;for(;++a<=r;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,s=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!n||s||l||o||(o=a),s=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:s=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(n){let s=a;for(i=void 0;s--;){const t=e[s];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=s}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(n._spread=!0),n.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||a,0,["exit",n,t[2]]),a++,r++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};n=i,e.splice(a,0,["enter",i,t[2]]),a++,r++,o=void 0,s=!0}}}return e[t][1]._spread=u,r}function a(e,t){return r;function r(r){u.call(this,e(r),r),t&&t.call(this,r)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(e,t,r){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,r]),e.position={start:$e(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),f.call(this,t)}}function f(e,t){const r=this.stack.pop(),n=this.tokenStack.pop();if(!n)throw new Error("Cannot close `"+e.type+"` ("+qe({start:e.start,end:e.end})+"): it\u2019s not open");if(n[0].type!==e.type)if(t)t.call(this,e,n[0]);else{(n[1]||Ye).call(this,e,n[0])}r.position.end=$e(e.end)}function h(){return function(e,t){const r=t||o;return s(e,"boolean"!==typeof r.includeImageAlt||r.includeImageAlt,"boolean"!==typeof r.includeHtml||r.includeHtml)}(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function g(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function m(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function w(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=X(this.sliceSerialize(e)).toLowerCase()}function E(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function k(e){const t=this.stack[this.stack.length-1];if(!t.depth){const r=this.sliceSerialize(e).length;t.depth=r}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function A(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function R(e){const t=this.stack[this.stack.length-1].children;let r=t[t.length-1];r&&"text"===r.type||(r=le(),r.position={start:$e(e.start),end:void 0},t.push(r)),this.stack.push(r)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$e(e.end)}function P(e){const r=this.stack[this.stack.length-1];if(this.data.atHardBreak){return r.children[r.children.length-1].position.end=$e(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(r.type)&&(R.call(this,e),T.call(this,e))}function _(){this.data.atHardBreak=!0}function C(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function I(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function U(e){const t=this.sliceSerialize(e),r=this.stack[this.stack.length-2];r.label=function(e){return e.replace(Be,De)}(t),r.identifier=X(t).toLowerCase()}function B(){const e=this.stack[this.stack.length-1],t=this.resume(),r=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===r.type){const t=e.children;r.children=t}else r.alt=t}function D(){const e=this.resume();this.stack[this.stack.length-1].url=e}function q(){const e=this.resume();this.stack[this.stack.length-1].title=e}function M(){this.data.inReference=void 0}function V(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=X(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function H(e){const t=this.sliceSerialize(e),r=this.data.characterReferenceType;let n;if(r)n=Ue(t,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0;else{n=de(t)}const i=this.stack.pop();i.value+=n,i.position.end=$e(e.end)}function $(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function W(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function Y(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function Q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth: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 oe(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function se(){return{type:"paragraph",children:[]}}function ae(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ue(){return{type:"thematicBreak"}}}(r)(function(e){for(;!c(e););return e}(Ne(r).document().write(function(){let e,t=1,r="",n=!0;return function(i,o,s){const a=[];let l,u,c,f,h;for(i=r+("string"===typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),c=0,r="",n&&(65279===i.charCodeAt(0)&&c++,n=void 0);c<i.length;){if(Ie.lastIndex=c,l=Ie.exec(i),f=l&&void 0!==l.index?l.index:i.length,h=i.charCodeAt(f),!l){r=i.slice(c);break}if(10===h&&c===f&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<f&&(a.push(i.slice(c,f)),t+=f-c),h){case 0:a.push(65533),t++;break;case 9:for(u=4*Math.ceil(t/4),a.push(-2);t++<u;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=f+1}return s&&(e&&a.push(-5),r&&a.push(r),a.push(null)),a}}()(e,t,!0))))}function $e(e){return{line:e.line,column:e.column,offset:e.offset}}function We(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?We(e,n):Ge(e,n)}}function Ge(e,t){let r;for(r in t)if(ze.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function Ye(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qe({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qe({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qe({start:t.start,end:t.end})+") is still open")}var Ze=Object.defineProperty,Qe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,tt=(e,t,r)=>t in e?Ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function rt(e){return t=((e,t)=>{for(var r in t||(t={}))Xe.call(t,r)&&tt(e,r,t[r]);if(Je)for(var r of Je(t))et.call(t,r)&&tt(e,r,t[r]);return e})({},e),Qe(t,Ke({type:"text"}));var t}const nt={horizontalRule:({asset:e,mappers:t})=>t.horizontalRule?t.horizontalRule({originalAsset:e,value:"---"}):rt(e),text:({astNode:e,asset:t,mappers:r})=>{const{value:n}=e;return r.text({originalAsset:t,value:n})},emphasis:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.emphasis){const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.emphasis({originalAsset:t,value:o})}return rt(t)},strong:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.strong){const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.strong({originalAsset:t,value:o})}return rt(t)},blockquote:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.blockquote){const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.blockquote({originalAsset:t,value:o})}return rt(t)},list:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.list){const{children:i,ordered:o,start:s}=e,a=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.list({originalAsset:t,value:a,ordered:Boolean(o),start:s||void 0})}return rt(t)},listItem:({astNode:e,asset:t,mappers:r,transformers:n})=>{const{children:i}=e,o=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return(r.listItem||r.paragraph)({originalAsset:t,value:o})},link:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.link){const{children:i,url:o}=e,s=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.link({originalAsset:t,href:o,value:s})}return rt(t)},image:({astNode:e,asset:t,mappers:r})=>{if(r.image){const{title:n,url:i,alt:o}=e;return r.image({originalAsset:t,src:i,value:n||o||""})}return rt(t)},paragraph:({astNode:e,asset:t,mappers:r,transformers:n})=>{const{children:i}=e;if(i.every((({type:e})=>Boolean(r[e])))){const e=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.paragraph({originalAsset:t,value:e})}return rt(t)},code:({astNode:e,asset:t,mappers:r})=>{if(r.code){const{value:n,lang:i}=e;return r.code({originalAsset:t,value:n,lang:i||void 0})}return rt(t)},heading:({astNode:e,asset:t,mappers:r,transformers:n})=>{if(r.heading){const{children:i,depth:o}=e,s=i.map((e=>n[e.type]({astNode:e,asset:t,mappers:r,transformers:n})));return r.heading({originalAsset:t,value:s,depth:o})}return rt(t)},inlineCode:({astNode:e,asset:t,mappers:r})=>{if(r.inlineCode){const{value:n}=e;return r.inlineCode({originalAsset:t,value:n})}return rt(t)}};var it=Object.defineProperty,ot=Object.defineProperties,st=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ct=(e,t,r)=>t in e?it(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ft=(e,t)=>{for(var r in t||(t={}))lt.call(t,r)&&ct(e,r,t[r]);if(at)for(var r of at(t))ut.call(t,r)&&ct(e,r,t[r]);return e};class ht{constructor(e){this.name="MarkdownPlugin",this.mappers=e}apply(e){e.hooks.view.tap(this.name,(e=>{e.hooks.resolver.tap(this.name,(e=>{e.hooks.beforeResolve.tap(this.name,((e,t)=>{if((null==e?void 0:e.type)===i.NodeType.Asset&&"markdown"===e.value.type){const o=Object(i.resolveDataRefsInString)(e.value.value,{evaluate:t.evaluate,model:t.data.model}),s=function({asset:e,mappers:t,parser:r}){const{children:n}=He(e.value);if(n.length>1){const o=n.map((r=>(0,nt[r.type])({astNode:r,asset:e,mappers:t,transformers:nt}))),s=t.collection({originalAsset:e,value:o});return(null==r?void 0:r(s,i.NodeType.Asset))||null}const o=(0,nt[n[0].type])({astNode:n[0],asset:e,mappers:t,transformers:nt});return(null==r?void 0:r(o,i.NodeType.Asset))||null}({asset:(r=ft({},e.value),n={value:o},ot(r,st(n))),mappers:this.mappers,parser:t.parseNode});return s}var r,n;return e}))}))}))}}}])}));