pdfmake
Version:
Client/server side PDF printing in pure JavaScript
2 lines • 1.39 MB
JavaScript
/*! pdfmake v0.2.10, @license MIT, @link http://pdfmake.org */
!function webpackUniversalModuleDefinition(r,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var o=i();for(var u in o)("object"==typeof exports?exports:r)[u]=o[u]}}("undefined"!=typeof self?self:this,(function(){return function(){var r={41783:function(r,i){"use strict";i.OP=0,i.CL=1,i.CP=2,i.QU=3,i.GL=4,i.NS=5,i.EX=6,i.SY=7,i.IS=8,i.PR=9,i.PO=10,i.NU=11,i.AL=12,i.HL=13,i.ID=14,i.IN=15,i.HY=16,i.BA=17,i.BB=18,i.B2=19,i.ZW=20,i.CM=21,i.WJ=22,i.H2=23,i.H3=24,i.JL=25,i.JV=26,i.JT=27,i.RI=28,i.EB=29,i.EM=30,i.ZWJ=31,i.CB=32,i.AI=33,i.BK=34,i.CJ=35,i.CR=36,i.LF=37,i.NL=38,i.SA=39,i.SG=40,i.SP=41,i.XX=42},98282:function(r,i){"use strict";i.DI_BRK=0,i.IN_BRK=1,i.CI_BRK=2,i.CP_BRK=3,i.PR_BRK=4,i.pairTable=[[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4,4,4,4,4],[0,4,4,1,1,4,4,4,4,1,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,4,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[4,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,0,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,1,1,1,1,0,0,4,2,4,1,1,1,1,1,0,1,1,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,1,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,0,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,4,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,1,1,1,1,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,1,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0],[0,4,4,1,1,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,4,2,4,0,0,0,0,0,0,0,0,1,0]]},57013:function(r,i,o){"use strict";o(18756),i.EncodeStream=o(16176),i.DecodeStream=o(78984),i.Array=o(38637),i.LazyArray=o(88687),i.Bitfield=o(72959),i.Boolean=o(64888),i.Buffer=o(77324),i.Enum=o(71499),i.Optional=o(72526),i.Reserved=o(10298),i.String=o(36291),i.Struct=o(2731),i.VersionedStruct=o(48084);var u=o(76949),p=o(63787),g=o(41545);Object.assign(i,u,p,g)},38637:function(r,i,o){"use strict";function _createForOfIteratorHelperLoose(r,i){var o="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(o)return(o=o.call(r)).next.bind(o);if(Array.isArray(r)||(o=function _unsupportedIterableToArray(r,i){if(!r)return;if("string"==typeof r)return _arrayLikeToArray(r,i);var o=Object.prototype.toString.call(r).slice(8,-1);"Object"===o&&r.constructor&&(o=r.constructor.name);if("Map"===o||"Set"===o)return Array.from(r);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(r,i)}(r))||i&&r&&"number"==typeof r.length){o&&(r=o);var u=0;return function(){return u>=r.length?{done:!0}:{done:!1,value:r[u++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _arrayLikeToArray(r,i){(null==i||i>r.length)&&(i=r.length);for(var o=0,u=new Array(i);o<i;o++)u[o]=r[o];return u}o(65292),o(73844),o(69330),o(11765),o(81755),o(20731),o(24863),o(14032),o(61726),o(57114),o(58281),o(94712);var u=o(63787).Number,p=o(76949),g=function(){function ArrayT(r,i,o){void 0===o&&(o="count"),this.type=r,this.length=i,this.lengthType=o}var r=ArrayT.prototype;return r.decode=function decode(r,i){var o,g=r.pos,y=[],w=i;if(null!=this.length&&(o=p.resolveLength(this.length,r,i)),this.length instanceof u&&(Object.defineProperties(y,{parent:{value:i},_startOffset:{value:g},_currentOffset:{value:0,writable:!0},_length:{value:o}}),w=y),null==o||"bytes"===this.lengthType)for(var _=null!=o?r.pos+o:(null!=i?i._length:void 0)?i._startOffset+i._length:r.length;r.pos<_;)y.push(this.type.decode(r,w));else for(var x=0,k=o;x<k;x++)y.push(this.type.decode(r,w));return y},r.size=function size(r,i){if(!r)return this.type.size(null,i)*p.resolveLength(this.length,null,i);var size=0;this.length instanceof u&&(size+=this.length.size(),i={parent:i});for(var o,g=_createForOfIteratorHelperLoose(r);!(o=g()).done;){var y=o.value;size+=this.type.size(y,i)}return size},r.encode=function encode(r,i,o){var p=o;this.length instanceof u&&((p={pointers:[],startOffset:r.pos,parent:o}).pointerOffset=r.pos+this.size(i,p),this.length.encode(r,i.length));for(var g,y=_createForOfIteratorHelperLoose(i);!(g=y()).done;){var w=g.value;this.type.encode(r,w,p)}if(this.length instanceof u)for(var _=0;_<p.pointers.length;){var x=p.pointers[_++];x.type.encode(r,x.val)}},ArrayT}();r.exports=g},72959:function(r,i,o){"use strict";o(74516);var u=function(){function Bitfield(r,i){void 0===i&&(i=[]),this.type=r,this.flags=i}var r=Bitfield.prototype;return r.decode=function decode(r){for(var i=this.type.decode(r),o={},u=0;u<this.flags.length;u++){var p=this.flags[u];null!=p&&(o[p]=!!(i&1<<u))}return o},r.size=function size(){return this.type.size()},r.encode=function encode(r,i){for(var o=0,u=0;u<this.flags.length;u++){var p=this.flags[u];null!=p&&i[p]&&(o|=1<<u)}return this.type.encode(r,o)},Bitfield}();r.exports=u},64888:function(r){"use strict";var i=function(){function BooleanT(r){this.type=r}var r=BooleanT.prototype;return r.decode=function decode(r,i){return!!this.type.decode(r,i)},r.size=function size(r,i){return this.type.size(r,i)},r.encode=function encode(r,i,o){return this.type.encode(r,+i,o)},BooleanT}();r.exports=i},77324:function(r,i,o){"use strict";var u=o(76949),p=o(63787).Number,g=function(){function BufferT(r){this.length=r}var r=BufferT.prototype;return r.decode=function decode(r,i){var o=u.resolveLength(this.length,r,i);return r.readBuffer(o)},r.size=function size(r,i){return r?r.length:u.resolveLength(this.length,null,i)},r.encode=function encode(r,i,o){return this.length instanceof p&&this.length.encode(r,i.length),r.writeBuffer(i)},BufferT}();r.exports=g},78984:function(r,i,o){"use strict";var u,p=o(50621).Buffer;o(20731),o(14032),o(61726),o(57114),o(46467);try{u=o(54171)}catch(r){}var g=function(){function DecodeStream(r){this.buffer=r,this.pos=0,this.length=this.buffer.length}var r=DecodeStream.prototype;return r.readString=function readString(r,i){switch(void 0===i&&(i="ascii"),i){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.buffer.toString(i,this.pos,this.pos+=r);case"utf16be":for(var o=p.from(this.readBuffer(r)),g=0,y=o.length-1;g<y;g+=2){var w=o[g];o[g]=o[g+1],o[g+1]=w}return o.toString("utf16le");default:if(o=this.readBuffer(r),u)try{return u.decode(o,i)}catch(r){}return o}},r.readBuffer=function readBuffer(r){return this.buffer.slice(this.pos,this.pos+=r)},r.readUInt24BE=function readUInt24BE(){return(this.readUInt16BE()<<8)+this.readUInt8()},r.readUInt24LE=function readUInt24LE(){return this.readUInt16LE()+(this.readUInt8()<<16)},r.readInt24BE=function readInt24BE(){return(this.readInt16BE()<<8)+this.readUInt8()},r.readInt24LE=function readInt24LE(){return this.readUInt16LE()+(this.readInt8()<<16)},DecodeStream}();g.TYPES={UInt8:1,UInt16:2,UInt24:3,UInt32:4,Int8:1,Int16:2,Int24:3,Int32:4,Float:4,Double:8};var y=function _loop(r){if("read"===r.slice(0,4)){var i=g.TYPES[r.replace(/read|[BL]E/g,"")];g.prototype[r]=function(){var o=this.buffer[r](this.pos);return this.pos+=i,o}}};for(var w in p.prototype)y(w);r.exports=g},16176:function(r,i,o){"use strict";var u,p=o(50621).Buffer;function _setPrototypeOf(r,i){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,i){return r.__proto__=i,r},_setPrototypeOf(r,i)}o(41584),o(20731),o(61726),o(46467);var g=o(9760),y=o(78984);try{u=o(54171)}catch(r){}var w=function(r){function EncodeStream(i){var o;return void 0===i&&(i=65536),(o=r.apply(this,arguments)||this).buffer=p.alloc(i),o.bufferOffset=0,o.pos=0,o}!function _inheritsLoose(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,_setPrototypeOf(r,i)}(EncodeStream,r);var i=EncodeStream.prototype;return i._read=function _read(){},i.ensure=function ensure(r){if(this.bufferOffset+r>this.buffer.length)return this.flush()},i.flush=function flush(){if(this.bufferOffset>0)return this.push(p.from(this.buffer.slice(0,this.bufferOffset))),this.bufferOffset=0},i.writeBuffer=function writeBuffer(r){return this.flush(),this.push(r),this.pos+=r.length},i.writeString=function writeString(r,i){switch(void 0===i&&(i="ascii"),i){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.writeBuffer(p.from(r,i));case"utf16be":for(var o=p.from(r,"utf16le"),g=0,y=o.length-1;g<y;g+=2){var w=o[g];o[g]=o[g+1],o[g+1]=w}return this.writeBuffer(o);default:if(u)return this.writeBuffer(u.encode(r,i));throw new Error("Install iconv-lite to enable additional string encodings.")}},i.writeUInt24BE=function writeUInt24BE(r){return this.ensure(3),this.buffer[this.bufferOffset++]=r>>>16&255,this.buffer[this.bufferOffset++]=r>>>8&255,this.buffer[this.bufferOffset++]=255&r,this.pos+=3},i.writeUInt24LE=function writeUInt24LE(r){return this.ensure(3),this.buffer[this.bufferOffset++]=255&r,this.buffer[this.bufferOffset++]=r>>>8&255,this.buffer[this.bufferOffset++]=r>>>16&255,this.pos+=3},i.writeInt24BE=function writeInt24BE(r){return r>=0?this.writeUInt24BE(r):this.writeUInt24BE(r+16777215+1)},i.writeInt24LE=function writeInt24LE(r){return r>=0?this.writeUInt24LE(r):this.writeUInt24LE(r+16777215+1)},i.fill=function fill(r,i){if(i<this.buffer.length)return this.ensure(i),this.buffer.fill(r,this.bufferOffset,this.bufferOffset+i),this.bufferOffset+=i,this.pos+=i;var o=p.alloc(i);return o.fill(r),this.writeBuffer(o)},i.end=function end(){return this.flush(),this.push(null)},EncodeStream}(g.Readable),_=function _loop(r){if("write"===r.slice(0,5)){var i=+y.TYPES[r.replace(/write|[BL]E/g,"")];w.prototype[r]=function(o){return this.ensure(i),this.buffer[r](o,this.bufferOffset),this.bufferOffset+=i,this.pos+=i}}};for(var x in p.prototype)_(x);r.exports=w},71499:function(r){"use strict";var i=function(){function Enum(r,i){void 0===i&&(i=[]),this.type=r,this.options=i}var r=Enum.prototype;return r.decode=function decode(r){var i=this.type.decode(r);return this.options[i]||i},r.size=function size(){return this.type.size()},r.encode=function encode(r,i){var o=this.options.indexOf(i);if(-1===o)throw new Error("Unknown option in enum: "+i);return this.type.encode(r,o)},Enum}();r.exports=i},88687:function(r,i,o){"use strict";function _setPrototypeOf(r,i){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,i){return r.__proto__=i,r},_setPrototypeOf(r,i)}o(14032),o(68067);var u=o(38637),p=o(63787).Number,g=o(76949),y=o(7187).inspect,w=function(r){function LazyArrayT(){return r.apply(this,arguments)||this}!function _inheritsLoose(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,_setPrototypeOf(r,i)}(LazyArrayT,r);var i=LazyArrayT.prototype;return i.decode=function decode(r,i){var o=r.pos,u=g.resolveLength(this.length,r,i);this.length instanceof p&&(i={parent:i,_startOffset:o,_currentOffset:0,_length:u});var y=new _(this.type,u,r,i);return r.pos+=u*this.type.size(null,i),y},i.size=function size(i,o){return i instanceof _&&(i=i.toArray()),r.prototype.size.call(this,i,o)},i.encode=function encode(i,o,u){return o instanceof _&&(o=o.toArray()),r.prototype.encode.call(this,i,o,u)},LazyArrayT}(u),_=function(){function LazyArray(r,i,o,u){this.type=r,this.length=i,this.stream=o,this.ctx=u,this.base=this.stream.pos,this.items=[]}var r=LazyArray.prototype;return r.get=function get(r){if(!(r<0||r>=this.length)){if(null==this.items[r]){var i=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.ctx)*r,this.items[r]=this.type.decode(this.stream,this.ctx),this.stream.pos=i}return this.items[r]}},r.toArray=function toArray(){for(var r=[],i=0,o=this.length;i<o;i++)r.push(this.get(i));return r},r.inspect=function inspect(){return y(this.toArray())},LazyArray}();r.exports=w},63787:function(r,i,o){"use strict";function _setPrototypeOf(r,i){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,i){return r.__proto__=i,r},_setPrototypeOf(r,i)}var u=o(78984),p=function(){function NumberT(r,i){void 0===i&&(i="BE"),this.type=r,this.endian=i,this.fn=this.type,"8"!==this.type[this.type.length-1]&&(this.fn+=this.endian)}var r=NumberT.prototype;return r.size=function size(){return u.TYPES[this.type]},r.decode=function decode(r){return r["read"+this.fn]()},r.encode=function encode(r,i){return r["write"+this.fn](i)},NumberT}();i.Number=p,i.uint8=new p("UInt8"),i.uint16be=i.uint16=new p("UInt16","BE"),i.uint16le=new p("UInt16","LE"),i.uint24be=i.uint24=new p("UInt24","BE"),i.uint24le=new p("UInt24","LE"),i.uint32be=i.uint32=new p("UInt32","BE"),i.uint32le=new p("UInt32","LE"),i.int8=new p("Int8"),i.int16be=i.int16=new p("Int16","BE"),i.int16le=new p("Int16","LE"),i.int24be=i.int24=new p("Int24","BE"),i.int24le=new p("Int24","LE"),i.int32be=i.int32=new p("Int32","BE"),i.int32le=new p("Int32","LE"),i.floatbe=i.float=new p("Float","BE"),i.floatle=new p("Float","LE"),i.doublebe=i.double=new p("Double","BE"),i.doublele=new p("Double","LE");var g=function(r){function Fixed(i,o,u){var p;return void 0===u&&(u=i>>1),(p=r.call(this,"Int"+i,o)||this)._point=1<<u,p}!function _inheritsLoose(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,_setPrototypeOf(r,i)}(Fixed,r);var i=Fixed.prototype;return i.decode=function decode(i){return r.prototype.decode.call(this,i)/this._point},i.encode=function encode(i,o){return r.prototype.encode.call(this,i,o*this._point|0)},Fixed}(p);i.Fixed=g,i.fixed16be=i.fixed16=new g(16,"BE"),i.fixed16le=new g(16,"LE"),i.fixed32be=i.fixed32=new g(32,"BE"),i.fixed32le=new g(32,"LE")},72526:function(r){"use strict";var i=function(){function Optional(r,i){void 0===i&&(i=!0),this.type=r,this.condition=i}var r=Optional.prototype;return r.decode=function decode(r,i){var o=this.condition;if("function"==typeof o&&(o=o.call(i,i)),o)return this.type.decode(r,i)},r.size=function size(r,i){var o=this.condition;return"function"==typeof o&&(o=o.call(i,i)),o?this.type.size(r,i):0},r.encode=function encode(r,i,o){var u=this.condition;if("function"==typeof u&&(u=u.call(o,o)),u)return this.type.encode(r,i,o)},Optional}();r.exports=i},41545:function(r,i,o){"use strict";var u=o(76949),p=function(){function Pointer(r,i,o){if(void 0===o&&(o={}),this.offsetType=r,this.type=i,this.options=o,"void"===this.type&&(this.type=null),null==this.options.type&&(this.options.type="local"),null==this.options.allowNull&&(this.options.allowNull=!0),null==this.options.nullValue&&(this.options.nullValue=0),null==this.options.lazy&&(this.options.lazy=!1),this.options.relativeTo){if("function"!=typeof this.options.relativeTo)throw new Error("relativeTo option must be a function");this.relativeToGetter=o.relativeTo}}var r=Pointer.prototype;return r.decode=function decode(r,i){var o,p=this,g=this.offsetType.decode(r,i);if(g===this.options.nullValue&&this.options.allowNull)return null;switch(this.options.type){case"local":o=i._startOffset;break;case"immediate":o=r.pos-this.offsetType.size();break;case"parent":o=i.parent._startOffset;break;default:for(var y=i;y.parent;)y=y.parent;o=y._startOffset||0}this.options.relativeTo&&(o+=this.relativeToGetter(i));var w=g+o;if(null!=this.type){var _=null,x=function decodeValue(){if(null!=_)return _;var o=r.pos;return r.pos=w,_=p.type.decode(r,i),r.pos=o,_};return this.options.lazy?new u.PropertyDescriptor({get:x}):x()}return w},r.size=function size(r,i){var o=i;switch(this.options.type){case"local":case"immediate":break;case"parent":i=i.parent;break;default:for(;i.parent;)i=i.parent}var u=this.type;if(null==u){if(!(r instanceof g))throw new Error("Must be a VoidPointer");u=r.type,r=r.value}return r&&i&&(i.pointerSize+=u.size(r,o)),this.offsetType.size()},r.encode=function encode(r,i,o){var u,p=o;if(null!=i){switch(this.options.type){case"local":u=o.startOffset;break;case"immediate":u=r.pos+this.offsetType.size(i,p);break;case"parent":u=(o=o.parent).startOffset;break;default:for(u=0;o.parent;)o=o.parent}this.options.relativeTo&&(u+=this.relativeToGetter(p.val)),this.offsetType.encode(r,o.pointerOffset-u);var y=this.type;if(null==y){if(!(i instanceof g))throw new Error("Must be a VoidPointer");y=i.type,i=i.value}return o.pointers.push({type:y,val:i,parent:p}),o.pointerOffset+=y.size(i,p)}this.offsetType.encode(r,this.options.nullValue)},Pointer}(),g=function VoidPointer(r,i){this.type=r,this.value=i};i.Pointer=p,i.VoidPointer=g},10298:function(r,i,o){"use strict";o(41584);var u=o(76949),p=function(){function Reserved(r,i){void 0===i&&(i=1),this.type=r,this.count=i}var r=Reserved.prototype;return r.decode=function decode(r,i){r.pos+=this.size(null,i)},r.size=function size(r,i){var o=u.resolveLength(this.count,null,i);return this.type.size()*o},r.encode=function encode(r,i,o){return r.fill(0,this.size(i,o))},Reserved}();r.exports=p},36291:function(r,i,o){"use strict";var u=o(50621).Buffer,p=o(63787).Number,g=o(76949),y=function(){function StringT(r,i){void 0===i&&(i="ascii"),this.length=r,this.encoding=i}var r=StringT.prototype;return r.decode=function decode(r,i){var o,u;if(null!=this.length)o=g.resolveLength(this.length,r,i);else{var p;for(p=r.buffer,o=r.length,u=r.pos;u<o&&0!==p[u];)++u;o=u-r.pos}var y=this.encoding;"function"==typeof y&&(y=y.call(i,i)||"ascii");var w=r.readString(o,y);return null==this.length&&r.pos<r.length&&r.pos++,w},r.size=function size(r,i){if(!r)return g.resolveLength(this.length,null,i);var o=this.encoding;"function"==typeof o&&(o=o.call(null!=i?i.val:void 0,null!=i?i.val:void 0)||"ascii"),"utf16be"===o&&(o="utf16le");var size=u.byteLength(r,o);return this.length instanceof p&&(size+=this.length.size()),null==this.length&&size++,size},r.encode=function encode(r,i,o){var g=this.encoding;if("function"==typeof g&&(g=g.call(null!=o?o.val:void 0,null!=o?o.val:void 0)||"ascii"),this.length instanceof p&&this.length.encode(r,u.byteLength(i,g)),r.writeString(i,g),null==this.length)return r.writeUInt8(0)},StringT}();r.exports=y},2731:function(r,i,o){"use strict";var u=o(76949),p=function(){function Struct(r){void 0===r&&(r={}),this.fields=r}var r=Struct.prototype;return r.decode=function decode(r,i,o){void 0===o&&(o=0);var u=this._setup(r,i,o);return this._parseFields(r,u,this.fields),null!=this.process&&this.process.call(u,r),u},r._setup=function _setup(r,i,o){var u={};return Object.defineProperties(u,{parent:{value:i},_startOffset:{value:r.pos},_currentOffset:{value:0,writable:!0},_length:{value:o}}),u},r._parseFields=function _parseFields(r,i,o){for(var p in o){var g,y=o[p];void 0!==(g="function"==typeof y?y.call(i,i):y.decode(r,i))&&(g instanceof u.PropertyDescriptor?Object.defineProperty(i,p,g):i[p]=g),i._currentOffset=r.pos-i._startOffset}},r.size=function size(r,i,o){null==r&&(r={}),null==o&&(o=!0);var u={parent:i,val:r,pointerSize:0},size=0;for(var p in this.fields){var g=this.fields[p];null!=g.size&&(size+=g.size(r[p],u))}return o&&(size+=u.pointerSize),size},r.encode=function encode(r,i,o){var u;null!=this.preEncode&&this.preEncode.call(i,r);var p={pointers:[],startOffset:r.pos,parent:o,val:i,pointerSize:0};for(var g in p.pointerOffset=r.pos+this.size(i,p,!1),this.fields)null!=(u=this.fields[g]).encode&&u.encode(r,i[g],p);for(var y=0;y<p.pointers.length;){var w=p.pointers[y++];w.type.encode(r,w.val,w.parent)}},Struct}();r.exports=p},48084:function(r,i,o){"use strict";function _setPrototypeOf(r,i){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,i){return r.__proto__=i,r},_setPrototypeOf(r,i)}o(14032);var u=o(2731),p=function(r){function VersionedStruct(i,o){var u;return void 0===o&&(o={}),(u=r.call(this)||this).type=i,u.versions=o,"string"==typeof i&&(u.versionPath=i.split(".")),u}!function _inheritsLoose(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,_setPrototypeOf(r,i)}(VersionedStruct,r);var i=VersionedStruct.prototype;return i.decode=function decode(r,i,o){void 0===o&&(o=0);var u=this._setup(r,i,o);"string"==typeof this.type?u.version=function getPath(r,i){return i.reduce((function(r,i){return r&&r[i]}),r)}(i,this.versionPath):u.version=this.type.decode(r),this.versions.header&&this._parseFields(r,u,this.versions.header);var p=this.versions[u.version];if(null==p)throw new Error("Unknown version "+u.version);return p instanceof VersionedStruct?p.decode(r,i):(this._parseFields(r,u,p),null!=this.process&&this.process.call(u,r),u)},i.size=function size(r,i,o){var u,p;if(void 0===o&&(o=!0),!r)throw new Error("Not a fixed size");var g={parent:i,val:r,pointerSize:0},size=0;if("string"!=typeof this.type&&(size+=this.type.size(r.version,g)),this.versions.header)for(u in this.versions.header)null!=(p=this.versions.header[u]).size&&(size+=p.size(r[u],g));var y=this.versions[r.version];if(null==y)throw new Error("Unknown version "+r.version);for(u in y)null!=(p=y[u]).size&&(size+=p.size(r[u],g));return o&&(size+=g.pointerSize),size},i.encode=function encode(r,i,o){var u,p;null!=this.preEncode&&this.preEncode.call(i,r);var g={pointers:[],startOffset:r.pos,parent:o,val:i,pointerSize:0};if(g.pointerOffset=r.pos+this.size(i,g,!1),"string"!=typeof this.type&&this.type.encode(r,i.version),this.versions.header)for(u in this.versions.header)null!=(p=this.versions.header[u]).encode&&p.encode(r,i[u],g);var y=this.versions[i.version];for(u in y)null!=(p=y[u]).encode&&p.encode(r,i[u],g);for(var w=0;w<g.pointers.length;){var _=g.pointers[w++];_.type.encode(r,_.val,_.parent)}},VersionedStruct}(u);r.exports=p},76949:function(r,i,o){"use strict";var u=o(63787).Number;i.resolveLength=function(r,i,o){var p;if("number"==typeof r?p=r:"function"==typeof r?p=r.call(o,o):o&&"string"==typeof r?p=o[r]:i&&r instanceof u&&(p=r.decode(i)),isNaN(p))throw new Error("Not a fixed size");return p};i.PropertyDescriptor=function PropertyDescriptor(r){for(var i in void 0===r&&(r={}),this.enumerable=!0,this.configurable=!0,r){var o=r[i];this[i]=o}}},50621:function(r,i,o){"use strict";function _defineProperties(r,i){for(var o=0;o<i.length;o++){var u=i[o];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(r,_toPropertyKey(u.key),u)}}function _toPropertyKey(r){var i=function _toPrimitive(r,i){if("object"!=typeof r||!r)return r;var o=r[Symbol.toPrimitive];if(void 0!==o){var u=o.call(r,i||"default");if("object"!=typeof u)return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(r)}(r,"string");return"symbol"==typeof i?i:String(i)}function _assertThisInitialized(r){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function _setPrototypeOf(r,i){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(r,i){return r.__proto__=i,r},_setPrototypeOf(r,i)}o(65292),o(73844),o(5597),o(39081),o(68626),o(41584),o(58028),o(81755),o(20731),o(10720),o(7585),o(24863),o(7283),o(2876),o(14032),o(61726),o(57114),o(47458),o(46467),o(72095),o(56912),o(73663),o(29883),o(35471),o(21012),o(88997),o(97464),o(2857),o(94715),o(13624),o(91132),o(62514),o(24597),o(88042),o(4660),o(92451),o(44206),o(66288),o(13250),o(3858),o(84538),o(64793),o(74202),o(52529),o(41863);var u=o(32504),p=o(89029),g="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=Buffer,i.SlowBuffer=function SlowBuffer(r){+r!=r&&(r=0);return Buffer.alloc(+r)},i.INSPECT_MAX_BYTES=50;var y=2147483647;function createBuffer(r){if(r>y)throw new RangeError('The value "'+r+'" is invalid for option "size"');var i=new Uint8Array(r);return Object.setPrototypeOf(i,Buffer.prototype),i}function Buffer(r,i,o){if("number"==typeof r){if("string"==typeof i)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(r)}return from(r,i,o)}function from(r,i,o){if("string"==typeof r)return function fromString(r,i){"string"==typeof i&&""!==i||(i="utf8");if(!Buffer.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var o=0|byteLength(r,i),u=createBuffer(o),p=u.write(r,i);p!==o&&(u=u.slice(0,p));return u}(r,i);if(ArrayBuffer.isView(r))return function fromArrayView(r){if(isInstance(r,Uint8Array)){var i=new Uint8Array(r);return fromArrayBuffer(i.buffer,i.byteOffset,i.byteLength)}return fromArrayLike(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(isInstance(r,ArrayBuffer)||r&&isInstance(r.buffer,ArrayBuffer))return fromArrayBuffer(r,i,o);if("undefined"!=typeof SharedArrayBuffer&&(isInstance(r,SharedArrayBuffer)||r&&isInstance(r.buffer,SharedArrayBuffer)))return fromArrayBuffer(r,i,o);if("number"==typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var u=r.valueOf&&r.valueOf();if(null!=u&&u!==r)return Buffer.from(u,i,o);var p=function fromObject(r){if(Buffer.isBuffer(r)){var i=0|checked(r.length),o=createBuffer(i);return 0===o.length||r.copy(o,0,0,i),o}if(void 0!==r.length)return"number"!=typeof r.length||numberIsNaN(r.length)?createBuffer(0):fromArrayLike(r);if("Buffer"===r.type&&Array.isArray(r.data))return fromArrayLike(r.data)}(r);if(p)return p;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof r[Symbol.toPrimitive])return Buffer.from(r[Symbol.toPrimitive]("string"),i,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}function assertSize(r){if("number"!=typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function allocUnsafe(r){return assertSize(r),createBuffer(r<0?0:0|checked(r))}function fromArrayLike(r){for(var i=r.length<0?0:0|checked(r.length),o=createBuffer(i),u=0;u<i;u+=1)o[u]=255&r[u];return o}function fromArrayBuffer(r,i,o){if(i<0||r.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<i+(o||0))throw new RangeError('"length" is outside of buffer bounds');var u;return u=void 0===i&&void 0===o?new Uint8Array(r):void 0===o?new Uint8Array(r,i):new Uint8Array(r,i,o),Object.setPrototypeOf(u,Buffer.prototype),u}function checked(r){if(r>=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return 0|r}function byteLength(r,i){if(Buffer.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||isInstance(r,ArrayBuffer))return r.byteLength;if("string"!=typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);var o=r.length,u=arguments.length>2&&!0===arguments[2];if(!u&&0===o)return 0;for(var p=!1;;)switch(i){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":return utf8ToBytes(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return base64ToBytes(r).length;default:if(p)return u?-1:utf8ToBytes(r).length;i=(""+i).toLowerCase(),p=!0}}function slowToString(r,i,o){var u=!1;if((void 0===i||i<0)&&(i=0),i>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(i>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return hexSlice(this,i,o);case"utf8":case"utf-8":return utf8Slice(this,i,o);case"ascii":return asciiSlice(this,i,o);case"latin1":case"binary":return latin1Slice(this,i,o);case"base64":return base64Slice(this,i,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,i,o);default:if(u)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),u=!0}}function swap(r,i,o){var u=r[i];r[i]=r[o],r[o]=u}function bidirectionalIndexOf(r,i,o,u,p){if(0===r.length)return-1;if("string"==typeof o?(u=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),numberIsNaN(o=+o)&&(o=p?0:r.length-1),o<0&&(o=r.length+o),o>=r.length){if(p)return-1;o=r.length-1}else if(o<0){if(!p)return-1;o=0}if("string"==typeof i&&(i=Buffer.from(i,u)),Buffer.isBuffer(i))return 0===i.length?-1:arrayIndexOf(r,i,o,u,p);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?p?Uint8Array.prototype.indexOf.call(r,i,o):Uint8Array.prototype.lastIndexOf.call(r,i,o):arrayIndexOf(r,[i],o,u,p);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(r,i,o,u,p){var g,y=1,w=r.length,_=i.length;if(void 0!==u&&("ucs2"===(u=String(u).toLowerCase())||"ucs-2"===u||"utf16le"===u||"utf-16le"===u)){if(r.length<2||i.length<2)return-1;y=2,w/=2,_/=2,o/=2}function read(r,i){return 1===y?r[i]:r.readUInt16BE(i*y)}if(p){var x=-1;for(g=o;g<w;g++)if(read(r,g)===read(i,-1===x?0:g-x)){if(-1===x&&(x=g),g-x+1===_)return x*y}else-1!==x&&(g-=g-x),x=-1}else for(o+_>w&&(o=w-_),g=o;g>=0;g--){for(var k=!0,P=0;P<_;P++)if(read(r,g+P)!==read(i,P)){k=!1;break}if(k)return g}return-1}function hexWrite(r,i,o,u){o=Number(o)||0;var p=r.length-o;u?(u=Number(u))>p&&(u=p):u=p;var g,y=i.length;for(u>y/2&&(u=y/2),g=0;g<u;++g){var w=parseInt(i.substr(2*g,2),16);if(numberIsNaN(w))return g;r[o+g]=w}return g}function utf8Write(r,i,o,u){return blitBuffer(utf8ToBytes(i,r.length-o),r,o,u)}function asciiWrite(r,i,o,u){return blitBuffer(function asciiToBytes(r){for(var i=[],o=0;o<r.length;++o)i.push(255&r.charCodeAt(o));return i}(i),r,o,u)}function base64Write(r,i,o,u){return blitBuffer(base64ToBytes(i),r,o,u)}function ucs2Write(r,i,o,u){return blitBuffer(function utf16leToBytes(r,i){for(var o,u,p,g=[],y=0;y<r.length&&!((i-=2)<0);++y)u=(o=r.charCodeAt(y))>>8,p=o%256,g.push(p),g.push(u);return g}(i,r.length-o),r,o,u)}function base64Slice(r,i,o){return 0===i&&o===r.length?u.fromByteArray(r):u.fromByteArray(r.slice(i,o))}function utf8Slice(r,i,o){o=Math.min(r.length,o);for(var u=[],p=i;p<o;){var g=r[p],y=null,_=g>239?4:g>223?3:g>191?2:1;if(p+_<=o){var x=void 0,k=void 0,P=void 0,O=void 0;switch(_){case 1:g<128&&(y=g);break;case 2:128==(192&(x=r[p+1]))&&(O=(31&g)<<6|63&x)>127&&(y=O);break;case 3:x=r[p+1],k=r[p+2],128==(192&x)&&128==(192&k)&&(O=(15&g)<<12|(63&x)<<6|63&k)>2047&&(O<55296||O>57343)&&(y=O);break;case 4:x=r[p+1],k=r[p+2],P=r[p+3],128==(192&x)&&128==(192&k)&&128==(192&P)&&(O=(15&g)<<18|(63&x)<<12|(63&k)<<6|63&P)>65535&&O<1114112&&(y=O)}}null===y?(y=65533,_=1):y>65535&&(y-=65536,u.push(y>>>10&1023|55296),y=56320|1023&y),u.push(y),p+=_}return function decodeCodePointsArray(r){var i=r.length;if(i<=w)return String.fromCharCode.apply(String,r);var o="",u=0;for(;u<i;)o+=String.fromCharCode.apply(String,r.slice(u,u+=w));return o}(u)}i.kMaxLength=y,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{var r=new Uint8Array(1),i={foo:function foo(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(r,i),42===r.foo()}catch(r){return!1}}(),!Buffer.TYPED_ARRAY_SUPPORT&&"undefined"!=typeof console&&console.error,Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function get(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function get(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(r,i,o){return from(r,i,o)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(r,i,o){return function alloc(r,i,o){return assertSize(r),r<=0?createBuffer(r):void 0!==i?"string"==typeof o?createBuffer(r).fill(i,o):createBuffer(r).fill(i):createBuffer(r)}(r,i,o)},Buffer.allocUnsafe=function(r){return allocUnsafe(r)},Buffer.allocUnsafeSlow=function(r){return allocUnsafe(r)},Buffer.isBuffer=function isBuffer(r){return null!=r&&!0===r._isBuffer&&r!==Buffer.prototype},Buffer.compare=function compare(r,i){if(isInstance(r,Uint8Array)&&(r=Buffer.from(r,r.offset,r.byteLength)),isInstance(i,Uint8Array)&&(i=Buffer.from(i,i.offset,i.byteLength)),!Buffer.isBuffer(r)||!Buffer.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===i)return 0;for(var o=r.length,u=i.length,p=0,g=Math.min(o,u);p<g;++p)if(r[p]!==i[p]){o=r[p],u=i[p];break}return o<u?-1:u<o?1:0},Buffer.isEncoding=function isEncoding(r){switch(String(r).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}},Buffer.concat=function concat(r,i){if(!Array.isArray(r))throw new TypeError('"list" argument must be an Array of Buffers');if(0===r.length)return Buffer.alloc(0);var o;if(void 0===i)for(i=0,o=0;o<r.length;++o)i+=r[o].length;var u=Buffer.allocUnsafe(i),p=0;for(o=0;o<r.length;++o){var g=r[o];if(isInstance(g,Uint8Array))p+g.length>u.length?(Buffer.isBuffer(g)||(g=Buffer.from(g)),g.copy(u,p)):Uint8Array.prototype.set.call(u,g,p);else{if(!Buffer.isBuffer(g))throw new TypeError('"list" argument must be an Array of Buffers');g.copy(u,p)}p+=g.length}return u},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<r;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function swap32(){var r=this.length;if(r%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<r;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function swap64(){var r=this.length;if(r%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<r;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function toString(){var r=this.length;return 0===r?"":0===arguments.length?utf8Slice(this,0,r):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(r){if(!Buffer.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r||0===Buffer.compare(this,r)},Buffer.prototype.inspect=function inspect(){var r="",o=i.INSPECT_MAX_BYTES;return r=this.toString("hex",0,o).replace(/(.{2})/g,"$1 ").trim(),this.length>o&&(r+=" ... "),"<Buffer "+r+">"},g&&(Buffer.prototype[g]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(r,i,o,u,p){if(isInstance(r,Uint8Array)&&(r=Buffer.from(r,r.offset,r.byteLength)),!Buffer.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(void 0===i&&(i=0),void 0===o&&(o=r?r.length:0),void 0===u&&(u=0),void 0===p&&(p=this.length),i<0||o>r.length||u<0||p>this.length)throw new RangeError("out of range index");if(u>=p&&i>=o)return 0;if(u>=p)return-1;if(i>=o)return 1;if(this===r)return 0;for(var g=(p>>>=0)-(u>>>=0),y=(o>>>=0)-(i>>>=0),w=Math.min(g,y),_=this.slice(u,p),x=r.slice(i,o),k=0;k<w;++k)if(_[k]!==x[k]){g=_[k],y=x[k];break}return g<y?-1:y<g?1:0},Buffer.prototype.includes=function includes(r,i,o){return-1!==this.indexOf(r,i,o)},Buffer.prototype.indexOf=function indexOf(r,i,o){return bidirectionalIndexOf(this,r,i,o,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(r,i,o){return bidirectionalIndexOf(this,r,i,o,!1)},Buffer.prototype.write=function write(r,i,o,u){if(void 0===i)u="utf8",o=this.length,i=0;else if(void 0===o&&"string"==typeof i)u=i,o=this.length,i=0;else{if(!isFinite(i))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");i>>>=0,isFinite(o)?(o>>>=0,void 0===u&&(u="utf8")):(u=o,o=void 0)}var p=this.length-i;if((void 0===o||o>p)&&(o=p),r.length>0&&(o<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");u||(u="utf8");for(var g=!1;;)switch(u){case"hex":return hexWrite(this,r,i,o);case"utf8":case"utf-8":return utf8Write(this,r,i,o);case"ascii":case"latin1":case"binary":return asciiWrite(this,r,i,o);case"base64":return base64Write(this,r,i,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,r,i,o);default:if(g)throw new TypeError("Unknown encoding: "+u);u=(""+u).toLowerCase(),g=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function asciiSlice(r,i,o){var u="";o=Math.min(r.length,o);for(var p=i;p<o;++p)u+=String.fromCharCode(127&r[p]);return u}function latin1Slice(r,i,o){var u="";o=Math.min(r.length,o);for(var p=i;p<o;++p)u+=String.fromCharCode(r[p]);return u}function hexSlice(r,i,o){var u=r.length;(!i||i<0)&&(i=0),(!o||o<0||o>u)&&(o=u);for(var p="",g=i;g<o;++g)p+=k[r[g]];return p}function utf16leSlice(r,i,o){for(var u=r.slice(i,o),p="",g=0;g<u.length-1;g+=2)p+=String.fromCharCode(u[g]+256*u[g+1]);return p}function checkOffset(r,i,o){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+i>o)throw new RangeError("Trying to access beyond buffer length")}function checkInt(r,i,o,u,p,g){if(!Buffer.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>p||i<g)throw new RangeError('"value" argument is out of bounds');if(o+u>r.length)throw new RangeError("Index out of range")}function wrtBigUInt64LE(r,i,o,u,p){checkIntBI(i,u,p,r,o,7);var g=Number(i&BigInt(4294967295));r[o++]=g,g>>=8,r[o++]=g,g>>=8,r[o++]=g,g>>=8,r[o++]=g;var y=Number(i>>BigInt(32)&BigInt(4294967295));return r[o++]=y,y>>=8,r[o++]=y,y>>=8,r[o++]=y,y>>=8,r[o++]=y,o}function wrtBigUInt64BE(r,i,o,u,p){checkIntBI(i,u,p,r,o,7);var g=Number(i&BigInt(4294967295));r[o+7]=g,g>>=8,r[o+6]=g,g>>=8,r[o+5]=g,g>>=8,r[o+4]=g;var y=Number(i>>BigInt(32)&BigInt(4294967295));return r[o+3]=y,y>>=8,r[o+2]=y,y>>=8,r[o+1]=y,y>>=8,r[o]=y,o+8}function checkIEEE754(r,i,o,u,p,g){if(o+u>r.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function writeFloat(r,i,o,u,g){return i=+i,o>>>=0,g||checkIEEE754(r,0,o,4),p.write(r,i,o,u,23,4),o+4}function writeDouble(r,i,o,u,g){return i=+i,o>>>=0,g||checkIEEE754(r,0,o,8),p.write(r,i,o,u,52,8),o+8}Buffer.prototype.slice=function slice(r,i){var o=this.length;(r=~~r)<0?(r+=o)<0&&(r=0):r>o&&(r=o),(i=void 0===i?o:~~i)<0?(i+=o)<0&&(i=0):i>o&&(i=o),i<r&&(i=r);var u=this.subarray(r,i);return Object.setPrototypeOf(u,Buffer.prototype),u},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(r,i,o){r>>>=0,i>>>=0,o||checkOffset(r,i,this.length);for(var u=this[r],p=1,g=0;++g<i&&(p*=256);)u+=this[r+g]*p;return u},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(r,i,o){r>>>=0,i>>>=0,o||checkOffset(r,i,this.length);for(var u=this[r+--i],p=1;i>0&&(p*=256);)u+=this[r+--i]*p;return u},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(r,i){return r>>>=0,i||checkOffset(r,1,this.length),this[r]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(r,i){return r>>>=0,i||checkOffset(r,2,this.length),this[r]|this[r+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(r,i){return r>>>=0,i||checkOffset(r,2,this.length),this[r]<<8|this[r+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(r){validateNumber(r>>>=0,"offset");var i=this[r],o=this[r+7];void 0!==i&&void 0!==o||boundsError(r,this.length-8);var u=i+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24),p=this[++r]+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+o*Math.pow(2,24);return BigInt(u)+(BigInt(p)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(r){validateNumber(r>>>=0,"offset");var i=this[r],o=this[r+7];void 0!==i&&void 0!==o||boundsError(r,this.length-8);var u=i*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r],p=this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+o;return(BigInt(u)<<BigInt(32))+BigInt(p)})),Buffer.prototype.readIntLE=function readIntLE(r,i,o){r>>>=0,i>>>=0,o||checkOffset(r,i,this.length);for(var u=this[r],p=1,g=0;++g<i&&(p*=256);)u+=this[r+g]*p;return u>=(p*=128)&&(u-=Math.pow(2,8*i)),u},Buffer.prototype.readIntBE=function readIntBE(r,i,o){r>>>=0,i>>>=0,o||checkOffset(r,i,this.length);for(var u=i,p=1,g=this[r+--u];u>0&&(p*=256);)g+=this[r+--u]*p;return g>=(p*=128)&&(g-=Math.pow(2,8*i)),g},Buffer.prototype.readInt8=function readInt8(r,i){return r>>>=0,i||checkOffset(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},Buffer.prototype.readInt16LE=function readInt16LE(r,i){r>>>=0,i||checkOffset(r,2,this.length);var o=this[r]|this[r+1]<<8;return 32768&o?4294901760|o:o},Buffer.prototype.readInt16BE=function readInt16BE(r,i){r>>>=0,i||checkOffset(r,2,this.length);var o=this[r+1]|this[r]<<8;return 32768&o?4294901760|o:o},Buffer.prototype.readInt32LE=function readInt32LE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(r){validateNumber(r>>>=0,"offset");var i=this[r],o=this[r+7];void 0!==i&&void 0!==o||boundsError(r,this.length-8);var u=this[r+4]+this[r+5]*Math.pow(2,8)+this[r+6]*Math.pow(2,16)+(o<<24);return(BigInt(u)<<BigInt(32))+BigInt(i+this[++r]*Math.pow(2,8)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,24))})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(r){validateNumber(r>>>=0,"offset");var i=this[r],o=this[r+7];void 0!==i&&void 0!==o||boundsError(r,this.length-8);var u=(i<<24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+this[++r];return(BigInt(u)<<BigInt(32))+BigInt(this[++r]*Math.pow(2,24)+this[++r]*Math.pow(2,16)+this[++r]*Math.pow(2,8)+o)})),Buffer.prototype.readFloatLE=function readFloatLE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),p.read(this,r,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),p.read(this,r,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(r,i){return r>>>=0,i||checkOffset(r,8,this.length),p.read(this,r,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(r,i){return r>>>=0,i||checkOffset(r,8,this.length),p.read(this,r,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(r,i,o,u){(r=+r,i>>>=0,o>>>=0,u)||checkInt(this,r,i,o,Math.pow(2,8*o)-1,0);var p=1,g=0;for(this[i]=255&r;++g<o&&(p*=256);)this[i+g]=r/p&255;return i+o},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(r,i,o,u){(r=+r,i>>>=0,o>>>=0,u)||checkInt(this,r,i,o,Math.pow(2,8*o)-1,0);var p=o-1,g=1;for(this[i+p]=255&r;--p>=0&&(g*=256);)this[i+p]=r/g&255;return i+o},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,1,255,0),this[i]=255&r,i+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,2,65535,0),this[i]=255&r,this[i+1]=r>>>8,i+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,2,65535,0),this[i]=r>>>8,this[i+1]=255&r,i+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,4,4294967295,0),this[i+3]=r>>>24,this[i+2]=r>>>16,this[i+1]=r>>>8,this[i]=255&r,i+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,4,4294967295,0),this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r,i+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(r,i){return void 0===i&&(i=0),wrtBigUInt64LE(this,r,i,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(r,i){return void 0===i&&(i=0),wrtBigUInt64BE(this,r,i,BigInt(0),BigInt("0xffffffffffffffff"))})),Buffer.prototype.writeIntLE=function writeIntLE(r,i,o,u){if(r=+r,i>>>=0,!u){var p=Math.pow(2,8*o-1);checkInt(this,r,i,o,p-1,-p)}var g=0,y=1,w=0;for(this[i]=255&r;++g<o&&(y*=256);)r<0&&0===w&&0!==this[i+g-1]&&(w=1),this[i+g]=(r/y|0)-w&255;return i+o},Buffer.prototype.writeIntBE=function writeIntBE(r,i,o,u){if(r=+r,i>>>=0,!u){var p=Math.pow(2,8*o-1);checkInt(this,r,i,o,p-1,-p)}var g=o-1,y=1,w=0;for(this[i+g]=255&r;--g>=0&&(y*=256);)r<0&&0===w&&0!==this[i+g+1]&&(w=1),this[i+g]=(r/y|0)-w&255;return i+o},Buffer.prototype.writeInt8=function writeInt8(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,1,127,-128),r<0&&(r=255+r+1),this[i]=255&r,i+1},Buffer.prototype.writeInt16LE=function writeInt16LE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,2,32767,-32768),this[i]=255&r,this[i+1]=r>>>8,i+2},Buffer.prototype.writeInt16BE=function writeInt16BE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,2,32767,-32768),this[i]=r>>>8,this[i+1]=255&r,i+2},Buffer.prototype.writeInt32LE=function writeInt32LE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,4,2147483647,-2147483648),this[i]=255&r,this[i+1]=r>>>8,this[i+2]=r>>>16,this[i+3]=r>>>24,i+4},Buffer.prototype.writeInt32BE=function writeInt32BE(r,i,o){return r=+r,i>>>=0,o||checkInt(this,r,i,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r,i+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(r,i){return void 0===i&&(i=0),wrtBigUInt64LE(this,r,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(r,i){return void 0===i&&(i=0),wrtBigUInt64BE(this,r,i,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(r,i,o){return writeFloat(this,r,i,!0,o)},Buffer.prototype.writeFloatBE=function writeFloatBE(r,i,o){return writeFloat(this,r,i,!1,o)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(r,i,o){return writeDouble(this,r,i,!0,o)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(r,i,o){return writeDouble(this,r,i,!1,o)},Buffer.prototype.copy=function copy(r,i,o,u){if(!Buffer.isBuffer(r))throw new TypeError("argument should be a Buffer");if(o||(o=0),u||0===u||(u=this.length),i>=r.length&&(i=r.length),i||(i=0),u>0&&u<o&&(u=o),u===o)return 0;if(0===r.length||0===this.length)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("sourceEnd out of bounds");u>this.length&&(u=this.length),r.length-i<u-o&&(u=r.length-i+o);var p=u-o;return this===r&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(i,o,u):Uint8Array.prototype.set.call(r,this.subarray(o,u),i),p},Buffer.prototype.fill=function fill(r,i,o,u){if("string"==typeof r){if("string"==typeof i?(u=i,i=0,o=this.length):"string"==typeof o&&(u=o,o=this.length),void 0!==u&&"string"!=typeof u)throw new TypeError("encoding must be a string");if("string"==typeof u&&!Buffer.isEncoding(u))throw new TypeError("Unknown encoding: "+u);if(1===r.length){var p=r.charCodeAt(0);("utf8"===u&&p<128||"latin1"===u)&&(r=p)}}else"number"==typeof r?r&=255:"boolean"==typeof r&&(r=Number(r));if(i<0||this.length<i||this.length<o)throw new RangeError("Out of range index");if(o<=i)return this;var g;if(i>>>=0,o=void 0===o?this.length:o>>>0,r||(r=0),"number"==typeof r)for(g=i;g<o;++g)this[g]=r;else{var y=Buffer.isBuffer(r)?r:Buffer.from(r,u),w=y.length;if(0===w)throw new TypeError('The value "'+r+'" is invalid for argument "value"');for(g=0;g<o-i;++g)this[g+i]=y[g%w]}return this};var _={};function E(r,i,o){_[r]=function(o){function NodeError(){var u;return u=o.call(this)||this,Object.defineProperty(_assertThisInitialized(u),"message",{value:i.apply(_assertThisInitialized(u),arguments),writable:!0,configurable:!0}),u.name=u.name+" ["+r+"]",u.stack,delete u.name,u}return function _inheritsLoose(r,i){r.prototype=Object.create(i.prototype),r.prototype.constructor=r,_setPrototypeOf(r,i)}(NodeError,o),NodeError.prototype.toString=