diffusion
Version:
Diffusion JavaScript client
2 lines • 282 kB
JavaScript
/*! For license information please see diffusion-feature-client-control.js.LICENSE.txt */
(()=>{var t={7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),l=0,p=u>0?s-4:s;for(r=0;r<p;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(u(t,a,a+s>c?c:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(t,e,r)=>{"use strict";var n=r(7526),i=r(251);e.hp=a,e.IS=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|h(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return p(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(k(t,ArrayBuffer)||t&&k(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r)).__proto__=a.prototype,n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);var i=function(t){if(a.isBuffer(t)){var e=0|f(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||V(t.length)?s(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),s(t<0?0:0|f(t))}function p(t){for(var e=t.length<0?0:0|f(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}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 h(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||k(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(i)return n?-1:j(t).length;e=(""+e).toLowerCase(),i=!0}}function d(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 A(this,e,r);case"utf8":case"utf-8":return O(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(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),V(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=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:S(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):S(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function S(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var p=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){p=!1;break}if(p)return o}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(V(a))return s;t[r+s]=a}return s}function _(t,e,r,n){return F(j(e,t.length-r),t,r,n)}function w(t,e,r,n){return F(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function g(t,e,r,n){return w(t,e,r,n)}function m(t,e,r,n){return F(U(e),t,r,n)}function I(t,e,r,n){return F(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function O(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,p=c>239?4:c>223?3:c>191?2:1;if(i+p<=r)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=p}return function(t){var e=t.length;if(e<=b)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=b));return r}(n)}a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(k(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),k(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(t){switch(String(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}},a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(k(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=h,a.prototype._isBuffer=!0,a.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)y(this,e,e+1);return this},a.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)y(this,e,e+3),y(this,e+1,e+2);return this},a.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)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?O(this,0,t):d.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,n,i){if(k(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);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 o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),p=0;p<u;++p)if(c[p]!==l[p]){o=c[p],s=l[p];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},a.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 new 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 o=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return g(this,t,e,r);case"base64":return m(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var b=4096;function R(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 C(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 A(t,e,r){var n,i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var o="",s=e;s<r;++s)o+=(n=t[s])<16?"0"+n.toString(16):n.toString(16);return o}function N(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(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 D(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(t,e,r,n,o){return e=+e,r>>>=0,o||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,o){return e=+e,r>>>=0,o||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=a.prototype,n},a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return x(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return x(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");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("Index out of range");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=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}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 o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var B=/[^+/0-9A-Za-z-_]/g;function j(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(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}function k(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function V(t){return t!=t}},251:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,p=r?i-1:0,f=r?-1:1,h=t[e+p];for(p+=f,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+t[e+p],p+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=c}return(h?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,p=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(s++,u/=2),s+p>=l?(a=0,s=l):s+p>=1?(a=(e*u-1)*Math.pow(2,i),s+=p):(a=e*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;t[r+h]=255&a,h+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+h]=255&s,h+=d,s/=256,c-=8);t[r+h-d]|=128*y}},3065:function(t,e,r){var n,i;!function(o,s){"use strict";n=function(){var t=function(){},e="undefined",r=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(e,r){for(var i=0;i<n.length;i++){var o=n[i];this[o]=i<e?t:this.methodFactory(o,e,r)}this.log=this.debug}function a(t,r,n){return function(){typeof console!==e&&(s.call(this,r,n),this[t].apply(this,arguments))}}function u(n,s,u){return function(n){return"debug"===n&&(n="log"),typeof console!==e&&("trace"===n&&r?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):t)}(n)||a.apply(this,arguments)}function c(t,r,i){var o,a=this,c="loglevel";function l(){var t;if(typeof window!==e&&c){try{t=window.localStorage[c]}catch(t){}if(typeof t===e)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(t=/^([^;]+)/.exec(r.slice(n))[1])}catch(t){}return void 0===a.levels[t]&&(t=void 0),t}}"string"==typeof t?c+=":"+t:"symbol"==typeof t&&(c=void 0),a.name=t,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=i||u,a.getLevel=function(){return o},a.setLevel=function(r,i){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==i&&function(t){var r=(n[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(t){}}}(r),s.call(a,r,t),typeof console===e&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(t){l()||a.setLevel(t,!1)},a.enableAll=function(t){a.setLevel(a.levels.TRACE,t)},a.disableAll=function(t){a.setLevel(a.levels.SILENT,t)};var p=l();null==p&&(p=null==r?"WARN":r),a.setLevel(p,!1)}var l=new c,p={};l.getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=p[t];return e||(e=p[t]=new c(t,l.getLevel(),l.methodFactory)),e};var f=typeof window!==e?window.log:void 0;return l.noConflict=function(){return typeof window!==e&&window.log===l&&(window.log=f),l},l.getLoggers=function(){return p},l.default=l,l},void 0===(i=n.call(e,r,e,t))||(t.exports=i)}()},8570:t=>{t.exports=r;var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}function r(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function n(t){return!0===(t&&t.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function s(t,e){var r,n,s;return e?(s=0<=(t>>>=0)&&t<256)&&(n=o[t])?n:(r=u(t,(0|t)<0?-1:0,!0),s&&(o[t]=r),r):(s=-128<=(t|=0)&&t<128)&&(n=i[t])?n:(r=u(t,t<0?-1:0,!1),s&&(i[t]=r),r)}function a(t,e){if(isNaN(t))return e?S:v;if(e){if(t<0)return S;if(t>=h)return m}else{if(t<=-d)return I;if(t+1>=d)return g}return t<0?a(-t,e).neg():u(t%f|0,t/f|0,e)}function u(t,e,n){return new r(t,e,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=u;var c=Math.pow;function l(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return v;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return l(t.substring(1),e,r).neg();for(var i=a(c(r,8)),o=v,s=0;s<t.length;s+=8){var u=Math.min(8,t.length-s),p=parseInt(t.substring(s,s+u),r);if(u<8){var f=a(c(r,u));o=o.mul(f).add(a(p))}else o=(o=o.mul(i)).add(a(p))}return o.unsigned=e,o}function p(t,e){return"number"==typeof t?a(t,e):"string"==typeof t?l(t,e):u(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}r.fromString=l,r.fromValue=p;var f=4294967296,h=f*f,d=h/2,y=s(1<<24),v=s(0);r.ZERO=v;var S=s(0,!0);r.UZERO=S;var E=s(1);r.ONE=E;var _=s(1,!0);r.UONE=_;var w=s(-1);r.NEG_ONE=w;var g=u(-1,2147483647,!1);r.MAX_VALUE=g;var m=u(-1,-1,!0);r.MAX_UNSIGNED_VALUE=m;var I=u(0,-2147483648,!1);r.MIN_VALUE=I;var T=r.prototype;T.toInt=function(){return this.unsigned?this.low>>>0:this.low},T.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},T.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(I)){var e=a(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=a(c(t,6),this.unsigned),o=this,s="";;){var u=o.div(i),l=(o.sub(u.mul(i)).toInt()>>>0).toString(t);if((o=u).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},T.getHighBits=function(){return this.high},T.getHighBitsUnsigned=function(){return this.high>>>0},T.getLowBits=function(){return this.low},T.getLowBitsUnsigned=function(){return this.low>>>0},T.getNumBitsAbs=function(){if(this.isNegative())return this.eq(I)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},T.isZero=function(){return 0===this.high&&0===this.low},T.eqz=T.isZero,T.isNegative=function(){return!this.unsigned&&this.high<0},T.isPositive=function(){return this.unsigned||this.high>=0},T.isOdd=function(){return!(1&~this.low)},T.isEven=function(){return!(1&this.low)},T.equals=function(t){return n(t)||(t=p(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},T.eq=T.equals,T.notEquals=function(t){return!this.eq(t)},T.neq=T.notEquals,T.ne=T.notEquals,T.lessThan=function(t){return this.comp(t)<0},T.lt=T.lessThan,T.lessThanOrEqual=function(t){return this.comp(t)<=0},T.lte=T.lessThanOrEqual,T.le=T.lessThanOrEqual,T.greaterThan=function(t){return this.comp(t)>0},T.gt=T.greaterThan,T.greaterThanOrEqual=function(t){return this.comp(t)>=0},T.gte=T.greaterThanOrEqual,T.ge=T.greaterThanOrEqual,T.compare=function(t){if(n(t)||(t=p(t)),this.eq(t))return 0;var e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},T.comp=T.compare,T.negate=function(){return!this.unsigned&&this.eq(I)?I:this.not().add(E)},T.neg=T.negate,T.add=function(t){n(t)||(t=p(t));var e=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,c=t.low>>>16,l=0,f=0,h=0,d=0;return h+=(d+=o+(65535&t.low))>>>16,f+=(h+=i+c)>>>16,l+=(f+=r+a)>>>16,l+=e+s,u((h&=65535)<<16|(d&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},T.subtract=function(t){return n(t)||(t=p(t)),this.add(t.neg())},T.sub=T.subtract,T.multiply=function(t){if(this.isZero())return v;if(n(t)||(t=p(t)),e)return u(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return v;if(this.eq(I))return t.isOdd()?I:v;if(t.eq(I))return this.isOdd()?I:v;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(y)&&t.lt(y))return a(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,c=t.high>>>16,l=65535&t.high,f=t.low>>>16,h=65535&t.low,d=0,S=0,E=0,_=0;return E+=(_+=s*h)>>>16,S+=(E+=o*h)>>>16,E&=65535,S+=(E+=s*f)>>>16,d+=(S+=i*h)>>>16,S&=65535,d+=(S+=o*f)>>>16,S&=65535,d+=(S+=s*l)>>>16,d+=r*h+i*f+o*l+s*c,u((E&=65535)<<16|(_&=65535),(d&=65535)<<16|(S&=65535),this.unsigned)},T.mul=T.multiply,T.divide=function(t){if(n(t)||(t=p(t)),t.isZero())throw Error("division by zero");var r,i,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?u((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?S:v;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return S;if(t.gt(this.shru(1)))return _;o=S}else{if(this.eq(I))return t.eq(E)||t.eq(w)?I:t.eq(I)?E:(r=this.shr(1).div(t).shl(1)).eq(v)?t.isNegative()?E:w:(i=this.sub(t.mul(r)),o=r.add(i.div(t)));if(t.eq(I))return this.unsigned?S:v;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=v}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),l=s<=48?1:c(2,s-48),f=a(r),h=f.mul(t);h.isNegative()||h.gt(i);)h=(f=a(r-=l,this.unsigned)).mul(t);f.isZero()&&(f=E),o=o.add(f),i=i.sub(h)}return o},T.div=T.divide,T.modulo=function(t){return n(t)||(t=p(t)),e?u((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},T.mod=T.modulo,T.rem=T.modulo,T.not=function(){return u(~this.low,~this.high,this.unsigned)},T.and=function(t){return n(t)||(t=p(t)),u(this.low&t.low,this.high&t.high,this.unsigned)},T.or=function(t){return n(t)||(t=p(t)),u(this.low|t.low,this.high|t.high,this.unsigned)},T.xor=function(t){return n(t)||(t=p(t)),u(this.low^t.low,this.high^t.high,this.unsigned)},T.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?u(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):u(0,this.low<<t-32,this.unsigned)},T.shl=T.shiftLeft,T.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?u(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):u(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},T.shr=T.shiftRight,T.shiftRightUnsigned=function(t){if(n(t)&&(t=t.toInt()),0==(t&=63))return this;var e=this.high;return t<32?u(this.low>>>t|e<<32-t,e>>>t,this.unsigned):u(32===t?e:e>>>t-32,0,this.unsigned)},T.shru=T.shiftRightUnsigned,T.shr_u=T.shiftRightUnsigned,T.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},T.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},T.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},T.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},T.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},r.fromBytes=function(t,e,n){return n?r.fromBytesLE(t,e):r.fromBytesBE(t,e)},r.fromBytesLE=function(t,e){return new r(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},r.fromBytesBE=function(t,e){return new r(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}},3225:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,u=[],c=!1,l=-1;function p(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&f())}function f(){if(!c){var t=s(p);c=!0;for(var e=u.length;e;){for(a=u,u=[];++l<e;)a&&a[l].run();l=-1,e=u.length}a=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new h(t,e)),1!==u.length||c||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2503:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientCloseReason=e.CloseReasonEnum=void 0;var n,i=r(3895),o=r(2741);e.CloseReasonEnum={CLOSED_BY_CLIENT:new i.CloseReasonImpl(0,"The session was closed by the client",!1),CLOSED_BY_SERVER:new i.CloseReasonImpl(1,"The session was closed by the server",!1),RECONNECT_ABORTED:new i.CloseReasonImpl(2,"Client aborted a reconnect attempt",!1),CONNECTION_TIMEOUT:new i.CloseReasonImpl(3,"The connection attempt timed out",!1),HANDSHAKE_REJECTED:new i.CloseReasonImpl(4,"The connection handshake was rejected by the server",!1),HANDSHAKE_ERROR:new i.CloseReasonImpl(5,"There was an error parsing the handshake response",!1),TRANSPORT_ERROR:new i.CloseReasonImpl(6,"There was an unexpected error with the connection",!0),CONNECTION_ERROR:new i.CloseReasonImpl(7,"The client could not establish a connection to the server",!0),IDLE_CONNECTION:new i.CloseReasonImpl(8,"The activity monitor detected the connection was idle",!0),LOST_MESSAGES:new i.CloseReasonImpl(16,"Loss of messages has been detected",!1),PROTOCOL_VERSION_MISMATCH:new i.CloseReasonImpl(17,"Client version rejected : Client should be downgraded to use server compatible version or server upgraded to client version in use",!1),LICENSE_EXCEEDED:new i.CloseReasonImpl(18,"The license limit was exceeded",!1),ACCESS_DENIED:new i.CloseReasonImpl(99,"The connection attempt was rejected by the server because authentication failed",!1)},o.enumerize(e.CloseReasonEnum),(n=e.ClientCloseReason||(e.ClientCloseReason={}))[n.CONNECTION_LOST=0]="CONNECTION_LOST",n[n.IO_EXCEPTION=1]="IO_EXCEPTION",n[n.CLIENT_UNRESPONSIVE=2]="CLIENT_UNRESPONSIVE",n[n.MESSAGE_QUEUE_LIMIT_REACHED=3]="MESSAGE_QUEUE_LIMIT_REACHED",n[n.CLOSED_BY_CLIENT=4]="CLOSED_BY_CLIENT",n[n.MESSAGE_TOO_LARGE=5]="MESSAGE_TOO_LARGE",n[n.INTERNAL_ERROR=6]="INTERNAL_ERROR",n[n.INVALID_INBOUND_MESSAGE=7]="INVALID_INBOUND_MESSAGE",n[n.ABORTED=8]="ABORTED",n[n.LOST_MESSAGES=9]="LOST_MESSAGES",n[n.CLOSED_BY_CONTROLLER=11]="CLOSED_BY_CONTROLLER",n[n.FAILED_OVER=12]="FAILED_OVER",n[n.EXPIRED=13]="EXPIRED",n[n.REVOKED=14]="REVOKED",n[n.SESSION_TAKEN_OVER=15]="SESSION_TAKEN_OVER"},6857:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorReason=void 0;var n=r(8529),i=r(2741);e.ErrorReason={COMMUNICATION_FAILURE:new n.ErrorReason(100,"Communication with server failed"),SESSION_CLOSED:new n.ErrorReason(101,"Session is closed"),REQUEST_TIME_OUT:new n.ErrorReason(102,"Request time out"),ACCESS_DENIED:new n.ErrorReason(103,"Access denied"),UNSUPPORTED:new n.ErrorReason(104,"Unsupported service"),CALLBACK_EXCEPTION:new n.ErrorReason(105,"An application callback threw an exception. Check logs for more information"),INVALID_DATA:new n.ErrorReason(106,"Invalid data"),NO_SUCH_SESSION:new n.ErrorReason(107,"A requested session could not be found"),INCOMPATIBLE_DATATYPE:new n.ErrorReason(108,"Data type is incompatible"),UNHANDLED_MESSAGE:new n.ErrorReason(109,"A message was not handled"),CLUSTER_REPARTITION:new n.ErrorReason(110,"The cluster was repartitioning and the request could not be routed."),INCOMPATIBLE_STATE:new n.ErrorReason(111,"Topic operation not performed because it is managed by a component that prohibits external updates"),CLUSTER_ROUTING:new n.ErrorReason(112,"The cluster operation could not be routed."),TOPIC_TREE_REGISTRATION_CONFLICT:new n.ErrorReason(200,"A conflicting registration exists on the same branch of the topic tree"),HANDLER_CONFLICT:new n.ErrorReason(201,"Conflict with an existing handler"),INVALID_PATH:new n.ErrorReason(202,"Invalid path"),REJECTED_REQUEST:new n.ErrorReason(9003,"A request has been rejected by the recipient session")},i.enumerize(e.ErrorReason)},6191:function(t,e){"use strict";var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.InternalError=e.IllegalStateError=e.RetryLimitError=e.SchemaParseError=e.SchemaViolationError=e.InvalidScriptError=e.InvalidFilterError=e.OutOfBoundsError=e.IllegalArgumentError=e.SessionError=e.IOError=e.InvalidDataError=e.AssertionError=e.RuntimeError=e.NullValueError=void 0;var i=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="null_value_error",e}(Error);e.NullValueError=i;var o=function(t){function e(e,r){var n=t.call(this,e)||this;return n.cause=r,n}return n(e,t),e.prototype.getType=function(){return e.type},e.type="runtime_error",e}(Error);e.RuntimeError=o;var s=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="assertion_error",e}(Error);e.AssertionError=s;var a=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="invalid_data_error",e}(Error);e.InvalidDataError=a;var u=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="io_error",e}(Error);e.IOError=u;var c=function(t){function e(e,r){var n=t.call(this,e)||this;return n.cause=r,n}return n(e,t),e.prototype.getType=function(){return e.type},e.type="session_error",e}(Error);e.SessionError=c;var l=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="illegal_argument_error",e}(Error);e.IllegalArgumentError=l;var p=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="out_of_bounds_error",e}(Error);e.OutOfBoundsError=p;var f=function(t){function e(e,r){var n=t.call(this,e)||this;return n.errors=r,n}return n(e,t),e.prototype.getType=function(){return e.type},e.type="invalid_filter_error",e}(Error);e.InvalidFilterError=f;var h=function(t){function e(e,r){var n=t.call(this,e)||this;return n.errors=r,n}return n(e,t),e.prototype.getType=function(){return e.type},e.type="invalid_script_error",e}(Error);e.InvalidScriptError=h;var d=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="schema_violation_error",e}(Error);e.SchemaViolationError=d;var y=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="schema_parse_error",e}(Error);e.SchemaParseError=y;var v=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="retry_limit_error",e}(Error);e.RetryLimitError=v;var S=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="illegal_state_error",e}(Error);e.IllegalStateError=S;var E=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getType=function(){return e.type},e.type="internal_error",e}(Error);e.InternalError=E},3536:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientControlOptions=void 0;var n=r(2503),i=r(6767);e.ClientControlOptions={PropertyKeys:Object.freeze({ALL_FIXED_PROPERTIES:["*F"],ALL_USER_PROPERTIES:["*U"],ALL_PROPERTIES:["*F","*U"],SESSION_ID:"$SessionId",PRINCIPAL:"$Principal",CONNECTOR:"$Connector",TRANSPORT:"$Transport",CLIENT_TYPE:"$ClientType",COUNTRY:"$Country",LANGUAGE:"$Language",SERVER_NAME:"$ServerName",CLIENT_IP:"$ClientIP",LATITUDE:"$Latitude",LONGITUDE:"$Longitude",START_TIME:"$StartTime",EXPIRY_TIME:"$ExpiryTime",ROLES:"$Roles",MQTT_CLIENT_ID:"$MQTTClientId",GATEWAY_TYPE:"$GatewayType",GATEWAY_ID:"$GatewayId",ENVIRONMENT:"$Environment"}),ANONYMOUS:"",CloseReason:n.CloseReasonEnum,SessionEventStreamEventType:i.SessionEventStreamEventType,SessionState:i.SessionState}},6767:(t,e)=>{"use strict";var r,n,i;Object.defineProperty(e,"__esModule",{value:!0}),e.SessionState=e.SessionEventStreamEventType=e.SessionEventType=void 0,(i=e.SessionEventType||(e.SessionEventType={}))[i.UPDATED=0]="UPDATED",i[i.RECONNECTED=1]="RECONNECTED",i[i.FAILED_OVER=2]="FAILED_OVER",i[i.DISCONNECTED=3]="DISCONNECTED",(n=e.SessionEventStreamEventType||(e.SessionEventStreamEventType={}))[n.STATE=0]="STATE",n[n.PROPERTIES=1]="PROPERTIES",(r=e.SessionState||(e.SessionState={}))[r.ACTIVE=0]="ACTIVE",r[r.DISCONNECTED=1]="DISCONNECTED",r[r.RECONNECTED=2]="RECONNECTED",r[r.FAILED_OVER=3]="FAILED_OVER",r[r.CLOSED=4]="CLOSED"},8381:(t,e)=>{"use strict";var r,n,i;Object.defineProperty(e,"__esModule",{value:!0}),e.isStructEnd=e.isStructStart=e.tokens=e.BYTE_BREAK=e.additional=e.types=void 0,(i=e.types||(e.types={}))[i.UINT=0]="UINT",i[i.INT=1]="INT",i[i.BYTES=2]="BYTES",i[i.STRING=3]="STRING",i[i.ARRAY=4]="ARRAY",i[i.MAP=5]="MAP",i[i.SEMANTIC=6]="SEMANTIC",i[i.SIMPLE=7]="SIMPLE",i[i.FLOAT=7]="FLOAT",(n=e.additional||(e.additional={}))[n.FALSE=20]="FALSE",n[n.TRUE=21]="TRUE",n[n.NULL=22]="NULL",n[n.UNDEFINED=23]="UNDEFINED",n[n.SIMPLE=24]="SIMPLE",n[n.HALF_PRECISION=25]="HALF_PRECISION",n[n.SINGLE_PRECISION=26]="SINGLE_PRECISION",n[n.DOUBLE_PRECISION=27]="DOUBLE_PRECISION",n[n.BREAK=31]="BREAK",e.BYTE_BREAK=255,function(t){t[t.ARRAY_START=0]="ARRAY_START",t[t.ARRAY_END=1]="ARRAY_END",t[t.MAP_START=2]="MAP_START",t[t.MAP_END=3]="MAP_END",t[t.STRING_START=4]="STRING_START",t[t.STRING_END=5]="STRING_END",t[t.VALUE=6]="VALUE"}(r=e.tokens||(e.tokens={})),e.isStructStart=function(t){switch(t){case r.ARRAY_START:case r.MAP_START:case r.STRING_START:return!0;default:return!1}},e.isStructEnd=function(t){switch(t){case r.ARRAY_END:case r.MAP_END:case r.STRING_END:return!0;default:return!1}}},5714:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=e.TokenContextType=void 0;var n,i=r(6191);!function(t){t[t.root=0]="root",t[t.string=1]="string",t[t.array=2]="array",t[t.object=3]="object"}(n=e.TokenContextType||(e.TokenContextType={}));var o=function(){function t(){this.ROOT={length:-1,type:n.root,read:0},this.stack=[],this.tail=this.ROOT}return t.prototype.type=function(){return this.tail.type},t.prototype.read=function(){return this.tail.read},t.prototype.expected=function(){return this.tail.length},t.prototype.push=function(t,e){void 0===e&&(e=-1),this.tail={length:e,type:t,read:0},this.stack.push(this.tail)},t.prototype.pop=function(){var t=this.stack.pop();return this.stack.length?this.tail=this.stack[this.stack.length-1]:this.tail=this.ROOT,t},t.prototype.next=function(){if(!this.hasRemaining())throw new i.InvalidDataError("Exceeded expected collection limit");this.tail.read++},t.prototype.break=function(){this.acceptsBreakMarker()&&(this.tail.length=0,this.tail.read=0)},t.prototype.hasRemaining=function(){return-1===this.tail.length||this.tail.length>this.tail.read},t.prototype.acceptsBreakMarker=function(){return this.tail!==this.ROOT&&-1===this.tail.length},t}();e.Context=o},4105:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAny=e.isString=e.isInt64=e.isDouble=e.Decoder=void 0;var n=r(7224),i=r(6191),o=r(8381),s=r(1531);function a(t,e){switch(t.type){case o.tokens.VALUE:return t.value;case o.tokens.MAP_START:for(var r={};;){var s=e.nextToken();if(null===s)throw new i.InvalidDataError("Unexpected EOF (reading: map key)");if(s.type===o.tokens.MAP_END)break;var u=e.nextToken();if(null===u||u.type===o.tokens.MAP_END)throw new i.InvalidDataError("Unexpected EOF (reading: map value)");var c=a(s,e);if(null==c)throw new i.InvalidDataError("Cannot have undefined key (reading: map key)");r[c.toString()]=a(u,e)}return r;case o.tokens.ARRAY_START:for(var l=[];;){var p=e.nextToken();if(null===p)throw new i.InvalidDataError("Unexpected EOF (reading: array value)");if(p.type===o.tokens.ARRAY_END)break;l.push(a(p,e))}return l;case o.tokens.STRING_START:for(var f=[];;){var h=e.nextToken();if(null===h)throw new i.InvalidDataError("Unexpected EOF (reading: indefinite-length string");if(h.type===o.tokens.STRING_END)break;if(h.header.type!==t.header.type)throw new i.InvalidDataError("Unexpected chunk type ("+h.header.type+") within string");f.push(h.value)}switch(t.header.type){case o.types.BYTES:return n.concatUint8Arrays(f);case o.types.STRING:return f.join("");default:throw new i.InvalidDataError("Unexpected chunk type ("+t.header.type+") (reading: string)")}default:throw new i.InvalidDataError("Unexpected token: "+JSON.stringify(t))}}var u=function(){function t(t,e,r){this.tokeniser=n.isUint8Array(t)?new s.Tokeniser(t,e,r):t}return t.prototype.hasRemaining=function(){return this.tokeniser.hasRemaining()},t.prototype.nextValue=function(){return this.nextValueExpecting(c)},t.prototype.nextValueExpecting=function(t){if(!this.tokeniser.hasRemaining())throw new i.InvalidDataError("Token stream exhausted");var e=this.tokeniser.nextToken();if(t(e.header.type))return a(e,this.tokeniser);throw new i.InvalidDataError("Unexpected CBOR type")},t}();function c(){return!0}e.Decoder=u,e.isDouble=function(t){return t===o.types.FLOAT},e.isInt64=function(t){return t===o.types.UINT||t===o.types.INT},e.isString=function(t){return t===o.types.STRING},e.isAny=c},8781:function(t,e,r){"use strict";var n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Encoder=void 0;var i=r(5659),o=r(6826),s=r(7224),a=r(8381),u=4294967296,c=function(){function t(){this.bos=new o.BufferOutputStream}return t.prototype.writeByte=function(t){this.bos.write(t)},t.prototype.writeBuffer=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length),this.bos.writeMany(t,e,r)},t.prototype.writeUint16=function(t){this.writeByte(t>>8&255),this.writeBy