UNPKG

@hiero-ledger/sdk

Version:
20 lines 1.72 MB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sdk={})}(this,function(exports){"use strict";function _mergeNamespaces(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)} /** * @license * Copyright 2009 The Closure Library Authors * Copyright 2020 Daniel Wirtz / The long.js Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * SPDX-License-Identifier: Apache-2.0 */var wasm=null;try{wasm=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{}function Long(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function isLong$1(e){return!0===(e&&e.__isLong__)}function ctz32(e){var t=Math.clz32(e&-e);return e?31-t:t}Long.prototype.__isLong__,Object.defineProperty(Long.prototype,"__isLong__",{value:!0}),Long.isLong=isLong$1;var INT_CACHE={},UINT_CACHE={};function fromInt(e,t){var n,r,o;return t?(o=0<=(e>>>=0)&&e<256)&&(r=UINT_CACHE[e])?r:(n=fromBits(e,0,!0),o&&(UINT_CACHE[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(r=INT_CACHE[e])?r:(n=fromBits(e,e<0?-1:0,!1),o&&(INT_CACHE[e]=n),n)}function fromNumber(e,t){if(isNaN(e))return t?UZERO:ZERO;if(t){if(e<0)return UZERO;if(e>=TWO_PWR_64_DBL)return MAX_UNSIGNED_VALUE}else{if(e<=-0x8000000000000000)return MIN_VALUE;if(e+1>=TWO_PWR_63_DBL)return MAX_VALUE}return e<0?fromNumber(-e,t).neg():fromBits(e%TWO_PWR_32_DBL|0,e/TWO_PWR_32_DBL|0,t)}function fromBits(e,t,n){return new Long(e,t,n)}Long.fromInt=fromInt,Long.fromNumber=fromNumber,Long.fromBits=fromBits;var pow_dbl=Math.pow;function fromString$1(e,t,n){if(0===e.length)throw Error("empty string");if("number"==typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?UZERO:ZERO;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return fromString$1(e.substring(1),t,n).neg();for(var o=fromNumber(pow_dbl(n,8)),i=ZERO,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+s),n);if(s<8){var u=fromNumber(pow_dbl(n,s));i=i.mul(u).add(fromNumber(c))}else i=(i=i.mul(o)).add(fromNumber(c))}return i.unsigned=t,i}function fromValue(e,t){return"number"==typeof e?fromNumber(e,t):"string"==typeof e?fromString$1(e,t):fromBits(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}Long.fromString=fromString$1,Long.fromValue=fromValue;var TWO_PWR_16_DBL=65536,TWO_PWR_24_DBL=1<<24,TWO_PWR_32_DBL=TWO_PWR_16_DBL*TWO_PWR_16_DBL,TWO_PWR_64_DBL=TWO_PWR_32_DBL*TWO_PWR_32_DBL,TWO_PWR_63_DBL=TWO_PWR_64_DBL/2,TWO_PWR_24=fromInt(TWO_PWR_24_DBL),ZERO=fromInt(0);Long.ZERO=ZERO;var UZERO=fromInt(0,!0);Long.UZERO=UZERO;var ONE=fromInt(1);Long.ONE=ONE;var UONE=fromInt(1,!0);Long.UONE=UONE;var NEG_ONE=fromInt(-1);Long.NEG_ONE=NEG_ONE;var MAX_VALUE=fromBits(-1,2147483647,!1);Long.MAX_VALUE=MAX_VALUE;var MAX_UNSIGNED_VALUE=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=MAX_UNSIGNED_VALUE;var MIN_VALUE=fromBits(0,-2147483648,!1);Long.MIN_VALUE=MIN_VALUE;var LongPrototype=Long.prototype;LongPrototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},LongPrototype.toNumber=function(){return this.unsigned?(this.high>>>0)*TWO_PWR_32_DBL+(this.low>>>0):this.high*TWO_PWR_32_DBL+(this.low>>>0)},LongPrototype.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(MIN_VALUE)){var t=fromNumber(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=fromNumber(pow_dbl(e,6),this.unsigned),i=this,a="";;){var s=i.div(o),c=(i.sub(s.mul(o)).toInt()>>>0).toString(e);if((i=s).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},LongPrototype.getHighBits=function(){return this.high},LongPrototype.getHighBitsUnsigned=function(){return this.high>>>0},LongPrototype.getLowBits=function(){return this.low},LongPrototype.getLowBitsUnsigned=function(){return this.low>>>0},LongPrototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(MIN_VALUE)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},LongPrototype.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&(-1===e&&!(0===this.low&&-2097152===this.high))},LongPrototype.isZero=function(){return 0===this.high&&0===this.low},LongPrototype.eqz=LongPrototype.isZero,LongPrototype.isNegative=function(){return!this.unsigned&&this.high<0},LongPrototype.isPositive=function(){return this.unsigned||this.high>=0},LongPrototype.isOdd=function(){return!(1&~this.low)},LongPrototype.isEven=function(){return!(1&this.low)},LongPrototype.equals=function(e){return isLong$1(e)||(e=fromValue(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},LongPrototype.eq=LongPrototype.equals,LongPrototype.notEquals=function(e){return!this.eq(e)},LongPrototype.neq=LongPrototype.notEquals,LongPrototype.ne=LongPrototype.notEquals,LongPrototype.lessThan=function(e){return this.comp(e)<0},LongPrototype.lt=LongPrototype.lessThan,LongPrototype.lessThanOrEqual=function(e){return this.comp(e)<=0},LongPrototype.lte=LongPrototype.lessThanOrEqual,LongPrototype.le=LongPrototype.lessThanOrEqual,LongPrototype.greaterThan=function(e){return this.comp(e)>0},LongPrototype.gt=LongPrototype.greaterThan,LongPrototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},LongPrototype.gte=LongPrototype.greaterThanOrEqual,LongPrototype.ge=LongPrototype.greaterThanOrEqual,LongPrototype.compare=function(e){if(isLong$1(e)||(e=fromValue(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},LongPrototype.comp=LongPrototype.compare,LongPrototype.negate=function(){return!this.unsigned&&this.eq(MIN_VALUE)?MIN_VALUE:this.not().add(ONE)},LongPrototype.neg=LongPrototype.negate,LongPrototype.add=function(e){isLong$1(e)||(e=fromValue(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,s=e.low>>>16,c=0,u=0,l=0,d=0;return l+=(d+=o+(65535&e.low))>>>16,u+=(l+=r+s)>>>16,c+=(u+=n+a)>>>16,c+=t+i,fromBits((l&=65535)<<16|(d&=65535),(c&=65535)<<16|(u&=65535),this.unsigned)},LongPrototype.subtract=function(e){return isLong$1(e)||(e=fromValue(e)),this.add(e.neg())},LongPrototype.sub=LongPrototype.subtract,LongPrototype.multiply=function(e){if(this.isZero())return this;if(isLong$1(e)||(e=fromValue(e)),wasm)return fromBits(wasm.mul(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned);if(e.isZero())return this.unsigned?UZERO:ZERO;if(this.eq(MIN_VALUE))return e.isOdd()?MIN_VALUE:ZERO;if(e.eq(MIN_VALUE))return this.isOdd()?MIN_VALUE:ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(TWO_PWR_24)&&e.lt(TWO_PWR_24))return fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,s=e.low>>>16,c=65535&e.low,u=0,l=0,d=0,p=0;return d+=(p+=o*c)>>>16,l+=(d+=r*c)>>>16,d&=65535,l+=(d+=o*s)>>>16,u+=(l+=n*c)>>>16,l&=65535,u+=(l+=r*s)>>>16,l&=65535,u+=(l+=o*a)>>>16,u+=t*c+n*s+r*a+o*i,fromBits((d&=65535)<<16|(p&=65535),(u&=65535)<<16|(l&=65535),this.unsigned)},LongPrototype.mul=LongPrototype.multiply,LongPrototype.divide=function(e){if(isLong$1(e)||(e=fromValue(e)),e.isZero())throw Error("division by zero");var t,n,r;if(wasm)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?fromBits((this.unsigned?wasm.div_u:wasm.div_s)(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?UZERO:ZERO;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return UZERO;if(e.gt(this.shru(1)))return UONE;r=UZERO}else{if(this.eq(MIN_VALUE))return e.eq(ONE)||e.eq(NEG_ONE)?MIN_VALUE:e.eq(MIN_VALUE)?ONE:(t=this.shr(1).div(e).shl(1)).eq(ZERO)?e.isNegative()?ONE:NEG_ONE:(n=this.sub(e.mul(t)),r=t.add(n.div(e)));if(e.eq(MIN_VALUE))return this.unsigned?UZERO:ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=ZERO}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),i=o<=48?1:pow_dbl(2,o-48),a=fromNumber(t),s=a.mul(e);s.isNegative()||s.gt(n);)s=(a=fromNumber(t-=i,this.unsigned)).mul(e);a.isZero()&&(a=ONE),r=r.add(a),n=n.sub(s)}return r},LongPrototype.div=LongPrototype.divide,LongPrototype.modulo=function(e){return isLong$1(e)||(e=fromValue(e)),wasm?fromBits((this.unsigned?wasm.rem_u:wasm.rem_s)(this.low,this.high,e.low,e.high),wasm.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},LongPrototype.mod=LongPrototype.modulo,LongPrototype.rem=LongPrototype.modulo,LongPrototype.not=function(){return fromBits(~this.low,~this.high,this.unsigned)},LongPrototype.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},LongPrototype.clz=LongPrototype.countLeadingZeros,LongPrototype.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32},LongPrototype.ctz=LongPrototype.countTrailingZeros,LongPrototype.and=function(e){return isLong$1(e)||(e=fromValue(e)),fromBits(this.low&e.low,this.high&e.high,this.unsigned)},LongPrototype.or=function(e){return isLong$1(e)||(e=fromValue(e)),fromBits(this.low|e.low,this.high|e.high,this.unsigned)},LongPrototype.xor=function(e){return isLong$1(e)||(e=fromValue(e)),fromBits(this.low^e.low,this.high^e.high,this.unsigned)},LongPrototype.shiftLeft=function(e){return isLong$1(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):fromBits(0,this.low<<e-32,this.unsigned)},LongPrototype.shl=LongPrototype.shiftLeft,LongPrototype.shiftRight=function(e){return isLong$1(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},LongPrototype.shr=LongPrototype.shiftRight,LongPrototype.shiftRightUnsigned=function(e){return isLong$1(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?fromBits(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):fromBits(32===e?this.high:this.high>>>e-32,0,this.unsigned)},LongPrototype.shru=LongPrototype.shiftRightUnsigned,LongPrototype.shr_u=LongPrototype.shiftRightUnsigned,LongPrototype.rotateLeft=function(e){var t;return isLong$1(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?fromBits(this.high,this.low,this.unsigned):e<32?(t=32-e,fromBits(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),fromBits(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},LongPrototype.rotl=LongPrototype.rotateLeft,LongPrototype.rotateRight=function(e){var t;return isLong$1(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?fromBits(this.high,this.low,this.unsigned):e<32?(t=32-e,fromBits(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),fromBits(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},LongPrototype.rotr=LongPrototype.rotateRight,LongPrototype.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this},LongPrototype.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)},LongPrototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},LongPrototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},LongPrototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},Long.fromBytes=function(e,t,n){return n?Long.fromBytesLE(e,t):Long.fromBytesBE(e,t)},Long.fromBytesLE=function(e,t){return new Long(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},Long.fromBytesBE=function(e,t){return new Long(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},"function"==typeof BigInt&&(Long.fromBigInt=function(e,t){return fromBits(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},Long.fromValue=function(e,t){return"bigint"==typeof e?fromBigInt(e,t):fromValue(e,t)},LongPrototype.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e});const byteToHex$1=[];for(let e=0;e<=255;e+=1)byteToHex$1.push(e.toString(16).padStart(2,"0"));function encode$5(e){let t="";for(const n of e)t+=byteToHex$1[n];return t}function decode$8(e){const t=(e.startsWith("0x")?e.substring(2):e).match(/.{1,2}/gu);return new Uint8Array((null==t?[]:t).map(e=>parseInt(e,16)))}function isHexString$1(e){if("string"!=typeof e)return!1;const t=e.startsWith("0x")?e.substring(2):e;if(0===t.length)return!1;if(t.length%2!=0)return!1;return/^[0-9a-fA-F]+$/.test(t)}class BadEntityIdError extends Error{constructor(e,t,n,r,o){super(`Entity ID ${e.toString()}.${t.toString()}.${n.toString()}-${r} was incorrect.`),this.name="BadEntityIdException",this.shard=e,this.realm=t,this.num=n,this.presentChecksum=r,this.expectedChecksum=o}}var isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",BASE=1e14,LOG_BASE=14,MAX_SAFE_INTEGER$1=9007199254740991,POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],SQRT_BASE=1e7,MAX=1e9;function clone(e){var t,n,r,o,i,a,s,c,u,l,d=A.prototype={constructor:A,toString:null,valueOf:null},p=new A(1),h=20,f=4,y=-7,m=21,g=-1e7,_=1e7,b=!1,I=1,T=0,k={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},S="0123456789abcdefghijklmnopqrstuvwxyz",w=!0;function A(e,t){var o,i,a,s,c,u,l,d,p=this;if(!(p instanceof A))return new A(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>_?p.c=p.e=null:e.e<g?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,c=e;c>=10;c/=10,s++);return void(s>_?p.c=p.e=null:(p.e=s,p.c=[e]))}d=String(e)}else{if(!isNumeric.test(d=String(e)))return r(p,d,u);p.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(s=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(s<0&&(s=c),s+=+d.slice(c+1),d=d.substring(0,c)):s<0&&(s=d.length)}else{if(intCheck(t,2,S.length,"Base"),10==t&&w)return N(p=new A(e),h+p.e+1,f);if(d=String(e),u="number"==typeof e){if(0*e!=0)return r(p,d,u,t);if(p.s=1/e<0?(d=d.slice(1),-1):1,A.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+e)}else p.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(o=S.slice(0,t),s=c=0,l=d.length;c<l;c++)if(o.indexOf(i=d.charAt(c))<0){if("."==i){if(c>s){s=l;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,s=0;continue}return r(p,String(e),u,t)}u=!1,(s=(d=n(d,t,10,p.s)).indexOf("."))>-1?d=d.replace(".",""):s=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&A.DEBUG&&l>15&&(e>MAX_SAFE_INTEGER$1||e!==mathfloor(e)))throw Error(tooManyDigits+p.s*e);if((s=s-c-1)>_)p.c=p.e=null;else if(s<g)p.c=[p.e=0];else{if(p.e=s,p.c=[],c=(s+1)%LOG_BASE,s<0&&(c+=LOG_BASE),c<l){for(c&&p.c.push(+d.slice(0,c)),l-=LOG_BASE;c<l;)p.c.push(+d.slice(c,c+=LOG_BASE));c=LOG_BASE-(d=d.slice(c)).length}else c-=l;for(;c--;d+="0");p.c.push(+d)}}else p.c=[p.e=0]}function v(e,t,n,r){var o,i,a,s,c;if(null==n?n=f:intCheck(n,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=coeffToString(e.c),c=1==r||2==r&&(a<=y||a>=m)?toExponential(c,a):toFixedPoint(c,a,"0");else if(i=(e=N(new A(e),t,n)).e,s=(c=coeffToString(e.c)).length,1==r||2==r&&(t<=i||i<=y)){for(;s<t;c+="0",s++);c=toExponential(c,i)}else if(t-=a,c=toFixedPoint(c,i,"0"),i+1>s){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-s)>0)for(i+1==s&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function E(e,t){for(var n,r=1,o=new A(e[0]);r<e.length;r++){if(!(n=new A(e[r])).s){o=n;break}t.call(o,n)&&(o=n)}return o}function O(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+n*LOG_BASE-1)>_?e.c=e.e=null:n<g?e.c=[e.e=0]:(e.e=n,e.c=t),e}function N(e,t,n,r){var o,i,a,s,c,u,l,d=e.c,p=POWS_TEN;if(d){e:{for(o=1,s=d[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=LOG_BASE,a=t,l=(c=d[u=0])/p[o-a-1]%10|0;else if((u=mathceil((i+1)/LOG_BASE))>=d.length){if(!r)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,a=(i%=LOG_BASE)-LOG_BASE+1}else{for(c=s=d[u],o=1;s>=10;s/=10,o++);l=(a=(i%=LOG_BASE)-LOG_BASE+o)<0?0:c/p[o-a-1]%10|0}if(r=r||t<0||null!=d[u+1]||(a<0?c:c%p[o-a-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?a>0?c/p[o-a]:0:d[u-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,r?(t-=e.e+1,d[0]=p[(LOG_BASE-t%LOG_BASE)%LOG_BASE],e.e=-t||0):d[0]=e.e=0,e;if(0==i?(d.length=u,s=1,u--):(d.length=u+1,s=p[LOG_BASE-i],d[u]=a>0?mathfloor(c/p[o-a]%p[a])*s:0),r)for(;;){if(0==u){for(i=1,a=d[0];a>=10;a/=10,i++);for(a=d[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,d[0]==BASE&&(d[0]=1));break}if(d[u]+=s,d[u]!=BASE)break;d[u--]=0,s=1}for(i=d.length;0===d[--i];d.pop());}e.e>_?e.c=e.e=null:e.e<g&&(e.c=[e.e=0])}return e}function P(e){var t,n=e.e;return null===n?e.toString():(t=coeffToString(e.c),t=n<=y||n>=m?toExponential(t,n):toFixedPoint(t,n,"0"),e.s<0?"-"+t:t)}return A.clone=clone,A.ROUND_UP=0,A.ROUND_DOWN=1,A.ROUND_CEIL=2,A.ROUND_FLOOR=3,A.ROUND_HALF_UP=4,A.ROUND_HALF_DOWN=5,A.ROUND_HALF_EVEN=6,A.ROUND_HALF_CEIL=7,A.ROUND_HALF_FLOOR=8,A.EUCLID=9,A.config=A.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(bignumberError+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(intCheck(n=e[t],0,MAX,t),h=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(intCheck(n=e[t],0,8,t),f=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(intCheck(n[0],-1e9,0,t),intCheck(n[1],0,MAX,t),y=n[0],m=n[1]):(intCheck(n,-1e9,MAX,t),y=-(m=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)intCheck(n[0],-1e9,-1,t),intCheck(n[1],1,MAX,t),g=n[0],_=n[1];else{if(intCheck(n,-1e9,MAX,t),!n)throw Error(bignumberError+t+" cannot be zero: "+n);g=-(_=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(bignumberError+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw b=!n,Error(bignumberError+"crypto unavailable");b=n}else b=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(intCheck(n=e[t],0,9,t),I=n),e.hasOwnProperty(t="POW_PRECISION")&&(intCheck(n=e[t],0,MAX,t),T=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(bignumberError+t+" not an object: "+n);k=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(bignumberError+t+" invalid: "+n);w="0123456789"==n.slice(0,10),S=n}}return{DECIMAL_PLACES:h,ROUNDING_MODE:f,EXPONENTIAL_AT:[y,m],RANGE:[g,_],CRYPTO:b,MODULO_MODE:I,POW_PRECISION:T,FORMAT:k,ALPHABET:S}},A.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!A.DEBUG)return!0;var t,n,r=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&o>=-1e9&&o<=MAX&&o===mathfloor(o)){if(0===r[0]){if(0===o&&1===r.length)return!0;break e}if((t=(o+1)%LOG_BASE)<1&&(t+=LOG_BASE),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=BASE||n!==mathfloor(n))break e;if(0!==n)return!0}}}else if(null===r&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(bignumberError+"Invalid BigNumber: "+e)},A.maximum=A.max=function(){return E(arguments,d.lt)},A.minimum=A.min=function(){return E(arguments,d.gt)},A.random=(o=9007199254740992,i=Math.random()*o&2097151?function(){return mathfloor(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,o,a,s=0,c=[],u=new A(p);if(null==e?e=h:intCheck(e,0,MAX),o=mathceil(e/LOG_BASE),b)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[s]=n[0],t[s+1]=n[1]):(c.push(a%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw b=!1,Error(bignumberError+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(c.push(a%1e14),s+=7);s=o/7}if(!b)for(;s<o;)(a=i())<9e15&&(c[s++]=a%1e14);for(o=c[--s],e%=LOG_BASE,o&&e&&(a=POWS_TEN[LOG_BASE-e],c[s]=mathfloor(o/a)*a);0===c[s];c.pop(),s--);if(s<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=LOG_BASE);for(s=1,a=c[0];a>=10;a/=10,s++);s<LOG_BASE&&(r-=LOG_BASE-s)}return u.e=r,u.c=c,u}),A.sum=function(){for(var e=1,t=arguments,n=new A(t[0]);e<t.length;)n=n.plus(t[e++]);return n},n=function(){var e="0123456789";function n(e,t,n,r){for(var o,i,a=[0],s=0,c=e.length;s<c;){for(i=a.length;i--;a[i]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>n-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/n|0,a[o]%=n)}return a.reverse()}return function(r,o,i,a,s){var c,u,l,d,p,y,m,g,_=r.indexOf("."),b=h,I=f;for(_>=0&&(d=T,T=0,r=r.replace(".",""),y=(g=new A(o)).pow(r.length-_),T=d,g.c=n(toFixedPoint(coeffToString(y.c),y.e,"0"),10,i,e),g.e=g.c.length),l=d=(m=n(r,o,i,s?(c=S,e):(c=e,S))).length;0==m[--d];m.pop());if(!m[0])return c.charAt(0);if(_<0?--l:(y.c=m,y.e=l,y.s=a,m=(y=t(y,g,b,I,i)).c,p=y.r,l=y.e),_=m[u=l+b+1],d=i/2,p=p||u<0||null!=m[u+1],p=I<4?(null!=_||p)&&(0==I||I==(y.s<0?3:2)):_>d||_==d&&(4==I||p||6==I&&1&m[u-1]||I==(y.s<0?8:7)),u<1||!m[0])r=p?toFixedPoint(c.charAt(1),-b,c.charAt(0)):c.charAt(0);else{if(m.length=u,p)for(--i;++m[--u]>i;)m[u]=0,u||(++l,m=[1].concat(m));for(d=m.length;!m[--d];);for(_=0,r="";_<=d;r+=c.charAt(m[_++]));r=toFixedPoint(r,l,c.charAt(0))}return r}}(),t=function(){function e(e,t,n){var r,o,i,a,s=0,c=e.length,u=t%SQRT_BASE,l=t/SQRT_BASE|0;for(e=e.slice();c--;)s=((o=u*(i=e[c]%SQRT_BASE)+(r=l*i+(a=e[c]/SQRT_BASE|0)*u)%SQRT_BASE*SQRT_BASE+s)/n|0)+(r/SQRT_BASE|0)+l*a,e[c]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,i,a,s){var c,u,l,d,p,h,f,y,m,g,_,b,I,T,k,S,w,v=r.s==o.s?1:-1,E=r.c,O=o.c;if(!(E&&E[0]&&O&&O[0]))return new A(r.s&&o.s&&(E?!O||E[0]!=O[0]:O)?E&&0==E[0]||!O?0*v:v/0:NaN);for(m=(y=new A(v)).c=[],v=i+(u=r.e-o.e)+1,s||(s=BASE,u=bitFloor(r.e/LOG_BASE)-bitFloor(o.e/LOG_BASE),v=v/LOG_BASE|0),l=0;O[l]==(E[l]||0);l++);if(O[l]>(E[l]||0)&&u--,v<0)m.push(1),d=!0;else{for(T=E.length,S=O.length,l=0,v+=2,(p=mathfloor(s/(O[0]+1)))>1&&(O=e(O,p,s),E=e(E,p,s),S=O.length,T=E.length),I=S,_=(g=E.slice(0,S)).length;_<S;g[_++]=0);w=O.slice(),w=[0].concat(w),k=O[0],O[1]>=s/2&&k++;do{if(p=0,(c=t(O,g,S,_))<0){if(b=g[0],S!=_&&(b=b*s+(g[1]||0)),(p=mathfloor(b/k))>1)for(p>=s&&(p=s-1),f=(h=e(O,p,s)).length,_=g.length;1==t(h,g,f,_);)p--,n(h,S<f?w:O,f,s),f=h.length,c=1;else 0==p&&(c=p=1),f=(h=O.slice()).length;if(f<_&&(h=[0].concat(h)),n(g,h,_,s),_=g.length,-1==c)for(;t(O,g,S,_)<1;)p++,n(g,S<_?w:O,_,s),_=g.length}else 0===c&&(p++,g=[0]);m[l++]=p,g[0]?g[_++]=E[I]||0:(g=[E[I]],_=1)}while((I++<T||null!=g[0])&&v--);d=null!=g[0],m[0]||m.splice(0,1)}if(s==BASE){for(l=1,v=m[0];v>=10;v/=10,l++);N(y,i+(y.e=l+u*LOG_BASE-1)+1,a,d)}else y.e=u,y.r=+d;return y}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,c=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,r=function(e,t,n,r){var o,i=n?t:t.replace(l,"");if(u.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(a,function(e,t,n){return o="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=o?e:t}),r&&(o=r,i=i.replace(s,"$1").replace(c,"0.$1")),t!=i))return new A(i,o);if(A.DEBUG)throw Error(bignumberError+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},d.absoluteValue=d.abs=function(){var e=new A(this);return e.s<0&&(e.s=1),e},d.comparedTo=function(e,t){return compare$2(this,new A(e,t))},d.decimalPlaces=d.dp=function(e,t){var n,r,o,i=this;if(null!=e)return intCheck(e,0,MAX),null==t?t=f:intCheck(t,0,8),N(new A(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((o=n.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},d.dividedBy=d.div=function(e,n){return t(this,new A(e,n),h,f)},d.dividedToIntegerBy=d.idiv=function(e,n){return t(this,new A(e,n),0,1)},d.exponentiatedBy=d.pow=function(e,t){var n,r,o,i,a,s,c,u,l=this;if((e=new A(e)).c&&!e.isInteger())throw Error(bignumberError+"Exponent not an integer: "+P(e));if(null!=t&&(t=new A(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new A(Math.pow(+P(l),a?e.s*(2-isOdd(e)):+P(e))),t?u.mod(t):u;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new A(NaN);(r=!s&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return i=l.s<0&&isOdd(e)?-0:0,l.e>-1&&(i=1/i),new A(s?1/i:i);T&&(i=mathceil(T/LOG_BASE+2))}for(a?(n=new A(.5),s&&(e.s=1),c=isOdd(e)):c=(o=Math.abs(+P(e)))%2,u=new A(p);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):r&&(u=u.mod(t))}if(o){if(0===(o=mathfloor(o/2)))break;c=o%2}else if(N(e=e.times(n),e.e+1,1),e.e>14)c=isOdd(e);else{if(0===(o=+P(e)))break;c=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):r&&(l=l.mod(t))}return r?u:(s&&(u=p.div(u)),t?u.mod(t):i?N(u,T,f,undefined):u)},d.integerValue=function(e){var t=new A(this);return null==e?e=f:intCheck(e,0,8),N(t,t.e+1,e)},d.isEqualTo=d.eq=function(e,t){return 0===compare$2(this,new A(e,t))},d.isFinite=function(){return!!this.c},d.isGreaterThan=d.gt=function(e,t){return compare$2(this,new A(e,t))>0},d.isGreaterThanOrEqualTo=d.gte=function(e,t){return 1===(t=compare$2(this,new A(e,t)))||0===t},d.isInteger=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},d.isLessThan=d.lt=function(e,t){return compare$2(this,new A(e,t))<0},d.isLessThanOrEqualTo=d.lte=function(e,t){return-1===(t=compare$2(this,new A(e,t)))||0===t},d.isNaN=function(){return!this.s},d.isNegative=function(){return this.s<0},d.isPositive=function(){return this.s>0},d.isZero=function(){return!!this.c&&0==this.c[0]},d.minus=function(e,t){var n,r,o,i,a=this,s=a.s;if(t=(e=new A(e,t)).s,!s||!t)return new A(NaN);if(s!=t)return e.s=-t,a.plus(e);var c=a.e/LOG_BASE,u=e.e/LOG_BASE,l=a.c,d=e.c;if(!c||!u){if(!l||!d)return l?(e.s=-t,e):new A(d?a:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new A(l[0]?a:3==f?-0:0)}if(c=bitFloor(c),u=bitFloor(u),l=l.slice(),s=c-u){for((i=s<0)?(s=-s,o=l):(u=c,o=d),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(r=(i=(s=l.length)<(t=d.length))?s:t,s=t=0;t<r;t++)if(l[t]!=d[t]){i=l[t]<d[t];break}if(i&&(o=l,l=d,d=o,e.s=-e.s),(t=(r=d.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=BASE-1;r>s;){if(l[--r]<d[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=BASE}l[r]-=d[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?O(e,l,u):(e.s=3==f?-1:1,e.c=[e.e=0],e)},d.modulo=d.mod=function(e,n){var r,o,i=this;return e=new A(e,n),!i.c||!e.s||e.c&&!e.c[0]?new A(NaN):!e.c||i.c&&!i.c[0]?new A(i):(9==I?(o=e.s,e.s=1,r=t(i,e,0,3),e.s=o,r.s*=o):r=t(i,e,0,I),(e=i.minus(r.times(e))).c[0]||1!=I||(e.s=i.s),e)},d.multipliedBy=d.times=function(e,t){var n,r,o,i,a,s,c,u,l,d,p,h,f,y,m,g=this,_=g.c,b=(e=new A(e,t)).c;if(!(_&&b&&_[0]&&b[0]))return!g.s||!e.s||_&&!_[0]&&!b||b&&!b[0]&&!_?e.c=e.e=e.s=null:(e.s*=g.s,_&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=bitFloor(g.e/LOG_BASE)+bitFloor(e.e/LOG_BASE),e.s*=g.s,(c=_.length)<(d=b.length)&&(f=_,_=b,b=f,o=c,c=d,d=o),o=c+d,f=[];o--;f.push(0));for(y=BASE,m=SQRT_BASE,o=d;--o>=0;){for(n=0,p=b[o]%m,h=b[o]/m|0,i=o+(a=c);i>o;)n=((u=p*(u=_[--a]%m)+(s=h*u+(l=_[a]/m|0)*p)%m*m+f[i]+n)/y|0)+(s/m|0)+h*l,f[i--]=u%y;f[i]=n}return n?++r:f.splice(0,1),O(e,f,r)},d.negated=function(){var e=new A(this);return e.s=-e.s||null,e},d.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new A(e,t)).s,!o||!t)return new A(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/LOG_BASE,a=e.e/LOG_BASE,s=r.c,c=e.c;if(!i||!a){if(!s||!c)return new A(o/0);if(!s[0]||!c[0])return c[0]?e:new A(s[0]?r:0*o)}if(i=bitFloor(i),a=bitFloor(a),s=s.slice(),o=i-a){for(o>0?(a=i,n=c):(o=-o,n=s),n.reverse();o--;n.push(0));n.reverse()}for((o=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=o),o=0;t;)o=(s[--t]=s[t]+c[t]+o)/BASE|0,s[t]=BASE===s[t]?0:s[t]%BASE;return o&&(s=[o].concat(s),++a),O(e,s,a)},d.precision=d.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return intCheck(e,1,MAX),null==t?t=f:intCheck(t,0,8),N(new A(i),e,t);if(!(n=i.c))return null;if(r=(o=n.length-1)*LOG_BASE+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},d.shiftedBy=function(e){return intCheck(e,-9007199254740991,MAX_SAFE_INTEGER$1),this.times("1e"+e)},d.squareRoot=d.sqrt=function(){var e,n,r,o,i,a=this,s=a.c,c=a.s,u=a.e,l=h+4,d=new A("0.5");if(1!==c||!s||!s[0])return new A(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(c=Math.sqrt(+P(a)))||c==1/0?(((n=coeffToString(s)).length+u)%2==0&&(n+="0"),c=Math.sqrt(+n),u=bitFloor((u+1)/2)-(u<0||u%2),r=new A(n=c==1/0?"5e"+u:(n=c.toExponential()).slice(0,n.indexOf("e")+1)+u)):r=new A(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=d.times(i.plus(t(a,i,l,1))),coeffToString(i.c).slice(0,c)===(n=coeffToString(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(n=n.slice(c-3,c+1))&&(o||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(N(r,r.e+h+2,1),e=!r.times(r).eq(a));break}if(!o&&(N(i,i.e+h+2,0),i.times(i).eq(a))){r=i;break}l+=4,c+=4,o=1}return N(r,r.e+h+1,f,e)},d.toExponential=function(e,t){return null!=e&&(intCheck(e,0,MAX),e++),v(this,e,t,1)},d.toFixed=function(e,t){return null!=e&&(intCheck(e,0,MAX),e=e+this.e+1),v(this,e,t)},d.toFormat=function(e,t,n){var r,o=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=k;else if("object"!=typeof n)throw Error(bignumberError+"Argument not an object: "+n);if(r=o.toFixed(e,t),o.c){var i,a=r.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=a[0],d=a[1],p=o.s<0,h=p?l.slice(1):l,f=h.length;if(c&&(i=s,s=c,c=i,f-=i),s>0&&f>0){for(i=f%s||s,l=h.substr(0,i);i<f;i+=s)l+=u+h.substr(i,s);c>0&&(l+=u+h.slice(i)),p&&(l="-"+l)}r=d?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):l}return(n.prefix||"")+r+(n.suffix||"")},d.toFraction=function(e){var n,r,o,i,a,s,c,u,l,d,h,y,m=this,g=m.c;if(null!=e&&(!(c=new A(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(bignumberError+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+P(c));if(!g)return new A(m);for(n=new A(p),l=r=new A(p),o=u=new A(p),y=coeffToString(g),a=n.e=y.length-m.e-1,n.c[0]=POWS_TEN[(s=a%LOG_BASE)<0?LOG_BASE+s:s],e=!e||c.comparedTo(n)>0?a>0?n:l:c,s=_,_=1/0,c=new A(y),u.c[0]=0;d=t(c,n,0,1),1!=(i=r.plus(d.times(o))).comparedTo(e);)r=o,o=i,l=u.plus(d.times(i=l)),u=i,n=c.minus(d.times(i=n)),c=i;return i=t(e.minus(r),o,0,1),u=u.plus(i.times(l)),r=r.plus(i.times(o)),u.s=l.s=m.s,h=t(l,o,a*=2,f).minus(m).abs().comparedTo(t(u,r,a,f).minus(m).abs())<1?[l,o]:[u,r],_=s,h},d.toNumber=function(){return+P(this)},d.toPrecision=function(e,t){return null!=e&&intCheck(e,1,MAX),v(this,e,t,2)},d.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=y||i>=m?toExponential(coeffToString(r.c),i):toFixedPoint(coeffToString(r.c),i,"0"):10===e&&w?t=toFixedPoint(coeffToString((r=N(new A(r),h+i+1,f)).c),r.e,"0"):(intCheck(e,2,S.length,"Base"),t=n(toFixedPoint(coeffToString(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},d.valueOf=d.toJSON=function(){return P(this)},d._isBigNumber=!0,d[Symbol.toStringTag]="BigNumber",d[Symbol.for("nodejs.util.inspect.custom")]=d.valueOf,null!=e&&A.set(e),A}function bitFloor(e){var t=0|e;return e>0||e===t?t:t-1}function coeffToString(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=LOG_BASE-t.length;n--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function compare$2(e,t){var n,r,o=e.c,i=t.c,a=e.s,s=t.s,c=e.e,u=t.e;if(!a||!s)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=c==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return c>u^n?1:-1;for(s=(c=o.length)<(u=i.length)?c:u,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^n?1:-1;return c==u?0:c>u^n?1:-1}function intCheck(e,t,n,r){if(e<t||e>n||e!==mathfloor(e))throw Error(bignumberError+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function isOdd(e){var t=e.c.length-1;return bitFloor(e.e/LOG_BASE)==t&&e.c[t]%2!=0}function toExponential(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function toFixedPoint(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var BigNumber$1=clone();const REQUIRE_NON_NULL_ERROR="This value cannot be null | undefined.",REQUIRE_STRING_OR_UINT8ARRAY_ERROR="This value must be a string or Uint8Array.",REQUIRE_ARRAY_ERROR="The provided variable must be an Array.",FUNCTION_CONVERT_TO_BIGNUMBER_ERROR="This value must be a String, Number, or BigNumber to be converted.",FUNCTION_CONVERT_TO_NUMBER_ERROR="This value must be a String, Number, or BigNumber to be converted.",FUNCTION_CONVERT_TO_NUMBER_PARSE_ERROR="Unable to parse given variable. Returns NaN.";function isNonNull(e){return null!=e}function isUint8Array(e){return isNonNull(e)&&e instanceof Uint8Array}function isNumber(e){return isNonNull(e)&&("number"==typeof e||e instanceof Number)}function isBigNumber(e){return isNonNull(e)&&e instanceof BigNumber$1}function isLong(e){return isNonNull(e)&&e instanceof Long}function isString(e){return isNonNull(e)&&"string"==typeof e}function isStringOrUint8Array(e){return isNonNull(e)&&(isString(e)||isUint8Array(e))}function isLongZeroAddress(e){for(let t=0;t<12;t++)if(0!=e[t])return!1;return!0}function requireNotNegative(e){if(e.isNegative())throw new Error("negative value not allowed");return e}function requireNonNull(e){if(isNonNull(e))return e;throw new Error(REQUIRE_NON_NULL_ERROR)}function requireStringOrUint8Array(e){if(isStringOrUint8Array(requireNonNull(e)))return e;throw new Error(REQUIRE_STRING_OR_UINT8ARRAY_ERROR)}function convertToBigNumber(e){if(requireNonNull(e),isBigNumber(e)||isString(e)||isNumber(e)||isLong(e))return new BigNumber$1(e);throw new Error(FUNCTION_CONVERT_TO_BIGNUMBER_ERROR)}function convertAmountToLong(e){return requireNonNull(e),Long.isLong(e)?e:"number"==typeof e?Long.fromNumber(e):BigNumber$1.isBigNumber(e)?Long.fromValue(e.integerValue(BigNumber$1.ROUND_DOWN).toString()):"bigint"==typeof e?Long.fromValue(e.toString()):Long.fromValue(String(e))}function convertToBigNumberArray(e){if(e instanceof Array)return e.map(convertToBigNumber);throw new Error(REQUIRE_ARRAY_ERROR)}function convertToNumber(e){if(requireNonNull(e),isBigNumber(e)||isString(e)||isNumber(e)||isLong(e)){const t=parseInt(e);if(isNaN(t))throw new Error(FUNCTION_CONVERT_TO_NUMBER_PARSE_ERROR);return t}throw new Error(FUNCTION_CONVERT_TO_NUMBER_ERROR)}function safeView(e,t=0,n=e.byteLength){if(!(Number.isInteger(t)&&t>=0))throw new Error("Invalid offset!");if(!(Number.isInteger(n)&&n>=0))throw new Error("Invalid length!");return new DataView(e.buffer,e.byteOffset+t,Math.min(n,e.byteLength-t))}function compare$1(e,t,n=new Set){if("object"==typeof e&&"object"==typeof t){const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let i=0;i<r.length;i++){if(r[i]!==o[i])return!1;if(!n.has(r[i])&&!compare$1(e[r[i]],t[o[i]],n))return!1}return!0}return("number"==typeof e&&"number"==typeof t||"string"==typeof e&&"string"==typeof t||"boolean"==typeof e&&"boolean"==typeof t)&&e===t}function shuffle(e){for(var t,n,r=e.length;0!==r;)n=Math.floor(Math.random()*r),t=e[r-=1],e[r]=e[n],e[n]=t}function arrayEqual$2(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;const n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=new DataView(t.buffer,t.byteOffset,t.byteLength);let o=e.byteLength;for(;o--;)if(n.getUint8(o)!==r.getUint8(o))return!1;return!0}function wait(e){return new Promise(t=>setTimeout(t,e))}function parse(e,t,n){var r;if(void 0===n&&(n={}),!t.codes){t.codes={};for(var o=0;o<t.chars.length;++o)t.codes[t.chars[o]]=o}if(!n.loose&&e.length*t.bits&7)throw new SyntaxError("Invalid padding");for(var i=e.length;"="===e[i-1];)if(--i,!(n.loose||(e.length-i)*t.bits&7))throw new SyntaxError("Invalid padding");for(var a=new(null!=(r=n.out)?r:Uint8Array)(i*t.bits/8|0),s=0,c=0,u=0,l=0;l<i;++l){var d=t.codes[e[l]];if(void 0===d)throw new SyntaxError("Invalid character "+e[l]);c=c<<t.bits|d,(s+=t.bits)>=8&&(s-=8,a[u++]=255&c>>s)}if(s>=t.bits||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a}function stringify(e,t,n){void 0===n&&(n={});for(var r=n.pad,o=void 0===r||r,i=(1<<t.bits)-1,a="",s=0,c=0,u=0;u<e.length;++u)for(c=c<<8|255&e[u],s+=8;s>t.bits;)s-=t.bits,a+=t.chars[i&c>>s];if(s&&(a+=t.chars[i&c<<t.bits-s]),o)for(;a.length*t.bits&7;)a+="=";return a}var base32Encoding={chars:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bits:5},base32$1={parse:function(e,t){return void 0===t&&(t={}),parse(t.loose?e.toUpperCase().replace(/0/g,"O").replace(/1/g,"L").replace(/8/g,"B"):e,base32Encoding,t)},stringify:function(e,t){return stringify(e,base32Encoding,t)}};const decodeOpts={loose:!0},encodeOpts={pad:!1},decode$7=e=>e&&base32$1.parse(e,decodeOpts),encode$4=e=>e&&base32$1.stringify(e,encodeOpts);var base32={decode:decode$7,encode:encode$4},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var lib={},indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;return hasRequiredAspromise=1,aspromise=function(e,t){var n=new Array(arguments.length-1),r=0,o=2,i=!0;for(;o<arguments.length;)n[r++]=arguments[o++];return new Promise(function(o,a){n[r]=function(e){if(i)if(i=!1,e)a(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(e){i&&(i=!1,a(e))}})},aspromise}var base64={},hasRequiredBase64,eventemitter,hasRequiredEventemitter,float,hasRequiredFloat,inquire_1,hasRequiredInquire;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(e){var t=e;t.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var n=new Array(64),r=new Array(123),o=0;o<64;)r[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;t.encode=function(e,t,r){for(var o,i=null,a=[],s=0,c=0;t<r;){var u=e[t++];switch(c){case 0:a[s++]=n[u>>2],o=(3&u)<<4,c=1;break;case 1:a[s++]=n[o|u>>4],o=(15&u)<<2,c=2;break;case 2:a[s++]=n[o|u>>6],a[s++]=n[63&u],c=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=n[o],a[s++]=61,1===c&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var i="invalid encoding";t.decode=function(e,t,n){for(var o,a=n,s=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&s>1)break;if(void 0===(u=r[u]))throw Error(i);switch(s){case 0:o=u,s=1;break;case 1:t[n++]=o<<2|(48&u)>>4,o=u,s=2;break;case 2:t[n++]=(15&o)<<4|(60&u)>>2,o=u,s=3;break;case 3:t[n++]=(3&o)<<6|u,s=0}}if(1===s)throw Error(i);return n-a},t.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(base64)),base64}function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;function e(){this._listeners={}}return hasRequiredEventemitter=1,eventemitter=e,e.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},e.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},e.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this},eventemitter}function requireFloat(){if(hasRequiredFloat)return float;function e(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?a:s,e.readFloatBE=r?s:a}():function(){function i(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function a(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,a=8388607&r;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=i.bind(null,t),e.writeFloatBE=i.bind(null,n),e.readFloatLE=a.bind(null,r),e.readFloatBE=a.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?a:s,e.readDoubleBE=r?s:a}():function(){function i(e,t,n,r,o,i){var a=r<0?1:0;if(a&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+n);else{var s;if(r<22250738585072014e-324)e((s=r/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=r*Math.pow(2,-c))>>>0,o,i+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,o,i+n)}}}function a(e,t,n,r,o){var i=e(r,o+t),a=e(r,o+n),s=2*(a>>31)+1,c=a>>>20&2047,u=4294967296*(1048575&a)+i;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=i.bind(null,t,0,4),e.writeDoubleBE=i.bind(null,n,4,0),e.readDoubleLE=a.bind(null,r,0,4),e.readDoubleBE=a.bind(null,o,4,0)}(),e}function t(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function n(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function r(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}return hasRequiredFloat=1,float=e(e)}function requireInquire(){if(hasRequiredInquire)return inquire_1;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}return hasRequiredInquire=1,inquire_1=inquire,inquire_1}var utf8={},hasRequiredUtf8,pool_1,hasRequiredPool,longbits,hasRequiredLongbits,hasRequiredMinimal$1,writer,hasRequiredWriter,writer_buffer,hasRequiredWriter_buffer,reader,hasRequiredReader,reader_buffer,hasRequiredReader_buffer;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(e){var t=e;t.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},t.read=function(e,t,n){if(n-t<1)return"";for(var r,o=null,i=[],a=0;t<n;)(r=e[t++])<128?i[a++]=r:r>191&&r<224?i[a++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(r>>10),i[a++]=56320+(1023&r)):i[a++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},t.write=function(e,t,n){for(var r,o,i=n,a=0;a<e.length;++a)(r=e.charCodeAt(a))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(a+1)))?(r=65536+((1023&r)<<10)+(1023&o),++a,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}}(utf8)),utf8}function requirePool(){if(hasRequiredPool)return pool_1;return hasRequiredPool=1,pool_1=function(e,t,n){var r=n||8192,o=r>>>1,i=null,a=r;return function(n){if(n<1||n>o)return e(n);a+n>r&&(i=e(r),a=0);var s=t.call(i,a,a+=n);return 7&a&&(a=1+(7|a)),s}},pool_1}function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=t;var e=requireMinimal$1();function t(e,t){this.lo=e>>>0,this.hi=t>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var r=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return n;var r=e<0;r&&(e=-e);var o=e>>>0,i=(e-o)/4294967296>>>0;return r&&(i=~i>>>0,o=~o>>>0,++o>4294967295&&(o=0,++i>4294967295&&(i=0))),new t(o,i)},t.from=function(r){if("number"==typeof r)return t.fromNumber(r);if(e.isString(r)){if(!e.Long)return t.fromNumber(parseInt(r,10));r=e.Long.fromString(r)}return r.low||r.high?new t(r.low>>>0,r.high>>>0):n},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var o=String.prototype.charCodeAt;return t.fromHash=function(e){return e===r?n:new t((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10},longbits}function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(e){var