diff --git a/dist/ipfsapi.js b/dist/ipfsapi.js index a95f802c29..736ed2c864 100644 --- a/dist/ipfsapi.js +++ b/dist/ipfsapi.js @@ -405,7 +405,7 @@ var ipfsAPI = /* 60 */ /***/ function(module, exports) { - eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * lodash 3.0.3 (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for built-in method references. */\nvar objectProto = global.Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n\n/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/lodash.istypedarray/index.js\n ** module id = 60\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/lodash.istypedarray/index.js?"); + eval("/**\n * lodash 3.0.5 (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dateTag] = typedArrayTags[errorTag] =\ntypedArrayTags[funcTag] = typedArrayTags[mapTag] =\ntypedArrayTags[numberTag] = typedArrayTags[objectTag] =\ntypedArrayTags[regexpTag] = typedArrayTags[setTag] =\ntypedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nfunction isTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[objectToString.call(value)];\n}\n\nmodule.exports = isTypedArray;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/lodash.istypedarray/index.js\n ** module id = 60\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/lodash.istypedarray/index.js?"); /***/ }, /* 61 */ @@ -423,7 +423,7 @@ var ipfsAPI = /* 63 */ /***/ function(module, exports) { - eval("/* WEBPACK VAR INJECTION */(function(global) {/**\n * lodash 3.0.5 (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used for built-in method references. */\nvar objectProto = global.Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null &&\n !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8 which returns 'object' for typed array constructors, and\n // PhantomJS 1.9 which returns 'function' for `NodeList` instances.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n // Avoid a V8 JIT bug in Chrome 19-20.\n // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isArguments;\n\n/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/lodash.isarguments/index.js\n ** module id = 63\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/lodash.isarguments/index.js?"); + eval("/**\n * lodash 3.0.7 (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation \n * Based on Underscore.js 1.8.3 \n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license \n */\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\n/**\n * Gets the \"length\" property value of `object`.\n *\n * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\n * that affects Safari on at least iOS 8.1-8.3 ARM64.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {*} Returns the \"length\" value.\n */\nvar getLength = baseProperty('length');\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null &&\n !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8 which returns 'object' for typed array constructors, and\n // PhantomJS 1.9 which returns 'function' for `NodeList` instances.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\n * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = isArguments;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/lodash.isarguments/index.js\n ** module id = 63\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/lodash.isarguments/index.js?"); /***/ }, /* 64 */ @@ -735,7 +735,7 @@ var ipfsAPI = /* 115 */ /***/ function(module, exports, __webpack_require__) { - eval("/* WEBPACK VAR INJECTION */(function(Buffer, process) {'use strict';\n\n// Load modules\n\nvar _stringify = __webpack_require__(116);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _keys = __webpack_require__(78);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _defineProperty = __webpack_require__(118);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nvar _getOwnPropertyDescriptor = __webpack_require__(120);\n\nvar _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);\n\nvar _getOwnPropertyNames = __webpack_require__(123);\n\nvar _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames);\n\nvar _create = __webpack_require__(126);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _getPrototypeOf = __webpack_require__(128);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _typeof2 = __webpack_require__(20);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Crypto = __webpack_require__(131);\nvar Path = __webpack_require__(148);\nvar Util = __webpack_require__(138);\nvar Escape = __webpack_require__(149);\n\n// Declare internals\n\nvar internals = {};\n\n// Clone object or array\n\nexports.clone = function (obj, seen) {\n\n if ((typeof obj === 'undefined' ? 'undefined' : (0, _typeof3.default)(obj)) !== 'object' || obj === null) {\n\n return obj;\n }\n\n seen = seen || { orig: [], copy: [] };\n\n var lookup = seen.orig.indexOf(obj);\n if (lookup !== -1) {\n return seen.copy[lookup];\n }\n\n var newObj = undefined;\n var cloneDeep = false;\n\n if (!Array.isArray(obj)) {\n if (Buffer.isBuffer(obj)) {\n newObj = new Buffer(obj);\n } else if (obj instanceof Date) {\n newObj = new Date(obj.getTime());\n } else if (obj instanceof RegExp) {\n newObj = new RegExp(obj);\n } else {\n var proto = (0, _getPrototypeOf2.default)(obj);\n if (proto && proto.isImmutable) {\n\n newObj = obj;\n } else {\n newObj = (0, _create2.default)(proto);\n cloneDeep = true;\n }\n }\n } else {\n newObj = [];\n cloneDeep = true;\n }\n\n seen.orig.push(obj);\n seen.copy.push(newObj);\n\n if (cloneDeep) {\n var keys = (0, _getOwnPropertyNames2.default)(obj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var descriptor = (0, _getOwnPropertyDescriptor2.default)(obj, key);\n if (descriptor && (descriptor.get || descriptor.set)) {\n\n (0, _defineProperty2.default)(newObj, key, descriptor);\n } else {\n newObj[key] = exports.clone(obj[key], seen);\n }\n }\n }\n\n return newObj;\n};\n\n// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied\n\n/*eslint-disable */\nexports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {\n /*eslint-enable */\n\n exports.assert(target && (typeof target === 'undefined' ? 'undefined' : (0, _typeof3.default)(target)) === 'object', 'Invalid target value: must be an object');\n exports.assert(source === null || source === undefined || (typeof source === 'undefined' ? 'undefined' : (0, _typeof3.default)(source)) === 'object', 'Invalid source value: must be null, undefined, or an object');\n\n if (!source) {\n return target;\n }\n\n if (Array.isArray(source)) {\n exports.assert(Array.isArray(target), 'Cannot merge array onto an object');\n if (isMergeArrays === false) {\n // isMergeArrays defaults to true\n target.length = 0; // Must not change target assignment\n }\n\n for (var i = 0; i < source.length; ++i) {\n target.push(exports.clone(source[i]));\n }\n\n return target;\n }\n\n var keys = (0, _keys2.default)(source);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = source[key];\n if (value && (typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === 'object') {\n\n if (!target[key] || (0, _typeof3.default)(target[key]) !== 'object' || Array.isArray(target[key]) ^ Array.isArray(value) || value instanceof Date || Buffer.isBuffer(value) || value instanceof RegExp) {\n\n target[key] = exports.clone(value);\n } else {\n exports.merge(target[key], value, isNullOverride, isMergeArrays);\n }\n } else {\n if (value !== null && value !== undefined) {\n // Explicit to preserve empty strings\n\n target[key] = value;\n } else if (isNullOverride !== false) {\n // Defaults to true\n target[key] = value;\n }\n }\n }\n\n return target;\n};\n\n// Apply options to a copy of the defaults\n\nexports.applyToDefaults = function (defaults, options, isNullOverride) {\n\n exports.assert(defaults && (typeof defaults === 'undefined' ? 'undefined' : (0, _typeof3.default)(defaults)) === 'object', 'Invalid defaults value: must be an object');\n exports.assert(!options || options === true || (typeof options === 'undefined' ? 'undefined' : (0, _typeof3.default)(options)) === 'object', 'Invalid options value: must be true, falsy or an object');\n\n if (!options) {\n // If no options, return null\n return null;\n }\n\n var copy = exports.clone(defaults);\n\n if (options === true) {\n // If options is set to true, use defaults\n return copy;\n }\n\n return exports.merge(copy, options, isNullOverride === true, false);\n};\n\n// Clone an object except for the listed keys which are shallow copied\n\nexports.cloneWithShallow = function (source, keys) {\n\n if (!source || (typeof source === 'undefined' ? 'undefined' : (0, _typeof3.default)(source)) !== 'object') {\n\n return source;\n }\n\n var storage = internals.store(source, keys); // Move shallow copy items to storage\n var copy = exports.clone(source); // Deep copy the rest\n internals.restore(copy, source, storage); // Shallow copy the stored items and restore\n return copy;\n};\n\ninternals.store = function (source, keys) {\n\n var storage = {};\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = exports.reach(source, key);\n if (value !== undefined) {\n storage[key] = value;\n internals.reachSet(source, key, undefined);\n }\n }\n\n return storage;\n};\n\ninternals.restore = function (copy, source, storage) {\n\n var keys = (0, _keys2.default)(storage);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n internals.reachSet(copy, key, storage[key]);\n internals.reachSet(source, key, storage[key]);\n }\n};\n\ninternals.reachSet = function (obj, key, value) {\n\n var path = key.split('.');\n var ref = obj;\n for (var i = 0; i < path.length; ++i) {\n var segment = path[i];\n if (i + 1 === path.length) {\n ref[segment] = value;\n }\n\n ref = ref[segment];\n }\n};\n\n// Apply options to defaults except for the listed keys which are shallow copied from option without merging\n\nexports.applyToDefaultsWithShallow = function (defaults, options, keys) {\n\n exports.assert(defaults && (typeof defaults === 'undefined' ? 'undefined' : (0, _typeof3.default)(defaults)) === 'object', 'Invalid defaults value: must be an object');\n exports.assert(!options || options === true || (typeof options === 'undefined' ? 'undefined' : (0, _typeof3.default)(options)) === 'object', 'Invalid options value: must be true, falsy or an object');\n exports.assert(keys && Array.isArray(keys), 'Invalid keys');\n\n if (!options) {\n // If no options, return null\n return null;\n }\n\n var copy = exports.cloneWithShallow(defaults, keys);\n\n if (options === true) {\n // If options is set to true, use defaults\n return copy;\n }\n\n var storage = internals.store(options, keys); // Move shallow copy items to storage\n exports.merge(copy, options, false, false); // Deep copy the rest\n internals.restore(copy, options, storage); // Shallow copy the stored items and restore\n return copy;\n};\n\n// Deep object or array comparison\n\nexports.deepEqual = function (obj, ref, options, seen) {\n\n options = options || { prototype: true };\n\n var type = typeof obj === 'undefined' ? 'undefined' : (0, _typeof3.default)(obj);\n\n if (type !== (typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref))) {\n return false;\n }\n\n if (type !== 'object' || obj === null || ref === null) {\n\n if (obj === ref) {\n // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql\n return obj !== 0 || 1 / obj === 1 / ref; // -0 / +0\n }\n\n return obj !== obj && ref !== ref; // NaN\n }\n\n seen = seen || [];\n if (seen.indexOf(obj) !== -1) {\n return true; // If previous comparison failed, it would have stopped execution\n }\n\n seen.push(obj);\n\n if (Array.isArray(obj)) {\n if (!Array.isArray(ref)) {\n return false;\n }\n\n if (!options.part && obj.length !== ref.length) {\n return false;\n }\n\n for (var i = 0; i < obj.length; ++i) {\n if (options.part) {\n var found = false;\n for (var j = 0; j < ref.length; ++j) {\n if (exports.deepEqual(obj[i], ref[j], options)) {\n found = true;\n break;\n }\n }\n\n return found;\n }\n\n if (!exports.deepEqual(obj[i], ref[i], options)) {\n return false;\n }\n }\n\n return true;\n }\n\n if (Buffer.isBuffer(obj)) {\n if (!Buffer.isBuffer(ref)) {\n return false;\n }\n\n if (obj.length !== ref.length) {\n return false;\n }\n\n for (var i = 0; i < obj.length; ++i) {\n if (obj[i] !== ref[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n if (obj instanceof Date) {\n return ref instanceof Date && obj.getTime() === ref.getTime();\n }\n\n if (obj instanceof RegExp) {\n return ref instanceof RegExp && obj.toString() === ref.toString();\n }\n\n if (options.prototype) {\n if ((0, _getPrototypeOf2.default)(obj) !== (0, _getPrototypeOf2.default)(ref)) {\n return false;\n }\n }\n\n var keys = (0, _getOwnPropertyNames2.default)(obj);\n\n if (!options.part && keys.length !== (0, _getOwnPropertyNames2.default)(ref).length) {\n return false;\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var descriptor = (0, _getOwnPropertyDescriptor2.default)(obj, key);\n if (descriptor.get) {\n if (!exports.deepEqual(descriptor, (0, _getOwnPropertyDescriptor2.default)(ref, key), options, seen)) {\n return false;\n }\n } else if (!exports.deepEqual(obj[key], ref[key], options, seen)) {\n return false;\n }\n }\n\n return true;\n};\n\n// Remove duplicate items from array\n\nexports.unique = function (array, key) {\n\n var index = {};\n var result = [];\n\n for (var i = 0; i < array.length; ++i) {\n var id = key ? array[i][key] : array[i];\n if (index[id] !== true) {\n\n result.push(array[i]);\n index[id] = true;\n }\n }\n\n return result;\n};\n\n// Convert array into object\n\nexports.mapToObject = function (array, key) {\n\n if (!array) {\n return null;\n }\n\n var obj = {};\n for (var i = 0; i < array.length; ++i) {\n if (key) {\n if (array[i][key]) {\n obj[array[i][key]] = true;\n }\n } else {\n obj[array[i]] = true;\n }\n }\n\n return obj;\n};\n\n// Find the common unique items in two arrays\n\nexports.intersect = function (array1, array2, justFirst) {\n\n if (!array1 || !array2) {\n return [];\n }\n\n var common = [];\n var hash = Array.isArray(array1) ? exports.mapToObject(array1) : array1;\n var found = {};\n for (var i = 0; i < array2.length; ++i) {\n if (hash[array2[i]] && !found[array2[i]]) {\n if (justFirst) {\n return array2[i];\n }\n\n common.push(array2[i]);\n found[array2[i]] = true;\n }\n }\n\n return justFirst ? null : common;\n};\n\n// Test if the reference contains the values\n\nexports.contain = function (ref, values, options) {\n\n /*\n string -> string(s)\n array -> item(s)\n object -> key(s)\n object -> object (key:value)\n */\n\n var valuePairs = null;\n if ((typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object' && (typeof values === 'undefined' ? 'undefined' : (0, _typeof3.default)(values)) === 'object' && !Array.isArray(ref) && !Array.isArray(values)) {\n\n valuePairs = values;\n values = (0, _keys2.default)(values);\n } else {\n values = [].concat(values);\n }\n\n options = options || {}; // deep, once, only, part\n\n exports.assert(arguments.length >= 2, 'Insufficient arguments');\n exports.assert(typeof ref === 'string' || (typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object', 'Reference must be string or an object');\n exports.assert(values.length, 'Values array cannot be empty');\n\n var compare = undefined;\n var compareFlags = undefined;\n if (options.deep) {\n compare = exports.deepEqual;\n\n var hasOnly = options.hasOwnProperty('only');\n var hasPart = options.hasOwnProperty('part');\n\n compareFlags = {\n prototype: hasOnly ? options.only : hasPart ? !options.part : false,\n part: hasOnly ? !options.only : hasPart ? options.part : true\n };\n } else {\n compare = function compare(a, b) {\n return a === b;\n };\n }\n\n var misses = false;\n var matches = new Array(values.length);\n for (var i = 0; i < matches.length; ++i) {\n matches[i] = 0;\n }\n\n if (typeof ref === 'string') {\n var pattern = '(';\n for (var i = 0; i < values.length; ++i) {\n var value = values[i];\n exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value');\n pattern += (i ? '|' : '') + exports.escapeRegex(value);\n }\n\n var regex = new RegExp(pattern + ')', 'g');\n var leftovers = ref.replace(regex, function ($0, $1) {\n\n var index = values.indexOf($1);\n ++matches[index];\n return ''; // Remove from string\n });\n\n misses = !!leftovers;\n } else if (Array.isArray(ref)) {\n for (var i = 0; i < ref.length; ++i) {\n var matched = false;\n for (var j = 0; j < values.length && matched === false; ++j) {\n matched = compare(values[j], ref[i], compareFlags) && j;\n }\n\n if (matched !== false) {\n ++matches[matched];\n } else {\n misses = true;\n }\n }\n } else {\n var keys = (0, _keys2.default)(ref);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var pos = values.indexOf(key);\n if (pos !== -1) {\n if (valuePairs && !compare(valuePairs[key], ref[key], compareFlags)) {\n\n return false;\n }\n\n ++matches[pos];\n } else {\n misses = true;\n }\n }\n }\n\n var result = false;\n for (var i = 0; i < matches.length; ++i) {\n result = result || !!matches[i];\n if (options.once && matches[i] > 1 || !options.part && !matches[i]) {\n\n return false;\n }\n }\n\n if (options.only && misses) {\n\n return false;\n }\n\n return result;\n};\n\n// Flatten array\n\nexports.flatten = function (array, target) {\n\n var result = target || [];\n\n for (var i = 0; i < array.length; ++i) {\n if (Array.isArray(array[i])) {\n exports.flatten(array[i], result);\n } else {\n result.push(array[i]);\n }\n }\n\n return result;\n};\n\n// Convert an object key chain string ('a.b.c') to reference (object[a][b][c])\n\nexports.reach = function (obj, chain, options) {\n\n if (chain === false || chain === null || typeof chain === 'undefined') {\n\n return obj;\n }\n\n options = options || {};\n if (typeof options === 'string') {\n options = { separator: options };\n }\n\n var path = chain.split(options.separator || '.');\n var ref = obj;\n for (var i = 0; i < path.length; ++i) {\n var key = path[i];\n if (key[0] === '-' && Array.isArray(ref)) {\n key = key.slice(1, key.length);\n key = ref.length - key;\n }\n\n if (!ref || !(((typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object' || typeof ref === 'function') && key in ref) || (typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) !== 'object' && options.functions === false) {\n // Only object and function can have properties\n\n exports.assert(!options.strict || i + 1 === path.length, 'Missing segment', key, 'in reach path ', chain);\n exports.assert((typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain);\n ref = options.default;\n break;\n }\n\n ref = ref[key];\n }\n\n return ref;\n};\n\nexports.reachTemplate = function (obj, template, options) {\n\n return template.replace(/{([^}]+)}/g, function ($0, chain) {\n\n var value = exports.reach(obj, chain, options);\n return value === undefined || value === null ? '' : value;\n });\n};\n\nexports.formatStack = function (stack) {\n\n var trace = [];\n for (var i = 0; i < stack.length; ++i) {\n var item = stack[i];\n trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]);\n }\n\n return trace;\n};\n\nexports.formatTrace = function (trace) {\n\n var display = [];\n\n for (var i = 0; i < trace.length; ++i) {\n var row = trace[i];\n display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')');\n }\n\n return display;\n};\n\nexports.callStack = function (slice) {\n\n // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n\n var v8 = Error.prepareStackTrace;\n Error.prepareStackTrace = function (err, stack) {\n\n return stack;\n };\n\n var capture = {};\n Error.captureStackTrace(capture, this); // arguments.callee is not supported in strict mode so we use this and slice the trace of this off the result\n var stack = capture.stack;\n\n Error.prepareStackTrace = v8;\n\n var trace = exports.formatStack(stack);\n\n return trace.slice(1 + slice);\n};\n\nexports.displayStack = function (slice) {\n\n var trace = exports.callStack(slice === undefined ? 1 : slice + 1);\n\n return exports.formatTrace(trace);\n};\n\nexports.abortThrow = false;\n\nexports.abort = function (message, hideStack) {\n\n if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) {\n throw new Error(message || 'Unknown error');\n }\n\n var stack = '';\n if (!hideStack) {\n stack = exports.displayStack(1).join('\\n\\t');\n }\n console.log('ABORT: ' + message + '\\n\\t' + stack);\n process.exit(1);\n};\n\nexports.assert = function (condition /*, msg1, msg2, msg3 */) {\n\n if (condition) {\n return;\n }\n\n if (arguments.length === 2 && arguments[1] instanceof Error) {\n throw arguments[1];\n }\n\n var msgs = [];\n for (var i = 1; i < arguments.length; ++i) {\n if (arguments[i] !== '') {\n msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations\n }\n }\n\n msgs = msgs.map(function (msg) {\n\n return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg);\n });\n\n throw new Error(msgs.join(' ') || 'Unknown error');\n};\n\nexports.Timer = function () {\n\n this.ts = 0;\n this.reset();\n};\n\nexports.Timer.prototype.reset = function () {\n\n this.ts = Date.now();\n};\n\nexports.Timer.prototype.elapsed = function () {\n\n return Date.now() - this.ts;\n};\n\nexports.Bench = function () {\n\n this.ts = 0;\n this.reset();\n};\n\nexports.Bench.prototype.reset = function () {\n\n this.ts = exports.Bench.now();\n};\n\nexports.Bench.prototype.elapsed = function () {\n\n return exports.Bench.now() - this.ts;\n};\n\nexports.Bench.now = function () {\n\n var ts = process.hrtime();\n return ts[0] * 1e3 + ts[1] / 1e6;\n};\n\n// Escape string for Regex construction\n\nexports.escapeRegex = function (string) {\n\n // Escape ^$.*+-?=!:|\\/()[]{},\n return string.replace(/[\\^\\$\\.\\*\\+\\-\\?\\=\\!\\:\\|\\\\\\/\\(\\)\\[\\]\\{\\}\\,]/g, '\\\\$&');\n};\n\n// Base64url (RFC 4648) encode\n\nexports.base64urlEncode = function (value, encoding) {\n\n var buf = Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary');\n return buf.toString('base64').replace(/\\+/g, '-').replace(/\\//g, '_').replace(/\\=/g, '');\n};\n\n// Base64url (RFC 4648) decode\n\nexports.base64urlDecode = function (value, encoding) {\n\n if (value && !/^[\\w\\-]*$/.test(value)) {\n\n return new Error('Invalid character');\n }\n\n try {\n var buf = new Buffer(value, 'base64');\n return encoding === 'buffer' ? buf : buf.toString(encoding || 'binary');\n } catch (err) {\n return err;\n }\n};\n\n// Escape attribute value for use in HTTP header\n\nexports.escapeHeaderAttribute = function (attribute) {\n\n // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \\, \"\n\n exports.assert(/^[ \\w\\!#\\$%&'\\(\\)\\*\\+,\\-\\.\\/\\:;<\\=>\\?@\\[\\]\\^`\\{\\|\\}~\\\"\\\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')');\n\n return attribute.replace(/\\\\/g, '\\\\\\\\').replace(/\\\"/g, '\\\\\"'); // Escape quotes and slash\n};\n\nexports.escapeHtml = function (string) {\n\n return Escape.escapeHtml(string);\n};\n\nexports.escapeJavaScript = function (string) {\n\n return Escape.escapeJavaScript(string);\n};\n\nexports.nextTick = function (callback) {\n\n return function () {\n\n var args = arguments;\n process.nextTick(function () {\n\n callback.apply(null, args);\n });\n };\n};\n\nexports.once = function (method) {\n\n if (method._hoekOnce) {\n return method;\n }\n\n var once = false;\n var wrapped = function wrapped() {\n\n if (!once) {\n once = true;\n method.apply(null, arguments);\n }\n };\n\n wrapped._hoekOnce = true;\n\n return wrapped;\n};\n\nexports.isAbsolutePath = function (path, platform) {\n\n if (!path) {\n return false;\n }\n\n if (Path.isAbsolute) {\n // node >= 0.11\n return Path.isAbsolute(path);\n }\n\n platform = platform || process.platform;\n\n // Unix\n\n if (platform !== 'win32') {\n return path[0] === '/';\n }\n\n // Windows\n\n return !!/^(?:[a-zA-Z]:[\\\\\\/])|(?:[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/])/.test(path); // C:\\ or \\\\something\\something\n};\n\nexports.isInteger = function (value) {\n\n return typeof value === 'number' && parseFloat(value) === parseInt(value, 10) && !isNaN(value);\n};\n\nexports.ignore = function () {};\n\nexports.inherits = Util.inherits;\n\nexports.format = Util.format;\n\nexports.transform = function (source, transform, options) {\n\n exports.assert(source === null || source === undefined || (typeof source === 'undefined' ? 'undefined' : (0, _typeof3.default)(source)) === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array');\n\n if (Array.isArray(source)) {\n var results = [];\n for (var i = 0; i < source.length; ++i) {\n results.push(exports.transform(source[i], transform, options));\n }\n return results;\n }\n\n var result = {};\n var keys = (0, _keys2.default)(transform);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var path = key.split('.');\n var sourcePath = transform[key];\n\n exports.assert(typeof sourcePath === 'string', 'All mappings must be \".\" delineated strings');\n\n var segment = undefined;\n var res = result;\n\n while (path.length > 1) {\n segment = path.shift();\n if (!res[segment]) {\n res[segment] = {};\n }\n res = res[segment];\n }\n segment = path.shift();\n res[segment] = exports.reach(source, sourcePath, options);\n }\n\n return result;\n};\n\nexports.uniqueFilename = function (path, extension) {\n\n if (extension) {\n extension = extension[0] !== '.' ? '.' + extension : extension;\n } else {\n extension = '';\n }\n\n path = Path.resolve(path);\n var name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;\n return Path.join(path, name);\n};\n\nexports.stringify = function () {\n\n try {\n return _stringify2.default.apply(null, arguments);\n } catch (err) {\n return '[Cannot display object: ' + err.message + ']';\n }\n};\n\nexports.shallow = function (source) {\n\n var target = {};\n var keys = (0, _keys2.default)(source);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n target[key] = source[key];\n }\n\n return target;\n};\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1).Buffer, __webpack_require__(84)))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/wreck/~/hoek/lib/index.js\n ** module id = 115\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/wreck/~/hoek/lib/index.js?"); + eval("/* WEBPACK VAR INJECTION */(function(Buffer, process) {'use strict';\n\n// Load modules\n\nvar _stringify = __webpack_require__(116);\n\nvar _stringify2 = _interopRequireDefault(_stringify);\n\nvar _keys = __webpack_require__(78);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _defineProperty = __webpack_require__(118);\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nvar _getOwnPropertyDescriptor = __webpack_require__(120);\n\nvar _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);\n\nvar _getOwnPropertyNames = __webpack_require__(123);\n\nvar _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames);\n\nvar _create = __webpack_require__(126);\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _getPrototypeOf = __webpack_require__(128);\n\nvar _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);\n\nvar _typeof2 = __webpack_require__(20);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Crypto = __webpack_require__(131);\nvar Path = __webpack_require__(148);\nvar Util = __webpack_require__(138);\nvar Escape = __webpack_require__(149);\n\n// Declare internals\n\nvar internals = {};\n\n// Clone object or array\n\nexports.clone = function (obj, seen) {\n\n if ((typeof obj === 'undefined' ? 'undefined' : (0, _typeof3.default)(obj)) !== 'object' || obj === null) {\n\n return obj;\n }\n\n seen = seen || { orig: [], copy: [] };\n\n var lookup = seen.orig.indexOf(obj);\n if (lookup !== -1) {\n return seen.copy[lookup];\n }\n\n var newObj = undefined;\n var cloneDeep = false;\n\n if (!Array.isArray(obj)) {\n if (Buffer.isBuffer(obj)) {\n newObj = new Buffer(obj);\n } else if (obj instanceof Date) {\n newObj = new Date(obj.getTime());\n } else if (obj instanceof RegExp) {\n newObj = new RegExp(obj);\n } else {\n var proto = (0, _getPrototypeOf2.default)(obj);\n if (proto && proto.isImmutable) {\n\n newObj = obj;\n } else {\n newObj = (0, _create2.default)(proto);\n cloneDeep = true;\n }\n }\n } else {\n newObj = [];\n cloneDeep = true;\n }\n\n seen.orig.push(obj);\n seen.copy.push(newObj);\n\n if (cloneDeep) {\n var keys = (0, _getOwnPropertyNames2.default)(obj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var descriptor = (0, _getOwnPropertyDescriptor2.default)(obj, key);\n if (descriptor && (descriptor.get || descriptor.set)) {\n\n (0, _defineProperty2.default)(newObj, key, descriptor);\n } else {\n newObj[key] = exports.clone(obj[key], seen);\n }\n }\n }\n\n return newObj;\n};\n\n// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied\n\n/*eslint-disable */\nexports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {\n /*eslint-enable */\n\n exports.assert(target && (typeof target === 'undefined' ? 'undefined' : (0, _typeof3.default)(target)) === 'object', 'Invalid target value: must be an object');\n exports.assert(source === null || source === undefined || (typeof source === 'undefined' ? 'undefined' : (0, _typeof3.default)(source)) === 'object', 'Invalid source value: must be null, undefined, or an object');\n\n if (!source) {\n return target;\n }\n\n if (Array.isArray(source)) {\n exports.assert(Array.isArray(target), 'Cannot merge array onto an object');\n if (isMergeArrays === false) {\n // isMergeArrays defaults to true\n target.length = 0; // Must not change target assignment\n }\n\n for (var i = 0; i < source.length; ++i) {\n target.push(exports.clone(source[i]));\n }\n\n return target;\n }\n\n var keys = (0, _keys2.default)(source);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = source[key];\n if (value && (typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === 'object') {\n\n if (!target[key] || (0, _typeof3.default)(target[key]) !== 'object' || Array.isArray(target[key]) ^ Array.isArray(value) || value instanceof Date || Buffer.isBuffer(value) || value instanceof RegExp) {\n\n target[key] = exports.clone(value);\n } else {\n exports.merge(target[key], value, isNullOverride, isMergeArrays);\n }\n } else {\n if (value !== null && value !== undefined) {\n // Explicit to preserve empty strings\n\n target[key] = value;\n } else if (isNullOverride !== false) {\n // Defaults to true\n target[key] = value;\n }\n }\n }\n\n return target;\n};\n\n// Apply options to a copy of the defaults\n\nexports.applyToDefaults = function (defaults, options, isNullOverride) {\n\n exports.assert(defaults && (typeof defaults === 'undefined' ? 'undefined' : (0, _typeof3.default)(defaults)) === 'object', 'Invalid defaults value: must be an object');\n exports.assert(!options || options === true || (typeof options === 'undefined' ? 'undefined' : (0, _typeof3.default)(options)) === 'object', 'Invalid options value: must be true, falsy or an object');\n\n if (!options) {\n // If no options, return null\n return null;\n }\n\n var copy = exports.clone(defaults);\n\n if (options === true) {\n // If options is set to true, use defaults\n return copy;\n }\n\n return exports.merge(copy, options, isNullOverride === true, false);\n};\n\n// Clone an object except for the listed keys which are shallow copied\n\nexports.cloneWithShallow = function (source, keys) {\n\n if (!source || (typeof source === 'undefined' ? 'undefined' : (0, _typeof3.default)(source)) !== 'object') {\n\n return source;\n }\n\n var storage = internals.store(source, keys); // Move shallow copy items to storage\n var copy = exports.clone(source); // Deep copy the rest\n internals.restore(copy, source, storage); // Shallow copy the stored items and restore\n return copy;\n};\n\ninternals.store = function (source, keys) {\n\n var storage = {};\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = exports.reach(source, key);\n if (value !== undefined) {\n storage[key] = value;\n internals.reachSet(source, key, undefined);\n }\n }\n\n return storage;\n};\n\ninternals.restore = function (copy, source, storage) {\n\n var keys = (0, _keys2.default)(storage);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n internals.reachSet(copy, key, storage[key]);\n internals.reachSet(source, key, storage[key]);\n }\n};\n\ninternals.reachSet = function (obj, key, value) {\n\n var path = key.split('.');\n var ref = obj;\n for (var i = 0; i < path.length; ++i) {\n var segment = path[i];\n if (i + 1 === path.length) {\n ref[segment] = value;\n }\n\n ref = ref[segment];\n }\n};\n\n// Apply options to defaults except for the listed keys which are shallow copied from option without merging\n\nexports.applyToDefaultsWithShallow = function (defaults, options, keys) {\n\n exports.assert(defaults && (typeof defaults === 'undefined' ? 'undefined' : (0, _typeof3.default)(defaults)) === 'object', 'Invalid defaults value: must be an object');\n exports.assert(!options || options === true || (typeof options === 'undefined' ? 'undefined' : (0, _typeof3.default)(options)) === 'object', 'Invalid options value: must be true, falsy or an object');\n exports.assert(keys && Array.isArray(keys), 'Invalid keys');\n\n if (!options) {\n // If no options, return null\n return null;\n }\n\n var copy = exports.cloneWithShallow(defaults, keys);\n\n if (options === true) {\n // If options is set to true, use defaults\n return copy;\n }\n\n var storage = internals.store(options, keys); // Move shallow copy items to storage\n exports.merge(copy, options, false, false); // Deep copy the rest\n internals.restore(copy, options, storage); // Shallow copy the stored items and restore\n return copy;\n};\n\n// Deep object or array comparison\n\nexports.deepEqual = function (obj, ref, options, seen) {\n\n options = options || { prototype: true };\n\n var type = typeof obj === 'undefined' ? 'undefined' : (0, _typeof3.default)(obj);\n\n if (type !== (typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref))) {\n return false;\n }\n\n if (type !== 'object' || obj === null || ref === null) {\n\n if (obj === ref) {\n // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql\n return obj !== 0 || 1 / obj === 1 / ref; // -0 / +0\n }\n\n return obj !== obj && ref !== ref; // NaN\n }\n\n seen = seen || [];\n if (seen.indexOf(obj) !== -1) {\n return true; // If previous comparison failed, it would have stopped execution\n }\n\n seen.push(obj);\n\n if (Array.isArray(obj)) {\n if (!Array.isArray(ref)) {\n return false;\n }\n\n if (!options.part && obj.length !== ref.length) {\n return false;\n }\n\n for (var i = 0; i < obj.length; ++i) {\n if (options.part) {\n var found = false;\n for (var j = 0; j < ref.length; ++j) {\n if (exports.deepEqual(obj[i], ref[j], options)) {\n found = true;\n break;\n }\n }\n\n return found;\n }\n\n if (!exports.deepEqual(obj[i], ref[i], options)) {\n return false;\n }\n }\n\n return true;\n }\n\n if (Buffer.isBuffer(obj)) {\n if (!Buffer.isBuffer(ref)) {\n return false;\n }\n\n if (obj.length !== ref.length) {\n return false;\n }\n\n for (var i = 0; i < obj.length; ++i) {\n if (obj[i] !== ref[i]) {\n return false;\n }\n }\n\n return true;\n }\n\n if (obj instanceof Date) {\n return ref instanceof Date && obj.getTime() === ref.getTime();\n }\n\n if (obj instanceof RegExp) {\n return ref instanceof RegExp && obj.toString() === ref.toString();\n }\n\n if (options.prototype) {\n if ((0, _getPrototypeOf2.default)(obj) !== (0, _getPrototypeOf2.default)(ref)) {\n return false;\n }\n }\n\n var keys = (0, _getOwnPropertyNames2.default)(obj);\n\n if (!options.part && keys.length !== (0, _getOwnPropertyNames2.default)(ref).length) {\n return false;\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var descriptor = (0, _getOwnPropertyDescriptor2.default)(obj, key);\n if (descriptor.get) {\n if (!exports.deepEqual(descriptor, (0, _getOwnPropertyDescriptor2.default)(ref, key), options, seen)) {\n return false;\n }\n } else if (!exports.deepEqual(obj[key], ref[key], options, seen)) {\n return false;\n }\n }\n\n return true;\n};\n\n// Remove duplicate items from array\n\nexports.unique = function (array, key) {\n\n var index = {};\n var result = [];\n\n for (var i = 0; i < array.length; ++i) {\n var id = key ? array[i][key] : array[i];\n if (index[id] !== true) {\n\n result.push(array[i]);\n index[id] = true;\n }\n }\n\n return result;\n};\n\n// Convert array into object\n\nexports.mapToObject = function (array, key) {\n\n if (!array) {\n return null;\n }\n\n var obj = {};\n for (var i = 0; i < array.length; ++i) {\n if (key) {\n if (array[i][key]) {\n obj[array[i][key]] = true;\n }\n } else {\n obj[array[i]] = true;\n }\n }\n\n return obj;\n};\n\n// Find the common unique items in two arrays\n\nexports.intersect = function (array1, array2, justFirst) {\n\n if (!array1 || !array2) {\n return [];\n }\n\n var common = [];\n var hash = Array.isArray(array1) ? exports.mapToObject(array1) : array1;\n var found = {};\n for (var i = 0; i < array2.length; ++i) {\n if (hash[array2[i]] && !found[array2[i]]) {\n if (justFirst) {\n return array2[i];\n }\n\n common.push(array2[i]);\n found[array2[i]] = true;\n }\n }\n\n return justFirst ? null : common;\n};\n\n// Test if the reference contains the values\n\nexports.contain = function (ref, values, options) {\n\n /*\n string -> string(s)\n array -> item(s)\n object -> key(s)\n object -> object (key:value)\n */\n\n var valuePairs = null;\n if ((typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object' && (typeof values === 'undefined' ? 'undefined' : (0, _typeof3.default)(values)) === 'object' && !Array.isArray(ref) && !Array.isArray(values)) {\n\n valuePairs = values;\n values = (0, _keys2.default)(values);\n } else {\n values = [].concat(values);\n }\n\n options = options || {}; // deep, once, only, part\n\n exports.assert(arguments.length >= 2, 'Insufficient arguments');\n exports.assert(typeof ref === 'string' || (typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object', 'Reference must be string or an object');\n exports.assert(values.length, 'Values array cannot be empty');\n\n var compare = undefined;\n var compareFlags = undefined;\n if (options.deep) {\n compare = exports.deepEqual;\n\n var hasOnly = options.hasOwnProperty('only');\n var hasPart = options.hasOwnProperty('part');\n\n compareFlags = {\n prototype: hasOnly ? options.only : hasPart ? !options.part : false,\n part: hasOnly ? !options.only : hasPart ? options.part : true\n };\n } else {\n compare = function compare(a, b) {\n return a === b;\n };\n }\n\n var misses = false;\n var matches = new Array(values.length);\n for (var i = 0; i < matches.length; ++i) {\n matches[i] = 0;\n }\n\n if (typeof ref === 'string') {\n var pattern = '(';\n for (var i = 0; i < values.length; ++i) {\n var value = values[i];\n exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value');\n pattern += (i ? '|' : '') + exports.escapeRegex(value);\n }\n\n var regex = new RegExp(pattern + ')', 'g');\n var leftovers = ref.replace(regex, function ($0, $1) {\n\n var index = values.indexOf($1);\n ++matches[index];\n return ''; // Remove from string\n });\n\n misses = !!leftovers;\n } else if (Array.isArray(ref)) {\n for (var i = 0; i < ref.length; ++i) {\n var matched = false;\n for (var j = 0; j < values.length && matched === false; ++j) {\n matched = compare(values[j], ref[i], compareFlags) && j;\n }\n\n if (matched !== false) {\n ++matches[matched];\n } else {\n misses = true;\n }\n }\n } else {\n var keys = (0, _keys2.default)(ref);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var pos = values.indexOf(key);\n if (pos !== -1) {\n if (valuePairs && !compare(valuePairs[key], ref[key], compareFlags)) {\n\n return false;\n }\n\n ++matches[pos];\n } else {\n misses = true;\n }\n }\n }\n\n var result = false;\n for (var i = 0; i < matches.length; ++i) {\n result = result || !!matches[i];\n if (options.once && matches[i] > 1 || !options.part && !matches[i]) {\n\n return false;\n }\n }\n\n if (options.only && misses) {\n\n return false;\n }\n\n return result;\n};\n\n// Flatten array\n\nexports.flatten = function (array, target) {\n\n var result = target || [];\n\n for (var i = 0; i < array.length; ++i) {\n if (Array.isArray(array[i])) {\n exports.flatten(array[i], result);\n } else {\n result.push(array[i]);\n }\n }\n\n return result;\n};\n\n// Convert an object key chain string ('a.b.c') to reference (object[a][b][c])\n\nexports.reach = function (obj, chain, options) {\n\n if (chain === false || chain === null || typeof chain === 'undefined') {\n\n return obj;\n }\n\n options = options || {};\n if (typeof options === 'string') {\n options = { separator: options };\n }\n\n var path = chain.split(options.separator || '.');\n var ref = obj;\n for (var i = 0; i < path.length; ++i) {\n var key = path[i];\n if (key[0] === '-' && Array.isArray(ref)) {\n key = key.slice(1, key.length);\n key = ref.length - key;\n }\n\n if (!ref || !(((typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object' || typeof ref === 'function') && key in ref) || (typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) !== 'object' && options.functions === false) {\n // Only object and function can have properties\n\n exports.assert(!options.strict || i + 1 === path.length, 'Missing segment', key, 'in reach path ', chain);\n exports.assert((typeof ref === 'undefined' ? 'undefined' : (0, _typeof3.default)(ref)) === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain);\n ref = options.default;\n break;\n }\n\n ref = ref[key];\n }\n\n return ref;\n};\n\nexports.reachTemplate = function (obj, template, options) {\n\n return template.replace(/{([^}]+)}/g, function ($0, chain) {\n\n var value = exports.reach(obj, chain, options);\n return value === undefined || value === null ? '' : value;\n });\n};\n\nexports.formatStack = function (stack) {\n\n var trace = [];\n for (var i = 0; i < stack.length; ++i) {\n var item = stack[i];\n trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]);\n }\n\n return trace;\n};\n\nexports.formatTrace = function (trace) {\n\n var display = [];\n\n for (var i = 0; i < trace.length; ++i) {\n var row = trace[i];\n display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')');\n }\n\n return display;\n};\n\nexports.callStack = function (slice) {\n\n // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n\n var v8 = Error.prepareStackTrace;\n Error.prepareStackTrace = function (err, stack) {\n\n return stack;\n };\n\n var capture = {};\n Error.captureStackTrace(capture, this); // arguments.callee is not supported in strict mode so we use this and slice the trace of this off the result\n var stack = capture.stack;\n\n Error.prepareStackTrace = v8;\n\n var trace = exports.formatStack(stack);\n\n return trace.slice(1 + slice);\n};\n\nexports.displayStack = function (slice) {\n\n var trace = exports.callStack(slice === undefined ? 1 : slice + 1);\n\n return exports.formatTrace(trace);\n};\n\nexports.abortThrow = false;\n\nexports.abort = function (message, hideStack) {\n\n if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) {\n throw new Error(message || 'Unknown error');\n }\n\n var stack = '';\n if (!hideStack) {\n stack = exports.displayStack(1).join('\\n\\t');\n }\n console.log('ABORT: ' + message + '\\n\\t' + stack);\n process.exit(1);\n};\n\nexports.assert = function (condition /*, msg1, msg2, msg3 */) {\n\n if (condition) {\n return;\n }\n\n if (arguments.length === 2 && arguments[1] instanceof Error) {\n throw arguments[1];\n }\n\n var msgs = [];\n for (var i = 1; i < arguments.length; ++i) {\n if (arguments[i] !== '') {\n msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations\n }\n }\n\n msgs = msgs.map(function (msg) {\n\n return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg);\n });\n\n throw new Error(msgs.join(' ') || 'Unknown error');\n};\n\nexports.Timer = function () {\n\n this.ts = 0;\n this.reset();\n};\n\nexports.Timer.prototype.reset = function () {\n\n this.ts = Date.now();\n};\n\nexports.Timer.prototype.elapsed = function () {\n\n return Date.now() - this.ts;\n};\n\nexports.Bench = function () {\n\n this.ts = 0;\n this.reset();\n};\n\nexports.Bench.prototype.reset = function () {\n\n this.ts = exports.Bench.now();\n};\n\nexports.Bench.prototype.elapsed = function () {\n\n return exports.Bench.now() - this.ts;\n};\n\nexports.Bench.now = function () {\n\n var ts = process.hrtime();\n return ts[0] * 1e3 + ts[1] / 1e6;\n};\n\n// Escape string for Regex construction\n\nexports.escapeRegex = function (string) {\n\n // Escape ^$.*+-?=!:|\\/()[]{},\n return string.replace(/[\\^\\$\\.\\*\\+\\-\\?\\=\\!\\:\\|\\\\\\/\\(\\)\\[\\]\\{\\}\\,]/g, '\\\\$&');\n};\n\n// Base64url (RFC 4648) encode\n\nexports.base64urlEncode = function (value, encoding) {\n\n var buf = Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary');\n return buf.toString('base64').replace(/\\+/g, '-').replace(/\\//g, '_').replace(/\\=/g, '');\n};\n\n// Base64url (RFC 4648) decode\n\nexports.base64urlDecode = function (value, encoding) {\n\n if (value && !/^[\\w\\-]*$/.test(value)) {\n\n return new Error('Invalid character');\n }\n\n try {\n var buf = new Buffer(value, 'base64');\n return encoding === 'buffer' ? buf : buf.toString(encoding || 'binary');\n } catch (err) {\n return err;\n }\n};\n\n// Escape attribute value for use in HTTP header\n\nexports.escapeHeaderAttribute = function (attribute) {\n\n // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \\, \"\n\n exports.assert(/^[ \\w\\!#\\$%&'\\(\\)\\*\\+,\\-\\.\\/\\:;<\\=>\\?@\\[\\]\\^`\\{\\|\\}~\\\"\\\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')');\n\n return attribute.replace(/\\\\/g, '\\\\\\\\').replace(/\\\"/g, '\\\\\"'); // Escape quotes and slash\n};\n\nexports.escapeHtml = function (string) {\n\n return Escape.escapeHtml(string);\n};\n\nexports.escapeJavaScript = function (string) {\n\n return Escape.escapeJavaScript(string);\n};\n\nexports.nextTick = function (callback) {\n\n return function () {\n\n var args = arguments;\n process.nextTick(function () {\n\n callback.apply(null, args);\n });\n };\n};\n\nexports.once = function (method) {\n\n if (method._hoekOnce) {\n return method;\n }\n\n var once = false;\n var wrapped = function wrapped() {\n\n if (!once) {\n once = true;\n method.apply(null, arguments);\n }\n };\n\n wrapped._hoekOnce = true;\n\n return wrapped;\n};\n\nexports.isAbsolutePath = function (path, platform) {\n\n if (!path) {\n return false;\n }\n\n if (Path.isAbsolute) {\n // node >= 0.11\n return Path.isAbsolute(path);\n }\n\n platform = platform || process.platform;\n\n // Unix\n\n if (platform !== 'win32') {\n return path[0] === '/';\n }\n\n // Windows\n\n return !!/^(?:[a-zA-Z]:[\\\\\\/])|(?:[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/])/.test(path); // C:\\ or \\\\something\\something\n};\n\nexports.isInteger = function (value) {\n\n return typeof value === 'number' && parseFloat(value) === parseInt(value, 10) && !isNaN(value);\n};\n\nexports.ignore = function () {};\n\nexports.inherits = Util.inherits;\n\nexports.format = Util.format;\n\nexports.transform = function (source, transform, options) {\n\n exports.assert(source === null || source === undefined || (typeof source === 'undefined' ? 'undefined' : (0, _typeof3.default)(source)) === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array');\n\n if (Array.isArray(source)) {\n var results = [];\n for (var i = 0; i < source.length; ++i) {\n results.push(exports.transform(source[i], transform, options));\n }\n return results;\n }\n\n var result = {};\n var keys = (0, _keys2.default)(transform);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var path = key.split('.');\n var sourcePath = transform[key];\n\n exports.assert(typeof sourcePath === 'string', 'All mappings must be \".\" delineated strings');\n\n var segment = undefined;\n var res = result;\n\n while (path.length > 1) {\n segment = path.shift();\n if (!res[segment]) {\n res[segment] = {};\n }\n res = res[segment];\n }\n segment = path.shift();\n res[segment] = exports.reach(source, sourcePath, options);\n }\n\n return result;\n};\n\nexports.uniqueFilename = function (path, extension) {\n\n if (extension) {\n extension = extension[0] !== '.' ? '.' + extension : extension;\n } else {\n extension = '';\n }\n\n path = Path.resolve(path);\n var name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;\n return Path.join(path, name);\n};\n\nexports.stringify = function () {\n\n try {\n return _stringify2.default.apply(null, arguments);\n } catch (err) {\n return '[Cannot display object: ' + err.message + ']';\n }\n};\n\nexports.shallow = function (source) {\n\n var target = {};\n var keys = (0, _keys2.default)(source);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n target[key] = source[key];\n }\n\n return target;\n};\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1).Buffer, __webpack_require__(84)))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/hoek/lib/index.js\n ** module id = 115\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/hoek/lib/index.js?"); /***/ }, /* 116 */ @@ -939,13 +939,13 @@ var ipfsAPI = /* 149 */ /***/ function(module, exports, __webpack_require__) { - eval("/* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';\n\n// Declare internals\n\nvar internals = {};\n\nexports.escapeJavaScript = function (input) {\n\n if (!input) {\n return '';\n }\n\n var escaped = '';\n\n for (var i = 0; i < input.length; ++i) {\n\n var charCode = input.charCodeAt(i);\n\n if (internals.isSafe(charCode)) {\n escaped += input[i];\n } else {\n escaped += internals.escapeJavaScriptChar(charCode);\n }\n }\n\n return escaped;\n};\n\nexports.escapeHtml = function (input) {\n\n if (!input) {\n return '';\n }\n\n var escaped = '';\n\n for (var i = 0; i < input.length; ++i) {\n\n var charCode = input.charCodeAt(i);\n\n if (internals.isSafe(charCode)) {\n escaped += input[i];\n } else {\n escaped += internals.escapeHtmlChar(charCode);\n }\n }\n\n return escaped;\n};\n\ninternals.escapeJavaScriptChar = function (charCode) {\n\n if (charCode >= 256) {\n return '\\\\u' + internals.padLeft('' + charCode, 4);\n }\n\n var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');\n return '\\\\x' + internals.padLeft(hexValue, 2);\n};\n\ninternals.escapeHtmlChar = function (charCode) {\n\n var namedEscape = internals.namedHtml[charCode];\n if (typeof namedEscape !== 'undefined') {\n return namedEscape;\n }\n\n if (charCode >= 256) {\n return '&#' + charCode + ';';\n }\n\n var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');\n return '&#x' + internals.padLeft(hexValue, 2) + ';';\n};\n\ninternals.padLeft = function (str, len) {\n\n while (str.length < len) {\n str = '0' + str;\n }\n\n return str;\n};\n\ninternals.isSafe = function (charCode) {\n\n return typeof internals.safeCharCodes[charCode] !== 'undefined';\n};\n\ninternals.namedHtml = {\n '38': '&',\n '60': '<',\n '62': '>',\n '34': '"',\n '160': ' ',\n '162': '¢',\n '163': '£',\n '164': '¤',\n '169': '©',\n '174': '®'\n};\n\ninternals.safeCharCodes = function () {\n\n var safe = {};\n\n for (var i = 32; i < 123; ++i) {\n\n if (i >= 97 || // a-z\n i >= 65 && i <= 90 || // A-Z\n i >= 48 && i <= 57 || // 0-9\n i === 32 || // space\n i === 46 || // .\n i === 44 || // ,\n i === 45 || // -\n i === 58 || // :\n i === 95) {\n // _\n\n safe[i] = null;\n }\n }\n\n return safe;\n}();\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1).Buffer))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/wreck/~/hoek/lib/escape.js\n ** module id = 149\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/wreck/~/hoek/lib/escape.js?"); + eval("/* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';\n\n// Declare internals\n\nvar internals = {};\n\nexports.escapeJavaScript = function (input) {\n\n if (!input) {\n return '';\n }\n\n var escaped = '';\n\n for (var i = 0; i < input.length; ++i) {\n\n var charCode = input.charCodeAt(i);\n\n if (internals.isSafe(charCode)) {\n escaped += input[i];\n } else {\n escaped += internals.escapeJavaScriptChar(charCode);\n }\n }\n\n return escaped;\n};\n\nexports.escapeHtml = function (input) {\n\n if (!input) {\n return '';\n }\n\n var escaped = '';\n\n for (var i = 0; i < input.length; ++i) {\n\n var charCode = input.charCodeAt(i);\n\n if (internals.isSafe(charCode)) {\n escaped += input[i];\n } else {\n escaped += internals.escapeHtmlChar(charCode);\n }\n }\n\n return escaped;\n};\n\ninternals.escapeJavaScriptChar = function (charCode) {\n\n if (charCode >= 256) {\n return '\\\\u' + internals.padLeft('' + charCode, 4);\n }\n\n var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');\n return '\\\\x' + internals.padLeft(hexValue, 2);\n};\n\ninternals.escapeHtmlChar = function (charCode) {\n\n var namedEscape = internals.namedHtml[charCode];\n if (typeof namedEscape !== 'undefined') {\n return namedEscape;\n }\n\n if (charCode >= 256) {\n return '&#' + charCode + ';';\n }\n\n var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');\n return '&#x' + internals.padLeft(hexValue, 2) + ';';\n};\n\ninternals.padLeft = function (str, len) {\n\n while (str.length < len) {\n str = '0' + str;\n }\n\n return str;\n};\n\ninternals.isSafe = function (charCode) {\n\n return typeof internals.safeCharCodes[charCode] !== 'undefined';\n};\n\ninternals.namedHtml = {\n '38': '&',\n '60': '<',\n '62': '>',\n '34': '"',\n '160': ' ',\n '162': '¢',\n '163': '£',\n '164': '¤',\n '169': '©',\n '174': '®'\n};\n\ninternals.safeCharCodes = function () {\n\n var safe = {};\n\n for (var i = 32; i < 123; ++i) {\n\n if (i >= 97 || // a-z\n i >= 65 && i <= 90 || // A-Z\n i >= 48 && i <= 57 || // 0-9\n i === 32 || // space\n i === 46 || // .\n i === 44 || // ,\n i === 45 || // -\n i === 58 || // :\n i === 95) {\n // _\n\n safe[i] = null;\n }\n }\n\n return safe;\n}();\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1).Buffer))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/hoek/lib/escape.js\n ** module id = 149\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/hoek/lib/escape.js?"); /***/ }, /* 150 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\n// Load modules\n\nvar _keys = __webpack_require__(78);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _setPrototypeOf = __webpack_require__(151);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Hoek = __webpack_require__(115);\n\n// Declare internals\n\nvar internals = {\n STATUS_CODES: (0, _setPrototypeOf2.default)({\n '100': 'Continue',\n '101': 'Switching Protocols',\n '102': 'Processing',\n '200': 'OK',\n '201': 'Created',\n '202': 'Accepted',\n '203': 'Non-Authoritative Information',\n '204': 'No Content',\n '205': 'Reset Content',\n '206': 'Partial Content',\n '207': 'Multi-Status',\n '300': 'Multiple Choices',\n '301': 'Moved Permanently',\n '302': 'Moved Temporarily',\n '303': 'See Other',\n '304': 'Not Modified',\n '305': 'Use Proxy',\n '307': 'Temporary Redirect',\n '400': 'Bad Request',\n '401': 'Unauthorized',\n '402': 'Payment Required',\n '403': 'Forbidden',\n '404': 'Not Found',\n '405': 'Method Not Allowed',\n '406': 'Not Acceptable',\n '407': 'Proxy Authentication Required',\n '408': 'Request Time-out',\n '409': 'Conflict',\n '410': 'Gone',\n '411': 'Length Required',\n '412': 'Precondition Failed',\n '413': 'Request Entity Too Large',\n '414': 'Request-URI Too Large',\n '415': 'Unsupported Media Type',\n '416': 'Requested Range Not Satisfiable',\n '417': 'Expectation Failed',\n '418': 'I\\'m a teapot',\n '422': 'Unprocessable Entity',\n '423': 'Locked',\n '424': 'Failed Dependency',\n '425': 'Unordered Collection',\n '426': 'Upgrade Required',\n '428': 'Precondition Required',\n '429': 'Too Many Requests',\n '431': 'Request Header Fields Too Large',\n '451': 'Unavailable For Legal Reasons',\n '500': 'Internal Server Error',\n '501': 'Not Implemented',\n '502': 'Bad Gateway',\n '503': 'Service Unavailable',\n '504': 'Gateway Time-out',\n '505': 'HTTP Version Not Supported',\n '506': 'Variant Also Negotiates',\n '507': 'Insufficient Storage',\n '509': 'Bandwidth Limit Exceeded',\n '510': 'Not Extended',\n '511': 'Network Authentication Required'\n }, null)\n};\n\nexports.wrap = function (error, statusCode, message) {\n\n Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');\n return error.isBoom ? error : internals.initialize(error, statusCode || 500, message);\n};\n\nexports.create = function (statusCode, message, data) {\n\n return internals.create(statusCode, message, data, exports.create);\n};\n\ninternals.create = function (statusCode, message, data, ctor) {\n\n var error = new Error(message ? message : undefined); // Avoids settings null message\n Error.captureStackTrace(error, ctor); // Filter the stack to our external API\n error.data = data || null;\n internals.initialize(error, statusCode);\n return error;\n};\n\ninternals.initialize = function (error, statusCode, message) {\n\n var numberCode = parseInt(statusCode, 10);\n Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode);\n\n error.isBoom = true;\n error.isServer = numberCode >= 500;\n\n if (!error.hasOwnProperty('data')) {\n error.data = null;\n }\n\n error.output = {\n statusCode: numberCode,\n payload: {},\n headers: {}\n };\n\n error.reformat = internals.reformat;\n error.reformat();\n\n if (!message && !error.message) {\n\n message = error.output.payload.error;\n }\n\n if (message) {\n error.message = message + (error.message ? ': ' + error.message : '');\n }\n\n return error;\n};\n\ninternals.reformat = function () {\n\n this.output.payload.statusCode = this.output.statusCode;\n this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown';\n\n if (this.output.statusCode === 500) {\n this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user\n } else if (this.message) {\n this.output.payload.message = this.message;\n }\n};\n\n// 4xx Client Errors\n\nexports.badRequest = function (message, data) {\n\n return internals.create(400, message, data, exports.badRequest);\n};\n\nexports.unauthorized = function (message, scheme, attributes) {\n // Or function (message, wwwAuthenticate[])\n\n var err = internals.create(401, message, undefined, exports.unauthorized);\n\n if (!scheme) {\n return err;\n }\n\n var wwwAuthenticate = '';\n\n if (typeof scheme === 'string') {\n\n // function (message, scheme, attributes)\n\n wwwAuthenticate = scheme;\n\n if (attributes || message) {\n err.output.payload.attributes = {};\n }\n\n if (attributes) {\n var names = (0, _keys2.default)(attributes);\n for (var i = 0; i < names.length; ++i) {\n var name = names[i];\n if (i) {\n wwwAuthenticate = wwwAuthenticate + ',';\n }\n\n var value = attributes[name];\n if (value === null || value === undefined) {\n // Value can be zero\n\n value = '';\n }\n wwwAuthenticate = wwwAuthenticate + ' ' + name + '=\"' + Hoek.escapeHeaderAttribute(value.toString()) + '\"';\n err.output.payload.attributes[name] = value;\n }\n }\n\n if (message) {\n if (attributes) {\n wwwAuthenticate = wwwAuthenticate + ',';\n }\n wwwAuthenticate = wwwAuthenticate + ' error=\"' + Hoek.escapeHeaderAttribute(message) + '\"';\n err.output.payload.attributes.error = message;\n } else {\n err.isMissing = true;\n }\n } else {\n\n // function (message, wwwAuthenticate[])\n\n var wwwArray = scheme;\n for (var i = 0; i < wwwArray.length; ++i) {\n if (i) {\n wwwAuthenticate = wwwAuthenticate + ', ';\n }\n\n wwwAuthenticate = wwwAuthenticate + wwwArray[i];\n }\n }\n\n err.output.headers['WWW-Authenticate'] = wwwAuthenticate;\n\n return err;\n};\n\nexports.forbidden = function (message, data) {\n\n return internals.create(403, message, data, exports.forbidden);\n};\n\nexports.notFound = function (message, data) {\n\n return internals.create(404, message, data, exports.notFound);\n};\n\nexports.methodNotAllowed = function (message, data) {\n\n return internals.create(405, message, data, exports.methodNotAllowed);\n};\n\nexports.notAcceptable = function (message, data) {\n\n return internals.create(406, message, data, exports.notAcceptable);\n};\n\nexports.proxyAuthRequired = function (message, data) {\n\n return internals.create(407, message, data, exports.proxyAuthRequired);\n};\n\nexports.clientTimeout = function (message, data) {\n\n return internals.create(408, message, data, exports.clientTimeout);\n};\n\nexports.conflict = function (message, data) {\n\n return internals.create(409, message, data, exports.conflict);\n};\n\nexports.resourceGone = function (message, data) {\n\n return internals.create(410, message, data, exports.resourceGone);\n};\n\nexports.lengthRequired = function (message, data) {\n\n return internals.create(411, message, data, exports.lengthRequired);\n};\n\nexports.preconditionFailed = function (message, data) {\n\n return internals.create(412, message, data, exports.preconditionFailed);\n};\n\nexports.entityTooLarge = function (message, data) {\n\n return internals.create(413, message, data, exports.entityTooLarge);\n};\n\nexports.uriTooLong = function (message, data) {\n\n return internals.create(414, message, data, exports.uriTooLong);\n};\n\nexports.unsupportedMediaType = function (message, data) {\n\n return internals.create(415, message, data, exports.unsupportedMediaType);\n};\n\nexports.rangeNotSatisfiable = function (message, data) {\n\n return internals.create(416, message, data, exports.rangeNotSatisfiable);\n};\n\nexports.expectationFailed = function (message, data) {\n\n return internals.create(417, message, data, exports.expectationFailed);\n};\n\nexports.badData = function (message, data) {\n\n return internals.create(422, message, data, exports.badData);\n};\n\nexports.preconditionRequired = function (message, data) {\n\n return internals.create(428, message, data, exports.preconditionRequired);\n};\n\nexports.tooManyRequests = function (message, data) {\n\n return internals.create(429, message, data, exports.tooManyRequests);\n};\n\nexports.illegal = function (message, data) {\n\n return internals.create(451, message, data, exports.illegal);\n};\n\n// 5xx Server Errors\n\nexports.internal = function (message, data, statusCode) {\n\n return internals.serverError(message, data, statusCode, exports.internal);\n};\n\ninternals.serverError = function (message, data, statusCode, ctor) {\n\n var error = undefined;\n if (data instanceof Error) {\n error = exports.wrap(data, statusCode, message);\n } else {\n error = internals.create(statusCode || 500, message, undefined, ctor);\n error.data = data;\n }\n\n return error;\n};\n\nexports.notImplemented = function (message, data) {\n\n return internals.serverError(message, data, 501, exports.notImplemented);\n};\n\nexports.badGateway = function (message, data) {\n\n return internals.serverError(message, data, 502, exports.badGateway);\n};\n\nexports.serverTimeout = function (message, data) {\n\n return internals.serverError(message, data, 503, exports.serverTimeout);\n};\n\nexports.gatewayTimeout = function (message, data) {\n\n return internals.serverError(message, data, 504, exports.gatewayTimeout);\n};\n\nexports.badImplementation = function (message, data) {\n\n var err = internals.serverError(message, data, 500, exports.badImplementation);\n err.isDeveloperError = true;\n return err;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/wreck/~/boom/lib/index.js\n ** module id = 150\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/wreck/~/boom/lib/index.js?"); + eval("'use strict';\n\n// Load modules\n\nvar _keys = __webpack_require__(78);\n\nvar _keys2 = _interopRequireDefault(_keys);\n\nvar _setPrototypeOf = __webpack_require__(151);\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Hoek = __webpack_require__(115);\n\n// Declare internals\n\nvar internals = {\n STATUS_CODES: (0, _setPrototypeOf2.default)({\n '100': 'Continue',\n '101': 'Switching Protocols',\n '102': 'Processing',\n '200': 'OK',\n '201': 'Created',\n '202': 'Accepted',\n '203': 'Non-Authoritative Information',\n '204': 'No Content',\n '205': 'Reset Content',\n '206': 'Partial Content',\n '207': 'Multi-Status',\n '300': 'Multiple Choices',\n '301': 'Moved Permanently',\n '302': 'Moved Temporarily',\n '303': 'See Other',\n '304': 'Not Modified',\n '305': 'Use Proxy',\n '307': 'Temporary Redirect',\n '400': 'Bad Request',\n '401': 'Unauthorized',\n '402': 'Payment Required',\n '403': 'Forbidden',\n '404': 'Not Found',\n '405': 'Method Not Allowed',\n '406': 'Not Acceptable',\n '407': 'Proxy Authentication Required',\n '408': 'Request Time-out',\n '409': 'Conflict',\n '410': 'Gone',\n '411': 'Length Required',\n '412': 'Precondition Failed',\n '413': 'Request Entity Too Large',\n '414': 'Request-URI Too Large',\n '415': 'Unsupported Media Type',\n '416': 'Requested Range Not Satisfiable',\n '417': 'Expectation Failed',\n '418': 'I\\'m a teapot',\n '422': 'Unprocessable Entity',\n '423': 'Locked',\n '424': 'Failed Dependency',\n '425': 'Unordered Collection',\n '426': 'Upgrade Required',\n '428': 'Precondition Required',\n '429': 'Too Many Requests',\n '431': 'Request Header Fields Too Large',\n '451': 'Unavailable For Legal Reasons',\n '500': 'Internal Server Error',\n '501': 'Not Implemented',\n '502': 'Bad Gateway',\n '503': 'Service Unavailable',\n '504': 'Gateway Time-out',\n '505': 'HTTP Version Not Supported',\n '506': 'Variant Also Negotiates',\n '507': 'Insufficient Storage',\n '509': 'Bandwidth Limit Exceeded',\n '510': 'Not Extended',\n '511': 'Network Authentication Required'\n }, null)\n};\n\nexports.wrap = function (error, statusCode, message) {\n\n Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');\n return error.isBoom ? error : internals.initialize(error, statusCode || 500, message);\n};\n\nexports.create = function (statusCode, message, data) {\n\n return internals.create(statusCode, message, data, exports.create);\n};\n\ninternals.create = function (statusCode, message, data, ctor) {\n\n var error = new Error(message ? message : undefined); // Avoids settings null message\n Error.captureStackTrace(error, ctor); // Filter the stack to our external API\n error.data = data || null;\n internals.initialize(error, statusCode);\n return error;\n};\n\ninternals.initialize = function (error, statusCode, message) {\n\n var numberCode = parseInt(statusCode, 10);\n Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode);\n\n error.isBoom = true;\n error.isServer = numberCode >= 500;\n\n if (!error.hasOwnProperty('data')) {\n error.data = null;\n }\n\n error.output = {\n statusCode: numberCode,\n payload: {},\n headers: {}\n };\n\n error.reformat = internals.reformat;\n error.reformat();\n\n if (!message && !error.message) {\n\n message = error.output.payload.error;\n }\n\n if (message) {\n error.message = message + (error.message ? ': ' + error.message : '');\n }\n\n return error;\n};\n\ninternals.reformat = function () {\n\n this.output.payload.statusCode = this.output.statusCode;\n this.output.payload.error = internals.STATUS_CODES[this.output.statusCode] || 'Unknown';\n\n if (this.output.statusCode === 500) {\n this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user\n } else if (this.message) {\n this.output.payload.message = this.message;\n }\n};\n\n// 4xx Client Errors\n\nexports.badRequest = function (message, data) {\n\n return internals.create(400, message, data, exports.badRequest);\n};\n\nexports.unauthorized = function (message, scheme, attributes) {\n // Or function (message, wwwAuthenticate[])\n\n var err = internals.create(401, message, undefined, exports.unauthorized);\n\n if (!scheme) {\n return err;\n }\n\n var wwwAuthenticate = '';\n\n if (typeof scheme === 'string') {\n\n // function (message, scheme, attributes)\n\n wwwAuthenticate = scheme;\n\n if (attributes || message) {\n err.output.payload.attributes = {};\n }\n\n if (attributes) {\n var names = (0, _keys2.default)(attributes);\n for (var i = 0; i < names.length; ++i) {\n var name = names[i];\n if (i) {\n wwwAuthenticate = wwwAuthenticate + ',';\n }\n\n var value = attributes[name];\n if (value === null || value === undefined) {\n // Value can be zero\n\n value = '';\n }\n wwwAuthenticate = wwwAuthenticate + ' ' + name + '=\"' + Hoek.escapeHeaderAttribute(value.toString()) + '\"';\n err.output.payload.attributes[name] = value;\n }\n }\n\n if (message) {\n if (attributes) {\n wwwAuthenticate = wwwAuthenticate + ',';\n }\n wwwAuthenticate = wwwAuthenticate + ' error=\"' + Hoek.escapeHeaderAttribute(message) + '\"';\n err.output.payload.attributes.error = message;\n } else {\n err.isMissing = true;\n }\n } else {\n\n // function (message, wwwAuthenticate[])\n\n var wwwArray = scheme;\n for (var i = 0; i < wwwArray.length; ++i) {\n if (i) {\n wwwAuthenticate = wwwAuthenticate + ', ';\n }\n\n wwwAuthenticate = wwwAuthenticate + wwwArray[i];\n }\n }\n\n err.output.headers['WWW-Authenticate'] = wwwAuthenticate;\n\n return err;\n};\n\nexports.forbidden = function (message, data) {\n\n return internals.create(403, message, data, exports.forbidden);\n};\n\nexports.notFound = function (message, data) {\n\n return internals.create(404, message, data, exports.notFound);\n};\n\nexports.methodNotAllowed = function (message, data) {\n\n return internals.create(405, message, data, exports.methodNotAllowed);\n};\n\nexports.notAcceptable = function (message, data) {\n\n return internals.create(406, message, data, exports.notAcceptable);\n};\n\nexports.proxyAuthRequired = function (message, data) {\n\n return internals.create(407, message, data, exports.proxyAuthRequired);\n};\n\nexports.clientTimeout = function (message, data) {\n\n return internals.create(408, message, data, exports.clientTimeout);\n};\n\nexports.conflict = function (message, data) {\n\n return internals.create(409, message, data, exports.conflict);\n};\n\nexports.resourceGone = function (message, data) {\n\n return internals.create(410, message, data, exports.resourceGone);\n};\n\nexports.lengthRequired = function (message, data) {\n\n return internals.create(411, message, data, exports.lengthRequired);\n};\n\nexports.preconditionFailed = function (message, data) {\n\n return internals.create(412, message, data, exports.preconditionFailed);\n};\n\nexports.entityTooLarge = function (message, data) {\n\n return internals.create(413, message, data, exports.entityTooLarge);\n};\n\nexports.uriTooLong = function (message, data) {\n\n return internals.create(414, message, data, exports.uriTooLong);\n};\n\nexports.unsupportedMediaType = function (message, data) {\n\n return internals.create(415, message, data, exports.unsupportedMediaType);\n};\n\nexports.rangeNotSatisfiable = function (message, data) {\n\n return internals.create(416, message, data, exports.rangeNotSatisfiable);\n};\n\nexports.expectationFailed = function (message, data) {\n\n return internals.create(417, message, data, exports.expectationFailed);\n};\n\nexports.badData = function (message, data) {\n\n return internals.create(422, message, data, exports.badData);\n};\n\nexports.preconditionRequired = function (message, data) {\n\n return internals.create(428, message, data, exports.preconditionRequired);\n};\n\nexports.tooManyRequests = function (message, data) {\n\n return internals.create(429, message, data, exports.tooManyRequests);\n};\n\nexports.illegal = function (message, data) {\n\n return internals.create(451, message, data, exports.illegal);\n};\n\n// 5xx Server Errors\n\nexports.internal = function (message, data, statusCode) {\n\n return internals.serverError(message, data, statusCode, exports.internal);\n};\n\ninternals.serverError = function (message, data, statusCode, ctor) {\n\n var error = undefined;\n if (data instanceof Error) {\n error = exports.wrap(data, statusCode, message);\n } else {\n error = internals.create(statusCode || 500, message, undefined, ctor);\n error.data = data;\n }\n\n return error;\n};\n\nexports.notImplemented = function (message, data) {\n\n return internals.serverError(message, data, 501, exports.notImplemented);\n};\n\nexports.badGateway = function (message, data) {\n\n return internals.serverError(message, data, 502, exports.badGateway);\n};\n\nexports.serverTimeout = function (message, data) {\n\n return internals.serverError(message, data, 503, exports.serverTimeout);\n};\n\nexports.gatewayTimeout = function (message, data) {\n\n return internals.serverError(message, data, 504, exports.gatewayTimeout);\n};\n\nexports.badImplementation = function (message, data) {\n\n var err = internals.serverError(message, data, 500, exports.badImplementation);\n err.isDeveloperError = true;\n return err;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/boom/lib/index.js\n ** module id = 150\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/boom/lib/index.js?"); /***/ }, /* 151 */ @@ -1245,7 +1245,7 @@ var ipfsAPI = /* 200 */ /***/ function(module, exports) { - eval("'use strict';\n\nmodule.exports = function (send) {\n return {\n add: function add(hash, opts, cb) {\n if (typeof opts === 'function') {\n cb = opts;\n opts = null;\n }\n\n return send('pin/add', hash, opts, null, cb);\n },\n remove: function remove(hash, opts, cb) {\n if (typeof opts === 'function') {\n cb = opts;\n opts = null;\n }\n\n return send('pin/rm', hash, opts, null, cb);\n },\n list: function list(type, cb) {\n if (typeof type === 'function') {\n cb = type;\n type = null;\n }\n var opts = null;\n if (type) opts = { type: type };\n return send('pin/ls', null, opts, null, cb);\n }\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/api/pin.js\n ** module id = 200\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/api/pin.js?"); + eval("'use strict';\n\nmodule.exports = function (send) {\n return {\n add: function add(hash, opts, cb) {\n if (typeof opts === 'function') {\n cb = opts;\n opts = null;\n }\n\n return send('pin/add', hash, opts, null, cb);\n },\n remove: function remove(hash, opts, cb) {\n if (typeof opts === 'function') {\n cb = opts;\n opts = null;\n }\n\n return send('pin/rm', hash, opts, null, cb);\n },\n list: function list(type, cb) {\n if (typeof type === 'function') {\n cb = type;\n type = null;\n }\n var opts = null;\n var hash = null;\n if (typeof type === 'string') {\n opts = { type: type };\n } else if (type && type.hash) {\n hash = type.hash;\n type.hash = null;\n opts = type;\n }\n\n return send('pin/ls', hash, opts, null, cb);\n }\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/api/pin.js\n ** module id = 200\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/api/pin.js?"); /***/ }, /* 201 */ @@ -1287,13 +1287,13 @@ var ipfsAPI = /* 207 */ /***/ function(module, exports) { - eval("module.exports = {\n\t\"name\": \"ipfs-api\",\n\t\"version\": \"2.13.1\",\n\t\"description\": \"A client library for the IPFS API\",\n\t\"main\": \"src/index.js\",\n\t\"dependencies\": {\n\t\t\"detect-node\": \"^2.0.3\",\n\t\t\"flatmap\": \"0.0.3\",\n\t\t\"glob\": \"^6.0.2\",\n\t\t\"multiaddr\": \"^1.0.0\",\n\t\t\"multipart-stream\": \"github:dignifiedquire/multipart-stream#a1a4e9c4d41d1f78dcf32279affbbb0bfd930c28\",\n\t\t\"ndjson\": \"^1.4.3\",\n\t\t\"qs\": \"^6.0.0\",\n\t\t\"wreck\": \"^7.0.0\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=4.2.2\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/ipfs/js-ipfs-api\"\n\t},\n\t\"devDependencies\": {\n\t\t\"babel-core\": \"^6.1.21\",\n\t\t\"babel-eslint\": \"^5.0.0-beta9\",\n\t\t\"babel-loader\": \"^6.2.0\",\n\t\t\"babel-plugin-transform-runtime\": \"^6.1.18\",\n\t\t\"babel-preset-es2015\": \"^6.0.15\",\n\t\t\"babel-runtime\": \"^6.3.19\",\n\t\t\"chai\": \"^3.4.1\",\n\t\t\"concurrently\": \"^1.0.0\",\n\t\t\"eslint\": \"^2.0.0-rc.0\",\n\t\t\"eslint-config-standard\": \"^5.1.0\",\n\t\t\"eslint-plugin-promise\": \"^1.0.8\",\n\t\t\"eslint-plugin-standard\": \"^1.3.1\",\n\t\t\"glob-stream\": \"5.3.1\",\n\t\t\"gulp\": \"^3.9.0\",\n\t\t\"gulp-bump\": \"^1.0.0\",\n\t\t\"gulp-eslint\": \"^2.0.0-rc-3\",\n\t\t\"gulp-filter\": \"^3.0.1\",\n\t\t\"gulp-git\": \"^1.6.0\",\n\t\t\"gulp-load-plugins\": \"^1.0.0\",\n\t\t\"gulp-mocha\": \"^2.1.3\",\n\t\t\"gulp-size\": \"^2.0.0\",\n\t\t\"gulp-tag-version\": \"^1.3.0\",\n\t\t\"gulp-util\": \"^3.0.7\",\n\t\t\"https-browserify\": \"0.0.1\",\n\t\t\"ipfsd-ctl\": \"^0.8.1\",\n\t\t\"json-loader\": \"^0.5.3\",\n\t\t\"karma\": \"^0.13.11\",\n\t\t\"karma-chrome-launcher\": \"^0.2.1\",\n\t\t\"karma-firefox-launcher\": \"^0.1.7\",\n\t\t\"karma-mocha\": \"^0.2.0\",\n\t\t\"karma-mocha-reporter\": \"^1.1.1\",\n\t\t\"karma-sauce-launcher\": \"^0.3.0\",\n\t\t\"karma-webpack\": \"^1.7.0\",\n\t\t\"mocha\": \"^2.3.3\",\n\t\t\"pre-commit\": \"^1.0.6\",\n\t\t\"raw-loader\": \"^0.5.1\",\n\t\t\"rimraf\": \"^2.4.5\",\n\t\t\"run-sequence\": \"^1.1.4\",\n\t\t\"semver\": \"^5.1.0\",\n\t\t\"stream-equal\": \"^0.1.7\",\n\t\t\"stream-http\": \"^2.1.0\",\n\t\t\"uglify-js\": \"^2.4.24\",\n\t\t\"webpack-stream\": \"^3.1.0\"\n\t},\n\t\"scripts\": {\n\t\t\"test\": \"gulp test\",\n\t\t\"test:node\": \"gulp test:node\",\n\t\t\"test:browser\": \"gulp test:browser\",\n\t\t\"lint\": \"gulp lint\",\n\t\t\"build\": \"gulp build\"\n\t},\n\t\"pre-commit\": [\n\t\t\"lint\",\n\t\t\"test\"\n\t],\n\t\"keywords\": [\n\t\t\"ipfs\"\n\t],\n\t\"author\": \"Matt Bell \",\n\t\"contributors\": [\n\t\t\"Travis Person \",\n\t\t\"Jeromy Jonson \",\n\t\t\"David Dias \",\n\t\t\"Juan Benet \",\n\t\t\"Friedel Ziegelmayer \"\n\t],\n\t\"license\": \"MIT\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/ipfs/js-ipfs-api/issues\"\n\t},\n\t\"homepage\": \"https://github.com/ipfs/js-ipfs-api\"\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./package.json\n ** module id = 207\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./package.json?"); + eval("module.exports = {\n\t\"name\": \"ipfs-api\",\n\t\"version\": \"2.13.2\",\n\t\"description\": \"A client library for the IPFS API\",\n\t\"main\": \"src/index.js\",\n\t\"dependencies\": {\n\t\t\"detect-node\": \"^2.0.3\",\n\t\t\"flatmap\": \"0.0.3\",\n\t\t\"glob\": \"^6.0.2\",\n\t\t\"multiaddr\": \"^1.0.0\",\n\t\t\"multipart-stream\": \"github:dignifiedquire/multipart-stream#a1a4e9c4d41d1f78dcf32279affbbb0bfd930c28\",\n\t\t\"ndjson\": \"^1.4.3\",\n\t\t\"qs\": \"^6.0.0\",\n\t\t\"wreck\": \"^7.0.0\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=4.2.2\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/ipfs/js-ipfs-api\"\n\t},\n\t\"devDependencies\": {\n\t\t\"babel-core\": \"^6.1.21\",\n\t\t\"babel-eslint\": \"^5.0.0-beta9\",\n\t\t\"babel-loader\": \"^6.2.0\",\n\t\t\"babel-plugin-transform-runtime\": \"^6.1.18\",\n\t\t\"babel-preset-es2015\": \"^6.0.15\",\n\t\t\"babel-runtime\": \"^6.3.19\",\n\t\t\"chai\": \"^3.4.1\",\n\t\t\"concurrently\": \"^1.0.0\",\n\t\t\"eslint\": \"^2.0.0-rc.0\",\n\t\t\"eslint-config-standard\": \"^5.1.0\",\n\t\t\"eslint-plugin-promise\": \"^1.0.8\",\n\t\t\"eslint-plugin-standard\": \"^1.3.1\",\n\t\t\"glob-stream\": \"5.3.1\",\n\t\t\"gulp\": \"^3.9.0\",\n\t\t\"gulp-bump\": \"^1.0.0\",\n\t\t\"gulp-eslint\": \"^2.0.0-rc-3\",\n\t\t\"gulp-filter\": \"^4.0.0\",\n\t\t\"gulp-git\": \"^1.6.0\",\n\t\t\"gulp-load-plugins\": \"^1.0.0\",\n\t\t\"gulp-mocha\": \"^2.1.3\",\n\t\t\"gulp-size\": \"^2.0.0\",\n\t\t\"gulp-tag-version\": \"^1.3.0\",\n\t\t\"gulp-util\": \"^3.0.7\",\n\t\t\"https-browserify\": \"0.0.1\",\n\t\t\"ipfsd-ctl\": \"^0.8.1\",\n\t\t\"json-loader\": \"^0.5.3\",\n\t\t\"karma\": \"^0.13.11\",\n\t\t\"karma-chrome-launcher\": \"^0.2.1\",\n\t\t\"karma-firefox-launcher\": \"^0.1.7\",\n\t\t\"karma-mocha\": \"^0.2.0\",\n\t\t\"karma-mocha-reporter\": \"^1.1.1\",\n\t\t\"karma-sauce-launcher\": \"^0.3.0\",\n\t\t\"karma-webpack\": \"^1.7.0\",\n\t\t\"mocha\": \"^2.3.3\",\n\t\t\"pre-commit\": \"^1.0.6\",\n\t\t\"raw-loader\": \"^0.5.1\",\n\t\t\"rimraf\": \"^2.4.5\",\n\t\t\"run-sequence\": \"^1.1.4\",\n\t\t\"semver\": \"^5.1.0\",\n\t\t\"stream-equal\": \"^0.1.7\",\n\t\t\"stream-http\": \"^2.1.0\",\n\t\t\"uglify-js\": \"^2.4.24\",\n\t\t\"webpack-stream\": \"^3.1.0\"\n\t},\n\t\"scripts\": {\n\t\t\"test\": \"gulp test\",\n\t\t\"test:node\": \"gulp test:node\",\n\t\t\"test:browser\": \"gulp test:browser\",\n\t\t\"lint\": \"gulp lint\",\n\t\t\"build\": \"gulp build\"\n\t},\n\t\"pre-commit\": [\n\t\t\"lint\",\n\t\t\"test\"\n\t],\n\t\"keywords\": [\n\t\t\"ipfs\"\n\t],\n\t\"author\": \"Matt Bell \",\n\t\"contributors\": [\n\t\t\"Travis Person \",\n\t\t\"Jeromy Jonson \",\n\t\t\"David Dias \",\n\t\t\"Juan Benet \",\n\t\t\"Friedel Ziegelmayer \"\n\t],\n\t\"license\": \"MIT\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/ipfs/js-ipfs-api/issues\"\n\t},\n\t\"homepage\": \"https://github.com/ipfs/js-ipfs-api\"\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./package.json\n ** module id = 207\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./package.json?"); /***/ }, /* 208 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar _promise = __webpack_require__(164);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _typeof2 = __webpack_require__(20);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Wreck = __webpack_require__(83);\nvar Qs = __webpack_require__(209);\nvar ndjson = __webpack_require__(188);\nvar getFilesStream = __webpack_require__(213);\n\nvar isNode = __webpack_require__(214);\n\n// -- Internal\n\nfunction parseChunkedJson(res, cb) {\n var parsed = [];\n res.pipe(ndjson.parse()).on('data', parsed.push.bind(parsed)).on('end', function () {\n return cb(null, parsed);\n });\n}\n\nfunction onRes(buffer, cb) {\n return function (err, res) {\n if (err) {\n return cb(err);\n }\n\n var stream = !!res.headers['x-stream-output'];\n var chunkedObjects = !!res.headers['x-chunked-output'];\n var isJson = res.headers['content-type'].indexOf('application/json') === 0;\n\n if (res.statusCode >= 400 || !res.statusCode) {\n var _ret = function () {\n var error = new Error('Server responded with ' + res.statusCode);\n\n return {\n v: Wreck.read(res, { json: true }, function (err, payload) {\n if (err) {\n return cb(err);\n }\n if (payload) {\n error.code = payload.Code;\n error.message = payload.Message;\n }\n cb(error);\n })\n };\n }();\n\n if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === \"object\") return _ret.v;\n }\n\n if (stream && !buffer) return cb(null, res);\n\n if (chunkedObjects) {\n if (isJson) return parseChunkedJson(res, cb);\n\n return Wreck.read(res, null, cb);\n }\n\n Wreck.read(res, { json: isJson }, cb);\n };\n}\n\nfunction requestAPI(config, path, args, qs, files, buffer, cb) {\n qs = qs || {};\n if (Array.isArray(path)) path = path.join('/');\n if (args && !Array.isArray(args)) args = [args];\n if (args) qs.arg = args;\n if (files && !Array.isArray(files)) files = [files];\n\n if (qs.r) {\n qs.recursive = qs.r;\n delete qs.r; // From IPFS 0.4.0, it throw an error when both r and recursive are passed\n }\n\n if (!isNode && qs.recursive && path === 'add') {\n return cb(new Error('Recursive uploads are not supported in the browser'));\n }\n\n qs['stream-channels'] = true;\n\n var stream = undefined;\n if (files) {\n stream = getFilesStream(files, qs);\n }\n\n // this option is only used internally, not passed to daemon\n delete qs.followSymlinks;\n\n var port = config.port ? ':' + config.port : '';\n\n var opts = {\n method: files ? 'POST' : 'GET',\n uri: config.protocol + '://' + config.host + port + config['api-path'] + path + '?' + Qs.stringify(qs, { arrayFormat: 'repeat' }),\n headers: {}\n };\n\n if (isNode) {\n // Browsers do not allow you to modify the user agent\n opts.headers['User-Agent'] = config['user-agent'];\n }\n\n if (files) {\n if (!stream.boundary) {\n return cb(new Error('No boundary in multipart stream'));\n }\n\n opts.headers['Content-Type'] = 'multipart/form-data; boundary=' + stream.boundary;\n opts.downstreamRes = stream;\n opts.payload = stream;\n }\n\n return Wreck.request(opts.method, opts.uri, opts, onRes(buffer, cb));\n}\n\n// -- Interface\n\nexports = module.exports = function getRequestAPI(config) {\n return function (path, args, qs, files, buffer, cb) {\n if (typeof buffer === 'function') {\n cb = buffer;\n buffer = false;\n }\n\n if (typeof cb !== 'function' && typeof _promise2.default !== 'undefined') {\n return new _promise2.default(function (resolve, reject) {\n requestAPI(config, path, args, qs, files, buffer, function (err, res) {\n if (err) return reject(err);\n resolve(res);\n });\n });\n }\n\n return requestAPI(config, path, args, qs, files, buffer, cb);\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/request-api.js\n ** module id = 208\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/request-api.js?"); + eval("'use strict';\n\nvar _promise = __webpack_require__(164);\n\nvar _promise2 = _interopRequireDefault(_promise);\n\nvar _typeof2 = __webpack_require__(20);\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Wreck = __webpack_require__(83);\nvar Qs = __webpack_require__(209);\nvar ndjson = __webpack_require__(188);\nvar getFilesStream = __webpack_require__(213);\n\nvar isNode = __webpack_require__(214);\n\n// -- Internal\n\nfunction parseChunkedJson(res, cb) {\n var parsed = [];\n res.pipe(ndjson.parse()).on('data', parsed.push.bind(parsed)).on('end', function () {\n return cb(null, parsed);\n });\n}\n\nfunction onRes(buffer, cb) {\n return function (err, res) {\n if (err) {\n return cb(err);\n }\n\n var stream = !!res.headers['x-stream-output'];\n var chunkedObjects = !!res.headers['x-chunked-output'];\n var isJson = res.headers['content-type'] && res.headers['content-type'].indexOf('application/json') === 0;\n\n if (res.statusCode >= 400 || !res.statusCode) {\n var _ret = function () {\n var error = new Error('Server responded with ' + res.statusCode);\n\n return {\n v: Wreck.read(res, { json: true }, function (err, payload) {\n if (err) {\n return cb(err);\n }\n if (payload) {\n error.code = payload.Code;\n error.message = payload.Message || payload.toString();\n }\n cb(error);\n })\n };\n }();\n\n if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === \"object\") return _ret.v;\n }\n\n if (stream && !buffer) return cb(null, res);\n\n if (chunkedObjects) {\n if (isJson) return parseChunkedJson(res, cb);\n\n return Wreck.read(res, null, cb);\n }\n\n Wreck.read(res, { json: isJson }, cb);\n };\n}\n\nfunction requestAPI(config, path, args, qs, files, buffer, cb) {\n qs = qs || {};\n if (Array.isArray(path)) path = path.join('/');\n if (args && !Array.isArray(args)) args = [args];\n if (args) qs.arg = args;\n if (files && !Array.isArray(files)) files = [files];\n\n if (qs.r) {\n qs.recursive = qs.r;\n delete qs.r; // From IPFS 0.4.0, it throw an error when both r and recursive are passed\n }\n\n if (!isNode && qs.recursive && path === 'add') {\n return cb(new Error('Recursive uploads are not supported in the browser'));\n }\n\n qs['stream-channels'] = true;\n\n var stream = undefined;\n if (files) {\n stream = getFilesStream(files, qs);\n }\n\n // this option is only used internally, not passed to daemon\n delete qs.followSymlinks;\n\n var port = config.port ? ':' + config.port : '';\n\n var opts = {\n method: files ? 'POST' : 'GET',\n uri: config.protocol + '://' + config.host + port + config['api-path'] + path + '?' + Qs.stringify(qs, { arrayFormat: 'repeat' }),\n headers: {}\n };\n\n if (isNode) {\n // Browsers do not allow you to modify the user agent\n opts.headers['User-Agent'] = config['user-agent'];\n }\n\n if (files) {\n if (!stream.boundary) {\n return cb(new Error('No boundary in multipart stream'));\n }\n\n opts.headers['Content-Type'] = 'multipart/form-data; boundary=' + stream.boundary;\n opts.downstreamRes = stream;\n opts.payload = stream;\n }\n\n return Wreck.request(opts.method, opts.uri, opts, onRes(buffer, cb));\n}\n\n// -- Interface\n\nexports = module.exports = function getRequestAPI(config) {\n return function (path, args, qs, files, buffer, cb) {\n if (typeof buffer === 'function') {\n cb = buffer;\n buffer = false;\n }\n\n if (typeof cb !== 'function' && typeof _promise2.default !== 'undefined') {\n return new _promise2.default(function (resolve, reject) {\n requestAPI(config, path, args, qs, files, buffer, function (err, res) {\n if (err) return reject(err);\n resolve(res);\n });\n });\n }\n\n return requestAPI(config, path, args, qs, files, buffer, cb);\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/request-api.js\n ** module id = 208\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/request-api.js?"); /***/ }, /* 209 */ diff --git a/dist/ipfsapi.min.js b/dist/ipfsapi.min.js index e987e5df88..874ab42c1a 100644 --- a/dist/ipfsapi.min.js +++ b/dist/ipfsapi.min.js @@ -5,14 +5,14 @@ var ipfsAPI=function(modules){function __webpack_require__(moduleId){if(installe * @license MIT */ "use strict";function typedArraySupport(){function Bar(){}try{var arr=new Uint8Array(1);return arr.foo=function(){return 42},arr.constructor=Bar,42===arr.foo()&&arr.constructor===Bar&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Buffer(arg){return this instanceof Buffer?(Buffer.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof arg?fromNumber(this,arg):"string"==typeof arg?fromString(this,arg,arguments.length>1?arguments[1]:"utf8"):fromObject(this,arg)):arguments.length>1?new Buffer(arg,arguments[1]):new Buffer(arg)}function fromNumber(that,length){if(that=allocate(that,0>length?0:0|checked(length)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;length>i;i++)that[i]=0;return that}function fromString(that,string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");var length=0|byteLength(string,encoding);return that=allocate(that,length),that.write(string,encoding),that}function fromObject(that,object){if(Buffer.isBuffer(object))return fromBuffer(that,object);if(isArray(object))return fromArray(that,object);if(null==object)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(object.buffer instanceof ArrayBuffer)return fromTypedArray(that,object);if(object instanceof ArrayBuffer)return fromArrayBuffer(that,object)}return object.length?fromArrayLike(that,object):fromJsonObject(that,object)}function fromBuffer(that,buffer){var length=0|checked(buffer.length);return that=allocate(that,length),buffer.copy(that,0,0,length),that}function fromArray(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromTypedArray(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromArrayBuffer(that,array){return Buffer.TYPED_ARRAY_SUPPORT?(array.byteLength,that=Buffer._augment(new Uint8Array(array))):that=fromTypedArray(that,new Uint8Array(array)),that}function fromArrayLike(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromJsonObject(that,object){var array,length=0;"Buffer"===object.type&&isArray(object.data)&&(array=object.data,length=0|checked(array.length)),that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function allocate(that,length){Buffer.TYPED_ARRAY_SUPPORT?(that=Buffer._augment(new Uint8Array(length)),that.__proto__=Buffer.prototype):(that.length=length,that._isBuffer=!0);var fromPool=0!==length&&length<=Buffer.poolSize>>>1;return fromPool&&(that.parent=rootParent),that}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);return delete buf.parent,buf}function byteLength(string,encoding){"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"binary":case"raw":case"raws":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if(start=0|start,end=void 0===end||end===1/0?this.length:0|end,encoding||(encoding="utf8"),0>start&&(start=0),end>this.length&&(end=this.length),start>=end)return"";for(;;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length),length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))throw new Error("Invalid hex string");buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function binaryWrite(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;end>i;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(end>=i+bytesPerSequence){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:128>firstByte&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128===(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128===(192&secondByte)&&128===(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte,tempCodePoint>2047&&(55296>tempCodePoint||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128===(192&secondByte)&&128===(192&thirdByte)&&128===(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte,tempCodePoint>65535&&1114112>tempCodePoint&&(codePoint=tempCodePoint))}}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(MAX_ARGUMENTS_LENGTH>=len)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;len>i;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(127&buf[i]);return ret}function binarySlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out="",i=start;end>i;i++)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;ioffset)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||min>value)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){0>value&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);j>i;i++)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){0>value&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);j>i;i++)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||min>value)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range");if(0>offset)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return 16>n?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;length>i;i++){if(codePoint=string.charCodeAt(i),codePoint>55295&&57344>codePoint){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(56320>codePoint){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,128>codePoint){if((units-=1)<0)break;bytes.push(codePoint)}else if(2048>codePoint){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(65536>codePoint){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(1114112>codePoint))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;length>i&&!(i+offset>=dst.length||i>=src.length);i++)dst[i+offset]=src[i];return i}var base64=__webpack_require__(124),ieee754=__webpack_require__(184),isArray=__webpack_require__(127);exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.poolSize=8192;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT?(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array):(Buffer.prototype.length=void 0,Buffer.prototype.parent=void 0),Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);len>i&&a[i]===b[i];)++i;return i!==len&&(x=a[i],y=b[i]),y>x?-1:x>y?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError("list argument must be an Array of Buffers.");if(0===list.length)return new Buffer(0);var i;if(void 0===length)for(length=0,i=0;i0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),""},Buffer.prototype.compare=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:Buffer.compare(this,b)},Buffer.prototype.indexOf=function(val,byteOffset){function arrayIndexOf(arr,val,byteOffset){for(var foundIndex=-1,i=0;byteOffset+i2147483647?byteOffset=2147483647:-2147483648>byteOffset&&(byteOffset=-2147483648),byteOffset>>=0,0===this.length)return-1;if(byteOffset>=this.length)return-1;if(0>byteOffset&&(byteOffset=Math.max(this.length+byteOffset,0)),"string"==typeof val)return 0===val.length?-1:String.prototype.indexOf.call(this,val,byteOffset);if(Buffer.isBuffer(val))return arrayIndexOf(this,val,byteOffset);if("number"==typeof val)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,val,byteOffset):arrayIndexOf(this,[val],byteOffset);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.get=function(offset){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(offset)},Buffer.prototype.set=function(v,offset){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(v,offset)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else if(isFinite(offset))offset=0|offset,isFinite(length)?(length=0|length,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=0|length,length=swap}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(0>length||0>offset)||offset>this.length)throw new RangeError("attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,0>start?(start+=len,0>start&&(start=0)):start>len&&(start=len),0>end?(end+=len,0>end&&(end=0)):end>len&&(end=len),start>end&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=Buffer._augment(this.subarray(start,end));else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;sliceLen>i;i++)newBuf[i]=this[i+start]}return newBuf.length&&(newBuf.parent=this.parent||this),newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){value=+value,offset=0|offset,byteLength=0|byteLength,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1,i=0;for(this[offset]=255&value;++i=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0>value?1:0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0>value?1:0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),0>value&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),0>value&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&start>end&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(0>targetStart)throw new RangeError("targetStart out of bounds");if(0>start||start>=this.length)throw new RangeError("sourceStart out of bounds");if(0>end)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStartstart&&end>targetStart)for(i=len-1;i>=0;i--)target[i+targetStart]=this[i+start];else if(1e3>len||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;len>i;i++)target[i+targetStart]=this[i+start];else target._set(this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(value,start,end){if(value||(value=0),start||(start=0),end||(end=this.length),start>end)throw new RangeError("end < start");if(end!==start&&0!==this.length){if(0>start||start>=this.length)throw new RangeError("start out of bounds");if(0>end||end>this.length)throw new RangeError("end out of bounds");var i;if("number"==typeof value)for(i=start;end>i;i++)this[i]=value;else{var bytes=utf8ToBytes(value.toString()),len=bytes.length;for(i=start;end>i;i++)this[i]=bytes[i%len]}return this}},Buffer.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(Buffer.TYPED_ARRAY_SUPPORT)return new Buffer(this).buffer;for(var buf=new Uint8Array(this.length),i=0,len=buf.length;len>i;i+=1)buf[i]=this[i];return buf.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var BP=Buffer.prototype;Buffer._augment=function(arr){return arr.constructor=Buffer,arr._isBuffer=!0,arr._set=arr.set,arr.get=BP.get,arr.set=BP.set,arr.write=BP.write,arr.toString=BP.toString,arr.toLocaleString=BP.toString,arr.toJSON=BP.toJSON,arr.equals=BP.equals,arr.compare=BP.compare,arr.indexOf=BP.indexOf,arr.copy=BP.copy,arr.slice=BP.slice,arr.readUIntLE=BP.readUIntLE,arr.readUIntBE=BP.readUIntBE,arr.readUInt8=BP.readUInt8,arr.readUInt16LE=BP.readUInt16LE,arr.readUInt16BE=BP.readUInt16BE,arr.readUInt32LE=BP.readUInt32LE,arr.readUInt32BE=BP.readUInt32BE,arr.readIntLE=BP.readIntLE,arr.readIntBE=BP.readIntBE,arr.readInt8=BP.readInt8,arr.readInt16LE=BP.readInt16LE,arr.readInt16BE=BP.readInt16BE,arr.readInt32LE=BP.readInt32LE,arr.readInt32BE=BP.readInt32BE,arr.readFloatLE=BP.readFloatLE,arr.readFloatBE=BP.readFloatBE,arr.readDoubleLE=BP.readDoubleLE,arr.readDoubleBE=BP.readDoubleBE,arr.writeUInt8=BP.writeUInt8,arr.writeUIntLE=BP.writeUIntLE,arr.writeUIntBE=BP.writeUIntBE,arr.writeUInt16LE=BP.writeUInt16LE,arr.writeUInt16BE=BP.writeUInt16BE,arr.writeUInt32LE=BP.writeUInt32LE,arr.writeUInt32BE=BP.writeUInt32BE,arr.writeIntLE=BP.writeIntLE,arr.writeIntBE=BP.writeIntBE,arr.writeInt8=BP.writeInt8,arr.writeInt16LE=BP.writeInt16LE,arr.writeInt16BE=BP.writeInt16BE,arr.writeInt32LE=BP.writeInt32LE,arr.writeInt32BE=BP.writeInt32BE,arr.writeFloatLE=BP.writeFloatLE,arr.writeFloatBE=BP.writeFloatBE,arr.writeDoubleLE=BP.writeDoubleLE,arr.writeDoubleBE=BP.writeDoubleBE,arr.fill=BP.fill,arr.inspect=BP.inspect,arr.toArrayBuffer=BP.toArrayBuffer,arr};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g}).call(exports,__webpack_require__(1).Buffer,function(){return this}())},function(module,exports){function cleanUpNextTick(){draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue()}function drainQueue(){if(!draining){var timeout=setTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex1)for(var i=1;i=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0===keys.length&&(!array||0==value.length))return braces[0]+base+braces[1];if(0>recurseTimes)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;l>i;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if(desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]},desc.get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1),str.indexOf("\n")>-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n"))):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key),name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);return length>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return 10>n?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];len>i;x=args[++i])str+=isNull(x)||!isObject(x)?" "+x:" "+inspect(x);return str},exports.deprecate=function(fn,msg){function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(process.noDeprecation===!0)return fn;var warned=!1;return deprecated};var debugEnviron,debugs={};exports.debuglog=function(set){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),!debugs[set])if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=__webpack_require__(228);var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=__webpack_require__(4),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}).call(exports,function(){return this}(),__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _typeof="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof _Symbol&&obj.constructor===_Symbol?"symbol":typeof obj};exports.__esModule=!0;var _iterator=__webpack_require__(122),_iterator2=_interopRequireDefault(_iterator),_symbol=__webpack_require__(121),_symbol2=_interopRequireDefault(_symbol);exports["default"]="function"==typeof _symbol2["default"]&&"symbol"===_typeof(_iterator2["default"])?function(obj){return"undefined"==typeof obj?"undefined":_typeof(obj)}:function(obj){return obj&&"function"==typeof _symbol2["default"]&&obj.constructor===_symbol2["default"]?"symbol":"undefined"==typeof obj?"undefined":_typeof(obj)}},function(module,exports,__webpack_require__){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=__webpack_require__(10);util.inherits=__webpack_require__(4);var Readable=__webpack_require__(77),Writable=__webpack_require__(47);util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(137),__esModule:!0}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(28);module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},function(module,exports,__webpack_require__){var global=__webpack_require__(9),core=__webpack_require__(7),ctx=__webpack_require__(20),PROTOTYPE="prototype",$export=function(type,name,source){var key,own,out,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{})[PROTOTYPE];IS_GLOBAL&&(source=name);for(key in source)own=!IS_FORCED&&target&&key in target,own&&key in exports||(out=own?target[key]:source[key],exports[key]=IS_GLOBAL&&"function"!=typeof target[key]?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(param){return this instanceof C?new C(param):C(param)};return F[PROTOTYPE]=C[PROTOTYPE],F}(out):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,IS_PROTO&&((exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,module.exports=$export},function(module,exports,__webpack_require__){(function(process){function normalizeArray(parts,allowAboveRoot){for(var up=0,i=parts.length-1;i>=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts}function filter(xs,f){if(xs.filter)return xs.filter(f);for(var res=[],i=0;i=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/"),(resolvedAbsolute?"/":"")+resolvedPath||"."},exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash="/"===substr(path,-1);return path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/"),path||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},exports.isAbsolute=function(path){return"/"===path.charAt(0)},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))},exports.relative=function(from,to){function trim(arr){for(var start=0;start=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;length>i;i++)if(fromParts[i]!==toParts[i]){samePartsLength=i;break}for(var outputParts=[],i=samePartsLength;istart&&(start=str.length+start),str.substr(start,len)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(Buffer,process){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _stringify=__webpack_require__(114),_stringify2=_interopRequireDefault(_stringify),_keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys),_defineProperty=__webpack_require__(116),_defineProperty2=_interopRequireDefault(_defineProperty),_getOwnPropertyDescriptor=__webpack_require__(117),_getOwnPropertyDescriptor2=_interopRequireDefault(_getOwnPropertyDescriptor),_getOwnPropertyNames=__webpack_require__(118),_getOwnPropertyNames2=_interopRequireDefault(_getOwnPropertyNames),_create=__webpack_require__(32),_create2=_interopRequireDefault(_create),_getPrototypeOf=__webpack_require__(119),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),Crypto=__webpack_require__(177),Path=__webpack_require__(17),Util=__webpack_require__(11),Escape=__webpack_require__(89),internals={};exports.clone=function(obj,seen){if("object"!==("undefined"==typeof obj?"undefined":(0,_typeof3["default"])(obj))||null===obj)return obj;seen=seen||{orig:[],copy:[]};var lookup=seen.orig.indexOf(obj);if(-1!==lookup)return seen.copy[lookup];var newObj=void 0,cloneDeep=!1;if(Array.isArray(obj))newObj=[],cloneDeep=!0;else if(Buffer.isBuffer(obj))newObj=new Buffer(obj);else if(obj instanceof Date)newObj=new Date(obj.getTime());else if(obj instanceof RegExp)newObj=new RegExp(obj);else{var proto=(0,_getPrototypeOf2["default"])(obj);proto&&proto.isImmutable?newObj=obj:(newObj=(0,_create2["default"])(proto),cloneDeep=!0)}if(seen.orig.push(obj),seen.copy.push(newObj),cloneDeep)for(var keys=(0,_getOwnPropertyNames2["default"])(obj),i=0;i=2,"Insufficient arguments"),exports.assert("string"==typeof ref||"object"===("undefined"==typeof ref?"undefined":(0,_typeof3["default"])(ref)),"Reference must be string or an object"),exports.assert(values.length,"Values array cannot be empty");var compare=void 0,compareFlags=void 0;if(options.deep){compare=exports.deepEqual;var hasOnly=options.hasOwnProperty("only"),hasPart=options.hasOwnProperty("part");compareFlags={prototype:hasOnly?options.only:hasPart?!options.part:!1,part:hasOnly?!options.only:hasPart?options.part:!0}}else compare=function(a,b){return a===b};for(var misses=!1,matches=new Array(values.length),i=0;i1||!options.part&&!matches[i])return!1;return options.only&&misses?!1:result},exports.flatten=function(array,target){for(var result=target||[],i=0;i\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute),"Bad attribute value ("+attribute+")"),attribute.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')},exports.escapeHtml=function(string){return Escape.escapeHtml(string)},exports.escapeJavaScript=function(string){return Escape.escapeJavaScript(string)},exports.nextTick=function(callback){return function(){var args=arguments;process.nextTick(function(){callback.apply(null,args)})}},exports.once=function(method){if(method._hoekOnce)return method;var once=!1,wrapped=function(){once||(once=!0,method.apply(null,arguments))};return wrapped._hoekOnce=!0,wrapped},exports.isAbsolutePath=function(path,platform){return path?Path.isAbsolute?Path.isAbsolute(path):(platform=platform||process.platform,"win32"!==platform?"/"===path[0]:!!/^(?:[a-zA-Z]:[\\\/])|(?:[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/])/.test(path)):!1},exports.isInteger=function(value){return"number"==typeof value&&parseFloat(value)===parseInt(value,10)&&!isNaN(value)},exports.ignore=function(){},exports.inherits=Util.inherits, +source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},function(module,exports){var core=module.exports={version:"1.2.6"};"number"==typeof __e&&(__e=core)},function(module,exports,__webpack_require__){var store=__webpack_require__(60)("wks"),uid=__webpack_require__(62),Symbol=__webpack_require__(9).Symbol;module.exports=function(name){return store[name]||(store[name]=Symbol&&Symbol[name]||(Symbol||uid)("Symbol."+name))}},function(module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},function(module,exports,__webpack_require__){(function(Buffer){function isArray(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return"[object Date]"===objectToString(d)}function isError(e){return"[object Error]"===objectToString(e)||e instanceof Error}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){(function(global,process){function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0===keys.length&&(!array||0==value.length))return braces[0]+base+braces[1];if(0>recurseTimes)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;l>i;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if(desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]},desc.get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1),str.indexOf("\n")>-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n"))):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key),name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);return length>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return 10>n?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];len>i;x=args[++i])str+=isNull(x)||!isObject(x)?" "+x:" "+inspect(x);return str},exports.deprecate=function(fn,msg){function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(process.noDeprecation===!0)return fn;var warned=!1;return deprecated};var debugEnviron,debugs={};exports.debuglog=function(set){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),!debugs[set])if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=__webpack_require__(228);var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=__webpack_require__(4),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}).call(exports,function(){return this}(),__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _typeof="function"==typeof _Symbol&&"symbol"==typeof _Symbol$iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof _Symbol&&obj.constructor===_Symbol?"symbol":typeof obj};exports.__esModule=!0;var _iterator=__webpack_require__(122),_iterator2=_interopRequireDefault(_iterator),_symbol=__webpack_require__(121),_symbol2=_interopRequireDefault(_symbol);exports["default"]="function"==typeof _symbol2["default"]&&"symbol"===_typeof(_iterator2["default"])?function(obj){return"undefined"==typeof obj?"undefined":_typeof(obj)}:function(obj){return obj&&"function"==typeof _symbol2["default"]&&obj.constructor===_symbol2["default"]?"symbol":"undefined"==typeof obj?"undefined":_typeof(obj)}},function(module,exports,__webpack_require__){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=__webpack_require__(10);util.inherits=__webpack_require__(4);var Readable=__webpack_require__(77),Writable=__webpack_require__(47);util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(137),__esModule:!0}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(28);module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},function(module,exports,__webpack_require__){var global=__webpack_require__(9),core=__webpack_require__(7),ctx=__webpack_require__(20),PROTOTYPE="prototype",$export=function(type,name,source){var key,own,out,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{})[PROTOTYPE];IS_GLOBAL&&(source=name);for(key in source)own=!IS_FORCED&&target&&key in target,own&&key in exports||(out=own?target[key]:source[key],exports[key]=IS_GLOBAL&&"function"!=typeof target[key]?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(param){return this instanceof C?new C(param):C(param)};return F[PROTOTYPE]=C[PROTOTYPE],F}(out):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,IS_PROTO&&((exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,module.exports=$export},function(module,exports,__webpack_require__){(function(process){function normalizeArray(parts,allowAboveRoot){for(var up=0,i=parts.length-1;i>=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts}function filter(xs,f){if(xs.filter)return xs.filter(f);for(var res=[],i=0;i=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/"),(resolvedAbsolute?"/":"")+resolvedPath||"."},exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash="/"===substr(path,-1);return path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/"),path||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},exports.isAbsolute=function(path){return"/"===path.charAt(0)},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))},exports.relative=function(from,to){function trim(arr){for(var start=0;start=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;length>i;i++)if(fromParts[i]!==toParts[i]){samePartsLength=i;break}for(var outputParts=[],i=samePartsLength;istart&&(start=str.length+start),str.substr(start,len)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(Buffer,process){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _stringify=__webpack_require__(114),_stringify2=_interopRequireDefault(_stringify),_keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys),_defineProperty=__webpack_require__(116),_defineProperty2=_interopRequireDefault(_defineProperty),_getOwnPropertyDescriptor=__webpack_require__(117),_getOwnPropertyDescriptor2=_interopRequireDefault(_getOwnPropertyDescriptor),_getOwnPropertyNames=__webpack_require__(118),_getOwnPropertyNames2=_interopRequireDefault(_getOwnPropertyNames),_create=__webpack_require__(32),_create2=_interopRequireDefault(_create),_getPrototypeOf=__webpack_require__(119),_getPrototypeOf2=_interopRequireDefault(_getPrototypeOf),_typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),Crypto=__webpack_require__(177),Path=__webpack_require__(17),Util=__webpack_require__(11),Escape=__webpack_require__(84),internals={};exports.clone=function(obj,seen){if("object"!==("undefined"==typeof obj?"undefined":(0,_typeof3["default"])(obj))||null===obj)return obj;seen=seen||{orig:[],copy:[]};var lookup=seen.orig.indexOf(obj);if(-1!==lookup)return seen.copy[lookup];var newObj=void 0,cloneDeep=!1;if(Array.isArray(obj))newObj=[],cloneDeep=!0;else if(Buffer.isBuffer(obj))newObj=new Buffer(obj);else if(obj instanceof Date)newObj=new Date(obj.getTime());else if(obj instanceof RegExp)newObj=new RegExp(obj);else{var proto=(0,_getPrototypeOf2["default"])(obj);proto&&proto.isImmutable?newObj=obj:(newObj=(0,_create2["default"])(proto),cloneDeep=!0)}if(seen.orig.push(obj),seen.copy.push(newObj),cloneDeep)for(var keys=(0,_getOwnPropertyNames2["default"])(obj),i=0;i=2,"Insufficient arguments"),exports.assert("string"==typeof ref||"object"===("undefined"==typeof ref?"undefined":(0,_typeof3["default"])(ref)),"Reference must be string or an object"),exports.assert(values.length,"Values array cannot be empty");var compare=void 0,compareFlags=void 0;if(options.deep){compare=exports.deepEqual;var hasOnly=options.hasOwnProperty("only"),hasPart=options.hasOwnProperty("part");compareFlags={prototype:hasOnly?options.only:hasPart?!options.part:!1,part:hasOnly?!options.only:hasPart?options.part:!0}}else compare=function(a,b){return a===b};for(var misses=!1,matches=new Array(values.length),i=0;i1||!options.part&&!matches[i])return!1;return options.only&&misses?!1:result},exports.flatten=function(array,target){for(var result=target||[],i=0;i\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute),"Bad attribute value ("+attribute+")"),attribute.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')},exports.escapeHtml=function(string){return Escape.escapeHtml(string)},exports.escapeJavaScript=function(string){return Escape.escapeJavaScript(string)},exports.nextTick=function(callback){return function(){var args=arguments;process.nextTick(function(){callback.apply(null,args)})}},exports.once=function(method){if(method._hoekOnce)return method;var once=!1,wrapped=function(){once||(once=!0,method.apply(null,arguments))};return wrapped._hoekOnce=!0,wrapped},exports.isAbsolutePath=function(path,platform){return path?Path.isAbsolute?Path.isAbsolute(path):(platform=platform||process.platform,"win32"!==platform?"/"===path[0]:!!/^(?:[a-zA-Z]:[\\\/])|(?:[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/])/.test(path)):!1},exports.isInteger=function(value){return"number"==typeof value&&parseFloat(value)===parseInt(value,10)&&!isNaN(value)},exports.ignore=function(){},exports.inherits=Util.inherits, exports.format=Util.format,exports.transform=function(source,transform,options){if(exports.assert(null===source||void 0===source||"object"===("undefined"==typeof source?"undefined":(0,_typeof3["default"])(source))||Array.isArray(source),"Invalid source object: must be null, undefined, an object, or an array"),Array.isArray(source)){for(var results=[],i=0;i1;)segment=path.shift(),res[segment]||(res[segment]={}),res=res[segment];segment=path.shift(),res[segment]=exports.reach(source,sourcePath,options)}return result},exports.uniqueFilename=function(path,extension){extension=extension?"."!==extension[0]?"."+extension:extension:"",path=Path.resolve(path);var name=[Date.now(),process.pid,Crypto.randomBytes(8).toString("hex")].join("-")+extension;return Path.join(path,name)},exports.stringify=function(){try{return _stringify2["default"].apply(null,arguments)}catch(err){return"[Cannot display object: "+err.message+"]"}},exports.shallow=function(source){for(var target={},keys=(0,_keys2["default"])(source),i=0;in||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError('Uncaught, unspecified "error" event.')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},function(module,exports){function isObjectLike(value){return!!value&&"object"==typeof value}function getNative(object,key){var value=null==object?void 0:object[key];return isNative(value)?value:void 0}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isFunction(value){return isObject(value)&&objToString.call(value)==funcTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isNative(value){return null==value?!1:isFunction(value)?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}var arrayTag="[object Array]",funcTag="[object Function]",reIsHostCtor=/^\[object .+?Constructor\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nativeIsArray=getNative(Array,"isArray"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};module.exports=isArray},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(139),__esModule:!0}},function(module,exports,__webpack_require__){module.exports=!__webpack_require__(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},function(module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},function(module,exports,__webpack_require__){var $export=__webpack_require__(16),core=__webpack_require__(7),fails=__webpack_require__(27);module.exports=function(KEY,exec){var fn=(core.Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn),$export($export.S+$export.F*fails(function(){fn(1)}),"Object",exp)}},function(module,exports,__webpack_require__){var def=__webpack_require__(3).setDesc,has=__webpack_require__(35),TAG=__webpack_require__(8)("toStringTag");module.exports=function(it,tag,stat){it&&!has(it=stat?it:it.prototype,TAG)&&def(it,TAG,{configurable:!0,value:tag})}},function(module,exports,__webpack_require__){function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding))throw new Error("Unknown encoding: "+encoding)}function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3,this.charLength=this.charReceived?3:0}var Buffer=__webpack_require__(1).Buffer,isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.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}},StringDecoder=exports.StringDecoder=function(encoding){switch(this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(encoding),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:return void(this.write=passThroughWrite)}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(buffer){for(var charStr="";this.charLength;){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived=55296&&56319>=charCode)){if(this.charReceived=this.charLength=0,0===buffer.length)return charStr;break}this.charLength+=this.surrogateSize,charStr=""}this.detectIncompleteChar(buffer);var end=buffer.length;this.charLength&&(buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived),charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&56319>=charCode){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr},StringDecoder.prototype.detectIncompleteChar=function(buffer){for(var i=buffer.length>=3?3:buffer.length;i>0;i--){var c=buffer[buffer.length-i];if(1==i&&c>>5==6){this.charLength=2;break}if(2>=i&&c>>4==14){this.charLength=3;break}if(3>=i&&c>>3==30){this.charLength=4;break}}this.charReceived=i},StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length&&(res=this.write(buffer)),this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(132),__esModule:!0}},function(module,exports){module.exports=function(it){if("function"!=typeof it)throw TypeError(it+" is not a function!");return it}},function(module,exports){module.exports=function(it){if(void 0==it)throw TypeError("Can't call method on "+it);return it}},function(module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},function(module,exports,__webpack_require__){var $=__webpack_require__(3),createDesc=__webpack_require__(38);module.exports=__webpack_require__(26)?function(object,key,value){return $.setDesc(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},function(module,exports){module.exports=!0},function(module,exports){module.exports=function(bitmap,value){return{enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(36)},function(module,exports,__webpack_require__){var defined=__webpack_require__(34);module.exports=function(it){return Object(defined(it))}},function(module,exports,__webpack_require__){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isIndex(value,length){return value="number"==typeof value||reIsUint.test(value)?+value:-1,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&value%1==0&&length>value}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object)),index=-1,result=[];++index0;++index-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;return iteratee=baseCallback(iteratee,thisArg,3),func(collection,iteratee)}var arrayMap=__webpack_require__(190),baseCallback=__webpack_require__(71),baseEach=__webpack_require__(72),isArray=__webpack_require__(24),MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=map},function(module,exports,__webpack_require__){function charSet(s){return s.split("").reduce(function(set,c){return set[c]=!0,set},{})}function filter(pattern,options){return options=options||{},function(p,i,list){return minimatch(p,pattern,options)}}function ext(a,b){a=a||{},b=b||{};var t={};return Object.keys(b).forEach(function(k){t[k]=b[k]}),Object.keys(a).forEach(function(k){t[k]=a[k]}),t}function minimatch(p,pattern,options){if("string"!=typeof pattern)throw new TypeError("glob pattern string required");return options||(options={}),options.nocomment||"#"!==pattern.charAt(0)?""===pattern.trim()?""===p:new Minimatch(pattern,options).match(p):!1}function Minimatch(pattern,options){if(!(this instanceof Minimatch))return new Minimatch(pattern,options);if("string"!=typeof pattern)throw new TypeError("glob pattern string required");options||(options={}),pattern=pattern.trim(),"/"!==path.sep&&(pattern=pattern.split(path.sep).join("/")),this.options=options,this.set=[],this.pattern=pattern,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function make(){if(!this._made){var pattern=this.pattern,options=this.options;if(!options.nocomment&&"#"===pattern.charAt(0))return void(this.comment=!0);if(!pattern)return void(this.empty=!0);this.parseNegate();var set=this.globSet=this.braceExpand();options.debug&&(this.debug=console.error),this.debug(this.pattern,set),set=this.globParts=set.map(function(s){return s.split(slashSplit)}),this.debug(this.pattern,set),set=set.map(function(s,si,set){return s.map(this.parse,this)},this),this.debug(this.pattern,set),set=set.filter(function(s){return-1===s.indexOf(!1)}),this.debug(this.pattern,set),this.set=set}}function parseNegate(){var pattern=this.pattern,negate=!1,options=this.options,negateOffset=0;if(!options.nonegate){for(var i=0,l=pattern.length;l>i&&"!"===pattern.charAt(i);i++)negate=!negate,negateOffset++;negateOffset&&(this.pattern=pattern.substr(negateOffset)),this.negate=negate}}function braceExpand(pattern,options){if(options||(options=this instanceof Minimatch?this.options:{}),pattern="undefined"==typeof pattern?this.pattern:pattern,"undefined"==typeof pattern)throw new Error("undefined pattern");return options.nobrace||!pattern.match(/\{.*\}/)?[pattern]:expand(pattern)}function parse(pattern,isSub){function clearStateChar(){if(stateChar){switch(stateChar){case"*":re+=star,hasMagic=!0;break;case"?":re+=qmark,hasMagic=!0;break;default:re+="\\"+stateChar}self.debug("clearStateChar %j %j",stateChar,re),stateChar=!1}}var options=this.options;if(!options.noglobstar&&"**"===pattern)return GLOBSTAR;if(""===pattern)return"";for(var plType,stateChar,c,re="",hasMagic=!!options.nocase,escaping=!1,patternListStack=[],negativeLists=[],inClass=!1,reClassStart=-1,classStart=-1,patternStart="."===pattern.charAt(0)?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",self=this,i=0,len=pattern.length;len>i&&(c=pattern.charAt(i));i++)if(this.debug("%s %s %s %j",pattern,i,re,c),escaping&&reSpecials[c])re+="\\"+c,escaping=!1;else switch(c){case"/":return!1;case"\\":clearStateChar(),escaping=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",pattern,i,re,c),inClass){this.debug(" in class"),"!"===c&&i===classStart+1&&(c="^"),re+=c;continue}self.debug("call clearStateChar %j",stateChar),clearStateChar(),stateChar=c,options.noext&&clearStateChar();continue;case"(":if(inClass){re+="(";continue}if(!stateChar){re+="\\(";continue}plType=stateChar,patternListStack.push({type:plType,start:i-1,reStart:re.length}),re+="!"===stateChar?"(?:(?!(?:":"(?:",this.debug("plType %j %j",stateChar,re),stateChar=!1;continue;case")":if(inClass||!patternListStack.length){re+="\\)";continue}clearStateChar(),hasMagic=!0,re+=")";var pl=patternListStack.pop();switch(plType=pl.type){case"!":negativeLists.push(pl),re+=")[^/]*?)",pl.reEnd=re.length;break;case"?":case"+":case"*":re+=plType;break;case"@":}continue;case"|":if(inClass||!patternListStack.length||escaping){re+="\\|",escaping=!1;continue}clearStateChar(),re+="|";continue;case"[":if(clearStateChar(),inClass){re+="\\"+c;continue}inClass=!0,classStart=i,reClassStart=re.length,re+=c;continue;case"]":if(i===classStart+1||!inClass){re+="\\"+c,escaping=!1;continue}if(inClass){var cs=pattern.substring(classStart+1,i);try{RegExp("["+cs+"]")}catch(er){var sp=this.parse(cs,SUBPARSE);re=re.substr(0,reClassStart)+"\\["+sp[0]+"\\]",hasMagic=hasMagic||sp[1],inClass=!1;continue}}hasMagic=!0,inClass=!1,re+=c;continue;default:clearStateChar(),escaping?escaping=!1:!reSpecials[c]||"^"===c&&inClass||(re+="\\"),re+=c}for(inClass&&(cs=pattern.substr(classStart+1),sp=this.parse(cs,SUBPARSE),re=re.substr(0,reClassStart)+"\\["+sp[0],hasMagic=hasMagic||sp[1]),pl=patternListStack.pop();pl;pl=patternListStack.pop()){var tail=re.slice(pl.reStart+3);tail=tail.replace(/((?:\\{2})*)(\\?)\|/g,function(_,$1,$2){return $2||($2="\\"),$1+$1+$2+"|"}),this.debug("tail=%j\n %s",tail,tail);var t="*"===pl.type?star:"?"===pl.type?qmark:"\\"+pl.type;hasMagic=!0,re=re.slice(0,pl.reStart)+t+"\\("+tail}clearStateChar(),escaping&&(re+="\\\\");var addPatternStart=!1;switch(re.charAt(0)){case".":case"[":case"(":addPatternStart=!0}for(var n=negativeLists.length-1;n>-1;n--){var nl=negativeLists[n],nlBefore=re.slice(0,nl.reStart),nlFirst=re.slice(nl.reStart,nl.reEnd-8),nlLast=re.slice(nl.reEnd-8,nl.reEnd),nlAfter=re.slice(nl.reEnd);nlLast+=nlAfter;var openParensBefore=nlBefore.split("(").length-1,cleanAfter=nlAfter;for(i=0;openParensBefore>i;i++)cleanAfter=cleanAfter.replace(/\)[+*?]?/,"");nlAfter=cleanAfter;var dollar="";""===nlAfter&&isSub!==SUBPARSE&&(dollar="$");var newRe=nlBefore+nlFirst+nlAfter+dollar+nlLast;re=newRe}if(""!==re&&hasMagic&&(re="(?=.)"+re),addPatternStart&&(re=patternStart+re),isSub===SUBPARSE)return[re,hasMagic];if(!hasMagic)return globUnescape(pattern);var flags=options.nocase?"i":"",regExp=new RegExp("^"+re+"$",flags);return regExp._glob=pattern,regExp._src=re,regExp}function makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;var set=this.set;if(!set.length)return this.regexp=!1,this.regexp;var options=this.options,twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot,flags=options.nocase?"i":"",re=set.map(function(pattern){return pattern.map(function(p){return p===GLOBSTAR?twoStar:"string"==typeof p?regExpEscape(p):p._src}).join("\\/")}).join("|");re="^(?:"+re+")$",this.negate&&(re="^(?!"+re+").*$");try{this.regexp=new RegExp(re,flags)}catch(ex){this.regexp=!1}return this.regexp}function match(f,partial){if(this.debug("match",f,this.pattern),this.comment)return!1;if(this.empty)return""===f;if("/"===f&&partial)return!0;var options=this.options;"/"!==path.sep&&(f=f.split(path.sep).join("/")),f=f.split(slashSplit),this.debug(this.pattern,"split",f);var set=this.set;this.debug(this.pattern,"set",set);var filename,i;for(i=f.length-1;i>=0&&!(filename=f[i]);i--);for(i=0;ifi&&pl>pi;fi++,pi++){this.debug("matchOne loop");var p=pattern[pi],f=file[fi];if(this.debug(pattern,p,f),p===!1)return!1;if(p===GLOBSTAR){this.debug("GLOBSTAR",[pattern,p,f]);var fr=fi,pr=pi+1;if(pr===pl){for(this.debug("** at the end");fl>fi;fi++)if("."===file[fi]||".."===file[fi]||!options.dot&&"."===file[fi].charAt(0))return!1;return!0}for(;fl>fr;){var swallowee=file[fr];if(this.debug("\nglobstar while",file,fr,pattern,pr,swallowee),this.matchOne(file.slice(fr),pattern.slice(pr),partial))return this.debug("globstar found match!",fr,fl,swallowee),!0;if("."===swallowee||".."===swallowee||!options.dot&&"."===swallowee.charAt(0)){this.debug("dot detected!",file,fr,pattern,pr);break}this.debug("globstar swallow a segment, and continue"),fr++}return!(!partial||(this.debug("\n>>> no match, partial?",file,fr,pattern,pr),fr!==fl))}var hit;if("string"==typeof p?(hit=options.nocase?f.toLowerCase()===p.toLowerCase():f===p,this.debug("string match",p,f,hit)):(hit=f.match(p),this.debug("pattern match",p,f,hit)),!hit)return!1}if(fi===fl&&pi===pl)return!0;if(fi===fl)return partial;if(pi===pl){var emptyFileEnd=fi===fl-1&&""===file[fi];return emptyFileEnd}throw new Error("wtf?")}},function(module,exports,__webpack_require__){function Protocols(proto){if("number"==typeof proto){if(Protocols.codes[proto])return Protocols.codes[proto];throw new Error("no protocol with code: "+proto)}if("string"==typeof proto||proto instanceof String){if(Protocols.names[proto])return Protocols.names[proto];throw new Error("no protocol with name: "+proto)}throw new Error("invalid protocol id type: "+proto)}function p(code,size,name){return{code:code,size:size,name:name}}var map=__webpack_require__(42);module.exports=Protocols,Protocols.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[132,16,"sctp"]],Protocols.names={},Protocols.codes={},map(Protocols.table,function(e){var proto=p.apply(this,e);Protocols.codes[proto.code]=proto,Protocols.names[proto.name]=proto}),Protocols.object=p},function(module,exports,__webpack_require__){(function(process){"use strict";function posix(path){return"/"===path.charAt(0)}function win32(path){var splitDeviceRe=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,result=splitDeviceRe.exec(path),device=result[1]||"",isUnc=!!device&&":"!==device.charAt(1);return!!result[2]||isUnc}module.exports="win32"===process.platform?win32:posix,module.exports.posix=posix,module.exports.win32=win32}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,util.isNullOrUndefined(data)||stream.push(data),cb&&cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length1){for(var cbs=[],c=0;c=0;i--)if(ka[i]!=kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!_deepEqual(a[key],b[key]))return!1;return!0}function expectedException(actual,expected){return actual&&expected?"[object RegExp]"==Object.prototype.toString.call(expected)?expected.test(actual):actual instanceof expected?!0:expected.call({},actual)===!0:!1}function _throws(shouldThrow,block,expected,message){var actual;util.isString(expected)&&(message=expected,expected=null);try{block()}catch(e){actual=e}if(message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:"."),shouldThrow&&!actual&&fail(actual,expected,"Missing expected exception"+message),!shouldThrow&&expectedException(actual,expected)&&fail(actual,expected,"Got unwanted exception"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}var util=__webpack_require__(11),pSlice=Array.prototype.slice,hasOwn=Object.prototype.hasOwnProperty,assert=module.exports=ok;assert.AssertionError=function(options){this.name="AssertionError",this.actual=options.actual,this.expected=options.expected,this.operator=options.operator,options.message?(this.message=options.message,this.generatedMessage=!1):(this.message=getMessage(this),this.generatedMessage=!0);var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,stackStartFunction);else{var err=new Error;if(err.stack){var out=err.stack,fn_name=stackStartFunction.name,idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,"==",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,"!=",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected)||fail(actual,expected,message,"deepEqual",assert.deepEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected)&&fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)},assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,"===",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,"!==",assert.notStrictEqual)},assert["throws"]=function(block,error,message){_throws.apply(this,[!0].concat(pSlice.call(arguments)))},assert.doesNotThrow=function(block,message){_throws.apply(this,[!1].concat(pSlice.call(arguments)))},assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys),_typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),_create=__webpack_require__(32),_create2=_interopRequireDefault(_create),hexTable=function(){for(var array=new Array(256),i=0;256>i;++i)array[i]="%"+((16>i?"0":"")+i.toString(16)).toUpperCase();return array}();exports.arrayToObject=function(source,options){for(var obj=options.plainObjects?(0,_create2["default"])(null):{},i=0;i=48&&57>=c||c>=65&&90>=c||c>=97&&122>=c?out+=string.charAt(i):128>c?out+=hexTable[c]:2048>c?out+=hexTable[192|c>>6]+hexTable[128|63&c]:55296>c||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},exports.compact=function(obj,references){if("object"!==("undefined"==typeof obj?"undefined":(0,_typeof3["default"])(obj))||null===obj)return obj;var refs=references||[],lookup=refs.indexOf(obj);if(-1!==lookup)return refs[lookup];if(refs.push(obj),Array.isArray(obj)){for(var compacted=[],i=0;i0&&(clientTimeoutId=setTimeout(function(){finishOnce(Boom.clientTimeout())},clientTimeout));var onResError=function(err){return finishOnce(Boom.internal("Payload stream error",err))},onResClose=function(){return finishOnce(Boom.internal("Payload stream closed prematurely"))};res.once("error",onResError),res.once("close",onResClose);var reader=new Recorder({maxBytes:options.maxBytes}),onReaderError=function(err){return res.destroy&&res.destroy(),finishOnce(err)};reader.once("error",onReaderError);var onReaderFinish=function(){return finishOnce(null,reader.collect())};reader.once("finish",onReaderFinish),res.pipe(reader)},internals.Client.prototype.toReadableStream=function(payload,encoding){return new Payload(payload,encoding)},internals.Client.prototype.parseCacheControl=function(field){var regex=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,header={},error=field.replace(regex,function($0,$1,$2,$3){var value=$2||$3;return header[$1]=value?value.toLowerCase():!0,""});if(header["max-age"])try{var maxAge=parseInt(header["max-age"],10);if(isNaN(maxAge))return null;header["max-age"]=maxAge}catch(err){}return error?null:header},internals.Client.prototype.get=function(uri,options,callback){return this._shortcutWrap("GET",uri,options,callback)},internals.Client.prototype.post=function(uri,options,callback){return this._shortcutWrap("POST",uri,options,callback)},internals.Client.prototype.patch=function(uri,options,callback){return this._shortcutWrap("PATCH",uri,options,callback)},internals.Client.prototype.put=function(uri,options,callback){return this._shortcutWrap("PUT",uri,options,callback)},internals.Client.prototype["delete"]=function(uri,options,callback){return this._shortcutWrap("DELETE",uri,options,callback)},internals.Client.prototype._shortcutWrap=function(method,uri){var options="function"==typeof arguments[2]?{}:arguments[2],callback="function"==typeof arguments[2]?arguments[2]:arguments[3];return this._shortcut(method,uri,options,callback)},internals.Client.prototype._shortcut=function(method,uri,options,callback){var _this2=this;return this.request(method,uri,options,function(err,res){return err?callback(err):void _this2.read(res,options,function(err,payload){return callback(err,res,payload)})})},internals.tryParseBuffer=function(buffer){var result={json:null,err:null};try{var json=JSON.parse(buffer.toString());result.json=json}catch(err){result.err=err}return result},module.exports=new internals.Client}).call(exports,__webpack_require__(1).Buffer,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(Buffer){"use strict";var Hoek=__webpack_require__(18),Stream=__webpack_require__(6),internals={};module.exports=internals.Payload=function(payload,encoding){Stream.Readable.call(this);for(var data=[].concat(payload||""),size=0,i=0;i=this._data.length&&this.push(null)}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys),_setPrototypeOf=__webpack_require__(120),_setPrototypeOf2=_interopRequireDefault(_setPrototypeOf),Hoek=__webpack_require__(18),internals={STATUS_CODES:(0,_setPrototypeOf2["default"])({100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},null)};exports.wrap=function(error,statusCode,message){return Hoek.assert(error instanceof Error,"Cannot wrap non-Error object"),error.isBoom?error:internals.initialize(error,statusCode||500,message)},exports.create=function(statusCode,message,data){return internals.create(statusCode,message,data,exports.create)},internals.create=function(statusCode,message,data,ctor){var error=new Error(message?message:void 0);return Error.captureStackTrace(error,ctor),error.data=data||null,internals.initialize(error,statusCode),error},internals.initialize=function(error,statusCode,message){var numberCode=parseInt(statusCode,10);return Hoek.assert(!isNaN(numberCode)&&numberCode>=400,"First argument must be a number (400+):",statusCode),error.isBoom=!0,error.isServer=numberCode>=500,error.hasOwnProperty("data")||(error.data=null),error.output={statusCode:numberCode,payload:{},headers:{}},error.reformat=internals.reformat,error.reformat(),message||error.message||(message=error.output.payload.error),message&&(error.message=message+(error.message?": "+error.message:"")),error},internals.reformat=function(){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=internals.STATUS_CODES[this.output.statusCode]||"Unknown",500===this.output.statusCode?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)},exports.badRequest=function(message,data){return internals.create(400,message,data,exports.badRequest)},exports.unauthorized=function(message,scheme,attributes){var err=internals.create(401,message,void 0,exports.unauthorized);if(!scheme)return err;var wwwAuthenticate="";if("string"==typeof scheme){if(wwwAuthenticate=scheme,(attributes||message)&&(err.output.payload.attributes={}),attributes)for(var names=(0,_keys2["default"])(attributes),i=0;i1){for(var cbs=[],c=0;c=0;i--)if(ka[i]!=kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!_deepEqual(a[key],b[key]))return!1;return!0}function expectedException(actual,expected){return actual&&expected?"[object RegExp]"==Object.prototype.toString.call(expected)?expected.test(actual):actual instanceof expected?!0:expected.call({},actual)===!0:!1}function _throws(shouldThrow,block,expected,message){var actual;util.isString(expected)&&(message=expected,expected=null);try{block()}catch(e){actual=e}if(message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:"."),shouldThrow&&!actual&&fail(actual,expected,"Missing expected exception"+message),!shouldThrow&&expectedException(actual,expected)&&fail(actual,expected,"Got unwanted exception"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}var util=__webpack_require__(11),pSlice=Array.prototype.slice,hasOwn=Object.prototype.hasOwnProperty,assert=module.exports=ok;assert.AssertionError=function(options){this.name="AssertionError",this.actual=options.actual,this.expected=options.expected,this.operator=options.operator,options.message?(this.message=options.message,this.generatedMessage=!1):(this.message=getMessage(this),this.generatedMessage=!0);var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,stackStartFunction);else{var err=new Error;if(err.stack){var out=err.stack,fn_name=stackStartFunction.name,idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,"==",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,"!=",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected)||fail(actual,expected,message,"deepEqual",assert.deepEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected)&&fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)},assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,"===",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,"!==",assert.notStrictEqual)},assert["throws"]=function(block,error,message){_throws.apply(this,[!0].concat(pSlice.call(arguments)))},assert.doesNotThrow=function(block,message){_throws.apply(this,[!1].concat(pSlice.call(arguments)))},assert.ifError=function(err){if(err)throw err};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys),_setPrototypeOf=__webpack_require__(120),_setPrototypeOf2=_interopRequireDefault(_setPrototypeOf),Hoek=__webpack_require__(18),internals={STATUS_CODES:(0,_setPrototypeOf2["default"])({100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},null)};exports.wrap=function(error,statusCode,message){return Hoek.assert(error instanceof Error,"Cannot wrap non-Error object"),error.isBoom?error:internals.initialize(error,statusCode||500,message)},exports.create=function(statusCode,message,data){return internals.create(statusCode,message,data,exports.create)},internals.create=function(statusCode,message,data,ctor){var error=new Error(message?message:void 0);return Error.captureStackTrace(error,ctor),error.data=data||null,internals.initialize(error,statusCode),error},internals.initialize=function(error,statusCode,message){var numberCode=parseInt(statusCode,10);return Hoek.assert(!isNaN(numberCode)&&numberCode>=400,"First argument must be a number (400+):",statusCode),error.isBoom=!0,error.isServer=numberCode>=500,error.hasOwnProperty("data")||(error.data=null),error.output={statusCode:numberCode,payload:{},headers:{}},error.reformat=internals.reformat,error.reformat(),message||error.message||(message=error.output.payload.error),message&&(error.message=message+(error.message?": "+error.message:"")),error},internals.reformat=function(){this.output.payload.statusCode=this.output.statusCode,this.output.payload.error=internals.STATUS_CODES[this.output.statusCode]||"Unknown",500===this.output.statusCode?this.output.payload.message="An internal server error occurred":this.message&&(this.output.payload.message=this.message)},exports.badRequest=function(message,data){return internals.create(400,message,data,exports.badRequest)},exports.unauthorized=function(message,scheme,attributes){var err=internals.create(401,message,void 0,exports.unauthorized);if(!scheme)return err;var wwwAuthenticate="";if("string"==typeof scheme){if(wwwAuthenticate=scheme,(attributes||message)&&(err.output.payload.attributes={}),attributes)for(var names=(0,_keys2["default"])(attributes),i=0;ii;++i)array[i]="%"+((16>i?"0":"")+i.toString(16)).toUpperCase();return array}();exports.arrayToObject=function(source,options){for(var obj=options.plainObjects?(0,_create2["default"])(null):{},i=0;i=48&&57>=c||c>=65&&90>=c||c>=97&&122>=c?out+=string.charAt(i):128>c?out+=hexTable[c]:2048>c?out+=hexTable[192|c>>6]+hexTable[128|63&c]:55296>c||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},exports.compact=function(obj,references){if("object"!==("undefined"==typeof obj?"undefined":(0,_typeof3["default"])(obj))||null===obj)return obj;var refs=references||[],lookup=refs.indexOf(obj);if(-1!==lookup)return refs[lookup];if(refs.push(obj),Array.isArray(obj)){for(var compacted=[],i=0;i0&&(clientTimeoutId=setTimeout(function(){finishOnce(Boom.clientTimeout())},clientTimeout));var onResError=function(err){return finishOnce(Boom.internal("Payload stream error",err))},onResClose=function(){return finishOnce(Boom.internal("Payload stream closed prematurely"))};res.once("error",onResError),res.once("close",onResClose);var reader=new Recorder({maxBytes:options.maxBytes}),onReaderError=function(err){return res.destroy&&res.destroy(),finishOnce(err)};reader.once("error",onReaderError);var onReaderFinish=function(){return finishOnce(null,reader.collect())};reader.once("finish",onReaderFinish),res.pipe(reader)},internals.Client.prototype.toReadableStream=function(payload,encoding){return new Payload(payload,encoding)},internals.Client.prototype.parseCacheControl=function(field){var regex=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,header={},error=field.replace(regex,function($0,$1,$2,$3){var value=$2||$3;return header[$1]=value?value.toLowerCase():!0,""});if(header["max-age"])try{var maxAge=parseInt(header["max-age"],10);if(isNaN(maxAge))return null;header["max-age"]=maxAge}catch(err){}return error?null:header},internals.Client.prototype.get=function(uri,options,callback){return this._shortcutWrap("GET",uri,options,callback)},internals.Client.prototype.post=function(uri,options,callback){return this._shortcutWrap("POST",uri,options,callback)},internals.Client.prototype.patch=function(uri,options,callback){return this._shortcutWrap("PATCH",uri,options,callback)},internals.Client.prototype.put=function(uri,options,callback){return this._shortcutWrap("PUT",uri,options,callback)},internals.Client.prototype["delete"]=function(uri,options,callback){return this._shortcutWrap("DELETE",uri,options,callback)},internals.Client.prototype._shortcutWrap=function(method,uri){var options="function"==typeof arguments[2]?{}:arguments[2],callback="function"==typeof arguments[2]?arguments[2]:arguments[3];return this._shortcut(method,uri,options,callback)},internals.Client.prototype._shortcut=function(method,uri,options,callback){var _this2=this;return this.request(method,uri,options,function(err,res){return err?callback(err):void _this2.read(res,options,function(err,payload){return callback(err,res,payload)})})},internals.tryParseBuffer=function(buffer){var result={json:null,err:null};try{var json=JSON.parse(buffer.toString());result.json=json}catch(err){result.err=err}return result},module.exports=new internals.Client}).call(exports,__webpack_require__(1).Buffer,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(Buffer){"use strict";var Hoek=__webpack_require__(18),Stream=__webpack_require__(6),internals={};module.exports=internals.Payload=function(payload,encoding){Stream.Readable.call(this);for(var data=[].concat(payload||""),size=0,i=0;i=this._data.length&&this.push(null)}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){var cof=__webpack_require__(19),TAG=__webpack_require__(8)("toStringTag"),ARG="Arguments"==cof(function(){return arguments}());module.exports=function(it){var O,T,B;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(T=(O=Object(it))[TAG])?T:ARG?cof(O):"Object"==(B=cof(O))&&"function"==typeof O.callee?"Arguments":B}},function(module,exports,__webpack_require__){var toIObject=__webpack_require__(22),getNames=__webpack_require__(3).getNames,toString={}.toString,windowNames="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(it){try{return getNames(it)}catch(e){return windowNames.slice()}};module.exports.get=function(it){return windowNames&&"[object Window]"==toString.call(it)?getWindowNames(it):getNames(toIObject(it))}},function(module,exports,__webpack_require__){var cof=__webpack_require__(19);module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return"String"==cof(it)?it.split(""):Object(it)}},function(module,exports,__webpack_require__){"use strict";var LIBRARY=__webpack_require__(37),$export=__webpack_require__(16),redefine=__webpack_require__(39),hide=__webpack_require__(36),has=__webpack_require__(35),Iterators=__webpack_require__(21),$iterCreate=__webpack_require__(151),setToStringTag=__webpack_require__(30),getProto=__webpack_require__(3).getProto,ITERATOR=__webpack_require__(8)("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var methods,key,getMethod=function(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case KEYS:return function(){return new Constructor(this,kind)};case VALUES:return function(){return new Constructor(this,kind)}}return function(){return new Constructor(this,kind)}},TAG=NAME+" Iterator",DEF_VALUES=DEFAULT==VALUES,VALUES_BUG=!1,proto=Base.prototype,$native=proto[ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT);if($native){var IteratorPrototype=getProto($default.call(new Base));setToStringTag(IteratorPrototype,TAG,!0),!LIBRARY&&has(proto,FF_ITERATOR)&&hide(IteratorPrototype,ITERATOR,returnThis),DEF_VALUES&&$native.name!==VALUES&&(VALUES_BUG=!0, $default=function(){return $native.call(this)})}if(LIBRARY&&!FORCED||!BUGGY&&!VALUES_BUG&&proto[ITERATOR]||hide(proto,ITERATOR,$default),Iterators[NAME]=$default,Iterators[TAG]=returnThis,DEFAULT)if(methods={values:DEF_VALUES?$default:getMethod(VALUES),keys:IS_SET?$default:getMethod(KEYS),entries:DEF_VALUES?getMethod("entries"):$default},FORCED)for(key in methods)key in proto||redefine(proto,key,methods[key]);else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods);return methods}},function(module,exports,__webpack_require__){var getDesc=__webpack_require__(3).getDesc,isObject=__webpack_require__(28),anObject=__webpack_require__(15),check=function(O,proto){if(anObject(O),!isObject(proto)&&null!==proto)throw TypeError(proto+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(test,buggy,set){try{set=__webpack_require__(20)(Function.call,getDesc(Object.prototype,"__proto__").set,2),set(test,[]),buggy=!(test instanceof Array)}catch(e){buggy=!0}return function(O,proto){return check(O,proto),buggy?O.__proto__=proto:set(O,proto),O}}({},!1):void 0),check:check}},function(module,exports,__webpack_require__){var global=__webpack_require__(9),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},function(module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},function(module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(void 0===key?"":key,")_",(++id+px).toString(36))}},function(module,exports){},function(module,exports,__webpack_require__){"use strict";var $at=__webpack_require__(162)(!0);__webpack_require__(58)(String,"String",function(iterated){this._t=String(iterated),this._i=0},function(){var point,O=this._t,index=this._i;return index>=O.length?{value:void 0,done:!0}:(point=$at(O,index),this._i+=point.length,{value:point,done:!1})})},function(module,exports,__webpack_require__){__webpack_require__(166);var Iterators=__webpack_require__(21);Iterators.NodeList=Iterators.HTMLCollection=Iterators.Array},function(module,exports,__webpack_require__){(function(Buffer){function toConstructor(fn){return function(){var buffers=[],m={update:function(data,enc){return Buffer.isBuffer(data)||(data=new Buffer(data,enc)),buffers.push(data),this},digest:function(enc){var buf=Buffer.concat(buffers),r=fn(buf);return buffers=null,enc?r.toString(enc):r}};return m}}var createHash=__webpack_require__(210),md5=toConstructor(__webpack_require__(178)),rmd160=toConstructor(__webpack_require__(207));module.exports=function(alg){return"md5"===alg?new md5:"rmd160"===alg?new rmd160:createHash(alg)}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports){(function(global){module.exports=!1;try{module.exports="[object process]"===Object.prototype.toString.call(global.process)}catch(e){}}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){(function(process){function ownProp(obj,field){return Object.prototype.hasOwnProperty.call(obj,field)}function alphasorti(a,b){return a.toLowerCase().localeCompare(b.toLowerCase())}function alphasort(a,b){return a.localeCompare(b)}function setupIgnores(self,options){self.ignore=options.ignore||[],Array.isArray(self.ignore)||(self.ignore=[self.ignore]),self.ignore.length&&(self.ignore=self.ignore.map(ignoreMap))}function ignoreMap(pattern){var gmatcher=null;if("/**"===pattern.slice(-3)){var gpattern=pattern.replace(/(\/\*\*)+$/,"");gmatcher=new Minimatch(gpattern,{dot:!0})}return{matcher:new Minimatch(pattern,{dot:!0}),gmatcher:gmatcher}}function setopts(self,pattern,options){if(options||(options={}),options.matchBase&&-1===pattern.indexOf("/")){if(options.noglobstar)throw new Error("base matching requires globstar");pattern="**/"+pattern}self.silent=!!options.silent,self.pattern=pattern,self.strict=options.strict!==!1,self.realpath=!!options.realpath,self.realpathCache=options.realpathCache||Object.create(null),self.follow=!!options.follow,self.dot=!!options.dot,self.mark=!!options.mark,self.nodir=!!options.nodir,self.nodir&&(self.mark=!0),self.sync=!!options.sync,self.nounique=!!options.nounique,self.nonull=!!options.nonull,self.nosort=!!options.nosort,self.nocase=!!options.nocase,self.stat=!!options.stat,self.noprocess=!!options.noprocess,self.maxLength=options.maxLength||1/0,self.cache=options.cache||Object.create(null),self.statCache=options.statCache||Object.create(null),self.symlinks=options.symlinks||Object.create(null),setupIgnores(self,options),self.changedCwd=!1;var cwd=process.cwd();ownProp(options,"cwd")?(self.cwd=options.cwd,self.changedCwd=path.resolve(options.cwd)!==cwd):self.cwd=cwd,self.root=options.root||path.resolve(self.cwd,"/"),self.root=path.resolve(self.root),"win32"===process.platform&&(self.root=self.root.replace(/\\/g,"/")),self.nomount=!!options.nomount,options.nonegate=!0,options.nocomment=!0,self.minimatch=new Minimatch(pattern,options),self.options=self.minimatch.options}function finish(self){for(var nou=self.nounique,all=nou?[]:Object.create(null),i=0,l=self.matches.length;l>i;i++){var matches=self.matches[i];if(matches&&0!==Object.keys(matches).length){var m=Object.keys(matches);nou?all.push.apply(all,m):m.forEach(function(m){all[m]=!0})}else if(self.nonull){var literal=self.minimatch.globSet[i];nou?all.push(literal):all[literal]=!0}}if(nou||(all=Object.keys(all)),self.nosort||(all=all.sort(self.nocase?alphasorti:alphasort)),self.mark){for(var i=0;ii;i++)this._process(this.minimatch.set[i],i,!1,done)}function readdirCb(self,abs,cb){return function(er,entries){er?self._readdirError(abs,er,cb):self._readdirEntries(abs,entries,cb)}}module.exports=glob;var fs=__webpack_require__(49),minimatch=__webpack_require__(43),inherits=(minimatch.Minimatch,__webpack_require__(4)),EE=__webpack_require__(23).EventEmitter,path=__webpack_require__(17),assert=__webpack_require__(50),isAbsolute=__webpack_require__(45),globSync=__webpack_require__(182),common=__webpack_require__(68),setopts=(common.alphasort,common.alphasorti,common.setopts),ownProp=common.ownProp,inflight=__webpack_require__(185),childrenIgnored=(__webpack_require__(11),common.childrenIgnored),isIgnored=common.isIgnored,once=__webpack_require__(74);glob.sync=globSync;var GlobSync=glob.GlobSync=globSync.GlobSync;glob.glob=glob,glob.hasMagic=function(pattern,options_){var options=extend({},options_);options.noprocess=!0;var g=new Glob(pattern,options),set=g.minimatch.set;if(set.length>1)return!0;for(var j=0;ji;i++){var e=matchedEntries[i];prefix&&(e="/"!==prefix?prefix+"/"+e:prefix+e),"/"!==e.charAt(0)||this.nomount||(e=path.join(this.root,e)),this._emitMatch(index,e)}return cb()}remain.shift();for(var i=0;len>i;i++){var e=matchedEntries[i];prefix&&(e="/"!==prefix?prefix+"/"+e:prefix+e),this._process([e].concat(remain),index,inGlobStar,cb)}cb()},Glob.prototype._emitMatch=function(index,e){if(!this.aborted&&!this.matches[index][e]&&!isIgnored(this,e)){if(this.paused)return void this._emitQueue.push([index,e]);var abs=this._makeAbs(e);if(this.nodir){var c=this.cache[abs];if("DIR"===c||Array.isArray(c))return}this.mark&&(e=this._mark(e)),this.matches[index][e]=!0;var st=this.statCache[abs];st&&this.emit("stat",e,st),this.emit("match",e)}},Glob.prototype._readdirInGlobStar=function(abs,cb){function lstatcb_(er,lstat){if(er)return cb();var isSym=lstat.isSymbolicLink();self.symlinks[abs]=isSym,isSym||lstat.isDirectory()?self._readdir(abs,!1,cb):(self.cache[abs]="FILE",cb())}if(!this.aborted){if(this.follow)return this._readdir(abs,!1,cb);var lstatkey="lstat\x00"+abs,self=this,lstatcb=inflight(lstatkey,lstatcb_);lstatcb&&fs.lstat(abs,lstatcb)}},Glob.prototype._readdir=function(abs,inGlobStar,cb){if(!this.aborted&&(cb=inflight("readdir\x00"+abs+"\x00"+inGlobStar,cb))){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs,cb);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||"FILE"===c)return cb();if(Array.isArray(c))return cb(null,c)}fs.readdir(abs,readdirCb(this,abs,cb))}},Glob.prototype._readdirEntries=function(abs,entries,cb){if(!this.aborted){if(!this.mark&&!this.stat)for(var i=0;ii;i++){var e=entries[i];if("."!==e.charAt(0)||this.dot){var instead=gspref.concat(entries[i],remainWithoutGlobStar);this._process(instead,index,!0,cb);var below=gspref.concat(entries[i],remain);this._process(below,index,!0,cb)}}cb()},Glob.prototype._processSimple=function(prefix,index,cb){var self=this;this._stat(prefix,function(er,exists){self._processSimple2(prefix,index,er,exists,cb)})},Glob.prototype._processSimple2=function(prefix,index,er,exists,cb){if(this.matches[index]||(this.matches[index]=Object.create(null)),!exists)return cb();if(prefix&&isAbsolute(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);"/"===prefix.charAt(0)?prefix=path.join(this.root,prefix):(prefix=path.resolve(this.root,prefix),trail&&(prefix+="/"))}"win32"===process.platform&&(prefix=prefix.replace(/\\/g,"/")),this._emitMatch(index,prefix),cb()},Glob.prototype._stat=function(f,cb){function lstatcb_(er,lstat){return lstat&&lstat.isSymbolicLink()?fs.stat(abs,function(er,stat){er?self._stat2(f,abs,null,lstat,cb):self._stat2(f,abs,er,stat,cb)}):void self._stat2(f,abs,er,lstat,cb)}var abs=this._makeAbs(f),needDir="/"===f.slice(-1);if(f.length>this.maxLength)return cb();if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||"DIR"===c)return cb(null,c);if(needDir&&"FILE"===c)return cb()}var stat=this.statCache[abs];if(void 0!==stat){if(stat===!1)return cb(null,stat);var type=stat.isDirectory()?"DIR":"FILE";return needDir&&"FILE"===type?cb():cb(null,type,stat)}var self=this,statcb=inflight("stat\x00"+abs,lstatcb_);statcb&&fs.lstat(abs,statcb)},Glob.prototype._stat2=function(f,abs,er,stat,cb){if(er)return this.statCache[abs]=!1,cb();var needDir="/"===f.slice(-1);if(this.statCache[abs]=stat,"/"===abs.slice(-1)&&!stat.isDirectory())return cb(null,!1,stat);var c=stat.isDirectory()?"DIR":"FILE";return this.cache[abs]=this.cache[abs]||c,needDir&&"DIR"!==c?cb():cb(null,c,stat)}}).call(exports,__webpack_require__(2))},function(module,exports){module.exports=Array.isArray||function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}},function(module,exports,__webpack_require__){function baseToString(value){return null==value?"":value+""}function baseCallback(func,thisArg,argCount){var type=typeof func;return"function"==type?void 0===thisArg?func:bindCallback(func,thisArg,argCount):null==func?identity:"object"==type?baseMatches(func):void 0===thisArg?property(func):baseMatchesProperty(func,thisArg)}function baseGet(object,path,pathKey){if(null!=object){void 0!==pathKey&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=0,length=path.length;null!=object&&length>index;)object=object[path[index++]];return index&&index==length?object:void 0}}function baseIsMatch(object,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=toObject(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++indexstart&&(start=-start>length?0:length+start),end=void 0===end||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var keys=__webpack_require__(41),MAX_SAFE_INTEGER=9007199254740991,baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor(),getLength=baseProperty("length");module.exports=baseEach},function(module,exports,__webpack_require__){function parse(opts){function parseRow(row){try{if(row)return JSON.parse(row)}catch(e){opts.strict&&this.emit("error",new Error("Could not parse row "+row.slice(0,50)+"..."))}}return opts=opts||{},opts.strict=opts.strict!==!1,split(parseRow)}function serialize(opts){return through.obj(opts,function(obj,enc,cb){cb(null,JSON.stringify(obj)+EOL)})}var through=__webpack_require__(81),split=__webpack_require__(214),EOL=__webpack_require__(75).EOL;module.exports=parse,module.exports.serialize=module.exports.stringify=serialize,module.exports.parse=parse},function(module,exports,__webpack_require__){function once(fn){var f=function(){return f.called?f.value:(f.called=!0,f.value=fn.apply(this,arguments))};return f.called=!1,f}var wrappy=__webpack_require__(83);module.exports=wrappy(once),once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:!0})})},function(module,exports){exports.endianness=function(){return"LE"},exports.hostname=function(){return"undefined"!=typeof location?location.hostname:""},exports.loadavg=function(){return[]},exports.uptime=function(){return 0},exports.freemem=function(){return Number.MAX_VALUE},exports.totalmem=function(){return Number.MAX_VALUE},exports.cpus=function(){return[]},exports.type=function(){return"Browser"},exports.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}},exports.arch=function(){return"javascript"},exports.platform=function(){return"browser"},exports.tmpdir=exports.tmpDir=function(){return"/tmp"},exports.EOL="\n"},function(module,exports,__webpack_require__){function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=__webpack_require__(46),util=__webpack_require__(10);util.inherits=__webpack_require__(4),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports,__webpack_require__){(function(process){function ReadableState(options,stream){var Duplex=__webpack_require__(13);options=options||{};var hwm=options.highWaterMark,defaultHwm=options.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode),this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(31).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){__webpack_require__(13);return this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(util.isNullOrUndefined(chunk))state.reading=!1,state.ended||onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk)),addToFront||(state.reading=!1),state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state);else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM)n=MAX_HWM;else{n--;for(var p=1;32>p;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:isNaN(n)||util.isNull(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:0>=n?0:(n>state.highWaterMark&&(state.highWaterMark=roundUpToNextPowerOf2(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return util.isBuffer(chunk)||util.isString(chunk)||util.isNullOrUndefined(chunk)||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?process.nextTick(function(){emitReadable_(stream)}):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(function(){maybeReadMore_(stream,state)}))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length=length)ret=stringMode?list.join(""):Buffer.concat(list,length),list.length=0;else if(ni&&n>c;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);stringMode?ret+=buf.slice(0,cpy):buf.copy(ret,c,0,cpy),cpy0)throw new Error("endReadable called on non-empty stream");state.endEmitted||(state.ended=!0,process.nextTick(function(){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;l>i;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var isArray=__webpack_require__(70),Buffer=__webpack_require__(1).Buffer;Readable.ReadableState=ReadableState;var EE=__webpack_require__(23).EventEmitter;EE.listenerCount||(EE.listenerCount=function(emitter,type){return emitter.listeners(type).length});var Stream=__webpack_require__(6),util=__webpack_require__(10);util.inherits=__webpack_require__(4);var StringDecoder,debug=__webpack_require__(231);debug=debug&&debug.debuglog?debug.debuglog("stream"):function(){},util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return util.isString(chunk)&&!state.objectMode&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=new Buffer(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(31).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n);var state=this._readableState,nOrig=n;if((!util.isNumber(n)||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended), -0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n0?fromList(n,state):null,util.isNull(ret)&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),util.isNull(ret)||this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EE.listenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);return dest.on("drain",ondrain),src.on("data",ondata),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;len>i;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return-1===i?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev&&!1!==this._readableState.flowing&&this.resume(),"readable"===ev&&this.readable){var state=this._readableState;if(!state.readableListening)if(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading)state.length&&emitReadable(this,state);else{var self=this;process.nextTick(function(){debug("readable nexttick read 0"),self.read(0)})}}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,state.reading||(debug("resume read 0"),this.read(0)),resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),chunk&&(state.objectMode||chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)util.isFunction(stream[i])&&util.isUndefined(this[i])&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(global){var ClientRequest=__webpack_require__(220),extend=__webpack_require__(48),statusCodes=__webpack_require__(128),url=__webpack_require__(82),http=exports;http.request=function(opts,cb){opts="string"==typeof opts?url.parse(opts):extend(opts);var defaultProtocol=-1===global.location.protocol.search(/^https?:$/)?"http:":"",protocol=opts.protocol||defaultProtocol,host=opts.hostname||opts.host,port=opts.port,path=opts.path||"/";host&&-1!==host.indexOf(":")&&(host="["+host+"]"),opts.url=(host?protocol+"//"+host:"")+(port?":"+port:"")+path,opts.method=(opts.method||"GET").toUpperCase(),opts.headers=opts.headers||{};var req=new ClientRequest(opts);return cb&&req.on("response",cb),req},http.get=function(opts,cb){var req=http.request(opts,cb);return req.end(),req},http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(exports,function(){return this}())},function(module,exports){(function(global){function checkTypeSupport(type){try{return xhr.responseType=type,xhr.responseType===type}catch(e){}return!1}function isFunction(value){return"function"==typeof value}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableByteStream),exports.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),exports.blobConstructor=!0}catch(e){}var xhr=new global.XMLHttpRequest;xhr.open("GET",global.location.host?"/":"https://example.com");var haveArrayBuffer="undefined"!=typeof global.ArrayBuffer,haveSlice=haveArrayBuffer&&isFunction(global.ArrayBuffer.prototype.slice);exports.arraybuffer=haveArrayBuffer&&checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&haveSlice&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&haveArrayBuffer&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=isFunction(xhr.overrideMimeType),exports.vbArray=isFunction(global.VBArray),xhr=null}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=__webpack_require__(10);util.inherits=__webpack_require__(4);var Readable=__webpack_require__(222),Writable=__webpack_require__(224);util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(process){function DestroyableTransform(opts){Transform.call(this,opts),this._destroyed=!1}function noop(chunk,enc,callback){callback(null,chunk)}function through2(construct){return function(options,transform,flush){return"function"==typeof options&&(flush=transform,transform=options,options={}),"function"!=typeof transform&&(transform=noop),"function"!=typeof flush&&(flush=null),construct(options,transform,flush)}}var Transform=__webpack_require__(225),inherits=__webpack_require__(11).inherits,xtend=__webpack_require__(48);inherits(DestroyableTransform,Transform),DestroyableTransform.prototype.destroy=function(err){if(!this._destroyed){this._destroyed=!0;var self=this;process.nextTick(function(){err&&self.emit("error",err),self.emit("close")})}},module.exports=through2(function(options,transform,flush){var t2=new DestroyableTransform(options);return t2._transform=transform,flush&&(t2._flush=flush),t2}),module.exports.ctor=through2(function(options,transform,flush){function Through2(override){return this instanceof Through2?(this.options=xtend(options,override),void DestroyableTransform.call(this,this.options)):new Through2(override)}return inherits(Through2,DestroyableTransform),Through2.prototype._transform=transform,flush&&(Through2.prototype._flush=flush),Through2}),module.exports.obj=through2(function(options,transform,flush){var t2=new DestroyableTransform(xtend({objectMode:!0,highWaterMark:16},options));return t2._transform=transform,flush&&(t2._flush=flush),t2})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&isObject(url)&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}function urlFormat(obj){return isString(obj)&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)}function urlResolve(source,relative){return urlParse(source,!1,!0).resolve(relative)}function urlResolveObject(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative}function isString(arg){return"string"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}var punycode=__webpack_require__(227);exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=__webpack_require__(206);Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var rest=url;rest=rest.trim();var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto,rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes="//"===rest.substr(0,2);!slashes||proto&&hostlessProtocol[proto]||(rest=rest.substr(2),this.slashes=!0)}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){for(var hostEnd=-1,i=0;ihec)&&(hostEnd=hec)}var auth,atSign;atSign=-1===hostEnd?rest.lastIndexOf("@"):rest.lastIndexOf("@",hostEnd),-1!==atSign&&(auth=rest.slice(0,atSign),rest=rest.slice(atSign+1),this.auth=decodeURIComponent(auth)),hostEnd=-1;for(var i=0;ihec)&&(hostEnd=hec)}-1===hostEnd&&(hostEnd=rest.length),this.host=rest.slice(0,hostEnd),rest=rest.slice(hostEnd),this.parseHost(),this.hostname=this.hostname||"";var ipv6Hostname="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!ipv6Hostname)for(var hostparts=this.hostname.split(/\./),i=0,l=hostparts.length;l>i;i++){var part=hostparts[i];if(part&&!part.match(hostnamePartPattern)){for(var newpart="",j=0,k=part.length;k>j;j++)newpart+=part.charCodeAt(j)>127?"x":part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!ipv6Hostname){for(var domainArray=this.hostname.split("."),newOut=[],i=0;ii;i++){var ae=autoEscape[i],esc=encodeURIComponent(ae);esc===ae&&(esc=escape(ae)),rest=rest.split(ae).join(esc)}var hash=rest.indexOf("#");-1!==hash&&(this.hash=rest.substr(hash),rest=rest.slice(0,hash));var qm=rest.indexOf("?");if(-1!==qm?(this.search=rest.substr(qm),this.query=rest.substr(qm+1),parseQueryString&&(this.query=querystring.parse(this.query)),rest=rest.slice(0,qm)):parseQueryString&&(this.search="",this.query={}),rest&&(this.pathname=rest),slashedProtocol[lowerProto]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var p=this.pathname||"",s=this.search||"";this.path=p+s}return this.href=this.format(),this},Url.prototype.format=function(){var auth=this.auth||"";auth&&(auth=encodeURIComponent(auth),auth=auth.replace(/%3A/i,":"),auth+="@");var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=!1,query="";this.host?host=auth+this.host:this.hostname&&(host=auth+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(host+=":"+this.port)),this.query&&isObject(this.query)&&Object.keys(this.query).length&&(query=querystring.stringify(this.query));var search=this.search||query&&"?"+query||"";return protocol&&":"!==protocol.substr(-1)&&(protocol+=":"),this.slashes||(!protocol||slashedProtocol[protocol])&&host!==!1?(host="//"+(host||""),pathname&&"/"!==pathname.charAt(0)&&(pathname="/"+pathname)):host||(host=""),hash&&"#"!==hash.charAt(0)&&(hash="#"+hash),search&&"?"!==search.charAt(0)&&(search="?"+search),pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)}),search=search.replace("#","%23"),protocol+host+pathname+search+hash},Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,!1,!0)).format()},Url.prototype.resolveObject=function(relative){if(isString(relative)){var rel=new Url;rel.parse(relative,!1,!0),relative=rel}var result=new Url;if(Object.keys(this).forEach(function(k){result[k]=this[k]},this),result.hash=relative.hash,""===relative.href)return result.href=result.format(),result;if(relative.slashes&&!relative.protocol)return Object.keys(relative).forEach(function(k){"protocol"!==k&&(result[k]=relative[k])}),slashedProtocol[result.protocol]&&result.hostname&&!result.pathname&&(result.path=result.pathname="/"),result.href=result.format(),result;if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol])return Object.keys(relative).forEach(function(k){result[k]=relative[k]}),result.href=result.format(),result;if(result.protocol=relative.protocol,relative.host||hostlessProtocol[relative.protocol])result.pathname=relative.pathname;else{for(var relPath=(relative.pathname||"").split("/");relPath.length&&!(relative.host=relPath.shift()););relative.host||(relative.host=""),relative.hostname||(relative.hostname=""),""!==relPath[0]&&relPath.unshift(""),relPath.length<2&&relPath.unshift(""),result.pathname=relPath.join("/")}if(result.search=relative.search,result.query=relative.query,result.host=relative.host||"",result.auth=relative.auth,result.hostname=relative.hostname||relative.host,result.port=relative.port,result.pathname||result.search){var p=result.pathname||"",s=result.search||"";result.path=p+s}return result.slashes=result.slashes||relative.slashes,result.href=result.format(),result}var isSourceAbs=result.pathname&&"/"===result.pathname.charAt(0),isRelAbs=relative.host||relative.pathname&&"/"===relative.pathname.charAt(0),mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic&&(result.hostname="",result.port=null,result.host&&(""===srcPath[0]?srcPath[0]=result.host:srcPath.unshift(result.host)),result.host="",relative.protocol&&(relative.hostname=null,relative.port=null,relative.host&&(""===relPath[0]?relPath[0]=relative.host:relPath.unshift(relative.host)),relative.host=null),mustEndAbs=mustEndAbs&&(""===relPath[0]||""===srcPath[0])),isRelAbs)result.host=relative.host||""===relative.host?relative.host:result.host,result.hostname=relative.hostname||""===relative.hostname?relative.hostname:result.hostname,result.search=relative.search,result.query=relative.query,srcPath=relPath;else if(relPath.length)srcPath||(srcPath=[]),srcPath.pop(),srcPath=srcPath.concat(relPath),result.search=relative.search,result.query=relative.query;else if(!isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return result.search=relative.search,result.query=relative.query,isNull(result.pathname)&&isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)last=srcPath[i],"."==last?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),isNull(result.pathname)&&isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],":"!==port&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},function(module,exports){function wrappy(fn,cb){function wrapper(){for(var args=new Array(arguments.length),i=0;i=0&&options.parseArrays&&index<=options.arrayLimit?(obj=[],obj[index]=internals.parseObject(chain,val,options)):obj[cleanRoot]=internals.parseObject(chain,val,options)}return obj},internals.parseKeys=function(givenKey,val,options){if(givenKey){var key=options.allowDots?givenKey.replace(/\.([^\.\[]+)/g,"[$1]"):givenKey,parent=/^([^\[\]]*)/,child=/(\[[^\[\]]*\])/g,segment=parent.exec(key),keys=[];if(segment[1]){if(!options.plainObjects&&Object.prototype.hasOwnProperty(segment[1])&&!options.allowPrototypes)return;keys.push(segment[1])}for(var i=0;null!==(segment=child.exec(key))&&ithis.settings.maxBytes?this.emit("error",Boom.badRequest("Payload content length greater than maximum allowed: "+this.settings.maxBytes)):(this.length=this.length+chunk.length,this.buffers.push(chunk),void next())},internals.Recorder.prototype.collect=function(){var buffer=0===this.buffers.length?new Buffer(0):1===this.buffers.length?this.buffers[0]:Buffer.concat(this.buffers,this.length);return buffer}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";var Hoek=__webpack_require__(18),Stream=__webpack_require__(6),Payload=__webpack_require__(53),internals={};module.exports=internals.Tap=function(){Stream.Transform.call(this),this.buffers=[]},Hoek.inherits(internals.Tap,Stream.Transform),internals.Tap.prototype._transform=function(chunk,encoding,next){this.buffers.push(chunk),next(null,chunk)},internals.Tap.prototype.collect=function(){return new Payload(this.buffers)}},function(module,exports,__webpack_require__){(function(Buffer){"use strict";var internals={};exports.escapeJavaScript=function(input){if(!input)return"";for(var escaped="",i=0;i=256)return"\\u"+internals.padLeft(""+charCode,4);var hexValue=new Buffer(String.fromCharCode(charCode),"ascii").toString("hex");return"\\x"+internals.padLeft(hexValue,2)},internals.escapeHtmlChar=function(charCode){var namedEscape=internals.namedHtml[charCode];if("undefined"!=typeof namedEscape)return namedEscape;if(charCode>=256)return"&#"+charCode+";";var hexValue=new Buffer(String.fromCharCode(charCode),"ascii").toString("hex");return"&#x"+internals.padLeft(hexValue,2)+";"},internals.padLeft=function(str,len){for(;str.lengthi;++i)(i>=97||i>=65&&90>=i||i>=48&&57>=i||32===i||46===i||44===i||45===i||58===i||95===i)&&(safe[i]=null);return safe}()}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";var Wreck=__webpack_require__(52);module.exports=function(send){return function(files,opts,cb){return"function"==typeof opts&&void 0===cb&&(cb=opts,opts={}),"string"==typeof files&&files.startsWith("http")?Wreck.request("GET",files,null,function(err,res){return err?cb(err):void send("add",null,opts,res,cb)}):send("add",null,opts,files,cb)}}},function(module,exports,__webpack_require__){ -"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{get:argCommand(send,"block/get"),stat:argCommand(send,"block/stat"),put:function(file,cb){return Array.isArray(file)?cb(null,new Error("block.put() only accepts 1 file")):send("block/put",null,null,file,cb)}}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return argCommand(send,"cat")}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return command(send,"commands")}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{get:argCommand(send,"config"),set:function(key,value,opts,cb){return"function"==typeof opts&&(cb=opts,opts={}),send("config",[key,value],opts,null,cb)},show:function(cb){return send("config/show",null,null,null,!0,cb)},replace:function(file,cb){return send("config/replace",null,null,file,cb)}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),_promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise),argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{findprovs:argCommand(send,"dht/findprovs"),get:function(key,opts,cb){"function"!=typeof opts||cb||(cb=opts,opts=null);var handleResult=function(done,err,res){if(err)return done(err);if(!res)return done(new Error("empty response"));if(0===res.length)return done(new Error("no value returned for key"));if(Array.isArray(res)&&(res=res[0]),5===res.Type)done(null,res.Extra);else{var error=new Error("key was not found (type 6)");done(error)}};if("function"!=typeof cb&&"undefined"!=typeof _promise2["default"]){var _ret=function(){var done=function(err,res){if(err)throw err;return res};return{v:send("dht/get",key,opts).then(function(res){return handleResult(done,null,res)},function(err){return handleResult(done,err)})}}();if("object"===("undefined"==typeof _ret?"undefined":(0,_typeof3["default"])(_ret)))return _ret.v}return send("dht/get",key,opts,null,handleResult.bind(null,cb))},put:function(key,value,opts,cb){return"function"!=typeof opts||cb||(cb=opts,opts=null),send("dht/put",[key,value],opts,null,cb)}}}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return{net:command(send,"diag/net"),sys:command(send,"diag/sys")}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{cp:argCommand(send,"files/cp"),ls:argCommand(send,"files/ls"),mkdir:argCommand(send,"files/mkdir"),stat:argCommand(send,"files/stat"),rm:function(path,opts,cb){return"function"!=typeof opts||cb||(cb=opts,opts={}),send("files/rm",path,opts,null,cb)},read:argCommand(send,"files/read"),write:function(pathDst,files,opts,cb){return"function"==typeof opts&&void 0===cb&&(cb=opts,opts={}),send("files/write",pathDst,opts,files,cb)},mv:argCommand(send,"files/mv")}}},function(module,exports){"use strict";module.exports=function(send){return function(idParam,cb){return"function"==typeof idParam&&(cb=idParam,idParam=null),send("id",idParam,null,null,cb)}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise),ndjson=__webpack_require__(73);module.exports=function(send){return{tail:function(cb){return"function"!=typeof cb&&"undefined"!=typeof _promise2["default"]?send("log/tail",null,{},null,!1).then(function(res){return res.pipe(ndjson.parse())}):send("log/tail",null,{},null,!1,function(err,res){return err?cb(err):void cb(null,res.pipe(ndjson.parse()))})}}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return argCommand(send,"ls")}},function(module,exports){"use strict";module.exports=function(send){return function(ipfs,ipns,cb){"function"==typeof ipfs?(cb=ipfs,ipfs=null):"function"==typeof ipns&&(cb=ipns,ipns=null);var opts={};return ipfs&&(opts.f=ipfs),ipns&&(opts.n=ipns),send("mount",null,opts,null,cb)}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{publish:argCommand(send,"name/publish"),resolve:argCommand(send,"name/resolve")}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{get:argCommand(send,"object/get"),put:function(file,encoding,cb){return"function"==typeof encoding?cb(null,new Error("Must specify an object encoding ('json' or 'protobuf')")):send("object/put",encoding,null,file,cb)},data:argCommand(send,"object/data"),links:argCommand(send,"object/links"),stat:argCommand(send,"object/stat"),"new":argCommand(send,"object/new"),patch:{rmLink:function(root,link,cb){return send("object/patch/rm-link",[root,link],null,null,cb)},setData:function(root,data,cb){return send("object/patch/set-data",[root],null,data,cb)},appendData:function(root,data,cb){return send("object/patch/append-data",[root],null,data,cb)},addLink:function(root,name,ref,cb){return send("object/patch/add-link",[root,name,ref],null,null,cb)}}}}},function(module,exports){"use strict";module.exports=function(send){return{add:function(hash,opts,cb){return"function"==typeof opts&&(cb=opts,opts=null),send("pin/add",hash,opts,null,cb)},remove:function(hash,opts,cb){return"function"==typeof opts&&(cb=opts,opts=null),send("pin/rm",hash,opts,null,cb)},list:function(type,cb){"function"==typeof type&&(cb=type,type=null);var opts=null;return type&&(opts={type:type}),send("pin/ls",null,opts,null,cb)}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise);module.exports=function(send){return function(id,cb){return"function"!=typeof cb&&"undefined"!=typeof _promise2["default"]?send("ping",id,{n:1},null).then(function(res){return res[1]}):send("ping",id,{n:1},null,function(err,res){return err?cb(err,null):void cb(null,res[1])})}}},function(module,exports,__webpack_require__){"use strict";var cmds=__webpack_require__(5);module.exports=function(send){var refs=cmds.argCommand(send,"refs");return refs.local=cmds.command(send,"refs/local"),refs}},function(module,exports,__webpack_require__){"use strict";var cmds=__webpack_require__(5);module.exports=function(send){return{peers:cmds.command(send,"swarm/peers"),connect:cmds.argCommand(send,"swarm/connect")}}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return{apply:command(send,"update"),check:command(send,"update/check"),log:command(send,"update/log")}}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return command(send,"version")}},function(module,exports,__webpack_require__){"use strict";var pkg=__webpack_require__(188);exports=module.exports=function(){return{"api-path":"/api/v0/","user-agent":"/node-"+pkg.name+"/"+pkg.version+"/",host:"localhost",port:"5001",protocol:"http"}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function headers(file){var name=file.path||"",header={"Content-Disposition":'file; filename="'+name+'"'};return file.dir?header["Content-Type"]="application/x-directory":header["Content-Type"]="application/octet-stream",header}function strip(name,base){var smallBase=base.split("/").slice(0,-1).join("/")+"/";return name.replace(smallBase,"")}function loadPaths(opts,file){var path=__webpack_require__(17),fs=__webpack_require__(49),glob=__webpack_require__(69),followSymlinks=null!=opts.followSymlinks?opts.followSymlinks:!0;file=path.resolve(file);var stats=fs.statSync(file);if(stats.isDirectory()&&!opts.recursive)throw new Error("Can only add directories using --recursive");if(stats.isDirectory()&&opts.recursive){var _ret=function(){var mg=new glob.sync.GlobSync(file+"/**/*",{follow:followSymlinks});return{v:mg.found.map(function(name){return"FILE"===mg.cache[name]?{path:strip(name,file),dir:!1,content:fs.createReadStream(name)}:{path:strip(name,file),dir:!0}})}}();if("object"===("undefined"==typeof _ret?"undefined":(0,_typeof3["default"])(_ret)))return _ret.v}return{path:file,content:fs.createReadStream(file)}}function getFilesStream(files,opts){if(!files)return null;var mp=new Multipart;return flatmap(files,function(file){if("string"==typeof file){if(!isNode)throw new Error("Can not add paths in node");return loadPaths(opts,file)}return file.path&&(file.content||file.dir)?file:{path:"",dir:!1,content:file}}).forEach(function(file){mp.addPart({headers:headers(file),body:file.content})}),mp}var _typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),isNode=__webpack_require__(67),Multipart=__webpack_require__(202),flatmap=__webpack_require__(181);exports=module.exports=getFilesStream},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function requireCommands(){return{add:__webpack_require__(90),block:__webpack_require__(91),cat:__webpack_require__(92),commands:__webpack_require__(93),config:__webpack_require__(94),dht:__webpack_require__(95),diag:__webpack_require__(96),id:__webpack_require__(98),files:__webpack_require__(97),log:__webpack_require__(99),ls:__webpack_require__(100),mount:__webpack_require__(101),name:__webpack_require__(102),object:__webpack_require__(103),pin:__webpack_require__(104),ping:__webpack_require__(105),refs:__webpack_require__(106),swarm:__webpack_require__(107),update:__webpack_require__(108),version:__webpack_require__(109)}}function loadCommands(send){var files=requireCommands(),cmds={};return(0,_keys2["default"])(files).forEach(function(file){cmds[file]=files[file](send)}),cmds}var _keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys);module.exports=loadCommands},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function parseChunkedJson(res,cb){var parsed=[];res.pipe(ndjson.parse()).on("data",parsed.push.bind(parsed)).on("end",function(){return cb(null,parsed)})}function onRes(buffer,cb){return function(err,res){if(err)return cb(err);var stream=!!res.headers["x-stream-output"],chunkedObjects=!!res.headers["x-chunked-output"],isJson=0===res.headers["content-type"].indexOf("application/json");if(res.statusCode>=400||!res.statusCode){var _ret=function(){var error=new Error("Server responded with "+res.statusCode);return{v:Wreck.read(res,{json:!0},function(err,payload){return err?cb(err):(payload&&(error.code=payload.Code,error.message=payload.Message),void cb(error))})}}();if("object"===("undefined"==typeof _ret?"undefined":(0,_typeof3["default"])(_ret)))return _ret.v}return stream&&!buffer?cb(null,res):chunkedObjects?isJson?parseChunkedJson(res,cb):Wreck.read(res,null,cb):void Wreck.read(res,{json:isJson},cb)}}function requestAPI(config,path,args,qs,files,buffer,cb){if(qs=qs||{},Array.isArray(path)&&(path=path.join("/")),args&&!Array.isArray(args)&&(args=[args]),args&&(qs.arg=args),files&&!Array.isArray(files)&&(files=[files]),qs.r&&(qs.recursive=qs.r,delete qs.r),!isNode&&qs.recursive&&"add"===path)return cb(new Error("Recursive uploads are not supported in the browser"));qs["stream-channels"]=!0;var stream=void 0;files&&(stream=getFilesStream(files,qs)),delete qs.followSymlinks;var port=config.port?":"+config.port:"",opts={method:files?"POST":"GET",uri:config.protocol+"://"+config.host+port+config["api-path"]+path+"?"+Qs.stringify(qs,{arrayFormat:"repeat"}),headers:{}};if(isNode&&(opts.headers["User-Agent"]=config["user-agent"]),files){if(!stream.boundary)return cb(new Error("No boundary in multipart stream"));opts.headers["Content-Type"]="multipart/form-data; boundary="+stream.boundary,opts.downstreamRes=stream,opts.payload=stream}return Wreck.request(opts.method,opts.uri,opts,onRes(buffer,cb))}var _promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise),_typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),Wreck=__webpack_require__(52),Qs=__webpack_require__(84),ndjson=__webpack_require__(73),getFilesStream=__webpack_require__(111),isNode=__webpack_require__(67);exports=module.exports=function(config){return function(path,args,qs,files,buffer,cb){return"function"==typeof buffer&&(cb=buffer,buffer=!1),"function"!=typeof cb&&"undefined"!=typeof _promise2["default"]?new _promise2["default"](function(resolve,reject){requestAPI(config,path,args,qs,files,buffer,function(err,res){return err?reject(err):void resolve(res)})}):requestAPI(config,path,args,qs,files,buffer,cb)}}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(130),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(131),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(133),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(134),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(135),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(136),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(138),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(140),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(141),__esModule:!0}},function(module,exports){function balanced(a,b,str){var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)}}function range(a,b,str){var begs,beg,left,right,result,ai=str.indexOf(a),bi=str.indexOf(b,ai+1),i=ai;if(ai>=0&&bi>0){for(begs=[],left=str.length;i=0&&!result;)i==ai?(begs.push(i),ai=str.indexOf(a,i+1)):1==begs.length?result=[begs.pop(),bi]:(beg=begs.pop(),left>beg&&(left=beg,right=bi),bi=str.indexOf(b,i+1)),i=bi>ai&&ai>=0?ai:bi;begs.length&&(result=[left,right])}return result}module.exports=balanced,balanced.range=range},function(module,exports,__webpack_require__){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(exports){"use strict";function decode(elt){var code=elt.charCodeAt(0);return code===PLUS||code===PLUS_URL_SAFE?62:code===SLASH||code===SLASH_URL_SAFE?63:NUMBER>code?-1:NUMBER+10>code?code-NUMBER+26+26:UPPER+26>code?code-UPPER:LOWER+26>code?code-LOWER+26:void 0}function b64ToByteArray(b64){function push(v){arr[L++]=v}var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0,arr=new Arr(3*b64.length/4-placeHolders),l=placeHolders>0?b64.length-4:b64.length;var L=0;for(i=0,j=0;l>i;i+=4,j+=3)tmp=decode(b64.charAt(i))<<18|decode(b64.charAt(i+1))<<12|decode(b64.charAt(i+2))<<6|decode(b64.charAt(i+3)),push((16711680&tmp)>>16),push((65280&tmp)>>8),push(255&tmp);return 2===placeHolders?(tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4,push(255&tmp)):1===placeHolders&&(tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2,push(tmp>>8&255),push(255&tmp)),arr}function uint8ToBase64(uint8){function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(63&num)}var i,temp,length,extraBytes=uint8.length%3,output="";for(i=0,length=uint8.length-extraBytes;length>i;i+=3)temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output+=tripletToBase64(temp);switch(extraBytes){case 1:temp=uint8[uint8.length-1],output+=encode(temp>>2),output+=encode(temp<<4&63),output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1],output+=encode(temp>>10),output+=encode(temp>>4&63),output+=encode(temp<<2&63),output+="="}return output}var Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,PLUS="+".charCodeAt(0),SLASH="/".charCodeAt(0),NUMBER="0".charCodeAt(0),LOWER="a".charCodeAt(0),UPPER="A".charCodeAt(0),PLUS_URL_SAFE="-".charCodeAt(0),SLASH_URL_SAFE="_".charCodeAt(0);exports.toByteArray=b64ToByteArray,exports.fromByteArray=uint8ToBase64}(exports)},function(module,exports,__webpack_require__){function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[],m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre,body=m.body,post=m.post,p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);return post.length&&(p[p.length-1]+=postParts.shift(),p.push.apply(p,postParts)),parts.push.apply(parts,p),parts}function expandTop(str){return str?expand(escapeBraces(str),!0).map(unescapeBraces):[]}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return y>=i}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[],m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body),isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body),isSequence=isNumericSequence||isAlphaSequence,isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions)return m.post.match(/,.*\}/)?(str=m.pre+"{"+m.body+escClose+m.post,expand(str)):[str];var n;if(isSequence)n=m.body.split(/\.\./);else if(n=parseCommaParts(m.body),1===n.length&&(n=expand(n[0],!1).map(embrace),1===n.length)){var post=m.post.length?expand(m.post,!1):[""];return post.map(function(p){return m.pre+n[0]+p})}var N,pre=m.pre,post=m.post.length?expand(m.post,!1):[""];if(isSequence){var x=numeric(n[0]),y=numeric(n[1]),width=Math.max(n[0].length,n[1].length),incr=3==n.length?Math.abs(numeric(n[2])):1,test=lte,reverse=x>y;reverse&&(incr*=-1,test=gte);var pad=n.some(isPadded);N=[];for(var i=x;test(i,y);i+=incr){var c;if(isAlphaSequence)c=String.fromCharCode(i),"\\"===c&&(c="");else if(c=String(i),pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");c=0>i?"-"+z+c.slice(1):z+c}}N.push(c)}}else N=concatMap(n,function(el){return expand(el,!1)});for(var j=0;ji;)isEnum.call(it,key=symbols[i++])&&keys.push(key);return keys}},function(module,exports,__webpack_require__){var ctx=__webpack_require__(20),call=__webpack_require__(150),isArrayIter=__webpack_require__(148),anObject=__webpack_require__(15),toLength=__webpack_require__(164),getIterFn=__webpack_require__(165);module.exports=function(iterable,entries,fn,that){var length,step,iterator,iterFn=getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0;if("function"!=typeof iterFn)throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++)entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]);else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;)call(iterator,f,step.value,entries)}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(9).document&&document.documentElement},function(module,exports){module.exports=function(fn,args,that){var un=void 0===that;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}},function(module,exports,__webpack_require__){var Iterators=__webpack_require__(21),ITERATOR=__webpack_require__(8)("iterator"),ArrayProto=Array.prototype;module.exports=function(it){return void 0!==it&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}},function(module,exports,__webpack_require__){var cof=__webpack_require__(19);module.exports=Array.isArray||function(arg){return"Array"==cof(arg)}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(15);module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];throw void 0!==ret&&anObject(ret.call(iterator)),e}}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),descriptor=__webpack_require__(38),setToStringTag=__webpack_require__(30),IteratorPrototype={};__webpack_require__(36)(IteratorPrototype,__webpack_require__(8)("iterator"),function(){return this}),module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:descriptor(1,next)}),setToStringTag(Constructor,NAME+" Iterator")}},function(module,exports,__webpack_require__){var ITERATOR=__webpack_require__(8)("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR]();riter["return"]=function(){SAFE_CLOSING=!0},Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec,skipClosing){if(!skipClosing&&!SAFE_CLOSING)return!1;var safe=!1;try{var arr=[7],iter=arr[ITERATOR]();iter.next=function(){safe=!0},arr[ITERATOR]=function(){return iter},exec(arr)}catch(e){}return safe}},function(module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},function(module,exports,__webpack_require__){var $=__webpack_require__(3),toIObject=__webpack_require__(22);module.exports=function(object,el){for(var key,O=toIObject(object),keys=$.getKeys(O),length=keys.length,index=0;length>index;)if(O[key=keys[index++]]===el)return key}},function(module,exports,__webpack_require__){var head,last,notify,global=__webpack_require__(9),macrotask=__webpack_require__(163).set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,isNode="process"==__webpack_require__(19)(process),flush=function(){var parent,domain,fn;for(isNode&&(parent=process.domain)&&(process.domain=null,parent.exit());head;)domain=head.domain,fn=head.fn,domain&&domain.enter(),fn(),domain&&domain.exit(),head=head.next;last=void 0,parent&&parent.enter()};if(isNode)notify=function(){process.nextTick(flush)};else if(Observer){var toggle=1,node=document.createTextNode("");new Observer(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=-toggle}}else notify=Promise&&Promise.resolve?function(){Promise.resolve().then(flush)}:function(){macrotask.call(global,flush)};module.exports=function(fn){var task={fn:fn,next:void 0,domain:isNode&&process.domain};last&&(last.next=task),head||(head=task,notify()),last=task}},function(module,exports,__webpack_require__){var $=__webpack_require__(3),toObject=__webpack_require__(40),IObject=__webpack_require__(57);module.exports=__webpack_require__(27)(function(){var a=Object.assign,A={},B={},S=Symbol(),K="abcdefghijklmnopqrst";return A[S]=7,K.split("").forEach(function(k){B[k]=k}),7!=a({},A)[S]||Object.keys(a({},B)).join("")!=K})?function(target,source){for(var T=toObject(target),$$=arguments,$$len=$$.length,index=1,getKeys=$.getKeys,getSymbols=$.getSymbols,isEnum=$.isEnum;$$len>index;)for(var key,S=IObject($$[index++]),keys=getSymbols?getKeys(S).concat(getSymbols(S)):getKeys(S),length=keys.length,j=0;length>j;)isEnum.call(S,key=keys[j++])&&(T[key]=S[key]);return T}:Object.assign},function(module,exports,__webpack_require__){var redefine=__webpack_require__(39);module.exports=function(target,src){for(var key in src)redefine(target,key,src[key]);return target}},function(module,exports){module.exports=Object.is||function(x,y){return x===y?0!==x||1/x===1/y:x!=x&&y!=y}},function(module,exports,__webpack_require__){"use strict";var core=__webpack_require__(7),$=__webpack_require__(3),DESCRIPTORS=__webpack_require__(26),SPECIES=__webpack_require__(8)("species");module.exports=function(KEY){var C=core[KEY];DESCRIPTORS&&C&&!C[SPECIES]&&$.setDesc(C,SPECIES,{configurable:!0,get:function(){return this}})}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(15),aFunction=__webpack_require__(33),SPECIES=__webpack_require__(8)("species");module.exports=function(O,D){var S,C=anObject(O).constructor;return void 0===C||void 0==(S=anObject(C)[SPECIES])?D:aFunction(S)}},function(module,exports){module.exports=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(61),defined=__webpack_require__(34);module.exports=function(TO_STRING){return function(that,pos){var a,b,s=String(defined(that)),i=toInteger(pos),l=s.length;return 0>i||i>=l?TO_STRING?"":void 0:(a=s.charCodeAt(i),55296>a||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536)}}},function(module,exports,__webpack_require__){var defer,channel,port,ctx=__webpack_require__(20),invoke=__webpack_require__(147),html=__webpack_require__(146),cel=__webpack_require__(143),global=__webpack_require__(9),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id],fn()}},listner=function(event){run.call(event.data)};setTask&&clearTask||(setTask=function(fn){for(var args=[],i=1;arguments.length>i;)args.push(arguments[i++]);return queue[++counter]=function(){invoke("function"==typeof fn?fn:Function(fn),args)},defer(counter),counter},clearTask=function(id){delete queue[id]},"process"==__webpack_require__(19)(process)?defer=function(id){process.nextTick(ctx(run,id,1))}:MessageChannel?(channel=new MessageChannel,port=channel.port2,channel.port1.onmessage=listner,defer=ctx(port.postMessage,port,1)):global.addEventListener&&"function"==typeof postMessage&&!global.importScripts?(defer=function(id){ -global.postMessage(id+"","*")},global.addEventListener("message",listner,!1)):defer=ONREADYSTATECHANGE in cel("script")?function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run.call(id)}}:function(id){setTimeout(ctx(run,id,1),0)}),module.exports={set:setTask,clear:clearTask}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(61),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},function(module,exports,__webpack_require__){var classof=__webpack_require__(55),ITERATOR=__webpack_require__(8)("iterator"),Iterators=__webpack_require__(21);module.exports=__webpack_require__(7).getIteratorMethod=function(it){return void 0!=it?it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]:void 0}},function(module,exports,__webpack_require__){"use strict";var addToUnscopables=__webpack_require__(142),step=__webpack_require__(153),Iterators=__webpack_require__(21),toIObject=__webpack_require__(22);module.exports=__webpack_require__(58)(Array,"Array",function(iterated,kind){this._t=toIObject(iterated),this._i=0,this._k=kind},function(){var O=this._t,kind=this._k,index=this._i++;return!O||index>=O.length?(this._t=void 0,step(1)):"keys"==kind?step(0,index):"values"==kind?step(0,O[index]):step(0,[index,O[index]])},"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries")},function(module,exports,__webpack_require__){var $export=__webpack_require__(16);$export($export.S+$export.F,"Object",{assign:__webpack_require__(156)})},function(module,exports,__webpack_require__){var toIObject=__webpack_require__(22);__webpack_require__(29)("getOwnPropertyDescriptor",function($getOwnPropertyDescriptor){return function(it,key){return $getOwnPropertyDescriptor(toIObject(it),key)}})},function(module,exports,__webpack_require__){__webpack_require__(29)("getOwnPropertyNames",function(){return __webpack_require__(56).get})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(40);__webpack_require__(29)("getPrototypeOf",function($getPrototypeOf){return function(it){return $getPrototypeOf(toObject(it))}})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(40);__webpack_require__(29)("keys",function($keys){return function(it){return $keys(toObject(it))}})},function(module,exports,__webpack_require__){var $export=__webpack_require__(16);$export($export.S,"Object",{setPrototypeOf:__webpack_require__(59).set})},function(module,exports,__webpack_require__){"use strict";var Wrapper,$=__webpack_require__(3),LIBRARY=__webpack_require__(37),global=__webpack_require__(9),ctx=__webpack_require__(20),classof=__webpack_require__(55),$export=__webpack_require__(16),isObject=__webpack_require__(28),anObject=__webpack_require__(15),aFunction=__webpack_require__(33),strictNew=__webpack_require__(161),forOf=__webpack_require__(145),setProto=__webpack_require__(59).set,same=__webpack_require__(158),SPECIES=__webpack_require__(8)("species"),speciesConstructor=__webpack_require__(160),asap=__webpack_require__(155),PROMISE="Promise",process=global.process,isNode="process"==classof(process),P=global[PROMISE],testResolve=function(sub){var test=new P(function(){});return sub&&(test.constructor=Object),P.resolve(test)===test},USE_NATIVE=function(){function P2(x){var self=new P(x);return setProto(self,P2.prototype),self}var works=!1;try{if(works=P&&P.resolve&&testResolve(),setProto(P2,P),P2.prototype=$.create(P.prototype,{constructor:{value:P2}}),P2.resolve(5).then(function(){})instanceof P2||(works=!1),works&&__webpack_require__(26)){var thenableThenGotten=!1;P.resolve($.setDesc({},"then",{get:function(){thenableThenGotten=!0}})),works=thenableThenGotten}}catch(e){works=!1}return works}(),sameConstructor=function(a,b){return LIBRARY&&a===P&&b===Wrapper?!0:same(a,b)},getConstructor=function(C){var S=anObject(C)[SPECIES];return void 0!=S?S:C},isThenable=function(it){var then;return isObject(it)&&"function"==typeof(then=it.then)?then:!1},PromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(void 0!==resolve||void 0!==reject)throw TypeError("Bad Promise constructor");resolve=$$resolve,reject=$$reject}),this.resolve=aFunction(resolve),this.reject=aFunction(reject)},perform=function(exec){try{exec()}catch(e){return{error:e}}},notify=function(record,isReject){if(!record.n){record.n=!0;var chain=record.c;asap(function(){for(var value=record.v,ok=1==record.s,i=0,run=function(reaction){var result,then,handler=ok?reaction.ok:reaction.fail,resolve=reaction.resolve,reject=reaction.reject;try{handler?(ok||(record.h=!0),result=handler===!0?value:handler(value),result===reaction.promise?reject(TypeError("Promise-chain cycle")):(then=isThenable(result))?then.call(result,resolve,reject):resolve(result)):reject(value)}catch(e){reject(e)}};chain.length>i;)run(chain[i++]);chain.length=0,record.n=!1,isReject&&setTimeout(function(){var handler,console,promise=record.p;isUnhandled(promise)&&(isNode?process.emit("unhandledRejection",value,promise):(handler=global.onunhandledrejection)?handler({promise:promise,reason:value}):(console=global.console)&&console.error&&console.error("Unhandled promise rejection",value)),record.a=void 0},1)})}},isUnhandled=function(promise){var reaction,record=promise._d,chain=record.a||record.c,i=0;if(record.h)return!1;for(;chain.length>i;)if(reaction=chain[i++],reaction.fail||!isUnhandled(reaction.promise))return!1;return!0},$reject=function(value){var record=this;record.d||(record.d=!0,record=record.r||record,record.v=value,record.s=2,record.a=record.c.slice(),notify(record,!0))},$resolve=function(value){var then,record=this;if(!record.d){record.d=!0,record=record.r||record;try{if(record.p===value)throw TypeError("Promise can't be resolved itself");(then=isThenable(value))?asap(function(){var wrapper={r:record,d:!1};try{then.call(value,ctx($resolve,wrapper,1),ctx($reject,wrapper,1))}catch(e){$reject.call(wrapper,e)}}):(record.v=value,record.s=1,notify(record,!1))}catch(e){$reject.call({r:record,d:!1},e)}}};USE_NATIVE||(P=function(executor){aFunction(executor);var record=this._d={p:strictNew(this,P,PROMISE),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{executor(ctx($resolve,record,1),ctx($reject,record,1))}catch(err){$reject.call(record,err)}},__webpack_require__(157)(P.prototype,{then:function(onFulfilled,onRejected){var reaction=new PromiseCapability(speciesConstructor(this,P)),promise=reaction.promise,record=this._d;return reaction.ok="function"==typeof onFulfilled?onFulfilled:!0,reaction.fail="function"==typeof onRejected&&onRejected,record.c.push(reaction),record.a&&record.a.push(reaction),record.s&¬ify(record,!1),promise},"catch":function(onRejected){return this.then(void 0,onRejected)}})),$export($export.G+$export.W+$export.F*!USE_NATIVE,{Promise:P}),__webpack_require__(30)(P,PROMISE),__webpack_require__(159)(PROMISE),Wrapper=__webpack_require__(7)[PROMISE],$export($export.S+$export.F*!USE_NATIVE,PROMISE,{reject:function(r){var capability=new PromiseCapability(this),$$reject=capability.reject;return $$reject(r),capability.promise}}),$export($export.S+$export.F*(!USE_NATIVE||testResolve(!0)),PROMISE,{resolve:function(x){if(x instanceof P&&sameConstructor(x.constructor,this))return x;var capability=new PromiseCapability(this),$$resolve=capability.resolve;return $$resolve(x),capability.promise}}),$export($export.S+$export.F*!(USE_NATIVE&&__webpack_require__(152)(function(iter){P.all(iter)["catch"](function(){})})),PROMISE,{all:function(iterable){var C=getConstructor(this),capability=new PromiseCapability(C),resolve=capability.resolve,reject=capability.reject,values=[],abrupt=perform(function(){forOf(iterable,!1,values.push,values);var remaining=values.length,results=Array(remaining);remaining?$.each.call(values,function(promise,index){var alreadyCalled=!1;C.resolve(promise).then(function(value){alreadyCalled||(alreadyCalled=!0,results[index]=value,--remaining||resolve(results))},reject)}):resolve(results)});return abrupt&&reject(abrupt.error),capability.promise},race:function(iterable){var C=getConstructor(this),capability=new PromiseCapability(C),reject=capability.reject,abrupt=perform(function(){forOf(iterable,!1,function(promise){C.resolve(promise).then(capability.resolve,reject)})});return abrupt&&reject(abrupt.error),capability.promise}})},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),global=__webpack_require__(9),has=__webpack_require__(35),DESCRIPTORS=__webpack_require__(26),$export=__webpack_require__(16),redefine=__webpack_require__(39),$fails=__webpack_require__(27),shared=__webpack_require__(60),setToStringTag=__webpack_require__(30),uid=__webpack_require__(62),wks=__webpack_require__(8),keyOf=__webpack_require__(154),$names=__webpack_require__(56),enumKeys=__webpack_require__(144),isArray=__webpack_require__(149),anObject=__webpack_require__(15),toIObject=__webpack_require__(22),createDesc=__webpack_require__(38),getDesc=$.getDesc,setDesc=$.setDesc,_create=$.create,getNames=$names.get,$Symbol=global.Symbol,$JSON=global.JSON,_stringify=$JSON&&$JSON.stringify,setter=!1,HIDDEN=wks("_hidden"),isEnum=$.isEnum,SymbolRegistry=shared("symbol-registry"),AllSymbols=shared("symbols"),useNative="function"==typeof $Symbol,ObjectProto=Object.prototype,setSymbolDesc=DESCRIPTORS&&$fails(function(){return 7!=_create(setDesc({},"a",{get:function(){return setDesc(this,"a",{value:7}).a}})).a})?function(it,key,D){var protoDesc=getDesc(ObjectProto,key);protoDesc&&delete ObjectProto[key],setDesc(it,key,D),protoDesc&&it!==ObjectProto&&setDesc(ObjectProto,key,protoDesc)}:setDesc,wrap=function(tag){var sym=AllSymbols[tag]=_create($Symbol.prototype);return sym._k=tag,DESCRIPTORS&&setter&&setSymbolDesc(ObjectProto,tag,{configurable:!0,set:function(value){has(this,HIDDEN)&&has(this[HIDDEN],tag)&&(this[HIDDEN][tag]=!1),setSymbolDesc(this,tag,createDesc(1,value))}}),sym},isSymbol=function(it){return"symbol"==typeof it},$defineProperty=function(it,key,D){return D&&has(AllSymbols,key)?(D.enumerable?(has(it,HIDDEN)&&it[HIDDEN][key]&&(it[HIDDEN][key]=!1),D=_create(D,{enumerable:createDesc(0,!1)})):(has(it,HIDDEN)||setDesc(it,HIDDEN,createDesc(1,{})),it[HIDDEN][key]=!0),setSymbolDesc(it,key,D)):setDesc(it,key,D)},$defineProperties=function(it,P){anObject(it);for(var key,keys=enumKeys(P=toIObject(P)),i=0,l=keys.length;l>i;)$defineProperty(it,key=keys[i++],P[key]);return it},$create=function(it,P){return void 0===P?_create(it):$defineProperties(_create(it),P)},$propertyIsEnumerable=function(key){var E=isEnum.call(this,key);return E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key]?E:!0},$getOwnPropertyDescriptor=function(it,key){var D=getDesc(it=toIObject(it),key);return!D||!has(AllSymbols,key)||has(it,HIDDEN)&&it[HIDDEN][key]||(D.enumerable=!0),D},$getOwnPropertyNames=function(it){for(var key,names=getNames(toIObject(it)),result=[],i=0;names.length>i;)has(AllSymbols,key=names[i++])||key==HIDDEN||result.push(key);return result},$getOwnPropertySymbols=function(it){for(var key,names=getNames(toIObject(it)),result=[],i=0;names.length>i;)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result},$stringify=function(it){if(void 0!==it&&!isSymbol(it)){for(var replacer,$replacer,args=[it],i=1,$$=arguments;$$.length>i;)args.push($$[i++]);return replacer=args[1],"function"==typeof replacer&&($replacer=replacer),!$replacer&&isArray(replacer)||(replacer=function(key,value){return $replacer&&(value=$replacer.call(this,key,value)),isSymbol(value)?void 0:value}),args[1]=replacer,_stringify.apply($JSON,args)}},buggyJSON=$fails(function(){var S=$Symbol();return"[null]"!=_stringify([S])||"{}"!=_stringify({a:S})||"{}"!=_stringify(Object(S))});useNative||($Symbol=function(){if(isSymbol(this))throw TypeError("Symbol is not a constructor");return wrap(uid(arguments.length>0?arguments[0]:void 0))},redefine($Symbol.prototype,"toString",function(){return this._k}),isSymbol=function(it){return it instanceof $Symbol},$.create=$create,$.isEnum=$propertyIsEnumerable,$.getDesc=$getOwnPropertyDescriptor,$.setDesc=$defineProperty,$.setDescs=$defineProperties,$.getNames=$names.get=$getOwnPropertyNames,$.getSymbols=$getOwnPropertySymbols,DESCRIPTORS&&!__webpack_require__(37)&&redefine(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,!0));var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},useSetter:function(){setter=!0},useSimple:function(){setter=!1}};$.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(it){var sym=wks(it);symbolStatics[it]=useNative?sym:wrap(sym)}),setter=!0,$export($export.G+$export.W,{Symbol:$Symbol}),$export($export.S,"Symbol",symbolStatics),$export($export.S+$export.F*!useNative,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),$JSON&&$export($export.S+$export.F*(!useNative||buggyJSON),"JSON",{stringify:$stringify}),setToStringTag($Symbol,"Symbol"),setToStringTag(Math,"Math",!0),setToStringTag(global.JSON,"JSON",!0)},function(module,exports,__webpack_require__){(function(Buffer){function Hmac(alg,key){if(!(this instanceof Hmac))return new Hmac(alg,key);this._opad=opad,this._alg=alg;var blocksize="sha512"===alg?128:64;key=this._key=Buffer.isBuffer(key)?key:new Buffer(key),key.length>blocksize?key=createHash(alg).update(key).digest():key.lengthi;i++)ipad[i]=54^key[i],opad[i]=92^key[i];this._hash=createHash(alg).update(ipad)}var createHash=__webpack_require__(66),zeroBuffer=new Buffer(128);zeroBuffer.fill(0),module.exports=Hmac,Hmac.prototype.update=function(data,enc){return this._hash.update(data,enc),this},Hmac.prototype.digest=function(enc){var h=this._hash.digest();return createHash(this._alg).update(this._opad).update(h).digest(enc)}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function toArray(buf,bigEndian){if(buf.length%intSize!==0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}for(var arr=[],fn=bigEndian?buf.readInt32BE:buf.readInt32LE,i=0;i>5]|=128<>>9<<4)+14]=len;for(var a=1732584193,b=-271733879,c=-1732584194,d=271733878,i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|65535&lsw}function bit_rol(num,cnt){return num<>>32-cnt}var helpers=__webpack_require__(176);module.exports=function(buf){return helpers.hash(buf,core_md5,16)}},function(module,exports,__webpack_require__){var pbkdf2Export=__webpack_require__(203);module.exports=function(crypto,exports){exports=exports||{};var exported=pbkdf2Export(crypto);return exports.pbkdf2=exported.pbkdf2,exports.pbkdf2Sync=exported.pbkdf2Sync,exports}},function(module,exports,__webpack_require__){(function(global,Buffer){!function(){var g=("undefined"==typeof window?global:window)||{};_crypto=g.crypto||g.msCrypto||__webpack_require__(230),module.exports=function(size){if(_crypto.getRandomValues){var bytes=new Buffer(size);return _crypto.getRandomValues(bytes),bytes}if(_crypto.randomBytes)return _crypto.randomBytes(size);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(exports,function(){return this}(),__webpack_require__(1).Buffer)},function(module,exports){"use strict";module.exports=function(arr,iter,context){var results=[];return Array.isArray(arr)?(arr.forEach(function(value,index,list){var res=iter.call(context,value,index,list);Array.isArray(res)?results.push.apply(results,res):null!=res&&results.push(res)}),results):results}},function(module,exports,__webpack_require__){(function(process){function globSync(pattern,options){if("function"==typeof options||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(pattern,options).found}function GlobSync(pattern,options){if(!pattern)throw new Error("must provide pattern");if("function"==typeof options||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(pattern,options);if(setopts(this,pattern,options),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;n>i;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}module.exports=globSync,globSync.GlobSync=GlobSync;var fs=__webpack_require__(49),minimatch=__webpack_require__(43),path=(minimatch.Minimatch,__webpack_require__(69).Glob,__webpack_require__(11),__webpack_require__(17)),assert=__webpack_require__(50),isAbsolute=__webpack_require__(45),common=__webpack_require__(68),setopts=(common.alphasort,common.alphasorti,common.setopts),ownProp=common.ownProp,childrenIgnored=common.childrenIgnored;GlobSync.prototype._finish=function(){if(assert(this instanceof GlobSync),this.realpath){var self=this;this.matches.forEach(function(matchset,index){var set=self.matches[index]=Object.create(null);for(var p in matchset)try{p=self._makeAbs(p);var real=fs.realpathSync(p,self.realpathCache);set[real]=!0}catch(er){if("stat"!==er.syscall)throw er;set[self._makeAbs(p)]=!0}})}common.finish(this)},GlobSync.prototype._process=function(pattern,index,inGlobStar){assert(this instanceof GlobSync);for(var n=0;"string"==typeof pattern[n];)n++;var prefix;switch(n){case pattern.length:return void this._processSimple(pattern.join("/"),index);case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/")}var read,remain=pattern.slice(n);null===prefix?read=".":isAbsolute(prefix)||isAbsolute(pattern.join("/"))?(prefix&&isAbsolute(prefix)||(prefix="/"+prefix),read=prefix):read=prefix;var abs=this._makeAbs(read);if(!childrenIgnored(this,read)){var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar):this._processReaddir(prefix,read,abs,remain,index,inGlobStar)}},GlobSync.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar){var entries=this._readdir(abs,inGlobStar);if(entries){for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||"."===rawGlob.charAt(0),matchedEntries=[],i=0;ii;i++){var newPattern,e=matchedEntries[i];newPattern=prefix?[prefix,e]:[e],this._process(newPattern.concat(remain),index,inGlobStar)}}else{this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;len>i;i++){var e=matchedEntries[i];prefix&&(e="/"!==prefix.slice(-1)?prefix+"/"+e:prefix+e),"/"!==e.charAt(0)||this.nomount||(e=path.join(this.root,e)),this.matches[index][e]=!0}}}},GlobSync.prototype._emitMatch=function(index,e){this._makeAbs(e);if(this.mark&&(e=this._mark(e)),!this.matches[index][e]){if(this.nodir){var c=this.cache[this._makeAbs(e)];if("DIR"===c||Array.isArray(c))return}this.matches[index][e]=!0,this.stat&&this._stat(e)}},GlobSync.prototype._readdirInGlobStar=function(abs){if(this.follow)return this._readdir(abs,!1);var entries,lstat;try{lstat=fs.lstatSync(abs)}catch(er){return null}var isSym=lstat.isSymbolicLink();return this.symlinks[abs]=isSym,isSym||lstat.isDirectory()?entries=this._readdir(abs,!1):this.cache[abs]="FILE",entries},GlobSync.prototype._readdir=function(abs,inGlobStar){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||"FILE"===c)return null;if(Array.isArray(c))return c}try{return this._readdirEntries(abs,fs.readdirSync(abs))}catch(er){return this._readdirError(abs,er),null}},GlobSync.prototype._readdirEntries=function(abs,entries){if(!this.mark&&!this.stat)for(var i=0;ii;i++){var e=entries[i];if("."!==e.charAt(0)||this.dot){var instead=gspref.concat(entries[i],remainWithoutGlobStar);this._process(instead,index,!0);var below=gspref.concat(entries[i],remain);this._process(below,index,!0)}}}},GlobSync.prototype._processSimple=function(prefix,index){var exists=this._stat(prefix);if(this.matches[index]||(this.matches[index]=Object.create(null)),exists){if(prefix&&isAbsolute(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);"/"===prefix.charAt(0)?prefix=path.join(this.root,prefix):(prefix=path.resolve(this.root,prefix),trail&&(prefix+="/"))}"win32"===process.platform&&(prefix=prefix.replace(/\\/g,"/")),this.matches[index][prefix]=!0}},GlobSync.prototype._stat=function(f){var abs=this._makeAbs(f),needDir="/"===f.slice(-1);if(f.length>this.maxLength)return!1;if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||"DIR"===c)return c;if(needDir&&"FILE"===c)return!1}var stat=this.statCache[abs];if(!stat){var lstat;try{lstat=fs.lstatSync(abs)}catch(er){return!1}if(lstat.isSymbolicLink())try{stat=fs.statSync(abs)}catch(er){stat=lstat}else stat=lstat}this.statCache[abs]=stat;var c=stat.isDirectory()?"DIR":"FILE";return this.cache[abs]=this.cache[abs]||c,needDir&&"DIR"!==c?!1:c},GlobSync.prototype._mark=function(p){return common.mark(this,p)},GlobSync.prototype._makeAbs=function(f){return common.makeAbs(this,f)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){var http=__webpack_require__(78),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(params,cb){return params||(params={}),params.scheme="https",params.protocol="https:",http.request.call(this,params,cb)}},function(module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},function(module,exports,__webpack_require__){(function(process){function inflight(key,cb){return reqs[key]?(reqs[key].push(cb),null):(reqs[key]=[cb],makeres(key))}function makeres(key){return once(function RES(){for(var cbs=reqs[key],len=cbs.length,args=slice(arguments),i=0;len>i;i++)cbs[i].apply(null,args);cbs.length>len?(cbs.splice(0,len),process.nextTick(function(){RES.apply(null,args)})):delete reqs[key]})}function slice(args){for(var length=args.length,array=[],i=0;length>i;i++)array[i]=args[i];return array}var wrappy=__webpack_require__(83),reqs=Object.create(null),once=__webpack_require__(74);module.exports=wrappy(inflight)}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function _normalizeFamily(family){return family?family.toLowerCase():"ipv4"}var ip=exports,Buffer=__webpack_require__(1).Buffer,os=__webpack_require__(75);ip.toBuffer=function(ip,buff,offset){offset=~~offset;var result;if(this.isV4Format(ip))result=buff||new Buffer(offset+4),ip.split(/\./g).map(function(byte){result[offset++]=255&parseInt(byte,10)});else if(this.isV6Format(ip)){var i,sections=ip.split(":",8);for(i=0;i0;i--)argv.push("0");sections.splice.apply(sections,argv)}for(result=buff||new Buffer(offset+16),i=0;i>8&255,result[offset++]=255&word}}if(!result)throw Error("Invalid ip address: "+ip);return result},ip.toString=function(buff,offset,length){offset=~~offset,length=length||buff.length-offset;var result=[];if(4===length){for(var i=0;length>i;i++)result.push(buff[offset+i]);result=result.join(".")}else if(16===length){for(var i=0;length>i;i+=2)result.push(buff.readUInt16BE(offset+i).toString(16));result=result.join(":"),result=result.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3"),result=result.replace(/:{3,4}/,"::")}return result};var ipv4Regex=/^(\d{1,3}\.){3,3}\d{1,3}$/,ipv6Regex=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;ip.isV4Format=function(ip){return ipv4Regex.test(ip)},ip.isV6Format=function(ip){return ipv6Regex.test(ip)},ip.fromPrefixLen=function(prefixlen,family){family=prefixlen>32?"ipv6":_normalizeFamily(family);var len=4;"ipv6"===family&&(len=16);for(var buff=new Buffer(len),i=0,n=buff.length;n>i;++i){var bits=8;8>prefixlen&&(bits=prefixlen),prefixlen-=bits,buff[i]=~(255>>bits)}return ip.toString(buff)},ip.mask=function mask(addr,mask){addr=ip.toBuffer(addr),mask=ip.toBuffer(mask); -var result=new Buffer(Math.max(addr.length,mask.length));if(addr.length===mask.length)for(var i=0;i=numberOfAddresses?ip.fromLong(networkAddress):ip.fromLong(networkAddress+1),lastAddress:2>=numberOfAddresses?ip.fromLong(networkAddress+numberOfAddresses-1):ip.fromLong(networkAddress+numberOfAddresses-2),broadcastAddress:ip.fromLong(networkAddress+numberOfAddresses-1),subnetMask:mask,subnetMaskLength:maskLength,numHosts:2>=numberOfAddresses?numberOfAddresses:numberOfAddresses-2,length:numberOfAddresses,contains:function(other){return networkAddress===ip.toLong(ip.mask(other,mask))}}},ip.cidrSubnet=function(cidrString){var cidrParts=cidrString.split("/"),addr=cidrParts[0];if(2!==cidrParts.length)throw new Error("invalid CIDR subnet: "+addr);var mask=ip.fromPrefixLen(parseInt(cidrParts[1],10));return ip.subnet(addr,mask)},ip.not=function(addr){for(var buff=ip.toBuffer(addr),i=0;ia.length&&(buff=b,other=a);for(var offset=buff.length-other.length,i=offset;ii;i++)if(0!==b[i])return!1;var word=b.readUInt16BE(10);if(0!==word&&65535!==word)return!1;for(var i=0;4>i;i++)if(a[i]!==b[i+12])return!1;return!0},ip.isPrivate=function(addr){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^fc00:/i.test(addr)||/^fe80:/i.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.isPublic=function(addr){return!ip.isPrivate(addr)},ip.isLoopback=function(addr){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr)||/^fe80::1$/.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.loopback=function(family){if(family=_normalizeFamily(family),"ipv4"!==family&&"ipv6"!==family)throw new Error("family must be ipv4 or ipv6");return"ipv4"===family?"127.0.0.1":"fe80::1"},ip.address=function(name,family){var all,interfaces=os.networkInterfaces();if(family=_normalizeFamily(family),name&&"private"!==name&&"public"!==name){var res=interfaces[name].filter(function(details){var itemFamily=details.family.toLowerCase();return itemFamily===family});if(0===res.length)return;return res[0].address}var all=Object.keys(interfaces).map(function(nic){var addresses=interfaces[nic].filter(function(details){return details.family=details.family.toLowerCase(),details.family!==family||ip.isLoopback(details.address)?!1:name?"public"===name?!ip.isPrivate(details.address):ip.isPrivate(details.address):!0});return addresses.length?addresses[0].address:void 0}).filter(Boolean);return all.length?all[0]:ip.loopback(family)},ip.toLong=function(ip){var ipl=0;return ip.split(".").forEach(function(octet){ipl<<=8,ipl+=parseInt(octet)}),ipl>>>0},ip.fromLong=function(ipl){return(ipl>>>24)+"."+(ipl>>16&255)+"."+(ipl>>8&255)+"."+(255&ipl)}},function(module,exports){"use strict";var isStream=module.exports=function(stream){return null!==stream&&"object"==typeof stream&&"function"==typeof stream.pipe};isStream.writable=function(stream){return isStream(stream)&&stream.writable!==!1&&"function"==typeof stream._write&&"object"==typeof stream._writableState},isStream.readable=function(stream){return isStream(stream)&&stream.readable!==!1&&"function"==typeof stream._read&&"object"==typeof stream._readableState},isStream.duplex=function(stream){return isStream.writable(stream)&&isStream.readable(stream)}},function(module,exports){module.exports={name:"ipfs-api",version:"2.13.1",description:"A client library for the IPFS API",main:"src/index.js",dependencies:{"detect-node":"^2.0.3",flatmap:"0.0.3",glob:"^6.0.2",multiaddr:"^1.0.0","multipart-stream":"github:dignifiedquire/multipart-stream#a1a4e9c4d41d1f78dcf32279affbbb0bfd930c28",ndjson:"^1.4.3",qs:"^6.0.0",wreck:"^7.0.0"},engines:{node:">=4.2.2"},repository:{type:"git",url:"https://github.com/ipfs/js-ipfs-api"},devDependencies:{"babel-core":"^6.1.21","babel-eslint":"^5.0.0-beta9","babel-loader":"^6.2.0","babel-plugin-transform-runtime":"^6.1.18","babel-preset-es2015":"^6.0.15","babel-runtime":"^6.3.19",chai:"^3.4.1",concurrently:"^1.0.0",eslint:"^2.0.0-rc.0","eslint-config-standard":"^5.1.0","eslint-plugin-promise":"^1.0.8","eslint-plugin-standard":"^1.3.1","glob-stream":"5.3.1",gulp:"^3.9.0","gulp-bump":"^1.0.0","gulp-eslint":"^2.0.0-rc-3","gulp-filter":"^3.0.1","gulp-git":"^1.6.0","gulp-load-plugins":"^1.0.0","gulp-mocha":"^2.1.3","gulp-size":"^2.0.0","gulp-tag-version":"^1.3.0","gulp-util":"^3.0.7","https-browserify":"0.0.1","ipfsd-ctl":"^0.8.1","json-loader":"^0.5.3",karma:"^0.13.11","karma-chrome-launcher":"^0.2.1","karma-firefox-launcher":"^0.1.7","karma-mocha":"^0.2.0","karma-mocha-reporter":"^1.1.1","karma-sauce-launcher":"^0.3.0","karma-webpack":"^1.7.0",mocha:"^2.3.3","pre-commit":"^1.0.6","raw-loader":"^0.5.1",rimraf:"^2.4.5","run-sequence":"^1.1.4",semver:"^5.1.0","stream-equal":"^0.1.7","stream-http":"^2.1.0","uglify-js":"^2.4.24","webpack-stream":"^3.1.0"},scripts:{test:"gulp test","test:node":"gulp test:node","test:browser":"gulp test:browser",lint:"gulp lint",build:"gulp build"},"pre-commit":["lint","test"],keywords:["ipfs"],author:"Matt Bell ",contributors:["Travis Person ","Jeromy Jonson ","David Dias ","Juan Benet ","Friedel Ziegelmayer "],license:"MIT",bugs:{url:"https://github.com/ipfs/js-ipfs-api/issues"},homepage:"https://github.com/ipfs/js-ipfs-api"}},function(module,exports){function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];++indexarrLength))return!1;for(;++index-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",objectProto=global.Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable,getLength=baseProperty("length");module.exports=isArguments}).call(exports,function(){return this}())},function(module,exports){(function(global){function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isObjectLike(value){return!!value&&"object"==typeof value}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=global.Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function pairs(object){object=toObject(object);for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index=parts.length)throw ParseError("invalid address: "+str);tuples.push([part,parts[p]])}return tuples}function stringTuplesToString(tuples){var parts=[];return map(tuples,function(tup){var proto=protoFromTuple(tup);parts.push(proto.name),tup.length>1&&parts.push(tup[1])}),"/"+parts.join("/")}function stringTuplesToTuples(tuples){return map(tuples,function(tup){var proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toBuffer(proto.code,tup[1])]:[proto.code]})}function tuplesToStringTuples(tuples){return map(tuples,function(tup){var proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toString(proto.code,tup[1])]:[proto.code]})}function tuplesToBuffer(tuples){return fromBuffer(Buffer.concat(map(tuples,function(tup){var proto=protoFromTuple(tup),buf=new Buffer([proto.code]);return tup.length>1&&(buf=Buffer.concat([buf,tup[1]])),buf})))}function bufferToTuples(buf){for(var tuples=[],i=0;ibuf.length)throw ParseError("Invalid address buffer: "+buf.toString("hex"));tuples.push([code,addr])}return tuples}function bufferToString(buf){var a=bufferToTuples(buf),b=tuplesToStringTuples(a);return stringTuplesToString(b)}function stringToBuffer(str){str=cleanPath(str);var a=stringToStringTuples(str),b=stringTuplesToTuples(a);return tuplesToBuffer(b)}function fromString(str){return stringToBuffer(str)}function fromBuffer(buf){var err=validateBuffer(buf);if(err)throw err;return new Buffer(buf)}function validateBuffer(buf){bufferToTuples(buf)}function isValidBuffer(buf){try{return validateBuffer(buf),!0}catch(e){return!1}}function cleanPath(str){return"/"+filter(str.trim().split("/")).join("/")}function ParseError(str){return new Error("Error parsing address: "+str)}function protoFromTuple(tup){var proto=protocols(tup[0]);if(tup.length>1&&0===proto.size)throw ParseError("tuple has address but protocol size is 0");return proto}var map=__webpack_require__(42),filter=__webpack_require__(195),convert=__webpack_require__(200),protocols=__webpack_require__(44);module.exports={stringToStringTuples:stringToStringTuples,stringTuplesToString:stringTuplesToString,tuplesToStringTuples:tuplesToStringTuples,stringTuplesToTuples:stringTuplesToTuples,bufferToTuples:bufferToTuples,tuplesToBuffer:tuplesToBuffer,bufferToString:bufferToString,stringToBuffer:stringToBuffer,fromString:fromString,fromBuffer:fromBuffer,validateBuffer:validateBuffer,isValidBuffer:isValidBuffer,cleanPath:cleanPath,ParseError:ParseError,protoFromTuple:protoFromTuple}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Convert(proto,a){return a instanceof Buffer?Convert.toString(proto,a):Convert.toBuffer(proto,a)}function port2buf(port){var buf=new Buffer(2);return buf.writeUInt16BE(port,0),buf}function buf2port(buf){return buf.readUInt16BE(0)}var ip=__webpack_require__(186),protocols=__webpack_require__(44);module.exports=Convert,Convert.toString=function(proto,buf){switch(proto=protocols(proto),proto.code){case 4:case 41:return ip.toString(buf);case 6:case 17:case 33:case 132:return buf2port(buf)}return buf.toString("hex")},Convert.toBuffer=function(proto,str){switch(proto=protocols(proto),proto.code){case 4:case 41:return ip.toBuffer(str);case 6:case 17:case 33:case 132:return port2buf(parseInt(str,10))}return new Buffer(str,"hex")}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Multiaddr(addr){if(!(this instanceof Multiaddr))return new Multiaddr(addr);if(addr||(addr=""),addr instanceof Buffer)this.buffer=codec.fromBuffer(addr);else if("string"==typeof addr||addr instanceof String)this.buffer=codec.fromString(addr);else{if(!(addr.buffer&&addr.protos&&addr.protoCodes))throw new Error("addr must be a string, Buffer, or Multiaddr");this.buffer=codec.fromBuffer(addr.buffer)}}var map=__webpack_require__(42),extend=__webpack_require__(48),codec=__webpack_require__(199),bufeq=__webpack_require__(126),protocols=__webpack_require__(44),NotImplemented=new Error("Sorry, Not Implemented Yet.");exports=module.exports=Multiaddr,exports.Buffer=Buffer,Multiaddr.prototype.toString=function(){return codec.bufferToString(this.buffer)},Multiaddr.prototype.toOptions=function(){var opts={},parsed=this.toString().split("/");return opts.family="ip4"===parsed[1]?"ipv4":"ipv6",opts.host=parsed[2],opts.port=parsed[4],opts},Multiaddr.prototype.inspect=function(){return""},Multiaddr.prototype.protos=function(){return map(this.protoCodes(),function(code){return extend(protocols(code))})},Multiaddr.prototype.protos=function(){return map(this.protoCodes(),function(code){return extend(protocols(code))})},Multiaddr.prototype.protoCodes=function(){for(var codes=[],i=0;ii)throw new Error("Address "+this+" does not contain subaddress: "+addr);return Multiaddr(s.slice(0,i))},Multiaddr.prototype.equals=function(addr){return bufeq(this.buffer,addr.buffer)},Multiaddr.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');var codes=this.protoCodes(),parts=this.toString().split("/").slice(1);return{family:41===codes[0]?"IPv6":"IPv4",address:parts[1],port:parts[3]}},Multiaddr.fromNodeAddress=function(addr,transport){if(!addr)throw new Error("requires node address object");if(!transport)throw new Error("requires transport protocol");var ip="IPv6"===addr.family?"ip6":"ip4";return Multiaddr("/"+[ip,addr.address,transport,addr.port].join("/"))},Multiaddr.prototype.isThinWaistAddress=function(addr){var protos=(addr||this).protos();return 2!==protos.length?!1:4!==protos[0].code&&41!==protos[0].code?!1:6===protos[1].code||17===protos[1].code},Multiaddr.prototype.fromStupidString=function(str){throw NotImplemented},Multiaddr.protocols=protocols}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){function Multipart(boundary){return!this instanceof Multipart?new Multipart(boundary):(this.boundary=boundary||Math.random().toString(36).slice(2),Sandwich.call(this,{head:"--"+this.boundary+CRNL,tail:CRNL+"--"+this.boundary+"--",separator:CRNL+"--"+this.boundary+CRNL}),this._add=this.add,void(this.add=this.addPart))}var Sandwich=__webpack_require__(208).SandwichStream,stream=__webpack_require__(6),inherits=__webpack_require__(4),isStream=__webpack_require__(187),CRNL="\r\n";module.exports=Multipart,inherits(Multipart,Sandwich),Multipart.prototype.addPart=function(part){part=part||{};var partStream=new stream.PassThrough;if(part.headers)for(var key in part.headers){var header=part.headers[key];partStream.write(key+": "+header+CRNL)}partStream.write(CRNL),isStream(part.body)?part.body.pipe(partStream):partStream.end(part.body),this._add(partStream)}},function(module,exports,__webpack_require__){(function(Buffer){module.exports=function(crypto){function pbkdf2(password,salt,iterations,keylen,digest,callback){if("function"==typeof digest&&(callback=digest,digest=void 0),"function"!=typeof callback)throw new Error("No callback provided to pbkdf2");setTimeout(function(){var result;try{result=pbkdf2Sync(password,salt,iterations,keylen,digest)}catch(e){return callback(e)}callback(void 0,result)})}function pbkdf2Sync(password,salt,iterations,keylen,digest){if("number"!=typeof iterations)throw new TypeError("Iterations not a number");if(0>iterations)throw new TypeError("Bad iterations");if("number"!=typeof keylen)throw new TypeError("Key length not a number");if(0>keylen)throw new TypeError("Bad key length");digest=digest||"sha1",Buffer.isBuffer(password)||(password=new Buffer(password)),Buffer.isBuffer(salt)||(salt=new Buffer(salt));var hLen,r,T,l=1,DK=new Buffer(keylen),block1=new Buffer(salt.length+4);salt.copy(block1,0,0,salt.length);for(var i=1;l>=i;i++){block1.writeUInt32BE(i,salt.length);var U=crypto.createHmac(digest,password).update(block1).digest();if(!hLen&&(hLen=U.length,T=new Buffer(hLen),l=Math.ceil(keylen/hLen),r=keylen-(l-1)*hLen,keylen>(Math.pow(2,32)-1)*hLen))throw new TypeError("keylen exceeds maximum length");U.copy(T,0,0,hLen);for(var j=1;iterations>j;j++){U=crypto.createHmac(digest,password).update(U).digest();for(var k=0;hLen>k;k++)T[k]^=U[k]}var destPos=(i-1)*hLen,len=i==l?r:hLen;T.copy(DK,destPos,0,len)}return DK}return{pbkdf2:pbkdf2,pbkdf2Sync:pbkdf2Sync}}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&",eq=eq||"=";var obj={};if("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;len>i;++i){var kstr,vstr,k,v,x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq);idx>=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?Array.isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj}},function(module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){return sep=sep||"&",eq=eq||"=",null===obj&&(obj=void 0),"object"==typeof obj?Object.keys(obj).map(function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;return Array.isArray(obj[k])?obj[k].map(function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj)):""}},function(module,exports,__webpack_require__){"use strict";exports.decode=exports.parse=__webpack_require__(204),exports.encode=exports.stringify=__webpack_require__(205)},function(module,exports,__webpack_require__){(function(Buffer){function f1(x,y,z){return x^y^z}function f2(x,y,z){return x&y|~x&z}function f3(x,y,z){return(x|~y)^z}function f4(x,y,z){return x&z|y&~z}function f5(x,y,z){return x^(y|~z)}function rotl(x,n){return x<>>32-n}function ripemd160(message){var H=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof message&&(message=new Buffer(message,"utf8"));var m=bytesToWords(message),nBitsLeft=8*message.length,nBitsTotal=8*message.length;m[nBitsLeft>>>5]|=128<<24-nBitsLeft%32,m[(nBitsLeft+64>>>9<<4)+14]=16711935&(nBitsTotal<<8|nBitsTotal>>>24)|4278255360&(nBitsTotal<<24|nBitsTotal>>>8);for(var i=0;ii;i++){var H_i=H[i];H[i]=16711935&(H_i<<8|H_i>>>24)|4278255360&(H_i<<24|H_i>>>8)}var digestbytes=wordsToBytes(H);return new Buffer(digestbytes)}module.exports=ripemd160;/** @preserve +0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n0?fromList(n,state):null,util.isNull(ret)&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),util.isNull(ret)||this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EE.listenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);return dest.on("drain",ondrain),src.on("data",ondata),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;len>i;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return-1===i?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev&&!1!==this._readableState.flowing&&this.resume(),"readable"===ev&&this.readable){var state=this._readableState;if(!state.readableListening)if(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading)state.length&&emitReadable(this,state);else{var self=this;process.nextTick(function(){debug("readable nexttick read 0"),self.read(0)})}}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,state.reading||(debug("resume read 0"),this.read(0)),resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),chunk&&(state.objectMode||chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)util.isFunction(stream[i])&&util.isUndefined(this[i])&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(global){var ClientRequest=__webpack_require__(220),extend=__webpack_require__(48),statusCodes=__webpack_require__(128),url=__webpack_require__(82),http=exports;http.request=function(opts,cb){opts="string"==typeof opts?url.parse(opts):extend(opts);var defaultProtocol=-1===global.location.protocol.search(/^https?:$/)?"http:":"",protocol=opts.protocol||defaultProtocol,host=opts.hostname||opts.host,port=opts.port,path=opts.path||"/";host&&-1!==host.indexOf(":")&&(host="["+host+"]"),opts.url=(host?protocol+"//"+host:"")+(port?":"+port:"")+path,opts.method=(opts.method||"GET").toUpperCase(),opts.headers=opts.headers||{};var req=new ClientRequest(opts);return cb&&req.on("response",cb),req},http.get=function(opts,cb){var req=http.request(opts,cb);return req.end(),req},http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(exports,function(){return this}())},function(module,exports){(function(global){function checkTypeSupport(type){try{return xhr.responseType=type,xhr.responseType===type}catch(e){}return!1}function isFunction(value){return"function"==typeof value}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableByteStream),exports.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),exports.blobConstructor=!0}catch(e){}var xhr=new global.XMLHttpRequest;xhr.open("GET",global.location.host?"/":"https://example.com");var haveArrayBuffer="undefined"!=typeof global.ArrayBuffer,haveSlice=haveArrayBuffer&&isFunction(global.ArrayBuffer.prototype.slice);exports.arraybuffer=haveArrayBuffer&&checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&haveSlice&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&haveArrayBuffer&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=isFunction(xhr.overrideMimeType),exports.vbArray=isFunction(global.VBArray),xhr=null}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=__webpack_require__(10);util.inherits=__webpack_require__(4);var Readable=__webpack_require__(222),Writable=__webpack_require__(224);util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(process){function DestroyableTransform(opts){Transform.call(this,opts),this._destroyed=!1}function noop(chunk,enc,callback){callback(null,chunk)}function through2(construct){return function(options,transform,flush){return"function"==typeof options&&(flush=transform,transform=options,options={}),"function"!=typeof transform&&(transform=noop),"function"!=typeof flush&&(flush=null),construct(options,transform,flush)}}var Transform=__webpack_require__(225),inherits=__webpack_require__(11).inherits,xtend=__webpack_require__(48);inherits(DestroyableTransform,Transform),DestroyableTransform.prototype.destroy=function(err){if(!this._destroyed){this._destroyed=!0;var self=this;process.nextTick(function(){err&&self.emit("error",err),self.emit("close")})}},module.exports=through2(function(options,transform,flush){var t2=new DestroyableTransform(options);return t2._transform=transform,flush&&(t2._flush=flush),t2}),module.exports.ctor=through2(function(options,transform,flush){function Through2(override){return this instanceof Through2?(this.options=xtend(options,override),void DestroyableTransform.call(this,this.options)):new Through2(override)}return inherits(Through2,DestroyableTransform),Through2.prototype._transform=transform,flush&&(Through2.prototype._flush=flush),Through2}),module.exports.obj=through2(function(options,transform,flush){var t2=new DestroyableTransform(xtend({objectMode:!0,highWaterMark:16},options));return t2._transform=transform,flush&&(t2._flush=flush),t2})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&isObject(url)&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}function urlFormat(obj){return isString(obj)&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)}function urlResolve(source,relative){return urlParse(source,!1,!0).resolve(relative)}function urlResolveObject(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative}function isString(arg){return"string"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}var punycode=__webpack_require__(227);exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=__webpack_require__(206);Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var rest=url;rest=rest.trim();var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto,rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes="//"===rest.substr(0,2);!slashes||proto&&hostlessProtocol[proto]||(rest=rest.substr(2),this.slashes=!0)}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){for(var hostEnd=-1,i=0;ihec)&&(hostEnd=hec)}var auth,atSign;atSign=-1===hostEnd?rest.lastIndexOf("@"):rest.lastIndexOf("@",hostEnd),-1!==atSign&&(auth=rest.slice(0,atSign),rest=rest.slice(atSign+1),this.auth=decodeURIComponent(auth)),hostEnd=-1;for(var i=0;ihec)&&(hostEnd=hec)}-1===hostEnd&&(hostEnd=rest.length),this.host=rest.slice(0,hostEnd),rest=rest.slice(hostEnd),this.parseHost(),this.hostname=this.hostname||"";var ipv6Hostname="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!ipv6Hostname)for(var hostparts=this.hostname.split(/\./),i=0,l=hostparts.length;l>i;i++){var part=hostparts[i];if(part&&!part.match(hostnamePartPattern)){for(var newpart="",j=0,k=part.length;k>j;j++)newpart+=part.charCodeAt(j)>127?"x":part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!ipv6Hostname){for(var domainArray=this.hostname.split("."),newOut=[],i=0;ii;i++){var ae=autoEscape[i],esc=encodeURIComponent(ae);esc===ae&&(esc=escape(ae)),rest=rest.split(ae).join(esc)}var hash=rest.indexOf("#");-1!==hash&&(this.hash=rest.substr(hash),rest=rest.slice(0,hash));var qm=rest.indexOf("?");if(-1!==qm?(this.search=rest.substr(qm),this.query=rest.substr(qm+1),parseQueryString&&(this.query=querystring.parse(this.query)),rest=rest.slice(0,qm)):parseQueryString&&(this.search="",this.query={}),rest&&(this.pathname=rest),slashedProtocol[lowerProto]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var p=this.pathname||"",s=this.search||"";this.path=p+s}return this.href=this.format(),this},Url.prototype.format=function(){var auth=this.auth||"";auth&&(auth=encodeURIComponent(auth),auth=auth.replace(/%3A/i,":"),auth+="@");var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=!1,query="";this.host?host=auth+this.host:this.hostname&&(host=auth+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(host+=":"+this.port)),this.query&&isObject(this.query)&&Object.keys(this.query).length&&(query=querystring.stringify(this.query));var search=this.search||query&&"?"+query||"";return protocol&&":"!==protocol.substr(-1)&&(protocol+=":"),this.slashes||(!protocol||slashedProtocol[protocol])&&host!==!1?(host="//"+(host||""),pathname&&"/"!==pathname.charAt(0)&&(pathname="/"+pathname)):host||(host=""),hash&&"#"!==hash.charAt(0)&&(hash="#"+hash),search&&"?"!==search.charAt(0)&&(search="?"+search),pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)}),search=search.replace("#","%23"),protocol+host+pathname+search+hash},Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,!1,!0)).format()},Url.prototype.resolveObject=function(relative){if(isString(relative)){var rel=new Url;rel.parse(relative,!1,!0),relative=rel}var result=new Url;if(Object.keys(this).forEach(function(k){result[k]=this[k]},this),result.hash=relative.hash,""===relative.href)return result.href=result.format(),result;if(relative.slashes&&!relative.protocol)return Object.keys(relative).forEach(function(k){"protocol"!==k&&(result[k]=relative[k])}),slashedProtocol[result.protocol]&&result.hostname&&!result.pathname&&(result.path=result.pathname="/"),result.href=result.format(),result;if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol])return Object.keys(relative).forEach(function(k){result[k]=relative[k]}),result.href=result.format(),result;if(result.protocol=relative.protocol,relative.host||hostlessProtocol[relative.protocol])result.pathname=relative.pathname;else{for(var relPath=(relative.pathname||"").split("/");relPath.length&&!(relative.host=relPath.shift()););relative.host||(relative.host=""),relative.hostname||(relative.hostname=""),""!==relPath[0]&&relPath.unshift(""),relPath.length<2&&relPath.unshift(""),result.pathname=relPath.join("/")}if(result.search=relative.search,result.query=relative.query,result.host=relative.host||"",result.auth=relative.auth,result.hostname=relative.hostname||relative.host,result.port=relative.port,result.pathname||result.search){var p=result.pathname||"",s=result.search||"";result.path=p+s}return result.slashes=result.slashes||relative.slashes,result.href=result.format(),result}var isSourceAbs=result.pathname&&"/"===result.pathname.charAt(0),isRelAbs=relative.host||relative.pathname&&"/"===relative.pathname.charAt(0),mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic&&(result.hostname="",result.port=null,result.host&&(""===srcPath[0]?srcPath[0]=result.host:srcPath.unshift(result.host)),result.host="",relative.protocol&&(relative.hostname=null,relative.port=null,relative.host&&(""===relPath[0]?relPath[0]=relative.host:relPath.unshift(relative.host)),relative.host=null),mustEndAbs=mustEndAbs&&(""===relPath[0]||""===srcPath[0])),isRelAbs)result.host=relative.host||""===relative.host?relative.host:result.host,result.hostname=relative.hostname||""===relative.hostname?relative.hostname:result.hostname,result.search=relative.search,result.query=relative.query,srcPath=relPath;else if(relPath.length)srcPath||(srcPath=[]),srcPath.pop(),srcPath=srcPath.concat(relPath),result.search=relative.search,result.query=relative.query;else if(!isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return result.search=relative.search,result.query=relative.query,isNull(result.pathname)&&isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)last=srcPath[i],"."==last?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=result.host&&result.host.indexOf("@")>0?result.host.split("@"):!1;authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),isNull(result.pathname)&&isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],":"!==port&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},function(module,exports){function wrappy(fn,cb){function wrapper(){for(var args=new Array(arguments.length),i=0;i=256)return"\\u"+internals.padLeft(""+charCode,4);var hexValue=new Buffer(String.fromCharCode(charCode),"ascii").toString("hex");return"\\x"+internals.padLeft(hexValue,2)},internals.escapeHtmlChar=function(charCode){var namedEscape=internals.namedHtml[charCode];if("undefined"!=typeof namedEscape)return namedEscape;if(charCode>=256)return"&#"+charCode+";";var hexValue=new Buffer(String.fromCharCode(charCode),"ascii").toString("hex");return"&#x"+internals.padLeft(hexValue,2)+";"},internals.padLeft=function(str,len){for(;str.lengthi;++i)(i>=97||i>=65&&90>=i||i>=48&&57>=i||32===i||46===i||44===i||45===i||58===i||95===i)&&(safe[i]=null);return safe}()}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";var Stringify=__webpack_require__(87),Parse=__webpack_require__(86);module.exports={stringify:Stringify,parse:Parse}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys),_create=__webpack_require__(32),_create2=_interopRequireDefault(_create),Utils=__webpack_require__(52),internals={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1,allowDots:!1};internals.parseValues=function(str,options){for(var obj={},parts=str.split(options.delimiter,options.parameterLimit===1/0?void 0:options.parameterLimit),i=0;i=0&&options.parseArrays&&index<=options.arrayLimit?(obj=[],obj[index]=internals.parseObject(chain,val,options)):obj[cleanRoot]=internals.parseObject(chain,val,options)}return obj},internals.parseKeys=function(givenKey,val,options){if(givenKey){var key=options.allowDots?givenKey.replace(/\.([^\.\[]+)/g,"[$1]"):givenKey,parent=/^([^\[\]]*)/,child=/(\[[^\[\]]*\])/g,segment=parent.exec(key),keys=[];if(segment[1]){if(!options.plainObjects&&Object.prototype.hasOwnProperty(segment[1])&&!options.allowPrototypes)return;keys.push(segment[1])}for(var i=0;null!==(segment=child.exec(key))&&ithis.settings.maxBytes?this.emit("error",Boom.badRequest("Payload content length greater than maximum allowed: "+this.settings.maxBytes)):(this.length=this.length+chunk.length,this.buffers.push(chunk),void next())},internals.Recorder.prototype.collect=function(){var buffer=0===this.buffers.length?new Buffer(0):1===this.buffers.length?this.buffers[0]:Buffer.concat(this.buffers,this.length);return buffer}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){"use strict";var Hoek=__webpack_require__(18),Stream=__webpack_require__(6),Payload=__webpack_require__(54),internals={};module.exports=internals.Tap=function(){Stream.Transform.call(this),this.buffers=[]},Hoek.inherits(internals.Tap,Stream.Transform),internals.Tap.prototype._transform=function(chunk,encoding,next){this.buffers.push(chunk),next(null,chunk)},internals.Tap.prototype.collect=function(){return new Payload(this.buffers)}},function(module,exports,__webpack_require__){"use strict";var Wreck=__webpack_require__(53);module.exports=function(send){return function(files,opts,cb){return"function"==typeof opts&&void 0===cb&&(cb=opts,opts={}),"string"==typeof files&&files.startsWith("http")?Wreck.request("GET",files,null,function(err,res){return err?cb(err):void send("add",null,opts,res,cb)}):send("add",null,opts,files,cb)}}},function(module,exports,__webpack_require__){ +"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{get:argCommand(send,"block/get"),stat:argCommand(send,"block/stat"),put:function(file,cb){return Array.isArray(file)?cb(null,new Error("block.put() only accepts 1 file")):send("block/put",null,null,file,cb)}}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return argCommand(send,"cat")}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return command(send,"commands")}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{get:argCommand(send,"config"),set:function(key,value,opts,cb){return"function"==typeof opts&&(cb=opts,opts={}),send("config",[key,value],opts,null,cb)},show:function(cb){return send("config/show",null,null,null,!0,cb)},replace:function(file,cb){return send("config/replace",null,null,file,cb)}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),_promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise),argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{findprovs:argCommand(send,"dht/findprovs"),get:function(key,opts,cb){"function"!=typeof opts||cb||(cb=opts,opts=null);var handleResult=function(done,err,res){if(err)return done(err);if(!res)return done(new Error("empty response"));if(0===res.length)return done(new Error("no value returned for key"));if(Array.isArray(res)&&(res=res[0]),5===res.Type)done(null,res.Extra);else{var error=new Error("key was not found (type 6)");done(error)}};if("function"!=typeof cb&&"undefined"!=typeof _promise2["default"]){var _ret=function(){var done=function(err,res){if(err)throw err;return res};return{v:send("dht/get",key,opts).then(function(res){return handleResult(done,null,res)},function(err){return handleResult(done,err)})}}();if("object"===("undefined"==typeof _ret?"undefined":(0,_typeof3["default"])(_ret)))return _ret.v}return send("dht/get",key,opts,null,handleResult.bind(null,cb))},put:function(key,value,opts,cb){return"function"!=typeof opts||cb||(cb=opts,opts=null),send("dht/put",[key,value],opts,null,cb)}}}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return{net:command(send,"diag/net"),sys:command(send,"diag/sys")}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{cp:argCommand(send,"files/cp"),ls:argCommand(send,"files/ls"),mkdir:argCommand(send,"files/mkdir"),stat:argCommand(send,"files/stat"),rm:function(path,opts,cb){return"function"!=typeof opts||cb||(cb=opts,opts={}),send("files/rm",path,opts,null,cb)},read:argCommand(send,"files/read"),write:function(pathDst,files,opts,cb){return"function"==typeof opts&&void 0===cb&&(cb=opts,opts={}),send("files/write",pathDst,opts,files,cb)},mv:argCommand(send,"files/mv")}}},function(module,exports){"use strict";module.exports=function(send){return function(idParam,cb){return"function"==typeof idParam&&(cb=idParam,idParam=null),send("id",idParam,null,null,cb)}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise),ndjson=__webpack_require__(73);module.exports=function(send){return{tail:function(cb){return"function"!=typeof cb&&"undefined"!=typeof _promise2["default"]?send("log/tail",null,{},null,!1).then(function(res){return res.pipe(ndjson.parse())}):send("log/tail",null,{},null,!1,function(err,res){return err?cb(err):void cb(null,res.pipe(ndjson.parse()))})}}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return argCommand(send,"ls")}},function(module,exports){"use strict";module.exports=function(send){return function(ipfs,ipns,cb){"function"==typeof ipfs?(cb=ipfs,ipfs=null):"function"==typeof ipns&&(cb=ipns,ipns=null);var opts={};return ipfs&&(opts.f=ipfs),ipns&&(opts.n=ipns),send("mount",null,opts,null,cb)}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{publish:argCommand(send,"name/publish"),resolve:argCommand(send,"name/resolve")}}},function(module,exports,__webpack_require__){"use strict";var argCommand=__webpack_require__(5).argCommand;module.exports=function(send){return{get:argCommand(send,"object/get"),put:function(file,encoding,cb){return"function"==typeof encoding?cb(null,new Error("Must specify an object encoding ('json' or 'protobuf')")):send("object/put",encoding,null,file,cb)},data:argCommand(send,"object/data"),links:argCommand(send,"object/links"),stat:argCommand(send,"object/stat"),"new":argCommand(send,"object/new"),patch:{rmLink:function(root,link,cb){return send("object/patch/rm-link",[root,link],null,null,cb)},setData:function(root,data,cb){return send("object/patch/set-data",[root],null,data,cb)},appendData:function(root,data,cb){return send("object/patch/append-data",[root],null,data,cb)},addLink:function(root,name,ref,cb){return send("object/patch/add-link",[root,name,ref],null,null,cb)}}}}},function(module,exports){"use strict";module.exports=function(send){return{add:function(hash,opts,cb){return"function"==typeof opts&&(cb=opts,opts=null),send("pin/add",hash,opts,null,cb)},remove:function(hash,opts,cb){return"function"==typeof opts&&(cb=opts,opts=null),send("pin/rm",hash,opts,null,cb)},list:function(type,cb){"function"==typeof type&&(cb=type,type=null);var opts=null,hash=null;return"string"==typeof type?opts={type:type}:type&&type.hash&&(hash=type.hash,type.hash=null,opts=type),send("pin/ls",hash,opts,null,cb)}}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise);module.exports=function(send){return function(id,cb){return"function"!=typeof cb&&"undefined"!=typeof _promise2["default"]?send("ping",id,{n:1},null).then(function(res){return res[1]}):send("ping",id,{n:1},null,function(err,res){return err?cb(err,null):void cb(null,res[1])})}}},function(module,exports,__webpack_require__){"use strict";var cmds=__webpack_require__(5);module.exports=function(send){var refs=cmds.argCommand(send,"refs");return refs.local=cmds.command(send,"refs/local"),refs}},function(module,exports,__webpack_require__){"use strict";var cmds=__webpack_require__(5);module.exports=function(send){return{peers:cmds.command(send,"swarm/peers"),connect:cmds.argCommand(send,"swarm/connect")}}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return{apply:command(send,"update"),check:command(send,"update/check"),log:command(send,"update/log")}}},function(module,exports,__webpack_require__){"use strict";var command=__webpack_require__(5).command;module.exports=function(send){return command(send,"version")}},function(module,exports,__webpack_require__){"use strict";var pkg=__webpack_require__(188);exports=module.exports=function(){return{"api-path":"/api/v0/","user-agent":"/node-"+pkg.name+"/"+pkg.version+"/",host:"localhost",port:"5001",protocol:"http"}}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function headers(file){var name=file.path||"",header={"Content-Disposition":'file; filename="'+name+'"'};return file.dir?header["Content-Type"]="application/x-directory":header["Content-Type"]="application/octet-stream",header}function strip(name,base){var smallBase=base.split("/").slice(0,-1).join("/")+"/";return name.replace(smallBase,"")}function loadPaths(opts,file){var path=__webpack_require__(17),fs=__webpack_require__(49),glob=__webpack_require__(69),followSymlinks=null!=opts.followSymlinks?opts.followSymlinks:!0;file=path.resolve(file);var stats=fs.statSync(file);if(stats.isDirectory()&&!opts.recursive)throw new Error("Can only add directories using --recursive");if(stats.isDirectory()&&opts.recursive){var _ret=function(){var mg=new glob.sync.GlobSync(file+"/**/*",{follow:followSymlinks});return{v:mg.found.map(function(name){return"FILE"===mg.cache[name]?{path:strip(name,file),dir:!1,content:fs.createReadStream(name)}:{path:strip(name,file),dir:!0}})}}();if("object"===("undefined"==typeof _ret?"undefined":(0,_typeof3["default"])(_ret)))return _ret.v}return{path:file,content:fs.createReadStream(file)}}function getFilesStream(files,opts){if(!files)return null;var mp=new Multipart;return flatmap(files,function(file){if("string"==typeof file){if(!isNode)throw new Error("Can not add paths in node");return loadPaths(opts,file)}return file.path&&(file.content||file.dir)?file:{path:"",dir:!1,content:file}}).forEach(function(file){mp.addPart({headers:headers(file),body:file.content})}),mp}var _typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),isNode=__webpack_require__(67),Multipart=__webpack_require__(202),flatmap=__webpack_require__(181);exports=module.exports=getFilesStream},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function requireCommands(){return{add:__webpack_require__(90),block:__webpack_require__(91),cat:__webpack_require__(92),commands:__webpack_require__(93),config:__webpack_require__(94),dht:__webpack_require__(95),diag:__webpack_require__(96),id:__webpack_require__(98),files:__webpack_require__(97),log:__webpack_require__(99),ls:__webpack_require__(100),mount:__webpack_require__(101),name:__webpack_require__(102),object:__webpack_require__(103),pin:__webpack_require__(104),ping:__webpack_require__(105),refs:__webpack_require__(106),swarm:__webpack_require__(107),update:__webpack_require__(108),version:__webpack_require__(109)}}function loadCommands(send){var files=requireCommands(),cmds={};return(0,_keys2["default"])(files).forEach(function(file){cmds[file]=files[file](send)}),cmds}var _keys=__webpack_require__(14),_keys2=_interopRequireDefault(_keys);module.exports=loadCommands},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function parseChunkedJson(res,cb){var parsed=[];res.pipe(ndjson.parse()).on("data",parsed.push.bind(parsed)).on("end",function(){return cb(null,parsed)})}function onRes(buffer,cb){return function(err,res){if(err)return cb(err);var stream=!!res.headers["x-stream-output"],chunkedObjects=!!res.headers["x-chunked-output"],isJson=res.headers["content-type"]&&0===res.headers["content-type"].indexOf("application/json");if(res.statusCode>=400||!res.statusCode){var _ret=function(){var error=new Error("Server responded with "+res.statusCode);return{v:Wreck.read(res,{json:!0},function(err,payload){return err?cb(err):(payload&&(error.code=payload.Code,error.message=payload.Message||payload.toString()),void cb(error))})}}();if("object"===("undefined"==typeof _ret?"undefined":(0,_typeof3["default"])(_ret)))return _ret.v}return stream&&!buffer?cb(null,res):chunkedObjects?isJson?parseChunkedJson(res,cb):Wreck.read(res,null,cb):void Wreck.read(res,{json:isJson},cb)}}function requestAPI(config,path,args,qs,files,buffer,cb){if(qs=qs||{},Array.isArray(path)&&(path=path.join("/")),args&&!Array.isArray(args)&&(args=[args]),args&&(qs.arg=args),files&&!Array.isArray(files)&&(files=[files]),qs.r&&(qs.recursive=qs.r,delete qs.r),!isNode&&qs.recursive&&"add"===path)return cb(new Error("Recursive uploads are not supported in the browser"));qs["stream-channels"]=!0;var stream=void 0;files&&(stream=getFilesStream(files,qs)),delete qs.followSymlinks;var port=config.port?":"+config.port:"",opts={method:files?"POST":"GET",uri:config.protocol+"://"+config.host+port+config["api-path"]+path+"?"+Qs.stringify(qs,{arrayFormat:"repeat"}),headers:{}};if(isNode&&(opts.headers["User-Agent"]=config["user-agent"]),files){if(!stream.boundary)return cb(new Error("No boundary in multipart stream"));opts.headers["Content-Type"]="multipart/form-data; boundary="+stream.boundary,opts.downstreamRes=stream,opts.payload=stream}return Wreck.request(opts.method,opts.uri,opts,onRes(buffer,cb))}var _promise=__webpack_require__(25),_promise2=_interopRequireDefault(_promise),_typeof2=__webpack_require__(12),_typeof3=_interopRequireDefault(_typeof2),Wreck=__webpack_require__(53),Qs=__webpack_require__(85),ndjson=__webpack_require__(73),getFilesStream=__webpack_require__(111),isNode=__webpack_require__(67);exports=module.exports=function(config){return function(path,args,qs,files,buffer,cb){return"function"==typeof buffer&&(cb=buffer,buffer=!1),"function"!=typeof cb&&"undefined"!=typeof _promise2["default"]?new _promise2["default"](function(resolve,reject){requestAPI(config,path,args,qs,files,buffer,function(err,res){return err?reject(err):void resolve(res)})}):requestAPI(config,path,args,qs,files,buffer,cb)}}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(130),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(131),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(133),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(134),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(135),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(136),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(138),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(140),__esModule:!0}},function(module,exports,__webpack_require__){module.exports={"default":__webpack_require__(141),__esModule:!0}},function(module,exports){function balanced(a,b,str){var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)}}function range(a,b,str){var begs,beg,left,right,result,ai=str.indexOf(a),bi=str.indexOf(b,ai+1),i=ai;if(ai>=0&&bi>0){for(begs=[],left=str.length;i=0&&!result;)i==ai?(begs.push(i),ai=str.indexOf(a,i+1)):1==begs.length?result=[begs.pop(),bi]:(beg=begs.pop(),left>beg&&(left=beg,right=bi),bi=str.indexOf(b,i+1)),i=bi>ai&&ai>=0?ai:bi;begs.length&&(result=[left,right])}return result}module.exports=balanced,balanced.range=range},function(module,exports,__webpack_require__){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(exports){"use strict";function decode(elt){var code=elt.charCodeAt(0);return code===PLUS||code===PLUS_URL_SAFE?62:code===SLASH||code===SLASH_URL_SAFE?63:NUMBER>code?-1:NUMBER+10>code?code-NUMBER+26+26:UPPER+26>code?code-UPPER:LOWER+26>code?code-LOWER+26:void 0}function b64ToByteArray(b64){function push(v){arr[L++]=v}var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0,arr=new Arr(3*b64.length/4-placeHolders),l=placeHolders>0?b64.length-4:b64.length;var L=0;for(i=0,j=0;l>i;i+=4,j+=3)tmp=decode(b64.charAt(i))<<18|decode(b64.charAt(i+1))<<12|decode(b64.charAt(i+2))<<6|decode(b64.charAt(i+3)),push((16711680&tmp)>>16),push((65280&tmp)>>8),push(255&tmp);return 2===placeHolders?(tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4,push(255&tmp)):1===placeHolders&&(tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2,push(tmp>>8&255),push(255&tmp)),arr}function uint8ToBase64(uint8){function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(63&num)}var i,temp,length,extraBytes=uint8.length%3,output="";for(i=0,length=uint8.length-extraBytes;length>i;i+=3)temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output+=tripletToBase64(temp);switch(extraBytes){case 1:temp=uint8[uint8.length-1],output+=encode(temp>>2),output+=encode(temp<<4&63),output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1],output+=encode(temp>>10),output+=encode(temp>>4&63),output+=encode(temp<<2&63),output+="="}return output}var Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,PLUS="+".charCodeAt(0),SLASH="/".charCodeAt(0),NUMBER="0".charCodeAt(0),LOWER="a".charCodeAt(0),UPPER="A".charCodeAt(0),PLUS_URL_SAFE="-".charCodeAt(0),SLASH_URL_SAFE="_".charCodeAt(0);exports.toByteArray=b64ToByteArray,exports.fromByteArray=uint8ToBase64}(exports)},function(module,exports,__webpack_require__){function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[],m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre,body=m.body,post=m.post,p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);return post.length&&(p[p.length-1]+=postParts.shift(),p.push.apply(p,postParts)),parts.push.apply(parts,p),parts}function expandTop(str){return str?expand(escapeBraces(str),!0).map(unescapeBraces):[]}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return y>=i}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[],m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body),isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body),isSequence=isNumericSequence||isAlphaSequence,isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions)return m.post.match(/,.*\}/)?(str=m.pre+"{"+m.body+escClose+m.post,expand(str)):[str];var n;if(isSequence)n=m.body.split(/\.\./);else if(n=parseCommaParts(m.body),1===n.length&&(n=expand(n[0],!1).map(embrace),1===n.length)){var post=m.post.length?expand(m.post,!1):[""];return post.map(function(p){return m.pre+n[0]+p})}var N,pre=m.pre,post=m.post.length?expand(m.post,!1):[""];if(isSequence){var x=numeric(n[0]),y=numeric(n[1]),width=Math.max(n[0].length,n[1].length),incr=3==n.length?Math.abs(numeric(n[2])):1,test=lte,reverse=x>y;reverse&&(incr*=-1,test=gte);var pad=n.some(isPadded);N=[];for(var i=x;test(i,y);i+=incr){var c;if(isAlphaSequence)c=String.fromCharCode(i),"\\"===c&&(c="");else if(c=String(i),pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");c=0>i?"-"+z+c.slice(1):z+c}}N.push(c)}}else N=concatMap(n,function(el){return expand(el,!1)});for(var j=0;ji;)isEnum.call(it,key=symbols[i++])&&keys.push(key);return keys}},function(module,exports,__webpack_require__){var ctx=__webpack_require__(20),call=__webpack_require__(150),isArrayIter=__webpack_require__(148),anObject=__webpack_require__(15),toLength=__webpack_require__(164),getIterFn=__webpack_require__(165);module.exports=function(iterable,entries,fn,that){var length,step,iterator,iterFn=getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0;if("function"!=typeof iterFn)throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++)entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]);else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;)call(iterator,f,step.value,entries)}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(9).document&&document.documentElement},function(module,exports){module.exports=function(fn,args,that){var un=void 0===that;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}},function(module,exports,__webpack_require__){var Iterators=__webpack_require__(21),ITERATOR=__webpack_require__(8)("iterator"),ArrayProto=Array.prototype;module.exports=function(it){return void 0!==it&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}},function(module,exports,__webpack_require__){var cof=__webpack_require__(19);module.exports=Array.isArray||function(arg){return"Array"==cof(arg)}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(15);module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];throw void 0!==ret&&anObject(ret.call(iterator)),e}}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),descriptor=__webpack_require__(38),setToStringTag=__webpack_require__(30),IteratorPrototype={};__webpack_require__(36)(IteratorPrototype,__webpack_require__(8)("iterator"),function(){return this}),module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:descriptor(1,next)}),setToStringTag(Constructor,NAME+" Iterator")}},function(module,exports,__webpack_require__){var ITERATOR=__webpack_require__(8)("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR]();riter["return"]=function(){SAFE_CLOSING=!0},Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec,skipClosing){if(!skipClosing&&!SAFE_CLOSING)return!1;var safe=!1;try{var arr=[7],iter=arr[ITERATOR]();iter.next=function(){safe=!0},arr[ITERATOR]=function(){return iter},exec(arr)}catch(e){}return safe}},function(module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},function(module,exports,__webpack_require__){var $=__webpack_require__(3),toIObject=__webpack_require__(22);module.exports=function(object,el){for(var key,O=toIObject(object),keys=$.getKeys(O),length=keys.length,index=0;length>index;)if(O[key=keys[index++]]===el)return key}},function(module,exports,__webpack_require__){var head,last,notify,global=__webpack_require__(9),macrotask=__webpack_require__(163).set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,isNode="process"==__webpack_require__(19)(process),flush=function(){var parent,domain,fn;for(isNode&&(parent=process.domain)&&(process.domain=null,parent.exit());head;)domain=head.domain,fn=head.fn,domain&&domain.enter(),fn(),domain&&domain.exit(),head=head.next;last=void 0,parent&&parent.enter()};if(isNode)notify=function(){process.nextTick(flush)};else if(Observer){var toggle=1,node=document.createTextNode("");new Observer(flush).observe(node,{characterData:!0}),notify=function(){node.data=toggle=-toggle}}else notify=Promise&&Promise.resolve?function(){Promise.resolve().then(flush)}:function(){macrotask.call(global,flush)};module.exports=function(fn){var task={fn:fn,next:void 0,domain:isNode&&process.domain};last&&(last.next=task),head||(head=task,notify()),last=task}},function(module,exports,__webpack_require__){var $=__webpack_require__(3),toObject=__webpack_require__(40),IObject=__webpack_require__(57);module.exports=__webpack_require__(27)(function(){var a=Object.assign,A={},B={},S=Symbol(),K="abcdefghijklmnopqrst";return A[S]=7,K.split("").forEach(function(k){B[k]=k}),7!=a({},A)[S]||Object.keys(a({},B)).join("")!=K})?function(target,source){for(var T=toObject(target),$$=arguments,$$len=$$.length,index=1,getKeys=$.getKeys,getSymbols=$.getSymbols,isEnum=$.isEnum;$$len>index;)for(var key,S=IObject($$[index++]),keys=getSymbols?getKeys(S).concat(getSymbols(S)):getKeys(S),length=keys.length,j=0;length>j;)isEnum.call(S,key=keys[j++])&&(T[key]=S[key]);return T}:Object.assign},function(module,exports,__webpack_require__){var redefine=__webpack_require__(39);module.exports=function(target,src){for(var key in src)redefine(target,key,src[key]);return target}},function(module,exports){module.exports=Object.is||function(x,y){return x===y?0!==x||1/x===1/y:x!=x&&y!=y}},function(module,exports,__webpack_require__){"use strict";var core=__webpack_require__(7),$=__webpack_require__(3),DESCRIPTORS=__webpack_require__(26),SPECIES=__webpack_require__(8)("species");module.exports=function(KEY){var C=core[KEY];DESCRIPTORS&&C&&!C[SPECIES]&&$.setDesc(C,SPECIES,{configurable:!0,get:function(){return this}})}},function(module,exports,__webpack_require__){var anObject=__webpack_require__(15),aFunction=__webpack_require__(33),SPECIES=__webpack_require__(8)("species");module.exports=function(O,D){var S,C=anObject(O).constructor;return void 0===C||void 0==(S=anObject(C)[SPECIES])?D:aFunction(S)}},function(module,exports){module.exports=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(61),defined=__webpack_require__(34);module.exports=function(TO_STRING){return function(that,pos){var a,b,s=String(defined(that)),i=toInteger(pos),l=s.length;return 0>i||i>=l?TO_STRING?"":void 0:(a=s.charCodeAt(i),55296>a||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536)}}},function(module,exports,__webpack_require__){var defer,channel,port,ctx=__webpack_require__(20),invoke=__webpack_require__(147),html=__webpack_require__(146),cel=__webpack_require__(143),global=__webpack_require__(9),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id],fn()}},listner=function(event){run.call(event.data)};setTask&&clearTask||(setTask=function(fn){for(var args=[],i=1;arguments.length>i;)args.push(arguments[i++]);return queue[++counter]=function(){invoke("function"==typeof fn?fn:Function(fn),args)},defer(counter),counter},clearTask=function(id){delete queue[id]},"process"==__webpack_require__(19)(process)?defer=function(id){process.nextTick(ctx(run,id,1))}:MessageChannel?(channel=new MessageChannel, +port=channel.port2,channel.port1.onmessage=listner,defer=ctx(port.postMessage,port,1)):global.addEventListener&&"function"==typeof postMessage&&!global.importScripts?(defer=function(id){global.postMessage(id+"","*")},global.addEventListener("message",listner,!1)):defer=ONREADYSTATECHANGE in cel("script")?function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run.call(id)}}:function(id){setTimeout(ctx(run,id,1),0)}),module.exports={set:setTask,clear:clearTask}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(61),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},function(module,exports,__webpack_require__){var classof=__webpack_require__(55),ITERATOR=__webpack_require__(8)("iterator"),Iterators=__webpack_require__(21);module.exports=__webpack_require__(7).getIteratorMethod=function(it){return void 0!=it?it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]:void 0}},function(module,exports,__webpack_require__){"use strict";var addToUnscopables=__webpack_require__(142),step=__webpack_require__(153),Iterators=__webpack_require__(21),toIObject=__webpack_require__(22);module.exports=__webpack_require__(58)(Array,"Array",function(iterated,kind){this._t=toIObject(iterated),this._i=0,this._k=kind},function(){var O=this._t,kind=this._k,index=this._i++;return!O||index>=O.length?(this._t=void 0,step(1)):"keys"==kind?step(0,index):"values"==kind?step(0,O[index]):step(0,[index,O[index]])},"values"),Iterators.Arguments=Iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries")},function(module,exports,__webpack_require__){var $export=__webpack_require__(16);$export($export.S+$export.F,"Object",{assign:__webpack_require__(156)})},function(module,exports,__webpack_require__){var toIObject=__webpack_require__(22);__webpack_require__(29)("getOwnPropertyDescriptor",function($getOwnPropertyDescriptor){return function(it,key){return $getOwnPropertyDescriptor(toIObject(it),key)}})},function(module,exports,__webpack_require__){__webpack_require__(29)("getOwnPropertyNames",function(){return __webpack_require__(56).get})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(40);__webpack_require__(29)("getPrototypeOf",function($getPrototypeOf){return function(it){return $getPrototypeOf(toObject(it))}})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(40);__webpack_require__(29)("keys",function($keys){return function(it){return $keys(toObject(it))}})},function(module,exports,__webpack_require__){var $export=__webpack_require__(16);$export($export.S,"Object",{setPrototypeOf:__webpack_require__(59).set})},function(module,exports,__webpack_require__){"use strict";var Wrapper,$=__webpack_require__(3),LIBRARY=__webpack_require__(37),global=__webpack_require__(9),ctx=__webpack_require__(20),classof=__webpack_require__(55),$export=__webpack_require__(16),isObject=__webpack_require__(28),anObject=__webpack_require__(15),aFunction=__webpack_require__(33),strictNew=__webpack_require__(161),forOf=__webpack_require__(145),setProto=__webpack_require__(59).set,same=__webpack_require__(158),SPECIES=__webpack_require__(8)("species"),speciesConstructor=__webpack_require__(160),asap=__webpack_require__(155),PROMISE="Promise",process=global.process,isNode="process"==classof(process),P=global[PROMISE],testResolve=function(sub){var test=new P(function(){});return sub&&(test.constructor=Object),P.resolve(test)===test},USE_NATIVE=function(){function P2(x){var self=new P(x);return setProto(self,P2.prototype),self}var works=!1;try{if(works=P&&P.resolve&&testResolve(),setProto(P2,P),P2.prototype=$.create(P.prototype,{constructor:{value:P2}}),P2.resolve(5).then(function(){})instanceof P2||(works=!1),works&&__webpack_require__(26)){var thenableThenGotten=!1;P.resolve($.setDesc({},"then",{get:function(){thenableThenGotten=!0}})),works=thenableThenGotten}}catch(e){works=!1}return works}(),sameConstructor=function(a,b){return LIBRARY&&a===P&&b===Wrapper?!0:same(a,b)},getConstructor=function(C){var S=anObject(C)[SPECIES];return void 0!=S?S:C},isThenable=function(it){var then;return isObject(it)&&"function"==typeof(then=it.then)?then:!1},PromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(void 0!==resolve||void 0!==reject)throw TypeError("Bad Promise constructor");resolve=$$resolve,reject=$$reject}),this.resolve=aFunction(resolve),this.reject=aFunction(reject)},perform=function(exec){try{exec()}catch(e){return{error:e}}},notify=function(record,isReject){if(!record.n){record.n=!0;var chain=record.c;asap(function(){for(var value=record.v,ok=1==record.s,i=0,run=function(reaction){var result,then,handler=ok?reaction.ok:reaction.fail,resolve=reaction.resolve,reject=reaction.reject;try{handler?(ok||(record.h=!0),result=handler===!0?value:handler(value),result===reaction.promise?reject(TypeError("Promise-chain cycle")):(then=isThenable(result))?then.call(result,resolve,reject):resolve(result)):reject(value)}catch(e){reject(e)}};chain.length>i;)run(chain[i++]);chain.length=0,record.n=!1,isReject&&setTimeout(function(){var handler,console,promise=record.p;isUnhandled(promise)&&(isNode?process.emit("unhandledRejection",value,promise):(handler=global.onunhandledrejection)?handler({promise:promise,reason:value}):(console=global.console)&&console.error&&console.error("Unhandled promise rejection",value)),record.a=void 0},1)})}},isUnhandled=function(promise){var reaction,record=promise._d,chain=record.a||record.c,i=0;if(record.h)return!1;for(;chain.length>i;)if(reaction=chain[i++],reaction.fail||!isUnhandled(reaction.promise))return!1;return!0},$reject=function(value){var record=this;record.d||(record.d=!0,record=record.r||record,record.v=value,record.s=2,record.a=record.c.slice(),notify(record,!0))},$resolve=function(value){var then,record=this;if(!record.d){record.d=!0,record=record.r||record;try{if(record.p===value)throw TypeError("Promise can't be resolved itself");(then=isThenable(value))?asap(function(){var wrapper={r:record,d:!1};try{then.call(value,ctx($resolve,wrapper,1),ctx($reject,wrapper,1))}catch(e){$reject.call(wrapper,e)}}):(record.v=value,record.s=1,notify(record,!1))}catch(e){$reject.call({r:record,d:!1},e)}}};USE_NATIVE||(P=function(executor){aFunction(executor);var record=this._d={p:strictNew(this,P,PROMISE),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{executor(ctx($resolve,record,1),ctx($reject,record,1))}catch(err){$reject.call(record,err)}},__webpack_require__(157)(P.prototype,{then:function(onFulfilled,onRejected){var reaction=new PromiseCapability(speciesConstructor(this,P)),promise=reaction.promise,record=this._d;return reaction.ok="function"==typeof onFulfilled?onFulfilled:!0,reaction.fail="function"==typeof onRejected&&onRejected,record.c.push(reaction),record.a&&record.a.push(reaction),record.s&¬ify(record,!1),promise},"catch":function(onRejected){return this.then(void 0,onRejected)}})),$export($export.G+$export.W+$export.F*!USE_NATIVE,{Promise:P}),__webpack_require__(30)(P,PROMISE),__webpack_require__(159)(PROMISE),Wrapper=__webpack_require__(7)[PROMISE],$export($export.S+$export.F*!USE_NATIVE,PROMISE,{reject:function(r){var capability=new PromiseCapability(this),$$reject=capability.reject;return $$reject(r),capability.promise}}),$export($export.S+$export.F*(!USE_NATIVE||testResolve(!0)),PROMISE,{resolve:function(x){if(x instanceof P&&sameConstructor(x.constructor,this))return x;var capability=new PromiseCapability(this),$$resolve=capability.resolve;return $$resolve(x),capability.promise}}),$export($export.S+$export.F*!(USE_NATIVE&&__webpack_require__(152)(function(iter){P.all(iter)["catch"](function(){})})),PROMISE,{all:function(iterable){var C=getConstructor(this),capability=new PromiseCapability(C),resolve=capability.resolve,reject=capability.reject,values=[],abrupt=perform(function(){forOf(iterable,!1,values.push,values);var remaining=values.length,results=Array(remaining);remaining?$.each.call(values,function(promise,index){var alreadyCalled=!1;C.resolve(promise).then(function(value){alreadyCalled||(alreadyCalled=!0,results[index]=value,--remaining||resolve(results))},reject)}):resolve(results)});return abrupt&&reject(abrupt.error),capability.promise},race:function(iterable){var C=getConstructor(this),capability=new PromiseCapability(C),reject=capability.reject,abrupt=perform(function(){forOf(iterable,!1,function(promise){C.resolve(promise).then(capability.resolve,reject)})});return abrupt&&reject(abrupt.error),capability.promise}})},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),global=__webpack_require__(9),has=__webpack_require__(35),DESCRIPTORS=__webpack_require__(26),$export=__webpack_require__(16),redefine=__webpack_require__(39),$fails=__webpack_require__(27),shared=__webpack_require__(60),setToStringTag=__webpack_require__(30),uid=__webpack_require__(62),wks=__webpack_require__(8),keyOf=__webpack_require__(154),$names=__webpack_require__(56),enumKeys=__webpack_require__(144),isArray=__webpack_require__(149),anObject=__webpack_require__(15),toIObject=__webpack_require__(22),createDesc=__webpack_require__(38),getDesc=$.getDesc,setDesc=$.setDesc,_create=$.create,getNames=$names.get,$Symbol=global.Symbol,$JSON=global.JSON,_stringify=$JSON&&$JSON.stringify,setter=!1,HIDDEN=wks("_hidden"),isEnum=$.isEnum,SymbolRegistry=shared("symbol-registry"),AllSymbols=shared("symbols"),useNative="function"==typeof $Symbol,ObjectProto=Object.prototype,setSymbolDesc=DESCRIPTORS&&$fails(function(){return 7!=_create(setDesc({},"a",{get:function(){return setDesc(this,"a",{value:7}).a}})).a})?function(it,key,D){var protoDesc=getDesc(ObjectProto,key);protoDesc&&delete ObjectProto[key],setDesc(it,key,D),protoDesc&&it!==ObjectProto&&setDesc(ObjectProto,key,protoDesc)}:setDesc,wrap=function(tag){var sym=AllSymbols[tag]=_create($Symbol.prototype);return sym._k=tag,DESCRIPTORS&&setter&&setSymbolDesc(ObjectProto,tag,{configurable:!0,set:function(value){has(this,HIDDEN)&&has(this[HIDDEN],tag)&&(this[HIDDEN][tag]=!1),setSymbolDesc(this,tag,createDesc(1,value))}}),sym},isSymbol=function(it){return"symbol"==typeof it},$defineProperty=function(it,key,D){return D&&has(AllSymbols,key)?(D.enumerable?(has(it,HIDDEN)&&it[HIDDEN][key]&&(it[HIDDEN][key]=!1),D=_create(D,{enumerable:createDesc(0,!1)})):(has(it,HIDDEN)||setDesc(it,HIDDEN,createDesc(1,{})),it[HIDDEN][key]=!0),setSymbolDesc(it,key,D)):setDesc(it,key,D)},$defineProperties=function(it,P){anObject(it);for(var key,keys=enumKeys(P=toIObject(P)),i=0,l=keys.length;l>i;)$defineProperty(it,key=keys[i++],P[key]);return it},$create=function(it,P){return void 0===P?_create(it):$defineProperties(_create(it),P)},$propertyIsEnumerable=function(key){var E=isEnum.call(this,key);return E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key]?E:!0},$getOwnPropertyDescriptor=function(it,key){var D=getDesc(it=toIObject(it),key);return!D||!has(AllSymbols,key)||has(it,HIDDEN)&&it[HIDDEN][key]||(D.enumerable=!0),D},$getOwnPropertyNames=function(it){for(var key,names=getNames(toIObject(it)),result=[],i=0;names.length>i;)has(AllSymbols,key=names[i++])||key==HIDDEN||result.push(key);return result},$getOwnPropertySymbols=function(it){for(var key,names=getNames(toIObject(it)),result=[],i=0;names.length>i;)has(AllSymbols,key=names[i++])&&result.push(AllSymbols[key]);return result},$stringify=function(it){if(void 0!==it&&!isSymbol(it)){for(var replacer,$replacer,args=[it],i=1,$$=arguments;$$.length>i;)args.push($$[i++]);return replacer=args[1],"function"==typeof replacer&&($replacer=replacer),!$replacer&&isArray(replacer)||(replacer=function(key,value){return $replacer&&(value=$replacer.call(this,key,value)),isSymbol(value)?void 0:value}),args[1]=replacer,_stringify.apply($JSON,args)}},buggyJSON=$fails(function(){var S=$Symbol();return"[null]"!=_stringify([S])||"{}"!=_stringify({a:S})||"{}"!=_stringify(Object(S))});useNative||($Symbol=function(){if(isSymbol(this))throw TypeError("Symbol is not a constructor");return wrap(uid(arguments.length>0?arguments[0]:void 0))},redefine($Symbol.prototype,"toString",function(){return this._k}),isSymbol=function(it){return it instanceof $Symbol},$.create=$create,$.isEnum=$propertyIsEnumerable,$.getDesc=$getOwnPropertyDescriptor,$.setDesc=$defineProperty,$.setDescs=$defineProperties,$.getNames=$names.get=$getOwnPropertyNames,$.getSymbols=$getOwnPropertySymbols,DESCRIPTORS&&!__webpack_require__(37)&&redefine(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,!0));var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function(key){return keyOf(SymbolRegistry,key)},useSetter:function(){setter=!0},useSimple:function(){setter=!1}};$.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(it){var sym=wks(it);symbolStatics[it]=useNative?sym:wrap(sym)}),setter=!0,$export($export.G+$export.W,{Symbol:$Symbol}),$export($export.S,"Symbol",symbolStatics),$export($export.S+$export.F*!useNative,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols}),$JSON&&$export($export.S+$export.F*(!useNative||buggyJSON),"JSON",{stringify:$stringify}),setToStringTag($Symbol,"Symbol"),setToStringTag(Math,"Math",!0),setToStringTag(global.JSON,"JSON",!0)},function(module,exports,__webpack_require__){(function(Buffer){function Hmac(alg,key){if(!(this instanceof Hmac))return new Hmac(alg,key);this._opad=opad,this._alg=alg;var blocksize="sha512"===alg?128:64;key=this._key=Buffer.isBuffer(key)?key:new Buffer(key),key.length>blocksize?key=createHash(alg).update(key).digest():key.lengthi;i++)ipad[i]=54^key[i],opad[i]=92^key[i];this._hash=createHash(alg).update(ipad)}var createHash=__webpack_require__(66),zeroBuffer=new Buffer(128);zeroBuffer.fill(0),module.exports=Hmac,Hmac.prototype.update=function(data,enc){return this._hash.update(data,enc),this},Hmac.prototype.digest=function(enc){var h=this._hash.digest();return createHash(this._alg).update(this._opad).update(h).digest(enc)}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function toArray(buf,bigEndian){if(buf.length%intSize!==0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}for(var arr=[],fn=bigEndian?buf.readInt32BE:buf.readInt32LE,i=0;i>5]|=128<>>9<<4)+14]=len;for(var a=1732584193,b=-271733879,c=-1732584194,d=271733878,i=0;i>16)+(y>>16)+(lsw>>16);return msw<<16|65535&lsw}function bit_rol(num,cnt){return num<>>32-cnt}var helpers=__webpack_require__(176);module.exports=function(buf){return helpers.hash(buf,core_md5,16)}},function(module,exports,__webpack_require__){var pbkdf2Export=__webpack_require__(203);module.exports=function(crypto,exports){exports=exports||{};var exported=pbkdf2Export(crypto);return exports.pbkdf2=exported.pbkdf2,exports.pbkdf2Sync=exported.pbkdf2Sync,exports}},function(module,exports,__webpack_require__){(function(global,Buffer){!function(){var g=("undefined"==typeof window?global:window)||{};_crypto=g.crypto||g.msCrypto||__webpack_require__(230),module.exports=function(size){if(_crypto.getRandomValues){var bytes=new Buffer(size);return _crypto.getRandomValues(bytes),bytes}if(_crypto.randomBytes)return _crypto.randomBytes(size);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(exports,function(){return this}(),__webpack_require__(1).Buffer)},function(module,exports){"use strict";module.exports=function(arr,iter,context){var results=[];return Array.isArray(arr)?(arr.forEach(function(value,index,list){var res=iter.call(context,value,index,list);Array.isArray(res)?results.push.apply(results,res):null!=res&&results.push(res)}),results):results}},function(module,exports,__webpack_require__){(function(process){function globSync(pattern,options){if("function"==typeof options||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(pattern,options).found}function GlobSync(pattern,options){if(!pattern)throw new Error("must provide pattern");if("function"==typeof options||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(pattern,options);if(setopts(this,pattern,options),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;n>i;i++)this._process(this.minimatch.set[i],i,!1);this._finish()}module.exports=globSync,globSync.GlobSync=GlobSync;var fs=__webpack_require__(49),minimatch=__webpack_require__(43),path=(minimatch.Minimatch,__webpack_require__(69).Glob,__webpack_require__(11),__webpack_require__(17)),assert=__webpack_require__(50),isAbsolute=__webpack_require__(45),common=__webpack_require__(68),setopts=(common.alphasort,common.alphasorti,common.setopts),ownProp=common.ownProp,childrenIgnored=common.childrenIgnored;GlobSync.prototype._finish=function(){if(assert(this instanceof GlobSync),this.realpath){var self=this;this.matches.forEach(function(matchset,index){var set=self.matches[index]=Object.create(null);for(var p in matchset)try{p=self._makeAbs(p);var real=fs.realpathSync(p,self.realpathCache);set[real]=!0}catch(er){if("stat"!==er.syscall)throw er;set[self._makeAbs(p)]=!0}})}common.finish(this)},GlobSync.prototype._process=function(pattern,index,inGlobStar){assert(this instanceof GlobSync);for(var n=0;"string"==typeof pattern[n];)n++;var prefix;switch(n){case pattern.length:return void this._processSimple(pattern.join("/"),index);case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/")}var read,remain=pattern.slice(n);null===prefix?read=".":isAbsolute(prefix)||isAbsolute(pattern.join("/"))?(prefix&&isAbsolute(prefix)||(prefix="/"+prefix),read=prefix):read=prefix;var abs=this._makeAbs(read);if(!childrenIgnored(this,read)){var isGlobStar=remain[0]===minimatch.GLOBSTAR;isGlobStar?this._processGlobStar(prefix,read,abs,remain,index,inGlobStar):this._processReaddir(prefix,read,abs,remain,index,inGlobStar)}},GlobSync.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar){var entries=this._readdir(abs,inGlobStar);if(entries){for(var pn=remain[0],negate=!!this.minimatch.negate,rawGlob=pn._glob,dotOk=this.dot||"."===rawGlob.charAt(0),matchedEntries=[],i=0;ii;i++){var newPattern,e=matchedEntries[i];newPattern=prefix?[prefix,e]:[e],this._process(newPattern.concat(remain),index,inGlobStar)}}else{this.matches[index]||(this.matches[index]=Object.create(null));for(var i=0;len>i;i++){var e=matchedEntries[i];prefix&&(e="/"!==prefix.slice(-1)?prefix+"/"+e:prefix+e),"/"!==e.charAt(0)||this.nomount||(e=path.join(this.root,e)),this.matches[index][e]=!0}}}},GlobSync.prototype._emitMatch=function(index,e){this._makeAbs(e);if(this.mark&&(e=this._mark(e)),!this.matches[index][e]){if(this.nodir){var c=this.cache[this._makeAbs(e)];if("DIR"===c||Array.isArray(c))return}this.matches[index][e]=!0,this.stat&&this._stat(e)}},GlobSync.prototype._readdirInGlobStar=function(abs){if(this.follow)return this._readdir(abs,!1);var entries,lstat;try{lstat=fs.lstatSync(abs)}catch(er){return null}var isSym=lstat.isSymbolicLink();return this.symlinks[abs]=isSym,isSym||lstat.isDirectory()?entries=this._readdir(abs,!1):this.cache[abs]="FILE",entries},GlobSync.prototype._readdir=function(abs,inGlobStar){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||"FILE"===c)return null;if(Array.isArray(c))return c}try{return this._readdirEntries(abs,fs.readdirSync(abs))}catch(er){return this._readdirError(abs,er),null}},GlobSync.prototype._readdirEntries=function(abs,entries){if(!this.mark&&!this.stat)for(var i=0;ii;i++){var e=entries[i];if("."!==e.charAt(0)||this.dot){var instead=gspref.concat(entries[i],remainWithoutGlobStar);this._process(instead,index,!0);var below=gspref.concat(entries[i],remain);this._process(below,index,!0)}}}},GlobSync.prototype._processSimple=function(prefix,index){var exists=this._stat(prefix);if(this.matches[index]||(this.matches[index]=Object.create(null)),exists){if(prefix&&isAbsolute(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);"/"===prefix.charAt(0)?prefix=path.join(this.root,prefix):(prefix=path.resolve(this.root,prefix),trail&&(prefix+="/"))}"win32"===process.platform&&(prefix=prefix.replace(/\\/g,"/")),this.matches[index][prefix]=!0}},GlobSync.prototype._stat=function(f){var abs=this._makeAbs(f),needDir="/"===f.slice(-1);if(f.length>this.maxLength)return!1;if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c)&&(c="DIR"),!needDir||"DIR"===c)return c;if(needDir&&"FILE"===c)return!1}var stat=this.statCache[abs];if(!stat){var lstat;try{lstat=fs.lstatSync(abs)}catch(er){return!1}if(lstat.isSymbolicLink())try{stat=fs.statSync(abs)}catch(er){stat=lstat}else stat=lstat}this.statCache[abs]=stat;var c=stat.isDirectory()?"DIR":"FILE";return this.cache[abs]=this.cache[abs]||c,needDir&&"DIR"!==c?!1:c},GlobSync.prototype._mark=function(p){return common.mark(this,p)},GlobSync.prototype._makeAbs=function(f){return common.makeAbs(this,f)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){var http=__webpack_require__(78),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(params,cb){return params||(params={}),params.scheme="https",params.protocol="https:",http.request.call(this,params,cb)}},function(module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},function(module,exports,__webpack_require__){(function(process){function inflight(key,cb){return reqs[key]?(reqs[key].push(cb),null):(reqs[key]=[cb],makeres(key))}function makeres(key){return once(function RES(){for(var cbs=reqs[key],len=cbs.length,args=slice(arguments),i=0;len>i;i++)cbs[i].apply(null,args);cbs.length>len?(cbs.splice(0,len),process.nextTick(function(){RES.apply(null,args)})):delete reqs[key]})}function slice(args){for(var length=args.length,array=[],i=0;length>i;i++)array[i]=args[i];return array}var wrappy=__webpack_require__(83),reqs=Object.create(null),once=__webpack_require__(74);module.exports=wrappy(inflight)}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function _normalizeFamily(family){return family?family.toLowerCase():"ipv4"}var ip=exports,Buffer=__webpack_require__(1).Buffer,os=__webpack_require__(75);ip.toBuffer=function(ip,buff,offset){offset=~~offset;var result;if(this.isV4Format(ip))result=buff||new Buffer(offset+4),ip.split(/\./g).map(function(byte){result[offset++]=255&parseInt(byte,10)});else if(this.isV6Format(ip)){var i,sections=ip.split(":",8);for(i=0;i0;i--)argv.push("0");sections.splice.apply(sections,argv)}for(result=buff||new Buffer(offset+16),i=0;i>8&255,result[offset++]=255&word}}if(!result)throw Error("Invalid ip address: "+ip);return result},ip.toString=function(buff,offset,length){offset=~~offset,length=length||buff.length-offset;var result=[];if(4===length){for(var i=0;length>i;i++)result.push(buff[offset+i]);result=result.join(".")}else if(16===length){for(var i=0;length>i;i+=2)result.push(buff.readUInt16BE(offset+i).toString(16));result=result.join(":"),result=result.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3"),result=result.replace(/:{3,4}/,"::")}return result};var ipv4Regex=/^(\d{1,3}\.){3,3}\d{1,3}$/,ipv6Regex=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;ip.isV4Format=function(ip){return ipv4Regex.test(ip)},ip.isV6Format=function(ip){return ipv6Regex.test(ip)},ip.fromPrefixLen=function(prefixlen,family){family=prefixlen>32?"ipv6":_normalizeFamily(family);var len=4;"ipv6"===family&&(len=16);for(var buff=new Buffer(len),i=0,n=buff.length;n>i;++i){ +var bits=8;8>prefixlen&&(bits=prefixlen),prefixlen-=bits,buff[i]=~(255>>bits)}return ip.toString(buff)},ip.mask=function mask(addr,mask){addr=ip.toBuffer(addr),mask=ip.toBuffer(mask);var result=new Buffer(Math.max(addr.length,mask.length));if(addr.length===mask.length)for(var i=0;i=numberOfAddresses?ip.fromLong(networkAddress):ip.fromLong(networkAddress+1),lastAddress:2>=numberOfAddresses?ip.fromLong(networkAddress+numberOfAddresses-1):ip.fromLong(networkAddress+numberOfAddresses-2),broadcastAddress:ip.fromLong(networkAddress+numberOfAddresses-1),subnetMask:mask,subnetMaskLength:maskLength,numHosts:2>=numberOfAddresses?numberOfAddresses:numberOfAddresses-2,length:numberOfAddresses,contains:function(other){return networkAddress===ip.toLong(ip.mask(other,mask))}}},ip.cidrSubnet=function(cidrString){var cidrParts=cidrString.split("/"),addr=cidrParts[0];if(2!==cidrParts.length)throw new Error("invalid CIDR subnet: "+addr);var mask=ip.fromPrefixLen(parseInt(cidrParts[1],10));return ip.subnet(addr,mask)},ip.not=function(addr){for(var buff=ip.toBuffer(addr),i=0;ia.length&&(buff=b,other=a);for(var offset=buff.length-other.length,i=offset;ii;i++)if(0!==b[i])return!1;var word=b.readUInt16BE(10);if(0!==word&&65535!==word)return!1;for(var i=0;4>i;i++)if(a[i]!==b[i+12])return!1;return!0},ip.isPrivate=function(addr){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/.test(addr)||/^fc00:/i.test(addr)||/^fe80:/i.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.isPublic=function(addr){return!ip.isPrivate(addr)},ip.isLoopback=function(addr){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr)||/^fe80::1$/.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.loopback=function(family){if(family=_normalizeFamily(family),"ipv4"!==family&&"ipv6"!==family)throw new Error("family must be ipv4 or ipv6");return"ipv4"===family?"127.0.0.1":"fe80::1"},ip.address=function(name,family){var all,interfaces=os.networkInterfaces();if(family=_normalizeFamily(family),name&&"private"!==name&&"public"!==name){var res=interfaces[name].filter(function(details){var itemFamily=details.family.toLowerCase();return itemFamily===family});if(0===res.length)return;return res[0].address}var all=Object.keys(interfaces).map(function(nic){var addresses=interfaces[nic].filter(function(details){return details.family=details.family.toLowerCase(),details.family!==family||ip.isLoopback(details.address)?!1:name?"public"===name?!ip.isPrivate(details.address):ip.isPrivate(details.address):!0});return addresses.length?addresses[0].address:void 0}).filter(Boolean);return all.length?all[0]:ip.loopback(family)},ip.toLong=function(ip){var ipl=0;return ip.split(".").forEach(function(octet){ipl<<=8,ipl+=parseInt(octet)}),ipl>>>0},ip.fromLong=function(ipl){return(ipl>>>24)+"."+(ipl>>16&255)+"."+(ipl>>8&255)+"."+(255&ipl)}},function(module,exports){"use strict";var isStream=module.exports=function(stream){return null!==stream&&"object"==typeof stream&&"function"==typeof stream.pipe};isStream.writable=function(stream){return isStream(stream)&&stream.writable!==!1&&"function"==typeof stream._write&&"object"==typeof stream._writableState},isStream.readable=function(stream){return isStream(stream)&&stream.readable!==!1&&"function"==typeof stream._read&&"object"==typeof stream._readableState},isStream.duplex=function(stream){return isStream.writable(stream)&&isStream.readable(stream)}},function(module,exports){module.exports={name:"ipfs-api",version:"2.13.2",description:"A client library for the IPFS API",main:"src/index.js",dependencies:{"detect-node":"^2.0.3",flatmap:"0.0.3",glob:"^6.0.2",multiaddr:"^1.0.0","multipart-stream":"github:dignifiedquire/multipart-stream#a1a4e9c4d41d1f78dcf32279affbbb0bfd930c28",ndjson:"^1.4.3",qs:"^6.0.0",wreck:"^7.0.0"},engines:{node:">=4.2.2"},repository:{type:"git",url:"https://github.com/ipfs/js-ipfs-api"},devDependencies:{"babel-core":"^6.1.21","babel-eslint":"^5.0.0-beta9","babel-loader":"^6.2.0","babel-plugin-transform-runtime":"^6.1.18","babel-preset-es2015":"^6.0.15","babel-runtime":"^6.3.19",chai:"^3.4.1",concurrently:"^1.0.0",eslint:"^2.0.0-rc.0","eslint-config-standard":"^5.1.0","eslint-plugin-promise":"^1.0.8","eslint-plugin-standard":"^1.3.1","glob-stream":"5.3.1",gulp:"^3.9.0","gulp-bump":"^1.0.0","gulp-eslint":"^2.0.0-rc-3","gulp-filter":"^4.0.0","gulp-git":"^1.6.0","gulp-load-plugins":"^1.0.0","gulp-mocha":"^2.1.3","gulp-size":"^2.0.0","gulp-tag-version":"^1.3.0","gulp-util":"^3.0.7","https-browserify":"0.0.1","ipfsd-ctl":"^0.8.1","json-loader":"^0.5.3",karma:"^0.13.11","karma-chrome-launcher":"^0.2.1","karma-firefox-launcher":"^0.1.7","karma-mocha":"^0.2.0","karma-mocha-reporter":"^1.1.1","karma-sauce-launcher":"^0.3.0","karma-webpack":"^1.7.0",mocha:"^2.3.3","pre-commit":"^1.0.6","raw-loader":"^0.5.1",rimraf:"^2.4.5","run-sequence":"^1.1.4",semver:"^5.1.0","stream-equal":"^0.1.7","stream-http":"^2.1.0","uglify-js":"^2.4.24","webpack-stream":"^3.1.0"},scripts:{test:"gulp test","test:node":"gulp test:node","test:browser":"gulp test:browser",lint:"gulp lint",build:"gulp build"},"pre-commit":["lint","test"],keywords:["ipfs"],author:"Matt Bell ",contributors:["Travis Person ","Jeromy Jonson ","David Dias ","Juan Benet ","Friedel Ziegelmayer "],license:"MIT",bugs:{url:"https://github.com/ipfs/js-ipfs-api/issues"},homepage:"https://github.com/ipfs/js-ipfs-api"}},function(module,exports){function arrayFilter(array,predicate){for(var index=-1,length=array.length,resIndex=-1,result=[];++indexarrLength))return!1;for(;++index-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,propertyIsEnumerable=objectProto.propertyIsEnumerable,getLength=baseProperty("length");module.exports=isArguments},function(module,exports){function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isObjectLike(value){return!!value&&"object"==typeof value}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]}var MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objectToString=objectProto.toString;module.exports=isTypedArray},function(module,exports,__webpack_require__){function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function pairs(object){object=toObject(object);for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index=parts.length)throw ParseError("invalid address: "+str);tuples.push([part,parts[p]])}return tuples}function stringTuplesToString(tuples){var parts=[];return map(tuples,function(tup){var proto=protoFromTuple(tup);parts.push(proto.name),tup.length>1&&parts.push(tup[1])}),"/"+parts.join("/")}function stringTuplesToTuples(tuples){return map(tuples,function(tup){var proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toBuffer(proto.code,tup[1])]:[proto.code]})}function tuplesToStringTuples(tuples){return map(tuples,function(tup){var proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toString(proto.code,tup[1])]:[proto.code]})}function tuplesToBuffer(tuples){return fromBuffer(Buffer.concat(map(tuples,function(tup){var proto=protoFromTuple(tup),buf=new Buffer([proto.code]);return tup.length>1&&(buf=Buffer.concat([buf,tup[1]])),buf})))}function bufferToTuples(buf){for(var tuples=[],i=0;ibuf.length)throw ParseError("Invalid address buffer: "+buf.toString("hex"));tuples.push([code,addr])}return tuples}function bufferToString(buf){var a=bufferToTuples(buf),b=tuplesToStringTuples(a);return stringTuplesToString(b)}function stringToBuffer(str){str=cleanPath(str);var a=stringToStringTuples(str),b=stringTuplesToTuples(a);return tuplesToBuffer(b)}function fromString(str){return stringToBuffer(str)}function fromBuffer(buf){var err=validateBuffer(buf);if(err)throw err;return new Buffer(buf)}function validateBuffer(buf){bufferToTuples(buf)}function isValidBuffer(buf){try{return validateBuffer(buf),!0}catch(e){return!1}}function cleanPath(str){return"/"+filter(str.trim().split("/")).join("/")}function ParseError(str){return new Error("Error parsing address: "+str)}function protoFromTuple(tup){var proto=protocols(tup[0]);if(tup.length>1&&0===proto.size)throw ParseError("tuple has address but protocol size is 0");return proto}var map=__webpack_require__(42),filter=__webpack_require__(195),convert=__webpack_require__(200),protocols=__webpack_require__(44);module.exports={stringToStringTuples:stringToStringTuples,stringTuplesToString:stringTuplesToString,tuplesToStringTuples:tuplesToStringTuples,stringTuplesToTuples:stringTuplesToTuples,bufferToTuples:bufferToTuples,tuplesToBuffer:tuplesToBuffer,bufferToString:bufferToString,stringToBuffer:stringToBuffer,fromString:fromString,fromBuffer:fromBuffer,validateBuffer:validateBuffer,isValidBuffer:isValidBuffer,cleanPath:cleanPath,ParseError:ParseError,protoFromTuple:protoFromTuple}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Convert(proto,a){return a instanceof Buffer?Convert.toString(proto,a):Convert.toBuffer(proto,a)}function port2buf(port){var buf=new Buffer(2);return buf.writeUInt16BE(port,0),buf}function buf2port(buf){return buf.readUInt16BE(0)}var ip=__webpack_require__(186),protocols=__webpack_require__(44);module.exports=Convert,Convert.toString=function(proto,buf){switch(proto=protocols(proto),proto.code){case 4:case 41:return ip.toString(buf);case 6:case 17:case 33:case 132:return buf2port(buf)}return buf.toString("hex")},Convert.toBuffer=function(proto,str){switch(proto=protocols(proto),proto.code){case 4:case 41:return ip.toBuffer(str);case 6:case 17:case 33:case 132:return port2buf(parseInt(str,10))}return new Buffer(str,"hex")}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Multiaddr(addr){if(!(this instanceof Multiaddr))return new Multiaddr(addr);if(addr||(addr=""),addr instanceof Buffer)this.buffer=codec.fromBuffer(addr);else if("string"==typeof addr||addr instanceof String)this.buffer=codec.fromString(addr);else{if(!(addr.buffer&&addr.protos&&addr.protoCodes))throw new Error("addr must be a string, Buffer, or Multiaddr");this.buffer=codec.fromBuffer(addr.buffer)}}var map=__webpack_require__(42),extend=__webpack_require__(48),codec=__webpack_require__(199),bufeq=__webpack_require__(126),protocols=__webpack_require__(44),NotImplemented=new Error("Sorry, Not Implemented Yet.");exports=module.exports=Multiaddr,exports.Buffer=Buffer,Multiaddr.prototype.toString=function(){return codec.bufferToString(this.buffer)},Multiaddr.prototype.toOptions=function(){var opts={},parsed=this.toString().split("/");return opts.family="ip4"===parsed[1]?"ipv4":"ipv6",opts.host=parsed[2],opts.port=parsed[4],opts},Multiaddr.prototype.inspect=function(){return""},Multiaddr.prototype.protos=function(){return map(this.protoCodes(),function(code){return extend(protocols(code))})},Multiaddr.prototype.protos=function(){return map(this.protoCodes(),function(code){return extend(protocols(code))})},Multiaddr.prototype.protoCodes=function(){for(var codes=[],i=0;ii)throw new Error("Address "+this+" does not contain subaddress: "+addr);return Multiaddr(s.slice(0,i))},Multiaddr.prototype.equals=function(addr){return bufeq(this.buffer,addr.buffer)},Multiaddr.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');var codes=this.protoCodes(),parts=this.toString().split("/").slice(1);return{family:41===codes[0]?"IPv6":"IPv4",address:parts[1],port:parts[3]}},Multiaddr.fromNodeAddress=function(addr,transport){if(!addr)throw new Error("requires node address object");if(!transport)throw new Error("requires transport protocol");var ip="IPv6"===addr.family?"ip6":"ip4";return Multiaddr("/"+[ip,addr.address,transport,addr.port].join("/"))},Multiaddr.prototype.isThinWaistAddress=function(addr){var protos=(addr||this).protos();return 2!==protos.length?!1:4!==protos[0].code&&41!==protos[0].code?!1:6===protos[1].code||17===protos[1].code},Multiaddr.prototype.fromStupidString=function(str){throw NotImplemented},Multiaddr.protocols=protocols}).call(exports,__webpack_require__(1).Buffer)},function(module,exports,__webpack_require__){function Multipart(boundary){return!this instanceof Multipart?new Multipart(boundary):(this.boundary=boundary||Math.random().toString(36).slice(2),Sandwich.call(this,{head:"--"+this.boundary+CRNL,tail:CRNL+"--"+this.boundary+"--",separator:CRNL+"--"+this.boundary+CRNL}),this._add=this.add,void(this.add=this.addPart))}var Sandwich=__webpack_require__(208).SandwichStream,stream=__webpack_require__(6),inherits=__webpack_require__(4),isStream=__webpack_require__(187),CRNL="\r\n";module.exports=Multipart,inherits(Multipart,Sandwich),Multipart.prototype.addPart=function(part){part=part||{};var partStream=new stream.PassThrough;if(part.headers)for(var key in part.headers){var header=part.headers[key];partStream.write(key+": "+header+CRNL)}partStream.write(CRNL),isStream(part.body)?part.body.pipe(partStream):partStream.end(part.body),this._add(partStream)}},function(module,exports,__webpack_require__){(function(Buffer){module.exports=function(crypto){function pbkdf2(password,salt,iterations,keylen,digest,callback){if("function"==typeof digest&&(callback=digest,digest=void 0),"function"!=typeof callback)throw new Error("No callback provided to pbkdf2");setTimeout(function(){var result;try{result=pbkdf2Sync(password,salt,iterations,keylen,digest)}catch(e){return callback(e)}callback(void 0,result)})}function pbkdf2Sync(password,salt,iterations,keylen,digest){if("number"!=typeof iterations)throw new TypeError("Iterations not a number");if(0>iterations)throw new TypeError("Bad iterations");if("number"!=typeof keylen)throw new TypeError("Key length not a number");if(0>keylen)throw new TypeError("Bad key length");digest=digest||"sha1",Buffer.isBuffer(password)||(password=new Buffer(password)),Buffer.isBuffer(salt)||(salt=new Buffer(salt));var hLen,r,T,l=1,DK=new Buffer(keylen),block1=new Buffer(salt.length+4);salt.copy(block1,0,0,salt.length);for(var i=1;l>=i;i++){block1.writeUInt32BE(i,salt.length);var U=crypto.createHmac(digest,password).update(block1).digest();if(!hLen&&(hLen=U.length,T=new Buffer(hLen),l=Math.ceil(keylen/hLen),r=keylen-(l-1)*hLen,keylen>(Math.pow(2,32)-1)*hLen))throw new TypeError("keylen exceeds maximum length");U.copy(T,0,0,hLen);for(var j=1;iterations>j;j++){U=crypto.createHmac(digest,password).update(U).digest();for(var k=0;hLen>k;k++)T[k]^=U[k]}var destPos=(i-1)*hLen,len=i==l?r:hLen;T.copy(DK,destPos,0,len)}return DK}return{pbkdf2:pbkdf2,pbkdf2Sync:pbkdf2Sync}}}).call(exports,__webpack_require__(1).Buffer)},function(module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&",eq=eq||"=";var obj={};if("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;len>i;++i){var kstr,vstr,k,v,x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq);idx>=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?Array.isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj}},function(module,exports){"use strict";var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){return sep=sep||"&",eq=eq||"=",null===obj&&(obj=void 0),"object"==typeof obj?Object.keys(obj).map(function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;return Array.isArray(obj[k])?obj[k].map(function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj)):""}},function(module,exports,__webpack_require__){"use strict";exports.decode=exports.parse=__webpack_require__(204),exports.encode=exports.stringify=__webpack_require__(205)},function(module,exports,__webpack_require__){(function(Buffer){function f1(x,y,z){return x^y^z}function f2(x,y,z){return x&y|~x&z}function f3(x,y,z){return(x|~y)^z}function f4(x,y,z){return x&z|y&~z}function f5(x,y,z){return x^(y|~z)}function rotl(x,n){return x<>>32-n}function ripemd160(message){var H=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof message&&(message=new Buffer(message,"utf8"));var m=bytesToWords(message),nBitsLeft=8*message.length,nBitsTotal=8*message.length;m[nBitsLeft>>>5]|=128<<24-nBitsLeft%32,m[(nBitsLeft+64>>>9<<4)+14]=16711935&(nBitsTotal<<8|nBitsTotal>>>24)|4278255360&(nBitsTotal<<24|nBitsTotal>>>8);for(var i=0;ii;i++){var H_i=H[i];H[i]=16711935&(H_i<<8|H_i>>>24)|4278255360&(H_i<<24|H_i>>>8)}var digestbytes=wordsToBytes(H);return new Buffer(digestbytes)}module.exports=ripemd160;/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/package.json b/package.json index 13c45a68e9..228d95f52c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ipfs-api", - "version": "2.13.1", + "version": "2.13.2", "description": "A client library for the IPFS API", "main": "src/index.js", "dependencies": { @@ -37,7 +37,7 @@ "gulp": "^3.9.0", "gulp-bump": "^1.0.0", "gulp-eslint": "^2.0.0-rc-3", - "gulp-filter": "^3.0.1", + "gulp-filter": "^4.0.0", "gulp-git": "^1.6.0", "gulp-load-plugins": "^1.0.0", "gulp-mocha": "^2.1.3", diff --git a/src/request-api.js b/src/request-api.js index 082990b37a..a8eccd6448 100644 --- a/src/request-api.js +++ b/src/request-api.js @@ -25,7 +25,7 @@ function onRes (buffer, cb) { const stream = !!res.headers['x-stream-output'] const chunkedObjects = !!res.headers['x-chunked-output'] - const isJson = res.headers['content-type'].indexOf('application/json') === 0 + const isJson = res.headers['content-type'] && res.headers['content-type'].indexOf('application/json') === 0 if (res.statusCode >= 400 || !res.statusCode) { const error = new Error(`Server responded with ${res.statusCode}`) diff --git a/test/request-api.spec.js b/test/request-api.spec.js index d501268536..788c324530 100644 --- a/test/request-api.spec.js +++ b/test/request-api.spec.js @@ -41,5 +41,24 @@ describe('ipfsAPI request tests', () => { protocol: 'http' }).id(noop) }) + + it('does not crash if no content-type header is provided', (done) => { + if (!isNode) { + return done() + } + + // go-ipfs always (currently) adds a content-type header, even if no content is present, + // the standard behaviour for an http-api is to omit this header if no content is present + const server = require('http').createServer((req, res) => { + res.writeHead(200) + res.end() + }).listen(6001, () => { + ipfsAPI('/ip4/127.0.0.1/tcp/6001') + .config.replace('test/r-config.json', (err) => { + expect(err).to.be.equal(null) + server.close(done) + }) + }) + }) }) })