mirror of
https://github.com/status-im/status-channels-dapp.git
synced 2025-02-21 03:28:07 +00:00
107 lines
1.8 MiB
JavaScript
107 lines
1.8 MiB
JavaScript
|
!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]}}("undefined"!=typeof self?self:this,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=351)}([function(t,e,r){"use strict";(function(t){
|
|||
|
/*!
|
|||
|
* The buffer module from node.js, for the browser.
|
|||
|
*
|
|||
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
var n=r(401),i=r(402),o=r(211);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 l(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=h(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?t:(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||function(t){return t!=t}(e.length)?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(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 l(t,e){if(f(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 h(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 F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),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:v(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):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(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 f=-1;for(o=r;o<s;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function y(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 TypeErro
|
|||
|
/** PROMISIFY CALLBACK-STYLE FUNCTIONS TO ES6 PROMISES
|
|||
|
*
|
|||
|
* EXAMPLE:
|
|||
|
* const fn = promisify( (callback) => callback(null, "Hello world!") );
|
|||
|
* fn((err, str) => console.log(str));
|
|||
|
* fn().then((str) => console.log(str));
|
|||
|
* //Both functions, will log 'Hello world!'
|
|||
|
*
|
|||
|
* Note: The function you pass, may have any arguments you want, but the latest
|
|||
|
* have to be the callback, which you will call with: next(err, value)
|
|||
|
*
|
|||
|
* @param method: Function/Array/Map = The function(s) to promisify
|
|||
|
* @param options: Map =
|
|||
|
* "context" (default is function): The context which to apply the called function
|
|||
|
* "replace" (default is falsy): When passed an array/map, if to replace the original object
|
|||
|
*
|
|||
|
* @return: A promise if passed a function, otherwise the object with the promises
|
|||
|
*
|
|||
|
* @license: MIT
|
|||
|
* @version: 1.0.3
|
|||
|
* @author: Manuel Di Iorio
|
|||
|
**/
|
|||
|
var n=function(t,e){return function(){var r=Array.prototype.slice.call(arguments),n=r.length-1,i=r&&r.length>0?r[n]:null;return("function"==typeof i?i:null)?t.apply(e,r):new Promise(function(n,i){r.push(function(t,e){if(t)return i(t);n(e)}),t.apply(e,r)})}};t.exports=function(t,e){e=e||{};var r=Object.prototype.toString.call(t);if("[object Object]"===r||"[object Array]"===r){var i=e.replace?t:{};for(var o in t)t.hasOwnProperty(o)&&(i[o]=n(t[o]));return i}return n(t,e.context||t)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){var n=r(0),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 n(t,e){e|=0;for(var r=Math.max(t.length-e,0),n=Array(r),i=0;i<r;i++)n[i]=t[e+i];return n}r.d(e,"a",function(){return n})},function(t,e){t.exports={options:{usePureJavaScript:!1}}},function(t,e,r){(function(e,n,i){var o=r(5),a=r(782),s=t.exports=o.util=o.util||{};function u(t){if(8!==t&&16!==t&&24!==t&&32!==t)throw new Error("Only 8, 16, 24, or 32 bits supported: "+t)}function c(t){if(this.data="",this.read=0,"string"==typeof t)this.data=t;else if(s.isArrayBuffer(t)||s.isArrayBufferView(t))if(void 0!==i&&t instanceof i)this.data=t.toString("binary");else{var e=new Uint8Array(t);try{this.data=String.fromCharCode.apply(null,e)}catch(t){for(var r=0;r<e.length;++r)this.putByte(e[r])}}else(t instanceof c||"object"==typeof t&&"string"==typeof t.data&&"number"==typeof t.read)&&(this.data=t.data,this.read=t.read);this._constructedStringLength=0}!function(){if(void 0!==e&&e.nextTick&&!e.browser)return s.nextTick=e.nextTick,void(s.setImmediate="function"==typeof n?n:s.nextTick);if("function"==typeof n)return s.setImmediate=function(){return n.apply(void 0,arguments)},void(s.nextTick=function(t){return n(t)});if(s.setImmediate=function(t){setTimeout(t,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var t="forge.setImmediate",r=[];s.setImmediate=function(e){r.push(e),1===r.length&&window.postMessage(t,"*")},window.addEventListener("message",function(e){if(e.source===window&&e.data===t){e.stopPropagation();var n=r.slice();r.length=0,n.forEach(function(t){t()})}},!0)}if("undefined"!=typeof MutationObserver){var i=Date.now(),o=!0,a=document.createElement("div");r=[];new MutationObserver(function(){var t=r.slice();r.length=0,t.forEach(function(t){t()})}).observe(a,{attributes:!0});var u=s.setImmediate;s.setImmediate=function(t){Date.now()-i>15?(i=Date.now(),u(t)):(r.push(t),1===r.length&&a.setAttribute("a",o=!o))}}s.nextTick=s.setImmediate}(),s.isNodejs=void 0!==e&&e.versions&&e.versions.node,s.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},s.isArrayBufferView=function(t){return t&&s.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},s.ByteBuffer=c,s.ByteStringBuffer=c;s.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},s.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},s.
|
|||
|
/*!
|
|||
|
* The buffer module from node.js, for the browser.
|
|||
|
*
|
|||
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
function n(t,e){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}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=r(40),a=Object.prototype.hasOwnProperty,s=Array.prototype.slice,u="foo"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function f(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var l=t.exports=v,h=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(h);return e&&e[1]}}function p(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function m(t){if(u||!o.isFunction(t))return o.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function g(t,e,r,n,i){throw new l.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function v(t,e){t||g(t,!0,e,"==",l.ok)}function y(t,e,r,a){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(f(t)&&f(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(a=a||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===a.expected.indexOf(e)||(a.actual.push(t),a.expected.push(e),function(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=b(t),a=b(e);if(i&&!a||!i&&a)return!1;if(i)return t=s.call(t),e=s.call(e),y(t,e,r);var u,c,f=k(t),l=k(e);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),c=f.length-1;c>=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(u=f[c],!y(t[u],e[u],r,n))return!1;return!0}(t,e,r,a))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&g(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!t&&o.isError(i),u=!t&&i&&!r;if((s&&a&&w(i,r)||u)&&g(i,r,"Got unwanted exception"+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}l.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return p(m(t.actual),128)+" "+t.operator+" "+p(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},o.inherits(l.AssertionError,Error),l.fail=g,l.ok=v,l.equal=function(t,e,r){t!=e&&g(t,e,r,"==",l.equal)},l.notEqual=function(t,e,r){t==e&&g(t,e,r,"!=",l.notEqual)},l.deepEqual=function(t,e,r){y(t,e,!1)||g(t,e,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(t,e,r){y(t,e,!0)||g(t,e,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(t,e,r){y(t,e,!1)&&g(t,e,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&g(e,r,n,"notDeepStrictEqual",t)},l.strictEqual=function(t,e,r){t!==e&&g(t,e,r,"===",l.strictEqual)},l.notStrictEqual=function(
|
|||
|
/*
|
|||
|
object-assign
|
|||
|
(c) Sindre Sorhus
|
|||
|
@license MIT
|
|||
|
*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(s[c]=r[c]);if(n){a=n(r);for(var f=0;f<a.length;f++)o.call(r,a[f])&&(s[a[f]]=r[a[f]])}}return s}},function(t,e,r){var n=r(70),i=r(20)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?r:o?n(e):"Object"==(a=n(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,r){var n=r(31);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,r){var n=r(68),i=r(20)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[i]===t)}},function(t,e,r){var n=r(202),i=r(20)("iterator"),o=r(68);t.exports=r(12).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[n(t)]}},function(t,e,r){var n=r(31),i=r(93),o=r(20)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||void 0==(r=n(a)[o])?e:i(r)}},function(t,e,r){var n,i,o,a=r(53),s=r(386),u=r(194),c=r(125),f=r(17),l=f.process,h=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,m=f.Dispatch,g=0,v={},y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},b=function(t){y.call(t.data)};h&&d||(h=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return v[++g]=function(){s("function"==typeof t?t:Function(t),e)},n(g),g},d=function(t){delete v[t]},"process"==r(70)(l)?n=function(t){l.nextTick(a(y,t,1))}:m&&m.now?n=function(t){m.now(a(y,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,n=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):n="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:h,clear:d}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,r){var n=r(31),i=r(37),o=r(139);t.exports=function(t,e){if(n(t),i(e)&&e.constructor===t)return e;var r=o.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){var n=r(20)("iterator"),i=!1;try{var o=[7][n]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var r=!1;try{var o=[7],a=o[n]();a.next=function(){return{done:r=!0}},o[n]=function(){return a},t(o)}catch(t){}return r}},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(403),i=r(404);t.exports=function(t){if("string"==typeof t||"number"==typeof t){var e=new n(1),r=String(t).toLowerCase().trim(),o="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),a=i(r);if("-"===a.substr(0,1)&&(a=i(a.slice(1)),e=new n(-1,10)),!(a=""===a?"0":a).match(/^-?[0-9]+$/)&&a.match(/^[0-9A-Fa-f]+$/)||a.match(/^[a-fA-F]+$/)||!0===o&&a.match(/^[0-9A-Fa-f]+$/))return new n(a,16).mul(e);if((a.match(/^-?[0-9]+$/)||""===a)&&!1===o)return new n(a,10).mul(e)}else if("object"==typeof t&&t.toString&&!t.pop&&!t.push&&t.toString(10).match(/^-?[0-9]+$/)&&(t.mul||t.dividedToIntegerBy))return new n(t.toString(10),10);throw new Error("
|
|||
|
/*
|
|||
|
object-assign
|
|||
|
(c) Sindre Sorhus
|
|||
|
@license MIT
|
|||
|
*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(s[c]=r[c]);if(n){a=n(r);for(var f=0;f<a.length;f++)o.call(r,a[f])&&(s[a[f]]=r[a[f]])}}return s}},function(t,e,r){r(557);var n=function(t,e){return parseInt(t.slice(2*e+2,2*e+4),16)},i=function(t){return(t.length-2)/2},o=function(t){for(var e=[],r=2,n=t.length;r<n;r+=2)e.push(parseInt(t.slice(r,r+2),16));return e},a=function(t){for(var e="0x",r=0,n=t.length;r<n;++r){var i=t[r];e+=(i<16?"0":"")+i.toString(16)}return e};t.exports={random:function(t){var e=void 0;e="undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?window.crypto.getRandomValues(new Uint8Array(t)):r(100).randomBytes(t);for(var n="0x",i=0;i<t;++i)n+=("00"+e[i].toString(16)).slice(-2);return n},length:i,concat:function(t,e){return t.concat(e.slice(2))},flatten:function(t){return"0x"+t.reduce(function(t,e){return t+e.slice(2)},"")},slice:function(t,e,r){return"0x"+r.slice(2*t+2,2*e+2)},reverse:function(t){for(var e="0x",r=0,n=i(t);r<n;++r)e+=t.slice(2*(n-r),2*(n-r+1));return e},pad:function t(e,r){return r.length===2*e+2?r:t(e,"0x0"+r.slice(2))},padRight:function t(e,r){return r.length===2*e+2?r:t(e,r+"0")},fromAscii:function(t){for(var e="0x",r=0;r<t.length;++r)e+=("00"+t.charCodeAt(r).toString(16)).slice(-2);return e},toAscii:function(t){for(var e="",r=2;r<t.length;r+=2)e+=String.fromCharCode(parseInt(t.slice(r,r+2),16));return e},fromString:function(t){for(var e=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},r="0x",n=0;n!=t.length;n++){var i=t.charCodeAt(n);if(i<128)r+=e(i);else{if(i<2048)r+=e(i>>6|192);else{if(i>55295&&i<56320){if(++n==t.length)return null;var o=t.charCodeAt(n);if(o<56320||o>57343)return null;r+=e((i=65536+((1023&i)<<10)+(1023&o))>>18|240),r+=e(i>>12&63|128)}else r+=e(i>>12|224);r+=e(i>>6&63|128)}r+=e(63&i|128)}}return r},toString:function(t){for(var e="",r=0,o=i(t);r<o;){var a=n(t,r++);if(a>127){if(a>191&&a<224){if(r>=o)return null;a=(31&a)<<6|63&n(t,r)}else if(a>223&&a<240){if(r+1>=o)return null;a=(15&a)<<12|(63&n(t,r))<<6|63&n(t,++r)}else{if(!(a>239&&a<248))return null;if(r+2>=o)return null;a=(7&a)<<18|(63&n(t,r))<<12|(63&n(t,++r))<<6|63&n(t,++r)}++r}if(a<=65535)e+=String.fromCharCode(a);else{if(!(a<=1114111))return null;a-=65536,e+=String.fromCharCode(a>>10|55296),e+=String.fromCharCode(1023&a|56320)}}return e},fromNumber:function(t){var e=t.toString(16);return e.length%2==0?"0x"+e:"0x0"+e},toNumber:function(t){return parseInt(t.slice(2),16)},fromNat:function(t){return"0x0"===t?"0x":t.length%2==0?t:"0x0"+t.slice(2)},toNat:function(t){return"0"===t[2]?"0x"+t.slice(3):t},fromArray:a,toArray:o,fromUint8Array:function(t){return a([].slice.call(t,0))},toUint8Array:function(t){return new Uint8Array(o(t))}}},function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/
|
|||
|
/** @license React v16.7.0
|
|||
|
* react.production.min.js
|
|||
|
*
|
|||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
*
|
|||
|
* This source code is licensed under the MIT license found in the
|
|||
|
* LICENSE file in the root directory of this source tree.
|
|||
|
*/var n=r(201),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,f=i?Symbol.for("react.provider"):60109,l=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.concurrent_mode"):60111,d=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,m=i?Symbol.for("react.memo"):60115,g=i?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function y(t){for(var e=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=0;n<e;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(t,e,r,n,i,o,a,s){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],c=0;(t=Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w={};function _(t,e,r){this.props=t,this.context=e,this.refs=w,this.updater=r||b}function k(){}function S(t,e,r){this.props=t,this.context=e,this.refs=w,this.updater=r||b}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&y("85"),this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},k.prototype=_.prototype;var E=S.prototype=new k;E.constructor=S,n(E,_.prototype),E.isPureReactComponent=!0;var x={current:null,currentDispatcher:null},M=Object.prototype.hasOwnProperty,A={key:!0,ref:!0,__self:!0,__source:!0};function C(t,e,r){var n=void 0,i={},a=null,s=null;if(null!=e)for(n in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)M.call(e,n)&&!A.hasOwnProperty(n)&&(i[n]=e[n]);var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){for(var c=Array(u),f=0;f<u;f++)c[f]=arguments[f+2];i.children=c}if(t&&t.defaultProps)for(n in u=t.defaultProps)void 0===i[n]&&(i[n]=u[n]);return{$$typeof:o,type:t,key:a,ref:s,props:i,_owner:x.current}}function T(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var I=/\/+/g,B=[];function N(t,e,r,n){if(B.length){var i=B.pop();return i.result=t,i.keyPrefix=e,i.func=r,i.context=n,i.count=0,i}return{result:t,keyPrefix:e,func:r,context:n,count:0}}function O(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>B.length&&B.push(t)}function R(t,e,r){return null==t?0:function t(e,r,n,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return n(i,e,""===r?"."+P(e,0):r),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var f=r+P(s=e[c],c);u+=t(s,f,n,i)}else if(f=null===e||"object"!=typeof e?null:"function"==typeof(f=v&&e[v]||e["@@iterator"])?f:null,"function"==typeof f)for(e=f.call(e),c=0;!(s=e.next()).done;)u+=t(s=s.value,f=r+P(s,c++),n,i);else"object"===s&&y("31","[object Object]"==(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return u}(t,"",e,r)}function P(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function j(t,e){t.func.call(t.context,e,t.count++)}function L(t,e,r){var n=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?D(t,n,r,function(t){return t}):null!=t&&(T(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(I,"$&/")+"/")+r)),n.push(t))}function D(t,e,r,n,
|
|||
|
/** @license React v16.7.0
|
|||
|
* react-dom.production.min.js
|
|||
|
*
|
|||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
*
|
|||
|
* This source code is licensed under the MIT license found in the
|
|||
|
* LICENSE file in the root directory of this source tree.
|
|||
|
*/var n=r(11),i=r(201),o=r(379);function a(t){for(var e=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=0;n<e;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(t,e,r,n,i,o,a,s){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,i,o,a,s],c=0;(t=Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}n||a("227");var s=!1,u=null,c=!1,f=null,l={onError:function(t){s=!0,u=t}};function h(t,e,r,n,i,o,a,c,f){s=!1,u=null,function(t,e,r,n,i,o,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(t){this.onError(t)}}.apply(l,arguments)}var d=null,p={};function m(){if(d)for(var t in p){var e=p[t],r=d.indexOf(t);if(-1<r||a("96",t),!v[r])for(var n in e.extractEvents||a("97",t),v[r]=e,r=e.eventTypes){var i=void 0,o=r[n],s=e,u=n;y.hasOwnProperty(u)&&a("99",u),y[u]=o;var c=o.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&g(c[i],s,u);i=!0}else o.registrationName?(g(o.registrationName,s,u),i=!0):i=!1;i||a("98",n,t)}}}function g(t,e,r){b[t]&&a("100",t),b[t]=e,w[t]=e.eventTypes[r].dependencies}var v=[],y={},b={},w={},_=null,k=null,S=null;function E(t,e,r){var n=t.type||"unknown-event";t.currentTarget=S(r),function(t,e,r,n,i,o,l,d,p){if(h.apply(this,arguments),s){if(s){var m=u;s=!1,u=null}else a("198"),m=void 0;c||(c=!0,f=m)}}(n,e,void 0,t),t.currentTarget=null}function x(t,e){return null==e&&a("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function M(t,e,r){Array.isArray(t)?t.forEach(e,r):t&&e.call(r,t)}var A=null;function C(t){if(t){var e=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(e))for(var n=0;n<e.length&&!t.isPropagationStopped();n++)E(t,e[n],r[n]);else e&&E(t,e,r);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}var T={injectEventPluginOrder:function(t){d&&a("101"),d=Array.prototype.slice.call(t),m()},injectEventPluginsByName:function(t){var e,r=!1;for(e in t)if(t.hasOwnProperty(e)){var n=t[e];p.hasOwnProperty(e)&&p[e]===n||(p[e]&&a("102",e),p[e]=n,r=!0)}r&&m()}};function I(t,e){var r=t.stateNode;if(!r)return null;var n=_(r);if(!n)return null;r=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(n=!n.disabled)||(n=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!n;break t;default:t=!1}return t?null:(r&&"function"!=typeof r&&a("231",e,typeof r),r)}function B(t){if(null!==t&&(A=x(A,t)),t=A,A=null,t&&(M(t,C),A&&a("95"),c))throw t=f,c=!1,f=null,t}var N=Math.random().toString(36).slice(2),O="__reactInternalInstance$"+N,R="__reactEventHandlers$"+N;function P(t){if(t[O])return t[O];for(;!t[O];){if(!t.parentNode)return null;t=t.parentNode}return 5===(t=t[O]).tag||6===t.tag?t:null}function j(t){return!(t=t[O])||5!==t.tag&&6!==t.tag?null:t}function L(t){if(5===t.tag||6===t.tag)return t.stateNode;a("33")}function D(t){return t[R]||null}function U(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function F(t,e,r){(e=I(t,r.dispatchConfig.phasedRegistrationNames[e]))&&(r._dispatchListeners=x(r._dispatchListeners,e),r._dispatchInstances=x(r._dispatchInstances,t))}function K(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,r=[];e;)r.push(e),e=U(e);for(e=r.length;0<e--;)F(r[e],"captured",t);for(e=0;e<r.length;e++)F(r[e],"bubbled",t)}}function q(t,e,r){t&&r&&r.dispatchConfig.registrationName&&(e=I(t,r.dispatchConfig.registrationName))&&(r._dispatchListeners=x(r._dispatchListeners,e),r._dispatchInstances=x(r._dispatchInstances,t))}function z(t){t&&t.dispatchConfig.registrationName&
|
|||
|
/** @license React v0.12.0
|
|||
|
* scheduler.production.min.js
|
|||
|
*
|
|||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
*
|
|||
|
* This source code is licensed under the MIT license found in the
|
|||
|
* LICENSE file in the root directory of this source tree.
|
|||
|
*/
|
|||
|
Object.defineProperty(e,"__esModule",{value:!0});var r=null,n=!1,i=3,o=-1,a=-1,s=!1,u=!1;function c(){if(!s){var t=r.expirationTime;u?S():u=!0,k(h,t)}}function f(){var t=r,e=r.next;if(r===e)r=null;else{var n=r.previous;r=n.next=e,e.previous=n}t.next=t.previous=null,n=t.callback,e=t.expirationTime,t=t.priorityLevel;var o=i,s=a;i=t,a=e;try{var u=n()}finally{i=o,a=s}if("function"==typeof u)if(u={callback:u,priorityLevel:t,expirationTime:e,next:null,previous:null},null===r)r=u.next=u.previous=u;else{n=null,t=r;do{if(t.expirationTime>=e){n=t;break}t=t.next}while(t!==r);null===n?n=r:n===r&&(r=u,c()),(e=n.previous).next=n.previous=u,u.next=n,u.previous=e}}function l(){if(-1===o&&null!==r&&1===r.priorityLevel){s=!0;try{do{f()}while(null!==r&&1===r.priorityLevel)}finally{s=!1,null!==r?c():u=!1}}}function h(t){s=!0;var i=n;n=t;try{if(t)for(;null!==r;){var o=e.unstable_now();if(!(r.expirationTime<=o))break;do{f()}while(null!==r&&r.expirationTime<=o)}else if(null!==r)do{f()}while(null!==r&&!E())}finally{s=!1,n=i,null!==r?c():u=!1,l()}}var d,p,m=Date,g="function"==typeof setTimeout?setTimeout:void 0,v="function"==typeof clearTimeout?clearTimeout:void 0,y="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,b="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function w(t){d=y(function(e){v(p),t(e)}),p=g(function(){b(d),t(e.unstable_now())},100)}if("object"==typeof performance&&"function"==typeof performance.now){var _=performance;e.unstable_now=function(){return _.now()}}else e.unstable_now=function(){return m.now()};var k,S,E,x=null;if("undefined"!=typeof window?x=window:void 0!==t&&(x=t),x&&x._schedMock){var M=x._schedMock;k=M[0],S=M[1],E=M[2],e.unstable_now=M[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var A=null,C=function(t){if(null!==A)try{A(t)}finally{A=null}};k=function(t){null!==A?setTimeout(k,0,t):(A=t,setTimeout(C,0,!1))},S=function(){A=null},E=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var T=null,I=!1,B=-1,N=!1,O=!1,R=0,P=33,j=33;E=function(){return R<=e.unstable_now()};var L=new MessageChannel,D=L.port2;L.port1.onmessage=function(){I=!1;var t=T,r=B;T=null,B=-1;var n=e.unstable_now(),i=!1;if(0>=R-n){if(!(-1!==r&&r<=n))return N||(N=!0,w(U)),T=t,void(B=r);i=!0}if(null!==t){O=!0;try{t(i)}finally{O=!1}}};var U=function(t){if(null!==T){w(U);var e=t-R+j;e<j&&P<j?(8>e&&(e=8),j=e<P?P:e):P=e,R=t+j,I||(I=!0,D.postMessage(void 0))}else N=!1};k=function(t,e){T=t,B=e,O||0>e?D.postMessage(void 0):N||(N=!0,w(U))},S=function(){T=null,I=!1,B=-1}}e.unstable_ImmediatePriority=1,e.unstable_UserBlockingPriority=2,e.unstable_NormalPriority=3,e.unstable_IdlePriority=5,e.unstable_LowPriority=4,e.unstable_runWithPriority=function(t,r){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=i,a=o;i=t,o=e.unstable_now();try{return r()}finally{i=n,o=a,l()}},e.unstable_scheduleCallback=function(t,n){var a=-1!==o?o:e.unstable_now();if("object"==typeof n&&null!==n&&"number"==typeof n.timeout)n=a+n.timeout;else switch(i){case 1:n=a+-1;break;case 2:n=a+250;break;case 5:n=a+1073741823;break;case 4:n=a+1e4;break;default:n=a+5e3}if(t={callback:t,priorityLevel:i,expirationTime:n,next:null,previous:null},null===r)r=t.next=t.previous=t,c();else{a=null;var s=r;do{if(s.expirationTime>n){a=s;break}s=s.next}while(s!==r);null===a?a=r:a===r&&(r=t,c()),(n=a.previous).next=a.previous=t,t.next=a,t.previous=n}return t},e.unstable_cancelCallback=function(t){var e=t.next;if(null!==e){if(e===t)r=null;else{t===r&&(r=e);var n=t.previous;n.next=e,e.previous=n}t.next=t.previous=null}},e.unstable_wrapCallback=function(t){var r=i;return function(){var n=i,a=o;i=r,o=e.unstable_now();try{return t.apply(this,arguments)}finally{i=n,o=a,l()}}},e.unsta
|
|||
|
/**
|
|||
|
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|||
|
*
|
|||
|
* @version 0.7.0
|
|||
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|||
|
* @copyright Chen, Yi-Cyuan 2015-2017
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
/**
|
|||
|
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|||
|
*
|
|||
|
* @version 0.7.0
|
|||
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|||
|
* @copyright Chen, Yi-Cyuan 2015-2017
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
!function(){"use strict";var a="input is invalid type",s="object"==typeof window,u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"==typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?u=i:c&&(u=self);var f=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeof t&&t.exports,l=r(718),h=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),p=[4,1024,262144,67108864],m=[0,8,16,24],g=[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],v=[224,256,384,512],y=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!h||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var _=function(t,e,r){return function(n){return new j(t,e,t).update(n)[r]()}},k=function(t,e,r){return function(n,i){return new j(t,e,i).update(n)[r]()}},S=function(t,e,r){return function(e,n,i,o){return C["cshake"+t].update(e,n,i,o)[r]()}},E=function(t,e,r){return function(e,n,i,o){return C["kmac"+t].update(e,n,i,o)[r]()}},x=function(t,e,r,n){for(var i=0;i<b.length;++i){var o=b[i];t[o]=e(r,n,o)}return t},M=function(t,e){var r=_(t,e,"hex");return r.create=function(){return new j(t,e,t)},r.update=function(t){return r.create().update(t)},x(r,_,t,e)},A=[{name:"keccak",padding:[1,256,65536,16777216],bits:v,createMethod:M},{name:"sha3",padding:[6,1536,393216,100663296],bits:v,createMethod:M},{name:"shake",padding:[31,7936,2031616,520093696],bits:y,createMethod:function(t,e){var r=k(t,e,"hex");return r.create=function(r){return new j(t,e,r)},r.update=function(t,e){return r.create(e).update(t)},x(r,k,t,e)}},{name:"cshake",padding:p,bits:y,createMethod:function(t,e){var r=w[t],n=S(t,0,"hex");return n.create=function(n,i,o){return i||o?new j(t,e,n).bytepad([i,o],r):C["shake"+t].create(n)},n.update=function(t,e,r,i){return n.create(e,r,i).update(t)},x(n,S,t,e)}},{name:"kmac",padding:p,bits:y,createMethod:function(t,e){var r=w[t],n=E(t,0,"hex");return n.create=function(n,i,o){return new L(t,e,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(t,e,r,i){return n.create(t,r,i).update(e)},x(n,E,t,e)}}],C={},T=[],I=0;I<A.length;++I)for(var B=A[I],N=B.bits,O=0;O<N.length;++O){var R=B.name+"_"+N[O];if(T.push(R),C[R]=B.createMethod(N[O],B.padding),"sha3"!==B.name){var P=B.name+N[O];T.push(P),C[P]=C[R]}}function j(t,e,r){this.blocks=[],this.s=[],this.padding=e,this.outputBits=r,this.reset=!0,this.finalized=!1,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}function L(t,e,r){j.call(this,t,e,r)}j.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw a;if(null===t)throw a;if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||h&&ArrayBuffer.isView(t)))throw a;e=!0}for(var n,i,o=this.blocks,s=this.byteCount,u=t.length,c=this.blockCount,f=0,l=this.s;f<u;){if(this.reset)for(this.reset=!1,o[0]=this.block,n=1;n<c+1;++n)o[n]=0;if(e)for(n=this.start;f<u&&n<s;++f)o[n>>2]|=t[f]<<m[3&n++];else for(n=this.start;f<u&&n<s;++f)(i=t.charCodeAt(f))<128?o[n>>2]|=i<<m[3&n++]:i<2048?(o[n>>2]|=(192|i>>6)<<m[3&n++],o[n>>2]|=(128|63&i)<<m[3&n++]):i<55296||i>=57344?(o[n>>2]|=(224|i>>12)<<m[3&n++],o[n>>2]|=(128|i>>6&63)<<m[3&n++],o[n>>2]|=(128|63&i)<<m[3&n++]):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++f)),o[n>>2]|=(240|i>>18)<<m[3&n++],o[n>>2]|=(128|i>>12&63)<<m[3&n++],o[n>>2]|=(128|i>>6&63)<<m[3&n++],o[n>>2]|=(128|63&i)<<m[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.bl
|
|||
|
//! stable.js 0.1.8, https://github.com/Two-Screen/stable
|
|||
|
//! © 2018 Angry Bytes and contributors. MIT licensed.
|
|||
|
t.exports=function(){"use strict";var t=function(t,r){return e(t.slice(),r)};function e(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var n=t.length;if(n<=1)return t;for(var i=new Array(n),o=1;o<n;o*=2){r(t,e,o,i);var a=t;t=i,i=a}return t}t.inplace=function(t,n){var i=e(t,n);return i!==t&&r(i,null,t.length,t),t};var r=function(t,e,r,n){var i,o,a,s,u,c=t.length,f=0,l=2*r;for(i=0;i<c;i+=l)for(a=(o=i+r)+r,o>c&&(o=c),a>c&&(a=c),s=i,u=o;;)if(s<o&&u<a)e(t[s],t[u])<=0?n[f++]=t[s++]:n[f++]=t[u++];else if(s<o)n[f++]=t[s++];else{if(!(u<a))break;n[f++]=t[u++]}};return t}()},function(t,e,r){var n=r(730),i=r(732);t.exports=n,t.exports.parse=n,t.exports.stringify=i},function(t,e,r){var n=r(731),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(t){for(var e={};t.length;)switch(t[0]){case"[":case",":t.shift();var r=t.shift();if("("===r&&(r=t.shift(),t.shift()),"="!==t[0])throw new Error("Unexpected token in field options: "+t[0]);if(t.shift(),"]"===t[0])throw new Error("Unexpected ] in field option");e[r]=t.shift();break;case"]":return t.shift(),e;default:throw new Error("Unexpected token in field options: "+t[0])}throw new Error("No closing tag for field options")},a=function(t){for(var e={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};t.length;)switch(t[0]){case"=":t.shift(),e.tag=Number(t.shift());break;case"map":if(e.type="map",e.map={from:null,to:null},t.shift(),"<"!==t[0])throw new Error("Unexpected token in map type: "+t[0]);if(t.shift(),e.map.from=t.shift(),","!==t[0])throw new Error("Unexpected token in map type: "+t[0]);if(t.shift(),e.map.to=t.shift(),">"!==t[0])throw new Error("Unexpected token in map type: "+t[0]);t.shift(),e.name=t.shift();break;case"repeated":case"required":case"optional":var r=t.shift();e.required="required"===r,e.repeated="repeated"===r,e.type=t.shift(),e.name=t.shift();break;case"[":e.options=o(t);break;case";":if(null===e.name)throw new Error("Missing field name");if(null===e.type)throw new Error("Missing type in message field: "+e.name);if(-1===e.tag)throw new Error("Missing tag number in message field: "+e.name);return t.shift(),e;default:throw new Error("Unexpected token in message field: "+t[0])}throw new Error("No ; found for message field")},s=function(t){for(var e={enums:[],messages:[],fields:[],extends:[],extensions:null};t.length;)switch(t[0]){case"map":case"repeated":case"optional":case"required":e.fields.push(a(t));break;case"enum":e.enums.push(p(t));break;case"message":e.messages.push(f(t));break;case"extensions":e.extensions=c(t);break;case"oneof":t.shift();var r=t.shift();if("{"!==t[0])throw new Error("Unexpected token in oneof: "+t[0]);for(t.shift();"}"!==t[0];){t.unshift("optional");var n=a(t);n.oneof=r,e.fields.push(n)}t.shift();break;case"extend":e.extends.push(u(t));break;case";":t.shift();break;case"reserved":case"option":for(t.shift();";"!==t[0];)t.shift();break;default:t.unshift("optional"),e.fields.push(a(t))}return e},u=function(t){return{name:t[1],message:f(t)}},c=function(t){t.shift();var e=Number(t.shift());if(isNaN(e))throw new Error("Invalid from in extensions definition");if("to"!==t.shift())throw new Error("Expected keyword 'to' in extensions definition");var r=t.shift();if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition");if(";"!==t.shift())throw new Error("Missing ; in extensions definition");return{from:e,to:r}},f=function(t){t.shift();var e=1,r=[],n={name:t.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==t[0])throw new Error("Expected { but found "+t[0]);for(t.shift();t.length;){if("{"===t[0]?e++:"}"===t[0]&&e--,!e)return t.shift(),r=s(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n;r.push(t.shift())}if(e)throw new Error("No closing tag for message")},l=function(t){t.shift();var e=t.shift();if(";"!==t[0])throw new Error("Expected ; but found "+t[0]);return t.shift(),e},h=function(t){if(t.shift(),"
|
|||
|
/**
|
|||
|
* @license
|
|||
|
* Lodash <https://lodash.com/>
|
|||
|
* Copyright JS Foundation and other contributors <https://js.foundation/>
|
|||
|
* Released under MIT license <https://lodash.com/license>
|
|||
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|||
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|||
|
*/(function(){var o,a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="__lodash_hash_undefined__",f=500,l="__lodash_placeholder__",h=1,d=2,p=4,m=1,g=2,v=1,y=2,b=4,w=8,_=16,k=32,S=64,E=128,x=256,M=512,A=30,C="...",T=800,I=16,B=1,N=2,O=1/0,R=9007199254740991,P=1.7976931348623157e308,j=NaN,L=4294967295,D=L-1,U=L>>>1,F=[["ary",E],["bind",v],["bindKey",y],["curry",w],["curryRight",_],["flip",M],["partial",k],["partialRight",S],["rearg",x]],K="[object Arguments]",q="[object Array]",z="[object AsyncFunction]",V="[object Boolean]",H="[object Date]",G="[object DOMException]",W="[object Error]",Y="[object Function]",Z="[object GeneratorFunction]",$="[object Map]",Q="[object Number]",X="[object Null]",J="[object Object]",tt="[object Proxy]",et="[object RegExp]",rt="[object Set]",nt="[object String]",it="[object Symbol]",ot="[object Undefined]",at="[object WeakMap]",st="[object WeakSet]",ut="[object ArrayBuffer]",ct="[object DataView]",ft="[object Float32Array]",lt="[object Float64Array]",ht="[object Int8Array]",dt="[object Int16Array]",pt="[object Int32Array]",mt="[object Uint8Array]",gt="[object Uint8ClampedArray]",vt="[object Uint16Array]",yt="[object Uint32Array]",bt=/\b__p \+= '';/g,wt=/\b(__p \+=) '' \+/g,_t=/(__e\(.*?\)|\b__t\)) \+\n'';/g,kt=/&(?:amp|lt|gt|quot|#39);/g,St=/[&<>"']/g,Et=RegExp(kt.source),xt=RegExp(St.source),Mt=/<%-([\s\S]+?)%>/g,At=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g,Tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,It=/^\w*$/,Bt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nt=/[\\^$.*+?()[\]{}|]/g,Ot=RegExp(Nt.source),Rt=/^\s+|\s+$/g,Pt=/^\s+/,jt=/\s+$/,Lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Dt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ut=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kt=/\\(\\)?/g,qt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zt=/\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Ht=/^0b[01]+$/i,Gt=/^\[object .+?Constructor\]$/,Wt=/^0o[0-7]+$/i,Yt=/^(?:0|[1-9]\d*)$/,Zt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$t=/($^)/,Qt=/['\n\r\u2028\u2029\\]/g,Xt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Jt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Jt+"]",re="["+Xt+"]",ne="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",ae="[^\\ud800-\\udfff"+Jt+ne+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",se="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",ce="(?:\\ud83c[\\udde6-\\uddff]){2}",fe="[\\ud800-\\udbff][\\udc00-\\udfff]",le="[A-Z\\xc0-\\xd6\\xd8-\\xde]",he="(?:"+oe+"|"+ae+")",de="(?:"+le+"|"+ae+")",pe="(?:"+re+"|"+se+")"+"?",me="[\\ufe0e\\ufe0f]?"+pe+("(?:\\u200d(?:"+[ue,ce,fe].join("|")+")[\\ufe0e\\ufe0f]?"+pe+")*"),ge="(?:"+[ie,ce,fe].join("|")+")"+me,ve="(?:"+[ue+re+"?",re,ce,fe,te].join("|")+")",ye=RegExp("['’]","g"),be=RegExp(re,"g"),we=RegExp(se+"(?="+se+")|"+ve+me,"g"),_e=RegExp([le+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,le,"$"].join("|")+")",de+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,le+he,"$"].join("|")+")",le+"?"+he+"+(?:['’](?:d|ll|m|re|s|t|ve))?",le+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ne,ge].join("|"),"g"),ke=RegExp("[\\u200d\\ud800-\\udfff"+Xt+"\\ufe0e\\ufe0f]"),Se=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xe=-1,Me={};Me[ft]=Me[lt]=Me[ht]=Me[dt]=Me[pt]=Me[mt]=Me[gt]=Me[vt]=Me[yt]=!0,Me[K]=Me[q]=Me[ut]=Me[V]=Me[ct]=Me[H]=Me[W]=Me[Y]=Me[$]=Me[Q]=Me[J]=Me[et]=Me[rt]=M
|
|||
|
/**
|
|||
|
* @file Web Cryptography API shim
|
|||
|
* @author Artem S Vybornov <vybornov@gmail.com>
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
t.exports=function(t){"use strict";if("function"!=typeof Promise)throw"Promise support required";var e=t.crypto||t.msCrypto;if(e){var r=e.subtle||e.webkitSubtle;if(r){var n=t.Crypto||e.constructor||Object,i=t.SubtleCrypto||r.constructor||Object,o=(t.CryptoKey||t.Key||Object,t.navigator.userAgent.indexOf("Edge/")>-1),a=!!t.msCrypto&&!o,s=!e.subtle&&!!e.webkitSubtle;if(a||s){var u={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},c={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(t){var n=r[t];r[t]=function(i,o,u){var c,f,b,S,E=[].slice.call(arguments);switch(t){case"generateKey":c=m(i),f=o,b=u;break;case"importKey":c=m(u),f=E[3],b=E[4],"jwk"===i&&((o=v(o)).alg||(o.alg=g(c)),o.key_ops||(o.key_ops="oct"!==o.kty?"d"in o?b.filter(k):b.filter(_):b.slice()),E[1]=function(t){var e=v(t);return a&&(e.extractable=e.ext,delete e.ext),d(unescape(encodeURIComponent(JSON.stringify(e)))).buffer}(o));break;case"unwrapKey":c=E[4],f=E[5],b=E[6],E[2]=u._key}if("generateKey"===t&&"HMAC"===c.name&&c.hash)return c.length=c.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[c.hash.name],r.importKey("raw",e.getRandomValues(new Uint8Array(c.length+7>>3)),c,f,b);if(s&&"generateKey"===t&&"RSASSA-PKCS1-v1_5"===c.name&&(!c.modulusLength||c.modulusLength>=2048))return(i=m(i)).name="RSAES-PKCS1-v1_5",delete i.hash,r.generateKey(i,!0,["encrypt","decrypt"]).then(function(t){return Promise.all([r.exportKey("jwk",t.publicKey),r.exportKey("jwk",t.privateKey)])}).then(function(t){return t[0].alg=t[1].alg=g(c),t[0].key_ops=b.filter(_),t[1].key_ops=b.filter(k),Promise.all([r.importKey("jwk",t[0],c,!0,t[0].key_ops),r.importKey("jwk",t[1],c,f,t[1].key_ops)])}).then(function(t){return{publicKey:t[0],privateKey:t[1]}});if((s||a&&"SHA-1"===(c.hash||{}).name)&&"importKey"===t&&"jwk"===i&&"HMAC"===c.name&&"oct"===o.kty)return r.importKey("raw",d(h(o.k)),u,E[3],E[4]);if(s&&"importKey"===t&&("spki"===i||"pkcs8"===i))return r.importKey("jwk",function(t){var e=y(t),r=!1;e.length>2&&(r=!0,e.shift());var n={ext:!0};switch(e[0][0]){case"1.2.840.113549.1.1.1":var i=["n","e","d","p","q","dp","dq","qi"],o=y(e[1]);r&&o.shift();for(var a=0;a<o.length;a++)o[a][0]||(o[a]=o[a].subarray(1)),n[i[a]]=l(p(o[a]));n.kty="RSA";break;default:throw new TypeError("Unsupported key type")}return n}(o),u,E[3],E[4]);if(a&&"unwrapKey"===t)return r.decrypt(E[3],u,o).then(function(t){return r.importKey(i,t,E[4],E[5],E[6])});try{S=n.apply(r,E)}catch(t){return Promise.reject(t)}return a&&(S=new Promise(function(t,e){S.onabort=S.onerror=function(t){e(t)},S.oncomplete=function(e){t(e.target.result)}})),S=S.then(function(t){return"HMAC"===c.name&&(c.length||(c.length=8*t.algorithm.length)),0==c.name.search("RSA")&&(c.modulusLength||(c.modulusLength=(t.publicKey||t).algorithm.modulusLength),c.publicExponent||(c.publicExponent=(t.publicKey||t).algorithm.publicExponent)),t=t.publicKey&&t.privateKey?{publicKey:new w(t.publicKey,c,f,b.filter(_)),privateKey:new w(t.privateKey,c,f,b.filter(k))}:new w(t,c,f,b)})}}),["exportKey","wrapKey"].forEach(function(t){var e=r[t];r[t]=function(n,i,o){var u,c=[].slice.call(arguments);switch(t){case"exportKey":c[1]=i._key;break;case"wrapKey":c[1]=i._key,c[2]=o._key}if((s||a&&"SHA-1"===(i.algorithm.hash||{}).name)&&"exportKey"===t&&"jwk"===n&&"HMAC"===i.algorithm.name&&(c[0]="raw"),!s||"exportKey"!==t||"spki"!==n&&"pkcs8"!==n||(c[0]="jwk"),a&&"wrapKey"===t)return r.exportKey(n,i).then(function(t){return"jwk"===n&&(t=d(unescape(encodeURIComponent(JSON.stringify(v(t)))))),r.encrypt(c[3],o,t)});try{u=e.apply(r,c)}catch(t){return Promise.reject(t)}return a&&(u=new Promise(function(t,e){u.onabort=u.onerror=function(t){e(t)},u.oncomplete=function(e){t(e.target.result)}})),"exportKey"===t&&"jwk"===n&&(u=u.then(function(t){return(s||a&&"SHA-1"===(i.algorithm.hash||{}).name)&&"HMAC"===i.algorithm.name?{kty:"oct",alg:g(i.algorithm),key_ops:i.usages.slice(),ext:!0,k:l(p(t))}:((t=v(t)).alg||(t.alg=g(i.algorithm)),t.key_ops||(t.key_ops="public"===i.type?i.usages.filter(_):"private"===i.type?i.usages.filter(k):i.usages.slice()),t)})),
|