buffer-apg-js
Version:
JavaScript APG, an ABNF Parser Generator
10 lines • 93.3 kB
JavaScript
!function e(t,n,r){function o(s,i){if(!n[s]){if(!t[s]){var h="function"==typeof require&&require;if(!i&&h)return h(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,(function(e){return o(t[s][1][e]||e)}),l,l.exports,e,t,n,r)}return n[s].exports}for(var a="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=c(e),s=r[0],i=r[1],h=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,i)),l=0,f=i>0?s-4:s;for(n=0;n<f;n+=4)t=o[e.charCodeAt(n)]<<18|o[e.charCodeAt(n+1)]<<12|o[e.charCodeAt(n+2)]<<6|o[e.charCodeAt(n+3)],h[l++]=t>>16&255,h[l++]=t>>8&255,h[l++]=255&t;2===i&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,h[l++]=255&t);1===i&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,h[l++]=t>>8&255,h[l++]=255&t);return h},n.fromByteArray=function(e){for(var t,n=e.length,o=n%3,a=[],s=16383,i=0,h=n-o;i<h;i+=s)a.push(l(e,i,i+s>h?h:i+s));1===o?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],o=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,h=s.length;i<h;++i)r[i]=s[i],o[s.charCodeAt(i)]=i;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,a,s=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),s.push(r[(a=o)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],2:[function(e,t,n){(function(t){(function(){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var t=e("base64-js"),r=e("ieee754");n.Buffer=s,n.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},n.INSPECT_MAX_BYTES=50;var o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|u(e,t),r=a(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=s.prototype,r}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);var o=function(e){if(s.isBuffer(e)){var t=0|f(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||P(e.length)?a(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return h(e),a(e<0?0:0|f(e))}function l(e){for(var t=e.length<0?0:0|f(e.length),n=a(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function u(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return _(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return I(e).length;default:if(o)return r?-1:_(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return $(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function d(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),P(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){var a,s=1,i=e.length,h=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,i/=2,h/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(a=n;a<i;a++)if(c(e,a)===c(t,-1===l?0:a-l)){if(-1===l&&(l=a),a-l+1===h)return l*s}else-1!==l&&(a-=a-l),l=-1}else for(n+h>i&&(n=i-h),a=n;a>=0;a--){for(var f=!0,u=0;u<h;u++)if(c(e,a+u)!==c(t,u)){f=!1;break}if(f)return a}return-1}function A(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s<r;++s){var i=parseInt(t.substr(2*s,2),16);if(P(i))return s;e[n+s]=i}return s}function T(e,t,n,r){return H(_(t,e.length-n),e,n,r)}function m(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return m(e,t,n,r)}function E(e,t,n,r){return H(I(t),e,n,r)}function y(e,t,n,r){return H(function(e,t){for(var n,r,o,a=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,o=n%256,a.push(o),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var a,s,i,h,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[o+1]))&&(h=(31&c)<<6|63&a)>127&&(l=h);break;case 3:a=e[o+1],s=e[o+2],128==(192&a)&&128==(192&s)&&(h=(15&c)<<12|(63&a)<<6|63&s)>2047&&(h<55296||h>57343)&&(l=h);break;case 4:a=e[o+1],s=e[o+2],i=e[o+3],128==(192&a)&&128==(192&s)&&128==(192&i)&&(h=(15&c)<<18|(63&a)<<12|(63&s)<<6|63&i)>65535&&h<1114112&&(l=h)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=L)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=L));return n}(r)}n.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,n){return i(e,t,n)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,n){return function(e,t,n){return h(e),e<=0?a(e):void 0!==t?"string"==typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o<a;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},s.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}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(F(a,Uint8Array)&&(a=s.from(a)),!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},s.byteLength=u,s.prototype._isBuffer=!0,s.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)d(this,t,t+1);return this},s.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)d(this,t,t+3),d(this,t+1,t+2);return this},s.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)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,o){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),h=Math.min(a,i),c=this.slice(r,o),l=e.slice(t,n),f=0;f<h;++f)if(c[f]!==l[f]){a=c[f],i=l[f];break}return a<i?-1:i<a?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return A(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":return m(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var L=4096;function M(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function $(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",a=t;a<n;++a)o+=U(e[a]);return o}function x(e,t,n){for(var r=e.slice(t,n),o="",a=0;a<r.length;a+=2)o+=String.fromCharCode(r[a]+256*r[a+1]);return o}function B(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,o,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function v(e,t,n,o,a){return t=+t,n>>>=0,a||R(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function O(e,t,n,o,a){return t=+t,n>>>=0,a||R(e,0,n,8),r.write(e,t,n,o,52,8),n+8}s.prototype.slice=function(e,t){var n=this.length;(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);var r=this.subarray(e,t);return r.__proto__=s.prototype,r},s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e],o=1,a=0;++a<t&&(o*=256);)r+=this[e+a]*o;return r},s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||B(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=this[e],o=1,a=0;++a<t&&(o*=256);)r+=this[e+a]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||B(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||B(e,4,this.length),r.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||B(e,4,this.length),r.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||B(e,8,this.length),r.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||B(e,8,this.length),r.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,a=0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=0,s=1,i=0;for(this[t]=255&e;++a<n&&(s*=256);)e<0&&0===i&&0!==this[t+a-1]&&(i=1),this[t+a]=(e/s>>0)-i&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=n-1,s=1,i=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/s>>0)-i&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return v(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return v(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return O(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return O(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var a=o-1;a>=0;--a)e[a+t]=this[a+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return o},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var i=s.isBuffer(e)?e:s.from(e,r),h=i.length;if(0===h)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=i[a%h]}return this};var D=/[^+/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function _(e,t){var n;t=t||1/0;for(var r=e.length,o=null,a=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function I(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function P(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":1,buffer:2,ieee754:3}],3:[function(e,t,n){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
n.read=function(e,t,n,r,o){var a,s,i=8*o-r-1,h=(1<<i)-1,c=h>>1,l=-7,f=n?o-1:0,u=n?-1:1,p=e[t+f];for(f+=u,a=p&(1<<-l)-1,p>>=-l,l+=i;l>0;a=256*a+e[t+f],f+=u,l-=8);for(s=a&(1<<-l)-1,a>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=u,l-=8);if(0===a)a=1-c;else{if(a===h)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=c}return(p?-1:1)*s*Math.pow(2,a-r)},n.write=function(e,t,n,r,o,a){var s,i,h,c=8*a-o-1,l=(1<<c)-1,f=l>>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-s))<1&&(s--,h*=2),(t+=s+f>=1?u/h:u*Math.pow(2,1-f))*h>=2&&(s++,h/=2),s+f>=l?(i=0,s=l):s+f>=1?(i=(t*h-1)*Math.pow(2,o),s+=f):(i=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&i,p+=d,i/=256,o-=8);for(s=s<<o|i,c+=o;c>0;e[n+p]=255&s,p+=d,s/=256,c-=8);e[n+p-d]|=128*g}},{}],4:[function(e,t,n){(function(t){(function(){const r=this,o=e("./transformers"),a="UTF8",s="UTF16",i="UTF16BE",h="UTF16LE",c="UTF32",l="UTF32BE",f="UTF32LE",u="UINT7",p="ASCII",d="BINARY",g="UINT8",b="UINT16",A="UINT16LE",T="UINT16BE",m="UINT32",w="UINT32LE",E="UINT32BE",y="ESCAPED",C="STRING",S=function(e,n){if("string"!=typeof e||""===e)throw new TypeError(`type: "${e}" not recognized`);const r=function(e){const t={type:"",base64:!1},n=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(e);return n&&(n[2]&&(t.type=n[2].toUpperCase()),n[1]&&(t.base64=!0)),t}(e.toUpperCase());if(r.base64){if(r.type===C)throw new TypeError(`type: "${e} "BASE64:" prefix not allowed with type STRING`);if(t.isBuffer(n))r.data=o.base64.decode(n);else{if("string"!=typeof n)throw new TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof n}`);{const e=t.from(n,"ascii");r.data=o.base64.decode(e)}}}else r.data=n;switch(r.type){case a:!function(e){e.type=a;const t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)}(r);break;case s:case i:case h:!function(e){const t=e.data;switch(e.bom=0,e.type){case s:e.type=i,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=h,e.bom=2));break;case i:if(e.type=i,t.length>=2)if(254===t[0]&&255===t[1])e.bom=2;else if(255===t[0]&&254===t[1])throw new TypeError('src type: "UTF16BE" specified but BOM is for "UTF16LE"');break;case h:if(e.type=h,t.length>=0){if(254===t[0]&&255===t[1])throw new TypeError('src type: "UTF16LE" specified but BOM is for "UTF16BE"');255===t[0]&&254===t[1]&&(e.bom=2)}break;default:throw new TypeError(`UTF16 BOM: src type "${e.type}" unrecognized`)}}(r);break;case c:case l:case f:!function(e){const t=e.data;switch(e.bom=0,e.type){case c:e.type=l,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.type=f,e.bom=4));break;case l:if(e.type=l,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]))throw new TypeError('src type: UTF32BE specified but BOM is for UTF32LE"');break;case f:if(e.type=f,t.length>=4){if(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3])throw new TypeError('src type: "UTF32LE" specified but BOM is for "UTF32BE"');255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.bom=4)}break;default:throw new TypeError(`UTF32 BOM: src type "${e.type}" unrecognized`)}}(r);break;case b:r.type=T;break;case m:r.type=E;break;case p:r.type=u;break;case d:r.type=g;break;case u:case g:case A:case T:case w:case E:case C:case y:break;default:throw new TypeError(`type: "${e}" not recognized`)}if(r.type===C){if("string"!=typeof r.data)throw new TypeError(`type: "${e}" but data is not a string`)}else if(!t.isBuffer(r.data))throw new TypeError(`type: "${e}" but data is not a Buffer`);return r},L=function(e,t){switch(e){case a:return o.utf8.encode(t);case i:return o.utf16be.encode(t);case h:return o.utf16le.encode(t);case l:return o.utf32be.encode(t);case f:return o.utf32le.encode(t);case u:return o.uint7.encode(t);case g:return o.uint8.encode(t);case T:return o.uint16be.encode(t);case A:return o.uint16le.encode(t);case E:return o.uint32be.encode(t);case w:return o.uint32le.encode(t);case C:return o.string.encode(t);case y:return o.escaped.encode(t);default:throw new TypeError(`encode type "${e}" not recognized`)}};n.decode=function(e,t){return function(e){switch(e.type){case a:return o.utf8.decode(e.data,e.bom);case h:return o.utf16le.decode(e.data,e.bom);case i:return o.utf16be.decode(e.data,e.bom);case l:return o.utf32be.decode(e.data,e.bom);case f:return o.utf32le.decode(e.data,e.bom);case u:return o.uint7.decode(e.data);case g:return o.uint8.decode(e.data);case T:return o.uint16be.decode(e.data);case A:return o.uint16le.decode(e.data);case E:return o.uint32be.decode(e.data);case w:return o.uint32le.decode(e.data);case C:return o.string.decode(e.data);case y:return o.escaped.decode(e.data);default:throw new TypeError(`decode type "${e.type}" not recognized`)}}(S(e,t))},n.encode=function(e,t){let n,r;const S=function(e,t){if(!Array.isArray(t))throw new TypeError('dst chars: not array: "'+typeof t);if("string"!=typeof e)throw new TypeError('dst type: not string: "'+typeof e);const n=function(e){let t,n;const r={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(n=e,t=e.slice(0,5),"CRLF:"===t){r.crlf=!0,n=e.slice(5);break}if(t=e.slice(0,3),"LF:"===t){r.lf=!0,n=e.slice(3);break}break}return t=n.split(":"),1===t.length?r.type=t[0]:2===t.length&&"BASE64"===t[1]&&(r.base64=!0,r.type=t[0]),r}(e.toUpperCase());switch(n.type){case a:case i:case h:case l:case f:case u:case g:case A:case T:case w:case E:case y:break;case C:if(n.base64)throw new TypeError('":BASE64" suffix not allowed with type STRING');break;case p:n.type=u;break;case d:n.type=g;break;case s:n.type=i;break;case c:n.type=l;break;case b:n.type=T;break;case m:n.type=E;break;default:throw new TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return n}(e,t);return S.crlf?(n=o.lineEnds.crlf(t),r=L(S.type,n)):S.lf?(n=o.lineEnds.lf(t),r=L(S.type,n)):r=L(S.type,t),S.base64&&(r=o.base64.encode(r)),r},n.convert=function(e,t,n){return r.encode(n,r.decode(e,t))}}).call(this)}).call(this,e("buffer").Buffer)},{"./transformers":6,buffer:2}],5:[function(e,t,n){t.exports={converter:e("./converter"),transformers:e("./transformers")}},{"./converter":4,"./transformers":6}],6:[function(e,t,n){(function(e){(function(){const t=this,r=4294967292,o=4294967293,a=4294967294,s=4294967295,i=[0,1,3,7,15,31,63,127,255,511,1023],h=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),l=[];c.forEach((e=>{l.push(e.charCodeAt(0))})),n.utf8={encode(t){const n=[];return t.forEach((e=>{if(e>=0&&e<=127)n.push(e);else if(e<=2047)n.push(192+(e>>6&i[5])),n.push(128+(e&i[6]));else if(e<55296||e>57343&&e<=65535)n.push(224+(e>>12&i[4])),n.push(128+(e>>6&i[6])),n.push(128+(e&i[6]));else{if(!(e>=65536&&e<=1114111))throw new RangeError(`utf8.encode: character out of range: char: ${e}`);{const t=e>>16&i[5];n.push(240+(t>>2)),n.push(128+((t&i[2])<<4)+(e>>12&i[4])),n.push(128+(e>>6&i[6])),n.push(128+(e&i[6]))}}})),e.from(n)},decode(e,t){function n(e,t){if(128!=(192&t))return o;const n=((e&i[5])<<6)+(t&i[6]);return n<128?r:n}function h(e,t,n){if(128!=(192&n)||128!=(192&t))return o;const s=((e&i[4])<<12)+((t&i[6])<<6)+(n&i[6]);return s<2048?r:s>=55296&&s<=57343?a:s}function c(e,t,n,s){if(128!=(192&s)||128!=(192&n)||128!=(192&t))return o;const h=(((e&i[3])<<2)+(t>>4&i[2])<<16)+((t&i[4])<<12)+((n&i[6])<<6)+(s&i[6]);return h<65536?r:h>1114111?a:h}let l,f,u,p,d,g;const b=e.length;let A=t?3:0;const T=[];for(;A<b;){f=e[A],l=s;const t=!0;for(;t;){if(f>=0&&f<=127){l=f,g=1;break}if(u=A+1,u<b&&f>=194&&f<=223){l=n(f,e[u]),g=2;break}if(p=A+2,p<b&&f>=224&&f<=239){l=h(f,e[u],e[p]),g=3;break}if(d=A+3,d<b&&f>=240&&f<=244){l=c(f,e[u],e[p],e[d]),g=4;break}break}if(l>1114111){const e=`byte[${A}]`;if(l===s)throw new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${e}`);if(l===o)throw new RangeError(`utf8.decode: illegal trailing byte found at: ${e}`);if(l===a)throw new RangeError(`utf8.decode: code point out of range found at: ${e}`);if(l===r)throw new RangeError(`utf8.decode: non-shortest form found at: ${e}`);throw new RangeError(`utf8.decode: unrecognized error found at: ${e}`)}T.push(l),A+=g}return T}},n.utf16be={encode(t){const n=[];let r,o,a;for(let e=0;e<t.length;e+=1)if(r=t[e],r>=0&&r<=55295||r>=57344&&r<=65535)n.push(r>>8&i[8]),n.push(r&i[8]);else{if(!(r>=65536&&r<=1114111))throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${e}]: ${r}`);a=r-65536,o=55296+(a>>10),a=56320+(a&i[10]),n.push(o>>8&i[8]),n.push(o&i[8]),n.push(a>>8&i[8]),n.push(a&i[8])}return e.from(n)},decode(e,t){if(e.length%2>0)throw new RangeError(`utf16be.decode: data length must be even multiple of 2: length: ${e.length}`);const n=[],r=e.length;let o,a,s,i,h,c,l=t?2:0,f=0;for(;l<r;){const t=!0;for(;t;){if(s=l+1,s<r){if(h=(e[l]<<8)+e[s],h<55296||h>57343){o=h,a=2;break}if(i=l+3,i<r&&(c=(e[l+2]<<8)+e[i],h<=56319&&c>=56320&&c<=57343)){o=65536+(h-55296<<10)+(c-56320),a=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${l}]`)}n[f++]=o,l+=a}return n}},n.utf16le={encode(t){const n=[];let r,o,a;for(let e=0;e<t.length;e+=1)if(r=t[e],r>=0&&r<=55295||r>=57344&&r<=65535)n.push(r&i[8]),n.push(r>>8&i[8]);else{if(!(r>=65536&&r<=1114111))throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${e}]: ${r}`);a=r-65536,o=55296+(a>>10),a=56320+(a&i[10]),n.push(o&i[8]),n.push(o>>8&i[8]),n.push(a&i[8]),n.push(a>>8&i[8])}return e.from(n)},decode(e,t){if(e.length%2>0)throw new RangeError(`utf16le.decode: data length must be even multiple of 2: length: ${e.length}`);const n=[],r=e.length;let o,a,s,i,h,c,l=t?2:0,f=0;for(;l<r;){const t=!0;for(;t;){if(s=l+1,s<r){if(h=(e[s]<<8)+e[l],h<55296||h>57343){o=h,a=2;break}if(i=l+3,i<r&&(c=(e[i]<<8)+e[l+2],h<=56319&&c>=56320&&c<=57343)){o=65536+(h-55296<<10)+(c-56320),a=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${l}]`)}n[f++]=o,l+=a}return n}},n.utf32be={encode(t){const n=e.alloc(4*t.length);let r=0;return t.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${r/4}]: ${e}`);n[r++]=e>>24&i[8],n[r++]=e>>16&i[8],n[r++]=e>>8&i[8],n[r++]=e&i[8]})),n},decode(e,t){if(e.length%4>0)throw new RangeError(`utf32be.decode: UTF32BE byte length must be even multiple of 4: length: ${e.length}`);const n=[];let r=t?4:0;for(;r<e.length;r+=4){const t=(e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${r/4}]: ${t}`);n.push(t)}return n}},n.utf32le={encode(t){const n=e.alloc(4*t.length);let r=0;return t.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${e}`);n[r++]=e&i[8],n[r++]=e>>8&i[8],n[r++]=e>>16&i[8],n[r++]=e>>24&i[8]})),n},decode(e,t){if(e.length%4>0)throw new RangeError(`utf32be.decode: UTF32LE byte length must be even multiple of 4: length: ${e.length}`);const n=[];let r=t?4:0;for(;r<e.length;r+=4){const t=(e[r+3]<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${r/4}]: ${t}`);n.push(t)}return n}},n.uint7={encode(t){const n=e.alloc(t.length);for(let e=0;e<t.length;e+=1){if(t[e]>127)throw new RangeError(`uint7.encode: UINT7 character code out of range: char[${e}]: ${t[e]}`);n[e]=t[e]}return n},decode(e){const t=[];for(let n=0;n<e.length;n+=1){if(e[n]>127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${n}]: ${e[n]}`);t[n]=e[n]}return t}},n.uint8={encode(t){const n=e.alloc(t.length);for(let e=0;e<t.length;e+=1){if(t[e]>255)throw new RangeError(`uint8.encode: UINT8 character code out of range: char[${e}]: ${t[e]}`);n[e]=t[e]}return n},decode(e){const t=[];for(let n=0;n<e.length;n+=1)t[n]=e[n];return t}},n.uint16be={encode(t){const n=e.alloc(2*t.length);let r=0;return t.forEach((e=>{if(e>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${r/2}]: ${e}`);n[r++]=e>>8&i[8],n[r++]=e&i[8]})),n},decode(e){if(e.length%2>0)throw new RangeError(`uint16be.decode: UINT16BE byte length must be even multiple of 2: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=2)t.push((e[n]<<8)+e[n+1]);return t}},n.uint16le={encode(t){const n=e.alloc(2*t.length);let r=0;return t.forEach((e=>{if(e>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${r/2}]: ${e}`);n[r++]=e&i[8],n[r++]=e>>8&i[8]})),n},decode(e){if(e.length%2>0)throw new RangeError(`uint16le.decode: UINT16LE byte length must be even multiple of 2: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=2)t.push((e[n+1]<<8)+e[n]);return t}},n.uint32be={encode(t){const n=e.alloc(4*t.length);let r=0;return t.forEach((e=>{n[r++]=e>>24&i[8],n[r++]=e>>16&i[8],n[r++]=e>>8&i[8],n[r++]=e&i[8]})),n},decode(e){if(e.length%4>0)throw new RangeError(`uint32be.decode: UINT32BE byte length must be even multiple of 4: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=4)t.push((e[n]<<24)+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3]);return t}},n.uint32le={encode(t){const n=e.alloc(4*t.length);let r=0;return t.forEach((e=>{n[r++]=e&i[8],n[r++]=e>>8&i[8],n[r++]=e>>16&i[8],n[r++]=e>>24&i[8]})),n},decode(e){if(e.length%4>0)throw new RangeError(`uint32le.decode: UINT32LE byte length must be even multiple of 4: length: ${e.length}`);const t=[];for(let n=0;n<e.length;n+=4)t.push((e[n+3]<<24)+(e[n+2]<<16)+(e[n+1]<<8)+e[n]);return t}},n.string={encode:e=>t.utf16le.encode(e).toString("utf16le"),decode:n=>t.utf16le.decode(e.from(n,"utf16le"),0)},n.escaped={encode(t){const n=[];for(let r=0;r<t.length;r+=1){const o=t[r];if(96===o)n.push(o),n.push(o);else if(10===o)n.push(o);else if(o>=32&&o<=126)n.push(o);else{let t="";if(o>=0&&o<=31)t+=`\`x${h[o]}`;else if(o>=127&&o<=255)t+=`\`x${h[o]}`;else if(o>=256&&o<=65535)t+=`\`u${h[o>>8&i[8]]}${h[o&i[8]]}`;else{if(!(o>=65536&&o<=4294967295))throw new Error("escape.encode(char): char > 0xffffffff not allowed");{t+="`u{";const e=o>>24&i[8];e>0&&(t+=h[e]),t+=`${h[o>>16&i[8]]+h[o>>8&i[8]]+h[o&i[8]]}}`}}e.from(t).forEach((e=>{n.push(e)}))}}return e.from(n)},decode(e){function t(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function n(e,n,r){const o={char:null,nexti:e+2,error:!0};if(e+1<n&&t(r[e])&&t(r[e+1])){const t=String.fromCodePoint(r[e],r[e+1]);o.char=parseInt(t,16),Number.isNaN(o.char)||(o.error=!1)}return o}function r(e,n,r){const o={char:null,nexti:e+4,error:!0};if(e+3<n&&t(r[e])&&t(r[e+1])&&t(r[e+2])&&t(r[e+3])){const t=String.fromCodePoint(r[e],r[e+1],r[e+2],r[e+3]);o.char=parseInt(t,16),Number.isNaN(o.char)||(o.error=!1)}return o}function o(e,n,r){const o={char:null,nexti:e+4,error:!0};let a="";for(;e<n&&t(r[e]);)a+=String.fromCodePoint(r[e]),e+=1;return o.char=parseInt(a,16),125!==r[e]||Number.isNaN(o.char)||(o.error=!1),o.nexti=e+1,o}const a=[],s=e.length;let i,h,c,l=0;for(;l<s;){const t=!0;for(;t;){if(c=!0,96!==e[l]){a.push(e[l]),l+=1,c=!1;break}if(i=l+1,i>=s)break;if(96===e[i]){a.push(96),l+=2,c=!1;break}if(120===e[i]){if(h=n(i+1,s,e),h.error)break;a.push(h.char),l=h.nexti,c=!1;break}if(117===e[i]){if(123===e[i+1]){if(h=o(i+2,s,e),h.error)break;a.push(h.char),l=h.nexti,c=!1;break}if(h=r(i+1,s,e),h.error)break;a.push(h.char),l=h.nexti,c=!1;break}break}if(c)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${l}]`)}return a}};const f=10;n.lineEnds={crlf(e){const t=[];let n=0;for(;n<e.length;)switch(e[n]){case 13:n+1<e.length&&e[n+1]===f?n+=2:n+=1,t.push(13),t.push(f);break;case f:t.push(13),t.push(f),n+=1;break;default:t.push(e[n]),n+=1}return t.length>0&&t[t.length-1]!==f&&(t.push(13),t.push(f)),t},lf(e){const t=[];let n=0;for(;n<e.length;)switch(e[n]){case 13:n+1<e.length&&e[n+1]===f?n+=2:n+=1,t.push(f);break;case f:t.push(f),n+=1;break;default:t.push(e[n]),n+=1}return t.length>0&&t[t.length-1]!==f&&t.push(f),t}},n.base64={encode(t){if(0===t.length)return e.alloc(0);let n,r,o,a=t.length%3;a=a>0?3-a:0;let s=(t.length+a)/3;const h=e.alloc(4*s);a>0&&(s-=1),n=0,r=0;for(let e=0;e<s;e+=1)o=t[n++]<<16,o+=t[n++]<<8,o+=t[n++],h[r++]=l[o>>18&i[6]],h[r++]=l[o>>12&i[6]],h[r++]=l[o>>6&i[6]],h[r++]=l[o&i[6]];return 0===a?h:1===a?(o=t[n++]<<16,o+=t[n]<<8,h[r++]=l[o>>18&i[6]],h[r++]=l[o>>12&i[6]],h[r++]=l[o>>6&i[6]],h[r]=l[64],h):2===a?(o=t[n]<<16,h[r++]=l[o>>18&i[6]],h[r++]=l[o>>12&i[6]],h[r++]=l[64],h[r]=l[64],h):void 0},decode(t){if(0===t.length)return e.alloc(0);const n=function(t){const n=[];let r=0;for(let e=0;e<t.length;e+=1){const o=t[e],a=!0;for(;a&&32!==o&&9!==o&&10!==o&&13!==o;){if(o>=65&&o<=90){n.push(o-65);break}if(o>=97&&o<=122){n.push(o-71);break}if(o>=48&&o<=57){n.push(o+4);break}if(43===o){n.push(62);break}if(47===o){n.push(63);break}if(61===o){n.push(64),r+=1;break}throw new RangeError(`base64.decode: invalid character buf[${e}]: ${o}`)}}if(n.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${n.length}`);switch(r){case 0:break;case 1:if(64!==n[n.length-1])throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==n[n.length-1]||64!==n[n.length-2])throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError(`base64.decode: more than two tail characters found: ${r}`)}return{tail:r,buf:e.from(n)}}(t),{tail:r}=n,o=n.buf;let a,s,h,c=o.length/4;const l=e.alloc(3*c-r);r>0&&(c-=1),s=0,a=0;for(let e=0;e<c;e+=1)h=o[a++]<<18,h+=o[a++]<<12,h+=o[a++]<<6,h+=o[a++],l[s++]=h>>16&i[8],l[s++]=h>>8&i[8],l[s++]=h&i[8];return 1===r&&(h=o[a++]<<18,h+=o[a++]<<12,h+=o[a]<<6,l[s++]=h>>16&i[8],l[s]=h>>8&i[8]),2===r&&(h=o[a++]<<18,h+=o[a++]<<12,l[s]=h>>16&i[8]),l},toString(e){if(e.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${e.length}`);let t="",n=0;function r(e,r,o,a){switch(n){case 76:t+=`\r\n${e}${r}${o}${a}`,n=4;break;case 75:t+=`${e}\r\n${r}${o}${a}`,n=3;break;case 74:t+=`${e+r}\r\n${o}${a}`,n=2;break;case 73:t+=`${e+r+o}\r\n${a}`,n=1;break;default:t+=e+r+o+a,n+=4}}for(let t=0;t<e.length;t+=4){for(let n=t;n<t+4;n+=1)if(!((o=e[n])>=65&&o<=90||o>=97&&o<=122||o>=48&&o<=57||43===o||47===o||61===o))throw new RangeError(`base64.toString: buf[${n}]: ${e[n]} : not valid base64 character code`);r(String.fromCharCode(e[t]),String.fromCharCode(e[t+1]),String.fromCharCode(e[t+2]),String.fromCharCode(e[t+3]))}var o;return t}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:2}],7:[function(e,t,n){t.exports=function(){const t=e("./identifiers"),n=e("./utilities"),r=this;let o=null,a=null,s=null,i=0;const h=[],c=[],l=[],f=[];function u(e){let t="";for(let n=0;n<e;n+=1)t+=" ";return t}this.callbacks=[],this.astObject="astObject",this.init=function(e,t,n){let u;l.length=0,f.length=0,h.length=0,i=0,o=e,a=t,s=n;const p=[];for(u=0;u<o.length;u+=1)p.push(o[u].lower);for(u=0;u<a.length;u+=1)p.push(a[u].lower);for(i=o.length+a.length,u=0;u<i;u+=1)h[u]=!1,c[u]=null;for(const e in r.callbacks){const t=e.toLowerCase();if(u=p.indexOf(t),u<0)throw new Error(`ast.js: init: node '${e}' not a rule or udt name`);"function"==typeof r.callbacks[e]&&(h[u]=!0,c[u]=r.callbacks[e]),!0===r.callbacks[e]&&(h[u]=!0)}},this.ruleDefined=function(e){return!1!==h[e]},this.udtDefined=function(e){return!1!==h[o.length+e]},this.down=function(e,n){const r=f.length;return l.push(r),f.push({name:n,thisIndex:r,thatIndex:null,state:t.SEM_PRE,callbackIndex:e,phraseIndex:null,phraseLength:null,stack:l.length}),r},this.up=function(e,n,r,o){const a=f.length,s=l.pop();return f.push({name:n,thisIndex:a,thatIndex:s,state:t.SEM_POST,callbackIndex:e,phraseIndex:r,phraseLength:o,stack:l.length}),f[s].thatIndex=a,f[s].phraseIndex=r,f[s].phraseLength=o,a},this.translate=function(e){let n,r,o;for(let a=0;a<f.length;a+=1)o=f[a],r=c[o.callbackIndex],o.state===t.SEM_PRE?null!==r&&(n=r(t.SEM_PRE,s,o.phraseIndex,o.phraseLength,e),n===t.SEM_SKIP&&(a=o.thatIndex)):null!==r&&r(t.SEM_POST,s,o.phraseIndex,o.phraseLength,e)},this.setLength=function(e){f.length=e,l.length=e>0?f[e-1].stack:0},this.getLength=function(){return f.length},this.toXml=function(e){let r=n.charsToDec,o="decimal integer character codes";if("string"==typeof e&&e.length>=3){const t=e.slice(0,3).toLowerCase();"asc"===t?(r=n.charsToAscii,o="ASCII for printing characters, hex for non-printing"):"hex"===t?(r=n.charsToHex,o="hexadecimal integer character codes"):"uni"===t&&(r=n.charsToUnicode,o="Unicode UTF-32 integer character codes")}let a="",i=0;return a+='<?xml version="1.0" encoding="utf-8"?>\n',a+=`<root nodes="${f.length/2}" characters="${s.length}">\n`,a+=`\x3c!-- input string, ${o} --\x3e\n`,a+=u(i+2),a+=r(s),a+="\n",f.forEach((e=>{e.state===t.SEM_PRE?(i+=1,a+=u(i),a+=`<node name="${e.name}" index="${e.phraseIndex}" length="${e.phraseLength}">\n`,a+=u(i+2),a+=r(s,e.phraseIndex,e.phraseLength),a+="\n"):(a+=u(i),a+=`</node>\x3c!-- name="${e.name}" --\x3e\n`,i-=1)})),a+="</root>\n",a},this.phrases=function(){const e={};let n,r;for(n=0;n<f.length;n+=1)r=f[n],r.state===t.SEM_PRE&&(Array.isArray(e[r.name])||(e[r.name]=[]),e[r.name].push({index:r.phraseIndex,length:r.phraseLength}));return e}}},{"./identifiers":10,"./utilities":16}],8:[function(e,t,n){t.exports=function(){let e=-1,t=0;this.init=function(n){if("number"!=typeof n||n<=0)throw new Error("circular-buffer.js: init: circular buffer size must an integer > 0");t=Math.ceil(n),e=-1},this.increment=function(){return e+=1,(e+t)%t},this.maxSize=function(){return t},this.items=function(){return e+1},this.getListIndex=function(n){return-1===e||n<0||n>e||e-n>=t?-1:(n+t)%t},this.forEach=function(n){if(-1!==e)if(e<t)for(let t=0;t<=e;t+=1)n(t,t);else for(let r=e-t+1;r<=e;r+=1){n((r+t)%t,r)}}}},{}],9:[function(e,t,n){t.exports=function(){return"/* This file automatically generated by jsonToless() and LESS. */\n.apg-mono {\n font-family: monospace;\n}\n.apg-active {\n font-weight: bold;\n color: #000000;\n}\n.apg-match {\n font-weight: bold;\n color: #264BFF;\n}\n.apg-empty {\n font-weight: bold;\n color: #0fbd0f;\n}\n.apg-nomatch {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-lh-match {\n font-weight: bold;\n color: #1A97BA;\n}\n.apg-lb-match {\n font-weight: bold;\n color: #5F1687;\n}\n.apg-remainder {\n font-weight: bold;\n color: #999999;\n}\n.apg-ctrl-char {\n font-weight: bolder;\n font-style: italic;\n font-size: 0.6em;\n}\n.apg-line-end {\n font-weight: bold;\n color: #000000;\n}\n.apg-error {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-phrase {\n color: #000000;\n background-color: #8caae6;\n}\n.apg-empty-phrase {\n color: #0fbd0f;\n}\ntable.apg-state {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th,\ntable.apg-state td {\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th:nth-last-child(2),\ntable.apg-state td:nth-last-child(2) {\n text-align: right;\n}\ntable.apg-state caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-stats {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats th,\ntable.apg-stats td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace th,\ntable.apg-trace td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace th:last-child,\ntable.apg-trace th:nth-last-child(2),\ntable.apg-trace td:last-child,\ntable.apg-trace td:nth-last-child(2) {\n text-align: left;\n}\ntable.apg-grammar {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-grammar th,\ntable.apg-grammar td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar th:last-child,\ntable.apg-grammar td:last-child {\n text-align: left;\n}\ntable.apg-rules {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-rules th,\ntable.apg-rules td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules a {\n color: #003399 !important;\n}\ntable.apg-rules a:hover {\n color: #8caae6 !important;\n}\ntable.apg-attrs {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-attrs th,\ntable.apg-attrs td {\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs th:nth-child(1),\ntable.apg-attrs th:nth-child(2),\ntable.apg-attrs th:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs td:nth-child(1),\ntable.apg-attrs td:nth-child(2),\ntable.apg-attrs td:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs a {\n color: #003399 !important;\n}\ntable.apg-attrs a:hover {\n color: #8caae6 !important;\n}\n"}},{}],10:[function(e,t,n){t.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:1