apache-arrow
Version:
Apache Arrow columnar in-memory format
2 lines • 248 kB
JavaScript
/*! For license information please see Arrow.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Arrow",[],e):"object"==typeof exports?exports.Arrow=e():t.Arrow=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e,r){"use strict";r.r(e),r.d(e,"memcpy",(function(){return u})),r.d(e,"joinUint8Arrays",(function(){return c})),r.d(e,"toArrayBufferView",(function(){return l})),r.d(e,"toInt8Array",(function(){return h})),r.d(e,"toInt16Array",(function(){return d})),r.d(e,"toInt32Array",(function(){return f})),r.d(e,"toBigInt64Array",(function(){return p})),r.d(e,"toUint8Array",(function(){return y})),r.d(e,"toUint16Array",(function(){return b})),r.d(e,"toUint32Array",(function(){return g})),r.d(e,"toBigUint64Array",(function(){return _})),r.d(e,"toFloat32Array",(function(){return m})),r.d(e,"toFloat64Array",(function(){return w})),r.d(e,"toUint8ClampedArray",(function(){return v})),r.d(e,"toArrayBufferViewIterator",(function(){return A})),r.d(e,"toInt8ArrayIterator",(function(){return B})),r.d(e,"toInt16ArrayIterator",(function(){return S})),r.d(e,"toInt32ArrayIterator",(function(){return T})),r.d(e,"toUint8ArrayIterator",(function(){return O})),r.d(e,"toUint16ArrayIterator",(function(){return D})),r.d(e,"toUint32ArrayIterator",(function(){return U})),r.d(e,"toFloat32ArrayIterator",(function(){return L})),r.d(e,"toFloat64ArrayIterator",(function(){return F})),r.d(e,"toUint8ClampedArrayIterator",(function(){return x})),r.d(e,"toArrayBufferViewAsyncIterator",(function(){return M})),r.d(e,"toInt8ArrayAsyncIterator",(function(){return E})),r.d(e,"toInt16ArrayAsyncIterator",(function(){return N})),r.d(e,"toInt32ArrayAsyncIterator",(function(){return V})),r.d(e,"toUint8ArrayAsyncIterator",(function(){return C})),r.d(e,"toUint16ArrayAsyncIterator",(function(){return R})),r.d(e,"toUint32ArrayAsyncIterator",(function(){return j})),r.d(e,"toFloat32ArrayAsyncIterator",(function(){return k})),r.d(e,"toFloat64ArrayAsyncIterator",(function(){return z})),r.d(e,"toUint8ClampedArrayAsyncIterator",(function(){return P})),r.d(e,"rebaseValueOffsets",(function(){return Y})),r.d(e,"compareArrayLike",(function(){return W}));var n=r(4),i=r(5),s=r(1),o=n.a.ByteBuffer;const a="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;function u(t,e,r=0,n=e.byteLength){const i=t.byteLength,s=new Uint8Array(t.buffer,t.byteOffset,i),o=new Uint8Array(e.buffer,e.byteOffset,Math.min(n,i));return s.set(o,r),t}function c(t,e){let r,n,i,s=function(t){let e,r,n,i,s=t[0]?[t[0]]:[];for(let o,a,u=0,c=0,l=t.length;++u<l;)o=s[c],a=t[u],!o||!a||o.buffer!==a.buffer||a.byteOffset<o.byteOffset?a&&(s[++c]=a):(({byteOffset:e,byteLength:n}=o),({byteOffset:r,byteLength:i}=a),e+n<r||r+i<e?a&&(s[++c]=a):s[c]=new Uint8Array(o.buffer,e,r-e+i));return s}(t),o=s.reduce((t,e)=>t+e.byteLength,0),a=0,c=-1,l=Math.min(e||1/0,o);for(let h=s.length;++c<h;){if(r=s[c],n=r.subarray(0,Math.min(r.length,l-a)),l<=a+n.length){n.length<r.length?s[c]=r.subarray(n.length):n.length===r.length&&c++,i?u(i,n,a):i=n;break}u(i||(i=new Uint8Array(l)),n,a),a+=n.length}return[i||new Uint8Array(0),s.slice(c),o-(i?i.byteLength:0)]}function l(t,e){let r=Object(s.j)(e)?e.value:e;return r instanceof t?t===Uint8Array?new t(r.buffer,r.byteOffset,r.byteLength):r:r?("string"==typeof r&&(r=Object(i.b)(r)),r instanceof ArrayBuffer||r instanceof a?new t(r):r instanceof o?l(t,r.bytes()):ArrayBuffer.isView(r)?r.byteLength<=0?new t(0):new t(r.buffer,r.byteOffset,r.byteLength/t.BYTES_PER_ELEMENT):t.from(r)):new t(0)}const h=t=>l(Int8Array,t),d=t=>l(Int16Array,t),f=t=>l(Int32Array,t),p=t=>l(s.b,t),y=t=>l(Uint8Array,t),b=t=>l(Uint16Array,t),g=t=>l(Uint32Array,t),_=t=>l(s.d,t),m=t=>l(Float32Array,t),w=t=>l(Float64Array,t),v=t=>l(Uint8ClampedArray,t),I=t=>(t.next(),t);function*A(t,e){const r=function*(t){yield t},n="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof a?r(e):Object(s.i)(e)?e:r(e);return yield*I(function*(e){let r=null;do{r=e.next(yield l(t,r))}while(!r.done)}(n[Symbol.iterator]())),new t}const B=t=>A(Int8Array,t),S=t=>A(Int16Array,t),T=t=>A(Int32Array,t),O=t=>A(Uint8Array,t),D=t=>A(Uint16Array,t),U=t=>A(Uint32Array,t),L=t=>A(Float32Array,t),F=t=>A(Float64Array,t),x=t=>A(Uint8ClampedArray,t);async function*M(t,e){if(Object(s.l)(e))return yield*M(t,await e);const r=async function*(t){yield await t},n="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof a?r(e):Object(s.i)(e)?async function*(t){yield*I(function*(t){let e=null;do{e=t.next(yield e&&e.value)}while(!e.done)}(t[Symbol.iterator]()))}(e):Object(s.f)(e)?e:r(e);return yield*I(async function*(e){let r=null;do{r=await e.next(yield l(t,r))}while(!r.done)}(n[Symbol.asyncIterator]())),new t}const E=t=>M(Int8Array,t),N=t=>M(Int16Array,t),V=t=>M(Int32Array,t),C=t=>M(Uint8Array,t),R=t=>M(Uint16Array,t),j=t=>M(Uint32Array,t),k=t=>M(Float32Array,t),z=t=>M(Float64Array,t),P=t=>M(Uint8ClampedArray,t);function Y(t,e,r){if(0!==t){r=r.slice(0,e+1);for(let n=-1;++n<=e;)r[n]+=t}return r}function W(t,e){let r=0,n=t.length;if(n!==e.length)return!1;if(n>0)do{if(t[r]!==e[r])return!1}while(++r<n);return!0}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"c",(function(){return s})),r.d(e,"b",(function(){return o})),r.d(e,"d",(function(){return u})),r.d(e,"k",(function(){return f})),r.d(e,"l",(function(){return p})),r.d(e,"i",(function(){return y})),r.d(e,"f",(function(){return b})),r.d(e,"e",(function(){return g})),r.d(e,"j",(function(){return _})),r.d(e,"h",(function(){return m})),r.d(e,"g",(function(){return w})),r.d(e,"o",(function(){return v})),r.d(e,"m",(function(){return I})),r.d(e,"p",(function(){return A})),r.d(e,"n",(function(){return B}));var n=r(2);const[i,s]=(()=>{const t=()=>{throw Error("BigInt is not available in this environment")};function e(){throw t()}return e.asIntN=()=>{throw t()},e.asUintN=()=>{throw t()},"undefined"!=typeof BigInt?[BigInt,!0]:[e,!1]})(),[o,a]=(()=>{const t=()=>{throw Error("BigInt64Array is not available in this environment")};return"undefined"!=typeof BigInt64Array?[BigInt64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw t()}static from(){throw t()}constructor(){throw t()}},!1]})(),[u,c]=(()=>{const t=()=>{throw Error("BigUint64Array is not available in this environment")};return"undefined"!=typeof BigUint64Array?[BigUint64Array,!0]:[class{static get BYTES_PER_ELEMENT(){return 8}static of(){throw t()}static from(){throw t()}constructor(){throw t()}},!1]})(),l=t=>"number"==typeof t,h=t=>"boolean"==typeof t,d=t=>"function"==typeof t,f=t=>null!=t&&Object(t)===t,p=t=>f(t)&&d(t.then),y=t=>f(t)&&d(t[Symbol.iterator]),b=t=>f(t)&&d(t[Symbol.asyncIterator]),g=t=>f(t)&&f(t.schema),_=t=>f(t)&&"done"in t&&"value"in t,m=t=>f(t)&&d(t.stat)&&l(t.fd),w=t=>f(t)&&I(t.body),v=t=>f(t)&&d(t.abort)&&d(t.getWriter)&&!(t instanceof n.d),I=t=>f(t)&&d(t.cancel)&&d(t.getReader)&&!(t instanceof n.d),A=t=>f(t)&&d(t.end)&&d(t.write)&&h(t.writable)&&!(t instanceof n.d),B=t=>f(t)&&d(t.read)&&d(t.pipe)&&h(t.readable)&&!(t instanceof n.d)},function(t,e,r){"use strict";r.d(e,"c",(function(){return i})),r.d(e,"a",(function(){return s})),r.d(e,"d",(function(){return o})),r.d(e,"b",(function(){return a}));var n=r(3);const i=Object.freeze({done:!0,value:void 0});class s{constructor(t){this._json=t}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class o{tee(){return this._getDOMStream().tee()}pipe(t,e){return this._getNodeStream().pipe(t,e)}pipeTo(t,e){return this._getDOMStream().pipeTo(t,e)}pipeThrough(t,e){return this._getDOMStream().pipeThrough(t,e)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class a extends o{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}get closed(){return this._closedPromise}async cancel(t){await this.return(t)}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this;for(;t.length>0;)t.shift().resolve(i);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return n.a.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return n.a.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}async throw(t){return await this.abort(t),i}async return(t){return await this.close(),i}async read(t){return(await this.next(t,"read")).value}async peek(t){return(await this.next(t,"peek")).value}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,e)=>{this.resolvers.push({resolve:t,reject:e})}):Promise.resolve(i)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(this+" is closed")}}},function(t,e,r){"use strict";var n=r(0);e.a={fromIterable:t=>i(function*(t){let e,r,i,s,o=!1,a=[],u=0;function c(){return"peek"===i?Object(n.joinUint8Arrays)(a,s)[0]:([r,a,u]=Object(n.joinUint8Arrays)(a,s),r)}({cmd:i,size:s}=yield null);let l=Object(n.toUint8ArrayIterator)(t)[Symbol.iterator]();try{do{if(({done:e,value:r}=isNaN(s-u)?l.next(void 0):l.next(s-u)),!e&&r.byteLength>0&&(a.push(r),u+=r.byteLength),e||s<=u)do{({cmd:i,size:s}=yield c())}while(s<u)}while(!e)}catch(h){(o=!0)&&"function"==typeof l.throw&&l.throw(h)}finally{!1===o&&"function"==typeof l.return&&l.return(null)}return null}(t)),fromAsyncIterable:t=>i(async function*(t){let e,r,i,s,o=!1,a=[],u=0;function c(){return"peek"===i?Object(n.joinUint8Arrays)(a,s)[0]:([r,a,u]=Object(n.joinUint8Arrays)(a,s),r)}({cmd:i,size:s}=yield null);let l=Object(n.toUint8ArrayAsyncIterator)(t)[Symbol.asyncIterator]();try{do{if(({done:e,value:r}=isNaN(s-u)?await l.next(void 0):await l.next(s-u)),!e&&r.byteLength>0&&(a.push(r),u+=r.byteLength),e||s<=u)do{({cmd:i,size:s}=yield c())}while(s<u)}while(!e)}catch(h){(o=!0)&&"function"==typeof l.throw&&await l.throw(h)}finally{!1===o&&"function"==typeof l.return&&await l.return(new Uint8Array(0))}return null}(t)),fromDOMStream:t=>i(async function*(t){let e,r,i,o=!1,a=!1,u=[],c=0;function l(){return"peek"===r?Object(n.joinUint8Arrays)(u,i)[0]:([e,u,c]=Object(n.joinUint8Arrays)(u,i),e)}({cmd:r,size:i}=yield null);let h=new s(t);try{do{if(({done:o,value:e}=isNaN(i-c)?await h.read(void 0):await h.read(i-c)),!o&&e.byteLength>0&&(u.push(Object(n.toUint8Array)(e)),c+=e.byteLength),o||i<=c)do{({cmd:r,size:i}=yield l())}while(i<c)}while(!o)}catch(d){(a=!0)&&await h.cancel(d)}finally{!1===a?await h.cancel():t.locked&&h.releaseLock()}return null}(t)),fromNodeStream:t=>i(async function*(t){let e,r,i,s=[],o="error",u=!1,c=null,l=0,h=[];function d(){return"peek"===e?Object(n.joinUint8Arrays)(h,r)[0]:([i,h,l]=Object(n.joinUint8Arrays)(h,r),i)}if(({cmd:e,size:r}=yield null),t.isTTY)return yield new Uint8Array(0),null;try{s[0]=a(t,"end"),s[1]=a(t,"error");do{if(s[2]=a(t,"readable"),[o,c]=await Promise.race(s.map(t=>t[2])),"error"===o)break;if((u="end"===o)||(isFinite(r-l)?(i=Object(n.toUint8Array)(t.read(r-l)),i.byteLength<r-l&&(i=Object(n.toUint8Array)(t.read(void 0)))):i=Object(n.toUint8Array)(t.read(void 0)),i.byteLength>0&&(h.push(i),l+=i.byteLength)),u||r<=l)do{({cmd:e,size:r}=yield d())}while(r<l)}while(!u)}finally{await f(s,"error"===o?c:null)}return null;function f(e,r){return i=h=null,new Promise(async(n,i)=>{for(const[r,o]of e)t.off(r,o);try{const e=t.destroy;e&&e.call(t,r),r=void 0}catch(s){r=s||r}finally{null!=r?i(r):n()}})}}(t)),toDOMStream(t,e){throw Error('"toDOMStream" not available in this environment')},toNodeStream(t,e){throw Error('"toNodeStream" not available in this environment')}};const i=t=>(t.next(),t);class s{constructor(t){this.source=t,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(e){this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}async cancel(t){const{reader:e,source:r}=this;e&&await e.cancel(t).catch(()=>{}),r&&r.locked&&this.releaseLock()}async read(t){if(0===t)return{done:null==this.reader,value:new Uint8Array(0)};const e=this.supportsBYOB&&"number"==typeof t?await this.readFromBYOBReader(t):await this.getDefaultReader().read();return!e.done&&(e.value=Object(n.toUint8Array)(e)),e}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}async readFromBYOBReader(t){return await o(this.getBYOBReader(),new ArrayBuffer(t),0,t)}}async function o(t,e,r,n){if(r>=n)return{done:!1,value:new Uint8Array(e,0,n)};const{done:i,value:s}=await t.read(new Uint8Array(e,r,n-r));return(r+=s.byteLength)<n&&!i?await o(t,s.buffer,r,n):{done:i,value:new Uint8Array(s.buffer,0,r)}}const a=(t,e)=>{let r,n=t=>r([e,t]);return[e,n,new Promise(i=>(r=i)&&t.once(e,n))]}},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n={};n.Offset,n.Table,n.SIZEOF_SHORT=2,n.SIZEOF_INT=4,n.FILE_IDENTIFIER_LENGTH=4,n.Encoding={UTF8_BYTES:1,UTF16_STRING:2},n.int32=new Int32Array(2),n.float32=new Float32Array(n.int32.buffer),n.float64=new Float64Array(n.int32.buffer),n.isLittleEndian=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0],n.Long=function(t,e){this.low=0|t,this.high=0|e},n.Long.create=function(t,e){return 0==t&&0==e?n.Long.ZERO:new n.Long(t,e)},n.Long.prototype.toFloat64=function(){return(this.low>>>0)+4294967296*this.high},n.Long.prototype.equals=function(t){return this.low==t.low&&this.high==t.high},n.Long.ZERO=new n.Long(0,0),n.Builder=function(t){if(t)e=t;else var e=1024;this.bb=n.ByteBuffer.allocate(e),this.space=e,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},n.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1},n.Builder.prototype.forceDefaults=function(t){this.force_defaults=t},n.Builder.prototype.dataBuffer=function(){return this.bb},n.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},n.Builder.prototype.prep=function(t,e){t>this.minalign&&(this.minalign=t);for(var r=1+~(this.bb.capacity()-this.space+e)&t-1;this.space<r+t+e;){var i=this.bb.capacity();this.bb=n.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(r)},n.Builder.prototype.pad=function(t){for(var e=0;e<t;e++)this.bb.writeInt8(--this.space,0)},n.Builder.prototype.writeInt8=function(t){this.bb.writeInt8(this.space-=1,t)},n.Builder.prototype.writeInt16=function(t){this.bb.writeInt16(this.space-=2,t)},n.Builder.prototype.writeInt32=function(t){this.bb.writeInt32(this.space-=4,t)},n.Builder.prototype.writeInt64=function(t){this.bb.writeInt64(this.space-=8,t)},n.Builder.prototype.writeFloat32=function(t){this.bb.writeFloat32(this.space-=4,t)},n.Builder.prototype.writeFloat64=function(t){this.bb.writeFloat64(this.space-=8,t)},n.Builder.prototype.addInt8=function(t){this.prep(1,0),this.writeInt8(t)},n.Builder.prototype.addInt16=function(t){this.prep(2,0),this.writeInt16(t)},n.Builder.prototype.addInt32=function(t){this.prep(4,0),this.writeInt32(t)},n.Builder.prototype.addInt64=function(t){this.prep(8,0),this.writeInt64(t)},n.Builder.prototype.addFloat32=function(t){this.prep(4,0),this.writeFloat32(t)},n.Builder.prototype.addFloat64=function(t){this.prep(8,0),this.writeFloat64(t)},n.Builder.prototype.addFieldInt8=function(t,e,r){(this.force_defaults||e!=r)&&(this.addInt8(e),this.slot(t))},n.Builder.prototype.addFieldInt16=function(t,e,r){(this.force_defaults||e!=r)&&(this.addInt16(e),this.slot(t))},n.Builder.prototype.addFieldInt32=function(t,e,r){(this.force_defaults||e!=r)&&(this.addInt32(e),this.slot(t))},n.Builder.prototype.addFieldInt64=function(t,e,r){!this.force_defaults&&e.equals(r)||(this.addInt64(e),this.slot(t))},n.Builder.prototype.addFieldFloat32=function(t,e,r){(this.force_defaults||e!=r)&&(this.addFloat32(e),this.slot(t))},n.Builder.prototype.addFieldFloat64=function(t,e,r){(this.force_defaults||e!=r)&&(this.addFloat64(e),this.slot(t))},n.Builder.prototype.addFieldOffset=function(t,e,r){(this.force_defaults||e!=r)&&(this.addOffset(e),this.slot(t))},n.Builder.prototype.addFieldStruct=function(t,e,r){e!=r&&(this.nested(e),this.slot(t))},n.Builder.prototype.nested=function(t){if(t!=this.offset())throw Error("FlatBuffers: struct must be serialized inline.")},n.Builder.prototype.notNested=function(){if(this.isNested)throw Error("FlatBuffers: object serialization must not be nested.")},n.Builder.prototype.slot=function(t){this.vtable[t]=this.offset()},n.Builder.prototype.offset=function(){return this.bb.capacity()-this.space},n.Builder.growByteBuffer=function(t){var e=t.capacity();if(3221225472&e)throw Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var r=e<<1,i=n.ByteBuffer.allocate(r);return i.setPosition(r-e),i.bytes().set(t.bytes(),r-e),i},n.Builder.prototype.addOffset=function(t){this.prep(n.SIZEOF_INT,0),this.writeInt32(this.offset()-t+n.SIZEOF_INT)},n.Builder.prototype.startObject=function(t){this.notNested(),null==this.vtable&&(this.vtable=[]),this.vtable_in_use=t;for(var e=0;e<t;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()},n.Builder.prototype.endObject=function(){if(null==this.vtable||!this.isNested)throw Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var t=this.offset(),e=this.vtable_in_use-1;e>=0&&0==this.vtable[e];e--);for(var r=e+1;e>=0;e--)this.addInt16(0!=this.vtable[e]?t-this.vtable[e]:0);this.addInt16(t-this.object_start);var i=(r+2)*n.SIZEOF_SHORT;this.addInt16(i);var s=0,o=this.space;t:for(e=0;e<this.vtables.length;e++){var a=this.bb.capacity()-this.vtables[e];if(i==this.bb.readInt16(a)){for(var u=n.SIZEOF_SHORT;u<i;u+=n.SIZEOF_SHORT)if(this.bb.readInt16(o+u)!=this.bb.readInt16(a+u))continue t;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-t,this.bb.writeInt32(this.space,s-t)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-t,this.offset()-t)),this.isNested=!1,t},n.Builder.prototype.finish=function(t,e){if(e){var r=e;if(this.prep(this.minalign,n.SIZEOF_INT+n.FILE_IDENTIFIER_LENGTH),r.length!=n.FILE_IDENTIFIER_LENGTH)throw Error("FlatBuffers: file identifier must be length "+n.FILE_IDENTIFIER_LENGTH);for(var i=n.FILE_IDENTIFIER_LENGTH-1;i>=0;i--)this.writeInt8(r.charCodeAt(i))}this.prep(this.minalign,n.SIZEOF_INT),this.addOffset(t),this.bb.setPosition(this.space)},n.Builder.prototype.requiredField=function(t,e){var r=this.bb.capacity()-t,n=r-this.bb.readInt32(r);if(!(0!=this.bb.readInt16(n+e)))throw Error("FlatBuffers: field "+e+" must be set")},n.Builder.prototype.startVector=function(t,e,r){this.notNested(),this.vector_num_elems=e,this.prep(n.SIZEOF_INT,t*e),this.prep(r,t*e)},n.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},n.Builder.prototype.createString=function(t){if(t instanceof Uint8Array)var e=t;else{e=[];for(var r=0;r<t.length;){var n,i=t.charCodeAt(r++);if(i<55296||i>=56320)n=i;else n=(i<<10)+t.charCodeAt(r++)+-56613888;n<128?e.push(n):(n<2048?e.push(n>>6&31|192):(n<65536?e.push(n>>12&15|224):e.push(n>>18&7|240,n>>12&63|128),e.push(n>>6&63|128)),e.push(63&n|128))}}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);r=0;for(var s=this.space,o=this.bb.bytes();r<e.length;r++)o[s++]=e[r];return this.endVector()},n.Builder.prototype.createLong=function(t,e){return n.Long.create(t,e)},n.ByteBuffer=function(t){this.bytes_=t,this.position_=0},n.ByteBuffer.allocate=function(t){return new n.ByteBuffer(new Uint8Array(t))},n.ByteBuffer.prototype.clear=function(){this.position_=0},n.ByteBuffer.prototype.bytes=function(){return this.bytes_},n.ByteBuffer.prototype.position=function(){return this.position_},n.ByteBuffer.prototype.setPosition=function(t){this.position_=t},n.ByteBuffer.prototype.capacity=function(){return this.bytes_.length},n.ByteBuffer.prototype.readInt8=function(t){return this.readUint8(t)<<24>>24},n.ByteBuffer.prototype.readUint8=function(t){return this.bytes_[t]},n.ByteBuffer.prototype.readInt16=function(t){return this.readUint16(t)<<16>>16},n.ByteBuffer.prototype.readUint16=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8},n.ByteBuffer.prototype.readInt32=function(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24},n.ByteBuffer.prototype.readUint32=function(t){return this.readInt32(t)>>>0},n.ByteBuffer.prototype.readInt64=function(t){return new n.Long(this.readInt32(t),this.readInt32(t+4))},n.ByteBuffer.prototype.readUint64=function(t){return new n.Long(this.readUint32(t),this.readUint32(t+4))},n.ByteBuffer.prototype.readFloat32=function(t){return n.int32[0]=this.readInt32(t),n.float32[0]},n.ByteBuffer.prototype.readFloat64=function(t){return n.int32[n.isLittleEndian?0:1]=this.readInt32(t),n.int32[n.isLittleEndian?1:0]=this.readInt32(t+4),n.float64[0]},n.ByteBuffer.prototype.writeInt8=function(t,e){this.bytes_[t]=e},n.ByteBuffer.prototype.writeUint8=function(t,e){this.bytes_[t]=e},n.ByteBuffer.prototype.writeInt16=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8},n.ByteBuffer.prototype.writeUint16=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8},n.ByteBuffer.prototype.writeInt32=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24},n.ByteBuffer.prototype.writeUint32=function(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24},n.ByteBuffer.prototype.writeInt64=function(t,e){this.writeInt32(t,e.low),this.writeInt32(t+4,e.high)},n.ByteBuffer.prototype.writeUint64=function(t,e){this.writeUint32(t,e.low),this.writeUint32(t+4,e.high)},n.ByteBuffer.prototype.writeFloat32=function(t,e){n.float32[0]=e,this.writeInt32(t,n.int32[0])},n.ByteBuffer.prototype.writeFloat64=function(t,e){n.float64[0]=e,this.writeInt32(t,n.int32[n.isLittleEndian?0:1]),this.writeInt32(t+4,n.int32[n.isLittleEndian?1:0])},n.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+n.SIZEOF_INT+n.FILE_IDENTIFIER_LENGTH)throw Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var t="",e=0;e<n.FILE_IDENTIFIER_LENGTH;e++)t+=String.fromCharCode(this.readInt8(this.position_+n.SIZEOF_INT+e));return t},n.ByteBuffer.prototype.__offset=function(t,e){var r=t-this.readInt32(t);return e<this.readInt16(r)?this.readInt16(r+e):0},n.ByteBuffer.prototype.__union=function(t,e){return t.bb_pos=e+this.readInt32(e),t.bb=this,t},n.ByteBuffer.prototype.__string=function(t,e){t+=this.readInt32(t);var r=this.readInt32(t),i="",s=0;if(t+=n.SIZEOF_INT,e===n.Encoding.UTF8_BYTES)return this.bytes_.subarray(t,t+r);for(;s<r;){var o,a=this.readUint8(t+s++);if(a<192)o=a;else{var u=this.readUint8(t+s++);if(a<224)o=(31&a)<<6|63&u;else{var c=this.readUint8(t+s++);if(a<240)o=(15&a)<<12|(63&u)<<6|63&c;else o=(7&a)<<18|(63&u)<<12|(63&c)<<6|63&this.readUint8(t+s++)}}i+=o<65536?String.fromCharCode(o):String.fromCharCode(55296+((o-=65536)>>10),56320+(1023&o))}return i},n.ByteBuffer.prototype.__indirect=function(t){return t+this.readInt32(t)},n.ByteBuffer.prototype.__vector=function(t){return t+this.readInt32(t)+n.SIZEOF_INT},n.ByteBuffer.prototype.__vector_len=function(t){return this.readInt32(t+this.readInt32(t))},n.ByteBuffer.prototype.__has_identifier=function(t){if(t.length!=n.FILE_IDENTIFIER_LENGTH)throw Error("FlatBuffers: file identifier must be length "+n.FILE_IDENTIFIER_LENGTH);for(var e=0;e<n.FILE_IDENTIFIER_LENGTH;e++)if(t.charCodeAt(e)!=this.readInt8(this.position_+n.SIZEOF_INT+e))return!1;return!0},n.ByteBuffer.prototype.createLong=function(t,e){return n.Long.create(t,e)}},function(t,e,r){"use strict";!function(t){r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return u}));var n=r(0),i=r(6);const s="function"==typeof t?t:null,o="function"==typeof TextDecoder&&"function"==typeof TextEncoder,a=(t=>{if(o||!s){const e=new t("utf-8");return t=>e.decode(t)}return t=>{const{buffer:e,byteOffset:r,length:i}=Object(n.toUint8Array)(t);return s.from(e,r,i).toString()}})("undefined"!=typeof TextDecoder?TextDecoder:i.a),u=(t=>{if(o||!s){const e=new t;return t=>e.encode(t)}return(t="")=>Object(n.toUint8Array)(s.from(t,"utf8"))})("undefined"!=typeof TextEncoder?TextEncoder:i.b)}(r(7).Buffer)},function(t,e,r){"use strict";function n(t,e,r){return e<=t&&t<=r}function i(t){if(void 0===t)return{};if(t===Object(t))return t;throw TypeError("Could not convert argument to dictionary")}r.d(e,"b",(function(){return l})),r.d(e,"a",(function(){return c}));function s(t){this.tokens=[].slice.call(t)}s.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(t)},push:function(t){if(Array.isArray(t))for(var e=t;e.length;)this.tokens.push(e.shift());else this.tokens.push(t)}};var o=-1;function a(t,e){if(t)throw TypeError("Decoder error");return e||65533}var u="utf-8";function c(t,e){if(!(this instanceof c))return new c(t,e);if((t=void 0!==t?(t+"").toLowerCase():u)!==u)throw Error("Encoding not supported. Only utf-8 is supported");e=i(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function l(t,e){if(!(this instanceof l))return new l(t,e);if((t=void 0!==t?(t+"").toLowerCase():u)!==u)throw Error("Encoding not supported. Only utf-8 is supported");e=i(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}function h(t){var e=t.fatal,r=0,i=0,s=0,u=128,c=191;this.handler=function(t,l){if(-1===l&&0!==s)return s=0,a(e);if(-1===l)return o;if(0===s){if(n(l,0,127))return l;if(n(l,194,223))s=1,r=l-192;else if(n(l,224,239))224===l&&(u=160),237===l&&(c=159),s=2,r=l-224;else{if(!n(l,240,244))return a(e);240===l&&(u=144),244===l&&(c=143),s=3,r=l-240}return r<<=6*s,null}if(!n(l,u,c))return r=s=i=0,u=128,c=191,t.prepend(l),a(e);if(u=128,c=191,r+=l-128<<6*(s-(i+=1)),i!==s)return null;var h=r;return r=s=i=0,h}}function d(t){t.fatal;this.handler=function(t,e){if(-1===e)return o;if(n(e,0,127))return e;var r,i;n(e,128,2047)?(r=1,i=192):n(e,2048,65535)?(r=2,i=224):n(e,65536,1114111)&&(r=3,i=240);for(var s=[(e>>6*r)+i];r>0;){var a=e>>6*(r-1);s.push(128|63&a),r-=1}return s}}c.prototype={decode:function(t,e){var r;r="object"==typeof t&&t instanceof ArrayBuffer?new Uint8Array(t):"object"==typeof t&&"buffer"in t&&t.buffer instanceof ArrayBuffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(0),e=i(e),this._streaming||(this._decoder=new h({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!e.stream;for(var n,a=new s(r),u=[];!a.endOfStream()&&(n=this._decoder.handler(a,a.read()))!==o;)null!==n&&(Array.isArray(n)?u.push.apply(u,n):u.push(n));if(!this._streaming){do{if((n=this._decoder.handler(a,a.read()))===o)break;null!==n&&(Array.isArray(n)?u.push.apply(u,n):u.push(n))}while(!a.endOfStream());this._decoder=null}return u.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===u[0]?(this._BOMseen=!0,u.shift()):this._BOMseen=!0)),function(t){for(var e="",r=0;r<t.length;++r){var n=t[r];e+=n<=65535?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),56320+(1023&n))}return e}(u)}},l.prototype={encode:function(t,e){t=t?t+"":"",e=i(e),this._streaming||(this._encoder=new d(this._options)),this._streaming=!!e.stream;for(var r,n=[],a=new s(function(t){for(var e=t+"",r=e.length,n=0,i=[];n<r;){var s=e.charCodeAt(n);if(s<55296||s>57343)i.push(s);else if(56320<=s&&s<=57343)i.push(65533);else if(55296<=s&&s<=56319)if(n===r-1)i.push(65533);else{var o=t.charCodeAt(n+1);if(56320<=o&&o<=57343){var a=1023&s,u=1023&o;i.push(65536+(a<<10)+u),n+=1}else i.push(65533)}n+=1}return i}(t));!a.endOfStream()&&(r=this._encoder.handler(a,a.read()))!==o;)Array.isArray(r)?n.push.apply(n,r):n.push(r);if(!this._streaming){for(;(r=this._encoder.handler(a,a.read()))!==o;)Array.isArray(r)?n.push.apply(n,r):n.push(r);this._encoder=null}return new Uint8Array(n)}}},function(t,e,r){"use strict";!function(t){var n=r(9),i=r(10),s=r(11);function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=d(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|f(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):d(t,e);if("Buffer"===e.type&&s(e.data))return d(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|f(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function d(t,e){var r=e.length<0?0:0|f(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function f(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(t).length;default:if(n)return z(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return D(this,e,r);case"latin1":case"binary":return U(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),isNaN(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,i){var s,o=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=(n+"").toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,u/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var l=-1;for(s=r;s<a;s++)if(c(t,s)===c(e,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===u)return l*o}else-1!==l&&(s-=s-l),l=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){for(var h=!0,d=0;d<u;d++)if(c(t,s+d)!==c(e,d)){h=!1;break}if(h)return s}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[r+o]=a}return o}function w(t,e,r,n){return Y(z(e,t.length-r),t,r,n)}function v(t,e,r,n){return Y(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function I(t,e,r,n){return v(t,e,r,n)}function A(t,e,r,n){return Y(P(e),t,r,n)}function B(t,e,r,n){return Y(function(t,e){for(var r,n,i,s=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i=r%256,s.push(i),s.push(n);return s}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s,o,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(s=t[i+1]))&&(u=(31&c)<<6|63&s)>127&&(l=u);break;case 3:s=t[i+1],o=t[i+2],128==(192&s)&&128==(192&o)&&(u=(15&c)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:s=t[i+1],o=t[i+2],a=t[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=O)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=O));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),e.kMaxLength=o(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch((t+"").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}},u.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?T(this,0,t):y.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),a=Math.min(s,o),c=this.slice(n,i),l=t.slice(e,r),h=0;h<a;++h)if(c[h]!==l[h]){s=c[h],o=l[h];break}return s<o?-1:o<s?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return I(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function U(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function L(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=k(t[s]);return i}function F(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function x(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,s){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function E(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-r,2);i<s;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-r,4);i<s;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function V(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(t,e,r,n,s){return s||V(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,s){return s||V(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var s=0;s<i;++s)r[s]=this[s+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||x(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||x(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||x(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||x(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||x(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||x(t,e,this.length);for(var n=this[t],i=1,s=0;++s<e&&(i*=256);)n+=this[t+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||x(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*e)),s},u.prototype.readInt8=function(t,e){return e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||x(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||x(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||x(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||x(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||x(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||x(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[e]=255&t;++s<r&&(i*=256);)this[e+s]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):E(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):E(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var s=0,o=1,a=0;for(this[e]=255&t;++s<r&&(o*=256);)t<0&&0===a&&0!==this[e+s-1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):E(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):E(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,s=n-r;if(this===t&&r<e&&e<n)for(i=s-1;i>=0;--i)t[i+e]=this[i+r];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+s),e);return s},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var s;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s<r;++s)this[s]=t;else{var o=u.isBuffer(t)?t:z(new u(t,n).toString()),a=o.length;for(s=0;s<r-e;++s)this[s+e]=o[s%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function k(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var r;e=e||1/0;for(var n=t.length,i=null,s=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function P(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}(r(8))},funct