@vue-pdf-viewer/viewer
Version:
A vue-pdf-viewer component for Vue and Nuxt. Suitable for vue-pdf document.
9 lines • 313 kB
JavaScript
"use strict";const kt=require("./VPdfViewer.vue_vue_type_style_index_1_scoped_1bbfb09f_lang-C94mpfNh.cjs");function En(e,t){for(var a=0;a<t.length;a++){const r=t[a];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var xn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var a=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),a}var ee={options:{usePureJavaScript:!1}},Ei={},Gr={};Gr.byteLength=An;Gr.toByteArray=_n;Gr.fromByteArray=Rn;var xt=[],ot=[],In=typeof Uint8Array<"u"?Uint8Array:Array,ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Jt=0,Bn=ra.length;Jt<Bn;++Jt)xt[Jt]=ra[Jt],ot[ra.charCodeAt(Jt)]=Jt;ot[45]=62;ot[95]=63;function xi(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=e.indexOf("=");a===-1&&(a=t);var r=a===t?0:4-a%4;return[a,r]}function An(e){var t=xi(e),a=t[0],r=t[1];return(a+r)*3/4-r}function bn(e,t,a){return(t+a)*3/4-a}function _n(e){var t,a=xi(e),r=a[0],i=a[1],s=new In(bn(e,r,i)),n=0,o=i>0?r-4:r,l;for(l=0;l<o;l+=4)t=ot[e.charCodeAt(l)]<<18|ot[e.charCodeAt(l+1)]<<12|ot[e.charCodeAt(l+2)]<<6|ot[e.charCodeAt(l+3)],s[n++]=t>>16&255,s[n++]=t>>8&255,s[n++]=t&255;return i===2&&(t=ot[e.charCodeAt(l)]<<2|ot[e.charCodeAt(l+1)]>>4,s[n++]=t&255),i===1&&(t=ot[e.charCodeAt(l)]<<10|ot[e.charCodeAt(l+1)]<<4|ot[e.charCodeAt(l+2)]>>2,s[n++]=t>>8&255,s[n++]=t&255),s}function wn(e){return xt[e>>18&63]+xt[e>>12&63]+xt[e>>6&63]+xt[e&63]}function Nn(e,t,a){for(var r,i=[],s=t;s<a;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),i.push(wn(r));return i.join("")}function Rn(e){for(var t,a=e.length,r=a%3,i=[],s=16383,n=0,o=a-r;n<o;n+=s)i.push(Nn(e,n,n+s>o?o:n+s));return r===1?(t=e[a-1],i.push(xt[t>>2]+xt[t<<4&63]+"==")):r===2&&(t=(e[a-2]<<8)+e[a-1],i.push(xt[t>>10]+xt[t>>4&63]+xt[t<<2&63]+"=")),i.join("")}var Aa={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Aa.read=function(e,t,a,r,i){var s,n,o=i*8-r-1,l=(1<<o)-1,f=l>>1,u=-7,p=a?i-1:0,m=a?-1:1,S=e[t+p];for(p+=m,s=S&(1<<-u)-1,S>>=-u,u+=o;u>0;s=s*256+e[t+p],p+=m,u-=8);for(n=s&(1<<-u)-1,s>>=-u,u+=r;u>0;n=n*256+e[t+p],p+=m,u-=8);if(s===0)s=1-f;else{if(s===l)return n?NaN:(S?-1:1)*(1/0);n=n+Math.pow(2,r),s=s-f}return(S?-1:1)*n*Math.pow(2,s-r)};Aa.write=function(e,t,a,r,i,s){var n,o,l,f=s*8-i-1,u=(1<<f)-1,p=u>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=r?0:s-1,C=r?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,n=u):(n=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-n))<1&&(n--,l*=2),n+p>=1?t+=m/l:t+=m*Math.pow(2,1-p),t*l>=2&&(n++,l/=2),n+p>=u?(o=0,n=u):n+p>=1?(o=(t*l-1)*Math.pow(2,i),n=n+p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),n=0));i>=8;e[a+S]=o&255,S+=C,o/=256,i-=8);for(n=n<<i|o,f+=i;f>0;e[a+S]=n&255,S+=C,n/=256,f-=8);e[a+S-C]|=A*128};/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/(function(e){const t=Gr,a=Aa,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=K,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:n,SharedArrayBuffer:o}=globalThis;u.TYPED_ARRAY_SUPPORT=l(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const v=new s(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,s.prototype),Object.setPrototypeOf(v,c),v.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function f(v){if(v>i)throw new RangeError('The value "'+v+'" is invalid for option "size"');const c=new s(v);return Object.setPrototypeOf(c,u.prototype),c}function u(v,c,h){if(typeof v=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(v)}return p(v,c,h)}u.poolSize=8192;function p(v,c,h){if(typeof v=="string")return A(v,c);if(n.isView(v))return w(v);if(v==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v);if(vt(v,n)||v&&vt(v.buffer,n)||typeof o<"u"&&(vt(v,o)||v&&vt(v.buffer,o)))return U(v,c,h);if(typeof v=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const E=v.valueOf&&v.valueOf();if(E!=null&&E!==v)return u.from(E,c,h);const B=D(v);if(B)return B;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof v[Symbol.toPrimitive]=="function")return u.from(v[Symbol.toPrimitive]("string"),c,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof v)}u.from=function(v,c,h){return p(v,c,h)},Object.setPrototypeOf(u.prototype,s.prototype),Object.setPrototypeOf(u,s);function m(v){if(typeof v!="number")throw new TypeError('"size" argument must be of type number');if(v<0)throw new RangeError('The value "'+v+'" is invalid for option "size"')}function S(v,c,h){return m(v),v<=0?f(v):c!==void 0?typeof h=="string"?f(v).fill(c,h):f(v).fill(c):f(v)}u.alloc=function(v,c,h){return S(v,c,h)};function C(v){return m(v),f(v<0?0:G(v)|0)}u.allocUnsafe=function(v){return C(v)},u.allocUnsafeSlow=function(v){return C(v)};function A(v,c){if((typeof c!="string"||c==="")&&(c="utf8"),!u.isEncoding(c))throw new TypeError("Unknown encoding: "+c);const h=F(v,c)|0;let E=f(h);const B=E.write(v,c);return B!==h&&(E=E.slice(0,B)),E}function b(v){const c=v.length<0?0:G(v.length)|0,h=f(c);for(let E=0;E<c;E+=1)h[E]=v[E]&255;return h}function w(v){if(vt(v,s)){const c=new s(v);return U(c.buffer,c.byteOffset,c.byteLength)}return b(v)}function U(v,c,h){if(c<0||v.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(v.byteLength<c+(h||0))throw new RangeError('"length" is outside of buffer bounds');let E;return c===void 0&&h===void 0?E=new s(v):h===void 0?E=new s(v,c):E=new s(v,c,h),Object.setPrototypeOf(E,u.prototype),E}function D(v){if(u.isBuffer(v)){const c=G(v.length)|0,h=f(c);return h.length===0||v.copy(h,0,0,c),h}if(v.length!==void 0)return typeof v.length!="number"||ta(v.length)?f(0):b(v);if(v.type==="Buffer"&&Array.isArray(v.data))return b(v.data)}function G(v){if(v>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return v|0}function K(v){return+v!=v&&(v=0),u.alloc(+v)}u.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==u.prototype},u.compare=function(c,h){if(vt(c,s)&&(c=u.from(c,c.offset,c.byteLength)),vt(h,s)&&(h=u.from(h,h.offset,h.byteLength)),!u.isBuffer(c)||!u.isBuffer(h))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===h)return 0;let E=c.length,B=h.length;for(let N=0,L=Math.min(E,B);N<L;++N)if(c[N]!==h[N]){E=c[N],B=h[N];break}return E<B?-1:B<E?1:0},u.isEncoding=function(c){switch(String(c).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(c,h){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return u.alloc(0);let E;if(h===void 0)for(h=0,E=0;E<c.length;++E)h+=c[E].length;const B=u.allocUnsafe(h);let N=0;for(E=0;E<c.length;++E){let L=c[E];if(vt(L,s))N+L.length>B.length?(u.isBuffer(L)||(L=u.from(L)),L.copy(B,N)):s.prototype.set.call(B,L,N);else if(u.isBuffer(L))L.copy(B,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=L.length}return B};function F(v,c){if(u.isBuffer(v))return v.length;if(n.isView(v)||vt(v,n))return v.byteLength;if(typeof v!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof v);const h=v.length,E=arguments.length>2&&arguments[2]===!0;if(!E&&h===0)return 0;let B=!1;for(;;)switch(c){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return ea(v).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h*2;case"hex":return h>>>1;case"base64":return za(v).length;default:if(B)return E?-1:ea(v).length;c=(""+c).toLowerCase(),B=!0}}u.byteLength=F;function $(v,c,h){let E=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((h===void 0||h>this.length)&&(h=this.length),h<=0)||(h>>>=0,c>>>=0,h<=c))return"";for(v||(v="utf8");;)switch(v){case"hex":return Le(this,c,h);case"utf8":case"utf-8":return z(this,c,h);case"ascii":return be(this,c,h);case"latin1":case"binary":return _e(this,c,h);case"base64":return Ae(this,c,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return He(this,c,h);default:if(E)throw new TypeError("Unknown encoding: "+v);v=(v+"").toLowerCase(),E=!0}}u.prototype._isBuffer=!0;function j(v,c,h){const E=v[c];v[c]=v[h],v[h]=E}u.prototype.swap16=function(){const c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let h=0;h<c;h+=2)j(this,h,h+1);return this},u.prototype.swap32=function(){const c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let h=0;h<c;h+=4)j(this,h,h+3),j(this,h+1,h+2);return this},u.prototype.swap64=function(){const c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let h=0;h<c;h+=8)j(this,h,h+7),j(this,h+1,h+6),j(this,h+2,h+5),j(this,h+3,h+4);return this},u.prototype.toString=function(){const c=this.length;return c===0?"":arguments.length===0?z(this,0,c):$.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(c){if(!u.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:u.compare(this,c)===0},u.prototype.inspect=function(){let c="";const h=e.INSPECT_MAX_BYTES;return c=this.toString("hex",0,h).replace(/(.{2})/g,"$1 ").trim(),this.length>h&&(c+=" ... "),"<Buffer "+c+">"},r&&(u.prototype[r]=u.prototype.inspect),u.prototype.compare=function(c,h,E,B,N){if(vt(c,s)&&(c=u.from(c,c.offset,c.byteLength)),!u.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(h===void 0&&(h=0),E===void 0&&(E=c?c.length:0),B===void 0&&(B=0),N===void 0&&(N=this.length),h<0||E>c.length||B<0||N>this.length)throw new RangeError("out of range index");if(B>=N&&h>=E)return 0;if(B>=N)return-1;if(h>=E)return 1;if(h>>>=0,E>>>=0,B>>>=0,N>>>=0,this===c)return 0;let L=N-B,te=E-h;const we=Math.min(L,te),Te=this.slice(B,N),Ne=c.slice(h,E);for(let ge=0;ge<we;++ge)if(Te[ge]!==Ne[ge]){L=Te[ge],te=Ne[ge];break}return L<te?-1:te<L?1:0};function le(v,c,h,E,B){if(v.length===0)return-1;if(typeof h=="string"?(E=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),h=+h,ta(h)&&(h=B?0:v.length-1),h<0&&(h=v.length+h),h>=v.length){if(B)return-1;h=v.length-1}else if(h<0)if(B)h=0;else return-1;if(typeof c=="string"&&(c=u.from(c,E)),u.isBuffer(c))return c.length===0?-1:he(v,c,h,E,B);if(typeof c=="number")return c=c&255,typeof s.prototype.indexOf=="function"?B?s.prototype.indexOf.call(v,c,h):s.prototype.lastIndexOf.call(v,c,h):he(v,[c],h,E,B);throw new TypeError("val must be string, number or Buffer")}function he(v,c,h,E,B){let N=1,L=v.length,te=c.length;if(E!==void 0&&(E=String(E).toLowerCase(),E==="ucs2"||E==="ucs-2"||E==="utf16le"||E==="utf-16le")){if(v.length<2||c.length<2)return-1;N=2,L/=2,te/=2,h/=2}function we(Ne,ge){return N===1?Ne[ge]:Ne.readUInt16BE(ge*N)}let Te;if(B){let Ne=-1;for(Te=h;Te<L;Te++)if(we(v,Te)===we(c,Ne===-1?0:Te-Ne)){if(Ne===-1&&(Ne=Te),Te-Ne+1===te)return Ne*N}else Ne!==-1&&(Te-=Te-Ne),Ne=-1}else for(h+te>L&&(h=L-te),Te=h;Te>=0;Te--){let Ne=!0;for(let ge=0;ge<te;ge++)if(we(v,Te+ge)!==we(c,ge)){Ne=!1;break}if(Ne)return Te}return-1}u.prototype.includes=function(c,h,E){return this.indexOf(c,h,E)!==-1},u.prototype.indexOf=function(c,h,E){return le(this,c,h,E,!0)},u.prototype.lastIndexOf=function(c,h,E){return le(this,c,h,E,!1)};function de(v,c,h,E){h=Number(h)||0;const B=v.length-h;E?(E=Number(E),E>B&&(E=B)):E=B;const N=c.length;E>N/2&&(E=N/2);let L;for(L=0;L<E;++L){const te=parseInt(c.substr(L*2,2),16);if(ta(te))return L;v[h+L]=te}return L}function Ee(v,c,h,E){return Br(ea(c,v.length-h),v,h,E)}function je(v,c,h,E){return Br(gn(c),v,h,E)}function rt(v,c,h,E){return Br(za(c),v,h,E)}function ye(v,c,h,E){return Br(vn(c,v.length-h),v,h,E)}u.prototype.write=function(c,h,E,B){if(h===void 0)B="utf8",E=this.length,h=0;else if(E===void 0&&typeof h=="string")B=h,E=this.length,h=0;else if(isFinite(h))h=h>>>0,isFinite(E)?(E=E>>>0,B===void 0&&(B="utf8")):(B=E,E=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const N=this.length-h;if((E===void 0||E>N)&&(E=N),c.length>0&&(E<0||h<0)||h>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");let L=!1;for(;;)switch(B){case"hex":return de(this,c,h,E);case"utf8":case"utf-8":return Ee(this,c,h,E);case"ascii":case"latin1":case"binary":return je(this,c,h,E);case"base64":return rt(this,c,h,E);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,c,h,E);default:if(L)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),L=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ae(v,c,h){return c===0&&h===v.length?t.fromByteArray(v):t.fromByteArray(v.slice(c,h))}function z(v,c,h){h=Math.min(v.length,h);const E=[];let B=c;for(;B<h;){const N=v[B];let L=null,te=N>239?4:N>223?3:N>191?2:1;if(B+te<=h){let we,Te,Ne,ge;switch(te){case 1:N<128&&(L=N);break;case 2:we=v[B+1],(we&192)===128&&(ge=(N&31)<<6|we&63,ge>127&&(L=ge));break;case 3:we=v[B+1],Te=v[B+2],(we&192)===128&&(Te&192)===128&&(ge=(N&15)<<12|(we&63)<<6|Te&63,ge>2047&&(ge<55296||ge>57343)&&(L=ge));break;case 4:we=v[B+1],Te=v[B+2],Ne=v[B+3],(we&192)===128&&(Te&192)===128&&(Ne&192)===128&&(ge=(N&15)<<18|(we&63)<<12|(Te&63)<<6|Ne&63,ge>65535&&ge<1114112&&(L=ge))}}L===null?(L=65533,te=1):L>65535&&(L-=65536,E.push(L>>>10&1023|55296),L=56320|L&1023),E.push(L),B+=te}return Rt(E)}const gt=4096;function Rt(v){const c=v.length;if(c<=gt)return String.fromCharCode.apply(String,v);let h="",E=0;for(;E<c;)h+=String.fromCharCode.apply(String,v.slice(E,E+=gt));return h}function be(v,c,h){let E="";h=Math.min(v.length,h);for(let B=c;B<h;++B)E+=String.fromCharCode(v[B]&127);return E}function _e(v,c,h){let E="";h=Math.min(v.length,h);for(let B=c;B<h;++B)E+=String.fromCharCode(v[B]);return E}function Le(v,c,h){const E=v.length;(!c||c<0)&&(c=0),(!h||h<0||h>E)&&(h=E);let B="";for(let N=c;N<h;++N)B+=mn[v[N]];return B}function He(v,c,h){const E=v.slice(c,h);let B="";for(let N=0;N<E.length-1;N+=2)B+=String.fromCharCode(E[N]+E[N+1]*256);return B}u.prototype.slice=function(c,h){const E=this.length;c=~~c,h=h===void 0?E:~~h,c<0?(c+=E,c<0&&(c=0)):c>E&&(c=E),h<0?(h+=E,h<0&&(h=0)):h>E&&(h=E),h<c&&(h=c);const B=this.subarray(c,h);return Object.setPrototypeOf(B,u.prototype),B};function se(v,c,h){if(v%1!==0||v<0)throw new RangeError("offset is not uint");if(v+c>h)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(c,h,E){c=c>>>0,h=h>>>0,E||se(c,h,this.length);let B=this[c],N=1,L=0;for(;++L<h&&(N*=256);)B+=this[c+L]*N;return B},u.prototype.readUintBE=u.prototype.readUIntBE=function(c,h,E){c=c>>>0,h=h>>>0,E||se(c,h,this.length);let B=this[c+--h],N=1;for(;h>0&&(N*=256);)B+=this[c+--h]*N;return B},u.prototype.readUint8=u.prototype.readUInt8=function(c,h){return c=c>>>0,h||se(c,1,this.length),this[c]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(c,h){return c=c>>>0,h||se(c,2,this.length),this[c]|this[c+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(c,h){return c=c>>>0,h||se(c,2,this.length),this[c]<<8|this[c+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(c,h){return c=c>>>0,h||se(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(c,h){return c=c>>>0,h||se(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},u.prototype.readBigUInt64LE=Lt(function(c){c=c>>>0,Zt(c,"offset");const h=this[c],E=this[c+7];(h===void 0||E===void 0)&&hr(c,this.length-8);const B=h+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,N=this[++c]+this[++c]*2**8+this[++c]*2**16+E*2**24;return BigInt(B)+(BigInt(N)<<BigInt(32))}),u.prototype.readBigUInt64BE=Lt(function(c){c=c>>>0,Zt(c,"offset");const h=this[c],E=this[c+7];(h===void 0||E===void 0)&&hr(c,this.length-8);const B=h*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],N=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+E;return(BigInt(B)<<BigInt(32))+BigInt(N)}),u.prototype.readIntLE=function(c,h,E){c=c>>>0,h=h>>>0,E||se(c,h,this.length);let B=this[c],N=1,L=0;for(;++L<h&&(N*=256);)B+=this[c+L]*N;return N*=128,B>=N&&(B-=Math.pow(2,8*h)),B},u.prototype.readIntBE=function(c,h,E){c=c>>>0,h=h>>>0,E||se(c,h,this.length);let B=h,N=1,L=this[c+--B];for(;B>0&&(N*=256);)L+=this[c+--B]*N;return N*=128,L>=N&&(L-=Math.pow(2,8*h)),L},u.prototype.readInt8=function(c,h){return c=c>>>0,h||se(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},u.prototype.readInt16LE=function(c,h){c=c>>>0,h||se(c,2,this.length);const E=this[c]|this[c+1]<<8;return E&32768?E|4294901760:E},u.prototype.readInt16BE=function(c,h){c=c>>>0,h||se(c,2,this.length);const E=this[c+1]|this[c]<<8;return E&32768?E|4294901760:E},u.prototype.readInt32LE=function(c,h){return c=c>>>0,h||se(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},u.prototype.readInt32BE=function(c,h){return c=c>>>0,h||se(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},u.prototype.readBigInt64LE=Lt(function(c){c=c>>>0,Zt(c,"offset");const h=this[c],E=this[c+7];(h===void 0||E===void 0)&&hr(c,this.length-8);const B=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(E<<24);return(BigInt(B)<<BigInt(32))+BigInt(h+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),u.prototype.readBigInt64BE=Lt(function(c){c=c>>>0,Zt(c,"offset");const h=this[c],E=this[c+7];(h===void 0||E===void 0)&&hr(c,this.length-8);const B=(h<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(B)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+E)}),u.prototype.readFloatLE=function(c,h){return c=c>>>0,h||se(c,4,this.length),a.read(this,c,!0,23,4)},u.prototype.readFloatBE=function(c,h){return c=c>>>0,h||se(c,4,this.length),a.read(this,c,!1,23,4)},u.prototype.readDoubleLE=function(c,h){return c=c>>>0,h||se(c,8,this.length),a.read(this,c,!0,52,8)},u.prototype.readDoubleBE=function(c,h){return c=c>>>0,h||se(c,8,this.length),a.read(this,c,!1,52,8)};function ce(v,c,h,E,B,N){if(!u.isBuffer(v))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>B||c<N)throw new RangeError('"value" argument is out of bounds');if(h+E>v.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(c,h,E,B){if(c=+c,h=h>>>0,E=E>>>0,!B){const te=Math.pow(2,8*E)-1;ce(this,c,h,E,te,0)}let N=1,L=0;for(this[h]=c&255;++L<E&&(N*=256);)this[h+L]=c/N&255;return h+E},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(c,h,E,B){if(c=+c,h=h>>>0,E=E>>>0,!B){const te=Math.pow(2,8*E)-1;ce(this,c,h,E,te,0)}let N=E-1,L=1;for(this[h+N]=c&255;--N>=0&&(L*=256);)this[h+N]=c/L&255;return h+E},u.prototype.writeUint8=u.prototype.writeUInt8=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,1,255,0),this[h]=c&255,h+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,2,65535,0),this[h]=c&255,this[h+1]=c>>>8,h+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,2,65535,0),this[h]=c>>>8,this[h+1]=c&255,h+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,4,4294967295,0),this[h+3]=c>>>24,this[h+2]=c>>>16,this[h+1]=c>>>8,this[h]=c&255,h+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,4,4294967295,0),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4};function ke(v,c,h,E,B){Me(c,E,B,v,h,7);let N=Number(c&BigInt(4294967295));v[h++]=N,N=N>>8,v[h++]=N,N=N>>8,v[h++]=N,N=N>>8,v[h++]=N;let L=Number(c>>BigInt(32)&BigInt(4294967295));return v[h++]=L,L=L>>8,v[h++]=L,L=L>>8,v[h++]=L,L=L>>8,v[h++]=L,h}function Pe(v,c,h,E,B){Me(c,E,B,v,h,7);let N=Number(c&BigInt(4294967295));v[h+7]=N,N=N>>8,v[h+6]=N,N=N>>8,v[h+5]=N,N=N>>8,v[h+4]=N;let L=Number(c>>BigInt(32)&BigInt(4294967295));return v[h+3]=L,L=L>>8,v[h+2]=L,L=L>>8,v[h+1]=L,L=L>>8,v[h]=L,h+8}u.prototype.writeBigUInt64LE=Lt(function(c,h=0){return ke(this,c,h,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Lt(function(c,h=0){return Pe(this,c,h,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(c,h,E,B){if(c=+c,h=h>>>0,!B){const we=Math.pow(2,8*E-1);ce(this,c,h,E,we-1,-we)}let N=0,L=1,te=0;for(this[h]=c&255;++N<E&&(L*=256);)c<0&&te===0&&this[h+N-1]!==0&&(te=1),this[h+N]=(c/L>>0)-te&255;return h+E},u.prototype.writeIntBE=function(c,h,E,B){if(c=+c,h=h>>>0,!B){const we=Math.pow(2,8*E-1);ce(this,c,h,E,we-1,-we)}let N=E-1,L=1,te=0;for(this[h+N]=c&255;--N>=0&&(L*=256);)c<0&&te===0&&this[h+N+1]!==0&&(te=1),this[h+N]=(c/L>>0)-te&255;return h+E},u.prototype.writeInt8=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,1,127,-128),c<0&&(c=255+c+1),this[h]=c&255,h+1},u.prototype.writeInt16LE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,2,32767,-32768),this[h]=c&255,this[h+1]=c>>>8,h+2},u.prototype.writeInt16BE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,2,32767,-32768),this[h]=c>>>8,this[h+1]=c&255,h+2},u.prototype.writeInt32LE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,4,2147483647,-2147483648),this[h]=c&255,this[h+1]=c>>>8,this[h+2]=c>>>16,this[h+3]=c>>>24,h+4},u.prototype.writeInt32BE=function(c,h,E){return c=+c,h=h>>>0,E||ce(this,c,h,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[h]=c>>>24,this[h+1]=c>>>16,this[h+2]=c>>>8,this[h+3]=c&255,h+4},u.prototype.writeBigInt64LE=Lt(function(c,h=0){return ke(this,c,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Lt(function(c,h=0){return Pe(this,c,h,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ve(v,c,h,E,B,N){if(h+E>v.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function Fe(v,c,h,E,B){return c=+c,h=h>>>0,B||Ve(v,c,h,4),a.write(v,c,h,E,23,4),h+4}u.prototype.writeFloatLE=function(c,h,E){return Fe(this,c,h,!0,E)},u.prototype.writeFloatBE=function(c,h,E){return Fe(this,c,h,!1,E)};function Oe(v,c,h,E,B){return c=+c,h=h>>>0,B||Ve(v,c,h,8),a.write(v,c,h,E,52,8),h+8}u.prototype.writeDoubleLE=function(c,h,E){return Oe(this,c,h,!0,E)},u.prototype.writeDoubleBE=function(c,h,E){return Oe(this,c,h,!1,E)},u.prototype.copy=function(c,h,E,B){if(!u.isBuffer(c))throw new TypeError("argument should be a Buffer");if(E||(E=0),!B&&B!==0&&(B=this.length),h>=c.length&&(h=c.length),h||(h=0),B>0&&B<E&&(B=E),B===E||c.length===0||this.length===0)return 0;if(h<0)throw new RangeError("targetStart out of bounds");if(E<0||E>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),c.length-h<B-E&&(B=c.length-h+E);const N=B-E;return this===c&&typeof s.prototype.copyWithin=="function"?this.copyWithin(h,E,B):s.prototype.set.call(c,this.subarray(E,B),h),N},u.prototype.fill=function(c,h,E,B){if(typeof c=="string"){if(typeof h=="string"?(B=h,h=0,E=this.length):typeof E=="string"&&(B=E,E=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!u.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(c.length===1){const L=c.charCodeAt(0);(B==="utf8"&&L<128||B==="latin1")&&(c=L)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(h<0||this.length<h||this.length<E)throw new RangeError("Out of range index");if(E<=h)return this;h=h>>>0,E=E===void 0?this.length:E>>>0,c||(c=0);let N;if(typeof c=="number")for(N=h;N<E;++N)this[N]=c;else{const L=u.isBuffer(c)?c:u.from(c,B),te=L.length;if(te===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(N=0;N<E-h;++N)this[N+h]=L[N%te]}return this};const Be={};function Ue(v,c,h){Be[v]=class extends h{constructor(){super(),Object.defineProperty(this,"message",{value:c.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${v}]`,this.stack,delete this.name}get code(){return v}set code(B){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:B,writable:!0})}toString(){return`${this.name} [${v}]: ${this.message}`}}}Ue("ERR_BUFFER_OUT_OF_BOUNDS",function(v){return v?`${v} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ue("ERR_INVALID_ARG_TYPE",function(v,c){return`The "${v}" argument must be of type number. Received type ${typeof c}`},TypeError),Ue("ERR_OUT_OF_RANGE",function(v,c,h){let E=`The value of "${v}" is out of range.`,B=h;return Number.isInteger(h)&&Math.abs(h)>2**32?B=Ke(String(h)):typeof h=="bigint"&&(B=String(h),(h>BigInt(2)**BigInt(32)||h<-(BigInt(2)**BigInt(32)))&&(B=Ke(B)),B+="n"),E+=` It must be ${c}. Received ${B}`,E},RangeError);function Ke(v){let c="",h=v.length;const E=v[0]==="-"?1:0;for(;h>=E+4;h-=3)c=`_${v.slice(h-3,h)}${c}`;return`${v.slice(0,h)}${c}`}function Ge(v,c,h){Zt(c,"offset"),(v[c]===void 0||v[c+h]===void 0)&&hr(c,v.length-(h+1))}function Me(v,c,h,E,B,N){if(v>h||v<c){const L=typeof c=="bigint"?"n":"";let te;throw c===0||c===BigInt(0)?te=`>= 0${L} and < 2${L} ** ${(N+1)*8}${L}`:te=`>= -(2${L} ** ${(N+1)*8-1}${L}) and < 2 ** ${(N+1)*8-1}${L}`,new Be.ERR_OUT_OF_RANGE("value",te,v)}Ge(E,B,N)}function Zt(v,c){if(typeof v!="number")throw new Be.ERR_INVALID_ARG_TYPE(c,"number",v)}function hr(v,c,h){throw Math.floor(v)!==v?(Zt(v,h),new Be.ERR_OUT_OF_RANGE("offset","an integer",v)):c<0?new Be.ERR_BUFFER_OUT_OF_BOUNDS:new Be.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${c}`,v)}const dn=/[^+/0-9A-Za-z-_]/g;function yn(v){if(v=v.split("=")[0],v=v.trim().replace(dn,""),v.length<2)return"";for(;v.length%4!==0;)v=v+"=";return v}function ea(v,c){c=c||1/0;let h;const E=v.length;let B=null;const N=[];for(let L=0;L<E;++L){if(h=v.charCodeAt(L),h>55295&&h<57344){if(!B){if(h>56319){(c-=3)>-1&&N.push(239,191,189);continue}else if(L+1===E){(c-=3)>-1&&N.push(239,191,189);continue}B=h;continue}if(h<56320){(c-=3)>-1&&N.push(239,191,189),B=h;continue}h=(B-55296<<10|h-56320)+65536}else B&&(c-=3)>-1&&N.push(239,191,189);if(B=null,h<128){if((c-=1)<0)break;N.push(h)}else if(h<2048){if((c-=2)<0)break;N.push(h>>6|192,h&63|128)}else if(h<65536){if((c-=3)<0)break;N.push(h>>12|224,h>>6&63|128,h&63|128)}else if(h<1114112){if((c-=4)<0)break;N.push(h>>18|240,h>>12&63|128,h>>6&63|128,h&63|128)}else throw new Error("Invalid code point")}return N}function gn(v){const c=[];for(let h=0;h<v.length;++h)c.push(v.charCodeAt(h)&255);return c}function vn(v,c){let h,E,B;const N=[];for(let L=0;L<v.length&&!((c-=2)<0);++L)h=v.charCodeAt(L),E=h>>8,B=h%256,N.push(B),N.push(E);return N}function za(v){return t.toByteArray(yn(v))}function Br(v,c,h,E){let B;for(B=0;B<E&&!(B+h>=c.length||B>=v.length);++B)c[B+h]=v[B];return B}function vt(v,c){return v instanceof c||v!=null&&v.constructor!=null&&v.constructor.name!=null&&v.constructor.name===c.name}function ta(v){return v!==v}const mn=function(){const v="0123456789abcdef",c=new Array(256);for(let h=0;h<16;++h){const E=h*16;for(let B=0;B<16;++B)c[E+B]=v[h]+v[B]}return c}();function Lt(v){return typeof BigInt>"u"?Cn:v}function Cn(){throw new Error("BigInt not supported")}})(Ei);const pt=Ei.Buffer;var ba={},Ln=ba,Ya={};ba.encode=function(e,t,a){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(a!==void 0&&typeof a!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=Un(e,t);else{var i=0,s=t.length,n=t.charAt(0),o=[0];for(i=0;i<e.length;++i){for(var l=0,f=e[i];l<o.length;++l)f+=o[l]<<8,o[l]=f%s,f=f/s|0;for(;f>0;)o.push(f%s),f=f/s|0}for(i=0;e[i]===0&&i<e.length-1;++i)r+=n;for(i=o.length-1;i>=0;--i)r+=t[o[i]]}if(a){var u=new RegExp(".{1,"+a+"}","g");r=r.match(u).join(`\r
`)}return r};ba.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var a=Ya[t];if(!a){a=Ya[t]=[];for(var r=0;r<t.length;++r)a[t.charCodeAt(r)]=r}e=e.replace(/\s/g,"");for(var i=t.length,s=t.charAt(0),n=[0],r=0;r<e.length;r++){var o=a[e.charCodeAt(r)];if(o===void 0)return;for(var l=0,f=o;l<n.length;++l)f+=n[l]*i,n[l]=f&255,f>>=8;for(;f>0;)n.push(f&255),f>>=8}for(var u=0;e[u]===s&&u<e.length-1;++u)n.push(0);return typeof pt<"u"?pt.from(n.reverse()):new Uint8Array(n.reverse())};function Un(e,t){var a=0,r=t.length,i=t.charAt(0),s=[0];for(a=0;a<e.length();++a){for(var n=0,o=e.at(a);n<s.length;++n)o+=s[n]<<8,s[n]=o%r,o=o/r|0;for(;o>0;)s.push(o%r),o=o/r|0}var l="";for(a=0;e.at(a)===0&&a<e.length()-1;++a)l+=i;for(a=s.length-1;a>=0;--a)l+=t[s[a]];return l}var Xa=ee,Wa=Ln,I=Xa.util=Xa.util||{};(function(){if(typeof kt.p<"u"&&kt.p.nextTick&&!kt.p.browser){I.nextTick=kt.p.nextTick,typeof setImmediate=="function"?I.setImmediate=setImmediate:I.setImmediate=I.nextTick;return}if(typeof setImmediate=="function"){I.setImmediate=function(){return setImmediate.apply(void 0,arguments)},I.nextTick=function(n){return setImmediate(n)};return}if(I.setImmediate=function(n){setTimeout(n,0)},typeof window<"u"&&typeof window.postMessage=="function"){let n=function(o){if(o.source===window&&o.data===e){o.stopPropagation();var l=t.slice();t.length=0,l.forEach(function(f){f()})}};var e="forge.setImmediate",t=[];I.setImmediate=function(o){t.push(o),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",n,!0)}if(typeof MutationObserver<"u"){var a=Date.now(),r=!0,i=document.createElement("div"),t=[];new MutationObserver(function(){var o=t.slice();t.length=0,o.forEach(function(l){l()})}).observe(i,{attributes:!0});var s=I.setImmediate;I.setImmediate=function(o){Date.now()-a>15?(a=Date.now(),s(o)):(t.push(o),t.length===1&&i.setAttribute("a",r=!r))}}I.nextTick=I.setImmediate})();I.isNodejs=typeof kt.p<"u"&&kt.p.versions&&kt.p.versions.node;I.globalScope=function(){return I.isNodejs?xn:typeof self>"u"?window:self}();I.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};I.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};I.isArrayBufferView=function(e){return e&&I.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function Sr(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}I.ByteBuffer=_a;function _a(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(I.isArrayBuffer(e)||I.isArrayBufferView(e))if(typeof pt<"u"&&e instanceof pt)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var a=0;a<t.length;++a)this.putByte(t[a])}}else(e instanceof _a||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}I.ByteStringBuffer=_a;var Dn=4096;I.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>Dn&&(this.data.substr(0,1),this._constructedStringLength=0)};I.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};I.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};I.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};I.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var a=this.data;t>0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return this.data=a,this._optimizeConstructedString(t),this};I.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};I.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(I.encodeUtf8(e))};I.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};I.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};I.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};I.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};I.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};I.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};I.ByteStringBuffer.prototype.putInt=function(e,t){Sr(t);var a="";do t-=8,a+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(a)};I.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)};I.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())};I.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};I.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e};I.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e};I.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e};I.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e};I.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e};I.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e};I.ByteStringBuffer.prototype.getInt=function(e){Sr(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t};I.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<<e-2;return t>=a&&(t-=a<<1),t};I.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};I.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};I.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};I.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};I.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};I.ByteStringBuffer.prototype.copy=function(){var e=I.createBuffer(this.data);return e.read=this.read,e};I.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};I.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};I.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};I.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var a=this.data.charCodeAt(t);a<16&&(e+="0"),e+=a.toString(16)}return e};I.ByteStringBuffer.prototype.toString=function(){return I.decodeUtf8(this.bytes())};function kn(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var a=I.isArrayBuffer(e),r=I.isArrayBufferView(e);if(a||r){a?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}I.DataBuffer=kn;I.DataBuffer.prototype.length=function(){return this.write-this.read};I.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};I.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var a=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(a),this.data=new DataView(r.buffer),this};I.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};I.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var a=0;a<t;++a)this.data.setUint8(e);return this};I.DataBuffer.prototype.putBytes=function(e,t){if(I.isArrayBufferView(e)){var a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=a.byteLength-a.byteOffset;this.accommodate(r);var i=new Uint8Array(this.data.buffer,this.write);return i.set(a),this.write+=r,this}if(I.isArrayBuffer(e)){var a=new Uint8Array(e);this.accommodate(a.byteLength);var i=new Uint8Array(this.data.buffer);return i.set(a,this.write),this.write+=a.byteLength,this}if(e instanceof I.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&I.isArrayBufferView(e.data)){var a=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(a.byteLength);var i=new Uint8Array(e.data.byteLength,this.write);return i.set(a),this.write+=a.byteLength,this}if(e instanceof I.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var s;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),s=new Uint8Array(this.data.buffer,this.write),this.write+=I.binary.hex.decode(e,s,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),s=new Uint8Array(this.data.buffer,this.write),this.write+=I.binary.base64.decode(e,s,this.write),this;if(t==="utf8"&&(e=I.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),s=new Uint8Array(this.data.buffer,this.write),this.write+=I.binary.raw.decode(s),this;if(t==="utf16")return this.accommodate(e.length*2),s=new Uint16Array(this.data.buffer,this.write),this.write+=I.text.utf16.encode(s),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)};I.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this};I.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")};I.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this};I.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};I.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};I.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};I.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};I.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};I.DataBuffer.prototype.putInt=function(e,t){Sr(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};I.DataBuffer.prototype.putSignedInt=function(e,t){return Sr(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)};I.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};I.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e};I.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e};I.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e};I.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e};I.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e};I.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e};I.DataBuffer.prototype.getInt=function(e){Sr(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t};I.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),a=2<<e-2;return t>=a&&(t-=a<<1),t};I.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};I.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};I.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};I.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};I.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};I.DataBuffer.prototype.copy=function(){return new I.DataBuffer(this)};I.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};I.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};I.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};I.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var a=this.data.getUint8(t);a<16&&(e+="0"),e+=a.toString(16)}return e};I.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return I.binary.raw.encode(t);if(e==="hex")return I.binary.hex.encode(t);if(e==="base64")return I.binary.base64.encode(t);if(e==="utf8")return I.text.utf8.decode(t);if(e==="utf16")return I.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)};I.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=I.encodeUtf8(e)),new I.ByteBuffer(e)};I.fillString=function(e,t){for(var a="";t>0;)t&1&&(a+=e),t>>>=1,t>0&&(e+=e);return a};I.xorBytes=function(e,t,a){for(var r="",i="",s="",n=0,o=0;a>0;--a,++n)i=e.charCodeAt(n)^t.charCodeAt(n),o>=10&&(r+=s,s="",o=0),s+=String.fromCharCode(i),++o;return r+=s,r};I.hexToBytes=function(e){var t="",a=0;for(e.length&!0&&(a=1,t+=String.fromCharCode(parseInt(e[0],16)));a<e.length;a+=2)t+=String.fromCharCode(parseInt(e.substr(a,2),16));return t};I.bytesToHex=function(e){return I.createBuffer(e).toHex()};I.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Vt=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Si="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";I.encode64=function(e,t){for(var a="",r="",i,s,n,o=0;o<e.length;)i=e.charCodeAt(o++),s=e.charCodeAt(o++),n=e.charCodeAt(o++),a+=Pt.charAt(i>>2),a+=Pt.charAt((i&3)<<4|s>>4),isNaN(s)?a+="==":(a+=Pt.charAt((s&15)<<2|n>>6),a+=isNaN(n)?"=":Pt.charAt(n&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r
`,a=a.substr(t));return r+=a,r};I.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",a,r,i,s,n=0;n<e.length;)a=Vt[e.charCodeAt(n++)-43],r=Vt[e.charCodeAt(n++)-43],i=Vt[e.charCodeAt(n++)-43],s=Vt[e.charCodeAt(n++)-43],t+=String.fromCharCode(a<<2|r>>4),i!==64&&(t+=String.fromCharCode((r&15)<<4|i>>2),s!==64&&(t+=String.fromCharCode((i&3)<<6|s)));return t};I.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};I.decodeUtf8=function(e){return decodeURIComponent(escape(e))};I.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:Wa.encode,decode:Wa.decode}};I.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};I.binary.raw.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var i=a,s=0;s<e.length;++s)r[i++]=e.charCodeAt(s);return t?i-a:r};I.binary.hex.encode=I.bytesToHex;I.binary.hex.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/2))),a=a||0;var i=0,s=a;for(e.length&1&&(i=1,r[s++]=parseInt(e[0],16));i<e.length;i+=2)r[s++]=parseInt(e.substr(i,2),16);return t?s-a:r};I.binary.base64.encode=function(e,t){for(var a="",r="",i,s,n,o=0;o<e.byteLength;)i=e[o++],s=e[o++],n=e[o++],a+=Pt.charAt(i>>2),a+=Pt.charAt((i&3)<<4|s>>4),isNaN(s)?a+="==":(a+=Pt.charAt((s&15)<<2|n>>6),a+=isNaN(n)?"=":Pt.charAt(n&63)),t&&a.length>t&&(r+=a.substr(0,t)+`\r
`,a=a.substr(t));return r+=a,r};I.binary.base64.decode=function(e,t,a){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),a=a||0;for(var i,s,n,o,l=0,f=a;l<e.length;)i=Vt[e.charCodeAt(l++)-43],s=Vt[e.charCodeAt(l++)-43],n=Vt[e.charCodeAt(l++)-43],o=Vt[e.charCodeAt(l++)-43],r[f++]=i<<2|s>>4,n!==64&&(r[f++]=(s&15)<<4|n>>2,o!==64&&(r[f++]=(n&3)<<6|o));return t?f-a:r.subarray(0,f)};I.binary.base58.encode=function(e,t){return I.binary.baseN.encode(e,Si,t)};I.binary.base58.decode=function(e,t){return I.binary.baseN.decode(e,Si,t)};I.text={utf8:{},utf16:{}};I.text.utf8.encode=function(e,t,a){e=I.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),a=a||0;for(var i=a,s=0;s<e.length;++s)r[i++]=e.charCodeAt(s);return t?i-a:r};I.text.utf8.decode=function(e){return I.decodeUtf8(String.fromCharCode.apply(null,e))};I.text.utf16.encode=function(e,t,a){var r=t;r||(r=new Uint8Array(e.length*2));var i=new Uint16Array(r.buffer);a=a||0;for(var s=a,n=a,o=0;o<e.length;++o)i[n++]=e.charCodeAt(o),s+=2;return t?s-a:r};I.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))};I.deflate=function(e,t,a){if(t=I.decode64(e.deflate(I.encode64(t)).rval),a){var r=2,i=t.charCodeAt(1);i&32&&(r=6),t=t.substring(r,t.length-4)}return t};I.inflate=function(e,t,a){var r=e.inflate(I.encode64(t)).rval;return r===null?null:I.decode64(r)};var wa=function(e,t,a){if(!e)throw new Error("WebStorage not available.");var r;if(a===null?r=e.removeItem(t):(a=I.encode64(JSON.stringify(a)),r=e.setItem(t,a)),typeof r<"u"&&r.rval!==!0){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}},Na=function(e,t){if(!e)throw new Error("WebStorage not available.");var a=e.getItem(t);if(e.init)if(a.rval===null){if(a.error){var r=new Error(a.error.message);throw r.id=a.error.id,r.name=a.error.name,r}a=null}else a=a.rval;return a!==null&&(a=JSON.parse(I.decode64(a))),a},Pn=function(e,t,a,r){var i=Na(e,t);i===null&&(i={}),i[a]=r,wa(e,t,i)},Vn=function(e,t,a){var r=Na(e,t);return r!==null&&(r=a in r?r[a]:null),r},Fn=function(e,t,a){var r=Na(e,t);if(r!==null&&a in r){delete r[a];var i=!0;for(var s in r){i=!1;break}i&&(r=null),wa(e,t,r)}},On=function(e,t){wa(e,t,null)},qr=function(e,t,a){var r=null;typeof a>"u"&&(a=["web","flash"]);var i,s=!1,n=null;for(var o in a){i=a[o];try{if(i==="flash"||i==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),s=i==="flash"}(i==="web"||i==="both")&&(t[0]=localStorage,r=e.apply(this,t),s=!0)}catch(l){n=l}if(s)break}if(!s)throw n;return r};I.setItem=function(e,t,a,r,i){qr(Pn,arguments,i)};I.getItem=function(e,t,a,r){return qr(Vn,arguments,r)};I.removeItem=function(e,t,a,r){qr(Fn,arguments,r)};I.clearItems=function(e,t,a){qr(On,arguments,a)};I.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};I.format=function(e){for(var t=/%./g,a,r,i=0,s=[],n=0;a=t.exec(e);){r=e.substring(n,t.lastIndex-2),r.length>0&&s.push(r),n=t.lastIndex;var o=a[0][1];switch(o){case"s"