buffer-apg-js
Version:
JavaScript APG, an ABNF Parser Generator
11 lines (10 loc) • 42.5 kB
JavaScript
!function e(t,r,n){function o(f,u){if(!r[f]){if(!t[f]){var a="function"==typeof require&&require;if(!u&&a)return a(f,!0);if(i)return i(f,!0);var s=new Error("Cannot find module '"+f+"'");throw s.code="MODULE_NOT_FOUND",s}var c=r[f]={exports:{}};t[f][0].call(c.exports,(function(e){return o(t[f][1][e]||e)}),c,c.exports,e,t,r,n)}return r[f].exports}for(var i="function"==typeof require&&require,f=0;f<n.length;f++)o(n[f]);return o}({1:[function(e,t,r){"use strict";r.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=s(e),f=n[0],u=n[1],a=new i(function(e,t,r){return 3*(t+r)/4-r}(0,f,u)),c=0,h=u>0?f-4:f;for(r=0;r<h;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],a[c++]=t>>16&255,a[c++]=t>>8&255,a[c++]=255&t;2===u&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,a[c++]=255&t);1===u&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,a[c++]=t>>8&255,a[c++]=255&t);return a},r.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],f=16383,u=0,a=r-o;u<a;u+=f)i.push(c(e,u,u+f>a?a:u+f));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=f.length;u<a;++u)n[u]=f[u],o[f.charCodeAt(u)]=u;function s(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 o,i,f=[],u=t;u<r;u+=3)o=(e[u]<<16&16711680)+(e[u+1]<<8&65280)+(255&e[u+2]),f.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return f.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],2:[function(e,t,r){(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"),n=e("ieee754");r.Buffer=f,r.SlowBuffer=function(e){+e!=e&&(e=0);return f.alloc(+e)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function i(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=f.prototype,t}function f(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!f.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|l(e,t),n=i(r),o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return c(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(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=f.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return f.from(n,t,r);var o=function(e){if(f.isBuffer(e)){var t=0|h(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||P(e.length)?i(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return f.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function a(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 s(e){return a(e),i(e<0?0:0|h(e))}function c(e){for(var t=e.length<0?0:0|h(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function l(e,t){if(f.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(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 r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return x(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return M(e).length;default:if(o)return n?-1:x(e).length;t=(""+t).toLowerCase(),o=!0}}function p(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 T(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),P(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=f.from(t,n)),f.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){var i,f=1,u=e.length,a=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;f=2,u/=2,a/=2,r/=2}function s(e,t){return 1===f?e[t]:e.readUInt16BE(t*f)}if(o){var c=-1;for(i=r;i<u;i++)if(s(e,i)===s(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===a)return c*f}else-1!==c&&(i-=i-c),c=-1}else for(r+a>u&&(r=u-a),i=r;i>=0;i--){for(var h=!0,l=0;l<a;l++)if(s(e,i+l)!==s(t,l)){h=!1;break}if(h)return i}return-1}function w(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var f=0;f<n;++f){var u=parseInt(t.substr(2*f,2),16);if(P(u))return f;e[r+f]=u}return f}function b(e,t,r,n){return O(x(t,e.length-r),e,r,n)}function E(e,t,r,n){return O(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function m(e,t,r,n){return E(e,t,r,n)}function v(e,t,r,n){return O(M(t),e,r,n)}function B(e,t,r,n){return O(function(e,t){for(var r,n,o,i=[],f=0;f<e.length&&!((t-=2)<0);++f)n=(r=e.charCodeAt(f))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function A(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function T(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,f,u,a,s=e[o],c=null,h=s>239?4:s>223?3:s>191?2:1;if(o+h<=r)switch(h){case 1:s<128&&(c=s);break;case 2:128==(192&(i=e[o+1]))&&(a=(31&s)<<6|63&i)>127&&(c=a);break;case 3:i=e[o+1],f=e[o+2],128==(192&i)&&128==(192&f)&&(a=(15&s)<<12|(63&i)<<6|63&f)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:i=e[o+1],f=e[o+2],u=e[o+3],128==(192&i)&&128==(192&f)&&128==(192&u)&&(a=(15&s)<<18|(63&i)<<12|(63&f)<<6|63&u)>65535&&a<1114112&&(c=a)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=h}return function(e){var t=e.length;if(t<=U)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=U));return r}(n)}r.kMaxLength=o,f.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}}(),f.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(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),f.poolSize=8192,f.from=function(e,t,r){return u(e,t,r)},f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,f.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},f.allocUnsafe=function(e){return s(e)},f.allocUnsafeSlow=function(e){return s(e)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==f.prototype},f.compare=function(e,t){if(z(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},f.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}},f.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return f.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=f.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(z(i,Uint8Array)&&(i=f.from(i)),!f.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},f.byteLength=l,f.prototype._isBuffer=!0,f.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},f.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},f.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},f.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):p.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(e){if(!f.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===f.compare(this,e)},f.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},f.prototype.compare=function(e,t,r,n,o){if(z(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.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===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(t>>>=0),a=Math.min(i,u),s=this.slice(n,o),c=e.slice(t,r),h=0;h<a;++h)if(s[h]!==c[h]){i=s[h],u=c[h];break}return i<u?-1:u<i?1:0},f.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},f.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},f.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},f.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 o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return b(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return m(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function $(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=_(e[i]);return o}function R(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function F(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 I(e,t,r,n,o,i){if(!f.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function S(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,o,i){return t=+t,r>>>=0,i||S(e,0,r,4),n.write(e,t,r,o,23,4),r+4}function N(e,t,r,o,i){return t=+t,r>>>=0,i||S(e,0,r,8),n.write(e,t,r,o,52,8),r+8}f.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=f.prototype,n},f.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},f.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},f.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},f.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},f.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),n.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),n.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),n.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),n.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},f.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},f.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(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},f.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(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},f.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var i=0,f=1,u=0;for(this[t]=255&e;++i<r&&(f*=256);)e<0&&0===u&&0!==this[t+i-1]&&(u=1),this[t+i]=(e/f>>0)-u&255;return t+r},f.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var i=r-1,f=1,u=0;for(this[t+i]=255&e;--i>=0&&(f*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/f>>0)-u&255;return t+r},f.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(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},f.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(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},f.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},f.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},f.prototype.writeDoubleLE=function(e,t,r){return N(this,e,t,!0,r)},f.prototype.writeDoubleBE=function(e,t,r){return N(this,e,t,!1,r)},f.prototype.copy=function(e,t,r,n){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");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("Index out of range");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 o=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=o-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},f.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}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 i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var u=f.isBuffer(e)?e:f.from(e,n),a=u.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=u[i%a]}return this};var D=/[^+/0-9A-Za-z-_]/g;function _(e){return e<16?"0"+e.toString(16):e.toString(16)}function x(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],f=0;f<n;++f){if((r=e.charCodeAt(f))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(f+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function M(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 O(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function z(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,r){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
r.read=function(e,t,r,n,o){var i,f,u=8*o-n-1,a=(1<<u)-1,s=a>>1,c=-7,h=r?o-1:0,l=r?-1:1,p=e[t+h];for(h+=l,i=p&(1<<-c)-1,p>>=-c,c+=u;c>0;i=256*i+e[t+h],h+=l,c-=8);for(f=i&(1<<-c)-1,i>>=-c,c+=n;c>0;f=256*f+e[t+h],h+=l,c-=8);if(0===i)i=1-s;else{if(i===a)return f?NaN:1/0*(p?-1:1);f+=Math.pow(2,n),i-=s}return(p?-1:1)*f*Math.pow(2,i-n)},r.write=function(e,t,r,n,o,i){var f,u,a,s=8*i-o-1,c=(1<<s)-1,h=c>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-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?(u=isNaN(t)?1:0,f=c):(f=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-f))<1&&(f--,a*=2),(t+=f+h>=1?l/a:l*Math.pow(2,1-h))*a>=2&&(f++,a/=2),f+h>=c?(u=0,f=c):f+h>=1?(u=(t*a-1)*Math.pow(2,o),f+=h):(u=t*Math.pow(2,h-1)*Math.pow(2,o),f=0));o>=8;e[r+p]=255&u,p+=d,u/=256,o-=8);for(f=f<<o|u,s+=o;s>0;e[r+p]=255&f,p+=d,f/=256,s-=8);e[r+p-d]|=128*g}},{}],4:[function(e,t,r){(function(t){(function(){const n=this,o=e("./transformers"),i="UTF8",f="UTF16",u="UTF16BE",a="UTF16LE",s="UTF32",c="UTF32BE",h="UTF32LE",l="UINT7",p="ASCII",d="BINARY",g="UINT8",y="UINT16",w="UINT16LE",b="UINT16BE",E="UINT32",m="UINT32LE",v="UINT32BE",B="ESCAPED",A="STRING",T=function(e,r){if("string"!=typeof e||""===e)throw new TypeError(`type: "${e}" not recognized`);const n=function(e){const t={type:"",base64:!1},r=/^(base64:)?([a-zA-Z0-9]+)$/i.exec(e);return r&&(r[2]&&(t.type=r[2].toUpperCase()),r[1]&&(t.base64=!0)),t}(e.toUpperCase());if(n.base64){if(n.type===A)throw new TypeError(`type: "${e} "BASE64:" prefix not allowed with type STRING`);if(t.isBuffer(r))n.data=o.base64.decode(r);else{if("string"!=typeof r)throw new TypeError(`type: "${e} unrecognized data type: typeof(data): ${typeof r}`);{const e=t.from(r,"ascii");n.data=o.base64.decode(e)}}}else n.data=r;switch(n.type){case i:!function(e){e.type=i;const t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)}(n);break;case f:case u:case a:!function(e){const t=e.data;switch(e.bom=0,e.type){case f:e.type=u,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=a,e.bom=2));break;case u:if(e.type=u,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 a:if(e.type=a,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`)}}(n);break;case s:case c:case h:!function(e){const t=e.data;switch(e.bom=0,e.type){case s:e.type=c,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=h,e.bom=4));break;case c:if(e.type=c,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 h:if(e.type=h,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`)}}(n);break;case y:n.type=b;break;case E:n.type=v;break;case p:n.type=l;break;case d:n.type=g;break;case l:case g:case w:case b:case m:case v:case A:case B:break;default:throw new TypeError(`type: "${e}" not recognized`)}if(n.type===A){if("string"!=typeof n.data)throw new TypeError(`type: "${e}" but data is not a string`)}else if(!t.isBuffer(n.data))throw new TypeError(`type: "${e}" but data is not a Buffer`);return n},U=function(e,t){switch(e){case i:return o.utf8.encode(t);case u:return o.utf16be.encode(t);case a:return o.utf16le.encode(t);case c:return o.utf32be.encode(t);case h:return o.utf32le.encode(t);case l:return o.uint7.encode(t);case g:return o.uint8.encode(t);case b:return o.uint16be.encode(t);case w:return o.uint16le.encode(t);case v:return o.uint32be.encode(t);case m:return o.uint32le.encode(t);case A:return o.string.encode(t);case B:return o.escaped.encode(t);default:throw new TypeError(`encode type "${e}" not recognized`)}};r.decode=function(e,t){return function(e){switch(e.type){case i:return o.utf8.decode(e.data,e.bom);case a:return o.utf16le.decode(e.data,e.bom);case u:return o.utf16be.decode(e.data,e.bom);case c:return o.utf32be.decode(e.data,e.bom);case h:return o.utf32le.decode(e.data,e.bom);case l:return o.uint7.decode(e.data);case g:return o.uint8.decode(e.data);case b:return o.uint16be.decode(e.data);case w:return o.uint16le.decode(e.data);case v:return o.uint32be.decode(e.data);case m:return o.uint32le.decode(e.data);case A:return o.string.decode(e.data);case B:return o.escaped.decode(e.data);default:throw new TypeError(`decode type "${e.type}" not recognized`)}}(T(e,t))},r.encode=function(e,t){let r,n;const T=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 r=function(e){let t,r;const n={crlf:!1,lf:!1,base64:!1,type:""};for(;;){if(r=e,t=e.slice(0,5),"CRLF:"===t){n.crlf=!0,r=e.slice(5);break}if(t=e.slice(0,3),"LF:"===t){n.lf=!0,r=e.slice(3);break}break}return t=r.split(":"),1===t.length?n.type=t[0]:2===t.length&&"BASE64"===t[1]&&(n.base64=!0,n.type=t[0]),n}(e.toUpperCase());switch(r.type){case i:case u:case a:case c:case h:case l:case g:case w:case b:case m:case v:case B:break;case A:if(r.base64)throw new TypeError('":BASE64" suffix not allowed with type STRING');break;case p:r.type=l;break;case d:r.type=g;break;case f:r.type=u;break;case s:r.type=c;break;case y:r.type=b;break;case E:r.type=v;break;default:throw new TypeError(`dst type unrecognized: "${e}" : must have form [crlf:|lf:]type[:base64]`)}return r}(e,t);return T.crlf?(r=o.lineEnds.crlf(t),n=U(T.type,r)):T.lf?(r=o.lineEnds.lf(t),n=U(T.type,r)):n=U(T.type,t),T.base64&&(n=o.base64.encode(n)),n},r.convert=function(e,t,r){return n.encode(r,n.decode(e,t))}}).call(this)}).call(this,e("buffer").Buffer)},{"./transformers":5,buffer:2}],5:[function(e,t,r){(function(e){(function(){const t=this,n=4294967292,o=4294967293,i=4294967294,f=4294967295,u=[0,1,3,7,15,31,63,127,255,511,1023],a=["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"],s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),c=[];s.forEach((e=>{c.push(e.charCodeAt(0))})),r.utf8={encode(t){const r=[];return t.forEach((e=>{if(e>=0&&e<=127)r.push(e);else if(e<=2047)r.push(192+(e>>6&u[5])),r.push(128+(e&u[6]));else if(e<55296||e>57343&&e<=65535)r.push(224+(e>>12&u[4])),r.push(128+(e>>6&u[6])),r.push(128+(e&u[6]));else{if(!(e>=65536&&e<=1114111))throw new RangeError(`utf8.encode: character out of range: char: ${e}`);{const t=e>>16&u[5];r.push(240+(t>>2)),r.push(128+((t&u[2])<<4)+(e>>12&u[4])),r.push(128+(e>>6&u[6])),r.push(128+(e&u[6]))}}})),e.from(r)},decode(e,t){function r(e,t){if(128!=(192&t))return o;const r=((e&u[5])<<6)+(t&u[6]);return r<128?n:r}function a(e,t,r){if(128!=(192&r)||128!=(192&t))return o;const f=((e&u[4])<<12)+((t&u[6])<<6)+(r&u[6]);return f<2048?n:f>=55296&&f<=57343?i:f}function s(e,t,r,f){if(128!=(192&f)||128!=(192&r)||128!=(192&t))return o;const a=(((e&u[3])<<2)+(t>>4&u[2])<<16)+((t&u[4])<<12)+((r&u[6])<<6)+(f&u[6]);return a<65536?n:a>1114111?i:a}let c,h,l,p,d,g;const y=e.length;let w=t?3:0;const b=[];for(;w<y;){h=e[w],c=f;const t=!0;for(;t;){if(h>=0&&h<=127){c=h,g=1;break}if(l=w+1,l<y&&h>=194&&h<=223){c=r(h,e[l]),g=2;break}if(p=w+2,p<y&&h>=224&&h<=239){c=a(h,e[l],e[p]),g=3;break}if(d=w+3,d<y&&h>=240&&h<=244){c=s(h,e[l],e[p],e[d]),g=4;break}break}if(c>1114111){const e=`byte[${w}]`;if(c===f)throw new RangeError(`utf8.decode: ill-formed UTF8 byte sequence found at: ${e}`);if(c===o)throw new RangeError(`utf8.decode: illegal trailing byte found at: ${e}`);if(c===i)throw new RangeError(`utf8.decode: code point out of range found at: ${e}`);if(c===n)throw new RangeError(`utf8.decode: non-shortest form found at: ${e}`);throw new RangeError(`utf8.decode: unrecognized error found at: ${e}`)}b.push(c),w+=g}return b}},r.utf16be={encode(t){const r=[];let n,o,i;for(let e=0;e<t.length;e+=1)if(n=t[e],n>=0&&n<=55295||n>=57344&&n<=65535)r.push(n>>8&u[8]),r.push(n&u[8]);else{if(!(n>=65536&&n<=1114111))throw new RangeError(`utf16be.encode: UTF16BE value out of range: char[${e}]: ${n}`);i=n-65536,o=55296+(i>>10),i=56320+(i&u[10]),r.push(o>>8&u[8]),r.push(o&u[8]),r.push(i>>8&u[8]),r.push(i&u[8])}return e.from(r)},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 r=[],n=e.length;let o,i,f,u,a,s,c=t?2:0,h=0;for(;c<n;){const t=!0;for(;t;){if(f=c+1,f<n){if(a=(e[c]<<8)+e[f],a<55296||a>57343){o=a,i=2;break}if(u=c+3,u<n&&(s=(e[c+2]<<8)+e[u],a<=56319&&s>=56320&&s<=57343)){o=65536+(a-55296<<10)+(s-56320),i=4;break}}throw new RangeError(`utf16be.decode: ill-formed UTF16BE byte sequence found: byte[${c}]`)}r[h++]=o,c+=i}return r}},r.utf16le={encode(t){const r=[];let n,o,i;for(let e=0;e<t.length;e+=1)if(n=t[e],n>=0&&n<=55295||n>=57344&&n<=65535)r.push(n&u[8]),r.push(n>>8&u[8]);else{if(!(n>=65536&&n<=1114111))throw new RangeError(`utf16le.encode: UTF16LE value out of range: char[${e}]: ${n}`);i=n-65536,o=55296+(i>>10),i=56320+(i&u[10]),r.push(o&u[8]),r.push(o>>8&u[8]),r.push(i&u[8]),r.push(i>>8&u[8])}return e.from(r)},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 r=[],n=e.length;let o,i,f,u,a,s,c=t?2:0,h=0;for(;c<n;){const t=!0;for(;t;){if(f=c+1,f<n){if(a=(e[f]<<8)+e[c],a<55296||a>57343){o=a,i=2;break}if(u=c+3,u<n&&(s=(e[u]<<8)+e[c+2],a<=56319&&s>=56320&&s<=57343)){o=65536+(a-55296<<10)+(s-56320),i=4;break}}throw new RangeError(`utf16le.decode: ill-formed UTF16LE byte sequence found: byte[${c}]`)}r[h++]=o,c+=i}return r}},r.utf32be={encode(t){const r=e.alloc(4*t.length);let n=0;return t.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32be.encode: UTF32BE character code out of range: char[${n/4}]: ${e}`);r[n++]=e>>24&u[8],r[n++]=e>>16&u[8],r[n++]=e>>8&u[8],r[n++]=e&u[8]})),r},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 r=[];let n=t?4:0;for(;n<e.length;n+=4){const t=(e[n]<<24)+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32be.decode: UTF32BE character code out of range: char[${n/4}]: ${t}`);r.push(t)}return r}},r.utf32le={encode(t){const r=e.alloc(4*t.length);let n=0;return t.forEach((e=>{if(e>=55296&&e<=57343||e>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${n/4}]: ${e}`);r[n++]=e&u[8],r[n++]=e>>8&u[8],r[n++]=e>>16&u[8],r[n++]=e>>24&u[8]})),r},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 r=[];let n=t?4:0;for(;n<e.length;n+=4){const t=(e[n+3]<<24)+(e[n+2]<<16)+(e[n+1]<<8)+e[n];if(t>=55296&&t<=57343||t>1114111)throw new RangeError(`utf32le.encode: UTF32LE character code out of range: char[${n/4}]: ${t}`);r.push(t)}return r}},r.uint7={encode(t){const r=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]}`);r[e]=t[e]}return r},decode(e){const t=[];for(let r=0;r<e.length;r+=1){if(e[r]>127)throw new RangeError(`uint7.decode: UINT7 character code out of range: byte[${r}]: ${e[r]}`);t[r]=e[r]}return t}},r.uint8={encode(t){const r=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]}`);r[e]=t[e]}return r},decode(e){const t=[];for(let r=0;r<e.length;r+=1)t[r]=e[r];return t}},r.uint16be={encode(t){const r=e.alloc(2*t.length);let n=0;return t.forEach((e=>{if(e>65535)throw new RangeError(`uint16be.encode: UINT16BE character code out of range: char[${n/2}]: ${e}`);r[n++]=e>>8&u[8],r[n++]=e&u[8]})),r},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 r=0;r<e.length;r+=2)t.push((e[r]<<8)+e[r+1]);return t}},r.uint16le={encode(t){const r=e.alloc(2*t.length);let n=0;return t.forEach((e=>{if(e>65535)throw new RangeError(`uint16le.encode: UINT16LE character code out of range: char[${n/2}]: ${e}`);r[n++]=e&u[8],r[n++]=e>>8&u[8]})),r},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 r=0;r<e.length;r+=2)t.push((e[r+1]<<8)+e[r]);return t}},r.uint32be={encode(t){const r=e.alloc(4*t.length);let n=0;return t.forEach((e=>{r[n++]=e>>24&u[8],r[n++]=e>>16&u[8],r[n++]=e>>8&u[8],r[n++]=e&u[8]})),r},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 r=0;r<e.length;r+=4)t.push((e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3]);return t}},r.uint32le={encode(t){const r=e.alloc(4*t.length);let n=0;return t.forEach((e=>{r[n++]=e&u[8],r[n++]=e>>8&u[8],r[n++]=e>>16&u[8],r[n++]=e>>24&u[8]})),r},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 r=0;r<e.length;r+=4)t.push((e[r+3]<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r]);return t}},r.string={encode:e=>t.utf16le.encode(e).toString("utf16le"),decode:r=>t.utf16le.decode(e.from(r,"utf16le"),0)},r.escaped={encode(t){const r=[];for(let n=0;n<t.length;n+=1){const o=t[n];if(96===o)r.push(o),r.push(o);else if(10===o)r.push(o);else if(o>=32&&o<=126)r.push(o);else{let t="";if(o>=0&&o<=31)t+=`\`x${a[o]}`;else if(o>=127&&o<=255)t+=`\`x${a[o]}`;else if(o>=256&&o<=65535)t+=`\`u${a[o>>8&u[8]]}${a[o&u[8]]}`;else{if(!(o>=65536&&o<=4294967295))throw new Error("escape.encode(char): char > 0xffffffff not allowed");{t+="`u{";const e=o>>24&u[8];e>0&&(t+=a[e]),t+=`${a[o>>16&u[8]]+a[o>>8&u[8]]+a[o&u[8]]}}`}}e.from(t).forEach((e=>{r.push(e)}))}}return e.from(r)},decode(e){function t(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function r(e,r,n){const o={char:null,nexti:e+2,error:!0};if(e+1<r&&t(n[e])&&t(n[e+1])){const t=String.fromCodePoint(n[e],n[e+1]);o.char=parseInt(t,16),Number.isNaN(o.char)||(o.error=!1)}return o}function n(e,r,n){const o={char:null,nexti:e+4,error:!0};if(e+3<r&&t(n[e])&&t(n[e+1])&&t(n[e+2])&&t(n[e+3])){const t=String.fromCodePoint(n[e],n[e+1],n[e+2],n[e+3]);o.char=parseInt(t,16),Number.isNaN(o.char)||(o.error=!1)}return o}function o(e,r,n){const o={char:null,nexti:e+4,error:!0};let i="";for(;e<r&&t(n[e]);)i+=String.fromCodePoint(n[e]),e+=1;return o.char=parseInt(i,16),125!==n[e]||Number.isNaN(o.char)||(o.error=!1),o.nexti=e+1,o}const i=[],f=e.length;let u,a,s,c=0;for(;c<f;){const t=!0;for(;t;){if(s=!0,96!==e[c]){i.push(e[c]),c+=1,s=!1;break}if(u=c+1,u>=f)break;if(96===e[u]){i.push(96),c+=2,s=!1;break}if(120===e[u]){if(a=r(u+1,f,e),a.error)break;i.push(a.char),c=a.nexti,s=!1;break}if(117===e[u]){if(123===e[u+1]){if(a=o(u+2,f,e),a.error)break;i.push(a.char),c=a.nexti,s=!1;break}if(a=n(u+1,f,e),a.error)break;i.push(a.char),c=a.nexti,s=!1;break}break}if(s)throw new Error(`escaped.decode: ill-formed escape sequence at buf[${c}]`)}return i}};const h=10;r.lineEnds={crlf(e){const t=[];let r=0;for(;r<e.length;)switch(e[r]){case 13:r+1<e.length&&e[r+1]===h?r+=2:r+=1,t.push(13),t.push(h);break;case h:t.push(13),t.push(h),r+=1;break;default:t.push(e[r]),r+=1}return t.length>0&&t[t.length-1]!==h&&(t.push(13),t.push(h)),t},lf(e){const t=[];let r=0;for(;r<e.length;)switch(e[r]){case 13:r+1<e.length&&e[r+1]===h?r+=2:r+=1,t.push(h);break;case h:t.push(h),r+=1;break;default:t.push(e[r]),r+=1}return t.length>0&&t[t.length-1]!==h&&t.push(h),t}},r.base64={encode(t){if(0===t.length)return e.alloc(0);let r,n,o,i=t.length%3;i=i>0?3-i:0;let f=(t.length+i)/3;const a=e.alloc(4*f);i>0&&(f-=1),r=0,n=0;for(let e=0;e<f;e+=1)o=t[r++]<<16,o+=t[r++]<<8,o+=t[r++],a[n++]=c[o>>18&u[6]],a[n++]=c[o>>12&u[6]],a[n++]=c[o>>6&u[6]],a[n++]=c[o&u[6]];return 0===i?a:1===i?(o=t[r++]<<16,o+=t[r]<<8,a[n++]=c[o>>18&u[6]],a[n++]=c[o>>12&u[6]],a[n++]=c[o>>6&u[6]],a[n]=c[64],a):2===i?(o=t[r]<<16,a[n++]=c[o>>18&u[6]],a[n++]=c[o>>12&u[6]],a[n++]=c[64],a[n]=c[64],a):void 0},decode(t){if(0===t.length)return e.alloc(0);const r=function(t){const r=[];let n=0;for(let e=0;e<t.length;e+=1){const o=t[e],i=!0;for(;i&&32!==o&&9!==o&&10!==o&&13!==o;){if(o>=65&&o<=90){r.push(o-65);break}if(o>=97&&o<=122){r.push(o-71);break}if(o>=48&&o<=57){r.push(o+4);break}if(43===o){r.push(62);break}if(47===o){r.push(63);break}if(61===o){r.push(64),n+=1;break}throw new RangeError(`base64.decode: invalid character buf[${e}]: ${o}`)}}if(r.length%4>0)throw new RangeError(`base64.decode: string length not integral multiple of 4: ${r.length}`);switch(n){case 0:break;case 1:if(64!==r[r.length-1])throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==r[r.length-1]||64!==r[r.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: ${n}`)}return{tail:n,buf:e.from(r)}}(t),{tail:n}=r,o=r.buf;let i,f,a,s=o.length/4;const c=e.alloc(3*s-n);n>0&&(s-=1),f=0,i=0;for(let e=0;e<s;e+=1)a=o[i++]<<18,a+=o[i++]<<12,a+=o[i++]<<6,a+=o[i++],c[f++]=a>>16&u[8],c[f++]=a>>8&u[8],c[f++]=a&u[8];return 1===n&&(a=o[i++]<<18,a+=o[i++]<<12,a+=o[i]<<6,c[f++]=a>>16&u[8],c[f]=a>>8&u[8]),2===n&&(a=o[i++]<<18,a+=o[i++]<<12,c[f]=a>>16&u[8]),c},toString(e){if(e.length%4>0)throw new RangeError(`base64.toString: input buffer length not multiple of 4: ${e.length}`);let t="",r=0;function n(e,n,o,i){switch(r){case 76:t+=`\r\n${e}${n}${o}${i}`,r=4;break;case 75:t+=`${e}\r\n${n}${o}${i}`,r=3;break;case 74:t+=`${e+n}\r\n${o}${i}`,r=2;break;case 73:t+=`${e+n+o}\r\n${i}`,r=1;break;default:t+=e+n+o+i,r+=4}}for(let t=0;t<e.length;t+=4){for(let r=t;r<t+4;r+=1)if(!((o=e[r])>=65&&o<=90||o>=97&&o<=122||o>=48&&o<=57||43===o||47===o||61===o))throw new RangeError(`base64.toString: buf[${r}]: ${e[r]} : not valid base64 character code`);n(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}],6:[function(e,t,r){(function(t){(function(){!function(){const r=e("./converter");globalThis.apgConv={convert:r.convert,encode:r.encode,decode:r.decode,transformers:e("./transformers"),Buffer:t}}()}).call(this)}).call(this,e("buffer").Buffer)},{"./converter":4,"./transformers":5,buffer:2}]},{},[6]);