@eluvio/elv-client-js 3.2.29 → 3.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/ElvClient-min.js +5 -5
- package/dist/ElvClient-node-min.js +7 -7
- package/dist/ElvFrameClient-min.js +17 -10
- package/dist/ElvWalletClient-min.js +5 -5
- package/dist/ElvWalletClient-node-min.js +7 -7
- package/dist/src/FrameClient.js +5 -1
- package/package.json +1 -1
- package/src/FrameClient.js +5 -0
- package/src/walletClient/Configuration.js +2 -1
- package/testScripts/DraftFinalize.js +51 -0
- package/testScripts/OfferingEnsureStrongDrm.js +86 -0
- package/testScripts/abr_profile_4k_both.json +15 -6
- package/testScripts/abr_profile_4k_clear.json +14 -5
- package/testScripts/abr_profile_4k_drm.json +14 -5
- package/testScripts/abr_profile_both.json +10 -1
- package/testScripts/abr_profile_clear.json +10 -1
- package/testScripts/abr_profile_drm.json +10 -1
- package/utilities/WriteTokenDecode.js +36 -0
- package/utilities/example_files/abr_profile_4k_both.json +15 -6
- package/utilities/example_files/abr_profile_4k_clear.json +14 -5
- package/utilities/example_files/abr_profile_4k_drm.json +14 -5
- package/utilities/example_files/abr_profile_both.json +10 -1
- package/utilities/example_files/abr_profile_clear.json +3 -3
- package/utilities/example_files/abr_profile_clear_hls_only.json +3 -3
- package/utilities/example_files/abr_profile_drm.json +10 -1
- package/utilities/example_files/abr_profile_drm_hls_only.json +10 -1
- package/utilities/lib/concerns/Draft.js +9 -2
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=154)}([function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){
|
|
2
|
+
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3
|
+
var n=r(3),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function A(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=A),A.prototype=Object.create(i.prototype),o(i,A),A.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},A.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},A.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},A.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,n){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function o(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function A(t,e,r){if(A.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===e(t)?t.exports=A:n.BN=A,A.BN=A,A.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(280).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void i(!1,"Invalid character in "+t)}function c(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function u(t,e,r,n){for(var o=0,A=0,a=Math.min(t.length,r),s=e;s<a;s++){var c=t.charCodeAt(s)-48;o*=n,A=c>=49?c-49+10:c>=17?c-17+10:c,i(c>=0&&A<n,"Invalid character"),o+=A}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(A.isBN=function(t){return t instanceof A||null!==t&&"object"===e(t)&&t.constructor.wordSize===A.wordSize&&Array.isArray(t.words)},A.max=function(t,e){return t.cmp(e)>0?t:e},A.min=function(t,e){return t.cmp(e)<0?t:e},A.prototype._init=function(t,r,n){if("number"==typeof t)return this._initNumber(t,r,n);if("object"===e(t))return this._initArray(t,r,n);"hex"===r&&(r=16),i(r===(0|r)&&r>=2&&r<=36);var o=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<t.length&&(16===r?this._parseHex(t,o,n):(this._parseBase(t,r,o),"le"===n&&this._initArray(this.toArray(),r,n)))},A.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},A.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,A,a=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)A=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=A<<a&67108863,this.words[o+1]=A>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)A=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=A<<a&67108863,this.words[o+1]=A>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},A.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,A=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=c(t,e,n)<<o,this.words[A]|=67108863&i,o>=18?(o-=18,A+=1,this.words[A]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=c(t,e,n)<<o,this.words[A]|=67108863&i,o>=18?(o-=18,A+=1,this.words[A]|=i>>>26):o+=8;this._strip()},A.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,A=o%n,a=Math.min(o,o-A)+r,s=0,c=r;c<a;c+=n)s=u(t,c,c+n,e),this.imuln(i),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(0!==A){var f=1;for(s=u(t,c,t.length,e),c=0;c<A;c++)f*=e;this.imuln(f),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}this._strip()},A.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},A.prototype._move=function(t){f(t,this)},A.prototype.clone=function(){var t=new A(null);return this.copy(t),t},A.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},A.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},A.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{A.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){A.prototype.inspect=h}else A.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];A.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,A=0;A<this.length;A++){var a=this.words[A],s=(16777215&(a<<n|o)).toString(16);r=0!==(o=a>>>24-n&16777215)||A!==this.length-1?l[6-s.length]+s+r:s+r,(n+=2)>=26&&(n-=26,A--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],u=g[t];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var h=f.modrn(u).toString(t);r=(f=f.idivn(u)).isZero()?h+r:l[c-h.length]+h+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},A.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},A.prototype.toJSON=function(){return this.toString(16,2)},a&&(A.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),A.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],A=i*o,a=67108863&A,s=A/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var u=s>>>26,f=67108863&s,h=Math.min(c,e.length-1),l=Math.max(0,c-t.length+1);l<=h;l++){var d=c-l|0;u+=(A=(i=0|t.words[d])*(o=0|e.words[l])+f)/67108864|0,f=67108863&A}r.words[c]=0|f,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r._strip()}A.prototype.toArrayLike=function(t,e,r){this._strip();var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0");var A=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](A,n),A},A.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var A=this.words[i]<<o|n;t[r++]=255&A,r<t.length&&(t[r++]=A>>8&255),r<t.length&&(t[r++]=A>>16&255),6===o?(r<t.length&&(t[r++]=A>>24&255),n=0,o=0):(n=A>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},A.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var A=this.words[i]<<o|n;t[r--]=255&A,r>=0&&(t[r--]=A>>8&255),r>=0&&(t[r--]=A>>16&255),6===o?(r>=0&&(t[r--]=A>>24&255),n=0,o=0):(n=A>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?A.prototype._countBits=function(t){return 32-Math.clz32(t)}:A.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},A.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},A.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},A.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},A.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},A.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},A.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},A.prototype.isNeg=function(){return 0!==this.negative},A.prototype.neg=function(){return this.clone().ineg()},A.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},A.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},A.prototype.ior=function(t){return i(0==(this.negative|t.negative)),this.iuor(t)},A.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},A.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},A.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},A.prototype.iand=function(t){return i(0==(this.negative|t.negative)),this.iuand(t)},A.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},A.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},A.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},A.prototype.ixor=function(t){return i(0==(this.negative|t.negative)),this.iuxor(t)},A.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},A.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},A.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},A.prototype.notn=function(t){return this.clone().inotn(t)},A.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},A.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},A.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},A.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,A=0;A<n.length;A++)o=(e=(0|r.words[A])-(0|n.words[A])+o)>>26,this.words[A]=67108863&e;for(;0!==o&&A<r.length;A++)o=(e=(0|r.words[A])+o)>>26,this.words[A]=67108863&e;if(0===o&&A<r.length&&r!==this)for(;A<r.length;A++)this.words[A]=r.words[A];return this.length=Math.max(this.length,A),r!==this&&(this.negative=1),this._strip()},A.prototype.sub=function(t){return this.clone().isub(t)};var I=function(t,e,r){var n,i,o,A=t.words,a=e.words,s=r.words,c=0,u=0|A[0],f=8191&u,h=u>>>13,l=0|A[1],d=8191&l,g=l>>>13,p=0|A[2],I=8191&p,y=p>>>13,C=0|A[3],E=8191&C,b=C>>>13,B=0|A[4],m=8191&B,w=B>>>13,v=0|A[5],Q=8191&v,_=v>>>13,D=0|A[6],S=8191&D,M=D>>>13,k=0|A[7],x=8191&k,R=k>>>13,N=0|A[8],F=8191&N,U=N>>>13,H=0|A[9],L=8191&H,O=H>>>13,T=0|a[0],G=8191&T,P=T>>>13,j=0|a[1],Y=8191&j,K=j>>>13,q=0|a[2],J=8191&q,z=q>>>13,Z=0|a[3],V=8191&Z,W=Z>>>13,X=0|a[4],$=8191&X,tt=X>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,At=it>>>13,at=0|a[7],st=8191&at,ct=at>>>13,ut=0|a[8],ft=8191&ut,ht=ut>>>13,lt=0|a[9],dt=8191<,gt=lt>>>13;r.negative=t.negative^e.negative,r.length=19;var pt=(c+(n=Math.imul(f,G))|0)+((8191&(i=(i=Math.imul(f,P))+Math.imul(h,G)|0))<<13)|0;c=((o=Math.imul(h,P))+(i>>>13)|0)+(pt>>>26)|0,pt&=67108863,n=Math.imul(d,G),i=(i=Math.imul(d,P))+Math.imul(g,G)|0,o=Math.imul(g,P);var It=(c+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,K)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(I,G),i=(i=Math.imul(I,P))+Math.imul(y,G)|0,o=Math.imul(y,P),n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,K)|0;var yt=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,z)|0)+Math.imul(h,J)|0))<<13)|0;c=((o=o+Math.imul(h,z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(E,G),i=(i=Math.imul(E,P))+Math.imul(b,G)|0,o=Math.imul(b,P),n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,K)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,z)|0;var Ct=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(m,G),i=(i=Math.imul(m,P))+Math.imul(w,G)|0,o=Math.imul(w,P),n=n+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,z)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,z)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var Et=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(Q,G),i=(i=Math.imul(Q,P))+Math.imul(_,G)|0,o=Math.imul(_,P),n=n+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,K)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,z)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,W)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,tt)|0;var bt=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(S,G),i=(i=Math.imul(S,P))+Math.imul(M,G)|0,o=Math.imul(M,P),n=n+Math.imul(Q,Y)|0,i=(i=i+Math.imul(Q,K)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(m,J)|0,i=(i=i+Math.imul(m,z)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,z)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var Bt=(c+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,At)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,At)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(x,G),i=(i=Math.imul(x,P))+Math.imul(R,G)|0,o=Math.imul(R,P),n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(Q,J)|0,i=(i=i+Math.imul(Q,z)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,z)|0,n=n+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,At)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,At)|0;var mt=(c+(n=n+Math.imul(f,st)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,st)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(F,G),i=(i=Math.imul(F,P))+Math.imul(U,G)|0,o=Math.imul(U,P),n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,K)|0,n=n+Math.imul(S,J)|0,i=(i=i+Math.imul(S,z)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,z)|0,n=n+Math.imul(Q,V)|0,i=(i=i+Math.imul(Q,W)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(m,$)|0,i=(i=i+Math.imul(m,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,At)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,At)|0,n=n+Math.imul(d,st)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,st)|0,o=o+Math.imul(g,ct)|0;var wt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,P))+Math.imul(O,G)|0,o=Math.imul(O,P),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,K)|0)+Math.imul(U,Y)|0,o=o+Math.imul(U,K)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(R,J)|0,o=o+Math.imul(R,z)|0,n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,W)|0,n=n+Math.imul(Q,$)|0,i=(i=i+Math.imul(Q,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(m,rt)|0,i=(i=i+Math.imul(m,nt)|0)+Math.imul(w,rt)|0,o=o+Math.imul(w,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,At)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,At)|0,n=n+Math.imul(I,st)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(y,st)|0,o=o+Math.imul(y,ct)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ft)|0,o=o+Math.imul(g,ht)|0;var vt=(c+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,K))+Math.imul(O,Y)|0,o=Math.imul(O,K),n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,z)|0,n=n+Math.imul(x,V)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(Q,rt)|0,i=(i=i+Math.imul(Q,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(m,ot)|0,i=(i=i+Math.imul(m,At)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,At)|0,n=n+Math.imul(E,st)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(b,st)|0,o=o+Math.imul(b,ct)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(y,ft)|0,o=o+Math.imul(y,ht)|0;var Qt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,n=Math.imul(L,J),i=(i=Math.imul(L,z))+Math.imul(O,J)|0,o=Math.imul(O,z),n=n+Math.imul(F,V)|0,i=(i=i+Math.imul(F,W)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(M,rt)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(Q,ot)|0,i=(i=i+Math.imul(Q,At)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,At)|0,n=n+Math.imul(m,st)|0,i=(i=i+Math.imul(m,ct)|0)+Math.imul(w,st)|0,o=o+Math.imul(w,ct)|0,n=n+Math.imul(E,ft)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var _t=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((o=o+Math.imul(y,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(O,V)|0,o=Math.imul(O,W),n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(U,$)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,At)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,At)|0,n=n+Math.imul(Q,st)|0,i=(i=i+Math.imul(Q,ct)|0)+Math.imul(_,st)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(m,ft)|0,i=(i=i+Math.imul(m,ht)|0)+Math.imul(w,ft)|0,o=o+Math.imul(w,ht)|0;var Dt=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(b,dt)|0))<<13)|0;c=((o=o+Math.imul(b,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,tt))+Math.imul(O,$)|0,o=Math.imul(O,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,At)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,At)|0,n=n+Math.imul(S,st)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(M,st)|0,o=o+Math.imul(M,ct)|0,n=n+Math.imul(Q,ft)|0,i=(i=i+Math.imul(Q,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(m,dt)|0)|0)+((8191&(i=(i=i+Math.imul(m,gt)|0)+Math.imul(w,dt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(O,rt)|0,o=Math.imul(O,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,At)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,At)|0,n=n+Math.imul(x,st)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(R,st)|0,o=o+Math.imul(R,ct)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,ht)|0;var Mt=(c+(n=n+Math.imul(Q,dt)|0)|0)+((8191&(i=(i=i+Math.imul(Q,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,At))+Math.imul(O,ot)|0,o=Math.imul(O,At),n=n+Math.imul(F,st)|0,i=(i=i+Math.imul(F,ct)|0)+Math.imul(U,st)|0,o=o+Math.imul(U,ct)|0,n=n+Math.imul(x,ft)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ht)|0;var kt=(c+(n=n+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(M,dt)|0))<<13)|0;c=((o=o+Math.imul(M,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,st),i=(i=Math.imul(L,ct))+Math.imul(O,st)|0,o=Math.imul(O,ct),n=n+Math.imul(F,ft)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(U,ft)|0,o=o+Math.imul(U,ht)|0;var xt=(c+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((o=o+Math.imul(R,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,ht))+Math.imul(O,ft)|0,o=Math.imul(O,ht);var Rt=(c+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(U,dt)|0))<<13)|0;c=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var Nt=(c+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(O,dt)|0))<<13)|0;return c=((o=Math.imul(O,gt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,s[0]=pt,s[1]=It,s[2]=yt,s[3]=Ct,s[4]=Et,s[5]=bt,s[6]=Bt,s[7]=mt,s[8]=wt,s[9]=vt,s[10]=Qt,s[11]=_t,s[12]=Dt,s[13]=St,s[14]=Mt,s[15]=kt,s[16]=xt,s[17]=Rt,s[18]=Nt,0!==c&&(s[19]=c,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var A=i;i=0;for(var a=67108863&n,s=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=s;c++){var u=o-c,f=(0|t.words[u])*(0|e.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(A=(A=A+(f/67108864|0)|0)+(h>>>26)|0)>>>26,A&=67108863}r.words[o]=a,n=A,A=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function C(t,e,r){return y(t,e,r)}function E(t,e){this.x=t,this.y=e}Math.imul||(I=p),A.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?I(this,t,e):r<63?p(this,t,e):r<1024?y(this,t,e):C(this,t,e)},E.prototype.makeRBT=function(t){for(var e=new Array(t),r=A.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},E.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},E.prototype.permute=function(t,e,r,n,i,o){for(var A=0;A<o;A++)n[A]=e[t[A]],i[A]=r[t[A]]},E.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var A=1;A<i;A<<=1)for(var a=A<<1,s=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var f=s,h=c,l=0;l<A;l++){var d=r[u+l],g=n[u+l],p=r[u+l+A],I=n[u+l+A],y=f*p-h*I;I=f*I+h*p,p=y,r[u+l]=d+p,n[u+l]=g+I,r[u+l+A]=d-p,n[u+l+A]=g-I,l!==a&&(y=s*f-c*h,h=s*h+c*f,f=y)}},E.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},E.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},E.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},E.prototype.convert13b=function(t,e,r,n){for(var o=0,A=0;A<e;A++)o+=0|t[A],r[2*A]=8191&o,o>>>=13,r[2*A+1]=8191&o,o>>>=13;for(A=2*e;A<n;++A)r[A]=0;i(0===o),i(0==(-8192&o))},E.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},E.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),A=new Array(n),a=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,A,n),this.convert13b(e.words,e.length,c,n),this.transform(A,o,a,s,n,i),this.transform(c,o,u,f,n,i);for(var l=0;l<n;l++){var d=a[l]*u[l]-s[l]*f[l];s[l]=a[l]*f[l]+s[l]*u[l],a[l]=d}return this.conjugate(a,s,n),this.transform(a,s,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},A.prototype.mul=function(t){var e=new A(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},A.prototype.mulf=function(t){var e=new A(null);return e.words=new Array(this.length+t.length),C(this,t,e)},A.prototype.imul=function(t){return this.clone().mulTo(t,this)},A.prototype.imuln=function(t){var e=t<0;e&&(t=-t),i("number"==typeof t),i(t<67108864);for(var r=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,A=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=A>>>26,this.words[n]=67108863&A}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},A.prototype.muln=function(t){return this.clone().imuln(t)},A.prototype.sqr=function(){return this.mul(this)},A.prototype.isqr=function(){return this.imul(this.clone())},A.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new A(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},A.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var A=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,s=(0|this.words[e])-a<<r;this.words[e]=s|A,A=a>>>26-r}A&&(this.words[e]=A,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},A.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},A.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,A=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,s=r;if(n-=A,n=Math.max(0,n),s){for(var c=0;c<A;c++)s.words[c]=this.words[c];s.length=A}if(0===A);else if(this.length>A)for(this.length-=A,c=0;c<this.length;c++)this.words[c]=this.words[c+A];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=n);c--){var f=0|this.words[c];this.words[c]=u<<26-o|f>>>o,u=f&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},A.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},A.prototype.shln=function(t){return this.clone().ishln(t)},A.prototype.ushln=function(t){return this.clone().iushln(t)},A.prototype.shrn=function(t){return this.clone().ishrn(t)},A.prototype.ushrn=function(t){return this.clone().iushrn(t)},A.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r)&&!!(this.words[r]&n)},A.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},A.prototype.maskn=function(t){return this.clone().imaskn(t)},A.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},A.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},A.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},A.prototype.addn=function(t){return this.clone().iaddn(t)},A.prototype.subn=function(t){return this.clone().isubn(t)},A.prototype.iabs=function(){return this.negative=0,this},A.prototype.abs=function(){return this.clone().iabs()},A.prototype._ishlnsubmul=function(t,e,r){var n,o,A=t.length+r;this._expand(A);var a=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+a;var s=(0|t.words[n])*e;a=((o-=67108863&s)>>26)-(s/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this._strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},A.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==e){(a=new A(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,s);0===u.negative&&(n=u,a&&(a.words[s]=1));for(var f=s-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},A.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new A(0),mod:new A(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:n,mod:o}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(o=a.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:a.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new A(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new A(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new A(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,o,a},A.prototype.div=function(t){return this.divmod(t,"div",!1).div},A.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},A.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},A.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},A.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},A.prototype.modn=function(t){return this.modrn(t)},A.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},A.prototype.divn=function(t){return this.clone().idivn(t)},A.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new A(1),o=new A(0),a=new A(0),s=new A(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,l=1;0==(e.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(u),o.isub(f)),n.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(u),s.isub(f)),a.iushrn(1),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(a),o.isub(s)):(r.isub(e),a.isub(n),s.isub(o))}return{a:a,b:s,gcd:r.iushln(c)}},A.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,o=new A(1),a=new A(0),s=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(a)):(r.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(t),n},A.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},A.prototype.invm=function(t){return this.egcd(t).a.umod(t)},A.prototype.isEven=function(){return 0==(1&this.words[0])},A.prototype.isOdd=function(){return 1==(1&this.words[0])},A.prototype.andln=function(t){return this.words[0]&t},A.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,A=r;0!==o&&A<this.length;A++){var a=0|this.words[A];o=(a+=o)>>>26,a&=67108863,this.words[A]=a}return 0!==o&&(this.words[A]=o,this.length++),this},A.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},A.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},A.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},A.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},A.prototype.gtn=function(t){return 1===this.cmpn(t)},A.prototype.gt=function(t){return 1===this.cmp(t)},A.prototype.gten=function(t){return this.cmpn(t)>=0},A.prototype.gte=function(t){return this.cmp(t)>=0},A.prototype.ltn=function(t){return-1===this.cmpn(t)},A.prototype.lt=function(t){return-1===this.cmp(t)},A.prototype.lten=function(t){return this.cmpn(t)<=0},A.prototype.lte=function(t){return this.cmp(t)<=0},A.prototype.eqn=function(t){return 0===this.cmpn(t)},A.prototype.eq=function(t){return 0===this.cmp(t)},A.red=function(t){return new _(t)},A.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},A.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},A.prototype._forceRed=function(t){return this.red=t,this},A.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},A.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},A.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},A.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},A.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},A.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},A.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},A.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},A.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},A.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},A.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},A.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},A.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},A.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function B(t,e){this.name=t,this.p=new A(e,16),this.n=this.p.bitLength(),this.k=new A(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){B.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){B.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){B.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Q(){B.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=A._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function D(t){_.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new A(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}B.prototype._tmp=function(){var t=new A(null);return t.words=new Array(Math.ceil(this.n/13)),t},B.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},B.prototype.split=function(t,e){t.iushrn(this.n,0,e)},B.prototype.imulK=function(t){return t.imul(this.k)},o(m,B),m.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},m.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},o(w,B),o(v,B),o(Q,B),Q.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},A._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new m;else if("p224"===t)e=new w;else if("p192"===t)e=new v;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new Q}return b[t]=e,e},_.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},_.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},_.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},_.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},_.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},_.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},_.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},_.prototype.isqr=function(t){return this.imul(t,t.clone())},_.prototype.sqr=function(t){return this.mul(t,t)},_.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new A(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var a=new A(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new A(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var f=this.pow(u,n),h=this.pow(t,n.addn(1).iushrn(1)),l=this.pow(t,n),d=o;0!==l.cmp(a);){for(var g=l,p=0;0!==g.cmp(a);p++)g=g.redSqr();i(p<d);var I=this.pow(f,new A(1).iushln(d-p-1));h=h.redMul(I),f=I.redSqr(),l=l.redMul(f),d=p}return h},_.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},_.prototype.pow=function(t,e){if(e.isZero())return new A(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new A(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],o=0,a=0,s=e.bitLength()%26;for(0===s&&(s=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],u=s-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[o]),a=0,o=0)):a=0}s=26}return i},_.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},_.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},A.mont=function(t){return new D(t)},o(D,_),D.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},D.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},D.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},D.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new A(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},D.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(8)(t))},function(t,e,r){"use strict";(function(t){
|
|
2
4
|
/*!
|
|
3
5
|
* The buffer module from node.js, for the browser.
|
|
4
6
|
*
|
|
5
7
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
8
|
* @license MIT
|
|
7
9
|
*/
|
|
8
|
-
var n=r(54),i=r(55),o=r(56);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|d(e.length);return 0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=s(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|d(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(n)return z(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return S(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(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),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,a=1,s=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;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){h=!1;break}if(h)return o}return-1}function b(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;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function w(t,e,r,n){return F(z(e,t.length-r),t,r,n)}function _(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 k(t,e,r,n){return _(t,e,r,n)}function x(t,e,r,n){return F(H(e),t,r,n)}function A(t,e,r,n){return F(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,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},u.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}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?E(this,0,t):y.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(n,i),l=t.slice(e,r),h=0;h<s;++h)if(c[h]!==l[h]){o=c[h],a=l[h];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw 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 b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(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 M(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 T(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=B(t[o]);return i}function P(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 C(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 O(t,e,r,n,i,o){if(!u.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 R(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function j(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function N(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 L(t,e,r,n,o){return o||N(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,o){return o||N(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(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},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(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},u.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||O(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},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||O(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},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var 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 a=u.isBuffer(t)?t:z(new u(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+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 H(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).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}}).call(this,r(5))},function(t,e,r){var n=r(80),i=r(81),o=r(82),a=r(83),s=r(84);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(11);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(36),i=r(91),o=r(92),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e,r){var n=r(18)(Object,"create");t.exports=n},function(t,e,r){var n=r(106);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){(function(e,n){var i=r(22),o=r(3),a=r(4),s=r(7),u=r(61);function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}void 0===e&&(e=r(8).Buffer);var h,f,d,p=r(65),y=r(68).default,m=r(69),v=r(25),g=r(73),b=r(74).utils,w=b.keccak256,_=b.getAddress,k={name:"Utils",nullAddress:"0x0000000000000000000000000000000000000000",weiPerEther:new y("1000000000000000000"),ToBigNumber:function(t){return new y(t)},WeiToEther:function(t){return k.ToBigNumber(t).div(k.weiPerEther)},EtherToWei:function(t){return k.ToBigNumber(t).times(k.weiPerEther)},FormatAddress:function(t){return t&&"string"==typeof t?((t=t.trim()).startsWith("0x")||(t="0x"+t),t.toLowerCase()):""},FormatSignature:function(t){return t=t.replace("0x",""),"ES256K_"+p.encode(e.from(t,"hex"))},DecodeVersionHash:function(t){if(!t.startsWith("hq__")&&!t.startsWith("tq__"))throw new Error('Invalid version hash: "'.concat(t,'"'));t=t.slice(4);var r=k.FromB58(t),n=r.slice(0,32),i=n.toString("hex");r=r.slice(32);for(var o=0;r[o]>=128;)o++;o++;var a=r.slice(0,o),s=m.decode(a);return r=r.slice(o),{digest:i,size:s,objectId:"iq__"+k.B58(r),partHash:"hqp_"+k.B58(e.concat([n,a]))}},DecodeSignedToken:function(t){var r=k.FromB58(t.slice(6)),n="0x".concat(r.slice(0,65).toString("hex")),i=JSON.parse(e.from(g.inflateRaw(r.slice(65))).toString("utf-8"));return i.adr=k.FormatAddress("0x".concat(e.from(i.adr,"base64").toString("hex"))),{payload:i,signature:n}},DecodeWriteToken:function(t){if(t.length<4)throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'));var e;if(t.startsWith("tqw__")?(e="tq__",t=t.slice(5)):(e=t.slice(0,4),t=t.slice(4)),0===t.length)throw new Error('Invalid write token: ["'.concat(t,'"] (too short)'));switch(e){case"tqw_":case"tq__":case"tqpw":case"tqp_":case"tlro":break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}var r,n,i,o,a,s=k.FromB58(t);function u(t,e){var r,n,i=m.decode(s,0),o=m.decode.bytes;return n=t?0===(r=s.slice(o+1,i+o)).length?"":e+k.B58(r):"0x"+(r=s.slice(o,i+o)).toString("hex"),s=s.slice(i+o),n}switch(e){case"tqw_":case"tqpw":r="0x"+s.toString("hex");break;case"tlro":case"tq__":n=u(!0,"iq__"),i=u(!0,"inod"),r=u(!1,"");break;case"tqp_":if(s.length<3)throw new Error('Invalid write token: ["'.concat(t,'"] (token truncated)'));o=s[0],a=s[1],s=s.slice(2),r=u(!1,"");break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}return{tokenType:e,tokenId:r,objectId:n,nodeId:i,scheme:o,flags:a}},AddressToHash:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=t.replace(r?"0x04":"0x",""),p.encode(e.from(t,"hex"))},AddressToSpaceId:function(t){return"ispc"+k.AddressToHash(t)},AddressToLibraryId:function(t){return"ilib"+k.AddressToHash(t)},AddressToObjectId:function(t){return"iq__"+k.AddressToHash(t)},HashToAddress:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e?t:t.substr(4),k.FormatAddress((e?"0x04":"0x")+p.decode(t).toString("hex"))},EqualAddress:function(t,e){return!(!t||!e)&&k.FormatAddress(t)===k.FormatAddress(e)},EqualHash:function(t,e){return!(!t||!e)&&(!(t.length<=4||e.length<=4)&&k.HashToAddress(t)===k.HashToAddress(e))},ValidAddress:function(t){try{return _(t),!0}catch(t){return!1}},ValidHash:function(t){return k.ValidAddress(k.HashToAddress(t))},ToBytes32:function(t){return"0x"+t.split("").map((function(t){return t.charCodeAt(0).toString(16)})).join("").slice(0,64).padEnd(64,"0")},BufferToArrayBuffer:function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)},B64:function(t){return e.from(t,"utf-8").toString("base64")},FromB64:function(t){return e.from(t,"base64").toString("utf-8")},FromB64URL:function(t){var e=(t=t.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(e){if(1===e)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");t+=new Array(5-e).join("=")}return k.FromB64(t)},B58:function(t){return p.encode(e.from(t))},FromB58:function(t){return p.decode(t)},FromB58ToStr:function(t){return(new TextDecoder).decode(k.FromB58(t))},DecodeAuthorizationToken:function(t){var e=(t=decodeURIComponent(t)).split("."),r=u(e,2),n=r[0],i=r[1];return l(l({},n=JSON.parse(k.FromB64(n))),{},{signature:i})},LimitedMap:(d=a(o.mark((function t(e,r,n){var s,u,c,l,h;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=0,u=!1,c=function(){var t=a(o.mark((function t(){var e;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!u){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,10)}));case 3:t.next=0;break;case 5:return u=!0,e=s,s+=1,u=!1,t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),l=[],h=0,t.abrupt("return",new Promise((function(t,s){i(Array(e||1)).forEach(a(o.mark((function e(){var i;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h+=1,e.next=3,c();case 3:i=e.sent;case 4:if(!(i<r.length)){e.next=19;break}return e.prev=5,e.next=8,n(r[i],i);case 8:l[i]=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),s(e.t0);case 14:return e.next=16,c();case 16:i=e.sent,e.next=4;break;case 19:0==(h-=1)&&t(l);case 21:case"end":return e.stop()}}),e,null,[[5,11]])}))))})));case 6:case"end":return t.stop()}}),t)}))),function(t,e,r){return d.apply(this,arguments)}),ResponseToJson:(f=a(o.mark((function t(e){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",k.ResponseToFormat("json",e));case 1:case"end":return t.stop()}}),t)}))),function(t){return f.apply(this,arguments)}),ResponseToFormat:(h=a(o.mark((function t(e,r){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r;case 2:r=t.sent,t.t0=e.toLowerCase(),t.next="json"===t.t0?6:"text"===t.t0?9:"blob"===t.t0?12:"arraybuffer"===t.t0?15:"formdata"===t.t0?18:"buffer"===t.t0?21:24;break;case 6:return t.next=8,r.json();case 8:return t.abrupt("return",t.sent);case 9:return t.next=11,r.text();case 11:return t.abrupt("return",t.sent);case 12:return t.next=14,r.blob();case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,r.arrayBuffer();case 17:return t.abrupt("return",t.sent);case 18:return t.next=20,r.formData();case 20:return t.abrupt("return",t.sent);case 21:return t.next=23,r.buffer();case 23:return t.abrupt("return",t.sent);case 24:return t.abrupt("return",r);case 25:case"end":return t.stop()}}),t)}))),function(t,e){return h.apply(this,arguments)}),ResizeImage:function(t){var e=t.imageUrl,r=t.height;return!e||e&&!e.startsWith("http")?e:(e=v(e).removeSearch("height").removeSearch("header-x_image_height"),r&&!isNaN(parseInt(r))&&e.addSearch("height",parseInt(r)),e.toString())},SafeTraverse:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(!t)return t;1===r.length&&Array.isArray(r[0])&&(r=r[0]);for(var i=t,o=0;o<r.length;o++)if(void 0===(i=i[r[o]]))return;return i},IsCloneable:function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return k.IsCloneable(t[e])}));case"Map":return i(t.keys()).every(k.IsCloneable)&&i(t.values()).every(k.IsCloneable);case"Set":return i(t.keys()).every(k.IsCloneable);default:return!1}},MakeClonable:function(t){if(k.IsCloneable(t))return t;if(e.isBuffer(t))return k.BufferToArrayBuffer(t);switch({}.toString.call(t).slice(8,-1)){case"Response":case"Function":return;case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return t;case"Array":return t.map((function(t){return k.MakeClonable(t)}));case"Set":return new Set(Array.from(t.keys()).map((function(t){return k.MakeClonable(t)})));case"Map":var r=new Map;return Array.from(t.keys()).forEach((function(e){var n=k.MakeClonable(t.get(e));n&&r.set(e,n)})),r;case"Error":return t.message;case"Object":var n={};return Object.keys(t).map((function(e){var r=k.MakeClonable(t[e]);r&&(n[e]=r)})),n;default:return JSON.parse(JSON.stringify(t))}},PublicKeyToAddress:function(t){var r=new Uint8Array(e.from(t.replace("0x04",""),"hex")),n="0x"+w(r).slice(26);return k.FormatAddress(n)},PLATFORM_NODE:"node",PLATFORM_WEB:"web",PLATFORM_REACT_NATIVE:"react-native",Platform:function(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product?k.PLATFORM_REACT_NATIVE:void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node?k.PLATFORM_NODE:k.PLATFORM_WEB}};t.exports=k}).call(this,r(8).Buffer,r(57))},function(t,e,r){var n=r(90),i=r(96);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(12),i=r(1);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,r){var n=r(39);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(19),i=r(44);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t,e,r){var n=r(58),i=r(59),o=r(24),a=r(60);t.exports=function(t){return n(t)||i(t)||o(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(23);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){(function(t){var n,i,o;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
10
|
+
var n=r(70),i=r(71),o=r(43);function A(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(A()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(s.isBuffer(e)){var r=0|l(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(u(e),t=a(t,e<0?0:0|l(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|l(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function l(t){if(t>=A())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return T(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return T(t).length;e=(""+e).toLowerCase(),n=!0}}function g(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 S(this,e,r);case"utf8":case"utf-8":return Q(this,e,r);case"ascii":return _(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function I(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),r=+r,isNaN(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=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,A=1,a=t.length,s=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;A=2,a/=2,s/=2,r/=2}function c(t,e){return 1===A?t[e]:t.readUInt16BE(e*A)}if(i){var u=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===s)return u*A}else-1!==u&&(o-=o-u),u=-1}else for(r+s>a&&(r=a-s),o=r;o>=0;o--){for(var f=!0,h=0;h<s;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return-1}function C(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;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var A=0;A<n;++A){var a=parseInt(e.substr(2*A,2),16);if(isNaN(a))return A;t[r+A]=a}return A}function E(t,e,r,n){return P(T(e,t.length-r),t,r,n)}function b(t,e,r,n){return P(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function B(t,e,r,n){return b(t,e,r,n)}function m(t,e,r,n){return P(G(e),t,r,n)}function w(t,e,r,n){return P(function(t,e){for(var r,n,i,o=[],A=0;A<t.length&&!((e-=2)<0);++A)r=t.charCodeAt(A),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function v(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function Q(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,A,a,s,c=t[i],u=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(u=s);break;case 3:o=t[i+1],A=t[i+2],128==(192&o)&&128==(192&A)&&(s=(15&c)<<12|(63&o)<<6|63&A)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:o=t[i+1],A=t[i+2],a=t[i+3],128==(192&o)&&128==(192&A)&&128==(192&a)&&(s=(15&c)<<18|(63&o)<<12|(63&A)<<6|63&a)>65535&&s<1114112&&(u=s)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=A(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return c(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return function(t,e,r,n){return u(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},s.allocUnsafe=function(t){return f(null,t)},s.allocUnsafeSlow=function(t){return f(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");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},s.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}},s.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var A=t[r];if(!s.isBuffer(A))throw new TypeError('"list" argument must be an Array of Buffers');A.copy(n,i),i+=A.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.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)p(this,e,e+1);return this},s.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)p(this,e,e+3),p(this,e+1,e+2);return this},s.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)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Q(this,0,t):g.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),A=(r>>>=0)-(e>>>=0),a=Math.min(o,A),c=this.slice(n,i),u=t.slice(e,r),f=0;f<a;++f)if(c[f]!==u[f]){o=c[f],A=u[f];break}return o<A?-1:A<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return I(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return I(this,t,e,r,!1)},s.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 C(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return B(this,t,e,r);case"base64":return m(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(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 D(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 S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=O(t[o]);return i}function M(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 k(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 x(t,e,r,n,i,o){if(!s.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 R(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function F(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 U(t,e,r,n,o){return o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function H(t,e,r,n,o){return o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;r=new s(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},s.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(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},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(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},s.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||x(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},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||x(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},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=0,A=1,a=0;for(this[e]=255&t;++o<r&&(A*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/A>>0)-a&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=r-1,A=1,a=0;for(this[e+o]=255&t;--o>=0&&(A*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/A>>0)-a&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var 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 A=s.isBuffer(t)?t:T(new s(t,n).toString()),a=A.length;for(o=0;o<r-e;++o)this[o+e]=A[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function O(t){return t<16?"0"+t.toString(16):t.toString(16)}function T(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],A=0;A<n;++A){if((r=t.charCodeAt(A))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(A+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 G(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(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}}).call(this,r(4))},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":r(window))&&(n=window)}t.exports=n},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:A}catch(t){n=A}}();var s,c=[],u=!1,f=-1;function h(){u&&s&&(u=!1,s.length?c=s.concat(c):f=-1,c.length&&l())}function l(){if(!u){var t=a(h);u=!0;for(var e=c.length;e;){for(s=c,c=[];++f<e;)s&&s[f].run();f=-1,e=c.length}s=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===A||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}i.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];c.push(new d(t,e)),1!==c.length||u||a(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var n=e,i=r(2),o=r(6),A=r(136);n.assert=o,n.toArray=A.toArray,n.zero2=A.zero2,n.toHex=A.toHex,n.encode=A.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),A=0;A<n.length;A++){var a,s=o.andln(i-1);o.isOdd()?(a=s>(i>>1)-1?(i>>1)-s:s,o.isubn(a)):a=0,n[A]=a,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var A,a,s=t.andln(3)+i&3,c=e.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),A=0==(1&s)?0:3!==(n=t.andln(7)+i&7)&&5!==n||2!==c?s:-s,r[0].push(A),a=0==(1&c)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==s?c:-c,r[1].push(a),2*i===A+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var n=r(6),i=r(0);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function A(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function s(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var A=t.charCodeAt(i);A<128?r[n++]=A:A<2048?(r[n++]=A>>6|192,r[n++]=63&A|128):o(t,i)?(A=65536+((1023&A)<<10)+(1023&t.charCodeAt(++i)),r[n++]=A>>18|240,r[n++]=A>>12&63|128,r[n++]=A>>6&63|128,r[n++]=63&A|128):(r[n++]=A>>12|224,r[n++]=A>>6&63|128,r[n++]=63&A|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=A,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=A(i)),r+=s(i.toString(16))}return r},e.zero2=a,e.zero8=s,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var A=new Array(o/4),a=0,s=e;a<A.length;a++,s+=4){var c;c="big"===i?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],A[a]=c>>>0}return A},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,A=(o<n?1:0)+r+i;t[e]=A>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,A,a){var s=0,c=e;return s+=(c=c+n>>>0)<e?1:0,s+=(c=c+o>>>0)<o?1:0,t+r+i+A+(s+=(c=c+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,A,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,A,a,s,c){var u=0,f=e;return u+=(f=f+n>>>0)<e?1:0,u+=(f=f+o>>>0)<o?1:0,u+=(f=f+a>>>0)<a?1:0,t+r+i+A+s+(u+=(f=f+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,A,a,s,c){return e+n+o+a+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e,r){var n=r(1).Buffer,i=r(102).Transform,o=r(24).StringDecoder;function A(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(0)(A,i),A.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},A.prototype.setAutoPadding=function(){},A.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},A.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},A.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},A.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},A.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},A.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},A.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=A},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=r(t);return null!=t&&("object"==e||"function"==e)}},function(t,e,r){"use strict";var n=r(36),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=Object.create(r(23));o.inherits=r(0);var A=r(103),a=r(50);o.inherits(f,A);for(var s=i(a.prototype),c=0;c<s.length;c++){var u=s[c];f.prototype[u]||(f.prototype[u]=a.prototype[u])}function f(t){if(!(this instanceof f))return new f(t);A.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){"use strict";(function(e,n){var i=r(1).Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(t);if(t>0)if(t>65536)for(var A=0;A<t;A+=65536)o.getRandomValues(r.slice(A,A+65536));else o.getRandomValues(r);if("function"==typeof e)return n.nextTick((function(){e(null,r)}));return r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(4),r(5))},function(t,e,r){t.exports=r(155)},function(t,e){function r(t,e,r,n,i,o,A){try{var a=t[o](A),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var A=t.apply(e,n);function a(t){r(A,i,o,a,s,"next",t)}function s(t){r(A,i,o,a,s,"throw",t)}a(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(88),o="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,A=i||o||Function("return this")();t.exports=A},function(t,e,r){"use strict";var n=r(0),i=r(51),o=r(54),A=r(55),a=r(10);function s(t){a.call(this,"digest"),this._hash=t}n(s,a),s.prototype._update=function(t){this._hash.update(t)},s.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new s(A(t))}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i={};function o(t,e,r){r||(r=Error);var n=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function A(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}o("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,a,s;if("string"==typeof e&&(o="not ",e.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(A(e,"type"));else{var c=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(c," ").concat(i," ").concat(A(e,"type"))}return s+=". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(109),o=r(113);r(0)(c,i);for(var A=n(o.prototype),a=0;a<A.length;a++){var s=A[a];c.prototype[s]||(c.prototype[s]=o.prototype[s])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)))}function u(){this._writableState.ended||e.nextTick(f,this)}function f(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(5))},function(t,e,r){var n=r(1).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,A=this._len,a=0;a<o;){for(var s=A%i,c=Math.min(o-a,i-s),u=0;u<c;u++)r[s+u]=t[a+u];a+=c,(A+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!=t&&"object"==r(t)}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i,o="object"===("undefined"==typeof Reflect?"undefined":n(Reflect))?Reflect:null,A=o&&"function"==typeof o.apply?o.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};i=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&y(t,"error",e,r)}(t,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+n(t))}function f(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,o,A,a;if(u(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),A=o[e]),void 0===A)A=o[e]=r,++t._eventsCount;else if("function"==typeof A?A=o[e]=n?[r,A]:[A,r]:n?A.unshift(r):A.push(r),(i=f(t))>0&&A.length>i&&!A.warned){A.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=A.length,a=s,console&&console.warn&&console.warn(a)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function g(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):I(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function I(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function y(t,e,r,i){if("function"==typeof t.on)i.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+n(t));t.addEventListener(e,(function n(o){i.once&&t.removeEventListener(e,n),r(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)A(s,this,e);else{var c=s.length,u=I(s,c);for(r=0;r<c;++r)A(u[r],this,e)}return!0},s.prototype.addListener=function(t,e){return h(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return h(this,t,e,!0)},s.prototype.once=function(t,e){return u(e),this.on(t,d(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,d(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,n,i,o,A;if(u(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){A=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,A||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return g(this,t,!0)},s.prototype.rawListeners=function(t){return g(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(t,e,r){(function(t){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"===r(t)},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"===r(t)&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===r(t)||void 0===t},e.isBuffer=t.isBuffer}).call(this,r(3).Buffer)},function(t,e,r){"use strict";var n=r(1).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=s,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function A(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=A(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=A(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=A(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o<n;++o)i[o]=t[o]^r[o];return i}}).call(this,r(3).Buffer)},function(t,e,r){"use strict";var n=r(9),i=r(6);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(0),o=r(68).Reporter,A=r(66).Buffer;function a(t,e){o.call(this,e),A.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function s(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return s.isEncoderBuffer(t)||(t=new s(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=A.byteLength(t);else{if(!A.isBuffer(t))return e.error("Unsupported type: "+n(t));this.value=t,this.length=t.length}}i(a,o),e.DecoderBuffer=a,a.isDecoderBuffer=function(t){return t instanceof a||"object"===n(t)&&A.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},a.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},a.prototype.restore=function(t){var e=new a(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,o.prototype.restore.call(this,t.reporter),e},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},a.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},a.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=s,s.isEncoderBuffer=function(t){return t instanceof s||"object"===n(t)&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},s.prototype.join=function(t,e){return t||(t=A.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):A.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){(function(e,n){var i=r(72),o=r(14),A=r(15),a=r(28),s=r(160);function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}void 0===e&&(e=r(3).Buffer);var f,h,l,d=r(75),g=r(165).default,p=r(166),I=r(76),y=r(170),C=r(171).utils,E=C.keccak256,b=C.getAddress,B={name:"Utils",nullAddress:"0x0000000000000000000000000000000000000000",weiPerEther:new g("1000000000000000000"),ToBigNumber:function(t){return new g(t)},WeiToEther:function(t){return B.ToBigNumber(t).div(B.weiPerEther)},EtherToWei:function(t){return B.ToBigNumber(t).times(B.weiPerEther)},FormatAddress:function(t){return t&&"string"==typeof t?((t=t.trim()).startsWith("0x")||(t="0x"+t),t.toLowerCase()):""},FormatSignature:function(t){return t=t.replace("0x",""),"ES256K_"+d.encode(e.from(t,"hex"))},DecodeVersionHash:function(t){if(!t.startsWith("hq__")&&!t.startsWith("tq__"))throw new Error('Invalid version hash: "'.concat(t,'"'));t=t.slice(4);var r=B.FromB58(t),n=r.slice(0,32),i=n.toString("hex");r=r.slice(32);for(var o=0;r[o]>=128;)o++;o++;var A=r.slice(0,o),a=p.decode(A);return r=r.slice(o),{digest:i,size:a,objectId:"iq__"+B.B58(r),partHash:"hqp_"+B.B58(e.concat([n,A]))}},DecodeSignedToken:function(t){var r=B.FromB58(t.slice(6)),n="0x".concat(r.slice(0,65).toString("hex")),i=JSON.parse(e.from(y.inflateRaw(r.slice(65))).toString("utf-8"));return i.adr=B.FormatAddress("0x".concat(e.from(i.adr,"base64").toString("hex"))),{payload:i,signature:n}},DecodeWriteToken:function(t){if(t.length<4)throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'));var e;if(t.startsWith("tqw__")?(e="tq__",t=t.slice(5)):(e=t.slice(0,4),t=t.slice(4)),0===t.length)throw new Error('Invalid write token: ["'.concat(t,'"] (too short)'));switch(e){case"tqw_":case"tq__":case"tqpw":case"tqp_":case"tlro":break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}var r,n,i,o,A,a=B.FromB58(t);function s(t,e){var r,n,i=p.decode(a,0),o=p.decode.bytes;return n=t?0===(r=a.slice(o+1,i+o)).length?"":e+B.B58(r):"0x"+(r=a.slice(o,i+o)).toString("hex"),a=a.slice(i+o),n}switch(e){case"tqw_":case"tqpw":r="0x"+a.toString("hex");break;case"tlro":case"tq__":n=s(!0,"iq__"),i=s(!0,"inod"),r=s(!1,"");break;case"tqp_":if(a.length<3)throw new Error('Invalid write token: ["'.concat(t,'"] (token truncated)'));o=a[0],A=a[1],a=a.slice(2),r=s(!1,"");break;default:throw new Error('Invalid write token: ["'.concat(t,'"] (unknown prefix)'))}return{tokenType:e,tokenId:r,objectId:n,nodeId:i,scheme:o,flags:A}},AddressToHash:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=t.replace(r?"0x04":"0x",""),d.encode(e.from(t,"hex"))},AddressToSpaceId:function(t){return"ispc"+B.AddressToHash(t)},AddressToLibraryId:function(t){return"ilib"+B.AddressToHash(t)},AddressToObjectId:function(t){return"iq__"+B.AddressToHash(t)},HashToAddress:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e?t:t.substr(4),B.FormatAddress((e?"0x04":"0x")+d.decode(t).toString("hex"))},EqualAddress:function(t,e){return!(!t||!e)&&B.FormatAddress(t)===B.FormatAddress(e)},EqualHash:function(t,e){return!(!t||!e)&&(!(t.length<=4||e.length<=4)&&B.HashToAddress(t)===B.HashToAddress(e))},ValidAddress:function(t){try{return b(t),!0}catch(t){return!1}},ValidHash:function(t){return B.ValidAddress(B.HashToAddress(t))},ToBytes32:function(t){return"0x"+t.split("").map((function(t){return t.charCodeAt(0).toString(16)})).join("").slice(0,64).padEnd(64,"0")},BufferToArrayBuffer:function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)},B64:function(t){return e.from(t,"utf-8").toString("base64")},FromB64:function(t){return e.from(t,"base64").toString("utf-8")},FromB64URL:function(t){var e=(t=t.replace(/-/g,"+").replace(/_/g,"/")).length%4;if(e){if(1===e)throw new Error("InvalidLengthError: Input base64url string is the wrong length to determine padding");t+=new Array(5-e).join("=")}return B.FromB64(t)},B58:function(t){return d.encode(e.from(t))},FromB58:function(t){return d.decode(t)},FromB58ToStr:function(t){return(new TextDecoder).decode(B.FromB58(t))},DecodeAuthorizationToken:function(t){var e=(t=decodeURIComponent(t)).split("."),r=s(e,2),n=r[0],i=r[1];return u(u({},n=JSON.parse(B.FromB64(n))),{},{signature:i})},LimitedMap:(l=A(o.mark((function t(e,r,n){var a,s,c,u,f;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=0,s=!1,c=function(){var t=A(o.mark((function t(){var e;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!s){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,10)}));case 3:t.next=0;break;case 5:return s=!0,e=a,a+=1,s=!1,t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),u=[],f=0,t.abrupt("return",new Promise((function(t,a){i(Array(e||1)).forEach(A(o.mark((function e(){var i;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f+=1,e.next=3,c();case 3:i=e.sent;case 4:if(!(i<r.length)){e.next=19;break}return e.prev=5,e.next=8,n(r[i],i);case 8:u[i]=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),a(e.t0);case 14:return e.next=16,c();case 16:i=e.sent,e.next=4;break;case 19:0==(f-=1)&&t(u);case 21:case"end":return e.stop()}}),e,null,[[5,11]])}))))})));case 6:case"end":return t.stop()}}),t)}))),function(t,e,r){return l.apply(this,arguments)}),ResponseToJson:(h=A(o.mark((function t(e){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",B.ResponseToFormat("json",e));case 1:case"end":return t.stop()}}),t)}))),function(t){return h.apply(this,arguments)}),ResponseToFormat:(f=A(o.mark((function t(e,r){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r;case 2:r=t.sent,t.t0=e.toLowerCase(),t.next="json"===t.t0?6:"text"===t.t0?9:"blob"===t.t0?12:"arraybuffer"===t.t0?15:"formdata"===t.t0?18:"buffer"===t.t0?21:24;break;case 6:return t.next=8,r.json();case 8:return t.abrupt("return",t.sent);case 9:return t.next=11,r.text();case 11:return t.abrupt("return",t.sent);case 12:return t.next=14,r.blob();case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,r.arrayBuffer();case 17:return t.abrupt("return",t.sent);case 18:return t.next=20,r.formData();case 20:return t.abrupt("return",t.sent);case 21:return t.next=23,r.buffer();case 23:return t.abrupt("return",t.sent);case 24:return t.abrupt("return",r);case 25:case"end":return t.stop()}}),t)}))),function(t,e){return f.apply(this,arguments)}),ResizeImage:function(t){var e=t.imageUrl,r=t.height;return!e||e&&!e.startsWith("http")?e:(e=I(e).removeSearch("height").removeSearch("header-x_image_height"),r&&!isNaN(parseInt(r))&&e.addSearch("height",parseInt(r)),e.toString())},SafeTraverse:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(!t)return t;1===r.length&&Array.isArray(r[0])&&(r=r[0]);for(var i=t,o=0;o<r.length;o++)if(void 0===(i=i[r[o]]))return;return i},IsCloneable:function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(e){return B.IsCloneable(t[e])}));case"Map":return i(t.keys()).every(B.IsCloneable)&&i(t.values()).every(B.IsCloneable);case"Set":return i(t.keys()).every(B.IsCloneable);default:return!1}},MakeClonable:function(t){if(B.IsCloneable(t))return t;if(e.isBuffer(t))return B.BufferToArrayBuffer(t);switch({}.toString.call(t).slice(8,-1)){case"Response":case"Function":return;case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return t;case"Array":return t.map((function(t){return B.MakeClonable(t)}));case"Set":return new Set(Array.from(t.keys()).map((function(t){return B.MakeClonable(t)})));case"Map":var r=new Map;return Array.from(t.keys()).forEach((function(e){var n=B.MakeClonable(t.get(e));n&&r.set(e,n)})),r;case"Error":return t.message;case"Object":var n={};return Object.keys(t).map((function(e){var r=B.MakeClonable(t[e]);r&&(n[e]=r)})),n;default:return JSON.parse(JSON.stringify(t))}},PublicKeyToAddress:function(t){var r=new Uint8Array(e.from(t.replace("0x04",""),"hex")),n="0x"+E(r).slice(26);return B.FormatAddress(n)},PLATFORM_NODE:"node",PLATFORM_WEB:"web",PLATFORM_REACT_NATIVE:"react-native",Platform:function(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product?B.PLATFORM_REACT_NATIVE:void 0!==n&&void 0!==n.versions&&void 0!==n.versions.node?B.PLATFORM_NODE:B.PLATFORM_WEB}};t.exports=B}).call(this,r(3).Buffer,r(5))},function(t,e,r){var n=r(177),i=r(178),o=r(179),A=r(180),a=r(181);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=A,s.prototype.set=a,t.exports=s},function(t,e,r){var n=r(32);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(87),i=r(188),o=r(189),A=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":A&&A in Object(t)?i(t):o(t)}},function(t,e,r){var n=r(44)(Object,"create");t.exports=n},function(t,e,r){var n=r(203);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,A,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(a-1),A=0;A<o.length;)o[A++]=arguments[A];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,r(5))},function(t,e,r){var n=r(1).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function A(t,e,r,n,i){for(var o,A,a,s,c=r[0],u=r[1],f=r[2],h=r[3],l=t[0]^e[0],d=t[1]^e[1],g=t[2]^e[2],p=t[3]^e[3],I=4,y=1;y<i;y++)o=c[l>>>24]^u[d>>>16&255]^f[g>>>8&255]^h[255&p]^e[I++],A=c[d>>>24]^u[g>>>16&255]^f[p>>>8&255]^h[255&l]^e[I++],a=c[g>>>24]^u[p>>>16&255]^f[l>>>8&255]^h[255&d]^e[I++],s=c[p>>>24]^u[l>>>16&255]^f[d>>>8&255]^h[255&g]^e[I++],l=o,d=A,g=a,p=s;return o=(n[l>>>24]<<24|n[d>>>16&255]<<16|n[g>>>8&255]<<8|n[255&p])^e[I++],A=(n[d>>>24]<<24|n[g>>>16&255]<<16|n[p>>>8&255]<<8|n[255&l])^e[I++],a=(n[g>>>24]<<24|n[p>>>16&255]<<16|n[l>>>8&255]<<8|n[255&d])^e[I++],s=(n[p>>>24]<<24|n[l>>>16&255]<<16|n[d>>>8&255]<<8|n[255&g])^e[I++],[o>>>=0,A>>>=0,a>>>=0,s>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],A=0,a=0,s=0;s<256;++s){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[A]=c,n[c]=A;var u=t[A],f=t[u],h=t[f],l=257*t[c]^16843008*c;i[0][A]=l<<24|l>>>8,i[1][A]=l<<16|l>>>16,i[2][A]=l<<8|l>>>24,i[3][A]=l,l=16843009*h^65537*f^257*u^16843008*A,o[0][c]=l<<24|l>>>8,o[1][c]=l<<16|l>>>16,o[2][c]=l<<8|l>>>24,o[3][c]=l,0===A?A=a=1:(A=u^t[t[t[h^u]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var A=i[o-1];o%e==0?(A=A<<8|A>>>24,A=s.SBOX[A>>>24]<<24|s.SBOX[A>>>16&255]<<16|s.SBOX[A>>>8&255]<<8|s.SBOX[255&A],A^=a[o/e|0]<<24):e>6&&o%e==4&&(A=s.SBOX[A>>>24]<<24|s.SBOX[A>>>16&255]<<16|s.SBOX[A>>>8&255]<<8|s.SBOX[255&A]),i[o]=i[o-e]^A}for(var c=[],u=0;u<n;u++){var f=n-u,h=i[f-(u%4?0:4)];c[u]=u<4||f<=4?h:s.INV_SUB_MIX[0][s.SBOX[h>>>24]]^s.INV_SUB_MIX[1][s.SBOX[h>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[h>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return A(t=i(t),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=A(t,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,r){var n=r(1).Buffer,i=r(51);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var A=r/8,a=n.alloc(A),s=n.alloc(o||0),c=n.alloc(0);A>0||o>0;){var u=new i;u.update(c),u.update(t),e&&u.update(e),c=u.digest();var f=0;if(A>0){var h=a.length-A;f=Math.min(A,c.length),c.copy(a,h,0,f),A-=f}if(f<c.length&&o>0){var l=s.length-o,d=Math.min(o,c.length-f);c.copy(s,l,f,f+d),o-=d}}return c.fill(0),{key:a,iv:s}}},function(t,e,r){"use strict";var n=r(2),i=r(7),o=i.getNAF,A=i.getJSF,a=i.assert;function s(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var A,s,c=[];for(A=0;A<n.length;A+=r.step){s=0;for(var u=A+r.step-1;u>=A;u--)s=(s<<1)+n[u];c.push(s)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),l=i;l>0;l--){for(A=0;A<c.length;A++)(s=c[A])===l?h=h.mixedAdd(r.points[A]):s===-l&&(h=h.mixedAdd(r.points[A].neg()));f=f.add(h)}return f.toP()},s.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,A=o(e,r,this._bitLength),s=this.jpoint(null,null,null),c=A.length-1;c>=0;c--){for(var u=0;c>=0&&0===A[c];c--)u++;if(c>=0&&u++,s=s.dblp(u),c<0)break;var f=A[c];a(0!==f),s="affine"===t.type?f>0?s.mixedAdd(i[f-1>>1]):s.mixedAdd(i[-f-1>>1].neg()):f>0?s.add(i[f-1>>1]):s.add(i[-f-1>>1].neg())}return"affine"===t.type?s.toP():s},s.prototype._wnafMulAdd=function(t,e,r,n,i){var a,s,c,u=this._wnafT1,f=this._wnafT2,h=this._wnafT3,l=0;for(a=0;a<n;a++){var d=(c=e[a])._getNAFPoints(t);u[a]=d.wnd,f[a]=d.points}for(a=n-1;a>=1;a-=2){var g=a-1,p=a;if(1===u[g]&&1===u[p]){var I=[e[g],null,null,e[p]];0===e[g].y.cmp(e[p].y)?(I[1]=e[g].add(e[p]),I[2]=e[g].toJ().mixedAdd(e[p].neg())):0===e[g].y.cmp(e[p].y.redNeg())?(I[1]=e[g].toJ().mixedAdd(e[p]),I[2]=e[g].add(e[p].neg())):(I[1]=e[g].toJ().mixedAdd(e[p]),I[2]=e[g].toJ().mixedAdd(e[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],C=A(r[g],r[p]);for(l=Math.max(C[0].length,l),h[g]=new Array(l),h[p]=new Array(l),s=0;s<l;s++){var E=0|C[0][s],b=0|C[1][s];h[g][s]=y[3*(E+1)+(b+1)],h[p][s]=0,f[g]=I}}else h[g]=o(r[g],u[g],this._bitLength),h[p]=o(r[p],u[p],this._bitLength),l=Math.max(h[g].length,l),l=Math.max(h[p].length,l)}var B=this.jpoint(null,null,null),m=this._wnafT4;for(a=l;a>=0;a--){for(var w=0;a>=0;){var v=!0;for(s=0;s<n;s++)m[s]=0|h[s][a],0!==m[s]&&(v=!1);if(!v)break;w++,a--}if(a>=0&&w++,B=B.dblp(w),a<0)break;for(s=0;s<n;s++){var Q=m[s];0!==Q&&(Q>0?c=f[s][Q-1>>1]:Q<0&&(c=f[s][-Q-1>>1].neg()),B="affine"===c.type?B.mixedAdd(c):B.add(c))}}for(a=0;a<n;a++)f[a]=null;return i?B:B.toP()},s.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(303),o=r(310),A=r(311),a=r(59),s=r(57),c=r(1).Buffer;function u(t){var e;"object"!==n(t)||c.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=c.from(t));var r,u,f=A(t,e),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":u=i.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=i.PublicKey.decode(l,"der")),r=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=i.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":l=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[t.algorithm.decrypt.cipher.algo.join(".")],A=t.algorithm.decrypt.cipher.iv,u=t.subjectPrivateKey,f=parseInt(i.split("-")[1],10)/8,h=s.pbkdf2Sync(e,r,n,f,"sha1"),l=a.createDecipheriv(i,h,A),d=[];return d.push(l.update(u)),d.push(l.final()),c.concat(d)}(l=i.EncryptedPrivateKey.decode(l,"der"),e);case"PRIVATE KEY":switch(r=(u=i.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:i.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=i.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=i.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=u,u.signature=i.signature},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n=r(187),i=r(193);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(33),i=r(11);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,r){var n=r(90);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(45),i=r(95);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t,e,r){(e=t.exports=r(103)).Stream=e,e.Readable=e,e.Writable=r(50),e.Duplex=r(12),e.Transform=r(107),e.PassThrough=r(247)},function(t,e,r){var n=r(3),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function A(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=A),o(i,A),A.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},A.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},A.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},A.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e,n,i){var o=r(36);function A(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var a,s=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;y.WritableState=I;var c=Object.create(r(23));c.inherits=r(0);var u={deprecate:r(106)},f=r(104),h=r(49).Buffer,l=i.Uint8Array||function(){};var d,g=r(105);function p(){}function I(t,e){a=a||r(12),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(w,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),w(t,e))}(t,r,n,e,i);else{var A=B(r);A||r.corked||r.bufferProcessing||!r.bufferedRequest||b(t,r),n?s(E,t,r,A,i):E(t,r,A,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new A(this)}function y(t){if(a=a||r(12),!(d.call(y,this)||this instanceof a))return new y(t);this._writableState=new I(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function C(t,e,r,n,i,o,A){e.writelen=n,e.writecb=A,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function E(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),w(t,e)}function b(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)i[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;i.allBuffers=s,C(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new A(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,f=r.callback;if(C(t,e,!1,e.objectMode?1:c.length,c,u,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function B(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function m(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),w(t,e)}))}function w(t,e){var r=B(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(m,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(y,f),I.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(I.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===y&&(t&&t._writableState instanceof I)}})):d=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var n,i=this._writableState,A=!1,a=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof l);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=p),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,A=!1;return null===r?A=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(A=new TypeError("Invalid non-string/buffer chunk")),A&&(t.emit("error",A),o.nextTick(n,A),i=!1),i}(this,i,t,r))&&(i.pendingcb++,A=function(t,e,r,n,i,o){if(!r){var A=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==A&&(r=!0,i="buffer",n=A)}var a=e.objectMode?1:n.length;e.length+=a;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,a,n,i,o);return s}(this,i,a,t,e,r)),A},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||b(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,w(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(5),r(245).setImmediate,r(4))},function(t,e,r){"use strict";var n=r(0),i=r(108),o=r(1).Buffer,A=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<<e|t>>>32-e}function c(t,e,r,n,i,o,A){return s(t+(e&r|~e&n)+i+o|0,A)+e|0}function u(t,e,r,n,i,o,A){return s(t+(e&n|r&~n)+i+o|0,A)+e|0}function f(t,e,r,n,i,o,A){return s(t+(e^r^n)+i+o|0,A)+e|0}function h(t,e,r,n,i,o,A){return s(t+(r^(e|~n))+i+o|0,A)+e|0}n(a,i),a.prototype._update=function(){for(var t=A,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,t[0],3614090360,7),o=c(o,r,n,i,t[1],3905402710,12),i=c(i,o,r,n,t[2],606105819,17),n=c(n,i,o,r,t[3],3250441966,22),r=c(r,n,i,o,t[4],4118548399,7),o=c(o,r,n,i,t[5],1200080426,12),i=c(i,o,r,n,t[6],2821735955,17),n=c(n,i,o,r,t[7],4249261313,22),r=c(r,n,i,o,t[8],1770035416,7),o=c(o,r,n,i,t[9],2336552879,12),i=c(i,o,r,n,t[10],4294925233,17),n=c(n,i,o,r,t[11],2304563134,22),r=c(r,n,i,o,t[12],1804603682,7),o=c(o,r,n,i,t[13],4254626195,12),i=c(i,o,r,n,t[14],2792965006,17),r=u(r,n=c(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=u(o,r,n,i,t[6],3225465664,9),i=u(i,o,r,n,t[11],643717713,14),n=u(n,i,o,r,t[0],3921069994,20),r=u(r,n,i,o,t[5],3593408605,5),o=u(o,r,n,i,t[10],38016083,9),i=u(i,o,r,n,t[15],3634488961,14),n=u(n,i,o,r,t[4],3889429448,20),r=u(r,n,i,o,t[9],568446438,5),o=u(o,r,n,i,t[14],3275163606,9),i=u(i,o,r,n,t[3],4107603335,14),n=u(n,i,o,r,t[8],1163531501,20),r=u(r,n,i,o,t[13],2850285829,5),o=u(o,r,n,i,t[2],4243563512,9),i=u(i,o,r,n,t[7],1735328473,14),r=f(r,n=u(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=f(o,r,n,i,t[8],2272392833,11),i=f(i,o,r,n,t[11],1839030562,16),n=f(n,i,o,r,t[14],4259657740,23),r=f(r,n,i,o,t[1],2763975236,4),o=f(o,r,n,i,t[4],1272893353,11),i=f(i,o,r,n,t[7],4139469664,16),n=f(n,i,o,r,t[10],3200236656,23),r=f(r,n,i,o,t[13],681279174,4),o=f(o,r,n,i,t[0],3936430074,11),i=f(i,o,r,n,t[3],3572445317,16),n=f(n,i,o,r,t[6],76029189,23),r=f(r,n,i,o,t[9],3654602809,4),o=f(o,r,n,i,t[12],3873151461,11),i=f(i,o,r,n,t[15],530742520,16),r=h(r,n=f(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,r,n,i,t[7],1126891415,10),i=h(i,o,r,n,t[14],2878612391,15),n=h(n,i,o,r,t[5],4237533241,21),r=h(r,n,i,o,t[12],1700485571,6),o=h(o,r,n,i,t[3],2399980690,10),i=h(i,o,r,n,t[10],4293915773,15),n=h(n,i,o,r,t[1],2240044497,21),r=h(r,n,i,o,t[8],1873313359,6),o=h(o,r,n,i,t[15],4264355552,10),i=h(i,o,r,n,t[6],2734768916,15),n=h(n,i,o,r,t[13],1309151649,21),r=h(r,n,i,o,t[4],4149444226,6),o=h(o,r,n,i,t[11],3174756917,10),i=h(i,o,r,n,t[2],718787259,15),n=h(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},function(t,e,r){(e=t.exports=r(109)).Stream=e,e.Readable=e,e.Writable=r(113),e.Duplex=r(19),e.Transform=r(114),e.PassThrough=r(258),e.finished=r(53),e.pipeline=r(259)},function(t,e,r){"use strict";var n=r(18).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var A=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,s=function(){e.writable||u()},c=e._writableState&&e._writableState.finished,u=function(){a=!1,c=!0,A||o.call(e)},f=e._readableState&&e._readableState.endEmitted,h=function(){A=!1,f=!0,a||o.call(e)},l=function(t){o.call(e,t)},d=function(){var t;return A&&!f?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",u)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",s),e.on("close",s)):(e.on("complete",u),e.on("abort",d),e.req?g():e.on("request",g)),e.on("end",h),e.on("finish",u),!1!==r.error&&e.on("error",l),e.on("close",d),function(){e.removeListener("complete",u),e.removeListener("abort",d),e.removeListener("request",g),e.req&&e.req.removeListener("finish",u),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",u),e.removeListener("end",h),e.removeListener("error",l),e.removeListener("close",d)}}},function(t,e,r){"use strict";var n=r(3).Buffer,i=r(0),o=r(108),A=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],s=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function l(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(t,e){return t<<e|t>>>32-e}function g(t,e,r,n,i,o,A,a){return d(t+(e^r^n)+o+A|0,a)+i|0}function p(t,e,r,n,i,o,A,a){return d(t+(e&r|~e&n)+o+A|0,a)+i|0}function I(t,e,r,n,i,o,A,a){return d(t+((e|~r)^n)+o+A|0,a)+i|0}function y(t,e,r,n,i,o,A,a){return d(t+(e&n|r&~n)+o+A|0,a)+i|0}function C(t,e,r,n,i,o,A,a){return d(t+(e^(r|~n))+o+A|0,a)+i|0}i(l,o),l.prototype._update=function(){for(var t=A,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,l=0|this._e,E=0|this._a,b=0|this._b,B=0|this._c,m=0|this._d,w=0|this._e,v=0;v<80;v+=1){var Q,_;v<16?(Q=g(r,n,i,o,l,t[a[v]],f[0],c[v]),_=C(E,b,B,m,w,t[s[v]],h[0],u[v])):v<32?(Q=p(r,n,i,o,l,t[a[v]],f[1],c[v]),_=y(E,b,B,m,w,t[s[v]],h[1],u[v])):v<48?(Q=I(r,n,i,o,l,t[a[v]],f[2],c[v]),_=I(E,b,B,m,w,t[s[v]],h[2],u[v])):v<64?(Q=y(r,n,i,o,l,t[a[v]],f[3],c[v]),_=p(E,b,B,m,w,t[s[v]],h[3],u[v])):(Q=C(r,n,i,o,l,t[a[v]],f[4],c[v]),_=g(E,b,B,m,w,t[s[v]],h[4],u[v])),r=l,l=o,o=d(i,10),i=n,n=Q,E=w,w=m,m=d(B,10),B=b,b=_}var D=this._b+i+m|0;this._b=this._c+o+w|0,this._c=this._d+l+E|0,this._d=this._e+r+b|0,this._e=this._a+n+B|0,this._a=D},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=l},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(260),e.sha1=r(261),e.sha224=r(262),e.sha256=r(115),e.sha384=r(263),e.sha512=r(116)},function(t,e,r){"use strict";var n=r(0),i=r(264),o=r(10),A=r(1).Buffer,a=r(117),s=r(54),c=r(55),u=A.alloc(128);function f(t,e){o.call(this,"digest"),"string"==typeof e&&(e=A.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new s:c(t)).update(e).digest():e.length<r&&(e=A.concat([e,u],r));for(var n=this._ipad=A.allocUnsafe(r),i=this._opad=A.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new s:c(t),this._hash.update(n)}n(f,o),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new s:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new f("rmd160",e):"md5"===t?new i(a,e):new f(t,e)}},function(t,e,r){e.pbkdf2=r(265),e.pbkdf2Sync=r(122)},function(t,e,r){"use strict";var n=r(6);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,r){var n=r(270),i=r(278),o=r(129);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){var n={ECB:r(271),CBC:r(272),CFB:r(273),CFB8:r(274),CFB1:r(275),OFB:r(276),CTR:r(127),GCM:r(127)},i=r(129);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i;function o(t){this.rand=t}if(t.exports=function(t){return i||(i=new o(null)),i.generate(t)},t.exports.Rand=o,o.prototype.generate=function(t){return this._rand(t)},o.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"===("undefined"==typeof self?"undefined":n(self)))self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"===("undefined"==typeof window?"undefined":n(window))&&(o.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var A=r(281);if("function"!=typeof A.randomBytes)throw new Error("Not supported");o.prototype._rand=function(t){return A.randomBytes(t)}}catch(t){}},function(t,e,r){(function(e){var n=r(2),i=r(13);function o(t){var e,r=t.modulus.byteLength();do{e=new n(i(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function A(t,r){var i=function(t){var e=o(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(r),A=r.modulus.byteLength(),a=new n(t).mul(i.blinder).umod(r.modulus),s=a.toRed(n.mont(r.prime1)),c=a.toRed(n.mont(r.prime2)),u=r.coefficient,f=r.prime1,h=r.prime2,l=s.redPow(r.exponent1).fromRed(),d=c.redPow(r.exponent2).fromRed(),g=l.isub(d).imul(u).umod(f).imul(h);return d.iadd(g).imul(i.unblinder).umod(r.modulus).toArrayLike(e,"be",A)}A.getr=o,t.exports=A}).call(this,r(3).Buffer)},function(t,e,r){"use strict";var n=e;n.version=r(285).version,n.utils=r(7),n.rand=r(61),n.curve=r(137),n.curves=r(64),n.ec=r(296),n.eddsa=r(300)},function(t,e,r){"use strict";var n,i=e,o=r(65),A=r(137),a=r(7).assert;function s(t){"short"===t.type?this.curve=new A.short(t):"edwards"===t.type?this.curve=new A.edwards(t):this.curve=new A.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(295)}catch(t){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(t,e,r){var n=e;n.utils=r(9),n.common=r(26),n.sha=r(289),n.ripemd=r(293),n.hmac=r(294),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,e,r){"use strict";(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i,o=r(3),A=o.Buffer,a={};for(i in o)o.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(a[i]=o[i]);var s=a.Buffer={};for(i in A)A.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(s[i]=A[i]);if(a.Buffer.prototype=A.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,r){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+n(t));if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(t));return A(t,e,r)}),s.alloc||(s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+n(t));if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=A(t);return e&&0!==e.length?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i}),!a.kStringMaxLength)try{a.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(t){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,r(5))},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(68).Reporter,o=r(27).EncoderBuffer,A=r(27).DecoderBuffer,a=r(6),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(t,e,r){var n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};f.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},u.prototype._wrap=function(){var t=this._baseState;c.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},u.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(a(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!==n(t)||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){u.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(r),this}})),u.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},u.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,o=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){var s=null;if(null!==r.explicit?s=r.explicit:null!==r.implicit?s=r.implicit:null!==r.tag&&(s=r.tag),null!==s||r.any){if(o=this._peekTag(t,s,r.any),t.isError(o))return o}else{var c=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(c)}}if(r.obj&&o&&(n=t.enterObject()),o){if(null!==r.explicit){var u=this._decodeTag(t,r.explicit);if(t.isError(u))return u;t=u}var f=t.offset;if(null===r.use&&null===r.choice){var h;r.any&&(h=t.save());var l=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(l))return l;r.any?i=t.raw(h):t=l}if(e&&e.track&&null!==r.tag&&e.track(t.path(),f,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new A(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(d,e)}}return r.obj&&o&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},u.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var A=t.save(),a=r.choice[o];try{var s=a._decode(t,e);if(t.isError(s))return!1;n={type:o,value:s},i=!0}catch(e){return t.restore(A),!1}return!0}),this),i?n:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new o(t,this.reporter)},u.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},u.prototype._encodeValue=function(t,e,r){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(t,e||new i);var A=null;if(this.reporter=e,o.optional&&void 0===t){if(null===o.default)return;t=o.default}var a=null,s=!1;if(o.any)A=this._createEncoderBuffer(t);else if(o.choice)A=this._encodeChoice(t,e);else if(o.contains)a=this._getUse(o.contains,r)._encode(t,e),s=!0;else if(o.children)a=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var i=e.enterKey(r._baseState.key);if("object"!==n(t))return e.error("Child expected, but input is not object");var o=r._encode(t[r._baseState.key],e,t);return e.leaveKey(i),o}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return e.error("Too many args for : "+o.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),c))}else null!==o.use?A=this._getUse(o.use,r)._encode(t,e):(a=this._encodePrimitive(o.tag,t),s=!0);if(!o.any&&null===o.choice){var u=null!==o.implicit?o.implicit:o.tag,f=null===o.implicit?"universal":"context";null===u?null===o.use&&e.error("Tag could be omitted only for .use()"):null===o.use&&(A=this._encodeComposite(u,s,f,a))}return null!==o.explicit&&(A=this._encodeComposite(o.explicit,!1,"context",A)),A},u.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,r){"use strict";var n=r(0);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,r){"use strict";function n(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n(e.tag)},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),A=n[0],a=n[1],s=new o(function(t,e,r){return 3*(e+r)/4-r}(0,A,a)),u=0,f=a>0?A-4:A;for(r=0;r<f;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,s[u++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],A=0,a=r-i;A<a;A+=16383)o.push(u(t,A,A+16383>a?a:A+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=A.length;a<s;++a)n[a]=A[a],i[A.charCodeAt(a)]=a;function c(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,r){for(var i,o,A=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),A.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return A.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
11
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
12
|
+
e.read=function(t,e,r,n,i){var o,A,a=8*i-n-1,s=(1<<a)-1,c=s>>1,u=-7,f=r?i-1:0,h=r?-1:1,l=t[e+f];for(f+=h,o=l&(1<<-u)-1,l>>=-u,u+=a;u>0;o=256*o+t[e+f],f+=h,u-=8);for(A=o&(1<<-u)-1,o>>=-u,u+=n;u>0;A=256*A+t[e+f],f+=h,u-=8);if(0===o)o=1-c;else{if(o===s)return A?NaN:1/0*(l?-1:1);A+=Math.pow(2,n),o-=c}return(l?-1:1)*A*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var A,a,s,c=8*o-i-1,u=(1<<c)-1,f=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,A=u):(A=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-A))<1&&(A--,s*=2),(e+=A+f>=1?h/s:h*Math.pow(2,1-f))*s>=2&&(A++,s/=2),A+f>=u?(a=0,A=u):A+f>=1?(a=(e*s-1)*Math.pow(2,i),A+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),A=0));i>=8;t[r+l]=255&a,l+=d,a/=256,i-=8);for(A=A<<i|a,c+=i;c>0;t[r+l]=255&A,l+=d,A/=256,c-=8);t[r+l-d]|=128*g}},function(t,e,r){var n=r(157),i=r(158),o=r(74),A=r(159);t.exports=function(t){return n(t)||i(t)||o(t)||A()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(73);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(164);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){(function(t){var n,i,o;function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
9
13
|
/*!
|
|
10
14
|
* URI.js - Mutating URLs
|
|
11
15
|
*
|
|
@@ -17,8 +21,8 @@ var n=r(54),i=r(55),o=r(56);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647
|
|
|
17
21
|
* Licensed under
|
|
18
22
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
19
23
|
*
|
|
20
|
-
*/!function(s,u){"use strict";"object"===a(t)&&t.exports?t.exports=u(r(26),r(28),r(29)):(i=[r(26),r(28),r(29)],void 0===(o="function"==typeof(n=u)?n.apply(e,i):n)||(t.exports=o))}(0,(function(t,e,r,n){"use strict";var i=n&&n.URI;function o(t,e){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof o))return r?n?new o(t,e):new o(t):new o;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}o.version="1.19.11";var s=o.prototype,u=Object.prototype.hasOwnProperty;function c(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function h(t){return"Array"===l(t)}function f(t,e){var r,n,i={};if("RegExp"===l(e))i=null;else if(h(e))for(r=0,n=e.length;r<n;r++)i[e[r]]=!0;else i[e]=!0;for(r=0,n=t.length;r<n;r++){(i&&void 0!==i[t[r]]||!i&&e.test(t[r]))&&(t.splice(r,1),n--,r--)}return t}function d(t,e){var r,n;if(h(e)){for(r=0,n=e.length;r<n;r++)if(!d(t,e[r]))return!1;return!0}var i=l(e);for(r=0,n=t.length;r<n;r++)if("RegExp"===i){if("string"==typeof t[r]&&t[r].match(e))return!0}else if(t[r]===e)return!0;return!1}function p(t,e){if(!h(t)||!h(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function y(t){return t.replace(/^\/+|\/+$/g,"")}function m(t){return escape(t)}function v(t){return encodeURIComponent(t).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e]}},o.encode=v,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=v,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var r=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var g,b={encode:"encode",decode:"decode"},w=function(t,e){return function(r){try{return o[e](r+"").replace(o.characters[t][e].expression,(function(r){return o.characters[t][e].map[r]}))}catch(t){return r}}};for(g in b)o[g+"PathSegment"]=w("pathname",b[g]),o[g+"UrnPathSegment"]=w("urnpath",b[g]);var _=function(t,e,r){return function(n){var i;i=r?function(t){return o[e](o[r](t))}:o[e];for(var a=(n+"").split(t),s=0,u=a.length;s<u;s++)a[s]=i(a[s]);return a.join(t)}};function k(t){return function(e,r){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!r),this)}}function x(t,e){return function(r,n){return void 0===r?this._parts[t]||"":(null!==r&&(r+="").charAt(0)===e&&(r=r.substring(1)),this._parts[t]=r,this.build(!n),this)}}o.decodePath=_("/","decodePathSegment"),o.decodeUrnPath=_(":","decodeUrnPathSegment"),o.recodePath=_("/","encodePathSegment","decode"),o.recodeUrnPath=_(":","encodeUrnPathSegment","decode"),o.encodeReserved=w("reserved","encode"),o.parse=function(t,e){var r;return e||(e={preventInvalidHostname:o.preventInvalidHostname}),(r=(t=(t=t.replace(o.leading_whitespace_expression,"")).replace(o.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===(t=(t=t.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3).replace(/\\/g,"/")?(t=t.substring(r+3),t=o.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},o.parseHost=function(t,e){t||(t="");var r,n,i=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,i)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u<s)?(e.hostname=t.substring(0,i)||null,e.port=null):(n=t.substring(0,i).split(":"),e.hostname=n[0]||null,e.port=n[1]||null)}return e.hostname&&"/"!==t.substring(i).charAt(0)&&(i++,t="/"+t),e.preventInvalidHostname&&o.ensureValidHostname(e.hostname,e.protocol),e.port&&o.ensureValidPort(e.port),t.substring(i)||"/"},o.parseAuthority=function(t,e){return t=o.parseUserinfo(t,e),o.parseHost(t,e)},o.parseUserinfo=function(t,e){var r=t;-1!==t.indexOf("\\")&&(t=t.replace(/\\/g,"/"));var n,i=t.indexOf("/"),a=t.lastIndexOf("@",i>-1?i:t.length-1);return a>-1&&(-1===i||a<i)?(n=t.substring(0,a).split(":"),e.username=n[0]?o.decode(n[0]):null,n.shift(),e.password=n[0]?o.decode(n.join(":")):null,t=r.substring(a+1)):(e.username=null,e.password=null),t},o.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,i,a={},s=t.split("&"),c=s.length,l=0;l<c;l++)r=s[l].split("="),n=o.decodeQuery(r.shift(),e),i=r.length?o.decodeQuery(r.join("="),e):null,"__proto__"!==n&&(u.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(i)):a[n]=i);return a},o.build=function(t){var e="",r=!1;return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//",r=!0),e+=o.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&r&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},o.buildHost=function(t){var e="";return t.hostname?(o.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},o.buildAuthority=function(t){return o.buildUserinfo(t)+o.buildHost(t)},o.buildUserinfo=function(t){var e="";return t.username&&(e+=o.encode(t.username)),t.password&&(e+=":"+o.encode(t.password)),e&&(e+="@"),e},o.buildQuery=function(t,e,r){var n,i,a,s,c="";for(i in t)if("__proto__"!==i&&u.call(t,i))if(h(t[i]))for(n={},a=0,s=t[i].length;a<s;a++)void 0!==t[i][a]&&void 0===n[t[i][a]+""]&&(c+="&"+o.buildQueryParameter(i,t[i][a],r),!0!==e&&(n[t[i][a]+""]=!0));else void 0!==t[i]&&(c+="&"+o.buildQueryParameter(i,t[i],r));return c.substring(1)},o.buildQueryParameter=function(t,e,r){return o.encodeQuery(t,r)+(null!==e?"="+o.encodeQuery(e,r):"")},o.addQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&o.addQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=r);"string"==typeof t[e]&&(t[e]=[t[e]]),h(r)||(r=[r]),t[e]=(t[e]||[]).concat(r)}},o.setQuery=function(t,e,r){if("object"===a(e))for(var n in e)u.call(e,n)&&o.setQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===r?null:r}},o.removeQuery=function(t,e,r){var n,i,s;if(h(e))for(n=0,i=e.length;n<i;n++)t[e[n]]=void 0;else if("RegExp"===l(e))for(s in t)e.test(s)&&(t[s]=void 0);else if("object"===a(e))for(s in e)u.call(e,s)&&o.removeQuery(t,s,e[s]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===l(r)?!h(t[e])&&r.test(t[e])?t[e]=void 0:t[e]=f(t[e],r):t[e]!==String(r)||h(r)&&1!==r.length?h(t[e])&&(t[e]=f(t[e],r)):t[e]=void 0:t[e]=void 0}},o.hasQuery=function(t,e,r,n){switch(l(e)){case"String":break;case"RegExp":for(var i in t)if(u.call(t,i)&&e.test(i)&&(void 0===r||o.hasQuery(t,i,r)))return!0;return!1;case"Object":for(var a in e)if(u.call(e,a)&&!o.hasQuery(t,a,e[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(r)){case"Undefined":return e in t;case"Boolean":return r===Boolean(h(t[e])?t[e].length:t[e]);case"Function":return!!r(t[e],e,t);case"Array":return!!h(t[e])&&(n?d:p)(t[e],r);case"RegExp":return h(t[e])?!!n&&d(t[e],r):Boolean(t[e]&&t[e].match(r));case"Number":r=String(r);case"String":return h(t[e])?!!n&&d(t[e],r):t[e]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var t=[],e=[],r=0,n=0;n<arguments.length;n++){var i=new o(arguments[n]);t.push(i);for(var a=i.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&e.push(a[s]),a[s]&&r++}if(!e.length||!r)return new o("");var u=new o("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},o.commonPath=function(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r)){r--;break}return r<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(r)&&"/"===e.charAt(r)||(r=t.substring(0,r).lastIndexOf("/")),t.substring(0,r+1))},o.withinString=function(t,e,r){r||(r={});var n=r.start||o.findUri.start,i=r.end||o.findUri.end,a=r.trim||o.findUri.trim,s=r.parens||o.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(t);if(!c)break;var l=c.index;if(r.ignoreHtml){var h=t.slice(Math.max(l-3,0),l);if(h&&u.test(h))continue}for(var f=l+t.slice(l).search(i),d=t.slice(l,f),p=-1;;){var y=s.exec(d);if(!y)break;var m=y.index+y[0].length;p=Math.max(p,m)}if(!((d=p>-1?d.slice(0,p)+d.slice(p).replace(a,""):d.replace(a,"")).length<=c[0].length||r.ignore&&r.ignore.test(d))){var v=e(d,l,f=l+d.length,t);void 0!==v?(v=String(v),t=t.slice(0,l)+v+t.slice(f),n.lastIndex=l+v.length):n.lastIndex=f}}return n.lastIndex=0,t},o.ensureValidHostname=function(e,r){var n=!!e,i=!1;if(!!r&&(i=d(o.hostProtocols,r)),i&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(e&&e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=i),this},s.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new o(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=k("protocol"),s.username=k("username"),s.password=k("password"),s.hostname=k("hostname"),s.port=k("port"),s.query=x("query","?"),s.fragment=x("fragment","#"),s.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},s.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},s.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(r):r}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this},s.path=s.pathname,s.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var n=t instanceof o,i="object"===a(t)&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[o.getDomAttribute(t)]||"",i=!1);if(!n&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!n&&!i)throw new TypeError("invalid input");var s=n?t._parts:t;for(r in s)"query"!==r&&u.call(this._parts,r)&&(this._parts[r]=s[r]);s.query&&this.query(s.query,!1)}return this.build(!e),this},s.is=function(t){var e=!1,n=!1,i=!1,a=!1,s=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),s=(a=!(e=n||i))&&r&&r.has(this._parts.hostname),u=a&&o.idn_expression.test(this._parts.hostname),c=a&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var A=s.protocol,I=s.port,E=s.hostname;s.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return A.call(this,t,e)},s.scheme=s.protocol,s.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),o.ensureValidPort(t))),I.call(this,t,e))},s.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(t,this._parts.protocol)}return E.call(this,t,e)},s.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=o(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},s.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=o.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this},s.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=o.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},s.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,n),a=new RegExp("^"+c(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&o.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},s.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},s.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[i.toLowerCase()]&&r.get(this._parts.hostname)||i}var o;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},s.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?o.decodePath(n):n}var i=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,i),s=new RegExp("^"+c(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},s.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?o.decodePathSegment(n):n}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(i=!0);var a=new RegExp(c(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t),i?this.normalizePath(e):this.build(!e),this},s.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,i=this.filename(),a=i.lastIndexOf(".");return-1===a?"":(r=i.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?o.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var s,u=this.suffix();if(u)s=t?new RegExp(c(u)+"$"):new RegExp(c("."+u)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t)}return s&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},s.segment=function(t,e,r){var n=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(h(e)){a=[];for(var s=0,u=e.length;s<u;s++)(e[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(y(e[s])))}else(e||"string"==typeof e)&&(e=y(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));else e?a[t]=y(e):a.splice(t,1);return o&&a.unshift(""),this.path(a.join(n),r)},s.segmentCoded=function(t,e,r){var n,i,a;if("number"!=typeof t&&(r=e,e=t,t=void 0),void 0===e){if(h(n=this.segment(t,e,r)))for(i=0,a=n.length;i<a;i++)n[i]=o.decode(n[i]);else n=void 0!==n?o.decode(n):void 0;return n}if(h(e))for(i=0,a=e.length;i<a;i++)e[i]=o.encode(e[i]);else e="string"==typeof e||e instanceof String?o.encode(e):e;return this.segment(t,e,r)};var S=s.query;return s.query=function(t,e){if(!0===t)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=t.call(this,r);return this._parts.query=o.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=o.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):S.call(this,t,e)},s.setQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)n[t]=void 0!==e?e:null;else{if("object"!==a(t))throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in t)u.call(t,i)&&(n[i]=t[i])}return this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.addQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(n,t,void 0===e?null:e),this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.removeQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(n,t,e),this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},s.hasQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(n,t,e,r)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},s.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},s.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},s.normalizePath=function(t){var e,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var n,i,a="";for("/"!==(r=o.recodePath(r)).charAt(0)&&(e=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(i=r.substring(0,n).lastIndexOf("/"))&&(i=n),r=r.substring(0,i)+r.substring(n+3)):r=r.substring(3);return e&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!t),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},s.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var t=o.encode,e=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},s.unicode=function(){var t=o.encode,e=o.decode;o.encode=v,o.decode=unescape;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},s.readable=function(){var e=this.clone();e.username("").password("").normalize();var r="";if(e._parts.protocol&&(r+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(r+=t.toUnicode(e._parts.hostname),e._parts.port&&(r+=":"+e._parts.port)):r+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(r+="/"),r+=e.path(!0),e._parts.query){for(var n="",i=0,a=e._parts.query.split("&"),s=a.length;i<s;i++){var u=(a[i]||"").split("=");n+="&"+o.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+o.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=o.decodeQuery(e.hash(),!0)},s.absoluteTo=function(t){var e,r,n,i=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof o||(t=new o(t)),i._parts.protocol)return i;if(i._parts.protocol=t._parts.protocol,this._parts.hostname)return i;for(r=0;n=a[r];r++)i._parts[n]=t._parts[n];return i._parts.path?(".."===i._parts.path.substring(-2)&&(i._parts.path+="/"),"/"!==i.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),i._parts.path=(e?e+"/":"")+i._parts.path,i.normalizePath())):(i._parts.path=t._parts.path,i._parts.query||(i._parts.query=t._parts.query)),i.build(),i},s.relativeTo=function(t){var e,r,n,i,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new o(t).normalize(),e=s._parts,r=t._parts,i=s.path(),a=t.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===r.protocol&&(e.protocol=null),e.username!==r.username||e.password!==r.password)return s.build();if(null!==e.protocol||null!==e.username||null!==e.password)return s.build();if(e.hostname!==r.hostname||e.port!==r.port)return s.build();if(e.hostname=null,e.port=null,i===a)return e.path="",s.build();if(!(n=o.commonPath(i,a)))return s.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=u+e.path.substring(n.length)||"./",s.build()},s.equals=function(t){var e,r,n,i,a,s=this.clone(),c=new o(t),l={};if(s.normalize(),c.normalize(),s.toString()===c.toString())return!0;if(n=s.query(),i=c.query(),s.query(""),c.query(""),s.toString()!==c.toString())return!1;if(n.length!==i.length)return!1;for(a in e=o.parseQuery(n,this._parts.escapeQuerySpace),r=o.parseQuery(i,this._parts.escapeQuerySpace),e)if(u.call(e,a)){if(h(e[a])){if(!p(e[a],r[a]))return!1}else if(e[a]!==r[a])return!1;l[a]=!0}for(a in r)if(u.call(r,a)&&!l[a])return!1;return!0},s.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this},s.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},s.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},o}))}).call(this,r(0)(t))},function(t,e,r){(function(t,n){var i;function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
21
|
-
/*! https://mths.be/punycode v1.4.0 by @mathias */!function(
|
|
24
|
+
*/!function(a,s){"use strict";"object"===A(t)&&t.exports?t.exports=s(r(77),r(79),r(80)):(i=[r(77),r(79),r(80)],void 0===(o="function"==typeof(n=s)?n.apply(e,i):n)||(t.exports=o))}(0,(function(t,e,r,n){"use strict";var i=n&&n.URI;function o(t,e){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof o))return r?n?new o(t,e):new o(t):new o;if(void 0===t){if(r)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&r)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}o.version="1.19.11";var a=o.prototype,s=Object.prototype.hasOwnProperty;function c(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function f(t){return"Array"===u(t)}function h(t,e){var r,n,i={};if("RegExp"===u(e))i=null;else if(f(e))for(r=0,n=e.length;r<n;r++)i[e[r]]=!0;else i[e]=!0;for(r=0,n=t.length;r<n;r++){(i&&void 0!==i[t[r]]||!i&&e.test(t[r]))&&(t.splice(r,1),n--,r--)}return t}function l(t,e){var r,n;if(f(e)){for(r=0,n=e.length;r<n;r++)if(!l(t,e[r]))return!1;return!0}var i=u(e);for(r=0,n=t.length;r<n;r++)if("RegExp"===i){if("string"==typeof t[r]&&t[r].match(e))return!0}else if(t[r]===e)return!0;return!1}function d(t,e){if(!f(t)||!f(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function g(t){return t.replace(/^\/+|\/+$/g,"")}function p(t){return escape(t)}function I(t){return encodeURIComponent(t).replace(/[!'()*]/g,p).replace(/\*/g,"%2A")}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e]}},o.encode=I,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=I,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var r=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?r.replace(/%20/g,"+"):r},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var y,C={encode:"encode",decode:"decode"},E=function(t,e){return function(r){try{return o[e](r+"").replace(o.characters[t][e].expression,(function(r){return o.characters[t][e].map[r]}))}catch(t){return r}}};for(y in C)o[y+"PathSegment"]=E("pathname",C[y]),o[y+"UrnPathSegment"]=E("urnpath",C[y]);var b=function(t,e,r){return function(n){var i;i=r?function(t){return o[e](o[r](t))}:o[e];for(var A=(n+"").split(t),a=0,s=A.length;a<s;a++)A[a]=i(A[a]);return A.join(t)}};function B(t){return function(e,r){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!r),this)}}function m(t,e){return function(r,n){return void 0===r?this._parts[t]||"":(null!==r&&(r+="").charAt(0)===e&&(r=r.substring(1)),this._parts[t]=r,this.build(!n),this)}}o.decodePath=b("/","decodePathSegment"),o.decodeUrnPath=b(":","decodeUrnPathSegment"),o.recodePath=b("/","encodePathSegment","decode"),o.recodeUrnPath=b(":","encodeUrnPathSegment","decode"),o.encodeReserved=E("reserved","encode"),o.parse=function(t,e){var r;return e||(e={preventInvalidHostname:o.preventInvalidHostname}),(r=(t=(t=t.replace(o.leading_whitespace_expression,"")).replace(o.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(e.fragment=t.substring(r+1)||null,t=t.substring(0,r)),(r=t.indexOf("?"))>-1&&(e.query=t.substring(r+1)||null,t=t.substring(0,r)),"//"===(t=(t=t.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(r=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,r)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(r+1,r+3).replace(/\\/g,"/")?(t=t.substring(r+3),t=o.parseAuthority(t,e)):(t=t.substring(r+1),e.urn=!0)),e.path=t,e},o.parseHost=function(t,e){t||(t="");var r,n,i=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))r=t.indexOf("]"),e.hostname=t.substring(1,r)||null,e.port=t.substring(r+2,i)||null,"/"===e.port&&(e.port=null);else{var A=t.indexOf(":"),a=t.indexOf("/"),s=t.indexOf(":",A+1);-1!==s&&(-1===a||s<a)?(e.hostname=t.substring(0,i)||null,e.port=null):(n=t.substring(0,i).split(":"),e.hostname=n[0]||null,e.port=n[1]||null)}return e.hostname&&"/"!==t.substring(i).charAt(0)&&(i++,t="/"+t),e.preventInvalidHostname&&o.ensureValidHostname(e.hostname,e.protocol),e.port&&o.ensureValidPort(e.port),t.substring(i)||"/"},o.parseAuthority=function(t,e){return t=o.parseUserinfo(t,e),o.parseHost(t,e)},o.parseUserinfo=function(t,e){var r=t;-1!==t.indexOf("\\")&&(t=t.replace(/\\/g,"/"));var n,i=t.indexOf("/"),A=t.lastIndexOf("@",i>-1?i:t.length-1);return A>-1&&(-1===i||A<i)?(n=t.substring(0,A).split(":"),e.username=n[0]?o.decode(n[0]):null,n.shift(),e.password=n[0]?o.decode(n.join(":")):null,t=r.substring(A+1)):(e.username=null,e.password=null),t},o.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,i,A={},a=t.split("&"),c=a.length,u=0;u<c;u++)r=a[u].split("="),n=o.decodeQuery(r.shift(),e),i=r.length?o.decodeQuery(r.join("="),e):null,"__proto__"!==n&&(s.call(A,n)?("string"!=typeof A[n]&&null!==A[n]||(A[n]=[A[n]]),A[n].push(i)):A[n]=i);return A},o.build=function(t){var e="",r=!1;return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//",r=!0),e+=o.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&r&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},o.buildHost=function(t){var e="";return t.hostname?(o.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},o.buildAuthority=function(t){return o.buildUserinfo(t)+o.buildHost(t)},o.buildUserinfo=function(t){var e="";return t.username&&(e+=o.encode(t.username)),t.password&&(e+=":"+o.encode(t.password)),e&&(e+="@"),e},o.buildQuery=function(t,e,r){var n,i,A,a,c="";for(i in t)if("__proto__"!==i&&s.call(t,i))if(f(t[i]))for(n={},A=0,a=t[i].length;A<a;A++)void 0!==t[i][A]&&void 0===n[t[i][A]+""]&&(c+="&"+o.buildQueryParameter(i,t[i][A],r),!0!==e&&(n[t[i][A]+""]=!0));else void 0!==t[i]&&(c+="&"+o.buildQueryParameter(i,t[i],r));return c.substring(1)},o.buildQueryParameter=function(t,e,r){return o.encodeQuery(t,r)+(null!==e?"="+o.encodeQuery(e,r):"")},o.addQuery=function(t,e,r){if("object"===A(e))for(var n in e)s.call(e,n)&&o.addQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=r);"string"==typeof t[e]&&(t[e]=[t[e]]),f(r)||(r=[r]),t[e]=(t[e]||[]).concat(r)}},o.setQuery=function(t,e,r){if("object"===A(e))for(var n in e)s.call(e,n)&&o.setQuery(t,n,e[n]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===r?null:r}},o.removeQuery=function(t,e,r){var n,i,a;if(f(e))for(n=0,i=e.length;n<i;n++)t[e[n]]=void 0;else if("RegExp"===u(e))for(a in t)e.test(a)&&(t[a]=void 0);else if("object"===A(e))for(a in e)s.call(e,a)&&o.removeQuery(t,a,e[a]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===u(r)?!f(t[e])&&r.test(t[e])?t[e]=void 0:t[e]=h(t[e],r):t[e]!==String(r)||f(r)&&1!==r.length?f(t[e])&&(t[e]=h(t[e],r)):t[e]=void 0:t[e]=void 0}},o.hasQuery=function(t,e,r,n){switch(u(e)){case"String":break;case"RegExp":for(var i in t)if(s.call(t,i)&&e.test(i)&&(void 0===r||o.hasQuery(t,i,r)))return!0;return!1;case"Object":for(var A in e)if(s.call(e,A)&&!o.hasQuery(t,A,e[A]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(u(r)){case"Undefined":return e in t;case"Boolean":return r===Boolean(f(t[e])?t[e].length:t[e]);case"Function":return!!r(t[e],e,t);case"Array":return!!f(t[e])&&(n?l:d)(t[e],r);case"RegExp":return f(t[e])?!!n&&l(t[e],r):Boolean(t[e]&&t[e].match(r));case"Number":r=String(r);case"String":return f(t[e])?!!n&&l(t[e],r):t[e]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var t=[],e=[],r=0,n=0;n<arguments.length;n++){var i=new o(arguments[n]);t.push(i);for(var A=i.segment(),a=0;a<A.length;a++)"string"==typeof A[a]&&e.push(A[a]),A[a]&&r++}if(!e.length||!r)return new o("");var s=new o("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||s.path("/"+s.path()),s.normalize()},o.commonPath=function(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r<n;r++)if(t.charAt(r)!==e.charAt(r)){r--;break}return r<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(r)&&"/"===e.charAt(r)||(r=t.substring(0,r).lastIndexOf("/")),t.substring(0,r+1))},o.withinString=function(t,e,r){r||(r={});var n=r.start||o.findUri.start,i=r.end||o.findUri.end,A=r.trim||o.findUri.trim,a=r.parens||o.findUri.parens,s=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(t);if(!c)break;var u=c.index;if(r.ignoreHtml){var f=t.slice(Math.max(u-3,0),u);if(f&&s.test(f))continue}for(var h=u+t.slice(u).search(i),l=t.slice(u,h),d=-1;;){var g=a.exec(l);if(!g)break;var p=g.index+g[0].length;d=Math.max(d,p)}if(!((l=d>-1?l.slice(0,d)+l.slice(d).replace(A,""):l.replace(A,"")).length<=c[0].length||r.ignore&&r.ignore.test(l))){var I=e(l,u,h=u+l.length,t);void 0!==I?(I=String(I),t=t.slice(0,u)+I+t.slice(h),n.lastIndex=u+I.length):n.lastIndex=h}}return n.lastIndex=0,t},o.ensureValidHostname=function(e,r){var n=!!e,i=!1;if(!!r&&(i=l(o.hostProtocols,r)),i&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(e&&e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(e.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(e.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=n.SecondLevelDomains.noConflict()),e}return n.URI===this&&(n.URI=i),this},a.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new o(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=B("protocol"),a.username=B("username"),a.password=B("password"),a.hostname=B("hostname"),a.port=B("port"),a.query=m("query","?"),a.fragment=m("fragment","#"),a.search=function(t,e){var r=this.query(t,e);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(t,e){var r=this.fragment(t,e);return"string"==typeof r&&r.length?"#"+r:r},a.pathname=function(t,e){if(void 0===t||!0===t){var r=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(r):r}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this},a.path=a.pathname,a.href=function(t,e){var r;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var n=t instanceof o,i="object"===A(t)&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[o.getDomAttribute(t)]||"",i=!1);if(!n&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!n&&!i)throw new TypeError("invalid input");var a=n?t._parts:t;for(r in a)"query"!==r&&s.call(this._parts,r)&&(this._parts[r]=a[r]);a.query&&this.query(a.query,!1)}return this.build(!e),this},a.is=function(t){var e=!1,n=!1,i=!1,A=!1,a=!1,s=!1,c=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,n=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),a=(A=!(e=n||i))&&r&&r.has(this._parts.hostname),s=A&&o.idn_expression.test(this._parts.hostname),c=A&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return A;case"sld":return a;case"ip":return e;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return i;case"idn":return s;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var w=a.protocol,v=a.port,Q=a.hostname;a.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return w.call(this,t,e)},a.scheme=a.protocol,a.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),o.ensureValidPort(t))),v.call(this,t,e))},a.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(t,r))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=r.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(t,this._parts.protocol)}return Q.call(this,t,e)},a.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=o(t);return this.protocol(n.protocol()).authority(n.authority()).build(!e),this},a.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var r=o.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this},a.resource=function(t,e){var r;return void 0===t?this.path()+this.search()+this.hash():(r=o.parse(t),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!e),this)},a.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,n),A=new RegExp("^"+c(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&o.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(A,t),this.build(!e),this},a.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(e).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},a.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(n+1);return!0!==e&&r&&r.list[i.toLowerCase()]&&r.get(this._parts.hostname)||i}var o;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},a.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return t?o.decodePath(n):n}var i=this._parts.path.length-this.filename().length,A=this._parts.path.substring(0,i),a=new RegExp("^"+c(A));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t),this.build(!e),this},a.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return t?o.decodePathSegment(n):n}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(i=!0);var A=new RegExp(c(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(A,t),i?this.normalizePath(e):this.build(!e),this},a.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,i=this.filename(),A=i.lastIndexOf(".");return-1===A?"":(r=i.substring(A+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",t?o.decodePathSegment(n):n)}"."===t.charAt(0)&&(t=t.substring(1));var a,s=this.suffix();if(s)a=t?new RegExp(c(s)+"$"):new RegExp(c("."+s)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t)}return a&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t)),this.build(!e),this},a.segment=function(t,e,r){var n=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),A=i.split(n);if(void 0!==t&&"number"!=typeof t&&(r=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&A.shift(),t<0&&(t=Math.max(A.length+t,0)),void 0===e)return void 0===t?A:A[t];if(null===t||void 0===A[t])if(f(e)){A=[];for(var a=0,s=e.length;a<s;a++)(e[a].length||A.length&&A[A.length-1].length)&&(A.length&&!A[A.length-1].length&&A.pop(),A.push(g(e[a])))}else(e||"string"==typeof e)&&(e=g(e),""===A[A.length-1]?A[A.length-1]=e:A.push(e));else e?A[t]=g(e):A.splice(t,1);return o&&A.unshift(""),this.path(A.join(n),r)},a.segmentCoded=function(t,e,r){var n,i,A;if("number"!=typeof t&&(r=e,e=t,t=void 0),void 0===e){if(f(n=this.segment(t,e,r)))for(i=0,A=n.length;i<A;i++)n[i]=o.decode(n[i]);else n=void 0!==n?o.decode(n):void 0;return n}if(f(e))for(i=0,A=e.length;i<A;i++)e[i]=o.encode(e[i]);else e="string"==typeof e||e instanceof String?o.encode(e):e;return this.segment(t,e,r)};var _=a.query;return a.query=function(t,e){if(!0===t)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=t.call(this,r);return this._parts.query=o.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=o.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):_.call(this,t,e)},a.setQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)n[t]=void 0!==e?e:null;else{if("object"!==A(t))throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in t)s.call(t,i)&&(n[i]=t[i])}return this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},a.addQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(n,t,void 0===e?null:e),this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},a.removeQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(n,t,e),this._parts.query=o.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(r=e),this.build(!r),this},a.hasQuery=function(t,e,r){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(n,t,e,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},a.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},a.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},a.normalizePath=function(t){var e,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var n,i,A="";for("/"!==(r=o.recodePath(r)).charAt(0)&&(e=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(A=r.substring(1).match(/^(\.\.\/)+/)||"")&&(A=A[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(i=r.substring(0,n).lastIndexOf("/"))&&(i=n),r=r.substring(0,i)+r.substring(n+3)):r=r.substring(3);return e&&this.is("relative")&&(r=A+r.substring(1)),this._parts.path=r,this.build(!t),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},a.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var t=o.encode,e=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},a.unicode=function(){var t=o.encode,e=o.decode;o.encode=I,o.decode=unescape;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},a.readable=function(){var e=this.clone();e.username("").password("").normalize();var r="";if(e._parts.protocol&&(r+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(r+=t.toUnicode(e._parts.hostname),e._parts.port&&(r+=":"+e._parts.port)):r+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(r+="/"),r+=e.path(!0),e._parts.query){for(var n="",i=0,A=e._parts.query.split("&"),a=A.length;i<a;i++){var s=(A[i]||"").split("=");n+="&"+o.decodeQuery(s[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==s[1]&&(n+="="+o.decodeQuery(s[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=o.decodeQuery(e.hash(),!0)},a.absoluteTo=function(t){var e,r,n,i=this.clone(),A=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof o||(t=new o(t)),i._parts.protocol)return i;if(i._parts.protocol=t._parts.protocol,this._parts.hostname)return i;for(r=0;n=A[r];r++)i._parts[n]=t._parts[n];return i._parts.path?(".."===i._parts.path.substring(-2)&&(i._parts.path+="/"),"/"!==i.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),i._parts.path=(e?e+"/":"")+i._parts.path,i.normalizePath())):(i._parts.path=t._parts.path,i._parts.query||(i._parts.query=t._parts.query)),i.build(),i},a.relativeTo=function(t){var e,r,n,i,A,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new o(t).normalize(),e=a._parts,r=t._parts,i=a.path(),A=t.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==A.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===r.protocol&&(e.protocol=null),e.username!==r.username||e.password!==r.password)return a.build();if(null!==e.protocol||null!==e.username||null!==e.password)return a.build();if(e.hostname!==r.hostname||e.port!==r.port)return a.build();if(e.hostname=null,e.port=null,i===A)return e.path="",a.build();if(!(n=o.commonPath(i,A)))return a.build();var s=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=s+e.path.substring(n.length)||"./",a.build()},a.equals=function(t){var e,r,n,i,A,a=this.clone(),c=new o(t),u={};if(a.normalize(),c.normalize(),a.toString()===c.toString())return!0;if(n=a.query(),i=c.query(),a.query(""),c.query(""),a.toString()!==c.toString())return!1;if(n.length!==i.length)return!1;for(A in e=o.parseQuery(n,this._parts.escapeQuerySpace),r=o.parseQuery(i,this._parts.escapeQuerySpace),e)if(s.call(e,A)){if(f(e[A])){if(!d(e[A],r[A]))return!1}else if(e[A]!==r[A])return!1;u[A]=!0}for(A in r)if(s.call(r,A)&&!u[A])return!1;return!0},a.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this},a.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},a.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},o}))}).call(this,r(8)(t))},function(t,e,r){(function(t,n){var i;function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
25
|
+
/*! https://mths.be/punycode v1.4.0 by @mathias */!function(A){var a="object"==o(e)&&e&&!e.nodeType&&e,s="object"==o(t)&&t&&!t.nodeType&&t,c="object"==(void 0===n?"undefined":o(n))&&n;c.global!==c&&c.window!==c&&c.self!==c||(A=c);var u,f,h=2147483647,l=/^xn--/,d=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=Math.floor,y=String.fromCharCode;function C(t){throw new RangeError(p[t])}function E(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function b(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+E((t=t.replace(g,".")).split("."),e).join(".")}function B(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function m(t){return E(t,(function(t){var e="";return t>65535&&(e+=y((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=y(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function v(t,e,r){var n=0;for(t=r?I(t/700):t>>1,t+=I(t/e);t>455;n+=36)t=I(t/35);return I(n+36*t/(t+38))}function Q(t){var e,r,n,i,o,A,a,s,c,u,f,l=[],d=t.length,g=0,p=128,y=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&C("not-basic"),l.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<d;){for(o=g,A=1,a=36;i>=d&&C("invalid-input"),((s=(f=t.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||s>I((h-g)/A))&&C("overflow"),g+=s*A,!(s<(c=a<=y?1:a>=y+26?26:a-y));a+=36)A>I(h/(u=36-c))&&C("overflow"),A*=u;y=v(g-o,e=l.length+1,0==o),I(g/e)>h-p&&C("overflow"),p+=I(g/e),g%=e,l.splice(g++,0,p)}return m(l)}function _(t){var e,r,n,i,o,A,a,s,c,u,f,l,d,g,p,E=[];for(l=(t=B(t)).length,e=128,r=0,o=72,A=0;A<l;++A)(f=t[A])<128&&E.push(y(f));for(n=i=E.length,i&&E.push("-");n<l;){for(a=h,A=0;A<l;++A)(f=t[A])>=e&&f<a&&(a=f);for(a-e>I((h-r)/(d=n+1))&&C("overflow"),r+=(a-e)*d,e=a,A=0;A<l;++A)if((f=t[A])<e&&++r>h&&C("overflow"),f==e){for(s=r,c=36;!(s<(u=c<=o?1:c>=o+26?26:c-o));c+=36)p=s-u,g=36-u,E.push(y(w(u+p%g,0))),s=I(p/g);E.push(y(w(s,0))),o=v(r,d,n==i),r=0,++n}++r,++e}return E.join("")}if(u={version:"1.3.2",ucs2:{decode:B,encode:m},decode:Q,encode:_,toASCII:function(t){return b(t,(function(t){return d.test(t)?"xn--"+_(t):t}))},toUnicode:function(t){return b(t,(function(t){return l.test(t)?Q(t.slice(4).toLowerCase()):t}))}},"object"==o(r(78))&&r(78))void 0===(i=function(){return u}.call(e,r,e,t))||(t.exports=i);else if(a&&s)if(t.exports==a)s.exports=u;else for(f in u)u.hasOwnProperty(f)&&(a[f]=u[f]);else A.punycode=u}(this)}).call(this,r(8)(t),r(4))},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,r){(function(t){var n,i;function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
22
26
|
/*!
|
|
23
27
|
* URI.js - Mutating URLs
|
|
24
28
|
* IPv6 Support
|
|
@@ -31,7 +35,7 @@ var n=r(54),i=r(55),o=r(56);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647
|
|
|
31
35
|
* Licensed under
|
|
32
36
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
33
37
|
*
|
|
34
|
-
*/!function(a
|
|
38
|
+
*/!function(A,a){"use strict";"object"===o(t)&&t.exports?t.exports=a():void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i)}(0,(function(t){"use strict";var e=t&&t.IPv6;return{best:function(t){var e,r,n=t.toLowerCase().split(":"),i=n.length,o=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[i-1]&&""===n[i-2]&&n.pop(),-1!==n[(i=n.length)-1].indexOf(".")&&(o=7),e=0;e<i&&""!==n[e];e++);if(e<o)for(n.splice(e,1,"0000");n.length<o;)n.splice(e,0,"0000");for(var A=0;A<o;A++){r=n[A].split("");for(var a=0;a<3&&("0"===r[0]&&r.length>1);a++)r.splice(0,1);n[A]=r.join("")}var s=-1,c=0,u=0,f=-1,h=!1;for(A=0;A<o;A++)h?"0"===n[A]?u+=1:(h=!1,u>c&&(s=f,c=u)):"0"===n[A]&&(h=!0,f=A,u=1);u>c&&(s=f,c=u),c>1&&n.splice(s,c,""),i=n.length;var l="";for(""===n[0]&&(l=":"),A=0;A<i&&(l+=n[A],A!==i-1);A++)l+=":";return""===n[i-1]&&(l+=":"),l},noConflict:function(){return t.IPv6===this&&(t.IPv6=e),this}}}))}).call(this,r(8)(t))},function(t,e,r){(function(t){var n,i;function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}
|
|
35
39
|
/*!
|
|
36
40
|
* URI.js - Mutating URLs
|
|
37
41
|
* Second Level Domain (SLD) Support
|
|
@@ -44,8 +48,11 @@ var n=r(54),i=r(55),o=r(56);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647
|
|
|
44
48
|
* Licensed under
|
|
45
49
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
46
50
|
*
|
|
47
|
-
*/!function(a,s){"use strict";"object"===o(t)&&t.exports?t.exports=s():void 0===(i="function"==typeof(n=s)?n.call(e,r,e,t):n)||(t.exports=i)}(0,(function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var i=r.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(n+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var i=r.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return r}))}).call(this,r(0)(t))},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n,i,o;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var r=t.shift();t[0]=r+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<t.length;n++){var i=t[n];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(n>0&&(i=i.replace(/^[\/]+/,"")),i=n<t.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),e.push(i))}var o=e.join("/"),a=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return o=a.shift()+(a.length>0?"?":"")+a.join("&")}return function(){return t("object"===a(arguments[0])?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=o():void 0===(i="function"==typeof(n=o)?n.call(e,r,e,t):n)||(t.exports=i)},function(t,e,r){"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();t.exports=e=n.fetch,n.fetch&&(e.default=n.fetch.bind(n)),e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response},function(t,e,r){var n=r(30),i=function(t,e){return"object"===n(e)&&"function"==typeof e[t]?e[t]:null},o=function(t){return"object"===n(t)?JSON.stringify(t):t};t.exports={LogMessage:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.debug){var n=i("log",t.debugOptions),a=i("error",t.debugOptions),s="(elv-client-js#".concat(t.constructor.name,")"),u="\n".concat(s," ").concat(o(e),"\n");r?a?a(s,e):console.error(u):n?n(s,e):console.log(u)}}}},function(t,e,r){var n=r(17);e.ValidatePresence=function(t,e){if(!e)throw Error("".concat(t," not specified"))},e.ValidateLibrary=function(t){if(!t)throw Error("Library ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid library ID: ".concat(t))},e.ValidateObject=function(t){if(!t)throw Error("Object ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid object ID: ".concat(t))},e.ValidateVersion=function(t){if(!t)throw Error("Version hash not specified");if(!t.toString().startsWith("h"))throw Error("Invalid version hash: ".concat(t))},e.ValidateWriteToken=function(t){if(!t)throw Error("Write token not specified");if(!t.toString().startsWith("t"))throw Error("Invalid write token: ".concat(t))},e.ValidatePartHash=function(t){if(!t)throw Error("Part hash not specified");if(!t.toString().startsWith("hqp_")&&!t.toString().startsWith("hqpe"))throw Error("Invalid part hash: ".concat(t))},e.ValidateParameters=function(t){var r=t.libraryId,n=t.objectId,i=t.versionHash;i?e.ValidateVersion(i):(e.ValidateLibrary(r),e.ValidateObject(n))},e.ValidateAddress=function(t){if(!t)throw Error("Address not specified");if(!/^(0x)?[0-9a-f]{40}$/i.test(t.toLowerCase()))throw Error("Invalid address: ".concat(t));return n.FormatAddress(t)},e.ValidatePermission=function(t){if(t&&"full-access"!==t&&"no-access"!==t)throw Error("Invalid profile permission: ".concat(t));return t},e.ValidateDate=function(t){if(t){if(isNaN(new Date(t)))throw Error("Invalid date: ".concat(t));return new Date(t).getTime()}}},function(t,e,r){var n=r(18)(r(2),"Map");t.exports=n},function(t,e,r){var n=r(2).Symbol;t.exports=n},function(t,e,r){(function(e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n="object"==(void 0===e?"undefined":r(e))&&e&&e.Object===Object&&e;t.exports=n}).call(this,r(5))},function(t,e,r){var n=r(20),i=r(11);t.exports=function(t,e,r){(void 0!==r&&!i(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},function(t,e,r){var n=r(18),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(120)(Object.getPrototypeOf,Object);t.exports=n},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(121),i=r(6),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(2),o=r(123),a="object"==n(e)&&e&&!e.nodeType&&e,s=a&&"object"==n(t)&&t&&!t.nodeType&&t,u=s&&s.exports===a?i.Buffer:void 0,c=(u?u.isBuffer:void 0)||o;t.exports=c}).call(this,r(0)(t))},function(t,e,r){var n=r(125),i=r(126),o=r(127),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,r){var n=r(131),i=r(133),o=r(21);t.exports=function(t){return o(t)?n(t,!0):i(t)}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=r(t);return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(7),i=r(3),o=r(4),a=r(15),s=r(16);function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var f=r(53),d=r(17),p=r(75).permissionLevels,y=r(33).LogMessage,m=function(){"use strict";function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.target,s=r.timeout,u=void 0===s?30:s;a(this,t),this.permissionLevels=p,!n&&"undefined"!=typeof window&&window.parent&&(n=window.parent),this.target=n,this.timeout=u,this.utils=d;var c,h=l(this.AllowedMethods());try{var f=function(){var t=c.value;e[t]=function(){var r=o(i.mark((function r(n){var o;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(o=n&&n.callback)&&delete n.callback,r.next=4,e.SendMessage({options:{calledMethod:t,args:e.utils.MakeClonable(n)},callback:o});case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}()};for(h.s();!(c=h.n()).done;)f()}catch(t){h.e(t)}finally{h.f()}this.userProfileClient={};var y,m=l(this.AllowedUserProfileMethods());try{var v=function(){var r=y.value;e.userProfileClient[r]=function(){var n=o(i.mark((function n(o){var a;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(a=o&&o.callback)&&delete o.callback,n.next=4,e.SendMessage({options:{module:"userProfileClient",calledMethod:r,args:e.utils.MakeClonable(o),prompted:t.PromptedMethods().includes(r)},callback:a});case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()};for(m.s();!(y=m.n()).done;)v()}catch(t){m.e(t)}finally{m.f()}}var e,r,n;return s(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];y(this,t,e)}},{key:"PassRequest",value:(n=o(i.mark((function t(e){var r,n,o,a,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.request,n=e.Respond,t.prev=1,r.callbackId&&(s=function(t){return n({type:"ElvFrameResponse",requestId:r.callbackId,response:t})}),t.next=5,this.SendMessage({options:r,callback:s});case 5:o=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),a=t.t0;case 11:return t.abrupt("return",{type:"ElvFrameResponse",requestId:r.requestId,response:o,error:a});case 12:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t){return n.apply(this,arguments)})},{key:"SendMessage",value:(r=o(i.mark((function e(r){var n,o,a,s,u,l,h,d,p,y;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.options,o=void 0===n?{}:n,a=r.callback,s=r.noResponse,u=void 0!==s&&s,l=f.next(),a&&(h=f.next()),this.target.postMessage(c(c({},o),{},{type:"ElvFrameRequest",requestId:l,callbackId:h}),"*"),!u){e.next=6;break}return e.abrupt("return");case 6:return d=o.calledMethod||o.operation,p=t.FileMethods().includes(o.calledMethod),y=this.timeout,o.prompted||p?y=0:o.args&&o.args.fcTimeout&&(y=o.args.fcTimeout),e.next=12,this.AwaitMessage(l,y,a,h,d);case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e,this)}))),function(t){return r.apply(this,arguments)})},{key:"AwaitMessage",value:(e=o(i.mark((function t(e,r,n,a,s){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,u){var c,l,h,f=function(){l&&clearTimeout(l),r>0&&(l=setTimeout((function(){"undefined"!=typeof window&&(window.removeEventListener("message",c),h&&window.removeEventListener("message",h)),u("Request ".concat(e," timed out (").concat(s,")"))}),1e3*r))};a&&(h=function(t){try{f();var e=t.data;if("ElvFrameResponse"!==e.type||e.requestId!==a)return;n(e.response)}catch(t){console.error(t)}},window.addEventListener("message",h)),c=function(){var r=o(i.mark((function r(n){var o;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,"ElvFrameResponse"===(o=n.data).type&&o.requestId===e){r.next=4;break}return r.abrupt("return");case 4:clearTimeout(l),window.removeEventListener("message",c),h&&window.removeEventListener("message",h),o.error?u(o.error):t(o.response),r.next=16;break;case 10:r.prev=10,r.t0=r.catch(0),clearTimeout(l),window.removeEventListener("message",c),h&&window.removeEventListener("message",h),u(r.t0);case 16:case"end":return r.stop()}}),r,null,[[0,10]])})));return function(t){return r.apply(this,arguments)}}(),f(),window.addEventListener("message",c)}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(t,r,n,i,o){return e.apply(this,arguments)})},{key:"AllowedMethods",value:function(){return["AccessGroupManagers","AccessGroupMembers","AccessGroupOwner","AccessInfo","AccessRequest","AccessType","AddAccessGroupManager","AddAccessGroupMember","AddContentLibraryGroup","AddContentObjectGroupPermission","AddLibraryContentType","AssetMetadata","AvailableDRMs","AvailableOfferings","AwaitPending","BitmovinPlayoutOptions","BlockNumber","CallBitcodeMethod","CallContractMethod","CallContractMethodAndWait","ClearCache","ClearStaticToken","Collection","CollectionTransactions","ConfigUrl","ContentLibraries","ContentLibrary","ContentLibraryGroupPermissions","ContentLibraryOwner","ContentObject","ContentObjectAccessComplete","ContentObjectGraph","ContentObjectGroupPermissions","ContentObjectImageUrl","ContentObjectLibraryId","ContentObjectMetadata","ContentObjectOwner","ContentObjectTenantId","ContentObjectVersions","ContentObjects","ContentPart","ContentParts","ContentSpaceId","ContentType","ContentTypeOwner","ContentTypes","ContractAbi","ContractEvents","ContractMetadata","ContractName","CopyContentObject","CreateABRMezzanine","CreateAccessGroup","CreateAndFinalizeContentObject","CreateContentLibrary","CreateContentObject","CreateContentType","CreateEncryptionConk","CreateFileDirectories","CreateFileUploadJob","CreateLinks","CreateNTPInstance","CreateNonOwnerCap","CreatePart","CreateProductionMaster","CreateSignedToken","CurrentAccountAddress","CustomContractAddress","Decrypt","DecryptECIES","DefaultKMSAddress","DeleteAccessGroup","DeleteContentLibrary","DeleteContentObject","DeleteContentVersion","DeleteFiles","DeleteMetadata","DeleteNTPInstance","DeletePart","DeployContract","Download","DownloadEncrypted","DownloadFile","DownloadPart","EditAndFinalizeContentObject","EditContentObject","Encrypt","EncryptECIES","EncryptionConk","Events","ExtractEventFromLogs","ExtractValueFromEvent","FabricUrl","FileUrl","FinalizeABRMezzanine","FinalizeContentObject","FinalizePart","FinalizeStateChannelAccess","FinalizeUploadJob","FormatContractArguments","GenerateStateChannelToken","GetBalance","InitializeAuthPolicy","IssueNTPCode","IssueSignedNTPCode","LatestVersionHash","LibraryContentTypes","LinkAccessGroupToOauth","LinkData","LinkTarget","LinkUrl","ListAccessGroups","ListFiles","ListNTPInstances","LROStatus","MergeContractMetadata","MergeMetadata","MetadataAuth","MintNFT","NetworkInfo","NodeId","Nodes","NTPInstance","Permission","PlayoutOptions","PlayoutPathResolution","ProduceMetadataLinks","Proofs","PublicRep","PublishContentVersion","QParts","RedeemCode","RemoveAccessGroupManager","RemoveAccessGroupMember","RemoveContentObjectGroupPermission","RemoveContentLibraryGroup","RemoveLibraryContentType","Rep","ReplaceContractMetadata","ReplaceMetadata","Request","ResetRegion","SendFunds","SetAccessCharge","SetAuth","SetAuthContext","SetAuthPolicy","SetContentLibraryImage","SetContentObjectImage","SetCustomContentContract","SetGroupPermission","SetNodes","SetOauthToken","SetPolicyAuthorization","SetSignerFromOauthToken","SetStaticToken","SetVisibility","SetPermission","StartABRMezzanineJobs","SuspendNTPInstance","UnlinkAccessGroupFromOauth","UpdateContentObjectGraph","UpdateNTPInstance","UploadFileData","UploadFilesFromS3","UploadJobStatus","UploadPart","UploadPartChunk","UploadStatus","UseRegion","VerifyContentObject","Visibility"]}},{key:"AllowedUserProfileMethods",value:function(){return["AccessLevel","CollectedTags","CreateWallet","DeleteUserMetadata","MergeUserMetadata","PublicUserMetadata","ReplaceUserMetadata","TenantId","UserMetadata","UserProfileImage","UserWalletAddress","UserWalletObjectInfo","WalletAddress"]}}],[{key:"PromptedMethods",value:function(){return["CollectedTags","DeleteUserMetadata","MergeUserMetadata","ReplaceUserMetadata","UserMetadata"]}},{key:"MetadataMethods",value:function(){return["DeleteUserMetadata","MergeUserMetadata","ReplaceUserMetadata","UserMetadata"]}},{key:"FileMethods",value:function(){return["DownloadFile","DownloadPart","UpdateContentObjectGraph","UploadFiles","UploadFilesFromS3","UploadPart","UploadPartChunk"]}}]),t}(),v=r(144).UploadFiles;m.prototype.UploadFiles=v,e.FrameClient=m},function(t,e,r){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(t){"use strict";var r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new A(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return E()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=_(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h={};function f(){}function d(){}function p(){}var y={};u(y,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(I([])));v&&v!==r&&n.call(v,o)&&(y=v);var g=p.prototype=f.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,r){var i;this._invoke=function(o,a){function s(){return new r((function(i,s){!function i(o,a,s,u){var c=l(t[o],t,a);if("throw"!==c.type){var h=c.arg,f=h.value;return f&&"object"===e(f)&&n.call(f,"__await")?r.resolve(f.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):r.resolve(f).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(c.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}}function _(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return d.prototype=p,u(g,"constructor",p),u(p,"constructor",d),d.displayName=u(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),u(g,s,"Generator"),u(g,o,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=I,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=r}catch(t){"object"===("undefined"==typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,r(0)(t))},function(t,e,r){var n=r(15),i=r(16),o=0,a=function(){"use strict";function t(){n(this,t)}return i(t,null,[{key:"next",value:function(){return++o}}]),t}();t.exports=a},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),a=n[0],s=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),l=0,h=s>0?a-4:a;for(r=0;r<h;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(l(t,a,a+16383>s?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(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 l(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
48
|
-
/*!
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var n=r(8),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){var n;function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(o){"use strict";var a,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u="function"==typeof Symbol&&"symbol"==i(Symbol.iterator),c=Math.ceil,l=Math.floor,h="[BigNumber Error] ",f=h+"Number primitive has more than 15 significant digits: ",d=1e14,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e9;function m(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(r=14-(e=t[n++]+"").length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function g(t,e){var r,n,i=t.c,o=e.c,a=t.s,s=e.s,u=t.e,c=e.e;if(!a||!s)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function b(t,e,r,n){if(t<e||t>r||t!==l(t))throw Error(h+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return m(t.e/14)==e&&t.c[e]%2!=0}function _(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function k(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}(a=function t(e){var r,n,o,a,x,A,I,E,S,M=H.prototype={constructor:H,toString:null,valueOf:null},T=new H(1),P=20,C=4,O=-7,R=21,j=-1e7,N=1e7,L=!1,U=1,D=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz";function H(t,e){var r,i,a,u,c,h,d,p,y=this;if(!(y instanceof H))return new H(t,e);if(null==e){if(t&&!0===t._isBigNumber)return y.s=t.s,void(!t.c||t.e>N?y.c=y.e=null:t.e<j?y.c=[y.e=0]:(y.e=t.e,y.c=t.c.slice()));if((h="number"==typeof t)&&0*t==0){if(y.s=1/t<0?(t=-t,-1):1,t===~~t){for(u=0,c=t;c>=10;c/=10,u++);return void(u>N?y.c=y.e=null:(y.e=u,y.c=[t]))}p=String(t)}else{if(!s.test(p=String(t)))return o(y,p,h);y.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(u=p.indexOf("."))>-1&&(p=p.replace(".","")),(c=p.search(/e/i))>0?(u<0&&(u=c),u+=+p.slice(c+1),p=p.substring(0,c)):u<0&&(u=p.length)}else{if(b(e,2,z.length,"Base"),10==e)return V(y=new H(t),P+y.e+1,C);if(p=String(t),h="number"==typeof t){if(0*t!=0)return o(y,p,h,e);if(y.s=1/t<0?(p=p.slice(1),-1):1,H.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(f+t)}else y.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=z.slice(0,e),u=c=0,d=p.length;c<d;c++)if(r.indexOf(i=p.charAt(c))<0){if("."==i){if(c>u){u=d;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,c=-1,u=0;continue}return o(y,String(t),h,e)}h=!1,(u=(p=n(p,e,10,y.s)).indexOf("."))>-1?p=p.replace(".",""):u=p.length}for(c=0;48===p.charCodeAt(c);c++);for(d=p.length;48===p.charCodeAt(--d););if(p=p.slice(c,++d)){if(d-=c,h&&H.DEBUG&&d>15&&(t>9007199254740991||t!==l(t)))throw Error(f+y.s*t);if((u=u-c-1)>N)y.c=y.e=null;else if(u<j)y.c=[y.e=0];else{if(y.e=u,y.c=[],c=(u+1)%14,u<0&&(c+=14),c<d){for(c&&y.c.push(+p.slice(0,c)),d-=14;c<d;)y.c.push(+p.slice(c,c+=14));c=14-(p=p.slice(c)).length}else c-=d;for(;c--;p+="0");y.c.push(+p)}}else y.c=[y.e=0]}function F(t,e,r,n){var i,o,a,s,u;if(null==r?r=C:b(r,0,8),!t.c)return t.toString();if(i=t.c[0],a=t.e,null==e)u=v(t.c),u=1==n||2==n&&(a<=O||a>=R)?_(u,a):k(u,a,"0");else if(o=(t=V(new H(t),e,r)).e,s=(u=v(t.c)).length,1==n||2==n&&(e<=o||o<=O)){for(;s<e;u+="0",s++);u=_(u,o)}else if(e-=a,u=k(u,o,"0"),o+1>s){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function q(t,e){for(var r,n=1,i=new H(t[0]);n<t.length;n++){if(!(r=new H(t[n])).s){i=r;break}e.call(i,r)&&(i=r)}return i}function G(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+14*r-1)>N?t.c=t.e=null:r<j?t.c=[t.e=0]:(t.e=r,t.c=e),t}function V(t,e,r,n){var i,o,a,s,u,h,f,y=t.c,m=p;if(y){t:{for(i=1,s=y[0];s>=10;s/=10,i++);if((o=e-i)<0)o+=14,a=e,f=(u=y[h=0])/m[i-a-1]%10|0;else if((h=c((o+1)/14))>=y.length){if(!n)break t;for(;y.length<=h;y.push(0));u=f=0,i=1,a=(o%=14)-14+1}else{for(u=s=y[h],i=1;s>=10;s/=10,i++);f=(a=(o%=14)-14+i)<0?0:u/m[i-a-1]%10|0}if(n=n||e<0||null!=y[h+1]||(a<0?u:u%m[i-a-1]),n=r<4?(f||n)&&(0==r||r==(t.s<0?3:2)):f>5||5==f&&(4==r||n||6==r&&(o>0?a>0?u/m[i-a]:0:y[h-1])%10&1||r==(t.s<0?8:7)),e<1||!y[0])return y.length=0,n?(e-=t.e+1,y[0]=m[(14-e%14)%14],t.e=-e||0):y[0]=t.e=0,t;if(0==o?(y.length=h,s=1,h--):(y.length=h+1,s=m[14-o],y[h]=a>0?l(u/m[i-a]%m[a])*s:0),n)for(;;){if(0==h){for(o=1,a=y[0];a>=10;a/=10,o++);for(a=y[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(t.e++,y[0]==d&&(y[0]=1));break}if(y[h]+=s,y[h]!=d)break;y[h--]=0,s=1}for(o=y.length;0===y[--o];y.pop());}t.e>N?t.c=t.e=null:t.e<j&&(t.c=[t.e=0])}return t}function K(t){var e,r=t.e;return null===r?t.toString():(e=v(t.c),e=r<=O||r>=R?_(e,r):k(e,r,"0"),t.s<0?"-"+e:e)}return H.clone=t,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(t){var e,r;if(null!=t){if("object"!=i(t))throw Error(h+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(b(r=t[e],0,y,e),P=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(b(r=t[e],0,8,e),C=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(b(r[0],-y,0,e),b(r[1],0,y,e),O=r[0],R=r[1]):(b(r,-y,y,e),O=-(R=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)b(r[0],-y,-1,e),b(r[1],1,y,e),j=r[0],N=r[1];else{if(b(r,-y,y,e),!r)throw Error(h+e+" cannot be zero: "+r);j=-(N=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(h+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw L=!r,Error(h+"crypto unavailable");L=r}else L=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(b(r=t[e],0,9,e),U=r),t.hasOwnProperty(e="POW_PRECISION")&&(b(r=t[e],0,y,e),D=r),t.hasOwnProperty(e="FORMAT")){if("object"!=i(r=t[e]))throw Error(h+e+" not an object: "+r);B=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(h+e+" invalid: "+r);z=r}}return{DECIMAL_PLACES:P,ROUNDING_MODE:C,EXPONENTIAL_AT:[O,R],RANGE:[j,N],CRYPTO:L,MODULO_MODE:U,POW_PRECISION:D,FORMAT:B,ALPHABET:z}},H.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!H.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-y&&i<=y&&i===l(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=d||r!==l(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(h+"Invalid BigNumber: "+t)},H.maximum=H.max=function(){return q(arguments,M.lt)},H.minimum=H.min=function(){return q(arguments,M.gt)},H.random=(a=9007199254740992*Math.random()&2097151?function(){return l(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,o,s=0,u=[],f=new H(T);if(null==t?t=P:b(t,0,y),i=c(t/14),L)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(o=131072*e[s]+(e[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[s]=r[0],e[s+1]=r[1]):(u.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw L=!1,Error(h+"crypto unavailable");for(e=crypto.randomBytes(i*=7);s<i;)(o=281474976710656*(31&e[s])+1099511627776*e[s+1]+4294967296*e[s+2]+16777216*e[s+3]+(e[s+4]<<16)+(e[s+5]<<8)+e[s+6])>=9e15?crypto.randomBytes(7).copy(e,s):(u.push(o%1e14),s+=7);s=i/7}if(!L)for(;s<i;)(o=a())<9e15&&(u[s++]=o%1e14);for(t%=14,(i=u[--s])&&t&&(o=p[14-t],u[s]=l(i/o)*o);0===u[s];u.pop(),s--);if(s<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=14);for(s=1,o=u[0];o>=10;o/=10,s++);s<14&&(n-=14-s)}return f.e=n,f.c=u,f}),H.sum=function(){for(var t=1,e=arguments,r=new H(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){function t(t,e,r,n){for(var i,o,a=[0],s=0,u=t.length;s<u;){for(o=a.length;o--;a[o]*=e);for(a[0]+=n.indexOf(t.charAt(s++)),i=0;i<a.length;i++)a[i]>r-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(e,n,i,o,a){var s,u,c,l,h,f,d,p,y=e.indexOf("."),m=P,g=C;for(y>=0&&(l=D,D=0,e=e.replace(".",""),f=(p=new H(n)).pow(e.length-y),D=l,p.c=t(k(v(f.c),f.e,"0"),10,i,"0123456789"),p.e=p.c.length),c=l=(d=t(e,n,i,a?(s=z,"0123456789"):(s="0123456789",z))).length;0==d[--l];d.pop());if(!d[0])return s.charAt(0);if(y<0?--c:(f.c=d,f.e=c,f.s=o,d=(f=r(f,p,m,g,i)).c,h=f.r,c=f.e),y=d[u=c+m+1],l=i/2,h=h||u<0||null!=d[u+1],h=g<4?(null!=y||h)&&(0==g||g==(f.s<0?3:2)):y>l||y==l&&(4==g||h||6==g&&1&d[u-1]||g==(f.s<0?8:7)),u<1||!d[0])e=h?k(s.charAt(1),-m,s.charAt(0)):s.charAt(0);else{if(d.length=u,h)for(--i;++d[--u]>i;)d[u]=0,u||(++c,d=[1].concat(d));for(l=d.length;!d[--l];);for(y=0,e="";y<=l;e+=s.charAt(d[y++]));e=k(e,c,s.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,i,o,a,s=0,u=t.length,c=e%1e7,l=e/1e7|0;for(t=t.slice();u--;)s=((i=c*(o=t[u]%1e7)+(n=l*o+(a=t[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|0)+l*a,t[u]=i%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,i,o,a,s){var u,c,h,f,p,y,v,g,b,w,_,k,x,A,I,E,S,M=n.s==i.s?1:-1,T=n.c,P=i.c;if(!(T&&T[0]&&P&&P[0]))return new H(n.s&&i.s&&(T?!P||T[0]!=P[0]:P)?T&&0==T[0]||!P?0*M:M/0:NaN);for(b=(g=new H(M)).c=[],M=o+(c=n.e-i.e)+1,s||(s=d,c=m(n.e/14)-m(i.e/14),M=M/14|0),h=0;P[h]==(T[h]||0);h++);if(P[h]>(T[h]||0)&&c--,M<0)b.push(1),f=!0;else{for(A=T.length,E=P.length,h=0,M+=2,(p=l(s/(P[0]+1)))>1&&(P=t(P,p,s),T=t(T,p,s),E=P.length,A=T.length),x=E,_=(w=T.slice(0,E)).length;_<E;w[_++]=0);S=P.slice(),S=[0].concat(S),I=P[0],P[1]>=s/2&&I++;do{if(p=0,(u=e(P,w,E,_))<0){if(k=w[0],E!=_&&(k=k*s+(w[1]||0)),(p=l(k/I))>1)for(p>=s&&(p=s-1),v=(y=t(P,p,s)).length,_=w.length;1==e(y,w,v,_);)p--,r(y,E<v?S:P,v,s),v=y.length,u=1;else 0==p&&(u=p=1),v=(y=P.slice()).length;if(v<_&&(y=[0].concat(y)),r(w,y,_,s),_=w.length,-1==u)for(;e(P,w,E,_)<1;)p++,r(w,E<_?S:P,_,s),_=w.length}else 0===u&&(p++,w=[0]);b[h++]=p,w[0]?w[_++]=T[x]||0:(w=[T[x]],_=1)}while((x++<A||null!=w[0])&&M--);f=null!=w[0],b[0]||b.splice(0,1)}if(s==d){for(h=1,M=b[0];M>=10;M/=10,h++);V(g,o+(g.e=h+14*c-1)+1,a,f)}else g.e=c,g.r=+f;return g}}(),x=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,I=/^\.([^.]+)$/,E=/^-?(Infinity|NaN)$/,S=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(t,e,r,n){var i,o=r?e:e.replace(S,"");if(E.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(x,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(A,"$1").replace(I,"0.$1")),e!=o))return new H(o,i);if(H.DEBUG)throw Error(h+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},M.absoluteValue=M.abs=function(){var t=new H(this);return t.s<0&&(t.s=1),t},M.comparedTo=function(t,e){return g(this,new H(t,e))},M.decimalPlaces=M.dp=function(t,e){var r,n,i,o=this;if(null!=t)return b(t,0,y),null==e?e=C:b(e,0,8),V(new H(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=14*((i=r.length-1)-m(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},M.dividedBy=M.div=function(t,e){return r(this,new H(t,e),P,C)},M.dividedToIntegerBy=M.idiv=function(t,e){return r(this,new H(t,e),0,1)},M.exponentiatedBy=M.pow=function(t,e){var r,n,i,o,a,s,u,f,d=this;if((t=new H(t)).c&&!t.isInteger())throw Error(h+"Exponent not an integer: "+K(t));if(null!=e&&(e=new H(e)),a=t.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!t.c||!t.c[0])return f=new H(Math.pow(+K(d),a?2-w(t):+K(t))),e?f.mod(e):f;if(s=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new H(NaN);(n=!s&&d.isInteger()&&e.isInteger())&&(d=d.mod(e))}else{if(t.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||a&&d.c[1]>=24e7:d.c[0]<8e13||a&&d.c[0]<=9999975e7)))return o=d.s<0&&w(t)?-0:0,d.e>-1&&(o=1/o),new H(s?1/o:o);D&&(o=c(D/14+2))}for(a?(r=new H(.5),s&&(t.s=1),u=w(t)):u=(i=Math.abs(+K(t)))%2,f=new H(T);;){if(u){if(!(f=f.times(d)).c)break;o?f.c.length>o&&(f.c.length=o):n&&(f=f.mod(e))}if(i){if(0===(i=l(i/2)))break;u=i%2}else if(V(t=t.times(r),t.e+1,1),t.e>14)u=w(t);else{if(0===(i=+K(t)))break;u=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):n&&(d=d.mod(e))}return n?f:(s&&(f=T.div(f)),e?f.mod(e):o?V(f,D,C,void 0):f)},M.integerValue=function(t){var e=new H(this);return null==t?t=C:b(t,0,8),V(e,e.e+1,t)},M.isEqualTo=M.eq=function(t,e){return 0===g(this,new H(t,e))},M.isFinite=function(){return!!this.c},M.isGreaterThan=M.gt=function(t,e){return g(this,new H(t,e))>0},M.isGreaterThanOrEqualTo=M.gte=function(t,e){return 1===(e=g(this,new H(t,e)))||0===e},M.isInteger=function(){return!!this.c&&m(this.e/14)>this.c.length-2},M.isLessThan=M.lt=function(t,e){return g(this,new H(t,e))<0},M.isLessThanOrEqualTo=M.lte=function(t,e){return-1===(e=g(this,new H(t,e)))||0===e},M.isNaN=function(){return!this.s},M.isNegative=function(){return this.s<0},M.isPositive=function(){return this.s>0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.minus=function(t,e){var r,n,i,o,a=this,s=a.s;if(e=(t=new H(t,e)).s,!s||!e)return new H(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/14,c=t.e/14,l=a.c,h=t.c;if(!u||!c){if(!l||!h)return l?(t.s=-e,t):new H(h?a:NaN);if(!l[0]||!h[0])return h[0]?(t.s=-e,t):new H(l[0]?a:3==C?-0:0)}if(u=m(u),c=m(c),l=l.slice(),s=u-c){for((o=s<0)?(s=-s,i=l):(c=u,i=h),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(n=(o=(s=l.length)<(e=h.length))?s:e,s=e=0;e<n;e++)if(l[e]!=h[e]){o=l[e]<h[e];break}if(o&&(i=l,l=h,h=i,t.s=-t.s),(e=(n=h.length)-(r=l.length))>0)for(;e--;l[r++]=0);for(e=d-1;n>s;){if(l[--n]<h[n]){for(r=n;r&&!l[--r];l[r]=e);--l[r],l[n]+=d}l[n]-=h[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?G(t,l,c):(t.s=3==C?-1:1,t.c=[t.e=0],t)},M.modulo=M.mod=function(t,e){var n,i,o=this;return t=new H(t,e),!o.c||!t.s||t.c&&!t.c[0]?new H(NaN):!t.c||o.c&&!o.c[0]?new H(o):(9==U?(i=t.s,t.s=1,n=r(o,t,0,3),t.s=i,n.s*=i):n=r(o,t,0,U),(t=o.minus(n.times(t))).c[0]||1!=U||(t.s=o.s),t)},M.multipliedBy=M.times=function(t,e){var r,n,i,o,a,s,u,c,l,h,f,p,y,v,g=this,b=g.c,w=(t=new H(t,e)).c;if(!(b&&w&&b[0]&&w[0]))return!g.s||!t.s||b&&!b[0]&&!w||w&&!w[0]&&!b?t.c=t.e=t.s=null:(t.s*=g.s,b&&w?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=m(g.e/14)+m(t.e/14),t.s*=g.s,(u=b.length)<(h=w.length)&&(y=b,b=w,w=y,i=u,u=h,h=i),i=u+h,y=[];i--;y.push(0));for(v=d,1e7,i=h;--i>=0;){for(r=0,f=w[i]%1e7,p=w[i]/1e7|0,o=i+(a=u);o>i;)r=((c=f*(c=b[--a]%1e7)+(s=p*c+(l=b[a]/1e7|0)*f)%1e7*1e7+y[o]+r)/v|0)+(s/1e7|0)+p*l,y[o--]=c%v;y[o]=r}return r?++n:y.splice(0,1),G(t,y,n)},M.negated=function(){var t=new H(this);return t.s=-t.s||null,t},M.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new H(t,e)).s,!i||!e)return new H(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/14,a=t.e/14,s=n.c,u=t.c;if(!o||!a){if(!s||!u)return new H(i/0);if(!s[0]||!u[0])return u[0]?t:new H(s[0]?n:0*i)}if(o=m(o),a=m(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=i),i=0;e;)i=(s[--e]=s[e]+u[e]+i)/d|0,s[e]=d===s[e]?0:s[e]%d;return i&&(s=[i].concat(s),++a),G(t,s,a)},M.precision=M.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return b(t,1,y),null==e?e=C:b(e,0,8),V(new H(o),t,e);if(!(r=o.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},M.shiftedBy=function(t){return b(t,-9007199254740991,9007199254740991),this.times("1e"+t)},M.squareRoot=M.sqrt=function(){var t,e,n,i,o,a=this,s=a.c,u=a.s,c=a.e,l=P+4,h=new H("0.5");if(1!==u||!s||!s[0])return new H(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+K(a)))||u==1/0?(((e=v(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=m((c+1)/2)-(c<0||c%2),n=new H(e=u==1/0?"1e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new H(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(o=n,n=h.times(o.plus(r(a,o,l,1))),v(o.c).slice(0,u)===(e=v(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(e=e.slice(u-3,u+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(V(n,n.e+P+2,1),t=!n.times(n).eq(a));break}if(!i&&(V(o,o.e+P+2,0),o.times(o).eq(a))){n=o;break}l+=4,u+=4,i=1}return V(n,n.e+P+1,C,t)},M.toExponential=function(t,e){return null!=t&&(b(t,0,y),t++),F(this,t,e,1)},M.toFixed=function(t,e){return null!=t&&(b(t,0,y),t=t+this.e+1),F(this,t,e)},M.toFormat=function(t,e,r){var n,o=this;if(null==r)null!=t&&e&&"object"==i(e)?(r=e,e=null):t&&"object"==i(t)?(r=t,t=e=null):r=B;else if("object"!=i(r))throw Error(h+"Argument not an object: "+r);if(n=o.toFixed(t,e),o.c){var a,s=n.split("."),u=+r.groupSize,c=+r.secondaryGroupSize,l=r.groupSeparator||"",f=s[0],d=s[1],p=o.s<0,y=p?f.slice(1):f,m=y.length;if(c&&(a=u,u=c,c=a,m-=a),u>0&&m>0){for(a=m%u||u,f=y.substr(0,a);a<m;a+=u)f+=l+y.substr(a,u);c>0&&(f+=l+y.slice(a)),p&&(f="-"+f)}n=d?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):f}return(r.prefix||"")+n+(r.suffix||"")},M.toFraction=function(t){var e,n,i,o,a,s,u,c,l,f,d,y,m=this,g=m.c;if(null!=t&&(!(u=new H(t)).isInteger()&&(u.c||1!==u.s)||u.lt(T)))throw Error(h+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!g)return new H(m);for(e=new H(T),l=n=new H(T),i=c=new H(T),y=v(g),a=e.e=y.length-m.e-1,e.c[0]=p[(s=a%14)<0?14+s:s],t=!t||u.comparedTo(e)>0?a>0?e:l:u,s=N,N=1/0,u=new H(y),c.c[0]=0;f=r(u,e,0,1),1!=(o=n.plus(f.times(i))).comparedTo(t);)n=i,i=o,l=c.plus(f.times(o=l)),c=o,e=u.minus(f.times(o=e)),u=o;return o=r(t.minus(n),i,0,1),c=c.plus(o.times(l)),n=n.plus(o.times(i)),c.s=l.s=m.s,d=r(l,i,a*=2,C).minus(m).abs().comparedTo(r(c,n,a,C).minus(m).abs())<1?[l,i]:[c,n],N=s,d},M.toNumber=function(){return+K(this)},M.toPrecision=function(t,e){return null!=t&&b(t,1,y),F(this,t,e,2)},M.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=O||o>=R?_(v(r.c),o):k(v(r.c),o,"0"):10===t?e=k(v((r=V(new H(r),P+o+1,C)).c),r.e,"0"):(b(t,2,z.length,"Base"),e=n(k(v(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},M.valueOf=M.toJSON=function(){return K(this)},M._isBigNumber=!0,u&&(M[Symbol.toStringTag]="BigNumber",M[Symbol.for("nodejs.util.inspect.custom")]=M.valueOf),null!=e&&H.set(e),H}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){t.exports={encode:r(70),decode:r(71),encodingLength:r(72)}},function(t,e){t.exports=function t(e,n,i){n=n||[];var o=i=i||0;for(;e>=r;)n[i++]=255&e|128,e/=128;for(;-128&e;)n[i++]=255&e|128,e>>>=7;return n[i]=0|e,t.bytes=i-o+1,n};var r=Math.pow(2,31)},function(t,e){t.exports=function t(e,r){var n,i=0,o=0,a=r=r||0,s=e.length;do{if(a>=s)throw t.bytes=0,new RangeError("Could not decode varint");n=e[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return t.bytes=a-r,i}},function(t,e){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),a=Math.pow(2,35),s=Math.pow(2,42),u=Math.pow(2,49),c=Math.pow(2,56),l=Math.pow(2,63);t.exports=function(t){return t<r?1:t<n?2:t<i?3:t<o?4:t<a?5:t<s?6:t<u?7:t<c?8:t<l?9:10}},function(t,e,r){"use strict";r.r(e),r.d(e,"Deflate",(function(){return We})),r.d(e,"Inflate",(function(){return $e})),r.d(e,"constants",(function(){return rr})),r.d(e,"default",(function(){return nr})),r.d(e,"deflate",(function(){return Je})),r.d(e,"deflateRaw",(function(){return Qe})),r.d(e,"gzip",(function(){return Ye})),r.d(e,"inflate",(function(){return Xe})),r.d(e,"inflateRaw",(function(){return tr})),r.d(e,"ungzip",(function(){return er}));function n(t){let e=t.length;for(;--e>=0;)t[e]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);n(u);const c=new Array(60);n(c);const l=new Array(512);n(l);const h=new Array(256);n(h);const f=new Array(29);n(f);const d=new Array(30);function p(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let y,m,v;function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(d);const b=t=>t<256?l[t]:l[256+(t>>>7)],w=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},_=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},k=(t,e,r)=>{_(t,r[2*e],r[2*e+1])},x=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},A=(t,e,r)=>{const n=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)n[i]=a=a+r[i-1]<<1;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=x(n[e]++,e))}},I=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},E=t=>{t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]},M=(t,e,r)=>{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i<t.heap_len&&S(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!S(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},T=(t,e,r)=>{let n,a,s,u,c=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],a=t.pending_buf[t.l_buf+c],c++,0===n?k(t,a,e):(s=h[a],k(t,s+256+1,e),u=i[s],0!==u&&(a-=f[s],_(t,a,u)),n--,s=b(n),k(t,s,r),u=o[s],0!==u&&(n-=d[s],_(t,n,u)))}while(c<t.last_lit);k(t,256,e)},P=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let a,s,u,c=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<o;a++)0!==r[2*a]?(t.heap[++t.heap_len]=c=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)u=t.heap[++t.heap_len]=c<2?++c:0,r[2*u]=1,t.depth[u]=0,t.opt_len--,i&&(t.static_len-=n[2*u+1]);for(e.max_code=c,a=t.heap_len>>1;a>=1;a--)M(t,r,a);u=o;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],M(t,r,1),s=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=s,r[2*u]=r[2*a]+r[2*s],t.depth[u]=(t.depth[a]>=t.depth[s]?t.depth[a]:t.depth[s])+1,r[2*a+1]=r[2*s+1]=u,t.heap[1]=u++,M(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,u=e.stat_desc.max_length;let c,l,h,f,d,p,y=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)l=t.heap[c],f=r[2*r[2*l+1]+1]+1,f>u&&(f=u,y++),r[2*l+1]=f,l>n||(t.bl_count[f]++,d=0,l>=s&&(d=a[l-s]),p=r[2*l],t.opt_len+=p*(f+d),o&&(t.static_len+=p*(i[2*l+1]+d)));if(0!==y){do{for(f=u-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[u]--,y-=2}while(y>0);for(f=u;0!==f;f--)for(l=t.bl_count[f];0!==l;)h=t.heap[--c],h>n||(r[2*h+1]!==f&&(t.opt_len+=(f-r[2*h+1])*r[2*h],r[2*h+1]=f),l--)}})(t,e),A(r,c,t.bl_count)},C=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s<u&&i===a||(s<c?t.bl_tree[2*i]+=s:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))},O=(t,e,r)=>{let n,i,o=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s<u&&i===a)){if(s<c)do{k(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(k(t,i,t.bl_tree),s--),k(t,16,t.bl_tree),_(t,s-3,2)):s<=10?(k(t,17,t.bl_tree),_(t,s-3,3)):(k(t,18,t.bl_tree),_(t,s-11,7));s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4)}};let R=!1;const j=(t,e,r,n)=>{_(t,0+(n?1:0),3),((t,e,r,n)=>{E(t),n&&(w(t,r),w(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};var N={_tr_init:t=>{R||((()=>{let t,e,r,n,s;const g=new Array(16);for(r=0,n=0;n<28;n++)for(f[n]=r,t=0;t<1<<i[n];t++)h[r++]=n;for(h[r-1]=n,s=0,n=0;n<16;n++)for(d[n]=s,t=0;t<1<<o[n];t++)l[s++]=n;for(s>>=7;n<30;n++)for(d[n]=s<<7,t=0;t<1<<o[n]-7;t++)l[256+s++]=n;for(e=0;e<=15;e++)g[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,g[8]++;for(;t<=255;)u[2*t+1]=9,t++,g[9]++;for(;t<=279;)u[2*t+1]=7,t++,g[7]++;for(;t<=287;)u[2*t+1]=8,t++,g[8]++;for(A(u,287,g),t=0;t<30;t++)c[2*t+1]=5,c[2*t]=x(t,5);y=new p(u,i,257,286,15),m=new p(c,o,0,30,15),v=new p(new Array(0),a,0,19,7)})(),R=!0),t.l_desc=new g(t.dyn_ltree,y),t.d_desc=new g(t.dyn_dtree,m),t.bl_desc=new g(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,I(t)},_tr_stored_block:j,_tr_flush_block:(t,e,r,n)=>{let i,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),P(t,t.l_desc),P(t,t.d_desc),a=(t=>{let e;for(C(t,t.dyn_ltree,t.l_desc.max_code),C(t,t.dyn_dtree,t.d_desc.max_code),P(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*s[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?j(t,e,r,n):4===t.strategy||o===i?(_(t,2+(n?1:0),3),T(t,u,c)):(_(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(_(t,e-257,5),_(t,r-1,5),_(t,n-4,4),i=0;i<n;i++)_(t,t.bl_tree[2*s[i]+1],3);O(t,t.dyn_ltree,e-1),O(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),T(t,t.dyn_ltree,t.dyn_dtree)),I(t),n&&E(t)},_tr_tally:(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(h[r]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{_(t,2,3),k(t,256,u),(t=>{16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var L=(t,e,r,n)=>{let i=65535&t|0,o=t>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{i=i+e[n++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16|0};const U=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var D=(t,e,r,n)=>{const i=U,o=n+r;t^=-1;for(let r=n;r<o;r++)t=t>>>8^i[255&(t^e[r])];return-1^t},B={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},z={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:H,_tr_stored_block:F,_tr_flush_block:q,_tr_tally:G,_tr_align:V}=N,{Z_NO_FLUSH:K,Z_PARTIAL_FLUSH:Z,Z_FULL_FLUSH:W,Z_FINISH:J,Z_BLOCK:Q,Z_OK:Y,Z_STREAM_END:$,Z_STREAM_ERROR:X,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:it,Z_RLE:ot,Z_FIXED:at,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:ut,Z_DEFLATED:ct}=z,lt=(t,e)=>(t.msg=B[e],e),ht=t=>(t<<1)-(t>4?9:0),ft=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let dt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const pt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},yt=(t,e)=>{q(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,pt(t.strm)},mt=(t,e)=>{t.pending_buf[t.pending++]=e},vt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},gt=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=L(t.adler,e,i,r):2===t.state.wrap&&(t.adler=D(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},bt=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match;const u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,l=t.w_mask,h=t.prev,f=t.strstart+258;let d=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(r=e,c[r+a]===p&&c[r+a-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<f);if(n=258-(f-o),o=f-258,n>a){if(t.match_start=e,a=n,n>=s)break;d=c[o+a-1],p=c[o+a]}}}while((e=h[e&l])>u&&0!=--i);return a<=t.lookahead?a:t.lookahead},wt=t=>{const e=t.w_size;let r,n,i,o,a;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{i=t.head[--r],t.head[r]=i>=e?i-e:0}while(--n);n=e,r=n;do{i=t.prev[--r],t.prev[r]=i>=e?i-e:0}while(--n);o+=e}if(0===t.strm.avail_in)break;if(n=gt(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=n,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=dt(t,t.ins_h,t.window[a+1]);t.insert&&(t.ins_h=dt(t,t.ins_h,t.window[a+3-1]),t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},_t=(t,e)=>{let r,n;for(;;){if(t.lookahead<262){if(wt(t),t.lookahead<262&&e===K)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=dt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=bt(t,r)),t.match_length>=3)if(n=G(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=dt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=dt(t,t.ins_h,t.window[t.strstart+1]);else n=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===J?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2},kt=(t,e)=>{let r,n,i;for(;;){if(t.lookahead<262){if(wt(t),t.lookahead<262&&e===K)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=dt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=bt(t,r),t.match_length<=5&&(t.strategy===nt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=G(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=dt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(yt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=G(t,0,t.window[t.strstart-1]),n&&yt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=G(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===J?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const At=[new xt(0,0,0,0,(t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(wt(t),0===t.lookahead&&e===K)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,yt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(yt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(yt(t,!1),t.strm.avail_out),1)}),new xt(4,4,8,4,_t),new xt(4,5,16,8,_t),new xt(4,6,32,32,_t),new xt(4,4,16,16,kt),new xt(8,16,32,32,kt),new xt(8,16,128,128,kt),new xt(8,32,128,256,kt),new xt(32,128,258,1024,kt),new xt(32,258,258,4096,kt)];function It(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ft(this.dyn_ltree),ft(this.dyn_dtree),ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ft(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t||!t.state)return lt(t,X);t.total_in=t.total_out=0,t.data_type=ut;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=K,H(e),Y},St=t=>{const e=Et(t);var r;return e===Y&&((r=t.state).window_size=2*r.w_size,ft(r.head),r.max_lazy_match=At[r.level].max_lazy,r.good_match=At[r.level].good_length,r.nice_match=At[r.level].nice_length,r.max_chain_length=At[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Mt=(t,e,r,n,i,o)=>{if(!t)return X;let a=1;if(e===rt&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),i<1||i>9||r!==ct||n<8||n>15||e<0||e>9||o<0||o>at)return lt(t,X);8===n&&(n=9);const s=new It;return t.state=s,s.strm=t,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(2*s.w_size),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Uint8Array(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=e,s.strategy=o,s.method=r,St(t)};var Tt={deflateInit:(t,e)=>Mt(t,e,ct,15,8,st),deflateInit2:Mt,deflateReset:St,deflateResetKeep:Et,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?X:(t.state.gzhead=e,Y):X,deflate:(t,e)=>{let r,n;if(!t||!t.state||e>Q||e<0)return t?lt(t,X):X;const i=t.state;if(!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==J)return lt(t,0===t.avail_out?et:X);i.strm=t;const o=i.last_flush;if(i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,mt(i,31),mt(i,139),mt(i,8),i.gzhead?(mt(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),mt(i,255&i.gzhead.time),mt(i,i.gzhead.time>>8&255),mt(i,i.gzhead.time>>16&255),mt(i,i.gzhead.time>>24&255),mt(i,9===i.level?2:i.strategy>=it||i.level<2?4:0),mt(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(mt(i,255&i.gzhead.extra.length),mt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=D(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(mt(i,0),mt(i,0),mt(i,0),mt(i,0),mt(i,0),mt(i,9===i.level?2:i.strategy>=it||i.level<2?4:0),mt(i,3),i.status=113);else{let e=ct+(i.w_bits-8<<4)<<8,r=-1;r=i.strategy>=it||i.level<2?0:i.level<6?1:6===i.level?2:3,e|=r<<6,0!==i.strstart&&(e|=32),e+=31-e%31,i.status=113,vt(i,e),0!==i.strstart&&(vt(i,t.adler>>>16),vt(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(r=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>r&&(t.adler=D(t.adler,i.pending_buf,i.pending-r,r)),pt(t),r=i.pending,i.pending!==i.pending_buf_size));)mt(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>r&&(t.adler=D(t.adler,i.pending_buf,i.pending-r,r)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(t.adler=D(t.adler,i.pending_buf,i.pending-r,r)),pt(t),r=i.pending,i.pending===i.pending_buf_size)){n=1;break}n=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,mt(i,n)}while(0!==n);i.gzhead.hcrc&&i.pending>r&&(t.adler=D(t.adler,i.pending_buf,i.pending-r,r)),0===n&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(t.adler=D(t.adler,i.pending_buf,i.pending-r,r)),pt(t),r=i.pending,i.pending===i.pending_buf_size)){n=1;break}n=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,mt(i,n)}while(0!==n);i.gzhead.hcrc&&i.pending>r&&(t.adler=D(t.adler,i.pending_buf,i.pending-r,r)),0===n&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&pt(t),i.pending+2<=i.pending_buf_size&&(mt(i,255&t.adler),mt(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(pt(t),0===t.avail_out)return i.last_flush=-1,Y}else if(0===t.avail_in&&ht(e)<=ht(o)&&e!==J)return lt(t,et);if(666===i.status&&0!==t.avail_in)return lt(t,et);if(0!==t.avail_in||0!==i.lookahead||e!==K&&666!==i.status){let r=i.strategy===it?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(wt(t),0===t.lookahead)){if(e===K)return 1;break}if(t.match_length=0,r=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(i,e):i.strategy===ot?((t,e)=>{let r,n,i,o;const a=t.window;for(;;){if(t.lookahead<=258){if(wt(t),t.lookahead<=258&&e===K)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=t.strstart+258;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<o);t.match_length=258-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=G(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(i,e):At[i.level].func(i,e);if(3!==r&&4!==r||(i.status=666),1===r||3===r)return 0===t.avail_out&&(i.last_flush=-1),Y;if(2===r&&(e===Z?V(i):e!==Q&&(F(i,0,0,!1),e===W&&(ft(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),pt(t),0===t.avail_out))return i.last_flush=-1,Y}return e!==J?Y:i.wrap<=0?$:(2===i.wrap?(mt(i,255&t.adler),mt(i,t.adler>>8&255),mt(i,t.adler>>16&255),mt(i,t.adler>>24&255),mt(i,255&t.total_in),mt(i,t.total_in>>8&255),mt(i,t.total_in>>16&255),mt(i,t.total_in>>24&255)):(vt(i,t.adler>>>16),vt(i,65535&t.adler)),pt(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?Y:$)},deflateEnd:t=>{if(!t||!t.state)return X;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?lt(t,X):(t.state=null,113===e?lt(t,tt):Y)},deflateSetDictionary:(t,e)=>{let r=e.length;if(!t||!t.state)return X;const n=t.state,i=n.wrap;if(2===i||1===i&&42!==n.status||n.lookahead)return X;if(1===i&&(t.adler=L(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(ft(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,wt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=dt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,wt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=i,Y},deflateInfo:"pako deflate (from Nodeca project)"};const Pt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Ct=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Pt(r,e)&&(t[e]=r[e])}}return t},Ot=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,i=t.length;e<i;e++){let i=t[e];r.set(i,n),n+=i.length}return r};let Rt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Rt=!1}const jt=new Uint8Array(256);for(let t=0;t<256;t++)jt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;jt[254]=jt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,a=t.length,s=0;for(i=0;i<a;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(s),o=0,i=0;o<s;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<a&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?e[o++]=r:r<2048?(e[o++]=192|r>>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},Lt=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n<r;){let e=t[n++];if(e<128){o[i++]=e;continue}let a=jt[e];if(a>4)o[i++]=65533,n+=a-1;else{for(e&=2===a?31:3===a?15:7;a>1&&n<r;)e=e<<6|63&t[n++],a--;a>1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Rt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(o,i)},Ut=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+jt[t[r]]>e?r:e};var Dt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Bt=Object.prototype.toString,{Z_NO_FLUSH:zt,Z_SYNC_FLUSH:Ht,Z_FULL_FLUSH:Ft,Z_FINISH:qt,Z_OK:Gt,Z_STREAM_END:Vt,Z_DEFAULT_COMPRESSION:Kt,Z_DEFAULT_STRATEGY:Zt,Z_DEFLATED:Wt}=z;function Jt(t){this.options=Ct({level:Kt,method:Wt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Zt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Dt,this.strm.avail_out=0;let r=Tt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Gt)throw new Error(B[r]);if(e.header&&Tt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Bt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=Tt.deflateSetDictionary(this.strm,t),r!==Gt)throw new Error(B[r]);this._dict_set=!0}}function Qt(t,e){const r=new Jt(e);if(r.push(t,!0),r.err)throw r.msg||B[r.err];return r.result}Jt.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?qt:zt,"string"==typeof t?r.input=Nt(t):"[object ArrayBuffer]"===Bt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===Ht||o===Ft)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=Tt.deflate(r,o),i===Vt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=Tt.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Gt;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Gt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Yt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:z};var $t=function(t,e){let r,n,i,o,a,s,u,c,l,h,f,d,p,y,m,v,g,b,w,_,k,x,A,I;const E=t.state;r=t.next_in,A=t.input,n=r+(t.avail_in-5),i=t.next_out,I=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=E.dmax,u=E.wsize,c=E.whave,l=E.wnext,h=E.window,f=E.hold,d=E.bits,p=E.lencode,y=E.distcode,m=(1<<E.lenbits)-1,v=(1<<E.distbits)-1;t:do{d<15&&(f+=A[r++]<<d,d+=8,f+=A[r++]<<d,d+=8),g=p[f&m];e:for(;;){if(b=g>>>24,f>>>=b,d-=b,b=g>>>16&255,0===b)I[i++]=65535&g;else{if(!(16&b)){if(0==(64&b)){g=p[(65535&g)+(f&(1<<b)-1)];continue e}if(32&b){E.mode=12;break t}t.msg="invalid literal/length code",E.mode=30;break t}w=65535&g,b&=15,b&&(d<b&&(f+=A[r++]<<d,d+=8),w+=f&(1<<b)-1,f>>>=b,d-=b),d<15&&(f+=A[r++]<<d,d+=8,f+=A[r++]<<d,d+=8),g=y[f&v];r:for(;;){if(b=g>>>24,f>>>=b,d-=b,b=g>>>16&255,!(16&b)){if(0==(64&b)){g=y[(65535&g)+(f&(1<<b)-1)];continue r}t.msg="invalid distance code",E.mode=30;break t}if(_=65535&g,b&=15,d<b&&(f+=A[r++]<<d,d+=8,d<b&&(f+=A[r++]<<d,d+=8)),_+=f&(1<<b)-1,_>s){t.msg="invalid distance too far back",E.mode=30;break t}if(f>>>=b,d-=b,b=i-o,_>b){if(b=_-b,b>c&&E.sane){t.msg="invalid distance too far back",E.mode=30;break t}if(k=0,x=h,0===l){if(k+=u-b,b<w){w-=b;do{I[i++]=h[k++]}while(--b);k=i-_,x=I}}else if(l<b){if(k+=u+l-b,b-=l,b<w){w-=b;do{I[i++]=h[k++]}while(--b);if(k=0,l<w){b=l,w-=b;do{I[i++]=h[k++]}while(--b);k=i-_,x=I}}}else if(k+=l-b,b<w){w-=b;do{I[i++]=h[k++]}while(--b);k=i-_,x=I}for(;w>2;)I[i++]=x[k++],I[i++]=x[k++],I[i++]=x[k++],w-=3;w&&(I[i++]=x[k++],w>1&&(I[i++]=x[k++]))}else{k=i-_;do{I[i++]=I[k++],I[i++]=I[k++],I[i++]=I[k++],w-=3}while(w>2);w&&(I[i++]=I[k++],w>1&&(I[i++]=I[k++]))}break}}break}}while(r<n&&i<a);w=d>>3,r-=w,d-=w<<3,f&=(1<<d)-1,t.next_in=r,t.next_out=i,t.avail_in=r<n?n-r+5:5-(r-n),t.avail_out=i<a?a-i+257:257-(i-a),E.hold=f,E.bits=d};const Xt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),te=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ee=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),re=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,r,n,i,o,a,s)=>{const u=s.bits;let c,l,h,f,d,p,y=0,m=0,v=0,g=0,b=0,w=0,_=0,k=0,x=0,A=0,I=null,E=0;const S=new Uint16Array(16),M=new Uint16Array(16);let T,P,C,O=null,R=0;for(y=0;y<=15;y++)S[y]=0;for(m=0;m<n;m++)S[e[r+m]]++;for(b=u,g=15;g>=1&&0===S[g];g--);if(b>g&&(b=g),0===g)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v<g&&0===S[v];v++);for(b<v&&(b=v),k=1,y=1;y<=15;y++)if(k<<=1,k-=S[y],k<0)return-1;if(k>0&&(0===t||1!==g))return-1;for(M[1]=0,y=1;y<15;y++)M[y+1]=M[y]+S[y];for(m=0;m<n;m++)0!==e[r+m]&&(a[M[e[r+m]]++]=m);if(0===t?(I=O=a,p=19):1===t?(I=Xt,E-=257,O=te,R-=257,p=256):(I=ee,O=re,p=-1),A=0,m=0,y=v,d=o,w=b,_=0,h=-1,x=1<<b,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){T=y-_,a[m]<p?(P=0,C=a[m]):a[m]>p?(P=O[R+a[m]],C=I[E+a[m]]):(P=96,C=0),c=1<<y-_,l=1<<w,v=l;do{l-=c,i[d+(A>>_)+l]=T<<24|P<<16|C|0}while(0!==l);for(c=1<<y-1;A&c;)c>>=1;if(0!==c?(A&=c-1,A+=c):A=0,m++,0==--S[y]){if(y===g)break;y=e[r+a[m]]}if(y>b&&(A&f)!==h){for(0===_&&(_=b),d+=v,w=y-_,k=1<<w;w+_<g&&(k-=S[w+_],!(k<=0));)w++,k<<=1;if(x+=1<<w,1===t&&x>852||2===t&&x>592)return 1;h=A&f,i[h]=b<<24|w<<16|d-o|0}}return 0!==A&&(i[d+A]=y-_<<24|64<<16|0),s.bits=b,0};const{Z_FINISH:ie,Z_BLOCK:oe,Z_TREES:ae,Z_OK:se,Z_STREAM_END:ue,Z_NEED_DICT:ce,Z_STREAM_ERROR:le,Z_DATA_ERROR:he,Z_MEM_ERROR:fe,Z_BUF_ERROR:de,Z_DEFLATED:pe}=z,ye=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function me(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ve=t=>{if(!t||!t.state)return le;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,se},ge=t=>{if(!t||!t.state)return le;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ve(t)},be=(t,e)=>{let r;if(!t||!t.state)return le;const n=t.state;return e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?le:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,ge(t))},we=(t,e)=>{if(!t)return le;const r=new me;t.state=r,r.window=null;const n=be(t,e);return n!==se&&(t.state=null),n};let _e,ke,xe=!0;const Ae=t=>{if(xe){_e=new Int32Array(512),ke=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,_e,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,ke,0,t.work,{bits:5}),xe=!1}t.lencode=_e,t.lenbits=9,t.distcode=ke,t.distbits=5},Ie=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0};var Ee={inflateReset:ge,inflateReset2:be,inflateResetKeep:ve,inflateInit:t=>we(t,15),inflateInit2:we,inflate:(t,e)=>{let r,n,i,o,a,s,u,c,l,h,f,d,p,y,m,v,g,b,w,_,k,x,A=0;const I=new Uint8Array(4);let E,S;const M=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return le;r=t.state,12===r.mode&&(r.mode=13),a=t.next_out,i=t.output,u=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,l=r.bits,h=s,f=u,x=se;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(2&r.wrap&&35615===c){r.check=0,I[0]=255&c,I[1]=c>>>8&255,r.check=D(r.check,I,2,0),c=0,l=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=30;break}if((15&c)!==pe){t.msg="unknown compression method",r.mode=30;break}if(c>>>=4,l-=4,k=8+(15&c),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<r.wbits,t.adler=r.check=1,r.mode=512&c?10:12,c=0,l=0;break;case 2:for(;l<16;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(r.flags=c,(255&r.flags)!==pe){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(I[0]=255&c,I[1]=c>>>8&255,r.check=D(r.check,I,2,0)),c=0,l=0,r.mode=3;case 3:for(;l<32;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}r.head&&(r.head.time=c),512&r.flags&&(I[0]=255&c,I[1]=c>>>8&255,I[2]=c>>>16&255,I[3]=c>>>24&255,r.check=D(r.check,I,4,0)),c=0,l=0,r.mode=4;case 4:for(;l<16;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(I[0]=255&c,I[1]=c>>>8&255,r.check=D(r.check,I,2,0)),c=0,l=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(I[0]=255&c,I[1]=c>>>8&255,r.check=D(r.check,I,2,0)),c=0,l=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(d=r.length,d>s&&(d=s),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+d),k)),512&r.flags&&(r.check=D(r.check,n,d,o)),s-=d,o+=d,r.length-=d),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break t;d=0;do{k=n[o+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&d<s);if(512&r.flags&&(r.check=D(r.check,n,d,o)),s-=d,o+=d,k)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break t;d=0;do{k=n[o+d++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k))}while(k&&d<s);if(512&r.flags&&(r.check=D(r.check,n,d,o)),s-=d,o+=d,k)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}c=0,l=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}t.adler=r.check=ye(c),c=0,l=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=a,t.avail_out=u,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=l,ce;t.adler=r.check=1,r.mode=12;case 12:if(e===oe||e===ae)break t;case 13:if(r.last){c>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}switch(r.last=1&c,c>>>=1,l-=1,3&c){case 0:r.mode=14;break;case 1:if(Ae(r),r.mode=20,e===ae){c>>>=2,l-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}c>>>=2,l-=2;break;case 14:for(c>>>=7&l,l-=7&l;l<32;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&c,c=0,l=0,r.mode=15,e===ae)break t;case 15:r.mode=16;case 16:if(d=r.length,d){if(d>s&&(d=s),d>u&&(d=u),0===d)break t;i.set(n.subarray(o,o+d),a),s-=d,o+=d,u-=d,a+=d,r.length-=d;break}r.mode=12;break;case 17:for(;l<14;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(r.nlen=257+(31&c),c>>>=5,l-=5,r.ndist=1+(31&c),c>>>=5,l-=5,r.ncode=4+(15&c),c>>>=4,l-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}r.lens[M[r.have++]]=7&c,c>>>=3,l-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,E={bits:r.lenbits},x=ne(0,r.lens,0,19,r.lencode,0,r.work,E),r.lenbits=E.bits,x){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;A=r.lencode[c&(1<<r.lenbits)-1],m=A>>>24,v=A>>>16&255,g=65535&A,!(m<=l);){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(g<16)c>>>=m,l-=m,r.lens[r.have++]=g;else{if(16===g){for(S=m+2;l<S;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(c>>>=m,l-=m,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&c),c>>>=2,l-=2}else if(17===g){for(S=m+3;l<S;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}c>>>=m,l-=m,k=0,d=3+(7&c),c>>>=3,l-=3}else{for(S=m+7;l<S;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}c>>>=m,l-=m,k=0,d=11+(127&c),c>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,E={bits:r.lenbits},x=ne(1,r.lens,0,r.nlen,r.lencode,0,r.work,E),r.lenbits=E.bits,x){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,E={bits:r.distbits},x=ne(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,E),r.distbits=E.bits,x){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,e===ae)break t;case 20:r.mode=21;case 21:if(s>=6&&u>=258){t.next_out=a,t.avail_out=u,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=l,$t(t,f),a=t.next_out,i=t.output,u=t.avail_out,o=t.next_in,n=t.input,s=t.avail_in,c=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;A=r.lencode[c&(1<<r.lenbits)-1],m=A>>>24,v=A>>>16&255,g=65535&A,!(m<=l);){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(v&&0==(240&v)){for(b=m,w=v,_=g;A=r.lencode[_+((c&(1<<b+w)-1)>>b)],m=A>>>24,v=A>>>16&255,g=65535&A,!(b+m<=l);){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}c>>>=b,l-=b,r.back+=b}if(c>>>=m,l-=m,r.back+=m,r.length=g,0===v){r.mode=26;break}if(32&v){r.back=-1,r.mode=12;break}if(64&v){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&v,r.mode=22;case 22:if(r.extra){for(S=r.extra;l<S;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;A=r.distcode[c&(1<<r.distbits)-1],m=A>>>24,v=A>>>16&255,g=65535&A,!(m<=l);){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(0==(240&v)){for(b=m,w=v,_=g;A=r.distcode[_+((c&(1<<b+w)-1)>>b)],m=A>>>24,v=A>>>16&255,g=65535&A,!(b+m<=l);){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}c>>>=b,l-=b,r.back+=b}if(c>>>=m,l-=m,r.back+=m,64&v){t.msg="invalid distance code",r.mode=30;break}r.offset=g,r.extra=15&v,r.mode=24;case 24:if(r.extra){for(S=r.extra;l<S;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===u)break t;if(d=f-u,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}d>r.wnext?(d-=r.wnext,p=r.wsize-d):p=r.wnext-d,d>r.length&&(d=r.length),y=r.window}else y=i,p=a-r.offset,d=r.length;d>u&&(d=u),u-=d,r.length-=d;do{i[a++]=y[p++]}while(--d);0===r.length&&(r.mode=21);break;case 26:if(0===u)break t;i[a++]=r.length,u--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===s)break t;s--,c|=n[o++]<<l,l+=8}if(f-=u,t.total_out+=f,r.total+=f,f&&(t.adler=r.check=r.flags?D(r.check,i,f,a-f):L(r.check,i,f,a-f)),f=u,(r.flags?c:ye(c))!==r.check){t.msg="incorrect data check",r.mode=30;break}c=0,l=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===s)break t;s--,c+=n[o++]<<l,l+=8}if(c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}c=0,l=0}r.mode=29;case 29:x=ue;break t;case 30:x=he;break t;case 31:return fe;case 32:default:return le}return t.next_out=a,t.avail_out=u,t.next_in=o,t.avail_in=s,r.hold=c,r.bits=l,(r.wsize||f!==t.avail_out&&r.mode<30&&(r.mode<27||e!==ie))&&Ie(t,t.output,t.next_out,f-t.avail_out),h-=t.avail_in,f-=t.avail_out,t.total_in+=h,t.total_out+=f,r.total+=f,r.wrap&&f&&(t.adler=r.check=r.flags?D(r.check,i,f,t.next_out-f):L(r.check,i,f,t.next_out-f)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===h&&0===f||e===ie)&&x===se&&(x=de),x},inflateEnd:t=>{if(!t||!t.state)return le;let e=t.state;return e.window&&(e.window=null),t.state=null,se},inflateGetHeader:(t,e)=>{if(!t||!t.state)return le;const r=t.state;return 0==(2&r.wrap)?le:(r.head=e,e.done=!1,se)},inflateSetDictionary:(t,e)=>{const r=e.length;let n,i,o;return t&&t.state?(n=t.state,0!==n.wrap&&11!==n.mode?le:11===n.mode&&(i=1,i=L(i,e,r,0),i!==n.check)?he:(o=Ie(t,e,r,r),o?(n.mode=31,fe):(n.havedict=1,se))):le},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Me=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Pe,Z_OK:Ce,Z_STREAM_END:Oe,Z_NEED_DICT:Re,Z_STREAM_ERROR:je,Z_DATA_ERROR:Ne,Z_MEM_ERROR:Le}=z;function Ue(t){this.options=Ct({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Dt,this.strm.avail_out=0;let r=Ee.inflateInit2(this.strm,e.windowBits);if(r!==Ce)throw new Error(B[r]);if(this.header=new Se,Ee.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===Me.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Ee.inflateSetDictionary(this.strm,e.dictionary),r!==Ce)))throw new Error(B[r])}function De(t,e){const r=new Ue(e);if(r.push(t),r.err)throw r.msg||B[r.err];return r.result}Ue.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=e===~~e?e:!0===e?Pe:Te,"[object ArrayBuffer]"===Me.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Ee.inflate(r,a),o===Re&&i&&(o=Ee.inflateSetDictionary(r,i),o===Ce?o=Ee.inflate(r,a):o===Ne&&(o=Re));r.avail_in>0&&o===Oe&&r.state.wrap>0&&0!==t[r.next_in];)Ee.inflateReset(r),o=Ee.inflate(r,a);switch(o){case je:case Ne:case Re:case Le:return this.onEnd(o),this.ended=!0,!1}if(s=r.avail_out,r.next_out&&(0===r.avail_out||o===Oe))if("string"===this.options.to){let t=Ut(r.output,r.next_out),e=r.next_out-t,i=Lt(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==Ce||0!==s){if(o===Oe)return o=Ee.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},Ue.prototype.onData=function(t){this.chunks.push(t)},Ue.prototype.onEnd=function(t){t===Ce&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Be={Inflate:Ue,inflate:De,inflateRaw:function(t,e){return(e=e||{}).raw=!0,De(t,e)},ungzip:De,constants:z};const{Deflate:ze,deflate:He,deflateRaw:Fe,gzip:qe}=Yt,{Inflate:Ge,inflate:Ve,inflateRaw:Ke,ungzip:Ze}=Be;var We=ze,Je=He,Qe=Fe,Ye=qe,$e=Ge,Xe=Ve,tr=Ke,er=Ze,rr=z,nr={Deflate:ze,deflate:He,deflateRaw:Fe,gzip:qe,Inflate:Ge,inflate:Ve,inflateRaw:Ke,ungzip:Ze,constants:z}},function(t,e,r){(function(r){var n,i,o,a;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}a=function(){return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u=!1;if(!s&&u)return(void 0)(a,!0);if(o)return o(a,!0);throw(u=new Error("Cannot find module '"+a+"'")).code="MODULE_NOT_FOUND",u}u=r[a]={exports:{}},e[a][0].call(u.exports,(function(t){return i(e[a][1][t]||t)}),u,u.exports,t,e,r,n)}return r[a].exports}for(var o=!1,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.version="4.0.49"},{}],2:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./utils/properties");function i(){n.setType(this,"Signer")}i.isSigner=function(t){return n.isType(t,"Signer")},t=i,r.Signer=t},{"./utils/properties":74}],3:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./utils/bignumber");r.AddressZero="0x0000000000000000000000000000000000000000",r.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000",r.EtherSymbol="Ξ",t=n.bigNumberify(-1),r.NegativeOne=t,t=n.bigNumberify(0),r.Zero=t,t=n.bigNumberify(1),r.One=t,t=n.bigNumberify(2),r.Two=t,t=n.bigNumberify("1000000000000000000"),r.WeiPerEther=t,n=n.bigNumberify("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),r.MaxUint256=n},{"./utils/bignumber":63}],4:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a,u=t("./constants"),c=o(t("./errors")),l=t("./utils/abi-coder"),h=t("./utils/address"),f=t("./utils/bignumber"),d=t("./utils/bytes"),p=t("./utils/interface"),y=t("./utils/properties"),m=t("./providers/abstract-provider"),v=t("./abstract-signer"),g=(i(b,a=v.Signer),b.prototype.getAddress=function(){return Promise.resolve(this.address)},b.prototype._fail=function(t,e){return Promise.resolve().then((function(){c.throwError(t,c.UNSUPPORTED_OPERATION,{operation:e})}))},b.prototype.signMessage=function(t){return this._fail("VoidSigner cannot sign messages","signMessage")},b.prototype.sendTransaction=function(t){return this._fail("VoidSigner cannot sign transactions","sendTransaction")},b.prototype.connect=function(t){return new b(this.address,t)},b);function b(t,e){var r=a.call(this)||this;return y.defineReadOnly(r,"address",t),y.defineReadOnly(r,"provider",e),r}r.VoidSigner=g;var w={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};function _(t,e,r){var n=t.interface.functions[e];return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={},a=null;if(e.length===n.inputs.length+1&&"object"==s(e[e.length-1]))for(var h in null!=(o=y.shallowCopy(e.pop())).blockTag&&(a=o.blockTag),delete o.blockTag,o)if(!w[h])throw new Error("unknown transaction override "+h);if(e.length!=n.inputs.length)throw new Error("incorrect number of arguments");return["data","to"].forEach((function(t){null!=o[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),o.to=t._deployed(a).then((function(){return t.addressPromise})),function t(e,r,n){if(Array.isArray(n)){var i=[];return n.forEach((function(n,o){var a=Array.isArray(r)?r[o]:r[n.name];i.push(t(e,a,n))})),Promise.all(i)}if("address"===n.type)return e.resolveName(r);if("tuple"===n.type)return t(e,r,n.components);var o=n.type.match(/(.*)(\[[0-9]*\]$)/);if(o){if(!Array.isArray(r))throw new Error("invalid value for array");var a=[],s={components:n.components,type:o[1]};return r.forEach((function(r){a.push(t(e,r,s))})),Promise.all(a)}return Promise.resolve(r)}(t.provider,e,n.inputs).then((function(e){if(o.data=n.encode(e),"call"===n.type)return r?Promise.resolve(u.Zero):(t.provider||c.throwError("call (constant functions) require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"call"}),["gasLimit","gasPrice","value"].forEach((function(t){if(null!=o[t])throw new Error("call cannot override "+t)})),null==o.from&&t.signer&&(o.from=t.signer.getAddress()),t.provider.call(o,a).then((function(r){var i;d.hexDataLength(r)%32==4&&"0x08c379a0"===d.hexDataSlice(r,0,4)&&(i=l.defaultAbiCoder.decode(["string"],d.hexDataSlice(r,4)),c.throwError("call revert exception",c.CALL_EXCEPTION,{address:t.address,args:e,method:n.signature,errorSignature:"Error(string)",errorArgs:[i],reason:i,transaction:o}));try{var a=n.decode(r);return 1===n.outputs.length?a[0]:a}catch(i){throw"0x"===r&&0<n.outputs.length&&c.throwError("call exception",c.CALL_EXCEPTION,{address:t.address,method:n.signature,args:e}),i}})));if("transaction"===n.type)return r?(t.provider||c.throwError("estimate gas require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),null==o.from&&t.signer&&(o.from=t.signer.getAddress()),t.provider.estimateGas(o)):(null==o.gasLimit&&null!=n.gas&&(o.gasLimit=f.bigNumberify(n.gas).add(21e3)),t.signer||c.throwError("sending a transaction requires a signer",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=o.from&&c.throwError("cannot override from in a transaction",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.signer.sendTransaction(o).then((function(e){var r=e.wait.bind(e);return e.wait=function(e){return r(e).then((function(e){return e.events=e.logs.map((function(r){var n=y.deepCopy(r);return(r=t.interface.parseLog(r))&&(n.args=r.values,n.decode=r.decode,n.event=r.name,n.eventSignature=r.signature),n.removeListener=function(){return t.provider},n.getBlock=function(){return t.provider.getBlock(e.blockHash)},n.getTransaction=function(){return t.provider.getTransaction(e.transactionHash)},n.getTransactionReceipt=function(){return Promise.resolve(e)},n})),e}))},e})));throw new Error("invalid type - "+n.type)}))}}function k(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.join(":"):""):"*"}var x=(A.prototype.deployed=function(){return this._deployed()},A.prototype._deployed=function(t){var e=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return e})):this._deployedPromise=this.provider.getCode(this.address,t).then((function(t){return"0x"===t&&c.throwError("contract not deployed",c.UNSUPPORTED_OPERATION,{contractAddress:e.address,operation:"getDeployed"}),e}))),this._deployedPromise},A.prototype.fallback=function(t){var e=this;this.signer||c.throwError("sending a transaction requires a signer",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=y.shallowCopy(t||{});return["from","to"].forEach((function(t){null!=r[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),r.to=this.addressPromise,this.deployed().then((function(){return e.signer.sendTransaction(r)}))},A.prototype.connect=function(t){return"string"==typeof t&&(t=new g(t,this.provider)),t=new A(this.address,this.interface,t),this.deployTransaction&&y.defineReadOnly(t,"deployTransaction",this.deployTransaction),t},A.prototype.attach=function(t){return new A(t,this.interface,this.signer||this.provider)},A.isIndexed=function(t){return p.Interface.isIndexed(t)},A.prototype._getEventFilter=function(t){var e=this;if("string"==typeof t){if("*"===t)return{prepareEvent:function(t){var r=e.interface.parseLog(t);return r&&(t.args=r.values,t.decode=r.decode,t.event=r.name,t.eventSignature=r.signature),[t]},eventTag:"*",filter:{address:this.address}};-1!==t.indexOf("(")&&(t=l.formatSignature(l.parseSignature("event "+t)));var r=this.interface.events[t];r||c.throwError("unknown event - "+t,c.INVALID_ARGUMENT,{argumnet:"eventName",value:t});var n={address:this.address,topics:[r.topic]};return{prepareEvent:function(t){var e=r.decode(t.data,t.topics);return t.args=e,(e=Array.prototype.slice.call(e)).push(t),e},event:r,eventTag:k(n),filter:n}}n={address:this.address};var i=null;if(t.topics&&t.topics[0])for(var o in n.topics=t.topics,this.interface.events)if(-1!==o.indexOf("(")&&(o=this.interface.events[o]).topic===t.topics[0].toLowerCase()){i=o;break}return{prepareEvent:function(t){if(!i)return[t];var e=i.decode(t.data,t.topics);return t.args=e,(e=Array.prototype.slice.call(e)).push(t),e},event:i,eventTag:k(n),filter:n}},A.prototype._addEventListener=function(t,e,r){var n=this;function i(r){var i=y.deepCopy(r),o=t.prepareEvent(i);t.event&&(i.decode=t.event.decode,i.event=t.event.name,i.eventSignature=t.event.signature),i.removeListener=function(){n.removeListener(t.filter,e)},i.getBlock=function(){return n.provider.getBlock(r.blockHash)},i.getTransaction=function(){return n.provider.getTransaction(r.transactionHash)},i.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(r.transactionHash)},n.emit.apply(n,[t.filter].concat(o))}this.provider||c.throwError("events require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"once"}),this.provider.on(t.filter,i),this._events.push({eventFilter:t,listener:e,wrappedListener:i,once:r})},A.prototype.on=function(t,e){return this._addEventListener(this._getEventFilter(t),e,!1),this},A.prototype.once=function(t,e){return this._addEventListener(this._getEventFilter(t),e,!0),this},A.prototype.addListener=function(t,e){return this.on(t,e)},A.prototype.emit=function(t){for(var e=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this.provider)return!1;var i=!1,o=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==o.eventTag||(setTimeout((function(){t.listener.apply(e,r)}),0),i=!0,!t.once)})),i},A.prototype.listenerCount=function(t){if(!this.provider)return 0;var e=this._getEventFilter(t);return this._events.filter((function(t){return t.eventFilter.eventTag===e.eventTag})).length},A.prototype.listeners=function(t){if(!this.provider)return[];var e=this._getEventFilter(t);return this._events.filter((function(t){return t.eventFilter.eventTag===e.eventTag})).map((function(t){return t.listener}))},A.prototype.removeAllListeners=function(t){var e=this;if(!this.provider)return this;var r=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==r.eventTag||(e.provider.removeListener(t.eventFilter.filter,t.wrappedListener),!1)})),this},A.prototype.removeListener=function(t,e){var r=this;if(!this.provider)return this;var n=!1,i=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==i.eventTag||t.listener!==e||(r.provider.removeListener(t.eventFilter.filter,t.wrappedListener),!!n||!(n=!0))})),this},A);function A(t,e,r){var n=this;if(c.checkNew(this,A),p.Interface.isInterface(e)?y.defineReadOnly(this,"interface",e):y.defineReadOnly(this,"interface",new p.Interface(e)),v.Signer.isSigner(r)?(y.defineReadOnly(this,"provider",r.provider),y.defineReadOnly(this,"signer",r)):m.Provider.isProvider(r)?(y.defineReadOnly(this,"provider",r),y.defineReadOnly(this,"signer",null)):c.throwError("invalid signer or provider",c.INVALID_ARGUMENT,{arg:"signerOrProvider",value:r}),y.defineReadOnly(this,"estimate",{}),y.defineReadOnly(this,"functions",{}),y.defineReadOnly(this,"filters",{}),Object.keys(this.interface.events).forEach((function(t){var e=n.interface.events[t];y.defineReadOnly(n.filters,t,(function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return{address:n.address,topics:e.encodeTopics(t)}}))})),this._events=[],y.defineReadOnly(this,"address",t),this.provider)y.defineReadOnly(this,"addressPromise",this.provider.resolveName(t).then((function(t){if(null==t)throw new Error("name not found");return t})).catch((function(t){throw t})));else try{y.defineReadOnly(this,"addressPromise",Promise.resolve(h.getAddress(t)))}catch(e){c.throwError("provider is required to use non-address contract address",c.INVALID_ARGUMENT,{argument:"addressOrName",value:t})}Object.keys(this.interface.functions).forEach((function(t){var e=_(n,t,!1);null==n[t]?y.defineReadOnly(n,t,e):c.warn("WARNING: Multiple definitions for "+t),null==n.functions[t]&&(y.defineReadOnly(n.functions,t,e),y.defineReadOnly(n.estimate,t,_(n,t,!0)))}))}function I(t,e,r){var n=null;"string"==typeof e?n=e:d.isArrayish(e)?n=d.hexlify(e):"string"==typeof e.object?n=e.object:c.throwError("bytecode must be a valid hex string",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),"0x"!==n.substring(0,2)&&(n="0x"+n),d.isHexString(n)||c.throwError("bytecode must be a valid hex string",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),n.length%2!=0&&c.throwError("bytecode must be valid data (even length)",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),y.defineReadOnly(this,"bytecode",n),p.Interface.isInterface(t)?y.defineReadOnly(this,"interface",t):y.defineReadOnly(this,"interface",new p.Interface(t)),r&&!v.Signer.isSigner(r)&&c.throwError("invalid signer",c.INVALID_ARGUMENT,{arg:"signer",value:null}),y.defineReadOnly(this,"signer",r||null)}r.Contract=x,I.prototype.getDeployTransaction=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r={};if(t.length===this.interface.deployFunction.inputs.length+1)for(var n in r=y.shallowCopy(t.pop()))if(!w[n])throw new Error("unknown transaction override "+n);return["data","from","to"].forEach((function(t){null!=r[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),c.checkArgumentCount(t.length,this.interface.deployFunction.inputs.length," in Contract constructor"),r.data=this.interface.deployFunction.encode(this.bytecode,t),r},I.prototype.deploy=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=this.getDeployTransaction.apply(this,e);return this.signer.sendTransaction(n).then((function(e){var r=new x(h.getContractAddress(e),t.interface,t.signer);return y.defineReadOnly(r,"deployTransaction",e),r}))},I.prototype.attach=function(t){return new x(t,this.interface,this.signer)},I.prototype.connect=function(t){return new I(this.interface,this.bytecode,t)},I.fromSolidity=function(t,e){null==t&&c.throwError("missing compiler output",c.MISSING_ARGUMENT,{argument:"compilerOutput"});var r=(t="string"==typeof t?JSON.parse(t):t).abi,n=null;return t.bytecode?n=t.bytecode:t.evm&&t.evm.bytecode&&(n=t.evm.bytecode),new I(r,n,e)},i=I,r.ContractFactory=i},{"./abstract-signer":2,"./constants":3,"./errors":5,"./providers/abstract-provider":50,"./utils/abi-coder":59,"./utils/address":60,"./utils/bignumber":63,"./utils/bytes":64,"./utils/interface":69,"./utils/properties":74}],5:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./_version");r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.MISSING_NEW="MISSING_NEW",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.NUMERIC_FAULT="NUMERIC_FAULT",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED";var i=!(r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION"),o=!1;function a(t,e,i){if(o)throw new Error("unknown error");e=e||r.UNKNOWN_ERROR,i=i||{};var a=[];Object.keys(i).forEach((function(t){try{a.push(t+"="+JSON.stringify(i[t]))}catch(e){a.push(t+"="+JSON.stringify(i[t].toString()))}})),a.push("version="+n.version);var s=t;a.length&&(t+=" ("+a.join(", ")+")");var u=new Error(t);throw u.reason=s,u.code=e,Object.keys(i).forEach((function(t){u[t]=i[t]})),u}r.throwError=a,r.checkNew=function(t,e){t instanceof e||a("missing new",r.MISSING_NEW,{name:e.name})},r.checkArgumentCount=function(t,e,n){n=n||"",t<e&&a("missing argument"+n,r.MISSING_ARGUMENT,{count:t,expectedCount:e}),e<t&&a("too many arguments"+n,r.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})},r.setCensorship=function(t,e){i&&a("error censorship permanent",r.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o=!!t,i=!!e},r.checkNormalize=function(){try{if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{"test".normalize(t)}catch(e){throw new Error("missing "+t)}})),String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){a("platform missing String.prototype.normalize",r.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:t.message})}};var s={debug:1,default:2,info:2,warn:3,error:4,off:5},u=s.default;function c(t,e){u>s[t]||console.log.apply(console,e)}function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c("warn",t)}r.setLogLevel=function(t){var e=s[t];null!=e?u=e:l("invliad log level - "+t)},r.warn=l,r.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c("info",t)}},{"./_version":1}],6:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./contract");r.Contract=i.Contract,r.ContractFactory=i.ContractFactory,r.VoidSigner=i.VoidSigner,i=t("./abstract-signer"),r.Signer=i.Signer,i=t("./wallet"),r.Wallet=i.Wallet,i=n(t("./constants")),r.constants=i;var o=n(t("./errors"));r.errors=o;var a=n(t("./providers"));r.providers=a;var s=n(t("./utils"));r.utils=s,n=n(t("./wordlists")),r.wordlists=n,n=t("./utils/shims"),r.platform=n.platform,t=t("./_version"),r.version=t.version,r.getDefaultProvider=function(t){var e=s.getNetwork(t=null==t?"homestead":t);return e&&e._defaultProvider||o.throwError("unsupported getDefaultProvider network",o.UNSUPPORTED_OPERATION,{operation:"getDefaultProvider",network:t}),e._defaultProvider(a)}},{"./_version":1,"./abstract-signer":2,"./constants":3,"./contract":4,"./errors":5,"./providers":54,"./utils":68,"./utils/shims":80,"./wallet":88,"./wordlists":89}],7:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0}),n=n(t("./ethers")),r.ethers=n,function(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}(t("./ethers"))},{"./ethers":6}],8:[function(t,e,r){"use strict";!function(t){function n(t){return parseInt(t)===t}function i(t){if(n(t.length)){for(var e=0;e<t.length;e++)if(!n(t[e])||t[e]<0||255<t[e])return;return 1}}function o(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e?t.slice?t.slice():Array.prototype.slice.call(t):t;if(Array.isArray(t)){if(!i(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(n(t.length)&&i(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function a(t){return new Uint8Array(t)}function s(t,e,r,n,i){null==n&&null==i||(t=t.slice?t.slice(n,i):Array.prototype.slice.call(t,n,i)),e.set(t,r)}var u,c={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r<t.length;){var n=t.charCodeAt(r++);37===n?(e.push(parseInt(t.substr(r,2),16)),r+=2):e.push(n)}return o(e)},fromBytes:function(t){for(var e=[],r=0;r<t.length;){var n=t[r];n<128?(e.push(String.fromCharCode(n)),r++):191<n&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},l=(u="0123456789abcdef",{toBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},fromBytes:function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(u[(240&n)>>4]+u[15&n])}return e.join("")}}),h={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],y=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],v=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],b=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],_=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],k=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],x=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],I=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],E=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(t){for(var e=[],r=0;r<t.length;r+=4)e.push(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]);return e}var M=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(e,!0)}),this._prepare()};M.prototype._prepare=function(){var t=h[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(t+1),i=this.key.length/4,o=S(this.key);for(e=0;e<i;e++)this._Ke[r=e>>2][e%4]=o[e],this._Kd[t-r][e%4]=o[e];for(var a,s=0,u=i;u<n;){if(a=o[i-1],o[0]^=d[a>>16&255]<<24^d[a>>8&255]<<16^d[255&a]<<8^d[a>>24&255]^f[s]<<24,s+=1,8!=i)for(e=1;e<i;e++)o[e]^=o[e-1];else{for(e=1;e<i/2;e++)o[e]^=o[e-1];for(a=o[i/2-1],o[i/2]^=d[255&a]^d[a>>8&255]<<8^d[a>>16&255]<<16^d[a>>24&255]<<24,e=i/2+1;e<i;e++)o[e]^=o[e-1]}for(e=0;e<i&&u<n;)this._Ke[c=u>>2][l=u%4]=o[e],this._Kd[t-c][l]=o[e++],u++}for(var c=1;c<t;c++)for(var l=0;l<4;l++)a=this._Kd[c][l],this._Kd[c][l]=x[a>>24&255]^A[a>>16&255]^I[a>>8&255]^E[255&a]},M.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=S(t),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var o=1;o<e;o++){for(i=0;i<4;i++)r[i]=y[n[i]>>24&255]^m[n[(i+1)%4]>>16&255]^v[n[(i+2)%4]>>8&255]^g[255&n[(i+3)%4]]^this._Ke[o][i];n=r.slice()}var s,u=a(16);for(i=0;i<4;i++)s=this._Ke[e][i],u[4*i]=255&(d[n[i]>>24&255]^s>>24),u[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&n[(i+3)%4]]^s);return u},M.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=S(t),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var o=1;o<e;o++){for(i=0;i<4;i++)r[i]=b[n[i]>>24&255]^w[n[(i+3)%4]>>16&255]^_[n[(i+2)%4]>>8&255]^k[255&n[(i+1)%4]]^this._Kd[o][i];n=r.slice()}var s,u=a(16);for(i=0;i<4;i++)s=this._Kd[e][i],u[4*i]=255&(p[n[i]>>24&255]^s>>24),u[4*i+1]=255&(p[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(p[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(p[255&n[(i+1)%4]]^s);return u};var T=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new M(e)};T.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),n=0;n<t.length;n+=16)s(t,r,0,n,n+16),s(r=this._aes.encrypt(r),e,n);return e},T.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),n=0;n<t.length;n+=16)s(t,r,0,n,n+16),s(r=this._aes.decrypt(r),e,n);return e};var P=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=a(16);this._lastCipherblock=o(r,!0),this._aes=new M(e)};P.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),n=0;n<t.length;n+=16){s(t,r,0,n,n+16);for(var i=0;i<16;i++)r[i]^=this._lastCipherblock[i];this._lastCipherblock=this._aes.encrypt(r),s(this._lastCipherblock,e,n)}return e},P.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=a(t.length),r=a(16),n=0;n<t.length;n+=16){s(t,r,0,n,n+16),r=this._aes.decrypt(r);for(var i=0;i<16;i++)e[n+i]=r[i]^this._lastCipherblock[i];s(t,this._lastCipherblock,0,n,n+16)}return e};var C=function t(e,r,n){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 size)")}else r=a(16);this.segmentSize=n=n||1,this._shiftRegister=o(r,!0),this._aes=new M(e)};C.prototype.encrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var e=o(t,!0),r=0;r<e.length;r+=this.segmentSize){for(var n=this._aes.encrypt(this._shiftRegister),i=0;i<this.segmentSize;i++)e[r+i]^=n[i];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(e,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return e},C.prototype.decrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var e=o(t,!0),r=0;r<e.length;r+=this.segmentSize){for(var n=this._aes.encrypt(this._shiftRegister),i=0;i<this.segmentSize;i++)e[r+i]^=n[i];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(t,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return e};var O=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=a(16);this._lastPrecipher=o(r,!0),this._lastPrecipherIndex=16,this._aes=new M(e)};O.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),e[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return e},O.prototype.decrypt=O.prototype.encrypt;var R=function t(e){if(!(this instanceof t))throw Error("Counter must be instanitated with `new`");"number"==typeof(e=0===e||e?e:1)?(this._counter=a(16),this.setValue(e)):this.setBytes(e)};R.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");for(var e=15;0<=e;--e)this._counter[e]=t%256,t>>=8},R.prototype.setBytes=function(t){if(16!=(t=o(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},R.prototype.increment=function(){for(var t=15;0<=t;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var j=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof R||(r=new R(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new M(e)};j.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),e[r]^=this._remainingCounter[this._remainingCounterIndex++];return e},j.prototype.decrypt=j.prototype.encrypt,c={AES:M,Counter:R,ModeOfOperation:{ecb:T,cbc:P,cfb:C,ofb:O,ctr:j},utils:{hex:l,utf8:c},padding:{pkcs7:{pad:function(t){var e=16-(t=o(t,!0)).length%16,r=a(t.length+e);s(t,r);for(var n=t.length;n<r.length;n++)r[n]=e;return r},strip:function(t){if((t=o(t,!0)).length<16)throw new Error("PKCS#7 invalid length");var e=t[t.length-1];if(16<e)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n<e;n++)if(t[r+n]!==e)throw new Error("PKCS#7 invalid padding byte");var i=a(r);return s(t,i,0,0,r),i}}},_arrayTest:{coerceArray:o,createArray:a,copyArray:s}},void 0!==r?e.exports=c:(t.aesjs&&(c._aesjs=t.aesjs),t.aesjs=c)}(this)},{}],9:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){function r(){}t.super_=e,r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"==s(e)?e.exports=o:r.BN=o,(o.BN=o).wordSize=26;try{a=("undefined"!=typeof window&&void 0!==window.Buffer?window:t("buffer")).Buffer}catch(e){}function u(t,e){return 65<=(e=t.charCodeAt(e))&&e<=70?e-55:97<=e&&e<=102?e-87:e-48&15}function c(t,e,r){var n=u(t,r);return e<=r-1&&(n|=u(t,r-1)<<4),n}function l(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=n,i+=49<=s?s-49+10:17<=s?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==s(t)&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return 0<t.cmp(e)?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==s(t))return this._initArray(t,e,r);n((e="hex"===e?16:e)===(0|e)&&2<=e&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i,o,a=0;a<this.length;a++)this.words[a]=0;var s=0;if("be"===r)for(a=t.length-1,i=0;0<=a;a-=3)o=t[a]|t[a-1]<<8|t[a-2]<<16,this.words[i]|=o<<s&67108863,this.words[i+1]=o>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);else if("le"===r)for(i=a=0;a<t.length;a+=3)o=t[a]|t[a+1]<<8|t[a+2]<<16,this.words[i]|=o<<s&67108863,this.words[i+1]=o>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=t.length-1;e<=n;n-=2)i=c(t,e,n)<<o,this.words[a]|=67108863&i,18<=o?(o-=18,this.words[a+=1]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=c(t,e,n)<<o,this.words[a]|=67108863&i,18<=o?(o-=18,this.words[a+=1]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=e)n++;i=i/e|0;for(var o=t.length-r,a=o%--n,s=Math.min(o,o-a)+r,u=0,c=r;c<s;c+=n)u=l(t,c,c+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!=a){var h=1;for(u=l(t,c,t.length,e),c=0;c<a;c++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0,i=(n=(r.length=n)-1|0,(a=(0|t.words[0])*(0|e.words[0]))/67108864|0);r.words[0]=67108863&a;for(var o=1;o<n;o++){for(var a,s=i>>>26,u=67108863&i,c=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=c;l++)s+=(a=(0|t.words[o-l|0])*(0|e.words[l])+u)/67108864|0,u=67108863&a;r.words[o]=0|u,i=0|s}return 0!==i?r.words[o]=0|i:r.length--,r.strip()}o.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){u="";for(var r=0,i=0,o=0;o<this.length;o++){var a=this.words[o],s=(16777215&(a<<r|i)).toString(16),u=0!=(i=a>>>24-r&16777215)||o!==this.length-1?h[6-s.length]+s+u:s+u;26<=(r+=2)&&(r-=26,o--)}for(0!==i&&(u=i.toString(16)+u);u.length%e!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}if(t===(0|t)&&2<=t&&t<=36){var c=f[t],l=d[t];for(u="",(p=this.clone()).negative=0;!p.isZero();){var p,y=p.modn(l).toString(t);u=(p=p.idivn(l)).isZero()?y+u:h[c-y.length]+y+u}for(this.isZero()&&(u="0"+u);u.length%e!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2<this.length&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(0<o,"Requested array length <= 0"),this.strip(),e="le"===e;var a,s,u=new t(o),c=this.clone();if(e){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-i;s++)u[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t;return t=0,4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t;return t=0,0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},o.prototype.bitLength=function(){var t=this.words[this.length-1];return t=this._countBits(t),26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){for(var e,r=this.length>t.length?(e=this,t):(e=t,this),n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26);t%=26,this._expand(e),0<t&&e--;for(var r=0;r<e;r++)this.words[r]=67108863&~this.words[r];return 0<t&&(this.words[r]=~this.words[r]&67108863>>26-t),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&0<=t);var r=t/26|0;return t%=26,this._expand(1+r),this.words[r]=e?this.words[r]|1<<t:this.words[r]&~(1<<t),this.strip()},o.prototype.iadd=function(t){var e,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();for(var n=this.length>t.length?(r=this,t):(r=t,this),i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;for(var i=0<n?(r=this,t):(r=t,this),o=0,a=0;a<i.length;a++)o=(e=(0|r.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<r.length;a++)o=(e=(0|r.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var y=function(t,e,r){var n,i,o=t.words,a=e.words,s=r.words,u=(G=0|o[0],8191&G),c=G>>>13,l=8191&(V=0|o[1]),h=V>>>13,f=8191&(K=0|o[2]),d=K>>>13,p=8191&(n=0|o[3]),y=n>>>13,m=8191&(Z=0|o[4]),v=Z>>>13,g=8191&(W=0|o[5]),b=W>>>13,w=8191&(i=0|o[6]),_=i>>>13,k=8191&(J=0|o[7]),x=J>>>13,A=8191&(Q=0|o[8]),I=Q>>>13,E=8191&(Y=0|o[9]),S=Y>>>13,M=8191&($=0|a[0]),T=$>>>13,P=0|a[1],C=8191&P,O=P>>>13,R=0|a[2],j=8191&R,N=R>>>13,L=8191&(X=0|a[3]),U=X>>>13,D=0|a[4],B=8191&D,z=D>>>13,H=0|a[5],F=8191&H,q=H>>>13,G=0|a[6],V=8191&G,K=G>>>13,Z=8191&(n=0|a[7]),W=n>>>13,J=8191&(i=0|a[8]),Q=i>>>13,Y=8191&(o=0|a[9]),$=o>>>13;r.negative=t.negative^e.negative,r.length=19;var X=(0+Math.imul(u,M)|0)+((8191&(R=(R=Math.imul(u,T))+Math.imul(c,M)|0))<<13)|0,tt=((D=Math.imul(c,T))+(R>>>13)|0)+(X>>>26)|0;return X&=67108863,P=Math.imul(l,M),R=(R=Math.imul(l,T))+Math.imul(h,M)|0,D=Math.imul(h,T),H=(tt+(P+Math.imul(u,C)|0)|0)+((8191&(R=(R=R+Math.imul(u,O)|0)+Math.imul(c,C)|0))<<13)|0,tt=((D=D+Math.imul(c,O)|0)+(R>>>13)|0)+(H>>>26)|0,H&=67108863,P=Math.imul(f,M),R=(R=Math.imul(f,T))+Math.imul(d,M)|0,D=Math.imul(d,T),P=P+Math.imul(l,C)|0,R=(R=R+Math.imul(l,O)|0)+Math.imul(h,C)|0,D=D+Math.imul(h,O)|0,G=(tt+(P+Math.imul(u,j)|0)|0)+((8191&(R=(R=R+Math.imul(u,N)|0)+Math.imul(c,j)|0))<<13)|0,tt=((D=D+Math.imul(c,N)|0)+(R>>>13)|0)+(G>>>26)|0,G&=67108863,P=Math.imul(p,M),R=(R=Math.imul(p,T))+Math.imul(y,M)|0,D=Math.imul(y,T),P=P+Math.imul(f,C)|0,R=(R=R+Math.imul(f,O)|0)+Math.imul(d,C)|0,D=D+Math.imul(d,O)|0,P=P+Math.imul(l,j)|0,R=(R=R+Math.imul(l,N)|0)+Math.imul(h,j)|0,D=D+Math.imul(h,N)|0,n=(tt+(P+Math.imul(u,L)|0)|0)+((8191&(R=(R=R+Math.imul(u,U)|0)+Math.imul(c,L)|0))<<13)|0,tt=((D=D+Math.imul(c,U)|0)+(R>>>13)|0)+(n>>>26)|0,n&=67108863,P=Math.imul(m,M),R=(R=Math.imul(m,T))+Math.imul(v,M)|0,D=Math.imul(v,T),P=P+Math.imul(p,C)|0,R=(R=R+Math.imul(p,O)|0)+Math.imul(y,C)|0,D=D+Math.imul(y,O)|0,P=P+Math.imul(f,j)|0,R=(R=R+Math.imul(f,N)|0)+Math.imul(d,j)|0,D=D+Math.imul(d,N)|0,P=P+Math.imul(l,L)|0,R=(R=R+Math.imul(l,U)|0)+Math.imul(h,L)|0,D=D+Math.imul(h,U)|0,i=(tt+(P+Math.imul(u,B)|0)|0)+((8191&(R=(R=R+Math.imul(u,z)|0)+Math.imul(c,B)|0))<<13)|0,tt=((D=D+Math.imul(c,z)|0)+(R>>>13)|0)+(i>>>26)|0,i&=67108863,P=Math.imul(g,M),R=(R=Math.imul(g,T))+Math.imul(b,M)|0,D=Math.imul(b,T),P=P+Math.imul(m,C)|0,R=(R=R+Math.imul(m,O)|0)+Math.imul(v,C)|0,D=D+Math.imul(v,O)|0,P=P+Math.imul(p,j)|0,R=(R=R+Math.imul(p,N)|0)+Math.imul(y,j)|0,D=D+Math.imul(y,N)|0,P=P+Math.imul(f,L)|0,R=(R=R+Math.imul(f,U)|0)+Math.imul(d,L)|0,D=D+Math.imul(d,U)|0,P=P+Math.imul(l,B)|0,R=(R=R+Math.imul(l,z)|0)+Math.imul(h,B)|0,D=D+Math.imul(h,z)|0,a=(tt+(P+Math.imul(u,F)|0)|0)+((8191&(R=(R=R+Math.imul(u,q)|0)+Math.imul(c,F)|0))<<13)|0,tt=((D=D+Math.imul(c,q)|0)+(R>>>13)|0)+(a>>>26)|0,a&=67108863,P=Math.imul(w,M),R=(R=Math.imul(w,T))+Math.imul(_,M)|0,D=Math.imul(_,T),P=P+Math.imul(g,C)|0,R=(R=R+Math.imul(g,O)|0)+Math.imul(b,C)|0,D=D+Math.imul(b,O)|0,P=P+Math.imul(m,j)|0,R=(R=R+Math.imul(m,N)|0)+Math.imul(v,j)|0,D=D+Math.imul(v,N)|0,P=P+Math.imul(p,L)|0,R=(R=R+Math.imul(p,U)|0)+Math.imul(y,L)|0,D=D+Math.imul(y,U)|0,P=P+Math.imul(f,B)|0,R=(R=R+Math.imul(f,z)|0)+Math.imul(d,B)|0,D=D+Math.imul(d,z)|0,P=P+Math.imul(l,F)|0,R=(R=R+Math.imul(l,q)|0)+Math.imul(h,F)|0,D=D+Math.imul(h,q)|0,o=(tt+(P+Math.imul(u,V)|0)|0)+((8191&(R=(R=R+Math.imul(u,K)|0)+Math.imul(c,V)|0))<<13)|0,tt=((D=D+Math.imul(c,K)|0)+(R>>>13)|0)+(o>>>26)|0,o&=67108863,P=Math.imul(k,M),R=(R=Math.imul(k,T))+Math.imul(x,M)|0,D=Math.imul(x,T),P=P+Math.imul(w,C)|0,R=(R=R+Math.imul(w,O)|0)+Math.imul(_,C)|0,D=D+Math.imul(_,O)|0,P=P+Math.imul(g,j)|0,R=(R=R+Math.imul(g,N)|0)+Math.imul(b,j)|0,D=D+Math.imul(b,N)|0,P=P+Math.imul(m,L)|0,R=(R=R+Math.imul(m,U)|0)+Math.imul(v,L)|0,D=D+Math.imul(v,U)|0,P=P+Math.imul(p,B)|0,R=(R=R+Math.imul(p,z)|0)+Math.imul(y,B)|0,D=D+Math.imul(y,z)|0,P=P+Math.imul(f,F)|0,R=(R=R+Math.imul(f,q)|0)+Math.imul(d,F)|0,D=D+Math.imul(d,q)|0,P=P+Math.imul(l,V)|0,R=(R=R+Math.imul(l,K)|0)+Math.imul(h,V)|0,D=D+Math.imul(h,K)|0,t=(tt+(P+Math.imul(u,Z)|0)|0)+((8191&(R=(R=R+Math.imul(u,W)|0)+Math.imul(c,Z)|0))<<13)|0,tt=((D=D+Math.imul(c,W)|0)+(R>>>13)|0)+(t>>>26)|0,t&=67108863,P=Math.imul(A,M),R=(R=Math.imul(A,T))+Math.imul(I,M)|0,D=Math.imul(I,T),P=P+Math.imul(k,C)|0,R=(R=R+Math.imul(k,O)|0)+Math.imul(x,C)|0,D=D+Math.imul(x,O)|0,P=P+Math.imul(w,j)|0,R=(R=R+Math.imul(w,N)|0)+Math.imul(_,j)|0,D=D+Math.imul(_,N)|0,P=P+Math.imul(g,L)|0,R=(R=R+Math.imul(g,U)|0)+Math.imul(b,L)|0,D=D+Math.imul(b,U)|0,P=P+Math.imul(m,B)|0,R=(R=R+Math.imul(m,z)|0)+Math.imul(v,B)|0,D=D+Math.imul(v,z)|0,P=P+Math.imul(p,F)|0,R=(R=R+Math.imul(p,q)|0)+Math.imul(y,F)|0,D=D+Math.imul(y,q)|0,P=P+Math.imul(f,V)|0,R=(R=R+Math.imul(f,K)|0)+Math.imul(d,V)|0,D=D+Math.imul(d,K)|0,P=P+Math.imul(l,Z)|0,R=(R=R+Math.imul(l,W)|0)+Math.imul(h,Z)|0,D=D+Math.imul(h,W)|0,e=(tt+(P+Math.imul(u,J)|0)|0)+((8191&(R=(R=R+Math.imul(u,Q)|0)+Math.imul(c,J)|0))<<13)|0,tt=((D=D+Math.imul(c,Q)|0)+(R>>>13)|0)+(e>>>26)|0,e&=67108863,P=Math.imul(E,M),R=(R=Math.imul(E,T))+Math.imul(S,M)|0,D=Math.imul(S,T),P=P+Math.imul(A,C)|0,R=(R=R+Math.imul(A,O)|0)+Math.imul(I,C)|0,D=D+Math.imul(I,O)|0,P=P+Math.imul(k,j)|0,R=(R=R+Math.imul(k,N)|0)+Math.imul(x,j)|0,D=D+Math.imul(x,N)|0,P=P+Math.imul(w,L)|0,R=(R=R+Math.imul(w,U)|0)+Math.imul(_,L)|0,D=D+Math.imul(_,U)|0,P=P+Math.imul(g,B)|0,R=(R=R+Math.imul(g,z)|0)+Math.imul(b,B)|0,D=D+Math.imul(b,z)|0,P=P+Math.imul(m,F)|0,R=(R=R+Math.imul(m,q)|0)+Math.imul(v,F)|0,D=D+Math.imul(v,q)|0,P=P+Math.imul(p,V)|0,R=(R=R+Math.imul(p,K)|0)+Math.imul(y,V)|0,D=D+Math.imul(y,K)|0,P=P+Math.imul(f,Z)|0,R=(R=R+Math.imul(f,W)|0)+Math.imul(d,Z)|0,D=D+Math.imul(d,W)|0,P=P+Math.imul(l,J)|0,R=(R=R+Math.imul(l,Q)|0)+Math.imul(h,J)|0,D=D+Math.imul(h,Q)|0,u=(tt+(P+Math.imul(u,Y)|0)|0)+((8191&(R=(R=R+Math.imul(u,$)|0)+Math.imul(c,Y)|0))<<13)|0,tt=((D=D+Math.imul(c,$)|0)+(R>>>13)|0)+(u>>>26)|0,u&=67108863,P=Math.imul(E,C),R=(R=Math.imul(E,O))+Math.imul(S,C)|0,D=Math.imul(S,O),P=P+Math.imul(A,j)|0,R=(R=R+Math.imul(A,N)|0)+Math.imul(I,j)|0,D=D+Math.imul(I,N)|0,P=P+Math.imul(k,L)|0,R=(R=R+Math.imul(k,U)|0)+Math.imul(x,L)|0,D=D+Math.imul(x,U)|0,P=P+Math.imul(w,B)|0,R=(R=R+Math.imul(w,z)|0)+Math.imul(_,B)|0,D=D+Math.imul(_,z)|0,P=P+Math.imul(g,F)|0,R=(R=R+Math.imul(g,q)|0)+Math.imul(b,F)|0,D=D+Math.imul(b,q)|0,P=P+Math.imul(m,V)|0,R=(R=R+Math.imul(m,K)|0)+Math.imul(v,V)|0,D=D+Math.imul(v,K)|0,P=P+Math.imul(p,Z)|0,R=(R=R+Math.imul(p,W)|0)+Math.imul(y,Z)|0,D=D+Math.imul(y,W)|0,P=P+Math.imul(f,J)|0,R=(R=R+Math.imul(f,Q)|0)+Math.imul(d,J)|0,D=D+Math.imul(d,Q)|0,l=(tt+(P+Math.imul(l,Y)|0)|0)+((8191&(R=(R=R+Math.imul(l,$)|0)+Math.imul(h,Y)|0))<<13)|0,tt=((D=D+Math.imul(h,$)|0)+(R>>>13)|0)+(l>>>26)|0,l&=67108863,P=Math.imul(E,j),R=(R=Math.imul(E,N))+Math.imul(S,j)|0,D=Math.imul(S,N),P=P+Math.imul(A,L)|0,R=(R=R+Math.imul(A,U)|0)+Math.imul(I,L)|0,D=D+Math.imul(I,U)|0,P=P+Math.imul(k,B)|0,R=(R=R+Math.imul(k,z)|0)+Math.imul(x,B)|0,D=D+Math.imul(x,z)|0,P=P+Math.imul(w,F)|0,R=(R=R+Math.imul(w,q)|0)+Math.imul(_,F)|0,D=D+Math.imul(_,q)|0,P=P+Math.imul(g,V)|0,R=(R=R+Math.imul(g,K)|0)+Math.imul(b,V)|0,D=D+Math.imul(b,K)|0,P=P+Math.imul(m,Z)|0,R=(R=R+Math.imul(m,W)|0)+Math.imul(v,Z)|0,D=D+Math.imul(v,W)|0,P=P+Math.imul(p,J)|0,R=(R=R+Math.imul(p,Q)|0)+Math.imul(y,J)|0,D=D+Math.imul(y,Q)|0,f=(tt+(P+Math.imul(f,Y)|0)|0)+((8191&(R=(R=R+Math.imul(f,$)|0)+Math.imul(d,Y)|0))<<13)|0,tt=((D=D+Math.imul(d,$)|0)+(R>>>13)|0)+(f>>>26)|0,f&=67108863,P=Math.imul(E,L),R=(R=Math.imul(E,U))+Math.imul(S,L)|0,D=Math.imul(S,U),P=P+Math.imul(A,B)|0,R=(R=R+Math.imul(A,z)|0)+Math.imul(I,B)|0,D=D+Math.imul(I,z)|0,P=P+Math.imul(k,F)|0,R=(R=R+Math.imul(k,q)|0)+Math.imul(x,F)|0,D=D+Math.imul(x,q)|0,P=P+Math.imul(w,V)|0,R=(R=R+Math.imul(w,K)|0)+Math.imul(_,V)|0,D=D+Math.imul(_,K)|0,P=P+Math.imul(g,Z)|0,R=(R=R+Math.imul(g,W)|0)+Math.imul(b,Z)|0,D=D+Math.imul(b,W)|0,P=P+Math.imul(m,J)|0,R=(R=R+Math.imul(m,Q)|0)+Math.imul(v,J)|0,D=D+Math.imul(v,Q)|0,p=(tt+(P+Math.imul(p,Y)|0)|0)+((8191&(R=(R=R+Math.imul(p,$)|0)+Math.imul(y,Y)|0))<<13)|0,tt=((D=D+Math.imul(y,$)|0)+(R>>>13)|0)+(p>>>26)|0,p&=67108863,P=Math.imul(E,B),R=(R=Math.imul(E,z))+Math.imul(S,B)|0,D=Math.imul(S,z),P=P+Math.imul(A,F)|0,R=(R=R+Math.imul(A,q)|0)+Math.imul(I,F)|0,D=D+Math.imul(I,q)|0,P=P+Math.imul(k,V)|0,R=(R=R+Math.imul(k,K)|0)+Math.imul(x,V)|0,D=D+Math.imul(x,K)|0,P=P+Math.imul(w,Z)|0,R=(R=R+Math.imul(w,W)|0)+Math.imul(_,Z)|0,D=D+Math.imul(_,W)|0,P=P+Math.imul(g,J)|0,R=(R=R+Math.imul(g,Q)|0)+Math.imul(b,J)|0,D=D+Math.imul(b,Q)|0,m=(tt+(P+Math.imul(m,Y)|0)|0)+((8191&(R=(R=R+Math.imul(m,$)|0)+Math.imul(v,Y)|0))<<13)|0,tt=((D=D+Math.imul(v,$)|0)+(R>>>13)|0)+(m>>>26)|0,m&=67108863,P=Math.imul(E,F),R=(R=Math.imul(E,q))+Math.imul(S,F)|0,D=Math.imul(S,q),P=P+Math.imul(A,V)|0,R=(R=R+Math.imul(A,K)|0)+Math.imul(I,V)|0,D=D+Math.imul(I,K)|0,P=P+Math.imul(k,Z)|0,R=(R=R+Math.imul(k,W)|0)+Math.imul(x,Z)|0,D=D+Math.imul(x,W)|0,P=P+Math.imul(w,J)|0,R=(R=R+Math.imul(w,Q)|0)+Math.imul(_,J)|0,D=D+Math.imul(_,Q)|0,g=(tt+(P+Math.imul(g,Y)|0)|0)+((8191&(R=(R=R+Math.imul(g,$)|0)+Math.imul(b,Y)|0))<<13)|0,tt=((D=D+Math.imul(b,$)|0)+(R>>>13)|0)+(g>>>26)|0,g&=67108863,P=Math.imul(E,V),R=(R=Math.imul(E,K))+Math.imul(S,V)|0,D=Math.imul(S,K),P=P+Math.imul(A,Z)|0,R=(R=R+Math.imul(A,W)|0)+Math.imul(I,Z)|0,D=D+Math.imul(I,W)|0,P=P+Math.imul(k,J)|0,R=(R=R+Math.imul(k,Q)|0)+Math.imul(x,J)|0,D=D+Math.imul(x,Q)|0,w=(tt+(P+Math.imul(w,Y)|0)|0)+((8191&(R=(R=R+Math.imul(w,$)|0)+Math.imul(_,Y)|0))<<13)|0,tt=((D=D+Math.imul(_,$)|0)+(R>>>13)|0)+(w>>>26)|0,w&=67108863,P=Math.imul(E,Z),R=(R=Math.imul(E,W))+Math.imul(S,Z)|0,D=Math.imul(S,W),P=P+Math.imul(A,J)|0,R=(R=R+Math.imul(A,Q)|0)+Math.imul(I,J)|0,D=D+Math.imul(I,Q)|0,k=(tt+(P+Math.imul(k,Y)|0)|0)+((8191&(R=(R=R+Math.imul(k,$)|0)+Math.imul(x,Y)|0))<<13)|0,tt=((D=D+Math.imul(x,$)|0)+(R>>>13)|0)+(k>>>26)|0,k&=67108863,P=Math.imul(E,J),R=(R=Math.imul(E,Q))+Math.imul(S,J)|0,D=Math.imul(S,Q),A=(tt+(P+Math.imul(A,Y)|0)|0)+((8191&(R=(R=R+Math.imul(A,$)|0)+Math.imul(I,Y)|0))<<13)|0,tt=((D=D+Math.imul(I,$)|0)+(R>>>13)|0)+(A>>>26)|0,A&=67108863,Y=(tt+Math.imul(E,Y)|0)+((8191&(R=(R=Math.imul(E,$))+Math.imul(S,Y)|0))<<13)|0,tt=((D=Math.imul(S,$))+(R>>>13)|0)+(Y>>>26)|0,Y&=67108863,s[0]=X,s[1]=H,s[2]=G,s[3]=n,s[4]=i,s[5]=a,s[6]=o,s[7]=t,s[8]=e,s[9]=u,s[10]=l,s[11]=f,s[12]=p,s[13]=m,s[14]=g,s[15]=w,s[16]=k,s[17]=A,s[18]=Y,0!=tt&&(s[19]=tt,r.length++),r};function m(t,e,r){return(new v).mulp(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(y=p),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return e=(10===this.length&&10===t.length?y:r<63?p:r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){for(var a=i,s=(i=0,67108863&n),u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var l,h=(0|t.words[o-c])*(0|e.words[c]);s=67108863&(l=(l=67108863&h)+s|0),i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}:m)(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a<o;a++)n[a]=e[t[a]],i[a]=r[t[a]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),l=0;l<i;l+=s)for(var h=u,f=c,d=0;d<a;d++){var p=r[l+d],y=n[l+d],m=r[l+d+a],v=h*m-f*(g=n[l+d+a]),g=h*g+f*m;r[l+d]=p+(m=v),n[l+d]=y+g,r[l+d+a]=p-m,n[l+d+a]=y-g,d!==s&&(v=u*h-c*f,f=u*f+c*h,h=v)}},v.prototype.guessLen13b=function(t,e){t=1&(n=1|Math.max(e,t));for(var r=0,n=n/2|0;n;n>>>=1)r++;return 1<<r+1+t},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],r[2*a]=8191&o,r[2*a+1]=8191&(o>>>=13),o>>>=13;for(a=2*e;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(t.words,t.length,a,n),this.convert13b(e.words,e.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,l,h,n,i);for(var d=0;d<n;d++){var p=s[d]*l[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r%26;e[r]=(t.words[r/26|0]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&0<=t);var e=t%26,r=(t-e)/26,i=67108863>>>26-e<<26-e;if(0!=e){for(var o=0,a=0;a<this.length;a++){var s=this.words[a]&i,u=(0|this.words[a])-s<<e;this.words[a]=u|o,o=s>>>26-e}o&&(this.words[a]=o,this.length++)}if(0!=r){for(a=this.length-1;0<=a;a--)this.words[a+r]=this.words[a];for(a=0;a<r;a++)this.words[a]=0;this.length+=r}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){n("number"==typeof t&&0<=t);var i=e?(e-e%26)/26:0,o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r;if(i-=a,i=Math.max(0,i),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0!==a)if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;0<=c&&(0!==l||i<=c);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&0<=t);var e=t%26;return t=(t-e)/26,!(this.length<=t||!(this.words[t]&1<<e))},o.prototype.imaskn=function(t){n("number"==typeof t&&0<=t);var e=t%26;return t=(t-e)/26,n(0===this.negative,"imaskn works only with positive numbers"),this.length<=t?this:(0!=e&&t++,this.length=Math.min(t,this.length),0!=e&&(this.words[this.length-1]&=67108863^67108863>>>e<<e),this.strip())},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&67108864<=this.words[e];e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,--this.words[e+1];return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i=t.length+r;this._expand(i);for(var o=0,a=0;a<t.length;a++){var s=(0|this.words[a+r])+o,u=(0|t.words[a])*e;o=((s-=67108863&u)>>26)-(u/67108864|0),this.words[a+r]=67108863&s}for(;a<this.length-r;a++)o=(s=(0|this.words[a+r])+o)>>26,this.words[a+r]=67108863&s;if(0===o)return this.strip();for(n(-1===o),a=o=0;a<this.length;a++)o=(s=-(0|this.words[a])+o)>>26,this.words[a]=67108863&s;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=1+u,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}0===(t=n.clone()._ishlnsubmul(i,1,u)).negative&&(n=t,s&&(s.words[u]=1));for(var l=u-1;0<=l;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!=r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),{div:i="mod"!==e?s.div.neg():i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1);return t=t.andln(1),(n=r.cmp(n))<0||1===t&&0===n?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;0<=i;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());for(var e=this,r=t.clone(),i=(e=0!==e.negative?e.umod(t):e.clone(),new o(1)),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(0<f)for(e.iushrn(f);0<f--;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(0<p)for(r.iushrn(p);0<p--;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(h)),s.iushrn(1),u.iushrn(1);0<=e.cmp(r)?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());for(var e,r=this,i=t.clone(),a=(r=0!==r.negative?r.umod(t):r.clone(),new o(1)),s=new o(0),u=i.clone();0<r.cmpn(1)&&0<i.cmpn(1);){for(var c=0,l=1;0==(r.words[0]&l)&&c<26;++c,l<<=1);if(0<c)for(r.iushrn(c);0<c--;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var h=0,f=1;0==(i.words[0]&f)&&h<26;++h,f<<=1);if(0<h)for(i.iushrn(h);0<h--;)s.isOdd()&&s.iadd(u),s.iushrn(1);0<=r.cmp(i)?(r.isub(i),a.isub(s)):(i.isub(r),s.isub(a))}return(e=0===r.cmpn(1)?a:s).cmpn(0)<0&&e.iadd(t),e},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0;for(var n=r.negative=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t),t=(t-(e=t%26))/26;var e=1<<e;if(this.length<=t)return this._expand(1+t),this.words[t]|=e,this;for(var r=e,i=t;0!==r&&i<this.length;i++){var o=0|this.words[i];r=(o+=r)>>>26,o&=67108863,this.words[i]=o}return 0!==r&&(this.words[i]=r,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1<this.length?1:(n((t=e?-t:t)<=67108863,"Number is too big"),(e=0|this.words[0])===t?0:e<t?-1:1),0!==this.negative?0|-t:t):-1},o.prototype.cmp=function(t){return 0!==this.negative&&0===t.negative?-1:0===this.negative&&0!==t.negative?1:(t=this.ucmp(t),0!==this.negative?0|-t:t)},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;0<=r;r--){var n=0|this.words[r],i=0|t.words[r];if(n!=i){n<i?e=-1:i<n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return 0<=this.cmpn(t)},o.prototype.gte=function(t){return 0<=this.cmp(t)},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new A(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){var e;"string"==typeof t?(e=o._prime(t),this.m=e.p,this.prime=e):(n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null)}function I(t){A.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){for(var e,r=t;this.split(r,this.tmp),(e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);return 0===(t=e<this.n?-1:r.ucmp(this.p))?(r.words[0]=0,r.length=1):0<t?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(w,b),w.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}0==(t.words[n-10]=i>>>=22)&&10<t.length?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(_,b),i(k,b),i(x,b),x.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new _;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e},A.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){return this._verify2(t,e),0<=(e=t.add(e)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},A.prototype.iadd=function(t,e){return this._verify2(t,e),0<=(e=t.iadd(e)).cmp(this.m)&&e.isub(this.m),e},A.prototype.sub=function(t,e){return this._verify2(t,e),(e=t.sub(e)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},A.prototype.isub=function(t,e){return this._verify2(t,e),(e=t.isub(e)).cmpn(0)<0&&e.iadd(this.m),e},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e)return e=this.m.add(new o(1)).iushrn(2),this.pow(t,e);for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);n(!r.isZero());for(var a=new o(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),c=new o(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var l=this.pow(c,r),h=this.pow(t,r.addn(1).iushrn(1)),f=this.pow(t,r),d=i;0!==f.cmp(a);){for(var p=f,y=0;0!==p.cmp(a);y++)p=p.redSqr();n(y<d);var m=this.pow(l,new o(1).iushln(d-y-1));h=h.redMul(m),l=m.redSqr(),f=f.redMul(l),d=y}return h},A.prototype.invm=function(t){return 0!==(t=t._invmp(this.m)).negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;0<=n;n--){for(var c=e.words[n],l=u-1;0<=l;l--){var h=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!=h||0!==a?(a<<=1,a|=h,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[a]),a=s=0)):s=0}u=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){return(t=t.clone()).red=null,t},o.mont=function(t){return new I(t)},i(I,A),I.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},I.prototype.convertFrom=function(t){return(t=this.imod(t.mul(this.rinv))).red=null,t},I.prototype.imul=function(t,e){return t.isZero()||e.isZero()?(t.words[0]=0,t.length=1,t):(e=(t=t.imul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=t=t.isub(e).iushrn(this.shift),0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},I.prototype.mul=function(t,e){return t.isZero()||e.isZero()?new o(0)._forceRed(this):(e=(t=t.mul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=t=t.isub(e).iushrn(this.shift),0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},I.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:11}],10:[function(t,e,n){(function(t){(function(){e.exports=function(e){return e=new Uint8Array(e),(t.crypto||t.msCrypto).getRandomValues(e),e}}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(t,e,r){},{}],12:[function(t,e,r){"use strict";r.version=t("../package.json").version,r.utils=t("./elliptic/utils"),r.rand=t("brorand"),r.curve=t("./elliptic/curve"),r.curves=t("./elliptic/curves"),r.ec=t("./elliptic/ec"),r.eddsa=t("./elliptic/eddsa")},{"../package.json":25,"./elliptic/curve":15,"./elliptic/curves":18,"./elliptic/ec":19,"./elliptic/eddsa":22,"./elliptic/utils":24,brorand:10}],13:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils"),o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0,!(e=this.n&&this.p.div(this.n))||0<e.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}(e.exports=u).prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength);e=(1<<r.step+1)-(r.step%2==0?2:1),e/=3;for(var i=[],a=0;a<n.length;a+=r.step){for(var u=0,c=a+r.step-1;a<=c;c--)u=(u<<1)+n[c];i.push(u)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),f=e;0<f;f--){for(a=0;a<i.length;a++)(u=i[a])===f?h=h.mixedAdd(r.points[a]):u===-f&&(h=h.mixedAdd(r.points[a].neg()));l=l.add(h)}return l.toP()},u.prototype._wnafMul=function(t,e){for(var r=t._getNAFPoints(4),n=r.wnd,i=r.points,a=o(e,n,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;0<=c;c--){for(var l=0;0<=c&&0===a[c];c--)l++;if(0<=c&&l++,u=u.dblp(l),c<0)break;var h=a[c];s(0!==h),u="affine"===t.type?0<h?u.mixedAdd(i[h-1>>1]):u.mixedAdd(i[-h-1>>1].neg()):0<h?u.add(i[h-1>>1]):u.add(i[-h-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,l=0,h=0;h<n;h++){var f,d=(f=e[h])._getNAFPoints(t);s[h]=d.wnd,u[h]=d.points}for(h=n-1;1<=h;h-=2){var p=h-1,y=h;if(1===s[p]&&1===s[y]){var m=[e[p],null,null,e[y]];0===e[p].y.cmp(e[y].y)?(m[1]=e[p].add(e[y]),m[2]=e[p].toJ().mixedAdd(e[y].neg())):0===e[p].y.cmp(e[y].y.redNeg())?(m[1]=e[p].toJ().mixedAdd(e[y]),m[2]=e[p].add(e[y].neg())):(m[1]=e[p].toJ().mixedAdd(e[y]),m[2]=e[p].toJ().mixedAdd(e[y].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[p],r[y]);for(l=Math.max(g[0].length,l),c[p]=new Array(l),c[y]=new Array(l),I=0;I<l;I++){var b=0|g[0][I],w=0|g[1][I];c[p][I]=v[3*(1+b)+(1+w)],c[y][I]=0,u[p]=m}}else c[p]=o(r[p],s[p],this._bitLength),c[y]=o(r[y],s[y],this._bitLength),l=Math.max(c[p].length,l),l=Math.max(c[y].length,l)}var _=this.jpoint(null,null,null),k=this._wnafT4;for(h=l;0<=h;h--){for(var x=0;0<=h;){for(var A=!0,I=0;I<n;I++)k[I]=0|c[I][h],0!==k[I]&&(A=!1);if(!A)break;x++,h--}if(0<=h&&x++,_=_.dblp(x),h<0)break;for(I=0;I<n;I++){var E=k[I];0!==E&&(0<E?f=u[I][E-1>>1]:E<0&&(f=u[I][-E-1>>1].neg()),_="affine"===f.type?_.mixedAdd(f):_.add(f))}}for(h=0;h<n;h++)u[h]=null;return i?_:_.toP()},(u.BasePoint=c).prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){if(t=i.toArray(t,e),e=this.p.byteLength(),(4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*e)return 6===t[0]?s(t[t.length-1]%2==0):7===t[0]&&s(t[t.length-1]%2==1),this.point(t.slice(1,1+e),t.slice(1+e,1+2*e));if((2===t[0]||3===t[0])&&t.length-1===e)return this.pointFromX(t.slice(1,1+e),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1==r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},{"../utils":24,"bn.js":9}],14:[function(t,e,r){e.exports={}},{}],15:[function(t,e,r){"use strict";r.base=t("./base"),r.short=t("./short"),r.mont=t("./mont"),r.edwards=t("./edwards")},{"./base":13,"./edwards":14,"./mont":16,"./short":17}],16:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],17:[function(t,e,r){"use strict";var n=t("../utils"),i=t("bn.js"),o=t("inherits"),a=t("./base"),s=n.assert;function u(t){a.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){a.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(t,e,r,n){a.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),(e.exports=u).prototype._getEndomorphism=function(t){var e,r,n;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return r=(t.beta?new i(t.beta,16):r=(n=this._getEndoRoots(this.p))[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red),t.lambda?e=new i(t.lambda,16):(n=this._getEndoRoots(this.n),0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(r))?e=n[0]:(e=n[1],s(0===this.g.mul(e).x.cmp(this.g.x.redMul(r))))),{beta:r,lambda:e,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(e)}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=(t=(r=new i(2).toRed(e).redInvm()).redNeg(),new i(3).toRed(e).redNeg().redSqrt().redMul(r));return[t.redAdd(r).fromRed(),t.redSub(r).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,a,s=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=t,c=this.n.clone(),l=new i(1),h=new i(0),f=new i(0),d=new i(1),p=0;0!==u.cmpn(0);){var y=c.div(u),m=c.sub(y.mul(u)),v=f.sub(y.mul(l));if(y=d.sub(y.mul(h)),!n&&m.cmp(s)<0)e=a.neg(),r=l,n=m.neg(),o=v;else if(n&&2==++p)break;c=u,u=a=m,f=l,l=v,d=h,h=y}var g=m.neg(),b=v;return t=n.sqr().add(o.sqr()),0<=g.sqr().add(b.sqr()).cmp(t)&&(g=e,b=r),n.negative&&(n=n.neg(),o=o.neg()),g.negative&&(g=g.neg(),b=b.neg()),[{a:n,b:o},{a:g,b:b}]},u.prototype._endoSplit=function(t){var e=(o=this.endo.basis)[0],r=(a=o[1]).b.mul(t).divRound(this.n),n=e.b.neg().mul(t).divRound(this.n),i=r.mul(e.a),o=n.mul(a.a),a=(e=r.mul(e.b),n.mul(a.b));return{k1:t.sub(i).sub(o),k2:e.add(a).neg()}},u.prototype.pointFromX=function(t,e){var r=(t=(t=new i(t,16)).red?t:t.toRed(this.red)).redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");return r=n.fromRed().isOdd(),(e&&!r||!e&&r)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y;return t=this.a.redMul(e),t=e.redSqr().redMul(e).redIAdd(t).redIAdd(this.b),0===r.redSqr().redISub(t).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}r=this._wnafMulAdd(1,n,i,2*o,r);for(var c=0;c<2*o;c++)n[c]=null,i[c]=null;return r},o(c,a.BasePoint),u.prototype.point=function(t,e,r){return new c(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e,r,n=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);return t&&(e=this.curve,r=function(t){return e.point(t.x.redMul(e.endo.beta),t.y)},(t.beta=n).precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}),n}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}return e=e[2],n.precomputed={beta:null,doubles:e.doubles&&{step:e.doubles.step,points:[n].concat(e.doubles.points.map(i))},naf:e.naf&&{wnd:e.naf.wnd,points:[n].concat(e.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);t=(e=0!==(e=this.y.redSub(t.y)).cmpn(0)?e.redMul(this.x.redSub(t.x).redInvm()):e).redSqr().redISub(this.x).redISub(t.x);var e=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,e)},c.prototype.dbl=function(){if(this.inf)return this;if(0===(r=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var t=this.curve.a,e=this.x.redSqr(),r=r.redInvm();return r=(t=e.redAdd(e).redIAdd(e).redIAdd(t).redMul(r)).redSqr().redISub(this.x.redAdd(this.x)),t=t.redMul(this.x.redSub(r)).redISub(this.y),this.curve.point(r,t)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return e=[this,e],r=[t,r],this.curve.endo?this.curve._endoWnafMulAdd(e,r):this.curve._wnafMulAdd(1,e,r,2)},c.prototype.jmulAdd=function(t,e,r){return e=[this,e],r=[t,r],this.curve.endo?this.curve._endoWnafMulAdd(e,r,!0):this.curve._wnafMulAdd(1,e,r,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e,r=this.curve.point(this.x,this.y.redNeg());return t&&this.precomputed&&(e=this.precomputed,t=function(t){return t.neg()},r.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(t)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(t)}}),r},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new l(this,t,e,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=(r=this.z.redInvm()).redSqr(),e=this.x.redMul(t),r=this.y.redMul(t).redMul(r);return this.curve.point(e,r)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(r.redMul(this.z));return e=n.redSub(i),r=o.redSub(a),0===e.cmpn(0)?0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(a=(i=e.redSqr()).redMul(e),n=n.redMul(i),i=r.redSqr().redIAdd(a).redISub(n).redISub(n),a=r.redMul(n.redISub(i)).redISub(o.redMul(a)),e=this.z.redMul(t.z).redMul(e),this.curve.jpoint(i,a,e))},l.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z);return t=r.redSub(n),e=i.redSub(o),0===t.cmpn(0)?0!==e.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(o=(n=t.redSqr()).redMul(t),r=r.redMul(n),n=e.redSqr().redIAdd(o).redISub(r).redISub(r),o=e.redMul(r.redISub(n)).redISub(i.redMul(o)),t=this.z.redMul(t),this.curve.jpoint(n,o,t))},l.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(r=0;r<t;r++){var l=o.redSqr(),h=(d=c.redSqr()).redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),d=(l=o.redMul(d),f.redSqr().redISub(l.redAdd(l)));l=l.redISub(d),f=(f=f.redMul(l)).redIAdd(f).redISub(h),l=c.redMul(s),r+1<t&&(u=u.redMul(h)),o=d,s=l,c=f}return this.curve.jpoint(o,c.redMul(i),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var t,e,r,n,i,o=this.zOne?(r=this.x.redSqr(),t=(n=this.y.redSqr()).redSqr(),i=(i=this.x.redAdd(n).redSqr().redISub(r).redISub(t)).redIAdd(i),n=(e=r.redAdd(r).redIAdd(r)).redSqr().redISub(i).redISub(i),r=(r=(r=t.redIAdd(t)).redIAdd(r)).redIAdd(r),e=e.redMul(i.redISub(t=n)).redISub(r),this.y.redAdd(this.y)):(i=this.x.redSqr(),o=(n=this.y.redSqr()).redSqr(),r=(r=this.x.redAdd(n).redSqr().redISub(i).redISub(o)).redIAdd(r),i=(n=i.redAdd(i).redIAdd(i)).redSqr(),o=(o=(o=o.redIAdd(o)).redIAdd(o)).redIAdd(o),t=i.redISub(r).redISub(r),e=n.redMul(r.redISub(t)).redISub(o),(o=this.y.redMul(this.z)).redIAdd(o));return this.curve.jpoint(t,e,o)},l.prototype._threeDbl=function(){var t,e,r,n,i,o,a,s;return this.zOne?(a=this.x.redSqr(),r=(t=this.y.redSqr()).redSqr(),o=(o=this.x.redAdd(t).redSqr().redISub(a).redISub(r)).redIAdd(o),e=n=(s=a.redAdd(a).redIAdd(a).redIAdd(this.curve.a)).redSqr().redISub(o).redISub(o),i=(i=(i=r.redIAdd(r)).redIAdd(i)).redIAdd(i),t=s.redMul(o.redISub(n)).redISub(i),a=this.y.redAdd(this.y)):(r=this.z.redSqr(),s=this.y.redSqr(),o=this.x.redMul(s),n=(n=this.x.redSub(r).redMul(this.x.redAdd(r))).redAdd(n).redIAdd(n),o=(i=(i=o.redIAdd(o)).redIAdd(i)).redAdd(i),e=n.redSqr().redISub(o),a=this.y.redAdd(this.z).redSqr().redISub(s).redISub(r),s=(s=(s=(s=s.redSqr()).redIAdd(s)).redIAdd(s)).redIAdd(s),t=n.redMul(i.redISub(e)).redISub(s)),this.curve.jpoint(e,t,a)},l.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),a=r.redSqr();return t=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),e=(i=(i=e.redAdd(e)).redIAdd(i)).redMul(a),i=t.redSqr().redISub(e.redAdd(e)),e=e.redISub(i),a=(a=(a=(a=a.redSqr()).redIAdd(a)).redIAdd(a)).redIAdd(a),a=t.redMul(e).redISub(a),n=r.redAdd(r).redMul(n),this.curve.jpoint(i,a,n)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(n);return t=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),n=(n=(n=(n=n.redIAdd(n)).redIAdd(n)).redIAdd(n)).redIAdd(n),o=i.redIAdd(a).redSqr().redISub(o).redISub(t).redISub(n),e=(e=(e=e.redMul(o)).redIAdd(e)).redIAdd(e),e=(e=(e=this.x.redMul(t).redISub(e)).redIAdd(e)).redIAdd(e),o=(o=(o=(o=this.y.redMul(o.redMul(n.redISub(o)).redISub(a.redMul(t)))).redIAdd(o)).redIAdd(o)).redIAdd(o),t=this.z.redAdd(a).redSqr().redISub(r).redISub(t),this.curve.jpoint(e,o,t)},l.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},l.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();return 0===this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0)&&(e=e.redMul(this.z),r=r.redMul(t.z),0===this.y.redMul(r).redISub(t.y.redMul(e)).cmpn(0))},l.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),0<=n.cmp(this.curve.p))return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(t,e,r){"use strict";var n,i=r,o=(r=t("hash.js"),t("./curve")),a=t("./utils").assert;function s(t){"short"===t.type?this.curve=new o.short(t):"edwards"===t.type?this.curve=new o.edwards(t):this.curve=new o.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=t("./precomputed/secp256k1")}catch(t){n=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":15,"./precomputed/secp256k1":23,"./utils":24,"hash.js":26}],19:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("hmac-drbg"),o=t("../utils"),a=t("../curves"),u=t("brorand"),c=o.assert,l=t("./key"),h=t("./signature");function f(t){if(!(this instanceof f))return new f(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(a,t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}(e.exports=f).prototype.keyPair=function(t){return new l(this,t)},f.prototype.keyFromPrivate=function(t,e){return l.fromPrivate(this,t,e)},f.prototype.keyFromPublic=function(t,e){return l.fromPublic(this,t,e)},f.prototype.genKeyPair=function(t){for(var e=new i({hash:this.hash,pers:(t=t||{}).pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||u(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(e.generate(r));if(!(0<a.cmp(o)))return a.iaddn(1),this.keyFromPrivate(a)}},f.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return 0<r&&(t=t.ushrn(r)),!e&&0<=t.cmp(this.n)?t.sub(this.n):t},f.prototype.sign=function(t,e,r,o){"object"==s(r)&&(o=r,r=null),o=o||{},e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var a=this.n.byteLength(),u=(r=e.getPrivate().toArray("be",a),a=t.toArray("be",a),new i({hash:this.hash,entropy:r,nonce:a,pers:o.pers,persEnc:o.persEnc||"utf8"})),c=this.n.sub(new n(1)),l=0;;l++){var f=o.k?o.k(l):new n(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||0<=f.cmp(c))){var d=this.g.mul(f);if(!d.isInfinity()){var p=d.getX(),y=p.umod(this.n);if(0!==y.cmpn(0)&&0!==(f=(f=f.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t))).umod(this.n)).cmpn(0))return p=(d.getY().isOdd()?1:0)|(0!==p.cmp(y)?2:0),o.canonical&&0<f.cmp(this.nh)&&(f=this.n.sub(f),p^=1),new h({r:y,s:f,recoveryParam:p})}}}},f.prototype.verify=function(t,e,r,i){return t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i),i=(e=new h(e,"hex")).r,e=e.s,!(i.cmpn(1)<0||0<=i.cmp(this.n))&&(!(e.cmpn(1)<0||0<=e.cmp(this.n))&&(t=(e=e.invm(this.n)).mul(t).umod(this.n),e=e.mul(i).umod(this.n),this.curve._maxwellTrick?!(o=this.g.jmulAdd(t,r.getPublic(),e)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(t,r.getPublic(),e)).isInfinity()&&0===o.getX().umod(this.n).cmp(i)));var o},f.prototype.recoverPubKey=function(t,e,r,i){c((3&r)===r,"The recovery param is more than two bits"),e=new h(e,i);var o=this.n,a=new n(t),s=e.r;if(i=e.s,t=1&r,r>>=1,0<=s.cmp(this.curve.p.umod(this.curve.n))&&r)throw new Error("Unable to find sencond key candinate");return s=r?this.curve.pointFromX(s.add(this.curve.n),t):this.curve.pointFromX(s,t),e=e.r.invm(o),a=o.sub(a).mul(e).umod(o),o=i.mul(e).umod(o),this.g.mulAdd(a,s,o)},f.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new h(e,n)).recoveryParam)return e.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(t,e,o)}catch(t){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")}},{"../curves":18,"../utils":24,"./key":20,"./signature":21,"bn.js":9,brorand:10,"hmac-drbg":38}],20:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils").assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}(e.exports=o).fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":24,"bn.js":9}],21:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils"),o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0==n||4<n)return!1;for(var i=0,o=0,a=e.place;o<n;o++,a++)i<<=8,i|=t[a],i>>>=0;return!(i<=127)&&(e.place=a,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function l(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}(e.exports=a).prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;if(!1===(e=u(t,r)))return!1;if(o=t.slice(r.place,e+r.place),r.place+=e,2!==t[r.place++])return!1;if(!1===(e=u(t,r)))return!1;if(t.length!==e+r.place)return!1;if(r=t.slice(r.place,e+r.place),0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}return this.r=new n(o),this.s=new n(r),!(this.recoveryParam=null)},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];return l(n,e.length),(n=n.concat(e)).push(2),l(n,r.length),e=n.concat(r),l(n=[48],e.length),n=n.concat(e),i.encode(n,t)}},{"../utils":24,"bn.js":9}],22:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],23:[function(t,e,r){e.exports=void 0},{}],24:[function(t,e,r){"use strict";var n=r,i=t("bn.js");r=t("minimalistic-assert"),t=t("minimalistic-crypto-utils"),n.assert=r,n.toArray=t.toArray,n.zero2=t.zero2,n.toHex=t.toHex,n.encode=t.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),a=0;a<n.length;a++){var s,u=o.andln(i-1);o.isOdd()?o.isubn(s=(i>>1)-1<u?(i>>1)-u:u):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;0<t.cmpn(-i)||0<e.cmpn(-o);){var a,s=t.andln(3)+i&3,u=e.andln(3)+o&3;3===u&&(u=-1),a=0==(1&(s=3===s?-1:s))?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==u?s:-s,r[0].push(a),u=0==(1&u)?0:3!=(n=e.andln(7)+o&7)&&5!==n||2!==s?u:-u,r[1].push(u),2*i===a+1&&(i=1-i),2*o===u+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},{"bn.js":9,"minimalistic-assert":41,"minimalistic-crypto-utils":42}],25:[function(t,e,r){e.exports={version:"6.5.4"}},{}],26:[function(t,e,r){r.utils=t("./hash/utils"),r.common=t("./hash/common"),r.sha=t("./hash/sha"),r.ripemd=t("./hash/ripemd"),r.hmac=t("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":27,"./hash/hmac":28,"./hash/ripemd":29,"./hash/sha":30,"./hash/utils":37}],27:[function(t,e,r){"use strict";var n=t("./utils"),i=t("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}(r.BlockHash=o).prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){e=(t=this.pending).length%this._delta8,this.pending=t.slice(t.length-e,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-e,this.endian);for(var r=0;r<t.length;r+=this._delta32)this._update(t,r,r+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},{"./utils":37,"minimalistic-assert":41}],28:[function(t,e,r){"use strict";var n=t("./utils"),i=t("minimalistic-assert");function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}(e.exports=o).prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},{"./utils":37,"minimalistic-assert":41}],29:[function(t,e,r){"use strict";var n=t("./utils"),i=(t=t("./common"),n.rotl32),o=n.sum32,a=n.sum32_3,s=n.sum32_4,u=t.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}n.inherits(c,u),(r.ripemd160=c).blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r,n=b=this.h[0],u=x=this.h[1],c=k=this.h[2],y=_=this.h[3],m=w=this.h[4],v=0;v<80;v++){var g=o(i(s(b,l(v,x,k,_),t[h[v]+e],(r=v)<=15?0:r<=31?1518500249:r<=47?1859775393:r<=63?2400959708:2840853838),d[v]),w),b=w,w=_,_=i(k,10),k=x,x=g;g=o(i(s(n,l(79-v,u,c,y),t[f[v]+e],(r=v)<=15?1352829926:r<=31?1548603684:r<=47?1836072691:r<=63?2053994217:0),p[v]),m),n=m,m=y,y=i(c,10),c=u,u=g}g=a(this.h[1],k,y),this.h[1]=a(this.h[2],_,m),this.h[2]=a(this.h[3],w,n),this.h[3]=a(this.h[4],b,u),this.h[4]=a(this.h[0],x,c),this.h[0]=g},c.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":27,"./utils":37}],30:[function(t,e,r){"use strict";r.sha1=t("./sha/1"),r.sha224=t("./sha/224"),r.sha256=t("./sha/256"),r.sha384=t("./sha/384"),r.sha512=t("./sha/512")},{"./sha/1":31,"./sha/224":32,"./sha/256":33,"./sha/384":34,"./sha/512":35}],31:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],32:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],33:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../common"),o=t("./common"),a=t("minimalistic-assert"),s=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,h=o.maj32,f=o.s0_256,d=o.s1_256,p=o.g0_256,y=o.g1_256,m=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(g,m),(e.exports=g).blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(y(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],v=this.h[3],g=this.h[4],b=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var k=c(_,d(g),l(g,b,w),this.k[n],r[n]),x=s(f(i),h(i,o,m));_=w,w=b,b=g,g=s(v,k),v=m,m=o,o=i,i=s(k,x)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],_)},g.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":27,"../utils":37,"./common":36,"minimalistic-assert":41}],34:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],35:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../common"),o=t("minimalistic-assert"),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,h=n.sum64_hi,f=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,m=n.sum64_5_lo,v=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}n.inherits(b,v),(e.exports=b).blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=function(t,e){return(e=a(t,e,19)^a(e,t,29)^(e=u(t,e,6)))<0&&(e+=4294967296),e}(r[n-4],r[n-3]),o=function(t,e){return(e=s(t,e,19)^s(e,t,29)^(e=c(t,e,6)))<0&&(e+=4294967296),e}(r[n-4],r[n-3]),l=r[n-14],h=r[n-13],f=function(t,e){return(e=a(t,e,1)^a(t,e,8)^(e=u(t,e,7)))<0&&(e+=4294967296),e}(r[n-30],r[n-29]),y=function(t,e){return(e=s(t,e,1)^s(t,e,8)^(e=c(t,e,7)))<0&&(e+=4294967296),e}(r[n-30],r[n-29]),m=r[n-32],v=r[n-31];r[n]=d(i,o,l,h,f,y,m,v),r[n+1]=p(i,o,l,h,f,y,m,v)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],u=this.h[2],c=this.h[3],d=this.h[4],p=this.h[5],v=this.h[6],g=this.h[7],b=this.h[8],w=this.h[9],_=this.h[10],k=this.h[11],x=this.h[12],A=this.h[13],I=this.h[14],E=this.h[15];o(this.k.length===r.length);for(var S=0;S<r.length;S+=2){var M=I,T=E,P=function(t,e){return(t=a(t,e,14)^a(t,e,18)^(t=a(e,t,9)))<0&&(t+=4294967296),t}(b,w),C=function(t,e){return(t=s(t,e,14)^s(t,e,18)^(t=s(e,t,9)))<0&&(t+=4294967296),t}(b,w),O=function(t,e,r){return(r=t&e^~t&r)<0&&(r+=4294967296),r}(b,_,x),R=function(t,e,r){return(r=t&e^~t&r)<0&&(r+=4294967296),r}(w,k,A),j=this.k[S],N=this.k[S+1],L=r[S],U=r[S+1],D=y(M,T,P,C,O,R,j,N,L,U);L=m(M,T,P,C,O,R,j,N,L,U),M=function(t,e){return(t=a(t,e,28)^a(e,t,2)^(t=a(e,t,7)))<0&&(t+=4294967296),t}(n,i),T=function(t,e){return(t=s(t,e,28)^s(e,t,2)^(t=s(e,t,7)))<0&&(t+=4294967296),t}(n,i),P=function(t,e,r){return(r=t&e^t&r^e&r)<0&&(r+=4294967296),r}(n,u,d),C=function(t,e,r){return(r=t&e^t&r^e&r)<0&&(r+=4294967296),r}(i,c,p),U=h(M,T,P,C),C=f(M,T,P,C),I=x,E=A,x=_,A=k,_=b,k=w,b=h(v,g,D,L),w=f(g,g,D,L),v=d,g=p,d=u,p=c,u=n,c=i,n=h(D,L,U,C),i=f(D,L,U,C)}l(this.h,0,n,i),l(this.h,2,u,c),l(this.h,4,d,p),l(this.h,6,v,g),l(this.h,8,b,w),l(this.h,10,_,k),l(this.h,12,x,A),l(this.h,14,I,E)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":27,"../utils":37,"minimalistic-assert":41}],36:[function(t,e,r){"use strict";var n=t("../utils").rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}r.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?e^r^n:2===t?o(e,r,n):void 0},r.ch32=i,r.maj32=o,r.p32=function(t,e,r){return t^e^r},r.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},r.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},r.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},r.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},{"../utils":37}],37:[function(t,e,r){"use strict";var n=t("minimalistic-assert");function i(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function a(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}t=t("inherits"),r.inherits=t,r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=(o=t.charCodeAt(n))>>8,o=255&o;i?r.push(i,o):r.push(o)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},r.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=o(t[r].toString(16));return e},r.htonl=i,r.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var o=t[n];r+=a((o="little"===e?i(o):o).toString(16))}return r},r.zero2=o,r.zero8=a,r.join32=function(t,e,r,i){n((r-=e)%4==0);for(var o=new Array(r/4),a=0,s=e;a<o.length;a++,s+=4){var u="big"===i?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s];o[a]=u>>>0}return o},r.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(t,e){return t>>>e|t<<32-e},r.rotl32=function(t,e){return t<<e|t>>>32-e},r.sum32=function(t,e){return t+e>>>0},r.sum32_3=function(t,e,r){return t+e+r>>>0},r.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},r.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},r.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0;t[e]=(o<n?1:0)+r+i>>>0,t[e+1]=o},r.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},r.sum64_lo=function(t,e,r,n){return e+n>>>0},r.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=e+n>>>0)<e?1:0,u+=(c=c+o>>>0)<o?1:0,t+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},r.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},r.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var l=0,h=e;return l+=(h=e+n>>>0)<e?1:0,l+=(h=h+o>>>0)<o?1:0,l+=(h=h+s>>>0)<s?1:0,t+r+i+a+u+(l+=(h=h+c>>>0)<c?1:0)>>>0},r.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},r.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},r.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},r.shr64_hi=function(t,e,r){return t>>>r},r.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(t,e,r){"use strict";var n=t("hash.js"),i=t("minimalistic-crypto-utils"),o=t("minimalistic-assert");function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex");t=i.toArray(t.pers,t.persEnc||"hex"),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,t)}(e.exports=a).prototype._init=function(t,e,r){r=t.concat(e).concat(r),this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);return n=o.slice(0,t),this._update(r),this._reseed++,i.encode(n,e)}},{"hash.js":26,"minimalistic-assert":41,"minimalistic-crypto-utils":42}],39:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){var r;e&&(t.super_=e,(r=function(){}).prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t)}},{}],40:[function(t,e,n){(function(t,r){(function(){!function(){"use strict";for(var n="object"==("undefined"==typeof window?"undefined":s(window))?window:{},i=!(n=!n.JS_SHA3_NO_NODE_JS&&"object"==s(t)&&t.versions&&t.versions.node?r:n).JS_SHA3_NO_COMMON_JS&&"object"==s(e)&&e.exports,o="0123456789abcdef".split(""),a=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],c=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],h=function(t,e,r){return function(n){return new k(t,e,t).update(n)[r]()}},f=function(t,e,r){return function(n,i){return new k(t,e,i).update(n)[r]()}},d=function(t,e){var r=h(t,e,"hex");r.create=function(){return new k(t,e,t)},r.update=function(t){return r.create().update(t)};for(var n=0;n<l.length;++n){var i=l[n];r[i]=h(t,e,i)}return r},p=[{name:"keccak",padding:[1,256,65536,16777216],bits:c,createMethod:d},{name:"sha3",padding:[6,1536,393216,100663296],bits:c,createMethod:d},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(t,e){var r=f(t,e,"hex");r.create=function(r){return new k(t,e,r)},r.update=function(t,e){return r.create(e).update(t)};for(var n=0;n<l.length;++n){var i=l[n];r[i]=f(t,e,i)}return r}}],y={},m=[],v=0;v<p.length;++v)for(var g=p[v],b=g.bits,w=0;w<b.length;++w){var _=g.name+"_"+b[w];m.push(_),y[_]=g.createMethod(b[w],g.padding)}function k(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}k.prototype.update=function(t){for(var e,r,n="string"!=typeof t,i=(t=n&&t.constructor===ArrayBuffer?new Uint8Array(t):t).length,o=this.blocks,s=this.byteCount,u=this.blockCount,c=0,l=this.s;c<i;){if(this.reset)for(this.reset=!1,o[0]=this.block,e=1;e<u+1;++e)o[e]=0;if(n)for(e=this.start;c<i&&e<s;++c)o[e>>2]|=t[c]<<a[3&e++];else for(e=this.start;c<i&&e<s;++c)(r=t.charCodeAt(c))<128?o[e>>2]|=r<<a[3&e++]:(r<2048?o[e>>2]|=(192|r>>6)<<a[3&e++]:(r<55296||57344<=r?o[e>>2]|=(224|r>>12)<<a[3&e++]:(r=65536+((1023&r)<<10|1023&t.charCodeAt(++c)),o[e>>2]|=(240|r>>18)<<a[3&e++],o[e>>2]|=(128|r>>12&63)<<a[3&e++]),o[e>>2]|=(128|r>>6&63)<<a[3&e++]),o[e>>2]|=(128|63&r)<<a[3&e++]);if(s<=(this.lastByteIndex=e)){for(this.start=e-s,this.block=o[u],e=0;e<u;++e)l[e]^=o[e];x(l),this.reset=!0}else this.start=e}return this},k.prototype.finalize=function(){var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];x(n)},k.prototype.toString=k.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,s=0,u="";s<n;){for(a=0;a<e&&s<n;++a,++s)t=r[a],u+=o[t>>4&15]+o[15&t]+o[t>>12&15]+o[t>>8&15]+o[t>>20&15]+o[t>>16&15]+o[t>>28&15]+o[t>>24&15];s%e==0&&(x(r),a=0)}return i&&(t=r[a],0<i&&(u+=o[t>>4&15]+o[15&t]),1<i&&(u+=o[t>>12&15]+o[t>>8&15]),2<i&&(u+=o[t>>20&15]+o[t>>16&15])),u},k.prototype.arrayBuffer=function(){this.finalize();for(var t=this.blockCount,e=this.s,r=this.outputBlocks,n=this.extraBytes,i=0,o=0,a=this.outputBits>>3,s=n?new ArrayBuffer(r+1<<2):new ArrayBuffer(a),u=new Uint32Array(s);o<r;){for(i=0;i<t&&o<r;++i,++o)u[o]=e[i];o%t==0&&x(e)}return n&&(u[i]=e[i],s=s.slice(0,a)),s},k.prototype.buffer=k.prototype.arrayBuffer,k.prototype.digest=k.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,u=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=n[a],u[t=s<<2]=255&e,u[t+1]=e>>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;s%r==0&&x(n)}return o&&(t=s<<2,e=n[a],0<o&&(u[t]=255&e),1<o&&(u[t+1]=e>>8&255),2<o&&(u[t+2]=e>>16&255)),u};var x=function(t){for(var e,r,n,i,o,a,s,c,l,h,f,d,p,y,m,v,g,b,w,_,k,x,A,I,E,S,M,T,P,C,O,R,j,N,L,U,D,B,z,H,F,q,G,V,K,Z,W,J,Q,Y,$=0;$<48;$+=2)M=t[0]^t[10]^t[20]^t[30]^t[40],T=t[1]^t[11]^t[21]^t[31]^t[41],H=t[2]^t[12]^t[22]^t[32]^t[42],z=t[3]^t[13]^t[23]^t[33]^t[43],R=t[4]^t[14]^t[24]^t[34]^t[44],O=t[5]^t[15]^t[25]^t[35]^t[45],Z=t[6]^t[16]^t[26]^t[36]^t[46],K=t[7]^t[17]^t[27]^t[37]^t[47],p=t[8]^t[18]^t[28]^t[38]^t[48],h=(y=t[9]^t[19]^t[29]^t[39]^t[49])^(z<<1|H>>>31),t[0]^=l=p^(H<<1|z>>>31),t[1]^=h,t[10]^=l,t[11]^=h,t[20]^=l,t[21]^=h,t[30]^=l,t[31]^=h,t[40]^=l,t[41]^=h,h=T^(O<<1|R>>>31),t[2]^=l=M^(R<<1|O>>>31),t[3]^=h,t[12]^=l,t[13]^=h,t[22]^=l,t[23]^=h,t[32]^=l,t[33]^=h,t[42]^=l,t[43]^=h,h=z^(K<<1|Z>>>31),t[4]^=l=H^(Z<<1|K>>>31),t[5]^=h,t[14]^=l,t[15]^=h,t[24]^=l,t[25]^=h,t[34]^=l,t[35]^=h,t[44]^=l,t[45]^=h,h=O^(y<<1|p>>>31),t[6]^=l=R^(p<<1|y>>>31),t[7]^=h,t[16]^=l,t[17]^=h,t[26]^=l,t[27]^=h,t[36]^=l,t[37]^=h,t[46]^=l,t[47]^=h,h=K^(T<<1|M>>>31),t[8]^=l=Z^(M<<1|T>>>31),t[9]^=h,t[18]^=l,t[19]^=h,t[28]^=l,t[29]^=h,t[38]^=l,t[39]^=h,t[48]^=l,t[49]^=h,e=t[0],r=t[1],j=t[11]<<4|t[10]>>>28,N=t[10]<<4|t[11]>>>28,m=t[20]<<3|t[21]>>>29,v=t[21]<<3|t[20]>>>29,W=t[31]<<9|t[30]>>>23,J=t[30]<<9|t[31]>>>23,P=t[40]<<18|t[41]>>>14,C=t[41]<<18|t[40]>>>14,k=t[2]<<1|t[3]>>>31,x=t[3]<<1|t[2]>>>31,n=t[13]<<12|t[12]>>>20,i=t[12]<<12|t[13]>>>20,L=t[22]<<10|t[23]>>>22,U=t[23]<<10|t[22]>>>22,g=t[33]<<13|t[32]>>>19,b=t[32]<<13|t[33]>>>19,Q=t[42]<<2|t[43]>>>30,Y=t[43]<<2|t[42]>>>30,F=t[5]<<30|t[4]>>>2,q=t[4]<<30|t[5]>>>2,A=t[14]<<6|t[15]>>>26,I=t[15]<<6|t[14]>>>26,o=t[25]<<11|t[24]>>>21,a=t[24]<<11|t[25]>>>21,D=t[34]<<15|t[35]>>>17,B=t[35]<<15|t[34]>>>17,w=t[45]<<29|t[44]>>>3,_=t[44]<<29|t[45]>>>3,f=t[6]<<28|t[7]>>>4,d=t[7]<<28|t[6]>>>4,G=t[17]<<23|t[16]>>>9,V=t[16]<<23|t[17]>>>9,E=t[26]<<25|t[27]>>>7,S=t[27]<<25|t[26]>>>7,s=t[36]<<21|t[37]>>>11,c=t[37]<<21|t[36]>>>11,z=t[47]<<24|t[46]>>>8,H=t[46]<<24|t[47]>>>8,O=t[8]<<27|t[9]>>>5,R=t[9]<<27|t[8]>>>5,p=t[18]<<20|t[19]>>>12,y=t[19]<<20|t[18]>>>12,K=t[29]<<7|t[28]>>>25,Z=t[28]<<7|t[29]>>>25,M=t[38]<<8|t[39]>>>24,T=t[39]<<8|t[38]>>>24,l=t[48]<<14|t[49]>>>18,h=t[49]<<14|t[48]>>>18,t[0]=e^~n&o,t[1]=r^~i&a,t[10]=f^~p&m,t[11]=d^~y&v,t[20]=k^~A&E,t[21]=x^~I&S,t[30]=O^~j&L,t[31]=R^~N&U,t[40]=F^~G&K,t[41]=q^~V&Z,t[2]=n^~o&s,t[3]=i^~a&c,t[12]=p^~m&g,t[13]=y^~v&b,t[22]=A^~E&M,t[23]=I^~S&T,t[32]=j^~L&D,t[33]=N^~U&B,t[42]=G^~K&W,t[43]=V^~Z&J,t[4]=o^~s&l,t[5]=a^~c&h,t[14]=m^~g&w,t[15]=v^~b&_,t[24]=E^~M&P,t[25]=S^~T&C,t[34]=L^~D&z,t[35]=U^~B&H,t[44]=K^~W&Q,t[45]=Z^~J&Y,t[6]=s^~l&e,t[7]=c^~h&r,t[16]=g^~w&f,t[17]=b^~_&d,t[26]=M^~P&k,t[27]=T^~C&x,t[36]=D^~z&O,t[37]=B^~H&R,t[46]=W^~Q&F,t[47]=J^~Y&q,t[8]=l^~e&n,t[9]=h^~r&i,t[18]=w^~f&p,t[19]=_^~d&y,t[28]=P^~k&A,t[29]=C^~x&I,t[38]=z^~O&j,t[39]=H^~R&N,t[48]=Q^~F&G,t[49]=Y^~q&V,t[0]^=u[$],t[1]^=u[$+1]};if(i)e.exports=y;else for(v=0;v<m.length;++v)n[m[v]]=y[m[v]]}()}).call(this)}).call(this,t("_process"),void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:43}],41:[function(t,e,r){(e.exports=function(t,e){if(!t)throw new Error(e||"Assertion failed")}).equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},{}],42:[function(t,e,r){"use strict";function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=(o=t.charCodeAt(n))>>8,o=255&o;i?r.push(i,o):r.push(o)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},{}],43:[function(t,e,r){e.exports={browser:!0}},{}],44:[function(t,e,r){(function(t){(function(){"use strict";function n(t){var e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,l=new Array(64);function h(t){for(var h=0,f=t.length;64<=f;){for(var d,p,y,m,v=r,g=n,b=i,w=o,_=a,k=s,x=u,A=c,I=0;I<16;I++)l[I]=(255&t[p=h+4*I])<<24|(255&t[p+1])<<16|(255&t[p+2])<<8|255&t[p+3];for(I=16;I<64;I++)y=((d=l[I-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=l[I-15],l[I]=(y+l[I-7]|0)+((m=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3)+l[I-16]|0)|0;for(I=0;I<64;I++)y=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&k^~_&x)|0)+(A+(e[I]+l[I]|0)|0)|0,m=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&g^v&b^g&b)|0,A=x,x=k,k=_,_=w+y|0,w=b,b=g,g=v,v=y+m|0;r=r+v|0,n=n+g|0,i=i+b|0,o=o+w|0,a=a+_|0,s=s+k|0,u=u+x|0,c=c+A|0,h+=64,f-=64}}h(t);var f,d=t.length%64,p=t.length/536870912|0,y=t.length<<3,m=d<56?56:120,v=t.slice(t.length-d,t.length);for(v.push(128),f=1+d;f<m;f++)v.push(0);return v.push(p>>>24&255),v.push(p>>>16&255),v.push(p>>>8&255),v.push(p>>>0&255),v.push(y>>>24&255),v.push(y>>>16&255),v.push(y>>>8&255),v.push(y>>>0&255),h(v),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(t,e,r){t=t.length<=64?t:n(t);for(var i=64+e.length+4,o=new Array(i),a=new Array(64),s=[],u=0;u<64;u++)o[u]=54;for(u=0;u<t.length;u++)o[u]^=t[u];for(u=0;u<e.length;u++)o[64+u]=e[u];for(u=i-4;u<i;u++)o[u]=0;for(u=0;u<64;u++)a[u]=92;for(u=0;u<t.length;u++)a[u]^=t[u];function c(){for(var t=i-1;i-4<=t;t--){if(o[t]++,o[t]<=255)return;o[t]=0}}for(;32<=r;)c(),s=s.concat(n(a.concat(n(o)))),r-=32;return 0<r&&(c(),s=s.concat(n(a.concat(n(o))).slice(0,r))),s}function o(t,e,r,n,i){var o;for(u(t,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(t,16*o,i,16),function(t,e){u(t,0,e,0,16);for(var r=8;0<r;r-=2)e[4]^=a(e[0]+e[12],7),e[8]^=a(e[4]+e[0],9),e[12]^=a(e[8]+e[4],13),e[0]^=a(e[12]+e[8],18),e[9]^=a(e[5]+e[1],7),e[13]^=a(e[9]+e[5],9),e[1]^=a(e[13]+e[9],13),e[5]^=a(e[1]+e[13],18),e[14]^=a(e[10]+e[6],7),e[2]^=a(e[14]+e[10],9),e[6]^=a(e[2]+e[14],13),e[10]^=a(e[6]+e[2],18),e[3]^=a(e[15]+e[11],7),e[7]^=a(e[3]+e[15],9),e[11]^=a(e[7]+e[3],13),e[15]^=a(e[11]+e[7],18),e[1]^=a(e[0]+e[3],7),e[2]^=a(e[1]+e[0],9),e[3]^=a(e[2]+e[1],13),e[0]^=a(e[3]+e[2],18),e[6]^=a(e[5]+e[4],7),e[7]^=a(e[6]+e[5],9),e[4]^=a(e[7]+e[6],13),e[5]^=a(e[4]+e[7],18),e[11]^=a(e[10]+e[9],7),e[8]^=a(e[11]+e[10],9),e[9]^=a(e[8]+e[11],13),e[10]^=a(e[9]+e[8],18),e[12]^=a(e[15]+e[14],7),e[13]^=a(e[12]+e[15],9),e[14]^=a(e[13]+e[12],13),e[15]^=a(e[14]+e[13],18);for(r=0;r<16;++r)t[r]+=e[r]}(i,n),u(i,0,t,e+16*o,16);for(o=0;o<r;o++)u(t,e+2*o*16,t,16*o,16);for(o=0;o<r;o++)u(t,e+16*(2*o+1),t,16*(o+r),16)}function a(t,e){return t<<e|t>>>32-e}function s(t,e,r,n){for(var i=0;i<n;i++)r[i]^=t[e+i]}function u(t,e,r,n,i){for(;i--;)r[n++]=t[e++]}function c(t){if(t&&"number"==typeof t.length){for(var e=0;e<t.length;e++){if("number"!=typeof t[e])return;var r=parseInt(t[e]);if(r!=t[e]||r<0||256<=r)return}return 1}}function l(t,e){var r=parseInt(t);if(t!=r)throw new Error("invalid "+e);return r}function h(e,r,n,a,h,f,p){if(!p)throw new Error("missing callback");if(n=l(n,"N"),a=l(a,"r"),h=l(h,"p"),f=l(f,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(d/128/a<n)throw new Error("N too large");if(d/128/h<a)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var y=i(e,r,128*h*a),m=new Uint32Array(32*h*a),v=0;v<m.length;v++){var g=4*v;m[v]=(255&y[3+g])<<24|(255&y[2+g])<<16|(255&y[1+g])<<8|(255&y[0+g])<<0}var b,w,_=new Uint32Array(64*a),k=new Uint32Array(32*a*n),x=32*a,A=new Uint32Array(16),I=new Uint32Array(16),E=h*n*2,S=0,M=null,T=!1,P=0,C=0,O=parseInt(1e3/a),R=void 0!==t?t:setTimeout;!function t(){if(T)return p(new Error("cancelled"),S/E);switch(P){case 0:u(m,w=32*C*a,_,0,x),P=1,b=0;case 1:O<(c=n-b)&&(c=O);for(var r=0;r<c;r++)u(_,0,k,(b+r)*x,x),o(_,x,a,A,I);if(b+=c,S+=c,(d=parseInt(1e3*S/E))!==M){if(T=p(null,S/E))break;M=d}if(b<n)break;b=0,P=2;case 2:var c;for(O<(c=n-b)&&(c=O),r=0;r<c;r++){var l=_[16*(2*a-1)]&n-1;s(k,l*x,_,x),o(_,x,a,A,I)}if(b+=c,S+=c,(d=parseInt(1e3*S/E))!==M){if(T=p(null,S/E))break;M=d}if(b<n)break;if(u(_,0,m,w,x),++C<h){P=0;break}for(y=[],r=0;r<m.length;r++)y.push(m[r]>>0&255),y.push(m[r]>>8&255),y.push(m[r]>>16&255),y.push(m[r]>>24&255);var d=i(e,y,f);return p(null,1,d)}R(t)}()}var f,d;f=this,d=2147483647,void 0!==r?e.exports=h:f&&(f.scrypt&&(f._scrypt=f.scrypt),f.scrypt=h)}).call(this)}).call(this,t("timers").setImmediate)},{timers:46}],45:[function(t,e,n){(function(t,e,r){(function(){!function(e,r){"use strict";var n,i,o,a,s,u,c,l;function h(t){return i[n]=f.apply(r,t),n++}function f(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(r,e):new Function(""+t)()}}function d(t){if(o)setTimeout(f(d,t),0);else{var e=i[t];if(e){o=!0;try{e()}finally{p(t),o=!1}}}}function p(t){delete i[t]}e.setImmediate||(n=1,o=!(i={}),a=e.document,l=(l=Object.getPrototypeOf&&Object.getPrototypeOf(e))&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?s=function(){var e=h(arguments);return t.nextTick(f(d,e)),e}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?function(){function t(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&d(+t.data.slice(r.length))}var r="setImmediate$"+Math.random()+"$";e.addEventListener?e.addEventListener("message",t,!1):e.attachEvent("onmessage",t),s=function(){var t=h(arguments);return e.postMessage(r+t,"*"),t}}():s=e.MessageChannel?((c=new MessageChannel).port1.onmessage=function(t){d(t.data)},function(){var t=h(arguments);return c.port2.postMessage(t),t}):a&&"onreadystatechange"in a.createElement("script")?(u=a.documentElement,function(){var t=h(arguments),e=a.createElement("script");return e.onreadystatechange=function(){d(t),e.onreadystatechange=null,u.removeChild(e),e=null},u.appendChild(e),t}):function(){var t=h(arguments);return setTimeout(f(d,t),0),t},l.setImmediate=s,l.clearImmediate=p)}("undefined"==typeof self?void 0===e?this:e:self)}).call(this)}).call(this,t("_process"),void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").clearImmediate)},{_process:43,timers:46}],46:[function(t,e,n){(function(t){(function(){e.exports={setImmediate:t.setImmediate}}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(t,e,n){(function(t){(function(){var r,n,i;t.crypto&&crypto.getRandomValues&&(r=new Uint8Array(16),n=function(){return crypto.getRandomValues(r),r}),n||(i=new Array(16),n=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}),e.exports=n}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(t,e,r){for(var n=t("./rng"),i=[],o={},a=0;a<256;a++)i[a]=(a+256).toString(16).substr(1),o[i[a]]=a;function s(t,e){return e=e||0,i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]}var u=[1|(t=n())[0],t[1],t[2],t[3],t[4],t[5]],c=16383&(t[6]<<8|t[7]),l=0,h=0;function f(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;a++)e[i+a]=o[a];return e||s(o)}(t=f).v1=function(t,e,r){var n=e&&r||0,i=e||[],o=void 0!==(t=t||{}).clockseq?t.clockseq:c,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),f=void 0!==t.nsecs?t.nsecs:h+1;if((r=a-l+(f-h)/1e4)<0&&void 0===t.clockseq&&(o=o+1&16383),1e4<=(f=(r<0||l<a)&&void 0===t.nsecs?0:f))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=a,c=o,f=(1e4*(268435455&(a+=122192928e5))+(h=f))%4294967296,i[n++]=f>>>24&255,i[n++]=f>>>16&255,i[n++]=f>>>8&255,i[n++]=255&f,a=a/4294967296*1e4&268435455,i[n++]=a>>>8&255,i[n++]=255&a,i[n++]=a>>>24&15|16,i[n++]=a>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var d=t.node||u,p=0;p<6;p++)i[n+p]=d[p];return e||s(i)},t.v4=f,t.parse=function(t,e,r){var n=e&&r||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,(function(t){i<16&&(e[n+i++]=o[t])}));i<16;)e[n+i++]=0;return e},t.unparse=s,e.exports=t},{"./rng":47}],49:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});try{e.exports.XMLHttpRequest=XMLHttpRequest}catch(t){console.log("Warning: XMLHttpRequest is not defined"),e.exports.XMLHttpRequest=null}},{}],50:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../utils/properties");function i(){n.setType(this,"Provider")}i.isProvider=function(t){return n.isType(t,"Provider")},t=i,r.Provider=t},{"../utils/properties":74}],51:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a=t("../utils/address"),u=t("../utils/bignumber"),c=t("../utils/bytes"),l=t("../constants"),h=t("../utils/hash"),f=t("../utils/networks"),d=t("../utils/properties"),p=t("../utils/rlp"),y=t("../utils/transaction"),m=t("../utils/utf8"),v=t("../utils/web"),g=o(t("../errors")),b=t("./abstract-provider");function w(t,e){var r,n={};for(r in t)try{var i=t[r](e[r]);void 0!==i&&(n[r]=i)}catch(t){throw t.checkKey=r,t.checkValue=e[r],t}return n}function _(t,e){return function(r){return null==r?e:t(r)}}function k(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");var r=[];return e.forEach((function(e){r.push(t(e))})),r}}function x(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),32===c.hexDataLength(t))?t.toLowerCase():(g.throwError("invalid hash",g.INVALID_ARGUMENT,{arg:"hash",value:t}),null)}function A(t){return u.bigNumberify(t).toNumber()}function I(t){if(!c.isHexString(t))throw new Error("invalid uint256");for(;t.length<66;)t="0x0"+t.substring(2);return t}function E(t){if(null==t)return"latest";if("earliest"===t)return"0x0";if("latest"===t||"pending"===t)return t;if("number"==typeof t)return c.hexStripZeros(c.hexlify(t));if(c.isHexString(t))return c.hexStripZeros(t);throw new Error("invalid blockTag")}var S={hash:x,blockHash:_(x,null),blockNumber:_(A,null),transactionIndex:_(A,null),confirmations:_(A,null),from:a.getAddress,gasPrice:u.bigNumberify,gasLimit:u.bigNumberify,to:_(a.getAddress,null),value:u.bigNumberify,nonce:A,data:c.hexlify,r:_(I),s:_(I),v:_(A),creates:_(a.getAddress,null),raw:_(c.hexlify)};function M(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&u.bigNumberify(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=a.getContractAddress(t)),t.raw||t.v&&t.r&&t.s&&(r=[c.stripZeros(c.hexlify(t.nonce)),c.stripZeros(c.hexlify(t.gasPrice)),c.stripZeros(c.hexlify(t.gasLimit)),t.to||"0x",c.stripZeros(c.hexlify(t.value||"0x")),c.hexlify(t.data||"0x"),c.stripZeros(c.hexlify(t.v||"0x")),c.stripZeros(c.hexlify(t.r)),c.stripZeros(c.hexlify(t.s))],t.raw=p.encode(r));var e=w(S,t),r=t.networkId;return null!=t.chainId&&null==r&&null==e.v&&(r=t.chainId),"number"!=typeof(r=c.isHexString(r)?u.bigNumberify(r).toNumber():r)&&null!=e.v&&((r=(e.v-35)/2)<0&&(r=0),r=parseInt(r)),e.networkId=r="number"!=typeof r?0:r,null==e.chainId&&null!=r&&(e.chainId=r),e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}var T={hash:x,parentHash:x,number:A,timestamp:A,nonce:_(c.hexlify),difficulty:function(t){t=u.bigNumberify(t);try{return t.toNumber()}catch(t){}return null},gasLimit:u.bigNumberify,gasUsed:u.bigNumberify,miner:a.getAddress,extraData:c.hexlify,transactions:_(k(x))},P=d.shallowCopy(T);function C(t,e){return null!=t.author&&null==t.miner&&(t.miner=t.author),w(e?P:T,t)}P.transactions=_(k(M));var O={from:_(a.getAddress),nonce:_(A),gasLimit:_(u.bigNumberify),gasPrice:_(u.bigNumberify),to:_(a.getAddress),value:_(u.bigNumberify),data:_(c.hexlify)};function R(t){return w(O,t)}var j={transactionLogIndex:_(A),transactionIndex:A,blockNumber:A,transactionHash:x,address:a.getAddress,topics:k(x),data:c.hexlify,logIndex:A,blockHash:x},N={to:_(a.getAddress,null),from:_(a.getAddress,null),contractAddress:_(a.getAddress,null),transactionIndex:A,root:_(x),gasUsed:u.bigNumberify,logsBloom:_(c.hexlify),blockHash:x,transactionHash:x,logs:k((function(t){return w(j,t)})),blockNumber:A,confirmations:_(A,null),cumulativeGasUsed:u.bigNumberify,status:_(A)};function L(t){return Array.isArray(t)?t.forEach((function(t){L(t)})):null!=t&&x(t),t}var U,D,B={fromBlock:_(E,void 0),toBlock:_(E,void 0),address:_(a.getAddress,void 0),topics:_(L,void 0)},z={blockHash:_(x,void 0),address:_(a.getAddress,void 0),topics:_(L,void 0)},H={blockNumber:_(A),blockHash:_(x),transactionIndex:A,removed:_((function(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===t)return!0;if("false"===t)return!1}throw new Error("invaid boolean - "+t)})),address:a.getAddress,data:(U=c.hexlify,function(t){return t?U(t):"0x"}),topics:k(x),transactionHash:x,logIndex:A};function F(t){return w(H,t)}function q(t){return t.map((function(t){return"string"==typeof t?t:Array.isArray(t)?(t.forEach((function(t){null!==t&&32!==c.hexDataLength(t)&&g.throwError("invalid topic",g.INVALID_ARGUMENT,{argument:"topic",value:t})})),t.join(",")):null===t?"":g.throwError("invalid topic value",g.INVALID_ARGUMENT,{argument:"topic",value:t})})).join("&")}function G(t){if("string"==typeof t){if(20===c.hexDataLength(t))return"address:"+a.getAddress(t);if(t=t.toLowerCase(),32===c.hexDataLength(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter::"+q(t);if(t&&"object"==s(t))return"filter:"+(t.address||"")+":"+q(t.topics||[])}throw new Error("invalid event - "+t)}function V(){return(new Date).getTime()}function K(t){var e,r=D.call(this)||this;return g.checkNew(r,b.Provider),t instanceof Promise?(d.defineReadOnly(r,"ready",t.then((function(t){return d.defineReadOnly(r,"_network",t),t}))),r.ready.catch((function(t){}))):(e=f.getNetwork(null==t?"homestead":t))?(d.defineReadOnly(r,"_network",e),d.defineReadOnly(r,"ready",Promise.resolve(r._network))):g.throwError("invalid network",g.INVALID_ARGUMENT,{arg:"network",value:t}),r._lastBlockNumber=-2,r._balances={},r._events=[],r._pollingInterval=4e3,r._emitted={block:-2},r._fastQueryDate=0,r}i(K,D=b.Provider),K.prototype._doPoll=function(){var t=this;this.getBlockNumber().then((function(e){if(t.polling&&(t._setFastBlockNumber(e),e!==t._lastBlockNumber)){-2===t._emitted.block&&(t._emitted.block=e-1);for(var r=t._emitted.block+1;r<=e;r++)t.emit("block",r);t._emitted.block!==e&&(t._emitted.block=e,Object.keys(t._emitted).forEach((function(r){var n;"block"===r||"pending"!==(n=t._emitted[r])&&12<e-n&&delete t._emitted[r]}))),-2===t._lastBlockNumber&&(t._lastBlockNumber=e-1);var n={},i={};return t._events.forEach((function(t){i[t.tag]=!0})),Object.keys(i).forEach((function(r){var i=r.split(":");switch(i[0]){case"tx":var o=i[1];t.getTransactionReceipt(o).then((function(e){return e&&null!=e.blockNumber&&(t._emitted["t:"+o]=e.blockNumber,t.emit(o,e)),null})).catch((function(e){t.emit("error",e)}));break;case"address":var a=i[1];t._balances[a]&&(n[a]=t._balances[a]),t.getBalance(a,"latest").then((function(e){var r=t._balances[a];if(!r||!e.eq(r))return t._balances[a]=e,t.emit(a,e),null})).catch((function(e){t.emit("error",e)}));break;case"filter":var s=i[2].split(/&/g).map((function(t){var e=t.split(",");return 1===e.length?""===e[0]?null:t:e.map((function(t){return""===t?null:t}))})),u={address:i[1],fromBlock:t._lastBlockNumber+1,toBlock:e,topics:s};u.address||delete u.address,t.getLogs(u).then((function(e){if(0!==e.length)return e.forEach((function(e){t._emitted["b:"+e.blockHash]=e.blockNumber,t._emitted["t:"+e.transactionHash]=e.blockNumber,t.emit(u,e)})),null})).catch((function(e){t.emit("error",e)}))}})),t._lastBlockNumber=e,t._balances=n,null}})).catch((function(t){})),this.doPoll()},K.prototype.resetEventsBlock=function(t){this._lastBlockNumber=t-1,this.polling&&this._doPoll()},Object.defineProperty(K.prototype,"network",{get:function(){return this._network},enumerable:!0,configurable:!0}),K.prototype.getNetwork=function(){return this.ready},Object.defineProperty(K.prototype,"blockNumber",{get:function(){return this._fastBlockNumber},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"polling",{get:function(){return null!=this._poller},set:function(t){var e=this;setTimeout((function(){t&&!e._poller?(e._poller=setInterval(e._doPoll.bind(e),e.pollingInterval),e._doPoll()):!t&&e._poller&&(clearInterval(e._poller),e._poller=null)}),0)},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"pollingInterval",{get:function(){return this._pollingInterval},set:function(t){var e=this;if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){e._doPoll()}),this._pollingInterval))},enumerable:!0,configurable:!0}),K.prototype._getFastBlockNumber=function(){var t=this,e=V();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((function(e){return(null==t._fastBlockNumber||e>t._fastBlockNumber)&&(t._fastBlockNumber=e),t._fastBlockNumber}))),this._fastBlockNumberPromise},K.prototype._setFastBlockNumber=function(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=V(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))},K.prototype.waitForTransaction=function(t,e){var r=this;return null==e&&(e=1),this.getTransactionReceipt(t).then((function(n){return 0===e||n&&n.confirmations>=e?n:new Promise((function(n){r.on(t,(function i(o){o.confirmations<e||(r.removeListener(t,i),n(o))}))}))}))},K.prototype.getBlockNumber=function(){var t=this;return this.ready.then((function(){return t.perform("getBlockNumber",{}).then((function(e){var r=parseInt(e);if(r!=e)throw new Error("invalid response - getBlockNumber");return t._setFastBlockNumber(r),r}))}))},K.prototype.getGasPrice=function(){var t=this;return this.ready.then((function(){return t.perform("getGasPrice",{}).then((function(t){return u.bigNumberify(t)}))}))},K.prototype.getBalance=function(t,e){var r=this;return this.ready.then((function(){return d.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,n=t.blockTag;return r._getAddress(e).then((function(t){return t={address:t,blockTag:E(n)},r.perform("getBalance",t).then((function(t){return u.bigNumberify(t)}))}))}))}))},K.prototype.getTransactionCount=function(t,e){var r=this;return this.ready.then((function(){return d.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,n=t.blockTag;return r._getAddress(e).then((function(t){return t={address:t,blockTag:E(n)},r.perform("getTransactionCount",t).then((function(t){return u.bigNumberify(t).toNumber()}))}))}))}))},K.prototype.getCode=function(t,e){var r=this;return this.ready.then((function(){return d.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,n=t.blockTag;return r._getAddress(e).then((function(t){return t={address:t,blockTag:E(n)},r.perform("getCode",t).then((function(t){return c.hexlify(t)}))}))}))}))},K.prototype.getStorageAt=function(t,e,r){var n=this;return this.ready.then((function(){return d.resolveProperties({addressOrName:t,position:e,blockTag:r}).then((function(t){var e=t.addressOrName,r=t.position,i=t.blockTag;return n._getAddress(e).then((function(t){return t={address:t,blockTag:E(i),position:c.hexStripZeros(c.hexlify(r))},n.perform("getStorageAt",t).then((function(t){return c.hexlify(t)}))}))}))}))},K.prototype.sendTransaction=function(t){var e=this;return this.ready.then((function(){return d.resolveProperties({signedTransaction:t}).then((function(t){var r=t.signedTransaction;return t={signedTransaction:c.hexlify(r)},e.perform("sendTransaction",t).then((function(t){return e._wrapTransaction(y.parse(r),t)}),(function(t){throw t.transaction=y.parse(r),t.transaction.hash&&(t.transactionHash=t.transaction.hash),t}))}))}))},K.prototype._wrapTransaction=function(t,e){var r=this;if(null!=e&&32!==c.hexDataLength(e))throw new Error("invalid response - sendTransaction");var n=t;return null!=e&&t.hash!==e&&g.throwError("Transaction hash mismatch from Provider.sendTransaction.",g.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),n.wait=function(e){return 0!==e&&(r._emitted["t:"+t.hash]="pending"),r.waitForTransaction(t.hash,e).then((function(n){return null==n&&0===e?null:(r._emitted["t:"+t.hash]=n.blockNumber,0===n.status&&g.throwError("transaction failed",g.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t}),n)}))},n},K.prototype.call=function(t,e){var r=this,n=d.shallowCopy(t);return this.ready.then((function(){return d.resolveProperties({blockTag:e,tx:n}).then((function(t){var e=t.blockTag;return t=t.tx,r._resolveNames(t,["to","from"]).then((function(t){return t={blockTag:E(e),transaction:R(t)},r.perform("call",t).then((function(t){return c.hexlify(t)}))}))}))}))},K.prototype.estimateGas=function(t){var e=this,r={to:t.to,from:t.from,data:t.data,gasPrice:t.gasPrice,value:t.value};return this.ready.then((function(){return d.resolveProperties(r).then((function(t){return e._resolveNames(t,["to","from"]).then((function(t){return t={transaction:R(t)},e.perform("estimateGas",t).then((function(t){return u.bigNumberify(t)}))}))}))}))},K.prototype.getBlock=function(t,e){var r=this;return this.ready.then((function(){return d.resolveProperties({blockHashOrBlockTag:t}).then((function(t){t=t.blockHashOrBlockTag;try{var n=c.hexlify(t);if(32===c.hexDataLength(n))return v.poll((function(){return r.perform("getBlock",{blockHash:n,includeTransactions:!!e}).then((function(t){return null==t?null==r._emitted["b:"+n]?null:void 0:C(t,e)}))}),{onceBlock:r})}catch(t){}try{var i=-128,o=E(t);return c.isHexString(o)&&(i=parseInt(o.substring(2),16)),v.poll((function(){return r.perform("getBlock",{blockTag:o,includeTransactions:!!e}).then((function(t){return null==t?i<=r._emitted.block?void 0:null:C(t,e)}))}),{onceBlock:r})}catch(t){}throw new Error("invalid block hash or block tag")}))}))},K.prototype.getTransaction=function(t){var e=this;return this.ready.then((function(){return d.resolveProperties({transactionHash:t}).then((function(t){var r=t.transactionHash,n={transactionHash:x(r,!0)};return v.poll((function(){return e.perform("getTransaction",n).then((function(t){if(null==t)return null==e._emitted["t:"+r]?null:void 0;var n=K.checkTransactionResponse(t);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations)return e._getFastBlockNumber().then((function(t){return t=t-n.blockNumber+1,n.confirmations=t=t<=0?1:t,e._wrapTransaction(n)}));return e._wrapTransaction(n)}))}),{onceBlock:e})}))}))},K.prototype.getTransactionReceipt=function(t){var e=this;return this.ready.then((function(){return d.resolveProperties({transactionHash:t}).then((function(t){var r=t.transactionHash,n={transactionHash:x(r,!0)};return v.poll((function(){return e.perform("getTransactionReceipt",n).then((function(t){if(null==t)return null==e._emitted["t:"+r]?null:void 0;if(null!=t.blockHash){var n,i=((t=w(N,n=t)).logs.forEach((function(t,e){null==t.transactionLogIndex&&(t.transactionLogIndex=e)})),null!=n.status&&(t.byzantium=!0),t);if(null==i.blockNumber)i.confirmations=0;else if(null==i.confirmations)return e._getFastBlockNumber().then((function(t){return t=t-i.blockNumber+1,i.confirmations=t=t<=0?1:t,i}));return i}}))}),{onceBlock:e})}))}))},K.prototype.getLogs=function(t){var e=this;return this.ready.then((function(){return d.resolveProperties(t).then((function(t){return e._resolveNames(t,["address"]).then((function(t){return t={filter:(t=t)&&t.blockHash?w(z,t):w(B,t)},e.perform("getLogs",t).then((function(t){return k(F)(t)}))}))}))}))},K.prototype.getEtherPrice=function(){var t=this;return this.ready.then((function(){return t.perform("getEtherPrice",{}).then((function(t){return t}))}))},K.prototype._getAddress=function(t){return this.resolveName(t).then((function(e){return null==e&&g.throwError("ENS name not configured",g.UNSUPPORTED_OPERATION,{operation:"resolveName("+JSON.stringify(t)+")"}),e}))},K.prototype._resolveNames=function(t,e){var r=[],n=d.shallowCopy(t);return e.forEach((function(t){null!=n[t]&&r.push(this._getAddress(n[t]).then((function(e){n[t]=e})))}),this),Promise.all(r).then((function(){return n}))},K.prototype._getResolver=function(t){var e=this;return this.getNetwork().then((function(r){r.ensAddress||g.throwError("network does not support ENS",g.UNSUPPORTED_OPERATION,{operation:"ENS",network:r.name});var n="0x0178b8bf"+h.namehash(t).substring(2);return n={to:r.ensAddress,data:n},e.call(n).then((function(t){return 32!==c.hexDataLength(t)||(t=a.getAddress(c.hexDataSlice(t,12)))===l.AddressZero?null:t}))}))},K.prototype.resolveName=function(t){var e=this;if(t instanceof Promise)return t.then((function(t){return e.resolveName(t)}));try{return Promise.resolve(a.getAddress(t))}catch(e){if(c.isHexString(t))throw e}var r=this,n=h.namehash(t);return this._getResolver(t).then((function(t){if(null==t)return null;var e="0x3b3b57de"+n.substring(2);return r.call({to:t,data:e})})).then((function(t){return 32!==c.hexDataLength(t)||(t=a.getAddress(c.hexDataSlice(t,12)))===l.AddressZero?null:t}))},K.prototype.lookupAddress=function(t){var e=this;if(t instanceof Promise)return t.then((function(t){return e.lookupAddress(t)}));var r=(t=a.getAddress(t)).substring(2)+".addr.reverse",n=h.namehash(r),i=this;return this._getResolver(r).then((function(t){if(!t)return null;var e="0x691f3431"+n.substring(2);return i.call({to:t,data:e})})).then((function(e){if(null==e)return null;if((e=e.substring(2)).length<64)return null;if((e=e.substring(64)).length<64)return null;var r=u.bigNumberify("0x"+e.substring(0,64)).toNumber();if(2*r>(e=e.substring(64)).length)return null;var n=m.toUtf8String("0x"+e.substring(0,2*r));return i.resolveName(n).then((function(e){return e!=t?null:n}))}))},K.checkTransactionResponse=M,K.prototype.doPoll=function(){},K.prototype.perform=function(t,e){return g.throwError(t+" not implemented",g.NOT_IMPLEMENTED,{operation:t}),null},K.prototype._startPending=function(){g.warn("WARNING: this provider does not support pending events")},K.prototype._stopPending=function(){},K.prototype._addEventListener=function(t,e,r){this._events.push({tag:G(t),listener:e,once:r}),"pending"===t&&this._startPending(),this.polling=!0},K.prototype.on=function(t,e){return this._addEventListener(t,e,!1),this},K.prototype.once=function(t,e){return this._addEventListener(t,e,!0),this},K.prototype.addEventListener=function(t,e){return this.on(t,e)},K.prototype.emit=function(t){for(var e=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=!1,o=G(t);return this._events=this._events.filter((function(t){return t.tag!==o||(setTimeout((function(){t.listener.apply(e,r)}),0),i=!0,!t.once)})),0===this.listenerCount()&&(this.polling=!1),i},K.prototype.listenerCount=function(t){if(!t)return this._events.length;var e=G(t);return this._events.filter((function(t){return t.tag===e})).length},K.prototype.listeners=function(t){var e=G(t);return this._events.filter((function(t){return t.tag===e})).map((function(t){return t.listener}))},K.prototype.removeAllListeners=function(t){var e;return null==t?(this._events=[],this._stopPending()):(e=G(t),this._events=this._events.filter((function(t){return t.tag!==e})),"pending"===t&&this._stopPending()),0===this._events.length&&(this.polling=!1),this},K.prototype.removeListener=function(t,e){var r=!1,n=G(t);return this._events=this._events.filter((function(t){return t.tag!==n||t.listener!=e||!!r||!(r=!0)})),"pending"===t&&0===this.listenerCount("pending")&&this._stopPending(),0===this.listenerCount()&&(this.polling=!1),this},i=K,r.BaseProvider=i,d.defineReadOnly(b.Provider,"inherits",d.inheritable(b.Provider))},{"../constants":3,"../errors":5,"../utils/address":60,"../utils/bignumber":63,"../utils/bytes":64,"../utils/hash":65,"../utils/networks":72,"../utils/properties":74,"../utils/rlp":76,"../utils/transaction":83,"../utils/utf8":85,"../utils/web":86,"./abstract-provider":50}],52:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a,s=t("./base-provider"),u=t("../utils/bytes"),c=t("../utils/properties"),l=t("../utils/web"),h=o(t("../errors"));function f(t){var e,r,n=[];for(e in t)null!=t[e]&&(r=u.hexlify(t[e]),{gasLimit:!0,gasPrice:!0,nonce:!0,value:!0}[e]&&(r=u.hexStripZeros(r)),n.push(e+"="+r));return n.join("&")}function d(t){if(0==t.status&&("No records found"===t.message||"No transactions found"===t.message))return t.result;if(1==t.status&&"OK"==t.message)return t.result;var e=new Error("invalid response");throw e.result=JSON.stringify(t),e}function p(t){if("2.0"!=t.jsonrpc)throw(e=new Error("invalid response")).result=JSON.stringify(t),e;if(t.error){var e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function y(t){if("pending"===t)throw new Error("pending not supported");return"latest"===t?t:parseInt(t.substring(2),16)}function m(t,e){var r=a.call(this,t)||this;h.checkNew(r,m),t="invalid";var n=null;switch(t=r.network?r.network.name:t){case"homestead":n="https://api.etherscan.io";break;case"ropsten":n="https://api-ropsten.etherscan.io";break;case"rinkeby":n="https://api-rinkeby.etherscan.io";break;case"kovan":n="https://api-kovan.etherscan.io";break;case"goerli":n="https://api-goerli.etherscan.io";break;default:throw new Error("unsupported network")}return c.defineReadOnly(r,"baseUrl",n),c.defineReadOnly(r,"apiKey",e||"8FG3JMZ9USS4NTA6YKEKHINU56SEPPVBJR"),r}i(m,a=s.BaseProvider),m.prototype.perform=function(t,e){var r,n=this,i=this.baseUrl,o="";function s(t,e){return l.fetchJson(t,null,e||p).then((function(e){return n.emit("debug",{action:"perform",request:t,response:e,provider:n}),e}))}switch(this.apiKey&&(o+="&apikey="+this.apiKey),t){case"getBlockNumber":return s(i+="/api?module=proxy&action=eth_blockNumber"+o);case"getGasPrice":return s(i+="/api?module=proxy&action=eth_gasPrice"+o);case"getBalance":return i+="/api?module=account&action=balance&address="+e.address,s(i+="&tag="+e.blockTag+o,d);case"getTransactionCount":return i+="/api?module=proxy&action=eth_getTransactionCount&address="+e.address,s(i+="&tag="+e.blockTag+o);case"getCode":return i+="/api?module=proxy&action=eth_getCode&address="+e.address,s(i+="&tag="+e.blockTag+o,p);case"getStorageAt":return i+="/api?module=proxy&action=eth_getStorageAt&address="+e.address,i+="&position="+e.position,s(i+="&tag="+e.blockTag+o,p);case"sendTransaction":return i+="/api?module=proxy&action=eth_sendRawTransaction&hex="+e.signedTransaction,s(i+=o).catch((function(t){throw t.responseText&&(0<=t.responseText.toLowerCase().indexOf("insufficient funds")&&h.throwError("insufficient funds",h.INSUFFICIENT_FUNDS,{}),0<=t.responseText.indexOf("same hash was already imported")&&h.throwError("nonce has already been used",h.NONCE_EXPIRED,{}),0<=t.responseText.indexOf("another transaction with same nonce")&&h.throwError("replacement fee too low",h.REPLACEMENT_UNDERPRICED,{})),t}));case"getBlock":return e.blockTag?(i+="/api?module=proxy&action=eth_getBlockByNumber&tag="+e.blockTag,e.includeTransactions?i+="&boolean=true":i+="&boolean=false",s(i+=o)):Promise.reject(new Error("getBlock by blockHash not implemeneted"));case"getTransaction":return i+="/api?module=proxy&action=eth_getTransactionByHash&txhash="+e.transactionHash,s(i+=o);case"getTransactionReceipt":return i+="/api?module=proxy&action=eth_getTransactionReceipt&txhash="+e.transactionHash,s(i+=o);case"call":return i+="/api?module=proxy&action=eth_call"+(r=(r=f(e.transaction))&&"&"+r),"latest"!==e.blockTag?Promise.reject(new Error("EtherscanProvider does not support blockTag for call")):s(i+=o);case"estimateGas":return i+="/api?module=proxy&action=eth_estimateGas&"+(r=(r=f(e.transaction))&&"&"+r),s(i+=o);case"getLogs":i+="/api?module=logs&action=getLogs";try{if(e.filter.fromBlock&&(i+="&fromBlock="+y(e.filter.fromBlock)),e.filter.toBlock&&(i+="&toBlock="+y(e.filter.toBlock)),e.filter.blockHash)try{h.throwError("Etherscan does not support blockHash filters",h.UNSUPPORTED_OPERATION,{operation:"getLogs(blockHash)"})}catch(t){return Promise.reject(t)}if(e.filter.address&&(i+="&address="+e.filter.address),e.filter.topics&&0<e.filter.topics.length){if(1<e.filter.topics.length)throw new Error("unsupported topic format");var u=e.filter.topics[0];if("string"!=typeof u||66!==u.length)throw new Error("unsupported topic0 format");i+="&topic0="+u}}catch(t){return Promise.reject(t)}var c=this;return s(i+=o,d).then((function(t){var e={},r=Promise.resolve();return t.forEach((function(t){r=r.then((function(){return null!=t.blockHash?null:(t.blockHash=e[t.transactionHash],null==t.blockHash?c.getTransaction(t.transactionHash).then((function(r){return e[t.transactionHash]=r.blockHash,t.blockHash=r.blockHash,null})):null)}))})),r.then((function(){return t}))}));case"getEtherPrice":return"homestead"!==this.network.name?Promise.resolve(0):(i+="/api?module=stats&action=ethprice",s(i+=o,d).then((function(t){return parseFloat(t.ethusd)})))}return a.prototype.perform.call(this,t,e)},m.prototype.getHistory=function(t,e,r){var n=this,i=this.baseUrl,o="";return this.apiKey&&(o+="&apikey="+this.apiKey),null==e&&(e=0),null==r&&(r=99999999),this.resolveName(t).then((function(t){return i+="/api?module=account&action=txlist&address="+t,i+="&startblock="+e,i+="&endblock="+r,i+="&sort=asc"+o,l.fetchJson(i,null,d).then((function(t){n.emit("debug",{action:"getHistory",request:i,response:t,provider:n});var e=[];return t.forEach((function(t){["contractAddress","to"].forEach((function(e){""==t[e]&&delete t[e]})),null==t.creates&&null!=t.contractAddress&&(t.creates=t.contractAddress);var r=s.BaseProvider.checkTransactionResponse(t);t.timeStamp&&(r.timestamp=parseInt(t.timeStamp)),e.push(r)})),e}))}))},i=m,r.EtherscanProvider=i},{"../errors":5,"../utils/bytes":64,"../utils/properties":74,"../utils/web":86,"./base-provider":51}],53:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a,s=t("./base-provider"),u=o(t("../errors"));function c(t){var e=!0,r=null;return t.forEach((function(n){null!=n?null!=r?r.name===n.name&&r.chainId===n.chainId&&(r.ensAddress===n.ensAddress||null==r.ensAddress&&null==n.ensAddress)||u.throwError("provider mismatch",u.INVALID_ARGUMENT,{arg:"networks",value:t}):r=n:e=!1})),e}function l(t){var e,r=this;if(0===t.length)throw new Error("no providers");return r=c(t.map((function(t){return t.network})))?a.call(this,t[0].network)||this:(e=Promise.all(t.map((function(t){return t.getNetwork()}))).then((function(t){return c(t)||u.throwError("getNetwork returned null",u.UNKNOWN_ERROR,{}),t[0]})),a.call(this,e)||this),u.checkNew(r,l),r._providers=t.slice(0),r}i(l,a=s.BaseProvider),Object.defineProperty(l.prototype,"providers",{get:function(){return this._providers.slice(0)},enumerable:!0,configurable:!0}),l.prototype.perform=function(t,e){var r=this.providers;return new Promise((function(n,i){var o=null;!function a(){r.length?r.shift().perform(t,e).then((function(t){return n(t)})).catch((function(t){o=o||t,setTimeout(a,0)})):i(o)}()}))},i=l,r.FallbackProvider=i},{"../errors":5,"./base-provider":51}],54:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./abstract-provider");r.Provider=n.Provider,n=t("./base-provider"),r.BaseProvider=n.BaseProvider,n=t("./etherscan-provider"),r.EtherscanProvider=n.EtherscanProvider,n=t("./fallback-provider"),r.FallbackProvider=n.FallbackProvider,n=t("./ipc-provider"),r.IpcProvider=n.IpcProvider,n=t("./infura-provider"),r.InfuraProvider=n.InfuraProvider,n=t("./json-rpc-provider"),r.JsonRpcProvider=n.JsonRpcProvider,r.JsonRpcSigner=n.JsonRpcSigner,t=t("./web3-provider"),r.Web3Provider=t.Web3Provider},{"./abstract-provider":50,"./base-provider":51,"./etherscan-provider":52,"./fallback-provider":53,"./infura-provider":55,"./ipc-provider":56,"./json-rpc-provider":57,"./web3-provider":58}],55:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a,s=t("./json-rpc-provider"),u=t("../utils/bytes"),c=t("../utils/networks"),l=t("../utils/properties"),h=o(t("../errors"));function f(t,e){var r=this,n=c.getNetwork(null==t?"homestead":t);null==e&&(e="7d0d81d0919f4f05b9ab6634be01ee73");var i=null;switch(n.name){case"homestead":i="mainnet.infura.io";break;case"ropsten":i="ropsten.infura.io";break;case"rinkeby":i="rinkeby.infura.io";break;case"goerli":i="goerli.infura.io";break;case"kovan":i="kovan.infura.io";break;default:h.throwError("unsupported network",h.INVALID_ARGUMENT,{argument:"network",value:t})}return u.isHexString("0x"+e,16)?(r=a.call(this,"https://"+i+"/v3/"+e,n)||this,l.defineReadOnly(r,"apiAccessToken",null),l.defineReadOnly(r,"projectId",e)):(h.warn("The legacy INFURA apiAccesToken API is deprecated; please upgrade to a Project ID instead (see INFURA dshboard; https://infura.io)"),r=a.call(this,"https://"+i+"/"+e,n)||this,l.defineReadOnly(r,"apiAccessToken",e),l.defineReadOnly(r,"projectId",null)),h.checkNew(r,f),r}i(f,a=s.JsonRpcProvider),f.prototype._startPending=function(){h.warn("WARNING: INFURA does not support pending filters")},f.prototype.getSigner=function(t){return h.throwError("INFURA does not support signing",h.UNSUPPORTED_OPERATION,{operation:"getSigner"})},f.prototype.listAccounts=function(){return Promise.resolve([])},i=f,r.InfuraProvider=i},{"../errors":5,"../utils/bytes":64,"../utils/networks":72,"../utils/properties":74,"./json-rpc-provider":57}],56:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},{}],57:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a=t("./base-provider"),s=t("../abstract-signer"),u=o(t("../errors")),c=t("../utils/address"),l=t("../utils/bytes"),h=t("../utils/networks"),f=t("../utils/properties"),d=t("../utils/utf8"),p=t("../utils/web");function y(t){if(t.error){var e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function m(t){return t&&t.toLowerCase()}var v,g={},b=42,w=(i(_,v=s.Signer),_.prototype.getAddress=function(){var t=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(e){return e.length<=t._index&&u.throwError("unknown account #"+t._index,u.UNSUPPORTED_OPERATION,{operation:"getAddress"}),t._address=c.getAddress(e[t._index]),t._address}))},_.prototype.getBalance=function(t){return this.provider.getBalance(this.getAddress(),t)},_.prototype.getTransactionCount=function(t){return this.provider.getTransactionCount(this.getAddress(),t)},_.prototype.sendUncheckedTransaction=function(t){var e=this;t=f.shallowCopy(t);var r,n=this.getAddress().then((function(t){return t&&t.toLowerCase()}));return null==t.gasLimit&&((r=f.shallowCopy(t)).from=n,t.gasLimit=this.provider.estimateGas(r)),Promise.all([f.resolveProperties(t),n]).then((function(t){var r=t[0],n=A.hexlifyTransaction(r);return n.from=t[1],e.provider.send("eth_sendTransaction",[n]).then((function(t){return t}),(function(t){throw t.responseText&&(0<=t.responseText.indexOf("insufficient funds")&&u.throwError("insufficient funds",u.INSUFFICIENT_FUNDS,{transaction:r}),0<=t.responseText.indexOf("nonce too low")&&u.throwError("nonce has already been used",u.NONCE_EXPIRED,{transaction:r}),0<=t.responseText.indexOf("replacement transaction underpriced")&&u.throwError("replacement fee too low",u.REPLACEMENT_UNDERPRICED,{transaction:r})),t}))}))},_.prototype.sendTransaction=function(t){var e=this;return this.sendUncheckedTransaction(t).then((function(t){return p.poll((function(){return e.provider.getTransaction(t).then((function(r){if(null!==r)return e.provider._wrapTransaction(r,t)}))}),{fastRetry:250,onceBlock:e.provider}).catch((function(e){throw e.transactionHash=t,e}))}))},_.prototype.signMessage=function(t){var e=this,r="string"==typeof t?d.toUtf8Bytes(t):t;return this.getAddress().then((function(t){return e.provider.send("eth_sign",[t.toLowerCase(),l.hexlify(r)])}))},_.prototype.unlock=function(t){var e=this.provider;return this.getAddress().then((function(r){return e.send("personal_unlockAccount",[r.toLowerCase(),t,null])}))},_);function _(t,e,r){var n=v.call(this)||this;if(u.checkNew(n,_),t!==g)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return f.defineReadOnly(n,"provider",e),r?"string"==typeof r?f.defineReadOnly(n,"_address",c.getAddress(r)):"number"==typeof r?f.defineReadOnly(n,"_index",r):u.throwError("invalid address or index",u.INVALID_ARGUMENT,{argument:"addressOrIndex",value:r}):f.defineReadOnly(n,"_index",0),n}r.JsonRpcSigner=w;var k,x={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0},A=(i(I,k=a.BaseProvider),I.prototype.getSigner=function(t){return new w(g,this,t)},I.prototype.listAccounts=function(){return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return c.getAddress(t)}))}))},I.prototype.send=function(t,e){var r=this,n={method:t,params:e,id:b++,jsonrpc:"2.0"};return p.fetchJson(this.connection,JSON.stringify(n),y).then((function(t){return r.emit("debug",{action:"send",request:n,response:t,provider:r}),t}))},I.prototype.perform=function(t,e){switch(t){case"getBlockNumber":return this.send("eth_blockNumber",[]);case"getGasPrice":return this.send("eth_gasPrice",[]);case"getBalance":return this.send("eth_getBalance",[m(e.address),e.blockTag]);case"getTransactionCount":return this.send("eth_getTransactionCount",[m(e.address),e.blockTag]);case"getCode":return this.send("eth_getCode",[m(e.address),e.blockTag]);case"getStorageAt":return this.send("eth_getStorageAt",[m(e.address),e.position,e.blockTag]);case"sendTransaction":return this.send("eth_sendRawTransaction",[e.signedTransaction]).catch((function(t){throw t.responseText&&(0<t.responseText.indexOf("insufficient funds")&&u.throwError("insufficient funds",u.INSUFFICIENT_FUNDS,{}),0<t.responseText.indexOf("nonce too low")&&u.throwError("nonce has already been used",u.NONCE_EXPIRED,{}),0<t.responseText.indexOf("replacement transaction underpriced")&&u.throwError("replacement fee too low",u.REPLACEMENT_UNDERPRICED,{})),t}));case"getBlock":return e.blockTag?this.send("eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]):e.blockHash?this.send("eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]):Promise.reject(new Error("invalid block tag or block hash"));case"getTransaction":return this.send("eth_getTransactionByHash",[e.transactionHash]);case"getTransactionReceipt":return this.send("eth_getTransactionReceipt",[e.transactionHash]);case"call":return this.send("eth_call",[I.hexlifyTransaction(e.transaction,{from:!0}),e.blockTag]);case"estimateGas":return this.send("eth_estimateGas",[I.hexlifyTransaction(e.transaction,{from:!0})]);case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=m(e.filter.address)),this.send("eth_getLogs",[e.filter])}return u.throwError(t+" not implemented",u.NOT_IMPLEMENTED,{operation:t}),null},I.prototype._startPending=function(){var t,e;null==this._pendingFilter&&(e=(t=this).send("eth_newPendingTransactionFilter",[]),(this._pendingFilter=e).then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;var n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return new Promise((function(t){setTimeout((function(){t()}),1e3)}))}))})).then((function(){return t._pendingFilter==e?(setTimeout((function(){n()}),0),null):void t.send("eth_uninstallFilter",[r])})).catch((function(t){}))}(),r})).catch((function(t){})))},I.prototype._stopPending=function(){this._pendingFilter=null},I.hexlifyTransaction=function(t,e){var r=f.shallowCopy(x);if(e)for(var n in e)e[n]&&(r[n]=!0);f.checkProperties(t,r);var i={};return["gasLimit","gasPrice","nonce","value"].forEach((function(e){var r;null!=t[e]&&(r=l.hexStripZeros(l.hexlify(t[e])),i[e="gasLimit"===e?"gas":e]=r)})),["from","to","data"].forEach((function(e){null!=t[e]&&(i[e]=l.hexlify(t[e]))})),i},I);function I(t,e){var r=this;return"string"==typeof t&&null===e&&h.getNetwork(t)&&(e=t,t=null),e||(e=new Promise((function(t,e){setTimeout((function(){r.send("net_version",[]).then((function(e){return t(h.getNetwork(parseInt(e)))})).catch((function(t){e(t)}))}))}))),r=k.call(this,e)||this,u.checkNew(r,I),r.connection="string"==typeof(t=t||"http://localhost:8545")?{url:t}:t,r}r.JsonRpcProvider=A},{"../abstract-signer":2,"../errors":5,"../utils/address":60,"../utils/bytes":64,"../utils/networks":72,"../utils/properties":74,"../utils/utf8":85,"../utils/web":86,"./base-provider":51}],58:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a,s=t("./json-rpc-provider"),u=t("../utils/properties"),c=o(t("../errors")),l=42;function h(t,e){return e=a.call(this,t.host||t.path||"",e)||this,c.checkNew(e,h),t&&(t.sendAsync?e._sendAsync=t.sendAsync.bind(t):t.send&&(e._sendAsync=t.send.bind(t))),t&&e._sendAsync||c.throwError("invalid web3Provider",c.INVALID_ARGUMENT,{arg:"web3Provider",value:t}),u.defineReadOnly(e,"_web3Provider",t),u.defineReadOnly(e,"provider",t),e}i(h,a=s.JsonRpcProvider),h.prototype.send=function(t,e){var r=this;return"eth_sign"==t&&this._web3Provider.isMetaMask&&(t="personal_sign",e=[e[1],e[0]]),new Promise((function(n,i){var o={method:t,params:e,id:l++,jsonrpc:"2.0"};r._sendAsync(o,(function(t,e){if(t)i(t);else{if(e.error)return(t=new Error(e.error.message)).code=e.error.code,t.data=e.error.data,void i(t);n(e.result)}}))}))},i=h,r.Web3Provider=i},{"../errors":5,"../utils/properties":74,"./json-rpc-provider":57}],59:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a=t("../constants"),u=o(t("../errors")),c=t("./address"),l=t("./bignumber"),h=t("./bytes"),f=t("./utf8"),d=t("./properties"),p=new RegExp(/^bytes([0-9]*)$/),y=new RegExp(/^(u?int)([0-9]*)$/),m=new RegExp(/^(.*)\[([0-9]*)\]$/);r.defaultCoerceFunc=function(t,e){return(t=t.match(y))&&parseInt(t[2])<=48?e.toNumber():e};var v=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),g=new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");function b(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}function w(t,e){var r=t;function n(t){throw new Error('unexpected character "'+r[t]+'" at position '+t+' in "'+r+'"')}t=t.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},o=i,a=0;a<t.length;a++){var s=t[a];switch(s){case"(":o.state.allowParams||n(a),o.state.allowType=!1,o.type=b(o.type),o.components=[{type:"",name:"",parent:o,state:{allowType:!0}}],o=o.components[0];break;case")":delete o.state,e&&"indexed"===o.name&&(o.indexed=!0,o.name=""),o.type=b(o.type);var u=o;(o=o.parent)||n(a),delete u.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,e&&"indexed"===o.name&&(o.indexed=!0,o.name=""),o.type=b(o.type),u={type:"",name:"",parent:o.parent,state:{allowType:!0}},o.parent.components.push(u),delete o.parent,o=u;break;case" ":o.state.allowType&&""!==o.type&&(o.type=b(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&""!==o.name&&(e&&"indexed"===o.name?(o.indexed=!0,o.name=""):o.state.allowName=!1);break;case"[":o.state.allowArray||n(a),o.type+=s,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||n(a),o.type+=s,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=s,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=s,delete o.state.allowArray):o.state.readArray?o.type+=s:n(a)}}if(o.parent)throw new Error("unexpected eof");return delete i.state,e&&"indexed"===o.name&&(o.indexed=!0,o.name=""),i.type=b(i.type),i}function _(t){return ot(r.defaultCoerceFunc,t).type}function k(t,e,r,n,i){this.coerceFunc=t,this.name=e,this.type=r,this.localName=n,this.dynamic=i}r.parseParamType=function(t){return w(t,!0)},r.formatParamType=_,r.formatSignature=function(t){return t.name+"("+t.inputs.map(_).join(",")+")"},r.parseSignature=function(t){if("string"==typeof t)return"event "===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).substring(0,6)?function(t){var e={anonymous:!1,inputs:[],name:"",type:"event"},r=t.match(v);if(!r)throw new Error("invalid event: "+t);if(e.name=r[1].trim(),nt(r[2]).forEach((function(t){(t=w(t,!0)).indexed=!!t.indexed,e.inputs.push(t)})),r[3].split(" ").forEach((function(t){switch(t){case"anonymous":e.anonymous=!0;break;case"":break;default:u.info("unknown modifier: "+t)}})),e.name&&!e.name.match(g))throw new Error('invalid identifier: "'+e.name+'"');return e}(t.substring(6).trim()):function(t){var e={constant:!1,gas:null,inputs:[],name:"",outputs:[],payable:!1,stateMutability:null,type:"function"},r=t.split("@");if(1!==r.length){if(2<r.length)throw new Error("invalid signature");if(!r[1].match(/^[0-9]+$/))throw new Error("invalid signature gas");e.gas=l.bigNumberify(r[1]),t=r[0]}if(!(t=(r=t.split(" returns "))[0].match(v)))throw new Error("invalid signature");if(e.name=t[1].trim(),!e.name.match(g))throw new Error('invalid identifier: "'+t[1]+'"');if(nt(t[2]).forEach((function(t){e.inputs.push(w(t))})),t[3].split(" ").forEach((function(t){switch(t){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:u.info("unknown modifier: "+t)}})),1<r.length){if(""!=(r=r[1].match(v))[1].trim()||""!=r[3].trim())throw new Error("unexpected tokens");nt(r[2]).forEach((function(t){e.outputs.push(w(t))}))}if("constructor"===e.name){if(e.type="constructor",e.outputs.length)throw new Error("constructor may not have outputs");delete e.name,delete e.outputs}return e}((t="function "===t.substring(0,9)?t.substring(9):t).trim());throw new Error("unknown signature")};var x,A=(i(I,x=k),I.prototype.encode=function(t){return this.coder.encode(t)},I.prototype.decode=function(t,e){return this.coder.decode(t,e)},I);function I(t){var e=x.call(this,t.coerceFunc,t.name,t.type,void 0,t.dynamic)||this;return d.defineReadOnly(e,"coder",t),e}var E,S=(i(M,E=k),M.prototype.encode=function(t){return h.arrayify([])},M.prototype.decode=function(t,e){if(e>t.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},M);function M(t,e){return E.call(this,t,"null","",e,!1)||this}var T,P=(i(C,T=k),C.prototype.encode=function(t){try{var e=l.bigNumberify(t);if(this.signed){var r=a.MaxUint256.maskn(8*this.size-1);if(e.gt(r))throw new Error("out-of-bounds");if(r=r.add(a.One).mul(a.NegativeOne),e.lt(r))throw new Error("out-of-bounds")}else if(e.lt(a.Zero)||e.gt(a.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds");return e=e.toTwos(8*this.size).maskn(8*this.size),this.signed&&(e=e.fromTwos(8*this.size).toTwos(256)),h.padZeros(h.arrayify(e),32)}catch(e){u.throwError("invalid number value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:t})}return null},C.prototype.decode=function(t,e){t.length<e+32&&u.throwError("insufficient data for "+this.name+" type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:h.hexlify(t.slice(e,e+32))});var r=32-this.size;return e=l.bigNumberify(t.slice(e+r,e+32)),e=this.signed?e.fromTwos(8*this.size):e.maskn(8*this.size),{consumed:32,value:this.coerceFunc(this.name,e)}},C);function C(t,e,r,n){var i=this,o=(r?"int":"uint")+8*e;return(i=T.call(this,t,o,o,n,!1)||this).size=e,i.signed=r,i}var O,R=new P((function(t,e){return e}),32,!1,"none"),j=(i(N,O=k),N.prototype.encode=function(t){return R.encode(t?1:0)},N.prototype.decode=function(t,e){try{var r=R.decode(t,e)}catch(t){throw"insufficient data for uint256 type"===t.reason&&u.throwError("insufficient data for boolean type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"boolean",value:t.value}),t}return{consumed:r.consumed,value:this.coerceFunc("bool",!r.value.isZero())}},N);function N(t,e){return O.call(this,t,"bool","bool",e,!1)||this}var L,U=(i(D,L=k),D.prototype.encode=function(t){var e=new Uint8Array(32);try{var r=h.arrayify(t);if(r.length!==this.length)throw new Error("incorrect data length");e.set(r)}catch(e){u.throwError("invalid "+this.name+" value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e.value||t})}return e},D.prototype.decode=function(t,e){return t.length<e+32&&u.throwError("insufficient data for "+this.name+" type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:h.hexlify(t.slice(e,e+32))}),{consumed:32,value:this.coerceFunc(this.name,h.hexlify(t.slice(e,e+this.length)))}},D);function D(t,e,r){var n=this,i="bytes"+e;return(n=L.call(this,t,i,i,r,!1)||this).length=e,n}var B,z,H,F=(i(q,B=k),q.prototype.encode=function(t){var e=new Uint8Array(32);try{e.set(h.arrayify(c.getAddress(t)),12)}catch(e){u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"address",value:t})}return e},q.prototype.decode=function(t,e){return t.length<e+32&&u.throwError("insufficient data for address type",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"address",value:h.hexlify(t.slice(e,e+32))}),{consumed:32,value:this.coerceFunc("address",c.getAddress(h.hexlify(t.slice(e+12,e+32))))}},q);function q(t,e){return B.call(this,t,"address","address",e,!1)||this}function G(t){var e=32*Math.ceil(t.length/32);return e=new Uint8Array(e-t.length),h.concat([R.encode(t.length),t,e])}function V(t,e,r){t.length<e+32&&u.throwError("insufficient data for dynamicBytes length",u.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:h.hexlify(t.slice(e,e+32))});var n=R.decode(t,e).value;try{n=n.toNumber()}catch(t){u.throwError("dynamic bytes count too large",u.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:n.toString()})}return t.length<e+32+n&&u.throwError("insufficient data for dynamicBytes type",u.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:h.hexlify(t.slice(e,e+32+n))}),{consumed:32+32*Math.ceil(n/32),value:t.slice(e+32,e+32+n)}}function K(t,e){return z.call(this,t,"bytes","bytes",e,!0)||this}function Z(t,e){return H.call(this,t,"string","string",e,!0)||this}function W(t){return 32*Math.ceil(t/32)}function J(t,e){var r;Array.isArray(e)||(e&&"object"==s(e)?(r=[],t.forEach((function(t){r.push(e[t.localName])})),e=r):u.throwError("invalid tuple value",u.INVALID_ARGUMENT,{coderType:"tuple",value:e})),t.length!==e.length&&u.throwError("types/value length mismatch",u.INVALID_ARGUMENT,{coderType:"tuple",value:e});var n=[];t.forEach((function(t,r){n.push({dynamic:t.dynamic,value:t.encode(e[r])})}));var i=0,o=0;n.forEach((function(t){t.dynamic?(i+=32,o+=W(t.value.length)):i+=W(t.value.length)}));var a=0,c=i,l=new Uint8Array(i+o);return n.forEach((function(t){t.dynamic?(l.set(R.encode(c),a),a+=32,l.set(t.value,c),c+=W(t.value.length)):(l.set(t.value,a),a+=W(t.value.length))})),l}function Q(t,e,r){var n=r,i=0,o=[];return t.forEach((function(t){var a,s;t.dynamic?(a=R.decode(e,r),(s=t.decode(e,n+a.value.toNumber())).consumed=a.consumed):s=t.decode(e,r),null!=s.value&&o.push(s.value),r+=s.consumed,i+=s.consumed})),t.forEach((function(t,e){(t=t.localName)&&null==o[t="length"===t?"_length":t]&&(o[t]=o[e])})),{value:o,consumed:i}}i(K,z=k),K.prototype.encode=function(t){try{return G(h.arrayify(t))}catch(t){u.throwError("invalid bytes value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"bytes",value:t.value})}return null},K.prototype.decode=function(t,e){return(e=V(t,e,this.localName)).value=this.coerceFunc("bytes",h.hexlify(e.value)),e},o=K,i(Z,H=k),Z.prototype.encode=function(t){return"string"!=typeof t&&u.throwError("invalid string value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"string",value:t}),G(f.toUtf8Bytes(t))},Z.prototype.decode=function(t,e){return(e=V(t,e,this.localName)).value=this.coerceFunc("string",f.toUtf8String(e.value)),e},t=Z;var Y,$=(i(X,Y=k),X.prototype.encode=function(t){Array.isArray(t)||u.throwError("expected array value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:t});var e=this.length,r=new Uint8Array(0);-1===e&&(e=t.length,r=R.encode(e)),u.checkArgumentCount(e,t.length," in coder array"+(this.localName?" "+this.localName:""));for(var n=[],i=0;i<t.length;i++)n.push(this.coder);return h.concat([r,J(n,t)])},X.prototype.decode=function(t,e){var r=0,n=this.length;if(-1===n){try{var i=R.decode(t,e)}catch(t){u.throwError("insufficient data for dynamic array length",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:t.value})}try{n=i.value.toNumber()}catch(t){u.throwError("array count too large",u.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:i.value.toString()})}r+=i.consumed,e+=i.consumed}for(var o=[],a=0;a<n;a++)o.push(new A(this.coder));return(e=Q(o,t,e)).consumed+=r,e.value=this.coerceFunc(this.type,e.value),e},X);function X(t,e,r,n){var i=this,o=e.type+"["+(0<=r?r:"")+"]",a=-1===r||e.dynamic;return(i=Y.call(this,t,"array",o,n,a)||this).coder=e,i.length=r,i}var tt,et=(i(rt,tt=k),rt.prototype.encode=function(t){return J(this.coders,t)},rt.prototype.decode=function(t,e){return(e=Q(this.coders,t,e)).value=this.coerceFunc(this.type,e.value),e},rt);function rt(t,e,r){var n=this,i=!1,o=[];e.forEach((function(t){t.dynamic&&(i=!0),o.push(t.type)}));var a="tuple("+o.join(",")+")";return(n=tt.call(this,t,"tuple",a,r,i)||this).coders=e,n}function nt(t){t=t.trim();for(var e=[],r="",n=0,i=0;i<t.length;i++){var o=t[i];if(","===o&&0===n)e.push(r),r="";else if(r+=o,"("===o)n++;else if(")"===o&&-1==--n)throw new Error("unbalanced parenthsis")}return r&&e.push(r),e}var it={address:F,bool:j,string:t,bytes:o};function ot(t,e){var r,n,i;if(i=it[e.type])return new i(t,e.name);if(i=e.type.match(y))return(0===(o=parseInt(i[2]||"256"))||256<o||o%8!=0)&&u.throwError("invalid "+i[1]+" bit length",u.INVALID_ARGUMENT,{arg:"param",value:e}),new P(t,o/8,"int"===i[1],e.name);if(i=e.type.match(p))return(0===(o=parseInt(i[1]))||32<o)&&u.throwError("invalid bytes length",u.INVALID_ARGUMENT,{arg:"param",value:e}),new U(t,o,e.name);if(i=e.type.match(m)){var o=parseInt(i[2]||"-1");return(e=d.shallowCopy(e)).type=i[1],e=d.deepCopy(e),new $(t,ot(t,e),o,e.name)}return"tuple"===e.type.substring(0,5)?(r=t,i=e.components,o=e.name,n=[],(i=i||[]).forEach((function(t){n.push(ot(r,t))})),new et(r,n,o)):""===e.type?new S(t,e.name):(u.throwError("invalid type",u.INVALID_ARGUMENT,{arg:"type",value:e.type}),null)}function at(t){u.checkNew(this,at),t=t||r.defaultCoerceFunc,d.defineReadOnly(this,"coerceFunc",t)}at.prototype.encode=function(t,e){t.length!==e.length&&u.throwError("types/values length mismatch",u.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});var r=[];return t.forEach((function(t){var e="string"==typeof t?w(t):t;r.push(ot(this.coerceFunc,e))}),this),h.hexlify(new et(this.coerceFunc,r,"_").encode(e))},at.prototype.decode=function(t,e){var r=[];return t.forEach((function(t){var e="string"==typeof t?w(t):d.deepCopy(t);r.push(ot(this.coerceFunc,e))}),this),new et(this.coerceFunc,r,"_").decode(h.arrayify(e),0).value},o=at,r.AbiCoder=o,r.defaultAbiCoder=new o},{"../constants":3,"../errors":5,"./address":60,"./bignumber":63,"./bytes":64,"./properties":74,"./utf8":85}],60:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("bn.js")),o=t("./bytes"),a=t("./keccak256"),s=t("./rlp"),u=t("../errors");function c(t){"string"==typeof t&&t.match(/^0x[0-9A-Fa-f]{40}$/)||u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:t});for(var e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=e[n].charCodeAt(0);r=o.arrayify(a.keccak256(r));for(var i=0;i<40;i+=2)8<=r[i>>1]>>4&&(e[i]=e[i].toUpperCase()),8<=(15&r[i>>1])&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}for(var l={},h=0;h<10;h++)l[String(h)]=String(h);for(h=0;h<26;h++)l[String.fromCharCode(65+h)]=String(10+h);var f,d=Math.floor((f=9007199254740991,Math.log10?Math.log10(f):Math.log(f)/Math.LN10));function p(t){t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00";var e="";for(t.split("").forEach((function(t){e+=l[t]}));e.length>=d;){var r=e.substring(0,d);e=parseInt(r,10)%97+e.substring(r.length)}for(var n=String(98-parseInt(e,10)%97);n.length<2;)n="0"+n;return n}function y(t){var e=null;if("string"!=typeof t&&u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:t}),t.match(/^(0x)?[0-9a-fA-F]{40}$/))e=c(t="0x"!==t.substring(0,2)?"0x"+t:t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&u.throwError("bad address checksum",u.INVALID_ARGUMENT,{arg:"address",value:t});else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==p(t)&&u.throwError("bad icap checksum",u.INVALID_ARGUMENT,{arg:"address",value:t}),e=new i.default.BN(t.substring(4),36).toString(16);e.length<40;)e="0"+e;e=c("0x"+e)}else u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:t});return e}r.getAddress=y,r.getIcapAddress=function(t){for(var e=new i.default.BN(y(t).substring(2),16).toString(36).toUpperCase();e.length<30;)e="0"+e;return"XE"+p("XE00"+e)+e},r.getContractAddress=function(t){if(!t.from)throw new Error("missing from address");var e=t.nonce;return y("0x"+a.keccak256(s.encode([y(t.from),o.stripZeros(o.hexlify(e))])).substring(26))},r.getCreate2Address=function(t){var e=t.initCodeHash;t.initCode&&(e?a.keccak256(t.initCode)!==e&&u.throwError("initCode/initCodeHash mismatch",u.INVALID_ARGUMENT,{arg:"options",value:t}):e=a.keccak256(t.initCode)),e||u.throwError("missing initCode or initCodeHash",u.INVALID_ARGUMENT,{arg:"options",value:t});var r=y(t.from),n=o.arrayify(t.salt);return 32!==n.length&&u.throwError("invalid salt",u.INVALID_ARGUMENT,{arg:"options",value:t}),y("0x"+a.keccak256(o.concat(["0xff",r,n,e])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../utils/bytes");e.exports={decode:function(t){t=atob(t);for(var e=[],r=0;r<t.length;r++)e.push(t.charCodeAt(r));return n.arrayify(e)},encode:function(t){t=n.arrayify(t);for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}}},{"../utils/bytes":64}],62:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./bytes"),i=t("./properties"),o=(a.prototype.encode=function(t){var e=n.arrayify(t);if(0===e.length)return"";for(var r=[0],i=0;i<e.length;++i){for(var o=e[i],a=0;a<r.length;++a)o+=r[a]<<8,r[a]=o%this.base,o=o/this.base|0;for(;0<o;)r.push(o%this.base),o=o/this.base|0}for(var s="",u=0;0===e[u]&&u<e.length-1;++u)s+=this._leader;for(var c=r.length-1;0<=c;--c)s+=this.alphabet[r[c]];return s},a.prototype.decode=function(t){if("string"!=typeof t)throw new TypeError("Expected String");var e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(var r=0;r<t.length;r++){var i=this._alphabetMap[t[r]];if(void 0===i)throw new Error("Non-base"+this.base+" character");for(var o=i,a=0;a<e.length;++a)o+=e[a]*this.base,e[a]=255&o,o>>=8;for(;0<o;)e.push(255&o),o>>=8}for(var s=0;t[s]===this._leader&&s<t.length-1;++s)e.push(0);return n.arrayify(new Uint8Array(e.reverse()))},a);function a(t){i.defineReadOnly(this,"alphabet",t),i.defineReadOnly(this,"base",t.length),i.defineReadOnly(this,"_alphabetMap",{}),i.defineReadOnly(this,"_leader",t.charAt(0));for(var e=0;e<t.length;e++)this._alphabetMap[t.charAt(e)]=e}t=new(r.BaseX=o)("abcdefghijklmnopqrstuvwxyz234567"),r.Base32=t,o=new o("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),r.Base58=o},{"./bytes":64,"./properties":74}],63:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t("bn.js")),a=t("./bytes"),s=t("./properties"),u=i(t("../errors")),c=new o.default.BN(-1);function l(t){return"-"===(t=t.toString(16))[0]?t.length%2==0?"-0x0"+t.substring(1):"-0x"+t.substring(1):t.length%2==1?"0x0"+t:"0x"+t}function h(t){return d(m(t))}function f(t){return new p(l(t))}function d(t){return"-"===(t=t._hex)[0]?new o.default.BN(t.substring(3),16).mul(c):new o.default.BN(t.substring(2),16)}var p=(y.prototype.fromTwos=function(t){return f(d(this).fromTwos(t))},y.prototype.toTwos=function(t){return f(d(this).toTwos(t))},y.prototype.abs=function(){return"-"===this._hex[0]?f(d(this).mul(c)):this},y.prototype.add=function(t){return f(d(this).add(h(t)))},y.prototype.sub=function(t){return f(d(this).sub(h(t)))},y.prototype.div=function(t){return m(t).isZero()&&u.throwError("division by zero",u.NUMERIC_FAULT,{operation:"divide",fault:"division by zero"}),f(d(this).div(h(t)))},y.prototype.mul=function(t){return f(d(this).mul(h(t)))},y.prototype.mod=function(t){return f(d(this).mod(h(t)))},y.prototype.pow=function(t){return f(d(this).pow(h(t)))},y.prototype.maskn=function(t){return f(d(this).maskn(t))},y.prototype.eq=function(t){return d(this).eq(h(t))},y.prototype.lt=function(t){return d(this).lt(h(t))},y.prototype.lte=function(t){return d(this).lte(h(t))},y.prototype.gt=function(t){return d(this).gt(h(t))},y.prototype.gte=function(t){return d(this).gte(h(t))},y.prototype.isZero=function(){return d(this).isZero()},y.prototype.toNumber=function(){try{return d(this).toNumber()}catch(t){u.throwError("overflow",u.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:t.message})}return null},y.prototype.toString=function(){return d(this).toString(10)},y.prototype.toHexString=function(){return this._hex},y.isBigNumber=function(t){return s.isType(t,"BigNumber")},y);function y(t){if(u.checkNew(this,y),s.setType(this,"BigNumber"),"string"==typeof t)a.isHexString(t)?s.defineReadOnly(this,"_hex",t="0x"==t?"0x0":t):"-"===t[0]&&a.isHexString(t.substring(1))?s.defineReadOnly(this,"_hex",t):t.match(/^-?[0-9]*$/)?s.defineReadOnly(this,"_hex",l(new o.default.BN(t=""==t?"0":t))):u.throwError("invalid BigNumber string value",u.INVALID_ARGUMENT,{arg:"value",value:t});else if("number"==typeof t){parseInt(String(t))!==t&&u.throwError("underflow",u.NUMERIC_FAULT,{operation:"setValue",fault:"underflow",value:t,outputValue:parseInt(String(t))});try{s.defineReadOnly(this,"_hex",l(new o.default.BN(t)))}catch(t){u.throwError("overflow",u.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:t.message})}}else t instanceof y?s.defineReadOnly(this,"_hex",t._hex):t.toHexString?s.defineReadOnly(this,"_hex",l(h(t.toHexString()))):t._hex&&a.isHexString(t._hex)?s.defineReadOnly(this,"_hex",t._hex):a.isArrayish(t)?s.defineReadOnly(this,"_hex",l(new o.default.BN(a.hexlify(t).substring(2),16))):u.throwError("invalid BigNumber value",u.INVALID_ARGUMENT,{arg:"value",value:t})}function m(t){return p.isBigNumber(t)?t:new p(t)}r.BigNumber=p,r.bigNumberify=m},{"../errors":5,"./bytes":64,"./properties":74,"bn.js":9}],64:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors"));function o(t){return!!t.toHexString}function a(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return a(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function u(t){if(!t||parseInt(String(t.length))!=t.length||"string"==typeof t)return!1;for(var e=0;e<t.length;e++){var r=t[e];if(r<0||256<=r||parseInt(String(r))!=r)return!1}return!0}function c(t){if(null==t&&i.throwError("cannot convert null value to array",i.INVALID_ARGUMENT,{arg:"value",value:t}),"string"!=typeof(t=o(t)?t.toHexString():t))return u(t)?a(new Uint8Array(t)):(i.throwError("invalid arrayify value",null,{arg:"value",value:t,type:s(t)}),null);var e=t.match(/^(0x)?[0-9a-fA-F]*$/);e||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:t}),"0x"!==e[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:t}),(t=t.substring(2)).length%2&&(t="0"+t);for(var r=[],n=0;n<t.length;n+=2)r.push(parseInt(t.substr(n,2),16));return a(new Uint8Array(r))}function l(t){for(var e=[],r=0,n=0;n<t.length;n++){var i=c(t[n]);e.push(i),r+=i.length}var o=new Uint8Array(r),s=0;for(n=0;n<e.length;n++)o.set(e[n],s),s+=e[n].length;return a(o)}function h(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}r.isHexable=o,r.isArrayish=u,r.arrayify=c,r.concat=l,r.stripZeros=function(t){var e=c(t);if(0===e.length)return e;for(var r=0;0===e[r];)r++;return r?e.slice(r):e},r.padZeros=function(t,e){if(e<(t=c(t)).length)throw new Error("cannot pad");var r=new Uint8Array(e);return r.set(t,e-t.length),a(r)},r.isHexString=h;var f="0123456789abcdef";function d(t){if(o(t))return t.toHexString();if("number"==typeof t){t<0&&i.throwError("cannot hexlify negative value",i.INVALID_ARGUMENT,{arg:"value",value:t}),9007199254740991<=t&&i.throwError("out-of-range",i.NUMERIC_FAULT,{operartion:"hexlify",fault:"out-of-safe-range"});for(var e="";t;)e=f[15&t]+e,t=Math.floor(t/16);return e.length?"0x"+(e=e.length%2?"0"+e:e):"0x00"}if("string"==typeof t){var r=t.match(/^(0x)?[0-9a-fA-F]*$/);return r||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:t}),"0x"!==r[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:t}),t.length%2?"0x0"+t.substring(2):t}if(u(t)){for(var n=[],a=0;a<t.length;a++){var s=t[a];n.push(f[(240&s)>>4]+f[15&s])}return"0x"+n.join("")}return i.throwError("invalid hexlify value",null,{arg:"value",value:t}),"never"}function p(t,e){for(h(t)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:t});t.length<2*e+2;)t="0x0"+t.substring(2);return t}function y(t){var e=0,r="0x",n="0x";if((o=t)&&null!=o.r&&null!=o.s){null==t.v&&null==t.recoveryParam&&i.throwError("at least on of recoveryParam or v must be specified",i.INVALID_ARGUMENT,{argument:"signature",value:t}),r=p(t.r,32),n=p(t.s,32),"string"==typeof(e=t.v)&&(e=parseInt(e,16));var o=t.recoveryParam;e=27+(o=null==o&&null!=t.v?1-e%2:o)}else{if(65!==(t=c(t)).length)throw new Error("invalid signature");r=d(t.slice(0,32)),n=d(t.slice(32,64)),27!==(e=t[64])&&28!==e&&(e=27+e%2)}return{r:r,s:n,recoveryParam:e-27,v:e}}r.hexlify=d,r.hexDataLength=function(t){return h(t)&&t.length%2==0?(t.length-2)/2:null},r.hexDataSlice=function(t,e,r){return h(t)||i.throwError("invalid hex data",i.INVALID_ARGUMENT,{arg:"value",value:t}),t.length%2!=0&&i.throwError("hex data length must be even",i.INVALID_ARGUMENT,{arg:"value",value:t}),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)},r.hexStripZeros=function(t){for(h(t)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:t});3<t.length&&"0x0"===t.substring(0,3);)t="0x"+t.substring(3);return t},r.hexZeroPad=p,r.splitSignature=y,r.joinSignature=function(t){return d(l([(t=y(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},{"../errors":5}],65:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors")),o=t("./bytes"),a=t("./utf8"),s=t("./keccak256"),u=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),c=new RegExp("^((.*)\\.)?([^.]+)$"),l=new RegExp("^[a-z0-9.-]*$");r.namehash=function(t){"string"!=typeof t&&i.throwError("invalid address - "+String(t),i.INVALID_ARGUMENT,{argument:"name",value:t}),(t=t.toLowerCase()).match(l)||i.throwError("contains invalid UseSTD3ASCIIRules characters",i.INVALID_ARGUMENT,{argument:"name",value:t});for(var e=u;t.length;){var r=t.match(c),n=a.toUtf8Bytes(r[3]);e=s.keccak256(o.concat([e,s.keccak256(n)])),t=r[2]||""}return o.hexlify(e)},r.id=function(t){return s.keccak256(a.toUtf8Bytes(t))},r.hashMessage=function(t){return s.keccak256(o.concat([a.toUtf8Bytes("Ethereum Signed Message:\n"),a.toUtf8Bytes(String(t.length)),"string"==typeof t?a.toUtf8Bytes(t):t]))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./utf8":85}],66:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors")),o=t("../wordlists/lang-en"),a=t("./basex"),s=t("./bytes"),u=t("./bignumber"),c=t("./utf8"),l=t("./pbkdf2"),h=t("./hmac"),f=t("./properties"),d=t("./secp256k1"),p=t("./sha2"),y=u.bigNumberify("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),m=c.toUtf8Bytes("Bitcoin seed"),v=2147483648;function g(t){return(1<<t)-1<<8-t}function b(t){return s.hexZeroPad(s.hexlify(t),32)}function w(t){var e=s.hexDataSlice(p.sha256(p.sha256(t)),0,4);return a.Base58.encode(s.concat([t,e]))}var _={};r.defaultPath="m/44'/60'/0'/0/0";var k=(Object.defineProperty(x.prototype,"extendedKey",{get:function(){if(256<=this.depth)throw new Error("Depth too large!");return w(s.concat([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",s.hexlify(this.depth),this.parentFingerprint,s.hexZeroPad(s.hexlify(this.index),4),this.chainCode,null!=this.privateKey?s.concat(["0x00",this.privateKey]):this.publicKey]))},enumerable:!0,configurable:!0}),x.prototype.neuter=function(){return new x(_,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,null,this.path)},x.prototype._derive=function(t){if(4294967295<t)throw new Error("invalid index - "+String(t));var e=this.path;e&&(e+="/"+(t&~v));var r=new Uint8Array(37);if(t&v){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(s.arrayify(this.privateKey),1),e&&(e+="'")}else r.set(s.arrayify(this.publicKey));for(var n=24;0<=n;n-=8)r[33+(n>>3)]=t>>24-n&255;var i=(c=h.computeHmac(h.SupportedAlgorithms.sha512,this.chainCode,r)).slice(0,32),o=c.slice(32),a=null,c=null;return this.privateKey?a=b(u.bigNumberify(i).add(this.privateKey).mod(y)):c=new d.KeyPair(s.hexlify(i))._addPoint(this.publicKey),new x(_,a,c,this.fingerprint,b(o),t,this.depth+1,this.mnemonic,e)},x.prototype.derivePath=function(t){var e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();for(var r=this,n=0;n<e.length;n++){var i=e[n];if(i.match(/^[0-9]+'$/)){var o=parseInt(i.substring(0,i.length-1));if(v<=o)throw new Error("invalid path index - "+i);r=r._derive(v+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);if(o=parseInt(i),v<=o)throw new Error("invalid path index - "+i);r=r._derive(o)}}return r},x.isHDNode=function(t){return f.isType(t,"HDNode")},x);function x(t,e,r,n,o,a,u,c,l){if(i.checkNew(this,x),t!==_)throw new Error("HDNode constructor cannot be called directly");e?(e=new d.KeyPair(e),f.defineReadOnly(this,"privateKey",e.privateKey),f.defineReadOnly(this,"publicKey",e.compressedPublicKey)):(f.defineReadOnly(this,"privateKey",null),f.defineReadOnly(this,"publicKey",s.hexlify(r))),f.defineReadOnly(this,"parentFingerprint",n),f.defineReadOnly(this,"fingerprint",s.hexDataSlice(p.ripemd160(p.sha256(this.publicKey)),0,4)),f.defineReadOnly(this,"address",d.computeAddress(this.publicKey)),f.defineReadOnly(this,"chainCode",o),f.defineReadOnly(this,"index",a),f.defineReadOnly(this,"depth",u),f.defineReadOnly(this,"mnemonic",c),f.defineReadOnly(this,"path",l),f.setType(this,"HDNode")}function A(t,e){if((t=s.arrayify(t)).length<16||64<t.length)throw new Error("invalid seed");return t=s.arrayify(h.computeHmac(h.SupportedAlgorithms.sha512,m,t)),new k(_,b(t.slice(0,32)),null,"0x00000000",b(t.slice(32)),0,0,e,"m")}function I(t,e){return e=c.toUtf8Bytes("mnemonic"+(e=e||""),c.UnicodeNormalizationForm.NFKD),s.hexlify(l.pbkdf2(c.toUtf8Bytes(t,c.UnicodeNormalizationForm.NFKD),e,2048,64,"sha512"))}function E(t,e){e=e||o.langEn,i.checkNormalize();var r=e.split(t);if(r.length%3!=0)throw new Error("invalid mnemonic");for(var n=s.arrayify(new Uint8Array(Math.ceil(11*r.length/8))),a=0,u=0;u<r.length;u++){var c=e.getWordIndex(r[u].normalize("NFKD"));if(-1===c)throw new Error("invalid mnemonic");for(var l=0;l<11;l++)c&1<<10-l&&(n[a>>3]|=1<<7-a%8),a++}var h=32*r.length/3,f=g(r.length/3);if(t=s.arrayify(p.sha256(n.slice(0,h/8)))[0],(t&=f)!=(n[n.length-1]&f))throw new Error("invalid checksum");return s.hexlify(n.slice(0,h/8))}function S(t,e){if((t=s.arrayify(t)).length%4!=0||t.length<16||32<t.length)throw new Error("invalid entropy");for(var r=[0],n=11,i=0;i<t.length;i++)8<n?(r[r.length-1]<<=8,r[r.length-1]|=t[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[i]>>8-n,r.push(t[i]&(1<<8-n)-1),n+=3);var a=s.arrayify(p.sha256(t))[0],u=t.length/4;return a&=g(u),r[r.length-1]<<=u,r[r.length-1]|=a>>8-u,(e=e||o.langEn).join(r.map((function(t){return e.getWord(t)})))}r.HDNode=k,r.fromExtendedKey=function(t){var e=a.Base58.decode(t);82===e.length&&w(e.slice(0,78))===t||i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"});var r=e[4],n=s.hexlify(e.slice(5,9)),o=parseInt(s.hexlify(e.slice(9,13)).substring(2),16),u=s.hexlify(e.slice(13,45)),c=e.slice(45,78);switch(s.hexlify(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new k(_,null,s.hexlify(c),n,u,o,r,null,null);case"0x0488ade4":case"0x04358394":if(0!==c[0])break;return new k(_,s.hexlify(c.slice(1)),null,n,u,o,r,null,null)}return i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},r.fromMnemonic=function(t,e,r){return A(I(t=S(E(t,e),e),r),t)},r.fromSeed=function(t){return A(t,null)},r.mnemonicToSeed=I,r.mnemonicToEntropy=E,r.entropyToMnemonic=S,r.isValidMnemonic=function(t,e){try{return E(t,e),!0}catch(t){}return!1}},{"../errors":5,"../wordlists/lang-en":90,"./basex":62,"./bignumber":63,"./bytes":64,"./hmac":67,"./pbkdf2":73,"./properties":74,"./secp256k1":77,"./sha2":79,"./utf8":85}],67:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i,o=n(t("hash.js")),a=t("../utils/bytes"),s=n(t("../errors"));(t=i=r.SupportedAlgorithms||(r.SupportedAlgorithms={})).sha256="sha256",t.sha512="sha512",r.computeHmac=function(t,e,r){return i[t]||s.throwError("unsupported algorithm "+t,s.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),a.arrayify(o.hmac(o[t],a.arrayify(e)).update(a.arrayify(r)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./abi-coder");r.AbiCoder=i.AbiCoder,r.defaultAbiCoder=i.defaultAbiCoder,r.formatSignature=i.formatSignature,r.formatParamType=i.formatParamType,r.parseSignature=i.parseSignature,r.parseParamType=i.parseParamType,i=t("./address"),r.getAddress=i.getAddress,r.getContractAddress=i.getContractAddress,r.getCreate2Address=i.getCreate2Address,r.getIcapAddress=i.getIcapAddress,i=n(t("./base64")),r.base64=i,i=t("./bignumber"),r.BigNumber=i.BigNumber,r.bigNumberify=i.bigNumberify,i=t("./bytes"),r.arrayify=i.arrayify,r.concat=i.concat,r.hexDataSlice=i.hexDataSlice,r.hexDataLength=i.hexDataLength,r.hexlify=i.hexlify,r.hexStripZeros=i.hexStripZeros,r.hexZeroPad=i.hexZeroPad,r.isHexString=i.isHexString,r.joinSignature=i.joinSignature,r.padZeros=i.padZeros,r.splitSignature=i.splitSignature,r.stripZeros=i.stripZeros,i=t("./hash"),r.hashMessage=i.hashMessage,r.id=i.id,r.namehash=i.namehash,i=n(t("./hdnode")),r.HDNode=i,i=t("./interface"),r.Interface=i.Interface,i=t("./json-wallet"),r.getJsonWalletAddress=i.getJsonWalletAddress,i=t("./keccak256"),r.keccak256=i.keccak256,i=t("./sha2"),r.sha256=i.sha256,i=t("./solidity"),r.solidityKeccak256=i.keccak256,r.solidityPack=i.pack,r.soliditySha256=i.sha256,i=t("./random-bytes"),r.randomBytes=i.randomBytes,i=t("./networks"),r.getNetwork=i.getNetwork,i=t("./properties"),r.checkProperties=i.checkProperties,r.deepCopy=i.deepCopy,r.defineReadOnly=i.defineReadOnly,r.resolveProperties=i.resolveProperties,r.shallowCopy=i.shallowCopy,n=n(t("./rlp")),r.RLP=n,n=t("./secp256k1"),r.computeAddress=n.computeAddress,r.computePublicKey=n.computePublicKey,r.recoverAddress=n.recoverAddress,r.recoverPublicKey=n.recoverPublicKey,r.verifyMessage=n.verifyMessage,n=t("./signing-key"),r.SigningKey=n.SigningKey,n=t("./transaction"),r.populateTransaction=n.populateTransaction,n=t("./transaction"),r.parseTransaction=n.parse,r.serializeTransaction=n.serialize,n=t("./utf8"),r.formatBytes32String=n.formatBytes32String,r.parseBytes32String=n.parseBytes32String,r.toUtf8Bytes=n.toUtf8Bytes,r.toUtf8String=n.toUtf8String,n=t("./units"),r.commify=n.commify,r.formatEther=n.formatEther,r.parseEther=n.parseEther,r.formatUnits=n.formatUnits,r.parseUnits=n.parseUnits,n=t("./web"),r.fetchJson=n.fetchJson,r.poll=n.poll,n=t("./hmac"),r.SupportedAlgorithms=n.SupportedAlgorithms,n=t("./utf8"),r.UnicodeNormalizationForm=n.UnicodeNormalizationForm,t=t("./wordlist"),r.Wordlist=t.Wordlist},{"./abi-coder":59,"./address":60,"./base64":61,"./bignumber":63,"./bytes":64,"./hash":65,"./hdnode":66,"./hmac":67,"./interface":69,"./json-wallet":70,"./keccak256":71,"./networks":72,"./properties":74,"./random-bytes":75,"./rlp":76,"./secp256k1":77,"./sha2":79,"./signing-key":81,"./solidity":82,"./transaction":83,"./units":84,"./utf8":85,"./web":86,"./wordlist":87}],69:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a,s=t("./address"),u=t("./abi-coder"),c=t("./bignumber"),l=t("./bytes"),h=t("./hash"),f=t("./keccak256"),d=t("./properties"),p=o(t("../errors")),y=function(t){d.setType(this,"Indexed"),d.defineReadOnly(this,"hash",t)},m=(i(v,a=t=function(t){for(var e in d.setType(this,"Description"),t)d.defineReadOnly(this,e,d.deepCopy(t[e],!0));Object.freeze(this)}),v.prototype.encode=function(t,e){l.isHexString(t)||p.throwError("invalid contract bytecode",p.INVALID_ARGUMENT,{arg:"bytecode",value:t}),p.checkArgumentCount(e.length,this.inputs.length," in Interface constructor");try{return t+u.defaultAbiCoder.encode(this.inputs,e).substring(2)}catch(t){p.throwError("invalid constructor argument",p.INVALID_ARGUMENT,{arg:t.arg,reason:t.reason,value:t.value})}return null},v);function v(){return null!==a&&a.apply(this,arguments)||this}var g,b=(i(w,g=t),w.prototype.encode=function(t){p.checkArgumentCount(t.length,this.inputs.length," in interface function "+this.name);try{return this.sighash+u.defaultAbiCoder.encode(this.inputs,t).substring(2)}catch(t){p.throwError("invalid input argument",p.INVALID_ARGUMENT,{arg:t.arg,reason:t.reason,value:t.value})}return null},w.prototype.decode=function(t){try{return u.defaultAbiCoder.decode(this.outputs,l.arrayify(t))}catch(e){p.throwError("invalid data for function output",p.INVALID_ARGUMENT,{arg:"data",errorArg:e.arg,errorValue:e.value,value:t,reason:e.reason})}},w);function w(){return null!==g&&g.apply(this,arguments)||this}var _,k=(i(x,_=t),x);function x(){return null!==_&&_.apply(this,arguments)||this}var A,I=(i(E,A=t),E.prototype.encodeTopics=function(t){var e=this;t.length>this.inputs.length&&p.throwError("too many arguments for "+this.name,p.UNEXPECTED_ARGUMENT,{maxCount:t.length,expectedCount:this.inputs.length});var r=[];for(this.anonymous||r.push(this.topic),t.forEach((function(t,n){var i=e.inputs[n];i.indexed?null==t?r.push(null):"string"===i.type?r.push(h.id(t)):"bytes"===i.type?r.push(f.keccak256(t)):-1!==i.type.indexOf("[")||"tuple"===i.type.substring(0,5)?p.throwError("filtering with tuples or arrays not implemented yet; bug us on GitHub",p.NOT_IMPLEMENTED,{operation:"filter(array|tuple)"}):("address"===i.type&&s.getAddress(t),r.push(l.hexZeroPad(l.hexlify(t),32).toLowerCase())):null!=t&&p.throwError("cannot filter non-indexed parameters; must be null",p.INVALID_ARGUMENT,{argument:i.name||n,value:t})}));r.length&&null===r[r.length-1];)r.pop();return r},E.prototype.decode=function(t,e){null==e||this.anonymous||(e=e.slice(1));var r,n=[],i=[],o=[];this.inputs.forEach((function(t,e){t.indexed?"string"===t.type||"bytes"===t.type||0<=t.type.indexOf("[")||"tuple"===t.type.substring(0,5)?(n.push({type:"bytes32",name:t.name||""}),o.push(!0)):(n.push(t),o.push(!1)):(i.push(t),o.push(!1))})),null!=e&&(r=u.defaultAbiCoder.decode(n,l.concat(e)));var a=u.defaultAbiCoder.decode(i,l.arrayify(t)),s={},c=0,h=0;return this.inputs.forEach((function(t,n){t.indexed?null==e?s[n]=new y(null):o[n]?s[n]=new y(r[h++]):s[n]=r[h++]:s[n]=a[c++],t.name&&(s[t.name]=s[n])})),s.length=this.inputs.length,new k(s)},E);function E(){return null!==A&&A.apply(this,arguments)||this}var S,M=(i(T,S=t),T);function T(){return null!==S&&S.apply(this,arguments)||this}var P,C=(i(O,P=t),O);function O(){return null!==P&&P.apply(this,arguments)||this}function R(t){switch(t.type){case"constructor":var e=new m({inputs:t.inputs,payable:null==t.payable||!!t.payable});this.deployFunction||(this.deployFunction=e);break;case"function":var r=u.formatSignature(t).replace(/tuple/g,""),n=h.id(r).substring(0,10),i=!1;null!=t.constant?i=t.constant:null!=t.stateMutability&&(i="view"==t.stateMutability||"pure"==t.stateMutability),e=new b({inputs:t.inputs,outputs:t.outputs,gas:t.gas,payable:null==t.payable||!!t.payable,type:i?"call":"transaction",name:t.name,signature:r,sighash:n}),t.name&&(null==this.functions[t.name]?d.defineReadOnly(this.functions,t.name,e):p.warn("WARNING: Multiple definitions for "+t.name)),null==this.functions[e.signature]&&d.defineReadOnly(this.functions,e.signature,e);break;case"event":r=u.formatSignature(t).replace(/tuple/g,""),e=new I({name:t.name,signature:r,inputs:t.inputs,topic:h.id(r),anonymous:!!t.anonymous}),t.name&&null==this.events[t.name]&&d.defineReadOnly(this.events,t.name,e),null==this.events[e.signature]&&d.defineReadOnly(this.events,e.signature,e);break;case"receive":case"fallback":break;default:p.warn("WARNING: unsupported ABI type - "+t.type)}}function j(t){if(p.checkNew(this,j),"string"==typeof t){try{t=JSON.parse(t)}catch(e){p.throwError("could not parse ABI JSON",p.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:t})}if(!Array.isArray(t))return p.throwError("invalid abi",p.INVALID_ARGUMENT,{arg:"abi",value:t}),null}d.defineReadOnly(this,"functions",{}),d.defineReadOnly(this,"events",{});var e=[];t.forEach((function(t){"string"==typeof t&&(t=u.parseSignature(t)),e.push(t)})),d.defineReadOnly(this,"abi",d.deepCopy(e,!0)),e.forEach(R,this),this.deployFunction||R.call(this,{type:"constructor",inputs:[]}),d.setType(this,"Interface")}j.prototype.parseTransaction=function(t){var e,r=t.data.substring(0,10).toLowerCase();for(e in this.functions)if(-1!==e.indexOf("(")){var n=this.functions[e];if(n.sighash===r){var i=u.defaultAbiCoder.decode(n.inputs,"0x"+t.data.substring(10));return new M({args:i,decode:n.decode,name:n.name,signature:n.signature,sighash:n.sighash,value:c.bigNumberify(t.value||"0")})}}return null},j.prototype.parseLog=function(t){for(var e in this.events)if(-1!==e.indexOf("(")&&!(e=this.events[e]).anonymous&&e.topic===t.topics[0])return new C({decode:e.decode,name:e.name,signature:e.signature,topic:e.topic,values:e.decode(t.data,t.topics)});return null},j.isInterface=function(t){return d.isType(t,"Interface")},j.isIndexed=function(t){return d.isType(t,"Indexed")},t=j,r.Interface=t},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./address");function i(t){try{var e=JSON.parse(t)}catch(t){return!1}return e.encseed&&e.ethaddr}function o(t){try{var e=JSON.parse(t)}catch(t){return!1}return!(!e.version||parseInt(e.version)!==e.version||3!==parseInt(e.version))}r.isCrowdsaleWallet=i,r.isSecretStorageWallet=o,r.getJsonWalletAddress=function(t){if(i(t))try{return n.getAddress(JSON.parse(t).ethaddr)}catch(t){return null}if(o(t))try{return n.getAddress(JSON.parse(t).address)}catch(t){return null}return null}},{"./address":60}],71:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("js-sha3"),i=t("./bytes");r.keccak256=function(t){return"0x"+n.keccak_256(i.arrayify(t))}},{"./bytes":64,"js-sha3":40}],72:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors"));function o(t){return function(e){var r=[];return e.InfuraProvider&&r.push(new e.InfuraProvider(t)),e.EtherscanProvider&&r.push(new e.EtherscanProvider(t)),0===r.length?null:e.FallbackProvider?new e.FallbackProvider(r):r[0]}}function a(t,e){return function(r){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null}}var s={unspecified:{chainId:0,name:"unspecified"},homestead:n={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:o("homestead")},mainnet:n,morden:{chainId:2,name:"morden"},ropsten:t={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:o("ropsten")},testnet:t,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:o("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:o("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:o("kovan")},classic:{chainId:61,name:"classic",_defaultProvider:a("https://web3.gastracker.io","classic")},classicTestnet:{chainId:62,name:"classicTestnet",_defaultProvider:a("https://web3.gastracker.io/morden","classicTestnet")}};r.getNetwork=function(t){if(null==t)return null;if("number"==typeof t){for(var e in s)if((e=s[e]).chainId===t)return{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress||null,_defaultProvider:e._defaultProvider||null};return{chainId:t,name:"unknown"}}if("string"!=typeof t)return(r=s[t.name])?(0!==t.chainId&&t.chainId!==r.chainId&&i.throwError("network chainId mismatch",i.INVALID_ARGUMENT,{arg:"network",value:t}),{name:t.name,chainId:r.chainId,ensAddress:t.ensAddress||r.ensAddress||null,_defaultProvider:t._defaultProvider||r._defaultProvider||null}):("number"!=typeof t.chainId&&i.throwError("invalid network chainId",i.INVALID_ARGUMENT,{arg:"network",value:t}),t);var r=s[t];return null==r?null:{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress,_defaultProvider:r._defaultProvider||null}}},{"../errors":5}],73:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../utils/bytes"),i=t("./hmac");r.pbkdf2=function(t,e,r,o,a){var s;t=n.arrayify(t),e=n.arrayify(e);var u,c,l=1,h=new Uint8Array(o),f=new Uint8Array(e.length+4);f.set(e);for(var d=1;d<=l;d++){f[e.length]=d>>24&255,f[e.length+1]=d>>16&255,f[e.length+2]=d>>8&255,f[e.length+3]=255&d;var p=i.computeHmac(a,t,f);s||(s=p.length,c=new Uint8Array(s),u=o-((l=Math.ceil(o/s))-1)*s),c.set(p);for(var y=1;y<r;y++){p=i.computeHmac(a,t,p);for(var m=0;m<s;m++)c[m]^=p[m]}var v=(d-1)*s,g=d===l?u:s;h.set(n.arrayify(c).slice(0,g),v)}return n.arrayify(h)}},{"../utils/bytes":64,"./hmac":67}],74:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors"));function o(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function a(t,e){return t&&t._ethersType===e}r.defineReadOnly=o,r.setType=function(t,e){Object.defineProperty(t,"_ethersType",{configurable:!1,value:e,writable:!1})},r.isType=a,r.resolveProperties=function(t){var e={},r=[];return Object.keys(t).forEach((function(n){var i=t[n];i instanceof Promise?r.push(i.then((function(t){return e[n]=t,null}))):e[n]=i})),Promise.all(r).then((function(){return e}))},r.checkProperties=function(t,e){t&&"object"==s(t)||i.throwError("invalid object",i.INVALID_ARGUMENT,{argument:"object",value:t}),Object.keys(t).forEach((function(r){e[r]||i.throwError("invalid object key - "+r,i.INVALID_ARGUMENT,{argument:"transaction",value:t,key:r})}))},r.shallowCopy=function(t){var e,r={};for(e in t)r[e]=t[e];return r};var u={boolean:!0,number:!0,string:!0};r.deepCopy=function t(e,r){if(null==e||u[s(e)])return e;if(Array.isArray(e)){var n=e.map((function(e){return t(e,r)}));return r&&Object.freeze(n),n}if("object"==s(e)){if(a(e,"BigNumber"))return e;if(a(e,"Description"))return e;if(a(e,"Indexed"))return e;var i;for(i in n={},e){var c=e[i];void 0!==c&&o(n,i,t(c,r))}return r&&Object.freeze(n),n}if("function"==typeof e)return e;throw new Error("Cannot deepCopy "+s(e))},r.inheritable=function t(e){return function(r){var n,i;i=e,(n=r).super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(r,"inherits",t(r))}}},{"../errors":5}],75:[function(t,e,n){(function(e){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("../utils/bytes"),i=t("../utils/properties"),o=e.crypto||e.msCrypto;function a(t){if(t<=0||1024<t||parseInt(String(t))!=t)throw new Error("invalid length");return t=new Uint8Array(t),o.getRandomValues(t),r.arrayify(t)}o&&o.getRandomValues||(console.log("WARNING: Missing strong random number source; using weak randomBytes"),o={getRandomValues:function(t){for(var e=0;e<20;e++)for(var r=0;r<t.length;r++)e?t[r]^=Math.trunc(256*Math.random()):t[r]=Math.trunc(256*Math.random());return t},_weakCrypto:!0}),n.randomBytes=a,!0===o._weakCrypto&&i.defineReadOnly(a,"_weakCrypto",!0)}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/bytes":64,"../utils/properties":74}],76:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./bytes");function i(t){for(var e=[];t;)e.unshift(255&t),t>>=8;return e}function o(t,e,r){for(var n=0,i=0;i<r;i++)n=256*n+t[e+i];return n}function a(t,e,r,n){for(var i=[];r<e+1+n;){var o=s(t,r);if(i.push(o.result),e+1+n<(r+=o.consumed))throw new Error("invalid rlp")}return{consumed:1+n,result:i}}function s(t,e){if(0===t.length)throw new Error("invalid rlp data");if(248<=t[e]){if(e+1+(r=t[e]-247)>t.length)throw new Error("too short");if(e+1+r+(i=o(t,e+1,r))>t.length)throw new Error("to short");return a(t,e,e+1+r,r+i)}if(192<=t[e]){if(e+1+(i=t[e]-192)>t.length)throw new Error("invalid rlp data");return a(t,e,e+1,i)}if(184<=t[e]){var r;if(e+1+(r=t[e]-183)>t.length)throw new Error("invalid rlp data");if(e+1+r+(i=o(t,e+1,r))>t.length)throw new Error("invalid rlp data");return{consumed:1+r+i,result:n.hexlify(t.slice(e+1+r,e+1+r+i))}}if(128<=t[e]){var i;if(e+1+(i=t[e]-128)>t.length)throw new Error("invalid rlp data");return{consumed:1+i,result:n.hexlify(t.slice(e+1,e+1+i))}}return{consumed:1,result:n.hexlify(t[e])}}r.encode=function(t){return n.hexlify(function t(e){if(Array.isArray(e)){var r=[];return e.forEach((function(e){r=r.concat(t(e))})),r.length<=55?(r.unshift(192+r.length),r):((o=i(r.length)).unshift(247+o.length),o.concat(r))}var o;return 1===(e=Array.prototype.slice.call(n.arrayify(e))).length&&e[0]<=127?e:e.length<=55?(e.unshift(128+e.length),e):((o=i(e.length)).unshift(183+o.length),o.concat(e))}(t))},r.decode=function(t){var e=n.arrayify(t);if((t=s(e,0)).consumed!==e.length)throw new Error("invalid rlp data");return t.result}},{"./bytes":64}],77:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("elliptic"),o=t("./address"),a=t("./bytes"),s=t("./hash"),u=t("./keccak256"),c=t("./properties"),l=n(t("../errors")),h=null;function f(){return h=h||new i.ec("secp256k1")}var d=(p.prototype.sign=function(t){return{recoveryParam:(t=f().keyFromPrivate(a.arrayify(this.privateKey)).sign(a.arrayify(t),{canonical:!0})).recoveryParam,r:a.hexZeroPad("0x"+t.r.toString(16),32),s:a.hexZeroPad("0x"+t.s.toString(16),32),v:27+t.recoveryParam}},p.prototype.computeSharedSecret=function(t){var e=f().keyFromPrivate(a.arrayify(this.privateKey));return t=f().keyFromPublic(a.arrayify(y(t))),a.hexZeroPad("0x"+e.derive(t.getPublic()).toString(16),32)},p.prototype._addPoint=function(t){var e=f().keyFromPublic(a.arrayify(this.publicKey));return t=f().keyFromPublic(a.arrayify(t)),"0x"+e.pub.add(t.pub).encodeCompressed("hex")},p);function p(t){t=f().keyFromPrivate(a.arrayify(t)),c.defineReadOnly(this,"privateKey",a.hexlify(t.priv.toArray("be",32))),c.defineReadOnly(this,"publicKey","0x"+t.getPublic(!1,"hex")),c.defineReadOnly(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),c.defineReadOnly(this,"publicKeyBytes",t.getPublic().encode(null,!0))}function y(t,e){return 32!==(t=a.arrayify(t)).length?33===t.length?e?a.hexlify(t):"0x"+f().keyFromPublic(t).getPublic(!1,"hex"):65===t.length?e?"0x"+f().keyFromPublic(t).getPublic(!0,"hex"):a.hexlify(t):(l.throwError("invalid public or private key",l.INVALID_ARGUMENT,{arg:"key",value:"[REDACTED]"}),null):(t=new d(t),e?t.compressedPublicKey:t.publicKey)}function m(t){return t="0x"+y(t).slice(4),o.getAddress("0x"+u.keccak256(t).substring(26))}function v(t,e){var r=a.splitSignature(e);return e={r:a.arrayify(r.r),s:a.arrayify(r.s)},"0x"+f().recoverPubKey(a.arrayify(t),e,r.recoveryParam).encode("hex",!1)}function g(t,e){return m(v(a.arrayify(t),e))}r.KeyPair=d,r.computePublicKey=y,r.computeAddress=m,r.recoverPublicKey=v,r.recoverAddress=g,r.verifyMessage=function(t,e){return g(s.hashMessage(t),e)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t("aes-js")),a=n(t("scrypt-js")),s=n(t("uuid")),u=t("./signing-key"),c=i(t("./hdnode")),l=t("./address"),h=t("./bytes"),f=t("./pbkdf2"),d=t("./keccak256"),p=t("./utf8"),y=t("./random-bytes");function m(t){return"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),h.arrayify(t)}function v(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function g(t){return"string"==typeof t?p.toUtf8Bytes(t,p.UnicodeNormalizationForm.NFKC):h.arrayify(t)}function b(t,e){for(var r=t,n=e.toLowerCase().split("/"),i=0;i<n.length;i++){var o,a=null;for(o in r)if(o.toLowerCase()===n[i]){a=r[o];break}if(null===a)return null;r=a}return r}r.decryptCrowdsale=function(t,e){var r=JSON.parse(t);e=g(e);var n=l.getAddress(b(r,"ethaddr"));if(!(t=m(b(r,"encseed")))||t.length%16!=0)throw new Error("invalid encseed");r=f.pbkdf2(e,e,2e3,32,"sha256").slice(0,16),e=t.slice(0,16),t=t.slice(16),e=new o.default.ModeOfOperation.cbc(r,e);for(var i=h.arrayify(e.decrypt(t)),a=(i=o.default.padding.pkcs7.strip(i),""),s=0;s<i.length;s++)a+=String.fromCharCode(i[s]);if(t=p.toUtf8Bytes(a),(t=new u.SigningKey(d.keccak256(t))).address!==n)throw new Error("corrupt crowdsale wallet");return t},r.decrypt=function(t,e,r){function n(t,e){var r=m(b(i,"crypto/ciphertext"));if(h.hexlify((s=t.slice(16,32),d.keccak256(h.concat([s,r])))).substring(2)!==b(i,"crypto/mac").toLowerCase())return e(new Error("invalid password")),null;var n=function(t,e){if("aes-128-ctr"!==b(i,"crypto/cipher"))return null;var r=m(b(i,"crypto/cipherparams/iv"));return r=new o.default.Counter(r),r=new o.default.ModeOfOperation.ctr(t,r),h.arrayify(r.decrypt(e))}(t.slice(0,16),r),a=t.slice(32,64);if(!n)return e(new Error("unsupported cipher")),null;var s=new u.SigningKey(n);if(i.address&&s.address!==l.getAddress(i.address))return e(new Error("address mismatch")),null;if(r=b(i,"x-ethers/locale"),"0.1"===b(i,"x-ethers/version")&&(null==r||"en"===r)){if(t=m(b(i,"x-ethers/mnemonicCiphertext")),r=m(b(i,"x-ethers/mnemonicCounter")),r=new o.default.Counter(r),a=new o.default.ModeOfOperation.ctr(a,r),r=b(i,"x-ethers/path")||c.defaultPath,t=h.arrayify(a.decrypt(t)),t=c.entropyToMnemonic(t),(r=c.fromMnemonic(t).derivePath(r)).privateKey!=h.hexlify(n))return e(new Error("mnemonic mismatch")),null;s=new u.SigningKey(r)}return s}var i=JSON.parse(t),s=g(e);return new Promise((function(t,e){if((p=b(i,"crypto/kdf"))&&"string"==typeof p)if("scrypt"===p.toLowerCase()){var o=m(b(i,"crypto/kdfparams/salt")),u=parseInt(b(i,"crypto/kdfparams/n")),c=parseInt(b(i,"crypto/kdfparams/r")),l=parseInt(b(i,"crypto/kdfparams/p"));u&&c&&l?0==(u&u-1)?32===(d=parseInt(b(i,"crypto/kdfparams/dklen")))?(r&&r(0),a.default(s,o,u,c,l,64,(function(i,o,a){if(i)i.progress=o,e(i);else if(a)(a=n(a=h.arrayify(a),e))&&(r&&r(1),t(a));else if(r)return r(o)}))):e(new Error("unsupported key-derivation derived-key length")):e(new Error("unsupported key-derivation function parameter value for N")):e(new Error("unsupported key-derivation function parameters"))}else if("pbkdf2"===p.toLowerCase()){if(o=m(b(i,"crypto/kdfparams/salt")),l=null,"hmac-sha256"===(p=b(i,"crypto/kdfparams/prf")))l="sha256";else{if("hmac-sha512"!==p)return void e(new Error("unsupported prf"));l="sha512"}var d,p=parseInt(b(i,"crypto/kdfparams/c"));32===(d=parseInt(b(i,"crypto/kdfparams/dklen")))?(l=n(l=f.pbkdf2(s,o,p,d,l),e))&&t(l):e(new Error("unsupported key-derivation derived-key length"))}else e(new Error("unsupported key-derivation function"));else e(new Error("unsupported key-derivation function"))}))},r.encrypt=function(t,e,r,n){var i;if("function"!=typeof r||n||(n=r,r={}),r=r||{},32!==(i=u.SigningKey.isSigningKey(t)?h.arrayify(t.privateKey):h.arrayify(t)).length)throw new Error("invalid private key");var l=g(e),f=null;if(r.entropy&&(f=h.arrayify(r.entropy)),r.mnemonic)if(f){if(c.entropyToMnemonic(f)!==r.mnemonic)throw new Error("entropy and mnemonic mismatch")}else f=h.arrayify(c.mnemonicToEntropy(r.mnemonic,r.wordlist));var p=r.path;f&&!p&&(p=c.defaultPath);var m=(m=r.client)||"ethers.js",b=r.salt?h.arrayify(r.salt):y.randomBytes(32),w=null;if(r.iv){if(16!==(w=h.arrayify(r.iv)).length)throw new Error("invalid iv")}else w=y.randomBytes(16);var _=null;if(r.uuid){if(16!==(_=h.arrayify(r.uuid)).length)throw new Error("invalid uuid")}else _=y.randomBytes(16);var k=1<<17,x=8,A=1;return r.scrypt&&(r.scrypt.N&&(k=r.scrypt.N),r.scrypt.r&&(x=r.scrypt.r),r.scrypt.p&&(A=r.scrypt.p)),new Promise((function(t,e){n&&n(0),a.default(l,b,k,x,A,64,(function(a,c,l){if(a)a.progress=c,e(a);else if(l){var g=(l=h.arrayify(l)).slice(0,16),I=l.slice(16,32),E=l.slice(32,64);a=new u.SigningKey(i).address,l=new o.default.Counter(w),l=new o.default.ModeOfOperation.ctr(g,l),l=h.arrayify(l.encrypt(i)),I=d.keccak256(h.concat([I,l])),a={address:a.substring(2).toLowerCase(),id:s.default.v4({random:_}),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:h.hexlify(w).substring(2)},ciphertext:h.hexlify(l).substring(2),kdf:"scrypt",kdfparams:{salt:h.hexlify(b).substring(2),n:k,dklen:32,p:A,r:x},mac:I.substring(2)}},f&&(l=y.randomBytes(16),I=new o.default.Counter(l),E=new o.default.ModeOfOperation.ctr(E,I),I=h.arrayify(E.encrypt(f)),E=(E=new Date).getUTCFullYear()+"-"+v(E.getUTCMonth()+1,2)+"-"+v(E.getUTCDate(),2)+"T"+v(E.getUTCHours(),2)+"-"+v(E.getUTCMinutes(),2)+"-"+v(E.getUTCSeconds(),2)+".0Z",a["x-ethers"]={client:m,gethFilename:"UTC--"+E+"--"+a.address,mnemonicCounter:h.hexlify(l).substring(2),mnemonicCiphertext:h.hexlify(I).substring(2),path:p,version:"0.1"},r.wordlist&&"string"==typeof r.wordlist.locale&&(a["x-ethers"].locale=r.wordlist.locale)),n&&n(1),t(JSON.stringify(a))}else if(n)return n(c)}))}))}},{"./address":60,"./bytes":64,"./hdnode":66,"./keccak256":71,"./pbkdf2":73,"./random-bytes":75,"./signing-key":81,"./utf8":85,"aes-js":8,"scrypt-js":44,uuid:48}],79:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("hash.js")),o=t("./bytes");r.ripemd160=function(t){return"0x"+i.default.ripemd160().update(o.arrayify(t)).digest("hex")},r.sha256=function(t){return"0x"+i.default.sha256().update(o.arrayify(t)).digest("hex")},r.sha512=function(t){return"0x"+i.default.sha512().update(o.arrayify(t)).digest("hex")}},{"./bytes":64,"hash.js":26}],80:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),t("setimmediate"),r.platform="browser"},{setimmediate:45}],81:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./hdnode"),o=t("./bytes"),a=t("./properties"),u=t("./secp256k1"),c=n(t("../errors"));function l(t){c.checkNew(this,l);var e=i.HDNode.isHDNode(t)?(a.defineReadOnly(this,"mnemonic",t.mnemonic),a.defineReadOnly(this,"path",t.path),o.arrayify(t.privateKey)):("string"==typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t),o.arrayify(t));try{32!==e.length&&c.throwError("exactly 32 bytes required",c.INVALID_ARGUMENT,{arg:"privateKey",value:"[REDACTED]"})}catch(e){t={arg:"privateKey",reason:e.reason,value:"[REDACTED]"},e.value&&("number"==typeof e.value.length&&(t.length=e.value.length),t.type=s(e.value)),c.throwError("invalid private key",e.code,t)}a.defineReadOnly(this,"privateKey",o.hexlify(e)),a.defineReadOnly(this,"keyPair",new u.KeyPair(e)),a.defineReadOnly(this,"publicKey",this.keyPair.publicKey),a.defineReadOnly(this,"address",u.computeAddress(this.keyPair.publicKey)),a.setType(this,"SigningKey")}l.prototype.signDigest=function(t){return this.keyPair.sign(t)},l.prototype.computeSharedSecret=function(t){return this.keyPair.computeSharedSecret(o.arrayify(t))},l.isSigningKey=function(t){return a.isType(t,"SigningKey")},t=l,r.SigningKey=t},{"../errors":5,"./bytes":64,"./hdnode":66,"./properties":74,"./secp256k1":77}],82:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./bignumber"),i=t("./bytes"),o=t("./utf8"),a=t("./keccak256"),s=t("./sha2"),u=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),l=new RegExp("^(.*)\\[([0-9]*)\\]$");function h(t,e){if(t.length!=e.length)throw new Error("type/value count mismatch");var r=[];return t.forEach((function(t,a){r.push(function t(e,r,a){switch(e){case"address":return a?i.padZeros(r,32):i.arrayify(r);case"string":return o.toUtf8Bytes(r);case"bytes":return i.arrayify(r);case"bool":return r=r?"0x01":"0x00",a?i.padZeros(r,32):i.arrayify(r)}var s=e.match(c);if(s){if((h=parseInt(s[2]||"256"))%8!=0||0===h||256<h)throw new Error("invalid number type - "+e);return a&&(h=256),r=n.bigNumberify(r).toTwos(h),i.padZeros(r,h/8)}if(s=e.match(u)){var h=parseInt(s[1]);if(String(h)!=s[1]||0===h||32<h)throw new Error("invalid number type - "+e);if(i.arrayify(r).byteLength!==h)throw new Error("invalid value for "+e);return a?i.arrayify((r+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):r}if((s=e.match(l))&&Array.isArray(r)){var f=s[1];if(parseInt(s[2]||String(r.length))!=r.length)throw new Error("invalid value for "+e);var d=[];return r.forEach((function(e){d.push(t(f,e,!0))})),i.concat(d)}throw new Error("unknown type - "+e)}(t,e[a]))})),i.hexlify(i.concat(r))}r.pack=h,r.keccak256=function(t,e){return a.keccak256(h(t,e))},r.sha256=function(t,e){return s.sha256(h(t,e))}},{"./bignumber":63,"./bytes":64,"./keccak256":71,"./sha2":79,"./utf8":85}],83:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("../constants"),o=n(t("../errors")),a=t("./secp256k1"),s=t("./address"),u=t("./bignumber"),c=t("./bytes"),l=t("./keccak256"),h=t("./properties"),f=n(t("./rlp")),d=t("../providers/abstract-provider");function p(t){return"0x"===t?i.Zero:u.bigNumberify(t)}var y=[{name:"nonce",maxLength:32},{name:"gasPrice",maxLength:32},{name:"gasLimit",maxLength:32},{name:"to",length:20},{name:"value",maxLength:32},{name:"data"}],m={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};r.serialize=function(t,e){h.checkProperties(t,m);var r=[];y.forEach((function(e){var n=t[e.name]||[];n=c.arrayify(c.hexlify(n)),e.length&&n.length!==e.length&&0<n.length&&o.throwError("invalid length for "+e.name,o.INVALID_ARGUMENT,{arg:"transaction"+e.name,value:n}),e.maxLength&&(n=c.stripZeros(n)).length>e.maxLength&&o.throwError("invalid length for "+e.name,o.INVALID_ARGUMENT,{arg:"transaction"+e.name,value:n}),r.push(c.hexlify(n))})),null!=t.chainId&&0!==t.chainId&&(r.push(c.hexlify(t.chainId)),r.push("0x"),r.push("0x"));var n=f.encode(r);return e?(e=27+(n=c.splitSignature(e)).recoveryParam,9===r.length&&(r.pop(),r.pop(),r.pop(),e+=2*t.chainId+8),r.push(c.hexlify(e)),r.push(c.stripZeros(c.arrayify(n.r))),r.push(c.stripZeros(c.arrayify(n.s))),f.encode(r)):n},r.parse=function(t){9!==(n=f.decode(t)).length&&6!==n.length&&o.throwError("invalid raw transaction",o.INVALID_ARGUMENT,{arg:"rawTransactin",value:t});var e={nonce:p(n[0]).toNumber(),gasPrice:p(n[1]),gasLimit:p(n[2]),to:"0x"===(r=n[3])?null:s.getAddress(r),value:p(n[4]),data:n[5],chainId:0};if(6===n.length)return e;try{e.v=u.bigNumberify(n[6]).toNumber()}catch(t){return o.info(t),e}if(e.r=c.hexZeroPad(n[7],32),e.s=c.hexZeroPad(n[8],32),u.bigNumberify(e.r).isZero()&&u.bigNumberify(e.s).isZero())e.chainId=e.v,e.v=0;else{e.chainId=Math.floor((e.v-35)/2),e.chainId<0&&(e.chainId=0);var r=e.v-27,n=n.slice(0,6);0!==e.chainId&&(n.push(c.hexlify(e.chainId)),n.push("0x"),n.push("0x"),r-=2*e.chainId+8),n=l.keccak256(f.encode(n));try{e.from=a.recoverAddress(n,{r:c.hexlify(e.r),s:c.hexlify(e.s),recoveryParam:r})}catch(t){o.info(t)}e.hash=l.keccak256(t)}return e},r.populateTransaction=function(t,e,r){d.Provider.isProvider(e)||o.throwError("missing provider",o.INVALID_ARGUMENT,{argument:"provider",value:e}),h.checkProperties(t,m);var n=h.shallowCopy(t);return null!=n.to&&(n.to=e.resolveName(n.to)),null==n.gasPrice&&(n.gasPrice=e.getGasPrice()),null==n.nonce&&(n.nonce=e.getTransactionCount(r)),null==n.gasLimit&&((t=h.shallowCopy(n)).from=r,n.gasLimit=e.estimateGas(t)),null==n.chainId&&(n.chainId=e.getNetwork().then((function(t){return t.chainId}))),h.resolveProperties(n)}},{"../constants":3,"../errors":5,"../providers/abstract-provider":50,"./address":60,"./bignumber":63,"./bytes":64,"./keccak256":71,"./properties":74,"./rlp":76,"./secp256k1":77}],84:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i,o=t("../constants"),a=n(t("../errors")),s=t("./bignumber"),u={};function c(t){return{decimals:t.length-1,tenPower:s.bigNumberify(t)}}function l(t){var e=u[String(t).toLowerCase()];if(!e&&"number"==typeof t&&parseInt(String(t))==t&&0<=t&&t<=256){for(var r="1",n=0;n<t;n++)r+="0";e=c(r)}return e||a.throwError("invalid unitType",a.INVALID_ARGUMENT,{argument:"name",value:t}),e}function h(t,e){for(var r=l(e),n=(e=(t=s.bigNumberify(t)).lt(o.Zero),(t=e?t.mul(o.NegativeOne):t).mod(r.tenPower).toString());n.length<r.decimals;)n="0"+n;return n=n.match(/^([0-9]*[1-9]|0)(0*)/)[1],t=t.div(r.tenPower).toString()+"."+n,e?"-"+t:t}function f(t,e){var r=l(e=null==e?18:e);if("string"==typeof t&&t.match(/^-?[0-9.,]+$/)||a.throwError("invalid decimal value",a.INVALID_ARGUMENT,{arg:"value",value:t}),0===r.decimals)return s.bigNumberify(t);var n="-"===t.substring(0,1);"."===(t=n?t.substring(1):t)&&a.throwError("missing value",a.INVALID_ARGUMENT,{arg:"value",value:t}),2<(e=t.split(".")).length&&a.throwError("too many decimal points",a.INVALID_ARGUMENT,{arg:"value",value:t}),t=e[0];var i=e[1];for(t=t||"0",(i=i||"0").length>r.decimals&&a.throwError("underflow occurred",a.NUMERIC_FAULT,{operation:"division",fault:"underflow"});i.length<r.decimals;)i+="0";return e=s.bigNumberify(t),t=s.bigNumberify(i),t=e.mul(r.tenPower).add(t),n?t.mul(o.NegativeOne):t}i="1",["wei","kwei","Mwei","Gwei","szabo","finney","ether"].forEach((function(t){var e=c(i);u[t.toLowerCase()]=e,u[String(e.decimals)]=e,i+="000"})),r.commify=function(t){var e=String(t).split(".");(2<e.length||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&a.throwError("invalid value",a.INVALID_ARGUMENT,{argument:"value",value:t});var r=e[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0"),t="",2===e.length&&(t="."+(e[1]||"0"));for(var i=[];r.length;){if(r.length<=3){i.unshift(r);break}var o=r.length-3;i.unshift(r.substring(o)),r=r.substring(0,o)}return n+i.join(",")+t},r.formatUnits=h,r.parseUnits=f,r.formatEther=function(t){return h(t,18)},r.parseEther=function(t){return f(t,18)}},{"../constants":3,"../errors":5,"./bignumber":63}],85:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=t("../constants"),o=t("../errors"),a=t("./bytes");function s(t,e){(e=void 0===e?n.current:e)!=n.current&&(o.checkNormalize(),t=t.normalize(e));for(var r=[],i=0;i<t.length;i++){var s=t.charCodeAt(i);if(s<128)r.push(s);else if(s<2048)r.push(s>>6|192),r.push(63&s|128);else if(55296==(64512&s)){i++;var u=t.charCodeAt(i);if(i>=t.length||56320!=(64512&u))throw new Error("invalid utf-8 string");r.push((s=65536+((1023&s)<<10)+(1023&u))>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(63&s|128)}return a.arrayify(r)}function u(t,e){t=a.arrayify(t);for(var r="",n=0;n<t.length;){var i=t[n++];if(i>>7!=0){var o=null,s=null;if(192==(224&i))o=1,s=127;else if(224==(240&i))o=2,s=2047;else{if(240!=(248&i)){if(e)continue;if(128==(192&i))throw new Error("invalid utf8 byte sequence; unexpected continuation byte");throw new Error("invalid utf8 byte sequence; invalid prefix")}o=3,s=65535}if(n+o>t.length){if(!e)throw new Error("invalid utf8 byte sequence; too short");for(;n<t.length&&t[n]>>6==2;n++);}else{for(var u=i&(1<<8-o-1)-1,c=0;c<o;c++){var l=t[n];if(128!=(192&l)){u=null;break}u=u<<6|63&l,n++}if(null!==u)if(u<=s){if(!e)throw new Error("invalid utf8 byte sequence; overlong")}else if(1114111<u){if(!e)throw new Error("invalid utf8 byte sequence; out-of-range")}else if(55296<=u&&u<=57343){if(!e)throw new Error("invalid utf8 byte sequence; utf-16 surrogate")}else u<=65535?r+=String.fromCharCode(u):(u-=65536,r+=String.fromCharCode(55296+(u>>10&1023),56320+(1023&u)));else if(!e)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else r+=String.fromCharCode(i)}return r}(t=n=r.UnicodeNormalizationForm||(r.UnicodeNormalizationForm={})).current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD",r.toUtf8Bytes=s,r.toUtf8String=u,r.formatBytes32String=function(t){if(31<(t=s(t)).length)throw new Error("bytes32 string must be less than 32 bytes");return a.hexlify(a.concat([t,i.HashZero]).slice(0,32))},r.parseBytes32String=function(t){var e=a.arrayify(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===e[r-1];)r--;return u(e.slice(0,r))}},{"../constants":3,"../errors":5,"./bytes":64}],86:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("xmlhttprequest"),o=t("./base64"),a=t("./properties"),u=t("./utf8"),c=n(t("../errors"));r.fetchJson=function(t,e,r){var n,a={},l=null,h=12e4;if("string"==typeof t)l=t;else if("object"==s(t)){if(null==t.url&&c.throwError("missing URL",c.MISSING_ARGUMENT,{arg:"url"}),l=t.url,"number"==typeof t.timeout&&0<t.timeout&&(h=t.timeout),t.headers)for(var f in t.headers)a[f.toLowerCase()]={key:f,value:String(t.headers[f])};null!=t.user&&null!=t.password&&("https:"!==l.substring(0,6)&&!0!==t.allowInsecure&&c.throwError("basic authentication requires a secure https url",c.INVALID_ARGUMENT,{arg:"url",url:l,user:t.user,password:"[REDACTED]"}),n=t.user+":"+t.password,a.authorization={key:"Authorization",value:"Basic "+o.encode(u.toUtf8Bytes(n))})}return new Promise((function(t,n){function o(){null!=u&&(clearTimeout(u),u=null)}var s=new i.XMLHttpRequest,u=null;u=setTimeout((function(){null!=u&&(u=null,n(new Error("timeout")),setTimeout((function(){s.abort()}),0))}),h),e?(s.open("POST",l,!0),a["content-type"]={key:"Content-Type",value:"application/json"}):s.open("GET",l,!0),Object.keys(a).forEach((function(t){t=a[t],s.setRequestHeader(t.key,t.value)})),s.onreadystatechange=function(){if(4===s.readyState){if(200!=s.status){o();var i=new Error("invalid response - "+s.status);return i.statusCode=s.status,s.responseText&&(i.responseText=s.responseText),void n(i)}var a=null;try{a=JSON.parse(s.responseText)}catch(i){o();var u=new Error("invalid json response");return u.orginialError=i,u.responseText=s.responseText,null!=e&&(u.requestBody=e),u.url=l,void n(u)}if(r)try{a=r(a)}catch(i){return o(),i.url=l,i.body=e,i.responseText=s.responseText,void n(i)}o(),t(a)}},s.onerror=function(t){o(),n(t)};try{null!=e?s.send(e):s.send()}catch(u){o();var c=new Error("connection error");c.error=u,n(c)}}))},r.poll=function(t,e){return e=e||{},null==(e=a.shallowCopy(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){var i=null,o=!1,a=function(){return!o&&(o=!0,i&&clearTimeout(i),!0)};e.timeout&&(i=setTimeout((function(){a()&&n(new Error("timeout"))}),e.timeout));var s=e.fastRetry||null,u=0;!function i(){return t().then((function(t){return void 0!==t?a()&&r(t):e.onceBlock?e.onceBlock.once("block",i):o||(u++,(t=(t=e.interval*parseInt(String(Math.random()*Math.pow(2,u))))<e.floor?e.floor:t)>e.ceiling&&(t=e.ceiling),s&&(u--,t=s,s=null),setTimeout(i,t)),null}),(function(t){a()&&n(t)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(t,e,n){(function(e){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var e=t("../utils/hash"),r=t("../utils/properties");n.check=function(t){for(var r=[],n=0;n<2048;n++){var i=t.getWord(n);if(n!==t.getWordIndex(i))return"0x";r.push(i)}return e.id(r.join("\n")+"\n")};var i=(o.prototype.split=function(t){return t.toLowerCase().split(/ +/g)},o.prototype.join=function(t){return t.join(" ")},o);function o(t){r.defineReadOnly(this,"locale",t)}n.Wordlist=i,n.register=function(t,e){e=e||t.locale}}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a,s=t("./utils/bytes"),u=t("./utils/hash"),c=t("./utils/hdnode"),l=t("./utils/json-wallet"),h=t("./utils/keccak256"),f=t("./utils/properties"),d=t("./utils/random-bytes"),p=o(t("./utils/secret-storage")),y=t("./utils/signing-key"),m=t("./utils/transaction"),v=t("./abstract-signer"),g=t("./providers/abstract-provider"),b=o(t("./errors"));function w(t,e){var r=a.call(this)||this;return b.checkNew(r,w),y.SigningKey.isSigningKey(t)?f.defineReadOnly(r,"signingKey",t):f.defineReadOnly(r,"signingKey",new y.SigningKey(t)),f.defineReadOnly(r,"provider",e),r}i(w,a=v.Signer),Object.defineProperty(w.prototype,"address",{get:function(){return this.signingKey.address},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"mnemonic",{get:function(){return this.signingKey.mnemonic},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"path",{get:function(){return this.signingKey.path},enumerable:!0,configurable:!0}),Object.defineProperty(w.prototype,"privateKey",{get:function(){return this.signingKey.privateKey},enumerable:!0,configurable:!0}),w.prototype.connect=function(t){return g.Provider.isProvider(t)||b.throwError("invalid provider",b.INVALID_ARGUMENT,{argument:"provider",value:t}),new w(this.signingKey,t)},w.prototype.getAddress=function(){return Promise.resolve(this.address)},w.prototype.sign=function(t){var e=this;return f.resolveProperties(t).then((function(t){var r=m.serialize(t);return r=e.signingKey.signDigest(h.keccak256(r)),m.serialize(t,r)}))},w.prototype.signMessage=function(t){return Promise.resolve(s.joinSignature(this.signingKey.signDigest(u.hashMessage(t))))},w.prototype.getBalance=function(t){if(!this.provider)throw new Error("missing provider");return this.provider.getBalance(this.address,t)},w.prototype.getTransactionCount=function(t){if(!this.provider)throw new Error("missing provider");return this.provider.getTransactionCount(this.address,t)},w.prototype.sendTransaction=function(t){var e=this;if(!this.provider)throw new Error("missing provider");return null==t.nonce&&((t=f.shallowCopy(t)).nonce=this.getTransactionCount("pending")),m.populateTransaction(t,this.provider,this.address).then((function(t){return e.sign(t).then((function(t){return e.provider.sendTransaction(t)}))}))},w.prototype.encrypt=function(t,e,r){if("function"!=typeof e||r||(r=e,e={}),r&&"function"!=typeof r)throw new Error("invalid callback");return e=e||{},this.mnemonic&&((e=f.shallowCopy(e)).mnemonic=this.mnemonic,e.path=this.path),p.encrypt(this.privateKey,t,e,r)},w.createRandom=function(t){var e=d.randomBytes(16);return(t=t||{}).extraEntropy&&(e=s.arrayify(h.keccak256(s.concat([e,t.extraEntropy])).substring(0,34))),e=c.entropyToMnemonic(e,t.locale),w.fromMnemonic(e,t.path,t.locale)},w.fromEncryptedJson=function(t,e,r){if(l.isCrowdsaleWallet(t))try{r&&r(0);var n=p.decryptCrowdsale(t,e);return r&&r(1),Promise.resolve(new w(n))}catch(t){return Promise.reject(t)}else if(l.isSecretStorageWallet(t))return p.decrypt(t,e,r).then((function(t){return new w(t)}));return Promise.reject("invalid wallet JSON")},w.fromMnemonic=function(t,e,r){return e=e||c.defaultPath,new w(c.fromMnemonic(t,r).derivePath(e))},i=w,r.Wallet=i},{"./abstract-signer":2,"./errors":5,"./providers/abstract-provider":50,"./utils/bytes":64,"./utils/hash":65,"./utils/hdnode":66,"./utils/json-wallet":70,"./utils/keccak256":71,"./utils/properties":74,"./utils/random-bytes":75,"./utils/secret-storage":78,"./utils/signing-key":81,"./utils/transaction":83}],89:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),t=t("../wordlists/lang-en").langEn,r.en=t},{"../wordlists/lang-en":90}],90:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var o,a=t("../utils/wordlist"),s=null;function u(t){if(null==s&&(s="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==a.check(t)))throw s=null,new Error("BIP39 Wordlist for en (English) FAILED")}function c(){return o.call(this,"en")||this}i=new(i(c,o=a.Wordlist),c.prototype.getWord=function(t){return u(this),s[t]},c.prototype.getWordIndex=function(t){return u(this),s.indexOf(t)},c),r.langEn=i,a.register(i)},{"../utils/wordlist":87}]},{},[7])(7)},"object"==s(e)&&void 0!==t?t.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(e,i):n)||(t.exports=o))}).call(this,r(5))},function(t,e,r){var n=r(22),i=r(30),o=r(7),a=r(3),s=r(4);function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var l=r(31),h=r(76),f=r(34),d=f.ValidateLibrary,p=f.ValidateObject,y=f.ValidateVersion,m=f.ValidatePartHash,v=f.ValidateWriteToken,g=f.ValidateParameters,b=r(77);e.permissionLevels={owner:{short:"Owner Only",description:"Only the owner has access to the object and ability to change permissions",settings:{visibility:0,statusCode:-1,kmsConk:!1}},editable:{short:"Editable",description:"Members of the editors group have full access to the object and the ability to change permissions",settings:{visibility:0,statusCode:-1,kmsConk:!0}},viewable:{short:"Viewable",description:"In addition to editors, members of the 'accessor' group can have read-only access to the object including playing video and retrieving metadata, images and documents",settings:{visibility:0,statusCode:0,kmsConk:!0}},listable:{short:"Publicly Listable",description:"Anyone can list the public portion of this object but only accounts with specific rights can access",settings:{visibility:1,statusCode:0,kmsConk:!0}},public:{short:"Public",description:"Anyone can access this object",settings:{visibility:10,statusCode:0,kmsConk:!0}}},e.Visibility=function(){var t=s(a.mark((function t(e){var r,n,i=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.id,t.prev=1,n=this.utils.HashToAddress(r),this.visibilityInfo[n]||(this.visibilityInfo[n]=new Promise(function(){var t=s(a.mark((function t(e,o){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.authClient.ContractHasMethod({contractAddress:n,methodName:"visibility"});case 3:if(t.sent){t.next=7;break}return e(0),t.abrupt("return");case 7:return t.t0=e,t.next=10,i.CallContractMethod({contractAddress:i.utils.HashToAddress(r),methodName:"visibility"});case 10:t.t1=t.sent,(0,t.t0)(t.t1),t.next=17;break;case 14:t.prev=14,t.t2=t.catch(0),o(t.t2);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e,r){return t.apply(this,arguments)}}())),t.prev=4,t.next=7,this.visibilityInfo[n];case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),delete this.visibilityInfo[n],t.t0;case 14:t.next=21;break;case 16:if(t.prev=16,t.t1=t.catch(1),"CALL_EXCEPTION"!==t.t1.code){t.next=20;break}return t.abrupt("return",0);case 20:throw t.t1;case 21:case"end":return t.stop()}}),t,this,[[1,16],[4,10]])})));return function(e){return t.apply(this,arguments)}}(),e.Permission=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,p(r),t.next=4,this.AccessType({id:r});case 4:if(t.t0=t.sent,t.t1=this.authClient.ACCESS_TYPES.OBJECT,t.t0===t.t1){t.next=8;break}throw Error("Permission only valid for normal content objects: "+r);case 8:return t.next=10,this.Visibility({id:r});case 10:return n=t.sent,t.next=13,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"addressKMS"});case 13:if(i=t.sent,o=i&&"ikms".concat(this.utils.AddressToHash(i)),s=!1,!o){t.next=27;break}return t.t2=this,t.next=20,this.ContentObjectLibraryId({objectId:r});case 20:return t.t3=t.sent,t.t4=r,t.t5="eluv.caps.".concat(o),t.t6={libraryId:t.t3,objectId:t.t4,metadataSubtree:t.t5},t.next=26,t.t2.ContentObjectMetadata.call(t.t2,t.t6);case 26:s=!!t.sent;case 27:return t.next=29,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"statusCode"});case 29:return u=t.sent,u=parseInt(u._hex,16),(c=Object.keys(this.permissionLevels).filter((function(t){var e=l.permissionLevels[t].settings;return n>=e.visibility&&u>=e.statusCode&&s===e.kmsConk})))||(c=s?["editable"]:["owner"]),t.abrupt("return",c.slice(-1)[0]);case 34:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DefaultKMSAddress=s(a.mark((function t(){var e,r,n,i=arguments;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=i.length>0&&void 0!==i[0]?i[0]:{},r=e.tenantId,t.t0=r,!t.t0){t.next=8;break}return t.next=5,this.AccessType({id:r});case 5:t.t1=t.sent,t.t2=this.authClient.ACCESS_TYPES.TENANT,t.t0=t.t1===t.t2;case 8:if(!t.t0){t.next=14;break}return t.next=11,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"addressKMS"});case 11:if(!(n=t.sent)){t.next=14;break}return t.abrupt("return",n);case 14:return t.next=16,this.CallContractMethod({contractAddress:this.contentSpaceAddress,methodName:"addressKMS"});case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)}))),e.ContentSpaceId=function(){return this.contentSpaceId},e.ContentTypeOwner=function(){var t=s(a.mark((function t(e){var r,n,i,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.name,n=e.typeId,i=e.versionHash,t.next=3,this.ContentType({name:r,typeId:n,versionHash:i});case 3:return o=t.sent,t.t0=this.utils,t.next=7,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(o.id),methodName:"owner",methodArgs:[]});case 7:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentType=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.name,n=e.typeId,i=e.versionHash,o=e.publicOnly,s=void 0!==o&&o,this.Log("Retrieving content type: ".concat(r||n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),!r){t.next=13;break}return this.Log("Looking up type by name in content space metadata..."),t.prev=5,t.next=8,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:this.contentSpaceObjectId,metadataSubtree:l("public","contentTypes",r)});case 8:n=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(n){t.next=23;break}return this.Log("Looking up type by name in available types..."),t.next=17,this.ContentTypes();case 17:if(u=t.sent,!r){t.next=22;break}return t.abrupt("return",Object.values(u).find((function(t){return(t.name||"").toLowerCase()===r.toLowerCase()})));case 22:return t.abrupt("return",Object.values(u).find((function(t){return t.hash===i})));case 23:if(i){t.next=27;break}return t.next=26,this.LatestVersionHash({objectId:n});case 26:i=t.sent;case 27:if(t.prev=27,this.Log("Looking up type by ID..."),!s){t.next=39;break}return t.next=32,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:n,versionHash:i,metadataSubtree:"public"});case 32:if(t.t1=t.sent,t.t1){t.next=35;break}t.t1={};case 35:t.t2=t.t1,c={public:t.t2},t.next=45;break;case 39:return t.next=41,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:n,versionHash:i});case 41:if(t.t3=t.sent,t.t3){t.next=44;break}t.t3={};case 44:c=t.t3;case 45:return t.abrupt("return",{id:n,hash:i,name:c.public&&c.public.name||c.name||n,meta:c});case 48:throw t.prev=48,t.t4=t.catch(27),this.Log("Error looking up content type:"),this.Log(t.t4),new Error("Content Type ".concat(r||n," is invalid"));case 53:case"end":return t.stop()}}),t,this,[[5,11],[27,48]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentTypes=s(a.mark((function t(){var e,r,n,i=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.contentTypes=this.contentTypes||{},this.Log("Looking up all available content types"),t.next=4,this.Collection({collectionType:"contentTypes"});case 4:return e=t.sent,this.Log("Personally available types:"),this.Log(e),r={},t.prev=8,t.next=11,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:this.contentSpaceObjectId,metadataSubtree:"public/contentTypes"});case 11:if(t.t0=t.sent,t.t0){t.next=14;break}t.t0={};case 14:r=t.t0,t.next=19;break;case 17:t.prev=17,t.t1=t.catch(8);case 19:return n=Object.values(r).map((function(t){return i.utils.HashToAddress(t)})),this.Log("Content space types:"),this.Log(n),e=e.concat(n).filter((function(t){return t})).map((function(t){return i.utils.FormatAddress(t)})).filter((function(t,e,r){return r.indexOf(t)===e})),t.next=25,Promise.all(e.map(function(){var t=s(a.mark((function t(e){var r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.utils.AddressToObjectId(e),i.contentTypes[r]){t.next=11;break}return t.prev=2,t.next=5,i.ContentType({typeId:r,publicOnly:!0});case 5:i.contentTypes[r]=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}()));case 25:return t.abrupt("return",this.contentTypes);case 26:case"end":return t.stop()}}),t,this,[[8,17]])}))),e.ContentLibraries=s(a.mark((function t(){var e,r=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.Collection({collectionType:"libraries"});case 2:return e=t.sent,t.abrupt("return",e.map((function(t){return r.utils.AddressToLibraryId(t)})));case 4:case"end":return t.stop()}}),t,this)}))),e.ContentLibrary=function(){var t=s(a.mark((function t(e){var r,n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,d(r),n=l("qlibs",r),t.t0=this.utils,t.t1=this.HttpClient,t.next=7,this.authClient.AuthorizationHeader({libraryId:r});case 7:return t.t2=t.sent,t.t3=n,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=13,t.t0.ResponseToJson.call(t.t0,t.t5);case 13:return i=t.sent,t.abrupt("return",c(c({},i),{},{meta:i.meta||{}}));case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentLibraryOwner=function(){var t=s(a.mark((function t(e){var r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,d(r),t.t0=this.utils,t.next=5,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"owner",methodArgs:[]});case 5:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LibraryContentTypes=function(){var t=s(a.mark((function t(e){var r,n,i,o=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,d(r),this.Log("Retrieving library content types for ".concat(r)),t.next=5,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"contentTypesLength",methodArgs:[]});case 5:if(n=t.sent.toNumber(),this.Log("".concat(n," types")),0!==n){t.next=9;break}return t.abrupt("return",{});case 9:return i={},t.next=12,Promise.all(Array.from(new Array(n),function(){var t=s(a.mark((function t(e,n){var s,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.ethClient.CallContractMethod({contractAddress:o.utils.HashToAddress(r),methodName:"contentTypes",methodArgs:[n]});case 2:return s=t.sent,u=o.utils.AddressToObjectId(s),t.next=6,o.ContentType({typeId:u});case 6:i[u]=t.sent;case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()));case 12:return this.Log(i),t.abrupt("return",i);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjects=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.filterOptions,i=void 0===n?{}:n,d(r),this.Log("Retrieving content objects from ".concat(r)),o=l("qlibs",r,"q"),s={filter:[]},i.cacheId&&(s.cache_id=i.cacheId),i.start&&(s.start=i.start),i.limit&&(s.limit=i.limit),i.select&&(s.select=i.select),i.sort&&(s.sort_by=i.sort,i.sortDesc&&(s.sort_descending=!0)),u={eq:":eq:",neq:":ne:",lt:":lt:",lte:":le:",gt:":gt:",gte:":ge:",cnt:":co:",ncnt:":nc:"},c=function(t){var e=t.key,r=t.type,n=t.filter;s.filter.push("".concat(e).concat(u[r]).concat(n))},i.filter&&(Array.isArray(i.filter)?i.filter.forEach((function(t){return c(t)})):c(i.filter)),this.Log("Filter options:"),this.Log(i),t.t0=this.utils,t.t1=this.HttpClient,t.next=19,this.authClient.AuthorizationHeader({libraryId:r});case 19:return t.t2=t.sent,t.t3=o,t.t4=s,t.t5={headers:t.t2,method:"GET",path:t.t3,queryParams:t.t4},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=26,t.t0.ResponseToJson.call(t.t0,t.t6);case 26:return t.abrupt("return",t.sent);case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObject=function(){var t=s(a.mark((function t(e){var r,n,i,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,g({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving content object: ".concat(r||""," ").concat(n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),o=l("q",i||n),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 9:return t.t2=t.sent,t.t3=o,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=15,t.t0.ResponseToJson.call(t.t0,t.t5);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectOwner=function(){var t=s(a.mark((function t(e){var r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,p(r),this.Log("Retrieving content object owner: ".concat(r)),t.t0=this.utils,t.next=6,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"owner",methodArgs:[]});case 6:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectTenantId=function(){var t=s(a.mark((function t(e){var r,n;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,(n=e.versionHash)?y(n):p(r),n&&(r=this.utils.DecodeVersionHash(n).objectId),this.objectTenantIds[r]){t.next=7;break}return t.next=6,this.authClient.MakeElvMasterCall({methodName:"elv_getTenantById",params:[this.contentSpaceId,r]});case 6:this.objectTenantIds[r]=t.sent;case 7:return t.abrupt("return",this.objectTenantIds[r]);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectLibraryId=function(){var t=s(a.mark((function t(e){var r,n,i=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,(n=e.versionHash)?y(n):p(r),n&&(r=this.utils.DecodeVersionHash(n).objectId),t.next=5,this.authClient.AccessType(r);case 5:t.t0=t.sent,t.next=t.t0===this.authClient.ACCESS_TYPES.LIBRARY?8:t.t0===this.authClient.ACCESS_TYPES.OBJECT?9:t.t0===this.authClient.ACCESS_TYPES.OTHER?20:21;break;case 8:return t.abrupt("return",this.utils.AddressToLibraryId(this.utils.HashToAddress(r)));case 9:return this.objectLibraryIds[r]||(this.Log("Retrieving content object library ID: ".concat(r||n)),this.objectLibraryIds[r]=new Promise(function(){var t=s(a.mark((function t(e,n){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=e,t.t1=i.utils,t.next=5,i.CallContractMethod({contractAddress:i.utils.HashToAddress(r),methodName:"libraryAddress"});case 5:t.t2=t.sent,t.t3=t.t1.AddressToLibraryId.call(t.t1,t.t2),(0,t.t0)(t.t3),t.next=13;break;case 10:t.prev=10,t.t4=t.catch(0),n(t.t4);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,r){return t.apply(this,arguments)}}())),t.prev=10,t.next=13,this.objectLibraryIds[r];case 13:return t.abrupt("return",t.sent);case 16:throw t.prev=16,t.t1=t.catch(10),delete this.objectLibraryIds[r],t.t1;case 20:throw Error("Unable to retrieve library ID for ".concat(n||r,": Unknown type. (wrong network or deleted object?)"));case 21:return t.abrupt("return",this.contentSpaceLibraryId);case 22:case"end":return t.stop()}}),t,this,[[10,16]])})));return function(e){return t.apply(this,arguments)}}(),e.ProduceMetadataLinks=function(){var t=s(a.mark((function t(e){var r,n,o,u,h,f,d,p,y,m=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,o=e.versionHash,u=e.path,h=void 0===u?"/":u,f=e.metadata,d=e.authorizationToken,p=e.noAuth,f&&"object"===i(f)){t.next=3;break}return t.abrupt("return",f);case 3:if(!Array.isArray(f)){t.next=7;break}return t.next=6,this.utils.LimitedMap(5,f,function(){var t=s(a.mark((function t(e,i){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.ProduceMetadataLinks({libraryId:r,objectId:n,versionHash:o,path:l(h,i.toString()),metadata:e,authorizationToken:d,noAuth:p});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 6:return t.abrupt("return",t.sent);case 7:if(!f["/"]||!f["/"].match(/\.\/(rep|files)\/.+/)&&!f["/"].match(/^\/?qfab\/([\w]+)\/?(rep|files)\/.+/)){t.next=16;break}return t.t0=c,t.t1=c({},f),t.t2={},t.next=13,this.LinkUrl({libraryId:r,objectId:n,versionHash:o,linkPath:h,authorizationToken:d});case 13:return t.t3=t.sent,t.t4={url:t.t3},t.abrupt("return",(0,t.t0)(t.t1,t.t2,t.t4));case 16:return y={},t.next=19,this.utils.LimitedMap(5,Object.keys(f),function(){var t=s(a.mark((function t(e){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.ProduceMetadataLinks({libraryId:r,objectId:n,versionHash:o,path:l(h,e),metadata:f[e],authorizationToken:d,noAuth:p});case 2:y[e]=t.sent;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 19:return t.abrupt("return",y);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.MetadataAuth=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,h,f,d,p,y;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.path,s=void 0===o?"/":o,u=e.channelAuth,c=void 0!==u&&u,l=e.noAuth,h=void 0!==l&&l,g({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),h=this.noAuth||h,f=h,h){t.next=14;break}return t.next=8,this.Visibility({id:n});case 8:return p=t.sent,t.next=11,this.AccessType({id:n});case 11:d=t.sent,f=(s||"").replace(/^\/+/,"").startsWith("public"),h=p>=10||f&&p>=1;case 14:if(!this.oauthToken){t.next=22;break}return t.next=17,this.authClient.KMSAddress({objectId:n,versionHash:i});case 17:if(!(y=t.sent)||this.utils.EqualAddress(y,this.utils.nullAddress)){t.next=22;break}return t.next=21,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,channelAuth:!0,oauthToken:this.oauthToken});case 21:return t.abrupt("return",t.sent);case 22:if(this.inaccessibleLibraries[r]||!f||d!==this.authClient.ACCESS_TYPES.OBJECT||c){t.next=48;break}if(t.prev=23,t.t0=this.authClient,t.t1=r,t.t1){t.next=30;break}return t.next=29,this.ContentObjectLibraryId({objectId:n,versionHash:i});case 29:t.t1=t.sent;case 30:return t.t2=t.t1,t.t3=h,t.t4={libraryId:t.t2,noAuth:t.t3},t.next=35,t.t0.AuthorizationToken.call(t.t0,t.t4);case 35:return t.abrupt("return",t.sent);case 38:if(t.prev=38,t.t5=t.catch(23),!t.t5.message||!t.t5.message.toLowerCase().startsWith("access denied")){t.next=45;break}return this.inaccessibleLibraries[r]=!0,t.next=44,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,noAuth:h,channelAuth:c});case 44:return t.abrupt("return",t.sent);case 45:throw t.t5;case 46:t.next=51;break;case 48:return t.next=50,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,noAuth:h,channelAuth:c});case 50:return t.abrupt("return",t.sent);case 51:case"end":return t.stop()}}),t,this,[[23,38]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectMetadata=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,h,f,d,p,y,m,v,b,w,_,k,x,A,I,E,S,M,T,P,C,O,R,j;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.metadataSubtree,u=void 0===s?"/":s,h=e.queryParams,f=void 0===h?{}:h,d=e.select,p=void 0===d?[]:d,y=e.remove,m=void 0===y?[]:y,v=e.authorizationToken,b=e.noAuth,w=void 0!==b&&b,_=e.resolveLinks,k=void 0!==_&&_,x=e.resolveIncludeSource,A=void 0!==x&&x,I=e.resolveIgnoreErrors,E=void 0!==I&&I,S=e.linkDepthLimit,M=void 0===S?1:S,T=e.produceLinkUrls,P=void 0!==T&&T,g({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving content object metadata: ".concat(r||""," ").concat(n||i," ").concat(o||"","\n Subtree: ").concat(u)),f=c({},f||{}),i&&(n=this.utils.DecodeVersionHash(i).objectId),C=l("q",o||i||n,"meta",u),t.next=8,this.MetadataAuth({libraryId:r,objectId:n,versionHash:i,path:u,noAuth:w});case 8:return O=t.sent,R=[v,f.authorization,O].flat().filter((function(t){return t})),delete f.authorization,t.prev=11,t.next=14,this.utils.ResponseToJson(this.HttpClient.Request({headers:{Authorization:R.map((function(t){return"Bearer ".concat(t)}))},queryParams:c(c({},f),{},{select:p,remove:m,link_depth:M,resolve:k,resolve_include_source:A,resolve_ignore_errors:E}),method:"GET",path:C}));case 14:j=t.sent,t.next=22;break;case 17:if(t.prev=17,t.t0=t.catch(11),404===t.t0.status){t.next=21;break}throw t.t0;case 21:j="/"===u?{}:void 0;case 22:if(P){t.next=24;break}return t.abrupt("return",j);case 24:return t.next=26,this.ProduceMetadataLinks({libraryId:r,objectId:n,versionHash:i,path:u,metadata:j,authorizationToken:v,noAuth:w});case 26:return t.abrupt("return",t.sent);case 27:case"end":return t.stop()}}),t,this,[[11,17]])})));return function(e){return t.apply(this,arguments)}}(),e.AssetMetadata=function(){var t=s(a.mark((function t(e){var r,i,o,s,u,h,f,d,p,y=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,i=e.objectId,o=e.versionHash,s=e.metadata,u=e.localization,h=e.noAuth,f=e.produceLinkUrls,d=void 0!==f&&f,g({libraryId:r,objectId:i,versionHash:o}),i||(i=this.utils.DecodeVersionHash(o).objectId),s){t.next=12;break}return t.next=6,this.ContentObjectMetadata({libraryId:r,objectId:i,versionHash:o,metadataSubtree:"public/asset_metadata",resolveLinks:!0,linkDepthLimit:2,resolveIgnoreErrors:!0,produceLinkUrls:d,noAuth:h});case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0={};case 9:s=t.t0,t.next=16;break;case 12:if(!d){t.next=16;break}return t.next=15,this.ProduceMetadataLinks({libraryId:r,objectId:i,versionHash:o,path:l("public","asset_metadata"),metadata:s,noAuth:h});case 15:s=t.sent;case 16:return s.info||(s.info={}),p=c({},s),u&&u.reverse().forEach((function(t){var e,r=(e=y.utils).SafeTraverse.apply(e,[s].concat(n(t)))||{};p=b({},p,r,(function(t,e){return null===e||""===e?t:void 0}))})),t.abrupt("return",p);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectVersions=function(){var t=s(a.mark((function t(e){var r,n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,g({libraryId:r,objectId:n}),this.Log("Retrieving content object versions: ".concat(r||""," ").concat(n)),i=l("qid",n),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n});case 8:return t.t2=t.sent,t.t3=i,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LatestVersionHash=function(){var t=s(a.mark((function t(e){var r,n,i,o;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,(n=e.versionHash)&&(r=this.utils.DecodeVersionHash(n).objectId),p(r),t.prev=3,t.next=6,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"objectHash"});case 6:i=t.sent,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(3);case 11:if(i){t.next=20;break}return t.next=14,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"countVersionHashes"});case 14:if((o=t.sent).toNumber()){t.next=17;break}throw Error("Unable to determine latest version hash for ".concat(n||r," - Item deleted?"));case 17:return t.next=19,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"versionHashes",methodArgs:[o-1]});case 19:i=t.sent;case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this,[[3,9]])})));return function(e){return t.apply(this,arguments)}}(),e.AvailableDRMs=s(a.mark((function t(){var e,r,n,i,o,s,u,c,l;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=["clear","aes-128"],"undefined"!=typeof window){t.next=3;break}return t.abrupt("return",e);case 3:if(window.navigator&&window.navigator.userAgent&&((r=window.navigator.userAgent.match(/(iPad|iPhone|iphone|iPod).*?(OS |os |OS_)(\d+((_|\.)\d)?((_|\.)\d)?)/))&&r[3]&&(n=r[3].split("_"),i=parseInt(n[0]),o=parseInt(n[1]),(i>13||13===i&&o>=1)&&(e[1]="sample-aes",e[2]="fairplay")),/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&(s=window.navigator.userAgent.match(/.+Version\/(\d+)\.(\d+)/))&&s[2]&&(u=parseInt(s[1]),c=parseInt(s[2]),(u>13||13===u&&c>=1)&&(e[1]="sample-aes",e[2]="fairplay"))),"undefined"==typeof window||"function"==typeof window.navigator.requestMediaKeySystemAccess){t.next=6;break}return t.abrupt("return",e);case 6:return t.prev=6,l=[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}],t.next=10,navigator.requestMediaKeySystemAccess("com.widevine.alpha",l);case 10:e.push("widevine"),t.next=15;break;case 13:t.prev=13,t.t0=t.catch(6);case 15:return t.abrupt("return",e);case 16:case"end":return t.stop()}}),t,null,[[6,13]])}))),e.PlayoutPathResolution=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,h,f,d,p,y,m,v,g,b,w;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.linkPath,u=e.handler,c=e.offering,h=void 0===c?"":c,f=e.signedLink,d=void 0!==f&&f,p=e.authorizationToken,r){t.next=5;break}return t.next=4,this.ContentObjectLibraryId({objectId:n});case 4:r=t.sent;case 5:if(i){t.next=9;break}return t.next=8,this.LatestVersionHash({objectId:n});case 8:i=t.sent;case 9:if(y=l("qlibs",r,"q",o||i,"rep",u,h,"options.json"),!s){t.next=26;break}return t.next=13,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:o,metadataSubtree:s,resolveLinks:!1,resolveIgnoreErrors:!0,resolveIncludeSource:!0,authorizationToken:p});case 13:if(w=t.sent,b=!!w&&!!w["/"]&&!w["/"].endsWith("options.json"),y=l("qlibs",r,"q",o||i,"meta",s),d){t.next=25;break}return t.next=19,this.LinkTarget({libraryId:r,objectId:n,versionHash:i,writeToken:o,linkPath:s,linkInfo:w,authorizationToken:p});case 19:return g=t.sent,v=this.utils.DecodeVersionHash(g).objectId,t.next=23,this.ContentObjectLibraryId({objectId:v});case 23:m=t.sent,b||h||(y=l("q",g,"rep",u,"options.json"));case 25:b&&(y=l(y,h,"options.json"));case 26:return t.abrupt("return",{path:y,multiOfferingLink:b,linkTarget:{libraryId:m,objectId:v,versionHash:g}});case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AvailableOfferings=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,h,f,d,p;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.versionHash,i=e.writeToken,o=e.linkPath,s=e.signedLink,u=e.directLink,c=e.handler,l=void 0===c?"playout":c,h=e.authorizationToken,r||(r=this.utils.DecodeVersionHash(n).objectId),!u){t.next=15;break}return t.t0=this,t.next=6,this.ContentObjectLibraryId({objectId:r});case 6:return t.t1=t.sent,t.t2=r,t.t3=n,t.t4=o,t.t5=h,t.t6={libraryId:t.t1,objectId:t.t2,versionHash:t.t3,metadataSubtree:t.t4,resolveLinks:!0,authorizationToken:t.t5},t.next=14,t.t0.ContentObjectMetadata.call(t.t0,t.t6);case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,this.PlayoutPathResolution({objectId:r,versionHash:n,writeToken:i,linkPath:o,signedLink:s,handler:l,authorizationToken:h});case 17:return f=t.sent,d=f.path,t.prev=19,t.t7=h,t.next=23,this.authClient.AuthorizationToken({objectId:r,channelAuth:!0,oauthToken:this.oauthToken});case 23:return t.t8=t.sent,p=[t.t7,t.t8].flat().filter((function(t){return t})),t.next=27,this.utils.ResponseToJson(this.HttpClient.Request({path:d,method:"GET",headers:{Authorization:"Bearer ".concat(p.join(","))}}));case 27:return t.abrupt("return",t.sent);case 30:if(t.prev=30,t.t9=t.catch(19),!t.t9.status||500!==parseInt(t.t9.status)){t.next=34;break}return t.abrupt("return",{});case 34:throw t.t9;case 35:case"end":return t.stop()}}),t,this,[[19,30]])})));return function(e){return t.apply(this,arguments)}}(),e.PlayoutOptions=function(){var t=s(a.mark((function t(e){var r,n,i,u,h,f,d,m,v,g,b,w,_,k,x,A,I,E,S,M,T,P,C,O,R,j,N,L,U,D,B,z,H,F,q,G,V,K,Z,W,J,Q,Y,$,X,tt,et=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.offeringURI,n=e.objectId,i=e.versionHash,u=e.writeToken,h=e.linkPath,f=e.signedLink,d=void 0!==f&&f,m=e.protocols,v=void 0===m?["dash","hls"]:m,g=e.handler,b=void 0===g?"playout":g,w=e.offering,_=void 0===w?"default":w,k=e.playoutType,x=e.drms,A=void 0===x?[]:x,I=e.context,E=e.hlsjsProfile,S=void 0===E||E,M=e.authorizationToken,T=e.options,P=void 0===T?{}:T,!r){t.next=8;break}if(C=r.match(/(hq__[^/]+)\/rep\/([^/]+)\/([^/]+)\/options.json/),i=C[1],b=C[2],_=C[3],i&&b&&_){t.next=8;break}throw Error("Invalid offering URI: ".concat(r));case 8:if(i?y(i):p(n),v=v.map((function(t){return t.toLowerCase()})),A=A.map((function(t){return t.toLowerCase()})),n){t.next=15;break}n=this.utils.DecodeVersionHash(i).objectId,t.next=19;break;case 15:if(i){t.next=19;break}return t.next=18,this.LatestVersionHash({objectId:n});case 18:i=t.sent;case 19:return t.next=21,this.ContentObjectLibraryId({objectId:n});case 21:if(O=t.sent,t.prev=22,h){t.next=29;break}return R=l("public","asset_metadata","sources",_),t.next=27,this.ContentObjectMetadata({libraryId:O,objectId:n,versionHash:i,metadataSubtree:R,authorizationToken:M});case 27:t.sent&&(h=R);case 29:t.next=33;break;case 31:t.prev=31,t.t0=t.catch(22);case 33:return t.next=35,this.PlayoutPathResolution({libraryId:O,objectId:n,versionHash:i,writeToken:u,linkPath:h,signedLink:d,handler:b,offering:_,authorizationToken:M});case 35:if(j=t.sent,N=j.path,L=j.linkTarget,t.t1=this.authClient,t.t2=L.objectId||n,t.t3=L.versionHash||i,t.t3){t.next=45;break}return t.next=44,this.LatestVersionHash({objectId:n});case 44:t.t3=t.sent;case 45:return t.t4=t.t3,t.t5=v,t.t6=A,t.t7=I,t.t8={objectId:t.t2,versionHash:t.t4,protocols:t.t5,drms:t.t6,context:t.t7},U=t.t1.AudienceData.call(t.t1,t.t8),t.t9=M,t.next=54,this.authClient.AuthorizationToken({libraryId:O,objectId:n,channelAuth:!0,oauthToken:this.oauthToken,audienceData:U});case 54:return t.t10=t.sent,D=[t.t9,t.t10].flat().filter((function(t){return t})),B=c({authorization:D,resolve:!!h},P),t.t11=Object,t.next=60,this.utils.ResponseToJson(this.HttpClient.Request({path:N,method:"GET",queryParams:B}));case 60:if(t.t12=t.sent,z=t.t11.values.call(t.t11,t.t12),d||!L.versionHash){t.next=68;break}return t.t13=M,t.next=66,this.authClient.AuthorizationToken({libraryId:L.libraryId,objectId:L.objectId,channelAuth:!0,oauthToken:this.oauthToken,audienceData:U});case 66:t.t14=t.sent,B.authorization=[t.t13,t.t14].flat().filter((function(t){return t}));case 68:H={},G=0;case 70:if(!(G<z.length)){t.next=116;break}if(V=z[G],K=V.properties.protocol,Z=V.properties.drm,F=F||V.sid,q=q||!!V.properties.multiview,F&&(B.sid=F),W=V.uri.split("?")[0],k&&(W=W.replace("playlist","playlist-".concat(k))),J=V.properties.license_servers,Q=V.properties.cert,S&&"hls"===K&&"aes-128"===Z&&(B.player_profile="hls-js"),t.t15=c,t.t16=c({},H[K]||{}),t.t17={},t.t18=c,t.t19=c({},(H[K]||{}).playoutMethods||{}),t.t20={},t.t21=o,t.t22={},t.t23=Z||"clear",!d){t.next=97;break}return t.next=94,this.LinkUrl({versionHash:i,linkPath:l(h,_,W),queryParams:B,noAuth:!0});case 94:t.t24=t.sent,t.next=100;break;case 97:return t.next=99,this.Rep({libraryId:L.libraryId||O,objectId:L.objectId||n,versionHash:L.versionHash||i,rep:l(b,_,W),noAuth:!0,queryParams:B});case 99:t.t24=t.sent;case 100:for(Y in t.t25=t.t24,t.t26=Z?o({},Z,{licenseServers:J,cert:Q}):void 0,t.t27={playoutUrl:t.t25,drms:t.t26},t.t28=(0,t.t21)(t.t22,t.t23,t.t27),t.t29=(0,t.t18)(t.t19,t.t20,t.t28),t.t30={playoutMethods:t.t29},H[K]=(0,t.t15)(t.t16,t.t17,t.t30),H[K].playoutMethods)H[K].playoutMethods[Y].drms&&H[K].playoutMethods[Y].drms[Z]&&H[K].playoutMethods[Y].drms[Z].cert&&(($=new URL(H[K].playoutMethods[Y].playoutUrl)).pathname=$.pathname.split("/").slice(0,-1).concat(["drm.cert"]).join("/"),H[K].playoutMethods[Y].drms[Z].cert_url=$.toString());if(X=v.includes(K),tt=A.includes(Z||"clear")||0===A.length&&!Z,X&&tt){t.next=112;break}return t.abrupt("continue",113);case 112:(!H[K].playoutUrl||Z&&"clear"!==Z)&&(H[K].playoutUrl=H[K].playoutMethods[Z||"clear"].playoutUrl,H[K].drms=H[K].playoutMethods[Z||"clear"].drms);case 113:G++,t.next=70;break;case 116:return q&&F&&(H.sessionId=F,H.multiview=!0,H.AvailableViews=s(a.mark((function t(){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=et.utils,t.next=3,et.HttpClient.Request({path:l("q",L.versionHash||i,"rep",b,_,"views.json"),method:"GET",queryParams:{sid:F,authorization:D}});case 3:return t.t1=t.sent,t.next=6,t.t0.ResponseToFormat.call(t.t0,"json",t.t1);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)}))),H.SwitchView=function(){var t=s(a.mark((function t(e){return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,et.HttpClient.Request({path:l("q",L.versionHash||i,"rep",b,_,"select_view"),method:"POST",queryParams:{sid:F,authorization:D},body:{view:e}});case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.Log(H),t.abrupt("return",H);case 119:case"end":return t.stop()}}),t,this,[[22,31]])})));return function(e){return t.apply(this,arguments)}}(),e.BitmovinPlayoutOptions=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,h,f,d,m,v,g,b,w,_,k,x,A,I,E,S,M;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,n=e.versionHash,i=e.writeToken,o=e.linkPath,s=e.signedLink,u=void 0!==s&&s,c=e.protocols,l=void 0===c?["dash","hls"]:c,h=e.drms,f=void 0===h?[]:h,d=e.handler,m=void 0===d?"playout":d,v=e.offering,g=void 0===v?"default":v,b=e.playoutType,w=e.context,_=e.authorizationToken,k=e.options,x=void 0===k?{}:k,n?y(n):p(r),r||(r=this.utils.DecodeVersionHash(n).objectId),t.next=5,this.PlayoutOptions({objectId:r,versionHash:n,writeToken:i,linkPath:o,signedLink:u,protocols:l,drms:f,handler:m,offering:g,playoutType:b,hlsjsProfile:!1,context:w,authorizationToken:_,options:x});case 5:return delete(A=t.sent).playoutMethods,t.next=9,this.PlayoutPathResolution({objectId:r,versionHash:n,writeToken:i,linkPath:o,signedLink:u,handler:m,offering:g,authorizationToken:_});case 9:if(I=t.sent,E=I.linkTarget,S=[],_&&S.push(_),!u&&E.versionHash){t.next=21;break}return t.t0=S,t.next=17,this.authClient.AuthorizationToken({objectId:r,channelAuth:!0,oauthToken:this.oauthToken});case 17:t.t1=t.sent,t.t0.push.call(t.t0,t.t1),t.next=26;break;case 21:return t.t2=S,t.next=24,this.authClient.AuthorizationToken({libraryId:E.libraryId,objectId:E.objectId,channelAuth:!0,oauthToken:this.oauthToken});case 24:t.t3=t.sent,t.t2.push.call(t.t2,t.t3);case 26:return M={drm:{}},Object.keys(A).forEach((function(t){var e=A[t];M[t]=e.playoutUrl,e.drms&&Object.keys(e.drms).forEach((function(t){if(e.drms[t].licenseServers&&0!==e.drms[t].licenseServers.length){var r=function(t){return t.toLowerCase().startsWith("https")},n=e.drms[t].licenseServers;n.find(r)&&(n=n.filter(r));var i=n.sort((function(){return.5-Math.random()}))[0];M.drm[t]||(M.drm[t]={LA_URL:i,headers:{Authorization:"Bearer ".concat(S.flat().filter((function(t){return t})).join(","))}})}}))})),t.abrupt("return",M);case 29:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CallBitcodeMethod=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,h,f,d,p,y,m,v,b,w;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.method,u=e.queryParams,c=void 0===u?{}:u,h=e.body,f=void 0===h?{}:h,d=e.headers,p=void 0===d?{}:d,y=e.constant,m=void 0===y||y,v=e.format,b=void 0===v?"json":v,g({libraryId:r,objectId:n,versionHash:i}),s){t.next=4;break}throw"Bitcode method not specified";case 4:if(i&&(n=this.utils.DecodeVersionHash(i).objectId),w=l("q",o||i||n,"call",s),r&&(w=l("qlibs",r,w)),p.authorization||p.Authorization){t.next=12;break}return t.next=11,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!m});case 11:p.Authorization=t.sent.Authorization;case 12:return this.Log("Calling bitcode method: ".concat(r||""," ").concat(n||i," ").concat(o||"","\n ").concat(m?"GET":"POST"," ").concat(w,"\n Query Params:\n ").concat(JSON.stringify(c||""),"\n Body:\n ").concat(JSON.stringify(f||""),"\n Headers\n ").concat(JSON.stringify(p||""))),t.t0=this.utils,t.t1=b,t.next=17,this.HttpClient.Request({body:f,headers:p,method:m?"GET":"POST",path:w,queryParams:c,failover:!1});case 17:return t.t2=t.sent,t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t2));case 19:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Rep=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,h,f,d,p;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.rep,s=e.queryParams,u=void 0===s?{}:s,c=e.channelAuth,l=void 0!==c&&c,h=e.noAuth,f=void 0!==h&&h,d=e.noCache,p=void 0!==d&&d,g({libraryId:r,objectId:n,versionHash:i}),o){t.next=4;break}throw"Rep not specified";case 4:return t.abrupt("return",this.FabricUrl({libraryId:r,objectId:n,versionHash:i,rep:o,queryParams:u,channelAuth:l,noAuth:f,noCache:p}));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.PublicRep=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.rep,s=e.queryParams,u=void 0===s?{}:s,g({libraryId:r,objectId:n,versionHash:i}),o){t.next=4;break}throw"Rep not specified";case 4:return t.abrupt("return",this.FabricUrl({libraryId:r,objectId:n,versionHash:i,publicRep:o,queryParams:u,noAuth:!0}));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FabricUrl=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,h,f,d,p,y,m,v,b,w,_,k,x;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.partHash,u=e.rep,h=e.publicRep,f=e.call,d=e.queryParams,p=void 0===d?{}:d,y=e.channelAuth,m=void 0!==y&&y,v=e.noAuth,b=void 0!==v&&v,w=e.noCache,_=void 0!==w&&w,(n||i)&&g({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),this.Log("Building Fabric URL:\n libraryId: ".concat(r,"\n objectId: ").concat(n,"\n versionHash: ").concat(i,"\n writeToken: ").concat(o,"\n partHash: ").concat(s,"\n rep: ").concat(u,"\n publicRep: ").concat(h,"\n call: ").concat(f,"\n channelAuth: ").concat(m,"\n noAuth: ").concat(b,"\n noCache: ").concat(_,"\n queryParams: ").concat(JSON.stringify(p||{},null,2))),k=[],p.authorization&&k.push(p.authorization),b&&p.authorization){t.next=12;break}return t.t0=k,t.next=10,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,channelAuth:m,noAuth:b,noCache:_});case 10:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 12:if(p=c(c({},p),{},{authorization:k.flat()}),!u&&!h||!n||i){t.next=17;break}return t.next=16,this.LatestVersionHash({objectId:n});case 16:i=t.sent;case 17:return x="",r?(x=l(x,"qlibs",r),(n||i)&&(x=l(x,"q",o||i||n))):i&&(x=l("q",i)),s?x=l(x,"data",s):u?x=l(x,"rep",u):h?x=l(x,"public",h):f&&(x=l(x,"call",f)),t.abrupt("return",this.HttpClient.URL({path:x,queryParams:p}));case 21:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FileUrl=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,h,f,d,p,y,m;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.filePath,u=e.queryParams,h=void 0===u?{}:u,f=e.noCache,d=void 0!==f&&f,g({libraryId:r,objectId:n,versionHash:i}),s){t.next=4;break}throw"File path not specified";case 4:return i&&(n=this.utils.DecodeVersionHash(i).objectId),p=r?l("qlibs",r,"q",o||i||n):l("q",i),t.next=8,this.authClient.AuthorizationToken({libraryId:r,objectId:n,noCache:d});case 8:return y=t.sent,h=c(c({},h),{},{authorization:y}),t.next=12,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:o,metadataSubtree:l("files",s)});case 12:return m=t.sent,m&&m["."].encryption&&"cgck"===m["."].encryption.scheme?(p=l(p,"rep","files_download",s),h["header-x_decryption_mode"]="decrypt"):p=l(p,"files",s),t.abrupt("return",this.HttpClient.URL({path:p,queryParams:h}));case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectImageUrl=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.height,s=e.imagePath,u=void 0===s?"public/display_image":s,g({libraryId:r,objectId:n,versionHash:i}),i){t.next=6;break}return t.next=5,this.LatestVersionHash({objectId:n});case 5:i=t.sent;case 6:if(this.Log("Retrieving content object image url: ".concat(r," ").concat(n," ").concat(i)),this.objectImageUrls[i]){t.next=26;break}return t.prev=8,t.next=11,this.ContentObjectMetadata({versionHash:i,metadataSubtree:u});case 11:if(t.sent){t.next=15;break}return this.Log("No image url set: ".concat(r," ").concat(n," ").concat(i)),t.abrupt("return");case 15:t.next=21;break;case 17:t.prev=17,t.t0=t.catch(8),this.Log("Unable to query for image metadata: ".concat(r," ").concat(n," ").concat(i),!0),this.Log(t.t0,!0);case 21:return c={},o&&!isNaN(parseInt(o))&&(c.height=parseInt(o)),t.next=25,this.LinkUrl({versionHash:i,linkPath:u,queryParams:c});case 25:this.objectImageUrls[i]=t.sent;case 26:return t.abrupt("return",this.objectImageUrls[i]);case 27:case"end":return t.stop()}}),t,this,[[8,17]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectGraph=function(){var t=s(a.mark((function t(e){var r,n,i,o,u,c,h,f,d,p,y=this;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.autoUpdate,u=void 0!==o&&o,c=e.select,g({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving content object graph: ".concat(r||""," ").concat(n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),h=l("q",i||n,"links"),t.prev=5,t.t0=this.utils,t.t1=this.HttpClient,t.next=10,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 10:return t.t2=t.sent,t.t3={auto_update:u,select:c},t.t4=h,t.t5={headers:t.t2,queryParams:t.t3,method:"GET",path:t.t4},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=17,t.t0.ResponseToJson.call(t.t0,t.t6);case 17:return t.abrupt("return",t.sent);case 20:if(t.prev=20,t.t7=t.catch(5),t.prev=22,(d=t.t7.body.errors[0].cause.cause.cause.cycle)&&0!==d.length){t.next=26;break}throw t.t7;case 26:return p={},t.next=29,Promise.all(d.map(function(){var t=s(a.mark((function t(e){var r,n;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!p[e]){t.next=2;break}return t.abrupt("return");case 2:return r=y.utils.DecodeVersionHash(e).objectId,t.next=5,y.ContentObjectMetadata({versionHash:e,metadataSubtree:"public/asset_metadata/display_title"});case 5:if(t.t2=t.sent,t.t2){t.next=10;break}return t.next=9,y.ContentObjectMetadata({versionHash:e,metadataSubtree:"public/name"});case 9:t.t2=t.sent;case 10:if(t.t1=t.t2,t.t1){t.next=15;break}return t.next=14,y.ContentObjectMetadata({versionHash:e,metadataSubtree:"name"});case 14:t.t1=t.sent;case 15:if(t.t0=t.t1,t.t0){t.next=18;break}t.t0=r;case 18:n=t.t0,p[e]={name:n,objectId:r};case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 29:f=d.map((function(t){return"".concat(p[t].name," (").concat(p[t].objectId,")")})),t.next=35;break;case 32:throw t.prev=32,t.t8=t.catch(22),t.t7;case 35:throw new Error("Cycle found in links: ".concat(f.join(" -> ")));case 36:case"end":return t.stop()}}),t,this,[[5,20],[22,32]])})));return function(e){return t.apply(this,arguments)}}(),e.LinkTarget=function(){var t=s(a.mark((function t(e){var r,n,o,s,u,c,l,h,f;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,o=e.versionHash,s=e.writeToken,u=e.linkPath,c=e.authorizationToken,l=e.linkInfo,g({libraryId:r,objectId:n,versionHash:o}),s&&v(s),o&&(n=this.utils.DecodeVersionHash(o).objectId),!s||r){t.next=8;break}return t.next=7,this.ContentObjectLibraryId({objectId:n});case 7:r=t.sent;case 8:if(l){t.next=12;break}return t.next=11,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:o,writeToken:s,metadataSubtree:u,resolveLinks:!1,resolveIgnoreErrors:!0,resolveIncludeSource:!0,authorizationToken:c});case 11:l=t.sent;case 12:if(!l||!l["/"]){t.next=27;break}if((h=((l["/"]||"").match(/^\/?qfab\/([\w]+)\/?.+/)||[])[1])||(h=l["."].container),!h){t.next=19;break}return t.abrupt("return",h);case 19:if(!o){t.next=21;break}return t.abrupt("return",o);case 21:if(t.t0=o,t.t0){t.next=26;break}return t.next=25,this.LatestVersionHash({objectId:n});case 25:t.t0=t.sent;case 26:return t.abrupt("return",t.t0);case 27:return t.next=29,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:o,writeToken:s,metadataSubtree:u,resolveIncludeSource:!0,authorizationToken:c});case 29:if((l=t.sent)&&l["."]){t.next=49;break}if("object"!==i(l)){t.next=38;break}if(t.t1=o,t.t1){t.next=37;break}return t.next=36,this.LatestVersionHash({objectId:n});case 36:t.t1=t.sent;case 37:return t.abrupt("return",t.t1);case 38:if(f=u.split("/").slice(0,-1).join("/")){t.next=46;break}if(t.t2=o,t.t2){t.next=45;break}return t.next=44,this.LatestVersionHash({objectId:n});case 44:t.t2=t.sent;case 45:return t.abrupt("return",t.t2);case 46:return t.next=48,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:o,writeToken:s,metadataSubtree:f,resolveIncludeSource:!0,authorizationToken:c});case 48:l=t.sent;case 49:return t.abrupt("return",l["."].source);case 50:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LinkUrl=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,h,f,d,p,y,m,b,w,_;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.linkPath,u=e.mimeType,h=e.authorizationToken,f=e.queryParams,d=void 0===f?{}:f,p=e.channelAuth,y=void 0!==p&&p,m=e.noAuth,b=void 0!==m&&m,g({libraryId:r,objectId:n,versionHash:i}),o&&v(o),s){t.next=5;break}throw Error("Link path not specified");case 5:return i&&(n=this.utils.DecodeVersionHash(i).objectId),w=r?l("qlibs",r,"q",o||i||n,"meta",s):l("q",i,"meta",s),_=[h],t.t0=_,t.next=11,this.MetadataAuth({libraryId:r,objectId:n,versionHash:i,path:s,channelAuth:y,noAuth:b});case 11:return t.t1=t.sent,t.t0.push.call(t.t0,t.t1),d.authorization&&_.push(d.authorization),d=c(c({},d),{},{authorization:_.flat().filter((function(t){return t})),resolve:!0}),u&&(d["header-accept"]=u),t.abrupt("return",this.HttpClient.URL({path:w,queryParams:d}));case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LinkData=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,f,d,p;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.linkPath,u=e.queryParams,c=void 0===u?{}:u,l=e.format,f=void 0===l?"json":l,d=e.channelAuth,t.next=3,this.LinkUrl({libraryId:r,objectId:n,versionHash:i,writeToken:o,linkPath:s,queryParams:c,channelAuth:d});case 3:return p=t.sent,t.t0=this.utils,t.t1=f,t.next=8,h.Fetch(p);case 8:return t.t2=t.sent,t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t2));case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateEncryptionConk=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,h,f,d;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.createKMSConk,u=void 0===s||s,!this.signer.remoteSigner){t.next=3;break}return t.abrupt("return");case 3:if(g({libraryId:r,objectId:n,versionHash:i}),v(o),n||(n=client.DecodeVersionHash(i).objectId),r){t.next=10;break}return t.next=9,this.ContentObjectLibraryId({objectId:n});case 9:r=t.sent;case 10:return c="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=13,this.ContentObjectMetadata({libraryId:r,objectId:n,writeToken:o,metadataSubtree:c});case 13:if(!(l=t.sent)){t.next=20;break}return t.next=17,this.Crypto.DecryptCap(l,this.signer.signingKey.privateKey);case 17:this.encryptionConks[n]=t.sent,t.next=34;break;case 20:return t.next=22,this.Crypto.GeneratePrimaryConk({spaceId:this.contentSpaceId,objectId:n});case 22:return this.encryptionConks[n]=t.sent,t.t0=this,t.t1=r,t.t2=n,t.t3=o,t.t4=c,t.next=30,this.Crypto.EncryptConk(this.encryptionConks[n],this.signer.signingKey.publicKey);case 30:return t.t5=t.sent,t.t6={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4,metadata:t.t5},t.next=34,t.t0.ReplaceMetadata.call(t.t0,t.t6);case 34:if(!u){t.next=64;break}return t.prev=35,t.next=38,this.authClient.KMSAddress({objectId:n});case 38:return h=t.sent,t.next=41,this.authClient.KMSInfo({objectId:n});case 41:return f=t.sent.publicKey,d="eluv.caps.ikms".concat(this.utils.AddressToHash(h)),t.next=45,this.ContentObjectMetadata({libraryId:r,objectId:n,writeToken:o,metadataSubtree:d});case 45:if(t.sent){t.next=58;break}return t.t7=this,t.t8=r,t.t9=n,t.t10=o,t.t11=d,t.next=54,this.Crypto.EncryptConk(this.encryptionConks[n],f);case 54:return t.t12=t.sent,t.t13={libraryId:t.t8,objectId:t.t9,writeToken:t.t10,metadataSubtree:t.t11,metadata:t.t12},t.next=58,t.t7.ReplaceMetadata.call(t.t7,t.t13);case 58:t.next=64;break;case 60:t.prev=60,t.t14=t.catch(35),console.error("Failed to create encryption cap for KMS:"),console.error(t.t14);case 64:return t.abrupt("return",this.encryptionConks[n]);case 65:case"end":return t.stop()}}),t,this,[[35,60]])})));return function(e){return t.apply(this,arguments)}}(),e.EncryptionConk=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,h,f,d;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,s=e.download,u=void 0!==s&&s,g({libraryId:r,objectId:n,versionHash:i}),o&&v(o),n||(n=client.DecodeVersionHash(i).objectId),t.next=6,this.authClient.Owner({id:n});case 6:return c=t.sent,l="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=10,this.ContentObjectMetadata({libraryId:r,objectId:n,metadataSubtree:l});case 10:if(h=t.sent,this.utils.EqualAddress(c,this.signer.address)||h){t.next=21;break}if(!u){t.next=18;break}return t.next=15,this.authClient.ReEncryptionConk({libraryId:r,objectId:n,versionHash:i});case 15:return t.abrupt("return",t.sent);case 18:return t.next=20,this.authClient.EncryptionConk({libraryId:r,objectId:n,versionHash:i});case 20:return t.abrupt("return",t.sent);case 21:if(this.encryptionConks[n]){t.next=38;break}return f="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=25,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:o,metadataSubtree:f});case 25:if(!(d=t.sent)){t.next=32;break}return t.next=29,this.Crypto.DecryptCap(d,this.signer.signingKey.privateKey);case 29:this.encryptionConks[n]=t.sent,t.next=38;break;case 32:if(!o){t.next=37;break}return t.next=35,this.CreateEncryptionConk({libraryId:r,objectId:n,versionHash:i,writeToken:o,createKMSConk:!1});case 35:t.next=38;break;case 37:throw"No encryption conk present for "+n;case 38:return t.abrupt("return",this.encryptionConks[n]);case 39:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Encrypt=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,o=e.chunk,g({libraryId:r,objectId:n}),t.next=4,this.EncryptionConk({libraryId:r,objectId:n,writeToken:i});case 4:return s=t.sent,t.next=7,this.Crypto.Encrypt(s,o);case 7:return u=t.sent,t.abrupt("return",u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Decrypt=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,o=e.chunk,g({libraryId:r,objectId:n}),t.next=4,this.EncryptionConk({libraryId:r,objectId:n,writeToken:i,download:!0});case 4:return s=t.sent,t.next=7,this.Crypto.Decrypt(s,o);case 7:return u=t.sent,t.abrupt("return",u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessType=function(){var t=s(a.mark((function t(e){var r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.id,t.next=3,this.authClient.AccessType(r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessInfo=function(){var t=s(a.mark((function t(e){var r,n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,n=e.args,p(r),n||(n=[0,[],[]]),this.Log("Retrieving access info: ".concat(r)),t.next=6,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"getAccessInfo",methodArgs:n});case 6:return i=t.sent,this.Log(i),t.abrupt("return",{visibilityCode:i[0],visible:i[0]>=1,accessible:i[0]>=10,editable:i[0]>=100,hasAccess:0===i[1],accessCode:i[1],accessCharge:this.utils.WeiToEther(i[2]).toString()});case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessRequest=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u,c,l,h;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.args,s=void 0===o?[]:o,u=e.update,c=void 0!==u&&u,l=e.noCache,h=void 0!==l&&l,g({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),t.next=5,this.authClient.MakeAccessRequest({libraryId:r,objectId:n,versionHash:i,args:s,update:c,skipCache:!0,noCache:h});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetAuthContext=function(t){var e=t.context;if(e&&Object.values(e).find((function(t){return"string"!=typeof t})))throw Error("Context must be a map of string->string");this.authContext=e},e.GenerateStateChannelToken=function(){var t=s(a.mark((function t(e){var r,n,i,o,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.versionHash,i=e.context,o=e.noCache,s=void 0!==o&&o,n?y(n):p(r),!n){t.next=6;break}r=this.utils.DecodeVersionHash(n).objectId,t.next=10;break;case 6:if(this.stateChannelAccess[r]){t.next=10;break}return t.next=9,this.LatestVersionHash({objectId:r});case 9:n=t.sent;case 10:return this.stateChannelAccess[r]=n,t.next=13,this.authClient.AuthorizationToken({objectId:r,channelAuth:!0,oauthToken:this.oauthToken,context:i,noCache:s});case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeStateChannelAccess=function(){var t=s(a.mark((function t(e){var r,n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.versionHash,i=e.percentComplete,n?y(n):p(r),!n){t.next=6;break}r=this.utils.DecodeVersionHash(n).objectId,t.next=13;break;case 6:if(!this.stateChannelAccess[r]){t.next=10;break}n=this.stateChannelAccess[r],t.next=13;break;case 10:return t.next=12,this.LatestVersionHash({objectId:r});case 12:n=t.sent;case 13:return this.stateChannelAccess[r]=void 0,t.next=16,this.authClient.ChannelContentFinalize({objectId:r,versionHash:n,percent:i});case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectAccessComplete=function(){var t=s(a.mark((function t(e){var r,n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.score,i=void 0===n?100:n,p(r),!(i<0||i>100)){t.next=4;break}throw Error("Invalid AccessComplete score: "+i);case 4:return t.next=6,this.authClient.AccessComplete({id:r,score:i});case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Collection=function(){var t=s(a.mark((function t(e){var r;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.collectionType,["accessGroups","contentObjects","contentTypes","contracts","libraries"].includes(r)){t.next=4;break}throw new Error("Invalid collection type: "+r);case 4:if(!this.signer){t.next=10;break}return t.next=7,this.userProfileClient.WalletAddress();case 7:t.t0=t.sent,t.next=11;break;case 10:t.t0=void 0;case 11:if(t.t0){t.next=14;break}throw new Error("Unable to get collection: User wallet doesn't exist");case 14:return this.Log("Retrieving ".concat(r," contract collection for user ").concat(this.signer.address)),t.next=17,this.ethClient.MakeProviderCall({methodName:"send",args:["elv_getWalletCollection",[this.contentSpaceId,"iusr".concat(this.utils.AddressToHash(this.signer.address)),r]]});case 17:if(t.t1=t.sent,t.t1){t.next=20;break}t.t1=[];case 20:return t.abrupt("return",t.t1);case 21:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.VerifyContentObject=function(){var t=s(a.mark((function t(e){var r,n,i;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,g({libraryId:r,objectId:n,versionHash:i}),t.next=4,ContentObjectVerification.VerifyContentObject({client:this,libraryId:r,objectId:n,versionHash:i});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Proofs=function(){var t=s(a.mark((function t(e){var r,n,i,o,s;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.partHash,g({libraryId:r,objectId:n,versionHash:i}),m(o),i&&(n=this.utils.DecodeVersionHash(i).objectId),s=l("q",i||n,"data",o,"proofs"),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 9:return t.t2=t.sent,t.t3=s,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.QParts=function(){var t=s(a.mark((function t(e){var r,n,i,o,s,u;return a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.partHash,o=e.format,s=void 0===o?"blob":o,g({libraryId:r,objectId:n,versionHash:versionHash}),m(i),u=l("qparts",i),t.t0=this.utils,t.t1=s,t.t2=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,partHash:i});case 9:return t.t3=t.sent,t.t4=u,t.t5={headers:t.t3,method:"GET",path:t.t4},t.t6=t.t2.Request.call(t.t2,t.t5),t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t6));case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},function(t,e,r){var n=r(3),i=r(4),o=r(15),a=r(16),s=r(25),u="undefined"!=typeof fetch?fetch:r(32).default,c=r(33).LogMessage,l=function(){"use strict";function t(e){var r=e.uris,n=e.debug;o(this,t),this.uris=r,this.uriIndex=0,this.debug=n,this.draftURIs={}}var e;return a(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c(this,t,e)}},{key:"BaseURI",value:function(){return new s(this.uris[this.uriIndex])}},{key:"RecordWriteToken",value:function(t){this.draftURIs[t]=this.BaseURI()}},{key:"RequestHeaders",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.Accept||(e.Accept="application/json"),"JSON"===t?e["Content-type"]="application/json":"BINARY"===t&&(e["Content-type"]="application/octet-stream"),e}},{key:"Request",value:(e=i(n.mark((function e(r){var i,o,a,s,u,c,l,h,f,d,p,y,m,v,g,b,w,_,k,x,A,I,E,S;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.method,o=r.path,a=r.queryParams,s=void 0===a?{}:a,u=r.body,c=r.bodyType,l=void 0===c?"JSON":c,h=r.headers,f=void 0===h?{}:h,d=r.attempts,p=void 0===d?0:d,y=r.failover,m=void 0===y||y,v=r.forceFailover,g=void 0!==v&&v,b=this.BaseURI(),w=o.replace(/^\//,"").match(/(qlibs\/ilib[a-zA-Z0-9]+|q|qid)\/(tqw_[a-zA-Z0-9]+)/),(_=w?w[2]:void 0)&&(this.draftURIs[_]?b=this.draftURIs[_]:this.draftURIs[_]=b),k=b.path(o).query(s).hash(""),x={method:i,headers:this.RequestHeaders(l,f)},"POST"!==i&&"PUT"!==i&&"DELETE"!==i||(u&&"JSON"===l?x.body=JSON.stringify(u):u&&(x.body=u)),e.prev=8,e.next=11,t.Fetch(k.toString(),x);case 11:A=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),A={ok:!1,status:500,statusText:"ElvClient Error: "+e.t0.message,url:k.toString(),stack:e.t0.stack};case 17:if(A.ok){e.next=40;break}if(!(!_&&(m&&parseInt(A.status)>=500||g)&&p<this.uris.length)){e.next=24;break}return this.Log("HttpClient failing over from ".concat(this.BaseURI(),": ").concat(p+1," attempts"),!0),this.uriIndex=(this.uriIndex+1)%this.uris.length,e.next=23,this.Request({method:i,path:o,queryParams:s,body:u,bodyType:l,headers:f,attempts:p+1,forceFailover:g});case 23:return e.abrupt("return",e.sent);case 24:if(I=A.headers&&A.headers.get("content-type")||"",E="",!A.text||!A.json){e.next=37;break}if(!I.includes("application/json")){e.next=33;break}return e.next=30,A.json();case 30:e.t1=e.sent,e.next=36;break;case 33:return e.next=35,A.text();case 35:e.t1=e.sent;case 36:E=e.t1;case 37:throw S={name:"ElvHttpClientError",status:A.status,statusText:A.statusText,message:A.statusText,url:k.toString(),body:E,requestParams:x},this.Log(JSON.stringify(S,null,2),!0),S;case 40:return this.Log("".concat(A.status," - ").concat(i," ").concat(k.toString())),e.abrupt("return",A);case 42:case"end":return e.stop()}}),e,this,[[8,14]])}))),function(t){return e.apply(this,arguments)})},{key:"URL",value:function(t){var e=t.path,r=t.queryParams,n=void 0===r?{}:r;return this.BaseURI().path(e).query(n).hash("").toString()}}],[{key:"Fetch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(t,e)}}]),t}();t.exports=l},function(t,e,r){var n=r(78),i=r(135)((function(t,e,r,i){n(t,e,r,i)}));t.exports=i},function(t,e,r){var n=r(79),i=r(38),o=r(110),a=r(112),s=r(1),u=r(48),c=r(47);t.exports=function t(e,r,l,h,f){e!==r&&o(r,(function(o,u){if(f||(f=new n),s(o))a(e,r,u,l,t,h,f);else{var d=h?h(c(e,u),o,u+"",e,r,f):void 0;void 0===d&&(d=o),i(e,u,d)}}),u)}},function(t,e,r){var n=r(9),i=r(85),o=r(86),a=r(87),s=r(88),u=r(89);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(10),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(10);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(10);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(10);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(9);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(9),i=r(35),o=r(97);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(19),i=r(93),o=r(1),a=r(95),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?f:s).test(a(t))}},function(t,e,r){var n=r(36),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=a.call(t);return n&&(e?t[s]=r:delete t[s]),i}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,i=r(94),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},function(t,e,r){var n=r(2)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(98),i=r(105),o=r(107),a=r(108),s=r(109);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(99),i=r(9),o=r(35);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(100),i=r(101),o=r(102),a=r(103),s=r(104);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(13);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(13),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(13),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},function(t,e,r){var n=r(13);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,r){var n=r(14);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=r(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(14);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(14);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(14);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(111)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},function(t,e,r){var n=r(38),i=r(113),o=r(114),a=r(117),s=r(118),u=r(42),c=r(43),l=r(122),h=r(45),f=r(19),d=r(1),p=r(124),y=r(46),m=r(47),v=r(128);t.exports=function(t,e,r,g,b,w,_){var k=m(t,r),x=m(e,r),A=_.get(x);if(A)n(t,r,A);else{var I=w?w(k,x,r+"",t,e,_):void 0,E=void 0===I;if(E){var S=c(x),M=!S&&h(x),T=!S&&!M&&y(x);I=x,S||M||T?c(k)?I=k:l(k)?I=a(k):M?(E=!1,I=i(x,!0)):T?(E=!1,I=o(x,!0)):I=[]:p(x)||u(x)?(I=k,u(k)?I=v(k):d(k)&&!f(k)||(I=s(x))):E=!1}E&&(_.set(x,I),b(I,x,g,w,_),_.delete(x)),n(t,r,I)}}},function(t,e,r){(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(2),o="object"==n(e)&&e&&!e.nodeType&&e,a=o&&"object"==n(t)&&t&&!t.nodeType&&t,s=a&&a.exports===o?i.Buffer:void 0,u=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(0)(t))},function(t,e,r){var n=r(115);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(116);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){var n=r(2).Uint8Array;t.exports=n},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(119),i=r(40),o=r(41);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},function(t,e,r){var n=r(1),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(12),i=r(6);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},function(t,e,r){var n=r(21),i=r(6);t.exports=function(t){return i(t)&&n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(12),i=r(40),o=r(6),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==l}},function(t,e,r){var n=r(12),i=r(44),o=r(6),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[n(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(37),o="object"==n(e)&&e&&!e.nodeType&&e,a=o&&"object"==n(t)&&t&&!t.nodeType&&t,s=a&&a.exports===o&&i.process,u=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=u}).call(this,r(0)(t))},function(t,e,r){var n=r(129),i=r(48);t.exports=function(t){return n(t,i(t))}},function(t,e,r){var n=r(130),i=r(20);t.exports=function(t,e,r,o){var a=!r;r||(r={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=o?o(r[c],t[c],c,r,t):void 0;void 0===l&&(l=t[c]),a?i(r,c,l):n(r,c,l)}return r}},function(t,e,r){var n=r(20),i=r(11),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var a=t[e];o.call(t,e)&&i(a,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(132),i=r(42),o=r(43),a=r(45),s=r(49),u=r(46),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),l=!r&&i(t),h=!r&&!l&&a(t),f=!r&&!l&&!h&&u(t),d=r||l||h||f,p=d?n(t.length,String):[],y=p.length;for(var m in t)!e&&!c.call(t,m)||d&&("length"==m||h&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,y))||p.push(m);return p}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(1),i=r(41),o=r(134),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&r.push(s);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){var n=r(136),i=r(143);t.exports=function(t){return n((function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,a)}return e}))}},function(t,e,r){var n=r(50),i=r(137),o=r(139);t.exports=function(t,e){return o(i(t,e,n),t+"")}},function(t,e,r){var n=r(138),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=r(u),n(t,this,c)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(140),i=r(142)(n);t.exports=i},function(t,e,r){var n=r(141),i=r(39),o=r(50),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=Date.now;t.exports=function(t){var e=0,n=0;return function(){var i=r(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(11),o=r(21),a=r(49),s=r(1);t.exports=function(t,e,r){if(!s(r))return!1;var u=n(e);return!!("number"==u?o(r)&&a(e,r.length):"string"==u&&e in r)&&i(r[e],t)}},function(t,e,r){(function(t,n){var i=r(7),o=r(3),a=r(4);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var c,l=r(17);l.Platform()===l.PLATFORM_NODE&&(t.Response=r(32).Response,c=r(145));var h=r(31),f=r(34),d=f.ValidatePresence,p=f.ValidateWriteToken,y=f.ValidatePartHash,m=f.ValidateParameters;e.ListFiles=function(){var t=a(o.mark((function t(e){var r,n,i,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,m({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),a=h("q",i||n,"meta","files"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 8:return t.t2=t.sent,t.t3=a,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFilesFromS3=function(){var t=a(o.mark((function t(e){var r,i,a,s,c,l,h,f,d,y,v,g,b,w,_,k,x,A,I,E,S,M,T,P,C,O,R,j,N;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.libraryId,i=e.objectId,a=e.writeToken,s=e.region,c=e.bucket,l=e.fileInfo,h=e.accessKey,f=e.secret,d=e.signedUrl,y=e.encryption,v=void 0===y?"none":y,g=e.copy,b=void 0!==g&&g,w=e.callback,m({libraryId:r,objectId:i}),p(a),_=/^s3:\/\/([^/]+)\//i,k=0;case 5:if(!(k<l.length)){t.next=18;break}if(x=l[k].source,!(A=_.exec(x))){t.next=15;break}if(A[1]===c){t.next=14;break}throw Error('Full S3 file path "'+x+"\" specified, but does not match provided bucket name '"+c+"'");case 14:l[k].source=x.replace(_,"");case 15:k++,t.next=5;break;case 18:if(this.Log("Uploading files from S3: ".concat(r," ").concat(i," ").concat(a)),"cgck"!==v){t.next=25;break}return t.next=22,this.EncryptionConk({libraryId:r,objectId:i,writeToken:a});case 22:E=u(u({},E=t.sent),{},{secret_key:""}),I="kp__".concat(this.utils.B58(n.from(JSON.stringify(E))));case 25:return S={access_key_id:h,secret_access_key:f},d&&(S={signed_url:d}),M={encryption_key:I,access:{protocol:"s3",platform:"aws",path:c,storage_endpoint:{region:s},cloud_credentials:S}},T=l.map((function(t){return b?{op:"ingest-copy",path:t.path,encryption:{scheme:"cgck"===v?"cgck":"none"},ingest:{type:"key",path:t.source}}:{op:"add-reference",path:t.path,reference:{type:"key",path:t.source}}})),t.next=31,this.CreateFileUploadJob({libraryId:r,objectId:i,writeToken:a,ops:T,defaults:M});case 31:P=t.sent,C=P.id;case 33:return t.next=36,new Promise((function(t){return setTimeout(t,1e3)}));case 36:return t.next=38,this.UploadStatus({libraryId:r,objectId:i,writeToken:a,uploadId:C});case 38:if(!((O=t.sent).errors&&O.errors.length>1)){t.next=43;break}throw O.errors.join("\n");case 43:if(!O.error){t.next=48;break}throw this.Log("S3 file upload failed:\n".concat(JSON.stringify(O,null,2))),O.error;case 48:if("failed"!==O.status.toLowerCase()){t.next=50;break}throw"File upload failed";case 50:if(R=!1,b?(R=O.ingest_copy.done,w&&(j=O.ingest_copy.progress,w({done:R,uploaded:j.bytes.completed,total:j.bytes.total,uploadedFiles:j.files.completed,totalFiles:j.files.total,fileStatus:j.files.details}))):(R=O.add_reference.done,w&&(N=O.add_reference.progress,w({done:R,uploadedFiles:N.completed,totalFiles:N.total}))),!R){t.next=54;break}return t.abrupt("break",56);case 54:t.next=33;break;case 56:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFiles=function(){var t=a(o.mark((function t(e){var r,i,s,l,h,f,d,y,v,g,b,w,_,k,x,A,I,E,S,M,T,P,C,O,R,j,N,L,U=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,i=e.objectId,s=e.writeToken,l=e.fileInfo,h=e.encryption,f=void 0===h?"none":h,d=e.callback,m({libraryId:r,objectId:i}),p(s),this.Log("Uploading files: ".concat(r," ").concat(i," ").concat(s)),"cgck"!==f){t.next=8;break}return t.next=7,this.EncryptionConk({libraryId:r,objectId:i,writeToken:s});case 7:y=t.sent;case 8:for(v={},g={},b=0;b<l.length;b++)(w=u(u({},l[b]),{},{data:void 0})).path=w.path.replace(/^\/+/,""),"cgck"===f&&(w.encryption={scheme:"cgck"}),g[w.path]=l[b].data,delete w.data,w.type="file",v[w.path]={uploaded:0,total:w.size},l[b]=w;return this.Log(l),d&&d(v),t.next=15,this.CreateFileUploadJob({libraryId:r,objectId:i,writeToken:s,ops:l,encryption:f});case 15:_=t.sent,k=_.id,x=_.jobs,this.Log("Upload ID: ".concat(k)),this.Log(x),104857600,A=[],I=0,E=0,S=function(){var t=a(o.mark((function t(){var e,a,u,l,h,d;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e<x.length)){t.next=31;break}case 2:if(!(I-E>104857600)){t.next=7;break}return t.next=5,new Promise((function(t){return setTimeout(t,500)}));case 5:t.next=2;break;case 7:return a=x[e],t.next=10,U.UploadJobStatus({libraryId:r,objectId:i,writeToken:s,uploadId:k,jobId:a});case 10:u=t.sent,l=0;case 12:if(!(l<u.files.length)){t.next=25;break}if(h=u.files[l],d=void 0,"number"==typeof g[h.path]?(d=n.alloc(h.len),c.readSync(g[h.path],d,0,h.len,h.off)):d=g[h.path].slice(h.off,h.off+h.len),"cgck"!==f){t.next=20;break}return t.next=19,U.Crypto.Encrypt(y,d);case 19:d=t.sent;case 20:u.files[l].data=d,I+=h.len;case 22:l++,t.next=12;break;case 25:return A[e]=u,t.next=28,new Promise((function(t){return setTimeout(t,50)}));case 28:e++,t.next=1;break;case 31:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=a(o.mark((function t(e,n){var a,c,l,h;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A[n]){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,500)}));case 3:t.next=0;break;case 5:a=A[n],c=a.files,l=0;case 8:if(!(l<c.length)){t.next=18;break}return h=c[l],t.next=12,U.UploadFileData({libraryId:r,objectId:i,writeToken:s,uploadId:k,jobId:e,fileData:h.data});case 12:delete A[n].files[l].data,E+=h.len,d&&(v[h.path]=u(u({},v[h.path]),{},{uploaded:v[h.path].uploaded+h.len}),d(v));case 15:l++,t.next=8;break;case 18:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),S(),T=Math.min(3,x.length),P=[],C=0;case 30:if(!(C<T)){t.next=40;break}return O=(new Date).getTime(),t.next=34,M(x[C],C);case 34:R=((new Date).getTime()-O)/1e3,j=A[C].files.map((function(t){return t.len})).reduce((function(t,e){return t+e}),0),P.push(j/R/1048576);case 37:C++,t.next=30;break;case 40:return N=P.reduce((function(t,e){return t+e}),0)/T,L=Math.min(5,Math.ceil(N/2)),t.next=44,this.utils.LimitedMap(L,x,function(){var t=a(o.mark((function t(e,r){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r<T)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,M(e,r);case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 44:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateFileUploadJob=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,u,c,l,f,d;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.ops,s=e.defaults,u=void 0===s?{}:s,c=e.encryption,l=void 0===c?"none":c,m({libraryId:r,objectId:n}),p(i),this.Log("Creating file upload job: ".concat(r," ").concat(n," ").concat(i)),this.Log(a),"cgck"===l&&(u.encryption={scheme:"cgck"}),f={seq:0,seq_complete:!0,defaults:u,ops:a},d=h("q",i,"file_jobs"),t.t0=this.utils,t.t1=this.HttpClient,t.next=12,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:l});case 12:return t.t2=t.sent,t.t3=d,t.t4=f,t.t5={headers:t.t2,method:"POST",path:t.t3,body:t.t4,failover:!1},t.t6=t.t1.Request.call(t.t1,t.t5),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t6));case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadStatus=function(){var t=a(o.mark((function t(e){var r,n,i,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.uploadId,m({libraryId:r,objectId:n}),p(i),s=h("q",i,"file_jobs",a),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 8:return t.t2=t.sent,t.t3=s,t.t4={headers:t.t2,method:"GET",path:t.t3,failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadJobStatus=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,u;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.uploadId,s=e.jobId,m({libraryId:r,objectId:n}),p(i),u=h("q",i,"file_jobs",a,"uploads",s),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 8:return t.t2=t.sent,t.t3=u,t.t4={headers:t.t2,method:"GET",path:t.t3,failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFileData=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,c,l;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.uploadId,s=e.jobId,c=e.fileData,m({libraryId:r,objectId:n}),p(i),l=h("q",i,"file_jobs",a,s),t.t0=this.utils,t.t1=this.HttpClient,t.t2=l,t.t3=c,t.t4=u,t.t5={"Content-type":"application/octet-stream"},t.next=12,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 12:return t.t6=t.sent,t.t7=(0,t.t4)(t.t5,t.t6),t.t8={method:"POST",path:t.t2,body:t.t3,bodyType:"BINARY",headers:t.t7,failover:!1},t.t9=t.t1.Request.call(t.t1,t.t8),t.next=18,t.t0.ResponseToJson.call(t.t0,t.t9);case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeUploadJob=function(){var t=a(o.mark((function t(e){var r,n,i,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,m({libraryId:r,objectId:n}),p(i),this.Log("Finalizing upload job: ".concat(r," ").concat(n," ").concat(i)),a=h("q",i,"files"),t.t0=this.HttpClient,t.t1=a,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 9:return t.t2=t.sent,t.t3={method:"POST",path:t.t1,bodyType:"BINARY",headers:t.t2,failover:!1},t.next=13,t.t0.Request.call(t.t0,t.t3);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateFileDirectories=function(){var t=a(o.mark((function t(e){var r,n,i,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.filePaths,m({libraryId:r,objectId:n}),p(i),this.Log("Creating Directories: ".concat(r," ").concat(n," ").concat(i)),this.Log(a),s=a.map((function(t){return{op:"add",type:"directory",path:t}})),t.next=8,this.CreateFileUploadJob({libraryId:r,objectId:n,writeToken:i,ops:s});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteFiles=function(){var t=a(o.mark((function t(e){var r,n,i,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.filePaths,m({libraryId:r,objectId:n}),p(i),this.Log("Deleting Files: ".concat(r," ").concat(n," ").concat(i)),this.Log(a),s=a.map((function(t){return{op:"del",path:t}})),t.next=8,this.CreateFileUploadJob({libraryId:r,objectId:n,writeToken:i,ops:s});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadFile=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,c,l,f,p,y,v,g,b,w,_,k,x,A,I,E,S,M=arguments;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,a=e.writeToken,s=e.filePath,c=e.format,l=void 0===c?"arrayBuffer":c,f=e.chunked,p=void 0!==f&&f,y=e.chunkSize,v=e.clientSideDecryption,g=void 0!==v&&v,b=e.callback,m({libraryId:r,objectId:n,versionHash:i}),d("filePath",s),i&&(n=this.utils.DecodeVersionHash(i).objectId),t.next=6,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:a,metadataSubtree:h("files",s)});case 6:return w=t.sent,_=w&&w["."].encryption&&"cgck"===w["."].encryption.scheme,k=_?"cgck":void 0,x=_&&!g?h("q",a||i||n,"rep","files_download",s):h("q",a||i||n,"files",s),t.next=12,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i,encryption:k});case 12:return(A=t.sent).Accept="*/*",I="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=17,this.ContentObjectMetadata({libraryId:r,objectId:n,metadataSubtree:I});case 17:if(E=t.sent,t.t1=_,!t.t1){t.next=26;break}return t.t2=this.utils,t.t3=this.signer.address,t.next=24,this.ContentObjectOwner({objectId:n});case 24:t.t4=t.sent,t.t1=!t.t2.EqualAddress.call(t.t2,t.t3,t.t4);case 26:if(t.t0=t.t1,!t.t0){t.next=29;break}t.t0=!E;case 29:if(!t.t0){t.next=31;break}A["X-Content-Fabric-Decryption-Mode"]="reencrypt";case 31:if(_&&!g&&(A["X-Content-Fabric-Decryption-Mode"]="decrypt",y=Number.MAX_SAFE_INTEGER),S=w["."].size,!_||!g){t.next=51;break}return t.t5=this,t.next=37,this.EncryptionConk({libraryId:r,objectId:n,versionHash:i,download:!0});case 37:return t.t6=t.sent,t.t7=x,t.t8=S,t.t9=A,t.t10=b,t.t11=l,t.t12=g,t.t13=p,t.t14={conk:t.t6,downloadPath:t.t7,bytesTotal:t.t8,headers:t.t9,callback:t.t10,format:t.t11,clientSideDecryption:t.t12,chunked:t.t13},t.next=48,t.t5.DownloadEncrypted.call(t.t5,t.t14);case 48:return t.abrupt("return",t.sent);case 51:return y||(y=1e7),t.prev=52,t.next=55,this.Download({downloadPath:x,bytesTotal:S,headers:A,callback:b,format:l,chunked:p,chunkSize:y});case 55:return t.abrupt("return",t.sent);case 58:if(t.prev=58,t.t15=t.catch(52),!_||g){t.next=62;break}return t.abrupt("return",this.DownloadFile(u(u({},M[0]),{},{clientSideDecryption:!0})));case 62:throw t.t15;case 63:case"end":return t.stop()}}),t,this,[[52,58]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentParts=function(){var t=a(o.mark((function t(e){var r,n,i,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,m({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving parts: ".concat(r," ").concat(n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),a=h("q",i||n,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 9:return t.t2=t.sent,t.t3=a,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=15,t.t0.ResponseToJson.call(t.t0,t.t5);case 15:return s=t.sent,t.abrupt("return",s.parts);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentPart=function(){var t=a(o.mark((function t(e){var r,n,i,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,a=e.partHash,m({libraryId:r,objectId:n,versionHash:i}),y(a),this.Log("Retrieving part: ".concat(r," ").concat(n||i," ").concat(a)),i&&(n=this.utils.DecodeVersionHash(i).objectId),s=h("q",i||n,"parts",a),t.t0=this.utils,t.t1=this.HttpClient,t.next=10,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 10:return t.t2=t.sent,t.t3=s,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=16,t.t0.ResponseToJson.call(t.t0,t.t5);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadPart=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,u,c,l,f,d,p,v,g,b,w,_,k;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,a=e.writeToken,s=e.partHash,u=e.format,c=void 0===u?"arrayBuffer":u,l=e.chunked,f=void 0!==l&&l,d=e.chunkSize,p=void 0===d?1e7:d,v=e.callback,m({libraryId:r,objectId:n,versionHash:i}),y(s),i&&(n=this.utils.DecodeVersionHash(i).objectId),g=s.startsWith("hqpe"),b=g?"cgck":void 0,w=h("q",a||i||n,"data",s),t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i,encryption:b});case 9:return _=t.sent,t.next=12,this.ContentPart({libraryId:r,objectId:n,versionHash:i,partHash:s});case 12:if(k=t.sent.part.size,!g){t.next=37;break}return t.t0=this.utils,t.t1=this.signer.address,t.next=18,this.ContentObjectOwner({objectId:n});case 18:if(t.t2=t.sent,t.t0.EqualAddress.call(t.t0,t.t1,t.t2)){t.next=21;break}_["X-Content-Fabric-Decryption-Mode"]="reencrypt";case 21:return t.t3=this,t.next=24,this.EncryptionConk({libraryId:r,objectId:n,download:!0});case 24:return t.t4=t.sent,t.t5=w,t.t6=k,t.t7=_,t.t8=v,t.t9=c,t.t10=f,t.t11={conk:t.t4,downloadPath:t.t5,bytesTotal:t.t6,headers:t.t7,callback:t.t8,format:t.t9,chunked:t.t10},t.next=34,t.t3.DownloadEncrypted.call(t.t3,t.t11);case 34:return t.abrupt("return",t.sent);case 37:return t.next=39,this.Download({downloadPath:w,bytesTotal:k,headers:_,callback:v,format:c,chunked:f,chunkSize:p});case 39:return t.abrupt("return",t.sent);case 40:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Download=function(){var t=a(o.mark((function t(e){var r,i,a,s,u,c,l,h,f,d,p,y,m,v,g;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.downloadPath,i=e.headers,a=e.bytesTotal,s=e.chunked,u=void 0!==s&&s,c=e.chunkSize,l=void 0===c?2e6:c,h=e.callback,f=e.format,d=void 0===f?"arrayBuffer":f,!u||h){t.next=3;break}throw Error("No callback specified for chunked download");case 3:u||(p=[]),y=0,m=Math.ceil(a/l),v=0;case 7:if(!(v<m)){t.next=35;break}return i.Range="bytes=".concat(y,"-").concat(y+l-1),t.next=11,this.HttpClient.Request({path:r,headers:i,method:"GET"});case 11:if(g=t.sent,y=Math.min(y+l,a),!u){t.next=24;break}return t.t0=h,t.t1=y,t.t2=a,t.next=19,this.utils.ResponseToFormat(d,g);case 19:t.t3=t.sent,t.t4={bytesFinished:t.t1,bytesTotal:t.t2,chunk:t.t3},(0,t.t0)(t.t4),t.next=32;break;case 24:return t.t5=p,t.t6=n,t.next=28,g.arrayBuffer();case 28:t.t7=t.sent,t.t8=t.t6.from.call(t.t6,t.t7),t.t5.push.call(t.t5,t.t8),h&&h({bytesFinished:y,bytesTotal:a});case 32:v++,t.next=7;break;case 35:if(u){t.next=39;break}return t.next=38,this.utils.ResponseToFormat(d,new Response(n.concat(p)));case 38:return t.abrupt("return",t.sent);case 39:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadEncrypted=function(){var t=a(o.mark((function t(e){var r,i,s,u,c,l,h,f,d,p,y,m,v,g,b,w,_,k=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.conk,i=e.downloadPath,s=e.bytesTotal,u=e.headers,c=e.callback,l=e.format,h=void 0===l?"arrayBuffer":l,f=e.chunked,!(d=void 0!==f&&f)||c){t.next=3;break}throw Error("No callback specified for chunked download");case 3:return p=r.public_key.startsWith("ktpk"),y=this.Crypto.EncryptedBlockSize(1e6,p),m=0,h=h.toLowerCase(),v=[],t.next=10,this.Crypto.OpenDecryptionStream(r);case 10:(g=t.sent).on("data",function(){var t=a(o.mark((function t(e){var r;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!d){t.next=13;break}if("buffer"===h){t.next=10;break}if(r=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),"arraybuffer"!==h){t.next=7;break}e=r,t.next=10;break;case 7:return t.next=9,k.utils.ResponseToFormat(h,new Response(r));case 9:e=t.sent;case 10:c({bytesFinished:m,bytesTotal:s,chunk:e}),t.next=15;break;case 13:c&&c({bytesFinished:m,bytesTotal:s}),v.push(e);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),b=Math.ceil(s/y),w=0;case 14:if(!(w<b)){t.next=30;break}return u.Range="bytes=".concat(m,"-").concat(m+y-1),t.next=18,this.HttpClient.Request({headers:u,method:"GET",path:i});case 18:return _=t.sent,m=Math.min(m+y,s),t.t0=g,t.t1=Uint8Array,t.next=24,_.arrayBuffer();case 24:t.t2=t.sent,t.t3=new t.t1(t.t2),t.t0.write.call(t.t0,t.t3);case 27:w++,t.next=14;break;case 30:return g.end(),t.next=33,new Promise((function(t){return g.on("finish",(function(){t()}))}));case 33:if(d){t.next=37;break}return t.next=36,this.utils.ResponseToFormat(h,new Response(n.concat(v)));case 36:return t.abrupt("return",t.sent);case 37:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreatePart=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,u;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.encryption,m({libraryId:r,objectId:n}),p(i),s=h("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:a});case 8:return t.t2=t.sent,t.t3=s,t.t4={headers:t.t2,method:"POST",path:t.t3,bodyType:"BINARY",body:"",failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=14,t.t0.ResponseToJson.call(t.t0,t.t5);case 14:return u=t.sent,t.abrupt("return",u.part.write_token);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadPartChunk=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,u,c,l;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.partWriteToken,s=e.chunk,u=e.encryption,m({libraryId:r,objectId:n}),p(i),!u||"none"===u){t.next=10;break}return t.next=6,this.EncryptionConk({libraryId:r,objectId:n,writeToken:i});case 6:return c=t.sent,t.next=9,this.Crypto.Encrypt(c,s);case 9:s=t.sent;case 10:return l=h("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=15,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:u});case 15:return t.t2=t.sent,t.t3=h(l,a),t.t4=s,t.t5={headers:t.t2,method:"POST",path:t.t3,body:t.t4,bodyType:"BINARY",failover:!1},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=22,t.t0.ResponseToJson.call(t.t0,t.t6);case 22:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizePart=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,u;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.partWriteToken,s=e.encryption,m({libraryId:r,objectId:n}),p(i),u=h("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:s});case 8:return t.t2=t.sent,t.t3=h(u,a),t.t4={headers:t.t2,method:"POST",path:t.t3,bodyType:"BINARY",body:"",failover:!1},t.next=13,t.t1.Request.call(t.t1,t.t4);case 13:return t.t5=t.sent,t.next=16,t.t0.ResponseToJson.call(t.t0,t.t5);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadPart=function(){var t=a(o.mark((function t(e){var r,n,i,a,s,u,c,l,h,f,d,y,v;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.data,s=e.encryption,u=void 0===s?"none":s,c=e.chunkSize,l=void 0===c?1e7:c,h=e.callback,m({libraryId:r,objectId:n}),p(i),t.next=5,this.CreatePart({libraryId:r,objectId:n,writeToken:i,encryption:u});case 5:f=t.sent,d=a.length||a.byteLength||a.size,h&&h({bytesFinished:0,bytesTotal:d}),y=0;case 9:if(!(y<d)){t.next=17;break}return v=a.slice(y,y+l),t.next=13,this.UploadPartChunk({libraryId:r,objectId:n,writeToken:i,partWriteToken:f,chunk:v,encryption:u});case 13:h&&h({bytesFinished:Math.min(y+l,d),bytesTotal:d});case 14:y+=l,t.next=9;break;case 17:return t.next=19,this.FinalizePart({libraryId:r,objectId:n,writeToken:i,partWriteToken:f,encryption:u});case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeletePart=function(){var t=a(o.mark((function t(e){var r,n,i,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,a=e.partHash,m({libraryId:r,objectId:n}),p(i),y(a),s=h("q",i,"parts",a),t.t0=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 8:return t.t1=t.sent,t.t2=s,t.t3={headers:t.t1,method:"DELETE",path:t.t2,failover:!1},t.next=13,t.t0.Request.call(t.t0,t.t3);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}).call(this,r(5),r(8).Buffer)},function(t,e){}])}));
|
|
51
|
+
*/!function(A,a){"use strict";"object"===o(t)&&t.exports?t.exports=a():void 0===(i="function"==typeof(n=a)?n.call(e,r,e,t):n)||(t.exports=i)}(0,(function(t){"use strict";var e=t&&t.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return!1;var i=r.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(n+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var n=r.list[t.slice(e+1)];return!!n&&n.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var n=t.lastIndexOf(".",e-1);if(n<=0||n>=e-1)return null;var i=r.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(n+1,e)+" ")<0?null:t.slice(n+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return r}))}).call(this,r(8)(t))},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n,i,o;function A(t){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){function t(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw new TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var r=t.shift();t[0]=r+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n<t.length;n++){var i=t[n];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(n>0&&(i=i.replace(/^[\/]+/,"")),i=n<t.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),e.push(i))}var o=e.join("/"),A=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return o=A.shift()+(A.length>0?"?":"")+A.join("&")}return function(){return t("object"===A(arguments[0])?arguments[0]:[].slice.call(arguments))}},t.exports?t.exports=o():void 0===(i="function"==typeof(n=o)?n.call(e,r,e,t):n)||(t.exports=i)},function(t,e,r){"use strict";var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();t.exports=e=n.fetch,n.fetch&&(e.default=n.fetch.bind(n)),e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response},function(t,e,r){var n=r(81),i=function(t,e){return"object"===n(e)&&"function"==typeof e[t]?e[t]:null},o=function(t){return"object"===n(t)?JSON.stringify(t):t};t.exports={LogMessage:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.debug){var n=i("log",t.debugOptions),A=i("error",t.debugOptions),a="(elv-client-js#".concat(t.constructor.name,")"),s="\n".concat(a," ").concat(o(e),"\n");r?A?A(a,e):console.error(s):n?n(a,e):console.log(s)}}}},function(t,e,r){var n=r(29);e.ValidatePresence=function(t,e){if(!e)throw Error("".concat(t," not specified"))},e.ValidateLibrary=function(t){if(!t)throw Error("Library ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid library ID: ".concat(t))},e.ValidateObject=function(t){if(!t)throw Error("Object ID not specified");if(!t.toString().startsWith("i"))throw Error("Invalid object ID: ".concat(t))},e.ValidateVersion=function(t){if(!t)throw Error("Version hash not specified");if(!t.toString().startsWith("h"))throw Error("Invalid version hash: ".concat(t))},e.ValidateWriteToken=function(t){if(!t)throw Error("Write token not specified");if(!t.toString().startsWith("t"))throw Error("Invalid write token: ".concat(t))},e.ValidatePartHash=function(t){if(!t)throw Error("Part hash not specified");if(!t.toString().startsWith("hqp_")&&!t.toString().startsWith("hqpe"))throw Error("Invalid part hash: ".concat(t))},e.ValidateParameters=function(t){var r=t.libraryId,n=t.objectId,i=t.versionHash;i?e.ValidateVersion(i):(e.ValidateLibrary(r),e.ValidateObject(n))},e.ValidateAddress=function(t){if(!t)throw Error("Address not specified");if(!/^(0x)?[0-9a-f]{40}$/i.test(t.toLowerCase()))throw Error("Invalid address: ".concat(t));return n.FormatAddress(t)},e.ValidatePermission=function(t){if(t&&"full-access"!==t&&"no-access"!==t)throw Error("Invalid profile permission: ".concat(t));return t},e.ValidateDate=function(t){if(t){if(isNaN(new Date(t)))throw Error("Invalid date: ".concat(t));return new Date(t).getTime()}}},function(t,e,r){var n=r(44)(r(16),"Map");t.exports=n},function(t,e,r){var n=r(16).Symbol;t.exports=n},function(t,e,r){(function(e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n="object"==(void 0===e?"undefined":r(e))&&e&&e.Object===Object&&e;t.exports=n}).call(this,r(4))},function(t,e,r){var n=r(46),i=r(32);t.exports=function(t,e,r){(void 0!==r&&!i(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},function(t,e,r){var n=r(44),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(217)(Object.getPrototypeOf,Object);t.exports=n},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(218),i=r(21),o=Object.prototype,A=o.hasOwnProperty,a=o.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(t){return i(t)&&A.call(t,"callee")&&!a.call(t,"callee")};t.exports=s},function(t,e){var r=Array.isArray;t.exports=r},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(16),o=r(220),A="object"==n(e)&&e&&!e.nodeType&&e,a=A&&"object"==n(t)&&t&&!t.nodeType&&t,s=a&&a.exports===A?i.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;t.exports=c}).call(this,r(8)(t))},function(t,e,r){var n=r(222),i=r(223),o=r(224),A=o&&o.isTypedArray,a=A?i(A):n;t.exports=a},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,r){var n=r(228),i=r(230),o=r(47);t.exports=function(t){return o(t)?n(t,!0):i(t)}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=r(t);return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return t}},function(t,e,r){t.exports=i;var n=r(22).EventEmitter;function i(){n.call(this)}r(0)(i,n),i.Readable=r(48),i.Writable=r(248),i.Duplex=r(249),i.Transform=r(250),i.PassThrough=r(251),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",s));var A=!1;function a(){A||(A=!0,t.end())}function s(){A||(A=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(u(),0===n.listenerCount(this,"error"))throw t}function u(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("error",c),t.on("error",c),r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t}},function(t,e,r){"use strict";(function(e,n){var i=r(36);t.exports=C;var o,A=r(43);C.ReadableState=y;r(22).EventEmitter;var a=function(t,e){return t.listeners(e).length},s=r(104),c=r(49).Buffer,u=e.Uint8Array||function(){};var f=Object.create(r(23));f.inherits=r(0);var h=r(242),l=void 0;l=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=r(243),p=r(105);f.inherits(C,s);var I=["error","close","destroy","pause","resume"];function y(t,e){t=t||{};var n=e instanceof(o=o||r(12));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,A=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(A||0===A)?A:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=r(24).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function C(t){if(o=o||r(12),!(this instanceof C))return new C(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function E(t,e,r,n,i){var o,A=t._readableState;null===e?(A.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,m(t)}(t,A)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(A,e)),o?t.emit("error",o):A.objectMode||e&&e.length>0?("string"==typeof e||A.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?A.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):b(t,A,e,!0):A.ended?t.emit("error",new Error("stream.push() after EOF")):(A.reading=!1,A.decoder&&!r?(e=A.decoder.write(e),A.objectMode||0!==e.length?b(t,A,e,!1):v(t,A)):b(t,A,e,!1))):n||(A.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(A)}function b(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&m(t)),v(t,e)}Object.defineProperty(C.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),C.prototype.destroy=p.destroy,C.prototype._undestroy=p.undestroy,C.prototype._destroy=function(t,e){this.push(null),e(t)},C.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=c.from(t,e),e=""),r=!0),E(this,t,e,!1,r)},C.prototype.unshift=function(t){return E(this,t,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(t){return d||(d=r(24).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};function B(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function m(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(w,t):w(t))}function w(t){l("emit readable"),t.emit("readable"),S(t)}function v(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(Q,t,e))}function Q(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(l("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function _(t){l("readable nexttick read 0"),t.read(0)}function D(t,e){e.reading||(l("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),S(t),e.flowing&&!e.reading&&t.read(0)}function S(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function M(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,A=t>o.length?o.length:t;if(A===o.length?i+=o:i+=o.slice(0,t),0===(t-=A)){A===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(A));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,A=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,A),0===(t-=A)){A===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(A));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function k(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(x,e,t))}function x(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}C.prototype.read=function(t){l("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?k(this):m(this),null;if(0===(t=B(t,e))&&e.ended)return 0===e.length&&k(this),null;var n,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&l("length less than watermark",i=!0),e.ended||e.reading?l("reading or ended",i=!1):i&&(l("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=B(r,e))),null===(n=t>0?M(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&k(this)),null!==n&&this.emit("data",n),n},C.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},C.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:C;function c(e,n){l("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),t.removeListener("close",I),t.removeListener("finish",y),t.removeListener("drain",f),t.removeListener("error",p),t.removeListener("unpipe",c),r.removeListener("end",u),r.removeListener("end",C),r.removeListener("data",g),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){l("onend"),t.end()}o.endEmitted?i.nextTick(s):r.once("end",s),t.on("unpipe",c);var f=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,S(t))}}(r);t.on("drain",f);var h=!1;var d=!1;function g(e){l("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==R(o.pipes,t))&&!h&&(l("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function p(e){l("onerror",e),C(),t.removeListener("error",p),0===a(t,"error")&&t.emit("error",e)}function I(){t.removeListener("finish",y),C()}function y(){l("onfinish"),t.removeListener("close",I),C()}function C(){l("unpipe"),r.unpipe(t)}return r.on("data",g),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?A(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",I),t.once("finish",y),t.emit("pipe",r),o.flowing||(l("pipe resume"),r.resume()),t},C.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var A=R(e.pipes,t);return-1===A||(e.pipes.splice(A,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},C.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&m(this):i.nextTick(_,this))}return r},C.prototype.addListener=C.prototype.on,C.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(D,t,e))}(this,t)),this},C.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},C.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<I.length;o++)t.on(I[o],this.emit.bind(this,I[o]));return this._read=function(e){l("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),C._fromList=M}).call(this,r(4),r(5))},function(t,e,r){t.exports=r(22).EventEmitter},function(t,e,r){"use strict";var n=r(36);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,A=this._writableState&&this._writableState.destroyed;return o||A?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(4))},function(t,e,r){"use strict";t.exports=A;var n=r(12),i=Object.create(r(23));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function A(t){if(!(this instanceof A))return new A(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){s(t,e,r)})):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(0),i.inherits(A,n),A.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},A.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},A.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},A.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},A.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},function(t,e,r){"use strict";var n=r(1).Buffer,i=r(52).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(0)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var A=0,a=8*t.length;a>0;++A)this._length[A]+=a,(a=this._length[A]/4294967296|0)>0&&(this._length[A]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){"use strict";(function(e,n){var i;t.exports=v,v.ReadableState=w;r(22).EventEmitter;var o=function(t,e){return t.listeners(e).length},A=r(110),a=r(3).Buffer,s=e.Uint8Array||function(){};var c,u=r(253);c=u&&u.debuglog?u.debuglog("stream"):function(){};var f,h,l,d=r(254),g=r(111),p=r(112).getHighWaterMark,I=r(18).codes,y=I.ERR_INVALID_ARG_TYPE,C=I.ERR_STREAM_PUSH_AFTER_EOF,E=I.ERR_METHOD_NOT_IMPLEMENTED,b=I.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(0)(v,A);var B=g.errorOrDestroy,m=["error","close","destroy","pause","resume"];function w(t,e,n){i=i||r(19),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=p(this,t,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=r(24).StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function v(t){if(i=i||r(19),!(this instanceof v))return new v(t);var e=this instanceof i;this._readableState=new w(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),A.call(this)}function Q(t,e,r,n,i){c("readableAddChunk",e);var o,A=t._readableState;if(null===e)A.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?S(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,M(t)))}(t,A);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof s||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(A,e)),o)B(t,o);else if(A.objectMode||e&&e.length>0)if("string"==typeof e||A.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)A.endEmitted?B(t,new b):_(t,A,e,!0);else if(A.ended)B(t,new C);else{if(A.destroyed)return!1;A.reading=!1,A.decoder&&!r?(e=A.decoder.write(e),A.objectMode||0!==e.length?_(t,A,e,!1):k(t,A)):_(t,A,e,!1)}else n||(A.reading=!1,k(t,A));return!A.ended&&(A.length<A.highWaterMark||0===A.length)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&S(t)),k(t,e)}Object.defineProperty(v.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){e(t)},v.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),Q(this,t,e,!1,r)},v.prototype.unshift=function(t){return Q(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){f||(f=r(24).StringDecoder);var e=new f(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function D(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(M,t))}function M(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,U(t)}function k(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function R(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){c("readable nexttick read 0"),t.read(0)}function F(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),U(t),e.flowing&&!e.reading&&t.read(0)}function U(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function H(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function L(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(O,e,t))}function O(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function T(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):S(this),null;if(0===(t=D(t,e))&&e.ended)return 0===e.length&&L(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=D(r,e))),null===(n=t>0?H(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&L(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){B(this,new E("_read()"))},v.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var A=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?s:p;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",d),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",l),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",p),r.removeListener("data",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function s(){c("onend"),t.end()}i.endEmitted?n.nextTick(A):r.once("end",A),t.on("unpipe",a);var u=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,U(t))}}(r);t.on("drain",u);var f=!1;function h(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==T(i.pipes,t))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function l(e){c("onerror",e),p(),t.removeListener("error",l),0===o(t,"error")&&B(t,e)}function d(){t.removeListener("finish",g),p()}function g(){c("onfinish"),t.removeListener("close",d),p()}function p(){c("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",l),t.once("close",d),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var A=T(e.pipes,t);return-1===A||(e.pipes.splice(A,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},v.prototype.on=function(t,e){var r=A.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?S(this):i.reading||n.nextTick(N,this))),r},v.prototype.addListener=v.prototype.on,v.prototype.removeListener=function(t,e){var r=A.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(R,this),r},v.prototype.removeAllListeners=function(t){var e=A.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(R,this),e},v.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(F,t,e))}(this,t)),t.paused=!1,this},v.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},v.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<m.length;o++)t.on(m[o],this.emit.bind(this,m[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(v.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(256)),h(this)}),Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(v.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(v.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),v._fromList=H,Object.defineProperty(v.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(v.from=function(t,e){return void 0===l&&(l=r(257)),l(v,t,e)})}).call(this,r(4),r(5))},function(t,e,r){t.exports=r(22).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var A=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?A._writableState?A._writableState.errorEmitted?e.nextTick(n,A):(A._writableState.errorEmitted=!0,e.nextTick(r,A,t)):e.nextTick(r,A,t):o?(e.nextTick(n,A),o(t)):e.nextTick(n,A)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(5))},function(t,e,r){"use strict";var n=r(18).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=v,v.WritableState=w;var A={deprecate:r(106)},a=r(110),s=r(3).Buffer,c=e.Uint8Array||function(){};var u,f=r(111),h=r(112).getHighWaterMark,l=r(18).codes,d=l.ERR_INVALID_ARG_TYPE,g=l.ERR_METHOD_NOT_IMPLEMENTED,p=l.ERR_MULTIPLE_CALLBACK,I=l.ERR_STREAM_CANNOT_PIPE,y=l.ERR_STREAM_DESTROYED,C=l.ERR_STREAM_NULL_VALUES,E=l.ERR_STREAM_WRITE_AFTER_END,b=l.ERR_UNKNOWN_ENCODING,B=f.errorOrDestroy;function m(){}function w(t,e,A){o=o||r(19),t=t||{},"boolean"!=typeof A&&(A=e instanceof o),this.objectMode=!!t.objectMode,A&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",A),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new p;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(k,t,e),t._writableState.errorEmitted=!0,B(t,i)):(o(i),t._writableState.errorEmitted=!0,B(t,i),k(t,e))}(t,r,i,e,o);else{var A=S(r)||t.destroyed;A||r.corked||r.bufferProcessing||!r.bufferedRequest||D(t,r),i?n.nextTick(_,t,r,A,o):_(t,r,A,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function v(t){var e=this instanceof(o=o||r(19));if(!e&&!u.call(v,this))return new v(t);this._writableState=new w(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function Q(t,e,r,n,i,o,A){e.writelen=n,e.writecb=A,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),k(t,e)}function D(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),A=e.corkedRequestsFree;A.entry=r;for(var a=0,s=!0;r;)o[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;o.allBuffers=s,Q(t,e,!0,e.length,o,"",A.finish),e.pendingcb++,e.lastBufferedRequest=null,A.next?(e.corkedRequestsFree=A.next,A.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,f=r.callback;if(Q(t,e,!1,e.objectMode?1:c.length,c,u,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function S(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(r){e.pendingcb--,r&&B(t,r),e.prefinished=!0,t.emit("prefinish"),k(t,e)}))}function k(t,e){var r=S(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(M,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(0)(v,a),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:A.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!u.call(this,t)||this===v&&(t&&t._writableState instanceof w)}})):u=function(t){return t instanceof this},v.prototype.pipe=function(){B(this,new I)},v.prototype.write=function(t,e,r){var i,o=this._writableState,A=!1,a=!o.objectMode&&(i=t,s.isBuffer(i)||i instanceof c);return a&&!s.isBuffer(t)&&(t=function(t){return s.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=m),o.ending?function(t,e){var r=new E;B(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new C:"string"==typeof r||e.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(B(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,A=function(t,e,r,n,i,o){if(!r){var A=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=s.from(e,r));return e}(e,n,i);n!==A&&(r=!0,i="buffer",n=A)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Q(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),A},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||D(this,t))},v.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new b(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new g("_write()"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(v.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(v.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=f.destroy,v.prototype._undestroy=f.undestroy,v.prototype._destroy=function(t,e){e(t)}}).call(this,r(4),r(5))},function(t,e,r){"use strict";t.exports=u;var n=r(18).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,A=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,s=r(19);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(t){if(!(this instanceof u))return new u(t);s.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",f)}function f(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(e,r){h(t,e,r)}))}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new A;return t.push(null)}r(0)(u,s),u.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},u.prototype._transform=function(t,e,r){r(new i("_transform()"))},u.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},u.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},u.prototype._destroy=function(t,e){s.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n=r(0),i=r(20),o=r(1).Buffer,A=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function s(){this.init(),this._w=a,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function u(t,e,r){return t&e|r&(t|e)}function f(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function l(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(s,i),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},s.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,d=0|this._f,g=0|this._g,p=0|this._h,I=0;I<16;++I)r[I]=t.readInt32BE(4*I);for(;I<64;++I)r[I]=0|(((e=r[I-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[I-7]+l(r[I-15])+r[I-16];for(var y=0;y<64;++y){var C=p+h(s)+c(s,d,g)+A[y]+r[y]|0,E=f(n)+u(n,i,o)|0;p=g,g=d,d=s,s=a+C|0,a=o,o=i,i=n,n=C+E|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=p+this._h|0},s.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=s},function(t,e,r){var n=r(0),i=r(20),o=r(1).Buffer,A=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function s(){this.init(),this._w=a,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function u(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function l(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function p(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function I(t,e){return t>>>0<e>>>0?1:0}n(s,i),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,y=0|this._gh,C=0|this._hh,E=0|this._al,b=0|this._bl,B=0|this._cl,m=0|this._dl,w=0|this._el,v=0|this._fl,Q=0|this._gl,_=0|this._hl,D=0;D<32;D+=2)e[D]=t.readInt32BE(4*D),e[D+1]=t.readInt32BE(4*D+4);for(;D<160;D+=2){var S=e[D-30],M=e[D-30+1],k=l(S,M),x=d(M,S),R=g(S=e[D-4],M=e[D-4+1]),N=p(M,S),F=e[D-14],U=e[D-14+1],H=e[D-32],L=e[D-32+1],O=x+U|0,T=k+F+I(O,x)|0;T=(T=T+R+I(O=O+N|0,N)|0)+H+I(O=O+L|0,L)|0,e[D]=T,e[D+1]=O}for(var G=0;G<160;G+=2){T=e[G],O=e[G+1];var P=u(r,n,i),j=u(E,b,B),Y=f(r,E),K=f(E,r),q=h(a,w),J=h(w,a),z=A[G],Z=A[G+1],V=c(a,s,y),W=c(w,v,Q),X=_+J|0,$=C+q+I(X,_)|0;$=($=($=$+V+I(X=X+W|0,W)|0)+z+I(X=X+Z|0,Z)|0)+T+I(X=X+O|0,O)|0;var tt=K+j|0,et=Y+P+I(tt,K)|0;C=y,_=Q,y=s,Q=v,s=a,v=w,a=o+$+I(w=m+X|0,m)|0,o=i,m=B,i=n,B=b,n=r,b=E,r=$+et+I(E=X+tt|0,X)|0}this._al=this._al+E|0,this._bl=this._bl+b|0,this._cl=this._cl+B|0,this._dl=this._dl+m|0,this._el=this._el+w|0,this._fl=this._fl+v|0,this._gl=this._gl+Q|0,this._hl=this._hl+_|0,this._ah=this._ah+r+I(this._al,E)|0,this._bh=this._bh+n+I(this._bl,b)|0,this._ch=this._ch+i+I(this._cl,B)|0,this._dh=this._dh+o+I(this._dl,m)|0,this._eh=this._eh+a+I(this._el,w)|0,this._fh=this._fh+s+I(this._fl,v)|0,this._gh=this._gh+y+I(this._gl,Q)|0,this._hh=this._hh+C+I(this._hl,_)|0},s.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=s},function(t,e,r){var n=r(51);t.exports=function(t){return(new n).update(t).digest()}},function(t,e,r){t.exports=r(119)},function(t){t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(t,e){var r=Math.pow(2,30)-1;t.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>r||e!=e)throw new TypeError("Bad key length")}},function(t,e,r){(function(e,r){var n;if(e.process&&e.process.browser)n="utf-8";else if(e.process&&e.process.version){n=parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";t.exports=n}).call(this,r(4),r(5))},function(t,e,r){var n=r(117),i=r(54),o=r(55),A=r(1).Buffer,a=r(120),s=r(121),c=r(123),u=A.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(t,e,r){var a=function(t){function e(e){return o(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:e}(t),s="sha512"===t||"sha384"===t?128:64;e.length>s?e=a(e):e.length<s&&(e=A.concat([e,u],s));for(var c=A.allocUnsafe(s+f[t]),h=A.allocUnsafe(s+f[t]),l=0;l<s;l++)c[l]=54^e[l],h[l]=92^e[l];var d=A.allocUnsafe(s+r+4);c.copy(d,0,0,s),this.ipad1=d,this.ipad2=c,this.opad=h,this.alg=t,this.blocksize=s,this.hash=a,this.size=f[t]}h.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){a(r,n);var o=new h(i=i||"sha1",t=c(t,s,"Password"),(e=c(e,s,"Salt")).length),u=A.allocUnsafe(n),l=A.allocUnsafe(e.length+4);e.copy(l,0,0,e.length);for(var d=0,g=f[i],p=Math.ceil(n/g),I=1;I<=p;I++){l.writeUInt32BE(I,e.length);for(var y=o.run(l,o.ipad1),C=y,E=1;E<r;E++){C=o.run(C,o.ipad2);for(var b=0;b<g;b++)y[b]^=C[b]}y.copy(u,d),d+=g}return u}},function(t,e,r){var n=r(1).Buffer;t.exports=function(t,e,r){if(n.isBuffer(t))return t;if("string"==typeof t)return n.from(t,e);if(ArrayBuffer.isView(t))return n.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},function(t,e,r){var n=r(266),i=r(59),o=r(60),A=r(279),a=r(38);function s(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(A[t])return new n({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function c(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(A[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!A[t])throw new TypeError("invalid suite type");r=8*A[t].key,n=A[t].iv}var i=a(e,!1,r,n);return s(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=s,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!A[t])throw new TypeError("invalid suite type");r=8*A[t].key,n=A[t].iv}var i=a(e,!1,r,n);return c(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(A).concat(i.getCiphers())}},function(t,e,r){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,A=6;A>=0;A-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+A&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+A&1}for(A=6;A>=0;A-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+A&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+A&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,A=0;A<4;A++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+A&1,i<<=1,i|=t>>>a+A&1;for(A=4;A<8;A++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+A&1,o<<=1,o|=t>>>a+A&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,A=7;A>=5;A--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+A&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+A&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+A&1;for(A=1;A<=3;A++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+A&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+A&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+A&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,i){for(var o=0,A=0,a=n.length>>>1,s=0;s<a;s++)o<<=1,o|=t>>>n[s]&1;for(s=a;s<n.length;s++)A<<=1,A|=e>>>n[s]&1;r[i+0]=o>>>0,r[i+1]=A>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<o.length;r++)e<<=1,e|=t>>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},function(t,e,r){"use strict";var n=r(6),i=r(0),o=r(125),A=r(58);function a(){this.tmp=new Array(2),this.keys=null}function s(t){A.call(this,t);var e=new a;this._desState=e,this.deriveKeys(e,t.key)}i(s,A),t.exports=s,s.create=function(t){return new s(t)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var A=0;A<t.keys.length;A+=2){var a=c[A>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,t.keys,A)}},s.prototype._update=function(t,e,r,n){var i=this._desState,A=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(A,a,i.tmp,0),A=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,A,a,i.tmp,0):this._decrypt(i,A,a,i.tmp,0),A=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,A,n),o.writeUInt32BE(r,a,n+4)},s.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},s.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},s.prototype._encrypt=function(t,e,r,n,i){for(var A=e,a=r,s=0;s<t.keys.length;s+=2){var c=t.keys[s],u=t.keys[s+1];o.expand(a,t.tmp,0),c^=t.tmp[0],u^=t.tmp[1];var f=o.substitute(c,u),h=a;a=(A^o.permute(f))>>>0,A=h}o.rip(a,A,n,i)},s.prototype._decrypt=function(t,e,r,n,i){for(var A=r,a=e,s=t.keys.length-2;s>=0;s-=2){var c=t.keys[s],u=t.keys[s+1];o.expand(A,t.tmp,0),c^=t.tmp[0],u^=t.tmp[1];var f=o.substitute(c,u),h=A;A=(a^o.permute(f))>>>0,a=h}o.rip(A,a,n,i)}},function(t,e,r){var n=r(25),i=r(1).Buffer,o=r(128);function A(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var s=A(t),c=o+16*a;t._cache.writeUInt32BE(s[0],c+0),t._cache.writeUInt32BE(s[1],c+4),t._cache.writeUInt32BE(s[2],c+8),t._cache.writeUInt32BE(s[3],c+12)}var u=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,u)}},function(t,e){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},function(t){t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(t,e,r){var n=r(37),i=r(1).Buffer,o=r(10),A=r(0),a=r(277),s=r(25),c=r(128);function u(t,e,r,A){o.call(this);var s=i.alloc(4,0);this._cipher=new n.AES(e);var u=this._cipher.encryptBlock(s);this._ghash=new a(u),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,A=o%16;n.update(e),A&&(A=16-A,n.update(i.alloc(A,0))),n.update(i.alloc(8,0));var s=8*o,u=i.alloc(8);u.writeUIntBE(s,0,8),n.update(u),t._finID=n.state;var f=i.from(t._finID);return c(f),f}(this,r,u),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=A,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}A(u,o),u.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},u.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=u},function(t,e,r){var n=r(37),i=r(1).Buffer,o=r(10);function A(t,e,r,A){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=A,this._mode=t}r(0)(A,o),A.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},A.prototype._final=function(){this._cipher.scrub()},t.exports=A},function(t,e,r){(function(t){var n=r(133),i=r(282),o=r(283);var A={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var r=new t(i[e].prime,"hex"),n=new t(i[e].gen,"hex");return new o(r,n)},e.createDiffieHellman=e.DiffieHellman=function e(r,i,a,s){return t.isBuffer(i)||void 0===A[i]?e(r,"binary",i,a):(i=i||"binary",s=s||"binary",a=a||new t([2]),t.isBuffer(a)||(a=new t(a,s)),"number"==typeof r?new o(n(r,a),a,!0):(t.isBuffer(r)||(r=new t(r,i)),new o(r,a,!0)))}}).call(this,r(3).Buffer)},function(t,e,r){var n=r(13);t.exports=y,y.simpleSieve=p,y.fermatTest=I;var i=r(2),o=new i(24),A=new(r(134)),a=new i(1),s=new i(2),c=new i(5),u=(new i(16),new i(8),new i(10)),f=new i(3),h=(new i(7),new i(11)),l=new i(4),d=(new i(12),null);function g(){if(null!==d)return d;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return d=t,t}function p(t){for(var e=g(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function I(t){var e=i.mont(t);return 0===s.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function y(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,d;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(s),e.cmp(s)){if(!e.cmp(c))for(;r.mod(u).cmp(f);)r.iadd(l)}else for(;r.mod(o).cmp(h);)r.iadd(l);if(p(d=r.shrn(1))&&p(r)&&I(d)&&I(r)&&A.test(d)&&A.test(r))return r}}},function(t,e,r){var n=r(2),i=r(61);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),A=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var c=t.shrn(s),u=a.toRed(o);e>0;e--){var f=this._randrange(new n(2),a);r&&r(f);var h=f.toRed(o).redPow(c);if(0!==h.cmp(A)&&0!==h.cmp(u)){for(var l=1;l<s;l++){if(0===(h=h.redSqr()).cmp(A))return!1;if(0===h.cmp(u))break}if(l===s)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var A=t.subn(1),a=0;!A.testn(a);a++);for(var s=t.shrn(a),c=A.toRed(i);e>0;e--){var u=this._randrange(new n(2),A),f=t.gcd(u);if(0!==f.cmpn(1))return f;var h=u.toRed(i).redPow(s);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var l=1;l<a;l++){if(0===(h=h.redSqr()).cmp(o))return h.fromRed().subn(1).gcd(t);if(0===h.cmp(c))break}if(l===a)return(h=h.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,r){var n=r(1).Buffer,i=r(17),o=r(52),A=r(0),a=r(284),s=r(312),c=r(119);function u(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function f(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){return new u(t)}function l(t){return new f(t)}Object.keys(c).forEach((function(t){c[t].id=n.from(c[t].id,"hex"),c[t.toLowerCase()]=c[t]})),A(u,o.Writable),u.prototype._write=function(t,e,r){this._hash.update(t),r()},u.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},u.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},A(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},f.prototype.verify=function(t,e,r){"string"==typeof e&&(e=n.from(e,r)),this.end();var i=this._hash.digest();return s(e,i,t,this._signType,this._tag)},t.exports={Sign:h,Verify:l,createSign:h,createVerify:l}},function(t,e,r){"use strict";var n=e;function i(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",r=0;r<t.length;r++)e+=i(t[r].toString(16));return e}n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,A=255&i;o?r.push(o,A):r.push(A)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,r){"use strict";var n=e;n.base=r(39),n.short=r(286),n.mont=r(287),n.edwards=r(288)},function(t,e,r){"use strict";var n=r(9).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function A(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?A(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=A,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){"use strict";var n=r(9),i=r(26),o=r(138),A=r(6),a=n.sum32,s=n.sum32_4,c=n.sum32_5,u=o.ch32,f=o.maj32,h=o.s0_256,l=o.s1_256,d=o.g0_256,g=o.g1_256,p=i.BlockHash,I=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;p.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=I,this.W=new Array(64)}n.inherits(y,p),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(g(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],p=this.h[2],I=this.h[3],y=this.h[4],C=this.h[5],E=this.h[6],b=this.h[7];for(A(this.k.length===r.length),n=0;n<r.length;n++){var B=c(b,l(y),u(y,C,E),this.k[n],r[n]),m=a(h(i),f(i,o,p));b=E,E=C,C=y,y=a(I,B),I=p,p=o,o=i,i=a(B,m)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],p),this.h[3]=a(this.h[3],I),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],C),this.h[6]=a(this.h[6],E),this.h[7]=a(this.h[7],b)},y.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(9),i=r(26),o=r(6),A=n.rotr64_hi,a=n.rotr64_lo,s=n.shr64_hi,c=n.shr64_lo,u=n.sum64,f=n.sum64_hi,h=n.sum64_lo,l=n.sum64_4_hi,d=n.sum64_4_lo,g=n.sum64_5_hi,p=n.sum64_5_lo,I=i.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function C(){if(!(this instanceof C))return new C;I.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function E(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function b(t,e,r,n,i,o){var A=e&n^~e&o;return A<0&&(A+=4294967296),A}function B(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function m(t,e,r,n,i,o){var A=e&n^e&o^n&o;return A<0&&(A+=4294967296),A}function w(t,e){var r=A(t,e,28)^A(e,t,2)^A(e,t,7);return r<0&&(r+=4294967296),r}function v(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function Q(t,e){var r=A(t,e,14)^A(t,e,18)^A(e,t,9);return r<0&&(r+=4294967296),r}function _(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function D(t,e){var r=A(t,e,1)^A(t,e,8)^s(t,e,7);return r<0&&(r+=4294967296),r}function S(t,e){var r=a(t,e,1)^a(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function M(t,e){var r=A(t,e,19)^A(e,t,29)^s(t,e,6);return r<0&&(r+=4294967296),r}function k(t,e){var r=a(t,e,19)^a(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(C,I),t.exports=C,C.blockSize=1024,C.outSize=512,C.hmacStrength=192,C.padLength=128,C.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=M(r[n-4],r[n-3]),o=k(r[n-4],r[n-3]),A=r[n-14],a=r[n-13],s=D(r[n-30],r[n-29]),c=S(r[n-30],r[n-29]),u=r[n-32],f=r[n-31];r[n]=l(i,o,A,a,s,c,u,f),r[n+1]=d(i,o,A,a,s,c,u,f)}},C.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],A=this.h[2],a=this.h[3],s=this.h[4],c=this.h[5],l=this.h[6],d=this.h[7],I=this.h[8],y=this.h[9],C=this.h[10],D=this.h[11],S=this.h[12],M=this.h[13],k=this.h[14],x=this.h[15];o(this.k.length===r.length);for(var R=0;R<r.length;R+=2){var N=k,F=x,U=Q(I,y),H=_(I,y),L=E(I,y,C,D,S),O=b(I,y,C,D,S,M),T=this.k[R],G=this.k[R+1],P=r[R],j=r[R+1],Y=g(N,F,U,H,L,O,T,G,P,j),K=p(N,F,U,H,L,O,T,G,P,j);N=w(n,i),F=v(n,i),U=B(n,i,A,a,s),H=m(n,i,A,a,s,c);var q=f(N,F,U,H),J=h(N,F,U,H);k=S,x=M,S=C,M=D,C=I,D=y,I=f(l,d,Y,K),y=h(d,d,Y,K),l=s,d=c,s=A,c=a,A=n,a=i,n=f(Y,K,q,J),i=h(Y,K,q,J)}u(this.h,0,n,i),u(this.h,2,A,a),u(this.h,4,s,c),u(this.h,6,l,d),u(this.h,8,I,y),u(this.h,10,C,D),u(this.h,12,S,M),u(this.h,14,k,x)},C.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=e;n.bignum=r(2),n.define=r(304).define,n.base=r(307),n.constants=r(308),n.decoders=r(144),n.encoders=r(142)},function(t,e,r){"use strict";var n=e;n.der=r(143),n.pem=r(305)},function(t,e,r){"use strict";var n=r(0),i=r(66).Buffer,o=r(67),A=r(69);function a(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new s,this.tree._init(t.body)}function s(t){o.call(this,"der",t)}function c(t){return t<10?"0"+t:t}t.exports=a,a.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(s,o),s.prototype._encodeComposite=function(t,e,r,n){var o=function(t,e,r,n){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(A.tagByName.hasOwnProperty(t))i=A.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}if(i>=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=A.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128){var a=i.alloc(2);return a[0]=o,a[1]=n.length,this._createEncoderBuffer([a,n])}for(var s=1,c=n.length;c>=256;c>>=8)s++;var u=i.alloc(2+s);u[0]=o,u[1]=128|s;for(var f=1+s,h=n.length;h>0;f--,h>>=8)u[f]=255&h;return this._createEncoderBuffer([u,n])},s.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=i.alloc(2*t.length),n=0;n<t.length;n++)r.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},s.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(var o=0;o<t.length;o++)t[o]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var A=0,a=0;a<t.length;a++){var s=t[a];for(A++;s>=128;s>>=7)A++}for(var c=i.alloc(A),u=c.length-1,f=t.length-1;f>=0;f--){var h=t[f];for(c[u--]=127&h;(h>>=7)>0;)c[u--]=128|127&h}return this._createEncoderBuffer(c)},s.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=i.from(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=i.alloc(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var A=1,a=t;a>=256;a>>=8)A++;for(var s=new Array(A),c=s.length-1;c>=0;c--)s[c]=255&t,t>>=8;return 128&s[0]&&s.unshift(0),this._createEncoderBuffer(i.from(s))},s.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},s.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},s.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},function(t,e,r){"use strict";var n=e;n.der=r(145),n.pem=r(306)},function(t,e,r){"use strict";var n=r(0),i=r(2),o=r(27).DecoderBuffer,A=r(67),a=r(69);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){A.call(this,"der",t)}function u(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o<i;o++){n<<=8;var A=t.readUInt8(r);if(t.isError(A))return A;n|=A}return n}t.exports=s,s.prototype.decode=function(t,e){return o.isDecoderBuffer(t)||(t=new o(t,e)),this.tree._decode(t,e)},n(c,A),c.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=u(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},c.prototype._decodeTag=function(t,e,r){var n=u(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=f(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),A=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(A)?A:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},c.prototype._skipUntilEnd=function(t,e){for(;;){var r=u(t,e);if(t.isError(r))return r;var n=f(t,r.primitive,e);if(t.isError(n))return n;var i=void 0;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var A=r.decode(t,"der",n);if(t.isError(A)&&o)break;i.push(A)}return i},c.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===e){var A=t.raw().toString("ascii");return this._isNumstr(A)?A:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var a=t.raw().toString("ascii");return this._isPrintstr(a)?a:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},c.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0,A=0;!t.isEmpty();)o<<=7,o|=127&(A=t.readUInt8()),0==(128&A)&&(i.push(o),o=0);128&A&&i.push(o);var a=i[0]/40|0,s=i[0]%40;if(n=r?i:[a,s].concat(i.slice(1)),e){var c=e[n.join(" ")];void 0===c&&(c=e[n.join(".")]),void 0!==c&&(n=c)}return n},c.prototype._decodeTime=function(t,e){var r,n,i,o,A,a,s=t.raw().toString();if("gentime"===e)r=0|s.slice(0,4),n=0|s.slice(4,6),i=0|s.slice(6,8),o=0|s.slice(8,10),A=0|s.slice(10,12),a=0|s.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|s.slice(0,2),n=0|s.slice(2,4),i=0|s.slice(4,6),o=0|s.slice(6,8),A=0|s.slice(8,10),a=0|s.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,n-1,i,o,A,a,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},c.prototype._decodeInt=function(t,e){var r=t.raw(),n=new i(r);return e&&(n=e[n.toString(10)]||n),n},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t){t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(t,e,r){(function(e){var n=r(63),i=r(2);t.exports=function(t){return new A(t)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function A(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(t,r,n){Array.isArray(t)||(t=t.toArray());var i=new e(t);if(n&&i.length<n){var o=new e(n-i.length);o.fill(0),i=e.concat([o,i])}return r?i.toString(r):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,A.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},A.prototype.computeSecret=function(t,r,n){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),a(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},A.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),a(r,t)},A.prototype.getPrivateKey=function(t){return a(this.keys.getPrivate(),t)},A.prototype.setPublicKey=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.keys._importPublic(t),this},A.prototype.setPrivateKey=function(t,r){r=r||"utf8",e.isBuffer(t)||(t=new e(t,r));var n=new i(t);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this,r(3).Buffer)},function(t,e,r){e.publicEncrypt=r(313),e.privateDecrypt=r(314),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},function(t,e,r){var n=r(17),i=r(1).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,A=i.alloc(0),a=0;A.length<e;)r=o(a++),A=i.concat([A,n("sha1").update(t).update(r).digest()]);return A.slice(0,e)}},function(t,e){t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},function(t,e,r){var n=r(2),i=r(1).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},function(t,e,r){"use strict";(function(t,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(1),A=r(13),a=o.Buffer,s=o.kMaxLength,c=t.crypto||t.msCrypto,u=Math.pow(2,32)-1;function f(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>u||t<0)throw new TypeError("offset must be a uint32");if(t>s||t>e)throw new RangeError("offset out of range")}function h(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>u||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>s)throw new RangeError("buffer too small")}function l(t,e,r,i){if(n.browser){var o=t.buffer,a=new Uint8Array(o,e,r);return c.getRandomValues(a),i?void n.nextTick((function(){i(null,t)})):t}if(!i)return A(r).copy(t,e),t;A(r,(function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)}))}c&&c.getRandomValues||!n.browser?(e.randomFill=function(e,r,n,i){if(!(a.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)i=r,r=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-r;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(r,e.length),h(n,r,e.length),l(e,r,n,i)},e.randomFillSync=function(e,r,n){void 0===r&&(r=0);if(!(a.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');f(r,e.length),void 0===n&&(n=e.length-r);return h(n,r,e.length),l(e,r,n)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,r(4),r(5))},function(t,e,r){(function(t){var n,i,o,A;function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}window,A=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==u(t)&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=10)}([function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var n=r(7),i=r.n(n),o=function(){function e(t){a(this,e),this.wasm=t}return c(e,[{key:"arrayToBuf",value:function(e){var r=this.wasm,n={ptr:null,len:0};if(!e)return n;var i=null;if(e instanceof Uint8Array||void 0!==t&&e instanceof t)i=e;else{if(!(e instanceof ArrayBuffer||e.__proto__.toString().includes("ArrayBuffer")))throw new Error("arrayToBuf() failed: Expected Uint8Array, Buffer, or\n ArrayBuffer");i=new Uint8Array(e)}return n.len=i.length,n.ptr=r._malloc(i.length),r.writeArrayToMemory(i,n.ptr),n}},{key:"arrayToSmartBuf",value:function(t){var e=this.wasm,r=this.arrayToBuf(t);return r.ptr&&setTimeout((function(){e._free(r.ptr),r.len=0,r.ptr=null}),0),r}},{key:"smartMalloc",value:function(t){var e=this.wasm,r=e._malloc(t);return setTimeout((function(){e._free(r)}),0),r}}],[{key:"bytesToHex",value:function(t){return t.reduce((function(t,e){return t+e.toString(16).padStart(2,"0")}),"")}},{key:"bytesToBinary",value:function(t){return t.reduce((function(t,e){return t+e.toString(2).padStart(8,"0")+" "}),"")}},{key:"hexToBytes",value:function(t){return new Uint8Array(t.match(/.{1,2}/g).map((function(t){return parseInt(t,16)})))}},{key:"randomBytes",value:function(t){if("undefined"!=typeof window&&"undefined"!==window.crypto){var e=new Uint8Array(t);return window.crypto.getRandomValues(e),e}return i.a.randomBytes(t)}}]),e}()}).call(this,r(3).Buffer)},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n=function(){function t(e){a(this,t),this.wasm=e,this.ptr=null,this.len=0}return c(t,[{key:"clear",value:function(){this.len=0}},{key:"free",value:function(){null!==this.ptr&&(this.wasm._free(this.ptr),this.len=0,this.ptr=null)}},{key:"resize",value:function(t){null!==this.ptr&&this.free(),this.len=t,this.ptr=this.wasm._malloc(t)}},{key:"ensureSize",value:function(t){(null===this.ptr||this.len<t)&&this.resize(t)}}]),t}()},function(t,e){t.exports=r(315)},function(t,e,r){"use strict";(function(t){
|
|
52
|
+
/*!
|
|
53
|
+
* The buffer module from node.js, for the browser.
|
|
54
|
+
*
|
|
55
|
+
* @author Feross Aboukhadijeh <http://feross.org>
|
|
56
|
+
* @license MIT
|
|
57
|
+
*/
|
|
58
|
+
var n=r(12),i=r(13),o=r(14);function A(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(A()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=h(t,e),t}(t,e,r,n):"string"==typeof e?function(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);return i!==n&&(t=t.slice(0,i)),t}(t,e,r):function(t,e){if(s.isBuffer(e)){var r=0|l(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(u(e),t=a(t,e<0?0:0|l(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|l(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function l(t){if(t>=A())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return T(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(n)return T(t).length;e=(""+e).toLowerCase(),n=!0}}function g(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 S(this,e,r);case"utf8":case"utf-8":return Q(this,e,r);case"ascii":return _(this,e,r);case"latin1":case"binary":return D(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function I(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),r=+r,isNaN(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=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,A=1,a=t.length,s=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;A=2,a/=2,s/=2,r/=2}function c(t,e){return 1===A?t[e]:t.readUInt16BE(e*A)}if(i){var u=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===s)return u*A}else-1!==u&&(o-=o-u),u=-1}else for(r+s>a&&(r=a-s),o=r;o>=0;o--){for(var f=!0,h=0;h<s;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return-1}function C(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;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var A=0;A<n;++A){var a=parseInt(e.substr(2*A,2),16);if(isNaN(a))return A;t[r+A]=a}return A}function E(t,e,r,n){return P(T(e,t.length-r),t,r,n)}function b(t,e,r,n){return P(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function B(t,e,r,n){return b(t,e,r,n)}function m(t,e,r,n){return P(G(e),t,r,n)}function w(t,e,r,n){return P(function(t,e){for(var r,n,i,o=[],A=0;A<t.length&&!((e-=2)<0);++A)n=(r=t.charCodeAt(A))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function v(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function Q(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,A,a,s,c=t[i],u=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(u=s);break;case 3:o=t[i+1],A=t[i+2],128==(192&o)&&128==(192&A)&&(s=(15&c)<<12|(63&o)<<6|63&A)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:o=t[i+1],A=t[i+2],a=t[i+3],128==(192&o)&&128==(192&A)&&128==(192&a)&&(s=(15&c)<<18|(63&o)<<12|(63&A)<<6|63&a)>65535&&s<1114112&&(u=s)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function _(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 D(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 S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=O(t[o]);return i}function M(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 k(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 x(t,e,r,n,i,o){if(!s.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 R(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function F(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 U(t,e,r,n,o){return o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function H(t,e,r,n,o){return o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.Buffer=s,e.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=A(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return c(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return function(t,e,r,n){return u(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},s.allocUnsafe=function(t){return f(null,t)},s.allocUnsafeSlow=function(t){return f(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");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},s.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}},s.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var A=t[r];if(!s.isBuffer(A))throw new TypeError('"list" argument must be an Array of Buffers');A.copy(n,i),i+=A.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.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)p(this,e,e+1);return this},s.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)p(this,e,e+3),p(this,e+1,e+2);return this},s.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)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Q(this,0,t):g.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),A=(r>>>=0)-(e>>>=0),a=Math.min(o,A),c=this.slice(n,i),u=t.slice(e,r),f=0;f<a;++f)if(c[f]!==u[f]){o=c[f],A=u[f];break}return o<A?-1:A<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return I(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return I(this,t,e,r,!1)},s.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 C(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return B(this,t,e,r);case"base64":return m(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;r=new s(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},s.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(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},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(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},s.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||x(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},s.prototype.writeUIntBE=function(t,e,r,n){t=+t,e|=0,r|=0,n||x(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},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=0,A=1,a=0;for(this[e]=255&t;++o<r&&(A*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/A>>0)-a&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=r-1,A=1,a=0;for(this[e+o]=255&t;--o>=0&&(A*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/A>>0)-a&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return H(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return H(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var 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 A=s.isBuffer(t)?t:T(new s(t,n).toString()),a=A.length;for(o=0;o<r-e;++o)this[o+e]=A[o%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function O(t){return t<16?"0"+t.toString(16):t.toString(16)}function T(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],A=0;A<n;++A){if((r=t.charCodeAt(A))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(A+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 G(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(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}}).call(this,r(11))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:A}catch(t){n=A}}();var s,c=[],u=!1,f=-1;function h(){u&&s&&(u=!1,s.length?c=s.concat(c):f=-1,c.length&&l())}function l(){if(!u){var t=a(h);u=!0;for(var e=c.length;e;){for(s=c,c=[];++f<e;)s&&s[f].run();f=-1,e=c.length}s=null,u=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===A||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}i.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];c.push(new d(t,e)),1!==c.length||u||a(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){"use strict";e.a={"ElvCrypto.wasm":"AGFzbQEAAAABwQEYYAN/f38Bf2AGf3x/f39/AX9gAn9/AGABfwF/YAN/fn8BfmABfwBgAn9/AX9gAAF/YAZ/f39/f38Bf2AHf39/f39/fwF/YAh/f39/f39/fwF/YAp/f39/f39/f39/AX9gBH9/f38Bf2AGf39/f39/AGAJf39/f39/f39/AX9gBX9/f39/AX9gA39/fwBgBX9/f39/AGAEf39+fwBgCH9/f39/f39/AGAEf39/fwBgA35/fwF/YAJ+fwF/YAJ8fwF8AowBDgNlbnYBYgADA2VudgFjAAUDZW52AWQABgNlbnYBZQAFA2VudgFmAAMDZW52AWcAAwNlbnYBaAAAA2VudgFpAAcDZW52AWoABgNlbnYBawAGA2VudgxfX3RhYmxlX2Jhc2UDfwADZW52AWEDfwADZW52Bm1lbW9yeQIAgAIDZW52BXRhYmxlAXABCgoDnwKdAgUCEAUCBRACAhAQEBACEAIFEBAQAgICEBASEBICEBECAgUCAgICAhAFAgUFAgIQBRADAgIQEAICAgICAgICEAIABQUQAwUCBQMAAgICEAUDBRYDAgUCEAUQAgUFBgYCAxAFEAUCAgUCBQURAwUFAgICEBACEBAFERAFAgUCAgIOAw8RFAIFBQYCAgUQEBACAhACAgUQAgICAgALFwYQAxAAAhAFEQICAgAQFAcCAgUCBwYCAgAQEAUQAwMABQIHEAILEBAFBQIFAwMDBgMGEAMDAgICDwYMDAAMBQkCBAABAwYOBhYVDRACAQYDBwcEAAMUFAcHDQ0CBhAQAgcFBxACEAcQBhAQBwUCAgcJExAQAhAMCwIQBhAKAgkCCAYNAn8BIwELfwFBoMkACwfHASgBbADaAQFtANkBAW4A1wEBbwDUAQFwANMBAXEApgIBcgCkAgFzAKICAXQAywEBdQCdAgF2AJwCAXcAyAEBeACVAgF5AJECAXoAjAIBQQCIAgFCAIYCAUMAugEBRAC6AQFFALUBAUYA/gEBRwD9AQFIAMgBAUkA9wEBSgC1AQFLAPABAUwA7AEBTQCkAQFOAOUBAU8A5AEBUADjAQFRAOIBAVIA4QEBUwDgAQFUAN8BAVUAowEBVgDeAQFXAPYBAVgASwFZAFwJGgEAIwALCuoB+gHpAfMB6AH5AecB+AHmAfIBCvr1BZ0CvAEBAX4gACAAKQMAIgFC//////////8DgzcDACAAIAApAwggAUI6h3wiAUL//////////wODNwMIIAAgACkDECABQjqHfCIBQv//////////A4M3AxAgACAAKQMYIAFCOod8IgFC//////////8DgzcDGCAAIAApAyAgAUI6h3wiAUL//////////wODNwMgIAAgACkDKCABQjqHfCIBQv//////////A4M3AyggACAAKQMwIAFCOod8NwMwC0gAIAAgASkDADcDACAAIAEpAwg3AwggACABKQMQNwMQIAAgASkDGDcDGCAAIAEpAyA3AyAgACABKQMoNwMoIAAgASkDMDcDMAtRAQF/IwMhAyMDQUBrJAMgACABIAIQfiAAIAEoAjggAigCOGoiATYCOCABQYCAgBBMBEAgAyQDDwsgA0HADBALIAAgAxAeIABBATYCOCADJAMLDQAgABAKIABBQGsQCgsdACAAIAFGBEAPCyAAIAEQESAAQUBrIAFBQGsQEQuCAQEBfiAAIAApAwAiAUL//////////wCDNwMAIAAgACkDCCABQjiHfCIBQv//////////AIM3AwggACAAKQMQIAFCOId8IgFC//////////8AgzcDECAAIAApAxggAUI4h3wiAUL//////////wCDNwMYIAAgACkDICABQjiHfDcDIAtSAQF/IwMhAyMDQTBqJAMgACABIAIQwAEgACABKAIoIAIoAihqIgE2AiggAUGAgIAITARAIAMkAw8LIANBgBAQEiAAIAMQKSAAQQE2AiggAyQDCxIAIAAgARALIAAgASgCODYCOAs0ACAAIAEpAwA3AwAgACABKQMINwMIIAAgASkDEDcDECAAIAEpAxg3AxggACABKQMgNwMgC2oBAn8jAyEDIwNBsAFqJAMgA0HwAGohBCACKAI4rCABKAI4rH5CgICAEFUEQCAEQcAMEAsgASAEEB4gAUEBNgI4CyADIAEgAhAxIARBwAwQCyAAIARBgDQpAwAgAxAjIABBAjYCOCADJAMLHgAgACABIAIQFSAAQYABaiABQYABaiACQYABahAVCxsAIAAgASACEAwgAEFAayABQUBrIAJBQGsQDAtqAQJ/IwMhAyMDQYABaiQDIANB0ABqIQQgAigCKKwgASgCKKx+QoCAgAhVBEAgBEGAEBASIAEgBBApIAFBATYCKAsgAyABIAIQPiAEQYAQEBIgACAEQYg0KQMAIAMQJSAAQQI2AiggAyQDCxIAIAAgARASIAAgASgCKDYCKAuXAgEHfyMDIQMjA0HwBWokAyADQcAMEAsgA0HAAWoiCCADEKMCIAFBQGshBSABKAI4IgYgASgCeCIEaqwgAigCOCACKAJ4aqx+QoCAgBBVBEAgBkEBSgRAIAEQKyABKAJ4IQQLIARBAUoEQCAFECsLCyADQYAFaiIEIAEgAhAxIANBkARqIgYgBSACQUBrIgkQMSADQYABaiIHIAEgBRB+IAcQCiADQUBrIgUgAiAJEH4gBRAKIANBoANqIgEgByAFEDEgA0GwAmoiAiAEIAYQzAEgBiAIIAYQzQEgBCAEIAYQzAEgASABIAIQzQEgBBDPASAAIAQQLyAAQQM2AjggARDPASAAQUBrIAEQLyAAQQI2AnggAyQDC0oBAn8jAyECIwNB8AFqJAMgAkGADRALIAJBQGsiAyABIAIQMSACQbABaiIBQcAMEAsgACABQYA0KQMAIAMQIyAAQQI2AjggAiQDCw4AIAAQDSAAQYABahANCyYAIAAgASACEJcBIAAgACgCOCIAQQAgAmsgACABKAI4c3FzNgI4CxgAIAAgASACEBsgAEFAayABQUBrIAIQGwsmACAAIAEgAhDCASAAIAAoAigiAEEAIAJrIAAgASgCKHNxczYCKAuFCwIJfxB+IAAgACkDACILQv//////////A4MiEDcDACAAIAApAwggC0I6h3wiC0L//////////wODIg03AwggACAAKQMQIAtCOod8IgtC//////////8DgyIONwMQIAAgACkDGCALQjqHfCILQv//////////A4MiETcDGCAAIAApAyAgC0I6h3wiC0L//////////wODIhI3AyAgACAAKQMoIAtCOod8IgxC//////////8DgyILNwMoIAAgACkDMCAMQjqHfCIPNwMwAkACQCAPIAEpAzAiE1EEfiALIAFBKGoiCCkDACIMUQR+IBIgAUEgaiIDKQMAIgxRBH4gESABQRhqIgQpAwAiDFEEfiAOIAFBEGoiBSkDACIMUQR+IAFBCGoiAikDACIMIA1RBH4gECABKQMAIgxRBH4gAyEGIAQhByAFIQMgAiEEIAghBSALBSAQIQsMBwsFIA0hCwwGCwUgDiELDAULBSARIQsMBAsFIBIhCwwDCwUMAgsFIBMhDCAPIQsMAQshDwwBCyALIAxVBH4gAUEoaiIFKQMAIQ8gAUEgaiIJIQYgAUEYaiIKIQcgAUEQaiIIIQMgAUEIaiICIQQgCSkDACESIAopAwAhESAIKQMAIQ4gAikDACENIAEpAwAFDwshEAtBACECA0AgASATQgGGIA9COYeEIhM3AzAgBSAPQgGGQv7/////////A4MgEkI5h4QiDzcDACAGIBJCAYZC/v////////8DgyARQjmHhCISNwMAIAcgEUIBhkL+/////////wODIA5COYeEIhE3AwAgAyAOQgGGQv7/////////A4MgDUI5h4QiDjcDACAEIA1CAYZC/v////////8DgyAQQjmHhCINNwMAIAEgEEIBhkL+/////////wODIhA3AwAgAkEBaiECAn8CQCATIAApAzAiC1EEfyAPIAApAygiC1EEfyASIAApAyAiC1EEfyARIAApAxgiC1EEfyAOIAApAxAiC1EEfyANIAApAwgiC1EEfyAAKQMAIgsgEFEEf0EABSAQIQwMBwsFIA0hDAwGCwUgDiEMDAULBSARIQwMBAsFIBIhDAwDCwUgDyEMDAILBSATIQwMAQsMAQtBAUF/IAsgDFUbC0F/Sg0ACwNAIAEgDUI5hkKAgICAgICAgAKDIBBCAYeEIho3AwAgBCAOQjmGQoCAgICAgICAAoMgDUIBh4QiFDcDACADIBFCOYZCgICAgICAgIACgyAOQgGHhCIONwMAIAcgEkI5hkKAgICAgICAgAKDIBFCAYeEIg03AwAgBiAPQjmGQoCAgICAgICAAoMgEkIBh4QiEDcDACAFIBNCOYZCgICAgICAgIACgyAPQgGHhCIMNwMAIAEgE0IBhyILNwMwQQAgACkDMCIVIAt9IAApAygiFiAMfSAAKQMgIhcgEH0gACkDGCIYIA19IAApAxAiGSAOfSAAKQMIIhMgFH0gACkDACIPIBp9IhJCOod8IhFCOod8Ig5COod8Ig1COod8IhBCOod8IgxCOod8IgtCP4inQQFza6whFCAAIA8gFCAPIBJC//////////8Dg4WDhTcDACAAIBMgFCATIBFC//////////8Dg4WDhTcDCCAAIBkgFCAZIA5C//////////8Dg4WDhTcDECAAIBggFCAYIA1C//////////8Dg4WDhTcDGCAAIBcgFCAXIBBC//////////8Dg4WDhTcDICAAIBYgFCAWIAxC//////////8Dg4WDhTcDKCAAIBUgFCALIBWFg4U3AzAgAkEBSgRAIAJBf2ohAiABKQMAIRAgBCkDACENIAMpAwAhDiAHKQMAIREgBikDACESIAUpAwAhDyABKQMwIRMMAQsLC5MCAgF/B34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwA0AgACAJQgiGIARCMoeEIgk3AzAgACAEQgiGQoD+////////A4MgBUIyh4QiBDcDKCAAIAVCCIZCgP7///////8DgyAGQjKHhCIFNwMgIAAgBkIIhkKA/v///////wODIAdCMoeEIgY3AxggACAHQgiGQoD+////////A4MgCEIyh4QiBzcDECAAIAhCCIZCgP7///////8DgyADQjKHhCIINwMIIAAgA0IIhkKA/v///////wODIgM3AwAgACADIAEgAmotAACthCIDNwMAIAJBAWoiAkEwRw0ACwuGAwIBfwd+IAEgASkDACIDQv//////////A4MiBzcDACABIAEpAwggA0I6h3wiA0L//////////wODIgg3AwggASABKQMQIANCOod8IgNC//////////8DgyIJNwMQIAEgASkDGCADQjqHfCIEQv//////////A4MiAzcDGCABIAEpAyAgBEI6h3wiBUL//////////wODIgQ3AyAgASABKQMoIAVCOod8IgZC//////////8DgyIFNwMoIAEgASkDMCAGQjqHfCIGNwMwQS8hAQNAIAAgAWogBzwAACAIQjKGQoCAgICAgID+A4MgB0IIh4QhByAJQjKGQoCAgICAgID+A4MgCEIIh4QhCCADQjKGQoCAgICAgID+A4MgCUIIh4QhCSAEQjKGQoCAgICAgID+A4MgA0IIh4QhAyAFQjKGQoCAgICAgID+A4MgBEIIh4QhBCAGQjKGQoCAgICAgID+A4MgBUIIh4QhBSAGQgiHIQYgAUF/aiECIAEEQCACIQEMAQsLC14BAn8jAyEDIwNB4ABqJAMgA0EoaiIEIAIQXSAAIAEgBBDAASAAIAEoAiggBCgCKGoiATYCKCABQYCAgAhMBEAgAyQDDwsgA0GAEBASIAAgAxApIABBATYCKCADJAMLXQECfyMDIQMjA0GAAWokAyADQThqIgQgAhAwIAAgASAEEH4gACABKAI4IAQoAjhqIgE2AjggAUGAgIAQTARAIAMkAw8LIANBwAwQCyAAIAMQHiAAQQE2AjggAyQDC5IPAgR/CX4gAkJ/UQRAIAMpAzAhAgNAQgAgBEEDdCADaiIGKQMAIgh9IgtC/////wGDIQ0gASkDACIKQv////8BgyEJIAYgCCAJIA1+fCANIApCHYciCn4gC0IdiEL/////AYMiCyAJfnwiDEIdhkKAgICA/v///wODfCIIQv//////////A4M3AwAgASkDCCIOQv////8BgyEJIARBAWoiBkEDdCADaiIFKQMAIAogC34gDEIdh3wgCEI6h3x8IAkgDX58IA0gDkIdhyIOfiAJIAt+fCIPQh2GQoCAgID+////A4N8IQkgBSAJQv//////////A4M3AwAgASkDECIKQv////8BgyEIIARBAmpBA3QgA2oiBSkDACALIA5+IA9CHYd8IAlCOod8fCAIIA1+fCANIApCHYciCn4gCCALfnwiDEIdhkKAgICA/v///wODfCEJIAUgCUL//////////wODNwMAIAEpAxgiDkL/////AYMhCCAEQQNqQQN0IANqIgUpAwAgCiALfiAMQh2HfCAJQjqHfHwgCCANfnwgDSAOQh2HIg5+IAggC358Ig9CHYZCgICAgP7///8Dg3whCSAFIAlC//////////8DgzcDACABKQMgIgpC/////wGDIQggBEEEakEDdCADaiIFKQMAIAsgDn4gD0Idh3wgCUI6h3x8IAggDX58IApCHYciCiANfiAIIAt+fCIMQh2GQoCAgID+////A4N8IQkgBSAJQv//////////A4M3AwAgASkDKCIOQv////8BgyEIIARBBWpBA3QgA2oiBSkDACAKIAt+IAxCHYd8IAlCOod8fCAIIA1+fCAOQh2HIg4gDX4gCCALfnwiD0IdhkKAgICA/v///wODfCEJIAUgCUL//////////wODNwMAIAEpAzAiCkL/////AYMhCCAEQQZqQQN0IANqIAsgDn4gD0Idh3wgCUI6h3wgAnwgCCANfnwgDSAKQh2HIgp+IAggC358IgxCHYZCgICAgP7///8Dg3wiAkL//////////wODNwMAIARBB2pBA3QgA2oiBCkDACAKIAt+IAxCHYd8IAJCOod8fCECIAQgAjcDACAGQQdHBEAgBiEEDAELCwUgAkIBUSEFIAMpAzAhDQNAIARBA3QgA2oiBikDACIIIAIgCH5C//////////8DgyAFGyIJQv////8BgyELIAEpAwAiDEL/////AYMhCiAGIAggCiALfnwgCyAMQh2HIgx+IAlCHYciCSAKfnwiDkIdhkKAgICA/v///wODfCIKQv//////////A4M3AwAgASkDCCIPQv////8BgyEIIARBAWoiBkEDdCADaiIHKQMAIAkgDH4gDkIdh3wgCkI6h3x8IAggC358IAsgD0IdhyIPfiAIIAl+fCIQQh2GQoCAgID+////A4N8IQggByAIQv//////////A4M3AwAgASkDECIMQv////8BgyEKIARBAmpBA3QgA2oiBykDACAJIA9+IBBCHYd8IAhCOod8fCAKIAt+fCALIAxCHYciDH4gCSAKfnwiDkIdhkKAgICA/v///wODfCEIIAcgCEL//////////wODNwMAIAEpAxgiD0L/////AYMhCiAEQQNqQQN0IANqIgcpAwAgCSAMfiAOQh2HfCAIQjqHfHwgCiALfnwgCyAPQh2HIg9+IAkgCn58IhBCHYZCgICAgP7///8Dg3whCCAHIAhC//////////8DgzcDACABKQMgIgxC/////wGDIQogBEEEakEDdCADaiIHKQMAIAkgD34gEEIdh3wgCEI6h3x8IAogC358IAsgDEIdhyIMfiAJIAp+fCIOQh2GQoCAgID+////A4N8IQggByAIQv//////////A4M3AwAgASkDKCIPQv////8BgyEKIARBBWpBA3QgA2oiBykDACAJIAx+IA5CHYd8IAhCOod8fCAKIAt+fCALIA9CHYciD34gCSAKfnwiEEIdhkKAgICA/v///wODfCEIIAcgCEL//////////wODNwMAIAEpAzAiDEL/////AYMhCiAEQQZqQQN0IANqIAkgD34gEEIdh3wgCEI6h3wgDXwgCiALfnwgCyAMQh2HIgx+IAkgCn58Ig5CHYZCgICAgP7///8Dg3wiDUL//////////wODNwMAIARBB2pBA3QgA2oiBCkDACAJIAx+IA5CHYd8IA1COod8fCENIAQgDTcDACAGQQdHBEAgBiEEDAELCwsgACADKQM4IgI3AwAgACADQUBrKQMAIg03AwggACADKQNIIgs3AxAgACADKQNQIgk3AxggACADKQNYIgg3AyAgACADKQNgIgo3AyggAykDaCEMIAAgAkL//////////wODNwMAIAAgDSACQjqHfCICQv//////////A4M3AwggACALIAJCOod8IgJC//////////8DgzcDECAAIAkgAkI6h3wiAkL//////////wODNwMYIAAgCCACQjqHfCICQv//////////A4M3AyAgACAKIAJCOod8IgJC//////////8DgzcDKCAAIAwgAkI6h3w3AzALnAEBBn8jAyEDIwNBgARqJAMgA0GAA2oiBiABIAIQGCADQYACaiIFIAFBgAFqIgcgAkGAAWoiCBAYIANBgAFqIgQgCCACEBUgAyAHIAEQFSADEA0gBBANIAMgAyAEEBggBCAGEC0gAyADIAQQFSADEA0gBCAFEC0gAEGAAWoiASADIAQQFSAFEDkgACAFIAYQFSAAEA0gARANIAMkAwuSCwIEfwl+IAJCf1EEQCADKQMgIQIDQEIAIARBA3QgA2oiBSkDACIIfSIKQv////8AgyEMIAEpAwAiC0L/////AIMhCSAFIAggCSAMfnwgDCALQhyHIgt+IApCHIhC/////wCDIgogCX58Ig1CHIZCgICAgP////8Ag3wiCEL//////////wCDNwMAIAEpAwgiDkL/////AIMhCSAEQQFqIgVBA3QgA2oiBikDACAKIAt+IA1CHId8IAhCOId8fCAJIAx+fCAMIA5CHIciDn4gCSAKfnwiD0IchkKAgICA/////wCDfCEJIAYgCUL//////////wCDNwMAIAEpAxAiC0L/////AIMhCCAEQQJqQQN0IANqIgYpAwAgCiAOfiAPQhyHfCAJQjiHfHwgCCAMfnwgDCALQhyHIgt+IAggCn58Ig1CHIZCgICAgP////8Ag3whCSAGIAlC//////////8AgzcDACABKQMYIg5C/////wCDIQggBEEDakEDdCADaiIGKQMAIAogC34gDUIch3wgCUI4h3x8IAggDH58IAwgDkIchyIOfiAIIAp+fCIPQhyGQoCAgID/////AIN8IQkgBiAJQv//////////AIM3AwAgASkDICILQv////8AgyEIIARBBGpBA3QgA2ogCiAOfiAPQhyHfCAJQjiHfCACfCAIIAx+fCAMIAtCHIciC34gCCAKfnwiDUIchkKAgICA/////wCDfCICQv//////////AIM3AwAgBEEFakEDdCADaiIEKQMAIAogC34gDUIch3wgAkI4h3x8IQIgBCACNwMAIAVBBUcEQCAFIQQMAQsLBSACQgFRIQYgAykDICEMA0AgBEEDdCADaiIFKQMAIgggAiAIfkL//////////wCDIAYbIglC/////wCDIQogASkDACINQv////8AgyELIAUgCCAKIAt+fCAKIA1CHIciDX4gCUIchyIJIAt+fCIOQhyGQoCAgID/////AIN8IgtC//////////8AgzcDACABKQMIIg9C/////wCDIQggBEEBaiIFQQN0IANqIgcpAwAgCSANfiAOQhyHfCALQjiHfHwgCCAKfnwgCiAPQhyHIg9+IAggCX58IhBCHIZCgICAgP////8Ag3whCCAHIAhC//////////8AgzcDACABKQMQIg1C/////wCDIQsgBEECakEDdCADaiIHKQMAIAkgD34gEEIch3wgCEI4h3x8IAogC358IAogDUIchyINfiAJIAt+fCIOQhyGQoCAgID/////AIN8IQggByAIQv//////////AIM3AwAgASkDGCIPQv////8AgyELIARBA2pBA3QgA2oiBykDACAJIA1+IA5CHId8IAhCOId8fCAKIAt+fCAKIA9CHIciD34gCSALfnwiEEIchkKAgICA/////wCDfCEIIAcgCEL//////////wCDNwMAIAEpAyAiDUL/////AIMhCyAEQQRqQQN0IANqIAkgD34gEEIch3wgCEI4h3wgDHwgCiALfnwgCiANQhyHIg1+IAkgC358Ig5CHIZCgICAgP////8Ag3wiDEL//////////wCDNwMAIARBBWpBA3QgA2oiBCkDACAJIA1+IA5CHId8IAxCOId8fCEMIAQgDDcDACAFQQVHBEAgBSEEDAELCwsgACADKQMoIgI3AwAgACADKQMwIgw3AwggACADKQM4Igo3AxAgACADQUBrKQMAIgk3AxggAykDSCEIIAAgAkL//////////wCDNwMAIAAgDCACQjiHfCICQv//////////AIM3AwggACAKIAJCOId8IgJC//////////8AgzcDECAAIAkgAkI4h3wiAkL//////////wCDNwMYIAAgCCACQjiHfDcDIAsfACAAIAFGBEAPCyAAIAEQDiAAQYABaiABQYABahAOCxgAIAAoAgBBIHFFBEAgASACIAAQqgEaCwuAAQECfyMDIQUjA0GAAmokAyAEQYDABHFFIAIgA0pxBEAgBSABQRh0QRh1IAIgA2siAUGAAiABQYACSRsQShogAUH/AUsEQAJ/IAIgA2shBgNAIAAgBUGAAhAnIAFBgH5qIgFB/wFLDQALIAYLQf8BcSEBCyAAIAUgARAnCyAFJAML6wcCBX8LfiAAIAApAwAiB0L//////////wCDIgs3AwAgACAAKQMIIAdCOId8IgdC//////////8AgyIJNwMIIAAgACkDECAHQjiHfCIHQv//////////AIMiDDcDECAAIAApAxggB0I4h3wiCEL//////////wCDIgc3AxggACAAKQMgIAhCOId8Igo3AyACQAJAIAogASkDICINUQR+IAcgAUEYaiIGKQMAIghRBH4gDCABQRBqIgMpAwAiCFEEfiABQQhqIgIpAwAiCCAJUQR+IAsgASkDACIIUQR+IAMhBCACIQUgBiEDIAcFIAshBwwFCwUgCSEHDAQLBSAMIQcMAwsFDAILBSANIQggCiEHDAELIQoMAQsgByAIVQR+IAFBGGoiAykDACEKIAFBEGoiBiEEIAFBCGoiAiEFIAYpAwAhDCACKQMAIQkgASkDAAUPCyELC0EAIQIDQCABIA1CAYYgCkI3h4QiDTcDICADIApCAYZC/v////////8AgyAMQjeHhCIKNwMAIAQgDEIBhkL+/////////wCDIAlCN4eEIgw3AwAgBSAJQgGGQv7/////////AIMgC0I3h4QiCTcDACABIAtCAYZC/v////////8AgyILNwMAIAJBAWohAgJ/AkAgDSAAKQMgIgdRBH8gCiAAKQMYIgdRBH8gDCAAKQMQIgdRBH8gCSAAKQMIIgdRBH8gCyAAKQMAIgdRBH9BAAUgCyEIDAULBSAJIQgMBAsFIAwhCAwDCwUgCiEIDAILBSANIQgMAQsMAQtBAUF/IAcgCFUbC0F/Sg0ACwNAIAEgCUI3hkKAgICAgICAwACDIAtCAYeEIg43AwAgBSAMQjeGQoCAgICAgIDAAIMgCUIBh4QiCTcDACAEIApCN4ZCgICAgICAgMAAgyAMQgGHhCILNwMAIAMgDUI3hkKAgICAgICAwACDIApCAYeEIgg3AwAgASANQgGHIgc3AyAgAEEAIAApAyAiDyAHfSAAKQMYIhAgCH0gACkDECIRIAt9IAApAwgiCiAJfSAAKQMAIg0gDn0iDEI4h3wiCUI4h3wiC0I4h3wiCEI4h3wiB0I/iKdBAXNrrCIOIAxC//////////8AgyANhYMgDYU3AwAgACAOIAlC//////////8AgyAKhYMgCoU3AwggACAOIAtC//////////8AgyARhYMgEYU3AxAgACAQIA4gECAIQv//////////AIOFg4U3AxggACAPIA4gByAPhYOFNwMgIAJBAUoEQCACQX9qIQIgASkDACELIAUpAwAhCSAEKQMAIQwgAykDACEKIAEpAyAhDQwBCwsLOQEBfyMDIQIjA0GwAWokAyACEDIgAiABEDMgAkHwAGoiAUHADBALIAAgAUGANCkDACACECMgAiQDCycBAX8jAyEBIwNBQGskAyABQcAMEAsgACABEB4gAEEBNgI4IAEkAwvaAQEEfiAAIAApAwgiA0E6IAFrrSIEhkL//////////wODIAApAwAgAa0iAoeENwMAIAAgACkDECIFIASGQv//////////A4MgAyACh4Q3AwggACAAKQMYIgMgBIZC//////////8DgyAFIAKHhDcDECAAIAApAyAiBSAEhkL//////////wODIAMgAoeENwMYIAAgACkDKCIDIASGQv//////////A4MgBSACh4Q3AyAgACAAKQMwIgUgBIZC//////////8DgyADIAKHhDcDKCAAIAUgAoc3AzALRQEDfyMDIQIjA0GAAWokAyACQUBrIgMgASABQUBrIgQQDCADIAMQMCACIAMgBBAMIABBQGsgAyABEAwgACACEBEgAiQDC7QCAQl/IwMhAiMDQYAMaiQDIAJBgApqIgkgACABECQgAkGABmoiBSAAQYACaiIGIAFBgAJqIgQQJCACQYACaiIDIAAgBhAUIAIgASAEEBQgAxAaIAIQGiACQYAIaiIIIAMgAhAkIAMgBiAAQYAEaiIHEBQgAiAEIAFBgARqIgoQFCADEBogAhAaIAJBgARqIgQgAyACECQgAyAJEFYgAiAFEFYgCCAIIAMQFCAGIAggAhAUIAQgBCACEBQgBSAFIAMQFCADIAAgBxAUIAIgASAKEBQgAxAaIAIQGiADIAIgAxAkIAUgBSADEBQgAyAHIAoQJCACIAMQViAHIAUgAhAUIAQgBCACEBQgAxA0IAYgBiADEBQgBBAaIAQQNCAAIAkgBBAUIAAQGiAGEBogBxAaIAIkAwsoAQF/IwMhAiMDQUBrJAMgAkHADBALIAAgAkGANCkDACABECMgAiQDC80BAQJ/IwMhAyMDQYABaiQDIANBwAwQCyADIAEoAjhBf2oiAiACQQF2ciICIAJBAnZyIgIgAkEEdnIiAiACQQh2ciICIAJBEHZyIgIgAkEBdkHVqtWqBXFrIgJBs+bMmQNxIAJBAnZBs+bMmQNxaiICIAJBBHZqQY+evPgAcUGBgoQIbEEYdiICENABIAAgAyABEKECIABBASACdCIBNgI4IAFBgICAEEwEQCADJAMPCyADQUBrIgFBwAwQCyAAIAEQHiAAQQE2AjggAyQDC5AIAgV/C34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABCADcDOCAAQUBrQgA3AwAgAEIANwNIIABCADcDUCAAQgA3A1ggAEIANwNgIABCADcDaANAIAIpAwAiC0L/////AYMhDCADQQN0IABqIANBA3QgAWoiBSkDACIIQv////8BgyIJIAtCHYciDX4gCEIdhyIPIAx+fCIQQh2GQoCAgID+////A4MgCSAMfiAOfHwiDEL//////////wODNwMAIAIpAwgiC0L/////AYMhCiAFKQMAIghC/////wGDIgkgC0IdhyIRfiAIQh2HIhIgCn58Ig5CHYZCgICAgP7///8DgyADQQFqIgZBA3QgAGoiBykDACANIA9+IBBCHYd8IAxCOod8fCAJIAp+fHwhCiAHIApC//////////8DgzcDACACKQMQIgtC/////wGDIQ0gBSkDACIIQv////8BgyIJIAtCHYciD34gCEIdhyIQIA1+fCIMQh2GQoCAgID+////A4MgA0ECakEDdCAAaiIEKQMAIBEgEn4gDkIdh3wgCkI6h3x8IAkgDX58fCEKIAQgCkL//////////wODNwMAIAIpAxgiC0L/////AYMhDSAFKQMAIghC/////wGDIgkgC0IdhyIRfiAIQh2HIhIgDX58Ig5CHYZCgICAgP7///8DgyADQQNqQQN0IABqIgQpAwAgDyAQfiAMQh2HfCAKQjqHfHwgCSANfnx8IQogBCAKQv//////////A4M3AwAgAikDICILQv////8BgyENIAUpAwAiCEL/////AYMiCSALQh2HIg9+IAhCHYciECANfnwiDEIdhkKAgICA/v///wODIANBBGpBA3QgAGoiBCkDACARIBJ+IA5CHYd8IApCOod8fCAJIA1+fHwhCiAEIApC//////////8DgzcDACACKQMoIgtC/////wGDIQ0gBSkDACIIQv////8BgyIJIAtCHYciEX4gCEIdhyISIA1+fCIOQh2GQoCAgID+////A4MgA0EFakEDdCAAaiIEKQMAIA8gEH4gDEIdh3wgCkI6h3x8IAkgDX58fCEPIAQgD0L//////////wODNwMAIAIpAzAiCEL/////AYMhECAFKQMAIglC/////wGDIgwgCEIdhyILfiAJQh2HIgggEH58IglCHYZCgICAgP7///8DgyADQQZqQQN0IABqIgQpAwAgESASfiAOQh2HfCAPQjqHfHwgDCAQfnx8IQwgBCAMQv//////////A4M3AwAgA0EHakEDdCAAaiAIIAt+IAlCHYd8IAxCOod8NwMAIAZBB0cEQCAGIQMgBykDACEODAELCwtnACAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKCAAQgA3AzAgAEIANwM4IABBQGtCADcDACAAQgA3A0ggAEIANwNQIABCADcDWCAAQgA3A2AgAEIANwNoC48BACAAIAEpAwA3AwAgACABKQMINwMIIAAgASkDEDcDECAAIAEpAxg3AxggACABKQMgNwMgIAAgASkDKDcDKCAAIAEpAzBC//////////8DgzcDMCAAIAEpAzBCOoc3AzggAEFAayIAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKAtlAQV/IwMhASMDQcACaiQDIAEgAEGAAWoiAxAOIAFBgAFqIgIgARAOIAFBgAJqIgQgAhARIAIgAkFAayIFEDAgBSAEEBEgASABIAIQFSADIAAQDiAAIAEQDiAAEA0gAxANIAEkAwsOACAAEFEgAEGAAWoQUQtVAQJ/IAAgAUYEQCAAQYAEaiECIABBgAJqIQMFIAAgARAmIABBgAJqIgMgAUGAAmoQJiAAQYAEaiICIAFBgARqECYLIAAgABBQIAMgAxBfIAIgAhBQC+YLARR/IwMhEiMDQSBqJAMgEiIDQRBqIgIgACgCDCABLQAAIAEtAAJBEHQgAS0AA0EYdHIgAS0AAUEIdHJycyIINgIAIAIgACgCECABLQAEIAEtAAdBGHQgAS0ABkEQdHIgAS0ABUEIdHJycyIGNgIEIAIgACgCFCABLQAIIAEtAAtBGHQgAS0ACkEQdHIgAS0ACUEIdHJycyIENgIIIAIgACgCGCABLQAMIAEtAA9BGHQgAS0ADkEQdHIgAS0ADUEIdHJycyIHNgIMIAAoAhwhCyAIQf8BcSEMIAAoAgRBAUoEQCACIQVBBCEJQQEhDQNAIAMgBkEIdkH/AXFBAnRBoB5qKAIAIgJBCHQgAkEYdnIgCyAMQQJ0QaAeaigCAHNzIARBEHZB/wFxQQJ0QaAeaigCACICQRB0IAJBEHZycyAHQRh2QQJ0QaAeaigCACICQRh0IAJBCHZyczYCACADIARBCHZB/wFxQQJ0QaAeaigCACICQQh0IAJBGHZyIABBDGogCUEBckECdGooAgAgBkH/AXFBAnRBoB5qKAIAc3MgB0EQdkH/AXFBAnRBoB5qKAIAIgJBEHQgAkEQdnJzIAhBGHZBAnRBoB5qKAIAIgJBGHQgAkEIdnJzIgo2AgQgAyAHQQh2Qf8BcUECdEGgHmooAgAiAkEIdCACQRh2ciAAQQxqIAlBAnJBAnRqKAIAIARB/wFxQQJ0QaAeaigCAHNzIAhBEHZB/wFxQQJ0QaAeaigCACICQRB0IAJBEHZycyAGQRh2QQJ0QaAeaigCACICQRh0IAJBCHZycyIONgIIIAMgCEEIdkH/AXFBAnRBoB5qKAIAIgJBCHQgAkEYdnIgAEEMaiAJQQNyQQJ0aigCACAHQf8BcUECdEGgHmooAgBzcyAGQRB2Qf8BcUECdEGgHmooAgAiAkEQdCACQRB2cnMgBEEYdkECdEGgHmooAgAiAkEYdCACQQh2cnMiBzYCDCAAQQxqIAlBBGoiBEECdGooAgAhCyADKAIAIghB/wFxIQwgDUEBaiIGIAAoAgRIBEACfyAFIRQgBCEJIAYhDSAKIQYgDiEEIAMhBSAUCyEDDAELCyAEIQIgA0EMaiEJIAVBBGohDyAFQQhqIRAgBUEMaiERIANBBGohDSAOIQQFIAMhBSACIQNBBCECIANBDGohCSAFQQRqIQ8gBUEIaiEQIAVBDGohESADQQRqIQ0gBiEKCwJ/IANBCGohFSAFIAsgDEHgF2otAABzIgYgCkEIdkH/AXFB4BdqLQAAQQh0cyIOIARBEHZB/wFxQeAXai0AAEEQdHMiCyAHQRh2QeAXai0AAEEYdHMiDDYCACAPIABBDGogAkEBckECdGooAgAgCkH/AXFB4BdqLQAAcyAEQQh2Qf8BcUHgF2otAABBCHRzIAdBEHZB/wFxQeAXai0AAEEQdHMgCEEYdkHgF2otAABBGHRzNgIAIBAgAEEMaiACQQJyQQJ0aigCACAEQf8BcUHgF2otAABzIAdBCHZB/wFxQeAXai0AAEEIdHMgCEEQdkH/AXFB4BdqLQAAQRB0cyAKQRh2QeAXai0AAEEYdHM2AgAgESAAQQxqIAJBA3JBAnRqKAIAIAdB/wFxQeAXai0AAHMgCEEIdkH/AXFB4BdqLQAAQQh0cyAKQRB2Qf8BcUHgF2otAABBEHRzIARBGHZB4BdqLQAAQRh0czYCACABIAY6AAAgASAOQQh2OgABIAEgC0EQdjoAAiABIAxBGHY6AAMgBUEANgIAIANBADYCACABIA8oAgAiADoABCABIABBCHY6AAUgASAAQRB2OgAGIAEgAEEYdjoAByAPQQA2AgAgDUEANgIAIAEgECgCACIAOgAIIAEgAEEIdjoACSABIABBEHY6AAogASAAQRh2OgALIBBBADYCACAVC0EANgIAIAEgESgCACIAOgAMIAEgAEEIdjoADSABIABBEHY6AA4gASAAQRh2OgAPIBFBADYCACAJQQA2AgAgEiQDC6wCAgF/B34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIAJBAEwEQA8LIAJBMCACQTBIGyEDQQAhAgNAIAAgCkIIhiAFQjKHhCIKNwMwIAAgBUIIhkKA/v///////wODIAZCMoeEIgU3AyggACAGQgiGQoD+////////A4MgB0Iyh4QiBjcDICAAIAdCCIZCgP7///////8DgyAIQjKHhCIHNwMYIAAgCEIIhkKA/v///////wODIAlCMoeEIgg3AxAgACAJQgiGQoD+////////A4MgBEIyh4QiCTcDCCAAIARCCIZCgP7///////8DgyIENwMAIAAgBCABIAJqLQAArYQiBDcDACACQQFqIgIgA0gNAAsLawEFfyMDIQMjA0HAAWokAyAAIAMiAkYEQCACQUBrIQQgAEFAayEBBSACIAAQESACQUBrIgQgAEFAayIBEBELIANBgAFqIgUgABARIAAgARAwIAEgBRARIAAgAiAAEAwgASAEIAEQDCADJAMLZAEEfyMDIQMjA0GAAmokAyADQcABaiIEIAIgAkFAayIFEAwgBCAEEDAgA0GAAWoiBiAEIAUQDCADQUBrIgUgBCACEAwgAyAGEBEgACABIAMQDCAAQUBrIAFBQGsgBRAMIAMkAwspAQJ/IwMhASMDQUBrJAMgAUHADBALIAAgARAeIAAQ0gEhAiABJAMgAgthAQR/IwMhAiMDQcABaiQDIAJBgAFqIgMgASABQUBrIgQQDCACIAQQMCACQUBrIgUgASABEAwgBRAKIABBQGsgBSAEEBMgACABIAIQDCADEAogABAKIAAgAyAAEBMgAiQDC7EDAQx/IwMhAyMDQYAIaiQDQaw1KAIAQQNsIQwgA0GAB2oiBiAAIAEQGCADQYAGaiIHIABBgAFqIgogAUGAAWoiAhAYIANBgAVqIgggAEGAAmoiCyABQYACaiINEBggA0GABGoiCSAAIAoQFSAJEA0gA0GAA2oiBCABIAIQFSAEEA0gCSAJIAQQGCAEIAYgBxAVIAkgCSAEEDogCRANIAQgCiALEBUgBBANIANBgAJqIgUgAiANEBUgBRANIAQgBCAFEBggBSAHIAgQFSAEIAQgBRA6IAQQDSAFIAAgCxAVIAUQDSADQYABaiICIAEgDRAVIAIQDSAFIAUgAhAYIAIgBiAIEBUgAiAFIAIQOiACEA0gBSAGIAYQFSAGIAYgBRAVIAYQDSAIIAggDBBXIAgQOSADIAcgCBAVIAMQDSAHIAcgCBA6IAcQDSACIAIgDBBXIAIQOSACEA0gBSACIAQQGCAIIAkgBxAYIAAgCCAFEDogAiACIAYQGCAHIAcgAxAYIAogAiAHEBUgBiAGIAkQGCADIAMgBBAYIAsgAyAGEBUgABANIAoQDSALEA0gAyQDC/QFAgV/C34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABCADcDOCAAQUBrQgA3AwAgAEIANwNIA0AgAikDACILQv////8AgyEIIANBA3QgAGogA0EDdCABaiIFKQMAIglC/////wCDIgogC0IchyINfiAJQhyHIg8gCH58IhBCHIZCgICAgP////8AgyAIIAp+IA58fCIIQv//////////AIM3AwAgAikDCCILQv////8AgyEMIAUpAwAiCUL/////AIMiCiALQhyHIhF+IAlCHIciEiAMfnwiDkIchkKAgICA/////wCDIANBAWoiBkEDdCAAaiIHKQMAIA0gD34gEEIch3wgCEI4h3x8IAogDH58fCEMIAcgDEL//////////wCDNwMAIAIpAxAiC0L/////AIMhDSAFKQMAIglC/////wCDIgogC0IchyIPfiAJQhyHIhAgDX58IghCHIZCgICAgP////8AgyADQQJqQQN0IABqIgQpAwAgESASfiAOQhyHfCAMQjiHfHwgCiANfnx8IQwgBCAMQv//////////AIM3AwAgAikDGCILQv////8AgyENIAUpAwAiCUL/////AIMiCiALQhyHIhF+IAlCHIciEiANfnwiDkIchkKAgICA/////wCDIANBA2pBA3QgAGoiBCkDACAPIBB+IAhCHId8IAxCOId8fCAKIA1+fHwhDyAEIA9C//////////8AgzcDACACKQMgIglC/////wCDIRAgBSkDACIKQv////8AgyIIIAlCHIciC34gCkIchyIJIBB+fCIKQhyGQoCAgID/////AIMgA0EEakEDdCAAaiIEKQMAIBEgEn4gDkIch3wgD0I4h3x8IAggEH58fCEIIAQgCEL//////////wCDNwMAIANBBWpBA3QgAGogCSALfiAKQhyHfCAIQjiHfDcDACAGQQVHBEAgBiEDIAcpAwAhDgwBCwsL/wECBn8BfiMDIQMjA0HwAmokAyADQfABaiEEIANBgAFqIQUgA0FAayEIIANBqAJqIQZBACACayACIAJBAEgbIgcgASgCOGxBgYCAEEgEQCAAIAEgBxCWASAAIAEoAjggB2w2AjgFIAMQ0QEgAyAHEGggAxAKIAhBgA0QCyAFIAMgCBAxIARBwAwQCyAGIARBgDQpAwAiCSAFECMgBkECNgI4IAEoAjhBgICACEoEQCAEQcAMEAsgASAEEB4gAUEBNgI4CyAFIAEgBhAxIARBwAwQCyAAIAQgCSAFECMgAEECNgI4CyACQX9KBEAgAyQDDwsgACAAEDAgABAKIAMkAwuSAQEEfyMDIQMjA0GAA2okAyADIAEgAUGAAWoiBBAYIANBgAFqIgIgBBAOIANBgAJqIgUgASAEEBUgAhA5IAIgASACEBUgBRANIAIQDSAAIAUgAhAYIAIgAxAOIAIQOSACIAIgAxAVIAIQDSACIAIQLSAAIAAgAhAVIABBgAFqIgEgAyADEBUgABANIAEQDSADJAMLYgECfyAAQShqIAAoAgAiAkEFdkEPcUECdGoiAyABQf8BcSADKAIAQQh0cjYCACAAIAJBCGoiATYCACABBEAgAUH/A3EEQA8LBSAAIAAoAgRBAWo2AgQgAEEANgIACyAAEHILqAcBD38jAyEKIwNBsANqJAMgCkGAA2ohBiAKQdACaiEFIApBoAJqIQcgCkHwAWohCCAKQcABaiEEIApBkAFqIQMgCkHgAGohAiAKQTBqIQlBsDUoAgAhD0GAOygCAEUEQCAGIAAgARAWIAUgAEEwaiILIAFBMGoiDRAWIAcgAEHgAGoiDCABQeAAaiIOEBYgCCAAIAsQECAIEA8gBCABIA0QECAEEA8gCCAIIAQQFiAEIAYgBRAQIAggCCAEECEgCBAPIAQgCyAMEBAgBBAPIAMgDSAOEBAgAxAPIAQgBCADEBYgAyAFIAcQECAEIAQgAxAhIAQQDyADIAAgDBAQIAMQDyACIAEgDhAQIAIQDyADIAMgAhAWIAIgBiAHEBAgAiADIAIQISACEA8gAyAGIAYQECAGIAYgAxAQIAYQDyAHIAcgD0EDbCIBEE0gCSAFIAcQECAJEA8gBSAFIAcQISAFEA8gAiACIAEQTSADIAIgBBAWIAcgCCAFEBYgACAHIAMQISACIAIgBhAWIAUgBSAJEBYgCyACIAUQECAGIAYgCBAWIAkgCSAEEBYgDCAJIAYQECAAEA8gCxAPIAwQDyAKJAMPCyAPRSINBEAgChCPAQsgBiAAIAEQFiAFIABBMGoiCyABQTBqIg4QFiAHIABB4ABqIgwgAUHgAGoiEBAWIAggACALEBAgCBAPIAQgASAOEBAgBBAPIAggCCAEEBYgBCAGIAUQECAIIAggBBAhIAgQDyAEIAsgDBAQIAQQDyADIA4gEBAQIAMQDyAEIAQgAxAWIAMgBSAHEBAgBCAEIAMQISAEEA8gAyAAIAwQECADEA8gAiABIBAQECACEA8gAyADIAIQFiACIAYgBxAQIAIgAyACECEgAhAPIA0EQCAJIAcgChAWBSAJIAcgDxBNCyADIAIgCRAhIAMQDyAJIAMgAxAQIAMgAyAJEBAgCSAFIAMQISAJEA8gAyADIAUQECADEA8gDQRAIAIgAiAKEBYFIAIgAiAPEE0LIAUgByAHEBAgByAHIAUQECACIAIgBxAhIAIgAiAGECEgAhAPIAUgAiACEBAgAiACIAUQECACEA8gBSAGIAYQECAGIAYgBRAQIAYgBiAHECEgBhAPIAUgBCACEBYgByAGIAIQFiACIAMgCRAWIAsgAiAHEBAgAyADIAgQFiAAIAMgBRAhIAkgCSAEEBYgBSAIIAYQFiAMIAkgBRAQIAAQDyALEA8gDBAPIAokAwv3DQICfw9+IABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEFAa0IANwMAIABCADcDSEEBIQIDQCACQQN0IAFqKQMAIgZC/////wCDIQogASkDACIFQv////8AgyIIIAZCHIciB34gBUIchyIGIAp+fCIFQhyGQoCAgID/////AIMgBCAJfCAIIAp+fHwhCCAGIAd+IAVCHId8IAhCOId8IQQgAkEDdCAAaiAIQv//////////AIM3AwAgAkEBaiEDIAJBBEkEQCADIgJBA3QgAGopAwAhCQwBCwsgACAENwMoIAEpAxAiBkL/////AIMhByAAIAEpAwgiBUL/////AIMiBCAGQhyHIg9+IAVCHIciDCAHfnwiCEIchkKAgICA/////wCDIAApAxggBCAHfnx8IgdC//////////8AgzcDGCABKQMYIgZC/////wCDIQ4gACABKQMIIgVC/////wCDIgQgBkIchyILfiAFQhyHIgkgDn58IgpCHIZCgICAgP////8AgyAAKQMgIAwgD34gCEIch3wgB0I4h3x8IAQgDn58fCIIQv//////////AIM3AyAgASkDICIGQv////8AgyEMIAAgASkDCCIFQv////8AgyIEIAZCHIciB34gBUIchyIGIAx+fCIFQhyGQoCAgID/////AIMgACkDKCAJIAt+IApCHId8IAhCOId8fCAEIAx+fHwiBEL//////////wCDNwMoIAAgBiAHfiAFQhyHfCAEQjiHfDcDMCABKQMYIgZC/////wCDIQcgACABKQMQIgVC/////wCDIgQgBkIchyILfiAFQhyHIgkgB358IgpCHIZCgICAgP////8AgyAAKQMoIAQgB358fCIIQv//////////AIM3AyggASkDICIGQv////8AgyEMIAAgASkDECIFQv////8AgyIEIAZCHIciB34gBUIchyIGIAx+fCIFQhyGQoCAgID/////AIMgACkDMCAJIAt+IApCHId8IAhCOId8fCAEIAx+fHwiBEL//////////wCDNwMwIAAgBiAHfiAFQhyHfCAEQjiHfDcDOCABKQMgIgZC/////wCDIQcgACABKQMYIgVC/////wCDIgQgBkIchyILfiAFQhyHIgkgB358IgVCHIZCgICAgP////8AgyAAKQM4IAQgB358fCIEQv//////////AIM3AzggACkDIEIBhiEQIAApAyhCAYYhESAAKQMwQgGGIRIgACkDOEIBhiENIAAgACkDAEIBhiIKNwMAIAAgACkDCEIBhiIINwMIIAAgACkDEEIBhiIHNwMQIAAgACkDGEIBhiIGNwMYIAAgEDcDICAAIBE3AyggACASNwMwIAAgDTcDOCAAQUBrIgMgCSALfiAFQhyHfCAEQjiHfEIBhiIPNwMAIABCADcDSCAAIAEpAwAiBEL/////AIMiCyAEQhyHIgl+IgVCHYZCgICAgP7///8AgyAKIAsgC358fCIEQv//////////AIMiDDcDACAAIAggCSAJfiAFQhuHfHwgBEI4h3wiDjcDCCAAIAEpAwgiBEL/////AIMiCiAEQhyHIgh+IgVCHYZCgICAgP7///8AgyAHIAogCn58fCIEQv//////////AIMiCzcDECAAIAYgCCAIfiAFQhuHfHwgBEI4h3wiCTcDGCAAIAEpAxAiBEL/////AIMiByAEQhyHIgZ+IgVCHYZCgICAgP7///8AgyAHIAd+IBB8fCIEQv//////////AIMiCjcDICAAIAYgBn4gBUIbh3wgEXwgBEI4h3wiCDcDKCAAIAEpAxgiBEL/////AIMiByAEQhyHIgZ+IgVCHYZCgICAgP7///8AgyAHIAd+IBJ8fCIEQv//////////AIMiBzcDMCAAIAYgBn4gBUIbh3wgDXwgBEI4h3wiBjcDOCABKQMgIgVC/////wCDIQ0gACAMNwMAIAAgDkL//////////wCDNwMIIAAgCyAOQjiHfCIEQv//////////AIM3AxAgACAJIARCOId8IgRC//////////8AgzcDGCAAIAogBEI4h3wiBEL//////////wCDNwMgIAAgCCAEQjiHfCIEQv//////////AIM3AyggACAHIARCOId8IgRC//////////8AgzcDMCAAIAYgBEI4h3wiBEL//////////wCDNwM4IAMgDyANIA1+fCANIAVCHIciB34iBkIdhkKAgICA/v///wCDfCIFQv//////////AIMgBEI4h3wiBEL//////////wCDNwMAIAAgByAHfiAGQhuHfCAFQjiHfCAEQjiHfDcDSAuqBwEPfyMDIQojA0HABGokAyAKQYAEaiEGIApBwANqIQUgCkGAA2ohByAKQcACaiEIIApBgAJqIQQgCkHAAWohAyAKQYABaiECIApBQGshCUGsNSgCACEPQYA7KAIARQRAIAYgACABEBMgBSAAQUBrIgsgAUFAayINEBMgByAAQYABaiIMIAFBgAFqIg4QEyAIIAAgCxAMIAgQCiAEIAEgDRAMIAQQCiAIIAggBBATIAQgBiAFEAwgCCAIIAQQIiAIEAogBCALIAwQDCAEEAogAyANIA4QDCADEAogBCAEIAMQEyADIAUgBxAMIAQgBCADECIgBBAKIAMgACAMEAwgAxAKIAIgASAOEAwgAhAKIAMgAyACEBMgAiAGIAcQDCACIAMgAhAiIAIQCiADIAYgBhAMIAYgBiADEAwgBhAKIAcgByAPQQNsIgEQPyAJIAUgBxAMIAkQCiAFIAUgBxAiIAUQCiACIAIgARA/IAMgAiAEEBMgByAIIAUQEyAAIAcgAxAiIAIgAiAGEBMgBSAFIAkQEyALIAIgBRAMIAYgBiAIEBMgCSAJIAQQEyAMIAkgBhAMIAAQCiALEAogDBAKIAokAw8LIA9FIg0EQCAKQYAIEEYLIAYgACABEBMgBSAAQUBrIgsgAUFAayIOEBMgByAAQYABaiIMIAFBgAFqIhAQEyAIIAAgCxAMIAgQCiAEIAEgDhAMIAQQCiAIIAggBBATIAQgBiAFEAwgCCAIIAQQIiAIEAogBCALIAwQDCAEEAogAyAOIBAQDCADEAogBCAEIAMQEyADIAUgBxAMIAQgBCADECIgBBAKIAMgACAMEAwgAxAKIAIgASAQEAwgAhAKIAMgAyACEBMgAiAGIAcQDCACIAMgAhAiIAIQCiANBEAgCSAHIAoQEwUgCSAHIA8QPwsgAyACIAkQIiADEAogCSADIAMQDCADIAMgCRAMIAkgBSADECIgCRAKIAMgAyAFEAwgAxAKIA0EQCACIAIgChATBSACIAIgDxA/CyAFIAcgBxAMIAcgByAFEAwgAiACIAcQIiACIAIgBhAiIAIQCiAFIAIgAhAMIAIgAiAFEAwgAhAKIAUgBiAGEAwgBiAGIAUQDCAGIAYgBxAiIAYQCiAFIAQgAhATIAcgBiACEBMgAiADIAkQEyALIAIgBxAMIAMgAyAIEBMgACADIAUQIiAJIAkgBBATIAUgCCAGEBMgDCAJIAUQDCAAEAogCxAKIAwQCiAKJAMLaAICfwF+IwMhAiMDQbABaiQDIAJB8ABqIQMgASgCOKwiBCAEfkKAgIAQVgRAIANBwAwQCyABIAMQHiABQQE2AjgLIAIgARBHIANBwAwQCyAAIANBgDQpAwAgAhAjIABBAjYCOCACJAMLVgECfyMDIQIjA0GwAmokAyACIAEQCyACQUBrIgFBgA0QCyACQYABaiIDIAIgARAxIAJB8AFqIgFBwAwQCyAAIAFBgDQpAwAgAxAjIABBAjYCOCACJAMLxhkCAn8QfiAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKCAAQgA3AzAgAEIANwM4IABBQGtCADcDACAAQgA3A0ggAEIANwNQIABCADcDWCAAQgA3A2AgAEIANwNoQQEhAgNAIAJBA3QgAWopAwAiBkL/////AYMhCyABKQMAIgVC/////wGDIgkgBkIdhyIHfiAFQh2HIgYgC358IgVCHYZCgICAgP7///8DgyAEIAp8IAkgC358fCEJIAYgB34gBUIdh3wgCUI6h3whBCACQQN0IABqIAlC//////////8DgzcDACACQQFqIQMgAkEGSQRAIAMiAkEDdCAAaikDACEKDAELCyAAIAQ3AzggASkDECIGQv////8BgyEHIAAgASkDCCIFQv////8BgyIEIAZCHYciDn4gBUIdhyIIIAd+fCIJQh2GQoCAgID+////A4MgACkDGCAEIAd+fHwiB0L//////////wODNwMYIAEpAxgiBkL/////AYMhDSAAIAEpAwgiBUL/////AYMiBCAGQh2HIgx+IAVCHYciCiANfnwiC0IdhkKAgICA/v///wODIAApAyAgCCAOfiAJQh2HfCAHQjqHfHwgBCANfnx8IgdC//////////8DgzcDICABKQMgIgZC/////wGDIQ0gACABKQMIIgVC/////wGDIgQgBkIdhyIOfiAFQh2HIgggDX58IglCHYZCgICAgP7///8DgyAAKQMoIAogDH4gC0Idh3wgB0I6h3x8IAQgDX58fCIHQv//////////A4M3AyggASkDKCIGQv////8BgyENIAAgASkDCCIFQv////8BgyIEIAZCHYciDH4gBUIdhyIKIA1+fCILQh2GQoCAgID+////A4MgACkDMCAIIA5+IAlCHYd8IAdCOod8fCAEIA1+fHwiCUL//////////wODNwMwIAEpAzAiBkL/////AYMhCCAAIAEpAwgiBUL/////AYMiBCAGQh2HIgd+IAVCHYciBiAIfnwiBUIdhkKAgICA/v///wODIAApAzggCiAMfiALQh2HfCAJQjqHfHwgBCAIfnx8IgRC//////////8DgzcDOCAAQUBrIgIgBiAHfiAFQh2HfCAEQjqHfDcDACABKQMYIgZC/////wGDIQcgACABKQMQIgVC/////wGDIgQgBkIdhyIMfiAFQh2HIgogB358IgtCHYZCgICAgP7///8DgyAAKQMoIAQgB358fCIHQv//////////A4M3AyggASkDICIGQv////8BgyENIAAgASkDECIFQv////8BgyIEIAZCHYciDn4gBUIdhyIIIA1+fCIJQh2GQoCAgID+////A4MgACkDMCAKIAx+IAtCHYd8IAdCOod8fCAEIA1+fHwiB0L//////////wODNwMwIAEpAygiBkL/////AYMhDSAAIAEpAxAiBUL/////AYMiBCAGQh2HIgx+IAVCHYciCiANfnwiC0IdhkKAgICA/v///wODIAApAzggCCAOfiAJQh2HfCAHQjqHfHwgBCANfnx8IglC//////////8DgzcDOCABKQMwIgVC/////wGDIQggASkDECIEQv////8BgyIHIAVCHYciBn4gBEIdhyIFIAh+fCIEQh2GQoCAgID+////A4MgAEFAayIDKQMAIAogDH4gC0Idh3wgCUI6h3x8IAcgCH58fCEHIAMgB0L//////////wODNwMAIAAgBSAGfiAEQh2HfCAHQjqHfDcDSCABKQMgIgZC/////wGDIQcgACABKQMYIgVC/////wGDIgQgBkIdhyIOfiAFQh2HIgggB358IgxCHYZCgICAgP7///8DgyAAKQM4IAQgB358fCIHQv//////////A4M3AzggASkDKCIGQv////8BgyENIAEpAxgiBUL/////AYMiBCAGQh2HIgp+IAVCHYciCyANfnwiCUIdhkKAgICA/v///wODIABBQGsiAykDACAIIA5+IAxCHYd8IAdCOod8fCAEIA1+fHwhCCADIAhC//////////8DgzcDACABKQMwIgZC/////wGDIQwgACABKQMYIgVC/////wGDIgQgBkIdhyIHfiAFQh2HIgYgDH58IgVCHYZCgICAgP7///8DgyAAKQNIIAogC34gCUIdh3wgCEI6h3x8IAQgDH58fCIEQv//////////A4M3A0ggACAGIAd+IAVCHYd8IARCOod8NwNQIAEpAygiBkL/////AYMhByAAIAEpAyAiBUL/////AYMiBCAGQh2HIgx+IAVCHYciCiAHfnwiC0IdhkKAgICA/v///wODIAApA0ggBCAHfnx8IglC//////////8DgzcDSCABKQMwIgZC/////wGDIQggACABKQMgIgVC/////wGDIgQgBkIdhyIHfiAFQh2HIgYgCH58IgVCHYZCgICAgP7///8DgyAAKQNQIAogDH4gC0Idh3wgCUI6h3x8IAQgCH58fCIEQv//////////A4M3A1AgACAGIAd+IAVCHYd8IARCOod8NwNYIAEpAzAiBkL/////AYMhByAAIAEpAygiBUL/////AYMiBCAGQh2HIhN+IAVCHYciDSAHfnwiDkIdhkKAgICA/v///wODIAApA1ggBCAHfnx8IghC//////////8DgzcDWCAAKQMwQgGGIQ8gACkDOEIBhiEQIAIpAwBCAYYhESAAKQNIQgGGIRIgACkDUEIBhiEFIAApA1hCAYYhBCAAIAApAwBCAYYiDDcDACAAIAApAwhCAYYiCjcDCCAAIAApAxBCAYYiCzcDECAAIAApAxhCAYYiCTcDGCAAIAApAyBCAYYiBzcDICAAIAApAyhCAYYiBjcDKCAAIA83AzAgACAQNwM4IAIgETcDACAAIBI3A0ggACAFNwNQIAAgBDcDWCAAIA0gE34gDkIdh3wgCEI6h3xCAYY3A2AgAEIANwNoIAAgASkDACIEQv////8BgyIOIARCHYciCH4iBUIehkKAgICA/P///wODIAwgDiAOfnx8IgRC//////////8DgzcDACAAIAogCCAIfiAFQhyHfHwgBEI6h3w3AwggACABKQMIIgRC/////wGDIgwgBEIdhyIKfiIFQh6GQoCAgID8////A4MgCyAMIAx+fHwiBEL//////////wODNwMQIAAgCSAKIAp+IAVCHId8fCAEQjqHfDcDGCAAIAEpAxAiBEL/////AYMiCyAEQh2HIgl+IgVCHoZCgICAgPz///8DgyAHIAsgC358fCIEQv//////////A4M3AyAgACAGIAkgCX4gBUIch3x8IARCOod8NwMoIAAgASkDGCIEQv////8BgyIHIARCHYciBn4iBUIehkKAgICA/P///wODIAcgB34gD3x8IgRC//////////8DgyIINwMwIAAgBiAGfiAFQhyHfCAQfCAEQjqHfCIMNwM4IAIgASkDICIEQv////8BgyIHIARCHYciBn4iBUIehkKAgICA/P///wODIAcgB34gEXx8IgRC//////////8DgyIKNwMAIAAgBiAGfiAFQhyHfCASfCAEQjqHfCILNwNIIAAgASkDKCIEQv////8BgyIHIARCHYciBn4iBUIehkKAgICA/P///wODIAApA1AgByAHfnx8IgRC//////////8DgyIJNwNQIAAgACkDWCAGIAZ+IAVCHId8fCAEQjqHfCIHNwNYIAEpAzAiBEL/////AYMiBiAEQh2HIgV+IgRCHoZCgICAgPz///8DgyAAKQNgIAYgBn58fCIGQjqHIAApA2ggBSAFfiAEQhyHfHx8IQUgACAAKQMAIgRC//////////8DgzcDACAAIAApAwggBEI6h3wiBEL//////////wODNwMIIAAgACkDECAEQjqHfCIEQv//////////A4M3AxAgACAAKQMYIARCOod8IgRC//////////8DgzcDGCAAIAApAyAgBEI6h3wiBEL//////////wODNwMgIAAgACkDKCAEQjqHfCIEQv//////////A4M3AyggACAIIARCOod8IgRC//////////8DgzcDMCAAIAwgBEI6h3wiBEL//////////wODNwM4IAIgCiAEQjqHfCIEQv//////////A4M3AwAgACALIARCOod8IgRC//////////8DgzcDSCAAIAkgBEI6h3wiBEL//////////wODNwNQIAAgByAEQjqHfCIEQv//////////A4M3A1ggACAGQv//////////A4MgBEI6h3wiBEL//////////wODNwNgIAAgBSAEQjqHfDcDaAvqAgEGfyMDIQUjA0HABmokAyACEAogBSACQQMQlgEgBRAKIAVBOGoiAyABRwRAIAMgARAmIANBgAJqIAFBgAJqECYgA0GABGogAUGABGoQJgsgBRBpIgRBAkoEQCABQYACaiEHIAFBgARqIQggBEF+aiEEA0AgAyADEKIBAkACQAJAIARBOm0iBkEDdCAFaikDAEIBIAQgBkE6bGuthoNCAFIgBEE6bSIGQQN0IAJqKQMAQgEgBCAGQTpsa62Gg0IAUmtBf2sOAwECAAILIAMgARAuDAELIAEgARBQIAcgBxBfIAggCBBQIAMgARAuIAEgARBQIAcgBxBfIAggCBBQCyAEQX9qIQYgBEEBSgRAIAYhBAwBCwsLIAAgA0YEQCAAEDUgAEGAAmoQNSAAQYAEahA1BSAAIAMQJiAAQYACaiIBIANBgAJqECYgAEGABGoiAiADQYAEahAmIAAQNSABEDUgAhA1CyAFJAMLWQEDfyMDIQIjA0GAAmokAyACQYABaiIDIAEQPCACIAMgARAYIAAgAhCYASAAQYACaiIEIAIQmAEgAEGABGoiACACEJgBIAQgBCABEGogACAAIAMQaiACJAMLmAIBBH8gACACaiEEIAFB/wFxIQMgAkHDAE4EQANAIABBA3EEQCAAIAM6AAAgAEEBaiEADAELCyADQQh0IANyIANBEHRyIANBGHRyIQEgBEF8cSIFQUBqIQYDQCAAIAZMBEAgACABNgIAIAAgATYCBCAAIAE2AgggACABNgIMIAAgATYCECAAIAE2AhQgACABNgIYIAAgATYCHCAAIAE2AiAgACABNgIkIAAgATYCKCAAIAE2AiwgACABNgIwIAAgATYCNCAAIAE2AjggACABNgI8IABBQGshAAwBCwsDQCAAIAVIBEAgACABNgIAIABBBGohAAwBCwsLA0AgACAESARAIAAgAzoAACAAQQFqIQAMAQsLIAQgAmsLpQ0BCX8gAEUEQA8LQZQ7KAIAIQQgAEF4aiIDIABBfGooAgAiAkF4cSIAaiEFIAJBAXEEfyADBQJ/IAMoAgAhASACQQNxRQRADwsgAyABayIDIARJBEAPCyAAIAFqIQAgA0GYOygCAEYEQCADIAUoAgQiAUEDcUEDRw0BGkGMOyAANgIAIAUgAUF+cTYCBCADIABBAXI2AgQgACADaiAANgIADwsgAUEDdiEEIAFBgAJJBEAgAygCCCIBIAMoAgwiAkYEQEGEO0GEOygCAEEBIAR0QX9zcTYCAAUgASACNgIMIAIgATYCCAsgAwwBCyADKAIYIQcgAyADKAIMIgFGBEACQCADQRBqIgJBBGoiBCgCACIBBEAgBCECBSACKAIAIgFFBEBBACEBDAILCwNAAkAgAUEUaiIEKAIAIgZFBEAgAUEQaiIEKAIAIgZFDQELIAQhAiAGIQEMAQsLIAJBADYCAAsFIAMoAggiAiABNgIMIAEgAjYCCAsgBwR/IAMgAygCHCICQQJ0QbQ9aiIEKAIARgRAIAQgATYCACABRQRAQYg7QYg7KAIAQQEgAnRBf3NxNgIAIAMMAwsFIAdBEGoiAiAHQRRqIAMgAigCAEYbIAE2AgAgAyABRQ0CGgsgASAHNgIYIAMoAhAiAgRAIAEgAjYCECACIAE2AhgLIAMoAhQiAgRAIAEgAjYCFCACIAE2AhgLIAMFIAMLCwsiByAFTwRADwsgBSgCBCIIQQFxRQRADwsgCEECcQRAIAUgCEF+cTYCBCADIABBAXI2AgQgACAHaiAANgIAIAAhAgUgBUGcOygCAEYEQEGQOyAAQZA7KAIAaiIANgIAQZw7IAM2AgAgAyAAQQFyNgIEQZg7KAIAIANHBEAPC0GYO0EANgIAQYw7QQA2AgAPC0GYOygCACAFRgRAQYw7IABBjDsoAgBqIgA2AgBBmDsgBzYCACADIABBAXI2AgQgACAHaiAANgIADwsgCEEDdiEEIAhBgAJJBEAgBSgCCCIBIAUoAgwiAkYEQEGEO0GEOygCAEEBIAR0QX9zcTYCAAUgASACNgIMIAIgATYCCAsFAkAgBSgCGCEJIAUoAgwiASAFRgRAAkAgBUEQaiICQQRqIgQoAgAiAQRAIAQhAgUgAigCACIBRQRAQQAhAQwCCwsDQAJAIAFBFGoiBCgCACIGRQRAIAFBEGoiBCgCACIGRQ0BCyAEIQIgBiEBDAELCyACQQA2AgALBSAFKAIIIgIgATYCDCABIAI2AggLIAkEQCAFKAIcIgJBAnRBtD1qIgQoAgAgBUYEQCAEIAE2AgAgAUUEQEGIO0GIOygCAEEBIAJ0QX9zcTYCAAwDCwUgCUEQaiICIAlBFGogAigCACAFRhsgATYCACABRQ0CCyABIAk2AhggBSgCECICBEAgASACNgIQIAIgATYCGAsgBSgCFCICBEAgASACNgIUIAIgATYCGAsLCwsgAyAAIAhBeHFqIgJBAXI2AgQgAiAHaiACNgIAIANBmDsoAgBGBEBBjDsgAjYCAA8LCyACQQN2IQEgAkGAAkkEQCABQQN0Qaw7aiEAQYQ7KAIAIgJBASABdCIBcQR/IABBCGoiAigCAAVBhDsgASACcjYCACAAQQhqIQIgAAshASACIAM2AgAgASADNgIMIAMgATYCCCADIAA2AgwPCyACQQh2IgAEfyACQf///wdLBH9BHwUgACAAQYD+P2pBEHZBCHEiAXQiBEGA4B9qQRB2QQRxIQBBDiAAIAFyIAQgAHQiAEGAgA9qQRB2QQJxIgFyayAAIAF0QQ92aiIAQQF0IAIgAEEHanZBAXFyCwVBAAsiAUECdEG0PWohACADIAE2AhwgA0EANgIUIANBADYCEEGIOygCACIEQQEgAXQiBnEEQAJAIAIgACgCACIAKAIEQXhxRgRAIAAhAQUCQCACQQBBGSABQQF2ayABQR9GG3QhBANAIABBEGogBEEfdkECdGoiBigCACIBBEAgBEEBdCEEIAIgASgCBEF4cUYNAiABIQAMAQsLIAYgAzYCACADIAA2AhggAyADNgIMIAMgAzYCCAwCCwsgASgCCCIAIAM2AgwgASADNgIIIAMgADYCCCADIAE2AgwgA0EANgIYCwVBiDsgBCAGcjYCACAAIAM2AgAgAyAANgIYIAMgAzYCDCADIAM2AggLQaQ7QaQ7KAIAQX9qIgA2AgAgAARADwtBzD4hAANAIAAoAgAiA0EIaiEAIAMNAAtBpDtBfzYCAAt1ACAAQgA3AgAgAEIANwIIIABCADcCECAAQgA3AhggAEIANwIgIABCADcCKCAAQgA3AjAgAEIANwI4IABBQGtCADcCACAAQgA3AkggAEIANwJQIABCADcCWCAAQgA3AmAgAEIANwJoIABCADcCcCAAQgA3AngLngICBn8BfiMDIQMjA0GQAmokAyADQbABaiEEIANB4ABqIQUgA0EwaiEIIANB2AFqIQZBACACayACIAJBAEgbIgcgASgCKGxBgYCACEgEQCAAIAEgBxCPAiAAIAEoAiggB2w2AigFIANCADcDACADQgA3AwggA0IANwMQIANCADcDGCADQgA3AyAgAyAHEJMBIAMQDyAIQbAQEBIgBSADIAgQPiAEQYAQEBIgBiAEQYg0KQMAIgkgBRAlIAZBAjYCKCABKAIoQYCAgARKBEAgBEGAEBASIAEgBBApIAFBATYCKAsgBSABIAYQPiAEQYAQEBIgACAEIAkgBRAlIABBAjYCKAsgAkF/SgRAIAMkAw8LIAAgABBdIAAQDyADJAMLKQECfyMDIQEjA0EwaiQDIAFBgBAQEiAAIAEQKSAAEMQBIQIgASQDIAILDgAgABDRASAAQQE2AjgLIgEBfyAAIAEQDiAAQYABaiICIAFBgAFqEC0gABANIAIQDQsNACAAECsgAEFAaxArC1IBA38QByEDIAAjAigCACICaiIBIAJIIABBAEpxIAFBAEhyBEAgARAEGkEMEANBfw8LIAEgA0oEQCABEAVFBEBBDBADQX8PCwsjAiABNgIAIAILxgMBA38gAkGAwABOBEAgACABIAIQBhogAA8LIAAhBCAAIAJqIQMgAEEDcSABQQNxRgRAA0AgAEEDcQRAIAJFBEAgBA8LIAAgASwAADoAACAAQQFqIQAgAUEBaiEBIAJBAWshAgwBCwsgA0F8cSICQUBqIQUDQCAAIAVMBEAgACABKAIANgIAIAAgASgCBDYCBCAAIAEoAgg2AgggACABKAIMNgIMIAAgASgCEDYCECAAIAEoAhQ2AhQgACABKAIYNgIYIAAgASgCHDYCHCAAIAEoAiA2AiAgACABKAIkNgIkIAAgASgCKDYCKCAAIAEoAiw2AiwgACABKAIwNgIwIAAgASgCNDYCNCAAIAEoAjg2AjggACABKAI8NgI8IABBQGshACABQUBrIQEMAQsLA0AgACACSARAIAAgASgCADYCACAAQQRqIQAgAUEEaiEBDAELCwUgA0EEayECA0AgACACSARAIAAgASwAADoAACAAIAEsAAE6AAEgACABLAACOgACIAAgASwAAzoAAyAAQQRqIQAgAUEEaiEBDAELCwsDQCAAIANIBEAgACABLAAAOgAAIABBAWohACABQQFqIQEMAQsLIAQLiwEBA38gAUUEQA8LIAAoAgAhAgJAAkAgASgCACIDQQBKBEACQEEAIQMDQCACIANqIgQgACgCBCICTg0BIAAoAgggBGogAyABKAIIaiwAADoAACAAKAIAIQIgA0EBaiIDIAEoAgAiBEgNAAsgBCEBDAILBSADIQEMAQsMAQsgASACaiECCyAAIAI2AgALaAICfwF+IwMhAiMDQYABaiQDIAJB0ABqIQMgASgCKKwiBCAEfkKAgIAIVgRAIANBgBAQEiABIAMQKSABQQE2AigLIAIgARBDIANBgBAQEiAAIANBiDQpAwAgAhAlIABBAjYCKCACJAMLWgEDfyMDIQIjA0GAAmokAyABEA0gAUGAAWoiAxANIAJBgAFqIgQgASADEBUgBCAEEC0gAiAEIAMQFSAAQYABaiIDIAQgARAVIAAgAhAOIAAQDSADEA0gAiQDCxgAIAAgASACED8gAEFAayABQUBrIAIQPwsNACAAEE8gAEFAaxBPCyQBAX8gABArIABBQGsiARArIAAQOwRAIAEQOwRAQQEPCwtBAAv/AQEIfyMDIQMjA0GABmokAyADQYACaiIHIABBgAFqIgYQDiADQYAFaiIEIAYQPCADQYAEaiIFIAcgAEGAAmoiARAYIANBgANqIgIgARA8IAEgBCAEEBUgARANIAEgASABEBUgASABIAEQFSABEA0gAiACQaw1KAIAQQNsEFcgAhA5IAIQDSADQYABaiIIIAIgARAYIAMgBCACEBUgAxANIAEgASAFEBggBSACIAIQFSACIAIgBRAVIAIQDSAEIAQgAhA6IAQQDSADIAMgBBAYIAYgAyAIEBUgBSAAIAcQGCAEEA0gACAEIAUQGCAAIAAgABAVIAAQDSAGEA0gAyQDC4MBAgJ/AX4gAKchAiAAQv////8PVgRAA0AgAUF/aiIBIAAgAEIKgCIEQgp+fadB/wFxQTByOgAAIABC/////58BVgRAIAQhAAwBCwsgBKchAgsgAgRAA0AgAUF/aiIBIAIgAkEKbiIDQQpsa0EwcjoAACACQQpPBEAgAyECDAELCwsgAQu0MwEMfyMDIQojA0EQaiQDIABB9QFJBEBBhDsoAgAiBUEQIABBC2pBeHEgAEELSRsiAkEDdiIAdiIBQQNxBEAgAUEBcUEBcyAAaiICQQN0Qaw7aiIAKAIIIgNBCGoiBCgCACEBIAAgAUYEQEGEO0EBIAJ0QX9zIAVxNgIABSABIAA2AgwgACABNgIICyADIAJBA3QiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBCAKJAMgBA8LIAJBjDsoAgAiCUsEfyABBEBBAiAAdCIDQQAgA2tyIAEgAHRxIgBBACAAa3FBf2oiAEEMdkEQcSIBIAAgAXYiAEEFdkEIcSIBciAAIAF2IgBBAnZBBHEiAXIgACABdiIAQQF2QQJxIgFyIAAgAXYiAEEBdkEBcSIBciAAIAF2aiIEQQN0Qaw7aiIAKAIIIgFBCGoiBigCACEDIAAgA0YEQEGEO0EBIAR0QX9zIAVxIgA2AgAFIAMgADYCDCAAIAM2AgggBSEACyABIAJBA3I2AgQgASACaiIFIARBA3QiAyACayIEQQFyNgIEIAEgA2ogBDYCACAJBEBBmDsoAgAhASAJQQN2IgJBA3RBrDtqIQNBASACdCICIABxBH8gA0EIaiICKAIABUGEOyAAIAJyNgIAIANBCGohAiADCyEAIAIgATYCACAAIAE2AgwgASAANgIIIAEgAzYCDAtBjDsgBDYCAEGYOyAFNgIAIAokAyAGDwtBiDsoAgAiCwR/QQAgC2sgC3FBf2oiAEEMdkEQcSIBIAAgAXYiAEEFdkEIcSIBciAAIAF2IgBBAnZBBHEiAXIgACABdiIAQQF2QQJxIgFyIAAgAXYiAEEBdkEBcSIBciAAIAF2akECdEG0PWooAgAiBCEAIAQoAgRBeHEgAmshCANAAkAgACgCECIBBEAgASEABSAAKAIUIgBFDQELIAAgBCAAKAIEQXhxIAJrIgEgCEkiAxshBCABIAggAxshCAwBCwsgAiAEaiIMIARLBH8gBCgCGCEHIAQgBCgCDCIARgRAAkAgBEEUaiIBKAIAIgBFBEAgBEEQaiIBKAIAIgBFBEBBACEADAILCwNAAkAgAEEUaiIDKAIAIgZFBEAgAEEQaiIDKAIAIgZFDQELIAMhASAGIQAMAQsLIAFBADYCAAsFIAQoAggiASAANgIMIAAgATYCCAsgBwRAAkAgBCAEKAIcIgFBAnRBtD1qIgMoAgBGBEAgAyAANgIAIABFBEBBiDtBASABdEF/cyALcTYCAAwCCwUgB0EQaiAHQRRqIAQgBygCEEYbIAA2AgAgAEUNAQsgACAHNgIYIAQoAhAiAQRAIAAgATYCECABIAA2AhgLIAQoAhQiAQRAIAAgATYCFCABIAA2AhgLCwsgCEEQSQRAIAQgAiAIaiIAQQNyNgIEIAAgBGoiACAAKAIEQQFyNgIEBSAEIAJBA3I2AgQgDCAIQQFyNgIEIAggDGogCDYCACAJBEBBmDsoAgAhACAJQQN2IgJBA3RBrDtqIQFBASACdCICIAVxBH8gAUEIaiICKAIABUGEOyACIAVyNgIAIAFBCGohAiABCyEDIAIgADYCACADIAA2AgwgACADNgIIIAAgATYCDAtBjDsgCDYCAEGYOyAMNgIACyAKJAMgBEEIag8FIAILBSACCwUgAgshAAUgAEG/f0sEQEF/IQAFAkAgAEELaiIBQXhxIQBBiDsoAgAiBQRAQQAgAGshBAJAAkAgAUEIdiIBBH8gAEH///8HSwR/QR8FIAEgAUGA/j9qQRB2QQhxIgJ0IgZBgOAfakEQdkEEcSEBQQ4gBiABdCIGQYCAD2pBEHZBAnEiCCABIAJycmsgBiAIdEEPdmoiAUEBdCAAIAFBB2p2QQFxcgsFQQALIgdBAnRBtD1qKAIAIgEEf0EAIQIgAEEAQRkgB0EBdmsgB0EfRht0IQYDfyABKAIEQXhxIABrIgggBEkEQCAIBH8gCCEEIAEFQQAhBCABIQIMBAshAgsgAyABKAIUIgMgA0UgAyABQRBqIAZBH3ZBAnRqKAIAIgFGchshAyAGQQF0IQYgAQ0AIAILBUEACyIBIANyBH8gAwUgBUECIAd0IgFBACABa3JxIgJFDQRBACEBIAJBACACa3FBf2oiAkEMdkEQcSIDIAIgA3YiAkEFdkEIcSIDciACIAN2IgJBAnZBBHEiA3IgAiADdiICQQF2QQJxIgNyIAIgA3YiAkEBdkEBcSIDciACIAN2akECdEG0PWooAgALIgINACABIQMMAQsgASEDIAQhAQN/IAIoAgRBeHEgAGsiCCABSSEGIAggASAGGyEBIAIgAyAGGyEDIAIoAhAiBEUEQCACKAIUIQQLIAQEfyAEIQIMAQUgAQsLIQQLIAMEQCAEQYw7KAIAIABrSQRAIAAgA2oiByADSwRAIAMoAhghCSADIAMoAgwiAUYEQAJAIANBFGoiAigCACIBRQRAIANBEGoiAigCACIBRQRAQQAhAQwCCwsDQAJAIAFBFGoiBigCACIIRQRAIAFBEGoiBigCACIIRQ0BCyAGIQIgCCEBDAELCyACQQA2AgALBSADKAIIIgIgATYCDCABIAI2AggLIAkEQAJAIAMgAygCHCICQQJ0QbQ9aiIGKAIARgRAIAYgATYCACABRQRAQYg7IAVBASACdEF/c3EiATYCAAwCCwUgCUEQaiAJQRRqIAMgCSgCEEYbIAE2AgAgAUUEQCAFIQEMAgsLIAEgCTYCGCADKAIQIgIEQCABIAI2AhAgAiABNgIYCyADKAIUIgIEQCABIAI2AhQgAiABNgIYCyAFIQELBSAFIQELIARBEEkEQCADIAAgBGoiAEEDcjYCBCAAIANqIgAgACgCBEEBcjYCBAUCQCADIABBA3I2AgQgByAEQQFyNgIEIAQgB2ogBDYCACAEQQN2IQIgBEGAAkkEQCACQQN0Qaw7aiEAQYQ7KAIAIgFBASACdCICcQR/IABBCGoiAigCAAVBhDsgASACcjYCACAAQQhqIQIgAAshASACIAc2AgAgASAHNgIMIAcgATYCCCAHIAA2AgwMAQsgBEEIdiIABH8gBEH///8HSwR/QR8FIAAgAEGA/j9qQRB2QQhxIgJ0IgZBgOAfakEQdkEEcSEAQQ4gBiAAdCIGQYCAD2pBEHZBAnEiBSAAIAJycmsgBiAFdEEPdmoiAEEBdCAEIABBB2p2QQFxcgsFQQALIgJBAnRBtD1qIQAgByACNgIcIAdBADYCFCAHQQA2AhBBASACdCIGIAFxRQRAQYg7IAEgBnI2AgAgACAHNgIAIAcgADYCGCAHIAc2AgwgByAHNgIIDAELIAQgACgCACIAKAIEQXhxRgRAIAAhAQUCQCAEQQBBGSACQQF2ayACQR9GG3QhAgNAIABBEGogAkEfdkECdGoiBigCACIBBEAgAkEBdCECIAQgASgCBEF4cUYNAiABIQAMAQsLIAYgBzYCACAHIAA2AhggByAHNgIMIAcgBzYCCAwCCwsgASgCCCIAIAc2AgwgASAHNgIIIAcgADYCCCAHIAE2AgwgB0EANgIYCwsgCiQDIANBCGoPCwsLCwsLCwJAAkBBjDsoAgAiAiAATwRAQZg7KAIAIQEgAiAAayIDQQ9LBEBBmDsgACABaiIENgIAQYw7IAM2AgAgBCADQQFyNgIEIAEgAmogAzYCACABIABBA3I2AgQFQYw7QQA2AgBBmDtBADYCACABIAJBA3I2AgQgASACaiIAIAAoAgRBAXI2AgQLDAELAkBBkDsoAgAiASAASwRADAELIABBL2oiBUHcPigCAAR/QeQ+KAIABUHkPkGAIDYCAEHgPkGAIDYCAEHoPkF/NgIAQew+QX82AgBB8D5BADYCAEHAPkEANgIAQdw+IApBcHFB2KrVqgVzNgIAQYAgCyICaiIDQQAgAmsiCHEiBiAATQRADAMLQbw+KAIAIgIEQCAGQbQ+KAIAIgRqIgcgBE0gByACS3IEQAwECwsgAEEwaiEHAkACQEHAPigCAEEEcQRAQQAhAgUCQAJAAkBBnDsoAgAiAkUNAEHEPiEEA0ACQCAEKAIAIgkgAk0EQCAJIAQoAgRqIAJLDQELIAQoAggiBA0BDAILCyAIIAMgAWtxIgJB/////wdJBEAgAhBSIgEgBCgCACAEKAIEakYEQCABQX9HDQYFDAMLBUEAIQILDAILQQAQUiIBQX9GBH9BAAVBtD4oAgAiBCAGIAFB4D4oAgAiAkF/aiIDakEAIAJrcSABa0EAIAEgA3EbaiICaiEDIAJB/////wdJIAIgAEtxBH9BvD4oAgAiCARAIAMgBE0gAyAIS3IEQEEAIQIMBQsLIAEgAhBSIgNGDQUgAyEBDAIFQQALCyECDAELIAFBf0cgAkH/////B0lxIAcgAktxRQRAIAFBf0YEQEEAIQIMAgUMBAsAC0HkPigCACIDIAUgAmtqQQAgA2txIgNB/////wdPDQJBACACayEEIAMQUkF/RgR/IAQQUhpBAAUgAiADaiECDAMLIQILQcA+QcA+KAIAQQRyNgIACyAGQf////8HSQRAIAYQUiEBQQAQUiIDIAFrIgYgAEEoakshBCAGIAIgBBshAiAEQQFzIAFBf0ZyIAFBf0cgA0F/R3EgASADSXFBAXNyRQ0BCwwBC0G0PiACQbQ+KAIAaiIDNgIAIANBuD4oAgBLBEBBuD4gAzYCAAtBnDsoAgAiAwRAAkBBxD4hBAJAAkADQCABIAQoAgAiBiAEKAIEIgVqRg0BIAQoAggiBA0ACwwBCyAEKAIMQQhxRQRAIAYgA00gASADS3EEQCAEIAIgBWo2AgQgA0EAIANBCGoiAWtBB3FBACABQQdxGyIEaiEBIAJBkDsoAgBqIgYgBGshAkGcOyABNgIAQZA7IAI2AgAgASACQQFyNgIEIAMgBmpBKDYCBEGgO0HsPigCADYCAAwDCwsLIAFBlDsoAgBJBEBBlDsgATYCAAsgASACaiEGQcQ+IQQCQAJAA0AgBiAEKAIARg0BIAQoAggiBA0ACwwBCyAEKAIMQQhxRQRAIAQgATYCACAEIAIgBCgCBGo2AgQgACABQQAgAUEIaiICa0EHcUEAIAJBB3EbaiIHaiEFIAZBACAGQQhqIgFrQQdxQQAgAUEHcRtqIgIgB2sgAGshBCAHIABBA3I2AgQgAiADRgRAQZA7IARBkDsoAgBqIgA2AgBBnDsgBTYCACAFIABBAXI2AgQFAkAgAkGYOygCAEYEQEGMOyAEQYw7KAIAaiIANgIAQZg7IAU2AgAgBSAAQQFyNgIEIAAgBWogADYCAAwBCyACKAIEIglBA3FBAUYEQCAJQQN2IQMgCUGAAkkEQCACKAIIIgAgAigCDCIBRgRAQYQ7QYQ7KAIAQQEgA3RBf3NxNgIABSAAIAE2AgwgASAANgIICwUCQCACKAIYIQggAiACKAIMIgBGBEACQCACQRBqIgFBBGoiAygCACIABEAgAyEBBSACKAIQIgBFBEBBACEADAILCwNAAkAgAEEUaiIGKAIAIgNFBEAgAEEQaiIGKAIAIgNFDQELIAYhASADIQAMAQsLIAFBADYCAAsFIAIoAggiASAANgIMIAAgATYCCAsgCEUNACACIAIoAhwiAUECdEG0PWoiAygCAEYEQAJAIAMgADYCACAADQBBiDtBiDsoAgBBASABdEF/c3E2AgAMAgsFIAhBEGogCEEUaiACIAgoAhBGGyAANgIAIABFDQELIAAgCDYCGCACKAIQIgEEQCAAIAE2AhAgASAANgIYCyACKAIUIgFFDQAgACABNgIUIAEgADYCGAsLIAIgCUF4cSIAaiECIAAgBGohBAsgAiACKAIEQX5xNgIEIAUgBEEBcjYCBCAEIAVqIAQ2AgAgBEEDdiEBIARBgAJJBEAgAUEDdEGsO2ohAEGEOygCACICQQEgAXQiAXEEfyAAQQhqIgIoAgAFQYQ7IAEgAnI2AgAgAEEIaiECIAALIQEgAiAFNgIAIAEgBTYCDCAFIAE2AgggBSAANgIMDAELIARBCHYiAAR/IARB////B0sEf0EfBSAAIABBgP4/akEQdkEIcSIBdCICQYDgH2pBEHZBBHEhAEEOIAIgAHQiAkGAgA9qQRB2QQJxIgMgACABcnJrIAIgA3RBD3ZqIgBBAXQgBCAAQQdqdkEBcXILBUEACyIBQQJ0QbQ9aiEAIAUgATYCHCAFQQA2AhQgBUEANgIQQYg7KAIAIgJBASABdCIDcUUEQEGIOyACIANyNgIAIAAgBTYCACAFIAA2AhggBSAFNgIMIAUgBTYCCAwBCyAEIAAoAgAiACgCBEF4cUYEQCAAIQEFAkAgBEEAQRkgAUEBdmsgAUEfRht0IQIDQCAAQRBqIAJBH3ZBAnRqIgMoAgAiAQRAIAJBAXQhAiAEIAEoAgRBeHFGDQIgASEADAELCyADIAU2AgAgBSAANgIYIAUgBTYCDCAFIAU2AggMAgsLIAEoAggiACAFNgIMIAEgBTYCCCAFIAA2AgggBSABNgIMIAVBADYCGAsLIAokAyAHQQhqDwsLQcQ+IQQDQAJAIAQoAgAiBiADTQRAIAYgBCgCBGoiBiADSw0BCyAEKAIIIQQMAQsLQZw7IAFBACABQQhqIgRrQQdxQQAgBEEHcRsiBGoiBTYCAEGQOyACQVhqIgggBGsiBDYCACAFIARBAXI2AgQgASAIakEoNgIEQaA7Qew+KAIANgIAIANBACAGQVFqIgRBCGoiBWtBB3FBACAFQQdxGyAEaiIEIAQgA0EQakkbIgRBGzYCBCAEQcQ+KQIANwIIIARBzD4pAgA3AhBBxD4gATYCAEHIPiACNgIAQdA+QQA2AgBBzD4gBEEIajYCACAEQRhqIQEDQCABQQRqIgJBBzYCACABQQhqIAZJBEAgAiEBDAELCyADIARHBEAgBCAEKAIEQX5xNgIEIAMgBCADayIGQQFyNgIEIAQgBjYCACAGQQN2IQIgBkGAAkkEQCACQQN0Qaw7aiEBQYQ7KAIAIgRBASACdCICcQR/IAFBCGoiBCgCAAVBhDsgAiAEcjYCACABQQhqIQQgAQshAiAEIAM2AgAgAiADNgIMIAMgAjYCCCADIAE2AgwMAgsgBkEIdiIBBH8gBkH///8HSwR/QR8FIAEgAUGA/j9qQRB2QQhxIgJ0IgRBgOAfakEQdkEEcSEBQQ4gBCABdCIEQYCAD2pBEHZBAnEiBSABIAJycmsgBCAFdEEPdmoiAUEBdCAGIAFBB2p2QQFxcgsFQQALIgJBAnRBtD1qIQEgAyACNgIcIANBADYCFCADQQA2AhBBiDsoAgAiBEEBIAJ0IgVxRQRAQYg7IAQgBXI2AgAgASADNgIAIAMgATYCGCADIAM2AgwgAyADNgIIDAILIAYgASgCACIBKAIEQXhxRgRAIAEhAgUCQCAGQQBBGSACQQF2ayACQR9GG3QhBANAIAFBEGogBEEfdkECdGoiBSgCACICBEAgBEEBdCEEIAYgAigCBEF4cUYNAiACIQEMAQsLIAUgAzYCACADIAE2AhggAyADNgIMIAMgAzYCCAwDCwsgAigCCCIBIAM2AgwgAiADNgIIIAMgATYCCCADIAI2AgwgA0EANgIYCwsFQZQ7KAIAIgNFIAEgA0lyBEBBlDsgATYCAAtBxD4gATYCAEHIPiACNgIAQdA+QQA2AgBBqDtB3D4oAgA2AgBBpDtBfzYCAEG4O0GsOzYCAEG0O0GsOzYCAEHAO0G0OzYCAEG8O0G0OzYCAEHIO0G8OzYCAEHEO0G8OzYCAEHQO0HEOzYCAEHMO0HEOzYCAEHYO0HMOzYCAEHUO0HMOzYCAEHgO0HUOzYCAEHcO0HUOzYCAEHoO0HcOzYCAEHkO0HcOzYCAEHwO0HkOzYCAEHsO0HkOzYCAEH4O0HsOzYCAEH0O0HsOzYCAEGAPEH0OzYCAEH8O0H0OzYCAEGIPEH8OzYCAEGEPEH8OzYCAEGQPEGEPDYCAEGMPEGEPDYCAEGYPEGMPDYCAEGUPEGMPDYCAEGgPEGUPDYCAEGcPEGUPDYCAEGoPEGcPDYCAEGkPEGcPDYCAEGwPEGkPDYCAEGsPEGkPDYCAEG4PEGsPDYCAEG0PEGsPDYCAEHAPEG0PDYCAEG8PEG0PDYCAEHIPEG8PDYCAEHEPEG8PDYCAEHQPEHEPDYCAEHMPEHEPDYCAEHYPEHMPDYCAEHUPEHMPDYCAEHgPEHUPDYCAEHcPEHUPDYCAEHoPEHcPDYCAEHkPEHcPDYCAEHwPEHkPDYCAEHsPEHkPDYCAEH4PEHsPDYCAEH0PEHsPDYCAEGAPUH0PDYCAEH8PEH0PDYCAEGIPUH8PDYCAEGEPUH8PDYCAEGQPUGEPTYCAEGMPUGEPTYCAEGYPUGMPTYCAEGUPUGMPTYCAEGgPUGUPTYCAEGcPUGUPTYCAEGoPUGcPTYCAEGkPUGcPTYCAEGwPUGkPTYCAEGsPUGkPTYCAEGcOyABQQAgAUEIaiIDa0EHcUEAIANBB3EbIgNqIgQ2AgBBkDsgAkFYaiICIANrIgM2AgAgBCADQQFyNgIEIAEgAmpBKDYCBEGgO0HsPigCADYCAAtBkDsoAgAiASAASwRADAILC0G0P0EMNgIADAILQZA7IAEgAGsiAjYCAEGcOyAAQZw7KAIAIgFqIgM2AgAgAyACQQFyNgIEIAEgAEEDcjYCBAsgCiQDIAFBCGoPCyAKJANBAAvNAQECfyMDIQMjA0HgAGokAyADQYAQEBIgAyABKAIoQX9qIgIgAkEBdnIiAiACQQJ2ciICIAJBBHZyIgIgAkEIdnIiAiACQRB2ciICIAJBAXZB1arVqgVxayICQbPmzJkDcSACQQJ2QbPmzJkDcWoiAiACQQR2akGPnrz4AHFBgYKECGxBGHYiAhCUAiAAIAMgARCQAiAAQQEgAnQiATYCKCABQYCAgAhMBEAgAyQDDwsgA0EwaiIBQYAQEBIgACABECkgAEEBNgIoIAMkAwtVAQN/IwMhASMDQbACaiQDIAEQzgEgAUFAayICQYANEAsgAUGAAWoiAyABIAIQMSABQfABaiICQcAMEAsgACACQYA0KQMAIAMQIyAAQQI2AjggASQDCyIBAX8gAEGAAWoiAiABQYABahAOIAAgARAtIAAQDSACEA0LLQAgAigCTBogACABIAIQqgEhAEEBQQAgARshAiAAIAFHBH8gACABbgUgAgsaC+sCAQh/QQghBgNAAkBBACAHIABBgBBqai0AACAGQX9qIgZ2QQFxayIIIAFBBHQgAGooAgBxIAJzIQIgAUEEdCAAaigCBCAIcSADcyEDIAFBBHQgAGooAgggCHEgBHMhBCABQQR0IABqKAIMIAhxIAVzIQUgBkUEQCAHQQFqIgdBEEYNAUEIIQYLIAFBAWoiAUGAAUkNAQsLIABBgxBqIAI6AAAgAEGCEGogAkEIdjoAACAAQYEQaiACQRB2OgAAIABBgBBqIAJBGHY6AAAgAEGHEGogAzoAACAAQYYQaiADQQh2OgAAIABBhRBqIANBEHY6AAAgAEGEEGogA0EYdjoAACAAQYsQaiAEOgAAIABBihBqIARBCHY6AAAgAEGJEGogBEEQdjoAACAAQYgQaiAEQRh2OgAAIABBjxBqIAU6AAAgAEGOEGogBUEIdjoAACAAQY0QaiAFQRB2OgAAIABBjBBqIAVBGHY6AAALVQECfyACQQBMBEAPCyAAKAIAIQMDQCADIAAoAgRIBEAgAyAAKAIIaiABIARqLAAAOgAAIAAgACgCAEEBajYCACADQQFqIQMgBEEBaiIEIAJIDQELCwsRACAAIAEoAgAgASgCCBCDAguYBQEMfyMDIQcjA0GAA2okAyAHQdACaiECIAdBoAJqIQYgB0HwAWohBCAHQZABaiEIIAdB4ABqIQNBgDsoAgBFBEAgAiAAQTBqIgUQVSAGIAUgAEHgAGoiARAWIAQgARBVIAEgAiACEBAgARAPIAEgASABEBAgASABIAEQECABEA8gBCAEQbA1KAIAQQNsEE0gCCAEIAEQFiADIAIgBBAQIAMQDyABIAEgBhAWIAYgBCAEEBAgBCAEIAYQECACIAIgBBAhIAIQDyADIAMgAhAWIAMgAyAIEBAgBiAAIAUQFiACEA8gACACIAYQFiAAIAAgABAQIAAQDyAFIAMQFyAFEA8gByQDDwtBsDUoAgAiC0UiDARAIAcQjwELIAIgABBVIAYgAEEwaiIJEFUgBCAAQeAAaiIKEFUgB0HAAWoiBSAAIAkQFiAFIAUgBRAQIAUQDyAHQTBqIgEgCiAAEBYgASABIAEQECABEA8gDARAIAMgBCAHEBYFIAMgBCALEE0LIAMgAyABECEgCCADIAMQECAIEA8gAyADIAgQECAIIAYgAxAhIAgQDyADIAMgBhAQIAMQDyADIAMgCBAWIAggCCAFEBYgBSAEIAQQECAEIAQgBRAQIAwEQCABIAEgBxAWBSABIAEgCxBNCyABIAEgBBAhIAEgASACECEgARAPIAUgASABEBAgASABIAUQECABEA8gBSACIAIQECACIAIgBRAQIAIgAiAEECEgAhAPIAIgAiABEBYgAyADIAIQECACIAkgChAWIAIgAiACEBAgAhAPIAEgASACEBYgACAIIAEQISACIAIgAhAQIAIQDyAGIAYgBhAQIAYQDyAKIAIgBhAWIAAQDyAJIAMQFyAJEA8gChAPIAckAwuaBQEMfyMDIQcjA0GABGokAyAHQcADaiECIAdBgANqIQYgB0HAAmohBCAHQcABaiEIIAdBgAFqIQNBgDsoAgBFBEAgAiAAQUBrIgUQRSAGIAUgAEGAAWoiARATIAQgARBFIAEgAiACEAwgARAKIAEgASABEAwgASABIAEQDCABEAogBCAEQaw1KAIAQQNsED8gCCAEIAEQEyADIAIgBBAMIAMQCiABIAEgBhATIAYgBCAEEAwgBCAEIAYQDCACIAIgBBAiIAIQCiADIAMgAhATIAMgAyAIEAwgBiAAIAUQEyACEAogACACIAYQEyAAIAAgABAMIAAQCiAFIAMQESAFEAogByQDDwtBrDUoAgAiC0UiDARAIAdBgAgQRgsgAiAAEEUgBiAAQUBrIgkQRSAEIABBgAFqIgoQRSAHQYACaiIFIAAgCRATIAUgBSAFEAwgBRAKIAdBQGsiASAKIAAQEyABIAEgARAMIAEQCiAMBEAgAyAEIAcQEwUgAyAEIAsQPwsgAyADIAEQIiAIIAMgAxAMIAgQCiADIAMgCBAMIAggBiADECIgCBAKIAMgAyAGEAwgAxAKIAMgAyAIEBMgCCAIIAUQEyAFIAQgBBAMIAQgBCAFEAwgDARAIAEgASAHEBMFIAEgASALED8LIAEgASAEECIgASABIAIQIiABEAogBSABIAEQDCABIAEgBRAMIAEQCiAFIAIgAhAMIAIgAiAFEAwgAiACIAQQIiACEAogAiACIAEQEyADIAMgAhAMIAIgCSAKEBMgAiACIAIQDCACEAogASABIAIQEyAAIAggARAiIAIgAiACEAwgAhAKIAYgBiAGEAwgBhAKIAogAiAGEBMgABAKIAkgAxARIAkQCiAKEAogByQDC0cBAn8jAyECIwNBQGskAyACQcAMEAsgACACEB4gAEEBNgI4IAJBwAwQCyABIAIQHiABQQE2AjggACABEKACRSEDIAIkAyADC8gBAQJ+IAAgACkDACIDQv//////////A4M3AwAgACAAKQMIIANCOod8IgJC//////////8DgzcDCCAAIAApAxAgAkI6h3wiAkL//////////wODNwMQIAAgACkDGCACQjqHfCICQv//////////A4M3AxggACAAKQMgIAJCOod8IgJC//////////8DgzcDICAAIAApAyggAkI6h3wiAkL//////////wODNwMoIAAgACkDMCACQjqHfDcDMCADp0EBIAF0QX9qcQvAAQECfiAAIAApAwggACkDACIDQjqHfCICQv//////////A4M3AwggACAAKQMQIAJCOod8IgJC//////////8DgzcDECAAIAApAxggAkI6h3wiAkL//////////wODNwMYIAAgACkDICACQjqHfCICQv//////////A4M3AyAgACAAKQMoIAJCOod8IgJC//////////8DgzcDKCAAIAApAzAgAkI6h3w3AzAgACABrCADQv//////////A4N8NwMAC+ECAgJ/B34gACAAKQMAIgNC//////////8DgyIENwMAIAAgACkDCCADQjqHfCIDQv//////////A4MiBTcDCCAAIAApAxAgA0I6h3wiA0L//////////wODIgY3AxAgACAAKQMYIANCOod8IgNC//////////8DgyIHNwMYIAAgACkDICADQjqHfCIDQv//////////A4MiCDcDICAAIAApAyggA0I6h3wiA0L//////////wODIgk3AyggACAAKQMwIANCOod8IgM3AzAgA0IAUQR/IAlCAFEEfyAIQgBRBH8gB0IAUQR/IAZCAFEEfyAFQgBRBH8gBEIAUQR/QQAPBUEACwVBAQsFQQILBUEDCwVBBAsFQQULBUEGCyICQTpsIQEgAkEDdCAAaikDACIDQgBRBEAgAQ8LIAEhAANAIANCAn8hBCAAQQFqIQAgA0IBfEIDWgRAIAQhAwwBCwsgAAsaACAAIAEgAhAYIABBgAFqIAFBgAFqIAIQGAsOACAAEFggAEGAAWoQWAsYACAAIAEgAhATIABBQGsgAUFAayACEBMLJAEBfyMDIQEjA0FAayQDIAEQXiAAIAEQESAAQUBrEE8gASQDC+cGAQx/IwMhCCMDQfAfaiQDIAAQWSEDIABBgAJqIgoQWSADcQRAIAgkAw8LIAAQhQEgCEHoHGoiBiAAEA4gBkGAAWoiCyAAQYABaiIMEA4gBkGAAmoiCSAKEA4gBhBaIAhB8ABqIgIgABAOIAJBgAFqIgMgDBAOIAJBgAJqIgQgChAOIAJBgANqIgUgAhAOIAJBgARqIgcgAxAOIAJBgAVqIgMgBBAOIAUgBhA9IAJBgAZqIgQgAkGAA2oQDiACQYAHaiIFIAcQDiACQYAIaiIHIAMQDiAEIAYQPSACQYAJaiIDIAJBgAZqEA4gAkGACmoiBCAFEA4gAkGAC2oiBSAHEA4gAyAGED0gAkGADGoiAyACQYAJahAOIAJBgA1qIgcgBBAOIAJBgA5qIgQgBRAOIAMgBhA9IAJBgA9qIgMgAkGADGoQDiACQYAQaiIFIAcQDiACQYARaiIHIAQQDiADIAYQPSACQYASaiIDIAJBgA9qEA4gAkGAE2oiBCAFEA4gAkGAFGoiBSAHEA4gAyAGED0gAkGAFWoiAyACQYASahAOIAJBgBZqIAQQDiACQYAXaiAFEA4gAyAGED0gCEHwGGoiBCABEAsgBCkDAEICgachBSAEQQEQaCAEEAogBCkDAEICgachASAIQbAZaiIDIAQQCyADQQEQaCADEAogBCADIAUQlwEgBiAAIAEQHCALIAwgARAcIAkgCiABEBwgCEHoGWoiByAGEA4gB0GAAWoiBSALEA4gB0GAAmogCRAOIAQQaSINQQNqQQRtIQkgBEEFEGchASANQXpOBEBBACEDA0AgAyAIaiABQfABaiIBOgAAIAQgAUEYdEEYdRB9IAQQCiAEQQQQLCADQQFqIQsgBEEFEGchASADIAlIBEAgCyEDDAELCwsgCUEBaiAIaiABOgAAIAAgAUEYdEEYdUF/akECbSIBQYADbCACahAOIAwgAUGAA2wgAmpBgAFqEA4gCiABQYADbCACakGAAmoQDiANQXlKBEAgCSEBA0AgBiACIAEgCGosAAAQ2AEgABBaIAAQWiAAEFogABBaIAAgBhA9IAFBf2ohAyABQQBKBEAgAyEBDAELCwsgBRANIAUgBRAtIAUQDSAAIAcQPSAFEA0gBSAFEC0gBRANIAAQhQEgCCQDC+UBAQZ/IwMhAiMDQYAIaiQDIAJBgAZqIgUgARBAIAJBgARqIgMgAUGAAmoiBiABQYAEaiIHECQgAxA0IAUgBSADEH8gBRAaIAMgBxBAIAMQNCACQYACaiIEIAEgBhAkIAMgAyAEEH8gAxAaIAQgBhBAIAIgASAHECQgBCAEIAIQfyAEEBogAiAGIAQQJCACEDQgACAFIAEQJCACIAAgAhAUIABBgARqIgEgAyAHECQgARA0IAIgASACEBQgAhAaIAIgAhClAiAAIAUgAhAkIABBgAJqIAMgAhAkIAEgBCACECQgAiQDC1cBAn8gACgCBEECdEEEaiICQQBKBEADQCAAQfwBaiABQQJ0akEANgIAIABBDGogAUECdGpBADYCACABQQFqIgEgAkgNAAsLIABCADcA7AMgAEIANwD0AwvKAwEEfyAAKAIEIQQgAEEoaiAAKAIAIgVBBXZBD3FBAnRqIgIgAigCAEEIdEGAAXI2AgAgACAFQQhqIgI2AgACQAJAIAIEQCACQf8DcSIDRQ0BBSAAIARBAWo2AgQgAEEANgIADAELDAELIAAQciAAKAIAIgJB/wNxIQMLIANBwANHBEADQCAAQShqIAJBBXZBD3FBAnRqIgMgAygCAEEIdDYCACAAIAJBCGoiAjYCAAJAAkAgAgRAIAJB/wNxRQ0BBSAAIAAoAgRBAWo2AgQgAEEANgIADAELDAELIAAQciAAKAIAIQILIAJB/wNxQcADRw0ACwsgACAENgJgIAAgBTYCZCAAEHIgACgC6AJBAEoEQEEAIQIDQCABIAJqIABBCGogAkECdkECdGooAgAgAkEDdEEYcUEYc3Y6AAAgAkEBaiICIAAoAugCSA0ACwsgAEEoakEAQYACEEoaIABBADYCBCAAQQA2AgAgAEHnzKfQBjYCCCAAQYXdntt7NgIMIABB8ua74wM2AhAgAEG66r+qejYCFCAAQf+kuYgFNgIYIABBjNGV2Hk2AhwgAEGrs4/8ATYCICAAQZmag98FNgIkIABBIDYC6AILhgQBF39BECEBIAAoAighBANAIABBKGogAUECdGogAUECdCAAakEMaigCACAEaiABQQJ0IABqQSBqKAIAIgNBCnYgA0ENdCADQRN2cnMgA0EPdCADQRF2cnNqIAFBAnQgAGpBbGooAgAiAkEHdiACQRl0ciACQQ50IAJBEnZyIAJBA3Zzc2o2AgAgAUEBaiIBQcAARwRAIAIhBAwBCwsgACgCCCIMIQIgACgCDCINIQQgACgCJCIOIQkgACgCICIPIQUgACgCHCIQIQYgACgCGCIRIQEgACgCFCISIQcgACgCECITIQMDQCAHIABBKGogCEECdGooAgAgCEECdEHgEGooAgAgCSABQQd0IAFBGXZyIAFBGnQgAUEGdnIgAUEVdCABQQt2cnNzaiABIAZxIAUgAUF/c3FzampqIgdqIQogByACQQp0IAJBFnZyIAJBHnQgAkECdnIgAkETdCACQQ12cnNzIAIgAyAEc3EgAyAEcXNqaiELIAhBAWoiCEHAAEcEQCADIQcCfyABIRcgBiEVIAUhCSACIRYgCyECIAohASAEIQMgFwshBiAVIQUgFiEEDAELCyAAIAsgDGo2AgggACACIA1qNgIMIAAgBCATajYCECAAIAMgEmo2AhQgACAKIBFqNgIYIAAgASAQajYCHCAAIAYgD2o2AiAgACAFIA5qNgIkC30AIABBKGpBAEGAAhBKGiAAQQA2AgQgAEEANgIAIABB58yn0AY2AgggAEGF3Z7bezYCDCAAQfLmu+MDNgIQIABBuuq/qno2AhQgAEH/pLmIBTYCGCAAQYzRldh5NgIcIABBq7OP/AE2AiAgAEGZmoPfBTYCJCAAQSA2AugCC/kBAQN/IwMhBSMDQZAJaiQDIAVBmAZqIgYQcyAAKAIAQQBKBEADQCAGIAcgACgCCGosAAAQQSAHQQFqIgcgACgCAEgNAAsLIAFBAEoEQCAGIAFBGHYQQSAGIAFBEHZB/wFxEEEgBiABQQh2Qf8BcRBBIAYgAUH/AXEQQQsCQCACRQ0AIAIoAgBBAEwNAEEAIQADQCAGIAAgAigCCGosAAAQQSAAQQFqIgAgAigCAEgNAAsLIAYgBRBxIANBADYCACAERQRAIAMgBUEgEGIgBSQDDwsgBEEgSgRAIAMgBEEgaxC5ASADIAVBIBBiBSADIAUgBBBiCyAFJAML/wEBCH8jAyECIwNB8AJqJAMgACAAKAJcIgFBAWo2AlwgASAAQeAAamotAAAhBCABQR5MBEAgAiQDIAQPCyACIgMQcwNAIAAgACgCVCICQQFqIgE2AlQgAyACQRRIBH8gAUECdCAAagUgAEEANgJUQQAhAkEPIQEDf0EAIAEgAUEVRhsiB0ECdCAAaigCACIGIAJBAnQgAGoiCCgCAGsgACgCWGshASABIAZHBEAgACABIAZLNgJYCyAIIAE2AgAgB0EBaiEBIAJBAWoiAkEVRw0AIAALCygCABBBIAVBAWoiBUGAAUcNAAsgAyAAQeAAahBxIABBADYCXCADJAMgBAtzAQN/IwMhASMDQeABaiQDIAFCATcDACABQgA3AwggAUIANwMQIAFCADcDGCABQgA3AyAgAUEwaiICQbAQEBIgAUHgAGoiAyABIAIQPiABQbABaiICQYAQEBIgACACQYg0KQMAIAMQJSAAQQI2AiggASQDCycBAX8jAyEBIwNBMGokAyABQYAQEBIgACABECkgAEEBNgIoIAEkAwtKAQJ/IwMhAiMDQbABaiQDIAJBsBAQEiACQTBqIgMgASACED4gAkGAAWoiAUGAEBASIAAgAUGINCkDACADECUgAEECNgIoIAIkAwvLAQIBfwV+IABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyADQCAAIAdCCIYgBkIwh4QiBzcDICAAIAZCCIZCgP7///////8AgyAEQjCHhCIGNwMYIAAgBEIIhkKA/v///////wCDIAVCMIeEIgQ3AxAgACAFQgiGQoD+////////AIMgA0Iwh4QiBTcDCCAAIANCCIZCgP7///////8AgyIDNwMAIAAgAyABIAJqLQAArYQiAzcDACACQQFqIgJBIEcNAAsLmAICAX8FfiABIAEpAwAiA0L//////////wCDIgU3AwAgASABKQMIIANCOId8IgNC//////////8AgyIGNwMIIAEgASkDECADQjiHfCIDQv//////////AIMiBzcDECABIAEpAxggA0I4h3wiBEL//////////wCDIgM3AxggASABKQMgIARCOId8IgQ3AyBBHyEBA0AgACABaiAFPAAAIAZCMIZCgICAgICAwP8AgyAFQgiHhCEFIAdCMIZCgICAgICAwP8AgyAGQgiHhCEGIANCMIZCgICAgICAwP8AgyAHQgiHhCEHIARCMIZCgICAgICAwP8AgyADQgiHhCEDIARCCIchBCABQX9qIQIgAQRAIAIhAQwBCwsLagECfyMDIQMjA0GAAWokAyADIAIQGSADIAMQRSADECsgA0FAayIEIAEQGSAEIAQQmgIgAyAEEGYEQCAAIAEQGSAAQUBrIAIQGSAAQYABahBeBSAAEE8gAEFAaxBeIABBgAFqEE8LIAMkAwvmFwE2fiABIAIQHiACKQMAISQgAikDCCElIAIpAxAhJiACKQMYIScgAikDICEoIAIpAyghKSACKQMwISogASkDCCIJIAEpAxAiDiABKQMYIg0gASkDICIMIAEpAygiBSABKQMwIhKEhISEhEIAUSABKQMAIhVCAVFxBEAgAEIBNwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwDwtCASEPICQhAyAlIQQgJiEKICchECAoIREgKSEUICohIwJAAkADQCADQgFRBH8gBCAKIBAgESAUICOEhISEhEIAUQVBAAtFBEAgFUICgacEfiAVIR4gFiEVIAkhFiATIQkgDiETIA0hISAaIQ4gDCEaIBchDSAFIRcgEiEiIAshDCAIBQN+IA9CAoGnBEAgCyApfCAIICh8IBcgJ3wgGiAmfCATICV8IA8gJHwiD0I6h3wiE0I6h3wiIUI6h3wiF0I6h3wiIkI6h3whHiAPQv//////////A4MhDyAWICp8IB5COod8IRYgE0L//////////wODIRMgIUL//////////wODIRogF0L//////////wODIRcgIkL//////////wODIQggHkL//////////wODIQsLIBVCAYciHiAJQjmGQoCAgICAgICAAoOEIRUgDkI5hkKAgICAgICAgAKDIAlCAYeEIQkgDUI5hkKAgICAgICAgAKDIA5CAYeEIQ4gDEI5hkKAgICAgICAgAKDIA1CAYeEIQ0gBUI5hkKAgICAgICAgAKDIAxCAYeEIQwgEkI5hkKAgICAgICAgAKDIAVCAYeEIQUgEkIBhyESIBNCOYZCgICAgICAgIACgyAPQgGHhCEPIBpCOYZCgICAgICAgIACgyATQgGHhCETIBdCOYZCgICAgICAgIACgyAaQgGHhCEaIAhCOYZCgICAgICAgIACgyAXQgGHhCEXIAtCOYZCgICAgICAgIACgyAIQgGHhCEIIBZCOYZCgICAgICAgIACgyALQgGHhCELIBZCAYchFiAeQgKBp0UNACAVIR4gFiEVIAkhFiATIQkgDiETIA0hISAaIQ4gDCEaIBchDSAFIRcgEiEiIAshDCAICwshEiADQgKBpwR+IAYhBSADIQggByEGIAQhCyAYIQcgCiEYIBAhHyAZIQogESEZIBQhICAcIREgHSEUIBsFA34gBkICgacEQCAdICl8IBwgKHwgGyAnfCAZICZ8IBggJXwgBiAkfCIGQjqHfCIIQjqHfCILQjqHfCIfQjqHfCIgQjqHfCEFIAZC//////////8DgyEGIAcgKnwgBUI6h3whByAIQv//////////A4MhGCALQv//////////A4MhGSAfQv//////////A4MhGyAgQv//////////A4MhHCAFQv//////////A4MhHQsgA0IBhyIFIARCOYZCgICAgICAgIACg4QhAyAKQjmGQoCAgICAgICAAoMgBEIBh4QhBCAQQjmGQoCAgICAgICAAoMgCkIBh4QhCiARQjmGQoCAgICAgICAAoMgEEIBh4QhECAUQjmGQoCAgICAgICAAoMgEUIBh4QhESAjQjmGQoCAgICAgICAAoMgFEIBh4QhFCAjQgGHISMgGEI5hkKAgICAgICAgAKDIAZCAYeEIQYgGUI5hkKAgICAgICAgAKDIBhCAYeEIRggG0I5hkKAgICAgICAgAKDIBlCAYeEIRkgHEI5hkKAgICAgICAgAKDIBtCAYeEIRsgHUI5hkKAgICAgICAgAKDIBxCAYeEIRwgB0I5hkKAgICAgICAgAKDIB1CAYeEIR0gB0IBhyEHIAVCAoGnRQ0AIAYhBSADIQggByEGIAQhCyAYIQcgCiEYIBAhHyAZIQogESEZIBQhICAcIREgHSEUIBsLCyEQAn4CQCAiICNRBH4gFyAgUQR+IBkgGlEEfiAfICFRBH4gEyAYUQR+IAsgFlEEfiAIIB5RDQYgHiEEIAgFIBYhBCALCwUgEyEEIBgLBSAhIQQgHwsFIBohBCAZCwUgFyEEICALBSAiIQQgIwshAyAEIANVDQACfiAIIB59IgNC//////////8DgyE3IAsgFn0gA0I6h3wiA0L//////////wODISwgGCATfSADQjqHfCIDQv//////////A4MhLSAfICF9IANCOod8IgNC//////////8DgyEuIBkgGn0gA0I6h3wiA0L//////////wODIS8gICAXfSADQjqHfCIDQv//////////A4MhMCAjICJ9IANCOod8ISMCfgJAIAYgFVEEfiAMIBRRBH4gESASUQR+IA0gEFEEfiAKIA5RBH4gByAJUQR+IAUgD1ENBiAFIQQgDwUgByEEIAkLBSAKIQQgDgsFIBAhBCANCwUgESEEIBILBSAUIQQgDAsFIAYhBCAVCyEDIAQgA1UNACAFICQgD318IQQgBiAqIBV9fCEFIAcgJSAJfXwhBiAKICYgDn18IQcgECAnIA19fCEKIBEgKCASfXwhECAUICkgDH18DAELIAUgD30hBCAGIBV9IQUgByAJfSEGIAogDn0hByAQIA19IQogESASfSEQIBQgDH0LIREgBEL//////////wODITEgNwshAyAFIBEgECAKIAcgBiAEQjqHfCIGQjqHfCIHQjqHfCIKQjqHfCIQQjqHfCIRQjqHfCEUIBYhBSAGQv//////////A4MhMiAJIQggEyELIAdC//////////8DgyEzIA4hHyAaIRsgCkL//////////wODITQgDSEgIBchHCAQQv//////////A4MhNSASIR0gEUL//////////wODITYgDCErIBUMAQsgHiAIfSIDQv//////////A4MhHgJ+IBYgC30gA0I6h3wiA0L//////////wODITggEyAYfSADQjqHfCIDQv//////////A4MhEyAhIB99IANCOod8IgNC//////////8DgyEhIBogGX0gA0I6h3wiA0L//////////wODIRsgFyAgfSADQjqHfCIDQv//////////A4MhHCAiICN9IANCOod8ISICQAJAIAYgFVEEQCAMIBRRBEAgESASUQRAIA0gEFEEQCAKIA5RBEAgByAJUQRAIAUgD1IEQCAFIQMgDyEEDAcLBSAHIQMgCSEEDAYLBSAKIQMgDiEEDAULBSAQIQMgDSEEDAQLBSARIQMgEiEEDAMLBSAUIQMgDCEEDAILBSAGIQMgFSEEDAELDAELIAQgA1cEQCAPICR8IQ8gFSAqfCEVIAkgJXwhCSAOICZ8IQ4gDSAnfCENIBIgKHwhEiAMICl8IQwLCyAMIBR9IBIgEX0gDSAQfSAOIAp9IAkgB30gDyAFfSIPQjqHfCIOQjqHfCINQjqHfCISQjqHfCIMQjqHfCEJIAUhMSAPQv//////////A4MhDyAIIQMgCyEsIDgLIQUgByEyIA5C//////////8DgyEIIBghLSATIQsgHyEuIAohMyANQv//////////A4MhHyAZIS8gICEwIBAhNCASQv//////////A4MhICARITUgDEL//////////wODIR0gFCE2IAlC//////////8DgyErIBUgBiIUfSAJQjqHfAshBCAeQgFRBH8gBSALICEgGyAcICKEhISEhEIAUQVBAAsNAiAiIRIgMSEGIB4hFSAUIQcgBCEWICwhBCAFIQkgMiEYIAghEyAtIQogCyEOIC4hECAhIQ0gMyEZIB8hGiAvIREgGyEMIDAhFCA0IRsgICEXIBwhBSA1IRwgHSEIIDYhHSArIQsMAQsLDAELIAAgDzcDACAAIAg3AwggACAfNwMQIAAgIDcDGCAAIB03AyAgACArNwMoIAAgBDcDMA8LIAAgDyAGIBVCAVEEfyAJIA4gDSAMIAUgEoSEhISEQgBRBUEACyIBGzcDACAAIBMgGCABGzcDCCAAIBogGSABGzcDECAAIBcgGyABGzcDGCAAIAggHCABGzcDICAAIAsgHSABGzcDKCAAIBYgByABGzcDMAvAAQECfiAAIAApAwggACkDACIDQjqHfCICQv//////////A4M3AwggACAAKQMQIAJCOod8IgJC//////////8DgzcDECAAIAApAxggAkI6h3wiAkL//////////wODNwMYIAAgACkDICACQjqHfCICQv//////////A4M3AyAgACAAKQMoIAJCOod8IgJC//////////8DgzcDKCAAIAApAzAgAkI6h3w3AzAgACADQv//////////A4MgAax9NwMAC3IAIAAgASkDACACKQMAfDcDACAAIAEpAwggAikDCHw3AwggACABKQMQIAIpAxB8NwMQIAAgASkDGCACKQMYfDcDGCAAIAEpAyAgAikDIHw3AyAgACABKQMoIAIpAyh8NwMoIAAgASkDMCACKQMwfDcDMAt4AQR/IwMhAyMDQYAEaiQDIAIQDSACQYABaiIEEA0gA0GAA2oiBSACIAQQFSAFIAUQLSADQYACaiIGIAUgBBAVIANBgAFqIgQgBSACEBUgAyAGEA4gAxANIAQQDSAAIAEgAxAVIABBgAFqIAFBgAFqIAQQFSADJAML/AIBBn8jAyEDIwNBwCBqJAMgA0GAChALIANB+B5qIgFBwA0QRiADQbgeaiICQYAOEEYgA0G4H2oiBSIEIAEQESAEQUBrIAIQESADQbgYaiIBIAAQbyAAIAAQNiAAIAEQLiABIAAQiAEgACAFEEkgACAFEEkgACABEC4gA0G4EmoiBiAAEKIBIANBuAxqIgEgBiADEEggASABEDYgA0EBECwgA0G4BmoiAiABIAMQSCACIAIQNiADQQEQ0AEgA0E4aiIEIAAQNiABIAQQLiABIAEQNiABIAIQLiACIAEgAxBIIAIgAhA2IAQgAiADEEggBCAEEDYgASABEDYgBCABEC4gASABEDYgASAFEEkgASAFEEkgASAFEEkgAiAFEEkgAiAFEEkgASACEC4gAiAEIAMQSCACIAIQNiACIAYQLiACIAAQLiABIAIQLiACIAQQiAEgAiAFEEkgASACEC4gACABEIgBIAAQNSAAQYACahA1IABBgARqEDUgAyQDC/ADAQt/IwMhBiMDQYAOaiQDIAZBgA1qIQogBkGADGohCCAGQYALaiELIAZBgApqIQkgBkGACWohDCAGQYAIaiENIAZBgAdqIQUgBkGABmohByAGQYAEaiEOIAZBgAJqIQ8gASACRgRAIAwgARAOIA0gAUGAAWoQDiAFIAFBgAJqEA4gByANEA4gByAHIAUQGCAMIAwQPCANIA0QPCAFIAUQPCAHIAdBBBBXIAcgBxAtIAcQDSAMIAxBBhBXIAwgDCADEGwgBSAFQaw1KAIAQQNsEFcgByAHIAQQbCAFEDkgBSAFIAUQFSAHEDkgBxANIAUQDSANIA0gDRAVIAUgBSANEDogBRANIA4gByAFEJoBIA8QayAGIAwQmQEgARBaBSAKIAEQDiAIIAFBgAFqEA4gCyABQYACahAOIAkgCxAOIAsgCyACQYABaiIFEBggCSAJIAIQGCAKIAogCRA6IAoQDSAIIAggCxA6IAgQDSALIAoQDiAKIAogBBBsIAoQOSAKEA0gCyALIAUQGCAJIAgQDiAJIAkgAhAYIAkgCSALEDogCRANIAggCCADEGwgCCAIEC0gCBANIA4gCiAJEJoBIA8QayAGIAgQmQEgASACED0LIAAgDhAmIABBgAJqIA8QJiAAQYAEaiAGECYgBiQDC+cCAQd/IwMhAyMDQcALaiQDIANBgAFqIgRBgAoQCyADQUBrIgcgBBALIAcQCiADIAdBAxCWASADEAogA0H4CmoiCCACEBEgA0G4CmoiCSACQUBrEBEgA0G4B2oiBiABEKABIAAQbSAAQYABahBYIABBgAJqEGsgAEGABGoQayADEGkiAkECTARAIAAgABA2IAMkAw8LIANBuAFqIQUgAkF+aiECA0AgACAAENsBIAUgBiAGIAggCRCBASAAIAUQhwECQAJAAkAgAkE6bSIEQQN0IANqKQMAQgEgAiAEQTpsa62Gg0IAUiACQTptIgRBA3QgB2opAwBCASACIARBOmxrrYaDQgBSa0F/aw4DAQIAAgsgBSAGIAEgCCAJEIEBIAAgBRCHAQwBCyABEJ0BIAUgBiABIAggCRCBASAAIAUQhwEgARCdAQsgAkF/aiEEIAJBAUoEQCAEIQIMAQsLIAAgABA2IAMkAwtFAQJ/IwMhASMDQYACaiQDIAFBgAFqIgJBwAoQRiACQUBrQYALEEYgAUHACxBGIAFBQGtBgAwQRiAAIAIgARCeASABJAMLngEBA38jAyECIwNBwAJqJAMgAkG4AWohAyACQThqIQQgARBZIAFBgAJqEFlxRQRAIAEQhQEgBCABQYABahAOIAMgARAOCyACIAMQKiAAKAIIIAIQICACIANBQGsQKiAAKAIIQTBqIAIQICACIAQQKiAAKAIIQeAAaiACECAgAiAEQUBrECogACgCCEGQAWogAhAgIABBwAE2AgAgAiQDC3UBBH8jAyEBIwNBgAJqJAMgABBZIABBgAJqIgIQWXEEQCABJAMPCyABQYABaiIEEG0gAhDWAQRAIAAQUSAAQYABahBRBSABIAIQmwEgACAAIAEQGCAAQYABaiIDIAMgARAYIAAQUSADEFEgAiAEEA4LIAEkAwudAgEBfyMDIQIjA0FAayQDIAIgASgCCBAfIAAgAhAZIAIgASgCCEEwahAfIABBQGsgAhAZIAIgASgCCEHgAGoQHyAAQYABaiACEBkgAiABKAIIQZABahAfIABBwAFqIAIQGSACIAEoAghBwAFqEB8gAEGAAmogAhAZIAIgASgCCEHwAWoQHyAAQcACaiACEBkgAiABKAIIQaACahAfIABBgANqIAIQGSACIAEoAghB0AJqEB8gAEHAA2ogAhAZIAIgASgCCEGAA2oQHyAAQYAEaiACEBkgAiABKAIIQbADahAfIABBwARqIAIQGSACIAEoAghB4ANqEB8gAEGABWogAhAZIAIgASgCCEGQBGoQHyAAQcAFaiACEBkgAiQDC4gCAQh/IwMhAyMDQYAMaiQDIANBgApqIgggACABECQgA0GAAmoiAiAAIABBgAJqIgYQFCACEBogA0GACGoiBCACIAEQJCACIAYgAEGABGoiBxAUIAIQGiADQYAEaiIFIAIgAUGABWoiCRBqIAUQNCACIAgQViAEIAQgAhAUIAYgBBAmIANBgAZqIgQgAhAmIAIgACAHEBQgAyABIAFBgARqEBQgAhAaIAMQGiACIAMgAhAkIAQgBCACEBQgAiAHIAkQaiACEDQgAyACEFYgAhA0IAcgBCADEBQgBSAFIAMQFCAGIAYgAhAUIAUQGiAFEDQgACAIIAUQFCAAEBogBhAaIAcQGiADJAMLLQAgACABRgRADwsgACABECYgAEGAAmogAUGAAmoQJiAAQYAEaiABQYAEahAmC78DAQd/IwMhCiMDQeAGaiQDIApBzAZqIQkgCkEQaiELQX8gA0HABG0iDkG0BGwgAyAOQcAEbGsbIQwgAEGwEGohDwJAAkAgAEGsEGoiDSgCACIARQ0AIA8oAgAgDEgEQCAAEEsMAQsMAQsgDSAMEFwiADYCACAPIAw2AgALIANBvwRKBEBBACEAA0AgCUHABDYCACAJQcAENgIEIAkgAiAAQcAEbGo2AgggCyAJEIYBIAsgARAuIAkgDSgCACAAQbQEbGo2AgggCUG0BDYCBCAJQbQENgIAIAkgCxDcASAAQQFqIgAgDkcNAAsgDSgCACEACyAJQRA2AgAgCUEQNgIEIAkgBDYCCCAKQcAGaiIBQQw2AgAgAUEMNgIEIAEgBTYCCCAKQbQGaiIEQaA1KQIANwIAIARBqDUoAgA2AgggCkGoBmoiAiAHNgIAIAIgBzYCBCACIAA2AgggCkGcBmoiACAHNgIAIAAgBzYCBCAAIAY2AgggCkGQBmoiA0EQNgIAIANBEDYCBCADIAo2AgggCSABIAQgAiAAIAMQ/wEgCCAKEOsBRQRAIAokA0EADwsgBkF/IAcQShogCiQDQX8LKwAgAEH/AXFBGHQgAEEIdUH/AXFBEHRyIABBEHVB/wFxQQh0ciAAQRh2cgv3EgIUfwF+IwMhDyMDQUBrJAMgD0EoaiEJIA9BMGohGCAPQTxqIRYgD0E4aiILIAE2AgAgAEEARyESIA9BKGoiFSETIA9BJ2ohF0EAIQECQAJAA0ACQANAIAhBf0oEQCABQf////8HIAhrSgR/QbQ/QcsANgIAQX8FIAEgCGoLIQgLIAsoAgAiCiwAACIMRQ0DIAohAQJAAkADQAJAAkAgDEEYdEEYdQ4mAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMACyALIAFBAWoiATYCACABLAAAIQwMAQsLDAELIAEhDANAIAwsAAFBJUcNASABQQFqIQEgCyAMQQJqIgw2AgAgDCwAAEElRg0ACwsgASAKayEBIBIEQCAAIAogARAnCyABDQALIAsgCygCACIBIAsoAgAsAAFBUGpBCk8Ef0F/IQ1BAQUgASwAAkEkRgR/IAEsAAFBUGohDUEBIQVBAwVBfyENQQELC2oiATYCACABLAAAIgZBYGoiDEEfS0EBIAx0QYnRBHFFcgRAQQAhDAVBACEGA0AgBkEBIAx0ciEMIAsgAUEBaiIBNgIAIAEsAAAiBkFgaiIHQR9LQQEgB3RBidEEcUVyRQRAIAwhBiAHIQwMAQsLCyAGQf8BcUEqRgRAIAsCfwJAIAEsAAFBUGpBCk8NACALKAIAIgcsAAJBJEcNACAHLAABQVBqQQJ0IARqQQo2AgAgBywAAUFQakEDdCADaikDAKchAUEBIQYgB0EDagwBCyAFBEBBfyEIDAMLIBIEQCACKAIAQQNqQXxxIgUoAgAhASACIAVBBGo2AgAFQQAhAQtBACEGIAsoAgBBAWoLIgU2AgBBACABayABIAFBAEgiARshECAMQYDAAHIgDCABGyEOIAYhDAUgCxCoASIQQQBIBEBBfyEIDAILIAwhDiAFIQwgCygCACEFCyAFLAAAQS5GBEACQCAFQQFqIQEgBSwAAUEqRwRAIAsgATYCACALEKgBIQEgCygCACEFDAELIAUsAAJBUGpBCkkEQCALKAIAIgUsAANBJEYEQCAFLAACQVBqQQJ0IARqQQo2AgAgBSwAAkFQakEDdCADaikDAKchASALIAVBBGoiBTYCAAwCCwsgDARAQX8hCAwDCyASBEAgAigCAEEDakF8cSIFKAIAIQEgAiAFQQRqNgIABUEAIQELIAsgCygCAEECaiIFNgIACwVBfyEBC0EAIQcDQCAFLAAAQb9/akE5SwRAQX8hCAwCCyALIAVBAWoiBjYCACAFLAAAIAdBOmxqQd8vaiwAACIRQf8BcSIFQX9qQQhJBEAgBSEHIAYhBQwBCwsgEUUEQEF/IQgMAQsgDUF/SiEUAkACQCARQRNGBEAgFARAQX8hCAwECwUCQCAUBEAgDUECdCAEaiAFNgIAIAkgDUEDdCADaikDADcDAAwBCyASRQRAQQAhCAwFCyAJIAUgAhCnASALKAIAIQYMAgsLIBINAEEAIQEMAQsgDkH//3txIg0gDiAOQYDAAHEbIQUCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAZBf2osAAAiBkFfcSAGIAZBD3FBA0YgB0EAR3EbIgZBwQBrDjgJCgcKCQkJCgoKCgoKCgoKCgoICgoKCgsKCgoKCgoKCgkKBQMJCQkKAwoKCgoAAgEKCgYKBAoKCwoLAkACQAJAAkACQAJAAkACQCAHQf8BcUEYdEEYdQ4IAAECAwQHBQYHCyAJKAIAIAg2AgBBACEBDBcLIAkoAgAgCDYCAEEAIQEMFgsgCSgCACAIrDcDAEEAIQEMFQsgCSgCACAIOwEAQQAhAQwUCyAJKAIAIAg6AABBACEBDBMLIAkoAgAgCDYCAEEAIQEMEgsgCSgCACAIrDcDAEEAIQEMEQtBACEBDBALQfgAIQYgAUEIIAFBCEsbIQEgBUEIciEFDAkLQQAhCkG+OiEOIAEgEyAJKQMAIBUQ7gEiB2siBkEBaiAFQQhxRSABIAZKchshAQwLCyAJKQMAIhlCAFMEfyAJQgAgGX0iGTcDAEEBIQpBvjoFIAVBgRBxQQBHIQpBvzpBwDpBvjogBUEBcRsgBUGAEHEbCyEODAgLQQAhCkG+OiEOIAkpAwAhGQwHCyAXIAkpAwA8AAAgFyEGQQAhCkG+OiEOQQEhByANIQUgEyEBDAoLIAkoAgAiBUHIOiAFGyIGIAEQ9AEiEUUhFEEAIQpBvjohDiABIBEgBmsgFBshByANIQUgASAGaiARIBQbIQEMCQsgDyAJKQMAPgIwIA9BADYCNCAJIBg2AgBBfyEKDAULIAEEQCABIQoMBQUgAEEgIBBBACAFEChBACEBDAcLAAsgACAJKwMAIBAgASAFIAZBAxEBACEBDAcLIAohBkEAIQpBvjohDiABIQcgEyEBDAULIAkpAwAgFSAGQSBxEO8BIQdBAEECIAVBCHFFIAkpAwBCAFFyIg0bIQpBvjogBkEEdkG+OmogDRshDgwCCyAZIBUQWyEHDAELIAkoAgAhBkEAIQECQAJAA0AgBigCACIHBEAgFiAHEKYBIgdBAEgiDSAHIAogAWtLcg0CIAZBBGohBiAKIAEgB2oiAUsNAQsLDAELIA0EQEF/IQgMBgsLIABBICAQIAEgBRAoIAEEQCAJKAIAIQZBACEKA0AgBigCACIHRQ0DIAogFiAHEKYBIgdqIgogAUoNAyAGQQRqIQYgACAWIAcQJyAKIAFJDQALBUEAIQELDAELIAcgFSAJKQMAQgBSIg0gAUEAR3IiERshBiABIBMgB2sgDUEBc2oiByABIAdKG0EAIBEbIQcgBUH//3txIAUgAUF/ShshBSATIQEMAQsgAEEgIBAgASAFQYDAAHMQKCAQIAEgECABShshAQwBCyAAQSAgCiABIAZrIg0gByAHIA1IGyIRaiIHIBAgECAHSBsiASAHIAUQKCAAIA4gChAnIABBMCABIAcgBUGAgARzECggAEEwIBEgDUEAECggACAGIA0QJyAAQSAgASAHIAVBgMAAcxAoCyAMIQUMAQsLDAELIABFBEAgBQR/QQEhAANAIABBAnQgBGooAgAiAQRAIABBA3QgA2ogASACEKcBIABBAWoiAEEKSQ0BQQEhCAwECwsDfyAAQQJ0IARqKAIABEBBfyEIDAQLIABBAWoiAEEKSQ0AQQELBUEACyEICwsgDyQDIAgLyw8BGH8jAyEKIwNBIGokAyACQQRtIQUCQAJAIAJBfHFBEGsOEQEAAAAAAAAAAQAAAAAAAAABAAsgCiQDDwsgACAFNgIAIAAgBUEGajYCBCAAIAE2AgggAEIANwDsAyAAQgA3APQDIAFBAEcgBEEAR3EEQCAAIAQsAAA6AOwDIAAgBCwAAToA7QMgACAELAACOgDuAyAAIAQsAAM6AO8DIAAgBCwABDoA8AMgACAELAAFOgDxAyAAIAQsAAY6APIDIAAgBCwABzoA8wMgACAELAAIOgD0AyAAIAQsAAk6APUDIAAgBCwACjoA9gMgACAELAALOgD3AyAAIAQsAAw6APgDIAAgBCwADToA+QMgACAELAAOOgD6AyAAIAQsAA86APsDCyAFQQJ0IQggAkEDSiIHBEBBACEBQQAhBANAIARBAnQgCmogASADaiIGLQADQRh0IAYtAAJBEHRyIAYtAAFBCHRyIAYtAAByNgIAIAFBBGohASAEQQFqIgQgBUcNAAsgBwRAIABBDGogCiAIEFMaCwsgBSAIQRxqIgRIBEAgAkEcSCEHIAJBB0ohCUEAIQIgBSEBA0AgAEEMaiABQQJ0aiABQQJ0IABqKAIIIgNB/wFxQeAXai0AAEEYdCADQQh2Qf8BcUHgF2otAAAgA0EQdkH/AXFB4BdqLQAAQQh0ciADQRh2QeAXai0AAEEQdHJyIAJBAnRB4BlqKAIAIABBDGogASAFa0ECdGooAgBzcyIGNgIAAkAgBwRAIAkEQEEBIQMDQCABIANqIgYgBE4NAyAAQQxqIAZBAnRqIABBDGogBiAFa0ECdGooAgAgBkECdCAAaigCCHM2AgAgA0EBaiIDIAVIDQALCwUgAUEBaiIDIARIBEAgAEEMaiADQQJ0aiAGIABBDGogAyAFa0ECdGooAgBzNgIAIAFBAmoiAyAESARAIABBDGogA0ECdGogAEEMaiADIAVrQQJ0aigCACABQQJ0IABqKAIQczYCACABQQNqIgMgBEgEQCAAQQxqIANBAnRqIABBDGogAyAFa0ECdGooAgAgAUECdCAAaigCFHM2AgALCwsgAUEEaiIDIARIBEAgAEEMaiADQQJ0aiAAQQxqIAMgBWtBAnRqKAIAIAFBAnQgAGooAhgiA0EYdkHgF2otAABBGHQgA0H/AXFB4BdqLQAAIANBCHZB/wFxQeAXai0AAEEIdHIgA0EQdkH/AXFB4BdqLQAAQRB0cnJzNgIAC0EFIQMDQCABIANqIgYgBE4NAiAAQQxqIAZBAnRqIABBDGogBiAFa0ECdGooAgAgBkECdCAAaigCCHM2AgAgA0EBaiIDIAVIDQALCwsgAkEBaiECIAEgBWoiASAESA0ACwsgAEH8AWogCEEYaiIFQQJ0aiAAKAIMNgIAIABB/AFqIAhBGWoiD0ECdGogACgCEDYCACAIQQJ0IABqIAAoAhQ2AuQCIAhBAnQgAGogACgCGDYC6AIgBUEESgRAQQQhAQNAIAUgAWshEEEAIQIDQCAAQQxqIAEgAmpBAnRqKAIAIgNB/wFxRSILBH9BAAUgA0H/AXFBoBpqLQAAQegAakH/AXBBoBxqLAAACyERIANBCHYiBkH/AXFFIgwEf0EABSAGQf8BcUGgGmotAABB7gFqQf8BcEGgHGosAAALIRIgA0EQdiIHQf8BcUUiDQR/QQAFIAdB/wFxQaAaai0AAEHHAWpB/wFwQaAcaiwAAAshEyADQRh2IglFIg4Ef0EABSAJQaAaai0AAEHfAWpB/wFwQaAcaiwAAAshFCALBH9BAAUgA0H/AXFBoBpqLQAAQe4BakH/AXBBoBxqLAAACyEVIAwEf0EABSAGQf8BcUGgGmotAABBxwFqQf8BcEGgHGosAAALIRYgDQR/QQAFIAdB/wFxQaAaai0AAEHfAWpB/wFwQaAcaiwAAAshFyAOBH9BAAUgCUGgGmotAABB6ABqQf8BcEGgHGosAAALIRggCwR/QQAFIANB/wFxQaAaai0AAEHHAWpB/wFwQaAcaiwAAAshGSAMBH9BAAUgBkH/AXFBoBpqLQAAQd8BakH/AXBBoBxqLAAACyEaIA0Ef0EABSAHQf8BcUGgGmotAABB6ABqQf8BcEGgHGosAAALIRsgDgR/QQAFIAlBoBpqLQAAQe4BakH/AXBBoBxqLAAACyEcIAsEf0EABSADQf8BcUGgGmotAABB3wFqQf8BcEGgHGosAAALIQMgDAR/QQAFIAZB/wFxQaAaai0AAEHoAGpB/wFwQaAcaiwAAAshBiANBH9BAAUgB0H/AXFBoBpqLQAAQe4BakH/AXBBoBxqLAAACyEHIABB/AFqIAIgEGpBAnRqIA4Ef0EABSAJQaAaai0AAEHHAWpB/wFwQaAcaiwAAAsgByADIAZzc3NB/wFxIBQgEyARIBJzc3NB/wFxQRh0IBggFyAVIBZzc3NB/wFxQRB0ciAcIBsgGSAac3NzQf8BcUEIdHJyNgIAIAJBAWoiAkEERw0ACyAFIAFBBGoiAUoNAAsLIAUgBE4EQCAKJAMPCyAAIABBDGogBUECdGooAgA2AvwBIAAgAEEMaiAPQQJ0aigCADYCgAIgACAIQQJ0IABqKAJ0NgKEAiAAIAhBAnQgAGooAng2AogCIAokAwudAQEFfyMDIQYjA0HQAGokAyAGQUBrIgVBADYCACAFQcAANgIEIAUgBjYCCCADQQA2AgAgAkF/akEgbSIEQQBIBEAgBiQDDwsgBEEBaiEHQQEhBANAIAAgBCABIAVBABB0IAMoAgBBIGogAkoEQCADIAUoAgggAkEgbxBiBSADIAUQVAsgBEEBaiEIIAQgB0cEQCAIIQQMAQsLIAYkAwuMAQECfyAAKAIEIgJBAEoEQEEAIQIDfyACIAAoAghqQQA6AAAgAkEBaiICIAAoAgQiA0gNACADCyECCyAAQQA2AgAgACACIAEoAgAiAyADIAJKGyICNgIAIAJBAEwEQA8LQQAhAgNAIAIgACgCCGogAiABKAIIaiwAADoAACACQQFqIgIgACgCAEgNAAsLVwEDfyMDIQEjA0HgAWokAyABQcAOEBIgAUEwaiICQbAQEBIgAUHgAGoiAyABIAIQPiABQbABaiICQYAQEBIgACACQYg0KQMAIAMQJSAAQQI2AiggASQDC3EBBH8jAyEBIwNB4ABqJAMgAEHgAGohAiAAEE4EQCACEE4EQCABJAMPCwsgAUEwaiIDEHYgAiADELsBBEAgASQDDwsgASACEIUCIAAgACABEBYgAEEwaiIEIAQgARAWIAQQdyAAEHcgAiADEBcgASQDC44BAQJ+IAAgACkDACIDQv//////////AIM3AwAgACAAKQMIIANCOId8IgJC//////////8AgzcDCCAAIAApAxAgAkI4h3wiAkL//////////wCDNwMQIAAgACkDGCACQjiHfCICQv//////////AIM3AxggACAAKQMgIAJCOId8NwMgIAOnQQEgAXRBf2pxC4YBAQJ+IAAgACkDCCAAKQMAIgNCOId8IgJC//////////8AgzcDCCAAIAApAxAgAkI4h3wiAkL//////////wCDNwMQIAAgACkDGCACQjiHfCICQv//////////AIM3AxggACAAKQMgIAJCOId8NwMgIAAgA0L//////////wCDIAGsfTcDAAuGAQECfiAAIAApAwggACkDACIDQjiHfCICQv//////////AIM3AwggACAAKQMQIAJCOId8IgJC//////////8AgzcDECAAIAApAxggAkI4h3wiAkL//////////wCDNwMYIAAgACkDICACQjiHfDcDICAAIAGsIANC//////////8Ag3w3AwALcAEEfyMDIQEjA0GAAWokAyAAQYABaiECIAAQOwRAIAIQOwRAIAEkAw8LCyABQUBrIgMQXiACIAMQZgRAIAEkAw8LIAEgAhDKASAAIAAgARATIABBQGsiBCAEIAEQEyAEECsgABArIAIgAxARIAEkAwvFBwIHfxR+IwMhAyMDQfAAaiQDIANCADcDACADQgA3AwggA0IANwMQIANCADcDGCADQgA3AyAgA0IANwMoIANCADcDMCADQgA3AzggA0FAa0IANwMAIANCADcDSCADQgA3A1AgA0IANwNYIANCADcDYCADQgA3A2ggA0FAayEJA0AgASABKQMAIgpC//////////8DgyIYNwMAIAEgASkDCCAKQjqHfCIKQv//////////A4MiGTcDCCABIAEpAxAgCkI6h3wiCkL//////////wODIho3AxAgASABKQMYIApCOod8IgpC//////////8DgyIbNwMYIAEgASkDICAKQjqHfCIKQv//////////A4MiHDcDICABIAEpAyggCkI6h3wiCkL//////////wODIh03AyggASABKQMwIApCOod8Igo3AzACQAJAIApCAFEEfyAdQgBRBH8gHEIAUQR/IBtCAFEEfyAaQgBRBH8gGUIAUQR/IBhCAFEEf0EABUEAIQQMBwsFQQEhBAwGCwVBAiEEDAULBUEDIQQMBAsFQQQhBAwDCwVBBSEEDAILBUEGIQQMAQshBQwBCyAEQTpsIQUgBEEDdCABaikDACIKQgBSBEADQCAKQgJ/IRggBUEBaiEFIApCAXxCA1oEQCAYIQoMAQsLCwsgByAFQQF0SARAIAYEfyAIQQF1BSACEHULIQUgAyADKQNoQgGGIBJCOYeENwNoIAMgEkIBhkL+/////////wODIBNCOYeEIhI3A2AgAyATQgGGQv7/////////A4MgFEI5h4QiEzcDWCADIBRCAYZC/v////////8DgyAVQjmHhCIUNwNQIAMgFUIBhkL+/////////wODIBZCOYeEIhU3A0ggCSAWQgGGQv7/////////A4MgF0I5h4QiFjcDACADIBdCAYZC/v////////8DgyALQjmHhCIXNwM4IAMgC0IBhkL+/////////wODIAxCOYeEIgs3AzAgAyAMQgGGQv7/////////A4MgDUI5h4QiDDcDKCADIA1CAYZC/v////////8DgyAOQjmHhCINNwMgIAMgDkIBhkL+/////////wODIA9COYeEIg43AxggAyAPQgGGQv7/////////A4MgEEI5h4QiDzcDECADIBBCAYZC/v////////8DgyARQjmHhCIQNwMIIAMgBUEBca0gEUIBhkL+/////////wODhCIRNwMAIAUhCCAGQQFqQQdxIQYgB0EBaiEHDAELCyAAIAMgARCfAiADJAML5wQBCH4gAqwiA0L/////AYMhBCAAIANCHYciAyABKQMAIgVC/////wGDIgZ+IAQgBUIdhyIFfnwiB0IdhkKAgICA/v///wODIAQgBn58IgZC//////////8DgzcDACAAIAEpAwgiCEL/////AYMiCSADfiAIQh2HIgggBH58IgpCHYZCgICAgP7///8DgyADIAV+IAdCHYd8IAZCOoh8IAQgCX58fCIFQv//////////A4M3AwggACABKQMQIgZC/////wGDIgcgA34gBCAGQh2HIgZ+fCIJQh2GQoCAgID+////A4MgAyAIfiAKQh2HfCAFQjqHfCAEIAd+fHwiBUL//////////wODNwMQIAAgAyABKQMYIgdC/////wGDIgh+IAQgB0IdhyIHfnwiCkIdhkKAgICA/v///wODIAMgBn4gCUIdh3wgBUI6h3wgBCAIfnx8IgVC//////////8DgzcDGCAAIAMgASkDICIGQv////8BgyIIfiAEIAZCHYciBn58IglCHYZCgICAgP7///8DgyADIAd+IApCHYd8IAVCOod8IAQgCH58fCIFQv//////////A4M3AyAgACABKQMoIgdC/////wGDIgggA34gB0IdhyIHIAR+fCIKQh2GQoCAgID+////A4MgAyAGfiAJQh2HfCAFQjqHfCAEIAh+fHwiBUL//////////wODNwMoIAAgASkDMCIGQv////8BgyIIIAN+IAZCHYcgBH58Qh2GQoCAgID+////A4MgAyAHfiAKQh2HfCAFQjqHfCAEIAh+fHxC//////////8DgzcDMAuyAQECfiAAIAApAwAiA0EAIAJrrCIEIAMgASkDAIWDhTcDACAAIAApAwgiAyADIAEpAwiFIASDhTcDCCAAIAApAxAiAyADIAEpAxCFIASDhTcDECAAIAApAxgiAyADIAEpAxiFIASDhTcDGCAAIAApAyAiAyADIAEpAyCFIASDhTcDICAAIAApAygiAyAEIAMgASkDKIWDhTcDKCAAIAApAzAiAyAEIAMgASkDMIWDhTcDMAseACAAIAAQnAEgAEGAAWoiACAAEJwBIAAgASAAEBgLEAAgAEGAAWogARAOIAAQWAsSACAAIAEQDiAAQYABaiACEA4LXgEDfyMDIQMjA0GAAWokAyABEAogAUFAayIEEAogA0FAayICIAEQRSADIAQQRSACIAIgAxAMIAIgAhDKASAAIAEgAhATIAIgAhAwIAIQCiAAQUBrIAQgAhATIAMkAwsaACAAIAEQESAAQUBrIgAgAUFAaxAwIAAQCgsWACAAQYABaiIAEA0gACAAEC0gABANC5wBAQR/IwMhBCMDQcADaiQDIARBOGoiBiACEDwgBEG4AmoiAyABEDwgBEG4AWoiBSADIAEQGCAEQYAIEAsgAyAEEBkgA0FAaxBPIAMQDSADEDkgAxANIAUgAyAFEBUgBRBRIAYgBRDVAQRAIAAgARAOIABBgAFqIAIQDiAAQYACahBtBSAAEFggAEGAAWoQbSAAQYACahBYCyAEJAMLdQEDfyMDIQIjA0HAAmokAyACIAEoAggQHyACQbgBaiIDIAIQGSACIAEoAghBMGoQHyADQUBrIAIQGSACIAEoAghB4ABqEB8gAkE4aiIEIAIQGSACIAEoAghBkAFqEB8gBEFAayACEBkgACADIAQQngEgAiQDCyQAIAAgARAOIABBgAFqIAFBgAFqEA4gAEGAAmogAUGAAmoQDgulAgEBfyMDIQIjA0FAayQDIABBwAQ2AgAgAiABECogACgCCCACECAgAiABQUBrECogACgCCEEwaiACECAgAiABQYABahAqIAAoAghB4ABqIAIQICACIAFBwAFqECogACgCCEGQAWogAhAgIAIgAUGAAmoQKiAAKAIIQcABaiACECAgAiABQcACahAqIAAoAghB8AFqIAIQICACIAFBgANqECogACgCCEGgAmogAhAgIAIgAUHAA2oQKiAAKAIIQdACaiACECAgAiABQYAEahAqIAAoAghBgANqIAIQICACIAFBwARqECogACgCCEGwA2ogAhAgIAIgAUGABWoQKiAAKAIIQeADaiACECAgAiABQcAFahAqIAAoAghBkARqIAIQICACJAML5AEBBX8jAyEDIwNBgAhqJAMgA0GABmoiAiABECYgACABEEAgAyAAIAAQFCAAIAMgABAUIAAQGiACIAIQXyACIAIgAhAUIAAgACACEBQgA0GABGoiAiABQYAEaiIGEEAgAhA0IAMgAiACEBQgAiACIAMQFCACEBogA0GAAmoiBSABQYACaiIEEEAgAyAFIAUQFCAFIAUgAxAUIAUQGiAAQYACaiIBIAQQUCABIAEgARAUIABBgARqIgQgBhBfIAQgBCAEEBQgASACIAEQFCAEIAUgBBAUIAAQNSABEDUgBBA1IAMkAwurAQEDfyMDIQQjA0GAC2okAyAEQYAGaiEDIARB+AdqIQUgACwAAEEERgRAIANBwAE2AgAgA0HAATYCBCADIABBAWo2AgggBSADEJ8BCyAEQbgGaiEAIAEsAABBBEYEQCADIAFBAWoQHyAEIAFBMWoQHyAAIAMgBBB7CyAEIAUgABCCASAEEIABIANBwAQ2AgAgA0HABDYCBCADIAI2AgggAyAEEKEBIAQkA0EAC7MFAQx/IwMhDCMDQcATaiQDIAxBuBNqIQsgBUG0BG0iCiAFIApBtARsa0EAR2oiEUHABGwiCiAHRwRAAn9BtDUoAgAhFCALIAo2AgAgCyAHNgIEIBQLQaw3IAsQqQEgDCQDQX8PCyAMQcAFaiEKIAxBgAVqIQ0gDEHABGohDyAMQfgRaiELIAxB+AtqIRAgDEH4BWohDiAAQbAQaiESAkACQCAAQawQaiITKAIAIgdFDQAgEigCACAFSARAIAcQSwwBCwwBCyATIAUQXCIHNgIAIBIgBTYCAAsgCkEQNgIAIApBEDYCBCAKIAI2AgggDUEMNgIAIA1BDDYCBCANIAM2AgggD0GgNSkCADcCACAPQag1KAIANgIIIAsgBTYCACALIAU2AgQgCyAENgIIIBAgBTYCACAQIAU2AgQgECAHNgIIIA5BEDYCACAOQRA2AgQgDiAINgIIIAogDSAPIAsgECAOEIACIA8gAEGAAWogABCVASABLAAAQQRGBEAgCiABQQFqEB8gDSABQTFqEB8gCyAKIA0QewsgDCEBAn9BACALEDtFDQAaIAtBgAFqEDsLBH9ByzdBLkG0NSgCABBgQX8FIAsgDxDHASAQIABB+AVqIA8QSCARQQBKBEAgEUF/aiEDIABB+AtqIQRBACECA0AgAkG0BGwiByATKAIAaiEAIAIgA0YEQCAFIAdrIgdBtARIBEAgASAEQbQEEFMaIAEgACAHEFMaIAEhAAsLIApBtAQ2AgAgCkG0BDYCBCAKIAA2AgggDiAKEN0BIA4gEBAuIAogBiACQcAEbGo2AgggCkHABDYCBCAKQcAENgIAIAogDhChASACQQFqIgIgEUcNAAsLIAogDSALEMkBIAlBBDoAACAJQQFqIAoQICAJQTFqIA0QIEEACyEVIAwkAyAVC5EBAgF/An4CQAJAIAC9IgNCNIgiBKdB/w9xIgIEQCACQf8PRgRADAMFDAILAAsgASAARAAAAAAAAAAAYgR/IABEAAAAAAAA8EOiIAEQpQEhACABKAIAQUBqBUEACzYCAAwBCyABIASnQf8PcUGCeGo2AgAgA0L/////////h4B/g0KAgICAgICA8D+EvyEACyAACxEAIAAEfyAAIAEQ7QEFQQALC70DAwF/AX4BfCABQRRNBEACQAJAAkACQAJAAkACQAJAAkACQAJAIAFBCWsOCgABAgMEBQYHCAkKCyACKAIAQQNqQXxxIgEoAgAhAyACIAFBBGo2AgAgACADNgIADAkLIAIoAgBBA2pBfHEiASgCACEDIAIgAUEEajYCACAAIAOsNwMADAgLIAIoAgBBA2pBfHEiASgCACEDIAIgAUEEajYCACAAIAOtNwMADAcLIAIoAgBBB2pBeHEiASkDACEEIAIgAUEIajYCACAAIAQ3AwAMBgsgAigCAEEDakF8cSIBKAIAIQMgAiABQQRqNgIAIAAgA0H//wNxQRB0QRB1rDcDAAwFCyACKAIAQQNqQXxxIgEoAgAhAyACIAFBBGo2AgAgACADQf//A3GtNwMADAQLIAIoAgBBA2pBfHEiASgCACEDIAIgAUEEajYCACAAIANB/wFxQRh0QRh1rDcDAAwDCyACKAIAQQNqQXxxIgEoAgAhAyACIAFBBGo2AgAgACADQf8Bca03AwAMAgsgAigCAEEHakF4cSIBKwMAIQUgAiABQQhqNgIAIAAgBTkDAAwBCyAAIAJBCRECAAsLC0YBAn8gACgCACwAAEFQakEKSQRAA0AgACgCACIBLAAAIAJBCmxBUGpqIQIgACABQQFqNgIAIAEsAAFBUGpBCkkNAAsLIAILIwEBfyMDIQMjA0EQaiQDIAMgAjYCACAAIAEgAxDxASADJAML7gEBA38CQAJAIAIoAhAiAw0AIAIQ9QEEf0EABSACKAIQIQMMAQshBAwBCyADIAIoAhQiBGsgAUkEQCACKAIkIQMgAiAAIAEgA0EBcUEEahEAACEEDAELIAFFIAIsAEtBAEhyBEBBACEDBQJAIAEhAwNAIAAgA0F/aiIFaiwAAEEKRwRAIAUEQCAFIQMMAgVBACEDDAMLAAsLIAIoAiQhBCACIAAgAyAEQQFxQQRqEQAAIgQgA0kNAiAAIANqIQAgASADayEBIAIoAhQhBAsLIAQgACABEFMaIAIgASACKAIUajYCFCABIANqIQQLIAQL9gYBIn8gABCtASAAQbQQaiECIAFFBEAgAEGwEGpBAzYCACACEHAPCyACIABBkBBqIhIQNyAAQYAQaiITLAAAIBIsAABzIRQgAEGREGoiAyADLAAAIABBgRBqIhUsAABzOgAAIABBkhBqIgQgAEGCEGoiFiwAACAELAAAczoAACAAQZMQaiIFIABBgxBqIhcsAAAgBSwAAHM6AAAgAEGUEGoiBiAAQYQQaiIYLAAAIAYsAABzOgAAIABBlRBqIgcgAEGFEGoiGSwAACAHLAAAczoAACAAQZYQaiIIIABBhhBqIhosAAAgCCwAAHM6AAAgAEGXEGoiCSAAQYcQaiIbLAAAIAksAABzOgAAIABBmBBqIgogAEGIEGoiHCwAACAKLAAAczoAACAAQZkQaiILIABBiRBqIh0sAAAgCywAAHM6AAAgAEGaEGoiDCAAQYoQaiIeLAAAIAwsAABzOgAAIABBmxBqIg0gAEGLEGoiHywAACANLAAAczoAACAAQZwQaiIOIABBjBBqIiAsAAAgDiwAAHM6AAAgAEGdEGoiDyAAQY0QaiIhLAAAIA8sAABzOgAAIABBnhBqIhAgAEGOEGoiIiwAACAQLAAAczoAACAAQZ8QaiIRIABBjxBqIiMsAAAgESwAAHM6AAAgASAUOgAAIBNBADoAACASQQA6AAAgASADLAAAOgABIBVBADoAACADQQA6AAAgASAELAAAOgACIBZBADoAACAEQQA6AAAgASAFLAAAOgADIBdBADoAACAFQQA6AAAgASAGLAAAOgAEIBhBADoAACAGQQA6AAAgASAHLAAAOgAFIBlBADoAACAHQQA6AAAgASAILAAAOgAGIBpBADoAACAIQQA6AAAgASAJLAAAOgAHIBtBADoAACAJQQA6AAAgASAKLAAAOgAIIBxBADoAACAKQQA6AAAgASALLAAAOgAJIB1BADoAACALQQA6AAAgASAMLAAAOgAKIB5BADoAACAMQQA6AAAgASANLAAAOgALIB9BADoAACANQQA6AAAgASAOLAAAOgAMICBBADoAACAOQQA6AAAgASAPLAAAOgANICFBADoAACAPQQA6AAAgASAQLAAAOgAOICJBADoAACAQQQA6AAAgASARLAAAOgAPICNBADoAACARQQA6AAAgAEGwEGpBAzYCACACEHALrgEBBn8gAEGwEGoiCCgCAARADwsgAkEASgRAIABBpBBqIQYgAEGgEGohBwNAIAMgAkgEQEEAIQQDQCAEIABBgBBqaiIFIAEgA2osAAAgBSwAAHM6AAAgBiAGKAIAQQFqIgU2AgAgBUUEQCAHIAcoAgBBAWo2AgALIANBAWoiAyACSCAEQQFqIgRBEElxDQALCyAAEGEgAyACSA0ACwsgAkEPcUUEQA8LIAhBATYCAAveAwEFfyAAQaQQaigCACEBIABBqBBqKAIAIQUgAEGsEGooAgAhBCAAQYAQaiIDIAMsAAAgAEGgEGooAgAiAkEVdkH/AXFzOgAAIABBgRBqIgMgAywAACACQQ12Qf8BcXM6AAAgAEGCEGoiAyADLAAAIAJBBXZB/wFxczoAACAAQYMQaiIDIAMsAAAgAkEDdCABQR12ckH/AXFzOgAAIABBhBBqIgIgAiwAACABQRV2Qf8BcXM6AAAgAEGFEGoiAiACLAAAIAFBDXZB/wFxczoAACAAQYYQaiICIAIsAAAgAUEFdkH/AXFzOgAAIABBhxBqIgIgAiwAACABQQN0Qf8BcXM6AAAgAEGIEGoiASABLAAAIAVBFXZB/wFxczoAACAAQYkQaiIBIAEsAAAgBUENdkH/AXFzOgAAIABBihBqIgEgASwAACAFQQV2Qf8BcXM6AAAgAEGLEGoiASABLAAAIAVBA3QgBEEddnJB/wFxczoAACAAQYwQaiIBIAEsAAAgBEEVdkH/AXFzOgAAIABBjRBqIgEgASwAACAEQQ12Qf8BcXM6AAAgAEGOEGoiASABLAAAIARBBXZB/wFxczoAACAAQY8QaiIBIAEsAAAgBEEDdEH/AXFzOgAAIAAQYQviCwEKfyMDIQUjA0EQaiQDIAVCADcDACAFQgA3AwggAEGAEGoiC0IANwAAIAtCADcACCAAQbQQaiIGQQAgASACIAQQjAEgBiAFEDcgACAFLQADIAUtAAFBEHQgBS0AAEEYdHIgBS0AAkEIdHJyIgE2AgAgACAFLQAHIAUtAARBGHQgBS0ABUEQdHIgBS0ABkEIdHJyIgI2AgQgACAFLQALIAUtAAhBGHQgBS0ACUEQdHIgBS0ACkEIdHJyIgY2AgggACAFLQAPIAUtAAxBGHQgBS0ADUEQdHIgBS0ADkEIdHJyIgg2AgxBASEHA0AgB0EEdCAAaiINIAFBAXYiDDYCACAHQQR0IABqIAFBH3QgAkEBdnIiCjYCBCAHQQR0IABqIAJBH3QgBkEBdnIiCTYCCCAHQQR0IABqIAZBH3QgCEEBdnIiDjYCDCAMQYCAgIh+cyEBIAhBAXEEQCANIAE2AgAFIAwhAQsgB0EBaiIHQYABRwRAIAohAiAJIQYgDiEIDAELCyAAQaAQaiIGQgA3AgAgBkIANwIIIANBDEYEQCAAQaAUaiIBIAQsAAA6AAAgAEGhFGogBCwAAToAACAAQaIUaiAELAACOgAAIABBoxRqIAQsAAM6AAAgAEGkFGogBCwABDoAACAAQaUUaiAELAAFOgAAIABBphRqIAQsAAY6AAAgAEGnFGogBCwABzoAACAAQagUaiAELAAIOgAAIABBqRRqIAQsAAk6AAAgAEGqFGogBCwACjoAACAAQasUaiAELAALOgAAIABBrxRqQQE6AAAgAEGuFGpBADoAACAAQa0UakEAOgAAIABBrBRqQQA6AAAgAEGQEGoiAiABKQAANwAAIAIgASkACDcACCAAQbAQakEANgIAIAUkAw8LIABBrBBqIQggAEGoEGohByAAQbAQaiIKQQE2AgAgA0EASgRAQQAhAQNAIAEgA0gEQEEAIQIDQCACIABBgBBqaiIJIAEgBGosAAAgCSwAAHM6AAAgCCAIKAIAQQFqIgk2AgAgCUUEQCAHIAcoAgBBAWo2AgALIAFBAWoiASADSCACQQFqIgJBEElxDQALCyAAEGEgASADSA0ACwsgA0EPcQRAIApBAjYCAAsgABCtASAAQaAUaiALLAAAIgE6AAAgAEGQEGogAToAACALQQA6AAAgAEGhFGogAEGBEGoiASwAACICOgAAIABBkRBqIAI6AAAgAUEAOgAAIABBohRqIABBghBqIgEsAAAiAjoAACAAQZIQaiACOgAAIAFBADoAACAAQaMUaiAAQYMQaiIBLAAAIgI6AAAgAEGTEGogAjoAACABQQA6AAAgAEGkFGogAEGEEGoiASwAACICOgAAIABBlBBqIAI6AAAgAUEAOgAAIABBpRRqIABBhRBqIgEsAAAiAjoAACAAQZUQaiACOgAAIAFBADoAACAAQaYUaiAAQYYQaiIBLAAAIgI6AAAgAEGWEGogAjoAACABQQA6AAAgAEGnFGogAEGHEGoiASwAACICOgAAIABBlxBqIAI6AAAgAUEAOgAAIABBqBRqIABBiBBqIgEsAAAiAjoAACAAQZgQaiACOgAAIAFBADoAACAAQakUaiAAQYkQaiIBLAAAIgI6AAAgAEGZEGogAjoAACABQQA6AAAgAEGqFGogAEGKEGoiASwAACICOgAAIABBmhBqIAI6AAAgAUEAOgAAIABBqxRqIABBixBqIgEsAAAiAjoAACAAQZsQaiACOgAAIAFBADoAACAAQawUaiAAQYwQaiIBLAAAIgI6AAAgAEGcEGogAjoAACABQQA6AAAgAEGtFGogAEGNEGoiASwAACICOgAAIABBnRBqIAI6AAAgAUEAOgAAIABBrhRqIABBjhBqIgEsAAAiAjoAACAAQZ4QaiACOgAAIAFBADoAACAAQa8UaiAAQY8QaiIBLAAAIgI6AAAgAEGfEGogAjoAACABQQA6AAAgBkIANwIAIAZCADcCCCAKQQA2AgAgBSQDC6EJAQt/IwMhAiMDQRBqJAMCQAJAAkACQAJAAkACQCAAKAIIIgYOLgABAgIFAgUFBQUFBQUFAwMFAwUFBQMFBQUFBQUFAwQEBQQFBQUEBQUFBQUFBQQFCyAAIAEQsQEMBQsgAiAALADsAzoAACAAIAEsAAA6AOwDIAIgACwA7QM6AAEgACABLAABOgDtAyACIAAsAO4DOgACIAAgASwAAjoA7gMgAiAALADvAzoAAyAAIAEsAAM6AO8DIAIgACwA8AM6AAQgACABLAAEOgDwAyACIAAsAPEDOgAFIAAgASwABToA8QMgAiAALADyAyIDOgAGIAAgASwABjoA8gMgACwA8wMhBCAAIAEsAAc6APMDIAAsAPQDIQUgACABLAAIOgD0AyAALAD1AyEGIAAgASwACToA9QMgACwA9gMhByAAIAEsAAo6APYDIAAsAPcDIQggACABLAALOgD3AyAALAD4AyEJIAAgASwADDoA+AMgACwA+QMhCiAAIAEsAA06APkDIAAsAPoDIQsgACABLAAOOgD6AyAALAD7AyEMIAAgASwADzoA+wMgACABELEBIAEgAiwAACABLAAAczoAACACQQA6AAAgASACLAABIAEsAAFzOgABIAJBADoAASABIAIsAAIgASwAAnM6AAIgAkEAOgACIAEgAiwAAyABLAADczoAAyACQQA6AAMgASACLAAEIAEsAARzOgAEIAJBADoABCABIAIsAAUgASwABXM6AAUgAkEAOgAFIAEgASwABiADczoABiACQQA6AAYgASABLAAHIARzOgAHIAJBADoAByABIAEsAAggBXM6AAggAkEAOgAIIAEgASwACSAGczoACSACQQA6AAkgASABLAAKIAdzOgAKIAJBADoACiABIAEsAAsgCHM6AAsgAkEAOgALIAEgASwADCAJczoADCACQQA6AAwgASABLAANIApzOgANIAJBADoADSABIAEsAA4gC3M6AA4gAkEAOgAOIAEgASwADyAMczoADyACQQA6AA8MBAsgBkF/aiEFA0AgAyAAQewDamosAAAgBEEIdHIhBCADQQFqIgMgBUcNAAsgAiAAKQDsAzcAACACIAApAPQDNwAIIAZBEUgEQCAFIQMDQCAAQewDaiADIAVraiADIABB7ANqaiwAADoAACADQQFqIQQgA0EPSARAIAQhAwwBCwsLIAAgAhA3QREgBmshBkEAIQMDQCADIAZqIABB7ANqaiABIANqIgQsAAA6AAAgBCACIANqLAAAIAQsAABzOgAAIANBAWoiAyAFRw0ACyACJAMPCyAGQXNqIQQgACAAQewDahA3A0AgASADaiIFIAMgAEHsA2pqLAAAIAUsAABzOgAAIANBAWoiAyAERw0ACwwCCyACIAApAOwDNwAAIAIgACkA9AM3AAggBkFjaiEEIAAgAhA3A0AgASADaiIFIAIgA2osAAAgBSwAAHM6AAAgA0EBaiIDIARHDQALQQAhAQNAIAEgAEHsA2pqIgQsAABBAWpBGHRBGHUhAyAEIAM6AAAgA0UgAUEBaiIBQRBJcQ0ACwwBCyACJAMPCyACJAMLxwcBBn8jAyEEIwNBEGokAwJAAkACQAJAAkACQAJAIAAoAggiBg4uAAECAgUCBQUFBQUFBQUDAwUDBQUFAwUFBQUFBQUDBAQFBAUFBQQFBQUFBQUFBAULIAAgARA3DAULIAEgACwA7AMgASwAAHM6AAAgASAALADtAyABLAABczoAASABIAAsAO4DIAEsAAJzOgACIAEgACwA7wMgASwAA3M6AAMgASAALADwAyABLAAEczoABCABIAAsAPEDIAEsAAVzOgAFIAEgACwA8gMgASwABnM6AAYgASAALADzAyABLAAHczoAByABIAAsAPQDIAEsAAhzOgAIIAEgACwA9QMgASwACXM6AAkgASAALAD2AyABLAAKczoACiABIAAsAPcDIAEsAAtzOgALIAEgACwA+AMgASwADHM6AAwgASAALAD5AyABLAANczoADSABIAAsAPoDIAEsAA5zOgAOIAEgACwA+wMgASwAD3M6AA8gACABEDcgACABLAAAOgDsAyAAIAEsAAE6AO0DIAAgASwAAjoA7gMgACABLAADOgDvAyAAIAEsAAQ6APADIAAgASwABToA8QMgACABLAAGOgDyAyAAIAEsAAc6APMDIAAgASwACDoA9AMgACABLAAJOgD1AyAAIAEsAAo6APYDIAAgASwACzoA9wMgACABLAAMOgD4AyAAIAEsAA06APkDIAAgASwADjoA+gMgACABLAAPOgD7AwwECyAGQX9qIQUDQCACIABB7ANqaiwAACADQQh0ciEDIAJBAWoiAiAFRw0ACyAEIAApAOwDNwAAIAQgACkA9AM3AAggBkERSARAIAUhAgNAIABB7ANqIAIgBWtqIAIgAEHsA2pqLAAAOgAAIAJBAWohAyACQQ9IBEAgAyECDAELCwsgACAEEDdBESAGayEGQQAhAgNAIAIgBGosAAAgASACaiIHLAAAcyEDIAcgAzoAACACIAZqIABB7ANqaiADOgAAIAJBAWoiAiAFRw0ACyAEJAMPCyAGQXNqIQMgACAAQewDahA3A0AgASACaiIFIAIgAEHsA2pqLAAAIAUsAABzOgAAIAJBAWoiAiADRw0ACwwCCyAEIAApAOwDNwAAIAQgACkA9AM3AAggBkFjaiEDIAAgBBA3A0AgASACaiIFIAIgBGosAAAgBSwAAHM6AAAgAkEBaiICIANHDQALQQAhAQNAIAEgAEHsA2pqIgMsAABBAWpBGHRBGHUhAiADIAI6AAAgAkUgAUEBaiIBQRBJcQ0ACwwBCyAEJAMPCyAEJAML9AsBE38jAyEQIwNBIGokAyAQIgNBEGoiBCAAKAL8ASABLQAAIAEtAAJBEHQgAS0AA0EYdHIgAS0AAUEIdHJycyIJNgIAIAQgACgCgAIgAS0ABCABLQAHQRh0IAEtAAZBEHRyIAEtAAVBCHRycnMiCjYCBCAEIAAoAoQCIAEtAAggAS0AC0EYdCABLQAKQRB0ciABLQAJQQh0cnJzIgU2AgggBCAAKAKIAiABLQAMIAEtAA9BGHQgAS0ADkEQdHIgAS0ADUEIdHJycyIINgIMIAAoAowCIQ0gCUH/AXEhBiAAKAIEQQFKBH9BBCEHQQEhCwNAIAMgCEEIdkH/AXFBAnRBoCZqKAIAIgJBCHQgAkEYdnIgDSAGQQJ0QaAmaigCAHNzIAVBEHZB/wFxQQJ0QaAmaigCACICQRB0IAJBEHZycyAKQRh2QQJ0QaAmaigCACICQRh0IAJBCHZyczYCACADIAlBCHZB/wFxQQJ0QaAmaigCACICQQh0IAJBGHZyIABB/AFqIAdBAXJBAnRqKAIAIApB/wFxQQJ0QaAmaigCAHNzIAhBEHZB/wFxQQJ0QaAmaigCACICQRB0IAJBEHZycyAFQRh2QQJ0QaAmaigCACICQRh0IAJBCHZycyIGNgIEIAMgCkEIdkH/AXFBAnRBoCZqKAIAIgJBCHQgAkEYdnIgAEH8AWogB0ECckECdGooAgAgBUH/AXFBAnRBoCZqKAIAc3MgCUEQdkH/AXFBAnRBoCZqKAIAIgJBEHQgAkEQdnJzIAhBGHZBAnRBoCZqKAIAIgJBGHQgAkEIdnJzIgw2AgggAyAFQQh2Qf8BcUECdEGgJmooAgAiAkEIdCACQRh2ciAAQfwBaiAHQQNyQQJ0aigCACAIQf8BcUECdEGgJmooAgBzcyAKQRB2Qf8BcUECdEGgJmooAgAiAkEQdCACQRB2cnMgCUEYdkECdEGgJmooAgAiAkEYdCACQQh2cnMiCDYCDCAAQfwBaiAHQQRqIgVBAnRqKAIAIQ0gAygCACIJQf8BcSEOIAtBAWoiCyAAKAIESARAAn8gBCEUIAUhByAMIQUgBiEKIA4hBiADIQQgFAshAwwBCwsgA0EIaiERIANBBGohEiAEIgJBBGohByACQQhqIQsgAkEMaiEPIANBDGohEyAFBSADIQIgBiEOIAQiA0EIaiERIANBBGohEiACQQRqIQcgAkEIaiELIAJBDGohDyADQQxqIRMgBSEMIAohBkEECyEEIAIgDSAOQaAuai0AAHMiBSAIQQh2Qf8BcUGgLmotAABBCHRzIgogDEEQdkH/AXFBoC5qLQAAQRB0cyINIAZBGHZBoC5qLQAAQRh0cyIONgIAIAcgAEH8AWogBEEBckECdGooAgAgBkH/AXFBoC5qLQAAcyAJQQh2Qf8BcUGgLmotAABBCHRzIAhBEHZB/wFxQaAuai0AAEEQdHMgDEEYdkGgLmotAABBGHRzNgIAIAsgAEH8AWogBEECckECdGooAgAgDEH/AXFBoC5qLQAAcyAGQQh2Qf8BcUGgLmotAABBCHRzIAlBEHZB/wFxQaAuai0AAEEQdHMgCEEYdkGgLmotAABBGHRzNgIAIA8gAEH8AWogBEEDckECdGooAgAgCEH/AXFBoC5qLQAAcyAMQQh2Qf8BcUGgLmotAABBCHRzIAZBEHZB/wFxQaAuai0AAEEQdHMgCUEYdkGgLmotAABBGHRzNgIAIAEgBToAACABIApBCHY6AAEgASANQRB2OgACIAEgDkEYdjoAAyACQQA2AgAgA0EANgIAIAEgBygCACIAOgAEIAEgAEEIdjoABSABIABBEHY6AAYgASAAQRh2OgAHIAdBADYCACASQQA2AgAgASALKAIAIgA6AAggASAAQQh2OgAJIAEgAEEQdjoACiABIABBGHY6AAsgC0EANgIAIBFBADYCACABIA8oAgAiADoADCABIABBCHY6AA0gASAAQRB2OgAOIAEgAEEYdjoADyAPQQA2AgAgE0EANgIAIBAkAwv+CgEHfyMDIQQjA0GQBGokAyACELgBIAEoAgBFBEAgBCQDQQEPCyABKAIILAAAIQMgBEEQaiIIQQEgACgCACAAKAIIQQAQjAEgBCADOgAAAn8gASgCACIDQQFKBH8Cf0EAIQBBASEGA38gBCAGIAEoAggiB2osAAA6AAFBASAGQQFqIgUgA04NARogBCAFIAdqLAAAOgACQQEgBkECaiIFIANODQEaIAQgBSAHaiwAADoAA0EBIAZBA2oiBSADTg0BGiAEIAUgB2osAAA6AARBASAGQQRqIgUgA04NARogBCAFIAdqLAAAOgAFQQEgBkEFaiIFIANODQEaIAQgBSAHaiwAADoABkEBIAZBBmoiBSADTg0BGiAEIAUgB2osAAA6AAdBASAGQQdqIgUgA04NARogBCAFIAdqLAAAOgAIQQEgBkEIaiIFIANODQEaIAQgBSAHaiwAADoACUEBIAZBCWoiBSADTg0BGiAEIAUgB2osAAA6AApBASAGQQpqIgUgA04NARogBCAFIAdqLAAAOgALQQEgBkELaiIFIANODQEaIAQgBSAHaiwAADoADEEBIAZBDGoiBSADTg0BGiAEIAUgB2osAAA6AA1BASAGQQ1qIgUgA04NARogBCAFIAdqLAAAOgAOQQEgBkEOaiIFIANODQEaIAQgBSAHaiwAADoAD0EAIAZBD2oiBSADTg0BGiAFIAdqLAAAIQcgCCAEEK8BIAAgAigCBCIDSARAIAAgAigCCGogBCwAADoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAABOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAI6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwAAzoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAAEOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAU6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwABjoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAAHOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAg6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwACToAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAAKOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAAs6AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwADDoAACAAQQFqIQAgAigCBCEDCyAAIANIBEAgACACKAIIaiAELAANOgAAIABBAWohACACKAIEIQMLIAAgA0gEQCAAIAIoAghqIAQsAA46AAAgAEEBaiEAIAIoAgQhAwsgACADSARAIAAgAigCCGogBCwADzoAACAAQQFqIQALIAQgBzoAACAGQRBqIgYgASgCACIDSA0AQQELCwVBACEAQQELIQkgCCAEEK8BIAgQcCAELAAPIgchCCAJCyAHQX9qQRh0QRh1Qf8BcUEPSnJBAXEhASAHQX5qQRh0QRh1Qf8BcUEPSARAQRAgCGshAwNAIAFBASAHIAMgBGosAABGGyEBIANBAWohBiADQQ9IBEAgBiEDDAELCwsgAUEARyIDRQRAQRAgCGsiBkEASgRAQQAhAQNAIAAgAigCBEgEQCAAIAIoAghqIAEgBGosAAA6AAAgAEEBaiEACyABQQFqIgEgBkcNAAsLCyACIAA2AgAgBCQDIANBAXNBAXELkA4BBn8jAyEDIwNBkARqJAMgAhC4ASABKAIARQRAIAMkAw8LIANBEGoiCEEBIAAoAgAgACgCCEEAEIwBIAEoAgAiBEEASgR/An9BACEAA38gAyAGIAEoAggiB2osAAA6AABBASAGQQFyIgUgBE4NARogAyAFIAdqLAAAOgABQQIgBkECciIFIARODQEaIAMgBSAHaiwAADoAAkEDIAZBA3IiBSAETg0BGiADIAUgB2osAAA6AANBBCAGQQRyIgUgBE4NARogAyAFIAdqLAAAOgAEQQUgBkEFciIFIARODQEaIAMgBSAHaiwAADoABUEGIAZBBnIiBSAETg0BGiADIAUgB2osAAA6AAZBByAGQQdyIgUgBE4NARogAyAFIAdqLAAAOgAHQQggBkEIciIFIARODQEaIAMgBSAHaiwAADoACEEJIAZBCXIiBSAETg0BGiADIAUgB2osAAA6AAlBCiAGQQpyIgUgBE4NARogAyAFIAdqLAAAOgAKQQsgBkELciIFIARODQEaIAMgBSAHaiwAADoAC0EMIAZBDHIiBSAETg0BGiADIAUgB2osAAA6AAxBDSAGQQ1yIgUgBE4NARogAyAFIAdqLAAAOgANQQ4gBkEOciIFIARODQEaIAMgBSAHaiwAADoADkEPIAZBD3IiBSAETg0BGiADIAUgB2osAAA6AA8gCCADELABIAAgAigCBCIESARAIAAgAigCCGogAywAADoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAABOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAI6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywAAzoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAAEOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAU6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywABjoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAAHOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAg6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywACToAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAAKOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAAs6AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywADDoAACAAQQFqIQAgAigCBCEECyAAIARIBEAgACACKAIIaiADLAANOgAAIABBAWohACACKAIEIQQLIAAgBEgEQCAAIAIoAghqIAMsAA46AAAgAEEBaiEAIAIoAgQhBAsgACAESARAIAAgAigCCGogAywADzoAACAAQQFqIQALIAZBEGoiBiABKAIAIgRIDQBBAAsLBUEAIQBBAAsiASADakEQIAFrIgFB/wFxIAEQShogCCADELABIAAgAigCBCIBSARAIAAgAigCCGogAywAADoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAABOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAI6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywAAzoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAAEOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAU6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywABjoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAAHOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAg6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywACToAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAAKOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAAs6AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywADDoAACAAQQFqIQAgAigCBCEBCyAAIAFIBEAgACACKAIIaiADLAANOgAAIABBAWohACACKAIEIQELIAAgAUgEQCAAIAIoAghqIAMsAA46AAAgAEEBaiEAIAIoAgQhAQsgACABSARAIAAgAigCCGogAywADzoAACAAQQFqIQALIAgQcCACIAA2AgAgAyQDC8QBAQN/IwMhBSMDQaACaiQDIAVBjAJqIgZBADYCACAGQYABNgIEIAYgBUGAAWo2AgggBUGAAmoiBEEANgIAIARBgAE2AgQgBCAFNgIIIAJBBEgEQCAFJAMPCyABKAIAQcAASgRAIAFBf0EAIARBABB0BSAEIAEQjgELIARBwAAgBCgCAGsQuQEgBEE2ELYBIARBfyAAIAZBABB0IARB6gAQtgEgBEF/IAYgBiACEHQgA0EANgIAIAMgBigCCCACEGIgBSQDCwUAQcEBCzcBAn8gACgCAEEATARADwsDQCACIAAoAghqIgMgASADLQAAczoAACACQQFqIgIgACgCAEgNAAsLfwECfyAAKAIAIgJBCGoiAyAAKAIESgRADwsDQCACIAAoAghqQQA6AAAgAkEBaiICIANIDQALIAAgAzYCACABQQBKIANBAEpxRQRADwsgAyECA0AgAkF/aiIDIAAoAghqIAE6AAAgAUEIdiIBQQBHIAJBAUpxBEAgAyECDAELCws9AQF/IAAoAgRBAEwEQCAAQQA2AgAPCwNAIAEgACgCCGpBADoAACABQQFqIgEgACgCBEgNAAsgAEEANgIAC08BAn8gAUEATARADwsgACgCACECA0AgAiAAKAIESARAIAIgACgCCGpBADoAACAAIAAoAgBBAWo2AgAgAkEBaiECIANBAWoiAyABSA0BCwsLBQBB4QALRwECfyMDIQIjA0EwaiQDIAJBgBAQEiAAIAIQKSAAQQE2AiggAkGAEBASIAEgAhApIAFBATYCKCAAIAEQjgJFIQMgAiQDIAMLOwEBfyMDIQIjA0GAAWokAyACEJICIAIgARCTAiACQdAAaiIBQYAQEBIgACABQYg0KQMAIAIQJSACJAMLywcBDH8jAyEHIwNB0AxqJAMgABBOBEAgAEHgAGoQTgRAIAckAw8LCyABEMQBBEAgAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQQE2AiggAEEwahB2IABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQgA3A4ABIABBATYCiAEgByQDDwsgABCQASAHQbgLaiIGIAAQFyAGQTBqIgogAEEwaiILEBcgBkHgAGoiCSAAQeAAaiIMEBcgBhBkIAdB0ABqIgIgABAXIAJBMGoiAyALEBcgAkHgAGoiBCAMEBcgAkGQAWoiBSACEBcgAkHAAWoiCCADEBcgAkHwAWoiAyAEEBcgBSAGEEIgAkGgAmoiBCACQZABahAXIAJB0AJqIgUgCBAXIAJBgANqIgggAxAXIAQgBhBCIAJBsANqIgMgAkGgAmoQFyACQeADaiIEIAUQFyACQZAEaiIFIAgQFyADIAYQQiACQcAEaiIDIAJBsANqEBcgAkHwBGoiCCAEEBcgAkGgBWoiBCAFEBcgAyAGEEIgAkHQBWoiAyACQcAEahAXIAJBgAZqIgUgCBAXIAJBsAZqIgggBBAXIAMgBhBCIAJB4AZqIgMgAkHQBWoQFyACQZAHaiIEIAUQFyACQcAHaiIFIAgQFyADIAYQQiACQfAHaiIDIAJB4AZqEBcgAkGgCGogBBAXIAJB0AhqIAUQFyADIAYQQiAHQdAJaiIEIAEQEiAEKQMAQgKBpyEFIARBARCTASAEEA8gBCkDAEICgachASAHQYAKaiIDIAQQEiADQQEQkwEgAxAPIAQgAyAFEMIBIAYgACABEB0gCiALIAEQHSAJIAwgARAdIAdBqApqIgggBhAXIAhBMGoiBSAKEBcgCEHgAGogCRAXIAQQwwEiDUEDakEEbSEJIARBBRCRASEBIA1Bek4EQEEAIQMDQCADIAdqIAFB8AFqIgE6AAAgBCABQRh0QRh1EJIBIAQQDyAEEMEBIANBAWohCiAEQQUQkQEhASADIAlIBEAgCiEDDAELCwsgCUEBaiAHaiABOgAAIAAgAUEYdEEYdUF/akECbSIBQZABbCACahAXIAsgAUGQAWwgAmpBMGoQFyAMIAFBkAFsIAJqQeAAahAXIA1BeUoEQCAJIQEDQCAGIAIgASAHaiwAABCJAiAAEGQgABBkIAAQZCAAEGQgACAGEEIgAUF/aiEDIAFBAEoEQCADIQEMAQsLCyAFIAUQXSAFEA8gACAIEEIgBSAFEF0gBRAPIAAQkAEgByQDC70BAQJ/IwMhAyMDQeAAaiQDIAMgAhB4IAMgAxBVIAMQdyADQTBqIgQgARB4IAQgBBCKAiADIAQQuwEEfyAAIAEQeCAAQTBqIAIQeCAAQeAAahB2IAMkA0EBBSAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABBATYCKCAAQTBqEHYgAEIANwNgIABCADcDaCAAQgA3A3AgAEIANwN4IABCADcDgAEgAEEBNgKIASADJANBAAsLNAAgAhBOBEAgAkHgAGoQTgRADwsLIAIQkAEgASACQTBqELwBIAEpAwBCAoEaIAAgAhC8AQtSACAAIAEpAwAgAikDAHw3AwAgACABKQMIIAIpAwh8NwMIIAAgASkDECACKQMQfDcDECAAIAEpAxggAikDGHw3AxggACABKQMgIAIpAyB8NwMgC5EBAQJ+IAAgACkDCCIBQjSGQv//////////AIMgACkDAEIEh4Q3AwAgACAAKQMQIgJCNIZC//////////8AgyABQgSHhDcDCCAAIAApAxgiAUI0hkL//////////wCDIAJCBIeENwMQIAAgACkDICICQjSGQv//////////AIMgAUIEh4Q3AxggACACQgSHNwMgC4IBAQJ+IAAgACkDACIDQQAgAmusIgQgAyABKQMAhYOFNwMAIAAgACkDCCIDIAMgASkDCIUgBIOFNwMIIAAgACkDECIDIAMgASkDEIUgBIOFNwMQIAAgACkDGCIDIAMgASkDGIUgBIOFNwMYIAAgACkDICIDIAMgASkDIIUgBIOFNwMgC40CAgJ/BX4gACAAKQMAIgNC//////////8AgyIENwMAIAAgACkDCCADQjiHfCIDQv//////////AIMiBTcDCCAAIAApAxAgA0I4h3wiA0L//////////wCDIgY3AxAgACAAKQMYIANCOId8IgNC//////////8AgyIHNwMYIAAgACkDICADQjiHfCIDNwMgIANCAFEEfyAHQgBRBH8gBkIAUQR/IAVCAFEEfyAEQgBRBH9BAA8FQQALBUEBCwVBAgsFQQMLBUEECyICQThsIQEgAkEDdCAAaikDACIDQgBRBEAgAQ8LIAEhAANAIANCAn8hBCAAQQFqIQAgA0IBfEIDWgRAIAQhAwwBCwsgAAtCACAAKQMAQgBSBEBBAA8LIAApAwhCAFIEQEEADwsgACkDEEIAUgRAQQAPCyAAKQMYQgBRBH8gACkDIEIAUQVBAAsLrgEBA38jAyEDIwNB0AJqJAMgA0HgAGoiBSAAKAIIEHkgA0EwaiIEIAEoAghBAWoQeSADIAEoAghBIWoQeSADQbgBaiIAIAQgAxC+AUUEQCADJANBfQ8LIANBkAFqIgFB8A4QEiAFIAEQKSAAIAUQvQECf0EAIAAQTkUNABogAEHgAGoQTgsEQCADJANBfQ8LIAQgBCAAEL8BIAJBIDYCACACKAIIIAQQeiADJANBAAsvAQJ/IwMhASMDQYABaiQDIAFBQGsiAkGACRALIAFBwAkQCyAAIAIgARB7IAEkAwv8BgEMfyMDIQcjA0HwEGokAyAAEDsEQCAAQYABahA7BEAgByQDDwsLIAEQ0gEEQCAAEE8gAEFAaxBeIABBgAFqEE8gByQDDwsgABCUASAHQagPaiIGIAAQESAGQUBrIgogAEFAayILEBEgBkGAAWoiCSAAQYABaiIMEBEgBhBlIAdB8ABqIgIgABARIAJBQGsiAyALEBEgAkGAAWoiBCAMEBEgAkHAAWoiBSACEBEgAkGAAmoiCCADEBEgAkHAAmoiAyAEEBEgBSAGEEQgAkGAA2oiBCACQcABahARIAJBwANqIgUgCBARIAJBgARqIgggAxARIAQgBhBEIAJBwARqIgMgAkGAA2oQESACQYAFaiIEIAUQESACQcAFaiIFIAgQESADIAYQRCACQYAGaiIDIAJBwARqEBEgAkHABmoiCCAEEBEgAkGAB2oiBCAFEBEgAyAGEEQgAkHAB2oiAyACQYAGahARIAJBgAhqIgUgCBARIAJBwAhqIgggBBARIAMgBhBEIAJBgAlqIgMgAkHAB2oQESACQcAJaiIEIAUQESACQYAKaiIFIAgQESADIAYQRCACQcAKaiIDIAJBgAlqEBEgAkGAC2ogBBARIAJBwAtqIAUQESADIAYQRCAHQfAMaiIEIAEQCyAEKQMAQgKBpyEFIARBARBoIAQQCiAEKQMAQgKBpyEBIAdBsA1qIgMgBBALIANBARBoIAMQCiAEIAMgBRCXASAGIAAgARAbIAogCyABEBsgCSAMIAEQGyAHQegNaiIIIAYQESAIQUBrIgUgChARIAhBgAFqIAkQESAEEGkiDUEDakEEbSEJIARBBRBnIQEgDUF6TgRAQQAhAwNAIAMgB2ogAUHwAWoiAToAACAEIAFBGHRBGHUQfSAEEAogBEEEECwgA0EBaiEKIARBBRBnIQEgAyAJSARAIAohAwwBCwsLIAlBAWogB2ogAToAACAAIAFBGHRBGHVBf2pBAm0iAUHAAWwgAmoQESALIAFBwAFsIAJqQUBrEBEgDCABQcABbCACakGAAWoQESANQXlKBEAgCSEBA0AgBiACIAEgB2osAAAQmQIgABBlIAAQZSAAEGUgABBlIAAgBhBEIAFBf2ohAyABQQBKBEAgAyEBDAELCwsgBSAFEDAgBRAKIAAgCBBEIAUgBRAwIAUQCiAAEJQBIAckAwsEAEEQCzIAIAIQOwRAIAJBgAFqEDsEQA8LCyACEJQBIAEgAkFAaxAqIAEpAwBCAoEaIAAgAhAqCy0BAX8jAyECIwNBQGskAyACQcAMEAsgAkECEH0gAhAKIAAgASACEJsCIAIkAwusAQEFfyMDIQojA0HAEWokAyAKQcADaiEMIApBQGshCyAKQfgPaiENIAogARAfIAIsAABBBEYEQCAMIAJBAWoQHyALIAJBMWoQHyANIAwgCxB7CyAMIAogAEGAAWoQfCALIABB+AJqEKABIAsgDBBuIApB+AlqIgIgCyANEIIBIAIQgAEgCkH4A2oiASACEG8gACABIAYgByADIAQgCCAJIAUQiQEhDiAKJAMgDgvrAQAgACABKQMAIAIpAwB8NwMAIAAgASkDCCACKQMIfDcDCCAAIAEpAxAgAikDEHw3AxAgACABKQMYIAIpAxh8NwMYIAAgASkDICACKQMgfDcDICAAIAEpAyggAikDKHw3AyggACABKQMwIAIpAzB8NwMwIAAgASkDOCACKQM4fDcDOCAAQUBrIAFBQGspAwAgAkFAaykDAHw3AwAgACABKQNIIAIpA0h8NwNIIAAgASkDUCACKQNQfDcDUCAAIAEpA1ggAikDWHw3A1ggACABKQNgIAIpA2B8NwNgIAAgASkDaCACKQNofDcDaAvrAQAgACABKQMAIAIpAwB9NwMAIAAgASkDCCACKQMIfTcDCCAAIAEpAxAgAikDEH03AxAgACABKQMYIAIpAxh9NwMYIAAgASkDICACKQMgfTcDICAAIAEpAyggAikDKH03AyggACABKQMwIAIpAzB9NwMwIAAgASkDOCACKQM4fTcDOCAAQUBrIAFBQGspAwAgAkFAaykDAH03AwAgACABKQNIIAIpA0h9NwNIIAAgASkDUCACKQNQfTcDUCAAIAEpA1ggAikDWH03A1ggACABKQNgIAIpA2B9NwNgIAAgASkDaCACKQNofTcDaAs4ACAAQgE3AwAgAEEIaiIAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKAuQAwIBfwF+IAAgACkDACICQv//////////A4M3AwAgACAAKQMIIAJCOod8IgJC//////////8DgzcDCCAAIAApAxAgAkI6h3wiAkL//////////wODNwMQIAAgACkDGCACQjqHfCICQv//////////A4M3AxggACAAKQMgIAJCOod8IgJC//////////8DgzcDICAAIAApAyggAkI6h3wiAkL//////////wODNwMoIAAgACkDMCACQjqHfCICQv//////////A4M3AzAgACAAKQM4IAJCOod8IgJC//////////8DgzcDOCAAQUBrIgEpAwAgAkI6h3whAiABIAJC//////////8DgzcDACAAIAApA0ggAkI6h3wiAkL//////////wODNwNIIAAgACkDUCACQjqHfCICQv//////////A4M3A1AgACAAKQNYIAJCOod8IgJC//////////8DgzcDWCAAIAApA2AgAkI6h3wiAkL//////////wODNwNgIAAgACkDaCACQjqHfDcDaAvaAQEDfiAAIAApAzAgAa0iA4YgACkDKCICQTogAWutIgSHhDcDMCAAIAIgA4ZC//////////8DgyAAKQMgIgIgBIeENwMoIAAgAiADhkL//////////wODIAApAxgiAiAEh4Q3AyAgACACIAOGQv//////////A4MgACkDECICIASHhDcDGCAAIAIgA4ZC//////////8DgyAAKQMIIgIgBIeENwMQIAAgAiADhkL//////////wODIAApAwAiAiAEh4Q3AwggACACIAOGQv//////////A4M3AwALMwAgAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwC14AIAApAwBCAFIEQEEADwsgACkDCEIAUgRAQQAPCyAAKQMQQgBSBEBBAA8LIAApAxhCAFIEQEEADwsgACkDIEIAUgRAQQAPCyAAKQMoQgBRBH8gACkDMEIAUQVBAAsLCAAgAEHfA2oLFgAgAEUEQEEADwsgAEEQbUEEdEEQags1AQJ/IAAQKyAAQUBrIgIQKyABECsgAUFAayIDECsgACABEGYEQCACIAMQZgRAQQEPCwtBAAs9AQJ/IwMhASMDQUBrJAMgARBeIAAQKyAAQUBrIgIQKyAAIAEQZgRAIAIQOwRAIAEkA0EBDwsLIAEkA0EACycBAX8gAUG0BG0iAiABIAJBtARsa0EAR2pBwARsQYEBQeAEIAAbagvwAwEFfyMDIQYjA0GAA2okAyAAIAEgAkEfdkF/aiACIAJBH3UiB3NqQQJtIgVBf2pBH3YiAhAcIABBgAFqIgMgAUGAAWogAhAcIABBgAJqIgQgAUGAAmogAhAcIAAgAUGAA2ogBUEBc0F/akEfdiICEBwgAyABQYAEaiACEBwgBCABQYAFaiACEBwgACABQYAGaiAFQQJzQX9qQR92IgIQHCADIAFBgAdqIAIQHCAEIAFBgAhqIAIQHCAAIAFBgAlqIAVBA3NBf2pBH3YiAhAcIAMgAUGACmogAhAcIAQgAUGAC2ogAhAcIAAgAUGADGogBUEEc0F/akEfdiICEBwgAyABQYANaiACEBwgBCABQYAOaiACEBwgACABQYAPaiAFQQVzQX9qQR92IgIQHCADIAFBgBBqIAIQHCAEIAFBgBFqIAIQHCAAIAFBgBJqIAVBBnNBf2pBH3YiAhAcIAMgAUGAE2ogAhAcIAQgAUGAFGogAhAcIAAgAUGAFWogBUEHc0F/akEfdiICEBwgAyABQYAWaiACEBwgBCABQYAXaiACEBwgBiAAEA4gBkGAAWoiAiADEA4gBkGAAmoiASAEEA4gAhANIAIgAhAtIAIQDSAAIAYgB0EBcSIAEBwgAyACIAAQHCAEIAEgABAcIAYkAwsIACAAQaF8agsdAQF/IABBtARtIgEgACABQbQEbGtBAEdqQcAEbAvgAQEHfyMDIQMjA0GACGokAyADQYAGaiICIAEQQCADQYAEaiIFIAFBgAJqIgcgAUGABGoiCBAkIAUgBSAFEBQgBRAaIANBgAJqIgYgCBBAIAMgASAHECQgAyADIAMQFCAAQYAEaiIEIAEgCBAUIAQgByAEEBQgBBAaIAQgBBBAIAAgAhAmIAIgAiAFEBQgAhAaIAIgAiAGEBQgAiACIAMQFCACEBogAiACEFYgBRA0IAYQNCAAIAAgBRAUIABBgAJqIgEgBiADEBQgBCAEIAIQFCAAEBogARAaIAQQGiADJAML7wkBCH9BLyEIIwMhBCMDQfABaiQDIABBtAQ2AgAgBEFAayIHQcAMEAsgASAHEB4gAUEBNgI4IARBgAFqIgIQMiACIAEQMyAEIAIQLyAAKAIIIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBQGsiAyAHEB4gAUEBNgJ4IAIQMiACIAMQMyAEIAIQLyAAKAIIQS9qIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgAFqIgMgBxAeIAFBATYCuAEgAhAyIAIgAxAzIAQgAhAvIAAoAghB3gBqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwAFqIgMgBxAeIAFBATYC+AEgAhAyIAIgAxAzIAQgAhAvIAAoAghBjQFqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgAJqIgMgBxAeIAFBATYCuAIgAhAyIAIgAxAzIAQgAhAvIAAoAghBvAFqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwAJqIgMgBxAeIAFBATYC+AIgAhAyIAIgAxAzIAQgAhAvIAAoAghB6wFqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgANqIgMgBxAeIAFBATYCuAMgAhAyIAIgAxAzIAQgAhAvIAAoAghBmgJqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwANqIgMgBxAeIAFBATYC+AMgAhAyIAIgAxAzIAQgAhAvIAAoAghByQJqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgARqIgMgBxAeIAFBATYCuAQgAhAyIAIgAxAzIAQgAhAvIAAoAghB+AJqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwARqIgMgBxAeIAFBATYC+AQgAhAyIAIgAxAzIAQgAhAvIAAoAghBpwNqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBgAVqIgMgBxAeIAFBATYCuAUgAhAyIAIgAxAzIAQgAhAvIAAoAghB1gNqIQUgBBAKIAIgBBALQS8hAwNAIANBf2oiBiAFaiACKQMAPAAAIAJBCBAsIANBAUoEQCAGIQMMAQsLIAFBwAVqIgMgBxAeIAFBATYC+AUgAhAyIAIgAxAzIAQgAhAvAn8gACgCCCEJIAQQCiACIAQQCyAJC0GFBGohAQNAIAhBf2oiACABaiACKQMAPAAAIAJBCBAsIAhBAUoEQCAAIQgMAQsLIAQkAwvRAgECfyMDIQIjA0FAayQDIAIgASgCCCABKAIAQQxtIgMQOCAAIAIQGSACIAMgASgCCGogAxA4IABBQGsgAhAZIAIgASgCCCADQQF0aiADEDggAEGAAWogAhAZIAIgASgCCCADQQNsaiADEDggAEHAAWogAhAZIAIgASgCCCADQQJ0aiADEDggAEGAAmogAhAZIAIgASgCCCADQQVsaiADEDggAEHAAmogAhAZIAIgASgCCCADQQZsaiADEDggAEGAA2ogAhAZIAIgASgCCCADQQdsaiADEDggAEHAA2ogAhAZIAIgASgCCCADQQN0aiADEDggAEGABGogAhAZIAIgASgCCCADQQlsaiADEDggAEHABGogAhAZIAIgASgCCCADQQpsaiADEDggAEGABWogAhAZIAIgASgCCCADQQtsaiADEDggAEHABWogAhAZIAIkAwuUAQAgAkGBAUgEQEF+DwsgAyABKQAANwAAIAMgASkACDcACCADIAEpABA3ABAgAyABKQAYNwAYIAAgAUEgaiADQSBqEKMBGiAEIAEoABwQigEiAEG0BG0iBCAAIARBtARsa0EAR2pBwARsIgBB4ARqNgIAIABBgQFqIAJKBEBBfg8LIANB4ARqIAFBgQFqIAAQUxpBAAuiAgEFfyMDIQIjA0GAAWokA0G4EBBcIQMgAkHkAGoiBBAAGiAEKAIAIQQgAkHoAGoiBUHkADYCBCAFIAI2AgggAUEAIAAbIQYgBUHkADYCACACIAQ6AAAgAiAEQQh2OgABIAIgBEEQdjoAAiACIARBGHY6AANBACEBA0AgBSgCCCABQQRqaiABIAZIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyADIAUQYyADQbgBaiIAEMYBIANB+AJqIgEQgwEgA0H4BWoiBCABIAAQggEgBBCAASADQYABakHACBALIAJBtAQ2AgAgAkG0BDYCBCACIANB+AtqNgIIIAMgAhCBAiADQawQakEANgIAIANBsBBqQQA2AgAgAiQDIAMLoAIBB38jAyEEIwNB8AVqJAMgBEHoBGohByAEQegBaiEJIAQQABogBCgCACEIIARBQGsiBkHkADYCBCAGIARBgAFqIgU2AgggAUEAIAAbIQogBkHkADYCACAFIAg6AAAgBSAIQQh2OgABIAUgCEEQdjoAAiAFIAhBGHY6AANBACEBA0AgBigCCCABQQRqaiABIApIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyAHIAYQYyAJEIMBIAZBwAgQCyAEIAYgBxCVASAJIAQQbiACBEAgAiAEECALIANFBEAgBxBMIAQkA0EADwsgA0EEOgAAIAVBwAE2AgAgBUHAATYCBCAFIANBAWo2AgggBSAJEIQBIAcQTCAEJANBAAv+AQEFfyMDIQQjA0GAAmokAyAEQegAaiEFIARB6AFqEAAaIAQoAugBIQYgBEHsAWoiB0HkADYCBCAHIAQ2AgggAUEAIAAbIQggB0HkADYCACAEIAY6AAAgBCAGQQh2OgABIAQgBkEQdjoAAiAEIAZBGHY6AANBACEBA0AgBygCCCABQQRqaiABIAhIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyAFIAcQYyAEIAUQngIgAgRAIAIgBCkAADcAACACIAQpAAg3AAgLIANFBEAgBRBMIAQkA0EADwsgAyAEKQAQNwAAIAMgBCgAGDYACCAFEEwgBCQDQQALoAEBBH8jAyEEIwNB0ARqJAMgBEG4BGohAyAEQbgBaiEFIARBgAFqIgYgABAfIAEsAABBBEYEQCADQcABNgIAIANBwAE2AgQgAyABQQFqNgIIIAUgAxCfAQsgBEFAayIAQcAIEAsgBCAGIAAQfCAFIAQQbiACQQQ6AAAgA0HAATYCACADQcABNgIEIAMgAkEBajYCCCADIAUQhAEgBCQDQQALoQIBCH8jAyEEIwNB8ARqJAMgBEHoA2ohByAEQagCaiEJIARBQGsiChAAGiAKKAIAIQggBEGAAWoiBUHkADYCBCAFIARBwAFqIgY2AgggAUEAIAAbIQsgBUHkADYCACAGIAg6AAAgBiAIQQh2OgABIAYgCEEQdjoAAiAGIAhBGHY6AANBACEBA0AgBSgCCCABQQRqaiABIAtIBH8gACABaiwAAAUgAQs6AAAgAUEBaiIBQeAARw0ACyAHIAUQYyAJEMYBIApBwAgQCyAEIAogBxCVASAJIAQQxwEgAgRAIAIgBBAgCyADRQRAIAcQTCAEJANBAA8LIAYgBSAJEMkBIANBBDoAACADQQFqIAYQICADQTFqIAUQICAHEEwgBCQDQQALJAEBfyAAEEwgAEGsEGooAgAiAUUEQCAAEEsPCyABEEsgABBLC1gAIAYgAykAADcAACAGIAMoAAg2AAggBiAFEIoBNgAcIAAgASACIAYgBCAFIAZBgQFqIAVBtARtIgAgBSAAQbQEbGtBAEdqQcAEbCAGQQxqIAZBIGoQpAELBgBBBBABCwgAQQMQAUIACwgAQQIQAUEACwgAQQEQAUEACwgAQQAQAUEAC0oBA39BECECAn8DQCAALAAAIgMgASwAACIERgRAIABBAWohACABQQFqIQFBACACQX9qIgJFDQIaDAELCyADQf8BcSAEQf8BcWsLC7AEAQx/IwMhCSMDQcACaiQDIAIsAABBBEcEQEH6N0EnQbQ1KAIAEGAgCSQDQQEPCyAJQegAaiEKIARFIgsEf0EABSAEQRBtQQR0QRBqCyAGRwRAAn9BtDUoAgAhEyAKIAsEf0EABSAEQRBtQQR0QRBqCzYCACAKIAY2AgQgEwtBojggChCpASAJJANBAQ8LIAlBiAFqIQ8gCUH8AGohDSAJQfAAaiELIAlBlAJqIhBCADcCACAQQQA2AgggCUGIAmoiEUIANwIAIBFBADYCCCAJQaACaiIMEAAaIAwoAgAhDiAJQawCaiIKQeQANgIEIAogCTYCCCABQQAgABshEiAKQeQANgIAIAkgDjoAACAJIA5BCHY6AAEgCSAOQRB2OgACIAkgDkEYdjoAA0EAIQEDQCAKKAIIIAFBBGpqIAEgEkgEfyAAIAFqLAAABSABCzoAACABQQFqIgFB4ABHDQALIA8gChBjIAlBwQA2AgAgCUHBADYCBCAJIAI2AgggCiAENgIAIAogBDYCBCAKIAM2AgggDEEANgIAIAxBBDYCBCAMIAc2AgggDUEANgIAIA1BEDYCBCANIAg2AgggBkEIaiIBEFwhACALQQA2AgAgCyABNgIEIAsgADYCCCAQIBEgDyAJIAogDCALIA0QlwIgBiALKAIARgRAIAUgACAGEFMaCyAAEEsgDxBMIAYgCygCAEYEf0EABUGKOUEpQbQ1KAIAEGBBAQshFCAJJAMgFAuiAgAgAAR/An8gAUGAAUkEQCAAIAE6AABBAQwBC0H0NigCACgCAEUEQCABQYB/cUGAvwNGBEAgACABOgAAQQEMAgVBtD9B1AA2AgBBfwwCCwALIAFBgBBJBEAgACABQQZ2QcABcjoAACAAIAFBP3FBgAFyOgABQQIMAQsgAUGAQHFBgMADRiABQYCwA0lyBEAgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABIAAgAUE/cUGAAXI6AAJBAwwBCyABQYCAfGpBgIDAAEkEfyAAIAFBEnZB8AFyOgAAIAAgAUEMdkE/cUGAAXI6AAEgACABQQZ2QT9xQYABcjoAAiAAIAFBP3FBgAFyOgADQQQFQbQ/QdQANgIAQX8LCwVBAQsLLgAgAEIAUgRAA0AgAUF/aiIBIACnQQdxQTByOgAAIABCA4giAEIAUg0ACwsgAQs1ACAAQgBSBEADQCABQX9qIgEgAiAAp0EPcUHwM2otAAByOgAAIABCBIgiAEIAUg0ACwsgAQtlAQF/IwMhACMDQTBqJAMgAEEYaiIGQRA2AgAgBkEQNgIEIAYgATYCCCAAQQxqIgEgAzYCACABIAM2AgQgASACNgIIIAAgBTYCACAAIAU2AgQgACAENgIIIAYgASAAELMBIAAkAwvAAgEFfyMDIQMjA0HgAWokAyADQaABaiIEQgA3AwAgBEIANwMIIARCADcDECAEQgA3AxggBEIANwMgIANB0AFqIgUgAigCADYCAEEAIAEgBSADQdAAaiICIAQQiwFBAEgEf0F/BSAAKAJMQX9KBH9BAQVBAAsaIAAoAgAhBiAALABKQQFIBEAgACAGQV9xNgIACyAAKAIwBEAgACABIAUgAiAEEIsBGgUgACgCLCEHIAAgAzYCLCAAIAM2AhwgACADNgIUIABB0AA2AjAgACADQdAAajYCECAAIAEgBSACIAQQiwEaIAcEQCAAQQBBACAAKAIkQQFxQQRqEQAAGiAAKAIUGiAAIAc2AiwgAEEANgIwIABBADYCECAAQQA2AhwgAEEANgIUCwsgACAAKAIAIAZBIHFyNgIAQQALGiADJAMLKQIBfwF8IAEoAgBBB2pBeHEiAisDACEDIAEgAkEIajYCACAAIAM5AwALtBcDFH8DfgF8IwMhFCMDQbAEaiQDIBRBmARqIgxBADYCACABvSIaQgBTBH8gAZoiHSEBQc86IRIgHb0hGkEBBUHSOkHVOkHQOiAEQQFxGyAEQYAQcRshEiAEQYEQcUEARwshEyAUQSBqIQYgFCIOIREgDkGcBGoiCkEMaiEPIBpCgICAgICAgPj/AINCgICAgICAgPj/AFEEfyAAQSAgAiATQQNqIgMgBEH//3txECggACASIBMQJyAAQeo6Qe46IAVBIHFBAEciBRtB4jpB5jogBRsgASABYhtBAxAnIABBICACIAMgBEGAwABzECggAwUCfyABIAwQpQFEAAAAAAAAAECiIgFEAAAAAAAAAABiIgcEQCAMIAwoAgBBf2o2AgALIAVBIHIiC0HhAEYEQCASQQlqIBIgBUEgcSIJGyEIQQwgA2siB0UgA0ELS3JFBEBEAAAAAAAAIEAhHQNAIB1EAAAAAAAAMECiIR0gB0F/aiIHDQALIAgsAABBLUYEfCAdIAGaIB2hoJoFIAEgHaAgHaELIQELIA9BACAMKAIAIgZrIAYgBkEASBusIA8QWyIHRgRAIApBC2oiB0EwOgAACyATQQJyIQogB0F/aiAGQR91QQJxQStqOgAAIAdBfmoiByAFQQ9qOgAAIANBAUghDCAEQQhxRSENIA4hBQNAIAUgCSABqiIGQfAzai0AAHI6AAAgASAGt6FEAAAAAAAAMECiIQEgBUEBaiIGIBFrQQFGBH8gDSAMIAFEAAAAAAAAAABhcXEEfyAGBSAGQS46AAAgBUECagsFIAYLIQUgAUQAAAAAAAAAAGINAAsCfwJAIANFDQAgBUF+IBFraiADTg0AIA8gA0ECamogB2shCyAHDAELIAUgDyARayAHa2ohCyAHCyEGIABBICACIAogC2oiAyAEECggACAIIAoQJyAAQTAgAiADIARBgIAEcxAoIAAgDiAFIBFrIgUQJyAAQTAgCyAFIA8gBmsiBmprQQBBABAoIAAgByAGECcgAEEgIAIgAyAEQYDAAHMQKCADDAELIAcEQCAMIAwoAgBBZGoiCDYCACABRAAAAAAAALBBoiEBBSAMKAIAIQgLIAYgBkGgAmogCEEASBsiCiEGA0AgBiABqyIHNgIAIAZBBGohBiABIAe4oUQAAAAAZc3NQaIiAUQAAAAAAAAAAGINAAsgCEEASgRAIAohBwNAIAhBHSAIQR1IGyENIAZBfGoiCCAHTwRAIA2tIRtBACEJA0AgCa0gCCgCAK0gG4Z8IhxCgJTr3AOAIRogCCAcIBpCgJTr3AN+fT4CACAapyEJIAhBfGoiCCAHTw0ACyAJBEAgB0F8aiIHIAk2AgALCyAGIAdLBEACQAN/IAZBfGoiCCgCAA0BIAggB0sEfyAIIQYMAQUgCAsLIQYLCyAMIAwoAgAgDWsiCDYCACAIQQBKDQALBSAKIQcLQQYgAyADQQBIGyENIAhBAEgEQCANQRlqQQltQQFqIRAgC0HmAEYhFSAGIQMDQEEAIAhrIgZBCSAGQQlIGyEJIAogByADSQR/QQEgCXRBf2ohFkGAlOvcAyAJdiEXQQAhCCAHIQYDQCAGIAggBigCACIYIAl2ajYCACAXIBYgGHFsIQggBkEEaiIGIANJDQALIAcgB0EEaiAHKAIAGyEZIAgEfyADIAg2AgAgA0EEagUgAwshBiAZBSADIQYgByAHQQRqIAcoAgAbCyIDIBUbIgcgEEECdGogBiAGIAdrQQJ1IBBKGyEIIAwgCSAMKAIAaiIGNgIAIAZBAEgEQCADIQcgCCEDIAYhCAwBCwsFIAchAyAGIQgLIAohDCADIAhJBEAgDCADa0ECdUEJbCEHIAMoAgAiCkEKTwRAQQohBgNAIAdBAWohByAKIAZBCmwiBk8NAAsLBUEAIQcLIA1BACAHIAtB5gBGG2sgC0HnAEYiFSANQQBHIhZxQR90QR91aiIGIAggDGtBAnVBCWxBd2pIBH8gBkGAyABqIgZBCW0hCSAGIAlBCWxrIgZBCEgEQEEKIQsDQCAGQQFqIQogC0EKbCELIAZBB0gEQCAKIQYMAQsLBUEKIQsLIAlBAnQgDGpBhGBqIgYoAgAiCSALbiEQIAggBkEEakYiFyAJIAsgEGxrIgpFcUUEQEQBAAAAAABAQ0QAAAAAAABAQyAQQQFxGyEBRAAAAAAAAOA/RAAAAAAAAPA/RAAAAAAAAPg/IBcgCiALQQF2IhBGcRsgCiAQSRshHSATBEAgHZogHSASLAAAQS1GIhAbIR0gAZogASAQGyEBCyAGIAkgCmsiCjYCACABIB2gIAFiBEAgBiAKIAtqIgc2AgAgB0H/k+vcA0sEQANAIAZBADYCACAGQXxqIgYgA0kEQCADQXxqIgNBADYCAAsgBiAGKAIAQQFqIgc2AgAgB0H/k+vcA0sNAAsLIAwgA2tBAnVBCWwhByADKAIAIgpBCk8EQEEKIQsDQCAHQQFqIQcgCiALQQpsIgtPDQALCwsLIAchCSAGQQRqIgYgCCAIIAZLGyEGIAMFIAchCSAIIQYgAwshCiAGIApLBH8CfyAGIQMDfyADQXxqIgYoAgAEQCADIQZBAQwCCyAGIApLBH8gBiEDDAEFQQALCwsFQQALIQcgFQR/IBZBAXMgDWoiAyAJSiAJQXtKcQR/IANBf2ogCWshCCAFQX9qBSADQX9qIQggBUF+agshBSAEQQhxBH8gCAUgBwRAIAZBfGooAgAiDQRAIA1BCnAEQEEAIQMFQQAhA0EKIQsDQCADQQFqIQMgDSALQQpsIgtwRQ0ACwsFQQkhAwsFQQkhAwsgBiAMa0ECdUEJbEF3aiENIAVBIHJB5gBGBH8gCCANIANrIgNBACADQQBKGyIDIAggA0gbBSAIIAkgDWogA2siA0EAIANBAEobIgMgCCADSBsLCwUgDQshA0EAIAlrIQggAEEgIAIgBUEgckHmAEYiEAR/QQAhCCAJQQAgCUEAShsFIA8gCCAJIAlBAEgbrCAPEFsiC2tBAkgEQANAIAtBf2oiC0EwOgAAIA8gC2tBAkgNAAsLIAtBf2ogCUEfdUECcUErajoAACALQX5qIgggBToAACAPIAhrCyADIBNBAWpqQQEgBEEDdkEBcSADQQBHIgsbamoiDSAEECggACASIBMQJyAAQTAgAiANIARBgIAEcxAoIBAEQCAOQQlqIgkhDyAOQQhqIQggDCAKIAogDEsbIgohBwNAIAcoAgCtIAkQWyEFIAcgCkYEQCAFIAlGBEAgCEEwOgAAIAghBQsFIAUgDksEQCAOQTAgBSARaxBKGgNAIAVBf2oiBSAOSw0ACwsLIAAgBSAPIAVrECcgB0EEaiIFIAxNBEAgBSEHDAELCyAEQQhxRSALQQFzcUUEQCAAQfI6QQEQJwsgAEEwIAUgBkkgA0EASnEEfwN/IAUoAgCtIAkQWyIHIA5LBEAgDkEwIAcgEWsQShoDQCAHQX9qIgcgDksNAAsLIAAgByADQQkgA0EJSBsQJyADQXdqIQcgBUEEaiIFIAZJIANBCUpxBH8gByEDDAEFIAcLCwUgAwtBCWpBCUEAECgFIABBMCAKIAYgCkEEaiAHGyILSSADQX9KcQR/IARBCHFFIRIgDkEJaiIMIRNBACARayERIA5BCGohCSADIQUgCiEGA38gDCAGKAIArSAMEFsiA0YEQCAJQTA6AAAgCSEDCwJAIAYgCkYEQCADQQFqIQcgACADQQEQJyASIAVBAUhxBEAgByEDDAILIABB8jpBARAnIAchAwUgAyAOTQ0BIA5BMCADIBFqEEoaA0AgA0F/aiIDIA5LDQALCwsgACADIBMgA2siAyAFIAUgA0obECcgBkEEaiIGIAtJIAUgA2siBUF/SnENACAFCwUgAwtBEmpBEkEAECggACAIIA8gCGsQJwsgAEEgIAIgDSAEQYDAAHMQKCANCwshACAUJAMgAiAAIAAgAkgbC9ABAQF/AkACQAJAIAFBAEciAiAAQQNxQQBHcQRAA0AgAC0AAEUNAiABQX9qIgFBAEciAiAAQQFqIgBBA3FBAEdxDQALCyACRQ0BCyAALQAARQRAIAFFDQEMAgsCQAJAIAFBA00NAANAIAAoAgAiAkH//ft3aiACQYCBgoR4cUGAgYKEeHNxRQRAIABBBGohACABQXxqIgFBA0sNAQwCCwsMAQsgAUUNAQsDQCAALQAARQ0CIAFBf2oiAUUNASAAQQFqIQAMAAALAAtBACEACyAAC2EBAX8gACAALABKIgEgAUH/AWpyOgBKIAAoAgAiAUEIcQR/IAAgAUEgcjYCAEF/BSAAQQA2AgggAEEANgIEIAAgACgCLCIBNgIcIAAgATYCFCAAIAEgACgCMGo2AhBBAAsLBQBBtD8LBQBBwAQLfAICfwF+IwMhAyMDQSBqJAMgA0EIaiIEIAAoAjw2AgAgBCABQiCIPgIEIAQgAT4CCCAEIAM2AgwgBCACNgIQQYwBIAQQCSIAQYBgSwR/QbQ/QQAgAGs2AgBBfwUgAAtBAEgEfiADQn83AwBCfwUgAykDAAshBSADJAMgBQubAwEJfyMDIQYjA0EwaiQDIAZBIGohBSAGIgMgACgCHCIENgIAIAMgACgCFCAEayIENgIEIAMgATYCCCADIAI2AgwgA0EQaiIBIAAoAjw2AgAgASADNgIEIAFBAjYCCAJAAkACfyACIARqIgkhCkGSASABEAIiBEGAYEsEQEG0P0EAIARrNgIAQX8hBAsgCgsgBEYNAEECIQcgAyEBIAQhAwNAIANBAE4EQCABQQhqIAEgAyABKAIEIghLIgQbIgEgAyAIQQAgBBtrIgggASgCAGo2AgAgASABKAIEIAhrNgIEIAUgACgCPDYCACAFIAE2AgQgBSAHIARBH3RBH3VqIgc2AggCfyAJIANrIgkhC0GSASAFEAIiA0GAYEsEQEG0P0EAIANrNgIAQX8hAwsgCwsgA0YNAgwBCwsgAEEANgIQIABBADYCHCAAQQA2AhQgACAAKAIAQSByNgIAIAdBAkYEf0EABSACIAEoAgRrCyECDAELIAAgACgCLCIBIAAoAjBqNgIQIAAgATYCHCAAIAE2AhQLIAYkAyACCz0BAX8jAyEBIwNBEGokAyABIAAoAjw2AgBBBiABEAgiAEGAYEsEQEG0P0EAIABrNgIAQX8hAAsgASQDIAALgAMBDn8jAyEFIwNBEGokAwJAAkACQCAAQbAQaiIIKAIADgIAAgELIAhBATYCAAwBCyAFJAMPCyADQQBKBEAgAEG0EGohECAAQawUaiEJIABBrRRqIQogAEGuFGohCyAAQa8UaiEMIABBrBBqIQ0gAEGoEGohDiAAQaAUaiEPA0AgDCAMLQAAIAktAABBGHQgCi0AAEEQdHIgCy0AAEEIdHJyQQFqIgQ6AAAgCyAEQQh2OgAAIAogBEEQdjoAACAJIARBGHY6AAAgBSAPKQAANwAAIAUgDykACDcACCAQIAUQNyAGIANIBEBBACEEA0AgASAGaiACIAZqLAAAIgcgBCAFai0AAHM6AAAgBCAAQYAQamoiESAHIBEtAABzOgAAIA0gDSgCAEEBaiIHNgIAIAdFBEAgDiAOKAIAQQFqNgIACyAGQQFqIgYgA0ggBEEBaiIEQRBJcQ0ACwsgABBhIAYgA0gNAAsLIANBD3FFBEAgBSQDDwsgCEECNgIAIAUkAwuAAwEOfyMDIQUjA0EQaiQDAkACQAJAIABBsBBqIggoAgAOAgACAQsgCEEBNgIADAELIAUkAw8LIANBAEoEQCAAQbQQaiEQIABBrBRqIQkgAEGtFGohCiAAQa4UaiELIABBrxRqIQwgAEGsEGohDSAAQagQaiEOIABBoBRqIQ8DQCAMIAwtAAAgCS0AAEEYdCAKLQAAQRB0ciALLQAAQQh0cnJBAWoiBDoAACALIARBCHY6AAAgCiAEQRB2OgAAIAkgBEEYdjoAACAFIA8pAAA3AAAgBSAPKQAINwAIIBAgBRA3IAYgA0gEQEEAIQQDQCABIAZqIAIgBmosAAAgBCAFaiwAAHMiBzoAACAEIABBgBBqaiIRIAcgESwAAHM6AAAgDSANKAIAQQFqIgc2AgAgB0UEQCAOIA4oAgBBAWo2AgALIAZBAWoiBiADSCAEQQFqIgRBEElxDQALCyAAEGEgBiADSA0ACwsgA0EPcUUEQCAFJAMPCyAIQQI2AgAgBSQDCwUAQeAACwQAQTALawEBfyMDIQYjA0GwFGokAyAGIAAoAgAgACgCCCABKAIAIAEoAggQrgEgBiACKAIIIAIoAgAQrAEgBiAEKAIIIAMoAgggAygCABD7ASAEIAMoAgA2AgAgBiAFKAIIEKsBIAVBEDYCACAGJAMLawEBfyMDIQYjA0GwFGokAyAGIAAoAgAgACgCCCABKAIAIAEoAggQrgEgBiACKAIIIAIoAgAQrAEgBiAEKAIIIAMoAgggAygCABD8ASAEIAMoAgA2AgAgBiAFKAIIEKsBIAVBEDYCACAGJAMLOQECfyABKAIAQQBMBEAPCwNAIAAQdUH/AXEhAyACIAEoAghqIAM6AAAgAkEBaiICIAEoAgBIDQALC14BAn8gACgCACICIAEoAgBHBEBBAA8LIAJBAEwEQEEBDwsgACgCCCEDIAEoAgghAUEAIQADfwJ/QQAgACADaiwAACAAIAFqLAAARw0AGiAAQQFqIgAgAkgNAUEBCwsL/QcBCX8jAyEFIwNBgAZqJAMgBUEgaiEEIABBADYCXCAAQgA3AgAgAEIANwIIIABCADcCECAAQgA3AhggAEIANwIgIABCADcCKCAAQgA3AjAgAEIANwI4IABBQGtCADcCACAAQgA3AkggAEEANgJQIAFBAEoEfyAEEHMDQCAEIAIgA2osAAAQQSADQQFqIgMgAUcNAAsgBCAFEHEgAEHYAGohByAAQdQAaiEGIABBQGshCEEAIQEDfyAFIAFBAnQiAkEDcmotAABBGHQgAiAFai0AACACQQFyIAVqLQAAQQh0ciAFIAJBAnJqLQAAQRB0cnIhAiAHQQA2AgAgBkEANgIAIAAgAiAAKAIAczYCACAAIAAoAiBBAXM2AiAgCCACQX9qIgMgCCgCAHM2AgAgAEECIAJrIgIgACgCDHM2AgwgACADIAJrIgMgACgCLHM2AiwgACACIANrIgIgACgCTHM2AkwgACADIAJrIgMgACgCGHM2AhggACACIANrIgIgACgCOHM2AjggACADIAJrIgMgACgCBHM2AgQgACACIANrIgIgACgCJHM2AiQgACADIAJrIgMgACgCRHM2AkQgACACIANrIgIgACgCEHM2AhAgACADIAJrIgMgACgCMHM2AjAgACACIANrIgIgACgCUHM2AlAgACADIAJrIgMgACgCHHM2AhwgACACIANrIgIgACgCPHM2AjwgACADIAJrIgMgACgCCHM2AgggACACIANrIgIgACgCKHM2AiggACADIAJrIgMgACgCSHM2AkggACACIANrIgIgACgCFHM2AhQgACAAKAI0IAMgAmtzNgI0QQAhBEEAIQIDQCAGIAJBAWo2AgAgAkEUTgRAIAZBADYCAEEAIQJBDyEDA0BBACADIANBFUYbIgpBAnQgAGooAgAiCSACQQJ0IABqIgsoAgBrIAcoAgBrIQMgAyAJRwRAIAcgAyAJSzYCAAsgCyADNgIAIApBAWohAyACQQFqIgJBFUcNAAsLIARBAWoiBEGQzgBHBEAgBigCACECDAELCyABQQFqIgFBCEcNACAACwUgAEHYAGohByAAQdQAaiEGIAALIQEgBUGMA2oiCBBzQQAhBANAIAYgBigCACICQQFqIgM2AgAgCCACQRRIBH8gA0ECdCAAagUgBkEANgIAQQAhAkEPIQMDf0EAIAMgA0EVRhsiCkECdCAAaigCACIJIAJBAnQgAGoiCygCAGsgBygCAGshAyADIAlHBEAgByADIAlLNgIACyALIAM2AgAgCkEBaiEDIAJBAWoiAkEVRw0AIAELCygCABBBIARBAWoiBEGAAUcNAAsgCCAAQeAAahBxIABBADYCXCAFJAML0AcCCn8CfiMDIQUjA0HgCGokAyAFQbAGaiEIIAEQDyACEA8gBSACEBIgBRDDASIJQQNqQQRtIQogCUF6TgRAA0AgBiAIaiAFQQQQkQEiAjoAACAFIAJBGHRBGHUQkgEgBRAPIAUQwQEgBkEBaiECIAYgCkgEQCACIQYMAQsLCyAFQYAHaiIGIgJCATcDACACQgA3AwggAkIANwMQIAJCADcDGCACQgA3AyAgBUGwB2oiAkGwEBASIAVB4AdqIgQgBiACED4gBUGwCGoiA0GAEBASIAVBMGoiByADQYg0KQMAIg0gBBAlIAdBAjYCKCAHQTBqIAEQEiAHIAEoAigiAjYCWEECIQYgAqwhDgNAIAZBf2oiDEEwbCAHaiELIAKsIA5+QoCAgAhVBEAgA0GAEBASIAsgAxApIAxBMGwgB2pBATYCKAsgBCALIAEQPiADQYAQEBIgBkEwbCAHaiADIA0gBBAlIAZBMGwgB2pBAjYCKCAGQQFqIgZBEEcEQCABKAIoIQJCAiEODAELCyAAIAggCmosAAAiAUEwbCAHahASIAAgAUEwbCAHaigCKCIBNgIoAkAgCUEATA0AIAGsIg4gDn5CgICACFYEQCADQYAQEBIgACADECkgAEEBNgIoCyAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAEIAAQQyADQYAQEBIgACADIA0gBBAlIABBAjYCKCAKQX9qIgEgCGosAAAiAkEwbCAHaigCKEGAgIAESgRAIANBgBAQEiAAIAMQKSAAQQE2AigLIAQgACACQTBsIAdqED4gA0GAEBASIAAgAyANIAQQJSAAQQI2AiggCUEETA0AA0AgBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggBCAAEEMgA0GAEBASIAAgAyANIAQQJSAAQQI2AiggAUF/aiICIAhqLAAAIgZBMGwgB2ooAihBgICABEoEQCADQYAQEBIgACADECkgAEEBNgIoCyAEIAAgBkEwbCAHahA+IANBgBAQEiAAIAMgDSAEECUgAEECNgIoIAFBAUoEQCACIQEMAQsLIANBgBAQEiAAIAMQKSAAQQE2AiggBSQDDwsgA0GAEBASIAAgAxApIABBATYCKCAFJAMLLgEBfyMDIQIjA0EwaiQDIAJBgBAQEiACQQIQkgEgAhAPIAAgASACEIQCIAIkAwsEAEEMCzEBAn8jAyEBIwNB4ABqJAMgAUEwaiICQaAPEBIgAUHQDxASIAAgAiABEL4BGiABJAMLBABBIAvpAwEFfyMDIQYjA0GQAWokAyAAIAEgAkEfdkF/aiACIAJBH3UiB3NqQQJtIgRBf2pBH3YiAxAdIABBMGoiAiABQTBqIAMQHSAAQeAAaiIFIAFB4ABqIAMQHSAAIAFBkAFqIARBAXNBf2pBH3YiAxAdIAIgAUHAAWogAxAdIAUgAUHwAWogAxAdIAAgAUGgAmogBEECc0F/akEfdiIDEB0gAiABQdACaiADEB0gBSABQYADaiADEB0gACABQbADaiAEQQNzQX9qQR92IgMQHSACIAFB4ANqIAMQHSAFIAFBkARqIAMQHSAAIAFBwARqIARBBHNBf2pBH3YiAxAdIAIgAUHwBGogAxAdIAUgAUGgBWogAxAdIAAgAUHQBWogBEEFc0F/akEfdiIDEB0gAiABQYAGaiADEB0gBSABQbAGaiADEB0gACABQeAGaiAEQQZzQX9qQR92IgMQHSACIAFBkAdqIAMQHSAFIAFBwAdqIAMQHSAAIAFB8AdqIARBB3NBf2pBH3YiBBAdIAIgAUGgCGogBBAdIAUgAUHQCGogBBAdIAYgABAXIAZBMGoiASACEBcgBkHgAGoiBCAFEBcgASABEF0gARAPIAAgBiAHQQFxIgAQHSACIAEgABAdIAUgBCAAEB0gBiQDC2MBAX8jAyECIwNBMGokAyACIAEQVSACIAIgARAWQYA7KAIAQX1GBEAgACABEF0gABAPIAAgAEEDEE0gABAPIAAgAiAAEBAFIAAgAhAXCyACEI8BIAAgAiAAEBAgABB3IAIkAwvYBQIHfw9+IwMhAyMDQdAAaiQDIANCADcDACADQgA3AwggA0IANwMQIANCADcDGCADQgA3AyAgA0IANwMoIANCADcDMCADQgA3AzggA0FAa0IANwMAIANCADcDSCADQUBrIQkDQCABIAEpAwAiCkL//////////wCDIhQ3AwAgASABKQMIIApCOId8IgpC//////////8AgyIWNwMIIAEgASkDECAKQjiHfCIKQv//////////AIMiFzcDECABIAEpAxggCkI4h3wiCkL//////////wCDIhg3AxggASABKQMgIApCOId8Igo3AyACQAJAIApCAFEEfyAYQgBRBH8gF0IAUQR/IBZCAFEEfyAUQgBRBH9BAAVBACEFDAULBUEBIQUMBAsFQQIhBQwDCwVBAyEFDAILBUEEIQUMAQshBAwBCyAFQThsIQQgBUEDdCABaikDACIKQgBSBEADQCAKQgJ/IRQgBEEBaiEEIApCAXxCA1oEQCAUIQoMAQsLCwsgByAEQQF0SARAIAYEfyAIQQF1BSACEHULIQQgAyAVQgGGIAtCN4eEIhU3A0ggCSALQgGGQv7/////////AIMgDEI3h4QiCzcDACADIAxCAYZC/v////////8AgyANQjeHhCIMNwM4IAMgDUIBhkL+/////////wCDIA5CN4eEIg03AzAgAyAOQgGGQv7/////////AIMgD0I3h4QiDjcDKCADIA9CAYZC/v////////8AgyAQQjeHhCIPNwMgIAMgEEIBhkL+/////////wCDIBFCN4eEIhA3AxggAyARQgGGQv7/////////AIMgEkI3h4QiETcDECADIBJCAYZC/v////////8AgyATQjeHhCISNwMIIAMgBEEBca0gE0IBhkL+/////////wCDhCITNwMAIAQhCCAGQQFqQQdxIQYgB0EBaiEHDAELCyAAIAMgARCNAiADJAMLBQBBwQALwRICBn8ffgJ/IwMhCCMDQdAAaiQDIAEgASkDACIJQv//////////AIMiHzcDACABIAEpAwggCUI4h3wiCUL//////////wCDIiA3AwggASABKQMQIAlCOId8IglC//////////8AgyIcNwMQIAEgASkDGCAJQjiHfCIJQv//////////AIMiGjcDGCABIAEpAyAgCUI4h3wiCUL//////////wCDIhc3AyAgASABKQMoIAlCOId8IglC//////////8AgyIUNwMoIAEgASkDMCAJQjiHfCILQv//////////AIMiGDcDMCABIAEpAzggC0I4h3wiCkL//////////wCDIhU3AzggAUFAayIGKQMAIApCOId8IglC//////////8AgyEMIAYgDDcDACABIAEpA0ggCUI4h3wiJDcDSCAICyIDIAIpAwAiITcDACADIAIpAwgiDTcDCCADIAIpAxAiDjcDECADIAIpAxgiDzcDGCADIAIpAyAiCUL//////////wCDIhA3AyAgAyAJQjiHIhE3AyggA0IANwMwIANCADcDOCADQgA3A0AgA0IANwNIAn8CQAJAICRCAFEEfyAMQgBSDQIgA0FAayEEIAogC4RC//////////8Ag0IAUg0CIANBOGohAiARIBRRBH8gECAXUQR/IA8gGlEEfyAOIBxRBH8gDSAgUQR/IB8gIVEEfyACIQUgBAUgISEKIB8hCQwHCwUgDSEKICAhCQwGCwUgDiEKIBwhCQwFCwUgDyEKIBohCQwECwUgECEKIBchCQwDCwUgESEKIBQhCQwCCwVCACEKICQhCQwBCwwCCyAJIApVDQAgACAfNwMAIAAgASkDCDcDCCAAIAEpAxA3AxAgACABKQMYNwMYIAAgASkDIDcDICADJAMPCyADQThqIQUgA0FAawshB0EAIQJCACEKQgAhCwNAIApCAYZC/v////////8AgyALQjeHhCEmIAtCAYZC/v////////8AgyASQjeHhCEjIBJCAYZC/v////////8AgyARQjeHhCEiIBFCAYZC/v////////8AgyAQQjeHhCEdIBBCAYZC/v////////8AgyAPQjeHhCEbIA9CAYZC/v////////8AgyAOQjeHhCEZIA5CAYZC/v////////8AgyANQjeHhCEWIA1CAYZC/v////////8AgyAhQjeHhCETICFCAYZC/v////////8AgyEhIAJBAWohAgJAAkAgJCAlQgGGIApCN4eEIiVRBH4gDCAmUQR+IBUgI1EEfiAYICJRBH4gFCAdUQR+IBcgG1EEfiAZIBpRBH4gFiAcUQR+IBMgIFEEfiAfICFRBH5BACEEICAhDSAcIQ4gGiEPIBchECAUIREgGCESIBUhCyAMBSAhIQkgHyEeICAhDSAcIQ4gGiEPIBchECAUIREgGCESIBUhCyAMIQoMCgsFICAhHiATIgkhDSAcIQ4gGiEPIBchECAUIREgGCESIBUhCyAMIQoMCQsFIBwhHiATIQ0gFiIJIQ4gGiEPIBchECAUIREgGCESIBUhCyAMIQoMCAsFIBohHiATIQ0gFiEOIBkiCSEPIBchECAUIREgGCESIBUhCyAMIQoMBwsFIBchHiATIQ0gFiEOIBkhDyAbIgkhECAUIREgGCESIBUhCyAMIQoMBgsFIBQhHiATIQ0gFiEOIBkhDyAbIRAgHSIJIREgGCESIBUhCyAMIQoMBQsFIBghHiATIQ0gFiEOIBkhDyAbIRAgHSERICIiCSESIBUhCyAMIQoMBAsFIBUhHiATIQ0gFiEOIBkhDyAbIRAgHSERICIhEiAjIgkhCyAMIQoMAwsFIAwhHiATIQ0gFiEOIBkhDyAbIRAgHSERICIhEiAjIQsgJiIJIQoMAgsFICUhCSAkIR4gEyENIBYhDiAZIQ8gGyEQIB0hESAiIRIgIyELICYhCgwBCyEKDAELQQFBfyAeIAlVGyEECyAEQX9KDQALIAMgJTcDSCAHICY3AwAgBSAjNwMAIAMgIjcDMCADIB03AyggAyAbNwMgIAMgGTcDGCADIBY3AxAgAyATNwMIIAMgITcDAANAIB9BACAkICVCAYciDX0gDCAlQjeGQoCAgICAgIDAAIMgJkIBh4QiDn0gFSAmQjeGQoCAgICAgIDAAIMgI0IBh4QiD30gGCAjQjeGQoCAgICAgIDAAIMgIkIBh4QiEH0gFCAiQjeGQoCAgICAgIDAAIMgHUIBh4QiEX0gFyAdQjeGQoCAgICAgIDAAIMgG0IBh4QiEn0gGiAbQjeGQoCAgICAgIDAAIMgGUIBh4QiC30gHCAZQjeGQoCAgICAgIDAAIMgFkIBh4QiCn0gICAWQjeGQoCAgICAgIDAAIMgE0IBh4QiCX0gHyATQjeGQoCAgICAgIDAAIMgIUIBh4QiIX0iJkI4h3wiJUI4h3wiI0I4h3wiIkI4h3wiHUI4h3wiG0I4h3wiGUI4h3wiFkI4h3wiE0I4h3wiHkI/iKdBAXNrrCInIB8gJkL//////////wCDhYOFIR8gICAnICAgJUL//////////wCDhYOFISAgHCAnIBwgI0L//////////wCDhYOFIRwgGiAnIBogIkL//////////wCDhYOFIRogFyAnIBcgHUL//////////wCDhYOFIRcgFCAnIBQgG0L//////////wCDhYOFIRQgGCAnIBggGUL//////////wCDhYOFIRggFSAnIBUgFkL//////////wCDhYOFIRUgDCAnIAwgE0L//////////wCDhYOFIQwgJCAnIB4gJIWDhSEkIAJBf2ohBCACQQFKBEAgBCECIAkhEyAKIRYgCyEZIBIhGyARIR0gECEiIA8hIyAOISYgDSElDAELCyADICE3AwAgAyAJNwMIIAMgCjcDECADIAs3AxggAyASNwMgIAMgETcDKCADIBA3AzAgBSAPNwMAIAcgDjcDACADIA03A0ggASAfNwMAIAEgIDcDCCABIBw3AxAgASAaNwMYIAEgFzcDICABIBQ3AyggASAYNwMwIAEgFTcDOCAGIAw3AwAgASAkNwNIIAAgHzcDACAAIAEpAwg3AwggACABKQMQNwMQIAAgASkDGDcDGCAAIAEpAyA3AyAgAyQDC2sBAn4gACkDICICIAEpAyAiA1EEQCABKQMYIgMgACkDGCICUQRAIAApAxAiAiABKQMQIgNRBEAgACkDCCICIAEpAwgiA1EEQCAAKQMAIgIgASkDACIDUQRAQQAPCwsLCwtBAUF/IAIgA1UbC7cDAQh+IAKsIgNC/////wCDIQQgACADQhyHIgMgASkDACIFQv////8AgyIGfiAEIAVCHIciBX58IgdCHIZCgICAgP////8AgyAEIAZ+fCIGQv//////////AIM3AwAgACABKQMIIghC/////wCDIgkgA34gCEIchyIIIAR+fCIKQhyGQoCAgID/////AIMgAyAFfiAHQhyHfCAGQjiIfCAEIAl+fHwiBUL//////////wCDNwMIIAAgASkDECIGQv////8AgyIHIAN+IAQgBkIchyIGfnwiCUIchkKAgICA/////wCDIAMgCH4gCkIch3wgBUI4h3wgBCAHfnx8IgVC//////////8AgzcDECAAIAMgASkDGCIHQv////8AgyIIfiAEIAdCHIciB358IgpCHIZCgICAgP////8AgyADIAZ+IAlCHId8IAVCOId8IAQgCH58fCIFQv//////////AIM3AxggACADIAEpAyAiBkL/////AIMiCH4gBCAGQhyHfnxCHIZCgICAgP////8AgyADIAd+IApCHId8IAVCOId8IAQgCH58fEL//////////wCDNwMgC1IAIAAgASkDACACKQMAfTcDACAAIAEpAwggAikDCH03AwggACABKQMQIAIpAxB9NwMQIAAgASkDGCACKQMYfTcDGCAAIAEpAyAgAikDIH03AyALBABBAAtLACAAQgA3AwAgAEIANwMIIABCADcDECAAQgA3AxggAEIANwMgIABCADcDKCAAQgA3AzAgAEIANwM4IABBQGtCADcDACAAQgA3A0gLaAAgACABKQMANwMAIAAgASkDCDcDCCAAIAEpAxA3AxAgACABKQMYNwMYIAAgASkDIEL//////////wCDNwMgIAAgASkDIEI4hzcDKCAAQgA3AzAgAEIANwM4IABCADcDQCAAQgA3A0gLmgEBA34gACAAKQMgIAGtIgOGIAApAxgiAkE4IAFrrSIEh4Q3AyAgACACIAOGQv//////////AIMgACkDECICIASHhDcDGCAAIAIgA4ZC//////////8AgyAAKQMIIgIgBIeENwMQIAAgAiADhkL//////////wCDIAApAwAiAiAEh4Q3AwggACACIAOGQv//////////AIM3AwALBABBAQvIBQEJfyMDIQcjA0HQAmokAyAHQbgCaiIMQQA2AgAgDEEgNgIEIAwgB0HQAWo2AgggB0GsAmoiCEEANgIAIAhB4QA2AgQgCCAHQeAAajYCCCAHQaACaiIJQQA2AgAgCUEgNgIEIAkgB0FAazYCCCAHQZQCaiIKQQA2AgAgCkEQNgIEIAogB0EwajYCCCAHQYgCaiILQQA2AgAgC0EQNgIEIAsgB0EgajYCCCAHQfwBaiINQQA2AgAgDUEINgIEIA0gB0HIAmo2AgggB0HwAWoiDkEANgIAIA5BIDYCBCAOIAc2AgggBSACIAwQxQEEQCAHJANBAA8LIAggAhCOASAIIAwQVCAIIABBICAJEI0BIAtBEDYCACAKQRA2AgAgByAJKAIIIgAsAAA6ADAgByAALAAQOgAgIAcgACwAAToAMSAHIAAsABE6ACEgByAALAACOgAyIAcgACwAEjoAIiAHIAAsAAM6ADMgByAALAATOgAjIAcgACwABDoANCAHIAAsABQ6ACQgByAALAAFOgA1IAcgACwAFToAJSAHIAAsAAY6ADYgByAALAAWOgAmIAcgACwABzoANyAHIAAsABc6ACcgByAALAAIOgA4IAcgACwAGDoAKCAHIAAsAAk6ADkgByAALAAZOgApIAcgACwACjoAOiAHIAAsABo6ACogByAALAALOgA7IAcgACwAGzoAKyAKKAIIIgIgACwADDoADCALKAIIIgUgACwAHDoADCACIAkoAggiACwADToADSAFIAAsAB06AA0gAiAALAAOOgAOIAUgACwAHjoADiACIAAsAA86AA8gBSAALAAfOgAPIAogAyAGELIBRQRAIAckA0EADwsgDSABKAIAELcBIAMoAgAhACADIAEQVCADIA0QVCADIAsgBCgCACAOELQBIAMgADYCACAEIA4QggJBAEchDyAHJAMgDwuzBQEIfyMDIQgjA0HQAmokAyAIQbgCaiINQQA2AgAgDUEgNgIEIA0gCEHQAWo2AgggCEGsAmoiCUEANgIAIAlB4QA2AgQgCSAIQeAAajYCCCAIQaACaiIKQQA2AgAgCkEgNgIEIAogCEFAazYCCCAIQZQCaiILQQA2AgAgC0EQNgIEIAsgCEEwajYCCCAIQYgCaiIMQQA2AgAgDEEQNgIEIAwgCEEgajYCCCAIQfwBaiIOQQA2AgAgDkEINgIEIA4gCEHIAmo2AgggCEHwAWoiD0EANgIAIA9BIDYCBCAPIAg2AgggAiAPIAUQmAIgDyADIA0QxQEEQCAIJAMPCyAJIAUQjgEgCSANEFQgCSAAQSAgChCNASAMQRA2AgAgC0EQNgIAIAggCigCCCIALAAAOgAwIAggACwAEDoAICAIIAAsAAE6ADEgCCAALAAROgAhIAggACwAAjoAMiAIIAAsABI6ACIgCCAALAADOgAzIAggACwAEzoAIyAIIAAsAAQ6ADQgCCAALAAUOgAkIAggACwABToANSAIIAAsABU6ACUgCCAALAAGOgA2IAggACwAFjoAJiAIIAAsAAc6ADcgCCAALAAXOgAnIAggACwACDoAOCAIIAAsABg6ACggCCAALAAJOgA5IAggACwAGToAKSAIIAAsAAo6ADogCCAALAAaOgAqIAggACwACzoAOyAIIAAsABs6ACsgCygCCCICIAAsAAw6AAwgDCgCCCIDIAAsABw6AAwgAiAKKAIIIgAsAA06AA0gAyAALAAdOgANIAIgACwADjoADiADIAAsAB46AA4gAiAALAAPOgAPIAMgACwAHzoADyALIAQgBhCzASAOIAEoAgAQtwEgBigCACEAIAYgARBUIAYgDhBUIAYgDEEQIAcQtAEgBiAANgIAIAgkAwutAQEEfyMDIQMjA0HQAmokAyADQTBqIQQgA0G4AWoiBhCHAiADQZABaiIFQfAOEBIgAARAIAQgBSAAEIsCIAFBCGohAAUgBCABQQhqIgAoAgAQeSAEIAUQKQsgBiAEEL0BIANB4ABqIgUgAyAGEL8BIAFBIDYCACAAKAIAIAQQeiACQcEANgIAIAIoAghBBDoAACACKAIIQQFqIAUQeiACKAIIQSFqIAMQeiADJAML6QMBBX8jAyEGIwNBwAFqJAMgACABIAJBH3ZBf2ogAiACQR91IgdzakECbSIEQX9qQR92IgMQGyAAQUBrIgIgAUFAayADEBsgAEGAAWoiBSABQYABaiADEBsgACABQcABaiAEQQFzQX9qQR92IgMQGyACIAFBgAJqIAMQGyAFIAFBwAJqIAMQGyAAIAFBgANqIARBAnNBf2pBH3YiAxAbIAIgAUHAA2ogAxAbIAUgAUGABGogAxAbIAAgAUHABGogBEEDc0F/akEfdiIDEBsgAiABQYAFaiADEBsgBSABQcAFaiADEBsgACABQYAGaiAEQQRzQX9qQR92IgMQGyACIAFBwAZqIAMQGyAFIAFBgAdqIAMQGyAAIAFBwAdqIARBBXNBf2pBH3YiAxAbIAIgAUGACGogAxAbIAUgAUHACGogAxAbIAAgAUGACWogBEEGc0F/akEfdiIDEBsgAiABQcAJaiADEBsgBSABQYAKaiADEBsgACABQcAKaiAEQQdzQX9qQR92IgQQGyACIAFBgAtqIAQQGyAFIAFBwAtqIAQQGyAGIAAQESAGQUBrIgEgAhARIAZBgAFqIgQgBRARIAEgARAwIAEQCiAAIAYgB0EBcSIAEBsgAiABIAAQGyAFIAQgABAbIAYkAwtlAQF/IwMhAiMDQUBrJAMgAiABEEUgAiACIAEQE0GAOygCAEF9RgRAIAAgARAwIAAQCiAAIABBAxA/IAAQCiAAIAIgABAMBSAAIAIQEQsgAkGACBBGIAAgAiAAEAwgABArIAIkAwuyBwIKfwJ+IwMhBSMDQeALaiQDIAVBwAhqIQggARAKIAIQCiAFIAIQCyAFEGkiCUEDakEEbSEKIAlBek4EQANAIAYgCGogBUEEEGciAjoAACAFIAJBGHRBGHUQfSAFEAogBUEEECwgBkEBaiECIAYgCkgEQCACIQYMAQsLCyAFQbAJaiIGEM4BIAVB8AlqIgJBgA0QCyAFQbAKaiIEIAYgAhAxIAVBoAtqIgNBwAwQCyAFQUBrIgcgA0GANCkDACINIAQQIyAHQQI2AjggB0FAayABEAsgByABKAI4Igs2AnhBAiEGIAusIQ4DQCAGQX9qIgxBBnQgB2ohAiALrCAOfkKAgIAQVQRAIANBwAwQCyACIAMQHiAMQQZ0IAdqQQE2AjgLIAQgAiABEDEgA0HADBALIAZBBnQgB2ogAyANIAQQIyAGQQZ0IAdqQQI2AjggBkEBaiICQRBHBEAgAiEGIAEoAjghC0ICIQ4MAQsLIAAgCCAKaiwAACIBQQZ0IAdqEAsgACABQQZ0IAdqKAI4IgE2AjgCQCAJQQBMDQAgAawiDiAOfkKAgIAQVgRAIANBwAwQCyAAIAMQHiAAQQE2AjgLIAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IAQgABBHIANBwAwQCyAAIAMgDSAEECMgAEECNgI4IApBf2oiASAIaiwAACICQQZ0IAdqKAI4QYCAgAhKBEAgA0HADBALIAAgAxAeIABBATYCOAsgBCAAIAJBBnQgB2oQMSADQcAMEAsgACADIA0gBBAjIABBAjYCOCAJQQRMDQADQCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCAEIAAQRyADQcAMEAsgACADIA0gBBAjIABBAjYCOCABQX9qIgIgCGosAAAiBkEGdCAHaigCOEGAgIAISgRAIANBwAwQCyAAIAMQHiAAQQE2AjgLIAQgACAGQQZ0IAdqEDEgA0HADBALIAAgAyANIAQQIyAAQQI2AjggAUEBSgRAIAIhAQwBCwsgA0HADBALIAAgAxAeIABBATYCOCAFJAMPCyADQcAMEAsgACADEB4gAEEBNgI4IAUkAwvMAQEDfyMDIQQjA0HQBGokAyAEQTBqIgZBwAgQCyAEQbQEaiIFIAE2AgAgBSABNgIEIAUgADYCCCAEQagEaiIAQQA2AgAgAEEwNgIEIAAgBDYCCCAFQQBBMCAAEI0BIARB8ABqIgAgBBAfIAAgBhAeIARBqAFqIgEQgwEgASAAEG4gAgRAIAIgABAgCyADRQRAIAQkA0EADwsgA0EEOgAAIARBwARqIgBBwAE2AgAgAEHAATYCBCAAIANBAWo2AgggACABEIQBIAQkA0EAC4IBAQN/IwMhCiMDQYATaiQDIApBQGsiC0HABDYCACALQcAENgIEIAsgAjYCCCAKQfgMaiICIAsQhgEgCyABEB8gCiALIABBgAFqEHwgCkH4BmoiASACIAoQSCAKQfgAaiICIAEQbyAAIAIgBiAHIAMgBCAIIAkgBRCJASEMIAokAyAMC68DAhB/B34gAEIANwMAIABCADcDCCAAQgA3AxAgAEIANwMYIABCADcDICAAQgA3AyggAEIANwMwIABBIGohBCAAQRhqIQUgAEEQaiEGIABBCGohByAAQSBqIQwgAEEYaiENIABBEGohDiAAQQhqIQ8DQAJ/IAMEfyACQQF1IQIgDiEJIA8hCiAMIQsgDQUgARB1IQIgBiEJIAchCiAEIQsgACkDKCEXIAQpAwAhFiAFKQMAIRUgBikDACEUIAcpAwAhEyAAKQMAIRIgACkDMCEYIAULIREgACAYQgGGIBdCOYeEIhg3AzAgACAXQgGGQv7/////////A4MgFkI5h4QiFzcDKCALIBZCAYZC/v////////8DgyAVQjmHhCIWNwMAIBELIBVCAYZC/v////////8DgyAUQjmHhCIVNwMAIAkgFEIBhkL+/////////wODIBNCOYeEIhQ3AwAgCiATQgGGQv7/////////A4MgEkI5h4QiEzcDACAAIAJBAXGtIBJCAYZC/v////////8Dg4QiEjcDACADQQFqQQdxIQMgCEEBaiIIQYADRw0ACwuUGwIIfyt+IwMhAyMDQfAAaiQDIAEgASkDACILQv//////////A4MiMjcDACABIAEpAwggC0I6h3wiC0L//////////wODIjE3AwggASABKQMQIAtCOod8IgtC//////////8DgyItNwMQIAEgASkDGCALQjqHfCILQv//////////A4MiJzcDGCABIAEpAyAgC0I6h3wiC0L//////////wODIiU3AyAgASABKQMoIAtCOod8IgtC//////////8DgyIjNwMoIAEgASkDMCALQjqHfCILQv//////////A4MiIjcDMCABIAEpAzggC0I6h3wiC0L//////////wODIh03AzggAUFAayIJKQMAIAtCOod8IgtC//////////8DgyEeIAkgHjcDACABIAEpA0ggC0I6h3wiDEL//////////wODIh83A0ggASABKQNQIAxCOod8Ig5C//////////8DgyIaNwNQIAEgASkDWCAOQjqHfCIOQv//////////A4MiFTcDWCABIAEpA2AgDkI6h3wiDkL//////////wODIjM3A2AgASABKQNoIA5COod8Ii43A2ggAyACKQMAIio3AwAgAyACKQMIIhE3AwggAyACKQMQIg43AxAgAyACKQMYIg83AxggAyACKQMgIhI3AyAgAyACKQMoIhM3AyggAyACKQMwIhBC//////////8DgyIUNwMwIAMgEEI6hyIQNwM4IANBQGsiBEIANwMAIARCADcDCCAEQgA3AxAgBEIANwMYIARCADcDICAEQgA3AygCQAJAAkAgLkIAUQRAIDNCAFINAiADQeAAaiEFIBVCAFINAiADQdgAaiEGIBpCAFINAiADQdAAaiEHIAsgDIRC//////////8Dg0IAUg0CIANByABqIQggECAdUQRAIBQgIlEEQCATICNRBEAgEiAlUQRAIA8gJ1EEQCAOIC1RBEAgESAxUQRAICogMlIEQCAqIQwgMiELDAkLBSARIQwgMSELDAgLBSAOIQwgLSELDAcLBSAPIQwgJyELDAYLBSASIQwgJSELDAULBSATIQwgIyELDAQLBSAUIQwgIiELDAMLBSAQIQwgHSELDAILBUIAIQwgLiELDAELDAILIAsgDFUNACAAIDI3AwAgACABKQMINwMIIAAgASkDEDcDECAAIAEpAxg3AxggACABKQMgNwMgIAAgASkDKDcDKCAAIAEpAzA3AzAgAyQDDwsgA0HYAGohBiADQdAAaiEHIANByABqIQggA0HgAGohBQtBACECQgAhCyARIQwDQAJAIAtCAYZC/v////////8DgyAWQjmHhCEwIBZCAYZC/v////////8DgyAXQjmHhCEsIBdCAYZC/v////////8DgyAYQjmHhCErIBhCAYZC/v////////8DgyANQjmHhCEpIA1CAYZC/v////////8DgyAQQjmHhCEoIBBCAYZC/v////////8DgyAUQjmHhCEmIBRCAYZC/v////////8DgyATQjmHhCEkIBNCAYZC/v////////8DgyASQjmHhCEgIBJCAYZC/v////////8DgyAPQjmHhCEcIA9CAYZC/v////////8DgyAOQjmHhCEbIA5CAYZC/v////////8DgyAMQjmHhCEZIAxCAYZC/v////////8DgyAqQjmHhCENICpCAYZC/v////////8DgyEqIAJBAWohAgJAAkAgL0IBhiALQjmHhCIvIC5RBH4gMCAzUQR+IBUgLFEEfiAaICtRBH4gHyApUQR+IB4gKFEEfiAdICZRBH4gIiAkUQR+ICAgI1EEfiAcICVRBH4gGyAnUQR+IBkgLVEEfiANIDFRBH4gKiAyUQR+IC0hDiAnIQ8gJSESICMhEyAiIRQgHSEQIB4hESAfIRggGiEXIBUhFiAxBSAqIQsgMiEhIDEhDCAtIQ4gJyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMDgsFIDEhISANIgshDCAtIQ4gJyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMDQsFIC0hISANIQwgGSILIQ4gJyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMDAsFICchISANIQwgGSEOIBsiCyEPICUhEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMCwsFICUhISANIQwgGSEOIBshDyAcIgshEiAjIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMCgsFICMhISANIQwgGSEOIBshDyAcIRIgICILIRMgIiEUIB0hECAeIREgHyEYIBohFyAVIRYMCQsFICIhISANIQwgGSEOIBshDyAcIRIgICETICQiCyEUIB0hECAeIREgHyEYIBohFyAVIRYMCAsFIB0hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIgshECAeIREgHyEYIBohFyAVIRYMBwsFIB4hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCILIREgHyEYIBohFyAVIRYMBgsFIB8hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkiCyEYIBohFyAVIRYMBQsFIBohISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkhGCArIgshFyAVIRYMBAsFIBUhISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkhGCArIRcgLCILIRYMAwsFIDAhCyAzISEgDSEMIBkhDiAbIQ8gHCESICAhEyAkIRQgJiEQICghESApIRggKyEXICwhFgwCCwUgLyELIC4hISANIQwgGSEOIBshDyAcIRIgICETICQhFCAmIRAgKCERICkhGCArIRcgLCEWDAELIQwMAQsgISALVw0BCyAwIQsgESENDAELCyADIC83A2ggBSAwNwMAIAYgLDcDACAHICs3AwAgCCApNwMAIAQgKDcDACADICY3AzggAyAkNwMwIAMgIDcDKCADIBw3AyAgAyAbNwMYIAMgGTcDECADIA03AwggAyAqNwMAIAEpAwAhDCABKQMIIQ4gASkDECEPIDMhCwNAIAxBACAuIC9CAYciEn0gCyAvQjmGQoCAgICAgICAAoMgMEIBh4QiE30gFSAwQjmGQoCAgICAgICAAoMgLEIBh4QiFH0gGiAsQjmGQoCAgICAgICAAoMgK0IBh4QiEH0gHyArQjmGQoCAgICAgICAAoMgKUIBh4QiEX0gHiApQjmGQoCAgICAgICAAoMgKEIBh4QiGH0gHSAoQjmGQoCAgICAgICAAoMgJkIBh4QiF30gIiAmQjmGQoCAgICAgICAAoMgJEIBh4QiFn0gIyAkQjmGQoCAgICAgICAAoMgIEIBh4QiIX0gJSAgQjmGQoCAgICAgICAAoMgHEIBh4QiIH0gJyAcQjmGQoCAgICAgICAAoMgG0IBh4QiHH0gDyAbQjmGQoCAgICAgICAAoMgGUIBh4QiG30gDiAZQjmGQoCAgICAgICAAoMgDUIBh4QiGX0gDCANQjmGQoCAgICAgICAAoMgKkIBh4QiKn0iJEI6h3wiJkI6h3wiKEI6h3wiKUI6h3wiK0I6h3wiLUI6h3wiLEI6h3wiMUI6h3wiMEI6h3wiL0I6h3wiMkI6h3wiM0I6h3wiNEI6h3wiNUI/iKdBAXNrrCINIAwgJEL//////////wODhYOFIQwgDiANIA4gJkL//////////wODhYOFIQ4gDyANIA8gKEL//////////wODhYOFIQ8gJyANICcgKUL//////////wODhYOFIScgJSANICUgK0L//////////wODhYOFISUgIyANICMgLUL//////////wODhYOFISMgIiANICIgLEL//////////wODhYOFISIgHSANIB0gMUL//////////wODhYOFIR0gHiANIB4gMEL//////////wODhYOFIR4gHyANIB8gL0L//////////wODhYOFIR8gGiANIBogMkL//////////wODhYOFIRogFSANIBUgM0L//////////wODhYOFIRUgCyANIAsgNEL//////////wODhYOFIQsgLiANIC4gNYWDhSEuIAJBf2ohCiACQQFKBEAgCiECIBkhDSAbIRkgHCEbICAhHCAhISAgFiEkIBchJiAYISggESEpIBAhKyAUISwgEyEwIBIhLwwBCwsgAyAqNwMAIAMgGTcDCCADIBs3AxAgAyAcNwMYIAMgIDcDICADICE3AyggAyAWNwMwIAMgFzcDOCAEIBg3AwAgCCARNwMAIAcgEDcDACAGIBQ3AwAgBSATNwMAIAMgEjcDaCABIAw3AwAgASAONwMIIAEgDzcDECABICc3AxggASAlNwMgIAEgIzcDKCABICI3AzAgASAdNwM4IAkgHjcDACABIB83A0ggASAaNwNQIAEgFTcDWCABIAs3A2AgASAuNwNoIAAgDDcDACAAIAEpAwg3AwggACABKQMQNwMQIAAgASkDGDcDGCAAIAEpAyA3AyAgACABKQMoNwMoIAAgASkDMDcDMCADJAMLjwEBAn4gACkDMCICIAEpAzAiA1EEQCABKQMoIgMgACkDKCICUQRAIAApAyAiAiABKQMgIgNRBEAgACkDGCICIAEpAxgiA1EEQCAAKQMQIgIgASkDECIDUQRAIAApAwgiAiABKQMIIgNRBEAgACkDACICIAEpAwAiA1EEQEEADwsLCwsLCwtBAUF/IAIgA1UbC3IAIAAgASkDACACKQMAfTcDACAAIAEpAwggAikDCH03AwggACABKQMQIAIpAxB9NwMQIAAgASkDGCACKQMYfTcDGCAAIAEpAyAgAikDIH03AyAgACABKQMoIAIpAyh9NwMoIAAgASkDMCACKQMwfTcDMAuRAgEJfyMDIQgjA0GAE2okA0HgBEGBASAARSIPGyIJIAVKBEAgCCQDQX4PCyAHIAQoABwQigEiBzYCACAJIAdBtARtIgAgByAAQbQEbGtBAEdqQcAEbCIKaiAFSgRAIAgkA0F+DwsgCEFAayEAIAhB+AxqIQUgCEH4BmohCyAIQfgAaiEMIARBIGohDSAEQQxqIQ4gBCAJaiEJIA8EfyAAQcAENgIAIABBwAQ2AgQgACANNgIIIAUgABCGASAAIAIQHyAIIAAgAUGAAWoQfCALIAUgCBBIIAwgCxBvIAEgDCAJIAogAyAEIAYgByAOEIkBBSABIAIgDSADIAQgDiAJIAogBiAHEMsBCyEQIAgkAyAQC3wAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAIAEpAwA3AzggAEFAayABKQMINwMAIAAgASkDEDcDSCAAIAEpAxg3A1AgACABKQMgNwNYIAAgASkDKDcDYCAAIAEpAzA3A2gLoQIBB38jAyEHIwNB4ABqJAMgBiACSARAQbQ5QcoAQbQ1KAIAEGAgByQDQX8PCyAHQcgAaiIKQgA3AgAgCkEANgIIIAdBPGoiC0IANwIAIAtBADYCCCAHQTBqIghBwQA2AgAgCEHBADYCBCAIIAA2AgggB0EkaiIJQRA2AgAgCUEQNgIEIAkgAzYCCCAHQRhqIgNBIDYCACADQSA2AgQgAyAENgIIIAdBDGoiAEEANgIAIAAgBjYCBCAAIAU2AgggAkEIaiIFEFwiBCABIAIQUxogByACNgIAIAcgBTYCBCAHIAQ2AggCfyAKIAsgCCAHIAkgAyAAEJYCIQwgBBBLIAwLBH8gACgCAAVB/zlBPkG0NSgCABBgQX8LIQ0gByQDIA0LYQEDfyMDIQMjA0GAAmokAyADQYABaiICIAEQPCADIAFBgAFqIgQQPCADEDkgAxANIAIgAiADEDogAiACEJsBIAAgAiABEBggAiACEC0gAhANIABBgAFqIAIgBBAYIAMkAwt9AQJ/IwMhACMDQTBqJAMgAEEYaiIGQRA2AgAgBkEQNgIEIAYgATYCCCAAQQxqIgEgAzYCACABIAM2AgQgASACNgIIIAAgAzYCACAAIAM2AgQgACAENgIIAn8gBiABIAAQsgEhByAFIAAoAgA2AgAgACQDIAcLRUEfdEEfdQsL7ywpAEGACAsBBABBwAgLIwEAAAD///8Dv/+W/78AaQM7VYAdmoCAAefMIPV1pkwBp+1zAEGACQs1u8Yi2wrwOgP+u4Ze/g96AcWGxbpx8aMDOIUW5NJdPgGMaMMPrKlPAONYpQnl9WUAczodfwEAQcAJCzTh58VGKSOqAAO5IqIo0TEDA90+S8CyjAFsA9grQFdXAuD1/OSKHXQBO4wnaDyo6gAeSD+LAEGCCgsHAQAAAAECNABBwAoLNLi9IcHIVoAA9ftuAarJAAO6cBc9rke2AETRCuwA6VMDeuTGURDFLQNJAYJJpMIjAC8rqiQAQYALCzV+KwRdBX2sAflVF+WERDwDNJME9ce9GwJp12rYgmRCA9BrWWVPJ4gA6DRrH9hnnAAFtgI+AQBBwAsLNAEouAiGVJMBeKIo6w5zsgIjyRINFpWmAQq1nU73MqoCm/2tGjUu2gJxczJjhFufAHdSXc4AQYAMCzS+eV/wXwepAmpoBzvXScMB87Oa6XK1KgHSmbyOnRb6ASg+y5mLwisArDSrDDPNqQMCSmxgAEHADAs1q6r//////gHu//9UrP//AupBYg9rDyoBw5z9ShTOEwJLd2TXrEtDAu3pxpKm+V8Cox4RoAEAQYANCzWu977VoTkGAuiT3WJkTCQB0ixuTrUJLQLb5XAxtsQRAZljNvvobYoDvJwf7c8WTwAraqaeAQBBwA0LNbhfI5LtdQcBY0/g+VhPqQNnT5yrS3g9AJHsPX318vQDA9YPHw0sIACtb4zwmcGuAPA7TZABAEGADgs080rcbRKK9wCLsB9bU7BWA4LyxWMfl+wAMrC/zR7bHgJHoVS4nx8jAkB6OqIMOLEBs+LDDwBBwA4LAQcAQfAOCyRBQTbQjF7SAL87oEiv5twArrr+/////wD/////////AP////8AQaAPCySYF/gWW4HyAFnZKM4t2/wAmwIHC4fOlQBioFWsu9z5AH5mvnkAQdAPCyS41BD7j9BHAJwZVIWmSLQAF/2oCBEO/AD7pF1lxKMmAHfaOkgAQYAQCyQv/P///v//AP////////8A/////////wD/////////AP////8AQbYQCwuhAJAOAKIHAAAAAQBB4BAL2B+YL4pCkUQ3cc/7wLWl27XpW8JWOfER8Vmkgj+S1V4cq5iqB9gBW4MSvoUxJMN9DFV0Xb5y/rHegKcG3Jt08ZvBwWmb5IZHvu/GncEPzKEMJG8s6S2qhHRK3KmwXNqI+XZSUT6YbcYxqMgnA7DHf1m/8wvgxkeRp9VRY8oGZykpFIUKtyc4IRsu/G0sTRMNOFNUcwpluwpqdi7JwoGFLHKSoei/oktmGqhwi0vCo1FsxxnoktEkBpnWhTUO9HCgahAWwaQZCGw3Hkx3SCe1vLA0swwcOUqq2E5Pypxb828uaO6Cj3RvY6V4FHjIhAgCx4z6/76Q62xQpPej+b7yeHHGIq4o15gvikLNZe8jkUQ3cS87TezP+8C1vNuJgaXbtek4tUjzW8JWORnQBbbxEfFZm08Zr6SCP5IYgW3a1V4cq0ICA6OYqgfYvm9wRQFbgxKMsuROvoUxJOK0/9XDfQxVb4l78nRdvnKxlhY7/rHegDUSxyWnBtyblCZpz3Txm8HSSvGewWmb5OMlTziGR77vtdWMi8adwQ9lnKx3zKEMJHUCK1lvLOktg+SmbqqEdErU+0G93KmwXLVTEYPaiPl2q99m7lJRPpgQMrQtbcYxqD8h+5jIJwOw5A7vvsd/Wb/Cj6g98wvgxiWnCpNHkafVb4ID4FFjygZwbg4KZykpFPwv0kaFCrcnJskmXDghGy7tKsRa/G0sTd+zlZ0TDThT3mOvi1RzCmWosnc8uwpqduau7UcuycKBOzWCFIUscpJkA/FMoei/ogEwQrxLZhqokZf40HCLS8IwvlQGo1FsxxhS79YZ6JLREKllVSQGmdYqIHFXhTUO9LjRuzJwoGoQyNDSuBbBpBlTq0FRCGw3Hpnrjt9Md0gnqEib4bW8sDRjWsnFswwcOcuKQeNKqthOc+Njd0/KnFujuLLW828uaPyy713ugo90YC8XQ29jpXhyq/ChFHjIhOw5ZBoIAseMKB5jI/r/vpDpvYLe62xQpBV5xrL3o/m+K1Ny4/J4ccacYSbqzj4nygfCwCHHuIbRHuvgzdZ92up40W7uf0999bpvF3KqZ/AGppjIosV9YwquDfm+BJg/ERtHHBM1C3EbhH0EI/V32yiTJMdAe6vKMry+yRUKvp48TA0QnMRnHUO2Qj7LvtTFTCp+ZfycKX9Z7PrWOqtvy18XWEdKjBlEbGN8d3vya2/FMAFnK/7Xq3bKgsl9+llH8K3Uoq+cpHLAt/2TJjY/98w0peXxcdgxFQTHI8MYlgWaBxKA4usnsnUJgywaG25aoFI71rMp4y+EU9EA7SD8sVtqy745SkxYz9DvqvtDTTOFRfkCf1A8n6hRo0CPkp049by22iEQ//PSzQwT7F+XRBfEp349ZF0Zc2CBT9wiKpCIRu64FN5eC9vgMjoKSQYkXMLTrGKRleR558g3bY3VTqlsVvTqZXquCLp4JS4cprTG6N10H0u9i4pwPrVmSAP2DmE1V7mGwR2e4fiYEWnZjpSbHofpzlUo34yhiQ2/5kJoQZktD7BUuxYBAAAAAgAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAABsAAAA2AAAAbAAAANgAAACrAAAATQAAAJoAAAAvAAAAAP8ZATICGsZLxxtoM+7fA2QE4A40jYHvTHEIyPhpHMF9wh21+bknak3kpnKayQl4ZS+KBSEP4SQS8IJFNZPajpaP27020M6UE1zS8UBGgzhm3f0wvwaLYrMl4pgiiJEQfm5Iw6O2HkI6ayhU+oU9uit5ChWbn17KTtSs5fNzp1evWKhQ9OrWdE+u6dXn5q3oLNd1eusWC/VZy1+wnKlRoH8M9m8XxEns2EMfLaR2e7fMuz5a+2CxhjtSoWyqVSmdl7KHkGG+3Py8lc/NNz9b0VM5hDxBom1HFCqeXVby06tEEZLZIyAuibR8uCZ3meOlZ0rt3sUx/hgNY4yAwPdwBwEDBQ8RM1X/Gi5ylqH4EzVf4ThI2HOVpPcCBgoeImaq5TRc5DdZ6yZqvtlwkKvmMVP1BAwUPETMT9FouNNuss1M1Gep4DtN12Km8QgYKHiIg5650Gu93H+BmLPOSdt2mrXEV/kQMFDwCx0nabvWYaP+GSt9h5Kt7C9xk67pIGCg+xY6TtJtt8Jd5zJW+hU/QcNe4j1HyUDAW+0sdJy/2nWfutVkrO8qfoKdvN96jomAm7bBWOgjZa/qJW+xyEPFVPwfIWOl9AcJGy13mbDLRspFz0reeYuGkajjPkLGUfMOEjZa7il7jYyPioWUp/INFzlL3XyEl6L9HCRstMdS9gHGY2Ol+Hx8hO53d5n2e3uN//LyDdZra73eb2+xkcXFVGAwMFACAQEDzmdnqVYrK33n/v4ZtdfXYk2rq+bsdnaaj8rKRR+Cgp2JyclA+n19h+/6+hWyWVnrjkdHyfvw8AtBra3ss9TUZ1+iov1Fr6/qI5ycv1OkpPfkcnKWm8DAW3W3t8Lh/f0cPZOTrkwmJmpsNjZafj8/QfX39wKDzMxPaDQ0XFGlpfTR5eU0+fHxCOJxcZOr2NhzYjExUyoVFT8IBAQMlcfHUkYjI2Wdw8NeMBgYKDeWlqEKBQUPL5qatQ4HBwkkEhI2G4CAm9/i4j3N6+smTicnaX+yss3qdXWfEgkJGx2Dg55YLCx0NBoaLjYbGy3cbm6ytFpa7lugoPukUlL2djs7TbfW1mF9s7POUikpe93j4z5eLy9xE4SEl6ZTU/W50dFoAAAAAMHt7SxAICBg4/z8H3mxsci2W1vt1Gpqvo3Ly0Znvr7Zcjk5S5RKSt6YTEzUsFhY6IXPz0q70NBrxe/vKk+qquXt+/sWhkNDxZpNTddmMzNVEYWFlIpFRc/p+fkQBAICBv5/f4GgUFDweDw8RCWfn7pLqKjjolFR812jo/6AQEDABY+Pij+Skq0hnZ28cDg4SPH19QRjvLzfd7a2wa/a2nVCISFjIBAQMOX//xr98/MOv9LSbYHNzUwYDAwUJhMTNcPs7C++X1/hNZeXoohERMwuFxc5k8TEV1Wnp/L8fn6Cej09R8hkZKy6XV3nMhkZK+Zzc5XAYGCgGYGBmJ5PT9Gj3Nx/RCIiZlQqKn47kJCrC4iIg4xGRsrH7u4pa7i40ygUFDyn3t55vF5e4hYLCx2t29t22+DgO2QyMlZ0OjpOFAoKHpJJSdsMBgYKSCQkbLhcXOSfwsJdvdPTbkOsrO/EYmKmOZGRqDGVlaTT5OQ38nl5i9Xn5zKLyMhDbjc3WdptbbcBjY2MsdXVZJxOTtJJqang2GxstKxWVvrz9PQHz+rqJcplZa/0enqOR66u6RAICBhvurrV8Hh4iEolJW9cLi5yOBwcJFempvFztLTHl8bGUcvo6COh3d186HR0nD4fHyGWS0vdYb293A2Li4YPioqF4HBwkHw+PkJxtbXEzGZmqpBISNgGAwMF9/b2ARwODhLCYWGjajU1X65XV/lpubnQF4aGkZnBwVg6HR0nJ56eudnh4Tjr+PgTK5iYsyIRETPSaWm7qdnZcAeOjokzlJSnLZubtjweHiIVh4eSyenpIIfOzkmqVVX/UCgoeKXf33oDjIyPWaGh+AmJiYAaDQ0XZb+/2tfm5jGEQkLG0GhouIJBQcMpmZmwWi0tdx4PDxF7sLDLqFRU/G27u9YsFhY6UfSnUH5BZVMaF6TDOideljura8sfnUXxrPpYq0vjA5MgMPpVrXZt9ojMdpH1AkwlT+XX/MUqy9cmNUSAtWKjj96xWkkluhtnReoOmF3+wOHDL3UCgUzwEo1Gl6Nr0/nGA49f5xWSnJW/bXrrlVJZ2tS+gy1YdCHTSeBpKY7JyER1wolq9I55eJlYPmsnuXHdvuFPtvCIrRfJIKxmfc46tGPfShjlGjGCl1EzYGJTf0WxZHfgu2uuhP6BoBz5CCuUcEhoWI9F/RmU3myHUnv4t6tz0yNySwLi4x+PV2ZVqyqy6ygHL7XCA4bFe5rTNwilMCiH8iO/pbICA2q67RaCXIrPHCunebSS8wfy8E5p4qFl2vTNBgW+1dE0Yh/Epv6KNC5TnaLzVaAFiuEypPbrdQuD7DlAYO+qXnGfBr1uEFE+IYr5lt0GPd0+Ba5N5r1GkVSNtXHEXQUEBtRvYFAV/xmY+yTWvemXiUBDzGfZnnew6EK9B4mLiOcZWzh5yO7boXwKR3xCD+n4hB7JAAAAAAmAhoMyK+1IHhFwrGxack79Dv/7D4U4Vj2u1R42LTknCg/ZZGhcpiGbW1TRJDYuOgwKZ7GTV+cPtO6W0hubkZ6AwMVPYdwgolp3S2kcEhoW4pO6CsCgKuU8IuBDEhsXHQ4JDQvyi8etLbaouRQeqchX8RmFr3UHTO6Z3bujf2D99wEmn1xy9bxEZjvFW/t+NItDKXbLI8bctu38aLjk8WPXMdzKQmOFEBOXIkCExhEghUokfdK7Pfiu+TIRxymhbR2eL0vcsjDzDYZS7HfB49ArsxZsqXC5mRGUSPpH6WQiqPyMxKDwPxpWfSzYIjOQ74dJTsfZONHBjMqi/pjUCzam9YHPpXreKNq3jiY/rb+kLDqd5FB4kg1qX8ybVH5GYvaNE8KQ2LjoLjn3XoLDr/WfXYC+adCTfG/VLanPJRKzyKyZOxAYfafonGNu2zu7e80meAluWRj07Jq3AYNPmqjmlW5lqv/mfiG8zwjvFejmuueb2UpvNs7qnwnUKbB81jGksq8qPyMxxqWUMDWiZsB0Trw3/ILKpuCQ0LAzp9gV8QSYSkHs2vd/zVAOF5H2L3ZN1o1D77BNzKpNVOSWBN+e0bXjTGqIG8EsH7hGZVF/nV7qBAGMNV36h3Rz+wtBLrNnHVqS29JS6RBWM23WRxOa12GMN6EMeln4FI7rEzyJzqkn7rdhyTXhHOXtekexPJzS31lV8nM/GBTOeXPHN79T983qX/2qW989bxR4RNuGyq/zgbloxD44JDQswqNAXxYdw3K84iUMKDxJi/8NlUE5qAFxCAyz3ti05JxkVsGQe8uEYdUytnBIbFx00LhXQlIJatUwNqU4v0CjnoHz1/t84zmCmy//hzSOQ0TE3unLVHuUMqbCIz3uTJULQvrDTgguoWYo2SSydluiSW2L0SVy+PZkhmiYFtSkXMxdZbaSbHBIUP3tudpeFUZXp42dhJDYqwCMvNMK9+RYBbizRQbQLB6Pyj8PAsGvvQMBE4prOpERQU9n3OqX8s/O8LTmc5asdCLnrTWF4vk36Bx1325H8RpxHSnFiW+3Yg6qGL4b/FY+S8bSeSCa28D+eM1a9B/dqDOIB8cxsRIQWSeA7F9gUX+pGbVKDS3lep+TyZzvoOA7Ta4q9bDI67s8g1OZYRcrBH66d9Ym4WkUY1UhDH0RAAoAERERAAAAAAUAAAAAAAAJAAAAAAsAQcAwCyERAA8KERERAwoHAAETCQsLAAAJBgsAAAsABhEAAAAREREAQfEwCwELAEH6MAsYEQAKChEREQAKAAACAAkLAAAACQALAAALAEGrMQsBDABBtzELFQwAAAAADAAAAAAJDAAAAAAADAAADABB5TELAQ4AQfExCxUNAAAABA0AAAAACQ4AAAAAAA4AAA4AQZ8yCwEQAEGrMgseDwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAEHiMgsOEgAAABISEgAAAAAAAAkAQZMzCwELAEGfMwsVCgAAAAAKAAAAAAkLAAAAAAALAAALAEHNMwsBDABB2TMLOAwAAAAADAAAAAAJDAAAAAAADAAADAAAMDEyMzQ1Njc4OUFCQ0RFRv3//P/8//MBMTUl0h0JOAAFAEGcNAsBAQBBtDQLCgEAAAABAAAAwR8AQcw0CwECAEHbNAsF//////8AQag1Cw64HwAABAAAAAcAAAAQGgBB9DYLApwfAEGsNwvHAyV1IGJ5dGVzIG91dCByZXF1aXJlZCwgbm90ICV1CgBwcm92aWRlZCBwcmltYXJ5IHB1YmxpYyBrZXkgYnl0ZXMgYXJlIGludmFsaWQKAGludmFsaWQgZm9ybWF0IGZvciBwcm92aWRlZCBwdWJsaWMga2V5CgBpbnZhbGlkIGVuY3J5cHRlZCBvdXRwdXQgYnVmZmVyIHNpemUgLSBwbGVhc2UgY2FsbCBDYWxjRW5jRUNJRVNCeXRlQ291bnQgZm9yIHNpemUuIGV4cGVjdGVkICV1LCBnb3QgJXUKAGVuY3J5cHRpb24gZmFpbGVkIHdpdGggdW5zcGVjaWZpZWQgZXJyb3IKAGlucHV0IGNsZWFyIGJ5dGUgYnVmZmVyIG11c3QgYmUgYXQgbGVhc3QgdGhlIHNhbWUgc2l6ZSBhcyBlbmNyeXB0ZWQgYnl0ZXMKAGRlY3J5cHRpb24gZmFpbGVkIHdpdGggdW5zcGVjaWZpZWQgZXJyb3IgLSBsaWtlbHkgdGFnIGZhaWx1cmUKAC0rICAgMFgweAAobnVsbCkALTBYKzBYIDBYLTB4KzB4IDB4AGluZgBJTkYAbmFuAE5BTgAu"}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(0),i=r(1),o=function(){function t(e,r,o){a(this,t);var A=new n.a(e);this.wasm=e,this.utils=A,this.context=e._NewCryptoContext(null,0),this.scratchBuf=new i.a(e),this.sk=r,this.skBuf=A.arrayToBuf(r),this.symKey=o,this.symKeyBuf=A.arrayToBuf(o)}return c(t,[{key:"clearBuf",value:function(){this.scratchBuf.clear()}},{key:"free",value:function(){if(this.context){var t=this.wasm;t._FreeCryptoContext(this.context),this.scratchBuf.free(),t._free(this.skBuf.ptr),t._free(this.symKeyBuf.ptr),this.context=null,this.scratchBuf=null,this.sk=null,this.skBuf=null,this.symKey=null,this.symKeyBuf=null,this.utils=null,this.wasm=null}}}]),t}()},function(t,e,r){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(15),e.createHash=e.Hash=r(16),e.createHmac=e.Hmac=r(17);var n=r(18),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var A=r(19);e.pbkdf2=A.pbkdf2,e.pbkdf2Sync=A.pbkdf2Sync;var a=r(20);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var s=r(21);e.DiffieHellmanGroup=s.DiffieHellmanGroup,e.createDiffieHellmanGroup=s.createDiffieHellmanGroup,e.getDiffieHellman=s.getDiffieHellman,e.createDiffieHellman=s.createDiffieHellman,e.DiffieHellman=s.DiffieHellman;var c=r(22);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=r(23);var u=r(24);e.publicEncrypt=u.publicEncrypt,e.privateEncrypt=u.privateEncrypt,e.publicDecrypt=u.publicDecrypt,e.privateDecrypt=u.privateDecrypt;var f=r(25);e.randomFill=f.randomFill,e.randomFillSync=f.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(0),i=r(1),o=function(){function t(e,r,o,A,s){a(this,t);var c=new n.a(e),u=n.a.randomBytes(e._EMS_SEED_SIZE_()),f=c.arrayToSmartBuf(u);this.wasm=e,this.utils=c,this.context=e._NewCryptoContext(f.ptr,f.len),this.iv=s,this.pk=r,this.pkBuf=c.arrayToBuf(r),this.scratchBuf=new i.a(e),this.sk=o,this.skBuf=c.arrayToBuf(o),this.symKey=A,this.symKeyBuf=c.arrayToBuf(A)}return c(t,[{key:"clearBuf",value:function(){this.scratchBuf.clear()}},{key:"free",value:function(){if(this.context){var t=this.wasm;t._FreeCryptoContext(this.context),t._free(this.pkBuf.ptr),this.scratchBuf.free(),t._free(this.symKeyBuf.ptr),this.context=null,this.iv=null,this.pk=null,this.pkBuf=null,this.scratchBuf=null,this.sk=null,this.skBuf=null,this.symKey=null,this.symKeyBuf=null,this.wasm=null,this.utils=null}}},{key:"generateNextBlockIV",value:function(){for(var t=n.a.randomBytes(this.iv.length),e=0;e<this.iv.length;e++)t[e]^=this.iv[e];return t}}]),t}()},function(t,e,r){"use strict";(function(t,n){var i,o=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var o,A=void 0!==(e=e||{})?e:{},a={};for(o in A)A.hasOwnProperty(o)&&(a[o]=A[o]);A.arguments=[],A.thisProgram="./this.program",A.quit=function(t,e){throw e},A.preRun=[],A.postRun=[];var s=!1,c=!1,f=!1,h=!1;s="object"==("undefined"==typeof window?"undefined":u(window)),c="function"==typeof importScripts,f="object"==u(t)&&!s&&!c,h=!s&&!f&&!c;var l,d,g="";function p(t){return A.locateFile?A.locateFile(t,g):g+t}f?(g=n+"/",A.read=function(t,e){var n;return l||(l=r(26)),d||(d=r(27)),t=d.normalize(t),n=l.readFileSync(t),e?n:n.toString()},A.readBinary=function(t){var e=A.read(t,!0);return e.buffer||(e=new Uint8Array(e)),m(e.buffer),e},t.argv.length>1&&(A.thisProgram=t.argv[1].replace(/\\/g,"/")),A.arguments=t.argv.slice(2),t.on("uncaughtException",(function(t){if(!(t instanceof vt))throw t})),t.on("unhandledRejection",_t),A.quit=function(e){t.exit(e)},A.inspect=function(){return"[Emscripten Module object]"}):h?("undefined"!=typeof read&&(A.read=function(t){return read(t)}),A.readBinary=function(t){var e;return"function"==typeof readbuffer?new Uint8Array(readbuffer(t)):(m("object"==u(e=read(t,"binary"))),e)},"undefined"!=typeof scriptArgs?A.arguments=scriptArgs:void 0!==arguments&&(A.arguments=arguments),"function"==typeof quit&&(A.quit=function(t){quit(t)})):(s||c)&&(c?g=self.location.href:document.currentScript&&(g=document.currentScript.src),i&&(g=i),g=0!==g.indexOf("blob:")?g.substr(0,g.lastIndexOf("/")+1):"",A.read=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},c&&(A.readBinary=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),A.readAsync=function(t,e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)},A.setWindowTitle=function(t){document.title=t});var I=A.print||("undefined"!=typeof console?console.log.bind(console):"undefined"!=typeof print?print:null),y=A.printErr||("undefined"!=typeof printErr?printErr:"undefined"!=typeof console&&console.warn.bind(console)||I);for(o in a)a.hasOwnProperty(o)&&(A[o]=a[o]);a=void 0;var C,E={"f64-rem":function(t,e){return t%e},debugger:function(){}};function b(t,e,r){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return S[t>>0];case"i16":return k[t>>1];case"i32":case"i64":return x[t>>2];case"float":return R[t>>2];case"double":return N[t>>3];default:_t("invalid type for getValue: "+e)}return null}new Array(0),"object"!=("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&y("no native wasm support detected");var B=!1;function m(t,e){t||_t("Assertion failed: "+e)}var w="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function v(t,e,r){for(var n=e+r,i=e;t[i]&&!(i>=n);)++i;if(i-e>16&&t.subarray&&w)return w.decode(t.subarray(e,i));for(var o="";e<i;){var A=t[e++];if(128&A){var a=63&t[e++];if(192!=(224&A)){var s=63&t[e++];if((A=224==(240&A)?(15&A)<<12|a<<6|s:(7&A)<<18|a<<12|s<<6|63&t[e++])<65536)o+=String.fromCharCode(A);else{var c=A-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&A)<<6|a)}else o+=String.fromCharCode(A)}return o}function Q(t,e){return t?v(M,t,e):""}function _(t,e){S.set(t,e)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var D,S,M,k,x,R,N,F=65536;function U(t,e){return t%e>0&&(t+=e-t%e),t}function H(){A.HEAP8=S=new Int8Array(D),A.HEAP16=k=new Int16Array(D),A.HEAP32=x=new Int32Array(D),A.HEAPU8=M=new Uint8Array(D),A.HEAPU16=new Uint16Array(D),A.HEAPU32=new Uint32Array(D),A.HEAPF32=R=new Float32Array(D),A.HEAPF64=N=new Float64Array(D)}var L=5252256,O=9344,T=5242880,G=A.TOTAL_MEMORY||16777216;function P(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?A.dynCall_v(r):A.dynCall_vi(r,e.arg):r(void 0===e.arg?null:e.arg)}else e()}}G<T&&y("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+G+"! (TOTAL_STACK="+T+")"),A.buffer?D=A.buffer:"object"==("undefined"==typeof WebAssembly?"undefined":u(WebAssembly))&&"function"==typeof WebAssembly.Memory?(C=new WebAssembly.Memory({initial:G/F}),D=C.buffer):D=new ArrayBuffer(G),H(),x[O>>2]=L;var j=[],Y=[],K=[],q=[],J=!1;function z(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)X(A.preRun.shift());P(j)}function Z(){J||(J=!0,P(Y))}function V(){P(K)}function W(){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)$(A.postRun.shift());P(q)}function X(t){j.unshift(t)}function $(t){q.unshift(t)}var tt=0,et=null,rt=null;function nt(t){tt++,A.monitorRunDependencies&&A.monitorRunDependencies(tt)}function it(t){if(tt--,A.monitorRunDependencies&&A.monitorRunDependencies(tt),0==tt&&(null!==et&&(clearInterval(et),et=null),rt)){var e=rt;rt=null,e()}}A.preloadedImages={},A.preloadedAudios={};var ot="data:application/octet-stream;base64,";function At(t){return String.prototype.startsWith?t.startsWith(ot):0===t.indexOf(ot)}var at="elv-crypto.wasm";function st(){try{if(A.wasmBinary)return new Uint8Array(A.wasmBinary);if(A.readBinary)return A.readBinary(at);throw"both async and sync fetching of the wasm failed"}catch(t){_t(t)}}function ct(){return A.wasmBinary||!s&&!c||"function"!=typeof fetch?new Promise((function(t,e){t(st())})):fetch(at,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+at+"'";return t.arrayBuffer()})).catch((function(){return st()}))}function ut(t){var e={env:t,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:E};function r(t,e){var r=t.exports;A.asm=r,it()}if(nt(),A.instantiateWasm)try{return A.instantiateWasm(e,r)}catch(t){return y("Module.instantiateWasm callback failed with error: "+t),!1}function n(t){r(t.instance)}function i(t){ct().then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(t){y("failed to asynchronously prepare wasm: "+t),_t(t)}))}return A.wasmBinary||"function"!=typeof WebAssembly.instantiateStreaming||At(at)||"function"!=typeof fetch?i(n):WebAssembly.instantiateStreaming(fetch(at,{credentials:"same-origin"}),e).then(n,(function(t){y("wasm streaming compile failed: "+t),y("falling back to ArrayBuffer instantiation"),i(n)})),{}}At(at)||(at=p(at)),A.asm=function(t,e,r){return e.memory=C,e.table=new WebAssembly.Table({initial:10,maximum:10,element:"anyfunc"}),e.__memory_base=1024,e.__table_base=0,ut(e)};var ft={buffers:[null,[],[]],printChar:function(t,e){var r=ft.buffers[t];0===e||10===e?((1===t?I:y)(v(r,0)),r.length=0):r.push(e)},varargs:0,get:function(t){return ft.varargs+=4,x[ft.varargs-4>>2]},getStr:function(){return Q(ft.get())},get64:function(){var t=ft.get();return ft.get(),t},getZero:function(){ft.get()}};function ht(t,e){ft.varargs=e;try{return ft.getStreamFromFD(),ft.get(),ft.get(),ft.get(),ft.get(),0}catch(t){return"undefined"!=typeof FS&&t instanceof FS.ErrnoError||_t(t),-t.errno}}function lt(t,e){ft.varargs=e;try{for(var r=ft.get(),n=ft.get(),i=ft.get(),o=0,A=0;A<i;A++){for(var a=x[n+8*A>>2],s=x[n+(8*A+4)>>2],c=0;c<s;c++)ft.printChar(r,M[a+c]);o+=s}return o}catch(t){return"undefined"!=typeof FS&&t instanceof FS.ErrnoError||_t(t),-t.errno}}function dt(t,e){ft.varargs=e;try{return ft.getStreamFromFD(),0}catch(t){return"undefined"!=typeof FS&&t instanceof FS.ErrnoError||_t(t),-t.errno}}function gt(){return S.length}function pt(t){_t("OOM")}function It(t){t=U(t,65536);var e=D.byteLength;try{return-1!==C.grow((t-e)/65536)&&(D=C.buffer,!0)}catch(t){return!1}}function yt(t){var e=gt();if(t>2147418112)return!1;for(var r=Math.max(e,16777216);r<t;)r=r<=536870912?U(2*r,65536):Math.min(U((3*r+2147483648)/4,65536),2147418112);return!!It(r)&&(H(),!0)}function Ct(t,e,r){M.set(M.subarray(e,e+r),t)}function Et(t){return A.___errno_location&&(x[A.___errno_location()>>2]=t),t}function bt(t){var e=Date.now()/1e3|0;return t&&(x[t>>2]=e),e}var Bt={},mt={c:_t,e:Et,k:ht,d:lt,j:dt,i:gt,h:Ct,g:yt,b:bt,f:pt,a:O},wt=A.asm(Bt,mt,D);function vt(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Qt(t){function e(){A.calledRun||(A.calledRun=!0,B||(Z(),V(),A.onRuntimeInitialized&&A.onRuntimeInitialized(),W()))}t=t||A.arguments,tt>0||(z(),tt>0||A.calledRun||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),e()}),1)):e()))}function _t(t){throw A.onAbort&&A.onAbort(t),void 0!==t?(I(t),y(t),t=JSON.stringify(t)):t="",B=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}if(A.asm=wt,A._CalcEncByteCount=function(){return A.asm.l.apply(null,arguments)},A._CalcEncByteCountFromTargetH=function(){return A.asm.m.apply(null,arguments)},A._CalcEncByteCountH=function(){return A.asm.n.apply(null,arguments)},A._CalcEncECIESByteCount=function(){return A.asm.o.apply(null,arguments)},A._CalcTargetByteCountH=function(){return A.asm.p.apply(null,arguments)},A._DecryptAES=function(){return A.asm.q.apply(null,arguments)},A._DecryptECIES=function(){return A.asm.r.apply(null,arguments)},A._DecryptH=function(){return A.asm.s.apply(null,arguments)},A._DecryptPrimary=function(){return A.asm.t.apply(null,arguments)},A._DecryptTarget=function(){return A.asm.u.apply(null,arguments)},A._DeriveTargetKeys=function(){return A.asm.v.apply(null,arguments)},A._EMS_AES_KEY_SIZE_=function(){return A.asm.w.apply(null,arguments)},A._EMS_CRYPTO_TYPE_PRIMARY_=function(){return A.asm.x.apply(null,arguments)},A._EMS_CRYPTO_TYPE_TARGET_=function(){return A.asm.y.apply(null,arguments)},A._EMS_ECIES_PK_KEY_SIZE_=function(){return A.asm.z.apply(null,arguments)},A._EMS_ECIES_SK_KEY_SIZE_=function(){return A.asm.A.apply(null,arguments)},A._EMS_IV_SIZE_=function(){return A.asm.B.apply(null,arguments)},A._EMS_PRIMARY_BLOCK_KEY_SIZE_=function(){return A.asm.C.apply(null,arguments)},A._EMS_PRIMARY_PK_KEY_SIZE_=function(){return A.asm.D.apply(null,arguments)},A._EMS_RE_ENCRYPTION_KEY_SIZE_=function(){return A.asm.E.apply(null,arguments)},A._EMS_SECRET_KEY_SIZE_=function(){return A.asm.F.apply(null,arguments)},A._EMS_SEED_SIZE_=function(){return A.asm.G.apply(null,arguments)},A._EMS_TAG_SIZE_=function(){return A.asm.H.apply(null,arguments)},A._EMS_TARGET_BLOCK_KEY_SIZE_=function(){return A.asm.I.apply(null,arguments)},A._EMS_TARGET_PK_KEY_SIZE_=function(){return A.asm.J.apply(null,arguments)},A._EncryptAES=function(){return A.asm.K.apply(null,arguments)},A._EncryptECIES=function(){return A.asm.L.apply(null,arguments)},A._EncryptPrimary=function(){return A.asm.M.apply(null,arguments)},A._EncryptPrimaryH=function(){return A.asm.N.apply(null,arguments)},A._FreeCryptoContext=function(){return A.asm.O.apply(null,arguments)},A._GeneratePrimaryKeys=function(){return A.asm.P.apply(null,arguments)},A._GenerateReEncryptionKey=function(){return A.asm.Q.apply(null,arguments)},A._GenerateSymmetricKeys=function(){return A.asm.R.apply(null,arguments)},A._GenerateTargetKeys=function(){return A.asm.S.apply(null,arguments)},A._NewCryptoContext=function(){return A.asm.T.apply(null,arguments)},A._ReEncryptBlockKey=function(){return A.asm.U.apply(null,arguments)},A._ReEncryptH=function(){return A.asm.V.apply(null,arguments)},A.___errno_location=function(){return A.asm.W.apply(null,arguments)},A._free=function(){return A.asm.X.apply(null,arguments)},A._malloc=function(){return A.asm.Y.apply(null,arguments)},A.asm=wt,A.getValue=b,A.writeArrayToMemory=_,A.then=function(t){if(A.calledRun)t(A);else{var e=A.onRuntimeInitialized;A.onRuntimeInitialized=function(){e&&e(),t(A)}}return A},vt.prototype=new Error,vt.prototype.constructor=vt,rt=function t(){A.calledRun||Qt(),A.calledRun||(rt=t)},A.run=Qt,A.abort=_t,A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return A.noExitRuntime=!0,Qt(),e});e.a=o}).call(this,r(4),"/")},function(t,e,r){"use strict";r.r(e),function(t){r.d(e,"default",(function(){return l}));var n=r(5),i=r(6),o=r(8),A=r(0),s=r(9),u=r(2),f=r.n(u),h=r(1),l=function(){function e(){a(this,e),this.initResolve=null,this.utils=null,this.wasm=null}return c(e,[{key:"init",value:function(){var e=this,r=n.a["ElvCrypto.wasm"];return Object(s.a)({locateFile:function(t){return t.endsWith(".wasm")?"data:application/octet-stream;base64,"+r:t},readBinary:function(e){return t.from(r,"base64")}}).then((function(t){e.wasm=t,e.utils=new A.a(t),e.AES_KEY_SIZE=t._EMS_AES_KEY_SIZE_(),e.CRYPTO_TYPE_TARGET=t._EMS_CRYPTO_TYPE_TARGET_(),e.CRYPTO_TYPE_PRIMARY=t._EMS_CRYPTO_TYPE_PRIMARY_(),e.TARGET_BLOCK_KEY_SIZE=t._EMS_TARGET_BLOCK_KEY_SIZE_(),e.TARGET_PK_KEY_SIZE=t._EMS_TARGET_PK_KEY_SIZE_(),e.ECIES_PK_KEY_SIZE=t._EMS_ECIES_PK_KEY_SIZE_(),e.ECIES_SK_KEY_SIZE=t._EMS_ECIES_SK_KEY_SIZE_(),e.IV_SIZE=t._EMS_IV_SIZE_(),e.PRIMARY_BLOCK_KEY_SIZE=t._EMS_PRIMARY_BLOCK_KEY_SIZE_(),e.PRIMARY_PK_KEY_SIZE=t._EMS_PRIMARY_PK_KEY_SIZE_(),e.RE_ENCRYPTION_KEY_SIZE=t._EMS_RE_ENCRYPTION_KEY_SIZE_(),e.SECRET_KEY_SIZE=t._EMS_SECRET_KEY_SIZE_(),e.SEED_SIZE=t._EMS_SEED_SIZE_(),e.TAG_SIZE=t._EMS_TAG_SIZE_(),e.ELV_E_INCOMPLETE_BLOCK=-2,e.initResolve&&e.initResolve(e)})),new Promise((function(t){e.wasm?t(e):e.initResolve=t}))}},{key:"calcEncByteCount",value:function(t){return this.wasm._CalcEncByteCount(t)}},{key:"calcEncByteCountH",value:function(t,e){return this.wasm._CalcEncByteCountH(t,e)}},{key:"calcEncByteCountFromTargetH",value:function(t){return this.wasm._CalcEncByteCountFromTargetH(t)}},{key:"calcTargetByteCountH",value:function(t){return this.wasm._CalcTargetByteCountH(t)}},{key:"calcEncECIESByteCount",value:function(t){return this.wasm._CalcEncECIESByteCount(t)}},{key:"encryptECIES",value:function(t,e){if(e.length!==this.ECIES_PK_KEY_SIZE)throw new Error("encryptECIES() failed: Expected publicKey length\n ".concat(this.ECIES_PK_KEY_SIZE,", not ").concat(e.length));var r=this.wasm,n=this.utils,i=A.a.randomBytes(this.SEED_SIZE),o=n.arrayToSmartBuf(t),a=n.arrayToSmartBuf(e),s=n.arrayToSmartBuf(i),c=this.calcEncECIESByteCount(o.len),u=n.smartMalloc(c),f=n.smartMalloc(this.ECIES_PK_KEY_SIZE),h=n.smartMalloc(this.TAG_SIZE),l=r._EncryptECIES(s.ptr,s.len,a.ptr,o.ptr,o.len,u,c,f,h);if(0!==l)throw new Error("_EncryptECIES failed with error code "+l);return{data:new Uint8Array(r.HEAPU8.buffer,u,c),ephemeralKey:new Uint8Array(r.HEAPU8.buffer,f,this.ECIES_PK_KEY_SIZE).slice(0),tag:new Uint8Array(r.HEAPU8.buffer,h,this.TAG_SIZE).slice(0)}}},{key:"decryptECIES",value:function(t,e,r,n){if(e.length!==this.ECIES_SK_KEY_SIZE)throw new Error("decryptECIES() failed: Expected secretKey length\n ".concat(this.ECIES_SK_KEY_SIZE,", not ").concat(e.length));if(r.length!==this.ECIES_PK_KEY_SIZE)throw new Error("decryptECIES() failed: Expected ephemeralKey length\n ".concat(this.ECIES_PK_KEY_SIZE,", not ").concat(r.length));if(n.length!==this.TAG_SIZE)throw new Error("decryptECIES() failed: Expected tag length\n ".concat(this.TAG_SIZE,", not ").concat(n.length));var i=this.wasm,o=this.utils,A=o.arrayToSmartBuf(t),a=o.arrayToSmartBuf(e),s=o.arrayToSmartBuf(r),c=o.arrayToSmartBuf(n),u=A.len,f=o.smartMalloc(u),h=i._DecryptECIES(s.ptr,A.ptr,A.len,c.ptr,a.ptr,f,u);if(-1===h)throw new Error("_DecryptECIES failed");return new Uint8Array(i.HEAPU8.buffer,f,h)}},{key:"generateTargetKeys",value:function(){var t=this.wasm,e=this.utils,r=A.a.randomBytes(this.SEED_SIZE),n=e.arrayToSmartBuf(r),i=e.smartMalloc(this.SECRET_KEY_SIZE),o=e.smartMalloc(this.TARGET_PK_KEY_SIZE),a=t._GenerateTargetKeys(n.ptr,n.len,i,o);if(0!==a)throw new Error("_GenerateTargetKeys failed with error code "+a);return{secretKey:new Uint8Array(t.HEAPU8.buffer,i,this.SECRET_KEY_SIZE).slice(0),publicKey:new Uint8Array(t.HEAPU8.buffer,o,this.TARGET_PK_KEY_SIZE).slice(0)}}},{key:"generatePrimaryKeys",value:function(){var t=this.wasm,e=this.utils,r=A.a.randomBytes(this.SEED_SIZE),n=e.arrayToSmartBuf(r),i=e.smartMalloc(this.SECRET_KEY_SIZE),o=e.smartMalloc(this.PRIMARY_PK_KEY_SIZE),a=t._GeneratePrimaryKeys(n.ptr,n.len,i,o);if(0!==a)throw new Error("_GeneratePrimaryKeys failed with error code "+a);return{secretKey:new Uint8Array(t.HEAPU8.buffer,i,this.SECRET_KEY_SIZE).slice(0),publicKey:new Uint8Array(t.HEAPU8.buffer,o,this.PRIMARY_PK_KEY_SIZE).slice(0)}}},{key:"generateReEncryptionKey",value:function(t,e){if(t.length!==this.SECRET_KEY_SIZE)throw new Error("generateReEncryptionKey() failed: Expected primarySK\n length ".concat(this.SECRET_KEY_SIZE,", not ").concat(t.length));if(e.length!==this.TARGET_PK_KEY_SIZE)throw new Error("generateReEncryptionKey() failed: Expected targetPK\n length ".concat(this.TARGET_PK_KEY_SIZE,", not ").concat(e.length));var r=this.wasm,n=this.utils,i=n.arrayToSmartBuf(t),o=n.arrayToSmartBuf(e),A=n.smartMalloc(this.RE_ENCRYPTION_KEY_SIZE),a=r._GenerateReEncryptionKey(i.ptr,o.ptr,A);if(0!==a)throw new Error("_GenerateReEncryptionKey failed with error code "+a);return new Uint8Array(r.HEAPU8.buffer,A,this.RE_ENCRYPTION_KEY_SIZE).slice(0)}},{key:"generateSymmetricKey",value:function(){var t=this.wasm,e=this.utils,r=A.a.randomBytes(this.SEED_SIZE),n=e.arrayToSmartBuf(r),i=e.smartMalloc(this.AES_KEY_SIZE),o=e.smartMalloc(this.IV_SIZE),a=t._GenerateSymmetricKeys(n.ptr,n.len,i,o);if(0!==a)throw new Error("_GenerateSymmetricKeys failed with error code "+a);return{key:new Uint8Array(t.HEAPU8.buffer,i,this.AES_KEY_SIZE).slice(0),iv:new Uint8Array(t.HEAPU8.buffer,o,this.IV_SIZE).slice(0)}}},{key:"newPrimaryContext",value:function(t,e,r){if(t&&t.length!==this.PRIMARY_PK_KEY_SIZE)throw new Error("newPrimaryContext() failed: Expected publicKey\n length ".concat(this.PRIMARY_PK_KEY_SIZE,", not ").concat(t.length));if(e&&e.length!==this.SECRET_KEY_SIZE)throw new Error("newPrimaryContext() failed: Expected secretKey\n length ".concat(this.SECRET_KEY_SIZE,", not ").concat(e.length));if(r.length!==this.AES_KEY_SIZE)throw new Error("newPrimaryContext() failed: Expected\n symmetricKey length ".concat(this.AES_KEY_SIZE,", not ").concat(r.length));var n=this.generateSymmetricKey();return new o.a(this.wasm,t,e,r,n.iv)}},{key:"encryptPrimary",value:function(t,e,r){if(r.length!==this.IV_SIZE)throw new Error("encryptPrimary() failed: Expected iv\n length ".concat(this.IV_SIZE,", not ").concat(r.length));if(0!==t.scratchBuf.len)throw new Error("encryptPrimary() failed: Scratch buffer is not empty");var n=this.wasm,i=this.utils,o=i.arrayToSmartBuf(r),A=i.arrayToSmartBuf(e),a=this.calcEncByteCount(A.len);t.scratchBuf.ensureSize(a);var s=i.smartMalloc(this.TAG_SIZE),c=i.smartMalloc(this.PRIMARY_BLOCK_KEY_SIZE),u=n._EncryptPrimary(t.context,t.pkBuf.ptr,t.symKeyBuf.ptr,o.ptr,A.ptr,A.len,t.scratchBuf.ptr,a,s,c);if(0!==u)throw new Error("_EncryptPrimary failed with error code "+u);return{blockKey:new Uint8Array(n.HEAPU8.buffer,c,this.PRIMARY_BLOCK_KEY_SIZE).slice(0),data:new Uint8Array(n.HEAPU8.buffer,t.scratchBuf.ptr,a),tag:new Uint8Array(n.HEAPU8.buffer,s,this.TAG_SIZE).slice(0)}}},{key:"encryptPrimaryH",value:function(t,e){if(0!==t.scratchBuf.len)throw new Error("encryptPrimaryH() failed: Scratch buffer is not empty");var r=this.wasm,n=this.utils,i=t.generateNextBlockIV(),o=n.arrayToSmartBuf(i),A=n.arrayToSmartBuf(e),a=this.calcEncByteCountH(this.CRYPTO_TYPE_PRIMARY,A.len);t.scratchBuf.ensureSize(a);var s=r._EncryptPrimaryH(t.context,t.pkBuf.ptr,t.symKeyBuf.ptr,o.ptr,A.ptr,A.len,t.scratchBuf.ptr);if(0!==s)throw new Error("_EncryptPrimaryH failed with error code "+s);return new Uint8Array(r.HEAPU8.buffer,t.scratchBuf.ptr,a)}},{key:"decryptPrimary",value:function(t,e,r,n,i,o){if(r.length!==this.TAG_SIZE)throw new Error("decryptPrimary() failed: Expected tag\n length ".concat(this.TAG_SIZE,", not ").concat(r.length));if(n.length!==this.PRIMARY_BLOCK_KEY_SIZE)throw new Error("decryptPrimary() failed: Expected blockKey\n length ".concat(this.PRIMARY_BLOCK_KEY_SIZE,", not ").concat(n.length));if(i.length!==this.IV_SIZE)throw new Error("decryptPrimary() failed: Expected iv\n length ".concat(this.IV_SIZE,", not ").concat(i.length));if(0!==t.scratchBuf.len)throw new Error("decryptPrimary() failed: Scratch buffer is not empty");var A=this.wasm,a=this.utils,s=a.arrayToSmartBuf(e),c=a.arrayToSmartBuf(n),u=a.arrayToSmartBuf(i),f=a.arrayToSmartBuf(r);t.scratchBuf.ensureSize(o);var h=A._DecryptPrimary(t.context,t.skBuf.ptr,c.ptr,t.symKeyBuf.ptr,u.ptr,f.ptr,s.ptr,s.len,t.scratchBuf.ptr,o);if(0!==h)throw new Error("_DecryptPrimary failed with error code "+h);return new Uint8Array(A.HEAPU8.buffer,t.scratchBuf.ptr,o)}},{key:"reEncryptH",value:function(t,e,r){if(e.length!==this.RE_ENCRYPTION_KEY_SIZE)throw new Error("reEncryptBlockKey() failed: Expected reEncKey\n length ".concat(this.RE_ENCRYPTION_KEY_SIZE,", not ").concat(e.length));var n=this.wasm,i=this.utils,o=i.arrayToSmartBuf(e),A=i.arrayToSmartBuf(r);t.ensureSize(this.calcTargetByteCountH(A.len));var a=i.smartMalloc(4),s=n._ReEncryptH(o.ptr,A.ptr,A.len,t.ptr,a);if(s===this.ELV_E_INCOMPLETE_BLOCK)throw new Error("ELV_E_INCOMPLETE_BLOCK");if(0!==s)throw new Error("_ReEncryptH failed with error code "+s);var c=n.getValue(a,"i32");return new Uint8Array(n.HEAPU8.buffer,t.ptr,c)}},{key:"decryptH",value:function(t,e,r){if(t!==this.CRYPTO_TYPE_TARGET&&t!==this.CRYPTO_TYPE_PRIMARY)throw new Error("decryptH() failed: Invalid type "+t);if(0!==e.scratchBuf.len)throw new Error("decryptH() failed: Scratch buffer is not empty");var n=this.wasm,i=this.utils,o=i.arrayToSmartBuf(r);e.scratchBuf.ensureSize(o.len);var A=i.smartMalloc(4),a=n._DecryptH(t,e.context,e.skBuf.ptr,e.symKeyBuf.ptr,o.ptr,o.len,e.scratchBuf.ptr,A);if(a===this.ELV_E_INCOMPLETE_BLOCK)throw new Error("ELV_E_INCOMPLETE_BLOCK");if(0!==a)throw new Error("_DecryptH failed with error code "+a);var s=n.getValue(A,"i32");return new Uint8Array(n.HEAPU8.buffer,e.scratchBuf.ptr,s)}},{key:"reEncryptBlockKey",value:function(t,e){if(t.length!==this.RE_ENCRYPTION_KEY_SIZE)throw new Error("reEncryptBlockKey() failed: Expected reEncKey\n length ".concat(this.RE_ENCRYPTION_KEY_SIZE,", not ").concat(t.length));if(e.length!==this.PRIMARY_BLOCK_KEY_SIZE)throw new Error("reEncryptBlockKey() failed: Expected blockKey\n length ".concat(this.PRIMARY_BLOCK_KEY_SIZE,", not ").concat(e.length));var r=this.wasm,n=this.utils,i=n.arrayToSmartBuf(t),o=n.arrayToSmartBuf(e),A=n.smartMalloc(this.TARGET_BLOCK_KEY_SIZE),a=r._ReEncryptBlockKey(i.ptr,o.ptr,A);if(0!==a)throw new Error("_ReEncryptBlockKey failed with error code "+a);return new Uint8Array(r.HEAPU8.buffer,A,this.TARGET_BLOCK_KEY_SIZE).slice(0)}},{key:"newTargetDecryptionContext",value:function(t,e){if(t.length!==this.SECRET_KEY_SIZE)throw new Error("newTargetDecryptionContext() failed: Expected\n secretKey length ".concat(this.SECRET_KEY_SIZE,", not ").concat(t.length));if(e.length!==this.AES_KEY_SIZE)throw new Error("newTargetDecryptionContext() failed: Expected\n symmetricKey length ".concat(this.AES_KEY_SIZE,", not ").concat(e.length));return new i.a(this.wasm,t,e)}},{key:"decryptTarget",value:function(t,e,r,n,i,o){if(r.length!==this.TAG_SIZE)throw new Error("decryptTarget() failed: Expected tag\n length ".concat(this.TAG_SIZE,", not ").concat(r.length));if(n.length!==this.TARGET_BLOCK_KEY_SIZE)throw new Error("decryptTarget() failed: Expected blockKey\n length ".concat(this.TARGET_BLOCK_KEY_SIZE,", not ").concat(n.length));if(i.length!==this.IV_SIZE)throw new Error("decryptTarget() failed: Expected iv\n length ".concat(this.IV_SIZE,", not ").concat(i.length));if(0!==t.scratchBuf.len)throw new Error("decryptTarget() failed: Scratch buffer is not empty");var A=this.wasm,a=this.utils,s=a.arrayToSmartBuf(e),c=a.arrayToSmartBuf(n),u=a.arrayToSmartBuf(i),f=a.arrayToSmartBuf(r);t.scratchBuf.ensureSize(o);var h=A._DecryptTarget(t.context,t.skBuf.ptr,c.ptr,t.symKeyBuf.ptr,u.ptr,f.ptr,s.ptr,s.len,t.scratchBuf.ptr,o);if(0!==h)throw new Error("_DecryptTarget failed with error code "+h);return new Uint8Array(A.HEAPU8.buffer,t.scratchBuf.ptr,o)}},{key:"createCipher",value:function(t){var e=this;return f()((function(r,n,i){this.push(e.encryptPrimaryH(t,r)),t.clearBuf(),i()}))}},{key:"createDecipher",value:function(e,r){var n=this,i=t.alloc(0);return f()((function(o,A,a){var s=0;for(i=t.concat([i,o]);s<i.length;)try{r.clearBuf();var c=n.decryptH(e,r,i.slice(s));this.push(c),s+=n.calcEncByteCountH(e,c.length)}catch(e){return"ELV_E_INCOMPLETE_BLOCK"===e.message?(i=i.slice(s),void a()):(i=t.alloc(0),void a(e))}i=t.alloc(0),a()}),(function(t){i.length>0&&this.destroy(new Error("Decipher stream ended before all data was decrypted. The source may be invalid.")),t()}))}},{key:"createRecipher",value:function(e){var r=this,n=new h.a(r.wasm),i=t.alloc(0),o=f()((function(o,A,a){var s=0;for(i=t.concat([i,o]);s<i.length;)try{n.clear();var c=r.reEncryptH(n,e,i.slice(s));this.push(c),s+=r.calcEncByteCountFromTargetH(c.length)}catch(e){return"ELV_E_INCOMPLETE_BLOCK"===e.message?(i=i.slice(s),void a()):(i=t.alloc(0),void a(e))}i=t.alloc(0),a()}),(function(t){i.length>0&&this.destroy(new Error("Recipher stream ended before all data was decrypted. The source may be invalid.")),t()}));return o.on("finish",(function(){n.free()})),o}}]),e}()}.call(this,r(3).Buffer)},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==("undefined"==typeof window?"undefined":u(window))&&(r=window)}t.exports=r},function(t,e){t.exports=r(70)},function(t,e){t.exports=r(71)},function(t,e){t.exports=r(43)},function(t,e){t.exports=r(13)},function(t,e){t.exports=r(17)},function(t,e){t.exports=r(56)},function(t,e){t.exports=r(118)},function(t,e){t.exports=r(57)},function(t,e){t.exports=r(124)},function(t,e){t.exports=r(132)},function(t,e){t.exports=r(135)},function(t,e){t.exports=r(147)},function(t,e){t.exports=r(148)},function(t,e){t.exports=r(152)},function(t,e){},function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var A=o>=0?arguments[o]:t.cwd();if("string"!=typeof A)throw new TypeError("Arguments to path.resolve must be strings");A&&(e=A+"/"+e,i="/"===A.charAt(0))}return(i?"/":"")+(e=r(n(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var o=e.isAbsolute(t),A="/"===i(t,-1);return(t=r(n(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&A&&(t+="/"),(o?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var i=n(t.split("/")),o=n(r.split("/")),A=Math.min(i.length,o.length),a=A,s=0;s<A;s++)if(i[s]!==o[s]){a=s;break}var c=[];for(s=a;s<i.length;s++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},e.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,A=t.length-1;A>=0;--A){var a=t.charCodeAt(A);if(47!==a)-1===n&&(i=!1,n=A+1),46===a?-1===e?e=A:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=A+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var i="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r(4))}])},"object"==u(e)&&"object"==u(t)?t.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(e,i):n)||(t.exports=o))}).call(this,r(8)(t))},function(t,e,r){var n=r(28),i=r(14),o=r(15),A=r(41),a=r(42);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return A=t.done,t},e:function(t){a=!0,o=t},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var h=r(156),l=r(29),d=r(172).permissionLevels,g=r(84).LogMessage,p=r(241),I=function(){"use strict";function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.target,a=r.timeout,s=void 0===a?30:a;A(this,t),this.permissionLevels=d,!n&&"undefined"!=typeof window&&window.parent&&(n=window.parent),this.target=n,this.timeout=s,this.utils=l,this.Crypto=p,this.Crypto.ElvCrypto();var c,f=u(this.AllowedMethods());try{var h=function(){var t=c.value;e[t]=function(){var r=o(i.mark((function r(n){var o;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return(o=n&&n.callback)&&delete n.callback,r.next=4,e.SendMessage({options:{calledMethod:t,args:e.utils.MakeClonable(n)},callback:o});case 4:return r.abrupt("return",r.sent);case 5:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}()};for(f.s();!(c=f.n()).done;)h()}catch(t){f.e(t)}finally{f.f()}this.userProfileClient={};var g,I=u(this.AllowedUserProfileMethods());try{var y=function(){var r=g.value;e.userProfileClient[r]=function(){var n=o(i.mark((function n(o){var A;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(A=o&&o.callback)&&delete o.callback,n.next=4,e.SendMessage({options:{module:"userProfileClient",calledMethod:r,args:e.utils.MakeClonable(o),prompted:t.PromptedMethods().includes(r)},callback:A});case 4:return n.abrupt("return",n.sent);case 5:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()};for(I.s();!(g=I.n()).done;)y()}catch(t){I.e(t)}finally{I.f()}}var e,r,n;return a(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g(this,t,e)}},{key:"PassRequest",value:(n=o(i.mark((function t(e){var r,n,o,A,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.request,n=e.Respond,t.prev=1,r.callbackId&&(a=function(t){return n({type:"ElvFrameResponse",requestId:r.callbackId,response:t})}),t.next=5,this.SendMessage({options:r,callback:a});case 5:o=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(1),A=t.t0;case 11:return t.abrupt("return",{type:"ElvFrameResponse",requestId:r.requestId,response:o,error:A});case 12:case"end":return t.stop()}}),t,this,[[1,8]])}))),function(t){return n.apply(this,arguments)})},{key:"SendMessage",value:(r=o(i.mark((function e(r){var n,o,A,a,s,u,f,l,d,g;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.options,o=void 0===n?{}:n,A=r.callback,a=r.noResponse,s=void 0!==a&&a,u=h.next(),A&&(f=h.next()),this.target.postMessage(c(c({},o),{},{type:"ElvFrameRequest",requestId:u,callbackId:f}),"*"),!s){e.next=6;break}return e.abrupt("return");case 6:return l=o.calledMethod||o.operation,d=t.FileMethods().includes(o.calledMethod),g=this.timeout,o.prompted||d?g=0:o.args&&o.args.fcTimeout&&(g=o.args.fcTimeout),e.next=12,this.AwaitMessage(u,g,A,f,l);case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e,this)}))),function(t){return r.apply(this,arguments)})},{key:"AwaitMessage",value:(e=o(i.mark((function t(e,r,n,A,a){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,s){var c,u,f,h=function(){u&&clearTimeout(u),r>0&&(u=setTimeout((function(){"undefined"!=typeof window&&(window.removeEventListener("message",c),f&&window.removeEventListener("message",f)),s("Request ".concat(e," timed out (").concat(a,")"))}),1e3*r))};A&&(f=function(t){try{h();var e=t.data;if("ElvFrameResponse"!==e.type||e.requestId!==A)return;n(e.response)}catch(t){console.error(t)}},window.addEventListener("message",f)),c=function(){var r=o(i.mark((function r(n){var o;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,"ElvFrameResponse"===(o=n.data).type&&o.requestId===e){r.next=4;break}return r.abrupt("return");case 4:clearTimeout(u),window.removeEventListener("message",c),f&&window.removeEventListener("message",f),o.error?s(o.error):t(o.response),r.next=16;break;case 10:r.prev=10,r.t0=r.catch(0),clearTimeout(u),window.removeEventListener("message",c),f&&window.removeEventListener("message",f),s(r.t0);case 16:case"end":return r.stop()}}),r,null,[[0,10]])})));return function(t){return r.apply(this,arguments)}}(),h(),window.addEventListener("message",c)}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(t,r,n,i,o){return e.apply(this,arguments)})},{key:"AllowedMethods",value:function(){return["AccessGroupManagers","AccessGroupMembers","AccessGroupOwner","AccessInfo","AccessRequest","AccessType","AddAccessGroupManager","AddAccessGroupMember","AddContentLibraryGroup","AddContentObjectGroupPermission","AddLibraryContentType","AssetMetadata","AvailableDRMs","AvailableOfferings","AwaitPending","BitmovinPlayoutOptions","BlockNumber","CallBitcodeMethod","CallContractMethod","CallContractMethodAndWait","ClearCache","ClearStaticToken","Collection","CollectionTransactions","ConfigUrl","ContentLibraries","ContentLibrary","ContentLibraryGroupPermissions","ContentLibraryOwner","ContentObject","ContentObjectAccessComplete","ContentObjectGraph","ContentObjectGroupPermissions","ContentObjectImageUrl","ContentObjectLibraryId","ContentObjectMetadata","ContentObjectOwner","ContentObjectTenantId","ContentObjectVersions","ContentObjects","ContentPart","ContentParts","ContentSpaceId","ContentType","ContentTypeOwner","ContentTypes","ContractAbi","ContractEvents","ContractMetadata","ContractName","CopyContentObject","CreateABRMezzanine","CreateAccessGroup","CreateAndFinalizeContentObject","CreateContentLibrary","CreateContentObject","CreateContentType","CreateEncryptionConk","CreateFileDirectories","CreateFileUploadJob","CreateLinks","CreateNTPInstance","CreateNonOwnerCap","CreatePart","CreateProductionMaster","CreateSignedToken","CurrentAccountAddress","CustomContractAddress","Decrypt","DecryptECIES","DefaultKMSAddress","DeleteAccessGroup","DeleteContentLibrary","DeleteContentObject","DeleteContentVersion","DeleteFiles","DeleteMetadata","DeleteNTPInstance","DeletePart","DeployContract","Download","DownloadEncrypted","DownloadFile","DownloadPart","EditAndFinalizeContentObject","EditContentObject","Encrypt","EncryptECIES","EncryptionConk","Events","ExtractEventFromLogs","ExtractValueFromEvent","FabricUrl","FileUrl","FinalizeABRMezzanine","FinalizeContentObject","FinalizePart","FinalizeStateChannelAccess","FinalizeUploadJob","FormatContractArguments","GenerateStateChannelToken","GetBalance","InitializeAuthPolicy","IssueNTPCode","IssueSignedNTPCode","LatestVersionHash","LibraryContentTypes","LinkAccessGroupToOauth","LinkData","LinkTarget","LinkUrl","ListAccessGroups","ListFiles","ListNTPInstances","LROStatus","MergeContractMetadata","MergeMetadata","MetadataAuth","MintNFT","NetworkInfo","NodeId","Nodes","NTPInstance","Permission","PlayoutOptions","PlayoutPathResolution","ProduceMetadataLinks","Proofs","PublicRep","PublishContentVersion","QParts","RedeemCode","RemoveAccessGroupManager","RemoveAccessGroupMember","RemoveContentObjectGroupPermission","RemoveContentLibraryGroup","RemoveLibraryContentType","Rep","ReplaceContractMetadata","ReplaceMetadata","Request","ResetRegion","SendFunds","SetAccessCharge","SetAuth","SetAuthContext","SetAuthPolicy","SetContentLibraryImage","SetContentObjectImage","SetCustomContentContract","SetGroupPermission","SetNodes","SetOauthToken","SetPolicyAuthorization","SetSignerFromOauthToken","SetStaticToken","SetVisibility","SetPermission","StartABRMezzanineJobs","SuspendNTPInstance","UnlinkAccessGroupFromOauth","UpdateContentObjectGraph","UpdateNTPInstance","UploadFileData","UploadFilesFromS3","UploadJobStatus","UploadPart","UploadPartChunk","UploadStatus","UseRegion","VerifyContentObject","Visibility"]}},{key:"AllowedUserProfileMethods",value:function(){return["AccessLevel","CollectedTags","CreateWallet","DeleteUserMetadata","MergeUserMetadata","PublicUserMetadata","ReplaceUserMetadata","TenantId","UserMetadata","UserProfileImage","UserWalletAddress","UserWalletObjectInfo","WalletAddress"]}}],[{key:"PromptedMethods",value:function(){return["CollectedTags","DeleteUserMetadata","MergeUserMetadata","ReplaceUserMetadata","UserMetadata"]}},{key:"MetadataMethods",value:function(){return["DeleteUserMetadata","MergeUserMetadata","ReplaceUserMetadata","UserMetadata"]}},{key:"FileMethods",value:function(){return["DownloadFile","DownloadPart","UpdateContentObjectGraph","UploadFiles","UploadFilesFromS3","UploadPart","UploadPartChunk"]}}]),t}(),y=r(316).UploadFiles;I.prototype.UploadFiles=y,e.FrameClient=I},function(t,e,r){(function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=function(t){"use strict";var r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",A=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof h?e:h,o=Object.create(i.prototype),A=new w(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return Q()}for(r.method=i,r.arg=o;;){var A=r.delegate;if(A){var a=b(A,r);if(a){if(a===f)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,A),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function h(){}function l(){}function d(){}var g={};s(g,o,(function(){return this}));var p=Object.getPrototypeOf,I=p&&p(p(v([])));I&&I!==r&&n.call(I,o)&&(g=I);var y=d.prototype=h.prototype=Object.create(g);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,r){var i;this._invoke=function(o,A){function a(){return new r((function(i,a){!function i(o,A,a,s){var c=u(t[o],t,A);if("throw"!==c.type){var f=c.arg,h=f.value;return h&&"object"===e(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):r.resolve(h).then((function(t){f.value=t,a(f)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}(o,A,i,a)}))}return i=i?i.then(a,a):a()}}function b(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function m(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function v(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:Q}}function Q(){return{value:void 0,done:!0}}return l.prototype=d,s(y,"constructor",d),s(d,"constructor",l),l.displayName=s(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},C(E.prototype),s(E.prototype,A,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var A=new E(c(e,r,n,i),o);return t.isGeneratorFunction(r)?A:A.next().then((function(t){return t.done?t.value:A.next()}))},C(y),s(y,a,"Generator"),s(y,o,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=v,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(m),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return A.type="throw",A.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],A=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var A=o?o.completion:{};return A.type=t,A.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(A)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),m(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;m(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:v(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}("object"===e(t)?t.exports:{});try{regeneratorRuntime=r}catch(t){"object"===("undefined"==typeof globalThis?"undefined":e(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,r(8)(t))},function(t,e,r){var n=r(41),i=r(42),o=0,A=function(){"use strict";function t(){n(this,t)}return i(t,null,[{key:"next",value:function(){return++o}}]),t}();t.exports=A},function(t,e,r){var n=r(73);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(161),i=r(162),o=r(74),A=r(163);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||A()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o=[],A=!0,a=!1;try{for(r=r.call(t);!(A=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);A=!0);}catch(t){a=!0,i=t}finally{try{A||null==r.return||r.return()}finally{if(a)throw i}}return o}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";var n=r(1).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),A=o.charCodeAt(0);if(255!==e[A])throw new TypeError(o+" is ambiguous");e[A]=i}var a=t.length,s=t.charAt(0),c=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function f(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,i=0,o=0;t[r]===s;)i++,r++;for(var A=(t.length-r)*c+1>>>0,u=new Uint8Array(A);t[r];){var f=e[t.charCodeAt(r)];if(255===f)return;for(var h=0,l=A-1;(0!==f||h<o)&&-1!==l;l--,h++)f+=a*u[l]>>>0,u[l]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");o=h,r++}for(var d=A-o;d!==A&&0===u[d];)d++;var g=n.allocUnsafe(i+(A-d));g.fill(0,0,i);for(var p=i;d!==A;)g[p++]=u[d++];return g}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,A=e.length;o!==A&&0===e[o];)o++,r++;for(var c=(A-o)*u+1>>>0,f=new Uint8Array(c);o!==A;){for(var h=e[o],l=0,d=c-1;(0!==h||l<i)&&-1!==d;d--,l++)h+=256*f[d]>>>0,f[d]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");i=l,o++}for(var g=c-i;g!==c&&0===f[g];)g++;for(var p=s.repeat(r);g<c;++g)p+=t.charAt(f[g]);return p},decodeUnsafe:f,decode:function(t){var e=f(t);if(e)return e;throw new Error("Non-base"+a+" character")}}}},function(t,e,r){var n;function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(o){"use strict";var A,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s="function"==typeof Symbol&&"symbol"==i(Symbol.iterator),c=Math.ceil,u=Math.floor,f="[BigNumber Error] ",h=f+"Number primitive has more than 15 significant digits: ",l=1e14,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e9;function p(t){var e=0|t;return t>0||t===e?e:e-1}function I(t){for(var e,r,n=1,i=t.length,o=t[0]+"";n<i;){for(r=14-(e=t[n++]+"").length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function y(t,e){var r,n,i=t.c,o=e.c,A=t.s,a=e.s,s=t.e,c=e.e;if(!A||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:A;if(A!=a)return A;if(r=A<0,n=s==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return s>c^r?1:-1;for(a=(s=i.length)<(c=o.length)?s:c,A=0;A<a;A++)if(i[A]!=o[A])return i[A]>o[A]^r?1:-1;return s==c?0:s>c^r?1:-1}function C(t,e,r,n){if(t<e||t>r||t!==u(t))throw Error(f+(n||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function E(t){var e=t.c.length-1;return p(t.e/14)==e&&t.c[e]%2!=0}function b(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function B(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else e<n&&(t=t.slice(0,e)+"."+t.slice(e));return t}(A=function t(e){var r,n,o,A,m,w,v,Q,_,D=G.prototype={constructor:G,toString:null,valueOf:null},S=new G(1),M=20,k=4,x=-7,R=21,N=-1e7,F=1e7,U=!1,H=1,L=0,O={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},T="0123456789abcdefghijklmnopqrstuvwxyz";function G(t,e){var r,i,A,s,c,f,l,d,g=this;if(!(g instanceof G))return new G(t,e);if(null==e){if(t&&!0===t._isBigNumber)return g.s=t.s,void(!t.c||t.e>F?g.c=g.e=null:t.e<N?g.c=[g.e=0]:(g.e=t.e,g.c=t.c.slice()));if((f="number"==typeof t)&&0*t==0){if(g.s=1/t<0?(t=-t,-1):1,t===~~t){for(s=0,c=t;c>=10;c/=10,s++);return void(s>F?g.c=g.e=null:(g.e=s,g.c=[t]))}d=String(t)}else{if(!a.test(d=String(t)))return o(g,d,f);g.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(C(e,2,T.length,"Base"),10==e)return K(g=new G(t),M+g.e+1,k);if(d=String(t),f="number"==typeof t){if(0*t!=0)return o(g,d,f,e);if(g.s=1/t<0?(d=d.slice(1),-1):1,G.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(h+t)}else g.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=T.slice(0,e),s=c=0,l=d.length;c<l;c++)if(r.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 o(g,String(t),f,e)}f=!1,(s=(d=n(d,e,10,g.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,f&&G.DEBUG&&l>15&&(t>9007199254740991||t!==u(t)))throw Error(h+g.s*t);if((s=s-c-1)>F)g.c=g.e=null;else if(s<N)g.c=[g.e=0];else{if(g.e=s,g.c=[],c=(s+1)%14,s<0&&(c+=14),c<l){for(c&&g.c.push(+d.slice(0,c)),l-=14;c<l;)g.c.push(+d.slice(c,c+=14));c=14-(d=d.slice(c)).length}else c-=l;for(;c--;d+="0");g.c.push(+d)}}else g.c=[g.e=0]}function P(t,e,r,n){var i,o,A,a,s;if(null==r?r=k:C(r,0,8),!t.c)return t.toString();if(i=t.c[0],A=t.e,null==e)s=I(t.c),s=1==n||2==n&&(A<=x||A>=R)?b(s,A):B(s,A,"0");else if(o=(t=K(new G(t),e,r)).e,a=(s=I(t.c)).length,1==n||2==n&&(e<=o||o<=x)){for(;a<e;s+="0",a++);s=b(s,o)}else if(e-=A,s=B(s,o,"0"),o+1>a){if(--e>0)for(s+=".";e--;s+="0");}else if((e+=o-a)>0)for(o+1==a&&(s+=".");e--;s+="0");return t.s<0&&i?"-"+s:s}function j(t,e){for(var r,n=1,i=new G(t[0]);n<t.length;n++){if(!(r=new G(t[n])).s){i=r;break}e.call(i,r)&&(i=r)}return i}function Y(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,n++);return(r=n+14*r-1)>F?t.c=t.e=null:r<N?t.c=[t.e=0]:(t.e=r,t.c=e),t}function K(t,e,r,n){var i,o,A,a,s,f,h,g=t.c,p=d;if(g){t:{for(i=1,a=g[0];a>=10;a/=10,i++);if((o=e-i)<0)o+=14,A=e,h=(s=g[f=0])/p[i-A-1]%10|0;else if((f=c((o+1)/14))>=g.length){if(!n)break t;for(;g.length<=f;g.push(0));s=h=0,i=1,A=(o%=14)-14+1}else{for(s=a=g[f],i=1;a>=10;a/=10,i++);h=(A=(o%=14)-14+i)<0?0:s/p[i-A-1]%10|0}if(n=n||e<0||null!=g[f+1]||(A<0?s:s%p[i-A-1]),n=r<4?(h||n)&&(0==r||r==(t.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(o>0?A>0?s/p[i-A]:0:g[f-1])%10&1||r==(t.s<0?8:7)),e<1||!g[0])return g.length=0,n?(e-=t.e+1,g[0]=p[(14-e%14)%14],t.e=-e||0):g[0]=t.e=0,t;if(0==o?(g.length=f,a=1,f--):(g.length=f+1,a=p[14-o],g[f]=A>0?u(s/p[i-A]%p[A])*a:0),n)for(;;){if(0==f){for(o=1,A=g[0];A>=10;A/=10,o++);for(A=g[0]+=a,a=1;A>=10;A/=10,a++);o!=a&&(t.e++,g[0]==l&&(g[0]=1));break}if(g[f]+=a,g[f]!=l)break;g[f--]=0,a=1}for(o=g.length;0===g[--o];g.pop());}t.e>F?t.c=t.e=null:t.e<N&&(t.c=[t.e=0])}return t}function q(t){var e,r=t.e;return null===r?t.toString():(e=I(t.c),e=r<=x||r>=R?b(e,r):B(e,r,"0"),t.s<0?"-"+e:e)}return G.clone=t,G.ROUND_UP=0,G.ROUND_DOWN=1,G.ROUND_CEIL=2,G.ROUND_FLOOR=3,G.ROUND_HALF_UP=4,G.ROUND_HALF_DOWN=5,G.ROUND_HALF_EVEN=6,G.ROUND_HALF_CEIL=7,G.ROUND_HALF_FLOOR=8,G.EUCLID=9,G.config=G.set=function(t){var e,r;if(null!=t){if("object"!=i(t))throw Error(f+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(C(r=t[e],0,g,e),M=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(C(r=t[e],0,8,e),k=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(C(r[0],-g,0,e),C(r[1],0,g,e),x=r[0],R=r[1]):(C(r,-g,g,e),x=-(R=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)C(r[0],-g,-1,e),C(r[1],1,g,e),N=r[0],F=r[1];else{if(C(r,-g,g,e),!r)throw Error(f+e+" cannot be zero: "+r);N=-(F=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(f+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!r,Error(f+"crypto unavailable");U=r}else U=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(C(r=t[e],0,9,e),H=r),t.hasOwnProperty(e="POW_PRECISION")&&(C(r=t[e],0,g,e),L=r),t.hasOwnProperty(e="FORMAT")){if("object"!=i(r=t[e]))throw Error(f+e+" not an object: "+r);O=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(f+e+" invalid: "+r);T=r}}return{DECIMAL_PLACES:M,ROUNDING_MODE:k,EXPONENTIAL_AT:[x,R],RANGE:[N,F],CRYPTO:U,MODULO_MODE:H,POW_PRECISION:L,FORMAT:O,ALPHABET:T}},G.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!G.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e<n.length;e++)if((r=n[e])<0||r>=l||r!==u(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(f+"Invalid BigNumber: "+t)},G.maximum=G.max=function(){return j(arguments,D.lt)},G.minimum=G.min=function(){return j(arguments,D.gt)},G.random=(A=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,o,a=0,s=[],h=new G(S);if(null==t?t=M:C(t,0,g),i=c(t/14),U)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*e[a]+(e[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[a]=r[0],e[a+1]=r[1]):(s.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw U=!1,Error(f+"crypto unavailable");for(e=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&e[a])+1099511627776*e[a+1]+4294967296*e[a+2]+16777216*e[a+3]+(e[a+4]<<16)+(e[a+5]<<8)+e[a+6])>=9e15?crypto.randomBytes(7).copy(e,a):(s.push(o%1e14),a+=7);a=i/7}if(!U)for(;a<i;)(o=A())<9e15&&(s[a++]=o%1e14);for(t%=14,(i=s[--a])&&t&&(o=d[14-t],s[a]=u(i/o)*o);0===s[a];s.pop(),a--);if(a<0)s=[n=0];else{for(n=-1;0===s[0];s.splice(0,1),n-=14);for(a=1,o=s[0];o>=10;o/=10,a++);a<14&&(n-=14-a)}return h.e=n,h.c=s,h}),G.sum=function(){for(var t=1,e=arguments,r=new G(e[0]);t<e.length;)r=r.plus(e[t++]);return r},n=function(){function t(t,e,r,n){for(var i,o,A=[0],a=0,s=t.length;a<s;){for(o=A.length;o--;A[o]*=e);for(A[0]+=n.indexOf(t.charAt(a++)),i=0;i<A.length;i++)A[i]>r-1&&(null==A[i+1]&&(A[i+1]=0),A[i+1]+=A[i]/r|0,A[i]%=r)}return A.reverse()}return function(e,n,i,o,A){var a,s,c,u,f,h,l,d,g=e.indexOf("."),p=M,y=k;for(g>=0&&(u=L,L=0,e=e.replace(".",""),h=(d=new G(n)).pow(e.length-g),L=u,d.c=t(B(I(h.c),h.e,"0"),10,i,"0123456789"),d.e=d.c.length),c=u=(l=t(e,n,i,A?(a=T,"0123456789"):(a="0123456789",T))).length;0==l[--u];l.pop());if(!l[0])return a.charAt(0);if(g<0?--c:(h.c=l,h.e=c,h.s=o,l=(h=r(h,d,p,y,i)).c,f=h.r,c=h.e),g=l[s=c+p+1],u=i/2,f=f||s<0||null!=l[s+1],f=y<4?(null!=g||f)&&(0==y||y==(h.s<0?3:2)):g>u||g==u&&(4==y||f||6==y&&1&l[s-1]||y==(h.s<0?8:7)),s<1||!l[0])e=f?B(a.charAt(1),-p,a.charAt(0)):a.charAt(0);else{if(l.length=s,f)for(--i;++l[--s]>i;)l[s]=0,s||(++c,l=[1].concat(l));for(u=l.length;!l[--u];);for(g=0,e="";g<=u;e+=a.charAt(l[g++]));e=B(e,c,a.charAt(0))}return e}}(),r=function(){function t(t,e,r){var n,i,o,A,a=0,s=t.length,c=e%1e7,u=e/1e7|0;for(t=t.slice();s--;)a=((i=c*(o=t[s]%1e7)+(n=u*o+(A=t[s]/1e7|0)*c)%1e7*1e7+a)/r|0)+(n/1e7|0)+u*A,t[s]=i%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(n,i,o,A,a){var s,c,f,h,d,g,I,y,C,E,b,B,m,w,v,Q,_,D=n.s==i.s?1:-1,S=n.c,M=i.c;if(!(S&&S[0]&&M&&M[0]))return new G(n.s&&i.s&&(S?!M||S[0]!=M[0]:M)?S&&0==S[0]||!M?0*D:D/0:NaN);for(C=(y=new G(D)).c=[],D=o+(c=n.e-i.e)+1,a||(a=l,c=p(n.e/14)-p(i.e/14),D=D/14|0),f=0;M[f]==(S[f]||0);f++);if(M[f]>(S[f]||0)&&c--,D<0)C.push(1),h=!0;else{for(w=S.length,Q=M.length,f=0,D+=2,(d=u(a/(M[0]+1)))>1&&(M=t(M,d,a),S=t(S,d,a),Q=M.length,w=S.length),m=Q,b=(E=S.slice(0,Q)).length;b<Q;E[b++]=0);_=M.slice(),_=[0].concat(_),v=M[0],M[1]>=a/2&&v++;do{if(d=0,(s=e(M,E,Q,b))<0){if(B=E[0],Q!=b&&(B=B*a+(E[1]||0)),(d=u(B/v))>1)for(d>=a&&(d=a-1),I=(g=t(M,d,a)).length,b=E.length;1==e(g,E,I,b);)d--,r(g,Q<I?_:M,I,a),I=g.length,s=1;else 0==d&&(s=d=1),I=(g=M.slice()).length;if(I<b&&(g=[0].concat(g)),r(E,g,b,a),b=E.length,-1==s)for(;e(M,E,Q,b)<1;)d++,r(E,Q<b?_:M,b,a),b=E.length}else 0===s&&(d++,E=[0]);C[f++]=d,E[0]?E[b++]=S[m]||0:(E=[S[m]],b=1)}while((m++<w||null!=E[0])&&D--);h=null!=E[0],C[0]||C.splice(0,1)}if(a==l){for(f=1,D=C[0];D>=10;D/=10,f++);K(y,o+(y.e=f+14*c-1)+1,A,h)}else y.e=c,y.r=+h;return y}}(),m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,w=/^([^.]+)\.$/,v=/^\.([^.]+)$/,Q=/^-?(Infinity|NaN)$/,_=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(t,e,r,n){var i,o=r?e:e.replace(_,"");if(Q.test(o))t.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(m,(function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e})),n&&(i=n,o=o.replace(w,"$1").replace(v,"0.$1")),e!=o))return new G(o,i);if(G.DEBUG)throw Error(f+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},D.absoluteValue=D.abs=function(){var t=new G(this);return t.s<0&&(t.s=1),t},D.comparedTo=function(t,e){return y(this,new G(t,e))},D.decimalPlaces=D.dp=function(t,e){var r,n,i,o=this;if(null!=t)return C(t,0,g),null==e?e=k:C(e,0,8),K(new G(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=14*((i=r.length-1)-p(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},D.dividedBy=D.div=function(t,e){return r(this,new G(t,e),M,k)},D.dividedToIntegerBy=D.idiv=function(t,e){return r(this,new G(t,e),0,1)},D.exponentiatedBy=D.pow=function(t,e){var r,n,i,o,A,a,s,h,l=this;if((t=new G(t)).c&&!t.isInteger())throw Error(f+"Exponent not an integer: "+q(t));if(null!=e&&(e=new G(e)),A=t.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!t.c||!t.c[0])return h=new G(Math.pow(+q(l),A?2-E(t):+q(t))),e?h.mod(e):h;if(a=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new G(NaN);(n=!a&&l.isInteger()&&e.isInteger())&&(l=l.mod(e))}else{if(t.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 o=l.s<0&&E(t)?-0:0,l.e>-1&&(o=1/o),new G(a?1/o:o);L&&(o=c(L/14+2))}for(A?(r=new G(.5),a&&(t.s=1),s=E(t)):s=(i=Math.abs(+q(t)))%2,h=new G(S);;){if(s){if(!(h=h.times(l)).c)break;o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(e))}if(i){if(0===(i=u(i/2)))break;s=i%2}else if(K(t=t.times(r),t.e+1,1),t.e>14)s=E(t);else{if(0===(i=+q(t)))break;s=i%2}l=l.times(l),o?l.c&&l.c.length>o&&(l.c.length=o):n&&(l=l.mod(e))}return n?h:(a&&(h=S.div(h)),e?h.mod(e):o?K(h,L,k,void 0):h)},D.integerValue=function(t){var e=new G(this);return null==t?t=k:C(t,0,8),K(e,e.e+1,t)},D.isEqualTo=D.eq=function(t,e){return 0===y(this,new G(t,e))},D.isFinite=function(){return!!this.c},D.isGreaterThan=D.gt=function(t,e){return y(this,new G(t,e))>0},D.isGreaterThanOrEqualTo=D.gte=function(t,e){return 1===(e=y(this,new G(t,e)))||0===e},D.isInteger=function(){return!!this.c&&p(this.e/14)>this.c.length-2},D.isLessThan=D.lt=function(t,e){return y(this,new G(t,e))<0},D.isLessThanOrEqualTo=D.lte=function(t,e){return-1===(e=y(this,new G(t,e)))||0===e},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(t,e){var r,n,i,o,A=this,a=A.s;if(e=(t=new G(t,e)).s,!a||!e)return new G(NaN);if(a!=e)return t.s=-e,A.plus(t);var s=A.e/14,c=t.e/14,u=A.c,f=t.c;if(!s||!c){if(!u||!f)return u?(t.s=-e,t):new G(f?A:NaN);if(!u[0]||!f[0])return f[0]?(t.s=-e,t):new G(u[0]?A:3==k?-0:0)}if(s=p(s),c=p(c),u=u.slice(),a=s-c){for((o=a<0)?(a=-a,i=u):(c=s,i=f),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(n=(o=(a=u.length)<(e=f.length))?a:e,a=e=0;e<n;e++)if(u[e]!=f[e]){o=u[e]<f[e];break}if(o&&(i=u,u=f,f=i,t.s=-t.s),(e=(n=f.length)-(r=u.length))>0)for(;e--;u[r++]=0);for(e=l-1;n>a;){if(u[--n]<f[n]){for(r=n;r&&!u[--r];u[r]=e);--u[r],u[n]+=l}u[n]-=f[n]}for(;0==u[0];u.splice(0,1),--c);return u[0]?Y(t,u,c):(t.s=3==k?-1:1,t.c=[t.e=0],t)},D.modulo=D.mod=function(t,e){var n,i,o=this;return t=new G(t,e),!o.c||!t.s||t.c&&!t.c[0]?new G(NaN):!t.c||o.c&&!o.c[0]?new G(o):(9==H?(i=t.s,t.s=1,n=r(o,t,0,3),t.s=i,n.s*=i):n=r(o,t,0,H),(t=o.minus(n.times(t))).c[0]||1!=H||(t.s=o.s),t)},D.multipliedBy=D.times=function(t,e){var r,n,i,o,A,a,s,c,u,f,h,d,g,I,y=this,C=y.c,E=(t=new G(t,e)).c;if(!(C&&E&&C[0]&&E[0]))return!y.s||!t.s||C&&!C[0]&&!E||E&&!E[0]&&!C?t.c=t.e=t.s=null:(t.s*=y.s,C&&E?(t.c=[0],t.e=0):t.c=t.e=null),t;for(n=p(y.e/14)+p(t.e/14),t.s*=y.s,(s=C.length)<(f=E.length)&&(g=C,C=E,E=g,i=s,s=f,f=i),i=s+f,g=[];i--;g.push(0));for(I=l,1e7,i=f;--i>=0;){for(r=0,h=E[i]%1e7,d=E[i]/1e7|0,o=i+(A=s);o>i;)r=((c=h*(c=C[--A]%1e7)+(a=d*c+(u=C[A]/1e7|0)*h)%1e7*1e7+g[o]+r)/I|0)+(a/1e7|0)+d*u,g[o--]=c%I;g[o]=r}return r?++n:g.splice(0,1),Y(t,g,n)},D.negated=function(){var t=new G(this);return t.s=-t.s||null,t},D.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new G(t,e)).s,!i||!e)return new G(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/14,A=t.e/14,a=n.c,s=t.c;if(!o||!A){if(!a||!s)return new G(i/0);if(!a[0]||!s[0])return s[0]?t:new G(a[0]?n:0*i)}if(o=p(o),A=p(A),a=a.slice(),i=o-A){for(i>0?(A=o,r=s):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(e=s.length)<0&&(r=s,s=a,a=r,e=i),i=0;e;)i=(a[--e]=a[e]+s[e]+i)/l|0,a[e]=l===a[e]?0:a[e]%l;return i&&(a=[i].concat(a),++A),Y(t,a,A)},D.precision=D.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return C(t,1,g),null==e?e=k:C(e,0,8),K(new G(o),t,e);if(!(r=o.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},D.shiftedBy=function(t){return C(t,-9007199254740991,9007199254740991),this.times("1e"+t)},D.squareRoot=D.sqrt=function(){var t,e,n,i,o,A=this,a=A.c,s=A.s,c=A.e,u=M+4,f=new G("0.5");if(1!==s||!a||!a[0])return new G(!s||s<0&&(!a||a[0])?NaN:a?A:1/0);if(0==(s=Math.sqrt(+q(A)))||s==1/0?(((e=I(a)).length+c)%2==0&&(e+="0"),s=Math.sqrt(+e),c=p((c+1)/2)-(c<0||c%2),n=new G(e=s==1/0?"1e"+c:(e=s.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new G(s+""),n.c[0])for((s=(c=n.e)+u)<3&&(s=0);;)if(o=n,n=f.times(o.plus(r(A,o,u,1))),I(o.c).slice(0,s)===(e=I(n.c)).slice(0,s)){if(n.e<c&&--s,"9999"!=(e=e.slice(s-3,s+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(K(n,n.e+M+2,1),t=!n.times(n).eq(A));break}if(!i&&(K(o,o.e+M+2,0),o.times(o).eq(A))){n=o;break}u+=4,s+=4,i=1}return K(n,n.e+M+1,k,t)},D.toExponential=function(t,e){return null!=t&&(C(t,0,g),t++),P(this,t,e,1)},D.toFixed=function(t,e){return null!=t&&(C(t,0,g),t=t+this.e+1),P(this,t,e)},D.toFormat=function(t,e,r){var n,o=this;if(null==r)null!=t&&e&&"object"==i(e)?(r=e,e=null):t&&"object"==i(t)?(r=t,t=e=null):r=O;else if("object"!=i(r))throw Error(f+"Argument not an object: "+r);if(n=o.toFixed(t,e),o.c){var A,a=n.split("."),s=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",h=a[0],l=a[1],d=o.s<0,g=d?h.slice(1):h,p=g.length;if(c&&(A=s,s=c,c=A,p-=A),s>0&&p>0){for(A=p%s||s,h=g.substr(0,A);A<p;A+=s)h+=u+g.substr(A,s);c>0&&(h+=u+g.slice(A)),d&&(h="-"+h)}n=l?h+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):h}return(r.prefix||"")+n+(r.suffix||"")},D.toFraction=function(t){var e,n,i,o,A,a,s,c,u,h,l,g,p=this,y=p.c;if(null!=t&&(!(s=new G(t)).isInteger()&&(s.c||1!==s.s)||s.lt(S)))throw Error(f+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+q(s));if(!y)return new G(p);for(e=new G(S),u=n=new G(S),i=c=new G(S),g=I(y),A=e.e=g.length-p.e-1,e.c[0]=d[(a=A%14)<0?14+a:a],t=!t||s.comparedTo(e)>0?A>0?e:u:s,a=F,F=1/0,s=new G(g),c.c[0]=0;h=r(s,e,0,1),1!=(o=n.plus(h.times(i))).comparedTo(t);)n=i,i=o,u=c.plus(h.times(o=u)),c=o,e=s.minus(h.times(o=e)),s=o;return o=r(t.minus(n),i,0,1),c=c.plus(o.times(u)),n=n.plus(o.times(i)),c.s=u.s=p.s,l=r(u,i,A*=2,k).minus(p).abs().comparedTo(r(c,n,A,k).minus(p).abs())<1?[u,i]:[c,n],F=a,l},D.toNumber=function(){return+q(this)},D.toPrecision=function(t,e){return null!=t&&C(t,1,g),P(this,t,e,2)},D.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=x||o>=R?b(I(r.c),o):B(I(r.c),o,"0"):10===t?e=B(I((r=K(new G(r),M+o+1,k)).c),r.e,"0"):(C(t,2,T.length,"Base"),e=n(B(I(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},D.valueOf=D.toJSON=function(){return q(this)},D._isBigNumber=!0,s&&(D[Symbol.toStringTag]="BigNumber",D[Symbol.for("nodejs.util.inspect.custom")]=D.valueOf),null!=e&&G.set(e),G}()).default=A.BigNumber=A,void 0===(n=function(){return A}.call(e,r,e,t))||(t.exports=n)}()},function(t,e,r){t.exports={encode:r(167),decode:r(168),encodingLength:r(169)}},function(t,e){t.exports=function t(e,n,i){n=n||[];var o=i=i||0;for(;e>=r;)n[i++]=255&e|128,e/=128;for(;-128&e;)n[i++]=255&e|128,e>>>=7;return n[i]=0|e,t.bytes=i-o+1,n};var r=Math.pow(2,31)},function(t,e){t.exports=function t(e,r){var n,i=0,o=0,A=r=r||0,a=e.length;do{if(A>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[A++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return t.bytes=A-r,i}},function(t,e){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),A=Math.pow(2,35),a=Math.pow(2,42),s=Math.pow(2,49),c=Math.pow(2,56),u=Math.pow(2,63);t.exports=function(t){return t<r?1:t<n?2:t<i?3:t<o?4:t<A?5:t<a?6:t<s?7:t<c?8:t<u?9:10}},function(t,e,r){"use strict";r.r(e),r.d(e,"Deflate",(function(){return ze})),r.d(e,"Inflate",(function(){return Xe})),r.d(e,"constants",(function(){return rr})),r.d(e,"default",(function(){return nr})),r.d(e,"deflate",(function(){return Ze})),r.d(e,"deflateRaw",(function(){return Ve})),r.d(e,"gzip",(function(){return We})),r.d(e,"inflate",(function(){return $e})),r.d(e,"inflateRaw",(function(){return tr})),r.d(e,"ungzip",(function(){return er}));function n(t){let e=t.length;for(;--e>=0;)t[e]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);n(s);const c=new Array(60);n(c);const u=new Array(512);n(u);const f=new Array(256);n(f);const h=new Array(29);n(h);const l=new Array(30);function d(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let g,p,I;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}n(l);const C=t=>t<256?u[t]:u[256+(t>>>7)],E=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},b=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,E(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},B=(t,e,r)=>{b(t,r[2*e],r[2*e+1])},m=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},w=(t,e,r)=>{const n=new Array(16);let i,o,A=0;for(i=1;i<=15;i++)n[i]=A=A+r[i-1]<<1;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=m(n[e]++,e))}},v=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},Q=t=>{t.bi_valid>8?E(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},_=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]},D=(t,e,r)=>{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i<t.heap_len&&_(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!_(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},S=(t,e,r)=>{let n,A,a,s,c=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],A=t.pending_buf[t.l_buf+c],c++,0===n?B(t,A,e):(a=f[A],B(t,a+256+1,e),s=i[a],0!==s&&(A-=h[a],b(t,A,s)),n--,a=C(n),B(t,a,r),s=o[a],0!==s&&(n-=l[a],b(t,n,s)))}while(c<t.last_lit);B(t,256,e)},M=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let A,a,s,c=-1;for(t.heap_len=0,t.heap_max=573,A=0;A<o;A++)0!==r[2*A]?(t.heap[++t.heap_len]=c=A,t.depth[A]=0):r[2*A+1]=0;for(;t.heap_len<2;)s=t.heap[++t.heap_len]=c<2?++c:0,r[2*s]=1,t.depth[s]=0,t.opt_len--,i&&(t.static_len-=n[2*s+1]);for(e.max_code=c,A=t.heap_len>>1;A>=1;A--)D(t,r,A);s=o;do{A=t.heap[1],t.heap[1]=t.heap[t.heap_len--],D(t,r,1),a=t.heap[1],t.heap[--t.heap_max]=A,t.heap[--t.heap_max]=a,r[2*s]=r[2*A]+r[2*a],t.depth[s]=(t.depth[A]>=t.depth[a]?t.depth[A]:t.depth[a])+1,r[2*A+1]=r[2*a+1]=s,t.heap[1]=s++,D(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,A=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,s=e.stat_desc.max_length;let c,u,f,h,l,d,g=0;for(h=0;h<=15;h++)t.bl_count[h]=0;for(r[2*t.heap[t.heap_max]+1]=0,c=t.heap_max+1;c<573;c++)u=t.heap[c],h=r[2*r[2*u+1]+1]+1,h>s&&(h=s,g++),r[2*u+1]=h,u>n||(t.bl_count[h]++,l=0,u>=a&&(l=A[u-a]),d=r[2*u],t.opt_len+=d*(h+l),o&&(t.static_len+=d*(i[2*u+1]+l)));if(0!==g){do{for(h=s-1;0===t.bl_count[h];)h--;t.bl_count[h]--,t.bl_count[h+1]+=2,t.bl_count[s]--,g-=2}while(g>0);for(h=s;0!==h;h--)for(u=t.bl_count[h];0!==u;)f=t.heap[--c],f>n||(r[2*f+1]!==h&&(t.opt_len+=(h-r[2*f+1])*r[2*f],r[2*f+1]=h),u--)}})(t,e),w(r,c,t.bl_count)},k=(t,e,r)=>{let n,i,o=-1,A=e[1],a=0,s=7,c=4;for(0===A&&(s=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=A,A=e[2*(n+1)+1],++a<s&&i===A||(a<c?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,o=i,0===A?(s=138,c=3):i===A?(s=6,c=3):(s=7,c=4))},x=(t,e,r)=>{let n,i,o=-1,A=e[1],a=0,s=7,c=4;for(0===A&&(s=138,c=3),n=0;n<=r;n++)if(i=A,A=e[2*(n+1)+1],!(++a<s&&i===A)){if(a<c)do{B(t,i,t.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(B(t,i,t.bl_tree),a--),B(t,16,t.bl_tree),b(t,a-3,2)):a<=10?(B(t,17,t.bl_tree),b(t,a-3,3)):(B(t,18,t.bl_tree),b(t,a-11,7));a=0,o=i,0===A?(s=138,c=3):i===A?(s=6,c=3):(s=7,c=4)}};let R=!1;const N=(t,e,r,n)=>{b(t,0+(n?1:0),3),((t,e,r,n)=>{Q(t),n&&(E(t,r),E(t,~r)),t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r})(t,e,r,!0)};var F={_tr_init:t=>{R||((()=>{let t,e,r,n,a;const y=new Array(16);for(r=0,n=0;n<28;n++)for(h[n]=r,t=0;t<1<<i[n];t++)f[r++]=n;for(f[r-1]=n,a=0,n=0;n<16;n++)for(l[n]=a,t=0;t<1<<o[n];t++)u[a++]=n;for(a>>=7;n<30;n++)for(l[n]=a<<7,t=0;t<1<<o[n]-7;t++)u[256+a++]=n;for(e=0;e<=15;e++)y[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,y[8]++;for(;t<=255;)s[2*t+1]=9,t++,y[9]++;for(;t<=279;)s[2*t+1]=7,t++,y[7]++;for(;t<=287;)s[2*t+1]=8,t++,y[8]++;for(w(s,287,y),t=0;t<30;t++)c[2*t+1]=5,c[2*t]=m(t,5);g=new d(s,i,257,286,15),p=new d(c,o,0,30,15),I=new d(new Array(0),A,0,19,7)})(),R=!0),t.l_desc=new y(t.dyn_ltree,g),t.d_desc=new y(t.dyn_dtree,p),t.bl_desc=new y(t.bl_tree,I),t.bi_buf=0,t.bi_valid=0,v(t)},_tr_stored_block:N,_tr_flush_block:(t,e,r,n)=>{let i,o,A=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),M(t,t.l_desc),M(t,t.d_desc),A=(t=>{let e;for(k(t,t.dyn_ltree,t.l_desc.max_code),k(t,t.dyn_dtree,t.d_desc.max_code),M(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*a[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?N(t,e,r,n):4===t.strategy||o===i?(b(t,2+(n?1:0),3),S(t,s,c)):(b(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(b(t,e-257,5),b(t,r-1,5),b(t,n-4,4),i=0;i<n;i++)b(t,t.bl_tree[2*a[i]+1],3);x(t,t.dyn_ltree,e-1),x(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,A+1),S(t,t.dyn_ltree,t.dyn_dtree)),v(t),n&&Q(t)},_tr_tally:(t,e,r)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(f[r]+256+1)]++,t.dyn_dtree[2*C(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{b(t,2,3),B(t,256,s),(t=>{16===t.bi_valid?(E(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var U=(t,e,r,n)=>{let i=65535&t|0,o=t>>>16&65535|0,A=0;for(;0!==r;){A=r>2e3?2e3:r,r-=A;do{i=i+e[n++]|0,o=o+i|0}while(--A);i%=65521,o%=65521}return i|o<<16|0};const H=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var L=(t,e,r,n)=>{const i=H,o=n+r;t^=-1;for(let r=n;r<o;r++)t=t>>>8^i[255&(t^e[r])];return-1^t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},T={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:G,_tr_stored_block:P,_tr_flush_block:j,_tr_tally:Y,_tr_align:K}=F,{Z_NO_FLUSH:q,Z_PARTIAL_FLUSH:J,Z_FULL_FLUSH:z,Z_FINISH:Z,Z_BLOCK:V,Z_OK:W,Z_STREAM_END:X,Z_STREAM_ERROR:$,Z_DATA_ERROR:tt,Z_BUF_ERROR:et,Z_DEFAULT_COMPRESSION:rt,Z_FILTERED:nt,Z_HUFFMAN_ONLY:it,Z_RLE:ot,Z_FIXED:At,Z_DEFAULT_STRATEGY:at,Z_UNKNOWN:st,Z_DEFLATED:ct}=T,ut=(t,e)=>(t.msg=O[e],e),ft=t=>(t<<1)-(t>4?9:0),ht=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let lt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const dt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},gt=(t,e)=>{j(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,dt(t.strm)},pt=(t,e)=>{t.pending_buf[t.pending++]=e},It=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},yt=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=U(t.adler,e,i,r):2===t.state.wrap&&(t.adler=L(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Ct=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,A=t.prev_length,a=t.nice_match;const s=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,u=t.w_mask,f=t.prev,h=t.strstart+258;let l=c[o+A-1],d=c[o+A];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(r=e,c[r+A]===d&&c[r+A-1]===l&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<h);if(n=258-(h-o),o=h-258,n>A){if(t.match_start=e,A=n,n>=a)break;l=c[o+A-1],d=c[o+A]}}}while((e=f[e&u])>s&&0!=--i);return A<=t.lookahead?A:t.lookahead},Et=t=>{const e=t.w_size;let r,n,i,o,A;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,n=t.hash_size,r=n;do{i=t.head[--r],t.head[r]=i>=e?i-e:0}while(--n);n=e,r=n;do{i=t.prev[--r],t.prev[r]=i>=e?i-e:0}while(--n);o+=e}if(0===t.strm.avail_in)break;if(n=yt(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=n,t.lookahead+t.insert>=3)for(A=t.strstart-t.insert,t.ins_h=t.window[A],t.ins_h=lt(t,t.ins_h,t.window[A+1]);t.insert&&(t.ins_h=lt(t,t.ins_h,t.window[A+3-1]),t.prev[A&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=A,A++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},bt=(t,e)=>{let r,n;for(;;){if(t.lookahead<262){if(Et(t),t.lookahead<262&&e===q)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=lt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=Ct(t,r)),t.match_length>=3)if(n=Y(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=lt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=lt(t,t.ins_h,t.window[t.strstart+1]);else n=Y(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(gt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===Z?(gt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(gt(t,!1),0===t.strm.avail_out)?1:2},Bt=(t,e)=>{let r,n,i;for(;;){if(t.lookahead<262){if(Et(t),t.lookahead<262&&e===q)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=lt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=Ct(t,r),t.match_length<=5&&(t.strategy===nt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=Y(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=lt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(gt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=Y(t,0,t.window[t.strstart-1]),n&>(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=Y(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===Z?(gt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(gt(t,!1),0===t.strm.avail_out)?1:2};function mt(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const wt=[new mt(0,0,0,0,(t,e)=>{let r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Et(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,gt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(gt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Z?(gt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(gt(t,!1),t.strm.avail_out),1)}),new mt(4,4,8,4,bt),new mt(4,5,16,8,bt),new mt(4,6,32,32,bt),new mt(4,4,16,16,Bt),new mt(8,16,32,32,Bt),new mt(8,16,128,128,Bt),new mt(8,32,128,256,Bt),new mt(32,128,258,1024,Bt),new mt(32,258,258,4096,Bt)];function vt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ct,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ht(this.dyn_ltree),ht(this.dyn_dtree),ht(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ht(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ht(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Qt=t=>{if(!t||!t.state)return ut(t,$);t.total_in=t.total_out=0,t.data_type=st;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=q,G(e),W},_t=t=>{const e=Qt(t);var r;return e===W&&((r=t.state).window_size=2*r.w_size,ht(r.head),r.max_lazy_match=wt[r.level].max_lazy,r.good_match=wt[r.level].good_length,r.nice_match=wt[r.level].nice_length,r.max_chain_length=wt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e},Dt=(t,e,r,n,i,o)=>{if(!t)return $;let A=1;if(e===rt&&(e=6),n<0?(A=0,n=-n):n>15&&(A=2,n-=16),i<1||i>9||r!==ct||n<8||n>15||e<0||e>9||o<0||o>At)return ut(t,$);8===n&&(n=9);const a=new vt;return t.state=a,a.strm=t,a.wrap=A,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=e,a.strategy=o,a.method=r,_t(t)};var St={deflateInit:(t,e)=>Dt(t,e,ct,15,8,at),deflateInit2:Dt,deflateReset:_t,deflateResetKeep:Qt,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?$:(t.state.gzhead=e,W):$,deflate:(t,e)=>{let r,n;if(!t||!t.state||e>V||e<0)return t?ut(t,$):$;const i=t.state;if(!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==Z)return ut(t,0===t.avail_out?et:$);i.strm=t;const o=i.last_flush;if(i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,pt(i,31),pt(i,139),pt(i,8),i.gzhead?(pt(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),pt(i,255&i.gzhead.time),pt(i,i.gzhead.time>>8&255),pt(i,i.gzhead.time>>16&255),pt(i,i.gzhead.time>>24&255),pt(i,9===i.level?2:i.strategy>=it||i.level<2?4:0),pt(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(pt(i,255&i.gzhead.extra.length),pt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=L(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(pt(i,0),pt(i,0),pt(i,0),pt(i,0),pt(i,0),pt(i,9===i.level?2:i.strategy>=it||i.level<2?4:0),pt(i,3),i.status=113);else{let e=ct+(i.w_bits-8<<4)<<8,r=-1;r=i.strategy>=it||i.level<2?0:i.level<6?1:6===i.level?2:3,e|=r<<6,0!==i.strstart&&(e|=32),e+=31-e%31,i.status=113,It(i,e),0!==i.strstart&&(It(i,t.adler>>>16),It(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(r=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>r&&(t.adler=L(t.adler,i.pending_buf,i.pending-r,r)),dt(t),r=i.pending,i.pending!==i.pending_buf_size));)pt(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>r&&(t.adler=L(t.adler,i.pending_buf,i.pending-r,r)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(t.adler=L(t.adler,i.pending_buf,i.pending-r,r)),dt(t),r=i.pending,i.pending===i.pending_buf_size)){n=1;break}n=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,pt(i,n)}while(0!==n);i.gzhead.hcrc&&i.pending>r&&(t.adler=L(t.adler,i.pending_buf,i.pending-r,r)),0===n&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){r=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>r&&(t.adler=L(t.adler,i.pending_buf,i.pending-r,r)),dt(t),r=i.pending,i.pending===i.pending_buf_size)){n=1;break}n=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,pt(i,n)}while(0!==n);i.gzhead.hcrc&&i.pending>r&&(t.adler=L(t.adler,i.pending_buf,i.pending-r,r)),0===n&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&dt(t),i.pending+2<=i.pending_buf_size&&(pt(i,255&t.adler),pt(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(dt(t),0===t.avail_out)return i.last_flush=-1,W}else if(0===t.avail_in&&ft(e)<=ft(o)&&e!==Z)return ut(t,et);if(666===i.status&&0!==t.avail_in)return ut(t,et);if(0!==t.avail_in||0!==i.lookahead||e!==q&&666!==i.status){let r=i.strategy===it?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Et(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,r=Y(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(gt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Z?(gt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(gt(t,!1),0===t.strm.avail_out)?1:2})(i,e):i.strategy===ot?((t,e)=>{let r,n,i,o;const A=t.window;for(;;){if(t.lookahead<=258){if(Et(t),t.lookahead<=258&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=A[i],n===A[++i]&&n===A[++i]&&n===A[++i])){o=t.strstart+258;do{}while(n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&n===A[++i]&&i<o);t.match_length=258-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=Y(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=Y(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(gt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Z?(gt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(gt(t,!1),0===t.strm.avail_out)?1:2})(i,e):wt[i.level].func(i,e);if(3!==r&&4!==r||(i.status=666),1===r||3===r)return 0===t.avail_out&&(i.last_flush=-1),W;if(2===r&&(e===J?K(i):e!==V&&(P(i,0,0,!1),e===z&&(ht(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),dt(t),0===t.avail_out))return i.last_flush=-1,W}return e!==Z?W:i.wrap<=0?X:(2===i.wrap?(pt(i,255&t.adler),pt(i,t.adler>>8&255),pt(i,t.adler>>16&255),pt(i,t.adler>>24&255),pt(i,255&t.total_in),pt(i,t.total_in>>8&255),pt(i,t.total_in>>16&255),pt(i,t.total_in>>24&255)):(It(i,t.adler>>>16),It(i,65535&t.adler)),dt(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?W:X)},deflateEnd:t=>{if(!t||!t.state)return $;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?ut(t,$):(t.state=null,113===e?ut(t,tt):W)},deflateSetDictionary:(t,e)=>{let r=e.length;if(!t||!t.state)return $;const n=t.state,i=n.wrap;if(2===i||1===i&&42!==n.status||n.lookahead)return $;if(1===i&&(t.adler=U(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(ht(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,A=t.next_in,a=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Et(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=lt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Et(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=A,t.input=a,t.avail_in=o,n.wrap=i,W},deflateInfo:"pako deflate (from Nodeca project)"};const Mt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var kt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Mt(r,e)&&(t[e]=r[e])}}return t},xt=t=>{let e=0;for(let r=0,n=t.length;r<n;r++)e+=t[r].length;const r=new Uint8Array(e);for(let e=0,n=0,i=t.length;e<i;e++){let i=t[e];r.set(i,n),n+=i.length}return r};let Rt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Rt=!1}const Nt=new Uint8Array(256);for(let t=0;t<256;t++)Nt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Nt[254]=Nt[254]=1;var Ft=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,A=t.length,a=0;for(i=0;i<A;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<A&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(a),o=0,i=0;o<a;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<A&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?e[o++]=r:r<2048?(e[o++]=192|r>>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},Ut=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n<r;){let e=t[n++];if(e<128){o[i++]=e;continue}let A=Nt[e];if(A>4)o[i++]=65533,n+=A-1;else{for(e&=2===A?31:3===A?15:7;A>1&&n<r;)e=e<<6|63&t[n++],A--;A>1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Rt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(o,i)},Ht=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+Nt[t[r]]>e?r:e};var Lt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ot=Object.prototype.toString,{Z_NO_FLUSH:Tt,Z_SYNC_FLUSH:Gt,Z_FULL_FLUSH:Pt,Z_FINISH:jt,Z_OK:Yt,Z_STREAM_END:Kt,Z_DEFAULT_COMPRESSION:qt,Z_DEFAULT_STRATEGY:Jt,Z_DEFLATED:zt}=T;function Zt(t){this.options=kt({level:qt,method:zt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Jt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Lt,this.strm.avail_out=0;let r=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==Yt)throw new Error(O[r]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Ft(e.dictionary):"[object ArrayBuffer]"===Ot.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=St.deflateSetDictionary(this.strm,t),r!==Yt)throw new Error(O[r]);this._dict_set=!0}}function Vt(t,e){const r=new Zt(e);if(r.push(t,!0),r.err)throw r.msg||O[r.err];return r.result}Zt.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?jt:Tt,"string"==typeof t?r.input=Ft(t):"[object ArrayBuffer]"===Ot.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===Gt||o===Pt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=St.deflate(r,o),i===Kt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=St.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Yt;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Zt.prototype.onData=function(t){this.chunks.push(t)},Zt.prototype.onEnd=function(t){t===Yt&&(this.result=xt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Wt={Deflate:Zt,deflate:Vt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Vt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Vt(t,e)},constants:T};var Xt=function(t,e){let r,n,i,o,A,a,s,c,u,f,h,l,d,g,p,I,y,C,E,b,B,m,w,v;const Q=t.state;r=t.next_in,w=t.input,n=r+(t.avail_in-5),i=t.next_out,v=t.output,o=i-(e-t.avail_out),A=i+(t.avail_out-257),a=Q.dmax,s=Q.wsize,c=Q.whave,u=Q.wnext,f=Q.window,h=Q.hold,l=Q.bits,d=Q.lencode,g=Q.distcode,p=(1<<Q.lenbits)-1,I=(1<<Q.distbits)-1;t:do{l<15&&(h+=w[r++]<<l,l+=8,h+=w[r++]<<l,l+=8),y=d[h&p];e:for(;;){if(C=y>>>24,h>>>=C,l-=C,C=y>>>16&255,0===C)v[i++]=65535&y;else{if(!(16&C)){if(0==(64&C)){y=d[(65535&y)+(h&(1<<C)-1)];continue e}if(32&C){Q.mode=12;break t}t.msg="invalid literal/length code",Q.mode=30;break t}E=65535&y,C&=15,C&&(l<C&&(h+=w[r++]<<l,l+=8),E+=h&(1<<C)-1,h>>>=C,l-=C),l<15&&(h+=w[r++]<<l,l+=8,h+=w[r++]<<l,l+=8),y=g[h&I];r:for(;;){if(C=y>>>24,h>>>=C,l-=C,C=y>>>16&255,!(16&C)){if(0==(64&C)){y=g[(65535&y)+(h&(1<<C)-1)];continue r}t.msg="invalid distance code",Q.mode=30;break t}if(b=65535&y,C&=15,l<C&&(h+=w[r++]<<l,l+=8,l<C&&(h+=w[r++]<<l,l+=8)),b+=h&(1<<C)-1,b>a){t.msg="invalid distance too far back",Q.mode=30;break t}if(h>>>=C,l-=C,C=i-o,b>C){if(C=b-C,C>c&&Q.sane){t.msg="invalid distance too far back",Q.mode=30;break t}if(B=0,m=f,0===u){if(B+=s-C,C<E){E-=C;do{v[i++]=f[B++]}while(--C);B=i-b,m=v}}else if(u<C){if(B+=s+u-C,C-=u,C<E){E-=C;do{v[i++]=f[B++]}while(--C);if(B=0,u<E){C=u,E-=C;do{v[i++]=f[B++]}while(--C);B=i-b,m=v}}}else if(B+=u-C,C<E){E-=C;do{v[i++]=f[B++]}while(--C);B=i-b,m=v}for(;E>2;)v[i++]=m[B++],v[i++]=m[B++],v[i++]=m[B++],E-=3;E&&(v[i++]=m[B++],E>1&&(v[i++]=m[B++]))}else{B=i-b;do{v[i++]=v[B++],v[i++]=v[B++],v[i++]=v[B++],E-=3}while(E>2);E&&(v[i++]=v[B++],E>1&&(v[i++]=v[B++]))}break}}break}}while(r<n&&i<A);E=l>>3,r-=E,l-=E<<3,h&=(1<<l)-1,t.next_in=r,t.next_out=i,t.avail_in=r<n?n-r+5:5-(r-n),t.avail_out=i<A?A-i+257:257-(i-A),Q.hold=h,Q.bits=l};const $t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),te=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ee=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),re=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,r,n,i,o,A,a)=>{const s=a.bits;let c,u,f,h,l,d,g=0,p=0,I=0,y=0,C=0,E=0,b=0,B=0,m=0,w=0,v=null,Q=0;const _=new Uint16Array(16),D=new Uint16Array(16);let S,M,k,x=null,R=0;for(g=0;g<=15;g++)_[g]=0;for(p=0;p<n;p++)_[e[r+p]]++;for(C=s,y=15;y>=1&&0===_[y];y--);if(C>y&&(C=y),0===y)return i[o++]=20971520,i[o++]=20971520,a.bits=1,0;for(I=1;I<y&&0===_[I];I++);for(C<I&&(C=I),B=1,g=1;g<=15;g++)if(B<<=1,B-=_[g],B<0)return-1;if(B>0&&(0===t||1!==y))return-1;for(D[1]=0,g=1;g<15;g++)D[g+1]=D[g]+_[g];for(p=0;p<n;p++)0!==e[r+p]&&(A[D[e[r+p]]++]=p);if(0===t?(v=x=A,d=19):1===t?(v=$t,Q-=257,x=te,R-=257,d=256):(v=ee,x=re,d=-1),w=0,p=0,g=I,l=o,E=C,b=0,f=-1,m=1<<C,h=m-1,1===t&&m>852||2===t&&m>592)return 1;for(;;){S=g-b,A[p]<d?(M=0,k=A[p]):A[p]>d?(M=x[R+A[p]],k=v[Q+A[p]]):(M=96,k=0),c=1<<g-b,u=1<<E,I=u;do{u-=c,i[l+(w>>b)+u]=S<<24|M<<16|k|0}while(0!==u);for(c=1<<g-1;w&c;)c>>=1;if(0!==c?(w&=c-1,w+=c):w=0,p++,0==--_[g]){if(g===y)break;g=e[r+A[p]]}if(g>C&&(w&h)!==f){for(0===b&&(b=C),l+=I,E=g-b,B=1<<E;E+b<y&&(B-=_[E+b],!(B<=0));)E++,B<<=1;if(m+=1<<E,1===t&&m>852||2===t&&m>592)return 1;f=w&h,i[f]=C<<24|E<<16|l-o|0}}return 0!==w&&(i[l+w]=g-b<<24|64<<16|0),a.bits=C,0};const{Z_FINISH:ie,Z_BLOCK:oe,Z_TREES:Ae,Z_OK:ae,Z_STREAM_END:se,Z_NEED_DICT:ce,Z_STREAM_ERROR:ue,Z_DATA_ERROR:fe,Z_MEM_ERROR:he,Z_BUF_ERROR:le,Z_DEFLATED:de}=T,ge=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function pe(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ie=t=>{if(!t||!t.state)return ue;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ae},ye=t=>{if(!t||!t.state)return ue;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Ie(t)},Ce=(t,e)=>{let r;if(!t||!t.state)return ue;const n=t.state;return e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?ue:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,ye(t))},Ee=(t,e)=>{if(!t)return ue;const r=new pe;t.state=r,r.window=null;const n=Ce(t,e);return n!==ae&&(t.state=null),n};let be,Be,me=!0;const we=t=>{if(me){be=new Int32Array(512),Be=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,be,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Be,0,t.work,{bits:5}),me=!1}t.lencode=be,t.lenbits=9,t.distcode=Be,t.distbits=5},ve=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0};var Qe={inflateReset:ye,inflateReset2:Ce,inflateResetKeep:Ie,inflateInit:t=>Ee(t,15),inflateInit2:Ee,inflate:(t,e)=>{let r,n,i,o,A,a,s,c,u,f,h,l,d,g,p,I,y,C,E,b,B,m,w=0;const v=new Uint8Array(4);let Q,_;const D=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return ue;r=t.state,12===r.mode&&(r.mode=13),A=t.next_out,i=t.output,s=t.avail_out,o=t.next_in,n=t.input,a=t.avail_in,c=r.hold,u=r.bits,f=a,h=s,m=ae;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;u<16;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(2&r.wrap&&35615===c){r.check=0,v[0]=255&c,v[1]=c>>>8&255,r.check=L(r.check,v,2,0),c=0,u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){t.msg="incorrect header check",r.mode=30;break}if((15&c)!==de){t.msg="unknown compression method",r.mode=30;break}if(c>>>=4,u-=4,B=8+(15&c),0===r.wbits)r.wbits=B;else if(B>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<r.wbits,t.adler=r.check=1,r.mode=512&c?10:12,c=0,u=0;break;case 2:for(;u<16;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(r.flags=c,(255&r.flags)!==de){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(v[0]=255&c,v[1]=c>>>8&255,r.check=L(r.check,v,2,0)),c=0,u=0,r.mode=3;case 3:for(;u<32;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}r.head&&(r.head.time=c),512&r.flags&&(v[0]=255&c,v[1]=c>>>8&255,v[2]=c>>>16&255,v[3]=c>>>24&255,r.check=L(r.check,v,4,0)),c=0,u=0,r.mode=4;case 4:for(;u<16;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(v[0]=255&c,v[1]=c>>>8&255,r.check=L(r.check,v,2,0)),c=0,u=0,r.mode=5;case 5:if(1024&r.flags){for(;u<16;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(v[0]=255&c,v[1]=c>>>8&255,r.check=L(r.check,v,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(l=r.length,l>a&&(l=a),l&&(r.head&&(B=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+l),B)),512&r.flags&&(r.check=L(r.check,n,l,o)),a-=l,o+=l,r.length-=l),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===a)break t;l=0;do{B=n[o+l++],r.head&&B&&r.length<65536&&(r.head.name+=String.fromCharCode(B))}while(B&&l<a);if(512&r.flags&&(r.check=L(r.check,n,l,o)),a-=l,o+=l,B)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===a)break t;l=0;do{B=n[o+l++],r.head&&B&&r.length<65536&&(r.head.comment+=String.fromCharCode(B))}while(B&&l<a);if(512&r.flags&&(r.check=L(r.check,n,l,o)),a-=l,o+=l,B)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;u<16;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(c!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}c=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;u<32;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}t.adler=r.check=ge(c),c=0,u=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=A,t.avail_out=s,t.next_in=o,t.avail_in=a,r.hold=c,r.bits=u,ce;t.adler=r.check=1,r.mode=12;case 12:if(e===oe||e===Ae)break t;case 13:if(r.last){c>>>=7&u,u-=7&u,r.mode=27;break}for(;u<3;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}switch(r.last=1&c,c>>>=1,u-=1,3&c){case 0:r.mode=14;break;case 1:if(we(r),r.mode=20,e===Ae){c>>>=2,u-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}c>>>=2,u-=2;break;case 14:for(c>>>=7&u,u-=7&u;u<32;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if((65535&c)!=(c>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&c,c=0,u=0,r.mode=15,e===Ae)break t;case 15:r.mode=16;case 16:if(l=r.length,l){if(l>a&&(l=a),l>s&&(l=s),0===l)break t;i.set(n.subarray(o,o+l),A),a-=l,o+=l,s-=l,A+=l,r.length-=l;break}r.mode=12;break;case 17:for(;u<14;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(r.nlen=257+(31&c),c>>>=5,u-=5,r.ndist=1+(31&c),c>>>=5,u-=5,r.ncode=4+(15&c),c>>>=4,u-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;u<3;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}r.lens[D[r.have++]]=7&c,c>>>=3,u-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Q={bits:r.lenbits},m=ne(0,r.lens,0,19,r.lencode,0,r.work,Q),r.lenbits=Q.bits,m){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;w=r.lencode[c&(1<<r.lenbits)-1],p=w>>>24,I=w>>>16&255,y=65535&w,!(p<=u);){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(y<16)c>>>=p,u-=p,r.lens[r.have++]=y;else{if(16===y){for(_=p+2;u<_;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(c>>>=p,u-=p,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}B=r.lens[r.have-1],l=3+(3&c),c>>>=2,u-=2}else if(17===y){for(_=p+3;u<_;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}c>>>=p,u-=p,B=0,l=3+(7&c),c>>>=3,u-=3}else{for(_=p+7;u<_;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}c>>>=p,u-=p,B=0,l=11+(127&c),c>>>=7,u-=7}if(r.have+l>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;l--;)r.lens[r.have++]=B}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,Q={bits:r.lenbits},m=ne(1,r.lens,0,r.nlen,r.lencode,0,r.work,Q),r.lenbits=Q.bits,m){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,Q={bits:r.distbits},m=ne(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Q),r.distbits=Q.bits,m){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,e===Ae)break t;case 20:r.mode=21;case 21:if(a>=6&&s>=258){t.next_out=A,t.avail_out=s,t.next_in=o,t.avail_in=a,r.hold=c,r.bits=u,Xt(t,h),A=t.next_out,i=t.output,s=t.avail_out,o=t.next_in,n=t.input,a=t.avail_in,c=r.hold,u=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;w=r.lencode[c&(1<<r.lenbits)-1],p=w>>>24,I=w>>>16&255,y=65535&w,!(p<=u);){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(I&&0==(240&I)){for(C=p,E=I,b=y;w=r.lencode[b+((c&(1<<C+E)-1)>>C)],p=w>>>24,I=w>>>16&255,y=65535&w,!(C+p<=u);){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}c>>>=C,u-=C,r.back+=C}if(c>>>=p,u-=p,r.back+=p,r.length=y,0===I){r.mode=26;break}if(32&I){r.back=-1,r.mode=12;break}if(64&I){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&I,r.mode=22;case 22:if(r.extra){for(_=r.extra;u<_;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;w=r.distcode[c&(1<<r.distbits)-1],p=w>>>24,I=w>>>16&255,y=65535&w,!(p<=u);){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(0==(240&I)){for(C=p,E=I,b=y;w=r.distcode[b+((c&(1<<C+E)-1)>>C)],p=w>>>24,I=w>>>16&255,y=65535&w,!(C+p<=u);){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}c>>>=C,u-=C,r.back+=C}if(c>>>=p,u-=p,r.back+=p,64&I){t.msg="invalid distance code",r.mode=30;break}r.offset=y,r.extra=15&I,r.mode=24;case 24:if(r.extra){for(_=r.extra;u<_;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===s)break t;if(l=h-s,r.offset>l){if(l=r.offset-l,l>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}l>r.wnext?(l-=r.wnext,d=r.wsize-l):d=r.wnext-l,l>r.length&&(l=r.length),g=r.window}else g=i,d=A-r.offset,l=r.length;l>s&&(l=s),s-=l,r.length-=l;do{i[A++]=g[d++]}while(--l);0===r.length&&(r.mode=21);break;case 26:if(0===s)break t;i[A++]=r.length,s--,r.mode=21;break;case 27:if(r.wrap){for(;u<32;){if(0===a)break t;a--,c|=n[o++]<<u,u+=8}if(h-=s,t.total_out+=h,r.total+=h,h&&(t.adler=r.check=r.flags?L(r.check,i,h,A-h):U(r.check,i,h,A-h)),h=s,(r.flags?c:ge(c))!==r.check){t.msg="incorrect data check",r.mode=30;break}c=0,u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;u<32;){if(0===a)break t;a--,c+=n[o++]<<u,u+=8}if(c!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}c=0,u=0}r.mode=29;case 29:m=se;break t;case 30:m=fe;break t;case 31:return he;case 32:default:return ue}return t.next_out=A,t.avail_out=s,t.next_in=o,t.avail_in=a,r.hold=c,r.bits=u,(r.wsize||h!==t.avail_out&&r.mode<30&&(r.mode<27||e!==ie))&&ve(t,t.output,t.next_out,h-t.avail_out),f-=t.avail_in,h-=t.avail_out,t.total_in+=f,t.total_out+=h,r.total+=h,r.wrap&&h&&(t.adler=r.check=r.flags?L(r.check,i,h,t.next_out-h):U(r.check,i,h,t.next_out-h)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===f&&0===h||e===ie)&&m===ae&&(m=le),m},inflateEnd:t=>{if(!t||!t.state)return ue;let e=t.state;return e.window&&(e.window=null),t.state=null,ae},inflateGetHeader:(t,e)=>{if(!t||!t.state)return ue;const r=t.state;return 0==(2&r.wrap)?ue:(r.head=e,e.done=!1,ae)},inflateSetDictionary:(t,e)=>{const r=e.length;let n,i,o;return t&&t.state?(n=t.state,0!==n.wrap&&11!==n.mode?ue:11===n.mode&&(i=1,i=U(i,e,r,0),i!==n.check)?fe:(o=ve(t,e,r,r),o?(n.mode=31,he):(n.havedict=1,ae))):ue},inflateInfo:"pako inflate (from Nodeca project)"};var _e=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Se,Z_FINISH:Me,Z_OK:ke,Z_STREAM_END:xe,Z_NEED_DICT:Re,Z_STREAM_ERROR:Ne,Z_DATA_ERROR:Fe,Z_MEM_ERROR:Ue}=T;function He(t){this.options=kt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Lt,this.strm.avail_out=0;let r=Qe.inflateInit2(this.strm,e.windowBits);if(r!==ke)throw new Error(O[r]);if(this.header=new _e,Qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Ft(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=Qe.inflateSetDictionary(this.strm,e.dictionary),r!==ke)))throw new Error(O[r])}function Le(t,e){const r=new He(e);if(r.push(t),r.err)throw r.msg||O[r.err];return r.result}He.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,A,a;if(this.ended)return!1;for(A=e===~~e?e:!0===e?Me:Se,"[object ArrayBuffer]"===De.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Qe.inflate(r,A),o===Re&&i&&(o=Qe.inflateSetDictionary(r,i),o===ke?o=Qe.inflate(r,A):o===Fe&&(o=Re));r.avail_in>0&&o===xe&&r.state.wrap>0&&0!==t[r.next_in];)Qe.inflateReset(r),o=Qe.inflate(r,A);switch(o){case Ne:case Fe:case Re:case Ue:return this.onEnd(o),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||o===xe))if("string"===this.options.to){let t=Ht(r.output,r.next_out),e=r.next_out-t,i=Ut(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==ke||0!==a){if(o===xe)return o=Qe.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===ke&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=xt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Oe={Inflate:He,inflate:Le,inflateRaw:function(t,e){return(e=e||{}).raw=!0,Le(t,e)},ungzip:Le,constants:T};const{Deflate:Te,deflate:Ge,deflateRaw:Pe,gzip:je}=Wt,{Inflate:Ye,inflate:Ke,inflateRaw:qe,ungzip:Je}=Oe;var ze=Te,Ze=Ge,Ve=Pe,We=je,Xe=Ye,$e=Ke,tr=qe,er=Je,rr=T,nr={Deflate:Te,deflate:Ge,deflateRaw:Pe,gzip:je,Inflate:Ye,inflate:Ke,inflateRaw:qe,ungzip:Je,constants:T}},function(t,e,r){(function(r){var n,i,o,A;function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}A=function(){return function t(e,r,n){function i(A,a){if(!r[A]){if(!e[A]){var s=!1;if(!a&&s)return(void 0)(A,!0);if(o)return o(A,!0);throw(s=new Error("Cannot find module '"+A+"'")).code="MODULE_NOT_FOUND",s}s=r[A]={exports:{}},e[A][0].call(s.exports,(function(t){return i(e[A][1][t]||t)}),s,s.exports,t,e,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.version="4.0.49"},{}],2:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./utils/properties");function i(){n.setType(this,"Signer")}i.isSigner=function(t){return n.isType(t,"Signer")},t=i,r.Signer=t},{"./utils/properties":74}],3:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./utils/bignumber");r.AddressZero="0x0000000000000000000000000000000000000000",r.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000",r.EtherSymbol="Ξ",t=n.bigNumberify(-1),r.NegativeOne=t,t=n.bigNumberify(0),r.Zero=t,t=n.bigNumberify(1),r.One=t,t=n.bigNumberify(2),r.Two=t,t=n.bigNumberify("1000000000000000000"),r.WeiPerEther=t,n=n.bigNumberify("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),r.MaxUint256=n},{"./utils/bignumber":63}],4:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A,s=t("./constants"),c=o(t("./errors")),u=t("./utils/abi-coder"),f=t("./utils/address"),h=t("./utils/bignumber"),l=t("./utils/bytes"),d=t("./utils/interface"),g=t("./utils/properties"),p=t("./providers/abstract-provider"),I=t("./abstract-signer"),y=(i(C,A=I.Signer),C.prototype.getAddress=function(){return Promise.resolve(this.address)},C.prototype._fail=function(t,e){return Promise.resolve().then((function(){c.throwError(t,c.UNSUPPORTED_OPERATION,{operation:e})}))},C.prototype.signMessage=function(t){return this._fail("VoidSigner cannot sign messages","signMessage")},C.prototype.sendTransaction=function(t){return this._fail("VoidSigner cannot sign transactions","sendTransaction")},C.prototype.connect=function(t){return new C(this.address,t)},C);function C(t,e){var r=A.call(this)||this;return g.defineReadOnly(r,"address",t),g.defineReadOnly(r,"provider",e),r}r.VoidSigner=y;var E={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};function b(t,e,r){var n=t.interface.functions[e];return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={},A=null;if(e.length===n.inputs.length+1&&"object"==a(e[e.length-1]))for(var f in null!=(o=g.shallowCopy(e.pop())).blockTag&&(A=o.blockTag),delete o.blockTag,o)if(!E[f])throw new Error("unknown transaction override "+f);if(e.length!=n.inputs.length)throw new Error("incorrect number of arguments");return["data","to"].forEach((function(t){null!=o[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),o.to=t._deployed(A).then((function(){return t.addressPromise})),function t(e,r,n){if(Array.isArray(n)){var i=[];return n.forEach((function(n,o){var A=Array.isArray(r)?r[o]:r[n.name];i.push(t(e,A,n))})),Promise.all(i)}if("address"===n.type)return e.resolveName(r);if("tuple"===n.type)return t(e,r,n.components);var o=n.type.match(/(.*)(\[[0-9]*\]$)/);if(o){if(!Array.isArray(r))throw new Error("invalid value for array");var A=[],a={components:n.components,type:o[1]};return r.forEach((function(r){A.push(t(e,r,a))})),Promise.all(A)}return Promise.resolve(r)}(t.provider,e,n.inputs).then((function(e){if(o.data=n.encode(e),"call"===n.type)return r?Promise.resolve(s.Zero):(t.provider||c.throwError("call (constant functions) require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"call"}),["gasLimit","gasPrice","value"].forEach((function(t){if(null!=o[t])throw new Error("call cannot override "+t)})),null==o.from&&t.signer&&(o.from=t.signer.getAddress()),t.provider.call(o,A).then((function(r){var i;l.hexDataLength(r)%32==4&&"0x08c379a0"===l.hexDataSlice(r,0,4)&&(i=u.defaultAbiCoder.decode(["string"],l.hexDataSlice(r,4)),c.throwError("call revert exception",c.CALL_EXCEPTION,{address:t.address,args:e,method:n.signature,errorSignature:"Error(string)",errorArgs:[i],reason:i,transaction:o}));try{var A=n.decode(r);return 1===n.outputs.length?A[0]:A}catch(i){throw"0x"===r&&0<n.outputs.length&&c.throwError("call exception",c.CALL_EXCEPTION,{address:t.address,method:n.signature,args:e}),i}})));if("transaction"===n.type)return r?(t.provider||c.throwError("estimate gas require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),null==o.from&&t.signer&&(o.from=t.signer.getAddress()),t.provider.estimateGas(o)):(null==o.gasLimit&&null!=n.gas&&(o.gasLimit=h.bigNumberify(n.gas).add(21e3)),t.signer||c.throwError("sending a transaction requires a signer",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=o.from&&c.throwError("cannot override from in a transaction",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.signer.sendTransaction(o).then((function(e){var r=e.wait.bind(e);return e.wait=function(e){return r(e).then((function(e){return e.events=e.logs.map((function(r){var n=g.deepCopy(r);return(r=t.interface.parseLog(r))&&(n.args=r.values,n.decode=r.decode,n.event=r.name,n.eventSignature=r.signature),n.removeListener=function(){return t.provider},n.getBlock=function(){return t.provider.getBlock(e.blockHash)},n.getTransaction=function(){return t.provider.getTransaction(e.transactionHash)},n.getTransactionReceipt=function(){return Promise.resolve(e)},n})),e}))},e})));throw new Error("invalid type - "+n.type)}))}}function B(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.join(":"):""):"*"}var m=(w.prototype.deployed=function(){return this._deployed()},w.prototype._deployed=function(t){var e=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return e})):this._deployedPromise=this.provider.getCode(this.address,t).then((function(t){return"0x"===t&&c.throwError("contract not deployed",c.UNSUPPORTED_OPERATION,{contractAddress:e.address,operation:"getDeployed"}),e}))),this._deployedPromise},w.prototype.fallback=function(t){var e=this;this.signer||c.throwError("sending a transaction requires a signer",c.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=g.shallowCopy(t||{});return["from","to"].forEach((function(t){null!=r[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),r.to=this.addressPromise,this.deployed().then((function(){return e.signer.sendTransaction(r)}))},w.prototype.connect=function(t){return"string"==typeof t&&(t=new y(t,this.provider)),t=new w(this.address,this.interface,t),this.deployTransaction&&g.defineReadOnly(t,"deployTransaction",this.deployTransaction),t},w.prototype.attach=function(t){return new w(t,this.interface,this.signer||this.provider)},w.isIndexed=function(t){return d.Interface.isIndexed(t)},w.prototype._getEventFilter=function(t){var e=this;if("string"==typeof t){if("*"===t)return{prepareEvent:function(t){var r=e.interface.parseLog(t);return r&&(t.args=r.values,t.decode=r.decode,t.event=r.name,t.eventSignature=r.signature),[t]},eventTag:"*",filter:{address:this.address}};-1!==t.indexOf("(")&&(t=u.formatSignature(u.parseSignature("event "+t)));var r=this.interface.events[t];r||c.throwError("unknown event - "+t,c.INVALID_ARGUMENT,{argumnet:"eventName",value:t});var n={address:this.address,topics:[r.topic]};return{prepareEvent:function(t){var e=r.decode(t.data,t.topics);return t.args=e,(e=Array.prototype.slice.call(e)).push(t),e},event:r,eventTag:B(n),filter:n}}n={address:this.address};var i=null;if(t.topics&&t.topics[0])for(var o in n.topics=t.topics,this.interface.events)if(-1!==o.indexOf("(")&&(o=this.interface.events[o]).topic===t.topics[0].toLowerCase()){i=o;break}return{prepareEvent:function(t){if(!i)return[t];var e=i.decode(t.data,t.topics);return t.args=e,(e=Array.prototype.slice.call(e)).push(t),e},event:i,eventTag:B(n),filter:n}},w.prototype._addEventListener=function(t,e,r){var n=this;function i(r){var i=g.deepCopy(r),o=t.prepareEvent(i);t.event&&(i.decode=t.event.decode,i.event=t.event.name,i.eventSignature=t.event.signature),i.removeListener=function(){n.removeListener(t.filter,e)},i.getBlock=function(){return n.provider.getBlock(r.blockHash)},i.getTransaction=function(){return n.provider.getTransaction(r.transactionHash)},i.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(r.transactionHash)},n.emit.apply(n,[t.filter].concat(o))}this.provider||c.throwError("events require a provider or a signer with a provider",c.UNSUPPORTED_OPERATION,{operation:"once"}),this.provider.on(t.filter,i),this._events.push({eventFilter:t,listener:e,wrappedListener:i,once:r})},w.prototype.on=function(t,e){return this._addEventListener(this._getEventFilter(t),e,!1),this},w.prototype.once=function(t,e){return this._addEventListener(this._getEventFilter(t),e,!0),this},w.prototype.addListener=function(t,e){return this.on(t,e)},w.prototype.emit=function(t){for(var e=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(!this.provider)return!1;var i=!1,o=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==o.eventTag||(setTimeout((function(){t.listener.apply(e,r)}),0),i=!0,!t.once)})),i},w.prototype.listenerCount=function(t){if(!this.provider)return 0;var e=this._getEventFilter(t);return this._events.filter((function(t){return t.eventFilter.eventTag===e.eventTag})).length},w.prototype.listeners=function(t){if(!this.provider)return[];var e=this._getEventFilter(t);return this._events.filter((function(t){return t.eventFilter.eventTag===e.eventTag})).map((function(t){return t.listener}))},w.prototype.removeAllListeners=function(t){var e=this;if(!this.provider)return this;var r=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==r.eventTag||(e.provider.removeListener(t.eventFilter.filter,t.wrappedListener),!1)})),this},w.prototype.removeListener=function(t,e){var r=this;if(!this.provider)return this;var n=!1,i=this._getEventFilter(t);return this._events=this._events.filter((function(t){return t.eventFilter.eventTag!==i.eventTag||t.listener!==e||(r.provider.removeListener(t.eventFilter.filter,t.wrappedListener),!!n||!(n=!0))})),this},w);function w(t,e,r){var n=this;if(c.checkNew(this,w),d.Interface.isInterface(e)?g.defineReadOnly(this,"interface",e):g.defineReadOnly(this,"interface",new d.Interface(e)),I.Signer.isSigner(r)?(g.defineReadOnly(this,"provider",r.provider),g.defineReadOnly(this,"signer",r)):p.Provider.isProvider(r)?(g.defineReadOnly(this,"provider",r),g.defineReadOnly(this,"signer",null)):c.throwError("invalid signer or provider",c.INVALID_ARGUMENT,{arg:"signerOrProvider",value:r}),g.defineReadOnly(this,"estimate",{}),g.defineReadOnly(this,"functions",{}),g.defineReadOnly(this,"filters",{}),Object.keys(this.interface.events).forEach((function(t){var e=n.interface.events[t];g.defineReadOnly(n.filters,t,(function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return{address:n.address,topics:e.encodeTopics(t)}}))})),this._events=[],g.defineReadOnly(this,"address",t),this.provider)g.defineReadOnly(this,"addressPromise",this.provider.resolveName(t).then((function(t){if(null==t)throw new Error("name not found");return t})).catch((function(t){throw t})));else try{g.defineReadOnly(this,"addressPromise",Promise.resolve(f.getAddress(t)))}catch(e){c.throwError("provider is required to use non-address contract address",c.INVALID_ARGUMENT,{argument:"addressOrName",value:t})}Object.keys(this.interface.functions).forEach((function(t){var e=b(n,t,!1);null==n[t]?g.defineReadOnly(n,t,e):c.warn("WARNING: Multiple definitions for "+t),null==n.functions[t]&&(g.defineReadOnly(n.functions,t,e),g.defineReadOnly(n.estimate,t,b(n,t,!0)))}))}function v(t,e,r){var n=null;"string"==typeof e?n=e:l.isArrayish(e)?n=l.hexlify(e):"string"==typeof e.object?n=e.object:c.throwError("bytecode must be a valid hex string",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),"0x"!==n.substring(0,2)&&(n="0x"+n),l.isHexString(n)||c.throwError("bytecode must be a valid hex string",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),n.length%2!=0&&c.throwError("bytecode must be valid data (even length)",c.INVALID_ARGUMENT,{arg:"bytecode",value:e}),g.defineReadOnly(this,"bytecode",n),d.Interface.isInterface(t)?g.defineReadOnly(this,"interface",t):g.defineReadOnly(this,"interface",new d.Interface(t)),r&&!I.Signer.isSigner(r)&&c.throwError("invalid signer",c.INVALID_ARGUMENT,{arg:"signer",value:null}),g.defineReadOnly(this,"signer",r||null)}r.Contract=m,v.prototype.getDeployTransaction=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r={};if(t.length===this.interface.deployFunction.inputs.length+1)for(var n in r=g.shallowCopy(t.pop()))if(!E[n])throw new Error("unknown transaction override "+n);return["data","from","to"].forEach((function(t){null!=r[t]&&c.throwError("cannot override "+t,c.UNSUPPORTED_OPERATION,{operation:t})})),c.checkArgumentCount(t.length,this.interface.deployFunction.inputs.length," in Contract constructor"),r.data=this.interface.deployFunction.encode(this.bytecode,t),r},v.prototype.deploy=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=this.getDeployTransaction.apply(this,e);return this.signer.sendTransaction(n).then((function(e){var r=new m(f.getContractAddress(e),t.interface,t.signer);return g.defineReadOnly(r,"deployTransaction",e),r}))},v.prototype.attach=function(t){return new m(t,this.interface,this.signer)},v.prototype.connect=function(t){return new v(this.interface,this.bytecode,t)},v.fromSolidity=function(t,e){null==t&&c.throwError("missing compiler output",c.MISSING_ARGUMENT,{argument:"compilerOutput"});var r=(t="string"==typeof t?JSON.parse(t):t).abi,n=null;return t.bytecode?n=t.bytecode:t.evm&&t.evm.bytecode&&(n=t.evm.bytecode),new v(r,n,e)},i=v,r.ContractFactory=i},{"./abstract-signer":2,"./constants":3,"./errors":5,"./providers/abstract-provider":50,"./utils/abi-coder":59,"./utils/address":60,"./utils/bignumber":63,"./utils/bytes":64,"./utils/interface":69,"./utils/properties":74}],5:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./_version");r.UNKNOWN_ERROR="UNKNOWN_ERROR",r.NOT_IMPLEMENTED="NOT_IMPLEMENTED",r.MISSING_NEW="MISSING_NEW",r.CALL_EXCEPTION="CALL_EXCEPTION",r.INVALID_ARGUMENT="INVALID_ARGUMENT",r.MISSING_ARGUMENT="MISSING_ARGUMENT",r.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",r.NUMERIC_FAULT="NUMERIC_FAULT",r.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",r.NONCE_EXPIRED="NONCE_EXPIRED",r.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED";var i=!(r.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION"),o=!1;function A(t,e,i){if(o)throw new Error("unknown error");e=e||r.UNKNOWN_ERROR,i=i||{};var A=[];Object.keys(i).forEach((function(t){try{A.push(t+"="+JSON.stringify(i[t]))}catch(e){A.push(t+"="+JSON.stringify(i[t].toString()))}})),A.push("version="+n.version);var a=t;A.length&&(t+=" ("+A.join(", ")+")");var s=new Error(t);throw s.reason=a,s.code=e,Object.keys(i).forEach((function(t){s[t]=i[t]})),s}r.throwError=A,r.checkNew=function(t,e){t instanceof e||A("missing new",r.MISSING_NEW,{name:e.name})},r.checkArgumentCount=function(t,e,n){n=n||"",t<e&&A("missing argument"+n,r.MISSING_ARGUMENT,{count:t,expectedCount:e}),e<t&&A("too many arguments"+n,r.UNEXPECTED_ARGUMENT,{count:t,expectedCount:e})},r.setCensorship=function(t,e){i&&A("error censorship permanent",r.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o=!!t,i=!!e},r.checkNormalize=function(){try{if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{"test".normalize(t)}catch(e){throw new Error("missing "+t)}})),String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){A("platform missing String.prototype.normalize",r.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:t.message})}};var a={debug:1,default:2,info:2,warn:3,error:4,off:5},s=a.default;function c(t,e){s>a[t]||console.log.apply(console,e)}function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c("warn",t)}r.setLogLevel=function(t){var e=a[t];null!=e?s=e:u("invliad log level - "+t)},r.warn=u,r.info=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];c("info",t)}},{"./_version":1}],6:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./contract");r.Contract=i.Contract,r.ContractFactory=i.ContractFactory,r.VoidSigner=i.VoidSigner,i=t("./abstract-signer"),r.Signer=i.Signer,i=t("./wallet"),r.Wallet=i.Wallet,i=n(t("./constants")),r.constants=i;var o=n(t("./errors"));r.errors=o;var A=n(t("./providers"));r.providers=A;var a=n(t("./utils"));r.utils=a,n=n(t("./wordlists")),r.wordlists=n,n=t("./utils/shims"),r.platform=n.platform,t=t("./_version"),r.version=t.version,r.getDefaultProvider=function(t){var e=a.getNetwork(t=null==t?"homestead":t);return e&&e._defaultProvider||o.throwError("unsupported getDefaultProvider network",o.UNSUPPORTED_OPERATION,{operation:"getDefaultProvider",network:t}),e._defaultProvider(A)}},{"./_version":1,"./abstract-signer":2,"./constants":3,"./contract":4,"./errors":5,"./providers":54,"./utils":68,"./utils/shims":80,"./wallet":88,"./wordlists":89}],7:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0}),n=n(t("./ethers")),r.ethers=n,function(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}(t("./ethers"))},{"./ethers":6}],8:[function(t,e,r){"use strict";!function(t){function n(t){return parseInt(t)===t}function i(t){if(n(t.length)){for(var e=0;e<t.length;e++)if(!n(t[e])||t[e]<0||255<t[e])return;return 1}}function o(t,e){if(t.buffer&&ArrayBuffer.isView(t)&&"Uint8Array"===t.name)return e?t.slice?t.slice():Array.prototype.slice.call(t):t;if(Array.isArray(t)){if(!i(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(n(t.length)&&i(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function A(t){return new Uint8Array(t)}function a(t,e,r,n,i){null==n&&null==i||(t=t.slice?t.slice(n,i):Array.prototype.slice.call(t,n,i)),e.set(t,r)}var s,c={toBytes:function(t){var e=[],r=0;for(t=encodeURI(t);r<t.length;){var n=t.charCodeAt(r++);37===n?(e.push(parseInt(t.substr(r,2),16)),r+=2):e.push(n)}return o(e)},fromBytes:function(t){for(var e=[],r=0;r<t.length;){var n=t[r];n<128?(e.push(String.fromCharCode(n)),r++):191<n&&n<224?(e.push(String.fromCharCode((31&n)<<6|63&t[r+1])),r+=2):(e.push(String.fromCharCode((15&n)<<12|(63&t[r+1])<<6|63&t[r+2])),r+=3)}return e.join("")}},u=(s="0123456789abcdef",{toBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},fromBytes:function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];e.push(s[(240&n)>>4]+s[15&n])}return e.join("")}}),f={16:10,24:12,32:14},h=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],g=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],I=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],C=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],E=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],B=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],m=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],w=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],v=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Q=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function _(t){for(var e=[],r=0;r<t.length;r+=4)e.push(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]);return e}var D=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:o(e,!0)}),this._prepare()};D.prototype._prepare=function(){var t=f[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var e=0;e<=t;e++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(t+1),i=this.key.length/4,o=_(this.key);for(e=0;e<i;e++)this._Ke[r=e>>2][e%4]=o[e],this._Kd[t-r][e%4]=o[e];for(var A,a=0,s=i;s<n;){if(A=o[i-1],o[0]^=l[A>>16&255]<<24^l[A>>8&255]<<16^l[255&A]<<8^l[A>>24&255]^h[a]<<24,a+=1,8!=i)for(e=1;e<i;e++)o[e]^=o[e-1];else{for(e=1;e<i/2;e++)o[e]^=o[e-1];for(A=o[i/2-1],o[i/2]^=l[255&A]^l[A>>8&255]<<8^l[A>>16&255]<<16^l[A>>24&255]<<24,e=i/2+1;e<i;e++)o[e]^=o[e-1]}for(e=0;e<i&&s<n;)this._Ke[c=s>>2][u=s%4]=o[e],this._Kd[t-c][u]=o[e++],s++}for(var c=1;c<t;c++)for(var u=0;u<4;u++)A=this._Kd[c][u],this._Kd[c][u]=m[A>>24&255]^w[A>>16&255]^v[A>>8&255]^Q[255&A]},D.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var e=this._Ke.length-1,r=[0,0,0,0],n=_(t),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var o=1;o<e;o++){for(i=0;i<4;i++)r[i]=g[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^I[n[(i+2)%4]>>8&255]^y[255&n[(i+3)%4]]^this._Ke[o][i];n=r.slice()}var a,s=A(16);for(i=0;i<4;i++)a=this._Ke[e][i],s[4*i]=255&(l[n[i]>>24&255]^a>>24),s[4*i+1]=255&(l[n[(i+1)%4]>>16&255]^a>>16),s[4*i+2]=255&(l[n[(i+2)%4]>>8&255]^a>>8),s[4*i+3]=255&(l[255&n[(i+3)%4]]^a);return s},D.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var e=this._Kd.length-1,r=[0,0,0,0],n=_(t),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var o=1;o<e;o++){for(i=0;i<4;i++)r[i]=C[n[i]>>24&255]^E[n[(i+3)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^B[255&n[(i+1)%4]]^this._Kd[o][i];n=r.slice()}var a,s=A(16);for(i=0;i<4;i++)a=this._Kd[e][i],s[4*i]=255&(d[n[i]>>24&255]^a>>24),s[4*i+1]=255&(d[n[(i+3)%4]>>16&255]^a>>16),s[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^a>>8),s[4*i+3]=255&(d[255&n[(i+1)%4]]^a);return s};var S=function t(e){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new D(e)};S.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=A(t.length),r=A(16),n=0;n<t.length;n+=16)a(t,r,0,n,n+16),a(r=this._aes.encrypt(r),e,n);return e},S.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=A(t.length),r=A(16),n=0;n<t.length;n+=16)a(t,r,0,n,n+16),a(r=this._aes.decrypt(r),e,n);return e};var M=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=A(16);this._lastCipherblock=o(r,!0),this._aes=new D(e)};M.prototype.encrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var e=A(t.length),r=A(16),n=0;n<t.length;n+=16){a(t,r,0,n,n+16);for(var i=0;i<16;i++)r[i]^=this._lastCipherblock[i];this._lastCipherblock=this._aes.encrypt(r),a(this._lastCipherblock,e,n)}return e},M.prototype.decrypt=function(t){if((t=o(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var e=A(t.length),r=A(16),n=0;n<t.length;n+=16){a(t,r,0,n,n+16),r=this._aes.decrypt(r);for(var i=0;i<16;i++)e[n+i]=r[i]^this._lastCipherblock[i];a(t,this._lastCipherblock,0,n,n+16)}return e};var k=function t(e,r,n){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 size)")}else r=A(16);this.segmentSize=n=n||1,this._shiftRegister=o(r,!0),this._aes=new D(e)};k.prototype.encrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var e=o(t,!0),r=0;r<e.length;r+=this.segmentSize){for(var n=this._aes.encrypt(this._shiftRegister),i=0;i<this.segmentSize;i++)e[r+i]^=n[i];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(e,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return e},k.prototype.decrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var e=o(t,!0),r=0;r<e.length;r+=this.segmentSize){for(var n=this._aes.encrypt(this._shiftRegister),i=0;i<this.segmentSize;i++)e[r+i]^=n[i];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(t,this._shiftRegister,16-this.segmentSize,r,r+this.segmentSize)}return e};var x=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=A(16);this._lastPrecipher=o(r,!0),this._lastPrecipherIndex=16,this._aes=new D(e)};x.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),e[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return e},x.prototype.decrypt=x.prototype.encrypt;var R=function t(e){if(!(this instanceof t))throw Error("Counter must be instanitated with `new`");"number"==typeof(e=0===e||e?e:1)?(this._counter=A(16),this.setValue(e)):this.setBytes(e)};R.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");for(var e=15;0<=e;--e)this._counter[e]=t%256,t>>=8},R.prototype.setBytes=function(t){if(16!=(t=o(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},R.prototype.increment=function(){for(var t=15;0<=t;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var N=function t(e,r){if(!(this instanceof t))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof R||(r=new R(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new D(e)};N.prototype.encrypt=function(t){for(var e=o(t,!0),r=0;r<e.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),e[r]^=this._remainingCounter[this._remainingCounterIndex++];return e},N.prototype.decrypt=N.prototype.encrypt,c={AES:D,Counter:R,ModeOfOperation:{ecb:S,cbc:M,cfb:k,ofb:x,ctr:N},utils:{hex:u,utf8:c},padding:{pkcs7:{pad:function(t){var e=16-(t=o(t,!0)).length%16,r=A(t.length+e);a(t,r);for(var n=t.length;n<r.length;n++)r[n]=e;return r},strip:function(t){if((t=o(t,!0)).length<16)throw new Error("PKCS#7 invalid length");var e=t[t.length-1];if(16<e)throw new Error("PKCS#7 padding byte out of range");for(var r=t.length-e,n=0;n<e;n++)if(t[r+n]!==e)throw new Error("PKCS#7 invalid padding byte");var i=A(r);return a(t,i,0,0,r),i}}},_arrayTest:{coerceArray:o,createArray:A,copyArray:a}},void 0!==r?e.exports=c:(t.aesjs&&(c._aesjs=t.aesjs),t.aesjs=c)}(this)},{}],9:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){function r(){}t.super_=e,r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,(this.red=null)!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var A;"object"==a(e)?e.exports=o:r.BN=o,(o.BN=o).wordSize=26;try{A=("undefined"!=typeof window&&void 0!==window.Buffer?window:t("buffer")).Buffer}catch(e){}function s(t,e){return 65<=(e=t.charCodeAt(e))&&e<=70?e-55:97<=e&&e<=102?e-87:e-48&15}function c(t,e,r){var n=s(t,r);return e<=r-1&&(n|=s(t,r-1)<<4),n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),A=e;A<o;A++){var a=t.charCodeAt(A)-48;i*=n,i+=49<=a?a-49+10:17<=a?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==a(t)&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return 0<t.cmp(e)?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==a(t))return this._initArray(t,e,r);n((e="hex"===e?16:e)===(0|e)&&2<=e&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i,o,A=0;A<this.length;A++)this.words[A]=0;var a=0;if("be"===r)for(A=t.length-1,i=0;0<=A;A-=3)o=t[A]|t[A-1]<<8|t[A-2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,26<=(a+=24)&&(a-=26,i++);else if("le"===r)for(i=A=0;A<t.length;A+=3)o=t[A]|t[A+1]<<8|t[A+2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,26<=(a+=24)&&(a-=26,i++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,A=0;if("be"===r)for(n=t.length-1;e<=n;n-=2)i=c(t,e,n)<<o,this.words[A]|=67108863&i,18<=o?(o-=18,this.words[A+=1]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=c(t,e,n)<<o,this.words[A]|=67108863&i,18<=o?(o-=18,this.words[A+=1]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0];for(var n=0,i=this.length=1;i<=67108863;i*=e)n++;i=i/e|0;for(var o=t.length-r,A=o%--n,a=Math.min(o,o-A)+r,s=0,c=r;c<a;c+=n)s=u(t,c,c+n,e),this.imuln(i),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(0!=A){var f=1;for(s=u(t,c,t.length,e),c=0;c<A;c++)f*=e;this.imuln(f),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0,i=(n=(r.length=n)-1|0,(A=(0|t.words[0])*(0|e.words[0]))/67108864|0);r.words[0]=67108863&A;for(var o=1;o<n;o++){for(var A,a=i>>>26,s=67108863&i,c=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=c;u++)a+=(A=(0|t.words[o-u|0])*(0|e.words[u])+s)/67108864|0,s=67108863&A;r.words[o]=0|s,i=0|a}return 0!==i?r.words[o]=0|i:r.length--,r.strip()}o.prototype.toString=function(t,e){if(e=0|e||1,16===(t=t||10)||"hex"===t){s="";for(var r=0,i=0,o=0;o<this.length;o++){var A=this.words[o],a=(16777215&(A<<r|i)).toString(16),s=0!=(i=A>>>24-r&16777215)||o!==this.length-1?f[6-a.length]+a+s:a+s;26<=(r+=2)&&(r-=26,o--)}for(0!==i&&(s=i.toString(16)+s);s.length%e!=0;)s="0"+s;return 0!==this.negative?"-"+s:s}if(t===(0|t)&&2<=t&&t<=36){var c=h[t],u=l[t];for(s="",(d=this.clone()).negative=0;!d.isZero();){var d,g=d.modn(u).toString(t);s=(d=d.idivn(u)).isZero()?g+s:f[c-g.length]+g+s}for(this.isZero()&&(s="0"+s);s.length%e!=0;)s="0"+s;return 0!==this.negative?"-"+s:s}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:2<this.length&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==A),this.toArrayLike(A,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(0<o,"Requested array length <= 0"),this.strip(),e="le"===e;var A,a,s=new t(o),c=this.clone();if(e){for(a=0;!c.isZero();a++)A=c.andln(255),c.iushrn(8),s[a]=A;for(;a<o;a++)s[a]=0}else{for(a=0;a<o-i;a++)s[a]=0;for(a=0;!c.isZero();a++)A=c.andln(255),c.iushrn(8),s[o-a-1]=A}return s},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t;return t=0,4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t;return t=0,0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},o.prototype.bitLength=function(){var t=this.words[this.length-1];return t=this._countBits(t),26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){for(var e,r=this.length>t.length?(e=this,t):(e=t,this),n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&0<=t);var e=0|Math.ceil(t/26);t%=26,this._expand(e),0<t&&e--;for(var r=0;r<e;r++)this.words[r]=67108863&~this.words[r];return 0<t&&(this.words[r]=~this.words[r]&67108863>>26-t),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&0<=t);var r=t/26|0;return t%=26,this._expand(1+r),this.words[r]=e?this.words[r]|1<<t:this.words[r]&~(1<<t),this.strip()},o.prototype.iadd=function(t){var e,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();for(var n=this.length>t.length?(r=this,t):(r=t,this),i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;for(var i=0<n?(r=this,t):(r=t,this),o=0,A=0;A<i.length;A++)o=(e=(0|r.words[A])-(0|i.words[A])+o)>>26,this.words[A]=67108863&e;for(;0!==o&&A<r.length;A++)o=(e=(0|r.words[A])+o)>>26,this.words[A]=67108863&e;if(0===o&&A<r.length&&r!==this)for(;A<r.length;A++)this.words[A]=r.words[A];return this.length=Math.max(this.length,A),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,r){var n,i,o=t.words,A=e.words,a=r.words,s=(Y=0|o[0],8191&Y),c=Y>>>13,u=8191&(K=0|o[1]),f=K>>>13,h=8191&(q=0|o[2]),l=q>>>13,d=8191&(n=0|o[3]),g=n>>>13,p=8191&(J=0|o[4]),I=J>>>13,y=8191&(z=0|o[5]),C=z>>>13,E=8191&(i=0|o[6]),b=i>>>13,B=8191&(Z=0|o[7]),m=Z>>>13,w=8191&(V=0|o[8]),v=V>>>13,Q=8191&(W=0|o[9]),_=W>>>13,D=8191&(X=0|A[0]),S=X>>>13,M=0|A[1],k=8191&M,x=M>>>13,R=0|A[2],N=8191&R,F=R>>>13,U=8191&($=0|A[3]),H=$>>>13,L=0|A[4],O=8191&L,T=L>>>13,G=0|A[5],P=8191&G,j=G>>>13,Y=0|A[6],K=8191&Y,q=Y>>>13,J=8191&(n=0|A[7]),z=n>>>13,Z=8191&(i=0|A[8]),V=i>>>13,W=8191&(o=0|A[9]),X=o>>>13;r.negative=t.negative^e.negative,r.length=19;var $=(0+Math.imul(s,D)|0)+((8191&(R=(R=Math.imul(s,S))+Math.imul(c,D)|0))<<13)|0,tt=((L=Math.imul(c,S))+(R>>>13)|0)+($>>>26)|0;return $&=67108863,M=Math.imul(u,D),R=(R=Math.imul(u,S))+Math.imul(f,D)|0,L=Math.imul(f,S),G=(tt+(M+Math.imul(s,k)|0)|0)+((8191&(R=(R=R+Math.imul(s,x)|0)+Math.imul(c,k)|0))<<13)|0,tt=((L=L+Math.imul(c,x)|0)+(R>>>13)|0)+(G>>>26)|0,G&=67108863,M=Math.imul(h,D),R=(R=Math.imul(h,S))+Math.imul(l,D)|0,L=Math.imul(l,S),M=M+Math.imul(u,k)|0,R=(R=R+Math.imul(u,x)|0)+Math.imul(f,k)|0,L=L+Math.imul(f,x)|0,Y=(tt+(M+Math.imul(s,N)|0)|0)+((8191&(R=(R=R+Math.imul(s,F)|0)+Math.imul(c,N)|0))<<13)|0,tt=((L=L+Math.imul(c,F)|0)+(R>>>13)|0)+(Y>>>26)|0,Y&=67108863,M=Math.imul(d,D),R=(R=Math.imul(d,S))+Math.imul(g,D)|0,L=Math.imul(g,S),M=M+Math.imul(h,k)|0,R=(R=R+Math.imul(h,x)|0)+Math.imul(l,k)|0,L=L+Math.imul(l,x)|0,M=M+Math.imul(u,N)|0,R=(R=R+Math.imul(u,F)|0)+Math.imul(f,N)|0,L=L+Math.imul(f,F)|0,n=(tt+(M+Math.imul(s,U)|0)|0)+((8191&(R=(R=R+Math.imul(s,H)|0)+Math.imul(c,U)|0))<<13)|0,tt=((L=L+Math.imul(c,H)|0)+(R>>>13)|0)+(n>>>26)|0,n&=67108863,M=Math.imul(p,D),R=(R=Math.imul(p,S))+Math.imul(I,D)|0,L=Math.imul(I,S),M=M+Math.imul(d,k)|0,R=(R=R+Math.imul(d,x)|0)+Math.imul(g,k)|0,L=L+Math.imul(g,x)|0,M=M+Math.imul(h,N)|0,R=(R=R+Math.imul(h,F)|0)+Math.imul(l,N)|0,L=L+Math.imul(l,F)|0,M=M+Math.imul(u,U)|0,R=(R=R+Math.imul(u,H)|0)+Math.imul(f,U)|0,L=L+Math.imul(f,H)|0,i=(tt+(M+Math.imul(s,O)|0)|0)+((8191&(R=(R=R+Math.imul(s,T)|0)+Math.imul(c,O)|0))<<13)|0,tt=((L=L+Math.imul(c,T)|0)+(R>>>13)|0)+(i>>>26)|0,i&=67108863,M=Math.imul(y,D),R=(R=Math.imul(y,S))+Math.imul(C,D)|0,L=Math.imul(C,S),M=M+Math.imul(p,k)|0,R=(R=R+Math.imul(p,x)|0)+Math.imul(I,k)|0,L=L+Math.imul(I,x)|0,M=M+Math.imul(d,N)|0,R=(R=R+Math.imul(d,F)|0)+Math.imul(g,N)|0,L=L+Math.imul(g,F)|0,M=M+Math.imul(h,U)|0,R=(R=R+Math.imul(h,H)|0)+Math.imul(l,U)|0,L=L+Math.imul(l,H)|0,M=M+Math.imul(u,O)|0,R=(R=R+Math.imul(u,T)|0)+Math.imul(f,O)|0,L=L+Math.imul(f,T)|0,A=(tt+(M+Math.imul(s,P)|0)|0)+((8191&(R=(R=R+Math.imul(s,j)|0)+Math.imul(c,P)|0))<<13)|0,tt=((L=L+Math.imul(c,j)|0)+(R>>>13)|0)+(A>>>26)|0,A&=67108863,M=Math.imul(E,D),R=(R=Math.imul(E,S))+Math.imul(b,D)|0,L=Math.imul(b,S),M=M+Math.imul(y,k)|0,R=(R=R+Math.imul(y,x)|0)+Math.imul(C,k)|0,L=L+Math.imul(C,x)|0,M=M+Math.imul(p,N)|0,R=(R=R+Math.imul(p,F)|0)+Math.imul(I,N)|0,L=L+Math.imul(I,F)|0,M=M+Math.imul(d,U)|0,R=(R=R+Math.imul(d,H)|0)+Math.imul(g,U)|0,L=L+Math.imul(g,H)|0,M=M+Math.imul(h,O)|0,R=(R=R+Math.imul(h,T)|0)+Math.imul(l,O)|0,L=L+Math.imul(l,T)|0,M=M+Math.imul(u,P)|0,R=(R=R+Math.imul(u,j)|0)+Math.imul(f,P)|0,L=L+Math.imul(f,j)|0,o=(tt+(M+Math.imul(s,K)|0)|0)+((8191&(R=(R=R+Math.imul(s,q)|0)+Math.imul(c,K)|0))<<13)|0,tt=((L=L+Math.imul(c,q)|0)+(R>>>13)|0)+(o>>>26)|0,o&=67108863,M=Math.imul(B,D),R=(R=Math.imul(B,S))+Math.imul(m,D)|0,L=Math.imul(m,S),M=M+Math.imul(E,k)|0,R=(R=R+Math.imul(E,x)|0)+Math.imul(b,k)|0,L=L+Math.imul(b,x)|0,M=M+Math.imul(y,N)|0,R=(R=R+Math.imul(y,F)|0)+Math.imul(C,N)|0,L=L+Math.imul(C,F)|0,M=M+Math.imul(p,U)|0,R=(R=R+Math.imul(p,H)|0)+Math.imul(I,U)|0,L=L+Math.imul(I,H)|0,M=M+Math.imul(d,O)|0,R=(R=R+Math.imul(d,T)|0)+Math.imul(g,O)|0,L=L+Math.imul(g,T)|0,M=M+Math.imul(h,P)|0,R=(R=R+Math.imul(h,j)|0)+Math.imul(l,P)|0,L=L+Math.imul(l,j)|0,M=M+Math.imul(u,K)|0,R=(R=R+Math.imul(u,q)|0)+Math.imul(f,K)|0,L=L+Math.imul(f,q)|0,t=(tt+(M+Math.imul(s,J)|0)|0)+((8191&(R=(R=R+Math.imul(s,z)|0)+Math.imul(c,J)|0))<<13)|0,tt=((L=L+Math.imul(c,z)|0)+(R>>>13)|0)+(t>>>26)|0,t&=67108863,M=Math.imul(w,D),R=(R=Math.imul(w,S))+Math.imul(v,D)|0,L=Math.imul(v,S),M=M+Math.imul(B,k)|0,R=(R=R+Math.imul(B,x)|0)+Math.imul(m,k)|0,L=L+Math.imul(m,x)|0,M=M+Math.imul(E,N)|0,R=(R=R+Math.imul(E,F)|0)+Math.imul(b,N)|0,L=L+Math.imul(b,F)|0,M=M+Math.imul(y,U)|0,R=(R=R+Math.imul(y,H)|0)+Math.imul(C,U)|0,L=L+Math.imul(C,H)|0,M=M+Math.imul(p,O)|0,R=(R=R+Math.imul(p,T)|0)+Math.imul(I,O)|0,L=L+Math.imul(I,T)|0,M=M+Math.imul(d,P)|0,R=(R=R+Math.imul(d,j)|0)+Math.imul(g,P)|0,L=L+Math.imul(g,j)|0,M=M+Math.imul(h,K)|0,R=(R=R+Math.imul(h,q)|0)+Math.imul(l,K)|0,L=L+Math.imul(l,q)|0,M=M+Math.imul(u,J)|0,R=(R=R+Math.imul(u,z)|0)+Math.imul(f,J)|0,L=L+Math.imul(f,z)|0,e=(tt+(M+Math.imul(s,Z)|0)|0)+((8191&(R=(R=R+Math.imul(s,V)|0)+Math.imul(c,Z)|0))<<13)|0,tt=((L=L+Math.imul(c,V)|0)+(R>>>13)|0)+(e>>>26)|0,e&=67108863,M=Math.imul(Q,D),R=(R=Math.imul(Q,S))+Math.imul(_,D)|0,L=Math.imul(_,S),M=M+Math.imul(w,k)|0,R=(R=R+Math.imul(w,x)|0)+Math.imul(v,k)|0,L=L+Math.imul(v,x)|0,M=M+Math.imul(B,N)|0,R=(R=R+Math.imul(B,F)|0)+Math.imul(m,N)|0,L=L+Math.imul(m,F)|0,M=M+Math.imul(E,U)|0,R=(R=R+Math.imul(E,H)|0)+Math.imul(b,U)|0,L=L+Math.imul(b,H)|0,M=M+Math.imul(y,O)|0,R=(R=R+Math.imul(y,T)|0)+Math.imul(C,O)|0,L=L+Math.imul(C,T)|0,M=M+Math.imul(p,P)|0,R=(R=R+Math.imul(p,j)|0)+Math.imul(I,P)|0,L=L+Math.imul(I,j)|0,M=M+Math.imul(d,K)|0,R=(R=R+Math.imul(d,q)|0)+Math.imul(g,K)|0,L=L+Math.imul(g,q)|0,M=M+Math.imul(h,J)|0,R=(R=R+Math.imul(h,z)|0)+Math.imul(l,J)|0,L=L+Math.imul(l,z)|0,M=M+Math.imul(u,Z)|0,R=(R=R+Math.imul(u,V)|0)+Math.imul(f,Z)|0,L=L+Math.imul(f,V)|0,s=(tt+(M+Math.imul(s,W)|0)|0)+((8191&(R=(R=R+Math.imul(s,X)|0)+Math.imul(c,W)|0))<<13)|0,tt=((L=L+Math.imul(c,X)|0)+(R>>>13)|0)+(s>>>26)|0,s&=67108863,M=Math.imul(Q,k),R=(R=Math.imul(Q,x))+Math.imul(_,k)|0,L=Math.imul(_,x),M=M+Math.imul(w,N)|0,R=(R=R+Math.imul(w,F)|0)+Math.imul(v,N)|0,L=L+Math.imul(v,F)|0,M=M+Math.imul(B,U)|0,R=(R=R+Math.imul(B,H)|0)+Math.imul(m,U)|0,L=L+Math.imul(m,H)|0,M=M+Math.imul(E,O)|0,R=(R=R+Math.imul(E,T)|0)+Math.imul(b,O)|0,L=L+Math.imul(b,T)|0,M=M+Math.imul(y,P)|0,R=(R=R+Math.imul(y,j)|0)+Math.imul(C,P)|0,L=L+Math.imul(C,j)|0,M=M+Math.imul(p,K)|0,R=(R=R+Math.imul(p,q)|0)+Math.imul(I,K)|0,L=L+Math.imul(I,q)|0,M=M+Math.imul(d,J)|0,R=(R=R+Math.imul(d,z)|0)+Math.imul(g,J)|0,L=L+Math.imul(g,z)|0,M=M+Math.imul(h,Z)|0,R=(R=R+Math.imul(h,V)|0)+Math.imul(l,Z)|0,L=L+Math.imul(l,V)|0,u=(tt+(M+Math.imul(u,W)|0)|0)+((8191&(R=(R=R+Math.imul(u,X)|0)+Math.imul(f,W)|0))<<13)|0,tt=((L=L+Math.imul(f,X)|0)+(R>>>13)|0)+(u>>>26)|0,u&=67108863,M=Math.imul(Q,N),R=(R=Math.imul(Q,F))+Math.imul(_,N)|0,L=Math.imul(_,F),M=M+Math.imul(w,U)|0,R=(R=R+Math.imul(w,H)|0)+Math.imul(v,U)|0,L=L+Math.imul(v,H)|0,M=M+Math.imul(B,O)|0,R=(R=R+Math.imul(B,T)|0)+Math.imul(m,O)|0,L=L+Math.imul(m,T)|0,M=M+Math.imul(E,P)|0,R=(R=R+Math.imul(E,j)|0)+Math.imul(b,P)|0,L=L+Math.imul(b,j)|0,M=M+Math.imul(y,K)|0,R=(R=R+Math.imul(y,q)|0)+Math.imul(C,K)|0,L=L+Math.imul(C,q)|0,M=M+Math.imul(p,J)|0,R=(R=R+Math.imul(p,z)|0)+Math.imul(I,J)|0,L=L+Math.imul(I,z)|0,M=M+Math.imul(d,Z)|0,R=(R=R+Math.imul(d,V)|0)+Math.imul(g,Z)|0,L=L+Math.imul(g,V)|0,h=(tt+(M+Math.imul(h,W)|0)|0)+((8191&(R=(R=R+Math.imul(h,X)|0)+Math.imul(l,W)|0))<<13)|0,tt=((L=L+Math.imul(l,X)|0)+(R>>>13)|0)+(h>>>26)|0,h&=67108863,M=Math.imul(Q,U),R=(R=Math.imul(Q,H))+Math.imul(_,U)|0,L=Math.imul(_,H),M=M+Math.imul(w,O)|0,R=(R=R+Math.imul(w,T)|0)+Math.imul(v,O)|0,L=L+Math.imul(v,T)|0,M=M+Math.imul(B,P)|0,R=(R=R+Math.imul(B,j)|0)+Math.imul(m,P)|0,L=L+Math.imul(m,j)|0,M=M+Math.imul(E,K)|0,R=(R=R+Math.imul(E,q)|0)+Math.imul(b,K)|0,L=L+Math.imul(b,q)|0,M=M+Math.imul(y,J)|0,R=(R=R+Math.imul(y,z)|0)+Math.imul(C,J)|0,L=L+Math.imul(C,z)|0,M=M+Math.imul(p,Z)|0,R=(R=R+Math.imul(p,V)|0)+Math.imul(I,Z)|0,L=L+Math.imul(I,V)|0,d=(tt+(M+Math.imul(d,W)|0)|0)+((8191&(R=(R=R+Math.imul(d,X)|0)+Math.imul(g,W)|0))<<13)|0,tt=((L=L+Math.imul(g,X)|0)+(R>>>13)|0)+(d>>>26)|0,d&=67108863,M=Math.imul(Q,O),R=(R=Math.imul(Q,T))+Math.imul(_,O)|0,L=Math.imul(_,T),M=M+Math.imul(w,P)|0,R=(R=R+Math.imul(w,j)|0)+Math.imul(v,P)|0,L=L+Math.imul(v,j)|0,M=M+Math.imul(B,K)|0,R=(R=R+Math.imul(B,q)|0)+Math.imul(m,K)|0,L=L+Math.imul(m,q)|0,M=M+Math.imul(E,J)|0,R=(R=R+Math.imul(E,z)|0)+Math.imul(b,J)|0,L=L+Math.imul(b,z)|0,M=M+Math.imul(y,Z)|0,R=(R=R+Math.imul(y,V)|0)+Math.imul(C,Z)|0,L=L+Math.imul(C,V)|0,p=(tt+(M+Math.imul(p,W)|0)|0)+((8191&(R=(R=R+Math.imul(p,X)|0)+Math.imul(I,W)|0))<<13)|0,tt=((L=L+Math.imul(I,X)|0)+(R>>>13)|0)+(p>>>26)|0,p&=67108863,M=Math.imul(Q,P),R=(R=Math.imul(Q,j))+Math.imul(_,P)|0,L=Math.imul(_,j),M=M+Math.imul(w,K)|0,R=(R=R+Math.imul(w,q)|0)+Math.imul(v,K)|0,L=L+Math.imul(v,q)|0,M=M+Math.imul(B,J)|0,R=(R=R+Math.imul(B,z)|0)+Math.imul(m,J)|0,L=L+Math.imul(m,z)|0,M=M+Math.imul(E,Z)|0,R=(R=R+Math.imul(E,V)|0)+Math.imul(b,Z)|0,L=L+Math.imul(b,V)|0,y=(tt+(M+Math.imul(y,W)|0)|0)+((8191&(R=(R=R+Math.imul(y,X)|0)+Math.imul(C,W)|0))<<13)|0,tt=((L=L+Math.imul(C,X)|0)+(R>>>13)|0)+(y>>>26)|0,y&=67108863,M=Math.imul(Q,K),R=(R=Math.imul(Q,q))+Math.imul(_,K)|0,L=Math.imul(_,q),M=M+Math.imul(w,J)|0,R=(R=R+Math.imul(w,z)|0)+Math.imul(v,J)|0,L=L+Math.imul(v,z)|0,M=M+Math.imul(B,Z)|0,R=(R=R+Math.imul(B,V)|0)+Math.imul(m,Z)|0,L=L+Math.imul(m,V)|0,E=(tt+(M+Math.imul(E,W)|0)|0)+((8191&(R=(R=R+Math.imul(E,X)|0)+Math.imul(b,W)|0))<<13)|0,tt=((L=L+Math.imul(b,X)|0)+(R>>>13)|0)+(E>>>26)|0,E&=67108863,M=Math.imul(Q,J),R=(R=Math.imul(Q,z))+Math.imul(_,J)|0,L=Math.imul(_,z),M=M+Math.imul(w,Z)|0,R=(R=R+Math.imul(w,V)|0)+Math.imul(v,Z)|0,L=L+Math.imul(v,V)|0,B=(tt+(M+Math.imul(B,W)|0)|0)+((8191&(R=(R=R+Math.imul(B,X)|0)+Math.imul(m,W)|0))<<13)|0,tt=((L=L+Math.imul(m,X)|0)+(R>>>13)|0)+(B>>>26)|0,B&=67108863,M=Math.imul(Q,Z),R=(R=Math.imul(Q,V))+Math.imul(_,Z)|0,L=Math.imul(_,V),w=(tt+(M+Math.imul(w,W)|0)|0)+((8191&(R=(R=R+Math.imul(w,X)|0)+Math.imul(v,W)|0))<<13)|0,tt=((L=L+Math.imul(v,X)|0)+(R>>>13)|0)+(w>>>26)|0,w&=67108863,W=(tt+Math.imul(Q,W)|0)+((8191&(R=(R=Math.imul(Q,X))+Math.imul(_,W)|0))<<13)|0,tt=((L=Math.imul(_,X))+(R>>>13)|0)+(W>>>26)|0,W&=67108863,a[0]=$,a[1]=G,a[2]=Y,a[3]=n,a[4]=i,a[5]=A,a[6]=o,a[7]=t,a[8]=e,a[9]=s,a[10]=u,a[11]=h,a[12]=d,a[13]=p,a[14]=y,a[15]=E,a[16]=B,a[17]=w,a[18]=W,0!=tt&&(a[19]=tt,r.length++),r};function p(t,e,r){return(new I).mulp(t,e,r)}function I(t,e){this.x=t,this.y=e}Math.imul||(g=d),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return e=(10===this.length&&10===t.length?g:r<63?d:r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){for(var A=i,a=(i=0,67108863&n),s=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=s;c++){var u,f=(0|t.words[o-c])*(0|e.words[c]);a=67108863&(u=(u=67108863&f)+a|0),i+=(A=(A=A+(f/67108864|0)|0)+(u>>>26)|0)>>>26,A&=67108863}r.words[o]=a,n=A,A=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}:p)(this,t,e)},I.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},I.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},I.prototype.permute=function(t,e,r,n,i,o){for(var A=0;A<o;A++)n[A]=e[t[A]],i[A]=r[t[A]]},I.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var A=1;A<i;A<<=1)for(var a=A<<1,s=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var f=s,h=c,l=0;l<A;l++){var d=r[u+l],g=n[u+l],p=r[u+l+A],I=f*p-h*(y=n[u+l+A]),y=f*y+h*p;r[u+l]=d+(p=I),n[u+l]=g+y,r[u+l+A]=d-p,n[u+l+A]=g-y,l!==a&&(I=s*f-c*h,h=s*h+c*f,f=I)}},I.prototype.guessLen13b=function(t,e){t=1&(n=1|Math.max(e,t));for(var r=0,n=n/2|0;n;n>>>=1)r++;return 1<<r+1+t},I.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},I.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},I.prototype.convert13b=function(t,e,r,i){for(var o=0,A=0;A<e;A++)o+=0|t[A],r[2*A]=8191&o,r[2*A+1]=8191&(o>>>=13),o>>>=13;for(A=2*e;A<i;++A)r[A]=0;n(0===o),n(0==(-8192&o))},I.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},I.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),A=new Array(n),a=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(t.words,t.length,A,n),this.convert13b(e.words,e.length,c,n),this.transform(A,o,a,s,n,i),this.transform(c,o,u,f,n,i);for(var l=0;l<n;l++){var d=a[l]*u[l]-s[l]*f[l];s[l]=a[l]*f[l]+s[l]*u[l],a[l]=d}return this.conjugate(a,s,n),this.transform(a,s,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r%26;e[r]=(t.words[r/26|0]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&0<=t);var e=t%26,r=(t-e)/26,i=67108863>>>26-e<<26-e;if(0!=e){for(var o=0,A=0;A<this.length;A++){var a=this.words[A]&i,s=(0|this.words[A])-a<<e;this.words[A]=s|o,o=a>>>26-e}o&&(this.words[A]=o,this.length++)}if(0!=r){for(A=this.length-1;0<=A;A--)this.words[A+r]=this.words[A];for(A=0;A<r;A++)this.words[A]=0;this.length+=r}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){n("number"==typeof t&&0<=t);var i=e?(e-e%26)/26:0,o=t%26,A=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,s=r;if(i-=A,i=Math.max(0,i),s){for(var c=0;c<A;c++)s.words[c]=this.words[c];s.length=A}if(0!==A)if(this.length>A)for(this.length-=A,c=0;c<this.length;c++)this.words[c]=this.words[c+A];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;0<=c&&(0!==u||i<=c);c--){var f=0|this.words[c];this.words[c]=u<<26-o|f>>>o,u=f&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&0<=t);var e=t%26;return t=(t-e)/26,!(this.length<=t||!(this.words[t]&1<<e))},o.prototype.imaskn=function(t){n("number"==typeof t&&0<=t);var e=t%26;return t=(t-e)/26,n(0===this.negative,"imaskn works only with positive numbers"),this.length<=t?this:(0!=e&&t++,this.length=Math.min(t,this.length),0!=e&&(this.words[this.length-1]&=67108863^67108863>>>e<<e),this.strip())},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?(1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(t),this.negative=1),this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&67108864<=this.words[e];e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,--this.words[e+1];return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i=t.length+r;this._expand(i);for(var o=0,A=0;A<t.length;A++){var a=(0|this.words[A+r])+o,s=(0|t.words[A])*e;o=((a-=67108863&s)>>26)-(s/67108864|0),this.words[A+r]=67108863&a}for(;A<this.length-r;A++)o=(a=(0|this.words[A+r])+o)>>26,this.words[A+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),A=o=0;A<this.length;A++)o=(a=-(0|this.words[A])+o)>>26,this.words[A]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,A=0|i.words[i.length-1];0!=(r=26-this._countBits(A))&&(i=i.ushln(r),n.iushln(r),A=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==e){(a=new o(null)).length=1+s,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}0===(t=n.clone()._ishlnsubmul(i,1,s)).negative&&(n=t,a&&(a.words[s]=1));for(var u=s-1;0<=u;u--){var f=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(f=Math.min(f/A|0,67108863),n._ishlnsubmul(i,f,u);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=f)}return a&&a.strip(),n.strip(),"div"!==e&&0!=r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(A=a.mod.neg(),r&&0!==A.negative&&A.iadd(t)),{div:i,mod:A}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),{div:i="mod"!==e?a.div.neg():i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(A=a.mod.neg(),r&&0!==A.negative&&A.isub(t)),{div:a.div,mod:A}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,A,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1);return t=t.andln(1),(n=r.cmp(n))<0||1===t&&0===n?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;0<=i;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());for(var e=this,r=t.clone(),i=(e=0!==e.negative?e.umod(t):e.clone(),new o(1)),A=new o(0),a=new o(0),s=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,l=1;0==(e.words[0]&l)&&h<26;++h,l<<=1);if(0<h)for(e.iushrn(h);0<h--;)(i.isOdd()||A.isOdd())&&(i.iadd(u),A.isub(f)),i.iushrn(1),A.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(0<d)for(r.iushrn(d);0<d--;)(a.isOdd()||s.isOdd())&&(a.iadd(u),s.isub(f)),a.iushrn(1),s.iushrn(1);0<=e.cmp(r)?(e.isub(r),i.isub(a),A.isub(s)):(r.isub(e),a.isub(i),s.isub(A))}return{a:a,b:s,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());for(var e,r=this,i=t.clone(),A=(r=0!==r.negative?r.umod(t):r.clone(),new o(1)),a=new o(0),s=i.clone();0<r.cmpn(1)&&0<i.cmpn(1);){for(var c=0,u=1;0==(r.words[0]&u)&&c<26;++c,u<<=1);if(0<c)for(r.iushrn(c);0<c--;)A.isOdd()&&A.iadd(s),A.iushrn(1);for(var f=0,h=1;0==(i.words[0]&h)&&f<26;++f,h<<=1);if(0<f)for(i.iushrn(f);0<f--;)a.isOdd()&&a.iadd(s),a.iushrn(1);0<=r.cmp(i)?(r.isub(i),A.isub(a)):(i.isub(r),a.isub(A))}return(e=0===r.cmpn(1)?A:a).cmpn(0)<0&&e.iadd(t),e},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0;for(var n=r.negative=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t),t=(t-(e=t%26))/26;var e=1<<e;if(this.length<=t)return this._expand(1+t),this.words[t]|=e,this;for(var r=e,i=t;0!==r&&i<this.length;i++){var o=0|this.words[i];r=(o+=r)>>>26,o&=67108863,this.words[i]=o}return 0!==r&&(this.words[i]=r,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e=t<0;return 0===this.negative||e?0===this.negative&&e?1:(this.strip(),t=1<this.length?1:(n((t=e?-t:t)<=67108863,"Number is too big"),(e=0|this.words[0])===t?0:e<t?-1:1),0!==this.negative?0|-t:t):-1},o.prototype.cmp=function(t){return 0!==this.negative&&0===t.negative?-1:0===this.negative&&0!==t.negative?1:(t=this.ucmp(t),0!==this.negative?0|-t:t)},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;0<=r;r--){var n=0|this.words[r],i=0|t.words[r];if(n!=i){n<i?e=-1:i<n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return 0<=this.cmpn(t)},o.prototype.gte=function(t){return 0<=this.cmp(t)},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new w(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function C(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){C.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function B(){C.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){C.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){var e;"string"==typeof t?(e=o._prime(t),this.m=e.p,this.prime=e):(n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null)}function v(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}C.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},C.prototype.ireduce=function(t){for(var e,r=t;this.split(r,this.tmp),(e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength())>this.n;);return 0===(t=e<this.n?-1:r.ucmp(this.p))?(r.words[0]=0,r.length=1):0<t?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},C.prototype.split=function(t,e){t.iushrn(this.n,0,e)},C.prototype.imulK=function(t){return t.imul(this.k)},i(E,C),E.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(4194303&o)<<4|i>>>22,i=o}0==(t.words[n-10]=i>>>=22)&&10<t.length?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(b,C),i(B,C),i(m,C),m.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new E;else if("p224"===t)e=new b;else if("p192"===t)e=new B;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new m}return y[t]=e},w.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return(this.prime?this.prime.ireduce(t):t.umod(this.m))._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){return this._verify2(t,e),0<=(e=t.add(e)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},w.prototype.iadd=function(t,e){return this._verify2(t,e),0<=(e=t.iadd(e)).cmp(this.m)&&e.isub(this.m),e},w.prototype.sub=function(t,e){return this._verify2(t,e),(e=t.sub(e)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},w.prototype.isub=function(t,e){return this._verify2(t,e),(e=t.isub(e)).cmpn(0)<0&&e.iadd(this.m),e},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e)return e=this.m.add(new o(1)).iushrn(2),this.pow(t,e);for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);n(!r.isZero());for(var A=new o(1).toRed(this),a=A.redNeg(),s=this.m.subn(1).iushrn(1),c=new o(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,s).cmp(a);)c.redIAdd(a);for(var u=this.pow(c,r),f=this.pow(t,r.addn(1).iushrn(1)),h=this.pow(t,r),l=i;0!==h.cmp(A);){for(var d=h,g=0;0!==d.cmp(A);g++)d=d.redSqr();n(g<l);var p=this.pow(u,new o(1).iushln(l-g-1));f=f.redMul(p),u=p.redSqr(),h=h.redMul(u),l=g}return f},w.prototype.invm=function(t){return 0!==(t=t._invmp(this.m)).negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},w.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],A=0,a=0,s=e.bitLength()%26;for(0===s&&(s=26),n=e.length-1;0<=n;n--){for(var c=e.words[n],u=s-1;0<=u;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!=f||0!==A?(A<<=1,A|=f,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[A]),A=a=0)):a=0}s=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){return(t=t.clone()).red=null,t},o.mont=function(t){return new v(t)},i(v,w),v.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},v.prototype.convertFrom=function(t){return(t=this.imod(t.mul(this.rinv))).red=null,t},v.prototype.imul=function(t,e){return t.isZero()||e.isZero()?(t.words[0]=0,t.length=1,t):(e=(t=t.imul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=t=t.isub(e).iushrn(this.shift),0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},v.prototype.mul=function(t,e){return t.isZero()||e.isZero()?new o(0)._forceRed(this):(e=(t=t.mul(e)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=t=t.isub(e).iushrn(this.shift),0<=t.cmp(this.m)?e=t.isub(this.m):t.cmpn(0)<0&&(e=t.iadd(this.m)),e._forceRed(this))},v.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:11}],10:[function(t,e,n){(function(t){(function(){e.exports=function(e){return e=new Uint8Array(e),(t.crypto||t.msCrypto).getRandomValues(e),e}}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(t,e,r){},{}],12:[function(t,e,r){"use strict";r.version=t("../package.json").version,r.utils=t("./elliptic/utils"),r.rand=t("brorand"),r.curve=t("./elliptic/curve"),r.curves=t("./elliptic/curves"),r.ec=t("./elliptic/ec"),r.eddsa=t("./elliptic/eddsa")},{"../package.json":25,"./elliptic/curve":15,"./elliptic/curves":18,"./elliptic/ec":19,"./elliptic/eddsa":22,"./elliptic/utils":24,brorand:10}],13:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils"),o=i.getNAF,A=i.getJSF,a=i.assert;function s(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0,!(e=this.n&&this.p.div(this.n))||0<e.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}(e.exports=s).prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength);e=(1<<r.step+1)-(r.step%2==0?2:1),e/=3;for(var i=[],A=0;A<n.length;A+=r.step){for(var s=0,c=A+r.step-1;A<=c;c--)s=(s<<1)+n[c];i.push(s)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=e;0<h;h--){for(A=0;A<i.length;A++)(s=i[A])===h?f=f.mixedAdd(r.points[A]):s===-h&&(f=f.mixedAdd(r.points[A].neg()));u=u.add(f)}return u.toP()},s.prototype._wnafMul=function(t,e){for(var r=t._getNAFPoints(4),n=r.wnd,i=r.points,A=o(e,n,this._bitLength),s=this.jpoint(null,null,null),c=A.length-1;0<=c;c--){for(var u=0;0<=c&&0===A[c];c--)u++;if(0<=c&&u++,s=s.dblp(u),c<0)break;var f=A[c];a(0!==f),s="affine"===t.type?0<f?s.mixedAdd(i[f-1>>1]):s.mixedAdd(i[-f-1>>1].neg()):0<f?s.add(i[f-1>>1]):s.add(i[-f-1>>1].neg())}return"affine"===t.type?s.toP():s},s.prototype._wnafMulAdd=function(t,e,r,n,i){for(var a=this._wnafT1,s=this._wnafT2,c=this._wnafT3,u=0,f=0;f<n;f++){var h,l=(h=e[f])._getNAFPoints(t);a[f]=l.wnd,s[f]=l.points}for(f=n-1;1<=f;f-=2){var d=f-1,g=f;if(1===a[d]&&1===a[g]){var p=[e[d],null,null,e[g]];0===e[d].y.cmp(e[g].y)?(p[1]=e[d].add(e[g]),p[2]=e[d].toJ().mixedAdd(e[g].neg())):0===e[d].y.cmp(e[g].y.redNeg())?(p[1]=e[d].toJ().mixedAdd(e[g]),p[2]=e[d].add(e[g].neg())):(p[1]=e[d].toJ().mixedAdd(e[g]),p[2]=e[d].toJ().mixedAdd(e[g].neg()));var I=[-3,-1,-5,-7,0,7,5,1,3],y=A(r[d],r[g]);for(u=Math.max(y[0].length,u),c[d]=new Array(u),c[g]=new Array(u),v=0;v<u;v++){var C=0|y[0][v],E=0|y[1][v];c[d][v]=I[3*(1+C)+(1+E)],c[g][v]=0,s[d]=p}}else c[d]=o(r[d],a[d],this._bitLength),c[g]=o(r[g],a[g],this._bitLength),u=Math.max(c[d].length,u),u=Math.max(c[g].length,u)}var b=this.jpoint(null,null,null),B=this._wnafT4;for(f=u;0<=f;f--){for(var m=0;0<=f;){for(var w=!0,v=0;v<n;v++)B[v]=0|c[v][f],0!==B[v]&&(w=!1);if(!w)break;m++,f--}if(0<=f&&m++,b=b.dblp(m),f<0)break;for(v=0;v<n;v++){var Q=B[v];0!==Q&&(0<Q?h=s[v][Q-1>>1]:Q<0&&(h=s[v][-Q-1>>1].neg()),b="affine"===h.type?b.mixedAdd(h):b.add(h))}}for(f=0;f<n;f++)s[f]=null;return i?b:b.toP()},(s.BasePoint=c).prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(t,e){if(t=i.toArray(t,e),e=this.p.byteLength(),(4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*e)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+e),t.slice(1+e,1+2*e));if((2===t[0]||3===t[0])&&t.length-1===e)return this.pointFromX(t.slice(1,1+e),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1==r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},{"../utils":24,"bn.js":9}],14:[function(t,e,r){e.exports={}},{}],15:[function(t,e,r){"use strict";r.base=t("./base"),r.short=t("./short"),r.mont=t("./mont"),r.edwards=t("./edwards")},{"./base":13,"./edwards":14,"./mont":16,"./short":17}],16:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],17:[function(t,e,r){"use strict";var n=t("../utils"),i=t("bn.js"),o=t("inherits"),A=t("./base"),a=n.assert;function s(t){A.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){A.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(t,e,r,n){A.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(s,A),(e.exports=s).prototype._getEndomorphism=function(t){var e,r,n;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return r=(t.beta?new i(t.beta,16):r=(n=this._getEndoRoots(this.p))[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red),t.lambda?e=new i(t.lambda,16):(n=this._getEndoRoots(this.n),0===this.g.mul(n[0]).x.cmp(this.g.x.redMul(r))?e=n[0]:(e=n[1],a(0===this.g.mul(e).x.cmp(this.g.x.redMul(r))))),{beta:r,lambda:e,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(e)}},s.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=(t=(r=new i(2).toRed(e).redInvm()).redNeg(),new i(3).toRed(e).redNeg().redSqrt().redMul(r));return[t.redAdd(r).fromRed(),t.redSub(r).fromRed()]},s.prototype._getEndoBasis=function(t){for(var e,r,n,o,A,a=this.n.ushrn(Math.floor(this.n.bitLength()/2)),s=t,c=this.n.clone(),u=new i(1),f=new i(0),h=new i(0),l=new i(1),d=0;0!==s.cmpn(0);){var g=c.div(s),p=c.sub(g.mul(s)),I=h.sub(g.mul(u));if(g=l.sub(g.mul(f)),!n&&p.cmp(a)<0)e=A.neg(),r=u,n=p.neg(),o=I;else if(n&&2==++d)break;c=s,s=A=p,h=u,u=I,l=f,f=g}var y=p.neg(),C=I;return t=n.sqr().add(o.sqr()),0<=y.sqr().add(C.sqr()).cmp(t)&&(y=e,C=r),n.negative&&(n=n.neg(),o=o.neg()),y.negative&&(y=y.neg(),C=C.neg()),[{a:n,b:o},{a:y,b:C}]},s.prototype._endoSplit=function(t){var e=(o=this.endo.basis)[0],r=(A=o[1]).b.mul(t).divRound(this.n),n=e.b.neg().mul(t).divRound(this.n),i=r.mul(e.a),o=n.mul(A.a),A=(e=r.mul(e.b),n.mul(A.b));return{k1:t.sub(i).sub(o),k2:e.add(A).neg()}},s.prototype.pointFromX=function(t,e){var r=(t=(t=new i(t,16)).red?t:t.toRed(this.red)).redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");return r=n.fromRed().isOdd(),(e&&!r||!e&&r)&&(n=n.redNeg()),this.point(t,n)},s.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y;return t=this.a.redMul(e),t=e.redSqr().redMul(e).redIAdd(t).redIAdd(this.b),0===r.redSqr().redISub(t).cmpn(0)},s.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var A=this._endoSplit(e[o]),a=t[o],s=a._getBeta();A.k1.negative&&(A.k1.ineg(),a=a.neg(!0)),A.k2.negative&&(A.k2.ineg(),s=s.neg(!0)),n[2*o]=a,n[2*o+1]=s,i[2*o]=A.k1,i[2*o+1]=A.k2}r=this._wnafMulAdd(1,n,i,2*o,r);for(var c=0;c<2*o;c++)n[c]=null,i[c]=null;return r},o(c,A.BasePoint),s.prototype.point=function(t,e,r){return new c(this,t,e,r)},s.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e,r,n=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);return t&&(e=this.curve,r=function(t){return e.point(t.x.redMul(e.endo.beta),t.y)},(t.beta=n).precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}),n}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}return e=e[2],n.precomputed={beta:null,doubles:e.doubles&&{step:e.doubles.step,points:[n].concat(e.doubles.points.map(i))},naf:e.naf&&{wnd:e.naf.wnd,points:[n].concat(e.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);t=(e=0!==(e=this.y.redSub(t.y)).cmpn(0)?e.redMul(this.x.redSub(t.x).redInvm()):e).redSqr().redISub(this.x).redISub(t.x);var e=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,e)},c.prototype.dbl=function(){if(this.inf)return this;if(0===(r=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var t=this.curve.a,e=this.x.redSqr(),r=r.redInvm();return r=(t=e.redAdd(e).redIAdd(e).redIAdd(t).redMul(r)).redSqr().redISub(this.x.redAdd(this.x)),t=t.redMul(this.x.redSub(r)).redISub(this.y),this.curve.point(r,t)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return e=[this,e],r=[t,r],this.curve.endo?this.curve._endoWnafMulAdd(e,r):this.curve._wnafMulAdd(1,e,r,2)},c.prototype.jmulAdd=function(t,e,r){return e=[this,e],r=[t,r],this.curve.endo?this.curve._endoWnafMulAdd(e,r,!0):this.curve._wnafMulAdd(1,e,r,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e,r=this.curve.point(this.x,this.y.redNeg());return t&&this.precomputed&&(e=this.precomputed,t=function(t){return t.neg()},r.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(t)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(t)}}),r},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,A.BasePoint),s.prototype.jpoint=function(t,e,r){return new u(this,t,e,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=(r=this.z.redInvm()).redSqr(),e=this.x.redMul(t),r=this.y.redMul(t).redMul(r);return this.curve.point(e,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),A=t.y.redMul(r.redMul(this.z));return e=n.redSub(i),r=o.redSub(A),0===e.cmpn(0)?0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(A=(i=e.redSqr()).redMul(e),n=n.redMul(i),i=r.redSqr().redIAdd(A).redISub(n).redISub(n),A=r.redMul(n.redISub(i)).redISub(o.redMul(A)),e=this.z.redMul(t.z).redMul(e),this.curve.jpoint(i,A,e))},u.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z);return t=r.redSub(n),e=i.redSub(o),0===t.cmpn(0)?0!==e.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(o=(n=t.redSqr()).redMul(t),r=r.redMul(n),n=e.redSqr().redIAdd(o).redISub(r).redISub(r),o=e.redMul(r.redISub(n)).redISub(i.redMul(o)),t=this.z.redMul(t),this.curve.jpoint(n,o,t))},u.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}var n=this.curve.a,i=this.curve.tinv,o=this.x,A=this.y,a=this.z,s=a.redSqr().redSqr(),c=A.redAdd(A);for(r=0;r<t;r++){var u=o.redSqr(),f=(l=c.redSqr()).redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(s)),l=(u=o.redMul(l),h.redSqr().redISub(u.redAdd(u)));u=u.redISub(l),h=(h=h.redMul(u)).redIAdd(h).redISub(f),u=c.redMul(a),r+1<t&&(s=s.redMul(f)),o=l,a=u,c=h}return this.curve.jpoint(o,c.redMul(i),a)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var t,e,r,n,i,o=this.zOne?(r=this.x.redSqr(),t=(n=this.y.redSqr()).redSqr(),i=(i=this.x.redAdd(n).redSqr().redISub(r).redISub(t)).redIAdd(i),n=(e=r.redAdd(r).redIAdd(r)).redSqr().redISub(i).redISub(i),r=(r=(r=t.redIAdd(t)).redIAdd(r)).redIAdd(r),e=e.redMul(i.redISub(t=n)).redISub(r),this.y.redAdd(this.y)):(i=this.x.redSqr(),o=(n=this.y.redSqr()).redSqr(),r=(r=this.x.redAdd(n).redSqr().redISub(i).redISub(o)).redIAdd(r),i=(n=i.redAdd(i).redIAdd(i)).redSqr(),o=(o=(o=o.redIAdd(o)).redIAdd(o)).redIAdd(o),t=i.redISub(r).redISub(r),e=n.redMul(r.redISub(t)).redISub(o),(o=this.y.redMul(this.z)).redIAdd(o));return this.curve.jpoint(t,e,o)},u.prototype._threeDbl=function(){var t,e,r,n,i,o,A,a;return this.zOne?(A=this.x.redSqr(),r=(t=this.y.redSqr()).redSqr(),o=(o=this.x.redAdd(t).redSqr().redISub(A).redISub(r)).redIAdd(o),e=n=(a=A.redAdd(A).redIAdd(A).redIAdd(this.curve.a)).redSqr().redISub(o).redISub(o),i=(i=(i=r.redIAdd(r)).redIAdd(i)).redIAdd(i),t=a.redMul(o.redISub(n)).redISub(i),A=this.y.redAdd(this.y)):(r=this.z.redSqr(),a=this.y.redSqr(),o=this.x.redMul(a),n=(n=this.x.redSub(r).redMul(this.x.redAdd(r))).redAdd(n).redIAdd(n),o=(i=(i=o.redIAdd(o)).redIAdd(i)).redAdd(i),e=n.redSqr().redISub(o),A=this.y.redAdd(this.z).redSqr().redISub(a).redISub(r),a=(a=(a=(a=a.redSqr()).redIAdd(a)).redIAdd(a)).redIAdd(a),t=n.redMul(i.redISub(e)).redISub(a)),this.curve.jpoint(e,t,A)},u.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),A=r.redSqr();return t=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),e=(i=(i=e.redAdd(e)).redIAdd(i)).redMul(A),i=t.redSqr().redISub(e.redAdd(e)),e=e.redISub(i),A=(A=(A=(A=A.redSqr()).redIAdd(A)).redIAdd(A)).redIAdd(A),A=t.redMul(e).redISub(A),n=r.redAdd(r).redMul(n),this.curve.jpoint(i,A,n)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),A=this.x.redAdd(e).redSqr().redISub(t).redISub(n);return t=(A=(A=(A=A.redIAdd(A)).redAdd(A).redIAdd(A)).redISub(o)).redSqr(),n=(n=(n=(n=n.redIAdd(n)).redIAdd(n)).redIAdd(n)).redIAdd(n),o=i.redIAdd(A).redSqr().redISub(o).redISub(t).redISub(n),e=(e=(e=e.redMul(o)).redIAdd(e)).redIAdd(e),e=(e=(e=this.x.redMul(t).redISub(e)).redIAdd(e)).redIAdd(e),o=(o=(o=(o=this.y.redMul(o.redMul(n.redISub(o)).redISub(A.redMul(t)))).redIAdd(o)).redIAdd(o)).redIAdd(o),t=this.z.redAdd(A).redSqr().redISub(r).redISub(t),this.curve.jpoint(e,o,t)},u.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},u.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();return 0===this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0)&&(e=e.redMul(this.z),r=r.redMul(t.z),0===this.y.redMul(r).redISub(t.y.redMul(e)).cmpn(0))},u.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),0<=n.cmp(this.curve.p))return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(t,e,r){"use strict";var n,i=r,o=(r=t("hash.js"),t("./curve")),A=t("./utils").assert;function a(t){"short"===t.type?this.curve=new o.short(t):"edwards"===t.type?this.curve=new o.edwards(t):this.curve=new o.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,A(this.g.validate(),"Invalid curve"),A(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new a(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=t("./precomputed/secp256k1")}catch(t){n=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":15,"./precomputed/secp256k1":23,"./utils":24,"hash.js":26}],19:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("hmac-drbg"),o=t("../utils"),A=t("../curves"),s=t("brorand"),c=o.assert,u=t("./key"),f=t("./signature");function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(A,t),"Unknown curve "+t),t=A[t]),t instanceof A.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}(e.exports=h).prototype.keyPair=function(t){return new u(this,t)},h.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},h.prototype.genKeyPair=function(t){for(var e=new i({hash:this.hash,pers:(t=t||{}).pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var A=new n(e.generate(r));if(!(0<A.cmp(o)))return A.iaddn(1),this.keyFromPrivate(A)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return 0<r&&(t=t.ushrn(r)),!e&&0<=t.cmp(this.n)?t.sub(this.n):t},h.prototype.sign=function(t,e,r,o){"object"==a(r)&&(o=r,r=null),o=o||{},e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var A=this.n.byteLength(),s=(r=e.getPrivate().toArray("be",A),A=t.toArray("be",A),new i({hash:this.hash,entropy:r,nonce:A,pers:o.pers,persEnc:o.persEnc||"utf8"})),c=this.n.sub(new n(1)),u=0;;u++){var h=o.k?o.k(u):new n(s.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||0<=h.cmp(c))){var l=this.g.mul(h);if(!l.isInfinity()){var d=l.getX(),g=d.umod(this.n);if(0!==g.cmpn(0)&&0!==(h=(h=h.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t))).umod(this.n)).cmpn(0))return d=(l.getY().isOdd()?1:0)|(0!==d.cmp(g)?2:0),o.canonical&&0<h.cmp(this.nh)&&(h=this.n.sub(h),d^=1),new f({r:g,s:h,recoveryParam:d})}}}},h.prototype.verify=function(t,e,r,i){return t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i),i=(e=new f(e,"hex")).r,e=e.s,!(i.cmpn(1)<0||0<=i.cmp(this.n))&&(!(e.cmpn(1)<0||0<=e.cmp(this.n))&&(t=(e=e.invm(this.n)).mul(t).umod(this.n),e=e.mul(i).umod(this.n),this.curve._maxwellTrick?!(o=this.g.jmulAdd(t,r.getPublic(),e)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(t,r.getPublic(),e)).isInfinity()&&0===o.getX().umod(this.n).cmp(i)));var o},h.prototype.recoverPubKey=function(t,e,r,i){c((3&r)===r,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,A=new n(t),a=e.r;if(i=e.s,t=1&r,r>>=1,0<=a.cmp(this.curve.p.umod(this.curve.n))&&r)throw new Error("Unable to find sencond key candinate");return a=r?this.curve.pointFromX(a.add(this.curve.n),t):this.curve.pointFromX(a,t),e=e.r.invm(o),A=o.sub(A).mul(e).umod(o),o=i.mul(e).umod(o),this.g.mulAdd(A,a,o)},h.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(t,e,o)}catch(t){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")}},{"../curves":18,"../utils":24,"./key":20,"./signature":21,"bn.js":9,brorand:10,"hmac-drbg":38}],20:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils").assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}(e.exports=o).fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":24,"bn.js":9}],21:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils"),o=i.assert;function A(t,e){if(t instanceof A)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function s(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0==n||4<n)return!1;for(var i=0,o=0,A=e.place;o<n;o++,A++)i<<=8,i|=t[A],i>>>=0;return!(i<=127)&&(e.place=A,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function u(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}(e.exports=A).prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=s(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;if(!1===(e=s(t,r)))return!1;if(o=t.slice(r.place,e+r.place),r.place+=e,2!==t[r.place++])return!1;if(!1===(e=s(t,r)))return!1;if(t.length!==e+r.place)return!1;if(r=t.slice(r.place,e+r.place),0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}return this.r=new n(o),this.s=new n(r),!(this.recoveryParam=null)},A.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];return u(n,e.length),(n=n.concat(e)).push(2),u(n,r.length),e=n.concat(r),u(n=[48],e.length),n=n.concat(e),i.encode(n,t)}},{"../utils":24,"bn.js":9}],22:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],23:[function(t,e,r){e.exports=void 0},{}],24:[function(t,e,r){"use strict";var n=r,i=t("bn.js");r=t("minimalistic-assert"),t=t("minimalistic-crypto-utils"),n.assert=r,n.toArray=t.toArray,n.zero2=t.zero2,n.toHex=t.toHex,n.encode=t.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),A=0;A<n.length;A++){var a,s=o.andln(i-1);o.isOdd()?o.isubn(a=(i>>1)-1<s?(i>>1)-s:s):a=0,n[A]=a,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;0<t.cmpn(-i)||0<e.cmpn(-o);){var A,a=t.andln(3)+i&3,s=e.andln(3)+o&3;3===s&&(s=-1),A=0==(1&(a=3===a?-1:a))?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==s?a:-a,r[0].push(A),s=0==(1&s)?0:3!=(n=e.andln(7)+o&7)&&5!==n||2!==a?s:-s,r[1].push(s),2*i===A+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},{"bn.js":9,"minimalistic-assert":41,"minimalistic-crypto-utils":42}],25:[function(t,e,r){e.exports={version:"6.5.4"}},{}],26:[function(t,e,r){r.utils=t("./hash/utils"),r.common=t("./hash/common"),r.sha=t("./hash/sha"),r.ripemd=t("./hash/ripemd"),r.hmac=t("./hash/hmac"),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},{"./hash/common":27,"./hash/hmac":28,"./hash/ripemd":29,"./hash/sha":30,"./hash/utils":37}],27:[function(t,e,r){"use strict";var n=t("./utils"),i=t("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}(r.BlockHash=o).prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){e=(t=this.pending).length%this._delta8,this.pending=t.slice(t.length-e,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-e,this.endian);for(var r=0;r<t.length;r+=this._delta32)this._update(t,r,r+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},{"./utils":37,"minimalistic-assert":41}],28:[function(t,e,r){"use strict";var n=t("./utils"),i=t("minimalistic-assert");function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}(e.exports=o).prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},{"./utils":37,"minimalistic-assert":41}],29:[function(t,e,r){"use strict";var n=t("./utils"),i=(t=t("./common"),n.rotl32),o=n.sum32,A=n.sum32_3,a=n.sum32_4,s=t.BlockHash;function c(){if(!(this instanceof c))return new c;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function u(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}n.inherits(c,s),(r.ripemd160=c).blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r,n=C=this.h[0],s=m=this.h[1],c=B=this.h[2],g=b=this.h[3],p=E=this.h[4],I=0;I<80;I++){var y=o(i(a(C,u(I,m,B,b),t[f[I]+e],(r=I)<=15?0:r<=31?1518500249:r<=47?1859775393:r<=63?2400959708:2840853838),l[I]),E),C=E,E=b,b=i(B,10),B=m,m=y;y=o(i(a(n,u(79-I,s,c,g),t[h[I]+e],(r=I)<=15?1352829926:r<=31?1548603684:r<=47?1836072691:r<=63?2053994217:0),d[I]),p),n=p,p=g,g=i(c,10),c=s,s=y}y=A(this.h[1],B,g),this.h[1]=A(this.h[2],b,p),this.h[2]=A(this.h[3],E,n),this.h[3]=A(this.h[4],C,s),this.h[4]=A(this.h[0],m,c),this.h[0]=y},c.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":27,"./utils":37}],30:[function(t,e,r){"use strict";r.sha1=t("./sha/1"),r.sha224=t("./sha/224"),r.sha256=t("./sha/256"),r.sha384=t("./sha/384"),r.sha512=t("./sha/512")},{"./sha/1":31,"./sha/224":32,"./sha/256":33,"./sha/384":34,"./sha/512":35}],31:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],32:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],33:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../common"),o=t("./common"),A=t("minimalistic-assert"),a=n.sum32,s=n.sum32_4,c=n.sum32_5,u=o.ch32,f=o.maj32,h=o.s0_256,l=o.s1_256,d=o.g0_256,g=o.g1_256,p=i.BlockHash,I=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;p.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=I,this.W=new Array(64)}n.inherits(y,p),(e.exports=y).blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(g(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],p=this.h[2],I=this.h[3],y=this.h[4],C=this.h[5],E=this.h[6],b=this.h[7];for(A(this.k.length===r.length),n=0;n<r.length;n++){var B=c(b,l(y),u(y,C,E),this.k[n],r[n]),m=a(h(i),f(i,o,p));b=E,E=C,C=y,y=a(I,B),I=p,p=o,o=i,i=a(B,m)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],p),this.h[3]=a(this.h[3],I),this.h[4]=a(this.h[4],y),this.h[5]=a(this.h[5],C),this.h[6]=a(this.h[6],E),this.h[7]=a(this.h[7],b)},y.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":27,"../utils":37,"./common":36,"minimalistic-assert":41}],34:[function(t,e,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],35:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../common"),o=t("minimalistic-assert"),A=n.rotr64_hi,a=n.rotr64_lo,s=n.shr64_hi,c=n.shr64_lo,u=n.sum64,f=n.sum64_hi,h=n.sum64_lo,l=n.sum64_4_hi,d=n.sum64_4_lo,g=n.sum64_5_hi,p=n.sum64_5_lo,I=i.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function C(){if(!(this instanceof C))return new C;I.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}n.inherits(C,I),(e.exports=C).blockSize=1024,C.outSize=512,C.hmacStrength=192,C.padLength=128,C.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=function(t,e){return(e=A(t,e,19)^A(e,t,29)^(e=s(t,e,6)))<0&&(e+=4294967296),e}(r[n-4],r[n-3]),o=function(t,e){return(e=a(t,e,19)^a(e,t,29)^(e=c(t,e,6)))<0&&(e+=4294967296),e}(r[n-4],r[n-3]),u=r[n-14],f=r[n-13],h=function(t,e){return(e=A(t,e,1)^A(t,e,8)^(e=s(t,e,7)))<0&&(e+=4294967296),e}(r[n-30],r[n-29]),g=function(t,e){return(e=a(t,e,1)^a(t,e,8)^(e=c(t,e,7)))<0&&(e+=4294967296),e}(r[n-30],r[n-29]),p=r[n-32],I=r[n-31];r[n]=l(i,o,u,f,h,g,p,I),r[n+1]=d(i,o,u,f,h,g,p,I)}},C.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],c=this.h[3],l=this.h[4],d=this.h[5],I=this.h[6],y=this.h[7],C=this.h[8],E=this.h[9],b=this.h[10],B=this.h[11],m=this.h[12],w=this.h[13],v=this.h[14],Q=this.h[15];o(this.k.length===r.length);for(var _=0;_<r.length;_+=2){var D=v,S=Q,M=function(t,e){return(t=A(t,e,14)^A(t,e,18)^(t=A(e,t,9)))<0&&(t+=4294967296),t}(C,E),k=function(t,e){return(t=a(t,e,14)^a(t,e,18)^(t=a(e,t,9)))<0&&(t+=4294967296),t}(C,E),x=function(t,e,r){return(r=t&e^~t&r)<0&&(r+=4294967296),r}(C,b,m),R=function(t,e,r){return(r=t&e^~t&r)<0&&(r+=4294967296),r}(E,B,w),N=this.k[_],F=this.k[_+1],U=r[_],H=r[_+1],L=g(D,S,M,k,x,R,N,F,U,H);U=p(D,S,M,k,x,R,N,F,U,H),D=function(t,e){return(t=A(t,e,28)^A(e,t,2)^(t=A(e,t,7)))<0&&(t+=4294967296),t}(n,i),S=function(t,e){return(t=a(t,e,28)^a(e,t,2)^(t=a(e,t,7)))<0&&(t+=4294967296),t}(n,i),M=function(t,e,r){return(r=t&e^t&r^e&r)<0&&(r+=4294967296),r}(n,s,l),k=function(t,e,r){return(r=t&e^t&r^e&r)<0&&(r+=4294967296),r}(i,c,d),H=f(D,S,M,k),k=h(D,S,M,k),v=m,Q=w,m=b,w=B,b=C,B=E,C=f(I,y,L,U),E=h(y,y,L,U),I=l,y=d,l=s,d=c,s=n,c=i,n=f(L,U,H,k),i=h(L,U,H,k)}u(this.h,0,n,i),u(this.h,2,s,c),u(this.h,4,l,d),u(this.h,6,I,y),u(this.h,8,C,E),u(this.h,10,b,B),u(this.h,12,m,w),u(this.h,14,v,Q)},C.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":27,"../utils":37,"minimalistic-assert":41}],36:[function(t,e,r){"use strict";var n=t("../utils").rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}r.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?e^r^n:2===t?o(e,r,n):void 0},r.ch32=i,r.maj32=o,r.p32=function(t,e,r){return t^e^r},r.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},r.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},r.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},r.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},{"../utils":37}],37:[function(t,e,r){"use strict";var n=t("minimalistic-assert");function i(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function A(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}t=t("inherits"),r.inherits=t,r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=(o=t.charCodeAt(n))>>8,o=255&o;i?r.push(i,o):r.push(o)}else for(n=0;n<t.length;n++)r[n]=0|t[n];return r},r.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=o(t[r].toString(16));return e},r.htonl=i,r.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var o=t[n];r+=A((o="little"===e?i(o):o).toString(16))}return r},r.zero2=o,r.zero8=A,r.join32=function(t,e,r,i){n((r-=e)%4==0);for(var o=new Array(r/4),A=0,a=e;A<o.length;A++,a+=4){var s="big"===i?t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3]:t[a+3]<<24|t[a+2]<<16|t[a+1]<<8|t[a];o[A]=s>>>0}return o},r.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(t,e){return t>>>e|t<<32-e},r.rotl32=function(t,e){return t<<e|t>>>32-e},r.sum32=function(t,e){return t+e>>>0},r.sum32_3=function(t,e,r){return t+e+r>>>0},r.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},r.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},r.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0;t[e]=(o<n?1:0)+r+i>>>0,t[e+1]=o},r.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},r.sum64_lo=function(t,e,r,n){return e+n>>>0},r.sum64_4_hi=function(t,e,r,n,i,o,A,a){var s=0,c=e;return s+=(c=e+n>>>0)<e?1:0,s+=(c=c+o>>>0)<o?1:0,t+r+i+A+(s+=(c=c+a>>>0)<a?1:0)>>>0},r.sum64_4_lo=function(t,e,r,n,i,o,A,a){return e+n+o+a>>>0},r.sum64_5_hi=function(t,e,r,n,i,o,A,a,s,c){var u=0,f=e;return u+=(f=e+n>>>0)<e?1:0,u+=(f=f+o>>>0)<o?1:0,u+=(f=f+a>>>0)<a?1:0,t+r+i+A+s+(u+=(f=f+c>>>0)<c?1:0)>>>0},r.sum64_5_lo=function(t,e,r,n,i,o,A,a,s,c){return e+n+o+a+c>>>0},r.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},r.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},r.shr64_hi=function(t,e,r){return t>>>r},r.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(t,e,r){"use strict";var n=t("hash.js"),i=t("minimalistic-crypto-utils"),o=t("minimalistic-assert");function A(t){if(!(this instanceof A))return new A(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex");t=i.toArray(t.pers,t.persEnc||"hex"),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,t)}(e.exports=A).prototype._init=function(t,e,r){r=t.concat(e).concat(r),this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},A.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},A.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},A.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},A.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);return n=o.slice(0,t),this._update(r),this._reseed++,i.encode(n,e)}},{"hash.js":26,"minimalistic-assert":41,"minimalistic-crypto-utils":42}],39:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){var r;e&&(t.super_=e,(r=function(){}).prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t)}},{}],40:[function(t,e,n){(function(t,r){(function(){!function(){"use strict";for(var n="object"==("undefined"==typeof window?"undefined":a(window))?window:{},i=!(n=!n.JS_SHA3_NO_NODE_JS&&"object"==a(t)&&t.versions&&t.versions.node?r:n).JS_SHA3_NO_COMMON_JS&&"object"==a(e)&&e.exports,o="0123456789abcdef".split(""),A=[0,8,16,24],s=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],c=[224,256,384,512],u=["hex","buffer","arrayBuffer","array"],f=function(t,e,r){return function(n){return new B(t,e,t).update(n)[r]()}},h=function(t,e,r){return function(n,i){return new B(t,e,i).update(n)[r]()}},l=function(t,e){var r=f(t,e,"hex");r.create=function(){return new B(t,e,t)},r.update=function(t){return r.create().update(t)};for(var n=0;n<u.length;++n){var i=u[n];r[i]=f(t,e,i)}return r},d=[{name:"keccak",padding:[1,256,65536,16777216],bits:c,createMethod:l},{name:"sha3",padding:[6,1536,393216,100663296],bits:c,createMethod:l},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(t,e){var r=h(t,e,"hex");r.create=function(r){return new B(t,e,r)},r.update=function(t,e){return r.create(e).update(t)};for(var n=0;n<u.length;++n){var i=u[n];r[i]=h(t,e,i)}return r}}],g={},p=[],I=0;I<d.length;++I)for(var y=d[I],C=y.bits,E=0;E<C.length;++E){var b=y.name+"_"+C[E];p.push(b),g[b]=y.createMethod(C[E],y.padding)}function B(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}B.prototype.update=function(t){for(var e,r,n="string"!=typeof t,i=(t=n&&t.constructor===ArrayBuffer?new Uint8Array(t):t).length,o=this.blocks,a=this.byteCount,s=this.blockCount,c=0,u=this.s;c<i;){if(this.reset)for(this.reset=!1,o[0]=this.block,e=1;e<s+1;++e)o[e]=0;if(n)for(e=this.start;c<i&&e<a;++c)o[e>>2]|=t[c]<<A[3&e++];else for(e=this.start;c<i&&e<a;++c)(r=t.charCodeAt(c))<128?o[e>>2]|=r<<A[3&e++]:(r<2048?o[e>>2]|=(192|r>>6)<<A[3&e++]:(r<55296||57344<=r?o[e>>2]|=(224|r>>12)<<A[3&e++]:(r=65536+((1023&r)<<10|1023&t.charCodeAt(++c)),o[e>>2]|=(240|r>>18)<<A[3&e++],o[e>>2]|=(128|r>>12&63)<<A[3&e++]),o[e>>2]|=(128|r>>6&63)<<A[3&e++]),o[e>>2]|=(128|63&r)<<A[3&e++]);if(a<=(this.lastByteIndex=e)){for(this.start=e-a,this.block=o[s],e=0;e<s;++e)u[e]^=o[e];m(u),this.reset=!0}else this.start=e}return this},B.prototype.finalize=function(){var t=this.blocks,e=this.lastByteIndex,r=this.blockCount,n=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e<r+1;++e)t[e]=0;for(t[r-1]|=2147483648,e=0;e<r;++e)n[e]^=t[e];m(n)},B.prototype.toString=B.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,A=0,a=0,s="";a<n;){for(A=0;A<e&&a<n;++A,++a)t=r[A],s+=o[t>>4&15]+o[15&t]+o[t>>12&15]+o[t>>8&15]+o[t>>20&15]+o[t>>16&15]+o[t>>28&15]+o[t>>24&15];a%e==0&&(m(r),A=0)}return i&&(t=r[A],0<i&&(s+=o[t>>4&15]+o[15&t]),1<i&&(s+=o[t>>12&15]+o[t>>8&15]),2<i&&(s+=o[t>>20&15]+o[t>>16&15])),s},B.prototype.arrayBuffer=function(){this.finalize();for(var t=this.blockCount,e=this.s,r=this.outputBlocks,n=this.extraBytes,i=0,o=0,A=this.outputBits>>3,a=n?new ArrayBuffer(r+1<<2):new ArrayBuffer(A),s=new Uint32Array(a);o<r;){for(i=0;i<t&&o<r;++i,++o)s[o]=e[i];o%t==0&&m(e)}return n&&(s[i]=e[i],a=a.slice(0,A)),a},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.digest=B.prototype.array=function(){this.finalize();for(var t,e,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,A=0,a=0,s=[];a<i;){for(A=0;A<r&&a<i;++A,++a)e=n[A],s[t=a<<2]=255&e,s[t+1]=e>>8&255,s[t+2]=e>>16&255,s[t+3]=e>>24&255;a%r==0&&m(n)}return o&&(t=a<<2,e=n[A],0<o&&(s[t]=255&e),1<o&&(s[t+1]=e>>8&255),2<o&&(s[t+2]=e>>16&255)),s};var m=function(t){for(var e,r,n,i,o,A,a,c,u,f,h,l,d,g,p,I,y,C,E,b,B,m,w,v,Q,_,D,S,M,k,x,R,N,F,U,H,L,O,T,G,P,j,Y,K,q,J,z,Z,V,W,X=0;X<48;X+=2)D=t[0]^t[10]^t[20]^t[30]^t[40],S=t[1]^t[11]^t[21]^t[31]^t[41],G=t[2]^t[12]^t[22]^t[32]^t[42],T=t[3]^t[13]^t[23]^t[33]^t[43],R=t[4]^t[14]^t[24]^t[34]^t[44],x=t[5]^t[15]^t[25]^t[35]^t[45],J=t[6]^t[16]^t[26]^t[36]^t[46],q=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],f=(g=t[9]^t[19]^t[29]^t[39]^t[49])^(T<<1|G>>>31),t[0]^=u=d^(G<<1|T>>>31),t[1]^=f,t[10]^=u,t[11]^=f,t[20]^=u,t[21]^=f,t[30]^=u,t[31]^=f,t[40]^=u,t[41]^=f,f=S^(x<<1|R>>>31),t[2]^=u=D^(R<<1|x>>>31),t[3]^=f,t[12]^=u,t[13]^=f,t[22]^=u,t[23]^=f,t[32]^=u,t[33]^=f,t[42]^=u,t[43]^=f,f=T^(q<<1|J>>>31),t[4]^=u=G^(J<<1|q>>>31),t[5]^=f,t[14]^=u,t[15]^=f,t[24]^=u,t[25]^=f,t[34]^=u,t[35]^=f,t[44]^=u,t[45]^=f,f=x^(g<<1|d>>>31),t[6]^=u=R^(d<<1|g>>>31),t[7]^=f,t[16]^=u,t[17]^=f,t[26]^=u,t[27]^=f,t[36]^=u,t[37]^=f,t[46]^=u,t[47]^=f,f=q^(S<<1|D>>>31),t[8]^=u=J^(D<<1|S>>>31),t[9]^=f,t[18]^=u,t[19]^=f,t[28]^=u,t[29]^=f,t[38]^=u,t[39]^=f,t[48]^=u,t[49]^=f,e=t[0],r=t[1],N=t[11]<<4|t[10]>>>28,F=t[10]<<4|t[11]>>>28,p=t[20]<<3|t[21]>>>29,I=t[21]<<3|t[20]>>>29,z=t[31]<<9|t[30]>>>23,Z=t[30]<<9|t[31]>>>23,M=t[40]<<18|t[41]>>>14,k=t[41]<<18|t[40]>>>14,B=t[2]<<1|t[3]>>>31,m=t[3]<<1|t[2]>>>31,n=t[13]<<12|t[12]>>>20,i=t[12]<<12|t[13]>>>20,U=t[22]<<10|t[23]>>>22,H=t[23]<<10|t[22]>>>22,y=t[33]<<13|t[32]>>>19,C=t[32]<<13|t[33]>>>19,V=t[42]<<2|t[43]>>>30,W=t[43]<<2|t[42]>>>30,P=t[5]<<30|t[4]>>>2,j=t[4]<<30|t[5]>>>2,w=t[14]<<6|t[15]>>>26,v=t[15]<<6|t[14]>>>26,o=t[25]<<11|t[24]>>>21,A=t[24]<<11|t[25]>>>21,L=t[34]<<15|t[35]>>>17,O=t[35]<<15|t[34]>>>17,E=t[45]<<29|t[44]>>>3,b=t[44]<<29|t[45]>>>3,h=t[6]<<28|t[7]>>>4,l=t[7]<<28|t[6]>>>4,Y=t[17]<<23|t[16]>>>9,K=t[16]<<23|t[17]>>>9,Q=t[26]<<25|t[27]>>>7,_=t[27]<<25|t[26]>>>7,a=t[36]<<21|t[37]>>>11,c=t[37]<<21|t[36]>>>11,T=t[47]<<24|t[46]>>>8,G=t[46]<<24|t[47]>>>8,x=t[8]<<27|t[9]>>>5,R=t[9]<<27|t[8]>>>5,d=t[18]<<20|t[19]>>>12,g=t[19]<<20|t[18]>>>12,q=t[29]<<7|t[28]>>>25,J=t[28]<<7|t[29]>>>25,D=t[38]<<8|t[39]>>>24,S=t[39]<<8|t[38]>>>24,u=t[48]<<14|t[49]>>>18,f=t[49]<<14|t[48]>>>18,t[0]=e^~n&o,t[1]=r^~i&A,t[10]=h^~d&p,t[11]=l^~g&I,t[20]=B^~w&Q,t[21]=m^~v&_,t[30]=x^~N&U,t[31]=R^~F&H,t[40]=P^~Y&q,t[41]=j^~K&J,t[2]=n^~o&a,t[3]=i^~A&c,t[12]=d^~p&y,t[13]=g^~I&C,t[22]=w^~Q&D,t[23]=v^~_&S,t[32]=N^~U&L,t[33]=F^~H&O,t[42]=Y^~q&z,t[43]=K^~J&Z,t[4]=o^~a&u,t[5]=A^~c&f,t[14]=p^~y&E,t[15]=I^~C&b,t[24]=Q^~D&M,t[25]=_^~S&k,t[34]=U^~L&T,t[35]=H^~O&G,t[44]=q^~z&V,t[45]=J^~Z&W,t[6]=a^~u&e,t[7]=c^~f&r,t[16]=y^~E&h,t[17]=C^~b&l,t[26]=D^~M&B,t[27]=S^~k&m,t[36]=L^~T&x,t[37]=O^~G&R,t[46]=z^~V&P,t[47]=Z^~W&j,t[8]=u^~e&n,t[9]=f^~r&i,t[18]=E^~h&d,t[19]=b^~l&g,t[28]=M^~B&w,t[29]=k^~m&v,t[38]=T^~x&N,t[39]=G^~R&F,t[48]=V^~P&Y,t[49]=W^~j&K,t[0]^=s[X],t[1]^=s[X+1]};if(i)e.exports=g;else for(I=0;I<p.length;++I)n[p[I]]=g[p[I]]}()}).call(this)}).call(this,t("_process"),void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:43}],41:[function(t,e,r){(e.exports=function(t,e){if(!t)throw new Error(e||"Assertion failed")}).equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},{}],42:[function(t,e,r){"use strict";function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=(o=t.charCodeAt(n))>>8,o=255&o;i?r.push(i,o):r.push(o)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},{}],43:[function(t,e,r){e.exports={browser:!0}},{}],44:[function(t,e,r){(function(t){(function(){"use strict";function n(t){var e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=1779033703,n=3144134277,i=1013904242,o=2773480762,A=1359893119,a=2600822924,s=528734635,c=1541459225,u=new Array(64);function f(t){for(var f=0,h=t.length;64<=h;){for(var l,d,g,p,I=r,y=n,C=i,E=o,b=A,B=a,m=s,w=c,v=0;v<16;v++)u[v]=(255&t[d=f+4*v])<<24|(255&t[d+1])<<16|(255&t[d+2])<<8|255&t[d+3];for(v=16;v<64;v++)g=((l=u[v-2])>>>17|l<<15)^(l>>>19|l<<13)^l>>>10,l=u[v-15],u[v]=(g+u[v-7]|0)+((p=(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3)+u[v-16]|0)|0;for(v=0;v<64;v++)g=(((b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&B^~b&m)|0)+(w+(e[v]+u[v]|0)|0)|0,p=((I>>>2|I<<30)^(I>>>13|I<<19)^(I>>>22|I<<10))+(I&y^I&C^y&C)|0,w=m,m=B,B=b,b=E+g|0,E=C,C=y,y=I,I=g+p|0;r=r+I|0,n=n+y|0,i=i+C|0,o=o+E|0,A=A+b|0,a=a+B|0,s=s+m|0,c=c+w|0,f+=64,h-=64}}f(t);var h,l=t.length%64,d=t.length/536870912|0,g=t.length<<3,p=l<56?56:120,I=t.slice(t.length-l,t.length);for(I.push(128),h=1+l;h<p;h++)I.push(0);return I.push(d>>>24&255),I.push(d>>>16&255),I.push(d>>>8&255),I.push(d>>>0&255),I.push(g>>>24&255),I.push(g>>>16&255),I.push(g>>>8&255),I.push(g>>>0&255),f(I),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,A>>>24&255,A>>>16&255,A>>>8&255,A>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(t,e,r){t=t.length<=64?t:n(t);for(var i=64+e.length+4,o=new Array(i),A=new Array(64),a=[],s=0;s<64;s++)o[s]=54;for(s=0;s<t.length;s++)o[s]^=t[s];for(s=0;s<e.length;s++)o[64+s]=e[s];for(s=i-4;s<i;s++)o[s]=0;for(s=0;s<64;s++)A[s]=92;for(s=0;s<t.length;s++)A[s]^=t[s];function c(){for(var t=i-1;i-4<=t;t--){if(o[t]++,o[t]<=255)return;o[t]=0}}for(;32<=r;)c(),a=a.concat(n(A.concat(n(o)))),r-=32;return 0<r&&(c(),a=a.concat(n(A.concat(n(o))).slice(0,r))),a}function o(t,e,r,n,i){var o;for(s(t,16*(2*r-1),i,0,16),o=0;o<2*r;o++)a(t,16*o,i,16),function(t,e){s(t,0,e,0,16);for(var r=8;0<r;r-=2)e[4]^=A(e[0]+e[12],7),e[8]^=A(e[4]+e[0],9),e[12]^=A(e[8]+e[4],13),e[0]^=A(e[12]+e[8],18),e[9]^=A(e[5]+e[1],7),e[13]^=A(e[9]+e[5],9),e[1]^=A(e[13]+e[9],13),e[5]^=A(e[1]+e[13],18),e[14]^=A(e[10]+e[6],7),e[2]^=A(e[14]+e[10],9),e[6]^=A(e[2]+e[14],13),e[10]^=A(e[6]+e[2],18),e[3]^=A(e[15]+e[11],7),e[7]^=A(e[3]+e[15],9),e[11]^=A(e[7]+e[3],13),e[15]^=A(e[11]+e[7],18),e[1]^=A(e[0]+e[3],7),e[2]^=A(e[1]+e[0],9),e[3]^=A(e[2]+e[1],13),e[0]^=A(e[3]+e[2],18),e[6]^=A(e[5]+e[4],7),e[7]^=A(e[6]+e[5],9),e[4]^=A(e[7]+e[6],13),e[5]^=A(e[4]+e[7],18),e[11]^=A(e[10]+e[9],7),e[8]^=A(e[11]+e[10],9),e[9]^=A(e[8]+e[11],13),e[10]^=A(e[9]+e[8],18),e[12]^=A(e[15]+e[14],7),e[13]^=A(e[12]+e[15],9),e[14]^=A(e[13]+e[12],13),e[15]^=A(e[14]+e[13],18);for(r=0;r<16;++r)t[r]+=e[r]}(i,n),s(i,0,t,e+16*o,16);for(o=0;o<r;o++)s(t,e+2*o*16,t,16*o,16);for(o=0;o<r;o++)s(t,e+16*(2*o+1),t,16*(o+r),16)}function A(t,e){return t<<e|t>>>32-e}function a(t,e,r,n){for(var i=0;i<n;i++)r[i]^=t[e+i]}function s(t,e,r,n,i){for(;i--;)r[n++]=t[e++]}function c(t){if(t&&"number"==typeof t.length){for(var e=0;e<t.length;e++){if("number"!=typeof t[e])return;var r=parseInt(t[e]);if(r!=t[e]||r<0||256<=r)return}return 1}}function u(t,e){var r=parseInt(t);if(t!=r)throw new Error("invalid "+e);return r}function f(e,r,n,A,f,h,d){if(!d)throw new Error("missing callback");if(n=u(n,"N"),A=u(A,"r"),f=u(f,"p"),h=u(h,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(l/128/A<n)throw new Error("N too large");if(l/128/f<A)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);for(var g=i(e,r,128*f*A),p=new Uint32Array(32*f*A),I=0;I<p.length;I++){var y=4*I;p[I]=(255&g[3+y])<<24|(255&g[2+y])<<16|(255&g[1+y])<<8|(255&g[0+y])<<0}var C,E,b=new Uint32Array(64*A),B=new Uint32Array(32*A*n),m=32*A,w=new Uint32Array(16),v=new Uint32Array(16),Q=f*n*2,_=0,D=null,S=!1,M=0,k=0,x=parseInt(1e3/A),R=void 0!==t?t:setTimeout;!function t(){if(S)return d(new Error("cancelled"),_/Q);switch(M){case 0:s(p,E=32*k*A,b,0,m),M=1,C=0;case 1:x<(c=n-C)&&(c=x);for(var r=0;r<c;r++)s(b,0,B,(C+r)*m,m),o(b,m,A,w,v);if(C+=c,_+=c,(l=parseInt(1e3*_/Q))!==D){if(S=d(null,_/Q))break;D=l}if(C<n)break;C=0,M=2;case 2:var c;for(x<(c=n-C)&&(c=x),r=0;r<c;r++){var u=b[16*(2*A-1)]&n-1;a(B,u*m,b,m),o(b,m,A,w,v)}if(C+=c,_+=c,(l=parseInt(1e3*_/Q))!==D){if(S=d(null,_/Q))break;D=l}if(C<n)break;if(s(b,0,p,E,m),++k<f){M=0;break}for(g=[],r=0;r<p.length;r++)g.push(p[r]>>0&255),g.push(p[r]>>8&255),g.push(p[r]>>16&255),g.push(p[r]>>24&255);var l=i(e,g,h);return d(null,1,l)}R(t)}()}var h,l;h=this,l=2147483647,void 0!==r?e.exports=f:h&&(h.scrypt&&(h._scrypt=h.scrypt),h.scrypt=f)}).call(this)}).call(this,t("timers").setImmediate)},{timers:46}],45:[function(t,e,n){(function(t,e,r){(function(){!function(e,r){"use strict";var n,i,o,A,a,s,c,u;function f(t){return i[n]=h.apply(r,t),n++}function h(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(r,e):new Function(""+t)()}}function l(t){if(o)setTimeout(h(l,t),0);else{var e=i[t];if(e){o=!0;try{e()}finally{d(t),o=!1}}}}function d(t){delete i[t]}e.setImmediate||(n=1,o=!(i={}),A=e.document,u=(u=Object.getPrototypeOf&&Object.getPrototypeOf(e))&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?a=function(){var e=f(arguments);return t.nextTick(h(l,e)),e}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?function(){function t(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(r)&&l(+t.data.slice(r.length))}var r="setImmediate$"+Math.random()+"$";e.addEventListener?e.addEventListener("message",t,!1):e.attachEvent("onmessage",t),a=function(){var t=f(arguments);return e.postMessage(r+t,"*"),t}}():a=e.MessageChannel?((c=new MessageChannel).port1.onmessage=function(t){l(t.data)},function(){var t=f(arguments);return c.port2.postMessage(t),t}):A&&"onreadystatechange"in A.createElement("script")?(s=A.documentElement,function(){var t=f(arguments),e=A.createElement("script");return e.onreadystatechange=function(){l(t),e.onreadystatechange=null,s.removeChild(e),e=null},s.appendChild(e),t}):function(){var t=f(arguments);return setTimeout(h(l,t),0),t},u.setImmediate=a,u.clearImmediate=d)}("undefined"==typeof self?void 0===e?this:e:self)}).call(this)}).call(this,t("_process"),void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").clearImmediate)},{_process:43,timers:46}],46:[function(t,e,n){(function(t){(function(){e.exports={setImmediate:t.setImmediate}}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(t,e,n){(function(t){(function(){var r,n,i;t.crypto&&crypto.getRandomValues&&(r=new Uint8Array(16),n=function(){return crypto.getRandomValues(r),r}),n||(i=new Array(16),n=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}),e.exports=n}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(t,e,r){for(var n=t("./rng"),i=[],o={},A=0;A<256;A++)i[A]=(A+256).toString(16).substr(1),o[i[A]]=A;function a(t,e){return e=e||0,i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+"-"+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]+i[t[e++]]}var s=[1|(t=n())[0],t[1],t[2],t[3],t[4],t[5]],c=16383&(t[6]<<8|t[7]),u=0,f=0;function h(t,e,r){var i=e&&r||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var A=0;A<16;A++)e[i+A]=o[A];return e||a(o)}(t=h).v1=function(t,e,r){var n=e&&r||0,i=e||[],o=void 0!==(t=t||{}).clockseq?t.clockseq:c,A=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:f+1;if((r=A-u+(h-f)/1e4)<0&&void 0===t.clockseq&&(o=o+1&16383),1e4<=(h=(r<0||u<A)&&void 0===t.nsecs?0:h))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=A,c=o,h=(1e4*(268435455&(A+=122192928e5))+(f=h))%4294967296,i[n++]=h>>>24&255,i[n++]=h>>>16&255,i[n++]=h>>>8&255,i[n++]=255&h,A=A/4294967296*1e4&268435455,i[n++]=A>>>8&255,i[n++]=255&A,i[n++]=A>>>24&15|16,i[n++]=A>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var l=t.node||s,d=0;d<6;d++)i[n+d]=l[d];return e||a(i)},t.v4=h,t.parse=function(t,e,r){var n=e&&r||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,(function(t){i<16&&(e[n+i++]=o[t])}));i<16;)e[n+i++]=0;return e},t.unparse=a,e.exports=t},{"./rng":47}],49:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});try{e.exports.XMLHttpRequest=XMLHttpRequest}catch(t){console.log("Warning: XMLHttpRequest is not defined"),e.exports.XMLHttpRequest=null}},{}],50:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../utils/properties");function i(){n.setType(this,"Provider")}i.isProvider=function(t){return n.isType(t,"Provider")},t=i,r.Provider=t},{"../utils/properties":74}],51:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A=t("../utils/address"),s=t("../utils/bignumber"),c=t("../utils/bytes"),u=t("../constants"),f=t("../utils/hash"),h=t("../utils/networks"),l=t("../utils/properties"),d=t("../utils/rlp"),g=t("../utils/transaction"),p=t("../utils/utf8"),I=t("../utils/web"),y=o(t("../errors")),C=t("./abstract-provider");function E(t,e){var r,n={};for(r in t)try{var i=t[r](e[r]);void 0!==i&&(n[r]=i)}catch(t){throw t.checkKey=r,t.checkValue=e[r],t}return n}function b(t,e){return function(r){return null==r?e:t(r)}}function B(t){return function(e){if(!Array.isArray(e))throw new Error("not an array");var r=[];return e.forEach((function(e){r.push(t(e))})),r}}function m(t,e){return"string"==typeof t&&(e||"0x"===t.substring(0,2)||(t="0x"+t),32===c.hexDataLength(t))?t.toLowerCase():(y.throwError("invalid hash",y.INVALID_ARGUMENT,{arg:"hash",value:t}),null)}function w(t){return s.bigNumberify(t).toNumber()}function v(t){if(!c.isHexString(t))throw new Error("invalid uint256");for(;t.length<66;)t="0x0"+t.substring(2);return t}function Q(t){if(null==t)return"latest";if("earliest"===t)return"0x0";if("latest"===t||"pending"===t)return t;if("number"==typeof t)return c.hexStripZeros(c.hexlify(t));if(c.isHexString(t))return c.hexStripZeros(t);throw new Error("invalid blockTag")}var _={hash:m,blockHash:b(m,null),blockNumber:b(w,null),transactionIndex:b(w,null),confirmations:b(w,null),from:A.getAddress,gasPrice:s.bigNumberify,gasLimit:s.bigNumberify,to:b(A.getAddress,null),value:s.bigNumberify,nonce:w,data:c.hexlify,r:b(v),s:b(v),v:b(w),creates:b(A.getAddress,null),raw:b(c.hexlify)};function D(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&s.bigNumberify(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=A.getContractAddress(t)),t.raw||t.v&&t.r&&t.s&&(r=[c.stripZeros(c.hexlify(t.nonce)),c.stripZeros(c.hexlify(t.gasPrice)),c.stripZeros(c.hexlify(t.gasLimit)),t.to||"0x",c.stripZeros(c.hexlify(t.value||"0x")),c.hexlify(t.data||"0x"),c.stripZeros(c.hexlify(t.v||"0x")),c.stripZeros(c.hexlify(t.r)),c.stripZeros(c.hexlify(t.s))],t.raw=d.encode(r));var e=E(_,t),r=t.networkId;return null!=t.chainId&&null==r&&null==e.v&&(r=t.chainId),"number"!=typeof(r=c.isHexString(r)?s.bigNumberify(r).toNumber():r)&&null!=e.v&&((r=(e.v-35)/2)<0&&(r=0),r=parseInt(r)),e.networkId=r="number"!=typeof r?0:r,null==e.chainId&&null!=r&&(e.chainId=r),e.blockHash&&"x"===e.blockHash.replace(/0/g,"")&&(e.blockHash=null),e}var S={hash:m,parentHash:m,number:w,timestamp:w,nonce:b(c.hexlify),difficulty:function(t){t=s.bigNumberify(t);try{return t.toNumber()}catch(t){}return null},gasLimit:s.bigNumberify,gasUsed:s.bigNumberify,miner:A.getAddress,extraData:c.hexlify,transactions:b(B(m))},M=l.shallowCopy(S);function k(t,e){return null!=t.author&&null==t.miner&&(t.miner=t.author),E(e?M:S,t)}M.transactions=b(B(D));var x={from:b(A.getAddress),nonce:b(w),gasLimit:b(s.bigNumberify),gasPrice:b(s.bigNumberify),to:b(A.getAddress),value:b(s.bigNumberify),data:b(c.hexlify)};function R(t){return E(x,t)}var N={transactionLogIndex:b(w),transactionIndex:w,blockNumber:w,transactionHash:m,address:A.getAddress,topics:B(m),data:c.hexlify,logIndex:w,blockHash:m},F={to:b(A.getAddress,null),from:b(A.getAddress,null),contractAddress:b(A.getAddress,null),transactionIndex:w,root:b(m),gasUsed:s.bigNumberify,logsBloom:b(c.hexlify),blockHash:m,transactionHash:m,logs:B((function(t){return E(N,t)})),blockNumber:w,confirmations:b(w,null),cumulativeGasUsed:s.bigNumberify,status:b(w)};function U(t){return Array.isArray(t)?t.forEach((function(t){U(t)})):null!=t&&m(t),t}var H,L,O={fromBlock:b(Q,void 0),toBlock:b(Q,void 0),address:b(A.getAddress,void 0),topics:b(U,void 0)},T={blockHash:b(m,void 0),address:b(A.getAddress,void 0),topics:b(U,void 0)},G={blockNumber:b(w),blockHash:b(m),transactionIndex:w,removed:b((function(t){if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===t)return!0;if("false"===t)return!1}throw new Error("invaid boolean - "+t)})),address:A.getAddress,data:(H=c.hexlify,function(t){return t?H(t):"0x"}),topics:B(m),transactionHash:m,logIndex:w};function P(t){return E(G,t)}function j(t){return t.map((function(t){return"string"==typeof t?t:Array.isArray(t)?(t.forEach((function(t){null!==t&&32!==c.hexDataLength(t)&&y.throwError("invalid topic",y.INVALID_ARGUMENT,{argument:"topic",value:t})})),t.join(",")):null===t?"":y.throwError("invalid topic value",y.INVALID_ARGUMENT,{argument:"topic",value:t})})).join("&")}function Y(t){if("string"==typeof t){if(20===c.hexDataLength(t))return"address:"+A.getAddress(t);if(t=t.toLowerCase(),32===c.hexDataLength(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter::"+j(t);if(t&&"object"==a(t))return"filter:"+(t.address||"")+":"+j(t.topics||[])}throw new Error("invalid event - "+t)}function K(){return(new Date).getTime()}function q(t){var e,r=L.call(this)||this;return y.checkNew(r,C.Provider),t instanceof Promise?(l.defineReadOnly(r,"ready",t.then((function(t){return l.defineReadOnly(r,"_network",t),t}))),r.ready.catch((function(t){}))):(e=h.getNetwork(null==t?"homestead":t))?(l.defineReadOnly(r,"_network",e),l.defineReadOnly(r,"ready",Promise.resolve(r._network))):y.throwError("invalid network",y.INVALID_ARGUMENT,{arg:"network",value:t}),r._lastBlockNumber=-2,r._balances={},r._events=[],r._pollingInterval=4e3,r._emitted={block:-2},r._fastQueryDate=0,r}i(q,L=C.Provider),q.prototype._doPoll=function(){var t=this;this.getBlockNumber().then((function(e){if(t.polling&&(t._setFastBlockNumber(e),e!==t._lastBlockNumber)){-2===t._emitted.block&&(t._emitted.block=e-1);for(var r=t._emitted.block+1;r<=e;r++)t.emit("block",r);t._emitted.block!==e&&(t._emitted.block=e,Object.keys(t._emitted).forEach((function(r){var n;"block"===r||"pending"!==(n=t._emitted[r])&&12<e-n&&delete t._emitted[r]}))),-2===t._lastBlockNumber&&(t._lastBlockNumber=e-1);var n={},i={};return t._events.forEach((function(t){i[t.tag]=!0})),Object.keys(i).forEach((function(r){var i=r.split(":");switch(i[0]){case"tx":var o=i[1];t.getTransactionReceipt(o).then((function(e){return e&&null!=e.blockNumber&&(t._emitted["t:"+o]=e.blockNumber,t.emit(o,e)),null})).catch((function(e){t.emit("error",e)}));break;case"address":var A=i[1];t._balances[A]&&(n[A]=t._balances[A]),t.getBalance(A,"latest").then((function(e){var r=t._balances[A];if(!r||!e.eq(r))return t._balances[A]=e,t.emit(A,e),null})).catch((function(e){t.emit("error",e)}));break;case"filter":var a=i[2].split(/&/g).map((function(t){var e=t.split(",");return 1===e.length?""===e[0]?null:t:e.map((function(t){return""===t?null:t}))})),s={address:i[1],fromBlock:t._lastBlockNumber+1,toBlock:e,topics:a};s.address||delete s.address,t.getLogs(s).then((function(e){if(0!==e.length)return e.forEach((function(e){t._emitted["b:"+e.blockHash]=e.blockNumber,t._emitted["t:"+e.transactionHash]=e.blockNumber,t.emit(s,e)})),null})).catch((function(e){t.emit("error",e)}))}})),t._lastBlockNumber=e,t._balances=n,null}})).catch((function(t){})),this.doPoll()},q.prototype.resetEventsBlock=function(t){this._lastBlockNumber=t-1,this.polling&&this._doPoll()},Object.defineProperty(q.prototype,"network",{get:function(){return this._network},enumerable:!0,configurable:!0}),q.prototype.getNetwork=function(){return this.ready},Object.defineProperty(q.prototype,"blockNumber",{get:function(){return this._fastBlockNumber},enumerable:!0,configurable:!0}),Object.defineProperty(q.prototype,"polling",{get:function(){return null!=this._poller},set:function(t){var e=this;setTimeout((function(){t&&!e._poller?(e._poller=setInterval(e._doPoll.bind(e),e.pollingInterval),e._doPoll()):!t&&e._poller&&(clearInterval(e._poller),e._poller=null)}),0)},enumerable:!0,configurable:!0}),Object.defineProperty(q.prototype,"pollingInterval",{get:function(){return this._pollingInterval},set:function(t){var e=this;if("number"!=typeof t||t<=0||parseInt(String(t))!=t)throw new Error("invalid polling interval");this._pollingInterval=t,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){e._doPoll()}),this._pollingInterval))},enumerable:!0,configurable:!0}),q.prototype._getFastBlockNumber=function(){var t=this,e=K();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((function(e){return(null==t._fastBlockNumber||e>t._fastBlockNumber)&&(t._fastBlockNumber=e),t._fastBlockNumber}))),this._fastBlockNumberPromise},q.prototype._setFastBlockNumber=function(t){null!=this._fastBlockNumber&&t<this._fastBlockNumber||(this._fastQueryDate=K(),(null==this._fastBlockNumber||t>this._fastBlockNumber)&&(this._fastBlockNumber=t,this._fastBlockNumberPromise=Promise.resolve(t)))},q.prototype.waitForTransaction=function(t,e){var r=this;return null==e&&(e=1),this.getTransactionReceipt(t).then((function(n){return 0===e||n&&n.confirmations>=e?n:new Promise((function(n){r.on(t,(function i(o){o.confirmations<e||(r.removeListener(t,i),n(o))}))}))}))},q.prototype.getBlockNumber=function(){var t=this;return this.ready.then((function(){return t.perform("getBlockNumber",{}).then((function(e){var r=parseInt(e);if(r!=e)throw new Error("invalid response - getBlockNumber");return t._setFastBlockNumber(r),r}))}))},q.prototype.getGasPrice=function(){var t=this;return this.ready.then((function(){return t.perform("getGasPrice",{}).then((function(t){return s.bigNumberify(t)}))}))},q.prototype.getBalance=function(t,e){var r=this;return this.ready.then((function(){return l.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,n=t.blockTag;return r._getAddress(e).then((function(t){return t={address:t,blockTag:Q(n)},r.perform("getBalance",t).then((function(t){return s.bigNumberify(t)}))}))}))}))},q.prototype.getTransactionCount=function(t,e){var r=this;return this.ready.then((function(){return l.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,n=t.blockTag;return r._getAddress(e).then((function(t){return t={address:t,blockTag:Q(n)},r.perform("getTransactionCount",t).then((function(t){return s.bigNumberify(t).toNumber()}))}))}))}))},q.prototype.getCode=function(t,e){var r=this;return this.ready.then((function(){return l.resolveProperties({addressOrName:t,blockTag:e}).then((function(t){var e=t.addressOrName,n=t.blockTag;return r._getAddress(e).then((function(t){return t={address:t,blockTag:Q(n)},r.perform("getCode",t).then((function(t){return c.hexlify(t)}))}))}))}))},q.prototype.getStorageAt=function(t,e,r){var n=this;return this.ready.then((function(){return l.resolveProperties({addressOrName:t,position:e,blockTag:r}).then((function(t){var e=t.addressOrName,r=t.position,i=t.blockTag;return n._getAddress(e).then((function(t){return t={address:t,blockTag:Q(i),position:c.hexStripZeros(c.hexlify(r))},n.perform("getStorageAt",t).then((function(t){return c.hexlify(t)}))}))}))}))},q.prototype.sendTransaction=function(t){var e=this;return this.ready.then((function(){return l.resolveProperties({signedTransaction:t}).then((function(t){var r=t.signedTransaction;return t={signedTransaction:c.hexlify(r)},e.perform("sendTransaction",t).then((function(t){return e._wrapTransaction(g.parse(r),t)}),(function(t){throw t.transaction=g.parse(r),t.transaction.hash&&(t.transactionHash=t.transaction.hash),t}))}))}))},q.prototype._wrapTransaction=function(t,e){var r=this;if(null!=e&&32!==c.hexDataLength(e))throw new Error("invalid response - sendTransaction");var n=t;return null!=e&&t.hash!==e&&y.throwError("Transaction hash mismatch from Provider.sendTransaction.",y.UNKNOWN_ERROR,{expectedHash:t.hash,returnedHash:e}),n.wait=function(e){return 0!==e&&(r._emitted["t:"+t.hash]="pending"),r.waitForTransaction(t.hash,e).then((function(n){return null==n&&0===e?null:(r._emitted["t:"+t.hash]=n.blockNumber,0===n.status&&y.throwError("transaction failed",y.CALL_EXCEPTION,{transactionHash:t.hash,transaction:t}),n)}))},n},q.prototype.call=function(t,e){var r=this,n=l.shallowCopy(t);return this.ready.then((function(){return l.resolveProperties({blockTag:e,tx:n}).then((function(t){var e=t.blockTag;return t=t.tx,r._resolveNames(t,["to","from"]).then((function(t){return t={blockTag:Q(e),transaction:R(t)},r.perform("call",t).then((function(t){return c.hexlify(t)}))}))}))}))},q.prototype.estimateGas=function(t){var e=this,r={to:t.to,from:t.from,data:t.data,gasPrice:t.gasPrice,value:t.value};return this.ready.then((function(){return l.resolveProperties(r).then((function(t){return e._resolveNames(t,["to","from"]).then((function(t){return t={transaction:R(t)},e.perform("estimateGas",t).then((function(t){return s.bigNumberify(t)}))}))}))}))},q.prototype.getBlock=function(t,e){var r=this;return this.ready.then((function(){return l.resolveProperties({blockHashOrBlockTag:t}).then((function(t){t=t.blockHashOrBlockTag;try{var n=c.hexlify(t);if(32===c.hexDataLength(n))return I.poll((function(){return r.perform("getBlock",{blockHash:n,includeTransactions:!!e}).then((function(t){return null==t?null==r._emitted["b:"+n]?null:void 0:k(t,e)}))}),{onceBlock:r})}catch(t){}try{var i=-128,o=Q(t);return c.isHexString(o)&&(i=parseInt(o.substring(2),16)),I.poll((function(){return r.perform("getBlock",{blockTag:o,includeTransactions:!!e}).then((function(t){return null==t?i<=r._emitted.block?void 0:null:k(t,e)}))}),{onceBlock:r})}catch(t){}throw new Error("invalid block hash or block tag")}))}))},q.prototype.getTransaction=function(t){var e=this;return this.ready.then((function(){return l.resolveProperties({transactionHash:t}).then((function(t){var r=t.transactionHash,n={transactionHash:m(r,!0)};return I.poll((function(){return e.perform("getTransaction",n).then((function(t){if(null==t)return null==e._emitted["t:"+r]?null:void 0;var n=q.checkTransactionResponse(t);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations)return e._getFastBlockNumber().then((function(t){return t=t-n.blockNumber+1,n.confirmations=t=t<=0?1:t,e._wrapTransaction(n)}));return e._wrapTransaction(n)}))}),{onceBlock:e})}))}))},q.prototype.getTransactionReceipt=function(t){var e=this;return this.ready.then((function(){return l.resolveProperties({transactionHash:t}).then((function(t){var r=t.transactionHash,n={transactionHash:m(r,!0)};return I.poll((function(){return e.perform("getTransactionReceipt",n).then((function(t){if(null==t)return null==e._emitted["t:"+r]?null:void 0;if(null!=t.blockHash){var n,i=((t=E(F,n=t)).logs.forEach((function(t,e){null==t.transactionLogIndex&&(t.transactionLogIndex=e)})),null!=n.status&&(t.byzantium=!0),t);if(null==i.blockNumber)i.confirmations=0;else if(null==i.confirmations)return e._getFastBlockNumber().then((function(t){return t=t-i.blockNumber+1,i.confirmations=t=t<=0?1:t,i}));return i}}))}),{onceBlock:e})}))}))},q.prototype.getLogs=function(t){var e=this;return this.ready.then((function(){return l.resolveProperties(t).then((function(t){return e._resolveNames(t,["address"]).then((function(t){return t={filter:(t=t)&&t.blockHash?E(T,t):E(O,t)},e.perform("getLogs",t).then((function(t){return B(P)(t)}))}))}))}))},q.prototype.getEtherPrice=function(){var t=this;return this.ready.then((function(){return t.perform("getEtherPrice",{}).then((function(t){return t}))}))},q.prototype._getAddress=function(t){return this.resolveName(t).then((function(e){return null==e&&y.throwError("ENS name not configured",y.UNSUPPORTED_OPERATION,{operation:"resolveName("+JSON.stringify(t)+")"}),e}))},q.prototype._resolveNames=function(t,e){var r=[],n=l.shallowCopy(t);return e.forEach((function(t){null!=n[t]&&r.push(this._getAddress(n[t]).then((function(e){n[t]=e})))}),this),Promise.all(r).then((function(){return n}))},q.prototype._getResolver=function(t){var e=this;return this.getNetwork().then((function(r){r.ensAddress||y.throwError("network does not support ENS",y.UNSUPPORTED_OPERATION,{operation:"ENS",network:r.name});var n="0x0178b8bf"+f.namehash(t).substring(2);return n={to:r.ensAddress,data:n},e.call(n).then((function(t){return 32!==c.hexDataLength(t)||(t=A.getAddress(c.hexDataSlice(t,12)))===u.AddressZero?null:t}))}))},q.prototype.resolveName=function(t){var e=this;if(t instanceof Promise)return t.then((function(t){return e.resolveName(t)}));try{return Promise.resolve(A.getAddress(t))}catch(e){if(c.isHexString(t))throw e}var r=this,n=f.namehash(t);return this._getResolver(t).then((function(t){if(null==t)return null;var e="0x3b3b57de"+n.substring(2);return r.call({to:t,data:e})})).then((function(t){return 32!==c.hexDataLength(t)||(t=A.getAddress(c.hexDataSlice(t,12)))===u.AddressZero?null:t}))},q.prototype.lookupAddress=function(t){var e=this;if(t instanceof Promise)return t.then((function(t){return e.lookupAddress(t)}));var r=(t=A.getAddress(t)).substring(2)+".addr.reverse",n=f.namehash(r),i=this;return this._getResolver(r).then((function(t){if(!t)return null;var e="0x691f3431"+n.substring(2);return i.call({to:t,data:e})})).then((function(e){if(null==e)return null;if((e=e.substring(2)).length<64)return null;if((e=e.substring(64)).length<64)return null;var r=s.bigNumberify("0x"+e.substring(0,64)).toNumber();if(2*r>(e=e.substring(64)).length)return null;var n=p.toUtf8String("0x"+e.substring(0,2*r));return i.resolveName(n).then((function(e){return e!=t?null:n}))}))},q.checkTransactionResponse=D,q.prototype.doPoll=function(){},q.prototype.perform=function(t,e){return y.throwError(t+" not implemented",y.NOT_IMPLEMENTED,{operation:t}),null},q.prototype._startPending=function(){y.warn("WARNING: this provider does not support pending events")},q.prototype._stopPending=function(){},q.prototype._addEventListener=function(t,e,r){this._events.push({tag:Y(t),listener:e,once:r}),"pending"===t&&this._startPending(),this.polling=!0},q.prototype.on=function(t,e){return this._addEventListener(t,e,!1),this},q.prototype.once=function(t,e){return this._addEventListener(t,e,!0),this},q.prototype.addEventListener=function(t,e){return this.on(t,e)},q.prototype.emit=function(t){for(var e=this,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=!1,o=Y(t);return this._events=this._events.filter((function(t){return t.tag!==o||(setTimeout((function(){t.listener.apply(e,r)}),0),i=!0,!t.once)})),0===this.listenerCount()&&(this.polling=!1),i},q.prototype.listenerCount=function(t){if(!t)return this._events.length;var e=Y(t);return this._events.filter((function(t){return t.tag===e})).length},q.prototype.listeners=function(t){var e=Y(t);return this._events.filter((function(t){return t.tag===e})).map((function(t){return t.listener}))},q.prototype.removeAllListeners=function(t){var e;return null==t?(this._events=[],this._stopPending()):(e=Y(t),this._events=this._events.filter((function(t){return t.tag!==e})),"pending"===t&&this._stopPending()),0===this._events.length&&(this.polling=!1),this},q.prototype.removeListener=function(t,e){var r=!1,n=Y(t);return this._events=this._events.filter((function(t){return t.tag!==n||t.listener!=e||!!r||!(r=!0)})),"pending"===t&&0===this.listenerCount("pending")&&this._stopPending(),0===this.listenerCount()&&(this.polling=!1),this},i=q,r.BaseProvider=i,l.defineReadOnly(C.Provider,"inherits",l.inheritable(C.Provider))},{"../constants":3,"../errors":5,"../utils/address":60,"../utils/bignumber":63,"../utils/bytes":64,"../utils/hash":65,"../utils/networks":72,"../utils/properties":74,"../utils/rlp":76,"../utils/transaction":83,"../utils/utf8":85,"../utils/web":86,"./abstract-provider":50}],52:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A,a=t("./base-provider"),s=t("../utils/bytes"),c=t("../utils/properties"),u=t("../utils/web"),f=o(t("../errors"));function h(t){var e,r,n=[];for(e in t)null!=t[e]&&(r=s.hexlify(t[e]),{gasLimit:!0,gasPrice:!0,nonce:!0,value:!0}[e]&&(r=s.hexStripZeros(r)),n.push(e+"="+r));return n.join("&")}function l(t){if(0==t.status&&("No records found"===t.message||"No transactions found"===t.message))return t.result;if(1==t.status&&"OK"==t.message)return t.result;var e=new Error("invalid response");throw e.result=JSON.stringify(t),e}function d(t){if("2.0"!=t.jsonrpc)throw(e=new Error("invalid response")).result=JSON.stringify(t),e;if(t.error){var e=new Error(t.error.message||"unknown error");throw t.error.code&&(e.code=t.error.code),t.error.data&&(e.data=t.error.data),e}return t.result}function g(t){if("pending"===t)throw new Error("pending not supported");return"latest"===t?t:parseInt(t.substring(2),16)}function p(t,e){var r=A.call(this,t)||this;f.checkNew(r,p),t="invalid";var n=null;switch(t=r.network?r.network.name:t){case"homestead":n="https://api.etherscan.io";break;case"ropsten":n="https://api-ropsten.etherscan.io";break;case"rinkeby":n="https://api-rinkeby.etherscan.io";break;case"kovan":n="https://api-kovan.etherscan.io";break;case"goerli":n="https://api-goerli.etherscan.io";break;default:throw new Error("unsupported network")}return c.defineReadOnly(r,"baseUrl",n),c.defineReadOnly(r,"apiKey",e||"8FG3JMZ9USS4NTA6YKEKHINU56SEPPVBJR"),r}i(p,A=a.BaseProvider),p.prototype.perform=function(t,e){var r,n=this,i=this.baseUrl,o="";function a(t,e){return u.fetchJson(t,null,e||d).then((function(e){return n.emit("debug",{action:"perform",request:t,response:e,provider:n}),e}))}switch(this.apiKey&&(o+="&apikey="+this.apiKey),t){case"getBlockNumber":return a(i+="/api?module=proxy&action=eth_blockNumber"+o);case"getGasPrice":return a(i+="/api?module=proxy&action=eth_gasPrice"+o);case"getBalance":return i+="/api?module=account&action=balance&address="+e.address,a(i+="&tag="+e.blockTag+o,l);case"getTransactionCount":return i+="/api?module=proxy&action=eth_getTransactionCount&address="+e.address,a(i+="&tag="+e.blockTag+o);case"getCode":return i+="/api?module=proxy&action=eth_getCode&address="+e.address,a(i+="&tag="+e.blockTag+o,d);case"getStorageAt":return i+="/api?module=proxy&action=eth_getStorageAt&address="+e.address,i+="&position="+e.position,a(i+="&tag="+e.blockTag+o,d);case"sendTransaction":return i+="/api?module=proxy&action=eth_sendRawTransaction&hex="+e.signedTransaction,a(i+=o).catch((function(t){throw t.responseText&&(0<=t.responseText.toLowerCase().indexOf("insufficient funds")&&f.throwError("insufficient funds",f.INSUFFICIENT_FUNDS,{}),0<=t.responseText.indexOf("same hash was already imported")&&f.throwError("nonce has already been used",f.NONCE_EXPIRED,{}),0<=t.responseText.indexOf("another transaction with same nonce")&&f.throwError("replacement fee too low",f.REPLACEMENT_UNDERPRICED,{})),t}));case"getBlock":return e.blockTag?(i+="/api?module=proxy&action=eth_getBlockByNumber&tag="+e.blockTag,e.includeTransactions?i+="&boolean=true":i+="&boolean=false",a(i+=o)):Promise.reject(new Error("getBlock by blockHash not implemeneted"));case"getTransaction":return i+="/api?module=proxy&action=eth_getTransactionByHash&txhash="+e.transactionHash,a(i+=o);case"getTransactionReceipt":return i+="/api?module=proxy&action=eth_getTransactionReceipt&txhash="+e.transactionHash,a(i+=o);case"call":return i+="/api?module=proxy&action=eth_call"+(r=(r=h(e.transaction))&&"&"+r),"latest"!==e.blockTag?Promise.reject(new Error("EtherscanProvider does not support blockTag for call")):a(i+=o);case"estimateGas":return i+="/api?module=proxy&action=eth_estimateGas&"+(r=(r=h(e.transaction))&&"&"+r),a(i+=o);case"getLogs":i+="/api?module=logs&action=getLogs";try{if(e.filter.fromBlock&&(i+="&fromBlock="+g(e.filter.fromBlock)),e.filter.toBlock&&(i+="&toBlock="+g(e.filter.toBlock)),e.filter.blockHash)try{f.throwError("Etherscan does not support blockHash filters",f.UNSUPPORTED_OPERATION,{operation:"getLogs(blockHash)"})}catch(t){return Promise.reject(t)}if(e.filter.address&&(i+="&address="+e.filter.address),e.filter.topics&&0<e.filter.topics.length){if(1<e.filter.topics.length)throw new Error("unsupported topic format");var s=e.filter.topics[0];if("string"!=typeof s||66!==s.length)throw new Error("unsupported topic0 format");i+="&topic0="+s}}catch(t){return Promise.reject(t)}var c=this;return a(i+=o,l).then((function(t){var e={},r=Promise.resolve();return t.forEach((function(t){r=r.then((function(){return null!=t.blockHash?null:(t.blockHash=e[t.transactionHash],null==t.blockHash?c.getTransaction(t.transactionHash).then((function(r){return e[t.transactionHash]=r.blockHash,t.blockHash=r.blockHash,null})):null)}))})),r.then((function(){return t}))}));case"getEtherPrice":return"homestead"!==this.network.name?Promise.resolve(0):(i+="/api?module=stats&action=ethprice",a(i+=o,l).then((function(t){return parseFloat(t.ethusd)})))}return A.prototype.perform.call(this,t,e)},p.prototype.getHistory=function(t,e,r){var n=this,i=this.baseUrl,o="";return this.apiKey&&(o+="&apikey="+this.apiKey),null==e&&(e=0),null==r&&(r=99999999),this.resolveName(t).then((function(t){return i+="/api?module=account&action=txlist&address="+t,i+="&startblock="+e,i+="&endblock="+r,i+="&sort=asc"+o,u.fetchJson(i,null,l).then((function(t){n.emit("debug",{action:"getHistory",request:i,response:t,provider:n});var e=[];return t.forEach((function(t){["contractAddress","to"].forEach((function(e){""==t[e]&&delete t[e]})),null==t.creates&&null!=t.contractAddress&&(t.creates=t.contractAddress);var r=a.BaseProvider.checkTransactionResponse(t);t.timeStamp&&(r.timestamp=parseInt(t.timeStamp)),e.push(r)})),e}))}))},i=p,r.EtherscanProvider=i},{"../errors":5,"../utils/bytes":64,"../utils/properties":74,"../utils/web":86,"./base-provider":51}],53:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A,a=t("./base-provider"),s=o(t("../errors"));function c(t){var e=!0,r=null;return t.forEach((function(n){null!=n?null!=r?r.name===n.name&&r.chainId===n.chainId&&(r.ensAddress===n.ensAddress||null==r.ensAddress&&null==n.ensAddress)||s.throwError("provider mismatch",s.INVALID_ARGUMENT,{arg:"networks",value:t}):r=n:e=!1})),e}function u(t){var e,r=this;if(0===t.length)throw new Error("no providers");return r=c(t.map((function(t){return t.network})))?A.call(this,t[0].network)||this:(e=Promise.all(t.map((function(t){return t.getNetwork()}))).then((function(t){return c(t)||s.throwError("getNetwork returned null",s.UNKNOWN_ERROR,{}),t[0]})),A.call(this,e)||this),s.checkNew(r,u),r._providers=t.slice(0),r}i(u,A=a.BaseProvider),Object.defineProperty(u.prototype,"providers",{get:function(){return this._providers.slice(0)},enumerable:!0,configurable:!0}),u.prototype.perform=function(t,e){var r=this.providers;return new Promise((function(n,i){var o=null;!function A(){r.length?r.shift().perform(t,e).then((function(t){return n(t)})).catch((function(t){o=o||t,setTimeout(A,0)})):i(o)}()}))},i=u,r.FallbackProvider=i},{"../errors":5,"./base-provider":51}],54:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./abstract-provider");r.Provider=n.Provider,n=t("./base-provider"),r.BaseProvider=n.BaseProvider,n=t("./etherscan-provider"),r.EtherscanProvider=n.EtherscanProvider,n=t("./fallback-provider"),r.FallbackProvider=n.FallbackProvider,n=t("./ipc-provider"),r.IpcProvider=n.IpcProvider,n=t("./infura-provider"),r.InfuraProvider=n.InfuraProvider,n=t("./json-rpc-provider"),r.JsonRpcProvider=n.JsonRpcProvider,r.JsonRpcSigner=n.JsonRpcSigner,t=t("./web3-provider"),r.Web3Provider=t.Web3Provider},{"./abstract-provider":50,"./base-provider":51,"./etherscan-provider":52,"./fallback-provider":53,"./infura-provider":55,"./ipc-provider":56,"./json-rpc-provider":57,"./web3-provider":58}],55:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A,a=t("./json-rpc-provider"),s=t("../utils/bytes"),c=t("../utils/networks"),u=t("../utils/properties"),f=o(t("../errors"));function h(t,e){var r=this,n=c.getNetwork(null==t?"homestead":t);null==e&&(e="7d0d81d0919f4f05b9ab6634be01ee73");var i=null;switch(n.name){case"homestead":i="mainnet.infura.io";break;case"ropsten":i="ropsten.infura.io";break;case"rinkeby":i="rinkeby.infura.io";break;case"goerli":i="goerli.infura.io";break;case"kovan":i="kovan.infura.io";break;default:f.throwError("unsupported network",f.INVALID_ARGUMENT,{argument:"network",value:t})}return s.isHexString("0x"+e,16)?(r=A.call(this,"https://"+i+"/v3/"+e,n)||this,u.defineReadOnly(r,"apiAccessToken",null),u.defineReadOnly(r,"projectId",e)):(f.warn("The legacy INFURA apiAccesToken API is deprecated; please upgrade to a Project ID instead (see INFURA dshboard; https://infura.io)"),r=A.call(this,"https://"+i+"/"+e,n)||this,u.defineReadOnly(r,"apiAccessToken",e),u.defineReadOnly(r,"projectId",null)),f.checkNew(r,h),r}i(h,A=a.JsonRpcProvider),h.prototype._startPending=function(){f.warn("WARNING: INFURA does not support pending filters")},h.prototype.getSigner=function(t){return f.throwError("INFURA does not support signing",f.UNSUPPORTED_OPERATION,{operation:"getSigner"})},h.prototype.listAccounts=function(){return Promise.resolve([])},i=h,r.InfuraProvider=i},{"../errors":5,"../utils/bytes":64,"../utils/networks":72,"../utils/properties":74,"./json-rpc-provider":57}],56:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},{}],57:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A=t("./base-provider"),a=t("../abstract-signer"),s=o(t("../errors")),c=t("../utils/address"),u=t("../utils/bytes"),f=t("../utils/networks"),h=t("../utils/properties"),l=t("../utils/utf8"),d=t("../utils/web");function g(t){if(t.error){var e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function p(t){return t&&t.toLowerCase()}var I,y={},C=42,E=(i(b,I=a.Signer),b.prototype.getAddress=function(){var t=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(e){return e.length<=t._index&&s.throwError("unknown account #"+t._index,s.UNSUPPORTED_OPERATION,{operation:"getAddress"}),t._address=c.getAddress(e[t._index]),t._address}))},b.prototype.getBalance=function(t){return this.provider.getBalance(this.getAddress(),t)},b.prototype.getTransactionCount=function(t){return this.provider.getTransactionCount(this.getAddress(),t)},b.prototype.sendUncheckedTransaction=function(t){var e=this;t=h.shallowCopy(t);var r,n=this.getAddress().then((function(t){return t&&t.toLowerCase()}));return null==t.gasLimit&&((r=h.shallowCopy(t)).from=n,t.gasLimit=this.provider.estimateGas(r)),Promise.all([h.resolveProperties(t),n]).then((function(t){var r=t[0],n=w.hexlifyTransaction(r);return n.from=t[1],e.provider.send("eth_sendTransaction",[n]).then((function(t){return t}),(function(t){throw t.responseText&&(0<=t.responseText.indexOf("insufficient funds")&&s.throwError("insufficient funds",s.INSUFFICIENT_FUNDS,{transaction:r}),0<=t.responseText.indexOf("nonce too low")&&s.throwError("nonce has already been used",s.NONCE_EXPIRED,{transaction:r}),0<=t.responseText.indexOf("replacement transaction underpriced")&&s.throwError("replacement fee too low",s.REPLACEMENT_UNDERPRICED,{transaction:r})),t}))}))},b.prototype.sendTransaction=function(t){var e=this;return this.sendUncheckedTransaction(t).then((function(t){return d.poll((function(){return e.provider.getTransaction(t).then((function(r){if(null!==r)return e.provider._wrapTransaction(r,t)}))}),{fastRetry:250,onceBlock:e.provider}).catch((function(e){throw e.transactionHash=t,e}))}))},b.prototype.signMessage=function(t){var e=this,r="string"==typeof t?l.toUtf8Bytes(t):t;return this.getAddress().then((function(t){return e.provider.send("eth_sign",[t.toLowerCase(),u.hexlify(r)])}))},b.prototype.unlock=function(t){var e=this.provider;return this.getAddress().then((function(r){return e.send("personal_unlockAccount",[r.toLowerCase(),t,null])}))},b);function b(t,e,r){var n=I.call(this)||this;if(s.checkNew(n,b),t!==y)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return h.defineReadOnly(n,"provider",e),r?"string"==typeof r?h.defineReadOnly(n,"_address",c.getAddress(r)):"number"==typeof r?h.defineReadOnly(n,"_index",r):s.throwError("invalid address or index",s.INVALID_ARGUMENT,{argument:"addressOrIndex",value:r}):h.defineReadOnly(n,"_index",0),n}r.JsonRpcSigner=E;var B,m={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0},w=(i(v,B=A.BaseProvider),v.prototype.getSigner=function(t){return new E(y,this,t)},v.prototype.listAccounts=function(){return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return c.getAddress(t)}))}))},v.prototype.send=function(t,e){var r=this,n={method:t,params:e,id:C++,jsonrpc:"2.0"};return d.fetchJson(this.connection,JSON.stringify(n),g).then((function(t){return r.emit("debug",{action:"send",request:n,response:t,provider:r}),t}))},v.prototype.perform=function(t,e){switch(t){case"getBlockNumber":return this.send("eth_blockNumber",[]);case"getGasPrice":return this.send("eth_gasPrice",[]);case"getBalance":return this.send("eth_getBalance",[p(e.address),e.blockTag]);case"getTransactionCount":return this.send("eth_getTransactionCount",[p(e.address),e.blockTag]);case"getCode":return this.send("eth_getCode",[p(e.address),e.blockTag]);case"getStorageAt":return this.send("eth_getStorageAt",[p(e.address),e.position,e.blockTag]);case"sendTransaction":return this.send("eth_sendRawTransaction",[e.signedTransaction]).catch((function(t){throw t.responseText&&(0<t.responseText.indexOf("insufficient funds")&&s.throwError("insufficient funds",s.INSUFFICIENT_FUNDS,{}),0<t.responseText.indexOf("nonce too low")&&s.throwError("nonce has already been used",s.NONCE_EXPIRED,{}),0<t.responseText.indexOf("replacement transaction underpriced")&&s.throwError("replacement fee too low",s.REPLACEMENT_UNDERPRICED,{})),t}));case"getBlock":return e.blockTag?this.send("eth_getBlockByNumber",[e.blockTag,!!e.includeTransactions]):e.blockHash?this.send("eth_getBlockByHash",[e.blockHash,!!e.includeTransactions]):Promise.reject(new Error("invalid block tag or block hash"));case"getTransaction":return this.send("eth_getTransactionByHash",[e.transactionHash]);case"getTransactionReceipt":return this.send("eth_getTransactionReceipt",[e.transactionHash]);case"call":return this.send("eth_call",[v.hexlifyTransaction(e.transaction,{from:!0}),e.blockTag]);case"estimateGas":return this.send("eth_estimateGas",[v.hexlifyTransaction(e.transaction,{from:!0})]);case"getLogs":return e.filter&&null!=e.filter.address&&(e.filter.address=p(e.filter.address)),this.send("eth_getLogs",[e.filter])}return s.throwError(t+" not implemented",s.NOT_IMPLEMENTED,{operation:t}),null},v.prototype._startPending=function(){var t,e;null==this._pendingFilter&&(e=(t=this).send("eth_newPendingTransactionFilter",[]),(this._pendingFilter=e).then((function(r){return function n(){t.send("eth_getFilterChanges",[r]).then((function(r){if(t._pendingFilter!=e)return null;var n=Promise.resolve();return r.forEach((function(e){t._emitted["t:"+e.toLowerCase()]="pending",n=n.then((function(){return t.getTransaction(e).then((function(e){return t.emit("pending",e),null}))}))})),n.then((function(){return new Promise((function(t){setTimeout((function(){t()}),1e3)}))}))})).then((function(){return t._pendingFilter==e?(setTimeout((function(){n()}),0),null):void t.send("eth_uninstallFilter",[r])})).catch((function(t){}))}(),r})).catch((function(t){})))},v.prototype._stopPending=function(){this._pendingFilter=null},v.hexlifyTransaction=function(t,e){var r=h.shallowCopy(m);if(e)for(var n in e)e[n]&&(r[n]=!0);h.checkProperties(t,r);var i={};return["gasLimit","gasPrice","nonce","value"].forEach((function(e){var r;null!=t[e]&&(r=u.hexStripZeros(u.hexlify(t[e])),i[e="gasLimit"===e?"gas":e]=r)})),["from","to","data"].forEach((function(e){null!=t[e]&&(i[e]=u.hexlify(t[e]))})),i},v);function v(t,e){var r=this;return"string"==typeof t&&null===e&&f.getNetwork(t)&&(e=t,t=null),e||(e=new Promise((function(t,e){setTimeout((function(){r.send("net_version",[]).then((function(e){return t(f.getNetwork(parseInt(e)))})).catch((function(t){e(t)}))}))}))),r=B.call(this,e)||this,s.checkNew(r,v),r.connection="string"==typeof(t=t||"http://localhost:8545")?{url:t}:t,r}r.JsonRpcProvider=w},{"../abstract-signer":2,"../errors":5,"../utils/address":60,"../utils/bytes":64,"../utils/networks":72,"../utils/properties":74,"../utils/utf8":85,"../utils/web":86,"./base-provider":51}],58:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A,a=t("./json-rpc-provider"),s=t("../utils/properties"),c=o(t("../errors")),u=42;function f(t,e){return e=A.call(this,t.host||t.path||"",e)||this,c.checkNew(e,f),t&&(t.sendAsync?e._sendAsync=t.sendAsync.bind(t):t.send&&(e._sendAsync=t.send.bind(t))),t&&e._sendAsync||c.throwError("invalid web3Provider",c.INVALID_ARGUMENT,{arg:"web3Provider",value:t}),s.defineReadOnly(e,"_web3Provider",t),s.defineReadOnly(e,"provider",t),e}i(f,A=a.JsonRpcProvider),f.prototype.send=function(t,e){var r=this;return"eth_sign"==t&&this._web3Provider.isMetaMask&&(t="personal_sign",e=[e[1],e[0]]),new Promise((function(n,i){var o={method:t,params:e,id:u++,jsonrpc:"2.0"};r._sendAsync(o,(function(t,e){if(t)i(t);else{if(e.error)return(t=new Error(e.error.message)).code=e.error.code,t.data=e.error.data,void i(t);n(e.result)}}))}))},i=f,r.Web3Provider=i},{"../errors":5,"../utils/properties":74,"./json-rpc-provider":57}],59:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A=t("../constants"),s=o(t("../errors")),c=t("./address"),u=t("./bignumber"),f=t("./bytes"),h=t("./utf8"),l=t("./properties"),d=new RegExp(/^bytes([0-9]*)$/),g=new RegExp(/^(u?int)([0-9]*)$/),p=new RegExp(/^(.*)\[([0-9]*)\]$/);r.defaultCoerceFunc=function(t,e){return(t=t.match(g))&&parseInt(t[2])<=48?e.toNumber():e};var I=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$"),y=new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");function C(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}function E(t,e){var r=t;function n(t){throw new Error('unexpected character "'+r[t]+'" at position '+t+' in "'+r+'"')}t=t.replace(/\s/g," ");for(var i={type:"",name:"",state:{allowType:!0}},o=i,A=0;A<t.length;A++){var a=t[A];switch(a){case"(":o.state.allowParams||n(A),o.state.allowType=!1,o.type=C(o.type),o.components=[{type:"",name:"",parent:o,state:{allowType:!0}}],o=o.components[0];break;case")":delete o.state,e&&"indexed"===o.name&&(o.indexed=!0,o.name=""),o.type=C(o.type);var s=o;(o=o.parent)||n(A),delete s.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,e&&"indexed"===o.name&&(o.indexed=!0,o.name=""),o.type=C(o.type),s={type:"",name:"",parent:o.parent,state:{allowType:!0}},o.parent.components.push(s),delete o.parent,o=s;break;case" ":o.state.allowType&&""!==o.type&&(o.type=C(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&""!==o.name&&(e&&"indexed"===o.name?(o.indexed=!0,o.name=""):o.state.allowName=!1);break;case"[":o.state.allowArray||n(A),o.type+=a,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||n(A),o.type+=a,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=a,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=a,delete o.state.allowArray):o.state.readArray?o.type+=a:n(A)}}if(o.parent)throw new Error("unexpected eof");return delete i.state,e&&"indexed"===o.name&&(o.indexed=!0,o.name=""),i.type=C(i.type),i}function b(t){return ot(r.defaultCoerceFunc,t).type}function B(t,e,r,n,i){this.coerceFunc=t,this.name=e,this.type=r,this.localName=n,this.dynamic=i}r.parseParamType=function(t){return E(t,!0)},r.formatParamType=b,r.formatSignature=function(t){return t.name+"("+t.inputs.map(b).join(",")+")"},r.parseSignature=function(t){if("string"==typeof t)return"event "===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).substring(0,6)?function(t){var e={anonymous:!1,inputs:[],name:"",type:"event"},r=t.match(I);if(!r)throw new Error("invalid event: "+t);if(e.name=r[1].trim(),nt(r[2]).forEach((function(t){(t=E(t,!0)).indexed=!!t.indexed,e.inputs.push(t)})),r[3].split(" ").forEach((function(t){switch(t){case"anonymous":e.anonymous=!0;break;case"":break;default:s.info("unknown modifier: "+t)}})),e.name&&!e.name.match(y))throw new Error('invalid identifier: "'+e.name+'"');return e}(t.substring(6).trim()):function(t){var e={constant:!1,gas:null,inputs:[],name:"",outputs:[],payable:!1,stateMutability:null,type:"function"},r=t.split("@");if(1!==r.length){if(2<r.length)throw new Error("invalid signature");if(!r[1].match(/^[0-9]+$/))throw new Error("invalid signature gas");e.gas=u.bigNumberify(r[1]),t=r[0]}if(!(t=(r=t.split(" returns "))[0].match(I)))throw new Error("invalid signature");if(e.name=t[1].trim(),!e.name.match(y))throw new Error('invalid identifier: "'+t[1]+'"');if(nt(t[2]).forEach((function(t){e.inputs.push(E(t))})),t[3].split(" ").forEach((function(t){switch(t){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:s.info("unknown modifier: "+t)}})),1<r.length){if(""!=(r=r[1].match(I))[1].trim()||""!=r[3].trim())throw new Error("unexpected tokens");nt(r[2]).forEach((function(t){e.outputs.push(E(t))}))}if("constructor"===e.name){if(e.type="constructor",e.outputs.length)throw new Error("constructor may not have outputs");delete e.name,delete e.outputs}return e}((t="function "===t.substring(0,9)?t.substring(9):t).trim());throw new Error("unknown signature")};var m,w=(i(v,m=B),v.prototype.encode=function(t){return this.coder.encode(t)},v.prototype.decode=function(t,e){return this.coder.decode(t,e)},v);function v(t){var e=m.call(this,t.coerceFunc,t.name,t.type,void 0,t.dynamic)||this;return l.defineReadOnly(e,"coder",t),e}var Q,_=(i(D,Q=B),D.prototype.encode=function(t){return f.arrayify([])},D.prototype.decode=function(t,e){if(e>t.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},D);function D(t,e){return Q.call(this,t,"null","",e,!1)||this}var S,M=(i(k,S=B),k.prototype.encode=function(t){try{var e=u.bigNumberify(t);if(this.signed){var r=A.MaxUint256.maskn(8*this.size-1);if(e.gt(r))throw new Error("out-of-bounds");if(r=r.add(A.One).mul(A.NegativeOne),e.lt(r))throw new Error("out-of-bounds")}else if(e.lt(A.Zero)||e.gt(A.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds");return e=e.toTwos(8*this.size).maskn(8*this.size),this.signed&&(e=e.fromTwos(8*this.size).toTwos(256)),f.padZeros(f.arrayify(e),32)}catch(e){s.throwError("invalid number value",s.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:t})}return null},k.prototype.decode=function(t,e){t.length<e+32&&s.throwError("insufficient data for "+this.name+" type",s.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:f.hexlify(t.slice(e,e+32))});var r=32-this.size;return e=u.bigNumberify(t.slice(e+r,e+32)),e=this.signed?e.fromTwos(8*this.size):e.maskn(8*this.size),{consumed:32,value:this.coerceFunc(this.name,e)}},k);function k(t,e,r,n){var i=this,o=(r?"int":"uint")+8*e;return(i=S.call(this,t,o,o,n,!1)||this).size=e,i.signed=r,i}var x,R=new M((function(t,e){return e}),32,!1,"none"),N=(i(F,x=B),F.prototype.encode=function(t){return R.encode(t?1:0)},F.prototype.decode=function(t,e){try{var r=R.decode(t,e)}catch(t){throw"insufficient data for uint256 type"===t.reason&&s.throwError("insufficient data for boolean type",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"boolean",value:t.value}),t}return{consumed:r.consumed,value:this.coerceFunc("bool",!r.value.isZero())}},F);function F(t,e){return x.call(this,t,"bool","bool",e,!1)||this}var U,H=(i(L,U=B),L.prototype.encode=function(t){var e=new Uint8Array(32);try{var r=f.arrayify(t);if(r.length!==this.length)throw new Error("incorrect data length");e.set(r)}catch(e){s.throwError("invalid "+this.name+" value",s.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e.value||t})}return e},L.prototype.decode=function(t,e){return t.length<e+32&&s.throwError("insufficient data for "+this.name+" type",s.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:f.hexlify(t.slice(e,e+32))}),{consumed:32,value:this.coerceFunc(this.name,f.hexlify(t.slice(e,e+this.length)))}},L);function L(t,e,r){var n=this,i="bytes"+e;return(n=U.call(this,t,i,i,r,!1)||this).length=e,n}var O,T,G,P=(i(j,O=B),j.prototype.encode=function(t){var e=new Uint8Array(32);try{e.set(f.arrayify(c.getAddress(t)),12)}catch(e){s.throwError("invalid address",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"address",value:t})}return e},j.prototype.decode=function(t,e){return t.length<e+32&&s.throwError("insufficient data for address type",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"address",value:f.hexlify(t.slice(e,e+32))}),{consumed:32,value:this.coerceFunc("address",c.getAddress(f.hexlify(t.slice(e+12,e+32))))}},j);function j(t,e){return O.call(this,t,"address","address",e,!1)||this}function Y(t){var e=32*Math.ceil(t.length/32);return e=new Uint8Array(e-t.length),f.concat([R.encode(t.length),t,e])}function K(t,e,r){t.length<e+32&&s.throwError("insufficient data for dynamicBytes length",s.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:f.hexlify(t.slice(e,e+32))});var n=R.decode(t,e).value;try{n=n.toNumber()}catch(t){s.throwError("dynamic bytes count too large",s.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:n.toString()})}return t.length<e+32+n&&s.throwError("insufficient data for dynamicBytes type",s.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:f.hexlify(t.slice(e,e+32+n))}),{consumed:32+32*Math.ceil(n/32),value:t.slice(e+32,e+32+n)}}function q(t,e){return T.call(this,t,"bytes","bytes",e,!0)||this}function J(t,e){return G.call(this,t,"string","string",e,!0)||this}function z(t){return 32*Math.ceil(t/32)}function Z(t,e){var r;Array.isArray(e)||(e&&"object"==a(e)?(r=[],t.forEach((function(t){r.push(e[t.localName])})),e=r):s.throwError("invalid tuple value",s.INVALID_ARGUMENT,{coderType:"tuple",value:e})),t.length!==e.length&&s.throwError("types/value length mismatch",s.INVALID_ARGUMENT,{coderType:"tuple",value:e});var n=[];t.forEach((function(t,r){n.push({dynamic:t.dynamic,value:t.encode(e[r])})}));var i=0,o=0;n.forEach((function(t){t.dynamic?(i+=32,o+=z(t.value.length)):i+=z(t.value.length)}));var A=0,c=i,u=new Uint8Array(i+o);return n.forEach((function(t){t.dynamic?(u.set(R.encode(c),A),A+=32,u.set(t.value,c),c+=z(t.value.length)):(u.set(t.value,A),A+=z(t.value.length))})),u}function V(t,e,r){var n=r,i=0,o=[];return t.forEach((function(t){var A,a;t.dynamic?(A=R.decode(e,r),(a=t.decode(e,n+A.value.toNumber())).consumed=A.consumed):a=t.decode(e,r),null!=a.value&&o.push(a.value),r+=a.consumed,i+=a.consumed})),t.forEach((function(t,e){(t=t.localName)&&null==o[t="length"===t?"_length":t]&&(o[t]=o[e])})),{value:o,consumed:i}}i(q,T=B),q.prototype.encode=function(t){try{return Y(f.arrayify(t))}catch(t){s.throwError("invalid bytes value",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"bytes",value:t.value})}return null},q.prototype.decode=function(t,e){return(e=K(t,e,this.localName)).value=this.coerceFunc("bytes",f.hexlify(e.value)),e},o=q,i(J,G=B),J.prototype.encode=function(t){return"string"!=typeof t&&s.throwError("invalid string value",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"string",value:t}),Y(h.toUtf8Bytes(t))},J.prototype.decode=function(t,e){return(e=K(t,e,this.localName)).value=this.coerceFunc("string",h.toUtf8String(e.value)),e},t=J;var W,X=(i($,W=B),$.prototype.encode=function(t){Array.isArray(t)||s.throwError("expected array value",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:t});var e=this.length,r=new Uint8Array(0);-1===e&&(e=t.length,r=R.encode(e)),s.checkArgumentCount(e,t.length," in coder array"+(this.localName?" "+this.localName:""));for(var n=[],i=0;i<t.length;i++)n.push(this.coder);return f.concat([r,Z(n,t)])},$.prototype.decode=function(t,e){var r=0,n=this.length;if(-1===n){try{var i=R.decode(t,e)}catch(t){s.throwError("insufficient data for dynamic array length",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:t.value})}try{n=i.value.toNumber()}catch(t){s.throwError("array count too large",s.INVALID_ARGUMENT,{arg:this.localName,coderType:"array",value:i.value.toString()})}r+=i.consumed,e+=i.consumed}for(var o=[],A=0;A<n;A++)o.push(new w(this.coder));return(e=V(o,t,e)).consumed+=r,e.value=this.coerceFunc(this.type,e.value),e},$);function $(t,e,r,n){var i=this,o=e.type+"["+(0<=r?r:"")+"]",A=-1===r||e.dynamic;return(i=W.call(this,t,"array",o,n,A)||this).coder=e,i.length=r,i}var tt,et=(i(rt,tt=B),rt.prototype.encode=function(t){return Z(this.coders,t)},rt.prototype.decode=function(t,e){return(e=V(this.coders,t,e)).value=this.coerceFunc(this.type,e.value),e},rt);function rt(t,e,r){var n=this,i=!1,o=[];e.forEach((function(t){t.dynamic&&(i=!0),o.push(t.type)}));var A="tuple("+o.join(",")+")";return(n=tt.call(this,t,"tuple",A,r,i)||this).coders=e,n}function nt(t){t=t.trim();for(var e=[],r="",n=0,i=0;i<t.length;i++){var o=t[i];if(","===o&&0===n)e.push(r),r="";else if(r+=o,"("===o)n++;else if(")"===o&&-1==--n)throw new Error("unbalanced parenthsis")}return r&&e.push(r),e}var it={address:P,bool:N,string:t,bytes:o};function ot(t,e){var r,n,i;if(i=it[e.type])return new i(t,e.name);if(i=e.type.match(g))return(0===(o=parseInt(i[2]||"256"))||256<o||o%8!=0)&&s.throwError("invalid "+i[1]+" bit length",s.INVALID_ARGUMENT,{arg:"param",value:e}),new M(t,o/8,"int"===i[1],e.name);if(i=e.type.match(d))return(0===(o=parseInt(i[1]))||32<o)&&s.throwError("invalid bytes length",s.INVALID_ARGUMENT,{arg:"param",value:e}),new H(t,o,e.name);if(i=e.type.match(p)){var o=parseInt(i[2]||"-1");return(e=l.shallowCopy(e)).type=i[1],e=l.deepCopy(e),new X(t,ot(t,e),o,e.name)}return"tuple"===e.type.substring(0,5)?(r=t,i=e.components,o=e.name,n=[],(i=i||[]).forEach((function(t){n.push(ot(r,t))})),new et(r,n,o)):""===e.type?new _(t,e.name):(s.throwError("invalid type",s.INVALID_ARGUMENT,{arg:"type",value:e.type}),null)}function At(t){s.checkNew(this,At),t=t||r.defaultCoerceFunc,l.defineReadOnly(this,"coerceFunc",t)}At.prototype.encode=function(t,e){t.length!==e.length&&s.throwError("types/values length mismatch",s.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});var r=[];return t.forEach((function(t){var e="string"==typeof t?E(t):t;r.push(ot(this.coerceFunc,e))}),this),f.hexlify(new et(this.coerceFunc,r,"_").encode(e))},At.prototype.decode=function(t,e){var r=[];return t.forEach((function(t){var e="string"==typeof t?E(t):l.deepCopy(t);r.push(ot(this.coerceFunc,e))}),this),new et(this.coerceFunc,r,"_").decode(f.arrayify(e),0).value},o=At,r.AbiCoder=o,r.defaultAbiCoder=new o},{"../constants":3,"../errors":5,"./address":60,"./bignumber":63,"./bytes":64,"./properties":74,"./utf8":85}],60:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("bn.js")),o=t("./bytes"),A=t("./keccak256"),a=t("./rlp"),s=t("../errors");function c(t){"string"==typeof t&&t.match(/^0x[0-9A-Fa-f]{40}$/)||s.throwError("invalid address",s.INVALID_ARGUMENT,{arg:"address",value:t});for(var e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=e[n].charCodeAt(0);r=o.arrayify(A.keccak256(r));for(var i=0;i<40;i+=2)8<=r[i>>1]>>4&&(e[i]=e[i].toUpperCase()),8<=(15&r[i>>1])&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}for(var u={},f=0;f<10;f++)u[String(f)]=String(f);for(f=0;f<26;f++)u[String.fromCharCode(65+f)]=String(10+f);var h,l=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10));function d(t){t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00";var e="";for(t.split("").forEach((function(t){e+=u[t]}));e.length>=l;){var r=e.substring(0,l);e=parseInt(r,10)%97+e.substring(r.length)}for(var n=String(98-parseInt(e,10)%97);n.length<2;)n="0"+n;return n}function g(t){var e=null;if("string"!=typeof t&&s.throwError("invalid address",s.INVALID_ARGUMENT,{arg:"address",value:t}),t.match(/^(0x)?[0-9a-fA-F]{40}$/))e=c(t="0x"!==t.substring(0,2)?"0x"+t:t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&s.throwError("bad address checksum",s.INVALID_ARGUMENT,{arg:"address",value:t});else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==d(t)&&s.throwError("bad icap checksum",s.INVALID_ARGUMENT,{arg:"address",value:t}),e=new i.default.BN(t.substring(4),36).toString(16);e.length<40;)e="0"+e;e=c("0x"+e)}else s.throwError("invalid address",s.INVALID_ARGUMENT,{arg:"address",value:t});return e}r.getAddress=g,r.getIcapAddress=function(t){for(var e=new i.default.BN(g(t).substring(2),16).toString(36).toUpperCase();e.length<30;)e="0"+e;return"XE"+d("XE00"+e)+e},r.getContractAddress=function(t){if(!t.from)throw new Error("missing from address");var e=t.nonce;return g("0x"+A.keccak256(a.encode([g(t.from),o.stripZeros(o.hexlify(e))])).substring(26))},r.getCreate2Address=function(t){var e=t.initCodeHash;t.initCode&&(e?A.keccak256(t.initCode)!==e&&s.throwError("initCode/initCodeHash mismatch",s.INVALID_ARGUMENT,{arg:"options",value:t}):e=A.keccak256(t.initCode)),e||s.throwError("missing initCode or initCodeHash",s.INVALID_ARGUMENT,{arg:"options",value:t});var r=g(t.from),n=o.arrayify(t.salt);return 32!==n.length&&s.throwError("invalid salt",s.INVALID_ARGUMENT,{arg:"options",value:t}),g("0x"+A.keccak256(o.concat(["0xff",r,n,e])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../utils/bytes");e.exports={decode:function(t){t=atob(t);for(var e=[],r=0;r<t.length;r++)e.push(t.charCodeAt(r));return n.arrayify(e)},encode:function(t){t=n.arrayify(t);for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}}},{"../utils/bytes":64}],62:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./bytes"),i=t("./properties"),o=(A.prototype.encode=function(t){var e=n.arrayify(t);if(0===e.length)return"";for(var r=[0],i=0;i<e.length;++i){for(var o=e[i],A=0;A<r.length;++A)o+=r[A]<<8,r[A]=o%this.base,o=o/this.base|0;for(;0<o;)r.push(o%this.base),o=o/this.base|0}for(var a="",s=0;0===e[s]&&s<e.length-1;++s)a+=this._leader;for(var c=r.length-1;0<=c;--c)a+=this.alphabet[r[c]];return a},A.prototype.decode=function(t){if("string"!=typeof t)throw new TypeError("Expected String");var e=[];if(0===t.length)return new Uint8Array(e);e.push(0);for(var r=0;r<t.length;r++){var i=this._alphabetMap[t[r]];if(void 0===i)throw new Error("Non-base"+this.base+" character");for(var o=i,A=0;A<e.length;++A)o+=e[A]*this.base,e[A]=255&o,o>>=8;for(;0<o;)e.push(255&o),o>>=8}for(var a=0;t[a]===this._leader&&a<t.length-1;++a)e.push(0);return n.arrayify(new Uint8Array(e.reverse()))},A);function A(t){i.defineReadOnly(this,"alphabet",t),i.defineReadOnly(this,"base",t.length),i.defineReadOnly(this,"_alphabetMap",{}),i.defineReadOnly(this,"_leader",t.charAt(0));for(var e=0;e<t.length;e++)this._alphabetMap[t.charAt(e)]=e}t=new(r.BaseX=o)("abcdefghijklmnopqrstuvwxyz234567"),r.Base32=t,o=new o("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),r.Base58=o},{"./bytes":64,"./properties":74}],63:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t("bn.js")),A=t("./bytes"),a=t("./properties"),s=i(t("../errors")),c=new o.default.BN(-1);function u(t){return"-"===(t=t.toString(16))[0]?t.length%2==0?"-0x0"+t.substring(1):"-0x"+t.substring(1):t.length%2==1?"0x0"+t:"0x"+t}function f(t){return l(p(t))}function h(t){return new d(u(t))}function l(t){return"-"===(t=t._hex)[0]?new o.default.BN(t.substring(3),16).mul(c):new o.default.BN(t.substring(2),16)}var d=(g.prototype.fromTwos=function(t){return h(l(this).fromTwos(t))},g.prototype.toTwos=function(t){return h(l(this).toTwos(t))},g.prototype.abs=function(){return"-"===this._hex[0]?h(l(this).mul(c)):this},g.prototype.add=function(t){return h(l(this).add(f(t)))},g.prototype.sub=function(t){return h(l(this).sub(f(t)))},g.prototype.div=function(t){return p(t).isZero()&&s.throwError("division by zero",s.NUMERIC_FAULT,{operation:"divide",fault:"division by zero"}),h(l(this).div(f(t)))},g.prototype.mul=function(t){return h(l(this).mul(f(t)))},g.prototype.mod=function(t){return h(l(this).mod(f(t)))},g.prototype.pow=function(t){return h(l(this).pow(f(t)))},g.prototype.maskn=function(t){return h(l(this).maskn(t))},g.prototype.eq=function(t){return l(this).eq(f(t))},g.prototype.lt=function(t){return l(this).lt(f(t))},g.prototype.lte=function(t){return l(this).lte(f(t))},g.prototype.gt=function(t){return l(this).gt(f(t))},g.prototype.gte=function(t){return l(this).gte(f(t))},g.prototype.isZero=function(){return l(this).isZero()},g.prototype.toNumber=function(){try{return l(this).toNumber()}catch(t){s.throwError("overflow",s.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:t.message})}return null},g.prototype.toString=function(){return l(this).toString(10)},g.prototype.toHexString=function(){return this._hex},g.isBigNumber=function(t){return a.isType(t,"BigNumber")},g);function g(t){if(s.checkNew(this,g),a.setType(this,"BigNumber"),"string"==typeof t)A.isHexString(t)?a.defineReadOnly(this,"_hex",t="0x"==t?"0x0":t):"-"===t[0]&&A.isHexString(t.substring(1))?a.defineReadOnly(this,"_hex",t):t.match(/^-?[0-9]*$/)?a.defineReadOnly(this,"_hex",u(new o.default.BN(t=""==t?"0":t))):s.throwError("invalid BigNumber string value",s.INVALID_ARGUMENT,{arg:"value",value:t});else if("number"==typeof t){parseInt(String(t))!==t&&s.throwError("underflow",s.NUMERIC_FAULT,{operation:"setValue",fault:"underflow",value:t,outputValue:parseInt(String(t))});try{a.defineReadOnly(this,"_hex",u(new o.default.BN(t)))}catch(t){s.throwError("overflow",s.NUMERIC_FAULT,{operation:"setValue",fault:"overflow",details:t.message})}}else t instanceof g?a.defineReadOnly(this,"_hex",t._hex):t.toHexString?a.defineReadOnly(this,"_hex",u(f(t.toHexString()))):t._hex&&A.isHexString(t._hex)?a.defineReadOnly(this,"_hex",t._hex):A.isArrayish(t)?a.defineReadOnly(this,"_hex",u(new o.default.BN(A.hexlify(t).substring(2),16))):s.throwError("invalid BigNumber value",s.INVALID_ARGUMENT,{arg:"value",value:t})}function p(t){return d.isBigNumber(t)?t:new d(t)}r.BigNumber=d,r.bigNumberify=p},{"../errors":5,"./bytes":64,"./properties":74,"bn.js":9}],64:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors"));function o(t){return!!t.toHexString}function A(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return A(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function s(t){if(!t||parseInt(String(t.length))!=t.length||"string"==typeof t)return!1;for(var e=0;e<t.length;e++){var r=t[e];if(r<0||256<=r||parseInt(String(r))!=r)return!1}return!0}function c(t){if(null==t&&i.throwError("cannot convert null value to array",i.INVALID_ARGUMENT,{arg:"value",value:t}),"string"!=typeof(t=o(t)?t.toHexString():t))return s(t)?A(new Uint8Array(t)):(i.throwError("invalid arrayify value",null,{arg:"value",value:t,type:a(t)}),null);var e=t.match(/^(0x)?[0-9a-fA-F]*$/);e||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:t}),"0x"!==e[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:t}),(t=t.substring(2)).length%2&&(t="0"+t);for(var r=[],n=0;n<t.length;n+=2)r.push(parseInt(t.substr(n,2),16));return A(new Uint8Array(r))}function u(t){for(var e=[],r=0,n=0;n<t.length;n++){var i=c(t[n]);e.push(i),r+=i.length}var o=new Uint8Array(r),a=0;for(n=0;n<e.length;n++)o.set(e[n],a),a+=e[n].length;return A(o)}function f(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}r.isHexable=o,r.isArrayish=s,r.arrayify=c,r.concat=u,r.stripZeros=function(t){var e=c(t);if(0===e.length)return e;for(var r=0;0===e[r];)r++;return r?e.slice(r):e},r.padZeros=function(t,e){if(e<(t=c(t)).length)throw new Error("cannot pad");var r=new Uint8Array(e);return r.set(t,e-t.length),A(r)},r.isHexString=f;var h="0123456789abcdef";function l(t){if(o(t))return t.toHexString();if("number"==typeof t){t<0&&i.throwError("cannot hexlify negative value",i.INVALID_ARGUMENT,{arg:"value",value:t}),9007199254740991<=t&&i.throwError("out-of-range",i.NUMERIC_FAULT,{operartion:"hexlify",fault:"out-of-safe-range"});for(var e="";t;)e=h[15&t]+e,t=Math.floor(t/16);return e.length?"0x"+(e=e.length%2?"0"+e:e):"0x00"}if("string"==typeof t){var r=t.match(/^(0x)?[0-9a-fA-F]*$/);return r||i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:t}),"0x"!==r[1]&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:t}),t.length%2?"0x0"+t.substring(2):t}if(s(t)){for(var n=[],A=0;A<t.length;A++){var a=t[A];n.push(h[(240&a)>>4]+h[15&a])}return"0x"+n.join("")}return i.throwError("invalid hexlify value",null,{arg:"value",value:t}),"never"}function d(t,e){for(f(t)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:t});t.length<2*e+2;)t="0x0"+t.substring(2);return t}function g(t){var e=0,r="0x",n="0x";if((o=t)&&null!=o.r&&null!=o.s){null==t.v&&null==t.recoveryParam&&i.throwError("at least on of recoveryParam or v must be specified",i.INVALID_ARGUMENT,{argument:"signature",value:t}),r=d(t.r,32),n=d(t.s,32),"string"==typeof(e=t.v)&&(e=parseInt(e,16));var o=t.recoveryParam;e=27+(o=null==o&&null!=t.v?1-e%2:o)}else{if(65!==(t=c(t)).length)throw new Error("invalid signature");r=l(t.slice(0,32)),n=l(t.slice(32,64)),27!==(e=t[64])&&28!==e&&(e=27+e%2)}return{r:r,s:n,recoveryParam:e-27,v:e}}r.hexlify=l,r.hexDataLength=function(t){return f(t)&&t.length%2==0?(t.length-2)/2:null},r.hexDataSlice=function(t,e,r){return f(t)||i.throwError("invalid hex data",i.INVALID_ARGUMENT,{arg:"value",value:t}),t.length%2!=0&&i.throwError("hex data length must be even",i.INVALID_ARGUMENT,{arg:"value",value:t}),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)},r.hexStripZeros=function(t){for(f(t)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:t});3<t.length&&"0x0"===t.substring(0,3);)t="0x"+t.substring(3);return t},r.hexZeroPad=d,r.splitSignature=g,r.joinSignature=function(t){return l(u([(t=g(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},{"../errors":5}],65:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors")),o=t("./bytes"),A=t("./utf8"),a=t("./keccak256"),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),c=new RegExp("^((.*)\\.)?([^.]+)$"),u=new RegExp("^[a-z0-9.-]*$");r.namehash=function(t){"string"!=typeof t&&i.throwError("invalid address - "+String(t),i.INVALID_ARGUMENT,{argument:"name",value:t}),(t=t.toLowerCase()).match(u)||i.throwError("contains invalid UseSTD3ASCIIRules characters",i.INVALID_ARGUMENT,{argument:"name",value:t});for(var e=s;t.length;){var r=t.match(c),n=A.toUtf8Bytes(r[3]);e=a.keccak256(o.concat([e,a.keccak256(n)])),t=r[2]||""}return o.hexlify(e)},r.id=function(t){return a.keccak256(A.toUtf8Bytes(t))},r.hashMessage=function(t){return a.keccak256(o.concat([A.toUtf8Bytes("Ethereum Signed Message:\n"),A.toUtf8Bytes(String(t.length)),"string"==typeof t?A.toUtf8Bytes(t):t]))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./utf8":85}],66:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors")),o=t("../wordlists/lang-en"),A=t("./basex"),a=t("./bytes"),s=t("./bignumber"),c=t("./utf8"),u=t("./pbkdf2"),f=t("./hmac"),h=t("./properties"),l=t("./secp256k1"),d=t("./sha2"),g=s.bigNumberify("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),p=c.toUtf8Bytes("Bitcoin seed"),I=2147483648;function y(t){return(1<<t)-1<<8-t}function C(t){return a.hexZeroPad(a.hexlify(t),32)}function E(t){var e=a.hexDataSlice(d.sha256(d.sha256(t)),0,4);return A.Base58.encode(a.concat([t,e]))}var b={};r.defaultPath="m/44'/60'/0'/0/0";var B=(Object.defineProperty(m.prototype,"extendedKey",{get:function(){if(256<=this.depth)throw new Error("Depth too large!");return E(a.concat([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",a.hexlify(this.depth),this.parentFingerprint,a.hexZeroPad(a.hexlify(this.index),4),this.chainCode,null!=this.privateKey?a.concat(["0x00",this.privateKey]):this.publicKey]))},enumerable:!0,configurable:!0}),m.prototype.neuter=function(){return new m(b,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,null,this.path)},m.prototype._derive=function(t){if(4294967295<t)throw new Error("invalid index - "+String(t));var e=this.path;e&&(e+="/"+(t&~I));var r=new Uint8Array(37);if(t&I){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(a.arrayify(this.privateKey),1),e&&(e+="'")}else r.set(a.arrayify(this.publicKey));for(var n=24;0<=n;n-=8)r[33+(n>>3)]=t>>24-n&255;var i=(c=f.computeHmac(f.SupportedAlgorithms.sha512,this.chainCode,r)).slice(0,32),o=c.slice(32),A=null,c=null;return this.privateKey?A=C(s.bigNumberify(i).add(this.privateKey).mod(g)):c=new l.KeyPair(a.hexlify(i))._addPoint(this.publicKey),new m(b,A,c,this.fingerprint,C(o),t,this.depth+1,this.mnemonic,e)},m.prototype.derivePath=function(t){var e=t.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===e[0]&&e.shift();for(var r=this,n=0;n<e.length;n++){var i=e[n];if(i.match(/^[0-9]+'$/)){var o=parseInt(i.substring(0,i.length-1));if(I<=o)throw new Error("invalid path index - "+i);r=r._derive(I+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);if(o=parseInt(i),I<=o)throw new Error("invalid path index - "+i);r=r._derive(o)}}return r},m.isHDNode=function(t){return h.isType(t,"HDNode")},m);function m(t,e,r,n,o,A,s,c,u){if(i.checkNew(this,m),t!==b)throw new Error("HDNode constructor cannot be called directly");e?(e=new l.KeyPair(e),h.defineReadOnly(this,"privateKey",e.privateKey),h.defineReadOnly(this,"publicKey",e.compressedPublicKey)):(h.defineReadOnly(this,"privateKey",null),h.defineReadOnly(this,"publicKey",a.hexlify(r))),h.defineReadOnly(this,"parentFingerprint",n),h.defineReadOnly(this,"fingerprint",a.hexDataSlice(d.ripemd160(d.sha256(this.publicKey)),0,4)),h.defineReadOnly(this,"address",l.computeAddress(this.publicKey)),h.defineReadOnly(this,"chainCode",o),h.defineReadOnly(this,"index",A),h.defineReadOnly(this,"depth",s),h.defineReadOnly(this,"mnemonic",c),h.defineReadOnly(this,"path",u),h.setType(this,"HDNode")}function w(t,e){if((t=a.arrayify(t)).length<16||64<t.length)throw new Error("invalid seed");return t=a.arrayify(f.computeHmac(f.SupportedAlgorithms.sha512,p,t)),new B(b,C(t.slice(0,32)),null,"0x00000000",C(t.slice(32)),0,0,e,"m")}function v(t,e){return e=c.toUtf8Bytes("mnemonic"+(e=e||""),c.UnicodeNormalizationForm.NFKD),a.hexlify(u.pbkdf2(c.toUtf8Bytes(t,c.UnicodeNormalizationForm.NFKD),e,2048,64,"sha512"))}function Q(t,e){e=e||o.langEn,i.checkNormalize();var r=e.split(t);if(r.length%3!=0)throw new Error("invalid mnemonic");for(var n=a.arrayify(new Uint8Array(Math.ceil(11*r.length/8))),A=0,s=0;s<r.length;s++){var c=e.getWordIndex(r[s].normalize("NFKD"));if(-1===c)throw new Error("invalid mnemonic");for(var u=0;u<11;u++)c&1<<10-u&&(n[A>>3]|=1<<7-A%8),A++}var f=32*r.length/3,h=y(r.length/3);if(t=a.arrayify(d.sha256(n.slice(0,f/8)))[0],(t&=h)!=(n[n.length-1]&h))throw new Error("invalid checksum");return a.hexlify(n.slice(0,f/8))}function _(t,e){if((t=a.arrayify(t)).length%4!=0||t.length<16||32<t.length)throw new Error("invalid entropy");for(var r=[0],n=11,i=0;i<t.length;i++)8<n?(r[r.length-1]<<=8,r[r.length-1]|=t[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[i]>>8-n,r.push(t[i]&(1<<8-n)-1),n+=3);var A=a.arrayify(d.sha256(t))[0],s=t.length/4;return A&=y(s),r[r.length-1]<<=s,r[r.length-1]|=A>>8-s,(e=e||o.langEn).join(r.map((function(t){return e.getWord(t)})))}r.HDNode=B,r.fromExtendedKey=function(t){var e=A.Base58.decode(t);82===e.length&&E(e.slice(0,78))===t||i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"});var r=e[4],n=a.hexlify(e.slice(5,9)),o=parseInt(a.hexlify(e.slice(9,13)).substring(2),16),s=a.hexlify(e.slice(13,45)),c=e.slice(45,78);switch(a.hexlify(e.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new B(b,null,a.hexlify(c),n,s,o,r,null,null);case"0x0488ade4":case"0x04358394":if(0!==c[0])break;return new B(b,a.hexlify(c.slice(1)),null,n,s,o,r,null,null)}return i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},r.fromMnemonic=function(t,e,r){return w(v(t=_(Q(t,e),e),r),t)},r.fromSeed=function(t){return w(t,null)},r.mnemonicToSeed=v,r.mnemonicToEntropy=Q,r.entropyToMnemonic=_,r.isValidMnemonic=function(t,e){try{return Q(t,e),!0}catch(t){}return!1}},{"../errors":5,"../wordlists/lang-en":90,"./basex":62,"./bignumber":63,"./bytes":64,"./hmac":67,"./pbkdf2":73,"./properties":74,"./secp256k1":77,"./sha2":79,"./utf8":85}],67:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i,o=n(t("hash.js")),A=t("../utils/bytes"),a=n(t("../errors"));(t=i=r.SupportedAlgorithms||(r.SupportedAlgorithms={})).sha256="sha256",t.sha512="sha512",r.computeHmac=function(t,e,r){return i[t]||a.throwError("unsupported algorithm "+t,a.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),A.arrayify(o.hmac(o[t],A.arrayify(e)).update(A.arrayify(r)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./abi-coder");r.AbiCoder=i.AbiCoder,r.defaultAbiCoder=i.defaultAbiCoder,r.formatSignature=i.formatSignature,r.formatParamType=i.formatParamType,r.parseSignature=i.parseSignature,r.parseParamType=i.parseParamType,i=t("./address"),r.getAddress=i.getAddress,r.getContractAddress=i.getContractAddress,r.getCreate2Address=i.getCreate2Address,r.getIcapAddress=i.getIcapAddress,i=n(t("./base64")),r.base64=i,i=t("./bignumber"),r.BigNumber=i.BigNumber,r.bigNumberify=i.bigNumberify,i=t("./bytes"),r.arrayify=i.arrayify,r.concat=i.concat,r.hexDataSlice=i.hexDataSlice,r.hexDataLength=i.hexDataLength,r.hexlify=i.hexlify,r.hexStripZeros=i.hexStripZeros,r.hexZeroPad=i.hexZeroPad,r.isHexString=i.isHexString,r.joinSignature=i.joinSignature,r.padZeros=i.padZeros,r.splitSignature=i.splitSignature,r.stripZeros=i.stripZeros,i=t("./hash"),r.hashMessage=i.hashMessage,r.id=i.id,r.namehash=i.namehash,i=n(t("./hdnode")),r.HDNode=i,i=t("./interface"),r.Interface=i.Interface,i=t("./json-wallet"),r.getJsonWalletAddress=i.getJsonWalletAddress,i=t("./keccak256"),r.keccak256=i.keccak256,i=t("./sha2"),r.sha256=i.sha256,i=t("./solidity"),r.solidityKeccak256=i.keccak256,r.solidityPack=i.pack,r.soliditySha256=i.sha256,i=t("./random-bytes"),r.randomBytes=i.randomBytes,i=t("./networks"),r.getNetwork=i.getNetwork,i=t("./properties"),r.checkProperties=i.checkProperties,r.deepCopy=i.deepCopy,r.defineReadOnly=i.defineReadOnly,r.resolveProperties=i.resolveProperties,r.shallowCopy=i.shallowCopy,n=n(t("./rlp")),r.RLP=n,n=t("./secp256k1"),r.computeAddress=n.computeAddress,r.computePublicKey=n.computePublicKey,r.recoverAddress=n.recoverAddress,r.recoverPublicKey=n.recoverPublicKey,r.verifyMessage=n.verifyMessage,n=t("./signing-key"),r.SigningKey=n.SigningKey,n=t("./transaction"),r.populateTransaction=n.populateTransaction,n=t("./transaction"),r.parseTransaction=n.parse,r.serializeTransaction=n.serialize,n=t("./utf8"),r.formatBytes32String=n.formatBytes32String,r.parseBytes32String=n.parseBytes32String,r.toUtf8Bytes=n.toUtf8Bytes,r.toUtf8String=n.toUtf8String,n=t("./units"),r.commify=n.commify,r.formatEther=n.formatEther,r.parseEther=n.parseEther,r.formatUnits=n.formatUnits,r.parseUnits=n.parseUnits,n=t("./web"),r.fetchJson=n.fetchJson,r.poll=n.poll,n=t("./hmac"),r.SupportedAlgorithms=n.SupportedAlgorithms,n=t("./utf8"),r.UnicodeNormalizationForm=n.UnicodeNormalizationForm,t=t("./wordlist"),r.Wordlist=t.Wordlist},{"./abi-coder":59,"./address":60,"./base64":61,"./bignumber":63,"./bytes":64,"./hash":65,"./hdnode":66,"./hmac":67,"./interface":69,"./json-wallet":70,"./keccak256":71,"./networks":72,"./properties":74,"./random-bytes":75,"./rlp":76,"./secp256k1":77,"./sha2":79,"./signing-key":81,"./solidity":82,"./transaction":83,"./units":84,"./utf8":85,"./web":86,"./wordlist":87}],69:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A,a=t("./address"),s=t("./abi-coder"),c=t("./bignumber"),u=t("./bytes"),f=t("./hash"),h=t("./keccak256"),l=t("./properties"),d=o(t("../errors")),g=function(t){l.setType(this,"Indexed"),l.defineReadOnly(this,"hash",t)},p=(i(I,A=t=function(t){for(var e in l.setType(this,"Description"),t)l.defineReadOnly(this,e,l.deepCopy(t[e],!0));Object.freeze(this)}),I.prototype.encode=function(t,e){u.isHexString(t)||d.throwError("invalid contract bytecode",d.INVALID_ARGUMENT,{arg:"bytecode",value:t}),d.checkArgumentCount(e.length,this.inputs.length," in Interface constructor");try{return t+s.defaultAbiCoder.encode(this.inputs,e).substring(2)}catch(t){d.throwError("invalid constructor argument",d.INVALID_ARGUMENT,{arg:t.arg,reason:t.reason,value:t.value})}return null},I);function I(){return null!==A&&A.apply(this,arguments)||this}var y,C=(i(E,y=t),E.prototype.encode=function(t){d.checkArgumentCount(t.length,this.inputs.length," in interface function "+this.name);try{return this.sighash+s.defaultAbiCoder.encode(this.inputs,t).substring(2)}catch(t){d.throwError("invalid input argument",d.INVALID_ARGUMENT,{arg:t.arg,reason:t.reason,value:t.value})}return null},E.prototype.decode=function(t){try{return s.defaultAbiCoder.decode(this.outputs,u.arrayify(t))}catch(e){d.throwError("invalid data for function output",d.INVALID_ARGUMENT,{arg:"data",errorArg:e.arg,errorValue:e.value,value:t,reason:e.reason})}},E);function E(){return null!==y&&y.apply(this,arguments)||this}var b,B=(i(m,b=t),m);function m(){return null!==b&&b.apply(this,arguments)||this}var w,v=(i(Q,w=t),Q.prototype.encodeTopics=function(t){var e=this;t.length>this.inputs.length&&d.throwError("too many arguments for "+this.name,d.UNEXPECTED_ARGUMENT,{maxCount:t.length,expectedCount:this.inputs.length});var r=[];for(this.anonymous||r.push(this.topic),t.forEach((function(t,n){var i=e.inputs[n];i.indexed?null==t?r.push(null):"string"===i.type?r.push(f.id(t)):"bytes"===i.type?r.push(h.keccak256(t)):-1!==i.type.indexOf("[")||"tuple"===i.type.substring(0,5)?d.throwError("filtering with tuples or arrays not implemented yet; bug us on GitHub",d.NOT_IMPLEMENTED,{operation:"filter(array|tuple)"}):("address"===i.type&&a.getAddress(t),r.push(u.hexZeroPad(u.hexlify(t),32).toLowerCase())):null!=t&&d.throwError("cannot filter non-indexed parameters; must be null",d.INVALID_ARGUMENT,{argument:i.name||n,value:t})}));r.length&&null===r[r.length-1];)r.pop();return r},Q.prototype.decode=function(t,e){null==e||this.anonymous||(e=e.slice(1));var r,n=[],i=[],o=[];this.inputs.forEach((function(t,e){t.indexed?"string"===t.type||"bytes"===t.type||0<=t.type.indexOf("[")||"tuple"===t.type.substring(0,5)?(n.push({type:"bytes32",name:t.name||""}),o.push(!0)):(n.push(t),o.push(!1)):(i.push(t),o.push(!1))})),null!=e&&(r=s.defaultAbiCoder.decode(n,u.concat(e)));var A=s.defaultAbiCoder.decode(i,u.arrayify(t)),a={},c=0,f=0;return this.inputs.forEach((function(t,n){t.indexed?null==e?a[n]=new g(null):o[n]?a[n]=new g(r[f++]):a[n]=r[f++]:a[n]=A[c++],t.name&&(a[t.name]=a[n])})),a.length=this.inputs.length,new B(a)},Q);function Q(){return null!==w&&w.apply(this,arguments)||this}var _,D=(i(S,_=t),S);function S(){return null!==_&&_.apply(this,arguments)||this}var M,k=(i(x,M=t),x);function x(){return null!==M&&M.apply(this,arguments)||this}function R(t){switch(t.type){case"constructor":var e=new p({inputs:t.inputs,payable:null==t.payable||!!t.payable});this.deployFunction||(this.deployFunction=e);break;case"function":var r=s.formatSignature(t).replace(/tuple/g,""),n=f.id(r).substring(0,10),i=!1;null!=t.constant?i=t.constant:null!=t.stateMutability&&(i="view"==t.stateMutability||"pure"==t.stateMutability),e=new C({inputs:t.inputs,outputs:t.outputs,gas:t.gas,payable:null==t.payable||!!t.payable,type:i?"call":"transaction",name:t.name,signature:r,sighash:n}),t.name&&(null==this.functions[t.name]?l.defineReadOnly(this.functions,t.name,e):d.warn("WARNING: Multiple definitions for "+t.name)),null==this.functions[e.signature]&&l.defineReadOnly(this.functions,e.signature,e);break;case"event":r=s.formatSignature(t).replace(/tuple/g,""),e=new v({name:t.name,signature:r,inputs:t.inputs,topic:f.id(r),anonymous:!!t.anonymous}),t.name&&null==this.events[t.name]&&l.defineReadOnly(this.events,t.name,e),null==this.events[e.signature]&&l.defineReadOnly(this.events,e.signature,e);break;case"receive":case"fallback":break;default:d.warn("WARNING: unsupported ABI type - "+t.type)}}function N(t){if(d.checkNew(this,N),"string"==typeof t){try{t=JSON.parse(t)}catch(e){d.throwError("could not parse ABI JSON",d.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:t})}if(!Array.isArray(t))return d.throwError("invalid abi",d.INVALID_ARGUMENT,{arg:"abi",value:t}),null}l.defineReadOnly(this,"functions",{}),l.defineReadOnly(this,"events",{});var e=[];t.forEach((function(t){"string"==typeof t&&(t=s.parseSignature(t)),e.push(t)})),l.defineReadOnly(this,"abi",l.deepCopy(e,!0)),e.forEach(R,this),this.deployFunction||R.call(this,{type:"constructor",inputs:[]}),l.setType(this,"Interface")}N.prototype.parseTransaction=function(t){var e,r=t.data.substring(0,10).toLowerCase();for(e in this.functions)if(-1!==e.indexOf("(")){var n=this.functions[e];if(n.sighash===r){var i=s.defaultAbiCoder.decode(n.inputs,"0x"+t.data.substring(10));return new D({args:i,decode:n.decode,name:n.name,signature:n.signature,sighash:n.sighash,value:c.bigNumberify(t.value||"0")})}}return null},N.prototype.parseLog=function(t){for(var e in this.events)if(-1!==e.indexOf("(")&&!(e=this.events[e]).anonymous&&e.topic===t.topics[0])return new k({decode:e.decode,name:e.name,signature:e.signature,topic:e.topic,values:e.decode(t.data,t.topics)});return null},N.isInterface=function(t){return l.isType(t,"Interface")},N.isIndexed=function(t){return l.isType(t,"Indexed")},t=N,r.Interface=t},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./address");function i(t){try{var e=JSON.parse(t)}catch(t){return!1}return e.encseed&&e.ethaddr}function o(t){try{var e=JSON.parse(t)}catch(t){return!1}return!(!e.version||parseInt(e.version)!==e.version||3!==parseInt(e.version))}r.isCrowdsaleWallet=i,r.isSecretStorageWallet=o,r.getJsonWalletAddress=function(t){if(i(t))try{return n.getAddress(JSON.parse(t).ethaddr)}catch(t){return null}if(o(t))try{return n.getAddress(JSON.parse(t).address)}catch(t){return null}return null}},{"./address":60}],71:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("js-sha3"),i=t("./bytes");r.keccak256=function(t){return"0x"+n.keccak_256(i.arrayify(t))}},{"./bytes":64,"js-sha3":40}],72:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors"));function o(t){return function(e){var r=[];return e.InfuraProvider&&r.push(new e.InfuraProvider(t)),e.EtherscanProvider&&r.push(new e.EtherscanProvider(t)),0===r.length?null:e.FallbackProvider?new e.FallbackProvider(r):r[0]}}function A(t,e){return function(r){return r.JsonRpcProvider?new r.JsonRpcProvider(t,e):null}}var a={unspecified:{chainId:0,name:"unspecified"},homestead:n={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:o("homestead")},mainnet:n,morden:{chainId:2,name:"morden"},ropsten:t={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:o("ropsten")},testnet:t,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:o("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:o("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:o("kovan")},classic:{chainId:61,name:"classic",_defaultProvider:A("https://web3.gastracker.io","classic")},classicTestnet:{chainId:62,name:"classicTestnet",_defaultProvider:A("https://web3.gastracker.io/morden","classicTestnet")}};r.getNetwork=function(t){if(null==t)return null;if("number"==typeof t){for(var e in a)if((e=a[e]).chainId===t)return{name:e.name,chainId:e.chainId,ensAddress:e.ensAddress||null,_defaultProvider:e._defaultProvider||null};return{chainId:t,name:"unknown"}}if("string"!=typeof t)return(r=a[t.name])?(0!==t.chainId&&t.chainId!==r.chainId&&i.throwError("network chainId mismatch",i.INVALID_ARGUMENT,{arg:"network",value:t}),{name:t.name,chainId:r.chainId,ensAddress:t.ensAddress||r.ensAddress||null,_defaultProvider:t._defaultProvider||r._defaultProvider||null}):("number"!=typeof t.chainId&&i.throwError("invalid network chainId",i.INVALID_ARGUMENT,{arg:"network",value:t}),t);var r=a[t];return null==r?null:{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress,_defaultProvider:r._defaultProvider||null}}},{"../errors":5}],73:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("../utils/bytes"),i=t("./hmac");r.pbkdf2=function(t,e,r,o,A){var a;t=n.arrayify(t),e=n.arrayify(e);var s,c,u=1,f=new Uint8Array(o),h=new Uint8Array(e.length+4);h.set(e);for(var l=1;l<=u;l++){h[e.length]=l>>24&255,h[e.length+1]=l>>16&255,h[e.length+2]=l>>8&255,h[e.length+3]=255&l;var d=i.computeHmac(A,t,h);a||(a=d.length,c=new Uint8Array(a),s=o-((u=Math.ceil(o/a))-1)*a),c.set(d);for(var g=1;g<r;g++){d=i.computeHmac(A,t,d);for(var p=0;p<a;p++)c[p]^=d[p]}var I=(l-1)*a,y=l===u?s:a;f.set(n.arrayify(c).slice(0,y),I)}return n.arrayify(f)}},{"../utils/bytes":64,"./hmac":67}],74:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("../errors"));function o(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function A(t,e){return t&&t._ethersType===e}r.defineReadOnly=o,r.setType=function(t,e){Object.defineProperty(t,"_ethersType",{configurable:!1,value:e,writable:!1})},r.isType=A,r.resolveProperties=function(t){var e={},r=[];return Object.keys(t).forEach((function(n){var i=t[n];i instanceof Promise?r.push(i.then((function(t){return e[n]=t,null}))):e[n]=i})),Promise.all(r).then((function(){return e}))},r.checkProperties=function(t,e){t&&"object"==a(t)||i.throwError("invalid object",i.INVALID_ARGUMENT,{argument:"object",value:t}),Object.keys(t).forEach((function(r){e[r]||i.throwError("invalid object key - "+r,i.INVALID_ARGUMENT,{argument:"transaction",value:t,key:r})}))},r.shallowCopy=function(t){var e,r={};for(e in t)r[e]=t[e];return r};var s={boolean:!0,number:!0,string:!0};r.deepCopy=function t(e,r){if(null==e||s[a(e)])return e;if(Array.isArray(e)){var n=e.map((function(e){return t(e,r)}));return r&&Object.freeze(n),n}if("object"==a(e)){if(A(e,"BigNumber"))return e;if(A(e,"Description"))return e;if(A(e,"Indexed"))return e;var i;for(i in n={},e){var c=e[i];void 0!==c&&o(n,i,t(c,r))}return r&&Object.freeze(n),n}if("function"==typeof e)return e;throw new Error("Cannot deepCopy "+a(e))},r.inheritable=function t(e){return function(r){var n,i;i=e,(n=r).super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(r,"inherits",t(r))}}},{"../errors":5}],75:[function(t,e,n){(function(e){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t("../utils/bytes"),i=t("../utils/properties"),o=e.crypto||e.msCrypto;function A(t){if(t<=0||1024<t||parseInt(String(t))!=t)throw new Error("invalid length");return t=new Uint8Array(t),o.getRandomValues(t),r.arrayify(t)}o&&o.getRandomValues||(console.log("WARNING: Missing strong random number source; using weak randomBytes"),o={getRandomValues:function(t){for(var e=0;e<20;e++)for(var r=0;r<t.length;r++)e?t[r]^=Math.trunc(256*Math.random()):t[r]=Math.trunc(256*Math.random());return t},_weakCrypto:!0}),n.randomBytes=A,!0===o._weakCrypto&&i.defineReadOnly(A,"_weakCrypto",!0)}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/bytes":64,"../utils/properties":74}],76:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./bytes");function i(t){for(var e=[];t;)e.unshift(255&t),t>>=8;return e}function o(t,e,r){for(var n=0,i=0;i<r;i++)n=256*n+t[e+i];return n}function A(t,e,r,n){for(var i=[];r<e+1+n;){var o=a(t,r);if(i.push(o.result),e+1+n<(r+=o.consumed))throw new Error("invalid rlp")}return{consumed:1+n,result:i}}function a(t,e){if(0===t.length)throw new Error("invalid rlp data");if(248<=t[e]){if(e+1+(r=t[e]-247)>t.length)throw new Error("too short");if(e+1+r+(i=o(t,e+1,r))>t.length)throw new Error("to short");return A(t,e,e+1+r,r+i)}if(192<=t[e]){if(e+1+(i=t[e]-192)>t.length)throw new Error("invalid rlp data");return A(t,e,e+1,i)}if(184<=t[e]){var r;if(e+1+(r=t[e]-183)>t.length)throw new Error("invalid rlp data");if(e+1+r+(i=o(t,e+1,r))>t.length)throw new Error("invalid rlp data");return{consumed:1+r+i,result:n.hexlify(t.slice(e+1+r,e+1+r+i))}}if(128<=t[e]){var i;if(e+1+(i=t[e]-128)>t.length)throw new Error("invalid rlp data");return{consumed:1+i,result:n.hexlify(t.slice(e+1,e+1+i))}}return{consumed:1,result:n.hexlify(t[e])}}r.encode=function(t){return n.hexlify(function t(e){if(Array.isArray(e)){var r=[];return e.forEach((function(e){r=r.concat(t(e))})),r.length<=55?(r.unshift(192+r.length),r):((o=i(r.length)).unshift(247+o.length),o.concat(r))}var o;return 1===(e=Array.prototype.slice.call(n.arrayify(e))).length&&e[0]<=127?e:e.length<=55?(e.unshift(128+e.length),e):((o=i(e.length)).unshift(183+o.length),o.concat(e))}(t))},r.decode=function(t){var e=n.arrayify(t);if((t=a(e,0)).consumed!==e.length)throw new Error("invalid rlp data");return t.result}},{"./bytes":64}],77:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("elliptic"),o=t("./address"),A=t("./bytes"),a=t("./hash"),s=t("./keccak256"),c=t("./properties"),u=n(t("../errors")),f=null;function h(){return f=f||new i.ec("secp256k1")}var l=(d.prototype.sign=function(t){return{recoveryParam:(t=h().keyFromPrivate(A.arrayify(this.privateKey)).sign(A.arrayify(t),{canonical:!0})).recoveryParam,r:A.hexZeroPad("0x"+t.r.toString(16),32),s:A.hexZeroPad("0x"+t.s.toString(16),32),v:27+t.recoveryParam}},d.prototype.computeSharedSecret=function(t){var e=h().keyFromPrivate(A.arrayify(this.privateKey));return t=h().keyFromPublic(A.arrayify(g(t))),A.hexZeroPad("0x"+e.derive(t.getPublic()).toString(16),32)},d.prototype._addPoint=function(t){var e=h().keyFromPublic(A.arrayify(this.publicKey));return t=h().keyFromPublic(A.arrayify(t)),"0x"+e.pub.add(t.pub).encodeCompressed("hex")},d);function d(t){t=h().keyFromPrivate(A.arrayify(t)),c.defineReadOnly(this,"privateKey",A.hexlify(t.priv.toArray("be",32))),c.defineReadOnly(this,"publicKey","0x"+t.getPublic(!1,"hex")),c.defineReadOnly(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),c.defineReadOnly(this,"publicKeyBytes",t.getPublic().encode(null,!0))}function g(t,e){return 32!==(t=A.arrayify(t)).length?33===t.length?e?A.hexlify(t):"0x"+h().keyFromPublic(t).getPublic(!1,"hex"):65===t.length?e?"0x"+h().keyFromPublic(t).getPublic(!0,"hex"):A.hexlify(t):(u.throwError("invalid public or private key",u.INVALID_ARGUMENT,{arg:"key",value:"[REDACTED]"}),null):(t=new l(t),e?t.compressedPublicKey:t.publicKey)}function p(t){return t="0x"+g(t).slice(4),o.getAddress("0x"+s.keccak256(t).substring(26))}function I(t,e){var r=A.splitSignature(e);return e={r:A.arrayify(r.r),s:A.arrayify(r.s)},"0x"+h().recoverPubKey(A.arrayify(t),e,r.recoveryParam).encode("hex",!1)}function y(t,e){return p(I(A.arrayify(t),e))}r.KeyPair=l,r.computePublicKey=g,r.computeAddress=p,r.recoverPublicKey=I,r.recoverAddress=y,r.verifyMessage=function(t,e){return y(a.hashMessage(t),e)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t("aes-js")),A=n(t("scrypt-js")),a=n(t("uuid")),s=t("./signing-key"),c=i(t("./hdnode")),u=t("./address"),f=t("./bytes"),h=t("./pbkdf2"),l=t("./keccak256"),d=t("./utf8"),g=t("./random-bytes");function p(t){return"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),f.arrayify(t)}function I(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}function y(t){return"string"==typeof t?d.toUtf8Bytes(t,d.UnicodeNormalizationForm.NFKC):f.arrayify(t)}function C(t,e){for(var r=t,n=e.toLowerCase().split("/"),i=0;i<n.length;i++){var o,A=null;for(o in r)if(o.toLowerCase()===n[i]){A=r[o];break}if(null===A)return null;r=A}return r}r.decryptCrowdsale=function(t,e){var r=JSON.parse(t);e=y(e);var n=u.getAddress(C(r,"ethaddr"));if(!(t=p(C(r,"encseed")))||t.length%16!=0)throw new Error("invalid encseed");r=h.pbkdf2(e,e,2e3,32,"sha256").slice(0,16),e=t.slice(0,16),t=t.slice(16),e=new o.default.ModeOfOperation.cbc(r,e);for(var i=f.arrayify(e.decrypt(t)),A=(i=o.default.padding.pkcs7.strip(i),""),a=0;a<i.length;a++)A+=String.fromCharCode(i[a]);if(t=d.toUtf8Bytes(A),(t=new s.SigningKey(l.keccak256(t))).address!==n)throw new Error("corrupt crowdsale wallet");return t},r.decrypt=function(t,e,r){function n(t,e){var r=p(C(i,"crypto/ciphertext"));if(f.hexlify((a=t.slice(16,32),l.keccak256(f.concat([a,r])))).substring(2)!==C(i,"crypto/mac").toLowerCase())return e(new Error("invalid password")),null;var n=function(t,e){if("aes-128-ctr"!==C(i,"crypto/cipher"))return null;var r=p(C(i,"crypto/cipherparams/iv"));return r=new o.default.Counter(r),r=new o.default.ModeOfOperation.ctr(t,r),f.arrayify(r.decrypt(e))}(t.slice(0,16),r),A=t.slice(32,64);if(!n)return e(new Error("unsupported cipher")),null;var a=new s.SigningKey(n);if(i.address&&a.address!==u.getAddress(i.address))return e(new Error("address mismatch")),null;if(r=C(i,"x-ethers/locale"),"0.1"===C(i,"x-ethers/version")&&(null==r||"en"===r)){if(t=p(C(i,"x-ethers/mnemonicCiphertext")),r=p(C(i,"x-ethers/mnemonicCounter")),r=new o.default.Counter(r),A=new o.default.ModeOfOperation.ctr(A,r),r=C(i,"x-ethers/path")||c.defaultPath,t=f.arrayify(A.decrypt(t)),t=c.entropyToMnemonic(t),(r=c.fromMnemonic(t).derivePath(r)).privateKey!=f.hexlify(n))return e(new Error("mnemonic mismatch")),null;a=new s.SigningKey(r)}return a}var i=JSON.parse(t),a=y(e);return new Promise((function(t,e){if((d=C(i,"crypto/kdf"))&&"string"==typeof d)if("scrypt"===d.toLowerCase()){var o=p(C(i,"crypto/kdfparams/salt")),s=parseInt(C(i,"crypto/kdfparams/n")),c=parseInt(C(i,"crypto/kdfparams/r")),u=parseInt(C(i,"crypto/kdfparams/p"));s&&c&&u?0==(s&s-1)?32===(l=parseInt(C(i,"crypto/kdfparams/dklen")))?(r&&r(0),A.default(a,o,s,c,u,64,(function(i,o,A){if(i)i.progress=o,e(i);else if(A)(A=n(A=f.arrayify(A),e))&&(r&&r(1),t(A));else if(r)return r(o)}))):e(new Error("unsupported key-derivation derived-key length")):e(new Error("unsupported key-derivation function parameter value for N")):e(new Error("unsupported key-derivation function parameters"))}else if("pbkdf2"===d.toLowerCase()){if(o=p(C(i,"crypto/kdfparams/salt")),u=null,"hmac-sha256"===(d=C(i,"crypto/kdfparams/prf")))u="sha256";else{if("hmac-sha512"!==d)return void e(new Error("unsupported prf"));u="sha512"}var l,d=parseInt(C(i,"crypto/kdfparams/c"));32===(l=parseInt(C(i,"crypto/kdfparams/dklen")))?(u=n(u=h.pbkdf2(a,o,d,l,u),e))&&t(u):e(new Error("unsupported key-derivation derived-key length"))}else e(new Error("unsupported key-derivation function"));else e(new Error("unsupported key-derivation function"))}))},r.encrypt=function(t,e,r,n){var i;if("function"!=typeof r||n||(n=r,r={}),r=r||{},32!==(i=s.SigningKey.isSigningKey(t)?f.arrayify(t.privateKey):f.arrayify(t)).length)throw new Error("invalid private key");var u=y(e),h=null;if(r.entropy&&(h=f.arrayify(r.entropy)),r.mnemonic)if(h){if(c.entropyToMnemonic(h)!==r.mnemonic)throw new Error("entropy and mnemonic mismatch")}else h=f.arrayify(c.mnemonicToEntropy(r.mnemonic,r.wordlist));var d=r.path;h&&!d&&(d=c.defaultPath);var p=(p=r.client)||"ethers.js",C=r.salt?f.arrayify(r.salt):g.randomBytes(32),E=null;if(r.iv){if(16!==(E=f.arrayify(r.iv)).length)throw new Error("invalid iv")}else E=g.randomBytes(16);var b=null;if(r.uuid){if(16!==(b=f.arrayify(r.uuid)).length)throw new Error("invalid uuid")}else b=g.randomBytes(16);var B=1<<17,m=8,w=1;return r.scrypt&&(r.scrypt.N&&(B=r.scrypt.N),r.scrypt.r&&(m=r.scrypt.r),r.scrypt.p&&(w=r.scrypt.p)),new Promise((function(t,e){n&&n(0),A.default(u,C,B,m,w,64,(function(A,c,u){if(A)A.progress=c,e(A);else if(u){var y=(u=f.arrayify(u)).slice(0,16),v=u.slice(16,32),Q=u.slice(32,64);A=new s.SigningKey(i).address,u=new o.default.Counter(E),u=new o.default.ModeOfOperation.ctr(y,u),u=f.arrayify(u.encrypt(i)),v=l.keccak256(f.concat([v,u])),A={address:A.substring(2).toLowerCase(),id:a.default.v4({random:b}),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:f.hexlify(E).substring(2)},ciphertext:f.hexlify(u).substring(2),kdf:"scrypt",kdfparams:{salt:f.hexlify(C).substring(2),n:B,dklen:32,p:w,r:m},mac:v.substring(2)}},h&&(u=g.randomBytes(16),v=new o.default.Counter(u),Q=new o.default.ModeOfOperation.ctr(Q,v),v=f.arrayify(Q.encrypt(h)),Q=(Q=new Date).getUTCFullYear()+"-"+I(Q.getUTCMonth()+1,2)+"-"+I(Q.getUTCDate(),2)+"T"+I(Q.getUTCHours(),2)+"-"+I(Q.getUTCMinutes(),2)+"-"+I(Q.getUTCSeconds(),2)+".0Z",A["x-ethers"]={client:p,gethFilename:"UTC--"+Q+"--"+A.address,mnemonicCounter:f.hexlify(u).substring(2),mnemonicCiphertext:f.hexlify(v).substring(2),path:d,version:"0.1"},r.wordlist&&"string"==typeof r.wordlist.locale&&(A["x-ethers"].locale=r.wordlist.locale)),n&&n(1),t(JSON.stringify(A))}else if(n)return n(c)}))}))}},{"./address":60,"./bytes":64,"./hdnode":66,"./keccak256":71,"./pbkdf2":73,"./random-bytes":75,"./signing-key":81,"./utf8":85,"aes-js":8,"scrypt-js":44,uuid:48}],79:[function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("hash.js")),o=t("./bytes");r.ripemd160=function(t){return"0x"+i.default.ripemd160().update(o.arrayify(t)).digest("hex")},r.sha256=function(t){return"0x"+i.default.sha256().update(o.arrayify(t)).digest("hex")},r.sha512=function(t){return"0x"+i.default.sha512().update(o.arrayify(t)).digest("hex")}},{"./bytes":64,"hash.js":26}],80:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),t("setimmediate"),r.platform="browser"},{setimmediate:45}],81:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("./hdnode"),o=t("./bytes"),A=t("./properties"),s=t("./secp256k1"),c=n(t("../errors"));function u(t){c.checkNew(this,u);var e=i.HDNode.isHDNode(t)?(A.defineReadOnly(this,"mnemonic",t.mnemonic),A.defineReadOnly(this,"path",t.path),o.arrayify(t.privateKey)):("string"==typeof t&&t.match(/^[0-9a-f]*$/i)&&64===t.length&&(t="0x"+t),o.arrayify(t));try{32!==e.length&&c.throwError("exactly 32 bytes required",c.INVALID_ARGUMENT,{arg:"privateKey",value:"[REDACTED]"})}catch(e){t={arg:"privateKey",reason:e.reason,value:"[REDACTED]"},e.value&&("number"==typeof e.value.length&&(t.length=e.value.length),t.type=a(e.value)),c.throwError("invalid private key",e.code,t)}A.defineReadOnly(this,"privateKey",o.hexlify(e)),A.defineReadOnly(this,"keyPair",new s.KeyPair(e)),A.defineReadOnly(this,"publicKey",this.keyPair.publicKey),A.defineReadOnly(this,"address",s.computeAddress(this.keyPair.publicKey)),A.setType(this,"SigningKey")}u.prototype.signDigest=function(t){return this.keyPair.sign(t)},u.prototype.computeSharedSecret=function(t){return this.keyPair.computeSharedSecret(o.arrayify(t))},u.isSigningKey=function(t){return A.isType(t,"SigningKey")},t=u,r.SigningKey=t},{"../errors":5,"./bytes":64,"./hdnode":66,"./properties":74,"./secp256k1":77}],82:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("./bignumber"),i=t("./bytes"),o=t("./utf8"),A=t("./keccak256"),a=t("./sha2"),s=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),u=new RegExp("^(.*)\\[([0-9]*)\\]$");function f(t,e){if(t.length!=e.length)throw new Error("type/value count mismatch");var r=[];return t.forEach((function(t,A){r.push(function t(e,r,A){switch(e){case"address":return A?i.padZeros(r,32):i.arrayify(r);case"string":return o.toUtf8Bytes(r);case"bytes":return i.arrayify(r);case"bool":return r=r?"0x01":"0x00",A?i.padZeros(r,32):i.arrayify(r)}var a=e.match(c);if(a){if((f=parseInt(a[2]||"256"))%8!=0||0===f||256<f)throw new Error("invalid number type - "+e);return A&&(f=256),r=n.bigNumberify(r).toTwos(f),i.padZeros(r,f/8)}if(a=e.match(s)){var f=parseInt(a[1]);if(String(f)!=a[1]||0===f||32<f)throw new Error("invalid number type - "+e);if(i.arrayify(r).byteLength!==f)throw new Error("invalid value for "+e);return A?i.arrayify((r+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):r}if((a=e.match(u))&&Array.isArray(r)){var h=a[1];if(parseInt(a[2]||String(r.length))!=r.length)throw new Error("invalid value for "+e);var l=[];return r.forEach((function(e){l.push(t(h,e,!0))})),i.concat(l)}throw new Error("unknown type - "+e)}(t,e[A]))})),i.hexlify(i.concat(r))}r.pack=f,r.keccak256=function(t,e){return A.keccak256(f(t,e))},r.sha256=function(t,e){return a.sha256(f(t,e))}},{"./bignumber":63,"./bytes":64,"./keccak256":71,"./sha2":79,"./utf8":85}],83:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("../constants"),o=n(t("../errors")),A=t("./secp256k1"),a=t("./address"),s=t("./bignumber"),c=t("./bytes"),u=t("./keccak256"),f=t("./properties"),h=n(t("./rlp")),l=t("../providers/abstract-provider");function d(t){return"0x"===t?i.Zero:s.bigNumberify(t)}var g=[{name:"nonce",maxLength:32},{name:"gasPrice",maxLength:32},{name:"gasLimit",maxLength:32},{name:"to",length:20},{name:"value",maxLength:32},{name:"data"}],p={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};r.serialize=function(t,e){f.checkProperties(t,p);var r=[];g.forEach((function(e){var n=t[e.name]||[];n=c.arrayify(c.hexlify(n)),e.length&&n.length!==e.length&&0<n.length&&o.throwError("invalid length for "+e.name,o.INVALID_ARGUMENT,{arg:"transaction"+e.name,value:n}),e.maxLength&&(n=c.stripZeros(n)).length>e.maxLength&&o.throwError("invalid length for "+e.name,o.INVALID_ARGUMENT,{arg:"transaction"+e.name,value:n}),r.push(c.hexlify(n))})),null!=t.chainId&&0!==t.chainId&&(r.push(c.hexlify(t.chainId)),r.push("0x"),r.push("0x"));var n=h.encode(r);return e?(e=27+(n=c.splitSignature(e)).recoveryParam,9===r.length&&(r.pop(),r.pop(),r.pop(),e+=2*t.chainId+8),r.push(c.hexlify(e)),r.push(c.stripZeros(c.arrayify(n.r))),r.push(c.stripZeros(c.arrayify(n.s))),h.encode(r)):n},r.parse=function(t){9!==(n=h.decode(t)).length&&6!==n.length&&o.throwError("invalid raw transaction",o.INVALID_ARGUMENT,{arg:"rawTransactin",value:t});var e={nonce:d(n[0]).toNumber(),gasPrice:d(n[1]),gasLimit:d(n[2]),to:"0x"===(r=n[3])?null:a.getAddress(r),value:d(n[4]),data:n[5],chainId:0};if(6===n.length)return e;try{e.v=s.bigNumberify(n[6]).toNumber()}catch(t){return o.info(t),e}if(e.r=c.hexZeroPad(n[7],32),e.s=c.hexZeroPad(n[8],32),s.bigNumberify(e.r).isZero()&&s.bigNumberify(e.s).isZero())e.chainId=e.v,e.v=0;else{e.chainId=Math.floor((e.v-35)/2),e.chainId<0&&(e.chainId=0);var r=e.v-27,n=n.slice(0,6);0!==e.chainId&&(n.push(c.hexlify(e.chainId)),n.push("0x"),n.push("0x"),r-=2*e.chainId+8),n=u.keccak256(h.encode(n));try{e.from=A.recoverAddress(n,{r:c.hexlify(e.r),s:c.hexlify(e.s),recoveryParam:r})}catch(t){o.info(t)}e.hash=u.keccak256(t)}return e},r.populateTransaction=function(t,e,r){l.Provider.isProvider(e)||o.throwError("missing provider",o.INVALID_ARGUMENT,{argument:"provider",value:e}),f.checkProperties(t,p);var n=f.shallowCopy(t);return null!=n.to&&(n.to=e.resolveName(n.to)),null==n.gasPrice&&(n.gasPrice=e.getGasPrice()),null==n.nonce&&(n.nonce=e.getTransactionCount(r)),null==n.gasLimit&&((t=f.shallowCopy(n)).from=r,n.gasLimit=e.estimateGas(t)),null==n.chainId&&(n.chainId=e.getNetwork().then((function(t){return t.chainId}))),f.resolveProperties(n)}},{"../constants":3,"../errors":5,"../providers/abstract-provider":50,"./address":60,"./bignumber":63,"./bytes":64,"./keccak256":71,"./properties":74,"./rlp":76,"./secp256k1":77}],84:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i,o=t("../constants"),A=n(t("../errors")),a=t("./bignumber"),s={};function c(t){return{decimals:t.length-1,tenPower:a.bigNumberify(t)}}function u(t){var e=s[String(t).toLowerCase()];if(!e&&"number"==typeof t&&parseInt(String(t))==t&&0<=t&&t<=256){for(var r="1",n=0;n<t;n++)r+="0";e=c(r)}return e||A.throwError("invalid unitType",A.INVALID_ARGUMENT,{argument:"name",value:t}),e}function f(t,e){for(var r=u(e),n=(e=(t=a.bigNumberify(t)).lt(o.Zero),(t=e?t.mul(o.NegativeOne):t).mod(r.tenPower).toString());n.length<r.decimals;)n="0"+n;return n=n.match(/^([0-9]*[1-9]|0)(0*)/)[1],t=t.div(r.tenPower).toString()+"."+n,e?"-"+t:t}function h(t,e){var r=u(e=null==e?18:e);if("string"==typeof t&&t.match(/^-?[0-9.,]+$/)||A.throwError("invalid decimal value",A.INVALID_ARGUMENT,{arg:"value",value:t}),0===r.decimals)return a.bigNumberify(t);var n="-"===t.substring(0,1);"."===(t=n?t.substring(1):t)&&A.throwError("missing value",A.INVALID_ARGUMENT,{arg:"value",value:t}),2<(e=t.split(".")).length&&A.throwError("too many decimal points",A.INVALID_ARGUMENT,{arg:"value",value:t}),t=e[0];var i=e[1];for(t=t||"0",(i=i||"0").length>r.decimals&&A.throwError("underflow occurred",A.NUMERIC_FAULT,{operation:"division",fault:"underflow"});i.length<r.decimals;)i+="0";return e=a.bigNumberify(t),t=a.bigNumberify(i),t=e.mul(r.tenPower).add(t),n?t.mul(o.NegativeOne):t}i="1",["wei","kwei","Mwei","Gwei","szabo","finney","ether"].forEach((function(t){var e=c(i);s[t.toLowerCase()]=e,s[String(e.decimals)]=e,i+="000"})),r.commify=function(t){var e=String(t).split(".");(2<e.length||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||"."===t||"-."===t)&&A.throwError("invalid value",A.INVALID_ARGUMENT,{argument:"value",value:t});var r=e[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0"),t="",2===e.length&&(t="."+(e[1]||"0"));for(var i=[];r.length;){if(r.length<=3){i.unshift(r);break}var o=r.length-3;i.unshift(r.substring(o)),r=r.substring(0,o)}return n+i.join(",")+t},r.formatUnits=f,r.parseUnits=h,r.formatEther=function(t){return f(t,18)},r.parseEther=function(t){return h(t,18)}},{"../constants":3,"../errors":5,"./bignumber":63}],85:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,i=t("../constants"),o=t("../errors"),A=t("./bytes");function a(t,e){(e=void 0===e?n.current:e)!=n.current&&(o.checkNormalize(),t=t.normalize(e));for(var r=[],i=0;i<t.length;i++){var a=t.charCodeAt(i);if(a<128)r.push(a);else if(a<2048)r.push(a>>6|192),r.push(63&a|128);else if(55296==(64512&a)){i++;var s=t.charCodeAt(i);if(i>=t.length||56320!=(64512&s))throw new Error("invalid utf-8 string");r.push((a=65536+((1023&a)<<10)+(1023&s))>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)}else r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)}return A.arrayify(r)}function s(t,e){t=A.arrayify(t);for(var r="",n=0;n<t.length;){var i=t[n++];if(i>>7!=0){var o=null,a=null;if(192==(224&i))o=1,a=127;else if(224==(240&i))o=2,a=2047;else{if(240!=(248&i)){if(e)continue;if(128==(192&i))throw new Error("invalid utf8 byte sequence; unexpected continuation byte");throw new Error("invalid utf8 byte sequence; invalid prefix")}o=3,a=65535}if(n+o>t.length){if(!e)throw new Error("invalid utf8 byte sequence; too short");for(;n<t.length&&t[n]>>6==2;n++);}else{for(var s=i&(1<<8-o-1)-1,c=0;c<o;c++){var u=t[n];if(128!=(192&u)){s=null;break}s=s<<6|63&u,n++}if(null!==s)if(s<=a){if(!e)throw new Error("invalid utf8 byte sequence; overlong")}else if(1114111<s){if(!e)throw new Error("invalid utf8 byte sequence; out-of-range")}else if(55296<=s&&s<=57343){if(!e)throw new Error("invalid utf8 byte sequence; utf-16 surrogate")}else s<=65535?r+=String.fromCharCode(s):(s-=65536,r+=String.fromCharCode(55296+(s>>10&1023),56320+(1023&s)));else if(!e)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else r+=String.fromCharCode(i)}return r}(t=n=r.UnicodeNormalizationForm||(r.UnicodeNormalizationForm={})).current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD",r.toUtf8Bytes=a,r.toUtf8String=s,r.formatBytes32String=function(t){if(31<(t=a(t)).length)throw new Error("bytes32 string must be less than 32 bytes");return A.hexlify(A.concat([t,i.HashZero]).slice(0,32))},r.parseBytes32String=function(t){var e=A.arrayify(t);if(32!==e.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==e[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===e[r-1];)r--;return s(e.slice(0,r))}},{"../constants":3,"../errors":5,"./bytes":64}],86:[function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var i=t("xmlhttprequest"),o=t("./base64"),A=t("./properties"),s=t("./utf8"),c=n(t("../errors"));r.fetchJson=function(t,e,r){var n,A={},u=null,f=12e4;if("string"==typeof t)u=t;else if("object"==a(t)){if(null==t.url&&c.throwError("missing URL",c.MISSING_ARGUMENT,{arg:"url"}),u=t.url,"number"==typeof t.timeout&&0<t.timeout&&(f=t.timeout),t.headers)for(var h in t.headers)A[h.toLowerCase()]={key:h,value:String(t.headers[h])};null!=t.user&&null!=t.password&&("https:"!==u.substring(0,6)&&!0!==t.allowInsecure&&c.throwError("basic authentication requires a secure https url",c.INVALID_ARGUMENT,{arg:"url",url:u,user:t.user,password:"[REDACTED]"}),n=t.user+":"+t.password,A.authorization={key:"Authorization",value:"Basic "+o.encode(s.toUtf8Bytes(n))})}return new Promise((function(t,n){function o(){null!=s&&(clearTimeout(s),s=null)}var a=new i.XMLHttpRequest,s=null;s=setTimeout((function(){null!=s&&(s=null,n(new Error("timeout")),setTimeout((function(){a.abort()}),0))}),f),e?(a.open("POST",u,!0),A["content-type"]={key:"Content-Type",value:"application/json"}):a.open("GET",u,!0),Object.keys(A).forEach((function(t){t=A[t],a.setRequestHeader(t.key,t.value)})),a.onreadystatechange=function(){if(4===a.readyState){if(200!=a.status){o();var i=new Error("invalid response - "+a.status);return i.statusCode=a.status,a.responseText&&(i.responseText=a.responseText),void n(i)}var A=null;try{A=JSON.parse(a.responseText)}catch(i){o();var s=new Error("invalid json response");return s.orginialError=i,s.responseText=a.responseText,null!=e&&(s.requestBody=e),s.url=u,void n(s)}if(r)try{A=r(A)}catch(i){return o(),i.url=u,i.body=e,i.responseText=a.responseText,void n(i)}o(),t(A)}},a.onerror=function(t){o(),n(t)};try{null!=e?a.send(e):a.send()}catch(s){o();var c=new Error("connection error");c.error=s,n(c)}}))},r.poll=function(t,e){return e=e||{},null==(e=A.shallowCopy(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise((function(r,n){var i=null,o=!1,A=function(){return!o&&(o=!0,i&&clearTimeout(i),!0)};e.timeout&&(i=setTimeout((function(){A()&&n(new Error("timeout"))}),e.timeout));var a=e.fastRetry||null,s=0;!function i(){return t().then((function(t){return void 0!==t?A()&&r(t):e.onceBlock?e.onceBlock.once("block",i):o||(s++,(t=(t=e.interval*parseInt(String(Math.random()*Math.pow(2,s))))<e.floor?e.floor:t)>e.ceiling&&(t=e.ceiling),a&&(s--,t=a,a=null),setTimeout(i,t)),null}),(function(t){A()&&n(t)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(t,e,n){(function(e){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var e=t("../utils/hash"),r=t("../utils/properties");n.check=function(t){for(var r=[],n=0;n<2048;n++){var i=t.getWord(n);if(n!==t.getWordIndex(i))return"0x";r.push(i)}return e.id(r.join("\n")+"\n")};var i=(o.prototype.split=function(t){return t.toLowerCase().split(/ +/g)},o.prototype.join=function(t){return t.join(" ")},o);function o(t){r.defineReadOnly(this,"locale",t)}n.Wordlist=i,n.register=function(t,e){e=e||t.locale}}).call(this)}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var A,a=t("./utils/bytes"),s=t("./utils/hash"),c=t("./utils/hdnode"),u=t("./utils/json-wallet"),f=t("./utils/keccak256"),h=t("./utils/properties"),l=t("./utils/random-bytes"),d=o(t("./utils/secret-storage")),g=t("./utils/signing-key"),p=t("./utils/transaction"),I=t("./abstract-signer"),y=t("./providers/abstract-provider"),C=o(t("./errors"));function E(t,e){var r=A.call(this)||this;return C.checkNew(r,E),g.SigningKey.isSigningKey(t)?h.defineReadOnly(r,"signingKey",t):h.defineReadOnly(r,"signingKey",new g.SigningKey(t)),h.defineReadOnly(r,"provider",e),r}i(E,A=I.Signer),Object.defineProperty(E.prototype,"address",{get:function(){return this.signingKey.address},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"mnemonic",{get:function(){return this.signingKey.mnemonic},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"path",{get:function(){return this.signingKey.path},enumerable:!0,configurable:!0}),Object.defineProperty(E.prototype,"privateKey",{get:function(){return this.signingKey.privateKey},enumerable:!0,configurable:!0}),E.prototype.connect=function(t){return y.Provider.isProvider(t)||C.throwError("invalid provider",C.INVALID_ARGUMENT,{argument:"provider",value:t}),new E(this.signingKey,t)},E.prototype.getAddress=function(){return Promise.resolve(this.address)},E.prototype.sign=function(t){var e=this;return h.resolveProperties(t).then((function(t){var r=p.serialize(t);return r=e.signingKey.signDigest(f.keccak256(r)),p.serialize(t,r)}))},E.prototype.signMessage=function(t){return Promise.resolve(a.joinSignature(this.signingKey.signDigest(s.hashMessage(t))))},E.prototype.getBalance=function(t){if(!this.provider)throw new Error("missing provider");return this.provider.getBalance(this.address,t)},E.prototype.getTransactionCount=function(t){if(!this.provider)throw new Error("missing provider");return this.provider.getTransactionCount(this.address,t)},E.prototype.sendTransaction=function(t){var e=this;if(!this.provider)throw new Error("missing provider");return null==t.nonce&&((t=h.shallowCopy(t)).nonce=this.getTransactionCount("pending")),p.populateTransaction(t,this.provider,this.address).then((function(t){return e.sign(t).then((function(t){return e.provider.sendTransaction(t)}))}))},E.prototype.encrypt=function(t,e,r){if("function"!=typeof e||r||(r=e,e={}),r&&"function"!=typeof r)throw new Error("invalid callback");return e=e||{},this.mnemonic&&((e=h.shallowCopy(e)).mnemonic=this.mnemonic,e.path=this.path),d.encrypt(this.privateKey,t,e,r)},E.createRandom=function(t){var e=l.randomBytes(16);return(t=t||{}).extraEntropy&&(e=a.arrayify(f.keccak256(a.concat([e,t.extraEntropy])).substring(0,34))),e=c.entropyToMnemonic(e,t.locale),E.fromMnemonic(e,t.path,t.locale)},E.fromEncryptedJson=function(t,e,r){if(u.isCrowdsaleWallet(t))try{r&&r(0);var n=d.decryptCrowdsale(t,e);return r&&r(1),Promise.resolve(new E(n))}catch(t){return Promise.reject(t)}else if(u.isSecretStorageWallet(t))return d.decrypt(t,e,r).then((function(t){return new E(t)}));return Promise.reject("invalid wallet JSON")},E.fromMnemonic=function(t,e,r){return e=e||c.defaultPath,new E(c.fromMnemonic(t,r).derivePath(e))},i=E,r.Wallet=i},{"./abstract-signer":2,"./errors":5,"./providers/abstract-provider":50,"./utils/bytes":64,"./utils/hash":65,"./utils/hdnode":66,"./utils/json-wallet":70,"./utils/keccak256":71,"./utils/properties":74,"./utils/random-bytes":75,"./utils/secret-storage":78,"./utils/signing-key":81,"./utils/transaction":83}],89:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),t=t("../wordlists/lang-en").langEn,r.en=t},{"../wordlists/lang-en":90}],90:[function(t,e,r){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var o,A=t("../utils/wordlist"),a=null;function s(t){if(null==a&&(a="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==A.check(t)))throw a=null,new Error("BIP39 Wordlist for en (English) FAILED")}function c(){return o.call(this,"en")||this}i=new(i(c,o=A.Wordlist),c.prototype.getWord=function(t){return s(this),a[t]},c.prototype.getWordIndex=function(t){return s(this),a.indexOf(t)},c),r.langEn=i,A.register(i)},{"../utils/wordlist":87}]},{},[7])(7)},"object"==a(e)&&void 0!==t?t.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(e,i):n)||(t.exports=o))}).call(this,r(4))},function(t,e,r){var n=r(72),i=r(81),o=r(28),A=r(14),a=r(15);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var u=r(82),f=r(173),h=r(85),l=h.ValidateLibrary,d=h.ValidateObject,g=h.ValidateVersion,p=h.ValidatePartHash,I=h.ValidateWriteToken,y=h.ValidateParameters,C=r(174);e.permissionLevels={owner:{short:"Owner Only",description:"Only the owner has access to the object and ability to change permissions",settings:{visibility:0,statusCode:-1,kmsConk:!1}},editable:{short:"Editable",description:"Members of the editors group have full access to the object and the ability to change permissions",settings:{visibility:0,statusCode:-1,kmsConk:!0}},viewable:{short:"Viewable",description:"In addition to editors, members of the 'accessor' group can have read-only access to the object including playing video and retrieving metadata, images and documents",settings:{visibility:0,statusCode:0,kmsConk:!0}},listable:{short:"Publicly Listable",description:"Anyone can list the public portion of this object but only accounts with specific rights can access",settings:{visibility:1,statusCode:0,kmsConk:!0}},public:{short:"Public",description:"Anyone can access this object",settings:{visibility:10,statusCode:0,kmsConk:!0}}},e.Visibility=function(){var t=a(A.mark((function t(e){var r,n,i=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.id,t.prev=1,n=this.utils.HashToAddress(r),this.visibilityInfo[n]||(this.visibilityInfo[n]=new Promise(function(){var t=a(A.mark((function t(e,o){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i.authClient.ContractHasMethod({contractAddress:n,methodName:"visibility"});case 3:if(t.sent){t.next=7;break}return e(0),t.abrupt("return");case 7:return t.t0=e,t.next=10,i.CallContractMethod({contractAddress:i.utils.HashToAddress(r),methodName:"visibility"});case 10:t.t1=t.sent,(0,t.t0)(t.t1),t.next=17;break;case 14:t.prev=14,t.t2=t.catch(0),o(t.t2);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e,r){return t.apply(this,arguments)}}())),t.prev=4,t.next=7,this.visibilityInfo[n];case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),delete this.visibilityInfo[n],t.t0;case 14:t.next=21;break;case 16:if(t.prev=16,t.t1=t.catch(1),"CALL_EXCEPTION"!==t.t1.code){t.next=20;break}return t.abrupt("return",0);case 20:throw t.t1;case 21:case"end":return t.stop()}}),t,this,[[1,16],[4,10]])})));return function(e){return t.apply(this,arguments)}}(),e.Permission=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,d(r),t.next=4,this.AccessType({id:r});case 4:if(t.t0=t.sent,t.t1=this.authClient.ACCESS_TYPES.OBJECT,t.t0===t.t1){t.next=8;break}throw Error("Permission only valid for normal content objects: "+r);case 8:return t.next=10,this.Visibility({id:r});case 10:return n=t.sent,t.next=13,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"addressKMS"});case 13:if(i=t.sent,o=i&&"ikms".concat(this.utils.AddressToHash(i)),a=!1,!o){t.next=27;break}return t.t2=this,t.next=20,this.ContentObjectLibraryId({objectId:r});case 20:return t.t3=t.sent,t.t4=r,t.t5="eluv.caps.".concat(o),t.t6={libraryId:t.t3,objectId:t.t4,metadataSubtree:t.t5},t.next=26,t.t2.ContentObjectMetadata.call(t.t2,t.t6);case 26:a=!!t.sent;case 27:return t.next=29,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"statusCode"});case 29:return s=t.sent,s=parseInt(s._hex,16),(c=Object.keys(this.permissionLevels).filter((function(t){var e=u.permissionLevels[t].settings;return n>=e.visibility&&s>=e.statusCode&&a===e.kmsConk})))||(c=a?["editable"]:["owner"]),t.abrupt("return",c.slice(-1)[0]);case 34:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DefaultKMSAddress=a(A.mark((function t(){var e,r,n,i=arguments;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=i.length>0&&void 0!==i[0]?i[0]:{},r=e.tenantId,t.t0=r,!t.t0){t.next=8;break}return t.next=5,this.AccessType({id:r});case 5:t.t1=t.sent,t.t2=this.authClient.ACCESS_TYPES.TENANT,t.t0=t.t1===t.t2;case 8:if(!t.t0){t.next=14;break}return t.next=11,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"addressKMS"});case 11:if(!(n=t.sent)){t.next=14;break}return t.abrupt("return",n);case 14:return t.next=16,this.CallContractMethod({contractAddress:this.contentSpaceAddress,methodName:"addressKMS"});case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)}))),e.ContentSpaceId=function(){return this.contentSpaceId},e.ContentTypeOwner=function(){var t=a(A.mark((function t(e){var r,n,i,o;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.name,n=e.typeId,i=e.versionHash,t.next=3,this.ContentType({name:r,typeId:n,versionHash:i});case 3:return o=t.sent,t.t0=this.utils,t.next=7,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(o.id),methodName:"owner",methodArgs:[]});case 7:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentType=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.name,n=e.typeId,i=e.versionHash,o=e.publicOnly,a=void 0!==o&&o,this.Log("Retrieving content type: ".concat(r||n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),!r){t.next=13;break}return this.Log("Looking up type by name in content space metadata..."),t.prev=5,t.next=8,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:this.contentSpaceObjectId,metadataSubtree:u("public","contentTypes",r)});case 8:n=t.sent,t.next=13;break;case 11:t.prev=11,t.t0=t.catch(5);case 13:if(n){t.next=23;break}return this.Log("Looking up type by name in available types..."),t.next=17,this.ContentTypes();case 17:if(s=t.sent,!r){t.next=22;break}return t.abrupt("return",Object.values(s).find((function(t){return(t.name||"").toLowerCase()===r.toLowerCase()})));case 22:return t.abrupt("return",Object.values(s).find((function(t){return t.hash===i})));case 23:if(i){t.next=27;break}return t.next=26,this.LatestVersionHash({objectId:n});case 26:i=t.sent;case 27:if(t.prev=27,this.Log("Looking up type by ID..."),!a){t.next=39;break}return t.next=32,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:n,versionHash:i,metadataSubtree:"public"});case 32:if(t.t1=t.sent,t.t1){t.next=35;break}t.t1={};case 35:t.t2=t.t1,c={public:t.t2},t.next=45;break;case 39:return t.next=41,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:n,versionHash:i});case 41:if(t.t3=t.sent,t.t3){t.next=44;break}t.t3={};case 44:c=t.t3;case 45:return t.abrupt("return",{id:n,hash:i,name:c.public&&c.public.name||c.name||n,meta:c});case 48:throw t.prev=48,t.t4=t.catch(27),this.Log("Error looking up content type:"),this.Log(t.t4),new Error("Content Type ".concat(r||n," is invalid"));case 53:case"end":return t.stop()}}),t,this,[[5,11],[27,48]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentTypes=a(A.mark((function t(){var e,r,n,i=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.contentTypes=this.contentTypes||{},this.Log("Looking up all available content types"),t.next=4,this.Collection({collectionType:"contentTypes"});case 4:return e=t.sent,this.Log("Personally available types:"),this.Log(e),r={},t.prev=8,t.next=11,this.ContentObjectMetadata({libraryId:this.contentSpaceLibraryId,objectId:this.contentSpaceObjectId,metadataSubtree:"public/contentTypes"});case 11:if(t.t0=t.sent,t.t0){t.next=14;break}t.t0={};case 14:r=t.t0,t.next=19;break;case 17:t.prev=17,t.t1=t.catch(8);case 19:return n=Object.values(r).map((function(t){return i.utils.HashToAddress(t)})),this.Log("Content space types:"),this.Log(n),e=e.concat(n).filter((function(t){return t})).map((function(t){return i.utils.FormatAddress(t)})).filter((function(t,e,r){return r.indexOf(t)===e})),t.next=25,Promise.all(e.map(function(){var t=a(A.mark((function t(e){var r;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i.utils.AddressToObjectId(e),i.contentTypes[r]){t.next=11;break}return t.prev=2,t.next=5,i.ContentType({typeId:r,publicOnly:!0});case 5:i.contentTypes[r]=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}()));case 25:return t.abrupt("return",this.contentTypes);case 26:case"end":return t.stop()}}),t,this,[[8,17]])}))),e.ContentLibraries=a(A.mark((function t(){var e,r=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.Collection({collectionType:"libraries"});case 2:return e=t.sent,t.abrupt("return",e.map((function(t){return r.utils.AddressToLibraryId(t)})));case 4:case"end":return t.stop()}}),t,this)}))),e.ContentLibrary=function(){var t=a(A.mark((function t(e){var r,n,i;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,l(r),n=u("qlibs",r),t.t0=this.utils,t.t1=this.HttpClient,t.next=7,this.authClient.AuthorizationHeader({libraryId:r});case 7:return t.t2=t.sent,t.t3=n,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=13,t.t0.ResponseToJson.call(t.t0,t.t5);case 13:return i=t.sent,t.abrupt("return",c(c({},i),{},{meta:i.meta||{}}));case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentLibraryOwner=function(){var t=a(A.mark((function t(e){var r;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,l(r),t.t0=this.utils,t.next=5,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"owner",methodArgs:[]});case 5:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LibraryContentTypes=function(){var t=a(A.mark((function t(e){var r,n,i,o=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,l(r),this.Log("Retrieving library content types for ".concat(r)),t.next=5,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"contentTypesLength",methodArgs:[]});case 5:if(n=t.sent.toNumber(),this.Log("".concat(n," types")),0!==n){t.next=9;break}return t.abrupt("return",{});case 9:return i={},t.next=12,Promise.all(Array.from(new Array(n),function(){var t=a(A.mark((function t(e,n){var a,s;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.ethClient.CallContractMethod({contractAddress:o.utils.HashToAddress(r),methodName:"contentTypes",methodArgs:[n]});case 2:return a=t.sent,s=o.utils.AddressToObjectId(a),t.next=6,o.ContentType({typeId:s});case 6:i[s]=t.sent;case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()));case 12:return this.Log(i),t.abrupt("return",i);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjects=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.filterOptions,i=void 0===n?{}:n,l(r),this.Log("Retrieving content objects from ".concat(r)),o=u("qlibs",r,"q"),a={filter:[]},i.cacheId&&(a.cache_id=i.cacheId),i.start&&(a.start=i.start),i.limit&&(a.limit=i.limit),i.select&&(a.select=i.select),i.sort&&(a.sort_by=i.sort,i.sortDesc&&(a.sort_descending=!0)),s={eq:":eq:",neq:":ne:",lt:":lt:",lte:":le:",gt:":gt:",gte:":ge:",cnt:":co:",ncnt:":nc:"},c=function(t){var e=t.key,r=t.type,n=t.filter;a.filter.push("".concat(e).concat(s[r]).concat(n))},i.filter&&(Array.isArray(i.filter)?i.filter.forEach((function(t){return c(t)})):c(i.filter)),this.Log("Filter options:"),this.Log(i),t.t0=this.utils,t.t1=this.HttpClient,t.next=19,this.authClient.AuthorizationHeader({libraryId:r});case 19:return t.t2=t.sent,t.t3=o,t.t4=a,t.t5={headers:t.t2,method:"GET",path:t.t3,queryParams:t.t4},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=26,t.t0.ResponseToJson.call(t.t0,t.t6);case 26:return t.abrupt("return",t.sent);case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObject=function(){var t=a(A.mark((function t(e){var r,n,i,o;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,y({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving content object: ".concat(r||""," ").concat(n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),o=u("q",i||n),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 9:return t.t2=t.sent,t.t3=o,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=15,t.t0.ResponseToJson.call(t.t0,t.t5);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectOwner=function(){var t=a(A.mark((function t(e){var r;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,d(r),this.Log("Retrieving content object owner: ".concat(r)),t.t0=this.utils,t.next=6,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"owner",methodArgs:[]});case 6:return t.t1=t.sent,t.abrupt("return",t.t0.FormatAddress.call(t.t0,t.t1));case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectTenantId=function(){var t=a(A.mark((function t(e){var r,n;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,(n=e.versionHash)?g(n):d(r),n&&(r=this.utils.DecodeVersionHash(n).objectId),this.objectTenantIds[r]){t.next=7;break}return t.next=6,this.authClient.MakeElvMasterCall({methodName:"elv_getTenantById",params:[this.contentSpaceId,r]});case 6:this.objectTenantIds[r]=t.sent;case 7:return t.abrupt("return",this.objectTenantIds[r]);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectLibraryId=function(){var t=a(A.mark((function t(e){var r,n,i=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,(n=e.versionHash)?g(n):d(r),n&&(r=this.utils.DecodeVersionHash(n).objectId),t.next=5,this.authClient.AccessType(r);case 5:t.t0=t.sent,t.next=t.t0===this.authClient.ACCESS_TYPES.LIBRARY?8:t.t0===this.authClient.ACCESS_TYPES.OBJECT?9:t.t0===this.authClient.ACCESS_TYPES.OTHER?20:21;break;case 8:return t.abrupt("return",this.utils.AddressToLibraryId(this.utils.HashToAddress(r)));case 9:return this.objectLibraryIds[r]||(this.Log("Retrieving content object library ID: ".concat(r||n)),this.objectLibraryIds[r]=new Promise(function(){var t=a(A.mark((function t(e,n){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=e,t.t1=i.utils,t.next=5,i.CallContractMethod({contractAddress:i.utils.HashToAddress(r),methodName:"libraryAddress"});case 5:t.t2=t.sent,t.t3=t.t1.AddressToLibraryId.call(t.t1,t.t2),(0,t.t0)(t.t3),t.next=13;break;case 10:t.prev=10,t.t4=t.catch(0),n(t.t4);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,r){return t.apply(this,arguments)}}())),t.prev=10,t.next=13,this.objectLibraryIds[r];case 13:return t.abrupt("return",t.sent);case 16:throw t.prev=16,t.t1=t.catch(10),delete this.objectLibraryIds[r],t.t1;case 20:throw Error("Unable to retrieve library ID for ".concat(n||r,": Unknown type. (wrong network or deleted object?)"));case 21:return t.abrupt("return",this.contentSpaceLibraryId);case 22:case"end":return t.stop()}}),t,this,[[10,16]])})));return function(e){return t.apply(this,arguments)}}(),e.ProduceMetadataLinks=function(){var t=a(A.mark((function t(e){var r,n,o,s,f,h,l,d,g,p=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,o=e.versionHash,s=e.path,f=void 0===s?"/":s,h=e.metadata,l=e.authorizationToken,d=e.noAuth,h&&"object"===i(h)){t.next=3;break}return t.abrupt("return",h);case 3:if(!Array.isArray(h)){t.next=7;break}return t.next=6,this.utils.LimitedMap(5,h,function(){var t=a(A.mark((function t(e,i){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.ProduceMetadataLinks({libraryId:r,objectId:n,versionHash:o,path:u(f,i.toString()),metadata:e,authorizationToken:l,noAuth:d});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 6:return t.abrupt("return",t.sent);case 7:if(!h["/"]||!h["/"].match(/\.\/(rep|files)\/.+/)&&!h["/"].match(/^\/?qfab\/([\w]+)\/?(rep|files)\/.+/)){t.next=16;break}return t.t0=c,t.t1=c({},h),t.t2={},t.next=13,this.LinkUrl({libraryId:r,objectId:n,versionHash:o,linkPath:f,authorizationToken:l});case 13:return t.t3=t.sent,t.t4={url:t.t3},t.abrupt("return",(0,t.t0)(t.t1,t.t2,t.t4));case 16:return g={},t.next=19,this.utils.LimitedMap(5,Object.keys(h),function(){var t=a(A.mark((function t(e){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.ProduceMetadataLinks({libraryId:r,objectId:n,versionHash:o,path:u(f,e),metadata:h[e],authorizationToken:l,noAuth:d});case 2:g[e]=t.sent;case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 19:return t.abrupt("return",g);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.MetadataAuth=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,f,h,l,d,g;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.path,a=void 0===o?"/":o,s=e.channelAuth,c=void 0!==s&&s,u=e.noAuth,f=void 0!==u&&u,y({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),f=this.noAuth||f,h=f,f){t.next=14;break}return t.next=8,this.Visibility({id:n});case 8:return d=t.sent,t.next=11,this.AccessType({id:n});case 11:l=t.sent,h=(a||"").replace(/^\/+/,"").startsWith("public"),f=d>=10||h&&d>=1;case 14:if(!this.oauthToken){t.next=22;break}return t.next=17,this.authClient.KMSAddress({objectId:n,versionHash:i});case 17:if(!(g=t.sent)||this.utils.EqualAddress(g,this.utils.nullAddress)){t.next=22;break}return t.next=21,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,channelAuth:!0,oauthToken:this.oauthToken});case 21:return t.abrupt("return",t.sent);case 22:if(this.inaccessibleLibraries[r]||!h||l!==this.authClient.ACCESS_TYPES.OBJECT||c){t.next=48;break}if(t.prev=23,t.t0=this.authClient,t.t1=r,t.t1){t.next=30;break}return t.next=29,this.ContentObjectLibraryId({objectId:n,versionHash:i});case 29:t.t1=t.sent;case 30:return t.t2=t.t1,t.t3=f,t.t4={libraryId:t.t2,noAuth:t.t3},t.next=35,t.t0.AuthorizationToken.call(t.t0,t.t4);case 35:return t.abrupt("return",t.sent);case 38:if(t.prev=38,t.t5=t.catch(23),!t.t5.message||!t.t5.message.toLowerCase().startsWith("access denied")){t.next=45;break}return this.inaccessibleLibraries[r]=!0,t.next=44,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,noAuth:f,channelAuth:c});case 44:return t.abrupt("return",t.sent);case 45:throw t.t5;case 46:t.next=51;break;case 48:return t.next=50,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,noAuth:f,channelAuth:c});case 50:return t.abrupt("return",t.sent);case 51:case"end":return t.stop()}}),t,this,[[23,38]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectMetadata=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,f,h,l,d,g,p,I,C,E,b,B,m,w,v,Q,_,D,S,M,k,x,R,N;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.metadataSubtree,s=void 0===a?"/":a,f=e.queryParams,h=void 0===f?{}:f,l=e.select,d=void 0===l?[]:l,g=e.remove,p=void 0===g?[]:g,I=e.authorizationToken,C=e.noAuth,E=void 0!==C&&C,b=e.resolveLinks,B=void 0!==b&&b,m=e.resolveIncludeSource,w=void 0!==m&&m,v=e.resolveIgnoreErrors,Q=void 0!==v&&v,_=e.linkDepthLimit,D=void 0===_?1:_,S=e.produceLinkUrls,M=void 0!==S&&S,y({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving content object metadata: ".concat(r||""," ").concat(n||i," ").concat(o||"","\n Subtree: ").concat(s)),h=c({},h||{}),i&&(n=this.utils.DecodeVersionHash(i).objectId),k=u("q",o||i||n,"meta",s),t.next=8,this.MetadataAuth({libraryId:r,objectId:n,versionHash:i,path:s,noAuth:E});case 8:return x=t.sent,R=[I,h.authorization,x].flat().filter((function(t){return t})),delete h.authorization,t.prev=11,t.next=14,this.utils.ResponseToJson(this.HttpClient.Request({headers:{Authorization:R.map((function(t){return"Bearer ".concat(t)}))},queryParams:c(c({},h),{},{select:d,remove:p,link_depth:D,resolve:B,resolve_include_source:w,resolve_ignore_errors:Q}),method:"GET",path:k}));case 14:N=t.sent,t.next=22;break;case 17:if(t.prev=17,t.t0=t.catch(11),404===t.t0.status){t.next=21;break}throw t.t0;case 21:N="/"===s?{}:void 0;case 22:if(M){t.next=24;break}return t.abrupt("return",N);case 24:return t.next=26,this.ProduceMetadataLinks({libraryId:r,objectId:n,versionHash:i,path:s,metadata:N,authorizationToken:I,noAuth:E});case 26:return t.abrupt("return",t.sent);case 27:case"end":return t.stop()}}),t,this,[[11,17]])})));return function(e){return t.apply(this,arguments)}}(),e.AssetMetadata=function(){var t=a(A.mark((function t(e){var r,i,o,a,s,f,h,l,d,g=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,i=e.objectId,o=e.versionHash,a=e.metadata,s=e.localization,f=e.noAuth,h=e.produceLinkUrls,l=void 0!==h&&h,y({libraryId:r,objectId:i,versionHash:o}),i||(i=this.utils.DecodeVersionHash(o).objectId),a){t.next=12;break}return t.next=6,this.ContentObjectMetadata({libraryId:r,objectId:i,versionHash:o,metadataSubtree:"public/asset_metadata",resolveLinks:!0,linkDepthLimit:2,resolveIgnoreErrors:!0,produceLinkUrls:l,noAuth:f});case 6:if(t.t0=t.sent,t.t0){t.next=9;break}t.t0={};case 9:a=t.t0,t.next=16;break;case 12:if(!l){t.next=16;break}return t.next=15,this.ProduceMetadataLinks({libraryId:r,objectId:i,versionHash:o,path:u("public","asset_metadata"),metadata:a,noAuth:f});case 15:a=t.sent;case 16:return a.info||(a.info={}),d=c({},a),s&&s.reverse().forEach((function(t){var e,r=(e=g.utils).SafeTraverse.apply(e,[a].concat(n(t)))||{};d=C({},d,r,(function(t,e){return null===e||""===e?t:void 0}))})),t.abrupt("return",d);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectVersions=function(){var t=a(A.mark((function t(e){var r,n,i;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,y({libraryId:r,objectId:n}),this.Log("Retrieving content object versions: ".concat(r||""," ").concat(n)),i=u("qid",n),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n});case 8:return t.t2=t.sent,t.t3=i,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LatestVersionHash=function(){var t=a(A.mark((function t(e){var r,n,i,o;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,(n=e.versionHash)&&(r=this.utils.DecodeVersionHash(n).objectId),d(r),t.prev=3,t.next=6,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"objectHash"});case 6:i=t.sent,t.next=11;break;case 9:t.prev=9,t.t0=t.catch(3);case 11:if(i){t.next=20;break}return t.next=14,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"countVersionHashes"});case 14:if((o=t.sent).toNumber()){t.next=17;break}throw Error("Unable to determine latest version hash for ".concat(n||r," - Item deleted?"));case 17:return t.next=19,this.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"versionHashes",methodArgs:[o-1]});case 19:i=t.sent;case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this,[[3,9]])})));return function(e){return t.apply(this,arguments)}}(),e.AvailableDRMs=a(A.mark((function t(){var e,r,n,i,o,a,s,c,u;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=["clear","aes-128"],"undefined"!=typeof window){t.next=3;break}return t.abrupt("return",e);case 3:if(window.navigator&&window.navigator.userAgent&&((r=window.navigator.userAgent.match(/(iPad|iPhone|iphone|iPod).*?(OS |os |OS_)(\d+((_|\.)\d)?((_|\.)\d)?)/))&&r[3]&&(n=r[3].split("_"),i=parseInt(n[0]),o=parseInt(n[1]),(i>13||13===i&&o>=1)&&(e[1]="sample-aes",e[2]="fairplay")),/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&(a=window.navigator.userAgent.match(/.+Version\/(\d+)\.(\d+)/))&&a[2]&&(s=parseInt(a[1]),c=parseInt(a[2]),(s>13||13===s&&c>=1)&&(e[1]="sample-aes",e[2]="fairplay"))),"undefined"==typeof window||"function"==typeof window.navigator.requestMediaKeySystemAccess){t.next=6;break}return t.abrupt("return",e);case 6:return t.prev=6,u=[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}],t.next=10,navigator.requestMediaKeySystemAccess("com.widevine.alpha",u);case 10:e.push("widevine"),t.next=15;break;case 13:t.prev=13,t.t0=t.catch(6);case 15:return t.abrupt("return",e);case 16:case"end":return t.stop()}}),t,null,[[6,13]])}))),e.PlayoutPathResolution=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,f,h,l,d,g,p,I,y,C,E;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.linkPath,s=e.handler,c=e.offering,f=void 0===c?"":c,h=e.signedLink,l=void 0!==h&&h,d=e.authorizationToken,r){t.next=5;break}return t.next=4,this.ContentObjectLibraryId({objectId:n});case 4:r=t.sent;case 5:if(i){t.next=9;break}return t.next=8,this.LatestVersionHash({objectId:n});case 8:i=t.sent;case 9:if(g=u("qlibs",r,"q",o||i,"rep",s,f,"options.json"),!a){t.next=26;break}return t.next=13,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:o,metadataSubtree:a,resolveLinks:!1,resolveIgnoreErrors:!0,resolveIncludeSource:!0,authorizationToken:d});case 13:if(E=t.sent,C=!!E&&!!E["/"]&&!E["/"].endsWith("options.json"),g=u("qlibs",r,"q",o||i,"meta",a),l){t.next=25;break}return t.next=19,this.LinkTarget({libraryId:r,objectId:n,versionHash:i,writeToken:o,linkPath:a,linkInfo:E,authorizationToken:d});case 19:return y=t.sent,I=this.utils.DecodeVersionHash(y).objectId,t.next=23,this.ContentObjectLibraryId({objectId:I});case 23:p=t.sent,C||f||(g=u("q",y,"rep",s,"options.json"));case 25:C&&(g=u(g,f,"options.json"));case 26:return t.abrupt("return",{path:g,multiOfferingLink:C,linkTarget:{libraryId:p,objectId:I,versionHash:y}});case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AvailableOfferings=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,f,h,l,d;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.versionHash,i=e.writeToken,o=e.linkPath,a=e.signedLink,s=e.directLink,c=e.handler,u=void 0===c?"playout":c,f=e.authorizationToken,r||(r=this.utils.DecodeVersionHash(n).objectId),!s){t.next=15;break}return t.t0=this,t.next=6,this.ContentObjectLibraryId({objectId:r});case 6:return t.t1=t.sent,t.t2=r,t.t3=n,t.t4=o,t.t5=f,t.t6={libraryId:t.t1,objectId:t.t2,versionHash:t.t3,metadataSubtree:t.t4,resolveLinks:!0,authorizationToken:t.t5},t.next=14,t.t0.ContentObjectMetadata.call(t.t0,t.t6);case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,this.PlayoutPathResolution({objectId:r,versionHash:n,writeToken:i,linkPath:o,signedLink:a,handler:u,authorizationToken:f});case 17:return h=t.sent,l=h.path,t.prev=19,t.t7=f,t.next=23,this.authClient.AuthorizationToken({objectId:r,channelAuth:!0,oauthToken:this.oauthToken});case 23:return t.t8=t.sent,d=[t.t7,t.t8].flat().filter((function(t){return t})),t.next=27,this.utils.ResponseToJson(this.HttpClient.Request({path:l,method:"GET",headers:{Authorization:"Bearer ".concat(d.join(","))}}));case 27:return t.abrupt("return",t.sent);case 30:if(t.prev=30,t.t9=t.catch(19),!t.t9.status||500!==parseInt(t.t9.status)){t.next=34;break}return t.abrupt("return",{});case 34:throw t.t9;case 35:case"end":return t.stop()}}),t,this,[[19,30]])})));return function(e){return t.apply(this,arguments)}}(),e.PlayoutOptions=function(){var t=a(A.mark((function t(e){var r,n,i,s,f,h,l,p,I,y,C,E,b,B,m,w,v,Q,_,D,S,M,k,x,R,N,F,U,H,L,O,T,G,P,j,Y,K,q,J,z,Z,V,W,X,$,tt,et=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.offeringURI,n=e.objectId,i=e.versionHash,s=e.writeToken,f=e.linkPath,h=e.signedLink,l=void 0!==h&&h,p=e.protocols,I=void 0===p?["dash","hls"]:p,y=e.handler,C=void 0===y?"playout":y,E=e.offering,b=void 0===E?"default":E,B=e.playoutType,m=e.drms,w=void 0===m?[]:m,v=e.context,Q=e.hlsjsProfile,_=void 0===Q||Q,D=e.authorizationToken,S=e.options,M=void 0===S?{}:S,!r){t.next=8;break}if(k=r.match(/(hq__[^/]+)\/rep\/([^/]+)\/([^/]+)\/options.json/),i=k[1],C=k[2],b=k[3],i&&C&&b){t.next=8;break}throw Error("Invalid offering URI: ".concat(r));case 8:if(i?g(i):d(n),I=I.map((function(t){return t.toLowerCase()})),w=w.map((function(t){return t.toLowerCase()})),n){t.next=15;break}n=this.utils.DecodeVersionHash(i).objectId,t.next=19;break;case 15:if(i){t.next=19;break}return t.next=18,this.LatestVersionHash({objectId:n});case 18:i=t.sent;case 19:return t.next=21,this.ContentObjectLibraryId({objectId:n});case 21:if(x=t.sent,t.prev=22,f){t.next=29;break}return R=u("public","asset_metadata","sources",b),t.next=27,this.ContentObjectMetadata({libraryId:x,objectId:n,versionHash:i,metadataSubtree:R,authorizationToken:D});case 27:t.sent&&(f=R);case 29:t.next=33;break;case 31:t.prev=31,t.t0=t.catch(22);case 33:return t.next=35,this.PlayoutPathResolution({libraryId:x,objectId:n,versionHash:i,writeToken:s,linkPath:f,signedLink:l,handler:C,offering:b,authorizationToken:D});case 35:if(N=t.sent,F=N.path,U=N.linkTarget,t.t1=this.authClient,t.t2=U.objectId||n,t.t3=U.versionHash||i,t.t3){t.next=45;break}return t.next=44,this.LatestVersionHash({objectId:n});case 44:t.t3=t.sent;case 45:return t.t4=t.t3,t.t5=I,t.t6=w,t.t7=v,t.t8={objectId:t.t2,versionHash:t.t4,protocols:t.t5,drms:t.t6,context:t.t7},H=t.t1.AudienceData.call(t.t1,t.t8),t.t9=D,t.next=54,this.authClient.AuthorizationToken({libraryId:x,objectId:n,channelAuth:!0,oauthToken:this.oauthToken,audienceData:H});case 54:return t.t10=t.sent,L=[t.t9,t.t10].flat().filter((function(t){return t})),O=c({authorization:L,resolve:!!f},M),t.t11=Object,t.next=60,this.utils.ResponseToJson(this.HttpClient.Request({path:F,method:"GET",queryParams:O}));case 60:if(t.t12=t.sent,T=t.t11.values.call(t.t11,t.t12),l||!U.versionHash){t.next=68;break}return t.t13=D,t.next=66,this.authClient.AuthorizationToken({libraryId:U.libraryId,objectId:U.objectId,channelAuth:!0,oauthToken:this.oauthToken,audienceData:H});case 66:t.t14=t.sent,O.authorization=[t.t13,t.t14].flat().filter((function(t){return t}));case 68:G={},Y=0;case 70:if(!(Y<T.length)){t.next=116;break}if(K=T[Y],q=K.properties.protocol,J=K.properties.drm,P=P||K.sid,j=j||!!K.properties.multiview,P&&(O.sid=P),z=K.uri.split("?")[0],B&&(z=z.replace("playlist","playlist-".concat(B))),Z=K.properties.license_servers,V=K.properties.cert,_&&"hls"===q&&"aes-128"===J&&(O.player_profile="hls-js"),t.t15=c,t.t16=c({},G[q]||{}),t.t17={},t.t18=c,t.t19=c({},(G[q]||{}).playoutMethods||{}),t.t20={},t.t21=o,t.t22={},t.t23=J||"clear",!l){t.next=97;break}return t.next=94,this.LinkUrl({versionHash:i,linkPath:u(f,b,z),queryParams:O,noAuth:!0});case 94:t.t24=t.sent,t.next=100;break;case 97:return t.next=99,this.Rep({libraryId:U.libraryId||x,objectId:U.objectId||n,versionHash:U.versionHash||i,rep:u(C,b,z),noAuth:!0,queryParams:O});case 99:t.t24=t.sent;case 100:for(W in t.t25=t.t24,t.t26=J?o({},J,{licenseServers:Z,cert:V}):void 0,t.t27={playoutUrl:t.t25,drms:t.t26},t.t28=(0,t.t21)(t.t22,t.t23,t.t27),t.t29=(0,t.t18)(t.t19,t.t20,t.t28),t.t30={playoutMethods:t.t29},G[q]=(0,t.t15)(t.t16,t.t17,t.t30),G[q].playoutMethods)G[q].playoutMethods[W].drms&&G[q].playoutMethods[W].drms[J]&&G[q].playoutMethods[W].drms[J].cert&&((X=new URL(G[q].playoutMethods[W].playoutUrl)).pathname=X.pathname.split("/").slice(0,-1).concat(["drm.cert"]).join("/"),G[q].playoutMethods[W].drms[J].cert_url=X.toString());if($=I.includes(q),tt=w.includes(J||"clear")||0===w.length&&!J,$&&tt){t.next=112;break}return t.abrupt("continue",113);case 112:(!G[q].playoutUrl||J&&"clear"!==J)&&(G[q].playoutUrl=G[q].playoutMethods[J||"clear"].playoutUrl,G[q].drms=G[q].playoutMethods[J||"clear"].drms);case 113:Y++,t.next=70;break;case 116:return j&&P&&(G.sessionId=P,G.multiview=!0,G.AvailableViews=a(A.mark((function t(){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=et.utils,t.next=3,et.HttpClient.Request({path:u("q",U.versionHash||i,"rep",C,b,"views.json"),method:"GET",queryParams:{sid:P,authorization:L}});case 3:return t.t1=t.sent,t.next=6,t.t0.ResponseToFormat.call(t.t0,"json",t.t1);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)}))),G.SwitchView=function(){var t=a(A.mark((function t(e){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,et.HttpClient.Request({path:u("q",U.versionHash||i,"rep",C,b,"select_view"),method:"POST",queryParams:{sid:P,authorization:L},body:{view:e}});case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.Log(G),t.abrupt("return",G);case 119:case"end":return t.stop()}}),t,this,[[22,31]])})));return function(e){return t.apply(this,arguments)}}(),e.BitmovinPlayoutOptions=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,f,h,l,p,I,y,C,E,b,B,m,w,v,Q,_,D;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,n=e.versionHash,i=e.writeToken,o=e.linkPath,a=e.signedLink,s=void 0!==a&&a,c=e.protocols,u=void 0===c?["dash","hls"]:c,f=e.drms,h=void 0===f?[]:f,l=e.handler,p=void 0===l?"playout":l,I=e.offering,y=void 0===I?"default":I,C=e.playoutType,E=e.context,b=e.authorizationToken,B=e.options,m=void 0===B?{}:B,n?g(n):d(r),r||(r=this.utils.DecodeVersionHash(n).objectId),t.next=5,this.PlayoutOptions({objectId:r,versionHash:n,writeToken:i,linkPath:o,signedLink:s,protocols:u,drms:h,handler:p,offering:y,playoutType:C,hlsjsProfile:!1,context:E,authorizationToken:b,options:m});case 5:return delete(w=t.sent).playoutMethods,t.next=9,this.PlayoutPathResolution({objectId:r,versionHash:n,writeToken:i,linkPath:o,signedLink:s,handler:p,offering:y,authorizationToken:b});case 9:if(v=t.sent,Q=v.linkTarget,_=[],b&&_.push(b),!s&&Q.versionHash){t.next=21;break}return t.t0=_,t.next=17,this.authClient.AuthorizationToken({objectId:r,channelAuth:!0,oauthToken:this.oauthToken});case 17:t.t1=t.sent,t.t0.push.call(t.t0,t.t1),t.next=26;break;case 21:return t.t2=_,t.next=24,this.authClient.AuthorizationToken({libraryId:Q.libraryId,objectId:Q.objectId,channelAuth:!0,oauthToken:this.oauthToken});case 24:t.t3=t.sent,t.t2.push.call(t.t2,t.t3);case 26:return D={drm:{}},Object.keys(w).forEach((function(t){var e=w[t];D[t]=e.playoutUrl,e.drms&&Object.keys(e.drms).forEach((function(t){if(e.drms[t].licenseServers&&0!==e.drms[t].licenseServers.length){var r=function(t){return t.toLowerCase().startsWith("https")},n=e.drms[t].licenseServers;n.find(r)&&(n=n.filter(r));var i=n.sort((function(){return.5-Math.random()}))[0];D.drm[t]||(D.drm[t]={LA_URL:i,headers:{Authorization:"Bearer ".concat(_.flat().filter((function(t){return t})).join(","))}})}}))})),t.abrupt("return",D);case 29:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CallBitcodeMethod=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,f,h,l,d,g,p,I,C,E;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.method,s=e.queryParams,c=void 0===s?{}:s,f=e.body,h=void 0===f?{}:f,l=e.headers,d=void 0===l?{}:l,g=e.constant,p=void 0===g||g,I=e.format,C=void 0===I?"json":I,y({libraryId:r,objectId:n,versionHash:i}),a){t.next=4;break}throw"Bitcode method not specified";case 4:if(i&&(n=this.utils.DecodeVersionHash(i).objectId),E=u("q",o||i||n,"call",a),r&&(E=u("qlibs",r,E)),d.authorization||d.Authorization){t.next=12;break}return t.next=11,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!p});case 11:d.Authorization=t.sent.Authorization;case 12:return this.Log("Calling bitcode method: ".concat(r||""," ").concat(n||i," ").concat(o||"","\n ").concat(p?"GET":"POST"," ").concat(E,"\n Query Params:\n ").concat(JSON.stringify(c||""),"\n Body:\n ").concat(JSON.stringify(h||""),"\n Headers\n ").concat(JSON.stringify(d||""))),t.t0=this.utils,t.t1=C,t.next=17,this.HttpClient.Request({body:h,headers:d,method:p?"GET":"POST",path:E,queryParams:c,failover:!1});case 17:return t.t2=t.sent,t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t2));case 19:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Rep=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,f,h,l,d;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.rep,a=e.queryParams,s=void 0===a?{}:a,c=e.channelAuth,u=void 0!==c&&c,f=e.noAuth,h=void 0!==f&&f,l=e.noCache,d=void 0!==l&&l,y({libraryId:r,objectId:n,versionHash:i}),o){t.next=4;break}throw"Rep not specified";case 4:return t.abrupt("return",this.FabricUrl({libraryId:r,objectId:n,versionHash:i,rep:o,queryParams:s,channelAuth:u,noAuth:h,noCache:d}));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.PublicRep=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.rep,a=e.queryParams,s=void 0===a?{}:a,y({libraryId:r,objectId:n,versionHash:i}),o){t.next=4;break}throw"Rep not specified";case 4:return t.abrupt("return",this.FabricUrl({libraryId:r,objectId:n,versionHash:i,publicRep:o,queryParams:s,noAuth:!0}));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FabricUrl=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,f,h,l,d,g,p,I,C,E,b,B,m;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.partHash,s=e.rep,f=e.publicRep,h=e.call,l=e.queryParams,d=void 0===l?{}:l,g=e.channelAuth,p=void 0!==g&&g,I=e.noAuth,C=void 0!==I&&I,E=e.noCache,b=void 0!==E&&E,(n||i)&&y({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),this.Log("Building Fabric URL:\n libraryId: ".concat(r,"\n objectId: ").concat(n,"\n versionHash: ").concat(i,"\n writeToken: ").concat(o,"\n partHash: ").concat(a,"\n rep: ").concat(s,"\n publicRep: ").concat(f,"\n call: ").concat(h,"\n channelAuth: ").concat(p,"\n noAuth: ").concat(C,"\n noCache: ").concat(b,"\n queryParams: ").concat(JSON.stringify(d||{},null,2))),B=[],d.authorization&&B.push(d.authorization),C&&d.authorization){t.next=12;break}return t.t0=B,t.next=10,this.authClient.AuthorizationToken({libraryId:r,objectId:n,versionHash:i,channelAuth:p,noAuth:C,noCache:b});case 10:t.t1=t.sent,t.t0.push.call(t.t0,t.t1);case 12:if(d=c(c({},d),{},{authorization:B.flat()}),!s&&!f||!n||i){t.next=17;break}return t.next=16,this.LatestVersionHash({objectId:n});case 16:i=t.sent;case 17:return m="",r?(m=u(m,"qlibs",r),(n||i)&&(m=u(m,"q",o||i||n))):i&&(m=u("q",i)),a?m=u(m,"data",a):s?m=u(m,"rep",s):f?m=u(m,"public",f):h&&(m=u(m,"call",h)),t.abrupt("return",this.HttpClient.URL({path:m,queryParams:d}));case 21:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FileUrl=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,f,h,l,d,g,p;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.filePath,s=e.queryParams,f=void 0===s?{}:s,h=e.noCache,l=void 0!==h&&h,y({libraryId:r,objectId:n,versionHash:i}),a){t.next=4;break}throw"File path not specified";case 4:return i&&(n=this.utils.DecodeVersionHash(i).objectId),d=r?u("qlibs",r,"q",o||i||n):u("q",i),t.next=8,this.authClient.AuthorizationToken({libraryId:r,objectId:n,noCache:l});case 8:return g=t.sent,f=c(c({},f),{},{authorization:g}),t.next=12,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:o,metadataSubtree:u("files",a)});case 12:return p=t.sent,p&&p["."].encryption&&"cgck"===p["."].encryption.scheme?(d=u(d,"rep","files_download",a),f["header-x_decryption_mode"]="decrypt"):d=u(d,"files",a),t.abrupt("return",this.HttpClient.URL({path:d,queryParams:f}));case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectImageUrl=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.height,a=e.imagePath,s=void 0===a?"public/display_image":a,y({libraryId:r,objectId:n,versionHash:i}),i){t.next=6;break}return t.next=5,this.LatestVersionHash({objectId:n});case 5:i=t.sent;case 6:if(this.Log("Retrieving content object image url: ".concat(r," ").concat(n," ").concat(i)),this.objectImageUrls[i]){t.next=26;break}return t.prev=8,t.next=11,this.ContentObjectMetadata({versionHash:i,metadataSubtree:s});case 11:if(t.sent){t.next=15;break}return this.Log("No image url set: ".concat(r," ").concat(n," ").concat(i)),t.abrupt("return");case 15:t.next=21;break;case 17:t.prev=17,t.t0=t.catch(8),this.Log("Unable to query for image metadata: ".concat(r," ").concat(n," ").concat(i),!0),this.Log(t.t0,!0);case 21:return c={},o&&!isNaN(parseInt(o))&&(c.height=parseInt(o)),t.next=25,this.LinkUrl({versionHash:i,linkPath:s,queryParams:c});case 25:this.objectImageUrls[i]=t.sent;case 26:return t.abrupt("return",this.objectImageUrls[i]);case 27:case"end":return t.stop()}}),t,this,[[8,17]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectGraph=function(){var t=a(A.mark((function t(e){var r,n,i,o,s,c,f,h,l,d,g=this;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.autoUpdate,s=void 0!==o&&o,c=e.select,y({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving content object graph: ".concat(r||""," ").concat(n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),f=u("q",i||n,"links"),t.prev=5,t.t0=this.utils,t.t1=this.HttpClient,t.next=10,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 10:return t.t2=t.sent,t.t3={auto_update:s,select:c},t.t4=f,t.t5={headers:t.t2,queryParams:t.t3,method:"GET",path:t.t4},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=17,t.t0.ResponseToJson.call(t.t0,t.t6);case 17:return t.abrupt("return",t.sent);case 20:if(t.prev=20,t.t7=t.catch(5),t.prev=22,(l=t.t7.body.errors[0].cause.cause.cause.cycle)&&0!==l.length){t.next=26;break}throw t.t7;case 26:return d={},t.next=29,Promise.all(l.map(function(){var t=a(A.mark((function t(e){var r,n;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!d[e]){t.next=2;break}return t.abrupt("return");case 2:return r=g.utils.DecodeVersionHash(e).objectId,t.next=5,g.ContentObjectMetadata({versionHash:e,metadataSubtree:"public/asset_metadata/display_title"});case 5:if(t.t2=t.sent,t.t2){t.next=10;break}return t.next=9,g.ContentObjectMetadata({versionHash:e,metadataSubtree:"public/name"});case 9:t.t2=t.sent;case 10:if(t.t1=t.t2,t.t1){t.next=15;break}return t.next=14,g.ContentObjectMetadata({versionHash:e,metadataSubtree:"name"});case 14:t.t1=t.sent;case 15:if(t.t0=t.t1,t.t0){t.next=18;break}t.t0=r;case 18:n=t.t0,d[e]={name:n,objectId:r};case 20:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 29:h=l.map((function(t){return"".concat(d[t].name," (").concat(d[t].objectId,")")})),t.next=35;break;case 32:throw t.prev=32,t.t8=t.catch(22),t.t7;case 35:throw new Error("Cycle found in links: ".concat(h.join(" -> ")));case 36:case"end":return t.stop()}}),t,this,[[5,20],[22,32]])})));return function(e){return t.apply(this,arguments)}}(),e.LinkTarget=function(){var t=a(A.mark((function t(e){var r,n,o,a,s,c,u,f,h;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,o=e.versionHash,a=e.writeToken,s=e.linkPath,c=e.authorizationToken,u=e.linkInfo,y({libraryId:r,objectId:n,versionHash:o}),a&&I(a),o&&(n=this.utils.DecodeVersionHash(o).objectId),!a||r){t.next=8;break}return t.next=7,this.ContentObjectLibraryId({objectId:n});case 7:r=t.sent;case 8:if(u){t.next=12;break}return t.next=11,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:o,writeToken:a,metadataSubtree:s,resolveLinks:!1,resolveIgnoreErrors:!0,resolveIncludeSource:!0,authorizationToken:c});case 11:u=t.sent;case 12:if(!u||!u["/"]){t.next=27;break}if((f=((u["/"]||"").match(/^\/?qfab\/([\w]+)\/?.+/)||[])[1])||(f=u["."].container),!f){t.next=19;break}return t.abrupt("return",f);case 19:if(!o){t.next=21;break}return t.abrupt("return",o);case 21:if(t.t0=o,t.t0){t.next=26;break}return t.next=25,this.LatestVersionHash({objectId:n});case 25:t.t0=t.sent;case 26:return t.abrupt("return",t.t0);case 27:return t.next=29,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:o,writeToken:a,metadataSubtree:s,resolveIncludeSource:!0,authorizationToken:c});case 29:if((u=t.sent)&&u["."]){t.next=49;break}if("object"!==i(u)){t.next=38;break}if(t.t1=o,t.t1){t.next=37;break}return t.next=36,this.LatestVersionHash({objectId:n});case 36:t.t1=t.sent;case 37:return t.abrupt("return",t.t1);case 38:if(h=s.split("/").slice(0,-1).join("/")){t.next=46;break}if(t.t2=o,t.t2){t.next=45;break}return t.next=44,this.LatestVersionHash({objectId:n});case 44:t.t2=t.sent;case 45:return t.abrupt("return",t.t2);case 46:return t.next=48,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:o,writeToken:a,metadataSubtree:h,resolveIncludeSource:!0,authorizationToken:c});case 48:u=t.sent;case 49:return t.abrupt("return",u["."].source);case 50:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LinkUrl=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,f,h,l,d,g,p,C,E,b;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.linkPath,s=e.mimeType,f=e.authorizationToken,h=e.queryParams,l=void 0===h?{}:h,d=e.channelAuth,g=void 0!==d&&d,p=e.noAuth,C=void 0!==p&&p,y({libraryId:r,objectId:n,versionHash:i}),o&&I(o),a){t.next=5;break}throw Error("Link path not specified");case 5:return i&&(n=this.utils.DecodeVersionHash(i).objectId),E=r?u("qlibs",r,"q",o||i||n,"meta",a):u("q",i,"meta",a),b=[f],t.t0=b,t.next=11,this.MetadataAuth({libraryId:r,objectId:n,versionHash:i,path:a,channelAuth:g,noAuth:C});case 11:return t.t1=t.sent,t.t0.push.call(t.t0,t.t1),l.authorization&&b.push(l.authorization),l=c(c({},l),{},{authorization:b.flat().filter((function(t){return t})),resolve:!0}),s&&(l["header-accept"]=s),t.abrupt("return",this.HttpClient.URL({path:E,queryParams:l}));case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.LinkData=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,h,l,d;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.linkPath,s=e.queryParams,c=void 0===s?{}:s,u=e.format,h=void 0===u?"json":u,l=e.channelAuth,t.next=3,this.LinkUrl({libraryId:r,objectId:n,versionHash:i,writeToken:o,linkPath:a,queryParams:c,channelAuth:l});case 3:return d=t.sent,t.t0=this.utils,t.t1=h,t.next=8,f.Fetch(d);case 8:return t.t2=t.sent,t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t2));case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateEncryptionConk=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,f,h,l;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.createKMSConk,s=void 0===a||a,!this.signer.remoteSigner){t.next=3;break}return t.abrupt("return");case 3:if(y({libraryId:r,objectId:n,versionHash:i}),I(o),n||(n=client.DecodeVersionHash(i).objectId),r){t.next=10;break}return t.next=9,this.ContentObjectLibraryId({objectId:n});case 9:r=t.sent;case 10:return c="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=13,this.ContentObjectMetadata({libraryId:r,objectId:n,writeToken:o,metadataSubtree:c});case 13:if(!(u=t.sent)){t.next=20;break}return t.next=17,this.Crypto.DecryptCap(u,this.signer.signingKey.privateKey);case 17:this.encryptionConks[n]=t.sent,t.next=34;break;case 20:return t.next=22,this.Crypto.GeneratePrimaryConk({spaceId:this.contentSpaceId,objectId:n});case 22:return this.encryptionConks[n]=t.sent,t.t0=this,t.t1=r,t.t2=n,t.t3=o,t.t4=c,t.next=30,this.Crypto.EncryptConk(this.encryptionConks[n],this.signer.signingKey.publicKey);case 30:return t.t5=t.sent,t.t6={libraryId:t.t1,objectId:t.t2,writeToken:t.t3,metadataSubtree:t.t4,metadata:t.t5},t.next=34,t.t0.ReplaceMetadata.call(t.t0,t.t6);case 34:if(!s){t.next=64;break}return t.prev=35,t.next=38,this.authClient.KMSAddress({objectId:n});case 38:return f=t.sent,t.next=41,this.authClient.KMSInfo({objectId:n});case 41:return h=t.sent.publicKey,l="eluv.caps.ikms".concat(this.utils.AddressToHash(f)),t.next=45,this.ContentObjectMetadata({libraryId:r,objectId:n,writeToken:o,metadataSubtree:l});case 45:if(t.sent){t.next=58;break}return t.t7=this,t.t8=r,t.t9=n,t.t10=o,t.t11=l,t.next=54,this.Crypto.EncryptConk(this.encryptionConks[n],h);case 54:return t.t12=t.sent,t.t13={libraryId:t.t8,objectId:t.t9,writeToken:t.t10,metadataSubtree:t.t11,metadata:t.t12},t.next=58,t.t7.ReplaceMetadata.call(t.t7,t.t13);case 58:t.next=64;break;case 60:t.prev=60,t.t14=t.catch(35),console.error("Failed to create encryption cap for KMS:"),console.error(t.t14);case 64:return t.abrupt("return",this.encryptionConks[n]);case 65:case"end":return t.stop()}}),t,this,[[35,60]])})));return function(e){return t.apply(this,arguments)}}(),e.EncryptionConk=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,f,h,l;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.writeToken,a=e.download,s=void 0!==a&&a,y({libraryId:r,objectId:n,versionHash:i}),o&&I(o),n||(n=client.DecodeVersionHash(i).objectId),t.next=6,this.authClient.Owner({id:n});case 6:return c=t.sent,u="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=10,this.ContentObjectMetadata({libraryId:r,objectId:n,metadataSubtree:u});case 10:if(f=t.sent,this.utils.EqualAddress(c,this.signer.address)||f){t.next=21;break}if(!s){t.next=18;break}return t.next=15,this.authClient.ReEncryptionConk({libraryId:r,objectId:n,versionHash:i});case 15:return t.abrupt("return",t.sent);case 18:return t.next=20,this.authClient.EncryptionConk({libraryId:r,objectId:n,versionHash:i});case 20:return t.abrupt("return",t.sent);case 21:if(this.encryptionConks[n]){t.next=38;break}return h="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=25,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:o,metadataSubtree:h});case 25:if(!(l=t.sent)){t.next=32;break}return t.next=29,this.Crypto.DecryptCap(l,this.signer.signingKey.privateKey);case 29:this.encryptionConks[n]=t.sent,t.next=38;break;case 32:if(!o){t.next=37;break}return t.next=35,this.CreateEncryptionConk({libraryId:r,objectId:n,versionHash:i,writeToken:o,createKMSConk:!1});case 35:t.next=38;break;case 37:throw"No encryption conk present for "+n;case 38:return t.abrupt("return",this.encryptionConks[n]);case 39:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Encrypt=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,o=e.chunk,y({libraryId:r,objectId:n}),t.next=4,this.EncryptionConk({libraryId:r,objectId:n,writeToken:i});case 4:return a=t.sent,t.next=7,this.Crypto.Encrypt(a,o);case 7:return s=t.sent,t.abrupt("return",s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Decrypt=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,o=e.chunk,y({libraryId:r,objectId:n}),t.next=4,this.EncryptionConk({libraryId:r,objectId:n,writeToken:i,download:!0});case 4:return a=t.sent,t.next=7,this.Crypto.Decrypt(a,o);case 7:return s=t.sent,t.abrupt("return",s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessType=function(){var t=a(A.mark((function t(e){var r;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.id,t.next=3,this.authClient.AccessType(r);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessInfo=function(){var t=a(A.mark((function t(e){var r,n,i;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.objectId,n=e.args,d(r),n||(n=[0,[],[]]),this.Log("Retrieving access info: ".concat(r)),t.next=6,this.ethClient.CallContractMethod({contractAddress:this.utils.HashToAddress(r),methodName:"getAccessInfo",methodArgs:n});case 6:return i=t.sent,this.Log(i),t.abrupt("return",{visibilityCode:i[0],visible:i[0]>=1,accessible:i[0]>=10,editable:i[0]>=100,hasAccess:0===i[1],accessCode:i[1],accessCharge:this.utils.WeiToEther(i[2]).toString()});case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.AccessRequest=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s,c,u,f;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.args,a=void 0===o?[]:o,s=e.update,c=void 0!==s&&s,u=e.noCache,f=void 0!==u&&u,y({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),t.next=5,this.authClient.MakeAccessRequest({libraryId:r,objectId:n,versionHash:i,args:a,update:c,skipCache:!0,noCache:f});case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.SetAuthContext=function(t){var e=t.context;if(e&&Object.values(e).find((function(t){return"string"!=typeof t})))throw Error("Context must be a map of string->string");this.authContext=e},e.GenerateStateChannelToken=function(){var t=a(A.mark((function t(e){var r,n,i,o,a;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.versionHash,i=e.context,o=e.noCache,a=void 0!==o&&o,n?g(n):d(r),!n){t.next=6;break}r=this.utils.DecodeVersionHash(n).objectId,t.next=10;break;case 6:if(this.stateChannelAccess[r]){t.next=10;break}return t.next=9,this.LatestVersionHash({objectId:r});case 9:n=t.sent;case 10:return this.stateChannelAccess[r]=n,t.next=13,this.authClient.AuthorizationToken({objectId:r,channelAuth:!0,oauthToken:this.oauthToken,context:i,noCache:a});case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeStateChannelAccess=function(){var t=a(A.mark((function t(e){var r,n,i;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.versionHash,i=e.percentComplete,n?g(n):d(r),!n){t.next=6;break}r=this.utils.DecodeVersionHash(n).objectId,t.next=13;break;case 6:if(!this.stateChannelAccess[r]){t.next=10;break}n=this.stateChannelAccess[r],t.next=13;break;case 10:return t.next=12,this.LatestVersionHash({objectId:r});case 12:n=t.sent;case 13:return this.stateChannelAccess[r]=void 0,t.next=16,this.authClient.ChannelContentFinalize({objectId:r,versionHash:n,percent:i});case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentObjectAccessComplete=function(){var t=a(A.mark((function t(e){var r,n,i;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.objectId,n=e.score,i=void 0===n?100:n,d(r),!(i<0||i>100)){t.next=4;break}throw Error("Invalid AccessComplete score: "+i);case 4:return t.next=6,this.authClient.AccessComplete({id:r,score:i});case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Collection=function(){var t=a(A.mark((function t(e){var r;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.collectionType,["accessGroups","contentObjects","contentTypes","contracts","libraries"].includes(r)){t.next=4;break}throw new Error("Invalid collection type: "+r);case 4:if(!this.signer){t.next=10;break}return t.next=7,this.userProfileClient.WalletAddress();case 7:t.t0=t.sent,t.next=11;break;case 10:t.t0=void 0;case 11:if(t.t0){t.next=14;break}throw new Error("Unable to get collection: User wallet doesn't exist");case 14:return this.Log("Retrieving ".concat(r," contract collection for user ").concat(this.signer.address)),t.next=17,this.ethClient.MakeProviderCall({methodName:"send",args:["elv_getWalletCollection",[this.contentSpaceId,"iusr".concat(this.utils.AddressToHash(this.signer.address)),r]]});case 17:if(t.t1=t.sent,t.t1){t.next=20;break}t.t1=[];case 20:return t.abrupt("return",t.t1);case 21:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.VerifyContentObject=function(){var t=a(A.mark((function t(e){var r,n,i;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,y({libraryId:r,objectId:n,versionHash:i}),t.next=4,ContentObjectVerification.VerifyContentObject({client:this,libraryId:r,objectId:n,versionHash:i});case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Proofs=function(){var t=a(A.mark((function t(e){var r,n,i,o,a;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,o=e.partHash,y({libraryId:r,objectId:n,versionHash:i}),p(o),i&&(n=this.utils.DecodeVersionHash(i).objectId),a=u("q",i||n,"data",o,"proofs"),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 9:return t.t2=t.sent,t.t3=a,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.QParts=function(){var t=a(A.mark((function t(e){var r,n,i,o,a,s;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.partHash,o=e.format,a=void 0===o?"blob":o,y({libraryId:r,objectId:n,versionHash:versionHash}),p(i),s=u("qparts",i),t.t0=this.utils,t.t1=a,t.t2=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,partHash:i});case 9:return t.t3=t.sent,t.t4=s,t.t5={headers:t.t3,method:"GET",path:t.t4},t.t6=t.t2.Request.call(t.t2,t.t5),t.abrupt("return",t.t0.ResponseToFormat.call(t.t0,t.t1,t.t6));case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},function(t,e,r){var n=r(14),i=r(15),o=r(41),A=r(42),a=r(76),s="undefined"!=typeof fetch?fetch:r(83).default,c=r(84).LogMessage,u=function(){"use strict";function t(e){var r=e.uris,n=e.debug;o(this,t),this.uris=r,this.uriIndex=0,this.debug=n,this.draftURIs={}}var e;return A(t,[{key:"Log",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c(this,t,e)}},{key:"BaseURI",value:function(){return new a(this.uris[this.uriIndex])}},{key:"RecordWriteToken",value:function(t){this.draftURIs[t]=this.BaseURI()}},{key:"RequestHeaders",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.Accept||(e.Accept="application/json"),"JSON"===t?e["Content-type"]="application/json":"BINARY"===t&&(e["Content-type"]="application/octet-stream"),e}},{key:"Request",value:(e=i(n.mark((function e(r){var i,o,A,a,s,c,u,f,h,l,d,g,p,I,y,C,E,b,B,m,w,v,Q,_;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.method,o=r.path,A=r.queryParams,a=void 0===A?{}:A,s=r.body,c=r.bodyType,u=void 0===c?"JSON":c,f=r.headers,h=void 0===f?{}:f,l=r.attempts,d=void 0===l?0:l,g=r.failover,p=void 0===g||g,I=r.forceFailover,y=void 0!==I&&I,C=this.BaseURI(),E=o.replace(/^\//,"").match(/(qlibs\/ilib[a-zA-Z0-9]+|q|qid)\/(tqw_[a-zA-Z0-9]+)/),(b=E?E[2]:void 0)&&(this.draftURIs[b]?C=this.draftURIs[b]:this.draftURIs[b]=C),B=C.path(o).query(a).hash(""),m={method:i,headers:this.RequestHeaders(u,h)},"POST"!==i&&"PUT"!==i&&"DELETE"!==i||(s&&"JSON"===u?m.body=JSON.stringify(s):s&&(m.body=s)),e.prev=8,e.next=11,t.Fetch(B.toString(),m);case 11:w=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),w={ok:!1,status:500,statusText:"ElvClient Error: "+e.t0.message,url:B.toString(),stack:e.t0.stack};case 17:if(w.ok){e.next=40;break}if(!(!b&&(p&&parseInt(w.status)>=500||y)&&d<this.uris.length)){e.next=24;break}return this.Log("HttpClient failing over from ".concat(this.BaseURI(),": ").concat(d+1," attempts"),!0),this.uriIndex=(this.uriIndex+1)%this.uris.length,e.next=23,this.Request({method:i,path:o,queryParams:a,body:s,bodyType:u,headers:h,attempts:d+1,forceFailover:y});case 23:return e.abrupt("return",e.sent);case 24:if(v=w.headers&&w.headers.get("content-type")||"",Q="",!w.text||!w.json){e.next=37;break}if(!v.includes("application/json")){e.next=33;break}return e.next=30,w.json();case 30:e.t1=e.sent,e.next=36;break;case 33:return e.next=35,w.text();case 35:e.t1=e.sent;case 36:Q=e.t1;case 37:throw _={name:"ElvHttpClientError",status:w.status,statusText:w.statusText,message:w.statusText,url:B.toString(),body:Q,requestParams:m},this.Log(JSON.stringify(_,null,2),!0),_;case 40:return this.Log("".concat(w.status," - ").concat(i," ").concat(B.toString())),e.abrupt("return",w);case 42:case"end":return e.stop()}}),e,this,[[8,14]])}))),function(t){return e.apply(this,arguments)})},{key:"URL",value:function(t){var e=t.path,r=t.queryParams,n=void 0===r?{}:r;return this.BaseURI().path(e).query(n).hash("").toString()}}],[{key:"Fetch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(t,e)}}]),t}();t.exports=u},function(t,e,r){var n=r(175),i=r(232)((function(t,e,r,i){n(t,e,r,i)}));t.exports=i},function(t,e,r){var n=r(176),i=r(89),o=r(207),A=r(209),a=r(11),s=r(99),c=r(98);t.exports=function t(e,r,u,f,h){e!==r&&o(r,(function(o,s){if(h||(h=new n),a(o))A(e,r,s,u,t,f,h);else{var l=f?f(c(e,s),o,s+"",e,r,h):void 0;void 0===l&&(l=o),i(e,s,l)}}),s)}},function(t,e,r){var n=r(30),i=r(182),o=r(183),A=r(184),a=r(185),s=r(186);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=A,c.prototype.has=a,c.prototype.set=s,t.exports=c},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(31),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(31);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(31);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(31);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(30);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(30),i=r(86),o=r(194);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var A=r.__data__;if(!i||A.length<199)return A.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(A)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(45),i=r(190),o=r(11),A=r(192),a=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,u=s.toString,f=c.hasOwnProperty,h=RegExp("^"+u.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?h:a).test(A(t))}},function(t,e,r){var n=r(87),i=Object.prototype,o=i.hasOwnProperty,A=i.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=A.call(t);return n&&(e?t[a]=r:delete t[a]),i}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n,i=r(191),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},function(t,e,r){var n=r(16)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(195),i=r(202),o=r(204),A=r(205),a=r(206);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=A,s.prototype.set=a,t.exports=s},function(t,e,r){var n=r(196),i=r(30),o=r(86);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(197),i=r(198),o=r(199),A=r(200),a=r(201);function s(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=A,s.prototype.set=a,t.exports=s},function(t,e,r){var n=r(34);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(34),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(34),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},function(t,e,r){var n=r(34);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,r){var n=r(35);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t){var e=r(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(35);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(35);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(35);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(208)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),A=n(e),a=A.length;a--;){var s=A[t?a:++i];if(!1===r(o[s],s,o))break}return e}}},function(t,e,r){var n=r(89),i=r(210),o=r(211),A=r(214),a=r(215),s=r(93),c=r(94),u=r(219),f=r(96),h=r(45),l=r(11),d=r(221),g=r(97),p=r(98),I=r(225);t.exports=function(t,e,r,y,C,E,b){var B=p(t,r),m=p(e,r),w=b.get(m);if(w)n(t,r,w);else{var v=E?E(B,m,r+"",t,e,b):void 0,Q=void 0===v;if(Q){var _=c(m),D=!_&&f(m),S=!_&&!D&&g(m);v=m,_||D||S?c(B)?v=B:u(B)?v=A(B):D?(Q=!1,v=i(m,!0)):S?(Q=!1,v=o(m,!0)):v=[]:d(m)||s(m)?(v=B,s(B)?v=I(B):l(B)&&!h(B)||(v=a(m))):Q=!1}Q&&(b.set(m,v),C(v,m,y,E,b),b.delete(m)),n(t,r,v)}}},function(t,e,r){(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(16),o="object"==n(e)&&e&&!e.nodeType&&e,A=o&&"object"==n(t)&&t&&!t.nodeType&&t,a=A&&A.exports===o?i.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=s?s(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(8)(t))},function(t,e,r){var n=r(212);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(213);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){var n=r(16).Uint8Array;t.exports=n},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(216),i=r(91),o=r(92);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},function(t,e,r){var n=r(11),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(33),i=r(21);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},function(t,e,r){var n=r(47),i=r(21);t.exports=function(t){return i(t)&&n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(33),i=r(91),o=r(21),A=Function.prototype,a=Object.prototype,s=A.toString,c=a.hasOwnProperty,u=s.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==u}},function(t,e,r){var n=r(33),i=r(95),o=r(21),A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Arguments]"]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object Boolean]"]=A["[object DataView]"]=A["[object Date]"]=A["[object Error]"]=A["[object Function]"]=A["[object Map]"]=A["[object Number]"]=A["[object Object]"]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!A[n(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(88),o="object"==n(e)&&e&&!e.nodeType&&e,A=o&&"object"==n(t)&&t&&!t.nodeType&&t,a=A&&A.exports===o&&i.process,s=function(){try{var t=A&&A.require&&A.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,r(8)(t))},function(t,e,r){var n=r(226),i=r(99);t.exports=function(t){return n(t,i(t))}},function(t,e,r){var n=r(227),i=r(46);t.exports=function(t,e,r,o){var A=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var c=e[a],u=o?o(r[c],t[c],c,r,t):void 0;void 0===u&&(u=t[c]),A?i(r,c,u):n(r,c,u)}return r}},function(t,e,r){var n=r(46),i=r(32),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var A=t[e];o.call(t,e)&&i(A,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(229),i=r(93),o=r(94),A=r(96),a=r(100),s=r(97),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),u=!r&&i(t),f=!r&&!u&&A(t),h=!r&&!u&&!f&&s(t),l=r||u||f||h,d=l?n(t.length,String):[],g=d.length;for(var p in t)!e&&!c.call(t,p)||l&&("length"==p||f&&("offset"==p||"parent"==p)||h&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||a(p,g))||d.push(p);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(11),i=r(92),o=r(231),A=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var a in t)("constructor"!=a||!e&&A.call(t,a))&&r.push(a);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){var n=r(233),i=r(240);t.exports=function(t){return n((function(e,r){var n=-1,o=r.length,A=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(A=t.length>3&&"function"==typeof A?(o--,A):void 0,a&&i(r[0],r[1],a)&&(A=o<3?void 0:A,o=1),e=Object(e);++n<o;){var s=r[n];s&&t(e,s,n,A)}return e}))}},function(t,e,r){var n=r(101),i=r(234),o=r(236);t.exports=function(t,e){return o(i(t,e,n),t+"")}},function(t,e,r){var n=r(235),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,A=-1,a=i(o.length-e,0),s=Array(a);++A<a;)s[A]=o[e+A];A=-1;for(var c=Array(e+1);++A<e;)c[A]=o[A];return c[e]=r(s),n(t,this,c)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(237),i=r(239)(n);t.exports=i},function(t,e,r){var n=r(238),i=r(90),o=r(101),A=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=A},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=Date.now;t.exports=function(t){var e=0,n=0;return function(){var i=r(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(32),o=r(47),A=r(100),a=r(11);t.exports=function(t,e,r){if(!a(r))return!1;var s=n(e);return!!("number"==s?o(r)&&A(e,r.length):"string"==s&&e in r)&&i(r[e],t)}},function(t,e,r){(function(e,n){var i=r(14),o=r(15);void 0===e&&(e=r(3).Buffer);var A,a=r(75),s=r(102),c=r(29);if("undefined"==typeof crypto){var u=r(252);u.getRandomValues=function(t){return u.randomBytes(t.length)},n.crypto=u}switch(c.Platform()){case c.PLATFORM_REACT_NATIVE:case c.PLATFORM_WEB:A=r(153).default;break;default:A=r(!function(){var t=new Error("Cannot find module '@eluvio/crypto/dist/elv-crypto.bundle.node'");throw t.code="MODULE_NOT_FOUND",t}()).default}var f,h,l,d,g,p={ElvCrypto:(g=o(i.mark((function t(){return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,p.elvCrypto){t.next=5;break}return t.next=4,(new A).init();case 4:p.elvCrypto=t.sent;case 5:return t.abrupt("return",p.elvCrypto);case 8:t.prev=8,t.t0=t.catch(0),console.error("Error initializing ElvCrypto:"),console.error(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,8]])}))),function(){return g.apply(this,arguments)}),EncryptedSize:function(t){var e=Math.floor(t/1e6)*p.EncryptedBlockSize(1e6);return t%1e6!=0&&(e+=p.EncryptedBlockSize(t%1e6)),e},EncryptedBlockSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=129,n=608,i=48,o=12*(i-1),A=12*i,a=Math.floor(t/o)*A;return t%o!=0&&(a+=A),e?a+n:a+r},EncryptConk:function(t,r){return o(i.mark((function n(){var o,A,a,s,u,f;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,p.ElvCrypto();case 2:return o=n.sent,r=new Uint8Array(e.from(r.replace("0x",""),"hex")),t=new Uint8Array(e.from(JSON.stringify(t))),n.next=7,o.encryptECIES(t,r);case 7:return A=n.sent,a=A.data,s=A.ephemeralKey,u=A.tag,f=e.concat([e.from(s),e.from(u),e.from(a)]),n.abrupt("return",c.B64(f));case 13:case"end":return n.stop()}}),n)})))()},DecryptCap:function(t,r){return o(i.mark((function n(){var o,A,a,s,c;return i.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,p.ElvCrypto();case 2:return o=n.sent,r=new Uint8Array(e.from(r.replace("0x",""),"hex")),t=e.from(t,"base64"),A=t.slice(0,65),a=t.slice(65,81),s=t.slice(81),c=o.decryptECIES(new Uint8Array(s),r,new Uint8Array(A),new Uint8Array(a)),n.abrupt("return",JSON.parse(e.from(c).toString()));case 10:case"end":return n.stop()}}),n)})))()},GeneratePrimaryConk:function(t){return o(i.mark((function r(){var n,o,A,s,c,u,f;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.spaceId,o=t.objectId,r.next=3,p.ElvCrypto();case 3:return A=r.sent,s=A.generatePrimaryKeys(),c=s.secretKey,u=s.publicKey,f=A.generateSymmetricKey().key,r.abrupt("return",{symm_key:"kpsy".concat(a.encode(e.from(f))),secret_key:"kpsk".concat(a.encode(e.from(c))),public_key:"kppk".concat(a.encode(e.from(u))),sid:n,qid:o});case 7:case"end":return r.stop()}}),r)})))()},GenerateTargetConk:function(){return o(i.mark((function t(){var r,n,o,A;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.ElvCrypto();case 2:return r=t.sent,n=r.generateTargetKeys(),o=n.secretKey,A=n.publicKey,t.abrupt("return",{secret_key:"kpsk".concat(a.encode(e.from(o))),public_key:"ktpk".concat(a.encode(e.from(A)))});case 5:case"end":return t.stop()}}),t)})))()},CapToConk:function(t){var e=function(t){return new Uint8Array(a.decode(t.slice(4)))};return{symmetricKey:e(t.symm_key),secretKey:e(t.secret_key),publicKey:e(t.public_key)}},EncryptionContext:function(t){return o(i.mark((function e(){var r,n,o,A,a,s,c;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.ElvCrypto();case 2:return r=e.sent,n=p.CapToConk(t),o=n.symmetricKey,A=n.secretKey,(a=n.publicKey).length===r.PRIMARY_PK_KEY_SIZE?(c=r.CRYPTO_TYPE_PRIMARY,s=r.newPrimaryContext(a,A,o)):(c=r.CRYPTO_TYPE_TARGET,s=r.newTargetDecryptionContext(A,o)),e.abrupt("return",{context:s,type:c});case 6:case"end":return e.stop()}}),e)})))()},Encrypt:(d=o(i.mark((function t(r,n){var o,A,a,s,c;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.OpenEncryptionStream(r);case 2:if(o=t.sent,e.isBuffer(n)||n instanceof ArrayBuffer){t.next=9;break}return t.t0=e,t.next=7,new Response(n).arrayBuffer();case 7:t.t1=t.sent,n=t.t0.from.call(t.t0,t.t1);case 9:for(A=new Uint8Array(n),a=0;a<A.length;a+=1e6)s=Math.min(A.length,a+1e6),o.write(A.slice(a,s));return o.end(),c=[],t.next=15,new Promise((function(t,e){o.on("data",(function(t){c.push(t)})).on("finish",(function(){t()})).on("error",(function(t){e(t)}))}));case 15:return t.abrupt("return",e.concat(c));case 16:case"end":return t.stop()}}),t)}))),function(t,e){return d.apply(this,arguments)}),OpenEncryptionStream:(l=o(i.mark((function t(e){var r,n,o,A,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.ElvCrypto();case 2:return r=t.sent,t.next=5,p.EncryptionContext(e);case 5:return n=t.sent,o=n.context,A=new s.PassThrough,a=r.createCipher(o),t.abrupt("return",A.pipe(a).on("finish",(function(){o.free()})).on("error",(function(t){throw Error(t)})));case 10:case"end":return t.stop()}}),t)}))),function(t){return l.apply(this,arguments)}),Decrypt:(h=o(i.mark((function t(r,n){var o,A,a,s,c;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.OpenDecryptionStream(r);case 2:for(o=t.sent,A=new Uint8Array(n),a=0;a<A.length;a+=1e6)s=Math.min(A.length,a+1e6),o.write(A.slice(a,s));return o.end(),c=[],t.next=9,new Promise((function(t,e){o.on("data",(function(t){c.push(t)})).on("finish",(function(){t()})).on("error",(function(t){e(t)}))}));case 9:return t.abrupt("return",e.concat(c));case 10:case"end":return t.stop()}}),t)}))),function(t,e){return h.apply(this,arguments)}),OpenDecryptionStream:(f=o(i.mark((function t(e){var r,n,o,A,a,c;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,p.ElvCrypto();case 2:return r=t.sent,t.next=5,p.EncryptionContext(e);case 5:return n=t.sent,o=n.context,A=n.type,a=new s.PassThrough,c=r.createDecipher(A,o),t.abrupt("return",a.pipe(c).on("finish",(function(){o.free()})).on("error",(function(t){throw Error(t)})));case 11:case"end":return t.stop()}}),t)}))),function(t){return f.apply(this,arguments)})};t.exports=p}).call(this,r(3).Buffer,r(4))},function(t,e){},function(t,e,r){"use strict";var n=r(49).Buffer,i=r(244);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),A=this.head,a=0;A;)e=A.data,r=o,i=a,e.copy(r,i),a+=A.data.length,A=A.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(246),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(4))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,A,a,s=1,c={},u=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(){var t=l(arguments);return e.nextTick(d(g,t)),t}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){g(t.data)},n=function(){var t=l(arguments);return o.port2.postMessage(t),t}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(){var t=l(arguments),e=f.createElement("script");return e.onreadystatechange=function(){g(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e),t}):n=function(){var t=l(arguments);return setTimeout(d(g,t),0),t}:(A="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(A)&&g(+e.data.slice(A.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(){var e=l(arguments);return t.postMessage(A+e,"*"),e}),h.setImmediate=n,h.clearImmediate=p}function l(t){return c[s]=d.apply(void 0,t),s++}function d(t){var e=[].slice.call(arguments,1);return function(){"function"==typeof t?t.apply(void 0,e):new Function(""+t)()}}function g(t){if(u)setTimeout(d(g,t),0);else{var e=c[t];if(e){u=!0;try{e()}finally{p(t),u=!1}}}}function p(t){delete c[t]}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(4),r(5))},function(t,e,r){"use strict";t.exports=o;var n=r(107),i=Object.create(r(23));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(0),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(50)},function(t,e,r){t.exports=r(12)},function(t,e,r){t.exports=r(48).Transform},function(t,e,r){t.exports=r(48).PassThrough},function(t,e,r){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(13),e.createHash=e.Hash=r(17),e.createHmac=e.Hmac=r(56);var n=r(118),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var A=r(57);e.pbkdf2=A.pbkdf2,e.pbkdf2Sync=A.pbkdf2Sync;var a=r(124);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var s=r(132);e.DiffieHellmanGroup=s.DiffieHellmanGroup,e.createDiffieHellmanGroup=s.createDiffieHellmanGroup,e.getDiffieHellman=s.getDiffieHellman,e.createDiffieHellman=s.createDiffieHellman,e.DiffieHellman=s.DiffieHellman;var c=r(135);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=r(147);var u=r(148);e.publicEncrypt=u.publicEncrypt,e.privateEncrypt=u.privateEncrypt,e.publicDecrypt=u.publicDecrypt,e.privateDecrypt=u.privateDecrypt;var f=r(152);e.randomFill=f.randomFill,e.randomFillSync=f.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var A=r(3).Buffer,a=r(255).inspect,s=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return A.alloc(0);for(var e,r,n,i=A.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,A.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=A.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(53),A=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function l(t,e){return{value:t,done:e}}function d(t){var e=t[A];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[A]=null,t[a]=null,e(l(r,!1)))}}function g(t){e.nextTick(d,t)}var p=Object.getPrototypeOf((function(){})),I=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,r=this[s];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(l(void 0,!0));if(this[h].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[s]?n(t[s]):r(l(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(l(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(l(o,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(l(void 0,!0))}))}))})),n),p);t.exports=function(t){var e,r=Object.create(I,(i(e={},h,{value:t,writable:!0}),i(e,A,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[A]=null,r[a]=null,t(l(n,!1))):(r[A]=t,r[a]=e)},writable:!0}),e));return r[u]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[u]=null,r[A]=null,r[a]=null,e(t)),void(r[s]=t)}var n=r[A];null!==n&&(r[u]=null,r[A]=null,r[a]=null,n(l(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(5))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(114);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(0)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(18).codes,o=i.ERR_MISSING_ARGS,A=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function s(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(53)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var s=!1;return function(e){if(!a&&!s)return s=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new A("pipe"))}}function c(t){t()}function u(t,e){return t.pipe(e)}function f(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=f(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var A=e.map((function(t,r){var o=r<e.length-1;return s(t,o,r>0,(function(t){n||(n=t),t&&A.forEach(c),o||(A.forEach(c),i(n))}))}));return e.reduce(u)}},function(t,e,r){var n=r(0),i=r(20),o=r(1).Buffer,A=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function u(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,f=0;f<16;++f)r[f]=t.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var h=0;h<80;++h){var l=~~(h/20),d=0|((e=n)<<5|e>>>27)+u(l,i,o,a)+s+r[h]+A[l];s=a,a=o,o=c(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},function(t,e,r){var n=r(0),i=r(20),o=r(1).Buffer,A=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function u(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=(e=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|e>>>31;for(var l=0;l<80;++l){var d=~~(l/20),g=c(n)+f(d,i,o,a)+s+r[l]+A[d]|0;s=a,a=o,o=u(i),i=n,n=g}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},function(t,e,r){var n=r(0),i=r(115),o=r(20),A=r(1).Buffer,a=new Array(64);function s(){this.init(),this._w=a,o.call(this,64,56)}n(s,i),s.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},s.prototype._hash=function(){var t=A.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=s},function(t,e,r){var n=r(0),i=r(116),o=r(20),A=r(1).Buffer,a=new Array(160);function s(){this.init(),this._w=a,o.call(this,128,112)}n(s,i),s.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},s.prototype._hash=function(){var t=A.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=s},function(t,e,r){"use strict";var n=r(0),i=r(1).Buffer,o=r(10),A=i.alloc(128);function a(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>64?e=t(e):e.length<64&&(e=i.concat([e,A],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),a=0;a<64;a++)r[a]=54^e[a],n[a]=92^e[a];this._hash=[r]}n(a,o),a.prototype._update=function(t){this._hash.push(t)},a.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=a},function(t,e,r){(function(e){var n,i,o=r(1).Buffer,A=r(120),a=r(121),s=r(122),c=r(123),u=e.crypto&&e.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function l(){return i||(i=e.process&&e.process.nextTick?e.process.nextTick:e.queueMicrotask?e.queueMicrotask:e.setImmediate?e.setImmediate:e.setTimeout)}function d(t,e,r,n,i){return u.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return u.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,r,i,g,p,I){"function"==typeof p&&(I=p,p=void 0);var y=f[(p=p||"sha1").toLowerCase()];if(y&&"function"==typeof e.Promise){if(A(i,g),t=c(t,a,"Password"),r=c(r,a,"Salt"),"function"!=typeof I)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){l()((function(){e(null,t)}))}),(function(t){l()((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!u||!u.importKey||!u.deriveBits)return Promise.resolve(!1);if(void 0!==h[t])return h[t];var r=d(n=n||o.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return h[t]=r,r}(y).then((function(e){return e?d(t,r,i,g,y):s(t,r,i,g,p)})),I)}else l()((function(){var e;try{e=s(t,r,i,g,p)}catch(t){return I(t)}I(null,e)}))}}).call(this,r(4))},function(t,e,r){var n=r(10),i=r(267),o=r(0),A=r(1).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function s(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?"decrypt":"encrypt";var o=t.key;A.isBuffer(o)||(o=A.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=A.concat([o,o.slice(0,8)]));var s=t.iv;A.isBuffer(s)||(s=A.from(s)),this._des=i.create({key:o,iv:s,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=s,o(s,n),s.prototype._update=function(t){return A.from(this._des.update(t))},s.prototype._final=function(){return A.from(this._des.final())}},function(t,e,r){"use strict";e.utils=r(125),e.Cipher=r(58),e.DES=r(126),e.CBC=r(268),e.EDE=r(269)},function(t,e,r){"use strict";var n=r(6),i=r(0),o={};function A(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var A=r[n];e.prototype[A]=o[A]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new A(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,A=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)A[a]^=t[e+a];o._update.call(this,A,0,r,n);for(a=0;a<this.blockSize;a++)A[a]=r[n+a]}else{o._update.call(this,t,e,r,n);for(a=0;a<this.blockSize;a++)r[n+a]^=A[a];for(a=0;a<this.blockSize;a++)A[a]=t[e+a]}}},function(t,e,r){"use strict";var n=r(6),i=r(0),o=r(58),A=r(126);function a(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[A.create({type:"encrypt",key:r}),A.create({type:"decrypt",key:i}),A.create({type:"encrypt",key:o})]:[A.create({type:"decrypt",key:o}),A.create({type:"encrypt",key:i}),A.create({type:"decrypt",key:r})]}function s(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}i(s,o),t.exports=s,s.create=function(t){return new s(t)},s.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},s.prototype._pad=A.prototype._pad,s.prototype._unpad=A.prototype._unpad},function(t,e,r){var n=r(60),i=r(130),o=r(1).Buffer,A=r(131),a=r(10),s=r(37),c=r(38);function u(t,e,r){a.call(this),this._cache=new h,this._cipher=new s.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(0)(u,a),u.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function l(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new A(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new u(a.module,e,r)}u.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=o.concat([this.cache,t])},h.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},h.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=l,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(e,!1,r.key,r.iv);return l(t,i.key,i.iv)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(25);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){var n=r(1).Buffer,i=r(25);function o(t,e,r){var o=e.length,A=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:A]),A}e.encrypt=function(t,e,r){for(var i,A=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){A=n.concat([A,o(t,e,r)]);break}i=t._cache.length,A=n.concat([A,o(t,e.slice(0,i),r)]),e=e.slice(i)}return A}},function(t,e,r){var n=r(1).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,A=n.allocUnsafe(o),a=-1;++a<o;)A[a]=i(t,e[a],r);return A}},function(t,e,r){var n=r(1).Buffer;function i(t,e,r){for(var n,i,A=-1,a=0;++A<8;)n=e&1<<7-A?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>A%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,A=n.allocUnsafe(o),a=-1;++a<o;)A[a]=i(t,e[a],r);return A}},function(t,e,r){(function(t){var n=r(25);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(this,r(3).Buffer)},function(t,e,r){var n=r(1).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function A(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}A.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},A.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],A=-1;++A<128;){for(0!=(this.state[~~(A/8)]&1<<7-A%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},A.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},A.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=A},function(t,e,r){var n=r(130),i=r(1).Buffer,o=r(60),A=r(131),a=r(10),s=r(37),c=r(38);function u(t,e,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new s.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function h(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new A(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new u(a.module,e,r)}r(0)(u,a),u.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},u.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=i.concat([this.cache,t])},f.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return h(t,n.key,n.iv)},e.createDecipheriv=h},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(t,e,r){(function(e){var n=r(2),i=new(r(134)),o=new n(24),A=new n(11),a=new n(10),s=new n(3),c=new n(7),u=r(133),f=r(13);function h(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._pub=new n(t),this}function l(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this._priv=new n(t),this}t.exports=g;var d={};function g(t,e,r){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=h,this.setPrivateKey=l):this._primeCode=8}function p(t,r){var n=new e(t.toArray());return r?n.toString(r):n}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in d)return d[n];var f,h=0;if(t.isEven()||!u.simpleSieve||!u.fermatTest(t)||!i.test(t))return h+=1,h+="02"===r||"05"===r?8:4,d[n]=h,h;switch(i.test(t.shrn(1))||(h+=2),r){case"02":t.mod(o).cmp(A)&&(h+=8);break;case"05":(f=t.mod(a)).cmp(s)&&f.cmp(c)&&(h+=8);break;default:h+=4}return d[n]=h,h}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new n(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(t){var r=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(r.toArray()),o=this.getPrime();if(i.length<o.length){var A=new e(o.length-i.length);A.fill(0),i=e.concat([A,i])}return i},g.prototype.getPublicKey=function(t){return p(this._pub,t)},g.prototype.getPrivateKey=function(t){return p(this._priv,t)},g.prototype.getPrime=function(t){return p(this.__prime,t)},g.prototype.getGenerator=function(t){return p(this._gen,t)},g.prototype.setGenerator=function(t,r){return r=r||"utf8",e.isBuffer(t)||(t=new e(t,r)),this.__gen=t,this._gen=new n(t),this}}).call(this,r(3).Buffer)},function(t,e,r){var n=r(1).Buffer,i=r(56),o=r(62),A=r(63).ec,a=r(2),s=r(40),c=r(146);function u(t,e,r,o){if((t=n.from(t.toArray())).length<e.byteLength()){var A=n.alloc(e.byteLength()-t.length);t=n.concat([A,t])}var a=r.length,s=function(t,e){t=(t=f(t,e)).mod(e);var r=n.from(t.toArray());if(r.length<e.byteLength()){var i=n.alloc(e.byteLength()-r.length);r=n.concat([i,r])}return r}(r,e),c=n.alloc(a);c.fill(1);var u=n.alloc(a);return u=i(o,u).update(c).update(n.from([0])).update(t).update(s).digest(),c=i(o,u).update(c).digest(),{k:u=i(o,u).update(c).update(n.from([1])).update(t).update(s).digest(),v:c=i(o,u).update(c).digest()}}function f(t,e){var r=new a(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function h(t,e,r){var o,A;do{for(o=n.alloc(0);8*o.length<t.bitLength();)e.v=i(r,e.k).update(e.v).digest(),o=n.concat([o,e.v]);A=f(o,t),e.k=i(r,e.k).update(e.v).update(n.from([0])).digest(),e.v=i(r,e.k).update(e.v).digest()}while(-1!==A.cmp(t));return A}function l(t,e,r,n){return t.toRed(a.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,e,r,i,d){var g=s(e);if(g.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(t,e){var r=c[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var i=new A(r).keyFromPrivate(e.privateKey).sign(t);return n.from(i.toDER())}(t,g)}if("dsa"===g.type){if("dsa"!==i)throw new Error("wrong private key type");return function(t,e,r){var i,o=e.params.priv_key,A=e.params.p,s=e.params.q,c=e.params.g,d=new a(0),g=f(t,s).mod(s),p=!1,I=u(o,s,t,r);for(;!1===p;)i=h(s,I,r),d=l(c,i,A,s),0===(p=i.invm(s).imul(g.add(o.mul(d))).mod(s)).cmpn(0)&&(p=!1,d=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t));128&e[0]&&(e=[0].concat(e));var r=[48,t.length+e.length+4,2,t.length];return r=r.concat(t,[2,e.length],e),n.from(r)}(d,p)}(t,g,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");t=n.concat([d,t]);for(var p=g.modulus.byteLength(),I=[0,1];t.length+I.length+1<p;)I.push(255);I.push(0);for(var y=-1;++y<t.length;)I.push(t[y]);return o(I,g)},t.exports.getKey=u,t.exports.makeKey=h},function(t){t.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(t,e,r){"use strict";var n=r(7),i=r(2),o=r(0),A=r(39),a=n.assert;function s(t){A.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){A.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(t,e,r,n){A.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(s,A),t.exports=s,s.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},s.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},s.prototype._getEndoBasis=function(t){for(var e,r,n,o,A,a,s,c,u,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,l=this.n.clone(),d=new i(1),g=new i(0),p=new i(0),I=new i(1),y=0;0!==h.cmpn(0);){var C=l.div(h);c=l.sub(C.mul(h)),u=p.sub(C.mul(d));var E=I.sub(C.mul(g));if(!n&&c.cmp(f)<0)e=s.neg(),r=d,n=c.neg(),o=u;else if(n&&2==++y)break;s=c,l=h,h=c,p=d,d=u,I=g,g=E}A=c.neg(),a=u;var b=n.sqr().add(o.sqr());return A.sqr().add(a.sqr()).cmp(b)>=0&&(A=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),A.negative&&(A=A.neg(),a=a.neg()),[{a:n,b:o},{a:A,b:a}]},s.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),A=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(A).sub(a),k2:s.add(c).neg()}},s.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},s.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},s.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var A=this._endoSplit(e[o]),a=t[o],s=a._getBeta();A.k1.negative&&(A.k1.ineg(),a=a.neg(!0)),A.k2.negative&&(A.k2.ineg(),s=s.neg(!0)),n[2*o]=a,n[2*o+1]=s,i[2*o]=A.k1,i[2*o+1]=A.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return c},o(c,A.BasePoint),s.prototype.point=function(t,e,r){return new c(this,t,e,r)},s.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),A=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,A)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,A.BasePoint),s.prototype.jpoint=function(t,e,r){return new u(this,t,e,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),A=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),s=o.redSub(A);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),f=n.redMul(c),h=s.redSqr().redIAdd(u).redISub(f).redISub(f),l=s.redMul(f.redISub(h)).redISub(o.redMul(u)),d=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(h,l,d)},u.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),A=r.redSub(n),a=i.redSub(o);if(0===A.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=A.redSqr(),c=s.redMul(A),u=r.redMul(s),f=a.redSqr().redIAdd(c).redISub(u).redISub(u),h=a.redMul(u.redISub(f)).redISub(i.redMul(c)),l=this.z.redMul(A);return this.curve.jpoint(f,h,l)},u.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,A=this.y,a=this.z,s=a.redSqr().redSqr(),c=A.redAdd(A);for(e=0;e<t;e++){var u=o.redSqr(),f=c.redSqr(),h=f.redSqr(),l=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(s)),d=o.redMul(f),g=l.redSqr().redISub(d.redAdd(d)),p=d.redISub(g),I=l.redMul(p);I=I.redIAdd(I).redISub(h);var y=c.redMul(a);e+1<t&&(s=s.redMul(h)),o=g,a=y,c=I}return this.curve.jpoint(o,c.redMul(i),a)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),A=this.x.redAdd(i).redSqr().redISub(n).redISub(o);A=A.redIAdd(A);var a=n.redAdd(n).redIAdd(n),s=a.redSqr().redISub(A).redISub(A),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s,e=a.redMul(A.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),f=this.y.redSqr(),h=f.redSqr(),l=this.x.redAdd(f).redSqr().redISub(u).redISub(h);l=l.redIAdd(l);var d=u.redAdd(u).redIAdd(u),g=d.redSqr(),p=h.redIAdd(h);p=(p=p.redIAdd(p)).redIAdd(p),t=g.redISub(l).redISub(l),e=d.redMul(l.redISub(t)).redISub(p),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},u.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),A=this.x.redAdd(i).redSqr().redISub(n).redISub(o);A=A.redIAdd(A);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),s=a.redSqr().redISub(A).redISub(A);t=s;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=a.redMul(A.redISub(s)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),f=this.y.redSqr(),h=this.x.redMul(f),l=this.x.redSub(u).redMul(this.x.redAdd(u));l=l.redAdd(l).redIAdd(l);var d=h.redIAdd(h),g=(d=d.redIAdd(d)).redAdd(d);t=l.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(u);var p=f.redSqr();p=(p=(p=p.redIAdd(p)).redIAdd(p)).redIAdd(p),e=l.redMul(d.redISub(t)).redISub(p)}return this.curve.jpoint(t,e,r)},u.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),A=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),s=e.redAdd(e),c=(s=s.redIAdd(s)).redMul(A),u=a.redSqr().redISub(c.redAdd(c)),f=c.redISub(u),h=A.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var l=a.redMul(f).redISub(h),d=r.redAdd(r).redMul(n);return this.curve.jpoint(u,l,d)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),A=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(A=(A=(A=A.redIAdd(A)).redAdd(A).redIAdd(A)).redISub(o)).redSqr(),s=n.redIAdd(n);s=(s=(s=s.redIAdd(s)).redIAdd(s)).redIAdd(s);var c=i.redIAdd(A).redSqr().redISub(o).redISub(a).redISub(s),u=e.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var f=this.x.redMul(a).redISub(u);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.y.redMul(c.redMul(s.redISub(c)).redISub(A.redMul(a)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var l=this.z.redAdd(A).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,h,l)},u.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},u.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},u.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,r){"use strict";var n=r(2),i=r(0),o=r(39),A=r(7);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(s,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(A.toArray(t,e),1)},a.prototype.point=function(t,e){return new s(this,t,e)},a.prototype.pointFromJSON=function(t){return s.fromJSON(this,t)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(t,e){return new s(t,e[0],e[1]||t.one)},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),A=i.redMul(n),a=e.z.redMul(o.redAdd(A).redSqr()),s=e.x.redMul(o.redISub(A).redSqr());return this.curve.point(a,s)},s.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,r){"use strict";var n=r(7),i=r(2),o=r(0),A=r(39),a=n.assert;function s(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,A.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,r,n,o){A.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(s,A),t.exports=s,s.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},s.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},s.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},s.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),A=n.redMul(o.redInvm()),a=A.redSqrt();if(0!==a.redSqr().redSub(A).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(e&&!s||!e&&s)&&(a=a.redNeg()),this.point(t,a)},s.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),A=n.redMul(o.redInvm());if(0===A.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=A.redSqrt();if(0!==a.redSqr().redSub(A).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},s.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(c,A.BasePoint),s.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},s.prototype.point=function(t,e,r,n){return new c(this,t,e,r,n)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),A=o.redSub(r),a=n.redSub(e),s=i.redMul(A),c=o.redMul(a),u=i.redMul(a),f=A.redMul(o);return this.curve.point(s,c,f,u)},c.prototype._projDbl=function(){var t,e,r,n,i,o,A=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(s);this.zOne?(t=A.redSub(a).redSub(s).redMul(c.redSub(this.curve.two)),e=c.redMul(n.redSub(s)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),t=A.redSub(a).redISub(s).redMul(o),e=c.redMul(n.redSub(s)),r=c.redMul(o))}else n=a.redAdd(s),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(A.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(s)),r=n.redMul(o);return this.curve.point(t,e,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),A=i.redSub(n),a=i.redAdd(n),s=r.redAdd(e),c=o.redMul(A),u=a.redMul(s),f=o.redMul(s),h=A.redMul(a);return this.curve.point(c,u,h,f)},c.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),A=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(A),s=i.redSub(a),c=i.redAdd(a),u=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(A),f=n.redMul(s).redMul(u);return this.curve.twisted?(e=n.redMul(c).redMul(A.redSub(this.curve._mulA(o))),r=s.redMul(c)):(e=n.redMul(c).redMul(A.redSub(o)),r=this.curve._mulC(s).redMul(c)),this.curve.point(f,e,r)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(t,e,r){"use strict";e.sha1=r(290),e.sha224=r(291),e.sha256=r(139),e.sha384=r(292),e.sha512=r(140)},function(t,e,r){"use strict";var n=r(9),i=r(26),o=r(138),A=n.rotl32,a=n.sum32,s=n.sum32_5,c=o.ft_1,u=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,u),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=A(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],h=this.h[3],l=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),g=s(A(i,5),c(d,o,u,h),l,r[n],f[d]);l=h,h=u,u=A(o,30),o=i,i=g}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],h),this.h[4]=a(this.h[4],l)},h.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(9),i=r(139);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var n=r(9),i=r(140);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var n=r(9),i=r(26),o=n.rotl32,A=n.sum32,a=n.sum32_3,s=n.sum32_4,c=i.BlockHash;function u(){if(!(this instanceof u))return new u;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function h(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function l(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(u,c),e.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],u=this.h[4],y=r,C=n,E=i,b=c,B=u,m=0;m<80;m++){var w=A(o(s(r,f(m,n,i,c),t[d[m]+e],h(m)),p[m]),u);r=u,u=c,c=o(i,10),i=n,n=w,w=A(o(s(y,f(79-m,C,E,b),t[g[m]+e],l(m)),I[m]),B),y=B,B=b,b=o(E,10),E=C,C=w}w=a(this.h[1],i,b),this.h[1]=a(this.h[2],c,B),this.h[2]=a(this.h[3],u,y),this.h[3]=a(this.h[4],r,C),this.h[4]=a(this.h[0],n,E),this.h[0]=w},u.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],p=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,r){"use strict";var n=r(9),i=r(6);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(2),o=r(297),A=r(7),a=r(64),s=r(61),c=A.assert,u=r(298),f=r(299);function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(c(Object.prototype.hasOwnProperty.call(a,t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=h,h.prototype.keyPair=function(t){return new u(this,t)},h.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},h.prototype.genKeyPair=function(t){t||(t={});for(var e=new o({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var A=new i(e.generate(r));if(!(A.cmp(n)>0))return A.iaddn(1),this.keyFromPrivate(A)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(t,e,r,A){"object"===n(r)&&(A=r,r=null),A||(A={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new i(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),c=t.toArray("be",a),u=new o({hash:this.hash,entropy:s,nonce:c,pers:A.pers,persEnc:A.persEnc||"utf8"}),h=this.n.sub(new i(1)),l=0;;l++){var d=A.k?A.k(l):new i(u.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var g=this.g.mul(d);if(!g.isInfinity()){var p=g.getX(),I=p.umod(this.n);if(0!==I.cmpn(0)){var y=d.invm(this.n).mul(I.mul(e.getPrivate()).iadd(t));if(0!==(y=y.umod(this.n)).cmpn(0)){var C=(g.getY().isOdd()?1:0)|(0!==p.cmp(I)?2:0);return A.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),C^=1),new f({r:I,s:y,recoveryParam:C})}}}}}},h.prototype.verify=function(t,e,r,n){t=this._truncateToN(new i(t,16)),r=this.keyFromPublic(r,n);var o=(e=new f(e,"hex")).r,A=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(A.cmpn(1)<0||A.cmp(this.n)>=0)return!1;var a,s=A.invm(this.n),c=s.mul(t).umod(this.n),u=s.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(t,e,r,n){c((3&r)===r,"The recovery param is more than two bits"),e=new f(e,n);var o=this.n,A=new i(t),a=e.r,s=e.s,u=1&r,h=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");a=h?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var l=e.r.invm(o),d=o.sub(A).mul(l).umod(o),g=s.mul(l).umod(o);return this.g.mulAdd(d,a,g)},h.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,r){"use strict";var n=r(65),i=r(136),o=r(6);function A(t){if(!(this instanceof A))return new A(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=A,A.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},A.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},A.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},A.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},A.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var A=o.slice(0,t);return this._update(r),this._reseed++,i.encode(A,e)}},function(t,e,r){"use strict";var n=r(2),i=r(7).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,r){"use strict";var n=r(2),i=r(7),o=i.assert;function A(t,e){if(t instanceof A)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function s(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,A=e.place;o<n;o++,A++)i<<=8,i|=t[A],i>>>=0;return!(i<=127)&&(e.place=A,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function u(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=A,A.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=s(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var A=s(t,r);if(!1===A)return!1;var c=t.slice(r.place,A+r.place);if(r.place+=A,2!==t[r.place++])return!1;var u=s(t,r);if(!1===u)return!1;if(t.length!==u+r.place)return!1;var f=t.slice(r.place,u+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(c),this.s=new n(f),this.recoveryParam=null,!0},A.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,e.length),(n=n.concat(e)).push(2),u(n,r.length);var o=n.concat(r),A=[48];return u(A,o.length),A=A.concat(o),i.encode(A,t)}},function(t,e,r){"use strict";var n=r(65),i=r(64),o=r(7),A=o.assert,a=o.parseBytes,s=r(301),c=r(302);function u(t){if(A("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof u))return new u(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=u,u.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),A=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),s=n.add(A).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},u.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(t){return s.fromPublic(this,t)},u.prototype.keyFromSecret=function(t){return s.fromSecret(this,t)},u.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},u.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},u.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},u.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(t){return o.intFromLE(t)},u.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,r){"use strict";var n=r(7),i=n.assert,o=n.parseBytes,A=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},A(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),A(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),A(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),A(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),A(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),A(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=r(2),o=r(7),A=o.assert,a=o.cachedProperty,s=o.parseBytes;function c(t,e){this.eddsa=t,"object"!==n(e)&&(e=s(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),A(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof i&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},t.exports=c},function(t,e,r){"use strict";var n=r(141);e.certificate=r(309);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var A=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));e.PublicKey=A;var a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),s=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=s;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=c;var u=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=u,e.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=f;var h=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(t,e,r){"use strict";var n=r(142),i=r(144),o=r(0);function A(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new A(t,e)},A.prototype._createNamed=function(t){var e=this.name;function r(t){this._initNamed(t,e)}return o(r,t),r.prototype._initNamed=function(e,r){t.call(this,e,r)},new r(this)},A.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},A.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},A.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n[t])),this.encoders[t]},A.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},function(t,e,r){"use strict";var n=r(0),i=r(143);function o(t){i.call(this,t),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){for(var r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},function(t,e,r){"use strict";var n=r(0),i=r(66).Buffer,o=r(145);function A(t){o.call(this,t),this.enc="pem"}n(A,o),t.exports=A,A.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),A=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,s=-1,c=0;c<r.length;c++){var u=r[c].match(A);if(null!==u&&u[2]===n){if(-1!==a){if("END"!==u[1])break;s=c;break}if("BEGIN"!==u[1])break;a=c}}if(-1===a||-1===s)throw new Error("PEM section not found for: "+n);var f=r.slice(a+1,s).join("");f.replace(/[^a-z0-9+/=]+/gi,"");var h=i.from(f,"base64");return o.prototype.decode.call(this,h,e)}},function(t,e,r){"use strict";var n=e;n.Reporter=r(68).Reporter,n.DecoderBuffer=r(27).DecoderBuffer,n.EncoderBuffer=r(27).EncoderBuffer,n.Node=r(67)},function(t,e,r){"use strict";var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e},n.der=r(69)},function(t,e,r){"use strict";var n=r(141),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),A=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(A),this.key("subjectPublicKey").bitstr())})),s=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(s)})),u=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),l=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(A),this.key("issuer").use(u),this.key("validity").use(f),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),d=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(A),this.key("signatureValue").bitstr())}));t.exports=d},function(t){t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(t,e,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,A=r(38),a=r(59),s=r(1).Buffer;t.exports=function(t,e){var r,c=t.toString(),u=c.match(n);if(u){var f="aes"+u[1],h=s.from(u[2],"hex"),l=s.from(u[3].replace(/[\r\n]/g,""),"base64"),d=A(e,h.slice(0,8),parseInt(u[1],10)).key,g=[],p=a.createDecipheriv(f,d,h);g.push(p.update(l)),g.push(p.final()),r=s.concat(g)}else{var I=c.match(o);r=s.from(I[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},function(t,e,r){var n=r(1).Buffer,i=r(2),o=r(63).ec,A=r(40),a=r(146);function s(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,e,r,c,u){var f=A(r);if("ec"===f.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),A=r.data.subjectPrivateKey.data;return i.verify(e,t,A)}(t,e,f)}if("dsa"===f.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,a=r.data.g,c=r.data.pub_key,u=A.signature.decode(t,"der"),f=u.s,h=u.r;s(f,o),s(h,o);var l=i.mont(n),d=f.invm(o);return 0===a.toRed(l).redPow(new i(e).mul(d).mod(o)).fromRed().mul(c.toRed(l).redPow(h.mul(d).mod(o)).fromRed()).mod(n).mod(o).cmp(h)}(t,e,f)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");e=n.concat([u,e]);for(var h=f.modulus.byteLength(),l=[1],d=0;e.length+l.length+2<h;)l.push(255),d++;l.push(0);for(var g=-1;++g<e.length;)l.push(e[g]);l=n.from(l);var p=i.mont(f.modulus);t=(t=new i(t).toRed(p)).redPow(new i(f.publicExponent)),t=n.from(t.fromRed().toArray());var I=d<8?1:0;for(h=Math.min(t.length,l.length),t.length!==l.length&&(I=1),g=-1;++g<h;)I|=t[g]^l[g];return 0===I}},function(t,e,r){var n=r(40),i=r(13),o=r(17),A=r(149),a=r(150),s=r(2),c=r(151),u=r(62),f=r(1).Buffer;t.exports=function(t,e,r){var h;h=t.padding?t.padding:r?1:4;var l,d=n(t);if(4===h)l=function(t,e){var r=t.modulus.byteLength(),n=e.length,c=o("sha1").update(f.alloc(0)).digest(),u=c.length,h=2*u;if(n>r-h-2)throw new Error("message too long");var l=f.alloc(r-n-h-2),d=r-u-1,g=i(u),p=a(f.concat([c,l,f.alloc(1,1),e],d),A(g,d)),I=a(g,A(p,u));return new s(f.concat([f.alloc(1),I,p],r))}(d,e);else if(1===h)l=function(t,e,r){var n,o=e.length,A=t.modulus.byteLength();if(o>A-11)throw new Error("message too long");n=r?f.alloc(A-o-3,255):function(t){var e,r=f.allocUnsafe(t),n=0,o=i(2*t),A=0;for(;n<t;)A===o.length&&(o=i(2*t),A=0),(e=o[A++])&&(r[n++]=e);return r}(A-o-3);return new s(f.concat([f.from([0,r?1:2]),n,f.alloc(1),e],A))}(d,e,r);else{if(3!==h)throw new Error("unknown padding");if((l=new s(e)).cmp(d.modulus)>=0)throw new Error("data too long for modulus")}return r?u(l,d):c(l,d)}},function(t,e,r){var n=r(40),i=r(149),o=r(150),A=r(2),a=r(62),s=r(17),c=r(151),u=r(1).Buffer;t.exports=function(t,e,r){var f;f=t.padding?t.padding:r?1:4;var h,l=n(t),d=l.modulus.byteLength();if(e.length>d||new A(e).cmp(l.modulus)>=0)throw new Error("decryption error");h=r?c(new A(e),l):a(e,l);var g=u.alloc(d-h.length);if(h=u.concat([g,h],d),4===f)return function(t,e){var r=t.modulus.byteLength(),n=s("sha1").update(u.alloc(0)).digest(),A=n.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,A+1),c=e.slice(A+1),f=o(a,i(c,A)),h=o(c,i(f,r-A-1));if(function(t,e){t=u.from(t),e=u.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(n,h.slice(0,A)))throw new Error("decryption error");var l=A;for(;0===h[l];)l++;if(1!==h[l++])throw new Error("decryption error");return h.slice(l)}(l,h);if(1===f)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var A=e.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;A.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,h,r);if(3===f)return h;throw new Error("unknown padding")}},function(t,e,r){(function(e){var n=r(52).Transform,i=r(0);function o(t){n.call(this,t),this._destroyed=!1}function A(t,e,r){r(null,t)}function a(t){return function(e,r,n){return"function"==typeof e&&(n=r,r=e,e={}),"function"!=typeof r&&(r=A),"function"!=typeof n&&(n=null),t(e,r,n)}}i(o,n),o.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var r=this;e.nextTick((function(){t&&r.emit("error",t),r.emit("close")}))}},t.exports=a((function(t,e,r){var n=new o(t);return n._transform=e,r&&(n._flush=r),n})),t.exports.ctor=a((function(t,e,r){function n(e){if(!(this instanceof n))return new n(e);this.options=Object.assign({},t,e),o.call(this,this.options)}return i(n,o),n.prototype._transform=e,r&&(n.prototype._flush=r),n})),t.exports.obj=a((function(t,e,r){var n=new o(Object.assign({objectMode:!0,highWaterMark:16},t));return n._transform=e,r&&(n._flush=r),n}))}).call(this,r(5))},function(t,e,r){(function(t,n){var i=r(28),o=r(14),A=r(15);function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var c,u=r(29);u.Platform()===u.PLATFORM_NODE&&(t.Response=r(83).Response,c=r(317));var f=r(82),h=r(85),l=h.ValidatePresence,d=h.ValidateWriteToken,g=h.ValidatePartHash,p=h.ValidateParameters;e.ListFiles=function(){var t=A(o.mark((function t(e){var r,n,i,A;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,p({libraryId:r,objectId:n,versionHash:i}),i&&(n=this.utils.DecodeVersionHash(i).objectId),A=f("q",i||n,"meta","files"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 8:return t.t2=t.sent,t.t3=A,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFilesFromS3=function(){var t=A(o.mark((function t(e){var r,i,A,a,c,u,f,h,l,g,I,y,C,E,b,B,m,w,v,Q,_,D,S,M,k,x,R,N,F;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.libraryId,i=e.objectId,A=e.writeToken,a=e.region,c=e.bucket,u=e.fileInfo,f=e.accessKey,h=e.secret,l=e.signedUrl,g=e.encryption,I=void 0===g?"none":g,y=e.copy,C=void 0!==y&&y,E=e.callback,p({libraryId:r,objectId:i}),d(A),b=/^s3:\/\/([^/]+)\//i,B=0;case 5:if(!(B<u.length)){t.next=18;break}if(m=u[B].source,!(w=b.exec(m))){t.next=15;break}if(w[1]===c){t.next=14;break}throw Error('Full S3 file path "'+m+"\" specified, but does not match provided bucket name '"+c+"'");case 14:u[B].source=m.replace(b,"");case 15:B++,t.next=5;break;case 18:if(this.Log("Uploading files from S3: ".concat(r," ").concat(i," ").concat(A)),"cgck"!==I){t.next=25;break}return t.next=22,this.EncryptionConk({libraryId:r,objectId:i,writeToken:A});case 22:Q=s(s({},Q=t.sent),{},{secret_key:""}),v="kp__".concat(this.utils.B58(n.from(JSON.stringify(Q))));case 25:return _={access_key_id:f,secret_access_key:h},l&&(_={signed_url:l}),D={encryption_key:v,access:{protocol:"s3",platform:"aws",path:c,storage_endpoint:{region:a},cloud_credentials:_}},S=u.map((function(t){return C?{op:"ingest-copy",path:t.path,encryption:{scheme:"cgck"===I?"cgck":"none"},ingest:{type:"key",path:t.source}}:{op:"add-reference",path:t.path,reference:{type:"key",path:t.source}}})),t.next=31,this.CreateFileUploadJob({libraryId:r,objectId:i,writeToken:A,ops:S,defaults:D});case 31:M=t.sent,k=M.id;case 33:return t.next=36,new Promise((function(t){return setTimeout(t,1e3)}));case 36:return t.next=38,this.UploadStatus({libraryId:r,objectId:i,writeToken:A,uploadId:k});case 38:if(!((x=t.sent).errors&&x.errors.length>1)){t.next=43;break}throw x.errors.join("\n");case 43:if(!x.error){t.next=48;break}throw this.Log("S3 file upload failed:\n".concat(JSON.stringify(x,null,2))),x.error;case 48:if("failed"!==x.status.toLowerCase()){t.next=50;break}throw"File upload failed";case 50:if(R=!1,C?(R=x.ingest_copy.done,E&&(N=x.ingest_copy.progress,E({done:R,uploaded:N.bytes.completed,total:N.bytes.total,uploadedFiles:N.files.completed,totalFiles:N.files.total,fileStatus:N.files.details}))):(R=x.add_reference.done,E&&(F=x.add_reference.progress,E({done:R,uploadedFiles:F.completed,totalFiles:F.total}))),!R){t.next=54;break}return t.abrupt("break",56);case 54:t.next=33;break;case 56:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFiles=function(){var t=A(o.mark((function t(e){var r,i,a,u,f,h,l,g,I,y,C,E,b,B,m,w,v,Q,_,D,S,M,k,x,R,N,F,U,H=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,i=e.objectId,a=e.writeToken,u=e.fileInfo,f=e.encryption,h=void 0===f?"none":f,l=e.callback,p({libraryId:r,objectId:i}),d(a),this.Log("Uploading files: ".concat(r," ").concat(i," ").concat(a)),"cgck"!==h){t.next=8;break}return t.next=7,this.EncryptionConk({libraryId:r,objectId:i,writeToken:a});case 7:g=t.sent;case 8:for(I={},y={},C=0;C<u.length;C++)(E=s(s({},u[C]),{},{data:void 0})).path=E.path.replace(/^\/+/,""),"cgck"===h&&(E.encryption={scheme:"cgck"}),y[E.path]=u[C].data,delete E.data,E.type="file",I[E.path]={uploaded:0,total:E.size},u[C]=E;return this.Log(u),l&&l(I),t.next=15,this.CreateFileUploadJob({libraryId:r,objectId:i,writeToken:a,ops:u,encryption:h});case 15:b=t.sent,B=b.id,m=b.jobs,this.Log("Upload ID: ".concat(B)),this.Log(m),104857600,w=[],v=0,Q=0,_=function(){var t=A(o.mark((function t(){var e,A,s,u,f,l;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0;case 1:if(!(e<m.length)){t.next=31;break}case 2:if(!(v-Q>104857600)){t.next=7;break}return t.next=5,new Promise((function(t){return setTimeout(t,500)}));case 5:t.next=2;break;case 7:return A=m[e],t.next=10,H.UploadJobStatus({libraryId:r,objectId:i,writeToken:a,uploadId:B,jobId:A});case 10:s=t.sent,u=0;case 12:if(!(u<s.files.length)){t.next=25;break}if(f=s.files[u],l=void 0,"number"==typeof y[f.path]?(l=n.alloc(f.len),c.readSync(y[f.path],l,0,f.len,f.off)):l=y[f.path].slice(f.off,f.off+f.len),"cgck"!==h){t.next=20;break}return t.next=19,H.Crypto.Encrypt(g,l);case 19:l=t.sent;case 20:s.files[u].data=l,v+=f.len;case 22:u++,t.next=12;break;case 25:return w[e]=s,t.next=28,new Promise((function(t){return setTimeout(t,50)}));case 28:e++,t.next=1;break;case 31:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),D=function(){var t=A(o.mark((function t(e,n){var A,c,u,f;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w[n]){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,500)}));case 3:t.next=0;break;case 5:A=w[n],c=A.files,u=0;case 8:if(!(u<c.length)){t.next=18;break}return f=c[u],t.next=12,H.UploadFileData({libraryId:r,objectId:i,writeToken:a,uploadId:B,jobId:e,fileData:f.data});case 12:delete w[n].files[u].data,Q+=f.len,l&&(I[f.path]=s(s({},I[f.path]),{},{uploaded:I[f.path].uploaded+f.len}),l(I));case 15:u++,t.next=8;break;case 18:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),_(),S=Math.min(3,m.length),M=[],k=0;case 30:if(!(k<S)){t.next=40;break}return x=(new Date).getTime(),t.next=34,D(m[k],k);case 34:R=((new Date).getTime()-x)/1e3,N=w[k].files.map((function(t){return t.len})).reduce((function(t,e){return t+e}),0),M.push(N/R/1048576);case 37:k++,t.next=30;break;case 40:return F=M.reduce((function(t,e){return t+e}),0)/S,U=Math.min(5,Math.ceil(F/2)),t.next=44,this.utils.LimitedMap(U,m,function(){var t=A(o.mark((function t(e,r){return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r<S)){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,D(e,r);case 4:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 44:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateFileUploadJob=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,s,c,u,h,l;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.ops,a=e.defaults,s=void 0===a?{}:a,c=e.encryption,u=void 0===c?"none":c,p({libraryId:r,objectId:n}),d(i),this.Log("Creating file upload job: ".concat(r," ").concat(n," ").concat(i)),this.Log(A),"cgck"===u&&(s.encryption={scheme:"cgck"}),h={seq:0,seq_complete:!0,defaults:s,ops:A},l=f("q",i,"file_jobs"),t.t0=this.utils,t.t1=this.HttpClient,t.next=12,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:u});case 12:return t.t2=t.sent,t.t3=l,t.t4=h,t.t5={headers:t.t2,method:"POST",path:t.t3,body:t.t4,failover:!1},t.t6=t.t1.Request.call(t.t1,t.t5),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t6));case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadStatus=function(){var t=A(o.mark((function t(e){var r,n,i,A,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.uploadId,p({libraryId:r,objectId:n}),d(i),a=f("q",i,"file_jobs",A),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 8:return t.t2=t.sent,t.t3=a,t.t4={headers:t.t2,method:"GET",path:t.t3,failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadJobStatus=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.uploadId,a=e.jobId,p({libraryId:r,objectId:n}),d(i),s=f("q",i,"file_jobs",A,"uploads",a),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 8:return t.t2=t.sent,t.t3=s,t.t4={headers:t.t2,method:"GET",path:t.t3,failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.abrupt("return",t.t0.ResponseToJson.call(t.t0,t.t5));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadFileData=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,c,u;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.uploadId,a=e.jobId,c=e.fileData,p({libraryId:r,objectId:n}),d(i),u=f("q",i,"file_jobs",A,a),t.t0=this.utils,t.t1=this.HttpClient,t.t2=u,t.t3=c,t.t4=s,t.t5={"Content-type":"application/octet-stream"},t.next=12,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 12:return t.t6=t.sent,t.t7=(0,t.t4)(t.t5,t.t6),t.t8={method:"POST",path:t.t2,body:t.t3,bodyType:"BINARY",headers:t.t7,failover:!1},t.t9=t.t1.Request.call(t.t1,t.t8),t.next=18,t.t0.ResponseToJson.call(t.t0,t.t9);case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizeUploadJob=function(){var t=A(o.mark((function t(e){var r,n,i,A;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,p({libraryId:r,objectId:n}),d(i),this.Log("Finalizing upload job: ".concat(r," ").concat(n," ").concat(i)),A=f("q",i,"files"),t.t0=this.HttpClient,t.t1=A,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 9:return t.t2=t.sent,t.t3={method:"POST",path:t.t1,bodyType:"BINARY",headers:t.t2,failover:!1},t.next=13,t.t0.Request.call(t.t0,t.t3);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreateFileDirectories=function(){var t=A(o.mark((function t(e){var r,n,i,A,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.filePaths,p({libraryId:r,objectId:n}),d(i),this.Log("Creating Directories: ".concat(r," ").concat(n," ").concat(i)),this.Log(A),a=A.map((function(t){return{op:"add",type:"directory",path:t}})),t.next=8,this.CreateFileUploadJob({libraryId:r,objectId:n,writeToken:i,ops:a});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeleteFiles=function(){var t=A(o.mark((function t(e){var r,n,i,A,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.filePaths,p({libraryId:r,objectId:n}),d(i),this.Log("Deleting Files: ".concat(r," ").concat(n," ").concat(i)),this.Log(A),a=A.map((function(t){return{op:"del",path:t}})),t.next=8,this.CreateFileUploadJob({libraryId:r,objectId:n,writeToken:i,ops:a});case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadFile=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,c,u,h,d,g,I,y,C,E,b,B,m,w,v,Q,_,D=arguments;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,A=e.writeToken,a=e.filePath,c=e.format,u=void 0===c?"arrayBuffer":c,h=e.chunked,d=void 0!==h&&h,g=e.chunkSize,I=e.clientSideDecryption,y=void 0!==I&&I,C=e.callback,p({libraryId:r,objectId:n,versionHash:i}),l("filePath",a),i&&(n=this.utils.DecodeVersionHash(i).objectId),t.next=6,this.ContentObjectMetadata({libraryId:r,objectId:n,versionHash:i,writeToken:A,metadataSubtree:f("files",a)});case 6:return E=t.sent,b=E&&E["."].encryption&&"cgck"===E["."].encryption.scheme,B=b?"cgck":void 0,m=b&&!y?f("q",A||i||n,"rep","files_download",a):f("q",A||i||n,"files",a),t.next=12,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i,encryption:B});case 12:return(w=t.sent).Accept="*/*",v="eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address)),t.next=17,this.ContentObjectMetadata({libraryId:r,objectId:n,metadataSubtree:v});case 17:if(Q=t.sent,t.t1=b,!t.t1){t.next=26;break}return t.t2=this.utils,t.t3=this.signer.address,t.next=24,this.ContentObjectOwner({objectId:n});case 24:t.t4=t.sent,t.t1=!t.t2.EqualAddress.call(t.t2,t.t3,t.t4);case 26:if(t.t0=t.t1,!t.t0){t.next=29;break}t.t0=!Q;case 29:if(!t.t0){t.next=31;break}w["X-Content-Fabric-Decryption-Mode"]="reencrypt";case 31:if(b&&!y&&(w["X-Content-Fabric-Decryption-Mode"]="decrypt",g=Number.MAX_SAFE_INTEGER),_=E["."].size,!b||!y){t.next=51;break}return t.t5=this,t.next=37,this.EncryptionConk({libraryId:r,objectId:n,versionHash:i,download:!0});case 37:return t.t6=t.sent,t.t7=m,t.t8=_,t.t9=w,t.t10=C,t.t11=u,t.t12=y,t.t13=d,t.t14={conk:t.t6,downloadPath:t.t7,bytesTotal:t.t8,headers:t.t9,callback:t.t10,format:t.t11,clientSideDecryption:t.t12,chunked:t.t13},t.next=48,t.t5.DownloadEncrypted.call(t.t5,t.t14);case 48:return t.abrupt("return",t.sent);case 51:return g||(g=1e7),t.prev=52,t.next=55,this.Download({downloadPath:m,bytesTotal:_,headers:w,callback:C,format:u,chunked:d,chunkSize:g});case 55:return t.abrupt("return",t.sent);case 58:if(t.prev=58,t.t15=t.catch(52),!b||y){t.next=62;break}return t.abrupt("return",this.DownloadFile(s(s({},D[0]),{},{clientSideDecryption:!0})));case 62:throw t.t15;case 63:case"end":return t.stop()}}),t,this,[[52,58]])})));return function(e){return t.apply(this,arguments)}}(),e.ContentParts=function(){var t=A(o.mark((function t(e){var r,n,i,A,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,p({libraryId:r,objectId:n,versionHash:i}),this.Log("Retrieving parts: ".concat(r," ").concat(n||i)),i&&(n=this.utils.DecodeVersionHash(i).objectId),A=f("q",i||n,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 9:return t.t2=t.sent,t.t3=A,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=15,t.t0.ResponseToJson.call(t.t0,t.t5);case 15:return a=t.sent,t.abrupt("return",a.parts);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.ContentPart=function(){var t=A(o.mark((function t(e){var r,n,i,A,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,A=e.partHash,p({libraryId:r,objectId:n,versionHash:i}),g(A),this.Log("Retrieving part: ".concat(r," ").concat(n||i," ").concat(A)),i&&(n=this.utils.DecodeVersionHash(i).objectId),a=f("q",i||n,"parts",A),t.t0=this.utils,t.t1=this.HttpClient,t.next=10,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i});case 10:return t.t2=t.sent,t.t3=a,t.t4={headers:t.t2,method:"GET",path:t.t3},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=16,t.t0.ResponseToJson.call(t.t0,t.t5);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadPart=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,s,c,u,h,l,d,I,y,C,E,b,B;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.versionHash,A=e.writeToken,a=e.partHash,s=e.format,c=void 0===s?"arrayBuffer":s,u=e.chunked,h=void 0!==u&&u,l=e.chunkSize,d=void 0===l?1e7:l,I=e.callback,p({libraryId:r,objectId:n,versionHash:i}),g(a),i&&(n=this.utils.DecodeVersionHash(i).objectId),y=a.startsWith("hqpe"),C=y?"cgck":void 0,E=f("q",A||i||n,"data",a),t.next=9,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,versionHash:i,encryption:C});case 9:return b=t.sent,t.next=12,this.ContentPart({libraryId:r,objectId:n,versionHash:i,partHash:a});case 12:if(B=t.sent.part.size,!y){t.next=37;break}return t.t0=this.utils,t.t1=this.signer.address,t.next=18,this.ContentObjectOwner({objectId:n});case 18:if(t.t2=t.sent,t.t0.EqualAddress.call(t.t0,t.t1,t.t2)){t.next=21;break}b["X-Content-Fabric-Decryption-Mode"]="reencrypt";case 21:return t.t3=this,t.next=24,this.EncryptionConk({libraryId:r,objectId:n,download:!0});case 24:return t.t4=t.sent,t.t5=E,t.t6=B,t.t7=b,t.t8=I,t.t9=c,t.t10=h,t.t11={conk:t.t4,downloadPath:t.t5,bytesTotal:t.t6,headers:t.t7,callback:t.t8,format:t.t9,chunked:t.t10},t.next=34,t.t3.DownloadEncrypted.call(t.t3,t.t11);case 34:return t.abrupt("return",t.sent);case 37:return t.next=39,this.Download({downloadPath:E,bytesTotal:B,headers:b,callback:I,format:c,chunked:h,chunkSize:d});case 39:return t.abrupt("return",t.sent);case 40:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.Download=function(){var t=A(o.mark((function t(e){var r,i,A,a,s,c,u,f,h,l,d,g,p,I,y;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.downloadPath,i=e.headers,A=e.bytesTotal,a=e.chunked,s=void 0!==a&&a,c=e.chunkSize,u=void 0===c?2e6:c,f=e.callback,h=e.format,l=void 0===h?"arrayBuffer":h,!s||f){t.next=3;break}throw Error("No callback specified for chunked download");case 3:s||(d=[]),g=0,p=Math.ceil(A/u),I=0;case 7:if(!(I<p)){t.next=35;break}return i.Range="bytes=".concat(g,"-").concat(g+u-1),t.next=11,this.HttpClient.Request({path:r,headers:i,method:"GET"});case 11:if(y=t.sent,g=Math.min(g+u,A),!s){t.next=24;break}return t.t0=f,t.t1=g,t.t2=A,t.next=19,this.utils.ResponseToFormat(l,y);case 19:t.t3=t.sent,t.t4={bytesFinished:t.t1,bytesTotal:t.t2,chunk:t.t3},(0,t.t0)(t.t4),t.next=32;break;case 24:return t.t5=d,t.t6=n,t.next=28,y.arrayBuffer();case 28:t.t7=t.sent,t.t8=t.t6.from.call(t.t6,t.t7),t.t5.push.call(t.t5,t.t8),f&&f({bytesFinished:g,bytesTotal:A});case 32:I++,t.next=7;break;case 35:if(s){t.next=39;break}return t.next=38,this.utils.ResponseToFormat(l,new Response(n.concat(d)));case 38:return t.abrupt("return",t.sent);case 39:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DownloadEncrypted=function(){var t=A(o.mark((function t(e){var r,i,a,s,c,u,f,h,l,d,g,p,I,y,C,E,b,B=this;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.conk,i=e.downloadPath,a=e.bytesTotal,s=e.headers,c=e.callback,u=e.format,f=void 0===u?"arrayBuffer":u,h=e.chunked,!(l=void 0!==h&&h)||c){t.next=3;break}throw Error("No callback specified for chunked download");case 3:return d=r.public_key.startsWith("ktpk"),g=this.Crypto.EncryptedBlockSize(1e6,d),p=0,f=f.toLowerCase(),I=[],t.next=10,this.Crypto.OpenDecryptionStream(r);case 10:(y=t.sent).on("data",function(){var t=A(o.mark((function t(e){var r;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!l){t.next=13;break}if("buffer"===f){t.next=10;break}if(r=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),"arraybuffer"!==f){t.next=7;break}e=r,t.next=10;break;case 7:return t.next=9,B.utils.ResponseToFormat(f,new Response(r));case 9:e=t.sent;case 10:c({bytesFinished:p,bytesTotal:a,chunk:e}),t.next=15;break;case 13:c&&c({bytesFinished:p,bytesTotal:a}),I.push(e);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),C=Math.ceil(a/g),E=0;case 14:if(!(E<C)){t.next=30;break}return s.Range="bytes=".concat(p,"-").concat(p+g-1),t.next=18,this.HttpClient.Request({headers:s,method:"GET",path:i});case 18:return b=t.sent,p=Math.min(p+g,a),t.t0=y,t.t1=Uint8Array,t.next=24,b.arrayBuffer();case 24:t.t2=t.sent,t.t3=new t.t1(t.t2),t.t0.write.call(t.t0,t.t3);case 27:E++,t.next=14;break;case 30:return y.end(),t.next=33,new Promise((function(t){return y.on("finish",(function(){t()}))}));case 33:if(l){t.next=37;break}return t.next=36,this.utils.ResponseToFormat(f,new Response(n.concat(I)));case 36:return t.abrupt("return",t.sent);case 37:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.CreatePart=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.encryption,p({libraryId:r,objectId:n}),d(i),a=f("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:A});case 8:return t.t2=t.sent,t.t3=a,t.t4={headers:t.t2,method:"POST",path:t.t3,bodyType:"BINARY",body:"",failover:!1},t.t5=t.t1.Request.call(t.t1,t.t4),t.next=14,t.t0.ResponseToJson.call(t.t0,t.t5);case 14:return s=t.sent,t.abrupt("return",s.part.write_token);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadPartChunk=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,s,c,u;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.partWriteToken,a=e.chunk,s=e.encryption,p({libraryId:r,objectId:n}),d(i),!s||"none"===s){t.next=10;break}return t.next=6,this.EncryptionConk({libraryId:r,objectId:n,writeToken:i});case 6:return c=t.sent,t.next=9,this.Crypto.Encrypt(c,a);case 9:a=t.sent;case 10:return u=f("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=15,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:s});case 15:return t.t2=t.sent,t.t3=f(u,A),t.t4=a,t.t5={headers:t.t2,method:"POST",path:t.t3,body:t.t4,bodyType:"BINARY",failover:!1},t.t6=t.t1.Request.call(t.t1,t.t5),t.next=22,t.t0.ResponseToJson.call(t.t0,t.t6);case 22:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.FinalizePart=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,s;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.partWriteToken,a=e.encryption,p({libraryId:r,objectId:n}),d(i),s=f("q",i,"parts"),t.t0=this.utils,t.t1=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0,encryption:a});case 8:return t.t2=t.sent,t.t3=f(s,A),t.t4={headers:t.t2,method:"POST",path:t.t3,bodyType:"BINARY",body:"",failover:!1},t.next=13,t.t1.Request.call(t.t1,t.t4);case 13:return t.t5=t.sent,t.next=16,t.t0.ResponseToJson.call(t.t0,t.t5);case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.UploadPart=function(){var t=A(o.mark((function t(e){var r,n,i,A,a,s,c,u,f,h,l,g,I;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.data,a=e.encryption,s=void 0===a?"none":a,c=e.chunkSize,u=void 0===c?1e7:c,f=e.callback,p({libraryId:r,objectId:n}),d(i),t.next=5,this.CreatePart({libraryId:r,objectId:n,writeToken:i,encryption:s});case 5:h=t.sent,l=A.length||A.byteLength||A.size,f&&f({bytesFinished:0,bytesTotal:l}),g=0;case 9:if(!(g<l)){t.next=17;break}return I=A.slice(g,g+u),t.next=13,this.UploadPartChunk({libraryId:r,objectId:n,writeToken:i,partWriteToken:h,chunk:I,encryption:s});case 13:f&&f({bytesFinished:Math.min(g+u,l),bytesTotal:l});case 14:g+=u,t.next=9;break;case 17:return t.next=19,this.FinalizePart({libraryId:r,objectId:n,writeToken:i,partWriteToken:h,encryption:s});case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.DeletePart=function(){var t=A(o.mark((function t(e){var r,n,i,A,a;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.libraryId,n=e.objectId,i=e.writeToken,A=e.partHash,p({libraryId:r,objectId:n}),d(i),g(A),a=f("q",i,"parts",A),t.t0=this.HttpClient,t.next=8,this.authClient.AuthorizationHeader({libraryId:r,objectId:n,update:!0});case 8:return t.t1=t.sent,t.t2=a,t.t3={headers:t.t1,method:"DELETE",path:t.t2,failover:!1},t.next=13,t.t0.Request.call(t.t0,t.t3);case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}).call(this,r(4),r(3).Buffer)},function(t,e){}])}));
|