diff --git a/resources/[system]/[builders]/yarn/yarn_cli.js b/resources/[system]/[builders]/yarn/yarn_cli.js index 71b556e..718ecf2 100644 --- a/resources/[system]/[builders]/yarn/yarn_cli.js +++ b/resources/[system]/[builders]/yarn/yarn_cli.js @@ -65,14 +65,220 @@ module.exports = /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 416); +/******/ return __webpack_require__(__webpack_require__.s = 529); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ -/***/ (function(module, exports) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = __extends; +/* unused harmony export __assign */ +/* unused harmony export __rest */ +/* unused harmony export __decorate */ +/* unused harmony export __param */ +/* unused harmony export __metadata */ +/* unused harmony export __awaiter */ +/* unused harmony export __generator */ +/* unused harmony export __exportStar */ +/* unused harmony export __values */ +/* unused harmony export __read */ +/* unused harmony export __spread */ +/* unused harmony export __await */ +/* unused harmony export __asyncGenerator */ +/* unused harmony export __asyncDelegator */ +/* unused harmony export __asyncValues */ +/* unused harmony export __makeTemplateObject */ +/* unused harmony export __importStar */ +/* unused harmony export __importDefault */ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +function __exportStar(m, exports) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} -module.exports = require("path"); /***/ }), /* 1 */ @@ -83,7 +289,7 @@ module.exports = require("path"); exports.__esModule = true; -var _promise = __webpack_require__(5); +var _promise = __webpack_require__(6); var _promise2 = _interopRequireDefault(_promise); @@ -120,6 +326,12 @@ exports.default = function (fn) { /***/ }), /* 2 */ +/***/ (function(module, exports) { + +module.exports = require("path"); + +/***/ }), +/* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -134,85 +346,357 @@ exports.default = function (instance, Constructor) { }; /***/ }), -/* 3 */ +/* 4 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(481), __esModule: true }; - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -module.exports = require("util"); +module.exports = { "default": __webpack_require__(612), __esModule: true }; /***/ }), /* 5 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscriber; }); +/* unused harmony export SafeSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isFunction__ = __webpack_require__(137); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observer__ = __webpack_require__(384); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__ = __webpack_require__(253); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__config__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_hostReportError__ = __webpack_require__(255); +/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */ + + + + + + + +var Subscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subscriber, _super); + function Subscriber(destinationOrNext, error, complete) { + var _this = _super.call(this) || this; + _this.syncErrorValue = null; + _this.syncErrorThrown = false; + _this.syncErrorThrowable = false; + _this.isStopped = false; + _this._parentSubscription = null; + switch (arguments.length) { + case 0: + _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; + break; + case 1: + if (!destinationOrNext) { + _this.destination = __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]; + break; + } + if (typeof destinationOrNext === 'object') { + if (destinationOrNext instanceof Subscriber) { + _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable; + _this.destination = destinationOrNext; + destinationOrNext.add(_this); + } + else { + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext); + } + break; + } + default: + _this.syncErrorThrowable = true; + _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete); + break; + } + return _this; + } + Subscriber.prototype[__WEBPACK_IMPORTED_MODULE_4__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { return this; }; + Subscriber.create = function (next, error, complete) { + var subscriber = new Subscriber(next, error, complete); + subscriber.syncErrorThrowable = false; + return subscriber; + }; + Subscriber.prototype.next = function (value) { + if (!this.isStopped) { + this._next(value); + } + }; + Subscriber.prototype.error = function (err) { + if (!this.isStopped) { + this.isStopped = true; + this._error(err); + } + }; + Subscriber.prototype.complete = function () { + if (!this.isStopped) { + this.isStopped = true; + this._complete(); + } + }; + Subscriber.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.isStopped = true; + _super.prototype.unsubscribe.call(this); + }; + Subscriber.prototype._next = function (value) { + this.destination.next(value); + }; + Subscriber.prototype._error = function (err) { + this.destination.error(err); + this.unsubscribe(); + }; + Subscriber.prototype._complete = function () { + this.destination.complete(); + this.unsubscribe(); + }; + Subscriber.prototype._unsubscribeAndRecycle = function () { + var _a = this, _parent = _a._parent, _parents = _a._parents; + this._parent = null; + this._parents = null; + this.unsubscribe(); + this.closed = false; + this.isStopped = false; + this._parent = _parent; + this._parents = _parents; + this._parentSubscription = null; + return this; + }; + return Subscriber; +}(__WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */])); + +var SafeSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SafeSubscriber, _super); + function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) { + var _this = _super.call(this) || this; + _this._parentSubscriber = _parentSubscriber; + var next; + var context = _this; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(observerOrNext)) { + next = observerOrNext; + } + else if (observerOrNext) { + next = observerOrNext.next; + error = observerOrNext.error; + complete = observerOrNext.complete; + if (observerOrNext !== __WEBPACK_IMPORTED_MODULE_2__Observer__["a" /* empty */]) { + context = Object.create(observerOrNext); + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isFunction__["a" /* isFunction */])(context.unsubscribe)) { + _this.add(context.unsubscribe.bind(context)); + } + context.unsubscribe = _this.unsubscribe.bind(_this); + } + } + _this._context = context; + _this._next = next; + _this._error = error; + _this._complete = complete; + return _this; + } + SafeSubscriber.prototype.next = function (value) { + if (!this.isStopped && this._next) { + var _parentSubscriber = this._parentSubscriber; + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._next, value); + } + else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.error = function (err) { + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + var useDeprecatedSynchronousErrorHandling = __WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling; + if (this._error) { + if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(this._error, err); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, this._error, err); + this.unsubscribe(); + } + } + else if (!_parentSubscriber.syncErrorThrowable) { + this.unsubscribe(); + if (useDeprecatedSynchronousErrorHandling) { + throw err; + } + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + else { + if (useDeprecatedSynchronousErrorHandling) { + _parentSubscriber.syncErrorValue = err; + _parentSubscriber.syncErrorThrown = true; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.complete = function () { + var _this = this; + if (!this.isStopped) { + var _parentSubscriber = this._parentSubscriber; + if (this._complete) { + var wrappedComplete = function () { return _this._complete.call(_this._context); }; + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) { + this.__tryOrUnsub(wrappedComplete); + this.unsubscribe(); + } + else { + this.__tryOrSetError(_parentSubscriber, wrappedComplete); + this.unsubscribe(); + } + } + else { + this.unsubscribe(); + } + } + }; + SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { + try { + fn.call(this._context, value); + } + catch (err) { + this.unsubscribe(); + if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + } + } + }; + SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) { + if (!__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + throw new Error('bad call'); + } + try { + fn.call(this._context, value); + } + catch (err) { + if (__WEBPACK_IMPORTED_MODULE_5__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + parent.syncErrorValue = err; + parent.syncErrorThrown = true; + return true; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util_hostReportError__["a" /* hostReportError */])(err); + return true; + } + } + return false; + }; + SafeSubscriber.prototype._unsubscribe = function () { + var _parentSubscriber = this._parentSubscriber; + this._context = null; + this._parentSubscriber = null; + _parentSubscriber.unsubscribe(); + }; + return SafeSubscriber; +}(Subscriber)); + +//# sourceMappingURL=Subscriber.js.map -module.exports = { "default": __webpack_require__(489), __esModule: true }; /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(621), __esModule: true }; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResponseError = exports.ProcessTermError = exports.SecurityError = exports.ProcessSpawnError = exports.MessageError = undefined; +exports.OneTimePasswordError = exports.ResponseError = exports.ProcessTermError = exports.SecurityError = exports.ProcessSpawnError = exports.MessageError = undefined; var _create; function _load_create() { - return _create = _interopRequireDefault(__webpack_require__(254)); + return _create = _interopRequireDefault(__webpack_require__(205)); } var _getPrototypeOf; function _load_getPrototypeOf() { - return _getPrototypeOf = _interopRequireDefault(__webpack_require__(457)); + return _getPrototypeOf = _interopRequireDefault(__webpack_require__(571)); } var _setPrototypeOf; function _load_setPrototypeOf() { - return _setPrototypeOf = _interopRequireDefault(__webpack_require__(165)); + return _setPrototypeOf = _interopRequireDefault(__webpack_require__(206)); } var _from; function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(55)); + return _from = _interopRequireDefault(__webpack_require__(52)); } var _construct; function _load_construct() { - return _construct = _interopRequireDefault(__webpack_require__(458)); + return _construct = _interopRequireDefault(__webpack_require__(573)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _extendableBuiltin5(cls) { + function ExtendableBuiltin() { + var instance = (0, (_construct || _load_construct()).default)(cls, (0, (_from || _load_from()).default)(arguments)); + (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(instance, (0, (_getPrototypeOf || _load_getPrototypeOf()).default)(this)); + return instance; + } + + ExtendableBuiltin.prototype = (0, (_create || _load_create()).default)(cls.prototype, { + constructor: { + value: cls, + enumerable: false, + writable: true, + configurable: true + } + }); + + if ((_setPrototypeOf || _load_setPrototypeOf()).default) { + (0, (_setPrototypeOf || _load_setPrototypeOf()).default)(ExtendableBuiltin, cls); + } else { + ExtendableBuiltin.__proto__ = cls; + } + + return ExtendableBuiltin; +} + function _extendableBuiltin3(cls) { function ExtendableBuiltin() { var instance = (0, (_construct || _load_construct()).default)(cls, (0, (_from || _load_from()).default)(arguments)); @@ -330,8 +814,19 @@ var ResponseError = exports.ResponseError = function (_extendableBuiltin4) { return ResponseError; }(_extendableBuiltin3(Error)); +var OneTimePasswordError = exports.OneTimePasswordError = function (_extendableBuiltin6) { + (0, (_inherits2 || _load_inherits()).default)(OneTimePasswordError, _extendableBuiltin6); + + function OneTimePasswordError() { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, OneTimePasswordError); + return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _extendableBuiltin6.apply(this, arguments)); + } + + return OneTimePasswordError; +}(_extendableBuiltin5(Error)); + /***/ }), -/* 7 */ +/* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -345,25 +840,25 @@ exports.getFirstSuitableFolder = exports.readFirstAvailableStream = exports.make var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); + return _map = _interopRequireDefault(__webpack_require__(41)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _asyncToGenerator2; @@ -394,7 +889,7 @@ var buildActionsForCopy = function () { } if (type === 'symlink') { - yield mkdirp((_path || _load_path()).default.dirname(dest)); + yield mkdirp((_path2 || _load_path()).default.dirname(dest)); onFresh(); actions.symlink.push({ dest, @@ -404,7 +899,7 @@ var buildActionsForCopy = function () { return; } - if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + if (events.ignoreBasenames.indexOf((_path2 || _load_path()).default.basename(src)) >= 0) { // ignored file return; } @@ -486,7 +981,7 @@ var buildActionsForCopy = function () { var _file2 = _ref6; if (srcFiles.indexOf(_file2) < 0) { - var _loc = (_path || _load_path()).default.join(dest, _file2); + var _loc = (_path2 || _load_path()).default.join(dest, _file2); possibleExtraneous.add(_loc); if ((yield lstat(_loc)).isDirectory()) { @@ -504,7 +999,7 @@ var buildActionsForCopy = function () { var _file3 = _ref7; - possibleExtraneous.add((_path || _load_path()).default.join(_loc, _file3)); + possibleExtraneous.add((_path2 || _load_path()).default.join(_loc, _file3)); } } } @@ -532,9 +1027,9 @@ var buildActionsForCopy = function () { yield mkdirp(dest); } - var destParts = dest.split((_path || _load_path()).default.sep); + var destParts = dest.split((_path2 || _load_path()).default.sep); while (destParts.length) { - files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + files.add(destParts.join((_path2 || _load_path()).default.sep).toLowerCase()); destParts.pop(); } @@ -559,7 +1054,7 @@ var buildActionsForCopy = function () { var _file4 = _ref8; queue.push({ - dest: (_path || _load_path()).default.join(dest, _file4), + dest: (_path2 || _load_path()).default.join(dest, _file4), onFresh, onDone: function (_onDone) { function onDone() { @@ -576,7 +1071,7 @@ var buildActionsForCopy = function () { onDone(); } }), - src: (_path || _load_path()).default.join(src, _file4) + src: (_path2 || _load_path()).default.join(src, _file4) }); } }(); @@ -717,7 +1212,7 @@ var buildActionsForHardlink = function () { } files.add(dest.toLowerCase()); - if (events.ignoreBasenames.indexOf((_path || _load_path()).default.basename(src)) >= 0) { + if (events.ignoreBasenames.indexOf((_path2 || _load_path()).default.basename(src)) >= 0) { // ignored file return; } @@ -791,7 +1286,7 @@ var buildActionsForHardlink = function () { var _file6 = _ref14; if (srcFiles.indexOf(_file6) < 0) { - var _loc2 = (_path || _load_path()).default.join(dest, _file6); + var _loc2 = (_path2 || _load_path()).default.join(dest, _file6); possibleExtraneous.add(_loc2); if ((yield lstat(_loc2)).isDirectory()) { @@ -809,7 +1304,7 @@ var buildActionsForHardlink = function () { var _file7 = _ref15; - possibleExtraneous.add((_path || _load_path()).default.join(_loc2, _file7)); + possibleExtraneous.add((_path2 || _load_path()).default.join(_loc2, _file7)); } } } @@ -830,9 +1325,9 @@ var buildActionsForHardlink = function () { reporter.verbose(reporter.lang('verboseFileFolder', dest)); yield mkdirp(dest); - var destParts = dest.split((_path || _load_path()).default.sep); + var destParts = dest.split((_path2 || _load_path()).default.sep); while (destParts.length) { - files.add(destParts.join((_path || _load_path()).default.sep).toLowerCase()); + files.add(destParts.join((_path2 || _load_path()).default.sep).toLowerCase()); destParts.pop(); } @@ -858,8 +1353,8 @@ var buildActionsForHardlink = function () { queue.push({ onFresh, - src: (_path || _load_path()).default.join(src, _file8), - dest: (_path || _load_path()).default.join(dest, _file8), + src: (_path2 || _load_path()).default.join(src, _file8), + dest: (_path2 || _load_path()).default.join(dest, _file8), onDone: function (_onDone2) { function onDone() { return _onDone2.apply(this, arguments); @@ -1030,7 +1525,7 @@ var copyBulk = exports.copyBulk = function () { // we need to copy symlinks last as they could reference files we were copying var symlinkActions = actions.symlink; yield (_promise2 || _load_promise2()).queue(symlinkActions, function (data) { - var linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + var linkname = (_path2 || _load_path()).default.resolve((_path2 || _load_path()).default.dirname(data.dest), data.linkname); reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); return symlink(linkname, data.dest); }); @@ -1073,7 +1568,7 @@ var hardlinkBulk = exports.hardlinkBulk = function () { // we need to copy symlinks last as they could reference files we were copying var symlinkActions = actions.symlink; yield (_promise2 || _load_promise2()).queue(symlinkActions, function (data) { - var linkname = (_path || _load_path()).default.resolve((_path || _load_path()).default.dirname(data.dest), data.linkname); + var linkname = (_path2 || _load_path()).default.resolve((_path2 || _load_path()).default.dirname(data.dest), data.linkname); reporter.verbose(reporter.lang('verboseFileSymlink', data.dest, linkname)); return symlink(linkname, data.dest); }); @@ -1143,10 +1638,10 @@ var readJsonAndFile = exports.readJsonAndFile = function () { var find = exports.find = function () { var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, dir) { - var parts = dir.split((_path || _load_path()).default.sep); + var parts = dir.split((_path2 || _load_path()).default.sep); while (parts.length) { - var loc = parts.concat(filename).join((_path || _load_path()).default.sep); + var loc = parts.concat(filename).join((_path2 || _load_path()).default.sep); if (yield exists(loc)) { return loc; @@ -1165,10 +1660,18 @@ var find = exports.find = function () { var symlink = exports.symlink = function () { var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (src, dest) { + if (process.platform !== 'win32') { + // use relative paths otherwise which will be retained if the directory is moved + src = (_path2 || _load_path()).default.relative((_path2 || _load_path()).default.dirname(dest), src); + // When path.relative returns an empty string for the current directory, we should instead use + // '.', which is a valid fs.symlink target. + src = src || '.'; + } + try { var stats = yield lstat(dest); if (stats.isSymbolicLink()) { - var resolved = yield realpath(dest); + var resolved = dest; if (resolved === src) { return; } @@ -1178,6 +1681,7 @@ var symlink = exports.symlink = function () { throw err; } } + // We use rimraf for unlink which never throws an ENOENT on missing target yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dest); @@ -1185,19 +1689,7 @@ var symlink = exports.symlink = function () { // use directory junctions if possible on win32, this requires absolute paths yield fsSymlink(src, dest, 'junction'); } else { - // use relative paths otherwise which will be retained if the directory is moved - var _relative = void 0; - try { - _relative = (_path || _load_path()).default.relative((_fs || _load_fs()).default.realpathSync((_path || _load_path()).default.dirname(dest)), (_fs || _load_fs()).default.realpathSync(src)); - } catch (err) { - if (err.code !== 'ENOENT') { - throw err; - } - _relative = (_path || _load_path()).default.relative((_path || _load_path()).default.dirname(dest), src); - } - // When path.relative returns an empty string for the current directory, we should instead use - // '.', which is a valid fs.symlink target. - yield fsSymlink(_relative || '.', dest); + yield fsSymlink(src, dest); } }); @@ -1233,19 +1725,19 @@ var walk = exports.walk = function () { var name = _ref28; - var _relative2 = relativeDir ? (_path || _load_path()).default.join(relativeDir, name) : name; - var loc = (_path || _load_path()).default.join(dir, name); + var _relative = relativeDir ? (_path2 || _load_path()).default.join(relativeDir, name) : name; + var loc = (_path2 || _load_path()).default.join(dir, name); var _stat = yield lstat(loc); files.push({ - relative: _relative2, + relative: _relative, basename: name, absolute: loc, mtime: +_stat.mtime }); if (_stat.isDirectory()) { - files = files.concat((yield walk(loc, _relative2, ignoreBasenames))); + files = files.concat((yield walk(loc, _relative, ignoreBasenames))); } } @@ -1313,8 +1805,8 @@ var writeFilePreservingEol = exports.writeFilePreservingEol = function () { var hardlinksWork = exports.hardlinksWork = function () { var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir) { var filename = 'test-file' + Math.random(); - var file = (_path || _load_path()).default.join(dir, filename); - var fileLink = (_path || _load_path()).default.join(dir, filename + '-link'); + var file = (_path2 || _load_path()).default.join(dir, filename); + var fileLink = (_path2 || _load_path()).default.join(dir, filename + '-link'); try { yield writeFile(file, 'test'); yield link(file, fileLink); @@ -1337,7 +1829,7 @@ var hardlinksWork = exports.hardlinksWork = function () { var makeTempDir = exports.makeTempDir = function () { var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (prefix) { - var dir = (_path || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`); + var dir = (_path2 || _load_path()).default.join((_os || _load_os()).default.tmpdir(), `yarn-${prefix || ''}-${Date.now()}-${Math.random()}`); yield (0, (_fsNormalized || _load_fsNormalized()).unlink)(dir); yield mkdirp(dir); return dir; @@ -1350,8 +1842,6 @@ var makeTempDir = exports.makeTempDir = function () { var readFirstAvailableStream = exports.readFirstAvailableStream = function () { var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (paths) { - var stream = void 0; - var triedPaths = []; for (var _iterator15 = paths, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator15);;) { var _ref35; @@ -1364,20 +1854,16 @@ var readFirstAvailableStream = exports.readFirstAvailableStream = function () { _ref35 = _i15.value; } - var tarballPath = _ref35; + var _path = _ref35; - if (tarballPath) { - try { - var fd = yield open(tarballPath, 'r'); - stream = (_fs || _load_fs()).default.createReadStream('', { fd }); - break; - } catch (err) { - // Try the next one - triedPaths.push(tarballPath); - } + try { + var fd = yield open(_path, 'r'); + return (_fs || _load_fs()).default.createReadStream(_path, { fd }); + } catch (err) { + // Try the next one } } - return { stream, triedPaths }; + return null; }); return function readFirstAvailableStream(_x35) { @@ -1438,55 +1924,55 @@ exports.normalizeOS = normalizeOS; var _fs; function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(10)); + return _fs = _interopRequireDefault(__webpack_require__(12)); } var _glob; function _load_glob() { - return _glob = _interopRequireDefault(__webpack_require__(187)); + return _glob = _interopRequireDefault(__webpack_require__(230)); } var _os; function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(73)); + return _os = _interopRequireDefault(__webpack_require__(81)); } -var _path; +var _path2; function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); + return _path2 = _interopRequireDefault(__webpack_require__(2)); } var _blockingQueue; function _load_blockingQueue() { - return _blockingQueue = _interopRequireDefault(__webpack_require__(112)); + return _blockingQueue = _interopRequireDefault(__webpack_require__(152)); } var _promise2; function _load_promise2() { - return _promise2 = _interopRequireWildcard(__webpack_require__(66)); + return _promise2 = _interopRequireWildcard(__webpack_require__(85)); } var _promise3; function _load_promise3() { - return _promise3 = __webpack_require__(66); + return _promise3 = __webpack_require__(85); } var _map2; function _load_map2() { - return _map2 = _interopRequireDefault(__webpack_require__(35)); + return _map2 = _interopRequireDefault(__webpack_require__(50)); } var _fsNormalized; function _load_fsNormalized() { - return _fsNormalized = __webpack_require__(443); + return _fsNormalized = __webpack_require__(557); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -1510,7 +1996,7 @@ var readdir = exports.readdir = (0, (_promise3 || _load_promise3()).promisify)(( var rename = exports.rename = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.rename); var access = exports.access = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.access); var stat = exports.stat = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.stat); -var mkdirp = exports.mkdirp = (0, (_promise3 || _load_promise3()).promisify)(__webpack_require__(196)); +var mkdirp = exports.mkdirp = (0, (_promise3 || _load_promise3()).promisify)(__webpack_require__(234)); var exists = exports.exists = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.exists, true); var lstat = exports.lstat = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.lstat); var chmod = exports.chmod = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.chmod); @@ -1525,8 +2011,8 @@ exports.unlink = (_fsNormalized || _load_fsNormalized()).unlink; var CONCURRENT_QUEUE_ITEMS = (_fs || _load_fs()).default.copyFile ? 128 : 4; var fsSymlink = (0, (_promise3 || _load_promise3()).promisify)((_fs || _load_fs()).default.symlink); -var invariant = __webpack_require__(9); -var stripBOM = __webpack_require__(327); +var invariant = __webpack_require__(13); +var stripBOM = __webpack_require__(423); var noop = function noop() {}; @@ -1562,151 +2048,89 @@ var cr = '\r'.charCodeAt(0); var lf = '\n'.charCodeAt(0); /***/ }), -/* 8 */ +/* 9 */ +/***/ (function(module, exports) { + +module.exports = require("util"); + +/***/ }), +/* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getPathKey = getPathKey; -var os = __webpack_require__(73); -var path = __webpack_require__(0); -var userHome = __webpack_require__(76).default; +exports.__esModule = true; -var _require = __webpack_require__(456), - getCacheDir = _require.getCacheDir, - getConfigDir = _require.getConfigDir, - getDataDir = _require.getDataDir; +var _setPrototypeOf = __webpack_require__(206); -var isWebpackBundle = __webpack_require__(637); +var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); -var DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies']; -var RESOLUTIONS = exports.RESOLUTIONS = 'resolutions'; -var MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS].concat(DEPENDENCY_TYPES); +var _create = __webpack_require__(205); -var SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0'; +var _create2 = _interopRequireDefault(_create); -var YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com'; +var _typeof2 = __webpack_require__(318); -var YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/'; -var YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh'; -var YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; +var _typeof3 = _interopRequireDefault(_typeof2); -var SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -// cache version, bump whenever we make backwards incompatible changes -var CACHE_VERSION = exports.CACHE_VERSION = 1; - -// lockfile version, bump whenever we make backwards incompatible changes -var LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; - -// max amount of network requests to perform concurrently -var NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8; - -// HTTP timeout used when downloading packages -var NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds - -// max amount of child processes to execute concurrently -var CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5; - -var REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid']; - -function getPreferredCacheDirectories() { - var preferredCacheDirectories = [getCacheDir()]; - - if (process.getuid) { - // $FlowFixMe: process.getuid exists, dammit - preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`)); +exports.default = function (subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } - preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`)); - - return preferredCacheDirectories; -} - -var PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); -var CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir(); -var DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir(); -var LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link'); -var GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global'); - -var NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath; -var YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath(); - -// Webpack needs to be configured with node.__dirname/__filename = false -function getYarnBinPath() { - if (isWebpackBundle) { - return __filename; - } else { - return path.join(__dirname, '..', 'bin', 'yarn.js'); - } -} - -var NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules'; -var NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json'; - -var POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`; -var FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn'); - -var META_FOLDER = exports.META_FOLDER = '.yarn-meta'; -var INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity'; -var LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock'; -var METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json'; -var TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz'; -var CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean'; - -var NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json'; - -var DEFAULT_INDENT = exports.DEFAULT_INDENT = ' '; -var SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997; -var SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance'; - -var ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env); - -function getPathKey(platform, env) { - var pathKey = 'PATH'; - - // windows calls its path "Path" usually, but this is not guaranteed. - if (platform === 'win32') { - pathKey = 'Path'; - - for (var _key in env) { - if (_key.toLowerCase() === 'path') { - pathKey = _key; - } + subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true } - } - - return pathKey; -} - -var VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { - major: 'red', - premajor: 'red', - minor: 'yellow', - preminor: 'yellow', - patch: 'green', - prepatch: 'green', - prerelease: 'red', - unchanged: 'white', - unknown: 'red' + }); + if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), -/* 9 */ +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _typeof2 = __webpack_require__(318); + +var _typeof3 = _interopRequireDefault(_typeof2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = function (self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; +}; + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +module.exports = require("fs"); + +/***/ }), +/* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** - * Copyright 2013-2015, Facebook, Inc. - * All rights reserved. + * Copyright (c) 2013-present, Facebook, Inc. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ @@ -1755,108 +2179,441 @@ var invariant = function(condition, format, a, b, c, d, e, f) { module.exports = invariant; -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -module.exports = require("fs"); - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(487), __esModule: true }; - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _setPrototypeOf = __webpack_require__(165); - -var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); - -var _create = __webpack_require__(254); - -var _create2 = _interopRequireDefault(_create); - -var _typeof2 = __webpack_require__(255); - -var _typeof3 = _interopRequireDefault(_typeof2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); - } - - subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; -}; - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _typeof2 = __webpack_require__(255); - -var _typeof3 = _interopRequireDefault(_typeof2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function (self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; -}; - /***/ }), /* 14 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -module.exports = require("crypto"); +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getPathKey = getPathKey; +var os = __webpack_require__(81); +var path = __webpack_require__(2); +var userHome = __webpack_require__(97).default; + +var _require = __webpack_require__(570), + getCacheDir = _require.getCacheDir, + getConfigDir = _require.getConfigDir, + getDataDir = _require.getDataDir; + +var isWebpackBundle = __webpack_require__(780); + +var DEPENDENCY_TYPES = exports.DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies', 'peerDependencies']; +var OWNED_DEPENDENCY_TYPES = exports.OWNED_DEPENDENCY_TYPES = ['devDependencies', 'dependencies', 'optionalDependencies']; + +var RESOLUTIONS = exports.RESOLUTIONS = 'resolutions'; +var MANIFEST_FIELDS = exports.MANIFEST_FIELDS = [RESOLUTIONS].concat(DEPENDENCY_TYPES); + +var SUPPORTED_NODE_VERSIONS = exports.SUPPORTED_NODE_VERSIONS = '^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0'; + +var YARN_REGISTRY = exports.YARN_REGISTRY = 'https://registry.yarnpkg.com'; +var NPM_REGISTRY_RE = exports.NPM_REGISTRY_RE = /https?:\/\/registry\.npmjs\.org/g; + +var YARN_DOCS = exports.YARN_DOCS = 'https://yarnpkg.com/en/docs/cli/'; +var YARN_INSTALLER_SH = exports.YARN_INSTALLER_SH = 'https://yarnpkg.com/install.sh'; +var YARN_INSTALLER_MSI = exports.YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi'; + +var SELF_UPDATE_VERSION_URL = exports.SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version'; + +// cache version, bump whenever we make backwards incompatible changes +var CACHE_VERSION = exports.CACHE_VERSION = 4; + +// lockfile version, bump whenever we make backwards incompatible changes +var LOCKFILE_VERSION = exports.LOCKFILE_VERSION = 1; + +// max amount of network requests to perform concurrently +var NETWORK_CONCURRENCY = exports.NETWORK_CONCURRENCY = 8; + +// HTTP timeout used when downloading packages +var NETWORK_TIMEOUT = exports.NETWORK_TIMEOUT = 30 * 1000; // in milliseconds + +// max amount of child processes to execute concurrently +var CHILD_CONCURRENCY = exports.CHILD_CONCURRENCY = 5; + +var REQUIRED_PACKAGE_KEYS = exports.REQUIRED_PACKAGE_KEYS = ['name', 'version', '_uid']; + +function getPreferredCacheDirectories() { + var preferredCacheDirectories = [getCacheDir()]; + + if (process.getuid) { + // $FlowFixMe: process.getuid exists, dammit + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache-${process.getuid()}`)); + } + + preferredCacheDirectories.push(path.join(os.tmpdir(), `.yarn-cache`)); + + return preferredCacheDirectories; +} + +var PREFERRED_MODULE_CACHE_DIRECTORIES = exports.PREFERRED_MODULE_CACHE_DIRECTORIES = getPreferredCacheDirectories(); +var CONFIG_DIRECTORY = exports.CONFIG_DIRECTORY = getConfigDir(); +var DATA_DIRECTORY = exports.DATA_DIRECTORY = getDataDir(); +var LINK_REGISTRY_DIRECTORY = exports.LINK_REGISTRY_DIRECTORY = path.join(DATA_DIRECTORY, 'link'); +var GLOBAL_MODULE_DIRECTORY = exports.GLOBAL_MODULE_DIRECTORY = path.join(DATA_DIRECTORY, 'global'); + +var NODE_BIN_PATH = exports.NODE_BIN_PATH = process.execPath; +var YARN_BIN_PATH = exports.YARN_BIN_PATH = getYarnBinPath(); + +// Webpack needs to be configured with node.__dirname/__filename = false +function getYarnBinPath() { + if (isWebpackBundle) { + return __filename; + } else { + return path.join(__dirname, '..', 'bin', 'yarn.js'); + } +} + +var NODE_MODULES_FOLDER = exports.NODE_MODULES_FOLDER = 'node_modules'; +var NODE_PACKAGE_JSON = exports.NODE_PACKAGE_JSON = 'package.json'; + +var PNP_FILENAME = exports.PNP_FILENAME = '.pnp.js'; + +var POSIX_GLOBAL_PREFIX = exports.POSIX_GLOBAL_PREFIX = `${process.env.DESTDIR || ''}/usr/local`; +var FALLBACK_GLOBAL_PREFIX = exports.FALLBACK_GLOBAL_PREFIX = path.join(userHome, '.yarn'); + +var META_FOLDER = exports.META_FOLDER = '.yarn-meta'; +var INTEGRITY_FILENAME = exports.INTEGRITY_FILENAME = '.yarn-integrity'; +var LOCKFILE_FILENAME = exports.LOCKFILE_FILENAME = 'yarn.lock'; +var METADATA_FILENAME = exports.METADATA_FILENAME = '.yarn-metadata.json'; +var TARBALL_FILENAME = exports.TARBALL_FILENAME = '.yarn-tarball.tgz'; +var CLEAN_FILENAME = exports.CLEAN_FILENAME = '.yarnclean'; + +var NPM_LOCK_FILENAME = exports.NPM_LOCK_FILENAME = 'package-lock.json'; +var NPM_SHRINKWRAP_FILENAME = exports.NPM_SHRINKWRAP_FILENAME = 'npm-shrinkwrap.json'; + +var DEFAULT_INDENT = exports.DEFAULT_INDENT = ' '; +var SINGLE_INSTANCE_PORT = exports.SINGLE_INSTANCE_PORT = 31997; +var SINGLE_INSTANCE_FILENAME = exports.SINGLE_INSTANCE_FILENAME = '.yarn-single-instance'; + +var ENV_PATH_KEY = exports.ENV_PATH_KEY = getPathKey(process.platform, process.env); + +function getPathKey(platform, env) { + var pathKey = 'PATH'; + + // windows calls its path "Path" usually, but this is not guaranteed. + if (platform === 'win32') { + pathKey = 'Path'; + + for (var _key in env) { + if (_key.toLowerCase() === 'path') { + pathKey = _key; + } + } + } + + return pathKey; +} + +var VERSION_COLOR_SCHEME = exports.VERSION_COLOR_SCHEME = { + major: 'red', + premajor: 'red', + minor: 'yellow', + preminor: 'yellow', + patch: 'green', + prepatch: 'green', + prerelease: 'red', + unchanged: 'white', + unknown: 'red' +}; /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(491), __esModule: true }; +module.exports = { "default": __webpack_require__(618), __esModule: true }; /***/ }), /* 16 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Observable; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_canReportError__ = __webpack_require__(254); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__ = __webpack_require__(973); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__ = __webpack_require__(105); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(256); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__config__ = __webpack_require__(169); +/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */ + + + + + +var Observable = /*@__PURE__*/ (function () { + function Observable(subscribe) { + this._isScalar = false; + if (subscribe) { + this._subscribe = subscribe; + } + } + Observable.prototype.lift = function (operator) { + var observable = new Observable(); + observable.source = this; + observable.operator = operator; + return observable; + }; + Observable.prototype.subscribe = function (observerOrNext, error, complete) { + var operator = this.operator; + var sink = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_toSubscriber__["a" /* toSubscriber */])(observerOrNext, error, complete); + if (operator) { + operator.call(sink, this.source); + } + else { + sink.add(this.source || (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ? + this._subscribe(sink) : + this._trySubscribe(sink)); + } + if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + if (sink.syncErrorThrowable) { + sink.syncErrorThrowable = false; + if (sink.syncErrorThrown) { + throw sink.syncErrorValue; + } + } + } + return sink; + }; + Observable.prototype._trySubscribe = function (sink) { + try { + return this._subscribe(sink); + } + catch (err) { + if (__WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + sink.syncErrorThrown = true; + sink.syncErrorValue = err; + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_canReportError__["a" /* canReportError */])(sink)) { + sink.error(err); + } + else { + console.warn(err); + } + } + }; + Observable.prototype.forEach = function (next, promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var subscription; + subscription = _this.subscribe(function (value) { + try { + next(value); + } + catch (err) { + reject(err); + if (subscription) { + subscription.unsubscribe(); + } + } + }, reject, resolve); + }); + }; + Observable.prototype._subscribe = function (subscriber) { + var source = this.source; + return source && source.subscribe(subscriber); + }; + Observable.prototype[__WEBPACK_IMPORTED_MODULE_2__internal_symbol_observable__["a" /* observable */]] = function () { + return this; + }; + Observable.prototype.pipe = function () { + var operations = []; + for (var _i = 0; _i < arguments.length; _i++) { + operations[_i] = arguments[_i]; + } + if (operations.length === 0) { + return this; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["b" /* pipeFromArray */])(operations)(this); + }; + Observable.prototype.toPromise = function (promiseCtor) { + var _this = this; + promiseCtor = getPromiseCtor(promiseCtor); + return new promiseCtor(function (resolve, reject) { + var value; + _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); }); + }); + }; + Observable.create = function (subscribe) { + return new Observable(subscribe); + }; + return Observable; +}()); + +function getPromiseCtor(promiseCtor) { + if (!promiseCtor) { + promiseCtor = __WEBPACK_IMPORTED_MODULE_4__config__["a" /* config */].Promise || Promise; + } + if (!promiseCtor) { + throw new Error('no Promise impl found'); + } + return promiseCtor; +} +//# sourceMappingURL=Observable.js.map -module.exports = { "default": __webpack_require__(484), __esModule: true }; /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(623), __esModule: true }; + +/***/ }), +/* 18 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OuterSubscriber; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +var OuterSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](OuterSubscriber, _super); + function OuterSubscriber() { + return _super !== null && _super.apply(this, arguments) || this; + } + OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.destination.next(innerValue); + }; + OuterSubscriber.prototype.notifyError = function (error, innerSub) { + this.destination.error(error); + }; + OuterSubscriber.prototype.notifyComplete = function (innerSub) { + this.destination.complete(); + }; + return OuterSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); + +//# sourceMappingURL=OuterSubscriber.js.map + + +/***/ }), +/* 19 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = subscribeToResult; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__subscribeTo__ = __webpack_require__(410); +/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */ + + +function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) { + if (destination === void 0) { + destination = new __WEBPACK_IMPORTED_MODULE_0__InnerSubscriber__["a" /* InnerSubscriber */](outerSubscriber, outerValue, outerIndex); + } + if (destination.closed) { + return; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__subscribeTo__["a" /* subscribeTo */])(result)(destination); +} +//# sourceMappingURL=subscribeToResult.js.map + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* eslint-disable node/no-deprecated-api */ + + + +var buffer = __webpack_require__(109) +var Buffer = buffer.Buffer + +var safer = {} + +var key + +for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue + if (key === 'SlowBuffer' || key === 'Buffer') continue + safer[key] = buffer[key] +} + +var Safer = safer.Buffer = {} +for (key in Buffer) { + if (!Buffer.hasOwnProperty(key)) continue + if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue + Safer[key] = Buffer[key] +} + +safer.Buffer.prototype = Buffer.prototype + +if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) + } + if (value && typeof value.length === 'undefined') { + throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) + } + return Buffer(value, encodingOrOffset, length) + } +} + +if (!Safer.alloc) { + Safer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + var buf = Buffer(size) + if (!fill || fill.length === 0) { + buf.fill(0) + } else if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + return buf + } +} + +if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding('buffer').kStringMaxLength + } catch (e) { + // we can't determine kStringMaxLength in environments where process.binding + // is unsupported, so let's not set it + } +} + +if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + } + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength + } +} + +module.exports = safer + + +/***/ }), +/* 21 */ +/***/ (function(module, exports) { + +module.exports = require("crypto"); + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + // Copyright (c) 2012, Mark Cavage. All rights reserved. // Copyright 2015 Joyent, Inc. -var assert = __webpack_require__(36); -var Stream = __webpack_require__(29).Stream; -var util = __webpack_require__(4); +var assert = __webpack_require__(49); +var Stream = __webpack_require__(34).Stream; +var util = __webpack_require__(9); ///--- Globals @@ -2065,7 +2822,13 @@ module.exports = _setExports(process.env.NODE_NDEBUG); /***/ }), -/* 18 */ +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(615), __esModule: true }; + +/***/ }), +/* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2074,114 +2837,334 @@ module.exports = _setExports(process.env.NODE_NDEBUG); Object.defineProperty(exports, "__esModule", { value: true }); +exports.stringify = exports.parse = undefined; -var _promise; +var _getIterator2; -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } -exports.sortAlpha = sortAlpha; -exports.entries = entries; -exports.removePrefix = removePrefix; -exports.removeSuffix = removeSuffix; -exports.addSuffix = addSuffix; -exports.hyphenate = hyphenate; -exports.camelCase = camelCase; -exports.compareSortedArrays = compareSortedArrays; -exports.sleep = sleep; +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(41)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _parse; + +function _load_parse() { + return _parse = __webpack_require__(299); +} + +Object.defineProperty(exports, 'parse', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_parse || _load_parse()).default; + } +}); + +var _stringify; + +function _load_stringify() { + return _stringify = __webpack_require__(535); +} + +Object.defineProperty(exports, 'stringify', { + enumerable: true, + get: function get() { + return _interopRequireDefault(_stringify || _load_stringify()).default; + } +}); +exports.implodeEntry = implodeEntry; +exports.explodeEntry = explodeEntry; + +var _misc; + +function _load_misc() { + return _misc = __webpack_require__(27); +} + +var _normalizePattern; + +function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(51); +} + +var _parse2; + +function _load_parse2() { + return _parse2 = _interopRequireDefault(__webpack_require__(299)); +} + +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(14); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _camelCase = __webpack_require__(469); +var invariant = __webpack_require__(13); -function sortAlpha(a, b) { - // sort alphabetically in a deterministic way - var shortLen = Math.min(a.length, b.length); - for (var i = 0; i < shortLen; i++) { - var aChar = a.charCodeAt(i); - var bChar = b.charCodeAt(i); - if (aChar !== bChar) { - return aChar - bChar; - } - } - return a.length - b.length; +var path = __webpack_require__(2); +var ssri = __webpack_require__(107); + +function getName(pattern) { + return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; } -function entries(obj) { - var entries = []; - if (obj) { - for (var _key in obj) { - entries.push([_key, obj[_key]]); - } - } - return entries; +function blankObjectUndefined(obj) { + return obj && (0, (_keys || _load_keys()).default)(obj).length ? obj : undefined; } -function removePrefix(pattern, prefix) { - if (pattern.startsWith(prefix)) { - pattern = pattern.slice(prefix.length); - } - - return pattern; +function keyForRemote(remote) { + return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); } -function removeSuffix(pattern, suffix) { - if (pattern.endsWith(suffix)) { - return pattern.slice(0, -suffix.length); - } - - return pattern; +function serializeIntegrity(integrity) { + // We need this because `Integrity.toString()` does not use sorting to ensure a stable string output + // See https://git.io/vx2Hy + return integrity.toString().split(' ').sort().join(' '); } -function addSuffix(pattern, suffix) { - if (!pattern.endsWith(suffix)) { - return pattern + suffix; +function implodeEntry(pattern, obj) { + var inferredName = getName(pattern); + var integrity = obj.integrity ? serializeIntegrity(obj.integrity) : ''; + var imploded = { + name: inferredName === obj.name ? undefined : obj.name, + version: obj.version, + uid: obj.uid === obj.version ? undefined : obj.uid, + resolved: obj.resolved, + registry: obj.registry === 'npm' ? undefined : obj.registry, + dependencies: blankObjectUndefined(obj.dependencies), + optionalDependencies: blankObjectUndefined(obj.optionalDependencies), + permissions: blankObjectUndefined(obj.permissions), + prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) + }; + if (integrity) { + imploded.integrity = integrity; } - - return pattern; + return imploded; } -function hyphenate(str) { - return str.replace(/[A-Z]/g, function (match) { - return '-' + match.charAt(0).toLowerCase(); - }); +function explodeEntry(pattern, obj) { + obj.optionalDependencies = obj.optionalDependencies || {}; + obj.dependencies = obj.dependencies || {}; + obj.uid = obj.uid || obj.version; + obj.permissions = obj.permissions || {}; + obj.registry = obj.registry || 'npm'; + obj.name = obj.name || getName(pattern); + var integrity = obj.integrity; + if (integrity && integrity.isIntegrity) { + obj.integrity = ssri.parse(integrity); + } + return obj; } -function camelCase(str) { - if (/[A-Z]/.test(str)) { - return null; - } else { - return _camelCase(str); - } -} +var Lockfile = function () { + function Lockfile() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + cache = _ref.cache, + source = _ref.source, + parseResultType = _ref.parseResultType; -function compareSortedArrays(array1, array2) { - if (array1.length !== array2.length) { - return false; + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Lockfile); + + this.source = source || ''; + this.cache = cache; + this.parseResultType = parseResultType; } - for (var i = 0, len = array1.length; i < len; i++) { - if (array1[i] !== array2[i]) { + + // source string if the `cache` was parsed + + + // if true, we're parsing an old yarn file and need to update integrity fields + Lockfile.prototype.hasEntriesExistWithoutIntegrity = function hasEntriesExistWithoutIntegrity() { + if (!this.cache) { return false; } - } - return true; -} -function sleep(ms) { - return new (_promise || _load_promise()).default(function (resolve) { - setTimeout(resolve, ms); - }); -} + for (var _key in this.cache) { + // $FlowFixMe - `this.cache` is clearly defined at this point + if (!/^.*@(file:|http)/.test(_key) && this.cache[_key] && !this.cache[_key].integrity) { + return true; + } + } + + return false; + }; + + Lockfile.fromDirectory = function () { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, reporter) { + // read the manifest in this directory + var lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); + + var lockfile = void 0; + var rawLockfile = ''; + var parseResult = void 0; + + if (yield (_fs || _load_fs()).exists(lockfileLoc)) { + rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); + parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); + + if (reporter) { + if (parseResult.type === 'merge') { + reporter.info(reporter.lang('lockfileMerged')); + } else if (parseResult.type === 'conflict') { + reporter.warn(reporter.lang('lockfileConflict')); + } + } + + lockfile = parseResult.object; + } else if (reporter) { + reporter.info(reporter.lang('noLockfileFound')); + } + + return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); + }); + + function fromDirectory(_x2, _x3) { + return _ref2.apply(this, arguments); + } + + return fromDirectory; + }(); + + Lockfile.prototype.getLocked = function getLocked(pattern) { + var cache = this.cache; + if (!cache) { + return undefined; + } + + var shrunk = pattern in cache && cache[pattern]; + + if (typeof shrunk === 'string') { + return this.getLocked(shrunk); + } else if (shrunk) { + explodeEntry(pattern, shrunk); + return shrunk; + } + + return undefined; + }; + + Lockfile.prototype.removePattern = function removePattern(pattern) { + var cache = this.cache; + if (!cache) { + return; + } + delete cache[pattern]; + }; + + Lockfile.prototype.getLockfile = function getLockfile(patterns) { + var lockfile = {}; + var seen = new (_map || _load_map()).default(); + + // order by name so that lockfile manifest is assigned to the first dependency with this manifest + // the others that have the same remoteKey will just refer to the first + // ordering allows for consistency in lockfile when it is serialized + var sortedPatternsKeys = (0, (_keys || _load_keys()).default)(patterns).sort((_misc || _load_misc()).sortAlpha); + + for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref3; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref3 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref3 = _i.value; + } + + var pattern = _ref3; + + var pkg = patterns[pattern]; + var remote = pkg._remote, + ref = pkg._reference; + + invariant(ref, 'Package is missing a reference'); + invariant(remote, 'Package is missing a remote'); + + var remoteKey = keyForRemote(remote); + var seenPattern = remoteKey && seen.get(remoteKey); + if (seenPattern) { + // no point in duplicating it + lockfile[pattern] = seenPattern; + + // if we're relying on our name being inferred and two of the patterns have + // different inferred names then we need to set it + if (!seenPattern.name && getName(pattern) !== pkg.name) { + seenPattern.name = pkg.name; + } + continue; + } + var obj = implodeEntry(pattern, { + name: pkg.name, + version: pkg.version, + uid: pkg._uid, + resolved: remote.resolved, + integrity: remote.integrity, + registry: remote.registry, + dependencies: pkg.dependencies, + peerDependencies: pkg.peerDependencies, + optionalDependencies: pkg.optionalDependencies, + permissions: ref.permissions, + prebuiltVariants: pkg.prebuiltVariants + }); + + lockfile[pattern] = obj; + + if (remoteKey) { + seen.set(remoteKey, obj); + } + } + + return lockfile; + }; + + return Lockfile; +}(); + +exports.default = Lockfile; /***/ }), -/* 19 */ +/* 25 */ /***/ (function(module, exports) { -module.exports = require("url"); +var core = module.exports = { version: '2.5.7' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + /***/ }), -/* 20 */ +/* 26 */ /***/ (function(module, exports) { exports = module.exports = SemVer; @@ -2207,6 +3190,9 @@ exports.SEMVER_SPEC_VERSION = '2.0.0'; var MAX_LENGTH = 256; var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; +// Max safe segment length for coercion. +var MAX_SAFE_COMPONENT_LENGTH = 16; + // The actual regexps go on exports.re var re = exports.re = []; var src = exports.src = []; @@ -2342,6 +3328,15 @@ src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; var XRANGELOOSE = R++; src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +var COERCE = R++; +src[COERCE] = '(?:^|[^\\d])' + + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + + '(?:$|[^\\d])'; + // Tilde ranges. // Meaning is "reasonably at or greater than" var LONETILDE = R++; @@ -2749,7 +3744,7 @@ function patch(a, loose) { exports.compare = compare; function compare(a, b, loose) { - return new SemVer(a, loose).compare(b); + return new SemVer(a, loose).compare(new SemVer(b, loose)); } exports.compareLoose = compareLoose; @@ -2890,11 +3885,59 @@ Comparator.prototype.test = function(version) { return cmp(version, this.operator, this.semver, this.loose); }; +Comparator.prototype.intersects = function(comp, loose) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required'); + } + + var rangeTmp; + + if (this.operator === '') { + rangeTmp = new Range(comp.value, loose); + return satisfies(this.value, rangeTmp, loose); + } else if (comp.operator === '') { + rangeTmp = new Range(this.value, loose); + return satisfies(comp.semver, rangeTmp, loose); + } + + var sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>'); + var sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<'); + var sameSemVer = this.semver.version === comp.semver.version; + var differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<='); + var oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, loose) && + ((this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<')); + var oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, loose) && + ((this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>')); + + return sameDirectionIncreasing || sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; +}; + exports.Range = Range; function Range(range, loose) { - if ((range instanceof Range) && range.loose === loose) - return range; + if (range instanceof Range) { + if (range.loose === loose) { + return range; + } else { + return new Range(range.raw, loose); + } + } + + if (range instanceof Comparator) { + return new Range(range.value, loose); + } if (!(this instanceof Range)) return new Range(range, loose); @@ -2969,6 +4012,22 @@ Range.prototype.parseRange = function(range) { return set; }; +Range.prototype.intersects = function(range, loose) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required'); + } + + return this.set.some(function(thisComparators) { + return thisComparators.every(function(thisComparator) { + return range.set.some(function(rangeComparators) { + return rangeComparators.every(function(rangeComparator) { + return thisComparator.intersects(rangeComparator, loose); + }); + }); + }); + }); +}; + // Mostly just for testing and legacy API reasons exports.toComparators = toComparators; function toComparators(range, loose) { @@ -3273,20 +4332,42 @@ function satisfies(version, range, loose) { exports.maxSatisfying = maxSatisfying; function maxSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return rcompare(a, b, loose); - })[0] || null; + var max = null; + var maxSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) + max = v; + maxSV = new SemVer(max, loose); + } + } + }) + return max; } exports.minSatisfying = minSatisfying; function minSatisfying(versions, range, loose) { - return versions.filter(function(version) { - return satisfies(version, range, loose); - }).sort(function(a, b) { - return compare(a, b, loose); - })[0] || null; + var min = null; + var minSV = null; + try { + var rangeObj = new Range(range, loose); + } catch (er) { + return null; + } + versions.forEach(function (v) { + if (rangeObj.test(v)) { // satisfies(v, range, loose) + if (!min || minSV.compare(v) === 1) { // compare(min, v, true) + min = v; + minSV = new SemVer(min, loose); + } + } + }) + return min; } exports.validRange = validRange; @@ -3388,9 +4469,32 @@ function prerelease(version, loose) { return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; } +exports.intersects = intersects; +function intersects(r1, r2, loose) { + r1 = new Range(r1, loose) + r2 = new Range(r2, loose) + return r1.intersects(r2) +} + +exports.coerce = coerce; +function coerce(version) { + if (version instanceof SemVer) + return version; + + if (typeof version !== 'string') + return null; + + var match = version.match(re[COERCE]); + + if (match == null) + return null; + + return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); +} + /***/ }), -/* 21 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3399,300 +4503,115 @@ function prerelease(version, loose) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.stringify = exports.parse = undefined; -var _getIterator2; +var _promise; -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); } -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _parse; - -function _load_parse() { - return _parse = __webpack_require__(238); -} - -Object.defineProperty(exports, 'parse', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_parse || _load_parse()).default; - } -}); - -var _stringify; - -function _load_stringify() { - return _stringify = __webpack_require__(421); -} - -Object.defineProperty(exports, 'stringify', { - enumerable: true, - get: function get() { - return _interopRequireDefault(_stringify || _load_stringify()).default; - } -}); -exports.implodeEntry = implodeEntry; -exports.explodeEntry = explodeEntry; - -var _misc; - -function _load_misc() { - return _misc = __webpack_require__(18); -} - -var _normalizePattern; - -function _load_normalizePattern() { - return _normalizePattern = __webpack_require__(42); -} - -var _parse2; - -function _load_parse2() { - return _parse2 = _interopRequireDefault(__webpack_require__(238)); -} - -var _constants; - -function _load_constants() { - return _constants = __webpack_require__(8); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } +exports.sortAlpha = sortAlpha; +exports.sortOptionsByFlags = sortOptionsByFlags; +exports.entries = entries; +exports.removePrefix = removePrefix; +exports.removeSuffix = removeSuffix; +exports.addSuffix = addSuffix; +exports.hyphenate = hyphenate; +exports.camelCase = camelCase; +exports.compareSortedArrays = compareSortedArrays; +exports.sleep = sleep; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var _camelCase = __webpack_require__(583); -var path = __webpack_require__(0); - -function getName(pattern) { - return (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(pattern).name; +function sortAlpha(a, b) { + // sort alphabetically in a deterministic way + var shortLen = Math.min(a.length, b.length); + for (var i = 0; i < shortLen; i++) { + var aChar = a.charCodeAt(i); + var bChar = b.charCodeAt(i); + if (aChar !== bChar) { + return aChar - bChar; + } + } + return a.length - b.length; } -function blankObjectUndefined(obj) { - return obj && (0, (_keys || _load_keys()).default)(obj).length ? obj : undefined; +function sortOptionsByFlags(a, b) { + var aOpt = a.flags.replace(/-/g, ''); + var bOpt = b.flags.replace(/-/g, ''); + return sortAlpha(aOpt, bOpt); } -function keyForRemote(remote) { - return remote.resolved || (remote.reference && remote.hash ? `${remote.reference}#${remote.hash}` : null); +function entries(obj) { + var entries = []; + if (obj) { + for (var _key in obj) { + entries.push([_key, obj[_key]]); + } + } + return entries; } -function implodeEntry(pattern, obj) { - var inferredName = getName(pattern); - return { - name: inferredName === obj.name ? undefined : obj.name, - version: obj.version, - uid: obj.uid === obj.version ? undefined : obj.uid, - resolved: obj.resolved, - registry: obj.registry === 'npm' ? undefined : obj.registry, - dependencies: blankObjectUndefined(obj.dependencies), - optionalDependencies: blankObjectUndefined(obj.optionalDependencies), - permissions: blankObjectUndefined(obj.permissions), - prebuiltVariants: blankObjectUndefined(obj.prebuiltVariants) - }; -} - -function explodeEntry(pattern, obj) { - obj.optionalDependencies = obj.optionalDependencies || {}; - obj.dependencies = obj.dependencies || {}; - obj.uid = obj.uid || obj.version; - obj.permissions = obj.permissions || {}; - obj.registry = obj.registry || 'npm'; - obj.name = obj.name || getName(pattern); - return obj; -} - -var Lockfile = function () { - function Lockfile() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - cache = _ref.cache, - source = _ref.source, - parseResultType = _ref.parseResultType; - - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Lockfile); - - this.source = source || ''; - this.cache = cache; - this.parseResultType = parseResultType; +function removePrefix(pattern, prefix) { + if (pattern.startsWith(prefix)) { + pattern = pattern.slice(prefix.length); } - // source string if the `cache` was parsed + return pattern; +} +function removeSuffix(pattern, suffix) { + if (pattern.endsWith(suffix)) { + return pattern.slice(0, -suffix.length); + } - Lockfile.fromDirectory = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, reporter) { - // read the manifest in this directory - var lockfileLoc = path.join(dir, (_constants || _load_constants()).LOCKFILE_FILENAME); + return pattern; +} - var lockfile = void 0; - var rawLockfile = ''; - var parseResult = void 0; +function addSuffix(pattern, suffix) { + if (!pattern.endsWith(suffix)) { + return pattern + suffix; + } - if (yield (_fs || _load_fs()).exists(lockfileLoc)) { - rawLockfile = yield (_fs || _load_fs()).readFile(lockfileLoc); - parseResult = (0, (_parse2 || _load_parse2()).default)(rawLockfile, lockfileLoc); + return pattern; +} - if (reporter) { - if (parseResult.type === 'merge') { - reporter.info(reporter.lang('lockfileMerged')); - } else if (parseResult.type === 'conflict') { - reporter.warn(reporter.lang('lockfileConflict')); - } - } +function hyphenate(str) { + return str.replace(/[A-Z]/g, function (match) { + return '-' + match.charAt(0).toLowerCase(); + }); +} - lockfile = parseResult.object; - } else if (reporter) { - reporter.info(reporter.lang('noLockfileFound')); - } +function camelCase(str) { + if (/[A-Z]/.test(str)) { + return null; + } else { + return _camelCase(str); + } +} - return new Lockfile({ cache: lockfile, source: rawLockfile, parseResultType: parseResult && parseResult.type }); - }); - - function fromDirectory(_x2, _x3) { - return _ref2.apply(this, arguments); +function compareSortedArrays(array1, array2) { + if (array1.length !== array2.length) { + return false; + } + for (var i = 0, len = array1.length; i < len; i++) { + if (array1[i] !== array2[i]) { + return false; } + } + return true; +} - return fromDirectory; - }(); - - Lockfile.prototype.getLocked = function getLocked(pattern) { - var cache = this.cache; - if (!cache) { - return undefined; - } - - var shrunk = pattern in cache && cache[pattern]; - - if (typeof shrunk === 'string') { - return this.getLocked(shrunk); - } else if (shrunk) { - explodeEntry(pattern, shrunk); - return shrunk; - } - - return undefined; - }; - - Lockfile.prototype.removePattern = function removePattern(pattern) { - var cache = this.cache; - if (!cache) { - return; - } - delete cache[pattern]; - }; - - Lockfile.prototype.getLockfile = function getLockfile(patterns) { - var lockfile = {}; - var seen = new (_map || _load_map()).default(); - - // order by name so that lockfile manifest is assigned to the first dependency with this manifest - // the others that have the same remoteKey will just refer to the first - // ordering allows for consistency in lockfile when it is serialized - var sortedPatternsKeys = (0, (_keys || _load_keys()).default)(patterns).sort((_misc || _load_misc()).sortAlpha); - - for (var _iterator = sortedPatternsKeys, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var pattern = _ref3; - - var pkg = patterns[pattern]; - var remote = pkg._remote, - ref = pkg._reference; - - invariant(ref, 'Package is missing a reference'); - invariant(remote, 'Package is missing a remote'); - - var remoteKey = keyForRemote(remote); - var seenPattern = remoteKey && seen.get(remoteKey); - if (seenPattern) { - // no point in duplicating it - lockfile[pattern] = seenPattern; - - // if we're relying on our name being inferred and two of the patterns have - // different inferred names then we need to set it - if (!seenPattern.name && getName(pattern) !== pkg.name) { - seenPattern.name = pkg.name; - } - continue; - } - var obj = implodeEntry(pattern, { - name: pkg.name, - version: pkg.version, - uid: pkg._uid, - resolved: remote.resolved, - registry: remote.registry, - dependencies: pkg.dependencies, - peerDependencies: pkg.peerDependencies, - optionalDependencies: pkg.optionalDependencies, - permissions: ref.permissions, - prebuiltVariants: pkg.prebuiltVariants - }); - - lockfile[pattern] = obj; - - if (remoteKey) { - seen.set(remoteKey, obj); - } - } - - return lockfile; - }; - - return Lockfile; -}(); - -exports.default = Lockfile; +function sleep(ms) { + return new (_promise || _load_promise()).default(function (resolve) { + setTimeout(resolve, ms); + }); +} /***/ }), -/* 22 */ -/***/ (function(module, exports) { - -var core = module.exports = {version: '2.4.0'}; -if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }), -/* 23 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3700,7 +4619,7 @@ if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef exports.__esModule = true; -var _assign = __webpack_require__(16); +var _assign = __webpack_require__(23); var _assign2 = _interopRequireDefault(_assign); @@ -3721,35 +4640,159 @@ exports.default = _assign2.default || function (target) { }; /***/ }), -/* 24 */ +/* 29 */ /***/ (function(module, exports) { -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; +module.exports = require("url"); + +/***/ }), +/* 30 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subscription; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isArray__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isObject__ = __webpack_require__(408); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isFunction__ = __webpack_require__(137); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_tryCatch__ = __webpack_require__(57); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_errorObject__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__ = __webpack_require__(405); +/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */ + + + + + + +var Subscription = /*@__PURE__*/ (function () { + function Subscription(unsubscribe) { + this.closed = false; + this._parent = null; + this._parents = null; + this._subscriptions = null; + if (unsubscribe) { + this._unsubscribe = unsubscribe; + } + } + Subscription.prototype.unsubscribe = function () { + var hasErrors = false; + var errors; + if (this.closed) { + return; + } + var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions; + this.closed = true; + this._parent = null; + this._parents = null; + this._subscriptions = null; + var index = -1; + var len = _parents ? _parents.length : 0; + while (_parent) { + _parent.remove(this); + _parent = ++index < len && _parents[index] || null; + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isFunction__["a" /* isFunction */])(_unsubscribe)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(_unsubscribe).call(this); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || (__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */] ? + flattenUnsubscriptionErrors(__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e.errors) : [__WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e]); + } + } + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_isArray__["a" /* isArray */])(_subscriptions)) { + index = -1; + len = _subscriptions.length; + while (++index < len) { + var sub = _subscriptions[index]; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isObject__["a" /* isObject */])(sub)) { + var trial = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_tryCatch__["a" /* tryCatch */])(sub.unsubscribe).call(sub); + if (trial === __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */]) { + hasErrors = true; + errors = errors || []; + var err = __WEBPACK_IMPORTED_MODULE_4__util_errorObject__["a" /* errorObject */].e; + if (err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) { + errors = errors.concat(flattenUnsubscriptionErrors(err.errors)); + } + else { + errors.push(err); + } + } + } + } + } + if (hasErrors) { + throw new __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */](errors); + } + }; + Subscription.prototype.add = function (teardown) { + if (!teardown || (teardown === Subscription.EMPTY)) { + return Subscription.EMPTY; + } + if (teardown === this) { + return this; + } + var subscription = teardown; + switch (typeof teardown) { + case 'function': + subscription = new Subscription(teardown); + case 'object': + if (subscription.closed || typeof subscription.unsubscribe !== 'function') { + return subscription; + } + else if (this.closed) { + subscription.unsubscribe(); + return subscription; + } + else if (typeof subscription._addParent !== 'function') { + var tmp = subscription; + subscription = new Subscription(); + subscription._subscriptions = [tmp]; + } + break; + default: + throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.'); + } + var subscriptions = this._subscriptions || (this._subscriptions = []); + subscriptions.push(subscription); + subscription._addParent(this); + return subscription; + }; + Subscription.prototype.remove = function (subscription) { + var subscriptions = this._subscriptions; + if (subscriptions) { + var subscriptionIndex = subscriptions.indexOf(subscription); + if (subscriptionIndex !== -1) { + subscriptions.splice(subscriptionIndex, 1); + } + } + }; + Subscription.prototype._addParent = function (parent) { + var _a = this, _parent = _a._parent, _parents = _a._parents; + if (!_parent || _parent === parent) { + this._parent = parent; + } + else if (!_parents) { + this._parents = [parent]; + } + else if (_parents.indexOf(parent) === -1) { + _parents.push(parent); + } + }; + Subscription.EMPTY = (function (empty) { + empty.closed = true; + return empty; + }(new Subscription())); + return Subscription; +}()); + +function flattenUnsubscriptionErrors(errors) { + return errors.reduce(function (errs, err) { return errs.concat((err instanceof __WEBPACK_IMPORTED_MODULE_5__util_UnsubscriptionError__["a" /* UnsubscriptionError */]) ? err.errors : err); }, []); +} +//# sourceMappingURL=Subscription.js.map /***/ }), -/* 25 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -3758,18 +4801,32 @@ module.exports = { bufferSplit: bufferSplit, addRSAMissing: addRSAMissing, calculateDSAPublic: calculateDSAPublic, + calculateED25519Public: calculateED25519Public, + calculateX25519Public: calculateX25519Public, mpNormalize: mpNormalize, + mpDenormalize: mpDenormalize, ecNormalize: ecNormalize, countZeros: countZeros, assertCompatible: assertCompatible, isCompatible: isCompatible, opensslKeyDeriv: opensslKeyDeriv, - opensshCipherInfo: opensshCipherInfo + opensshCipherInfo: opensshCipherInfo, + publicFromPrivateECDSA: publicFromPrivateECDSA, + zeroPadToLength: zeroPadToLength, + writeBitString: writeBitString, + readBitString: readBitString }; -var assert = __webpack_require__(17); -var PrivateKey = __webpack_require__(28); -var crypto = __webpack_require__(14); +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var PrivateKey = __webpack_require__(38); +var Key = __webpack_require__(33); +var crypto = __webpack_require__(21); +var algs = __webpack_require__(37); +var asn1 = __webpack_require__(66); + +var ec, jsbn; +var nacl; var MAX_CLASS_DEPTH = 3; @@ -3842,7 +4899,7 @@ function opensslKeyDeriv(cipher, salt, passphrase, count) { salt = salt.slice(0, PKCS5_SALT_LEN); var D, D_prev, bufs; - var material = new Buffer(0); + var material = Buffer.alloc(0); while (material.length < clen.key + clen.iv) { bufs = []; if (D_prev) @@ -3926,18 +4983,59 @@ function ecNormalize(buf, addZero) { if (!addZero) return (buf); } - var b = new Buffer(buf.length + 1); + var b = Buffer.alloc(buf.length + 1); b[0] = 0x0; buf.copy(b, 1); return (b); } +function readBitString(der, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var buf = der.readString(tag, true); + assert.strictEqual(buf[0], 0x00, 'bit strings with unused bits are ' + + 'not supported (0x' + buf[0].toString(16) + ')'); + return (buf.slice(1)); +} + +function writeBitString(der, buf, tag) { + if (tag === undefined) + tag = asn1.Ber.BitString; + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + der.writeBuffer(b, tag); +} + function mpNormalize(buf) { assert.buffer(buf); while (buf.length > 1 && buf[0] === 0x00 && (buf[1] & 0x80) === 0x00) buf = buf.slice(1); if ((buf[0] & 0x80) === 0x80) { - var b = new Buffer(buf.length + 1); + var b = Buffer.alloc(buf.length + 1); + b[0] = 0x00; + buf.copy(b, 1); + buf = b; + } + return (buf); +} + +function mpDenormalize(buf) { + assert.buffer(buf); + while (buf.length > 1 && buf[0] === 0x00) + buf = buf.slice(1); + return (buf); +} + +function zeroPadToLength(buf, len) { + assert.buffer(buf); + assert.number(len); + while (buf.length > len) { + assert.equal(buf[0], 0x00); + buf = buf.slice(1); + } + while (buf.length < len) { + var b = Buffer.alloc(buf.length + 1); b[0] = 0x00; buf.copy(b, 1); buf = b; @@ -3946,7 +5044,7 @@ function mpNormalize(buf) { } function bigintToMpBuf(bigint) { - var buf = new Buffer(bigint.toByteArray()); + var buf = Buffer.from(bigint.toByteArray()); buf = mpNormalize(buf); return (buf); } @@ -3956,7 +5054,7 @@ function calculateDSAPublic(g, p, x) { assert.buffer(p); assert.buffer(x); try { - var bigInt = __webpack_require__(62).BigInteger; + var bigInt = __webpack_require__(77).BigInteger; } catch (e) { throw (new Error('To load a PKCS#8 format DSA private key, ' + 'the node jsbn library is required.')); @@ -3969,11 +5067,31 @@ function calculateDSAPublic(g, p, x) { return (ybuf); } +function calculateED25519Public(k) { + assert.buffer(k); + + if (nacl === undefined) + nacl = __webpack_require__(71); + + var kp = nacl.sign.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + +function calculateX25519Public(k) { + assert.buffer(k); + + if (nacl === undefined) + nacl = __webpack_require__(71); + + var kp = nacl.box.keyPair.fromSeed(new Uint8Array(k)); + return (Buffer.from(kp.publicKey)); +} + function addRSAMissing(key) { assert.object(key); assertCompatible(key, PrivateKey, [1, 1]); try { - var bigInt = __webpack_require__(62).BigInteger; + var bigInt = __webpack_require__(77).BigInteger; } catch (e) { throw (new Error('To write a PEM private key from ' + 'this source, the node jsbn lib is required.')); @@ -4000,6 +5118,32 @@ function addRSAMissing(key) { } } +function publicFromPrivateECDSA(curveName, priv) { + assert.string(curveName, 'curveName'); + assert.buffer(priv); + if (ec === undefined) + ec = __webpack_require__(126); + if (jsbn === undefined) + jsbn = __webpack_require__(77).BigInteger; + var params = algs.curves[curveName]; + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + var d = new jsbn(mpNormalize(priv)); + var pub = G.multiply(d); + pub = Buffer.from(curve.encodePointHex(pub), 'hex'); + + var parts = []; + parts.push({name: 'curve', data: Buffer.from(curveName)}); + parts.push({name: 'Q', data: pub}); + + var key = new Key({type: 'ecdsa', curve: curve, parts: parts}); + return (key); +} + function opensshCipherInfo(cipher) { var inf = {}; switch (cipher) { @@ -4043,200 +5187,94 @@ function opensshCipherInfo(cipher) { /***/ }), -/* 26 */ -/***/ (function(module, exports) { +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { -// Copyright 2015 Joyent, Inc. +var global = __webpack_require__(36); +var core = __webpack_require__(25); +var ctx = __webpack_require__(67); +var hide = __webpack_require__(75); +var has = __webpack_require__(88); +var PROTOTYPE = 'prototype'; -var algInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y'], - sizePart: 'p' - }, - 'rsa': { - parts: ['e', 'n'], - sizePart: 'n' - }, - 'ecdsa': { - parts: ['curve', 'Q'], - sizePart: 'Q' - }, - 'ed25519': { - parts: ['R'], - normalize: false, - sizePart: 'R' - } -}; -algInfo['curve25519'] = algInfo['ed25519']; - -var algPrivInfo = { - 'dsa': { - parts: ['p', 'q', 'g', 'y', 'x'] - }, - 'rsa': { - parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] - }, - 'ecdsa': { - parts: ['curve', 'Q', 'd'] - }, - 'ed25519': { - parts: ['R', 'r'], - normalize: false - } -}; -algPrivInfo['curve25519'] = algPrivInfo['ed25519']; - -var hashAlgs = { - 'md5': true, - 'sha1': true, - 'sha256': true, - 'sha384': true, - 'sha512': true -}; - -/* - * Taken from - * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf - */ -var curves = { - 'nistp256': { - size: 256, - pkcs8oid: '1.2.840.10045.3.1.7', - p: new Buffer(('00' + - 'ffffffff 00000001 00000000 00000000' + - '00000000 ffffffff ffffffff ffffffff'). - replace(/ /g, ''), 'hex'), - a: new Buffer(('00' + - 'FFFFFFFF 00000001 00000000 00000000' + - '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: new Buffer(( - '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + - '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). - replace(/ /g, ''), 'hex'), - s: new Buffer(('00' + - 'c49d3608 86e70493 6a6678e1 139d26b7' + - '819f7e90'). - replace(/ /g, ''), 'hex'), - n: new Buffer(('00' + - 'ffffffff 00000000 ffffffff ffffffff' + - 'bce6faad a7179e84 f3b9cac2 fc632551'). - replace(/ /g, ''), 'hex'), - G: new Buffer(('04' + - '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + - '77037d81 2deb33a0 f4a13945 d898c296' + - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + - '2bce3357 6b315ece cbb64068 37bf51f5'). - replace(/ /g, ''), 'hex') - }, - 'nistp384': { - size: 384, - pkcs8oid: '1.3.132.0.34', - p: new Buffer(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffe' + - 'ffffffff 00000000 00000000 ffffffff'). - replace(/ /g, ''), 'hex'), - a: new Buffer(('00' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + - 'FFFFFFFF 00000000 00000000 FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: new Buffer(( - 'b3312fa7 e23ee7e4 988e056b e3f82d19' + - '181d9c6e fe814112 0314088f 5013875a' + - 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). - replace(/ /g, ''), 'hex'), - s: new Buffer(('00' + - 'a335926a a319a27a 1d00896a 6773a482' + - '7acdac73'). - replace(/ /g, ''), 'hex'), - n: new Buffer(('00' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff c7634d81 f4372ddf' + - '581a0db2 48b0a77a ecec196a ccc52973'). - replace(/ /g, ''), 'hex'), - G: new Buffer(('04' + - 'aa87ca22 be8b0537 8eb1c71e f320ad74' + - '6e1d3b62 8ba79b98 59f741e0 82542a38' + - '5502f25d bf55296c 3a545e38 72760ab7' + - '3617de4a 96262c6f 5d9e98bf 9292dc29' + - 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + - '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). - replace(/ /g, ''), 'hex') - }, - 'nistp521': { - size: 521, - pkcs8oid: '1.3.132.0.35', - p: new Buffer(( - '01ffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffff').replace(/ /g, ''), 'hex'), - a: new Buffer(('01FF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + - 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). - replace(/ /g, ''), 'hex'), - b: new Buffer(('51' + - '953eb961 8e1c9a1f 929a21a0 b68540ee' + - 'a2da725b 99b315f3 b8b48991 8ef109e1' + - '56193951 ec7e937b 1652c0bd 3bb1bf07' + - '3573df88 3d2c34f1 ef451fd4 6b503f00'). - replace(/ /g, ''), 'hex'), - s: new Buffer(('00' + - 'd09e8800 291cb853 96cc6717 393284aa' + - 'a0da64ba').replace(/ /g, ''), 'hex'), - n: new Buffer(('01ff' + - 'ffffffff ffffffff ffffffff ffffffff' + - 'ffffffff ffffffff ffffffff fffffffa' + - '51868783 bf2f966b 7fcc0148 f709a5d0' + - '3bb5c9b8 899c47ae bb6fb71e 91386409'). - replace(/ /g, ''), 'hex'), - G: new Buffer(('04' + - '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + - '9c648139 053fb521 f828af60 6b4d3dba' + - 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + - '3348b3c1 856a429b f97e7e31 c2e5bd66' + - '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + - '98f54449 579b4468 17afbd17 273e662c' + - '97ee7299 5ef42640 c550b901 3fad0761' + - '353c7086 a272c240 88be9476 9fd16650'). - replace(/ /g, ''), 'hex') - } -}; - -module.exports = { - info: algInfo, - privInfo: algPrivInfo, - hashAlgs: hashAlgs, - curves: curves +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } }; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; /***/ }), -/* 27 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. module.exports = Key; -var assert = __webpack_require__(17); -var algs = __webpack_require__(26); -var crypto = __webpack_require__(14); -var Fingerprint = __webpack_require__(102); -var Signature = __webpack_require__(51); -var DiffieHellman = __webpack_require__(322).DiffieHellman; -var errs = __webpack_require__(50); -var utils = __webpack_require__(25); -var PrivateKey = __webpack_require__(28); +var assert = __webpack_require__(22); +var algs = __webpack_require__(37); +var crypto = __webpack_require__(21); +var Fingerprint = __webpack_require__(139); +var Signature = __webpack_require__(70); +var DiffieHellman = __webpack_require__(257).DiffieHellman; +var errs = __webpack_require__(69); +var utils = __webpack_require__(31); +var PrivateKey = __webpack_require__(38); var edCompat; try { - edCompat = __webpack_require__(323); + edCompat = __webpack_require__(418); } catch (e) { /* Just continue through, and bail out if we try to use it. */ } @@ -4245,14 +5283,15 @@ var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; var formats = {}; -formats['auto'] = __webpack_require__(324); -formats['pem'] = __webpack_require__(63); -formats['pkcs1'] = __webpack_require__(201); -formats['pkcs8'] = __webpack_require__(103); -formats['rfc4253'] = __webpack_require__(71); -formats['ssh'] = __webpack_require__(325); -formats['ssh-private'] = __webpack_require__(138); +formats['auto'] = __webpack_require__(419); +formats['pem'] = __webpack_require__(80); +formats['pkcs1'] = __webpack_require__(259); +formats['pkcs8'] = __webpack_require__(140); +formats['rfc4253'] = __webpack_require__(91); +formats['ssh'] = __webpack_require__(420); +formats['ssh-private'] = __webpack_require__(176); formats['openssh'] = formats['ssh-private']; +formats['dnssec'] = __webpack_require__(258); function Key(opts) { assert.object(opts, 'options'); @@ -4286,7 +5325,7 @@ function Key(opts) { var curve = this.part.curve.data.toString(); this.curve = curve; sz = algs.curves[curve].size; - } else if (this.type === 'ed25519') { + } else if (this.type === 'ed25519' || this.type === 'curve25519') { sz = 256; this.curve = 'curve25519'; } else { @@ -4327,7 +5366,6 @@ Key.prototype.hash = function (algo) { if (this._hashCache[algo]) return (this._hashCache[algo]); - var hash = crypto.createHash(algo). update(this.toBuffer('rfc4253')).digest(); this._hashCache[algo] = hash; @@ -4478,8 +5516,9 @@ Key.isKey = function (obj, ver) { * [1,3] -- added defaultHashAlgorithm * [1,4] -- added ed support, createDH * [1,5] -- first explicitly tagged version + * [1,6] -- changed ed25519 part names */ -Key.prototype._sshpkApiVersion = [1, 5]; +Key.prototype._sshpkApiVersion = [1, 6]; Key._oldVersionDetect = function (obj) { assert.func(obj.toBuffer); @@ -4497,48 +5536,477 @@ Key._oldVersionDetect = function (obj) { /***/ }), -/* 28 */ +/* 34 */ +/***/ (function(module, exports) { + +module.exports = require("stream"); + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const escapeStringRegexp = __webpack_require__(353); +const ansiStyles = __webpack_require__(472); +const stdoutColor = __webpack_require__(585).stdout; + +const template = __webpack_require__(586); + +const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); + +// `supportsColor.level` → `ansiStyles.color[name]` mapping +const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; + +// `color-convert` models to exclude from the Chalk API due to conflicts and such +const skipModels = new Set(['gray']); + +const styles = Object.create(null); + +function applyOptions(obj, options) { + options = options || {}; + + // Detect level if not set manually + const scLevel = stdoutColor ? stdoutColor.level : 0; + obj.level = options.level === undefined ? scLevel : options.level; + obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; +} + +function Chalk(options) { + // We check for this.template here since calling `chalk.constructor()` + // by itself will have a `this` of a previously constructed chalk object + if (!this || !(this instanceof Chalk) || this.template) { + const chalk = {}; + applyOptions(chalk, options); + + chalk.template = function () { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk.template].concat(args)); + }; + + Object.setPrototypeOf(chalk, Chalk.prototype); + Object.setPrototypeOf(chalk.template, chalk); + + chalk.template.constructor = Chalk; + + return chalk.template; + } + + applyOptions(this, options); +} + +// Use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001B[94m'; +} + +for (const key of Object.keys(ansiStyles)) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + styles[key] = { + get() { + const codes = ansiStyles[key]; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); + } + }; +} + +styles.visible = { + get() { + return build.call(this, this._styles || [], true, 'visible'); + } +}; + +ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); +for (const model of Object.keys(ansiStyles.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + + styles[model] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.color.close, + closeRe: ansiStyles.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); +for (const model of Object.keys(ansiStyles.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + + const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); + styles[bgModel] = { + get() { + const level = this.level; + return function () { + const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); + const codes = { + open, + close: ansiStyles.bgColor.close, + closeRe: ansiStyles.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); + }; + } + }; +} + +const proto = Object.defineProperties(() => {}, styles); + +function build(_styles, _empty, key) { + const builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder._empty = _empty; + + const self = this; + + Object.defineProperty(builder, 'level', { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + + Object.defineProperty(builder, 'enabled', { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + + // See below for fix regarding invisible grey/dim combination on Windows + builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; + + // `__proto__` is used because we must return a function, but there is + // no way to create a function with a different prototype + builder.__proto__ = proto; // eslint-disable-line no-proto + + return builder; +} + +function applyStyle() { + // Support varags, but simply cast to string in case there's only one arg + const args = arguments; + const argsLen = args.length; + let str = String(arguments[0]); + + if (argsLen === 0) { + return ''; + } + + if (argsLen > 1) { + // Don't slice `arguments`, it prevents V8 optimizations + for (let a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || this.level <= 0 || !str) { + return this._empty ? '' : str; + } + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + const originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles.dim.open = ''; + } + + for (const code of this._styles.slice().reverse()) { + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + + // Close the styling before a linebreak and reopen + // after next line to fix a bleed issue on macOS + // https://github.com/chalk/chalk/pull/92 + str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + + // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue + ansiStyles.dim.open = originalDim; + + return str; +} + +function chalkTag(chalk, strings) { + if (!Array.isArray(strings)) { + // If chalk() was called by itself or with a string, + // return the string itself as a string. + return [].slice.call(arguments, 1).join(' '); + } + + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); + parts.push(String(strings.raw[i])); + } + + return template(chalk, parts.join('')); +} + +Object.defineProperties(Chalk.prototype, styles); + +module.exports = Chalk(); // eslint-disable-line new-cap +module.exports.supportsColor = stdoutColor; +module.exports.default = module.exports; // For TypeScript + + +/***/ }), +/* 36 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +var Buffer = __webpack_require__(20).Buffer; + +var algInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y'], + sizePart: 'p' + }, + 'rsa': { + parts: ['e', 'n'], + sizePart: 'n' + }, + 'ecdsa': { + parts: ['curve', 'Q'], + sizePart: 'Q' + }, + 'ed25519': { + parts: ['A'], + sizePart: 'A' + } +}; +algInfo['curve25519'] = algInfo['ed25519']; + +var algPrivInfo = { + 'dsa': { + parts: ['p', 'q', 'g', 'y', 'x'] + }, + 'rsa': { + parts: ['n', 'e', 'd', 'iqmp', 'p', 'q'] + }, + 'ecdsa': { + parts: ['curve', 'Q', 'd'] + }, + 'ed25519': { + parts: ['A', 'k'] + } +}; +algPrivInfo['curve25519'] = algPrivInfo['ed25519']; + +var hashAlgs = { + 'md5': true, + 'sha1': true, + 'sha256': true, + 'sha384': true, + 'sha512': true +}; + +/* + * Taken from + * http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf + */ +var curves = { + 'nistp256': { + size: 256, + pkcs8oid: '1.2.840.10045.3.1.7', + p: Buffer.from(('00' + + 'ffffffff 00000001 00000000 00000000' + + '00000000 ffffffff ffffffff ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF 00000001 00000000 00000000' + + '00000000 FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + '5ac635d8 aa3a93e7 b3ebbd55 769886bc' + + '651d06b0 cc53b0f6 3bce3c3e 27d2604b'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'c49d3608 86e70493 6a6678e1 139d26b7' + + '819f7e90'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff 00000000 ffffffff ffffffff' + + 'bce6faad a7179e84 f3b9cac2 fc632551'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '6b17d1f2 e12c4247 f8bce6e5 63a440f2' + + '77037d81 2deb33a0 f4a13945 d898c296' + + '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16' + + '2bce3357 6b315ece cbb64068 37bf51f5'). + replace(/ /g, ''), 'hex') + }, + 'nistp384': { + size: 384, + pkcs8oid: '1.3.132.0.34', + p: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffe' + + 'ffffffff 00000000 00000000 ffffffff'). + replace(/ /g, ''), 'hex'), + a: Buffer.from(('00' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE' + + 'FFFFFFFF 00000000 00000000 FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(( + 'b3312fa7 e23ee7e4 988e056b e3f82d19' + + '181d9c6e fe814112 0314088f 5013875a' + + 'c656398d 8a2ed19d 2a85c8ed d3ec2aef'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'a335926a a319a27a 1d00896a 6773a482' + + '7acdac73'). + replace(/ /g, ''), 'hex'), + n: Buffer.from(('00' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff c7634d81 f4372ddf' + + '581a0db2 48b0a77a ecec196a ccc52973'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + 'aa87ca22 be8b0537 8eb1c71e f320ad74' + + '6e1d3b62 8ba79b98 59f741e0 82542a38' + + '5502f25d bf55296c 3a545e38 72760ab7' + + '3617de4a 96262c6f 5d9e98bf 9292dc29' + + 'f8f41dbd 289a147c e9da3113 b5f0b8c0' + + '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'). + replace(/ /g, ''), 'hex') + }, + 'nistp521': { + size: 521, + pkcs8oid: '1.3.132.0.35', + p: Buffer.from(( + '01ffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffff').replace(/ /g, ''), 'hex'), + a: Buffer.from(('01FF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF' + + 'FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC'). + replace(/ /g, ''), 'hex'), + b: Buffer.from(('51' + + '953eb961 8e1c9a1f 929a21a0 b68540ee' + + 'a2da725b 99b315f3 b8b48991 8ef109e1' + + '56193951 ec7e937b 1652c0bd 3bb1bf07' + + '3573df88 3d2c34f1 ef451fd4 6b503f00'). + replace(/ /g, ''), 'hex'), + s: Buffer.from(('00' + + 'd09e8800 291cb853 96cc6717 393284aa' + + 'a0da64ba').replace(/ /g, ''), 'hex'), + n: Buffer.from(('01ff' + + 'ffffffff ffffffff ffffffff ffffffff' + + 'ffffffff ffffffff ffffffff fffffffa' + + '51868783 bf2f966b 7fcc0148 f709a5d0' + + '3bb5c9b8 899c47ae bb6fb71e 91386409'). + replace(/ /g, ''), 'hex'), + G: Buffer.from(('04' + + '00c6 858e06b7 0404e9cd 9e3ecb66 2395b442' + + '9c648139 053fb521 f828af60 6b4d3dba' + + 'a14b5e77 efe75928 fe1dc127 a2ffa8de' + + '3348b3c1 856a429b f97e7e31 c2e5bd66' + + '0118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9' + + '98f54449 579b4468 17afbd17 273e662c' + + '97ee7299 5ef42640 c550b901 3fad0761' + + '353c7086 a272c240 88be9476 9fd16650'). + replace(/ /g, ''), 'hex') + } +}; + +module.exports = { + info: algInfo, + privInfo: algPrivInfo, + hashAlgs: hashAlgs, + curves: curves +}; + + +/***/ }), +/* 38 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. module.exports = PrivateKey; -var assert = __webpack_require__(17); -var algs = __webpack_require__(26); -var crypto = __webpack_require__(14); -var Fingerprint = __webpack_require__(102); -var Signature = __webpack_require__(51); -var errs = __webpack_require__(50); -var util = __webpack_require__(4); -var utils = __webpack_require__(25); -var dhe = __webpack_require__(322); +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var crypto = __webpack_require__(21); +var Fingerprint = __webpack_require__(139); +var Signature = __webpack_require__(70); +var errs = __webpack_require__(69); +var util = __webpack_require__(9); +var utils = __webpack_require__(31); +var dhe = __webpack_require__(257); var generateECDSA = dhe.generateECDSA; var generateED25519 = dhe.generateED25519; var edCompat; -var ed; +var nacl; try { - edCompat = __webpack_require__(323); + edCompat = __webpack_require__(418); } catch (e) { /* Just continue through, and bail out if we try to use it. */ } -var Key = __webpack_require__(27); +var Key = __webpack_require__(33); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var KeyParseError = errs.KeyParseError; var KeyEncryptedError = errs.KeyEncryptedError; var formats = {}; -formats['auto'] = __webpack_require__(324); -formats['pem'] = __webpack_require__(63); -formats['pkcs1'] = __webpack_require__(201); -formats['pkcs8'] = __webpack_require__(103); -formats['rfc4253'] = __webpack_require__(71); -formats['ssh-private'] = __webpack_require__(138); +formats['auto'] = __webpack_require__(419); +formats['pem'] = __webpack_require__(80); +formats['pkcs1'] = __webpack_require__(259); +formats['pkcs8'] = __webpack_require__(140); +formats['rfc4253'] = __webpack_require__(91); +formats['ssh-private'] = __webpack_require__(176); formats['openssh'] = formats['ssh-private']; formats['ssh'] = formats['ssh-private']; +formats['dnssec'] = __webpack_require__(258); function PrivateKey(opts) { assert.object(opts, 'options'); @@ -4585,49 +6053,44 @@ PrivateKey.prototype.toPublic = function () { return (this._pubCache); }; -PrivateKey.prototype.derive = function (newType, newSize) { +PrivateKey.prototype.derive = function (newType) { assert.string(newType, 'type'); - assert.optionalNumber(newSize, 'size'); - var priv, pub; + var priv, pub, pair; if (this.type === 'ed25519' && newType === 'curve25519') { - if (ed === undefined) - ed = __webpack_require__(192); + if (nacl === undefined) + nacl = __webpack_require__(71); - priv = this.part.r.data; + priv = this.part.k.data; if (priv[0] === 0x00) priv = priv.slice(1); - priv = priv.slice(0, 32); - pub = ed.dh.publicKey(priv); - priv = utils.mpNormalize(Buffer.concat([priv, pub])); + pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); return (new PrivateKey({ type: 'curve25519', parts: [ - { name: 'R', data: utils.mpNormalize(pub) }, - { name: 'r', data: priv } + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } ] })); } else if (this.type === 'curve25519' && newType === 'ed25519') { - if (ed === undefined) - ed = __webpack_require__(192); + if (nacl === undefined) + nacl = __webpack_require__(71); - priv = this.part.r.data; + priv = this.part.k.data; if (priv[0] === 0x00) priv = priv.slice(1); - priv = priv.slice(0, 32); - pub = ed.eddsa.publicKey(priv.toString('binary')); - pub = new Buffer(pub, 'binary'); - - priv = utils.mpNormalize(Buffer.concat([priv, pub])); + pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv)); + pub = Buffer.from(pair.publicKey); return (new PrivateKey({ type: 'ed25519', parts: [ - { name: 'R', data: utils.mpNormalize(pub) }, - { name: 'r', data: priv } + { name: 'A', data: utils.mpNormalize(pub) }, + { name: 'k', data: utils.mpNormalize(priv) } ] })); } @@ -4672,7 +6135,7 @@ PrivateKey.prototype.createSign = function (hashAlgo) { v.sign = function () { var sig = oldSign(key); if (typeof (sig) === 'string') - sig = new Buffer(sig, 'binary'); + sig = Buffer.from(sig, 'binary'); sig = Signature.parse(sig, type, 'asn1'); sig.hashAlgorithm = hashAlgo; sig.curve = curve; @@ -4741,8 +6204,9 @@ PrivateKey.generate = function (type, options) { * [1,2] -- added defaultHashAlgorithm * [1,3] -- added derive, ed, createDH * [1,4] -- first tagged version + * [1,5] -- changed ed25519 part names and format */ -PrivateKey.prototype._sshpkApiVersion = [1, 4]; +PrivateKey.prototype._sshpkApiVersion = [1, 5]; PrivateKey._oldVersionDetect = function (obj) { assert.func(obj.toPublic); @@ -4758,38 +6222,1878 @@ PrivateKey._oldVersionDetect = function (obj) { /***/ }), -/* 29 */ -/***/ (function(module, exports) { - -module.exports = require("stream"); - -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); -if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }), -/* 31 */ +/* 39 */ /***/ (function(module, exports, __webpack_require__) { -var store = __webpack_require__(178)('wks') - , uid = __webpack_require__(121) - , Symbol = __webpack_require__(30).Symbol - , USE_SYMBOL = typeof Symbol == 'function'; +module.exports = { "default": __webpack_require__(613), __esModule: true }; -var $exports = module.exports = function(name){ +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefined; + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _values; + +function _load_values() { + return _values = _interopRequireDefault(__webpack_require__(572)); +} + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + +var _assign; + +function _load_assign() { + return _assign = _interopRequireDefault(__webpack_require__(23)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var install = exports.install = function () { + var _ref43 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, lockfile) { + yield wrapLifecycle(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var install = new Install(flags, config, reporter, lockfile); + yield install.init(); + })); + }); + + return function install(_x16, _x17, _x18, _x19) { + return _ref43.apply(this, arguments); + }; +}(); + +var run = exports.run = function () { + var _ref45 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var lockfile = void 0; + var error = 'installCommandRenamed'; + if (flags.lockfile === false) { + lockfile = new (_lockfile || _load_lockfile()).default(); + } else { + lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + } + + if (args.length) { + var exampleArgs = args.slice(); + + if (flags.saveDev) { + exampleArgs.push('--dev'); + } + if (flags.savePeer) { + exampleArgs.push('--peer'); + } + if (flags.saveOptional) { + exampleArgs.push('--optional'); + } + if (flags.saveExact) { + exampleArgs.push('--exact'); + } + if (flags.saveTilde) { + exampleArgs.push('--tilde'); + } + var command = 'add'; + if (flags.global) { + error = 'globalFlagRemoved'; + command = 'global add'; + } + throw new (_errors || _load_errors()).MessageError(reporter.lang(error, `yarn ${command} ${exampleArgs.join(' ')}`)); + } + + yield install(config, reporter, flags, lockfile); + }); + + return function run(_x20, _x21, _x22, _x23) { + return _ref45.apply(this, arguments); + }; +}(); + +var wrapLifecycle = exports.wrapLifecycle = function () { + var _ref46 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags, factory) { + yield config.executeLifecycleScript('preinstall'); + + yield factory(); + + // npm behaviour, seems kinda funky but yay compatibility + yield config.executeLifecycleScript('install'); + yield config.executeLifecycleScript('postinstall'); + + if (!config.production) { + if (!config.disablePrepublish) { + yield config.executeLifecycleScript('prepublish'); + } + yield config.executeLifecycleScript('prepare'); + } + }); + + return function wrapLifecycle(_x24, _x25, _x26) { + return _ref46.apply(this, arguments); + }; +}(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _hooks; + +function _load_hooks() { + return _hooks = __webpack_require__(560); +} + +var _index; + +function _load_index() { + return _index = _interopRequireDefault(__webpack_require__(200)); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _integrityChecker; + +function _load_integrityChecker() { + return _integrityChecker = _interopRequireDefault(__webpack_require__(190)); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(24)); +} + +var _lockfile2; + +function _load_lockfile2() { + return _lockfile2 = __webpack_require__(24); +} + +var _packageFetcher; + +function _load_packageFetcher() { + return _packageFetcher = _interopRequireWildcard(__webpack_require__(191)); +} + +var _packageInstallScripts; + +function _load_packageInstallScripts() { + return _packageInstallScripts = _interopRequireDefault(__webpack_require__(538)); +} + +var _packageCompatibility; + +function _load_packageCompatibility() { + return _packageCompatibility = _interopRequireWildcard(__webpack_require__(300)); +} + +var _packageResolver; + +function _load_packageResolver() { + return _packageResolver = _interopRequireDefault(__webpack_require__(302)); +} + +var _packageLinker; + +function _load_packageLinker() { + return _packageLinker = _interopRequireDefault(__webpack_require__(192)); +} + +var _index2; + +function _load_index2() { + return _index2 = __webpack_require__(59); +} + +var _index3; + +function _load_index3() { + return _index3 = __webpack_require__(62); +} + +var _autoclean; + +function _load_autoclean() { + return _autoclean = __webpack_require__(288); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(14)); +} + +var _normalizePattern; + +function _load_normalizePattern() { + return _normalizePattern = __webpack_require__(51); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(50)); +} + +var _yarnVersion; + +function _load_yarnVersion() { + return _yarnVersion = __webpack_require__(110); +} + +var _generatePnpMap; + +function _load_generatePnpMap() { + return _generatePnpMap = __webpack_require__(558); +} + +var _workspaceLayout; + +function _load_workspaceLayout() { + return _workspaceLayout = _interopRequireDefault(__webpack_require__(86)); +} + +var _resolutionMap; + +function _load_resolutionMap() { + return _resolutionMap = _interopRequireDefault(__webpack_require__(195)); +} + +var _guessName; + +function _load_guessName() { + return _guessName = _interopRequireDefault(__webpack_require__(154)); +} + +var _audit; + +function _load_audit() { + return _audit = _interopRequireDefault(__webpack_require__(287)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var deepEqual = __webpack_require__(675); + +var emoji = __webpack_require__(235); +var invariant = __webpack_require__(13); +var path = __webpack_require__(2); +var semver = __webpack_require__(26); +var uuid = __webpack_require__(108); +var ssri = __webpack_require__(107); + +var ONE_DAY = 1000 * 60 * 60 * 24; + +/** + * Try and detect the installation method for Yarn and provide a command to update it with. + */ + +function getUpdateCommand(installationMethod) { + if (installationMethod === 'tar') { + return `curl --compressed -o- -L ${(_constants || _load_constants()).YARN_INSTALLER_SH} | bash`; + } + + if (installationMethod === 'homebrew') { + return 'brew upgrade yarn'; + } + + if (installationMethod === 'deb') { + return 'sudo apt-get update && sudo apt-get install yarn'; + } + + if (installationMethod === 'rpm') { + return 'sudo yum install yarn'; + } + + if (installationMethod === 'npm') { + return 'npm install --global yarn'; + } + + if (installationMethod === 'chocolatey') { + return 'choco upgrade yarn'; + } + + if (installationMethod === 'apk') { + return 'apk update && apk add -u yarn'; + } + + return null; +} + +function getUpdateInstaller(installationMethod) { + // Windows + if (installationMethod === 'msi') { + return (_constants || _load_constants()).YARN_INSTALLER_MSI; + } + + return null; +} + +function normalizeFlags(config, rawFlags) { + var flags = { + // install + har: !!rawFlags.har, + ignorePlatform: !!rawFlags.ignorePlatform, + ignoreEngines: !!rawFlags.ignoreEngines, + ignoreScripts: !!rawFlags.ignoreScripts, + ignoreOptional: !!rawFlags.ignoreOptional, + force: !!rawFlags.force, + flat: !!rawFlags.flat, + lockfile: rawFlags.lockfile !== false, + pureLockfile: !!rawFlags.pureLockfile, + updateChecksums: !!rawFlags.updateChecksums, + skipIntegrityCheck: !!rawFlags.skipIntegrityCheck, + frozenLockfile: !!rawFlags.frozenLockfile, + linkDuplicates: !!rawFlags.linkDuplicates, + checkFiles: !!rawFlags.checkFiles, + audit: !!rawFlags.audit, + + // add + peer: !!rawFlags.peer, + dev: !!rawFlags.dev, + optional: !!rawFlags.optional, + exact: !!rawFlags.exact, + tilde: !!rawFlags.tilde, + ignoreWorkspaceRootCheck: !!rawFlags.ignoreWorkspaceRootCheck, + + // outdated, update-interactive + includeWorkspaceDeps: !!rawFlags.includeWorkspaceDeps, + + // add, remove, update + workspaceRootIsCwd: rawFlags.workspaceRootIsCwd !== false + }; + + if (config.getOption('ignore-scripts')) { + flags.ignoreScripts = true; + } + + if (config.getOption('ignore-platform')) { + flags.ignorePlatform = true; + } + + if (config.getOption('ignore-engines')) { + flags.ignoreEngines = true; + } + + if (config.getOption('ignore-optional')) { + flags.ignoreOptional = true; + } + + if (config.getOption('force')) { + flags.force = true; + } + + return flags; +} + +var Install = exports.Install = function () { + function Install(flags, config, reporter, lockfile) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Install); + + this.rootManifestRegistries = []; + this.rootPatternsToOrigin = (0, (_map || _load_map()).default)(); + this.lockfile = lockfile; + this.reporter = reporter; + this.config = config; + this.flags = normalizeFlags(config, flags); + this.resolutions = (0, (_map || _load_map()).default)(); // Legacy resolutions field used for flat install mode + this.resolutionMap = new (_resolutionMap || _load_resolutionMap()).default(config); // Selective resolutions for nested dependencies + this.resolver = new (_packageResolver || _load_packageResolver()).default(config, lockfile, this.resolutionMap); + this.integrityChecker = new (_integrityChecker || _load_integrityChecker()).default(config); + this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); + this.scripts = new (_packageInstallScripts || _load_packageInstallScripts()).default(config, this.resolver, this.flags.force); + } + + /** + * Create a list of dependency requests from the current directories manifests. + */ + + Install.prototype.fetchRequestFromCwd = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _this = this; + + var excludePatterns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var ignoreUnusedPatterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var patterns = []; + var deps = []; + var resolutionDeps = []; + var manifest = {}; + + var ignorePatterns = []; + var usedPatterns = []; + var workspaceLayout = void 0; + + // some commands should always run in the context of the entire workspace + var cwd = this.flags.includeWorkspaceDeps || this.flags.workspaceRootIsCwd ? this.config.lockfileFolder : this.config.cwd; + + // non-workspaces are always root, otherwise check for workspace root + var cwdIsRoot = !this.config.workspaceRootFolder || this.config.lockfileFolder === cwd; + + // exclude package names that are in install args + var excludeNames = []; + for (var _iterator = excludePatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var _pattern = _ref2; + + if ((0, (_index3 || _load_index3()).getExoticResolver)(_pattern)) { + excludeNames.push((0, (_guessName || _load_guessName()).default)(_pattern)); + } else { + // extract the name + var parts = (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(_pattern); + excludeNames.push(parts.name); + } + } + + var stripExcluded = function stripExcluded(manifest) { + for (var _iterator2 = excludeNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var exclude = _ref3; + + if (manifest.dependencies && manifest.dependencies[exclude]) { + delete manifest.dependencies[exclude]; + } + if (manifest.devDependencies && manifest.devDependencies[exclude]) { + delete manifest.devDependencies[exclude]; + } + if (manifest.optionalDependencies && manifest.optionalDependencies[exclude]) { + delete manifest.optionalDependencies[exclude]; + } + } + }; + + var _loop = function* _loop(registry) { + var filename = (_index2 || _load_index2()).registries[registry].filename; + + var loc = path.join(cwd, filename); + if (!(yield (_fs || _load_fs()).exists(loc))) { + return 'continue'; + } + + _this.rootManifestRegistries.push(registry); + + var projectManifestJson = yield _this.config.readJson(loc); + yield (0, (_index || _load_index()).default)(projectManifestJson, cwd, _this.config, cwdIsRoot); + + (0, (_assign || _load_assign()).default)(_this.resolutions, projectManifestJson.resolutions); + (0, (_assign || _load_assign()).default)(manifest, projectManifestJson); + + _this.resolutionMap.init(_this.resolutions); + for (var _iterator4 = (0, (_keys || _load_keys()).default)(_this.resolutionMap.resolutionsByPackage), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref5; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref5 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref5 = _i4.value; + } + + var _packageName = _ref5; + + for (var _iterator8 = _this.resolutionMap.resolutionsByPackage[_packageName], _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) { + var _ref11; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref11 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref11 = _i8.value; + } + + var _ref10 = _ref11; + var _pattern3 = _ref10.pattern; + + resolutionDeps = [].concat(resolutionDeps, [{ registry, pattern: _pattern3, optional: false, hint: 'resolution' }]); + } + } + + var pushDeps = function pushDeps(depType, manifest, _ref6, isUsed) { + var hint = _ref6.hint, + optional = _ref6.optional; + + if (ignoreUnusedPatterns && !isUsed) { + return; + } + // We only take unused dependencies into consideration to get deterministic hoisting. + // Since flat mode doesn't care about hoisting and everything is top level and specified then we can safely + // leave these out. + if (_this.flags.flat && !isUsed) { + return; + } + var depMap = manifest[depType]; + for (var name in depMap) { + if (excludeNames.indexOf(name) >= 0) { + continue; + } + + var _pattern2 = name; + if (!_this.lockfile.getLocked(_pattern2)) { + // when we use --save we save the dependency to the lockfile with just the name rather than the + // version combo + _pattern2 += '@' + depMap[name]; + } + + // normalization made sure packages are mentioned only once + if (isUsed) { + usedPatterns.push(_pattern2); + } else { + ignorePatterns.push(_pattern2); + } + + _this.rootPatternsToOrigin[_pattern2] = depType; + patterns.push(_pattern2); + deps.push({ pattern: _pattern2, registry, hint, optional, workspaceName: manifest.name, workspaceLoc: manifest._loc }); + } + }; + + if (cwdIsRoot) { + pushDeps('dependencies', projectManifestJson, { hint: null, optional: false }, true); + pushDeps('devDependencies', projectManifestJson, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', projectManifestJson, { hint: 'optional', optional: true }, true); + } + + if (_this.config.workspaceRootFolder) { + var workspaceLoc = cwdIsRoot ? loc : path.join(_this.config.lockfileFolder, filename); + var workspacesRoot = path.dirname(workspaceLoc); + + var workspaceManifestJson = projectManifestJson; + if (!cwdIsRoot) { + // the manifest we read before was a child workspace, so get the root + workspaceManifestJson = yield _this.config.readJson(workspaceLoc); + yield (0, (_index || _load_index()).default)(workspaceManifestJson, workspacesRoot, _this.config, true); + } + + var workspaces = yield _this.config.resolveWorkspaces(workspacesRoot, workspaceManifestJson); + workspaceLayout = new (_workspaceLayout || _load_workspaceLayout()).default(workspaces, _this.config); + + // add virtual manifest that depends on all workspaces, this way package hoisters and resolvers will work fine + var workspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.dependencies); + for (var _iterator5 = (0, (_keys || _load_keys()).default)(workspaces), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { + var _ref7; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref7 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref7 = _i5.value; + } + + var workspaceName = _ref7; + + var workspaceManifest = workspaces[workspaceName].manifest; + workspaceDependencies[workspaceName] = workspaceManifest.version; + + // include dependencies from all workspaces + if (_this.flags.includeWorkspaceDeps) { + pushDeps('dependencies', workspaceManifest, { hint: null, optional: false }, true); + pushDeps('devDependencies', workspaceManifest, { hint: 'dev', optional: false }, !_this.config.production); + pushDeps('optionalDependencies', workspaceManifest, { hint: 'optional', optional: true }, true); + } + } + var virtualDependencyManifest = { + _uid: '', + name: `workspace-aggregator-${uuid.v4()}`, + version: '1.0.0', + _registry: 'npm', + _loc: workspacesRoot, + dependencies: workspaceDependencies, + devDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.devDependencies), + optionalDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.optionalDependencies), + private: workspaceManifestJson.private, + workspaces: workspaceManifestJson.workspaces + }; + workspaceLayout.virtualManifestName = virtualDependencyManifest.name; + var virtualDep = {}; + virtualDep[virtualDependencyManifest.name] = virtualDependencyManifest.version; + workspaces[virtualDependencyManifest.name] = { loc: workspacesRoot, manifest: virtualDependencyManifest }; + + // ensure dependencies that should be excluded are stripped from the correct manifest + stripExcluded(cwdIsRoot ? virtualDependencyManifest : workspaces[projectManifestJson.name].manifest); + + pushDeps('workspaces', { workspaces: virtualDep }, { hint: 'workspaces', optional: false }, true); + + var implicitWorkspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceDependencies); + + for (var _iterator6 = (_constants || _load_constants()).OWNED_DEPENDENCY_TYPES, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { + var _ref8; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref8 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref8 = _i6.value; + } + + var type = _ref8; + + for (var _iterator7 = (0, (_keys || _load_keys()).default)(projectManifestJson[type] || {}), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { + var _ref9; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref9 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref9 = _i7.value; + } + + var dependencyName = _ref9; + + delete implicitWorkspaceDependencies[dependencyName]; + } + } + + pushDeps('dependencies', { dependencies: implicitWorkspaceDependencies }, { hint: 'workspaces', optional: false }, true); + } + + return 'break'; + }; + + _loop2: for (var _iterator3 = (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + var registry = _ref4; + + var _ret = yield* _loop(registry); + + switch (_ret) { + case 'continue': + continue; + + case 'break': + break _loop2;} + } + + // inherit root flat flag + + + if (manifest.flat) { + this.flags.flat = true; + } + + return { + requests: [].concat(resolutionDeps, deps), + patterns, + manifest, + usedPatterns, + ignorePatterns, + workspaceLayout + }; + }); + + function fetchRequestFromCwd() { + return _ref.apply(this, arguments); + } + + return fetchRequestFromCwd; + }(); + + /** + * TODO description + */ + + Install.prototype.prepareRequests = function prepareRequests(requests) { + return requests; + }; + + Install.prototype.preparePatterns = function preparePatterns(patterns) { + return patterns; + }; + + Install.prototype.preparePatternsForLinking = function preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) { + return patterns; + }; + + Install.prototype.prepareManifests = function () { + var _ref12 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var manifests = yield this.config.getRootManifests(); + return manifests; + }); + + function prepareManifests() { + return _ref12.apply(this, arguments); + } + + return prepareManifests; + }(); + + Install.prototype.bailout = function () { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { + // We don't want to skip the audit - it could yield important errors + if (this.flags.audit) { + return false; + } + // PNP is so fast that the integrity check isn't pertinent + if (this.config.plugnplayEnabled) { + return false; + } + if (this.flags.skipIntegrityCheck || this.flags.force) { + return false; + } + var lockfileCache = this.lockfile.cache; + if (!lockfileCache) { + return false; + } + var lockfileClean = this.lockfile.parseResultType === 'success'; + var match = yield this.integrityChecker.check(patterns, lockfileCache, this.flags, workspaceLayout); + if (this.flags.frozenLockfile && (!lockfileClean || match.missingPatterns.length > 0)) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('frozenLockfileError')); + } + + var haveLockfile = yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME)); + + var lockfileIntegrityPresent = !this.lockfile.hasEntriesExistWithoutIntegrity(); + var integrityBailout = lockfileIntegrityPresent || !this.config.autoAddIntegrity; + + if (match.integrityMatches && haveLockfile && lockfileClean && integrityBailout) { + this.reporter.success(this.reporter.lang('upToDate')); + return true; + } + + if (match.integrityFileMissing && haveLockfile) { + // Integrity file missing, force script installations + this.scripts.setForce(true); + return false; + } + + if (match.hardRefreshRequired) { + // e.g. node version doesn't match, force script installations + this.scripts.setForce(true); + return false; + } + + if (!patterns.length && !match.integrityFileMissing) { + this.reporter.success(this.reporter.lang('nothingToInstall')); + yield this.createEmptyManifestFolders(); + yield this.saveLockfileAndIntegrity(patterns, workspaceLayout); + return true; + } + + return false; + }); + + function bailout(_x3, _x4) { + return _ref13.apply(this, arguments); + } + + return bailout; + }(); + + /** + * Produce empty folders for all used root manifests. + */ + + Install.prototype.createEmptyManifestFolders = function () { + var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + if (this.config.modulesFolder) { + // already created + return; + } + + for (var _iterator9 = this.rootManifestRegistries, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) { + var _ref15; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref15 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref15 = _i9.value; + } + + var registryName = _ref15; + var folder = this.config.registries[registryName].folder; + + yield (_fs || _load_fs()).mkdirp(path.join(this.config.lockfileFolder, folder)); + } + }); + + function createEmptyManifestFolders() { + return _ref14.apply(this, arguments); + } + + return createEmptyManifestFolders; + }(); + + /** + * TODO description + */ + + Install.prototype.markIgnored = function markIgnored(patterns) { + for (var _iterator10 = patterns, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator10);;) { + var _ref16; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref16 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref16 = _i10.value; + } + + var _pattern4 = _ref16; + + var _manifest = this.resolver.getStrictResolvedPattern(_pattern4); + var ref = _manifest._reference; + invariant(ref, 'expected package reference'); + + // just mark the package as ignored. if the package is used by a required package, the hoister + // will take care of that. + ref.ignore = true; + } + }; + + /** + * helper method that gets only recent manifests + * used by global.ls command + */ + + + Install.prototype.getFlattenedDeps = function () { + var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref18 = yield this.fetchRequestFromCwd(), + depRequests = _ref18.requests, + rawPatterns = _ref18.patterns; + + yield this.resolver.init(depRequests, {}); + + var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(this.resolver.getManifests(), this.config); + this.resolver.updateManifests(manifests); + + return this.flatten(rawPatterns); + }); + + function getFlattenedDeps() { + return _ref17.apply(this, arguments); + } + + return getFlattenedDeps; + }(); + + /** + * TODO description + */ + + Install.prototype.init = function () { + var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _this2 = this; + + this.checkUpdate(); + + // warn if we have a shrinkwrap + if (yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).NPM_SHRINKWRAP_FILENAME))) { + this.reporter.warn(this.reporter.lang('shrinkwrapWarning')); + } + + // warn if we have an npm lockfile + if (yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).NPM_LOCK_FILENAME))) { + this.reporter.warn(this.reporter.lang('npmLockfileWarning')); + } + + var flattenedTopLevelPatterns = []; + var steps = []; + + var _ref20 = yield this.fetchRequestFromCwd(), + depRequests = _ref20.requests, + rawPatterns = _ref20.patterns, + ignorePatterns = _ref20.ignorePatterns, + workspaceLayout = _ref20.workspaceLayout, + manifest = _ref20.manifest; + + var topLevelPatterns = []; + + var artifacts = yield this.integrityChecker.getArtifacts(); + if (artifacts) { + this.linker.setArtifacts(artifacts); + this.scripts.setArtifacts(artifacts); + } + + if (!this.flags.ignoreEngines && typeof manifest.engines === 'object') { + steps.push(function () { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this2.reporter.step(curr, total, _this2.reporter.lang('checkingManifest'), emoji.get('mag')); + yield _this2.checkCompatibility(); + }); + + return function (_x5, _x6) { + return _ref21.apply(this, arguments); + }; + }()); + } + + var audit = new (_audit || _load_audit()).default(this.config, this.reporter); + var auditFoundProblems = false; + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this2.reporter.step(curr, total, _this2.reporter.lang('resolvingPackages'), emoji.get('mag')); + yield _this2.resolver.init(_this2.prepareRequests(depRequests), { + isFlat: _this2.flags.flat, + isFrozen: _this2.flags.frozenLockfile, + workspaceLayout + }); + topLevelPatterns = _this2.preparePatterns(rawPatterns); + flattenedTopLevelPatterns = yield _this2.flatten(topLevelPatterns); + return { bailout: !_this2.flags.audit && (yield _this2.bailout(topLevelPatterns, workspaceLayout)) }; + })); + }); + + if (this.flags.audit) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('auditStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this2.reporter.step(curr, total, _this2.reporter.lang('auditRunning'), emoji.get('mag')); + if (_this2.flags.offline) { + _this2.reporter.warn(_this2.reporter.lang('auditOffline')); + return { bailout: false }; + } + var preparedManifests = yield _this2.prepareManifests(); + // $FlowFixMe - Flow considers `m` in the map operation to be "mixed", so does not recognize `m.object` + var mergedManifest = (_assign || _load_assign()).default.apply(Object, [{}].concat((0, (_values || _load_values()).default)(preparedManifests).map(function (m) { + return m.object; + }))); + var auditVulnerabilityCounts = yield audit.performAudit(mergedManifest, _this2.resolver, _this2.linker, topLevelPatterns); + auditFoundProblems = auditVulnerabilityCounts.info || auditVulnerabilityCounts.low || auditVulnerabilityCounts.moderate || auditVulnerabilityCounts.high || auditVulnerabilityCounts.critical; + return { bailout: yield _this2.bailout(topLevelPatterns, workspaceLayout) }; + })); + }); + } + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('fetchStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this2.markIgnored(ignorePatterns); + _this2.reporter.step(curr, total, _this2.reporter.lang('fetchingPackages'), emoji.get('truck')); + var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this2.resolver.getManifests(), _this2.config); + _this2.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(_this2.resolver.getManifests(), _this2.config, _this2.flags.ignoreEngines); + })); + }); + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('linkStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // remove integrity hash to make this operation atomic + yield _this2.integrityChecker.removeIntegrityFile(); + _this2.reporter.step(curr, total, _this2.reporter.lang('linkingDependencies'), emoji.get('link')); + flattenedTopLevelPatterns = _this2.preparePatternsForLinking(flattenedTopLevelPatterns, manifest, _this2.config.lockfileFolder === _this2.config.cwd); + yield _this2.linker.init(flattenedTopLevelPatterns, workspaceLayout, { + linkDuplicates: _this2.flags.linkDuplicates, + ignoreOptional: _this2.flags.ignoreOptional + }); + })); + }); + + if (this.config.plugnplayEnabled) { + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('pnpStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var pnpPath = `${_this2.config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`; + + var code = yield (0, (_generatePnpMap || _load_generatePnpMap()).generatePnpMap)(_this2.config, flattenedTopLevelPatterns, { + resolver: _this2.resolver, + reporter: _this2.reporter, + targetPath: pnpPath, + workspaceLayout + }); + + try { + var file = yield (_fs || _load_fs()).readFile(pnpPath); + if (file === code) { + return; + } + } catch (error) {} + + yield (_fs || _load_fs()).writeFile(pnpPath, code); + yield (_fs || _load_fs()).chmod(pnpPath, 0o755); + })); + }); + } + + steps.push(function (curr, total) { + return (0, (_hooks || _load_hooks()).callThroughHook)('buildStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + _this2.reporter.step(curr, total, _this2.flags.force ? _this2.reporter.lang('rebuildingPackages') : _this2.reporter.lang('buildingFreshPackages'), emoji.get('hammer')); + + if (_this2.flags.ignoreScripts) { + _this2.reporter.warn(_this2.reporter.lang('ignoredScripts')); + } else { + yield _this2.scripts.init(flattenedTopLevelPatterns); + } + })); + }); + + if (this.flags.har) { + steps.push(function () { + var _ref28 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + var formattedDate = new Date().toISOString().replace(/:/g, '-'); + var filename = `yarn-install_${formattedDate}.har`; + _this2.reporter.step(curr, total, _this2.reporter.lang('savingHar', filename), emoji.get('black_circle_for_record')); + yield _this2.config.requestManager.saveHar(filename); + }); + + return function (_x7, _x8) { + return _ref28.apply(this, arguments); + }; + }()); + } + + if (yield this.shouldClean()) { + steps.push(function () { + var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { + _this2.reporter.step(curr, total, _this2.reporter.lang('cleaningModules'), emoji.get('recycle')); + yield (0, (_autoclean || _load_autoclean()).clean)(_this2.config, _this2.reporter); + }); + + return function (_x9, _x10) { + return _ref29.apply(this, arguments); + }; + }()); + } + + var currentStep = 0; + for (var _iterator11 = steps, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator11);;) { + var _ref30; + + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref30 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref30 = _i11.value; + } + + var step = _ref30; + + var stepResult = yield step(++currentStep, steps.length); + if (stepResult && stepResult.bailout) { + if (this.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + this.reporter.warn(this.reporter.lang('auditRunAuditForDetails')); + } + this.maybeOutputUpdate(); + return flattenedTopLevelPatterns; + } + } + + // fin! + if (this.flags.audit) { + audit.summary(); + } + if (auditFoundProblems) { + this.reporter.warn(this.reporter.lang('auditRunAuditForDetails')); + } + yield this.saveLockfileAndIntegrity(topLevelPatterns, workspaceLayout); + yield this.persistChanges(); + this.maybeOutputUpdate(); + this.config.requestManager.clearCache(); + return flattenedTopLevelPatterns; + }); + + function init() { + return _ref19.apply(this, arguments); + } + + return init; + }(); + + Install.prototype.checkCompatibility = function () { + var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref32 = yield this.fetchRequestFromCwd(), + manifest = _ref32.manifest; + + yield (_packageCompatibility || _load_packageCompatibility()).checkOne((0, (_extends2 || _load_extends()).default)({ _reference: {} }, manifest), this.config, this.flags.ignoreEngines); + }); + + function checkCompatibility() { + return _ref31.apply(this, arguments); + } + + return checkCompatibility; + }(); + + Install.prototype.persistChanges = function () { + var _ref33 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // get all the different registry manifests in this folder + var manifests = yield this.config.getRootManifests(); + + if (yield this.applyChanges(manifests)) { + yield this.config.saveRootManifests(manifests); + } + }); + + function persistChanges() { + return _ref33.apply(this, arguments); + } + + return persistChanges; + }(); + + Install.prototype.applyChanges = function applyChanges(manifests) { + var hasChanged = false; + + if (this.config.plugnplayPersist) { + var object = manifests.npm.object; + + + if (typeof object.installConfig !== 'object') { + object.installConfig = {}; + } + + if (this.config.plugnplayEnabled && object.installConfig.pnp !== true) { + object.installConfig.pnp = true; + hasChanged = true; + } else if (!this.config.plugnplayEnabled && typeof object.installConfig.pnp !== 'undefined') { + delete object.installConfig.pnp; + hasChanged = true; + } + + if ((0, (_keys || _load_keys()).default)(object.installConfig).length === 0) { + delete object.installConfig; + } + } + + return (_promise || _load_promise()).default.resolve(hasChanged); + }; + + /** + * Check if we should run the cleaning step. + */ + + Install.prototype.shouldClean = function shouldClean() { + return (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).CLEAN_FILENAME)); + }; + + /** + * TODO + */ + + Install.prototype.flatten = function () { + var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns) { + var _this3 = this; + + if (!this.flags.flat) { + return patterns; + } + + var flattenedPatterns = []; + + for (var _iterator12 = this.resolver.getAllDependencyNamesByLevelOrder(patterns), _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator12);;) { + var _ref35; + + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref35 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref35 = _i12.value; + } + + var name = _ref35; + + var infos = this.resolver.getAllInfoForPackageName(name).filter(function (manifest) { + var ref = manifest._reference; + invariant(ref, 'expected package reference'); + return !ref.ignore; + }); + + if (infos.length === 0) { + continue; + } + + if (infos.length === 1) { + // single version of this package + // take out a single pattern as multiple patterns may have resolved to this package + flattenedPatterns.push(this.resolver.patternsByPackage[name][0]); + continue; + } + + var options = infos.map(function (info) { + var ref = info._reference; + invariant(ref, 'expected reference'); + return { + // TODO `and is required by {PARENT}`, + name: _this3.reporter.lang('manualVersionResolutionOption', ref.patterns.join(', '), info.version), + + value: info.version + }; + }); + var versions = infos.map(function (info) { + return info.version; + }); + var version = void 0; + + var resolutionVersion = this.resolutions[name]; + if (resolutionVersion && versions.indexOf(resolutionVersion) >= 0) { + // use json `resolution` version + version = resolutionVersion; + } else { + version = yield this.reporter.select(this.reporter.lang('manualVersionResolution', name), this.reporter.lang('answer'), options); + this.resolutions[name] = version; + } + + flattenedPatterns.push(this.resolver.collapseAllVersionsOfPackage(name, version)); + } + + // save resolutions to their appropriate root manifest + if ((0, (_keys || _load_keys()).default)(this.resolutions).length) { + var manifests = yield this.config.getRootManifests(); + + for (var _name in this.resolutions) { + var version = this.resolutions[_name]; + + var _patterns = this.resolver.patternsByPackage[_name]; + if (!_patterns) { + continue; + } + + var _manifest2 = void 0; + for (var _iterator13 = _patterns, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator13);;) { + var _ref36; + + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref36 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref36 = _i13.value; + } + + var _pattern5 = _ref36; + + _manifest2 = this.resolver.getResolvedPattern(_pattern5); + if (_manifest2) { + break; + } + } + invariant(_manifest2, 'expected manifest'); + + var ref = _manifest2._reference; + invariant(ref, 'expected reference'); + + var object = manifests[ref.registry].object; + object.resolutions = object.resolutions || {}; + object.resolutions[_name] = version; + } + + yield this.config.saveRootManifests(manifests); + } + + return flattenedPatterns; + }); + + function flatten(_x11) { + return _ref34.apply(this, arguments); + } + + return flatten; + }(); + + /** + * Remove offline tarballs that are no longer required + */ + + Install.prototype.pruneOfflineMirror = function () { + var _ref37 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (lockfile) { + var mirror = this.config.getOfflineMirrorPath(); + if (!mirror) { + return; + } + + var requiredTarballs = new (_set || _load_set()).default(); + for (var dependency in lockfile) { + var resolved = lockfile[dependency].resolved; + if (resolved) { + var basename = path.basename(resolved.split('#')[0]); + if (dependency[0] === '@' && basename[0] !== '@') { + requiredTarballs.add(`${dependency.split('/')[0]}-${basename}`); + } + requiredTarballs.add(basename); + } + } + + var mirrorFiles = yield (_fs || _load_fs()).walk(mirror); + for (var _iterator14 = mirrorFiles, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator14);;) { + var _ref38; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref38 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref38 = _i14.value; + } + + var file = _ref38; + + var isTarball = path.extname(file.basename) === '.tgz'; + // if using experimental-pack-script-packages-in-mirror flag, don't unlink prebuilt packages + var hasPrebuiltPackage = file.relative.startsWith('prebuilt/'); + if (isTarball && !hasPrebuiltPackage && !requiredTarballs.has(file.basename)) { + yield (_fs || _load_fs()).unlink(file.absolute); + } + } + }); + + function pruneOfflineMirror(_x12) { + return _ref37.apply(this, arguments); + } + + return pruneOfflineMirror; + }(); + + /** + * Save updated integrity and lockfiles. + */ + + Install.prototype.saveLockfileAndIntegrity = function () { + var _ref39 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { + var _this4 = this; + + var resolvedPatterns = {}; + (0, (_keys || _load_keys()).default)(this.resolver.patterns).forEach(function (pattern) { + if (!workspaceLayout || !workspaceLayout.getManifestByPattern(pattern)) { + resolvedPatterns[pattern] = _this4.resolver.patterns[pattern]; + } + }); + + // TODO this code is duplicated in a few places, need a common way to filter out workspace patterns from lockfile + patterns = patterns.filter(function (p) { + return !workspaceLayout || !workspaceLayout.getManifestByPattern(p); + }); + + var lockfileBasedOnResolver = this.lockfile.getLockfile(resolvedPatterns); + + if (this.config.pruneOfflineMirror) { + yield this.pruneOfflineMirror(lockfileBasedOnResolver); + } + + // write integrity hash + if (!this.config.plugnplayEnabled) { + yield this.integrityChecker.save(patterns, lockfileBasedOnResolver, this.flags, workspaceLayout, this.scripts.getArtifacts()); + } + + // --no-lockfile or --pure-lockfile or --frozen-lockfile + if (this.flags.lockfile === false || this.flags.pureLockfile || this.flags.frozenLockfile) { + return; + } + + var lockFileHasAllPatterns = patterns.every(function (p) { + return _this4.lockfile.getLocked(p); + }); + var lockfilePatternsMatch = (0, (_keys || _load_keys()).default)(this.lockfile.cache || {}).every(function (p) { + return lockfileBasedOnResolver[p]; + }); + var resolverPatternsAreSameAsInLockfile = (0, (_keys || _load_keys()).default)(lockfileBasedOnResolver).every(function (pattern) { + var manifest = _this4.lockfile.getLocked(pattern); + return manifest && manifest.resolved === lockfileBasedOnResolver[pattern].resolved && deepEqual(manifest.prebuiltVariants, lockfileBasedOnResolver[pattern].prebuiltVariants); + }); + var integrityPatternsAreSameAsInLockfile = (0, (_keys || _load_keys()).default)(lockfileBasedOnResolver).every(function (pattern) { + var existingIntegrityInfo = lockfileBasedOnResolver[pattern].integrity; + if (!existingIntegrityInfo) { + // if this entry does not have an integrity, no need to re-write the lockfile because of it + return true; + } + var manifest = _this4.lockfile.getLocked(pattern); + if (manifest && manifest.integrity) { + var manifestIntegrity = ssri.stringify(manifest.integrity); + return manifestIntegrity === existingIntegrityInfo; + } + return false; + }); + + // remove command is followed by install with force, lockfile will be rewritten in any case then + if (!this.flags.force && this.lockfile.parseResultType === 'success' && lockFileHasAllPatterns && lockfilePatternsMatch && resolverPatternsAreSameAsInLockfile && integrityPatternsAreSameAsInLockfile && patterns.length) { + return; + } + + // build lockfile location + var loc = path.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME); + + // write lockfile + var lockSource = (0, (_lockfile2 || _load_lockfile2()).stringify)(lockfileBasedOnResolver, false, this.config.enableLockfileVersions); + yield (_fs || _load_fs()).writeFilePreservingEol(loc, lockSource); + + this._logSuccessSaveLockfile(); + }); + + function saveLockfileAndIntegrity(_x13, _x14) { + return _ref39.apply(this, arguments); + } + + return saveLockfileAndIntegrity; + }(); + + Install.prototype._logSuccessSaveLockfile = function _logSuccessSaveLockfile() { + this.reporter.success(this.reporter.lang('savedLockfile')); + }; + + /** + * Load the dependency graph of the current install. Only does package resolving and wont write to the cwd. + */ + + + Install.prototype.hydrate = function () { + var _ref40 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (ignoreUnusedPatterns) { + var request = yield this.fetchRequestFromCwd([], ignoreUnusedPatterns); + var depRequests = request.requests, + rawPatterns = request.patterns, + ignorePatterns = request.ignorePatterns, + workspaceLayout = request.workspaceLayout; + + + yield this.resolver.init(depRequests, { + isFlat: this.flags.flat, + isFrozen: this.flags.frozenLockfile, + workspaceLayout + }); + yield this.flatten(rawPatterns); + this.markIgnored(ignorePatterns); + + // fetch packages, should hit cache most of the time + var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(this.resolver.getManifests(), this.config); + this.resolver.updateManifests(manifests); + yield (_packageCompatibility || _load_packageCompatibility()).check(this.resolver.getManifests(), this.config, this.flags.ignoreEngines); + + // expand minimal manifests + for (var _iterator15 = this.resolver.getManifests(), _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator15);;) { + var _ref41; + + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref41 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref41 = _i15.value; + } + + var _manifest3 = _ref41; + + var ref = _manifest3._reference; + invariant(ref, 'expected reference'); + var type = ref.remote.type; + // link specifier won't ever hit cache + + var _loc = ''; + if (type === 'link') { + continue; + } else if (type === 'workspace') { + if (!ref.remote.reference) { + continue; + } + _loc = ref.remote.reference; + } else { + _loc = this.config.generateModuleCachePath(ref); + } + var newPkg = yield this.config.readManifest(_loc); + yield this.resolver.updateManifest(ref, newPkg); + } + + return request; + }); + + function hydrate(_x15) { + return _ref40.apply(this, arguments); + } + + return hydrate; + }(); + + /** + * Check for updates every day and output a nag message if there's a newer version. + */ + + Install.prototype.checkUpdate = function checkUpdate() { + if (this.config.nonInteractive) { + // don't show upgrade dialog on CI or non-TTY terminals + return; + } + + // don't check if disabled + if (this.config.getOption('disable-self-update-check')) { + return; + } + + // only check for updates once a day + var lastUpdateCheck = Number(this.config.getOption('lastUpdateCheck')) || 0; + if (lastUpdateCheck && Date.now() - lastUpdateCheck < ONE_DAY) { + return; + } + + // don't bug for updates on tagged releases + if ((_yarnVersion || _load_yarnVersion()).version.indexOf('-') >= 0) { + return; + } + + this._checkUpdate().catch(function () { + // swallow errors + }); + }; + + Install.prototype._checkUpdate = function () { + var _ref42 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _this5 = this; + + var latestVersion = yield this.config.requestManager.request({ + url: (_constants || _load_constants()).SELF_UPDATE_VERSION_URL + }); + invariant(typeof latestVersion === 'string', 'expected string'); + latestVersion = latestVersion.trim(); + if (!semver.valid(latestVersion)) { + return; + } + + // ensure we only check for updates periodically + this.config.registries.yarn.saveHomeConfig({ + lastUpdateCheck: Date.now() + }); + + if (semver.gt(latestVersion, (_yarnVersion || _load_yarnVersion()).version)) { + var installationMethod = yield (0, (_yarnVersion || _load_yarnVersion()).getInstallationMethod)(); + this.maybeOutputUpdate = function () { + _this5.reporter.warn(_this5.reporter.lang('yarnOutdated', latestVersion, (_yarnVersion || _load_yarnVersion()).version)); + + var command = getUpdateCommand(installationMethod); + if (command) { + _this5.reporter.info(_this5.reporter.lang('yarnOutdatedCommand')); + _this5.reporter.command(command); + } else { + var installer = getUpdateInstaller(installationMethod); + if (installer) { + _this5.reporter.info(_this5.reporter.lang('yarnOutdatedInstaller', installer)); + } + } + }; + } + }); + + function _checkUpdate() { + return _ref42.apply(this, arguments); + } + + return _checkUpdate; + }(); + + /** + * Method to override with a possible upgrade message. + */ + + Install.prototype.maybeOutputUpdate = function maybeOutputUpdate() {}; + + return Install; +}(); + +function hasWrapper(commander, args) { + return true; +} + +function setFlags(commander) { + commander.description('Yarn install is used to install all dependencies for a project.'); + commander.usage('install [flags]'); + commander.option('-A, --audit', 'Run vulnerability audit on installed packages'); + commander.option('-g, --global', 'DEPRECATED'); + commander.option('-S, --save', 'DEPRECATED - save package to your `dependencies`'); + commander.option('-D, --save-dev', 'DEPRECATED - save package to your `devDependencies`'); + commander.option('-P, --save-peer', 'DEPRECATED - save package to your `peerDependencies`'); + commander.option('-O, --save-optional', 'DEPRECATED - save package to your `optionalDependencies`'); + commander.option('-E, --save-exact', 'DEPRECATED'); + commander.option('-T, --save-tilde', 'DEPRECATED'); +} + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(614), __esModule: true }; + +/***/ }), +/* 42 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SubjectSubscriber; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Subject; }); +/* unused harmony export AnonymousSubject */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__ = __webpack_require__(386); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__ = __webpack_require__(253); +/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */ + + + + + + + +var SubjectSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SubjectSubscriber, _super); + function SubjectSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.destination = destination; + return _this; + } + return SubjectSubscriber; +}(__WEBPACK_IMPORTED_MODULE_2__Subscriber__["a" /* Subscriber */])); + +var Subject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](Subject, _super); + function Subject() { + var _this = _super.call(this) || this; + _this.observers = []; + _this.closed = false; + _this.isStopped = false; + _this.hasError = false; + _this.thrownError = null; + return _this; + } + Subject.prototype[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_rxSubscriber__["a" /* rxSubscriber */]] = function () { + return new SubjectSubscriber(this); + }; + Subject.prototype.lift = function (operator) { + var subject = new AnonymousSubject(this, this); + subject.operator = operator; + return subject; + }; + Subject.prototype.next = function (value) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + if (!this.isStopped) { + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].next(value); + } + } + }; + Subject.prototype.error = function (err) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.hasError = true; + this.thrownError = err; + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].error(err); + } + this.observers.length = 0; + }; + Subject.prototype.complete = function () { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + this.isStopped = true; + var observers = this.observers; + var len = observers.length; + var copy = observers.slice(); + for (var i = 0; i < len; i++) { + copy[i].complete(); + } + this.observers.length = 0; + }; + Subject.prototype.unsubscribe = function () { + this.isStopped = true; + this.closed = true; + this.observers = null; + }; + Subject.prototype._trySubscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else { + return _super.prototype._trySubscribe.call(this, subscriber); + } + }; + Subject.prototype._subscribe = function (subscriber) { + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_4__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else if (this.hasError) { + subscriber.error(this.thrownError); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else if (this.isStopped) { + subscriber.complete(); + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else { + this.observers.push(subscriber); + return new __WEBPACK_IMPORTED_MODULE_5__SubjectSubscription__["a" /* SubjectSubscription */](this, subscriber); + } + }; + Subject.prototype.asObservable = function () { + var observable = new __WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */](); + observable.source = this; + return observable; + }; + Subject.create = function (destination, source) { + return new AnonymousSubject(destination, source); + }; + return Subject; +}(__WEBPACK_IMPORTED_MODULE_1__Observable__["a" /* Observable */])); + +var AnonymousSubject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AnonymousSubject, _super); + function AnonymousSubject(destination, source) { + var _this = _super.call(this) || this; + _this.destination = destination; + _this.source = source; + return _this; + } + AnonymousSubject.prototype.next = function (value) { + var destination = this.destination; + if (destination && destination.next) { + destination.next(value); + } + }; + AnonymousSubject.prototype.error = function (err) { + var destination = this.destination; + if (destination && destination.error) { + this.destination.error(err); + } + }; + AnonymousSubject.prototype.complete = function () { + var destination = this.destination; + if (destination && destination.complete) { + this.destination.complete(); + } + }; + AnonymousSubject.prototype._subscribe = function (subscriber) { + var source = this.source; + if (source) { + return this.source.subscribe(subscriber); + } + else { + return __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + }; + return AnonymousSubject; +}(Subject)); + +//# sourceMappingURL=Subject.js.map + + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +var store = __webpack_require__(220)('wks'); +var uid = __webpack_require__(156); +var Symbol = __webpack_require__(36).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; + /***/ }), -/* 32 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** @@ -4806,7 +8110,7 @@ $exports.store = store; var undefined; /** Used as the semantic version number. */ - var VERSION = '4.17.4'; + var VERSION = '4.17.10'; /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; @@ -4937,7 +8241,6 @@ $exports.store = store; /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** @@ -5037,8 +8340,8 @@ $exports.store = store; reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', - rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; @@ -5231,6 +8534,14 @@ $exports.store = store; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + + if (types) { + return types; + } + + // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); @@ -5245,34 +8556,6 @@ $exports.store = store; /*--------------------------------------------------------------------------*/ - /** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ - function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; - } - - /** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ - function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; - } - /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. @@ -6039,6 +9322,20 @@ $exports.store = store; return result; } + /** + * Gets the value at `key`, unless `key` is "__proto__". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function safeGet(object, key) { + return key == '__proto__' + ? undefined + : object[key]; + } + /** * Converts `set` to an array of its values. * @@ -7471,7 +10768,7 @@ $exports.store = store; if (!cloneableTags[tag]) { return object ? value : {}; } - result = initCloneByTag(value, tag, baseClone, isDeep); + result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. @@ -7482,6 +10779,22 @@ $exports.store = store; } stack.set(value, result); + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + + return result; + } + + if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + + return result; + } + var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); @@ -8409,7 +11722,7 @@ $exports.store = store; } else { var newValue = customizer - ? customizer(object[key], srcValue, (key + ''), object, source, stack) + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { @@ -8436,8 +11749,8 @@ $exports.store = store; * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = object[key], - srcValue = source[key], + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { @@ -9345,20 +12658,6 @@ $exports.store = store; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } - /** - * Creates a clone of `map`. - * - * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. - */ - function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); - } - /** * Creates a clone of `regexp`. * @@ -9372,20 +12671,6 @@ $exports.store = store; return result; } - /** - * Creates a clone of `set`. - * - * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. - */ - function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); - } - /** * Creates a clone of the `symbol` object. * @@ -10980,7 +14265,7 @@ $exports.store = store; */ function initCloneArray(array) { var length = array.length, - result = array.constructor(length); + result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { @@ -11007,16 +14292,15 @@ $exports.store = store; * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ - function initCloneByTag(object, tag, cloneFunc, isDeep) { + function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: @@ -11035,7 +14319,7 @@ $exports.store = store; return cloneTypedArray(object, isDeep); case mapTag: - return cloneMap(object, isDeep, cloneFunc); + return new Ctor; case numberTag: case stringTag: @@ -11045,7 +14329,7 @@ $exports.store = store; return cloneRegExp(object); case setTag: - return cloneSet(object, isDeep, cloneFunc); + return new Ctor; case symbolTag: return cloneSymbol(object); @@ -11092,10 +14376,13 @@ $exports.store = store; * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { + var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); } /** @@ -11545,11 +14832,11 @@ $exports.store = store; */ var stringToPath = memoizeCapped(function(string) { var result = []; - if (reLeadingDot.test(string)) { + if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } - string.replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); @@ -15157,9 +18444,11 @@ $exports.store = store; function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, - result = wait - timeSinceLastCall; + timeWaiting = wait - timeSinceLastCall; - return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result; + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; } function shouldInvoke(time) { @@ -17591,9 +20880,35 @@ $exports.store = store; * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ - var defaults = baseRest(function(args) { - args.push(undefined, customDefaultsAssignIn); - return apply(assignInWith, undefined, args); + var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; }); /** @@ -17990,6 +21305,11 @@ $exports.store = store; * // => { '1': 'c', '2': 'b' } */ var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + result[value] = key; }, constant(identity)); @@ -18020,6 +21340,11 @@ $exports.store = store; * // => { 'group1': ['a', 'c'], 'group2': ['b'] } */ var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + if (hasOwnProperty.call(result, value)) { result[value].push(key); } else { @@ -21878,1467 +25203,72 @@ $exports.store = store; } }.call(this)); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(145)(module))) /***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(482), __esModule: true }; - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { +/* 45 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return EMPTY; }); +/* harmony export (immutable) */ __webpack_exports__["a"] = empty; +/* unused harmony export emptyScheduled */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */ - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.wrapLifecycle = exports.run = exports.install = exports.Install = undefined; - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); +var EMPTY = /*@__PURE__*/ new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { return subscriber.complete(); }); +function empty(scheduler) { + return scheduler ? emptyScheduled(scheduler) : EMPTY; } - -var _extends2; - -function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); +function emptyScheduled(scheduler) { + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); } +//# sourceMappingURL=empty.js.map -var _assign; - -function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var install = exports.install = function () { - var _ref35 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, lockfile) { - yield wrapLifecycle(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var install = new Install(flags, config, reporter, lockfile); - yield install.init(); - })); - }); - - return function install(_x16, _x17, _x18, _x19) { - return _ref35.apply(this, arguments); - }; -}(); - -var run = exports.run = function () { - var _ref37 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - var lockfile = void 0; - var error = 'installCommandRenamed'; - if (flags.lockfile === false) { - lockfile = new (_lockfile || _load_lockfile()).default(); - } else { - lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); - } - - if (args.length) { - var exampleArgs = args.slice(); - - if (flags.saveDev) { - exampleArgs.push('--dev'); - } - if (flags.savePeer) { - exampleArgs.push('--peer'); - } - if (flags.saveOptional) { - exampleArgs.push('--optional'); - } - if (flags.saveExact) { - exampleArgs.push('--exact'); - } - if (flags.saveTilde) { - exampleArgs.push('--tilde'); - } - var command = 'add'; - if (flags.global) { - error = 'globalFlagRemoved'; - command = 'global add'; - } - throw new (_errors || _load_errors()).MessageError(reporter.lang(error, `yarn ${command} ${exampleArgs.join(' ')}`)); - } - - yield install(config, reporter, flags, lockfile); - }); - - return function run(_x20, _x21, _x22, _x23) { - return _ref37.apply(this, arguments); - }; -}(); - -var wrapLifecycle = exports.wrapLifecycle = function () { - var _ref38 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags, factory) { - yield config.executeLifecycleScript('preinstall'); - - yield factory(); - - // npm behaviour, seems kinda funky but yay compatibility - yield config.executeLifecycleScript('install'); - yield config.executeLifecycleScript('postinstall'); - - if (!config.production) { - if (!config.disablePrepublish) { - yield config.executeLifecycleScript('prepublish'); - } - yield config.executeLifecycleScript('prepare'); - } - }); - - return function wrapLifecycle(_x24, _x25, _x26) { - return _ref38.apply(this, arguments); - }; -}(); - -exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; - -var _hooks; - -function _load_hooks() { - return _hooks = __webpack_require__(445); -} - -var _index; - -function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(160)); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _integrityChecker; - -function _load_integrityChecker() { - return _integrityChecker = _interopRequireDefault(__webpack_require__(150)); -} - -var _lockfile; - -function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); -} - -var _lockfile2; - -function _load_lockfile2() { - return _lockfile2 = __webpack_require__(21); -} - -var _packageFetcher; - -function _load_packageFetcher() { - return _packageFetcher = _interopRequireWildcard(__webpack_require__(151)); -} - -var _packageInstallScripts; - -function _load_packageInstallScripts() { - return _packageInstallScripts = _interopRequireDefault(__webpack_require__(424)); -} - -var _packageCompatibility; - -function _load_packageCompatibility() { - return _packageCompatibility = _interopRequireWildcard(__webpack_require__(239)); -} - -var _packageResolver; - -function _load_packageResolver() { - return _packageResolver = _interopRequireDefault(__webpack_require__(241)); -} - -var _packageLinker; - -function _load_packageLinker() { - return _packageLinker = _interopRequireDefault(__webpack_require__(152)); -} - -var _index2; - -function _load_index2() { - return _index2 = __webpack_require__(40); -} - -var _index3; - -function _load_index3() { - return _index3 = __webpack_require__(41); -} - -var _autoclean; - -function _load_autoclean() { - return _autoclean = __webpack_require__(229); -} - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _normalizePattern; - -function _load_normalizePattern() { - return _normalizePattern = __webpack_require__(42); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); -} - -var _yarnVersion; - -function _load_yarnVersion() { - return _yarnVersion = __webpack_require__(84); -} - -var _workspaceLayout; - -function _load_workspaceLayout() { - return _workspaceLayout = _interopRequireDefault(__webpack_require__(67)); -} - -var _resolutionMap; - -function _load_resolutionMap() { - return _resolutionMap = _interopRequireDefault(__webpack_require__(155)); -} - -var _guessName; - -function _load_guessName() { - return _guessName = _interopRequireDefault(__webpack_require__(113)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var deepEqual = __webpack_require__(536); - -var emoji = __webpack_require__(197); -var invariant = __webpack_require__(9); -var path = __webpack_require__(0); -var semver = __webpack_require__(20); -var uuid = __webpack_require__(83); - -var ONE_DAY = 1000 * 60 * 60 * 24; - -/** - * Try and detect the installation method for Yarn and provide a command to update it with. - */ - -function getUpdateCommand(installationMethod) { - if (installationMethod === 'tar') { - return `curl --compressed -o- -L ${(_constants || _load_constants()).YARN_INSTALLER_SH} | bash`; - } - - if (installationMethod === 'homebrew') { - return 'brew upgrade yarn'; - } - - if (installationMethod === 'deb') { - return 'sudo apt-get update && sudo apt-get install yarn'; - } - - if (installationMethod === 'rpm') { - return 'sudo yum install yarn'; - } - - if (installationMethod === 'npm') { - return 'npm install --global yarn'; - } - - if (installationMethod === 'chocolatey') { - return 'choco upgrade yarn'; - } - - if (installationMethod === 'apk') { - return 'apk update && apk add -u yarn'; - } - - return null; -} - -function getUpdateInstaller(installationMethod) { - // Windows - if (installationMethod === 'msi') { - return (_constants || _load_constants()).YARN_INSTALLER_MSI; - } - - return null; -} - -function normalizeFlags(config, rawFlags) { - var flags = { - // install - har: !!rawFlags.har, - ignorePlatform: !!rawFlags.ignorePlatform, - ignoreEngines: !!rawFlags.ignoreEngines, - ignoreScripts: !!rawFlags.ignoreScripts, - ignoreOptional: !!rawFlags.ignoreOptional, - force: !!rawFlags.force, - flat: !!rawFlags.flat, - lockfile: rawFlags.lockfile !== false, - pureLockfile: !!rawFlags.pureLockfile, - updateChecksums: !!rawFlags.updateChecksums, - skipIntegrityCheck: !!rawFlags.skipIntegrityCheck, - frozenLockfile: !!rawFlags.frozenLockfile, - linkDuplicates: !!rawFlags.linkDuplicates, - checkFiles: !!rawFlags.checkFiles, - - // add - peer: !!rawFlags.peer, - dev: !!rawFlags.dev, - optional: !!rawFlags.optional, - exact: !!rawFlags.exact, - tilde: !!rawFlags.tilde, - ignoreWorkspaceRootCheck: !!rawFlags.ignoreWorkspaceRootCheck, - - // outdated, update-interactive - includeWorkspaceDeps: !!rawFlags.includeWorkspaceDeps, - - // add, remove, update - workspaceRootIsCwd: rawFlags.workspaceRootIsCwd !== false, - - // focus - focus: !!rawFlags.focus - }; - - if (config.getOption('ignore-scripts')) { - flags.ignoreScripts = true; - } - - if (config.getOption('ignore-platform')) { - flags.ignorePlatform = true; - } - - if (config.getOption('ignore-engines')) { - flags.ignoreEngines = true; - } - - if (config.getOption('ignore-optional')) { - flags.ignoreOptional = true; - } - - if (config.getOption('force')) { - flags.force = true; - } - - return flags; -} - -var Install = exports.Install = function () { - function Install(flags, config, reporter, lockfile) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Install); - - this.rootManifestRegistries = []; - this.rootPatternsToOrigin = (0, (_map || _load_map()).default)(); - this.lockfile = lockfile; - this.reporter = reporter; - this.config = config; - this.flags = normalizeFlags(config, flags); - this.resolutions = (0, (_map || _load_map()).default)(); // Legacy resolutions field used for flat install mode - this.resolutionMap = new (_resolutionMap || _load_resolutionMap()).default(config); // Selective resolutions for nested dependencies - this.resolver = new (_packageResolver || _load_packageResolver()).default(config, lockfile, this.resolutionMap); - this.integrityChecker = new (_integrityChecker || _load_integrityChecker()).default(config); - this.linker = new (_packageLinker || _load_packageLinker()).default(config, this.resolver); - this.scripts = new (_packageInstallScripts || _load_packageInstallScripts()).default(config, this.resolver, this.flags.force); - } - - /** - * Create a list of dependency requests from the current directories manifests. - */ - - Install.prototype.fetchRequestFromCwd = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _this = this; - - var excludePatterns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var ignoreUnusedPatterns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var patterns = []; - var deps = []; - var resolutionDeps = []; - var manifest = {}; - - var ignorePatterns = []; - var usedPatterns = []; - var workspaceLayout = void 0; - - // some commands should always run in the context of the entire workspace - var cwd = this.flags.includeWorkspaceDeps || this.flags.workspaceRootIsCwd ? this.config.lockfileFolder : this.config.cwd; - - // non-workspaces are always root, otherwise check for workspace root - var cwdIsRoot = !this.config.workspaceRootFolder || this.config.lockfileFolder === cwd; - - // exclude package names that are in install args - var excludeNames = []; - for (var _iterator = excludePatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var _pattern = _ref2; - - if ((0, (_index3 || _load_index3()).getExoticResolver)(_pattern)) { - excludeNames.push((0, (_guessName || _load_guessName()).default)(_pattern)); - } else { - // extract the name - var parts = (0, (_normalizePattern || _load_normalizePattern()).normalizePattern)(_pattern); - excludeNames.push(parts.name); - } - } - - var stripExcluded = function stripExcluded(manifest) { - for (var _iterator2 = excludeNames, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var exclude = _ref3; - - if (manifest.dependencies && manifest.dependencies[exclude]) { - delete manifest.dependencies[exclude]; - } - if (manifest.devDependencies && manifest.devDependencies[exclude]) { - delete manifest.devDependencies[exclude]; - } - if (manifest.optionalDependencies && manifest.optionalDependencies[exclude]) { - delete manifest.optionalDependencies[exclude]; - } - } - }; - - var _loop = function* _loop(registry) { - var filename = (_index2 || _load_index2()).registries[registry].filename; - - var loc = path.join(cwd, filename); - if (!(yield (_fs || _load_fs()).exists(loc))) { - return 'continue'; - } - - _this.rootManifestRegistries.push(registry); - - var projectManifestJson = yield _this.config.readJson(loc); - yield (0, (_index || _load_index()).default)(projectManifestJson, cwd, _this.config, cwdIsRoot); - - (0, (_assign || _load_assign()).default)(_this.resolutions, projectManifestJson.resolutions); - (0, (_assign || _load_assign()).default)(manifest, projectManifestJson); - - _this.resolutionMap.init(_this.resolutions); - for (var _iterator4 = (0, (_keys || _load_keys()).default)(_this.resolutionMap.resolutionsByPackage), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { - var _ref5; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; - } - - var _packageName = _ref5; - - for (var _iterator6 = _this.resolutionMap.resolutionsByPackage[_packageName], _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { - var _ref9; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref9 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref9 = _i6.value; - } - - var _ref8 = _ref9; - var _pattern3 = _ref8.pattern; - - resolutionDeps = [].concat(resolutionDeps, [{ registry, pattern: _pattern3, optional: false, hint: 'resolution' }]); - } - } - - var pushDeps = function pushDeps(depType, manifest, _ref6, isUsed) { - var hint = _ref6.hint, - optional = _ref6.optional; - - if (ignoreUnusedPatterns && !isUsed) { - return; - } - // We only take unused dependencies into consideration to get deterministic hoisting. - // Since flat mode doesn't care about hoisting and everything is top level and specified then we can safely - // leave these out. - if (_this.flags.flat && !isUsed) { - return; - } - var depMap = manifest[depType]; - for (var name in depMap) { - if (excludeNames.indexOf(name) >= 0) { - continue; - } - - var _pattern2 = name; - if (!_this.lockfile.getLocked(_pattern2)) { - // when we use --save we save the dependency to the lockfile with just the name rather than the - // version combo - _pattern2 += '@' + depMap[name]; - } - - // normalization made sure packages are mentioned only once - if (isUsed) { - usedPatterns.push(_pattern2); - } else { - ignorePatterns.push(_pattern2); - } - - _this.rootPatternsToOrigin[_pattern2] = depType; - patterns.push(_pattern2); - deps.push({ pattern: _pattern2, registry, hint, optional, workspaceName: manifest.name, workspaceLoc: manifest._loc }); - } - }; - - if (cwdIsRoot) { - pushDeps('dependencies', projectManifestJson, { hint: null, optional: false }, true); - pushDeps('devDependencies', projectManifestJson, { hint: 'dev', optional: false }, !_this.config.production); - pushDeps('optionalDependencies', projectManifestJson, { hint: 'optional', optional: true }, true); - } - - if (_this.config.workspaceRootFolder) { - var workspaceLoc = cwdIsRoot ? loc : path.join(_this.config.lockfileFolder, filename); - var workspacesRoot = path.dirname(workspaceLoc); - - var workspaceManifestJson = projectManifestJson; - if (!cwdIsRoot) { - // the manifest we read before was a child workspace, so get the root - workspaceManifestJson = yield _this.config.readJson(workspaceLoc); - yield (0, (_index || _load_index()).default)(workspaceManifestJson, workspacesRoot, _this.config, true); - } - - var workspaces = yield _this.config.resolveWorkspaces(workspacesRoot, workspaceManifestJson); - workspaceLayout = new (_workspaceLayout || _load_workspaceLayout()).default(workspaces, _this.config); - - // add virtual manifest that depends on all workspaces, this way package hoisters and resolvers will work fine - var workspaceDependencies = (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.dependencies); - for (var _iterator5 = (0, (_keys || _load_keys()).default)(workspaces), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { - var _ref7; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref7 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref7 = _i5.value; - } - - var workspaceName = _ref7; - - var workspaceManifest = workspaces[workspaceName].manifest; - workspaceDependencies[workspaceName] = workspaceManifest.version; - - // include dependencies from all workspaces - if (_this.flags.includeWorkspaceDeps) { - pushDeps('dependencies', workspaceManifest, { hint: null, optional: false }, true); - pushDeps('devDependencies', workspaceManifest, { hint: 'dev', optional: false }, !_this.config.production); - pushDeps('optionalDependencies', workspaceManifest, { hint: 'optional', optional: true }, true); - } - } - var virtualDependencyManifest = { - _uid: '', - name: `workspace-aggregator-${uuid.v4()}`, - version: '1.0.0', - _registry: 'npm', - _loc: workspacesRoot, - dependencies: workspaceDependencies, - devDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.devDependencies), - optionalDependencies: (0, (_extends2 || _load_extends()).default)({}, workspaceManifestJson.optionalDependencies), - private: workspaceManifestJson.private, - workspaces: workspaceManifestJson.workspaces - }; - workspaceLayout.virtualManifestName = virtualDependencyManifest.name; - var virtualDep = {}; - virtualDep[virtualDependencyManifest.name] = virtualDependencyManifest.version; - workspaces[virtualDependencyManifest.name] = { loc: workspacesRoot, manifest: virtualDependencyManifest }; - - // ensure dependencies that should be excluded are stripped from the correct manifest - stripExcluded(cwdIsRoot ? virtualDependencyManifest : workspaces[projectManifestJson.name].manifest); - - pushDeps('workspaces', { workspaces: virtualDep }, { hint: 'workspaces', optional: false }, true); - } - - return 'break'; - }; - - _loop2: for (var _iterator3 = (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var registry = _ref4; - - var _ret = yield* _loop(registry); - - switch (_ret) { - case 'continue': - continue; - - case 'break': - break _loop2;} - } - - // inherit root flat flag - - - if (manifest.flat) { - this.flags.flat = true; - } - - return { - requests: [].concat(resolutionDeps, deps), - patterns, - manifest, - usedPatterns, - ignorePatterns, - workspaceLayout - }; - }); - - function fetchRequestFromCwd() { - return _ref.apply(this, arguments); - } - - return fetchRequestFromCwd; - }(); - - /** - * TODO description - */ - - Install.prototype.prepareRequests = function prepareRequests(requests) { - return requests; - }; - - Install.prototype.preparePatterns = function preparePatterns(patterns) { - return patterns; - }; - - Install.prototype.preparePatternsForLinking = function preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) { - return patterns; - }; - - Install.prototype.bailout = function () { - var _ref10 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { - if (this.flags.skipIntegrityCheck || this.flags.force) { - return false; - } - var lockfileCache = this.lockfile.cache; - if (!lockfileCache) { - return false; - } - var lockfileClean = this.lockfile.parseResultType === 'success'; - var match = yield this.integrityChecker.check(patterns, lockfileCache, this.flags, workspaceLayout); - if (this.flags.frozenLockfile && (!lockfileClean || match.missingPatterns.length > 0)) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('frozenLockfileError')); - } - - var haveLockfile = yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME)); - - if (match.integrityMatches && haveLockfile && lockfileClean) { - this.reporter.success(this.reporter.lang('upToDate')); - return true; - } - - if (match.integrityFileMissing && haveLockfile) { - // Integrity file missing, force script installations - this.scripts.setForce(true); - return false; - } - - if (match.hardRefreshRequired) { - // e.g. node version doesn't match, force script installations - this.scripts.setForce(true); - return false; - } - - if (!patterns.length && !match.integrityFileMissing) { - this.reporter.success(this.reporter.lang('nothingToInstall')); - yield this.createEmptyManifestFolders(); - yield this.saveLockfileAndIntegrity(patterns, workspaceLayout); - return true; - } - - return false; - }); - - function bailout(_x3, _x4) { - return _ref10.apply(this, arguments); - } - - return bailout; - }(); - - /** - * Produce empty folders for all used root manifests. - */ - - Install.prototype.createEmptyManifestFolders = function () { - var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - if (this.config.modulesFolder) { - // already created - return; - } - - for (var _iterator7 = this.rootManifestRegistries, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { - var _ref12; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref12 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref12 = _i7.value; - } - - var registryName = _ref12; - var folder = this.config.registries[registryName].folder; - - yield (_fs || _load_fs()).mkdirp(path.join(this.config.lockfileFolder, folder)); - } - }); - - function createEmptyManifestFolders() { - return _ref11.apply(this, arguments); - } - - return createEmptyManifestFolders; - }(); - - /** - * TODO description - */ - - Install.prototype.markIgnored = function markIgnored(patterns) { - for (var _iterator8 = patterns, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) { - var _ref13; - - if (_isArray8) { - if (_i8 >= _iterator8.length) break; - _ref13 = _iterator8[_i8++]; - } else { - _i8 = _iterator8.next(); - if (_i8.done) break; - _ref13 = _i8.value; - } - - var _pattern4 = _ref13; - - var _manifest = this.resolver.getStrictResolvedPattern(_pattern4); - var ref = _manifest._reference; - invariant(ref, 'expected package reference'); - - // just mark the package as ignored. if the package is used by a required package, the hoister - // will take care of that. - ref.ignore = true; - } - }; - - /** - * helper method that gets only recent manifests - * used by global.ls command - */ - - - Install.prototype.getFlattenedDeps = function () { - var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _ref15 = yield this.fetchRequestFromCwd(), - depRequests = _ref15.requests, - rawPatterns = _ref15.patterns; - - yield this.resolver.init(depRequests, {}); - - var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(this.resolver.getManifests(), this.config); - this.resolver.updateManifests(manifests); - - return this.flatten(rawPatterns); - }); - - function getFlattenedDeps() { - return _ref14.apply(this, arguments); - } - - return getFlattenedDeps; - }(); - - /** - * TODO description - */ - - Install.prototype.init = function () { - var _ref16 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _this2 = this; - - this.checkUpdate(); - - // warn if we have a shrinkwrap - if (yield (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, 'npm-shrinkwrap.json'))) { - this.reporter.warn(this.reporter.lang('shrinkwrapWarning')); - } - - // running a focused install in a workspace root is not allowed - if (this.flags.focus && (!this.config.workspaceRootFolder || this.config.cwd === this.config.workspaceRootFolder)) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesFocusRootCheck')); - } - - var flattenedTopLevelPatterns = []; - var steps = []; - - var _ref17 = yield this.fetchRequestFromCwd(), - depRequests = _ref17.requests, - rawPatterns = _ref17.patterns, - ignorePatterns = _ref17.ignorePatterns, - workspaceLayout = _ref17.workspaceLayout, - manifest = _ref17.manifest; - - var topLevelPatterns = []; - - var artifacts = yield this.integrityChecker.getArtifacts(); - if (artifacts) { - this.linker.setArtifacts(artifacts); - this.scripts.setArtifacts(artifacts); - } - - if (!this.flags.ignoreEngines && typeof manifest.engines === 'object') { - steps.push(function () { - var _ref18 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { - _this2.reporter.step(curr, total, _this2.reporter.lang('checkingManifest'), emoji.get('mag')); - yield (_packageCompatibility || _load_packageCompatibility()).checkOne((0, (_extends2 || _load_extends()).default)({ _reference: {} }, manifest), _this2.config, _this2.flags.ignoreEngines); - }); - - return function (_x5, _x6) { - return _ref18.apply(this, arguments); - }; - }()); - } - - steps.push(function (curr, total) { - return (0, (_hooks || _load_hooks()).callThroughHook)('resolveStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - _this2.reporter.step(curr, total, _this2.reporter.lang('resolvingPackages'), emoji.get('mag')); - yield _this2.resolver.init(_this2.prepareRequests(depRequests), { - isFlat: _this2.flags.flat, - isFrozen: _this2.flags.frozenLockfile, - workspaceLayout, - focus: _this2.flags.focus - }); - topLevelPatterns = _this2.preparePatterns(rawPatterns); - flattenedTopLevelPatterns = yield _this2.flatten(topLevelPatterns); - return { bailout: yield _this2.bailout(topLevelPatterns, workspaceLayout) }; - })); - }); - - steps.push(function (curr, total) { - return (0, (_hooks || _load_hooks()).callThroughHook)('fetchStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - _this2.markIgnored(ignorePatterns); - _this2.reporter.step(curr, total, _this2.reporter.lang('fetchingPackages'), emoji.get('truck')); - var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(_this2.resolver.getManifests(), _this2.config); - _this2.resolver.updateManifests(manifests); - yield (_packageCompatibility || _load_packageCompatibility()).check(_this2.resolver.getManifests(), _this2.config, _this2.flags.ignoreEngines); - })); - }); - - steps.push(function (curr, total) { - return (0, (_hooks || _load_hooks()).callThroughHook)('linkStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - // remove integrity hash to make this operation atomic - yield _this2.integrityChecker.removeIntegrityFile(); - _this2.reporter.step(curr, total, _this2.reporter.lang('linkingDependencies'), emoji.get('link')); - flattenedTopLevelPatterns = _this2.preparePatternsForLinking(flattenedTopLevelPatterns, manifest, _this2.config.lockfileFolder === _this2.config.cwd); - yield _this2.linker.init(flattenedTopLevelPatterns, workspaceLayout, { - linkDuplicates: _this2.flags.linkDuplicates, - ignoreOptional: _this2.flags.ignoreOptional, - focus: _this2.flags.focus - }); - })); - }); - - steps.push(function (curr, total) { - return (0, (_hooks || _load_hooks()).callThroughHook)('buildStep', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - _this2.reporter.step(curr, total, _this2.flags.force ? _this2.reporter.lang('rebuildingPackages') : _this2.reporter.lang('buildingFreshPackages'), emoji.get('page_with_curl')); - - if (_this2.flags.ignoreScripts) { - _this2.reporter.warn(_this2.reporter.lang('ignoredScripts')); - } else { - yield _this2.scripts.init(flattenedTopLevelPatterns); - } - })); - }); - - if (this.flags.har) { - steps.push(function () { - var _ref23 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { - var formattedDate = new Date().toISOString().replace(/:/g, '-'); - var filename = `yarn-install_${formattedDate}.har`; - _this2.reporter.step(curr, total, _this2.reporter.lang('savingHar', filename), emoji.get('black_circle_for_record')); - yield _this2.config.requestManager.saveHar(filename); - }); - - return function (_x7, _x8) { - return _ref23.apply(this, arguments); - }; - }()); - } - - if (yield this.shouldClean()) { - steps.push(function () { - var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (curr, total) { - _this2.reporter.step(curr, total, _this2.reporter.lang('cleaningModules'), emoji.get('recycle')); - yield (0, (_autoclean || _load_autoclean()).clean)(_this2.config, _this2.reporter); - }); - - return function (_x9, _x10) { - return _ref24.apply(this, arguments); - }; - }()); - } - - var currentStep = 0; - for (var _iterator9 = steps, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) { - var _ref25; - - if (_isArray9) { - if (_i9 >= _iterator9.length) break; - _ref25 = _iterator9[_i9++]; - } else { - _i9 = _iterator9.next(); - if (_i9.done) break; - _ref25 = _i9.value; - } - - var step = _ref25; - - var stepResult = yield step(++currentStep, steps.length); - if (stepResult && stepResult.bailout) { - this.maybeOutputUpdate(); - return flattenedTopLevelPatterns; - } - } - - // fin! - yield this.saveLockfileAndIntegrity(topLevelPatterns, workspaceLayout); - this.maybeOutputUpdate(); - this.config.requestManager.clearCache(); - return flattenedTopLevelPatterns; - }); - - function init() { - return _ref16.apply(this, arguments); - } - - return init; - }(); - - /** - * Check if we should run the cleaning step. - */ - - Install.prototype.shouldClean = function shouldClean() { - return (_fs || _load_fs()).exists(path.join(this.config.lockfileFolder, (_constants || _load_constants()).CLEAN_FILENAME)); - }; - - /** - * TODO - */ - - Install.prototype.flatten = function () { - var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns) { - var _this3 = this; - - if (!this.flags.flat) { - return patterns; - } - - var flattenedPatterns = []; - - for (var _iterator10 = this.resolver.getAllDependencyNamesByLevelOrder(patterns), _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator10);;) { - var _ref27; - - if (_isArray10) { - if (_i10 >= _iterator10.length) break; - _ref27 = _iterator10[_i10++]; - } else { - _i10 = _iterator10.next(); - if (_i10.done) break; - _ref27 = _i10.value; - } - - var name = _ref27; - - var infos = this.resolver.getAllInfoForPackageName(name).filter(function (manifest) { - var ref = manifest._reference; - invariant(ref, 'expected package reference'); - return !ref.ignore; - }); - - if (infos.length === 0) { - continue; - } - - if (infos.length === 1) { - // single version of this package - // take out a single pattern as multiple patterns may have resolved to this package - flattenedPatterns.push(this.resolver.patternsByPackage[name][0]); - continue; - } - - var options = infos.map(function (info) { - var ref = info._reference; - invariant(ref, 'expected reference'); - return { - // TODO `and is required by {PARENT}`, - name: _this3.reporter.lang('manualVersionResolutionOption', ref.patterns.join(', '), info.version), - - value: info.version - }; - }); - var versions = infos.map(function (info) { - return info.version; - }); - var version = void 0; - - var resolutionVersion = this.resolutions[name]; - if (resolutionVersion && versions.indexOf(resolutionVersion) >= 0) { - // use json `resolution` version - version = resolutionVersion; - } else { - version = yield this.reporter.select(this.reporter.lang('manualVersionResolution', name), this.reporter.lang('answer'), options); - this.resolutions[name] = version; - } - - flattenedPatterns.push(this.resolver.collapseAllVersionsOfPackage(name, version)); - } - - // save resolutions to their appropriate root manifest - if ((0, (_keys || _load_keys()).default)(this.resolutions).length) { - var manifests = yield this.config.getRootManifests(); - - for (var _name in this.resolutions) { - var version = this.resolutions[_name]; - - var _patterns = this.resolver.patternsByPackage[_name]; - if (!_patterns) { - continue; - } - - var _manifest2 = void 0; - for (var _iterator11 = _patterns, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator11);;) { - var _ref28; - - if (_isArray11) { - if (_i11 >= _iterator11.length) break; - _ref28 = _iterator11[_i11++]; - } else { - _i11 = _iterator11.next(); - if (_i11.done) break; - _ref28 = _i11.value; - } - - var _pattern5 = _ref28; - - _manifest2 = this.resolver.getResolvedPattern(_pattern5); - if (_manifest2) { - break; - } - } - invariant(_manifest2, 'expected manifest'); - - var ref = _manifest2._reference; - invariant(ref, 'expected reference'); - - var object = manifests[ref.registry].object; - object.resolutions = object.resolutions || {}; - object.resolutions[_name] = version; - } - - yield this.config.saveRootManifests(manifests); - } - - return flattenedPatterns; - }); - - function flatten(_x11) { - return _ref26.apply(this, arguments); - } - - return flatten; - }(); - - /** - * Remove offline tarballs that are no longer required - */ - - Install.prototype.pruneOfflineMirror = function () { - var _ref29 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (lockfile) { - var mirror = this.config.getOfflineMirrorPath(); - if (!mirror) { - return; - } - - var requiredTarballs = new (_set || _load_set()).default(); - for (var dependency in lockfile) { - var resolved = lockfile[dependency].resolved; - if (resolved) { - var basename = path.basename(resolved.split('#')[0]); - if (dependency[0] === '@' && basename[0] !== '@') { - requiredTarballs.add(`${dependency.split('/')[0]}-${basename}`); - } - requiredTarballs.add(basename); - } - } - - var mirrorFiles = yield (_fs || _load_fs()).walk(mirror); - for (var _iterator12 = mirrorFiles, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator12);;) { - var _ref30; - - if (_isArray12) { - if (_i12 >= _iterator12.length) break; - _ref30 = _iterator12[_i12++]; - } else { - _i12 = _iterator12.next(); - if (_i12.done) break; - _ref30 = _i12.value; - } - - var file = _ref30; - - var isTarball = path.extname(file.basename) === '.tgz'; - // if using experimental-pack-script-packages-in-mirror flag, don't unlink prebuilt packages - var hasPrebuiltPackage = file.relative.startsWith('prebuilt/'); - if (isTarball && !hasPrebuiltPackage && !requiredTarballs.has(file.basename)) { - yield (_fs || _load_fs()).unlink(file.absolute); - } - } - }); - - function pruneOfflineMirror(_x12) { - return _ref29.apply(this, arguments); - } - - return pruneOfflineMirror; - }(); - - /** - * Save updated integrity and lockfiles. - */ - - Install.prototype.saveLockfileAndIntegrity = function () { - var _ref31 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { - var _this4 = this; - - var resolvedPatterns = {}; - (0, (_keys || _load_keys()).default)(this.resolver.patterns).forEach(function (pattern) { - if (!workspaceLayout || !workspaceLayout.getManifestByPattern(pattern)) { - resolvedPatterns[pattern] = _this4.resolver.patterns[pattern]; - } - }); - - // TODO this code is duplicated in a few places, need a common way to filter out workspace patterns from lockfile - patterns = patterns.filter(function (p) { - return !workspaceLayout || !workspaceLayout.getManifestByPattern(p); - }); - - var lockfileBasedOnResolver = this.lockfile.getLockfile(resolvedPatterns); - - if (this.config.pruneOfflineMirror) { - yield this.pruneOfflineMirror(lockfileBasedOnResolver); - } - - // write integrity hash - yield this.integrityChecker.save(patterns, lockfileBasedOnResolver, this.flags, workspaceLayout, this.scripts.getArtifacts()); - - // --no-lockfile or --pure-lockfile or --frozen-lockfile or --focus flag - if (this.flags.lockfile === false || this.flags.pureLockfile || this.flags.frozenLockfile) { - return; - } - - var lockFileHasAllPatterns = patterns.every(function (p) { - return _this4.lockfile.getLocked(p); - }); - var lockfilePatternsMatch = (0, (_keys || _load_keys()).default)(this.lockfile.cache || {}).every(function (p) { - return lockfileBasedOnResolver[p]; - }); - var resolverPatternsAreSameAsInLockfile = (0, (_keys || _load_keys()).default)(lockfileBasedOnResolver).every(function (pattern) { - var manifest = _this4.lockfile.getLocked(pattern); - return manifest && manifest.resolved === lockfileBasedOnResolver[pattern].resolved && deepEqual(manifest.prebuiltVariants, lockfileBasedOnResolver[pattern].prebuiltVariants); - }); - - // remove command is followed by install with force, lockfile will be rewritten in any case then - if (!this.flags.force && this.lockfile.parseResultType === 'success' && lockFileHasAllPatterns && lockfilePatternsMatch && resolverPatternsAreSameAsInLockfile && patterns.length) { - return; - } - - // build lockfile location - var loc = path.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME); - - // write lockfile - var lockSource = (0, (_lockfile2 || _load_lockfile2()).stringify)(lockfileBasedOnResolver, false, this.config.enableLockfileVersions); - yield (_fs || _load_fs()).writeFilePreservingEol(loc, lockSource); - - this._logSuccessSaveLockfile(); - }); - - function saveLockfileAndIntegrity(_x13, _x14) { - return _ref31.apply(this, arguments); - } - - return saveLockfileAndIntegrity; - }(); - - Install.prototype._logSuccessSaveLockfile = function _logSuccessSaveLockfile() { - this.reporter.success(this.reporter.lang('savedLockfile')); - }; - - /** - * Load the dependency graph of the current install. Only does package resolving and wont write to the cwd. - */ - - - Install.prototype.hydrate = function () { - var _ref32 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (ignoreUnusedPatterns) { - var request = yield this.fetchRequestFromCwd([], ignoreUnusedPatterns); - var depRequests = request.requests, - rawPatterns = request.patterns, - ignorePatterns = request.ignorePatterns, - workspaceLayout = request.workspaceLayout; - - - yield this.resolver.init(depRequests, { - isFlat: this.flags.flat, - isFrozen: this.flags.frozenLockfile, - workspaceLayout - }); - yield this.flatten(rawPatterns); - this.markIgnored(ignorePatterns); - - // fetch packages, should hit cache most of the time - var manifests = yield (_packageFetcher || _load_packageFetcher()).fetch(this.resolver.getManifests(), this.config); - this.resolver.updateManifests(manifests); - yield (_packageCompatibility || _load_packageCompatibility()).check(this.resolver.getManifests(), this.config, this.flags.ignoreEngines); - - // expand minimal manifests - for (var _iterator13 = this.resolver.getManifests(), _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator13);;) { - var _ref33; - - if (_isArray13) { - if (_i13 >= _iterator13.length) break; - _ref33 = _iterator13[_i13++]; - } else { - _i13 = _iterator13.next(); - if (_i13.done) break; - _ref33 = _i13.value; - } - - var _manifest3 = _ref33; - - var ref = _manifest3._reference; - invariant(ref, 'expected reference'); - var type = ref.remote.type; - // link specifier won't ever hit cache - - var _loc = ''; - if (type === 'link') { - continue; - } else if (type === 'workspace') { - if (!ref.remote.reference) { - continue; - } - _loc = ref.remote.reference; - } else { - _loc = this.config.generateModuleCachePath(ref); - } - var newPkg = yield this.config.readManifest(_loc); - yield this.resolver.updateManifest(ref, newPkg); - } - - return request; - }); - - function hydrate(_x15) { - return _ref32.apply(this, arguments); - } - - return hydrate; - }(); - - /** - * Check for updates every day and output a nag message if there's a newer version. - */ - - Install.prototype.checkUpdate = function checkUpdate() { - if (this.config.nonInteractive) { - // don't show upgrade dialog on CI or non-TTY terminals - return; - } - - // don't check if disabled - if (this.config.getOption('disable-self-update-check')) { - return; - } - - // only check for updates once a day - var lastUpdateCheck = Number(this.config.getOption('lastUpdateCheck')) || 0; - if (lastUpdateCheck && Date.now() - lastUpdateCheck < ONE_DAY) { - return; - } - - // don't bug for updates on tagged releases - if ((_yarnVersion || _load_yarnVersion()).version.indexOf('-') >= 0) { - return; - } - - this._checkUpdate().catch(function () { - // swallow errors - }); - }; - - Install.prototype._checkUpdate = function () { - var _ref34 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _this5 = this; - - var latestVersion = yield this.config.requestManager.request({ - url: (_constants || _load_constants()).SELF_UPDATE_VERSION_URL - }); - invariant(typeof latestVersion === 'string', 'expected string'); - latestVersion = latestVersion.trim(); - if (!semver.valid(latestVersion)) { - return; - } - - // ensure we only check for updates periodically - this.config.registries.yarn.saveHomeConfig({ - lastUpdateCheck: Date.now() - }); - - if (semver.gt(latestVersion, (_yarnVersion || _load_yarnVersion()).version)) { - var installationMethod = yield (0, (_yarnVersion || _load_yarnVersion()).getInstallationMethod)(); - this.maybeOutputUpdate = function () { - _this5.reporter.warn(_this5.reporter.lang('yarnOutdated', latestVersion, (_yarnVersion || _load_yarnVersion()).version)); - - var command = getUpdateCommand(installationMethod); - if (command) { - _this5.reporter.info(_this5.reporter.lang('yarnOutdatedCommand')); - _this5.reporter.command(command); - } else { - var installer = getUpdateInstaller(installationMethod); - if (installer) { - _this5.reporter.info(_this5.reporter.lang('yarnOutdatedInstaller', installer)); - } - } - }; - } - }); - - function _checkUpdate() { - return _ref34.apply(this, arguments); - } - - return _checkUpdate; - }(); - - /** - * Method to override with a possible upgrade message. - */ - - Install.prototype.maybeOutputUpdate = function maybeOutputUpdate() {}; - - return Install; -}(); - -function hasWrapper(commander, args) { - return true; -} - -function setFlags(commander) { - commander.description('Yarn install is used to install all dependencies for a project.'); - commander.usage('install [flags]'); - commander.option('--focus', 'Focus on a single workspace by installing remote copies of its sibling workspaces.'); - commander.option('-g, --global', 'DEPRECATED'); - commander.option('-S, --save', 'DEPRECATED - save package to your `dependencies`'); - commander.option('-D, --save-dev', 'DEPRECATED - save package to your `devDependencies`'); - commander.option('-P, --save-peer', 'DEPRECATED - save package to your `peerDependencies`'); - commander.option('-O, --save-optional', 'DEPRECATED - save package to your `optionalDependencies`'); - commander.option('-E, --save-exact', 'DEPRECATED'); - commander.option('-T, --save-tilde', 'DEPRECATED'); -} /***/ }), -/* 35 */ +/* 46 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return async; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncAction__ = __webpack_require__(132); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__ = __webpack_require__(133); +/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */ + + +var async = /*@__PURE__*/ new __WEBPACK_IMPORTED_MODULE_1__AsyncScheduler__["a" /* AsyncScheduler */](__WEBPACK_IMPORTED_MODULE_0__AsyncAction__["a" /* AsyncAction */]); +//# sourceMappingURL=async.js.map + + +/***/ }), +/* 47 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArray; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); +//# sourceMappingURL=isArray.js.map + + +/***/ }), +/* 48 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +module.exports = require("assert"); + +/***/ }), +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23351,13 +25281,13 @@ Object.defineProperty(exports, "__esModule", { var _setPrototypeOf; function _load_setPrototypeOf() { - return _setPrototypeOf = _interopRequireDefault(__webpack_require__(165)); + return _setPrototypeOf = _interopRequireDefault(__webpack_require__(206)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } exports.default = nullify; @@ -23399,441 +25329,7 @@ function nullify() { } /***/ }), -/* 36 */ -/***/ (function(module, exports) { - -module.exports = require("assert"); - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(483), __esModule: true }; - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(30) - , core = __webpack_require__(22) - , ctx = __webpack_require__(56) - , hide = __webpack_require__(58) - , PROTOTYPE = 'prototype'; - -var $export = function(type, name, source){ - var 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] = {}) - , expProto = exports[PROTOTYPE] - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] - , key, own, out; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function(C){ - var F = function(a, b, c){ - if(this instanceof C){ - switch(arguments.length){ - case 0: return new C; - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if(IS_PROTO){ - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var escapeStringRegexp = __webpack_require__(184); -var ansiStyles = __webpack_require__(621); -var stripAnsi = __webpack_require__(190); -var hasAnsi = __webpack_require__(593); -var supportsColor = __webpack_require__(623); -var defineProps = Object.defineProperties; -var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); - -function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; -} - -// use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001b[94m'; -} - -var styles = (function () { - var ret = {}; - - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - ret[key] = { - get: function () { - return build.call(this, this._styles.concat(key)); - } - }; - }); - - return ret; -})(); - -var proto = defineProps(function chalk() {}, styles); - -function build(_styles) { - var builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - /* eslint-disable no-proto */ - builder.__proto__ = proto; - - return builder; -} - -function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || !str) { - return str; - } - - var nestedStyles = this._styles; - var i = nestedStyles.length; - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - var originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { - ansiStyles.dim.open = ''; - } - - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. - ansiStyles.dim.open = originalDim; - - return str; -} - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function () { - return build.call(this, [name]); - } - }; - }); - - return ret; -} - -defineProps(Chalk.prototype, init()); - -module.exports = new Chalk(); -module.exports.styles = ansiStyles; -module.exports.hasColor = hasAnsi; -module.exports.stripColor = stripAnsi; -module.exports.supportsColor = supportsColor; - - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.registryNames = exports.registries = undefined; - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _yarnRegistry; - -function _load_yarnRegistry() { - return _yarnRegistry = _interopRequireDefault(__webpack_require__(426)); -} - -var _npmRegistry; - -function _load_npmRegistry() { - return _npmRegistry = _interopRequireDefault(__webpack_require__(54)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var registries = exports.registries = { - npm: (_npmRegistry || _load_npmRegistry()).default, - yarn: (_yarnRegistry || _load_yarnRegistry()).default -}; - -var registryNames = exports.registryNames = (0, (_keys || _load_keys()).default)(registries); - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hostedGit = exports.registries = undefined; - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -exports.getExoticResolver = getExoticResolver; -exports.hostedGitFragmentToGitUrl = hostedGitFragmentToGitUrl; - -var _baseResolver; - -function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(88)); -} - -var _npmResolver; - -function _load_npmResolver() { - return _npmResolver = _interopRequireDefault(__webpack_require__(158)); -} - -var _yarnResolver; - -function _load_yarnResolver() { - return _yarnResolver = _interopRequireDefault(__webpack_require__(246)); -} - -var _gitResolver; - -function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(89)); -} - -var _tarballResolver; - -function _load_tarballResolver() { - return _tarballResolver = _interopRequireDefault(__webpack_require__(439)); -} - -var _githubResolver; - -function _load_githubResolver() { - return _githubResolver = _interopRequireDefault(__webpack_require__(244)); -} - -var _fileResolver; - -function _load_fileResolver() { - return _fileResolver = _interopRequireDefault(__webpack_require__(156)); -} - -var _linkResolver; - -function _load_linkResolver() { - return _linkResolver = _interopRequireDefault(__webpack_require__(245)); -} - -var _gitlabResolver; - -function _load_gitlabResolver() { - return _gitlabResolver = _interopRequireDefault(__webpack_require__(437)); -} - -var _gistResolver; - -function _load_gistResolver() { - return _gistResolver = _interopRequireDefault(__webpack_require__(157)); -} - -var _bitbucketResolver; - -function _load_bitbucketResolver() { - return _bitbucketResolver = _interopRequireDefault(__webpack_require__(436)); -} - -var _hostedGitResolver; - -function _load_hostedGitResolver() { - return _hostedGitResolver = __webpack_require__(75); -} - -var _registryResolver; - -function _load_registryResolver() { - return _registryResolver = _interopRequireDefault(__webpack_require__(438)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var registries = exports.registries = { - npm: (_npmResolver || _load_npmResolver()).default, - yarn: (_yarnResolver || _load_yarnResolver()).default -}; - -// - -var exotics = new (_set || _load_set()).default([(_gitResolver || _load_gitResolver()).default, (_tarballResolver || _load_tarballResolver()).default, (_githubResolver || _load_githubResolver()).default, (_fileResolver || _load_fileResolver()).default, (_linkResolver || _load_linkResolver()).default, (_gitlabResolver || _load_gitlabResolver()).default, (_gistResolver || _load_gistResolver()).default, (_bitbucketResolver || _load_bitbucketResolver()).default]); - -function getExoticResolver(pattern) { - for (var _iterator = exotics, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var Resolver = _ref; - - if (Resolver.isVersion(pattern)) { - return Resolver; - } - } - return null; -} - -// - -var hostedGit = exports.hostedGit = { - github: (_githubResolver || _load_githubResolver()).default, - gitlab: (_gitlabResolver || _load_gitlabResolver()).default, - bitbucket: (_bitbucketResolver || _load_bitbucketResolver()).default -}; - -function hostedGitFragmentToGitUrl(fragment, reporter) { - for (var key in hostedGit) { - var Resolver = hostedGit[key]; - if (Resolver.isVersion(fragment)) { - return Resolver.getGitHTTPUrl((0, (_hostedGitResolver || _load_hostedGitResolver()).explodeHostedGitFragment)(fragment, reporter)); - } - } - - return fragment; -} - -// - -for (var key in registries) { - var _class, _temp; - - var RegistryResolver = registries[key]; - - exotics.add((_temp = _class = function (_ExoticRegistryResolv) { - (0, (_inherits2 || _load_inherits()).default)(_class, _ExoticRegistryResolv); - - function _class() { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, _class); - return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _ExoticRegistryResolv.apply(this, arguments)); - } - - return _class; - }((_registryResolver || _load_registryResolver()).default), _class.protocol = key, _class.factory = RegistryResolver, _temp)); -} - -/***/ }), -/* 42 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -23882,6237 +25378,237 @@ function normalizePattern(pattern) { } /***/ }), -/* 43 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(44); -module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); +module.exports = { "default": __webpack_require__(611), __esModule: true }; + +/***/ }), +/* 53 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = map; +/* unused harmony export MapOperator */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +function map(project, thisArg) { + return function mapOperation(source) { + if (typeof project !== 'function') { + throw new TypeError('argument is not a function. Are you looking for `mapTo()`?'); + } + return source.lift(new MapOperator(project, thisArg)); + }; +} +var MapOperator = /*@__PURE__*/ (function () { + function MapOperator(project, thisArg) { + this.project = project; + this.thisArg = thisArg; + } + MapOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg)); + }; + return MapOperator; +}()); + +var MapSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](MapSubscriber, _super); + function MapSubscriber(destination, project, thisArg) { + var _this = _super.call(this, destination) || this; + _this.project = project; + _this.count = 0; + _this.thisArg = thisArg || _this; + return _this; + } + MapSubscriber.prototype._next = function (value) { + var result; + try { + result = this.project.call(this.thisArg, value, this.count++); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return MapSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=map.js.map + + +/***/ }), +/* 54 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return errorObject; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +var errorObject = { e: {} }; +//# sourceMappingURL=errorObject.js.map + + +/***/ }), +/* 55 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isScheduler; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function isScheduler(value) { + return value && typeof value.schedule === 'function'; +} +//# sourceMappingURL=isScheduler.js.map + + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(48); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - -module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; /***/ }), -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { +/* 57 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var anObject = __webpack_require__(43) - , IE8_DOM_DEFINE = __webpack_require__(267) - , toPrimitive = __webpack_require__(180) - , dP = Object.defineProperty; - -exports.f = __webpack_require__(49) ? Object.defineProperty : function defineProperty(O, P, Attributes){ - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if(IE8_DOM_DEFINE)try { - return dP(O, P, Attributes); - } catch(e){ /* empty */ } - if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); - if('value' in Attributes)O[P] = Attributes.value; - return O; -}; - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information. - -;(function (undefined) { - - var objectTypes = { - 'function': true, - 'object': true - }; - - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global); - var freeSelf = checkGlobal(objectTypes[typeof self] && self); - var freeWindow = checkGlobal(objectTypes[typeof window] && window); - var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null; - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); - var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); - - var Rx = { - internals: {}, - config: { - Promise: root.Promise - }, - helpers: { } - }; - - // Defaults - var noop = Rx.helpers.noop = function () { }, - identity = Rx.helpers.identity = function (x) { return x; }, - defaultNow = Rx.helpers.defaultNow = Date.now, - defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); }, - defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); }, - defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); }, - defaultError = Rx.helpers.defaultError = function (err) { throw err; }, - isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.subscribe !== 'function' && typeof p.then === 'function'; }, - isFunction = Rx.helpers.isFunction = (function () { - - var isFn = function (value) { - return typeof value == 'function' || false; - }; - - // fallback for older versions of Chrome and Safari - if (isFn(/x/)) { - isFn = function(value) { - return typeof value == 'function' && toString.call(value) == '[object Function]'; - }; - } - - return isFn; - }()); - - function cloneArray(arr) { for(var a = [], i = 0, len = arr.length; i < len; i++) { a.push(arr[i]); } return a;} - - var errorObj = {e: {}}; - - function tryCatcherGen(tryCatchTarget) { - return function tryCatcher() { - try { - return tryCatchTarget.apply(this, arguments); - } catch (e) { - errorObj.e = e; - return errorObj; - } - }; - } - - var tryCatch = Rx.internals.tryCatch = function tryCatch(fn) { - if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } - return tryCatcherGen(fn); - }; - - function thrower(e) { - throw e; - } - - Rx.config.longStackSupport = false; - var hasStacks = false, stacks = tryCatch(function () { throw new Error(); })(); - hasStacks = !!stacks.e && !!stacks.e.stack; - - // All code after this point will be filtered from stack traces reported by RxJS - var rStartingLine = captureLine(), rFileName; - - var STACK_JUMP_SEPARATOR = 'From previous event:'; - - function makeStackTraceLong(error, observable) { - // If possible, transform the error stack trace by removing Node and RxJS - // cruft, then concatenating with the stack trace of `observable`. - if (hasStacks && - observable.stack && - typeof error === 'object' && - error !== null && - error.stack && - error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 - ) { - var stacks = []; - for (var o = observable; !!o; o = o.source) { - if (o.stack) { - stacks.unshift(o.stack); - } - } - stacks.unshift(error.stack); - - var concatedStacks = stacks.join('\n' + STACK_JUMP_SEPARATOR + '\n'); - error.stack = filterStackString(concatedStacks); - } - } - - function filterStackString(stackString) { - var lines = stackString.split('\n'), desiredLines = []; - for (var i = 0, len = lines.length; i < len; i++) { - var line = lines[i]; - - if (!isInternalFrame(line) && !isNodeFrame(line) && line) { - desiredLines.push(line); - } - } - return desiredLines.join('\n'); - } - - function isInternalFrame(stackLine) { - var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine); - if (!fileNameAndLineNumber) { - return false; - } - var fileName = fileNameAndLineNumber[0], lineNumber = fileNameAndLineNumber[1]; - - return fileName === rFileName && - lineNumber >= rStartingLine && - lineNumber <= rEndingLine; - } - - function isNodeFrame(stackLine) { - return stackLine.indexOf('(module.js:') !== -1 || - stackLine.indexOf('(node.js:') !== -1; - } - - function captureLine() { - if (!hasStacks) { return; } +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = tryCatch; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__errorObject__ = __webpack_require__(54); +/** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */ +var tryCatchTarget; +function tryCatcher() { try { - throw new Error(); - } catch (e) { - var lines = e.stack.split('\n'); - var firstLine = lines[0].indexOf('@') > 0 ? lines[1] : lines[2]; - var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine); - if (!fileNameAndLineNumber) { return; } - - rFileName = fileNameAndLineNumber[0]; - return fileNameAndLineNumber[1]; + return tryCatchTarget.apply(this, arguments); } - } - - function getFileNameAndLineNumber(stackLine) { - // Named functions: 'at functionName (filename:lineNumber:columnNumber)' - var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine); - if (attempt1) { return [attempt1[1], Number(attempt1[2])]; } - - // Anonymous functions: 'at filename:lineNumber:columnNumber' - var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine); - if (attempt2) { return [attempt2[1], Number(attempt2[2])]; } - - // Firefox style: 'function@filename:lineNumber or @filename:lineNumber' - var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine); - if (attempt3) { return [attempt3[1], Number(attempt3[2])]; } - } - - var EmptyError = Rx.EmptyError = function() { - this.message = 'Sequence contains no elements.'; - Error.call(this); - }; - EmptyError.prototype = Object.create(Error.prototype); - EmptyError.prototype.name = 'EmptyError'; - - var ObjectDisposedError = Rx.ObjectDisposedError = function() { - this.message = 'Object has been disposed'; - Error.call(this); - }; - ObjectDisposedError.prototype = Object.create(Error.prototype); - ObjectDisposedError.prototype.name = 'ObjectDisposedError'; - - var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () { - this.message = 'Argument out of range'; - Error.call(this); - }; - ArgumentOutOfRangeError.prototype = Object.create(Error.prototype); - ArgumentOutOfRangeError.prototype.name = 'ArgumentOutOfRangeError'; - - var NotSupportedError = Rx.NotSupportedError = function (message) { - this.message = message || 'This operation is not supported'; - Error.call(this); - }; - NotSupportedError.prototype = Object.create(Error.prototype); - NotSupportedError.prototype.name = 'NotSupportedError'; - - var NotImplementedError = Rx.NotImplementedError = function (message) { - this.message = message || 'This operation is not implemented'; - Error.call(this); - }; - NotImplementedError.prototype = Object.create(Error.prototype); - NotImplementedError.prototype.name = 'NotImplementedError'; - - var notImplemented = Rx.helpers.notImplemented = function () { - throw new NotImplementedError(); - }; - - var notSupported = Rx.helpers.notSupported = function () { - throw new NotSupportedError(); - }; - - // Shim in iterator support - var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) || - '_es6shim_iterator_'; - // Bug for mozilla version - if (root.Set && typeof new root.Set()['@@iterator'] === 'function') { - $iterator$ = '@@iterator'; - } - - var doneEnumerator = Rx.doneEnumerator = { done: true, value: undefined }; - - var isIterable = Rx.helpers.isIterable = function (o) { - return o && o[$iterator$] !== undefined; - }; - - var isArrayLike = Rx.helpers.isArrayLike = function (o) { - return o && o.length !== undefined; - }; - - Rx.helpers.iterator = $iterator$; - - var bindCallback = Rx.internals.bindCallback = function (func, thisArg, argCount) { - if (typeof thisArg === 'undefined') { return func; } - switch(argCount) { - case 0: - return function() { - return func.call(thisArg) - }; - case 1: - return function(arg) { - return func.call(thisArg, arg); - }; - case 2: - return function(value, index) { - return func.call(thisArg, value, index); - }; - case 3: - return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; + catch (e) { + __WEBPACK_IMPORTED_MODULE_0__errorObject__["a" /* errorObject */].e = e; + return __WEBPACK_IMPORTED_MODULE_0__errorObject__["a" /* errorObject */]; } +} +function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; +} +//# sourceMappingURL=tryCatch.js.map - return function() { - return func.apply(thisArg, arguments); - }; - }; - /** Used to determine if values are of the language type Object */ - var dontEnums = ['toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor'], - dontEnumsLength = dontEnums.length; +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { -var 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]'; +/* eslint-disable node/no-deprecated-api */ +var buffer = __webpack_require__(109) +var Buffer = buffer.Buffer -var 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]'; - -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -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] = false; - -var objectProto = Object.prototype, - hasOwnProperty = objectProto.hasOwnProperty, - objToString = objectProto.toString, - MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; - -var keys = Object.keys || (function() { - var hasOwnProperty = Object.prototype.hasOwnProperty, - hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), - dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ], - dontEnumsLength = dontEnums.length; - - return function(obj) { - if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { - throw new TypeError('Object.keys called on non-object'); - } - - var result = [], prop, i; - - for (prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - result.push(prop); - } - } - - if (hasDontEnumBug) { - for (i = 0; i < dontEnumsLength; i++) { - if (hasOwnProperty.call(obj, dontEnums[i])) { - result.push(dontEnums[i]); - } - } - } - return result; - }; - }()); - -function equalObjects(object, other, equalFunc, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength !== othLength && !isLoose) { - return false; +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] } - var index = objLength, key; - while (index--) { - key = objProps[index]; - if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var skipCtor = isLoose; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key], - result; - - if (!(result === undefined ? equalFunc(objValue, othValue, isLoose, stackA, stackB) : result)) { - return false; - } - skipCtor || (skipCtor = key === 'constructor'); - } - if (!skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - if (objCtor !== othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor === 'function' && objCtor instanceof objCtor && - typeof othCtor === 'function' && othCtor instanceof othCtor)) { - return false; - } - } - return true; +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer } -function equalByTag(object, other, tag) { - switch (tag) { - case boolTag: - case dateTag: - return +object === +other; - - case errorTag: - return object.name === other.name && object.message === other.message; - - case numberTag: - return (object !== +object) ? - other !== +other : - object === +other; - - case regexpTag: - case stringTag: - return object === (other + ''); - } - return false; +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) } -var isObject = Rx.internals.isObject = function(value) { - var type = typeof value; - return !!value && (type === 'object' || type === 'function'); -}; +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) -function isObjectLike(value) { - return !!value && typeof value === 'object'; +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) } -function isLength(value) { - return typeof value === 'number' && value > -1 && value % 1 === 0 && value <= MAX_SAFE_INTEGER; -} - -var isHostObject = (function() { - try { - Object({ 'toString': 0 } + ''); - } catch(e) { - return function() { return false; }; +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') } - return function(value) { - return typeof value.toString !== 'function' && typeof (value + '') === 'string'; - }; -}()); - -function isTypedArray(value) { - return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; -} - -var isArray = Array.isArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) === arrayTag; -}; - -function arraySome (array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -function equalArrays(array, other, equalFunc, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length; - - if (arrLength !== othLength && !(isLoose && othLength > arrLength)) { - return false; - } - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index], - result; - - if (result !== undefined) { - if (result) { - continue; - } - return false; - } - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, isLoose, stackA, stackB); - })) { - return false; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, isLoose, stackA, stackB))) { - return false; - } - } - return true; -} - -function baseIsEqualDeep(object, other, equalFunc, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag === argsTag) { - objTag = objectTag; - } else if (objTag !== objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag === argsTag) { - othTag = objectTag; - } - } - var objIsObj = objTag === objectTag && !isHostObject(object), - othIsObj = othTag === objectTag && !isHostObject(other), - isSameTag = objTag === othTag; - - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (!isLoose) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, isLoose, stackA, stackB); - } - } - if (!isSameTag) { - return false; - } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] === object) { - return stackB[length] === other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); - - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, isLoose, stackA, stackB); - - stackA.pop(); - stackB.pop(); - - return result; -} - -function baseIsEqual(value, other, isLoose, stackA, stackB) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, isLoose, stackA, stackB); -} - -var isEqual = Rx.internals.isEqual = function (value, other) { - return baseIsEqual(value, other); -}; - - var hasProp = {}.hasOwnProperty, - slice = Array.prototype.slice; - - var inherits = Rx.internals.inherits = function (child, parent) { - function __() { this.constructor = child; } - __.prototype = parent.prototype; - child.prototype = new __(); - }; - - var addProperties = Rx.internals.addProperties = function (obj) { - for(var sources = [], i = 1, len = arguments.length; i < len; i++) { sources.push(arguments[i]); } - for (var idx = 0, ln = sources.length; idx < ln; idx++) { - var source = sources[idx]; - for (var prop in source) { - obj[prop] = source[prop]; - } - } - }; - - // Rx Utils - var addRef = Rx.internals.addRef = function (xs, r) { - return new AnonymousObservable(function (observer) { - return new BinaryDisposable(r.getDisposable(), xs.subscribe(observer)); - }); - }; - - function arrayInitialize(count, factory) { - var a = new Array(count); - for (var i = 0; i < count; i++) { - a[i] = factory(); - } - return a; - } - - /** - * Represents a group of disposable resources that are disposed together. - * @constructor - */ - var CompositeDisposable = Rx.CompositeDisposable = function () { - var args = [], i, len; - if (Array.isArray(arguments[0])) { - args = arguments[0]; + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) } else { - len = arguments.length; - args = new Array(len); - for(i = 0; i < len; i++) { args[i] = arguments[i]; } - } - this.disposables = args; - this.isDisposed = false; - this.length = args.length; - }; - - var CompositeDisposablePrototype = CompositeDisposable.prototype; - - /** - * Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. - * @param {Mixed} item Disposable to add. - */ - CompositeDisposablePrototype.add = function (item) { - if (this.isDisposed) { - item.dispose(); - } else { - this.disposables.push(item); - this.length++; - } - }; - - /** - * Removes and disposes the first occurrence of a disposable from the CompositeDisposable. - * @param {Mixed} item Disposable to remove. - * @returns {Boolean} true if found; false otherwise. - */ - CompositeDisposablePrototype.remove = function (item) { - var shouldDispose = false; - if (!this.isDisposed) { - var idx = this.disposables.indexOf(item); - if (idx !== -1) { - shouldDispose = true; - this.disposables.splice(idx, 1); - this.length--; - item.dispose(); - } - } - return shouldDispose; - }; - - /** - * Disposes all disposables in the group and removes them from the group. - */ - CompositeDisposablePrototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - var len = this.disposables.length, currentDisposables = new Array(len); - for(var i = 0; i < len; i++) { currentDisposables[i] = this.disposables[i]; } - this.disposables = []; - this.length = 0; - - for (i = 0; i < len; i++) { - currentDisposables[i].dispose(); - } - } - }; - - /** - * Provides a set of static methods for creating Disposables. - * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. - */ - var Disposable = Rx.Disposable = function (action) { - this.isDisposed = false; - this.action = action || noop; - }; - - /** Performs the task of cleaning up resources. */ - Disposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.action(); - this.isDisposed = true; - } - }; - - /** - * Creates a disposable object that invokes the specified action when disposed. - * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. - * @return {Disposable} The disposable object that runs the given action upon disposal. - */ - var disposableCreate = Disposable.create = function (action) { return new Disposable(action); }; - - /** - * Gets the disposable that does nothing when disposed. - */ - var disposableEmpty = Disposable.empty = { dispose: noop }; - - /** - * Validates whether the given object is a disposable - * @param {Object} Object to test whether it has a dispose method - * @returns {Boolean} true if a disposable object, else false. - */ - var isDisposable = Disposable.isDisposable = function (d) { - return d && isFunction(d.dispose); - }; - - var checkDisposed = Disposable.checkDisposed = function (disposable) { - if (disposable.isDisposed) { throw new ObjectDisposedError(); } - }; - - var disposableFixup = Disposable._fixup = function (result) { - return isDisposable(result) ? result : disposableEmpty; - }; - - // Single assignment - var SingleAssignmentDisposable = Rx.SingleAssignmentDisposable = function () { - this.isDisposed = false; - this.current = null; - }; - SingleAssignmentDisposable.prototype.getDisposable = function () { - return this.current; - }; - SingleAssignmentDisposable.prototype.setDisposable = function (value) { - if (this.current) { throw new Error('Disposable has already been assigned'); } - var shouldDispose = this.isDisposed; - !shouldDispose && (this.current = value); - shouldDispose && value && value.dispose(); - }; - SingleAssignmentDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - var old = this.current; - this.current = null; - old && old.dispose(); - } - }; - - // Multiple assignment disposable - var SerialDisposable = Rx.SerialDisposable = function () { - this.isDisposed = false; - this.current = null; - }; - SerialDisposable.prototype.getDisposable = function () { - return this.current; - }; - SerialDisposable.prototype.setDisposable = function (value) { - var shouldDispose = this.isDisposed; - if (!shouldDispose) { - var old = this.current; - this.current = value; - } - old && old.dispose(); - shouldDispose && value && value.dispose(); - }; - SerialDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - var old = this.current; - this.current = null; - } - old && old.dispose(); - }; - - var BinaryDisposable = Rx.BinaryDisposable = function (first, second) { - this._first = first; - this._second = second; - this.isDisposed = false; - }; - - BinaryDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - var old1 = this._first; - this._first = null; - old1 && old1.dispose(); - var old2 = this._second; - this._second = null; - old2 && old2.dispose(); - } - }; - - var NAryDisposable = Rx.NAryDisposable = function (disposables) { - this._disposables = disposables; - this.isDisposed = false; - }; - - NAryDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - for (var i = 0, len = this._disposables.length; i < len; i++) { - this._disposables[i].dispose(); - } - this._disposables.length = 0; - } - }; - - /** - * Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. - */ - var RefCountDisposable = Rx.RefCountDisposable = (function () { - - function InnerDisposable(disposable) { - this.disposable = disposable; - this.disposable.count++; - this.isInnerDisposed = false; - } - - InnerDisposable.prototype.dispose = function () { - if (!this.disposable.isDisposed && !this.isInnerDisposed) { - this.isInnerDisposed = true; - this.disposable.count--; - if (this.disposable.count === 0 && this.disposable.isPrimaryDisposed) { - this.disposable.isDisposed = true; - this.disposable.underlyingDisposable.dispose(); - } - } - }; - - /** - * Initializes a new instance of the RefCountDisposable with the specified disposable. - * @constructor - * @param {Disposable} disposable Underlying disposable. - */ - function RefCountDisposable(disposable) { - this.underlyingDisposable = disposable; - this.isDisposed = false; - this.isPrimaryDisposed = false; - this.count = 0; - } - - /** - * Disposes the underlying disposable only when all dependent disposables have been disposed - */ - RefCountDisposable.prototype.dispose = function () { - if (!this.isDisposed && !this.isPrimaryDisposed) { - this.isPrimaryDisposed = true; - if (this.count === 0) { - this.isDisposed = true; - this.underlyingDisposable.dispose(); - } - } - }; - - /** - * Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. - * @returns {Disposable} A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime. - */ - RefCountDisposable.prototype.getDisposable = function () { - return this.isDisposed ? disposableEmpty : new InnerDisposable(this); - }; - - return RefCountDisposable; - })(); - - function ScheduledDisposable(scheduler, disposable) { - this.scheduler = scheduler; - this.disposable = disposable; - this.isDisposed = false; - } - - function scheduleItem(s, self) { - if (!self.isDisposed) { - self.isDisposed = true; - self.disposable.dispose(); - } - } - - ScheduledDisposable.prototype.dispose = function () { - this.scheduler.schedule(this, scheduleItem); - }; - - var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) { - this.scheduler = scheduler; - this.state = state; - this.action = action; - this.dueTime = dueTime; - this.comparer = comparer || defaultSubComparer; - this.disposable = new SingleAssignmentDisposable(); - }; - - ScheduledItem.prototype.invoke = function () { - this.disposable.setDisposable(this.invokeCore()); - }; - - ScheduledItem.prototype.compareTo = function (other) { - return this.comparer(this.dueTime, other.dueTime); - }; - - ScheduledItem.prototype.isCancelled = function () { - return this.disposable.isDisposed; - }; - - ScheduledItem.prototype.invokeCore = function () { - return disposableFixup(this.action(this.scheduler, this.state)); - }; - - /** Provides a set of static properties to access commonly used schedulers. */ - var Scheduler = Rx.Scheduler = (function () { - - function Scheduler() { } - - /** Determines whether the given object is a scheduler */ - Scheduler.isScheduler = function (s) { - return s instanceof Scheduler; - }; - - var schedulerProto = Scheduler.prototype; - - /** - * Schedules an action to be executed. - * @param state State passed to the action to be executed. - * @param {Function} action Action to be executed. - * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). - */ - schedulerProto.schedule = function (state, action) { - throw new NotImplementedError(); - }; - - /** - * Schedules an action to be executed after dueTime. - * @param state State passed to the action to be executed. - * @param {Function} action Action to be executed. - * @param {Number} dueTime Relative time after which to execute the action. - * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). - */ - schedulerProto.scheduleFuture = function (state, dueTime, action) { - var dt = dueTime; - dt instanceof Date && (dt = dt - this.now()); - dt = Scheduler.normalize(dt); - - if (dt === 0) { return this.schedule(state, action); } - - return this._scheduleFuture(state, dt, action); - }; - - schedulerProto._scheduleFuture = function (state, dueTime, action) { - throw new NotImplementedError(); - }; - - /** Gets the current time according to the local machine's system clock. */ - Scheduler.now = defaultNow; - - /** Gets the current time according to the local machine's system clock. */ - Scheduler.prototype.now = defaultNow; - - /** - * Normalizes the specified TimeSpan value to a positive value. - * @param {Number} timeSpan The time span value to normalize. - * @returns {Number} The specified TimeSpan value if it is zero or positive; otherwise, 0 - */ - Scheduler.normalize = function (timeSpan) { - timeSpan < 0 && (timeSpan = 0); - return timeSpan; - }; - - return Scheduler; - }()); - - var normalizeTime = Scheduler.normalize, isScheduler = Scheduler.isScheduler; - - (function (schedulerProto) { - - function invokeRecImmediate(scheduler, pair) { - var state = pair[0], action = pair[1], group = new CompositeDisposable(); - action(state, innerAction); - return group; - - function innerAction(state2) { - var isAdded = false, isDone = false; - - var d = scheduler.schedule(state2, scheduleWork); - if (!isDone) { - group.add(d); - isAdded = true; - } - - function scheduleWork(_, state3) { - if (isAdded) { - group.remove(d); - } else { - isDone = true; - } - action(state3, innerAction); - return disposableEmpty; - } - } - } - - function invokeRecDate(scheduler, pair) { - var state = pair[0], action = pair[1], group = new CompositeDisposable(); - action(state, innerAction); - return group; - - function innerAction(state2, dueTime1) { - var isAdded = false, isDone = false; - - var d = scheduler.scheduleFuture(state2, dueTime1, scheduleWork); - if (!isDone) { - group.add(d); - isAdded = true; - } - - function scheduleWork(_, state3) { - if (isAdded) { - group.remove(d); - } else { - isDone = true; - } - action(state3, innerAction); - return disposableEmpty; - } - } - } - - /** - * Schedules an action to be executed recursively. - * @param {Mixed} state State passed to the action to be executed. - * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). - */ - schedulerProto.scheduleRecursive = function (state, action) { - return this.schedule([state, action], invokeRecImmediate); - }; - - /** - * Schedules an action to be executed recursively after a specified relative or absolute due time. - * @param {Mixed} state State passed to the action to be executed. - * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state. - * @param {Number | Date} dueTime Relative or absolute time after which to execute the action for the first time. - * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). - */ - schedulerProto.scheduleRecursiveFuture = function (state, dueTime, action) { - return this.scheduleFuture([state, action], dueTime, invokeRecDate); - }; - - }(Scheduler.prototype)); - - (function (schedulerProto) { - - /** - * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation. - * @param {Mixed} state Initial state passed to the action upon the first iteration. - * @param {Number} period Period for running the work periodically. - * @param {Function} action Action to be executed, potentially updating the state. - * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort). - */ - schedulerProto.schedulePeriodic = function(state, period, action) { - if (typeof root.setInterval === 'undefined') { throw new NotSupportedError(); } - period = normalizeTime(period); - var s = state, id = root.setInterval(function () { s = action(s); }, period); - return disposableCreate(function () { root.clearInterval(id); }); - }; - - }(Scheduler.prototype)); - - (function (schedulerProto) { - /** - * Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions. - * @param {Function} handler Handler that's run if an exception is caught. The exception will be rethrown if the handler returns false. - * @returns {Scheduler} Wrapper around the original scheduler, enforcing exception handling. - */ - schedulerProto.catchError = schedulerProto['catch'] = function (handler) { - return new CatchScheduler(this, handler); - }; - }(Scheduler.prototype)); - - var SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive = (function () { - function createTick(self) { - return function tick(command, recurse) { - recurse(0, self._period); - var state = tryCatch(self._action)(self._state); - if (state === errorObj) { - self._cancel.dispose(); - thrower(state.e); - } - self._state = state; - }; - } - - function SchedulePeriodicRecursive(scheduler, state, period, action) { - this._scheduler = scheduler; - this._state = state; - this._period = period; - this._action = action; - } - - SchedulePeriodicRecursive.prototype.start = function () { - var d = new SingleAssignmentDisposable(); - this._cancel = d; - d.setDisposable(this._scheduler.scheduleRecursiveFuture(0, this._period, createTick(this))); - - return d; - }; - - return SchedulePeriodicRecursive; - }()); - - /** Gets a scheduler that schedules work immediately on the current thread. */ - var ImmediateScheduler = (function (__super__) { - inherits(ImmediateScheduler, __super__); - function ImmediateScheduler() { - __super__.call(this); - } - - ImmediateScheduler.prototype.schedule = function (state, action) { - return disposableFixup(action(this, state)); - }; - - return ImmediateScheduler; - }(Scheduler)); - - var immediateScheduler = Scheduler.immediate = new ImmediateScheduler(); - - /** - * Gets a scheduler that schedules work as soon as possible on the current thread. - */ - var CurrentThreadScheduler = (function (__super__) { - var queue; - - function runTrampoline () { - while (queue.length > 0) { - var item = queue.dequeue(); - !item.isCancelled() && item.invoke(); - } - } - - inherits(CurrentThreadScheduler, __super__); - function CurrentThreadScheduler() { - __super__.call(this); - } - - CurrentThreadScheduler.prototype.schedule = function (state, action) { - var si = new ScheduledItem(this, state, action, this.now()); - - if (!queue) { - queue = new PriorityQueue(4); - queue.enqueue(si); - - var result = tryCatch(runTrampoline)(); - queue = null; - if (result === errorObj) { thrower(result.e); } - } else { - queue.enqueue(si); - } - return si.disposable; - }; - - CurrentThreadScheduler.prototype.scheduleRequired = function () { return !queue; }; - - return CurrentThreadScheduler; - }(Scheduler)); - - var currentThreadScheduler = Scheduler.currentThread = new CurrentThreadScheduler(); - - var scheduleMethod, clearMethod; - - var localTimer = (function () { - var localSetTimeout, localClearTimeout = noop; - if (!!root.setTimeout) { - localSetTimeout = root.setTimeout; - localClearTimeout = root.clearTimeout; - } else if (!!root.WScript) { - localSetTimeout = function (fn, time) { - root.WScript.Sleep(time); - fn(); - }; - } else { - throw new NotSupportedError(); - } - - return { - setTimeout: localSetTimeout, - clearTimeout: localClearTimeout - }; - }()); - var localSetTimeout = localTimer.setTimeout, - localClearTimeout = localTimer.clearTimeout; - - (function () { - - var nextHandle = 1, tasksByHandle = {}, currentlyRunning = false; - - clearMethod = function (handle) { - delete tasksByHandle[handle]; - }; - - function runTask(handle) { - if (currentlyRunning) { - localSetTimeout(function () { runTask(handle); }, 0); - } else { - var task = tasksByHandle[handle]; - if (task) { - currentlyRunning = true; - var result = tryCatch(task)(); - clearMethod(handle); - currentlyRunning = false; - if (result === errorObj) { thrower(result.e); } - } - } - } - - var reNative = new RegExp('^' + - String(toString) - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/toString| for [^\]]+/g, '.*?') + '$' - ); - - var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' && - !reNative.test(setImmediate) && setImmediate; - - function postMessageSupported () { - // Ensure not in a worker - if (!root.postMessage || root.importScripts) { return false; } - var isAsync = false, oldHandler = root.onmessage; - // Test for async - root.onmessage = function () { isAsync = true; }; - root.postMessage('', '*'); - root.onmessage = oldHandler; - - return isAsync; - } - - // Use in order, setImmediate, nextTick, postMessage, MessageChannel, script readystatechanged, setTimeout - if (isFunction(setImmediate)) { - scheduleMethod = function (action) { - var id = nextHandle++; - tasksByHandle[id] = action; - setImmediate(function () { runTask(id); }); - - return id; - }; - } else if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { - scheduleMethod = function (action) { - var id = nextHandle++; - tasksByHandle[id] = action; - process.nextTick(function () { runTask(id); }); - - return id; - }; - } else if (postMessageSupported()) { - var MSG_PREFIX = 'ms.rx.schedule' + Math.random(); - - var onGlobalPostMessage = function (event) { - // Only if we're a match to avoid any other global events - if (typeof event.data === 'string' && event.data.substring(0, MSG_PREFIX.length) === MSG_PREFIX) { - runTask(event.data.substring(MSG_PREFIX.length)); - } - }; - - root.addEventListener('message', onGlobalPostMessage, false); - - scheduleMethod = function (action) { - var id = nextHandle++; - tasksByHandle[id] = action; - root.postMessage(MSG_PREFIX + id, '*'); - return id; - }; - } else if (!!root.MessageChannel) { - var channel = new root.MessageChannel(); - - channel.port1.onmessage = function (e) { runTask(e.data); }; - - scheduleMethod = function (action) { - var id = nextHandle++; - tasksByHandle[id] = action; - channel.port2.postMessage(id); - return id; - }; - } else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) { - - scheduleMethod = function (action) { - var scriptElement = root.document.createElement('script'); - var id = nextHandle++; - tasksByHandle[id] = action; - - scriptElement.onreadystatechange = function () { - runTask(id); - scriptElement.onreadystatechange = null; - scriptElement.parentNode.removeChild(scriptElement); - scriptElement = null; - }; - root.document.documentElement.appendChild(scriptElement); - return id; - }; - - } else { - scheduleMethod = function (action) { - var id = nextHandle++; - tasksByHandle[id] = action; - localSetTimeout(function () { - runTask(id); - }, 0); - - return id; - }; - } - }()); - - /** - * Gets a scheduler that schedules work via a timed callback based upon platform. - */ - var DefaultScheduler = (function (__super__) { - inherits(DefaultScheduler, __super__); - function DefaultScheduler() { - __super__.call(this); - } - - function scheduleAction(disposable, action, scheduler, state) { - return function schedule() { - disposable.setDisposable(Disposable._fixup(action(scheduler, state))); - }; - } - - function ClearDisposable(id) { - this._id = id; - this.isDisposed = false; - } - - ClearDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - clearMethod(this._id); - } - }; - - function LocalClearDisposable(id) { - this._id = id; - this.isDisposed = false; - } - - LocalClearDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - localClearTimeout(this._id); - } - }; - - DefaultScheduler.prototype.schedule = function (state, action) { - var disposable = new SingleAssignmentDisposable(), - id = scheduleMethod(scheduleAction(disposable, action, this, state)); - return new BinaryDisposable(disposable, new ClearDisposable(id)); - }; - - DefaultScheduler.prototype._scheduleFuture = function (state, dueTime, action) { - if (dueTime === 0) { return this.schedule(state, action); } - var disposable = new SingleAssignmentDisposable(), - id = localSetTimeout(scheduleAction(disposable, action, this, state), dueTime); - return new BinaryDisposable(disposable, new LocalClearDisposable(id)); - }; - - function scheduleLongRunning(state, action, disposable) { - return function () { action(state, disposable); }; - } - - DefaultScheduler.prototype.scheduleLongRunning = function (state, action) { - var disposable = disposableCreate(noop); - scheduleMethod(scheduleLongRunning(state, action, disposable)); - return disposable; - }; - - return DefaultScheduler; - }(Scheduler)); - - var defaultScheduler = Scheduler['default'] = Scheduler.async = new DefaultScheduler(); - - var CatchScheduler = (function (__super__) { - inherits(CatchScheduler, __super__); - - function CatchScheduler(scheduler, handler) { - this._scheduler = scheduler; - this._handler = handler; - this._recursiveOriginal = null; - this._recursiveWrapper = null; - __super__.call(this); - } - - CatchScheduler.prototype.schedule = function (state, action) { - return this._scheduler.schedule(state, this._wrap(action)); - }; - - CatchScheduler.prototype._scheduleFuture = function (state, dueTime, action) { - return this._scheduler.schedule(state, dueTime, this._wrap(action)); - }; - - CatchScheduler.prototype.now = function () { return this._scheduler.now(); }; - - CatchScheduler.prototype._clone = function (scheduler) { - return new CatchScheduler(scheduler, this._handler); - }; - - CatchScheduler.prototype._wrap = function (action) { - var parent = this; - return function (self, state) { - var res = tryCatch(action)(parent._getRecursiveWrapper(self), state); - if (res === errorObj) { - if (!parent._handler(res.e)) { thrower(res.e); } - return disposableEmpty; - } - return disposableFixup(res); - }; - }; - - CatchScheduler.prototype._getRecursiveWrapper = function (scheduler) { - if (this._recursiveOriginal !== scheduler) { - this._recursiveOriginal = scheduler; - var wrapper = this._clone(scheduler); - wrapper._recursiveOriginal = scheduler; - wrapper._recursiveWrapper = wrapper; - this._recursiveWrapper = wrapper; - } - return this._recursiveWrapper; - }; - - CatchScheduler.prototype.schedulePeriodic = function (state, period, action) { - var self = this, failed = false, d = new SingleAssignmentDisposable(); - - d.setDisposable(this._scheduler.schedulePeriodic(state, period, function (state1) { - if (failed) { return null; } - var res = tryCatch(action)(state1); - if (res === errorObj) { - failed = true; - if (!self._handler(res.e)) { thrower(res.e); } - d.dispose(); - return null; - } - return res; - })); - - return d; - }; - - return CatchScheduler; - }(Scheduler)); - - function IndexedItem(id, value) { - this.id = id; - this.value = value; - } - - IndexedItem.prototype.compareTo = function (other) { - var c = this.value.compareTo(other.value); - c === 0 && (c = this.id - other.id); - return c; - }; - - var PriorityQueue = Rx.internals.PriorityQueue = function (capacity) { - this.items = new Array(capacity); - this.length = 0; - }; - - var priorityProto = PriorityQueue.prototype; - priorityProto.isHigherPriority = function (left, right) { - return this.items[left].compareTo(this.items[right]) < 0; - }; - - priorityProto.percolate = function (index) { - if (index >= this.length || index < 0) { return; } - var parent = index - 1 >> 1; - if (parent < 0 || parent === index) { return; } - if (this.isHigherPriority(index, parent)) { - var temp = this.items[index]; - this.items[index] = this.items[parent]; - this.items[parent] = temp; - this.percolate(parent); - } - }; - - priorityProto.heapify = function (index) { - +index || (index = 0); - if (index >= this.length || index < 0) { return; } - var left = 2 * index + 1, - right = 2 * index + 2, - first = index; - if (left < this.length && this.isHigherPriority(left, first)) { - first = left; - } - if (right < this.length && this.isHigherPriority(right, first)) { - first = right; - } - if (first !== index) { - var temp = this.items[index]; - this.items[index] = this.items[first]; - this.items[first] = temp; - this.heapify(first); - } - }; - - priorityProto.peek = function () { return this.items[0].value; }; - - priorityProto.removeAt = function (index) { - this.items[index] = this.items[--this.length]; - this.items[this.length] = undefined; - this.heapify(); - }; - - priorityProto.dequeue = function () { - var result = this.peek(); - this.removeAt(0); - return result; - }; - - priorityProto.enqueue = function (item) { - var index = this.length++; - this.items[index] = new IndexedItem(PriorityQueue.count++, item); - this.percolate(index); - }; - - priorityProto.remove = function (item) { - for (var i = 0; i < this.length; i++) { - if (this.items[i].value === item) { - this.removeAt(i); - return true; - } - } - return false; - }; - PriorityQueue.count = 0; - - /** - * Represents a notification to an observer. - */ - var Notification = Rx.Notification = (function () { - function Notification() { - - } - - Notification.prototype._accept = function (onNext, onError, onCompleted) { - throw new NotImplementedError(); - }; - - Notification.prototype._acceptObserver = function (onNext, onError, onCompleted) { - throw new NotImplementedError(); - }; - - /** - * Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result. - * @param {Function | Observer} observerOrOnNext Function to invoke for an OnNext notification or Observer to invoke the notification on.. - * @param {Function} onError Function to invoke for an OnError notification. - * @param {Function} onCompleted Function to invoke for an OnCompleted notification. - * @returns {Any} Result produced by the observation. - */ - Notification.prototype.accept = function (observerOrOnNext, onError, onCompleted) { - return observerOrOnNext && typeof observerOrOnNext === 'object' ? - this._acceptObserver(observerOrOnNext) : - this._accept(observerOrOnNext, onError, onCompleted); - }; - - /** - * Returns an observable sequence with a single notification. - * - * @memberOf Notifications - * @param {Scheduler} [scheduler] Scheduler to send out the notification calls on. - * @returns {Observable} The observable sequence that surfaces the behavior of the notification upon subscription. - */ - Notification.prototype.toObservable = function (scheduler) { - var self = this; - isScheduler(scheduler) || (scheduler = immediateScheduler); - return new AnonymousObservable(function (o) { - return scheduler.schedule(self, function (_, notification) { - notification._acceptObserver(o); - notification.kind === 'N' && o.onCompleted(); - }); - }); - }; - - return Notification; - })(); - - var OnNextNotification = (function (__super__) { - inherits(OnNextNotification, __super__); - function OnNextNotification(value) { - this.value = value; - this.kind = 'N'; - } - - OnNextNotification.prototype._accept = function (onNext) { - return onNext(this.value); - }; - - OnNextNotification.prototype._acceptObserver = function (o) { - return o.onNext(this.value); - }; - - OnNextNotification.prototype.toString = function () { - return 'OnNext(' + this.value + ')'; - }; - - return OnNextNotification; - }(Notification)); - - var OnErrorNotification = (function (__super__) { - inherits(OnErrorNotification, __super__); - function OnErrorNotification(error) { - this.error = error; - this.kind = 'E'; - } - - OnErrorNotification.prototype._accept = function (onNext, onError) { - return onError(this.error); - }; - - OnErrorNotification.prototype._acceptObserver = function (o) { - return o.onError(this.error); - }; - - OnErrorNotification.prototype.toString = function () { - return 'OnError(' + this.error + ')'; - }; - - return OnErrorNotification; - }(Notification)); - - var OnCompletedNotification = (function (__super__) { - inherits(OnCompletedNotification, __super__); - function OnCompletedNotification() { - this.kind = 'C'; - } - - OnCompletedNotification.prototype._accept = function (onNext, onError, onCompleted) { - return onCompleted(); - }; - - OnCompletedNotification.prototype._acceptObserver = function (o) { - return o.onCompleted(); - }; - - OnCompletedNotification.prototype.toString = function () { - return 'OnCompleted()'; - }; - - return OnCompletedNotification; - }(Notification)); - - /** - * Creates an object that represents an OnNext notification to an observer. - * @param {Any} value The value contained in the notification. - * @returns {Notification} The OnNext notification containing the value. - */ - var notificationCreateOnNext = Notification.createOnNext = function (value) { - return new OnNextNotification(value); - }; - - /** - * Creates an object that represents an OnError notification to an observer. - * @param {Any} error The exception contained in the notification. - * @returns {Notification} The OnError notification containing the exception. - */ - var notificationCreateOnError = Notification.createOnError = function (error) { - return new OnErrorNotification(error); - }; - - /** - * Creates an object that represents an OnCompleted notification to an observer. - * @returns {Notification} The OnCompleted notification. - */ - var notificationCreateOnCompleted = Notification.createOnCompleted = function () { - return new OnCompletedNotification(); - }; - - /** - * Supports push-style iteration over an observable sequence. - */ - var Observer = Rx.Observer = function () { }; - - /** - * Creates a notification callback from an observer. - * @returns The action that forwards its input notification to the underlying observer. - */ - Observer.prototype.toNotifier = function () { - var observer = this; - return function (n) { return n.accept(observer); }; - }; - - /** - * Hides the identity of an observer. - * @returns An observer that hides the identity of the specified observer. - */ - Observer.prototype.asObserver = function () { - var self = this; - return new AnonymousObserver( - function (x) { self.onNext(x); }, - function (err) { self.onError(err); }, - function () { self.onCompleted(); }); - }; - - /** - * Checks access to the observer for grammar violations. This includes checking for multiple OnError or OnCompleted calls, as well as reentrancy in any of the observer methods. - * If a violation is detected, an Error is thrown from the offending observer method call. - * @returns An observer that checks callbacks invocations against the observer grammar and, if the checks pass, forwards those to the specified observer. - */ - Observer.prototype.checked = function () { return new CheckedObserver(this); }; - - /** - * Creates an observer from the specified OnNext, along with optional OnError, and OnCompleted actions. - * @param {Function} [onNext] Observer's OnNext action implementation. - * @param {Function} [onError] Observer's OnError action implementation. - * @param {Function} [onCompleted] Observer's OnCompleted action implementation. - * @returns {Observer} The observer object implemented using the given actions. - */ - var observerCreate = Observer.create = function (onNext, onError, onCompleted) { - onNext || (onNext = noop); - onError || (onError = defaultError); - onCompleted || (onCompleted = noop); - return new AnonymousObserver(onNext, onError, onCompleted); - }; - - /** - * Creates an observer from a notification callback. - * @param {Function} handler Action that handles a notification. - * @returns The observer object that invokes the specified handler using a notification corresponding to each message it receives. - */ - Observer.fromNotifier = function (handler, thisArg) { - var cb = bindCallback(handler, thisArg, 1); - return new AnonymousObserver(function (x) { - return cb(notificationCreateOnNext(x)); - }, function (e) { - return cb(notificationCreateOnError(e)); - }, function () { - return cb(notificationCreateOnCompleted()); - }); - }; - - /** - * Schedules the invocation of observer methods on the given scheduler. - * @param {Scheduler} scheduler Scheduler to schedule observer messages on. - * @returns {Observer} Observer whose messages are scheduled on the given scheduler. - */ - Observer.prototype.notifyOn = function (scheduler) { - return new ObserveOnObserver(scheduler, this); - }; - - Observer.prototype.makeSafe = function(disposable) { - return new AnonymousSafeObserver(this._onNext, this._onError, this._onCompleted, disposable); - }; - - /** - * Abstract base class for implementations of the Observer class. - * This base class enforces the grammar of observers where OnError and OnCompleted are terminal messages. - */ - var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) { - inherits(AbstractObserver, __super__); - - /** - * Creates a new observer in a non-stopped state. - */ - function AbstractObserver() { - this.isStopped = false; - } - - // Must be implemented by other observers - AbstractObserver.prototype.next = notImplemented; - AbstractObserver.prototype.error = notImplemented; - AbstractObserver.prototype.completed = notImplemented; - - /** - * Notifies the observer of a new element in the sequence. - * @param {Any} value Next element in the sequence. - */ - AbstractObserver.prototype.onNext = function (value) { - !this.isStopped && this.next(value); - }; - - /** - * Notifies the observer that an exception has occurred. - * @param {Any} error The error that has occurred. - */ - AbstractObserver.prototype.onError = function (error) { - if (!this.isStopped) { - this.isStopped = true; - this.error(error); - } - }; - - /** - * Notifies the observer of the end of the sequence. - */ - AbstractObserver.prototype.onCompleted = function () { - if (!this.isStopped) { - this.isStopped = true; - this.completed(); - } - }; - - /** - * Disposes the observer, causing it to transition to the stopped state. - */ - AbstractObserver.prototype.dispose = function () { this.isStopped = true; }; - - AbstractObserver.prototype.fail = function (e) { - if (!this.isStopped) { - this.isStopped = true; - this.error(e); - return true; - } - - return false; - }; - - return AbstractObserver; - }(Observer)); - - /** - * Class to create an Observer instance from delegate-based implementations of the on* methods. - */ - var AnonymousObserver = Rx.AnonymousObserver = (function (__super__) { - inherits(AnonymousObserver, __super__); - - /** - * Creates an observer from the specified OnNext, OnError, and OnCompleted actions. - * @param {Any} onNext Observer's OnNext action implementation. - * @param {Any} onError Observer's OnError action implementation. - * @param {Any} onCompleted Observer's OnCompleted action implementation. - */ - function AnonymousObserver(onNext, onError, onCompleted) { - __super__.call(this); - this._onNext = onNext; - this._onError = onError; - this._onCompleted = onCompleted; - } - - /** - * Calls the onNext action. - * @param {Any} value Next element in the sequence. - */ - AnonymousObserver.prototype.next = function (value) { - this._onNext(value); - }; - - /** - * Calls the onError action. - * @param {Any} error The error that has occurred. - */ - AnonymousObserver.prototype.error = function (error) { - this._onError(error); - }; - - /** - * Calls the onCompleted action. - */ - AnonymousObserver.prototype.completed = function () { - this._onCompleted(); - }; - - return AnonymousObserver; - }(AbstractObserver)); - - var CheckedObserver = (function (__super__) { - inherits(CheckedObserver, __super__); - - function CheckedObserver(observer) { - __super__.call(this); - this._observer = observer; - this._state = 0; // 0 - idle, 1 - busy, 2 - done - } - - var CheckedObserverPrototype = CheckedObserver.prototype; - - CheckedObserverPrototype.onNext = function (value) { - this.checkAccess(); - var res = tryCatch(this._observer.onNext).call(this._observer, value); - this._state = 0; - res === errorObj && thrower(res.e); - }; - - CheckedObserverPrototype.onError = function (err) { - this.checkAccess(); - var res = tryCatch(this._observer.onError).call(this._observer, err); - this._state = 2; - res === errorObj && thrower(res.e); - }; - - CheckedObserverPrototype.onCompleted = function () { - this.checkAccess(); - var res = tryCatch(this._observer.onCompleted).call(this._observer); - this._state = 2; - res === errorObj && thrower(res.e); - }; - - CheckedObserverPrototype.checkAccess = function () { - if (this._state === 1) { throw new Error('Re-entrancy detected'); } - if (this._state === 2) { throw new Error('Observer completed'); } - if (this._state === 0) { this._state = 1; } - }; - - return CheckedObserver; - }(Observer)); - - var ScheduledObserver = Rx.internals.ScheduledObserver = (function (__super__) { - inherits(ScheduledObserver, __super__); - - function ScheduledObserver(scheduler, observer) { - __super__.call(this); - this.scheduler = scheduler; - this.observer = observer; - this.isAcquired = false; - this.hasFaulted = false; - this.queue = []; - this.disposable = new SerialDisposable(); - } - - function enqueueNext(observer, x) { return function () { observer.onNext(x); }; } - function enqueueError(observer, e) { return function () { observer.onError(e); }; } - function enqueueCompleted(observer) { return function () { observer.onCompleted(); }; } - - ScheduledObserver.prototype.next = function (x) { - this.queue.push(enqueueNext(this.observer, x)); - }; - - ScheduledObserver.prototype.error = function (e) { - this.queue.push(enqueueError(this.observer, e)); - }; - - ScheduledObserver.prototype.completed = function () { - this.queue.push(enqueueCompleted(this.observer)); - }; - - - function scheduleMethod(state, recurse) { - var work; - if (state.queue.length > 0) { - work = state.queue.shift(); - } else { - state.isAcquired = false; - return; - } - var res = tryCatch(work)(); - if (res === errorObj) { - state.queue = []; - state.hasFaulted = true; - return thrower(res.e); - } - recurse(state); - } - - ScheduledObserver.prototype.ensureActive = function () { - var isOwner = false; - if (!this.hasFaulted && this.queue.length > 0) { - isOwner = !this.isAcquired; - this.isAcquired = true; - } - isOwner && - this.disposable.setDisposable(this.scheduler.scheduleRecursive(this, scheduleMethod)); - }; - - ScheduledObserver.prototype.dispose = function () { - __super__.prototype.dispose.call(this); - this.disposable.dispose(); - }; - - return ScheduledObserver; - }(AbstractObserver)); - - var ObserveOnObserver = (function (__super__) { - inherits(ObserveOnObserver, __super__); - - function ObserveOnObserver(scheduler, observer, cancel) { - __super__.call(this, scheduler, observer); - this._cancel = cancel; - } - - ObserveOnObserver.prototype.next = function (value) { - __super__.prototype.next.call(this, value); - this.ensureActive(); - }; - - ObserveOnObserver.prototype.error = function (e) { - __super__.prototype.error.call(this, e); - this.ensureActive(); - }; - - ObserveOnObserver.prototype.completed = function () { - __super__.prototype.completed.call(this); - this.ensureActive(); - }; - - ObserveOnObserver.prototype.dispose = function () { - __super__.prototype.dispose.call(this); - this._cancel && this._cancel.dispose(); - this._cancel = null; - }; - - return ObserveOnObserver; - })(ScheduledObserver); - - var observableProto; - - /** - * Represents a push-style collection. - */ - var Observable = Rx.Observable = (function () { - - function makeSubscribe(self, subscribe) { - return function (o) { - var oldOnError = o.onError; - o.onError = function (e) { - makeStackTraceLong(e, self); - oldOnError.call(o, e); - }; - - return subscribe.call(self, o); - }; - } - - function Observable() { - if (Rx.config.longStackSupport && hasStacks) { - var oldSubscribe = this._subscribe; - var e = tryCatch(thrower)(new Error()).e; - this.stack = e.stack.substring(e.stack.indexOf('\n') + 1); - this._subscribe = makeSubscribe(this, oldSubscribe); - } - } - - observableProto = Observable.prototype; - - /** - * Determines whether the given object is an Observable - * @param {Any} An object to determine whether it is an Observable - * @returns {Boolean} true if an Observable, else false. - */ - Observable.isObservable = function (o) { - return o && isFunction(o.subscribe); - }; - - /** - * Subscribes an o to the observable sequence. - * @param {Mixed} [oOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence. - * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. - * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. - * @returns {Diposable} A disposable handling the subscriptions and unsubscriptions. - */ - observableProto.subscribe = observableProto.forEach = function (oOrOnNext, onError, onCompleted) { - return this._subscribe(typeof oOrOnNext === 'object' ? - oOrOnNext : - observerCreate(oOrOnNext, onError, onCompleted)); - }; - - /** - * Subscribes to the next value in the sequence with an optional "this" argument. - * @param {Function} onNext The function to invoke on each element in the observable sequence. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. - */ - observableProto.subscribeOnNext = function (onNext, thisArg) { - return this._subscribe(observerCreate(typeof thisArg !== 'undefined' ? function(x) { onNext.call(thisArg, x); } : onNext)); - }; - - /** - * Subscribes to an exceptional condition in the sequence with an optional "this" argument. - * @param {Function} onError The function to invoke upon exceptional termination of the observable sequence. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. - */ - observableProto.subscribeOnError = function (onError, thisArg) { - return this._subscribe(observerCreate(null, typeof thisArg !== 'undefined' ? function(e) { onError.call(thisArg, e); } : onError)); - }; - - /** - * Subscribes to the next value in the sequence with an optional "this" argument. - * @param {Function} onCompleted The function to invoke upon graceful termination of the observable sequence. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. - */ - observableProto.subscribeOnCompleted = function (onCompleted, thisArg) { - return this._subscribe(observerCreate(null, null, typeof thisArg !== 'undefined' ? function() { onCompleted.call(thisArg); } : onCompleted)); - }; - - return Observable; - })(); - - var ObservableBase = Rx.ObservableBase = (function (__super__) { - inherits(ObservableBase, __super__); - - function fixSubscriber(subscriber) { - return subscriber && isFunction(subscriber.dispose) ? subscriber : - isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty; - } - - function setDisposable(s, state) { - var ado = state[0], self = state[1]; - var sub = tryCatch(self.subscribeCore).call(self, ado); - if (sub === errorObj && !ado.fail(errorObj.e)) { thrower(errorObj.e); } - ado.setDisposable(fixSubscriber(sub)); - } - - function ObservableBase() { - __super__.call(this); - } - - ObservableBase.prototype._subscribe = function (o) { - var ado = new AutoDetachObserver(o), state = [ado, this]; - - if (currentThreadScheduler.scheduleRequired()) { - currentThreadScheduler.schedule(state, setDisposable); - } else { - setDisposable(null, state); - } - return ado; - }; - - ObservableBase.prototype.subscribeCore = notImplemented; - - return ObservableBase; - }(Observable)); - -var FlatMapObservable = Rx.FlatMapObservable = (function(__super__) { - - inherits(FlatMapObservable, __super__); - - function FlatMapObservable(source, selector, resultSelector, thisArg) { - this.resultSelector = isFunction(resultSelector) ? resultSelector : null; - this.selector = bindCallback(isFunction(selector) ? selector : function() { return selector; }, thisArg, 3); - this.source = source; - __super__.call(this); - } - - FlatMapObservable.prototype.subscribeCore = function(o) { - return this.source.subscribe(new InnerObserver(o, this.selector, this.resultSelector, this)); - }; - - inherits(InnerObserver, AbstractObserver); - function InnerObserver(observer, selector, resultSelector, source) { - this.i = 0; - this.selector = selector; - this.resultSelector = resultSelector; - this.source = source; - this.o = observer; - AbstractObserver.call(this); - } - - InnerObserver.prototype._wrapResult = function(result, x, i) { - return this.resultSelector ? - result.map(function(y, i2) { return this.resultSelector(x, y, i, i2); }, this) : - result; - }; - - InnerObserver.prototype.next = function(x) { - var i = this.i++; - var result = tryCatch(this.selector)(x, i, this.source); - if (result === errorObj) { return this.o.onError(result.e); } - - isPromise(result) && (result = observableFromPromise(result)); - (isArrayLike(result) || isIterable(result)) && (result = Observable.from(result)); - this.o.onNext(this._wrapResult(result, x, i)); - }; - - InnerObserver.prototype.error = function(e) { this.o.onError(e); }; - - InnerObserver.prototype.completed = function() { this.o.onCompleted(); }; - - return FlatMapObservable; - -}(ObservableBase)); - - var Enumerable = Rx.internals.Enumerable = function () { }; - - function IsDisposedDisposable(state) { - this._s = state; - this.isDisposed = false; - } - - IsDisposedDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - this._s.isDisposed = true; - } - }; - - var ConcatEnumerableObservable = (function(__super__) { - inherits(ConcatEnumerableObservable, __super__); - function ConcatEnumerableObservable(sources) { - this.sources = sources; - __super__.call(this); - } - - function scheduleMethod(state, recurse) { - if (state.isDisposed) { return; } - var currentItem = tryCatch(state.e.next).call(state.e); - if (currentItem === errorObj) { return state.o.onError(currentItem.e); } - if (currentItem.done) { return state.o.onCompleted(); } - - // Check if promise - var currentValue = currentItem.value; - isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); - - var d = new SingleAssignmentDisposable(); - state.subscription.setDisposable(d); - d.setDisposable(currentValue.subscribe(new InnerObserver(state, recurse))); - } - - ConcatEnumerableObservable.prototype.subscribeCore = function (o) { - var subscription = new SerialDisposable(); - var state = { - isDisposed: false, - o: o, - subscription: subscription, - e: this.sources[$iterator$]() - }; - - var cancelable = currentThreadScheduler.scheduleRecursive(state, scheduleMethod); - return new NAryDisposable([subscription, cancelable, new IsDisposedDisposable(state)]); - }; - - function InnerObserver(state, recurse) { - this._state = state; - this._recurse = recurse; - AbstractObserver.call(this); - } - - inherits(InnerObserver, AbstractObserver); - - InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); }; - InnerObserver.prototype.error = function (e) { this._state.o.onError(e); }; - InnerObserver.prototype.completed = function () { this._recurse(this._state); }; - - return ConcatEnumerableObservable; - }(ObservableBase)); - - Enumerable.prototype.concat = function () { - return new ConcatEnumerableObservable(this); - }; - - var CatchErrorObservable = (function(__super__) { - function CatchErrorObservable(sources) { - this.sources = sources; - __super__.call(this); - } - - inherits(CatchErrorObservable, __super__); - - function scheduleMethod(state, recurse) { - if (state.isDisposed) { return; } - var currentItem = tryCatch(state.e.next).call(state.e); - if (currentItem === errorObj) { return state.o.onError(currentItem.e); } - if (currentItem.done) { return state.lastError !== null ? state.o.onError(state.lastError) : state.o.onCompleted(); } - - var currentValue = currentItem.value; - isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); - - var d = new SingleAssignmentDisposable(); - state.subscription.setDisposable(d); - d.setDisposable(currentValue.subscribe(new InnerObserver(state, recurse))); - } - - CatchErrorObservable.prototype.subscribeCore = function (o) { - var subscription = new SerialDisposable(); - var state = { - isDisposed: false, - e: this.sources[$iterator$](), - subscription: subscription, - lastError: null, - o: o - }; - - var cancelable = currentThreadScheduler.scheduleRecursive(state, scheduleMethod); - return new NAryDisposable([subscription, cancelable, new IsDisposedDisposable(state)]); - }; - - function InnerObserver(state, recurse) { - this._state = state; - this._recurse = recurse; - AbstractObserver.call(this); - } - - inherits(InnerObserver, AbstractObserver); - - InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); }; - InnerObserver.prototype.error = function (e) { this._state.lastError = e; this._recurse(this._state); }; - InnerObserver.prototype.completed = function () { this._state.o.onCompleted(); }; - - return CatchErrorObservable; - }(ObservableBase)); - - Enumerable.prototype.catchError = function () { - return new CatchErrorObservable(this); - }; - - var RepeatEnumerable = (function (__super__) { - inherits(RepeatEnumerable, __super__); - function RepeatEnumerable(v, c) { - this.v = v; - this.c = c == null ? -1 : c; - } - - RepeatEnumerable.prototype[$iterator$] = function () { - return new RepeatEnumerator(this); - }; - - function RepeatEnumerator(p) { - this.v = p.v; - this.l = p.c; - } - - RepeatEnumerator.prototype.next = function () { - if (this.l === 0) { return doneEnumerator; } - if (this.l > 0) { this.l--; } - return { done: false, value: this.v }; - }; - - return RepeatEnumerable; - }(Enumerable)); - - var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) { - return new RepeatEnumerable(value, repeatCount); - }; - - var OfEnumerable = (function(__super__) { - inherits(OfEnumerable, __super__); - function OfEnumerable(s, fn, thisArg) { - this.s = s; - this.fn = fn ? bindCallback(fn, thisArg, 3) : null; - } - OfEnumerable.prototype[$iterator$] = function () { - return new OfEnumerator(this); - }; - - function OfEnumerator(p) { - this.i = -1; - this.s = p.s; - this.l = this.s.length; - this.fn = p.fn; - } - - OfEnumerator.prototype.next = function () { - return ++this.i < this.l ? - { done: false, value: !this.fn ? this.s[this.i] : this.fn(this.s[this.i], this.i, this.s) } : - doneEnumerator; - }; - - return OfEnumerable; - }(Enumerable)); - - var enumerableOf = Enumerable.of = function (source, selector, thisArg) { - return new OfEnumerable(source, selector, thisArg); - }; - -var ObserveOnObservable = (function (__super__) { - inherits(ObserveOnObservable, __super__); - function ObserveOnObservable(source, s) { - this.source = source; - this._s = s; - __super__.call(this); - } - - ObserveOnObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new ObserveOnObserver(this._s, o)); - }; - - return ObserveOnObservable; -}(ObservableBase)); - - /** - * Wraps the source sequence in order to run its observer callbacks on the specified scheduler. - * - * This only invokes observer callbacks on a scheduler. In case the subscription and/or unsubscription actions have side-effects - * that require to be run on a scheduler, use subscribeOn. - * - * @param {Scheduler} scheduler Scheduler to notify observers on. - * @returns {Observable} The source sequence whose observations happen on the specified scheduler. - */ - observableProto.observeOn = function (scheduler) { - return new ObserveOnObservable(this, scheduler); - }; - - var SubscribeOnObservable = (function (__super__) { - inherits(SubscribeOnObservable, __super__); - function SubscribeOnObservable(source, s) { - this.source = source; - this._s = s; - __super__.call(this); - } - - function scheduleMethod(scheduler, state) { - var source = state[0], d = state[1], o = state[2]; - d.setDisposable(new ScheduledDisposable(scheduler, source.subscribe(o))); - } - - SubscribeOnObservable.prototype.subscribeCore = function (o) { - var m = new SingleAssignmentDisposable(), d = new SerialDisposable(); - d.setDisposable(m); - m.setDisposable(this._s.schedule([this.source, d, o], scheduleMethod)); - return d; - }; - - return SubscribeOnObservable; - }(ObservableBase)); - - /** - * Wraps the source sequence in order to run its subscription and unsubscription logic on the specified scheduler. This operation is not commonly used; - * see the remarks section for more information on the distinction between subscribeOn and observeOn. - - * This only performs the side-effects of subscription and unsubscription on the specified scheduler. In order to invoke observer - * callbacks on a scheduler, use observeOn. - - * @param {Scheduler} scheduler Scheduler to perform subscription and unsubscription actions on. - * @returns {Observable} The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. - */ - observableProto.subscribeOn = function (scheduler) { - return new SubscribeOnObservable(this, scheduler); - }; - - var FromPromiseObservable = (function(__super__) { - inherits(FromPromiseObservable, __super__); - function FromPromiseObservable(p, s) { - this._p = p; - this._s = s; - __super__.call(this); - } - - function scheduleNext(s, state) { - var o = state[0], data = state[1]; - o.onNext(data); - o.onCompleted(); - } - - function scheduleError(s, state) { - var o = state[0], err = state[1]; - o.onError(err); - } - - FromPromiseObservable.prototype.subscribeCore = function(o) { - var sad = new SingleAssignmentDisposable(), self = this, p = this._p; - - if (isFunction(p)) { - p = tryCatch(p)(); - if (p === errorObj) { - o.onError(p.e); - return sad; - } - } - - p - .then(function (data) { - sad.setDisposable(self._s.schedule([o, data], scheduleNext)); - }, function (err) { - sad.setDisposable(self._s.schedule([o, err], scheduleError)); - }); - - return sad; - }; - - return FromPromiseObservable; - }(ObservableBase)); - - /** - * Converts a Promise to an Observable sequence - * @param {Promise} An ES6 Compliant promise. - * @returns {Observable} An Observable sequence which wraps the existing promise success and failure. - */ - var observableFromPromise = Observable.fromPromise = function (promise, scheduler) { - scheduler || (scheduler = defaultScheduler); - return new FromPromiseObservable(promise, scheduler); - }; - - /* - * Converts an existing observable sequence to an ES6 Compatible Promise - * @example - * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise); - * - * // With config - * Rx.config.Promise = RSVP.Promise; - * var promise = Rx.Observable.return(42).toPromise(); - * @param {Function} [promiseCtor] The constructor of the promise. If not provided, it looks for it in Rx.config.Promise. - * @returns {Promise} An ES6 compatible promise with the last value from the observable sequence. - */ - observableProto.toPromise = function (promiseCtor) { - promiseCtor || (promiseCtor = Rx.config.Promise); - if (!promiseCtor) { throw new NotSupportedError('Promise type not provided nor in Rx.config.Promise'); } - var source = this; - return new promiseCtor(function (resolve, reject) { - // No cancellation can be done - var value; - source.subscribe(function (v) { - value = v; - }, reject, function () { - resolve(value); - }); - }); - }; - - var ToArrayObservable = (function(__super__) { - inherits(ToArrayObservable, __super__); - function ToArrayObservable(source) { - this.source = source; - __super__.call(this); - } - - ToArrayObservable.prototype.subscribeCore = function(o) { - return this.source.subscribe(new InnerObserver(o)); - }; - - inherits(InnerObserver, AbstractObserver); - function InnerObserver(o) { - this.o = o; - this.a = []; - AbstractObserver.call(this); - } - - InnerObserver.prototype.next = function (x) { this.a.push(x); }; - InnerObserver.prototype.error = function (e) { this.o.onError(e); }; - InnerObserver.prototype.completed = function () { this.o.onNext(this.a); this.o.onCompleted(); }; - - return ToArrayObservable; - }(ObservableBase)); - - /** - * Creates an array from an observable sequence. - * @returns {Observable} An observable sequence containing a single element with a list containing all the elements of the source sequence. - */ - observableProto.toArray = function () { - return new ToArrayObservable(this); - }; - - /** - * Creates an observable sequence from a specified subscribe method implementation. - * @example - * var res = Rx.Observable.create(function (observer) { return function () { } ); - * var res = Rx.Observable.create(function (observer) { return Rx.Disposable.empty; } ); - * var res = Rx.Observable.create(function (observer) { } ); - * @param {Function} subscribe Implementation of the resulting observable sequence's subscribe method, returning a function that will be wrapped in a Disposable. - * @returns {Observable} The observable sequence with the specified implementation for the Subscribe method. - */ - Observable.create = function (subscribe, parent) { - return new AnonymousObservable(subscribe, parent); - }; - - var Defer = (function(__super__) { - inherits(Defer, __super__); - function Defer(factory) { - this._f = factory; - __super__.call(this); - } - - Defer.prototype.subscribeCore = function (o) { - var result = tryCatch(this._f)(); - if (result === errorObj) { return observableThrow(result.e).subscribe(o);} - isPromise(result) && (result = observableFromPromise(result)); - return result.subscribe(o); - }; - - return Defer; - }(ObservableBase)); - - /** - * Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. - * - * @example - * var res = Rx.Observable.defer(function () { return Rx.Observable.fromArray([1,2,3]); }); - * @param {Function} observableFactory Observable factory function to invoke for each observer that subscribes to the resulting sequence or Promise. - * @returns {Observable} An observable sequence whose observers trigger an invocation of the given observable factory function. - */ - var observableDefer = Observable.defer = function (observableFactory) { - return new Defer(observableFactory); - }; - - var EmptyObservable = (function(__super__) { - inherits(EmptyObservable, __super__); - function EmptyObservable(scheduler) { - this.scheduler = scheduler; - __super__.call(this); - } - - EmptyObservable.prototype.subscribeCore = function (observer) { - var sink = new EmptySink(observer, this.scheduler); - return sink.run(); - }; - - function EmptySink(observer, scheduler) { - this.observer = observer; - this.scheduler = scheduler; - } - - function scheduleItem(s, state) { - state.onCompleted(); - return disposableEmpty; - } - - EmptySink.prototype.run = function () { - var state = this.observer; - return this.scheduler === immediateScheduler ? - scheduleItem(null, state) : - this.scheduler.schedule(state, scheduleItem); - }; - - return EmptyObservable; - }(ObservableBase)); - - var EMPTY_OBSERVABLE = new EmptyObservable(immediateScheduler); - - /** - * Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message. - * - * @example - * var res = Rx.Observable.empty(); - * var res = Rx.Observable.empty(Rx.Scheduler.timeout); - * @param {Scheduler} [scheduler] Scheduler to send the termination call on. - * @returns {Observable} An observable sequence with no elements. - */ - var observableEmpty = Observable.empty = function (scheduler) { - isScheduler(scheduler) || (scheduler = immediateScheduler); - return scheduler === immediateScheduler ? EMPTY_OBSERVABLE : new EmptyObservable(scheduler); - }; - - var FromObservable = (function(__super__) { - inherits(FromObservable, __super__); - function FromObservable(iterable, fn, scheduler) { - this._iterable = iterable; - this._fn = fn; - this._scheduler = scheduler; - __super__.call(this); - } - - function createScheduleMethod(o, it, fn) { - return function loopRecursive(i, recurse) { - var next = tryCatch(it.next).call(it); - if (next === errorObj) { return o.onError(next.e); } - if (next.done) { return o.onCompleted(); } - - var result = next.value; - - if (isFunction(fn)) { - result = tryCatch(fn)(result, i); - if (result === errorObj) { return o.onError(result.e); } - } - - o.onNext(result); - recurse(i + 1); - }; - } - - FromObservable.prototype.subscribeCore = function (o) { - var list = Object(this._iterable), - it = getIterable(list); - - return this._scheduler.scheduleRecursive(0, createScheduleMethod(o, it, this._fn)); - }; - - return FromObservable; - }(ObservableBase)); - - var maxSafeInteger = Math.pow(2, 53) - 1; - - function StringIterable(s) { - this._s = s; - } - - StringIterable.prototype[$iterator$] = function () { - return new StringIterator(this._s); - }; - - function StringIterator(s) { - this._s = s; - this._l = s.length; - this._i = 0; - } - - StringIterator.prototype[$iterator$] = function () { - return this; - }; - - StringIterator.prototype.next = function () { - return this._i < this._l ? { done: false, value: this._s.charAt(this._i++) } : doneEnumerator; - }; - - function ArrayIterable(a) { - this._a = a; - } - - ArrayIterable.prototype[$iterator$] = function () { - return new ArrayIterator(this._a); - }; - - function ArrayIterator(a) { - this._a = a; - this._l = toLength(a); - this._i = 0; - } - - ArrayIterator.prototype[$iterator$] = function () { - return this; - }; - - ArrayIterator.prototype.next = function () { - return this._i < this._l ? { done: false, value: this._a[this._i++] } : doneEnumerator; - }; - - function numberIsFinite(value) { - return typeof value === 'number' && root.isFinite(value); - } - - function isNan(n) { - return n !== n; - } - - function getIterable(o) { - var i = o[$iterator$], it; - if (!i && typeof o === 'string') { - it = new StringIterable(o); - return it[$iterator$](); - } - if (!i && o.length !== undefined) { - it = new ArrayIterable(o); - return it[$iterator$](); - } - if (!i) { throw new TypeError('Object is not iterable'); } - return o[$iterator$](); - } - - function sign(value) { - var number = +value; - if (number === 0) { return number; } - if (isNaN(number)) { return number; } - return number < 0 ? -1 : 1; - } - - function toLength(o) { - var len = +o.length; - if (isNaN(len)) { return 0; } - if (len === 0 || !numberIsFinite(len)) { return len; } - len = sign(len) * Math.floor(Math.abs(len)); - if (len <= 0) { return 0; } - if (len > maxSafeInteger) { return maxSafeInteger; } - return len; - } - - /** - * This method creates a new Observable sequence from an array-like or iterable object. - * @param {Any} arrayLike An array-like or iterable object to convert to an Observable sequence. - * @param {Function} [mapFn] Map function to call on every element of the array. - * @param {Any} [thisArg] The context to use calling the mapFn if provided. - * @param {Scheduler} [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. - */ - var observableFrom = Observable.from = function (iterable, mapFn, thisArg, scheduler) { - if (iterable == null) { - throw new Error('iterable cannot be null.') - } - if (mapFn && !isFunction(mapFn)) { - throw new Error('mapFn when provided must be a function'); - } - if (mapFn) { - var mapper = bindCallback(mapFn, thisArg, 2); - } - isScheduler(scheduler) || (scheduler = currentThreadScheduler); - return new FromObservable(iterable, mapper, scheduler); - } - - var FromArrayObservable = (function(__super__) { - inherits(FromArrayObservable, __super__); - function FromArrayObservable(args, scheduler) { - this._args = args; - this._scheduler = scheduler; - __super__.call(this); - } - - function scheduleMethod(o, args) { - var len = args.length; - return function loopRecursive (i, recurse) { - if (i < len) { - o.onNext(args[i]); - recurse(i + 1); - } else { - o.onCompleted(); - } - }; - } - - FromArrayObservable.prototype.subscribeCore = function (o) { - return this._scheduler.scheduleRecursive(0, scheduleMethod(o, this._args)); - }; - - return FromArrayObservable; - }(ObservableBase)); - - /** - * Converts an array to an observable sequence, using an optional scheduler to enumerate the array. - * @deprecated use Observable.from or Observable.of - * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. - * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. - */ - var observableFromArray = Observable.fromArray = function (array, scheduler) { - isScheduler(scheduler) || (scheduler = currentThreadScheduler); - return new FromArrayObservable(array, scheduler) - }; - - var GenerateObservable = (function (__super__) { - inherits(GenerateObservable, __super__); - function GenerateObservable(state, cndFn, itrFn, resFn, s) { - this._initialState = state; - this._cndFn = cndFn; - this._itrFn = itrFn; - this._resFn = resFn; - this._s = s; - __super__.call(this); - } - - function scheduleRecursive(state, recurse) { - if (state.first) { - state.first = false; - } else { - state.newState = tryCatch(state.self._itrFn)(state.newState); - if (state.newState === errorObj) { return state.o.onError(state.newState.e); } - } - var hasResult = tryCatch(state.self._cndFn)(state.newState); - if (hasResult === errorObj) { return state.o.onError(hasResult.e); } - if (hasResult) { - var result = tryCatch(state.self._resFn)(state.newState); - if (result === errorObj) { return state.o.onError(result.e); } - state.o.onNext(result); - recurse(state); - } else { - state.o.onCompleted(); - } - } - - GenerateObservable.prototype.subscribeCore = function (o) { - var state = { - o: o, - self: this, - first: true, - newState: this._initialState - }; - return this._s.scheduleRecursive(state, scheduleRecursive); - }; - - return GenerateObservable; - }(ObservableBase)); - - /** - * Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler to send out observer messages. - * - * @example - * var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; }); - * var res = Rx.Observable.generate(0, function (x) { return x < 10; }, function (x) { return x + 1; }, function (x) { return x; }, Rx.Scheduler.timeout); - * @param {Mixed} initialState Initial state. - * @param {Function} condition Condition to terminate generation (upon returning false). - * @param {Function} iterate Iteration step function. - * @param {Function} resultSelector Selector function for results produced in the sequence. - * @param {Scheduler} [scheduler] Scheduler on which to run the generator loop. If not provided, defaults to Scheduler.currentThread. - * @returns {Observable} The generated sequence. - */ - Observable.generate = function (initialState, condition, iterate, resultSelector, scheduler) { - isScheduler(scheduler) || (scheduler = currentThreadScheduler); - return new GenerateObservable(initialState, condition, iterate, resultSelector, scheduler); - }; - - var NeverObservable = (function(__super__) { - inherits(NeverObservable, __super__); - function NeverObservable() { - __super__.call(this); - } - - NeverObservable.prototype.subscribeCore = function (observer) { - return disposableEmpty; - }; - - return NeverObservable; - }(ObservableBase)); - - var NEVER_OBSERVABLE = new NeverObservable(); - - /** - * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). - * @returns {Observable} An observable sequence whose observers will never get called. - */ - var observableNever = Observable.never = function () { - return NEVER_OBSERVABLE; - }; - - function observableOf (scheduler, array) { - isScheduler(scheduler) || (scheduler = currentThreadScheduler); - return new FromArrayObservable(array, scheduler); - } - - /** - * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. - * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. - */ - Observable.of = function () { - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - return new FromArrayObservable(args, currentThreadScheduler); - }; - - /** - * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. - * @param {Scheduler} scheduler A scheduler to use for scheduling the arguments. - * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. - */ - Observable.ofWithScheduler = function (scheduler) { - var len = arguments.length, args = new Array(len - 1); - for(var i = 1; i < len; i++) { args[i - 1] = arguments[i]; } - return new FromArrayObservable(args, scheduler); - }; - - var PairsObservable = (function(__super__) { - inherits(PairsObservable, __super__); - function PairsObservable(o, scheduler) { - this._o = o; - this._keys = Object.keys(o); - this._scheduler = scheduler; - __super__.call(this); - } - - function scheduleMethod(o, obj, keys) { - return function loopRecursive(i, recurse) { - if (i < keys.length) { - var key = keys[i]; - o.onNext([key, obj[key]]); - recurse(i + 1); - } else { - o.onCompleted(); - } - }; - } - - PairsObservable.prototype.subscribeCore = function (o) { - return this._scheduler.scheduleRecursive(0, scheduleMethod(o, this._o, this._keys)); - }; - - return PairsObservable; - }(ObservableBase)); - - /** - * Convert an object into an observable sequence of [key, value] pairs. - * @param {Object} obj The object to inspect. - * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. - * @returns {Observable} An observable sequence of [key, value] pairs from the object. - */ - Observable.pairs = function (obj, scheduler) { - scheduler || (scheduler = currentThreadScheduler); - return new PairsObservable(obj, scheduler); - }; - - var RangeObservable = (function(__super__) { - inherits(RangeObservable, __super__); - function RangeObservable(start, count, scheduler) { - this.start = start; - this.rangeCount = count; - this.scheduler = scheduler; - __super__.call(this); - } - - function loopRecursive(start, count, o) { - return function loop (i, recurse) { - if (i < count) { - o.onNext(start + i); - recurse(i + 1); - } else { - o.onCompleted(); - } - }; - } - - RangeObservable.prototype.subscribeCore = function (o) { - return this.scheduler.scheduleRecursive( - 0, - loopRecursive(this.start, this.rangeCount, o) - ); - }; - - return RangeObservable; - }(ObservableBase)); - - /** - * Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages. - * @param {Number} start The value of the first integer in the sequence. - * @param {Number} count The number of sequential integers to generate. - * @param {Scheduler} [scheduler] Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread. - * @returns {Observable} An observable sequence that contains a range of sequential integral numbers. - */ - Observable.range = function (start, count, scheduler) { - isScheduler(scheduler) || (scheduler = currentThreadScheduler); - return new RangeObservable(start, count, scheduler); - }; - - var RepeatObservable = (function(__super__) { - inherits(RepeatObservable, __super__); - function RepeatObservable(value, repeatCount, scheduler) { - this.value = value; - this.repeatCount = repeatCount == null ? -1 : repeatCount; - this.scheduler = scheduler; - __super__.call(this); - } - - RepeatObservable.prototype.subscribeCore = function (observer) { - var sink = new RepeatSink(observer, this); - return sink.run(); - }; - - return RepeatObservable; - }(ObservableBase)); - - function RepeatSink(observer, parent) { - this.observer = observer; - this.parent = parent; - } - - RepeatSink.prototype.run = function () { - var observer = this.observer, value = this.parent.value; - function loopRecursive(i, recurse) { - if (i === -1 || i > 0) { - observer.onNext(value); - i > 0 && i--; - } - if (i === 0) { return observer.onCompleted(); } - recurse(i); - } - - return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount, loopRecursive); - }; - - /** - * Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages. - * @param {Mixed} value Element to repeat. - * @param {Number} repeatCount [Optiona] Number of times to repeat the element. If not specified, repeats indefinitely. - * @param {Scheduler} scheduler Scheduler to run the producer loop on. If not specified, defaults to Scheduler.immediate. - * @returns {Observable} An observable sequence that repeats the given element the specified number of times. - */ - Observable.repeat = function (value, repeatCount, scheduler) { - isScheduler(scheduler) || (scheduler = currentThreadScheduler); - return new RepeatObservable(value, repeatCount, scheduler); - }; - - var JustObservable = (function(__super__) { - inherits(JustObservable, __super__); - function JustObservable(value, scheduler) { - this._value = value; - this._scheduler = scheduler; - __super__.call(this); - } - - JustObservable.prototype.subscribeCore = function (o) { - var state = [this._value, o]; - return this._scheduler === immediateScheduler ? - scheduleItem(null, state) : - this._scheduler.schedule(state, scheduleItem); - }; - - function scheduleItem(s, state) { - var value = state[0], observer = state[1]; - observer.onNext(value); - observer.onCompleted(); - return disposableEmpty; - } - - return JustObservable; - }(ObservableBase)); - - /** - * Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. - * There is an alias called 'just' or browsers 0) { - this.parent.handleSubscribe(this.parent.q.shift()); - } else { - this.parent.activeCount--; - this.parent.done && this.parent.activeCount === 0 && this.parent.o.onCompleted(); - } - }; - - return MergeObserver; - }(AbstractObserver)); - - /** - * Merges an observable sequence of observable sequences into an observable sequence, limiting the number of concurrent subscriptions to inner sequences. - * Or merges two observable sequences into a single observable sequence. - * @param {Mixed} [maxConcurrentOrOther] Maximum number of inner observable sequences being subscribed to concurrently or the second observable sequence. - * @returns {Observable} The observable sequence that merges the elements of the inner sequences. - */ - observableProto.merge = function (maxConcurrentOrOther) { - return typeof maxConcurrentOrOther !== 'number' ? - observableMerge(this, maxConcurrentOrOther) : - new MergeObservable(this, maxConcurrentOrOther); - }; - - /** - * Merges all the observable sequences into a single observable sequence. - * The scheduler is optional and if not specified, the immediate scheduler is used. - * @returns {Observable} The observable sequence that merges the elements of the observable sequences. - */ - var observableMerge = Observable.merge = function () { - var scheduler, sources = [], i, len = arguments.length; - if (!arguments[0]) { - scheduler = immediateScheduler; - for(i = 1; i < len; i++) { sources.push(arguments[i]); } - } else if (isScheduler(arguments[0])) { - scheduler = arguments[0]; - for(i = 1; i < len; i++) { sources.push(arguments[i]); } - } else { - scheduler = immediateScheduler; - for(i = 0; i < len; i++) { sources.push(arguments[i]); } - } - if (Array.isArray(sources[0])) { - sources = sources[0]; - } - return observableOf(scheduler, sources).mergeAll(); - }; - - var CompositeError = Rx.CompositeError = function(errors) { - this.innerErrors = errors; - this.message = 'This contains multiple errors. Check the innerErrors'; - Error.call(this); - }; - CompositeError.prototype = Object.create(Error.prototype); - CompositeError.prototype.name = 'CompositeError'; - - var MergeDelayErrorObservable = (function(__super__) { - inherits(MergeDelayErrorObservable, __super__); - function MergeDelayErrorObservable(source) { - this.source = source; - __super__.call(this); - } - - MergeDelayErrorObservable.prototype.subscribeCore = function (o) { - var group = new CompositeDisposable(), - m = new SingleAssignmentDisposable(), - state = { isStopped: false, errors: [], o: o }; - - group.add(m); - m.setDisposable(this.source.subscribe(new MergeDelayErrorObserver(group, state))); - - return group; - }; - - return MergeDelayErrorObservable; - }(ObservableBase)); - - var MergeDelayErrorObserver = (function(__super__) { - inherits(MergeDelayErrorObserver, __super__); - function MergeDelayErrorObserver(group, state) { - this._group = group; - this._state = state; - __super__.call(this); - } - - function setCompletion(o, errors) { - if (errors.length === 0) { - o.onCompleted(); - } else if (errors.length === 1) { - o.onError(errors[0]); - } else { - o.onError(new CompositeError(errors)); - } - } - - MergeDelayErrorObserver.prototype.next = function (x) { - var inner = new SingleAssignmentDisposable(); - this._group.add(inner); - - // Check for promises support - isPromise(x) && (x = observableFromPromise(x)); - inner.setDisposable(x.subscribe(new InnerObserver(inner, this._group, this._state))); - }; - - MergeDelayErrorObserver.prototype.error = function (e) { - this._state.errors.push(e); - this._state.isStopped = true; - this._group.length === 1 && setCompletion(this._state.o, this._state.errors); - }; - - MergeDelayErrorObserver.prototype.completed = function () { - this._state.isStopped = true; - this._group.length === 1 && setCompletion(this._state.o, this._state.errors); - }; - - inherits(InnerObserver, __super__); - function InnerObserver(inner, group, state) { - this._inner = inner; - this._group = group; - this._state = state; - __super__.call(this); - } - - InnerObserver.prototype.next = function (x) { this._state.o.onNext(x); }; - InnerObserver.prototype.error = function (e) { - this._state.errors.push(e); - this._group.remove(this._inner); - this._state.isStopped && this._group.length === 1 && setCompletion(this._state.o, this._state.errors); - }; - InnerObserver.prototype.completed = function () { - this._group.remove(this._inner); - this._state.isStopped && this._group.length === 1 && setCompletion(this._state.o, this._state.errors); - }; - - return MergeDelayErrorObserver; - }(AbstractObserver)); - - /** - * Flattens an Observable that emits Observables into one Observable, in a way that allows an Observer to - * receive all successfully emitted items from all of the source Observables without being interrupted by - * an error notification from one of them. - * - * This behaves like Observable.prototype.mergeAll except that if any of the merged Observables notify of an - * error via the Observer's onError, mergeDelayError will refrain from propagating that - * error notification until all of the merged Observables have finished emitting items. - * @param {Array | Arguments} args Arguments or an array to merge. - * @returns {Observable} an Observable that emits all of the items emitted by the Observables emitted by the Observable - */ - Observable.mergeDelayError = function() { - var args; - if (Array.isArray(arguments[0])) { - args = arguments[0]; - } else { - var len = arguments.length; - args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - } - var source = observableOf(null, args); - return new MergeDelayErrorObservable(source); - }; - - var MergeAllObservable = (function (__super__) { - inherits(MergeAllObservable, __super__); - - function MergeAllObservable(source) { - this.source = source; - __super__.call(this); - } - - MergeAllObservable.prototype.subscribeCore = function (o) { - var g = new CompositeDisposable(), m = new SingleAssignmentDisposable(); - g.add(m); - m.setDisposable(this.source.subscribe(new MergeAllObserver(o, g))); - return g; - }; - - return MergeAllObservable; - }(ObservableBase)); - - var MergeAllObserver = (function (__super__) { - function MergeAllObserver(o, g) { - this.o = o; - this.g = g; - this.done = false; - __super__.call(this); - } - - inherits(MergeAllObserver, __super__); - - MergeAllObserver.prototype.next = function(innerSource) { - var sad = new SingleAssignmentDisposable(); - this.g.add(sad); - isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); - sad.setDisposable(innerSource.subscribe(new InnerObserver(this, sad))); - }; - - MergeAllObserver.prototype.error = function (e) { - this.o.onError(e); - }; - - MergeAllObserver.prototype.completed = function () { - this.done = true; - this.g.length === 1 && this.o.onCompleted(); - }; - - function InnerObserver(parent, sad) { - this.parent = parent; - this.sad = sad; - __super__.call(this); - } - - inherits(InnerObserver, __super__); - - InnerObserver.prototype.next = function (x) { - this.parent.o.onNext(x); - }; - InnerObserver.prototype.error = function (e) { - this.parent.o.onError(e); - }; - InnerObserver.prototype.completed = function () { - this.parent.g.remove(this.sad); - this.parent.done && this.parent.g.length === 1 && this.parent.o.onCompleted(); - }; - - return MergeAllObserver; - }(AbstractObserver)); - - /** - * Merges an observable sequence of observable sequences into an observable sequence. - * @returns {Observable} The observable sequence that merges the elements of the inner sequences. - */ - observableProto.mergeAll = function () { - return new MergeAllObservable(this); - }; - - /** - * Continues an observable sequence that is terminated normally or by an exception with the next observable sequence. - * @param {Observable} second Second observable sequence used to produce results after the first sequence terminates. - * @returns {Observable} An observable sequence that concatenates the first and second sequence, even if the first sequence terminates exceptionally. - */ - observableProto.onErrorResumeNext = function (second) { - if (!second) { throw new Error('Second observable is required'); } - return onErrorResumeNext([this, second]); - }; - - var OnErrorResumeNextObservable = (function(__super__) { - inherits(OnErrorResumeNextObservable, __super__); - function OnErrorResumeNextObservable(sources) { - this.sources = sources; - __super__.call(this); - } - - function scheduleMethod(state, recurse) { - if (state.pos < state.sources.length) { - var current = state.sources[state.pos++]; - isPromise(current) && (current = observableFromPromise(current)); - var d = new SingleAssignmentDisposable(); - state.subscription.setDisposable(d); - d.setDisposable(current.subscribe(new OnErrorResumeNextObserver(state, recurse))); - } else { - state.o.onCompleted(); - } - } - - OnErrorResumeNextObservable.prototype.subscribeCore = function (o) { - var subscription = new SerialDisposable(), - state = {pos: 0, subscription: subscription, o: o, sources: this.sources }, - cancellable = immediateScheduler.scheduleRecursive(state, scheduleMethod); - - return new BinaryDisposable(subscription, cancellable); - }; - - return OnErrorResumeNextObservable; - }(ObservableBase)); - - var OnErrorResumeNextObserver = (function(__super__) { - inherits(OnErrorResumeNextObserver, __super__); - function OnErrorResumeNextObserver(state, recurse) { - this._state = state; - this._recurse = recurse; - __super__.call(this); - } - - OnErrorResumeNextObserver.prototype.next = function (x) { this._state.o.onNext(x); }; - OnErrorResumeNextObserver.prototype.error = function () { this._recurse(this._state); }; - OnErrorResumeNextObserver.prototype.completed = function () { this._recurse(this._state); }; - - return OnErrorResumeNextObserver; - }(AbstractObserver)); - - /** - * Continues an observable sequence that is terminated normally or by an exception with the next observable sequence. - * @returns {Observable} An observable sequence that concatenates the source sequences, even if a sequence terminates exceptionally. - */ - var onErrorResumeNext = Observable.onErrorResumeNext = function () { - var sources = []; - if (Array.isArray(arguments[0])) { - sources = arguments[0]; - } else { - var len = arguments.length; - sources = new Array(len); - for(var i = 0; i < len; i++) { sources[i] = arguments[i]; } - } - return new OnErrorResumeNextObservable(sources); - }; - - var SkipUntilObservable = (function(__super__) { - inherits(SkipUntilObservable, __super__); - - function SkipUntilObservable(source, other) { - this._s = source; - this._o = isPromise(other) ? observableFromPromise(other) : other; - this._open = false; - __super__.call(this); - } - - SkipUntilObservable.prototype.subscribeCore = function(o) { - var leftSubscription = new SingleAssignmentDisposable(); - leftSubscription.setDisposable(this._s.subscribe(new SkipUntilSourceObserver(o, this))); - - isPromise(this._o) && (this._o = observableFromPromise(this._o)); - - var rightSubscription = new SingleAssignmentDisposable(); - rightSubscription.setDisposable(this._o.subscribe(new SkipUntilOtherObserver(o, this, rightSubscription))); - - return new BinaryDisposable(leftSubscription, rightSubscription); - }; - - return SkipUntilObservable; - }(ObservableBase)); - - var SkipUntilSourceObserver = (function(__super__) { - inherits(SkipUntilSourceObserver, __super__); - function SkipUntilSourceObserver(o, p) { - this._o = o; - this._p = p; - __super__.call(this); - } - - SkipUntilSourceObserver.prototype.next = function (x) { - this._p._open && this._o.onNext(x); - }; - - SkipUntilSourceObserver.prototype.error = function (err) { - this._o.onError(err); - }; - - SkipUntilSourceObserver.prototype.onCompleted = function () { - this._p._open && this._o.onCompleted(); - }; - - return SkipUntilSourceObserver; - }(AbstractObserver)); - - var SkipUntilOtherObserver = (function(__super__) { - inherits(SkipUntilOtherObserver, __super__); - function SkipUntilOtherObserver(o, p, r) { - this._o = o; - this._p = p; - this._r = r; - __super__.call(this); - } - - SkipUntilOtherObserver.prototype.next = function () { - this._p._open = true; - this._r.dispose(); - }; - - SkipUntilOtherObserver.prototype.error = function (err) { - this._o.onError(err); - }; - - SkipUntilOtherObserver.prototype.onCompleted = function () { - this._r.dispose(); - }; - - return SkipUntilOtherObserver; - }(AbstractObserver)); - - /** - * Returns the values from the source observable sequence only after the other observable sequence produces a value. - * @param {Observable | Promise} other The observable sequence or Promise that triggers propagation of elements of the source sequence. - * @returns {Observable} An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation. - */ - observableProto.skipUntil = function (other) { - return new SkipUntilObservable(this, other); - }; - - var SwitchObservable = (function(__super__) { - inherits(SwitchObservable, __super__); - function SwitchObservable(source) { - this.source = source; - __super__.call(this); - } - - SwitchObservable.prototype.subscribeCore = function (o) { - var inner = new SerialDisposable(), s = this.source.subscribe(new SwitchObserver(o, inner)); - return new BinaryDisposable(s, inner); - }; - - inherits(SwitchObserver, AbstractObserver); - function SwitchObserver(o, inner) { - this.o = o; - this.inner = inner; - this.stopped = false; - this.latest = 0; - this.hasLatest = false; - AbstractObserver.call(this); - } - - SwitchObserver.prototype.next = function (innerSource) { - var d = new SingleAssignmentDisposable(), id = ++this.latest; - this.hasLatest = true; - this.inner.setDisposable(d); - isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); - d.setDisposable(innerSource.subscribe(new InnerObserver(this, id))); - }; - - SwitchObserver.prototype.error = function (e) { - this.o.onError(e); - }; - - SwitchObserver.prototype.completed = function () { - this.stopped = true; - !this.hasLatest && this.o.onCompleted(); - }; - - inherits(InnerObserver, AbstractObserver); - function InnerObserver(parent, id) { - this.parent = parent; - this.id = id; - AbstractObserver.call(this); - } - InnerObserver.prototype.next = function (x) { - this.parent.latest === this.id && this.parent.o.onNext(x); - }; - - InnerObserver.prototype.error = function (e) { - this.parent.latest === this.id && this.parent.o.onError(e); - }; - - InnerObserver.prototype.completed = function () { - if (this.parent.latest === this.id) { - this.parent.hasLatest = false; - this.parent.stopped && this.parent.o.onCompleted(); - } - }; - - return SwitchObservable; - }(ObservableBase)); - - /** - * Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - * @returns {Observable} The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - observableProto['switch'] = observableProto.switchLatest = function () { - return new SwitchObservable(this); - }; - - var TakeUntilObservable = (function(__super__) { - inherits(TakeUntilObservable, __super__); - - function TakeUntilObservable(source, other) { - this.source = source; - this.other = isPromise(other) ? observableFromPromise(other) : other; - __super__.call(this); - } - - TakeUntilObservable.prototype.subscribeCore = function(o) { - return new BinaryDisposable( - this.source.subscribe(o), - this.other.subscribe(new TakeUntilObserver(o)) - ); - }; - - return TakeUntilObservable; - }(ObservableBase)); - - var TakeUntilObserver = (function(__super__) { - inherits(TakeUntilObserver, __super__); - function TakeUntilObserver(o) { - this._o = o; - __super__.call(this); - } - - TakeUntilObserver.prototype.next = function () { - this._o.onCompleted(); - }; - - TakeUntilObserver.prototype.error = function (err) { - this._o.onError(err); - }; - - TakeUntilObserver.prototype.onCompleted = noop; - - return TakeUntilObserver; - }(AbstractObserver)); - - /** - * Returns the values from the source observable sequence until the other observable sequence produces a value. - * @param {Observable | Promise} other Observable sequence or Promise that terminates propagation of elements of the source sequence. - * @returns {Observable} An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. - */ - observableProto.takeUntil = function (other) { - return new TakeUntilObservable(this, other); - }; - - function falseFactory() { return false; } - function argumentsToArray() { - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - return args; - } - - var WithLatestFromObservable = (function(__super__) { - inherits(WithLatestFromObservable, __super__); - function WithLatestFromObservable(source, sources, resultSelector) { - this._s = source; - this._ss = sources; - this._cb = resultSelector; - __super__.call(this); - } - - WithLatestFromObservable.prototype.subscribeCore = function (o) { - var len = this._ss.length; - var state = { - hasValue: arrayInitialize(len, falseFactory), - hasValueAll: false, - values: new Array(len) - }; - - var n = this._ss.length, subscriptions = new Array(n + 1); - for (var i = 0; i < n; i++) { - var other = this._ss[i], sad = new SingleAssignmentDisposable(); - isPromise(other) && (other = observableFromPromise(other)); - sad.setDisposable(other.subscribe(new WithLatestFromOtherObserver(o, i, state))); - subscriptions[i] = sad; - } - - var outerSad = new SingleAssignmentDisposable(); - outerSad.setDisposable(this._s.subscribe(new WithLatestFromSourceObserver(o, this._cb, state))); - subscriptions[n] = outerSad; - - return new NAryDisposable(subscriptions); - }; - - return WithLatestFromObservable; - }(ObservableBase)); - - var WithLatestFromOtherObserver = (function (__super__) { - inherits(WithLatestFromOtherObserver, __super__); - function WithLatestFromOtherObserver(o, i, state) { - this._o = o; - this._i = i; - this._state = state; - __super__.call(this); - } - - WithLatestFromOtherObserver.prototype.next = function (x) { - this._state.values[this._i] = x; - this._state.hasValue[this._i] = true; - this._state.hasValueAll = this._state.hasValue.every(identity); - }; - - WithLatestFromOtherObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - WithLatestFromOtherObserver.prototype.completed = noop; - - return WithLatestFromOtherObserver; - }(AbstractObserver)); - - var WithLatestFromSourceObserver = (function (__super__) { - inherits(WithLatestFromSourceObserver, __super__); - function WithLatestFromSourceObserver(o, cb, state) { - this._o = o; - this._cb = cb; - this._state = state; - __super__.call(this); - } - - WithLatestFromSourceObserver.prototype.next = function (x) { - var allValues = [x].concat(this._state.values); - if (!this._state.hasValueAll) { return; } - var res = tryCatch(this._cb).apply(null, allValues); - if (res === errorObj) { return this._o.onError(res.e); } - this._o.onNext(res); - }; - - WithLatestFromSourceObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - WithLatestFromSourceObserver.prototype.completed = function () { - this._o.onCompleted(); - }; - - return WithLatestFromSourceObserver; - }(AbstractObserver)); - - /** - * Merges the specified observable sequences into one observable sequence by using the selector function only when the (first) source observable sequence produces an element. - * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - observableProto.withLatestFrom = function () { - if (arguments.length === 0) { throw new Error('invalid arguments'); } - - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; - Array.isArray(args[0]) && (args = args[0]); - - return new WithLatestFromObservable(this, args, resultSelector); - }; - - function falseFactory() { return false; } - function emptyArrayFactory() { return []; } - - var ZipObservable = (function(__super__) { - inherits(ZipObservable, __super__); - function ZipObservable(sources, resultSelector) { - this._s = sources; - this._cb = resultSelector; - __super__.call(this); - } - - ZipObservable.prototype.subscribeCore = function(observer) { - var n = this._s.length, - subscriptions = new Array(n), - done = arrayInitialize(n, falseFactory), - q = arrayInitialize(n, emptyArrayFactory); - - for (var i = 0; i < n; i++) { - var source = this._s[i], sad = new SingleAssignmentDisposable(); - subscriptions[i] = sad; - isPromise(source) && (source = observableFromPromise(source)); - sad.setDisposable(source.subscribe(new ZipObserver(observer, i, this, q, done))); - } - - return new NAryDisposable(subscriptions); - }; - - return ZipObservable; - }(ObservableBase)); - - var ZipObserver = (function (__super__) { - inherits(ZipObserver, __super__); - function ZipObserver(o, i, p, q, d) { - this._o = o; - this._i = i; - this._p = p; - this._q = q; - this._d = d; - __super__.call(this); - } - - function notEmpty(x) { return x.length > 0; } - function shiftEach(x) { return x.shift(); } - function notTheSame(i) { - return function (x, j) { - return j !== i; - }; - } - - ZipObserver.prototype.next = function (x) { - this._q[this._i].push(x); - if (this._q.every(notEmpty)) { - var queuedValues = this._q.map(shiftEach); - var res = tryCatch(this._p._cb).apply(null, queuedValues); - if (res === errorObj) { return this._o.onError(res.e); } - this._o.onNext(res); - } else if (this._d.filter(notTheSame(this._i)).every(identity)) { - this._o.onCompleted(); - } - }; - - ZipObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - ZipObserver.prototype.completed = function () { - this._d[this._i] = true; - this._d.every(identity) && this._o.onCompleted(); - }; - - return ZipObserver; - }(AbstractObserver)); - - /** - * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. - * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args. - * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. - */ - observableProto.zip = function () { - if (arguments.length === 0) { throw new Error('invalid arguments'); } - - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; - Array.isArray(args[0]) && (args = args[0]); - - var parent = this; - args.unshift(parent); - - return new ZipObservable(args, resultSelector); - }; - - /** - * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - * @param arguments Observable sources. - * @param {Function} resultSelector Function to invoke for each series of elements at corresponding indexes in the sources. - * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - Observable.zip = function () { - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - if (Array.isArray(args[0])) { - args = isFunction(args[1]) ? args[0].concat(args[1]) : args[0]; - } - var first = args.shift(); - return first.zip.apply(first, args); - }; - -function falseFactory() { return false; } -function emptyArrayFactory() { return []; } -function argumentsToArray() { - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - return args; -} - -var ZipIterableObservable = (function(__super__) { - inherits(ZipIterableObservable, __super__); - function ZipIterableObservable(sources, cb) { - this.sources = sources; - this._cb = cb; - __super__.call(this); - } - - ZipIterableObservable.prototype.subscribeCore = function (o) { - var sources = this.sources, len = sources.length, subscriptions = new Array(len); - - var state = { - q: arrayInitialize(len, emptyArrayFactory), - done: arrayInitialize(len, falseFactory), - cb: this._cb, - o: o - }; - - for (var i = 0; i < len; i++) { - (function (i) { - var source = sources[i], sad = new SingleAssignmentDisposable(); - (isArrayLike(source) || isIterable(source)) && (source = observableFrom(source)); - - subscriptions[i] = sad; - sad.setDisposable(source.subscribe(new ZipIterableObserver(state, i))); - }(i)); - } - - return new NAryDisposable(subscriptions); - }; - - return ZipIterableObservable; -}(ObservableBase)); - -var ZipIterableObserver = (function (__super__) { - inherits(ZipIterableObserver, __super__); - function ZipIterableObserver(s, i) { - this._s = s; - this._i = i; - __super__.call(this); - } - - function notEmpty(x) { return x.length > 0; } - function shiftEach(x) { return x.shift(); } - function notTheSame(i) { - return function (x, j) { - return j !== i; - }; - } - - ZipIterableObserver.prototype.next = function (x) { - this._s.q[this._i].push(x); - if (this._s.q.every(notEmpty)) { - var queuedValues = this._s.q.map(shiftEach), - res = tryCatch(this._s.cb).apply(null, queuedValues); - if (res === errorObj) { return this._s.o.onError(res.e); } - this._s.o.onNext(res); - } else if (this._s.done.filter(notTheSame(this._i)).every(identity)) { - this._s.o.onCompleted(); - } - }; - - ZipIterableObserver.prototype.error = function (e) { this._s.o.onError(e); }; - - ZipIterableObserver.prototype.completed = function () { - this._s.done[this._i] = true; - this._s.done.every(identity) && this._s.o.onCompleted(); - }; - - return ZipIterableObserver; -}(AbstractObserver)); - -/** - * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. - * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args. - * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. - */ -observableProto.zipIterable = function () { - if (arguments.length === 0) { throw new Error('invalid arguments'); } - - var len = arguments.length, args = new Array(len); - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - var resultSelector = isFunction(args[len - 1]) ? args.pop() : argumentsToArray; - - var parent = this; - args.unshift(parent); - return new ZipIterableObservable(args, resultSelector); -}; - - function asObservable(source) { - return function subscribe(o) { return source.subscribe(o); }; - } - - /** - * Hides the identity of an observable sequence. - * @returns {Observable} An observable sequence that hides the identity of the source sequence. - */ - observableProto.asObservable = function () { - return new AnonymousObservable(asObservable(this), this); - }; - - function toArray(x) { return x.toArray(); } - function notEmpty(x) { return x.length > 0; } - - /** - * Projects each element of an observable sequence into zero or more buffers which are produced based on element count information. - * @param {Number} count Length of each buffer. - * @param {Number} [skip] Number of elements to skip between creation of consecutive buffers. If not provided, defaults to the count. - * @returns {Observable} An observable sequence of buffers. - */ - observableProto.bufferWithCount = observableProto.bufferCount = function (count, skip) { - typeof skip !== 'number' && (skip = count); - return this.windowWithCount(count, skip) - .flatMap(toArray) - .filter(notEmpty); - }; - - var DematerializeObservable = (function (__super__) { - inherits(DematerializeObservable, __super__); - function DematerializeObservable(source) { - this.source = source; - __super__.call(this); - } - - DematerializeObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new DematerializeObserver(o)); - }; - - return DematerializeObservable; - }(ObservableBase)); - - var DematerializeObserver = (function (__super__) { - inherits(DematerializeObserver, __super__); - - function DematerializeObserver(o) { - this._o = o; - __super__.call(this); - } - - DematerializeObserver.prototype.next = function (x) { x.accept(this._o); }; - DematerializeObserver.prototype.error = function (e) { this._o.onError(e); }; - DematerializeObserver.prototype.completed = function () { this._o.onCompleted(); }; - - return DematerializeObserver; - }(AbstractObserver)); - - /** - * Dematerializes the explicit notification values of an observable sequence as implicit notifications. - * @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values. - */ - observableProto.dematerialize = function () { - return new DematerializeObservable(this); - }; - - var DistinctUntilChangedObservable = (function(__super__) { - inherits(DistinctUntilChangedObservable, __super__); - function DistinctUntilChangedObservable(source, keyFn, comparer) { - this.source = source; - this.keyFn = keyFn; - this.comparer = comparer; - __super__.call(this); - } - - DistinctUntilChangedObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new DistinctUntilChangedObserver(o, this.keyFn, this.comparer)); - }; - - return DistinctUntilChangedObservable; - }(ObservableBase)); - - var DistinctUntilChangedObserver = (function(__super__) { - inherits(DistinctUntilChangedObserver, __super__); - function DistinctUntilChangedObserver(o, keyFn, comparer) { - this.o = o; - this.keyFn = keyFn; - this.comparer = comparer; - this.hasCurrentKey = false; - this.currentKey = null; - __super__.call(this); - } - - DistinctUntilChangedObserver.prototype.next = function (x) { - var key = x, comparerEquals; - if (isFunction(this.keyFn)) { - key = tryCatch(this.keyFn)(x); - if (key === errorObj) { return this.o.onError(key.e); } - } - if (this.hasCurrentKey) { - comparerEquals = tryCatch(this.comparer)(this.currentKey, key); - if (comparerEquals === errorObj) { return this.o.onError(comparerEquals.e); } - } - if (!this.hasCurrentKey || !comparerEquals) { - this.hasCurrentKey = true; - this.currentKey = key; - this.o.onNext(x); - } - }; - DistinctUntilChangedObserver.prototype.error = function(e) { - this.o.onError(e); - }; - DistinctUntilChangedObserver.prototype.completed = function () { - this.o.onCompleted(); - }; - - return DistinctUntilChangedObserver; - }(AbstractObserver)); - - /** - * Returns an observable sequence that contains only distinct contiguous elements according to the keyFn and the comparer. - * @param {Function} [keyFn] A function to compute the comparison key for each element. If not provided, it projects the value. - * @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function. - * @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. - */ - observableProto.distinctUntilChanged = function (keyFn, comparer) { - comparer || (comparer = defaultComparer); - return new DistinctUntilChangedObservable(this, keyFn, comparer); - }; - - var TapObservable = (function(__super__) { - inherits(TapObservable,__super__); - function TapObservable(source, observerOrOnNext, onError, onCompleted) { - this.source = source; - this._oN = observerOrOnNext; - this._oE = onError; - this._oC = onCompleted; - __super__.call(this); - } - - TapObservable.prototype.subscribeCore = function(o) { - return this.source.subscribe(new InnerObserver(o, this)); - }; - - inherits(InnerObserver, AbstractObserver); - function InnerObserver(o, p) { - this.o = o; - this.t = !p._oN || isFunction(p._oN) ? - observerCreate(p._oN || noop, p._oE || noop, p._oC || noop) : - p._oN; - this.isStopped = false; - AbstractObserver.call(this); - } - InnerObserver.prototype.next = function(x) { - var res = tryCatch(this.t.onNext).call(this.t, x); - if (res === errorObj) { this.o.onError(res.e); } - this.o.onNext(x); - }; - InnerObserver.prototype.error = function(err) { - var res = tryCatch(this.t.onError).call(this.t, err); - if (res === errorObj) { return this.o.onError(res.e); } - this.o.onError(err); - }; - InnerObserver.prototype.completed = function() { - var res = tryCatch(this.t.onCompleted).call(this.t); - if (res === errorObj) { return this.o.onError(res.e); } - this.o.onCompleted(); - }; - - return TapObservable; - }(ObservableBase)); - - /** - * Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence. - * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. - * @param {Function | Observer} observerOrOnNext Action to invoke for each element in the observable sequence or an o. - * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. - * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. - * @returns {Observable} The source sequence with the side-effecting behavior applied. - */ - observableProto['do'] = observableProto.tap = observableProto.doAction = function (observerOrOnNext, onError, onCompleted) { - return new TapObservable(this, observerOrOnNext, onError, onCompleted); - }; - - /** - * Invokes an action for each element in the observable sequence. - * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. - * @param {Function} onNext Action to invoke for each element in the observable sequence. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Observable} The source sequence with the side-effecting behavior applied. - */ - observableProto.doOnNext = observableProto.tapOnNext = function (onNext, thisArg) { - return this.tap(typeof thisArg !== 'undefined' ? function (x) { onNext.call(thisArg, x); } : onNext); - }; - - /** - * Invokes an action upon exceptional termination of the observable sequence. - * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. - * @param {Function} onError Action to invoke upon exceptional termination of the observable sequence. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Observable} The source sequence with the side-effecting behavior applied. - */ - observableProto.doOnError = observableProto.tapOnError = function (onError, thisArg) { - return this.tap(noop, typeof thisArg !== 'undefined' ? function (e) { onError.call(thisArg, e); } : onError); - }; - - /** - * Invokes an action upon graceful termination of the observable sequence. - * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. - * @param {Function} onCompleted Action to invoke upon graceful termination of the observable sequence. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Observable} The source sequence with the side-effecting behavior applied. - */ - observableProto.doOnCompleted = observableProto.tapOnCompleted = function (onCompleted, thisArg) { - return this.tap(noop, null, typeof thisArg !== 'undefined' ? function () { onCompleted.call(thisArg); } : onCompleted); - }; - - var FinallyObservable = (function (__super__) { - inherits(FinallyObservable, __super__); - function FinallyObservable(source, fn, thisArg) { - this.source = source; - this._fn = bindCallback(fn, thisArg, 0); - __super__.call(this); - } - - FinallyObservable.prototype.subscribeCore = function (o) { - var d = tryCatch(this.source.subscribe).call(this.source, o); - if (d === errorObj) { - this._fn(); - thrower(d.e); - } - - return new FinallyDisposable(d, this._fn); - }; - - function FinallyDisposable(s, fn) { - this.isDisposed = false; - this._s = s; - this._fn = fn; - } - FinallyDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - var res = tryCatch(this._s.dispose).call(this._s); - this._fn(); - res === errorObj && thrower(res.e); - } - }; - - return FinallyObservable; - - }(ObservableBase)); - - /** - * Invokes a specified action after the source observable sequence terminates gracefully or exceptionally. - * @param {Function} finallyAction Action to invoke after the source observable sequence terminates. - * @returns {Observable} Source sequence with the action-invoking termination behavior applied. - */ - observableProto['finally'] = function (action, thisArg) { - return new FinallyObservable(this, action, thisArg); - }; - - var IgnoreElementsObservable = (function(__super__) { - inherits(IgnoreElementsObservable, __super__); - - function IgnoreElementsObservable(source) { - this.source = source; - __super__.call(this); - } - - IgnoreElementsObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new InnerObserver(o)); - }; - - function InnerObserver(o) { - this.o = o; - this.isStopped = false; - } - InnerObserver.prototype.onNext = noop; - InnerObserver.prototype.onError = function (err) { - if(!this.isStopped) { - this.isStopped = true; - this.o.onError(err); - } - }; - InnerObserver.prototype.onCompleted = function () { - if(!this.isStopped) { - this.isStopped = true; - this.o.onCompleted(); - } - }; - InnerObserver.prototype.dispose = function() { this.isStopped = true; }; - InnerObserver.prototype.fail = function (e) { - if (!this.isStopped) { - this.isStopped = true; - this.observer.onError(e); - return true; - } - - return false; - }; - - return IgnoreElementsObservable; - }(ObservableBase)); - - /** - * Ignores all elements in an observable sequence leaving only the termination messages. - * @returns {Observable} An empty observable sequence that signals termination, successful or exceptional, of the source sequence. - */ - observableProto.ignoreElements = function () { - return new IgnoreElementsObservable(this); - }; - - var MaterializeObservable = (function (__super__) { - inherits(MaterializeObservable, __super__); - function MaterializeObservable(source, fn) { - this.source = source; - __super__.call(this); - } - - MaterializeObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new MaterializeObserver(o)); - }; - - return MaterializeObservable; - }(ObservableBase)); - - var MaterializeObserver = (function (__super__) { - inherits(MaterializeObserver, __super__); - - function MaterializeObserver(o) { - this._o = o; - __super__.call(this); - } - - MaterializeObserver.prototype.next = function (x) { this._o.onNext(notificationCreateOnNext(x)) }; - MaterializeObserver.prototype.error = function (e) { this._o.onNext(notificationCreateOnError(e)); this._o.onCompleted(); }; - MaterializeObserver.prototype.completed = function () { this._o.onNext(notificationCreateOnCompleted()); this._o.onCompleted(); }; - - return MaterializeObserver; - }(AbstractObserver)); - - /** - * Materializes the implicit notifications of an observable sequence as explicit notification values. - * @returns {Observable} An observable sequence containing the materialized notification values from the source sequence. - */ - observableProto.materialize = function () { - return new MaterializeObservable(this); - }; - - /** - * Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely. - * @param {Number} [repeatCount] Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely. - * @returns {Observable} The observable sequence producing the elements of the given sequence repeatedly. - */ - observableProto.repeat = function (repeatCount) { - return enumerableRepeat(this, repeatCount).concat(); - }; - - /** - * Repeats the source observable sequence the specified number of times or until it successfully terminates. If the retry count is not specified, it retries indefinitely. - * Note if you encounter an error and want it to retry once, then you must use .retry(2); - * - * @example - * var res = retried = retry.repeat(); - * var res = retried = retry.repeat(2); - * @param {Number} [retryCount] Number of times to retry the sequence. If not provided, retry the sequence indefinitely. - * @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. - */ - observableProto.retry = function (retryCount) { - return enumerableRepeat(this, retryCount).catchError(); - }; - - function repeat(value) { - return { - '@@iterator': function () { - return { - next: function () { - return { done: false, value: value }; - } - }; - } - }; - } - - var RetryWhenObservable = (function(__super__) { - function createDisposable(state) { - return { - isDisposed: false, - dispose: function () { - if (!this.isDisposed) { - this.isDisposed = true; - state.isDisposed = true; - } - } - }; - } - - function RetryWhenObservable(source, notifier) { - this.source = source; - this._notifier = notifier; - __super__.call(this); - } - - inherits(RetryWhenObservable, __super__); - - RetryWhenObservable.prototype.subscribeCore = function (o) { - var exceptions = new Subject(), - notifier = new Subject(), - handled = this._notifier(exceptions), - notificationDisposable = handled.subscribe(notifier); - - var e = this.source['@@iterator'](); - - var state = { isDisposed: false }, - lastError, - subscription = new SerialDisposable(); - var cancelable = currentThreadScheduler.scheduleRecursive(null, function (_, recurse) { - if (state.isDisposed) { return; } - var currentItem = e.next(); - - if (currentItem.done) { - if (lastError) { - o.onError(lastError); - } else { - o.onCompleted(); - } - return; - } - - // Check if promise - var currentValue = currentItem.value; - isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); - - var outer = new SingleAssignmentDisposable(); - var inner = new SingleAssignmentDisposable(); - subscription.setDisposable(new BinaryDisposable(inner, outer)); - outer.setDisposable(currentValue.subscribe( - function(x) { o.onNext(x); }, - function (exn) { - inner.setDisposable(notifier.subscribe(recurse, function(ex) { - o.onError(ex); - }, function() { - o.onCompleted(); - })); - - exceptions.onNext(exn); - outer.dispose(); - }, - function() { o.onCompleted(); })); - }); - - return new NAryDisposable([notificationDisposable, subscription, cancelable, createDisposable(state)]); - }; - - return RetryWhenObservable; - }(ObservableBase)); - - observableProto.retryWhen = function (notifier) { - return new RetryWhenObservable(repeat(this), notifier); - }; - - function repeat(value) { - return { - '@@iterator': function () { - return { - next: function () { - return { done: false, value: value }; - } - }; - } - }; - } - - var RepeatWhenObservable = (function(__super__) { - function createDisposable(state) { - return { - isDisposed: false, - dispose: function () { - if (!this.isDisposed) { - this.isDisposed = true; - state.isDisposed = true; - } - } - }; - } - - function RepeatWhenObservable(source, notifier) { - this.source = source; - this._notifier = notifier; - __super__.call(this); - } - - inherits(RepeatWhenObservable, __super__); - - RepeatWhenObservable.prototype.subscribeCore = function (o) { - var completions = new Subject(), - notifier = new Subject(), - handled = this._notifier(completions), - notificationDisposable = handled.subscribe(notifier); - - var e = this.source['@@iterator'](); - - var state = { isDisposed: false }, - lastError, - subscription = new SerialDisposable(); - var cancelable = currentThreadScheduler.scheduleRecursive(null, function (_, recurse) { - if (state.isDisposed) { return; } - var currentItem = e.next(); - - if (currentItem.done) { - if (lastError) { - o.onError(lastError); - } else { - o.onCompleted(); - } - return; - } - - // Check if promise - var currentValue = currentItem.value; - isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); - - var outer = new SingleAssignmentDisposable(); - var inner = new SingleAssignmentDisposable(); - subscription.setDisposable(new BinaryDisposable(inner, outer)); - outer.setDisposable(currentValue.subscribe( - function(x) { o.onNext(x); }, - function (exn) { o.onError(exn); }, - function() { - inner.setDisposable(notifier.subscribe(recurse, function(ex) { - o.onError(ex); - }, function() { - o.onCompleted(); - })); - - completions.onNext(null); - outer.dispose(); - })); - }); - - return new NAryDisposable([notificationDisposable, subscription, cancelable, createDisposable(state)]); - }; - - return RepeatWhenObservable; - }(ObservableBase)); - - observableProto.repeatWhen = function (notifier) { - return new RepeatWhenObservable(repeat(this), notifier); - }; - - var ScanObservable = (function(__super__) { - inherits(ScanObservable, __super__); - function ScanObservable(source, accumulator, hasSeed, seed) { - this.source = source; - this.accumulator = accumulator; - this.hasSeed = hasSeed; - this.seed = seed; - __super__.call(this); - } - - ScanObservable.prototype.subscribeCore = function(o) { - return this.source.subscribe(new ScanObserver(o,this)); - }; - - return ScanObservable; - }(ObservableBase)); - - var ScanObserver = (function (__super__) { - inherits(ScanObserver, __super__); - function ScanObserver(o, parent) { - this._o = o; - this._p = parent; - this._fn = parent.accumulator; - this._hs = parent.hasSeed; - this._s = parent.seed; - this._ha = false; - this._a = null; - this._hv = false; - this._i = 0; - __super__.call(this); - } - - ScanObserver.prototype.next = function (x) { - !this._hv && (this._hv = true); - if (this._ha) { - this._a = tryCatch(this._fn)(this._a, x, this._i, this._p); - } else { - this._a = this._hs ? tryCatch(this._fn)(this._s, x, this._i, this._p) : x; - this._ha = true; - } - if (this._a === errorObj) { return this._o.onError(this._a.e); } - this._o.onNext(this._a); - this._i++; - }; - - ScanObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - ScanObserver.prototype.completed = function () { - !this._hv && this._hs && this._o.onNext(this._s); - this._o.onCompleted(); - }; - - return ScanObserver; - }(AbstractObserver)); - - /** - * Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value. - * For aggregation behavior with no intermediate results, see Observable.aggregate. - * @param {Mixed} [seed] The initial accumulator value. - * @param {Function} accumulator An accumulator function to be invoked on each element. - * @returns {Observable} An observable sequence containing the accumulated values. - */ - observableProto.scan = function () { - var hasSeed = false, seed, accumulator = arguments[0]; - if (arguments.length === 2) { - hasSeed = true; - seed = arguments[1]; - } - return new ScanObservable(this, accumulator, hasSeed, seed); - }; - - var SkipLastObservable = (function (__super__) { - inherits(SkipLastObservable, __super__); - function SkipLastObservable(source, c) { - this.source = source; - this._c = c; - __super__.call(this); - } - - SkipLastObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new SkipLastObserver(o, this._c)); - }; - - return SkipLastObservable; - }(ObservableBase)); - - var SkipLastObserver = (function (__super__) { - inherits(SkipLastObserver, __super__); - function SkipLastObserver(o, c) { - this._o = o; - this._c = c; - this._q = []; - __super__.call(this); - } - - SkipLastObserver.prototype.next = function (x) { - this._q.push(x); - this._q.length > this._c && this._o.onNext(this._q.shift()); - }; - - SkipLastObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - SkipLastObserver.prototype.completed = function () { - this._o.onCompleted(); - }; - - return SkipLastObserver; - }(AbstractObserver)); - - /** - * Bypasses a specified number of elements at the end of an observable sequence. - * @description - * This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are - * received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. - * @param count Number of elements to bypass at the end of the source sequence. - * @returns {Observable} An observable sequence containing the source sequence elements except for the bypassed ones at the end. - */ - observableProto.skipLast = function (count) { - if (count < 0) { throw new ArgumentOutOfRangeError(); } - return new SkipLastObservable(this, count); - }; - - /** - * Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend. - * @example - * var res = source.startWith(1, 2, 3); - * var res = source.startWith(Rx.Scheduler.timeout, 1, 2, 3); - * @param {Arguments} args The specified values to prepend to the observable sequence - * @returns {Observable} The source sequence prepended with the specified values. - */ - observableProto.startWith = function () { - var values, scheduler, start = 0; - if (!!arguments.length && isScheduler(arguments[0])) { - scheduler = arguments[0]; - start = 1; - } else { - scheduler = immediateScheduler; - } - for(var args = [], i = start, len = arguments.length; i < len; i++) { args.push(arguments[i]); } - return observableConcat.apply(null, [observableFromArray(args, scheduler), this]); - }; - - var TakeLastObserver = (function (__super__) { - inherits(TakeLastObserver, __super__); - function TakeLastObserver(o, c) { - this._o = o; - this._c = c; - this._q = []; - __super__.call(this); - } - - TakeLastObserver.prototype.next = function (x) { - this._q.push(x); - this._q.length > this._c && this._q.shift(); - }; - - TakeLastObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - TakeLastObserver.prototype.completed = function () { - while (this._q.length > 0) { this._o.onNext(this._q.shift()); } - this._o.onCompleted(); - }; - - return TakeLastObserver; - }(AbstractObserver)); - - /** - * Returns a specified number of contiguous elements from the end of an observable sequence. - * @description - * This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of - * the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. - * @param {Number} count Number of elements to take from the end of the source sequence. - * @returns {Observable} An observable sequence containing the specified number of elements from the end of the source sequence. - */ - observableProto.takeLast = function (count) { - if (count < 0) { throw new ArgumentOutOfRangeError(); } - var source = this; - return new AnonymousObservable(function (o) { - return source.subscribe(new TakeLastObserver(o, count)); - }, source); - }; - - var TakeLastBufferObserver = (function (__super__) { - inherits(TakeLastBufferObserver, __super__); - function TakeLastBufferObserver(o, c) { - this._o = o; - this._c = c; - this._q = []; - __super__.call(this); - } - - TakeLastBufferObserver.prototype.next = function (x) { - this._q.push(x); - this._q.length > this._c && this._q.shift(); - }; - - TakeLastBufferObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - TakeLastBufferObserver.prototype.completed = function () { - this._o.onNext(this._q); - this._o.onCompleted(); - }; - - return TakeLastBufferObserver; - }(AbstractObserver)); - - /** - * Returns an array with the specified number of contiguous elements from the end of an observable sequence. - * - * @description - * This operator accumulates a buffer with a length enough to store count elements. Upon completion of the - * source sequence, this buffer is produced on the result sequence. - * @param {Number} count Number of elements to take from the end of the source sequence. - * @returns {Observable} An observable sequence containing a single array with the specified number of elements from the end of the source sequence. - */ - observableProto.takeLastBuffer = function (count) { - if (count < 0) { throw new ArgumentOutOfRangeError(); } - var source = this; - return new AnonymousObservable(function (o) { - return source.subscribe(new TakeLastBufferObserver(o, count)); - }, source); - }; - - /** - * Projects each element of an observable sequence into zero or more windows which are produced based on element count information. - * @param {Number} count Length of each window. - * @param {Number} [skip] Number of elements to skip between creation of consecutive windows. If not specified, defaults to the count. - * @returns {Observable} An observable sequence of windows. - */ - observableProto.windowWithCount = observableProto.windowCount = function (count, skip) { - var source = this; - +count || (count = 0); - Math.abs(count) === Infinity && (count = 0); - if (count <= 0) { throw new ArgumentOutOfRangeError(); } - skip == null && (skip = count); - +skip || (skip = 0); - Math.abs(skip) === Infinity && (skip = 0); - - if (skip <= 0) { throw new ArgumentOutOfRangeError(); } - return new AnonymousObservable(function (observer) { - var m = new SingleAssignmentDisposable(), - refCountDisposable = new RefCountDisposable(m), - n = 0, - q = []; - - function createWindow () { - var s = new Subject(); - q.push(s); - observer.onNext(addRef(s, refCountDisposable)); - } - - createWindow(); - - m.setDisposable(source.subscribe( - function (x) { - for (var i = 0, len = q.length; i < len; i++) { q[i].onNext(x); } - var c = n - count + 1; - c >= 0 && c % skip === 0 && q.shift().onCompleted(); - ++n % skip === 0 && createWindow(); - }, - function (e) { - while (q.length > 0) { q.shift().onError(e); } - observer.onError(e); - }, - function () { - while (q.length > 0) { q.shift().onCompleted(); } - observer.onCompleted(); - } - )); - return refCountDisposable; - }, source); - }; - -observableProto.flatMapConcat = observableProto.concatMap = function(selector, resultSelector, thisArg) { - return new FlatMapObservable(this, selector, resultSelector, thisArg).merge(1); -}; - /** - * Projects each notification of an observable sequence to an observable sequence and concats the resulting observable sequences into one observable sequence. - * @param {Function} onNext A transform function to apply to each element; the second parameter of the function represents the index of the source element. - * @param {Function} onError A transform function to apply when an error occurs in the source sequence. - * @param {Function} onCompleted A transform function to apply when the end of the source sequence is reached. - * @param {Any} [thisArg] An optional "this" to use to invoke each transform. - * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence. - */ - observableProto.concatMapObserver = observableProto.selectConcatObserver = function(onNext, onError, onCompleted, thisArg) { - var source = this, - onNextFunc = bindCallback(onNext, thisArg, 2), - onErrorFunc = bindCallback(onError, thisArg, 1), - onCompletedFunc = bindCallback(onCompleted, thisArg, 0); - return new AnonymousObservable(function (observer) { - var index = 0; - return source.subscribe( - function (x) { - var result; - try { - result = onNextFunc(x, index++); - } catch (e) { - observer.onError(e); - return; - } - isPromise(result) && (result = observableFromPromise(result)); - observer.onNext(result); - }, - function (err) { - var result; - try { - result = onErrorFunc(err); - } catch (e) { - observer.onError(e); - return; - } - isPromise(result) && (result = observableFromPromise(result)); - observer.onNext(result); - observer.onCompleted(); - }, - function () { - var result; - try { - result = onCompletedFunc(); - } catch (e) { - observer.onError(e); - return; - } - isPromise(result) && (result = observableFromPromise(result)); - observer.onNext(result); - observer.onCompleted(); - }); - }, this).concatAll(); - }; - - var DefaultIfEmptyObserver = (function (__super__) { - inherits(DefaultIfEmptyObserver, __super__); - function DefaultIfEmptyObserver(o, d) { - this._o = o; - this._d = d; - this._f = false; - __super__.call(this); - } - - DefaultIfEmptyObserver.prototype.next = function (x) { - this._f = true; - this._o.onNext(x); - }; - - DefaultIfEmptyObserver.prototype.error = function (e) { - this._o.onError(e); - }; - - DefaultIfEmptyObserver.prototype.completed = function () { - !this._f && this._o.onNext(this._d); - this._o.onCompleted(); - }; - - return DefaultIfEmptyObserver; - }(AbstractObserver)); - - /** - * Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty. - * - * var res = obs = xs.defaultIfEmpty(); - * 2 - obs = xs.defaultIfEmpty(false); - * - * @memberOf Observable# - * @param defaultValue The value to return if the sequence is empty. If not provided, this defaults to null. - * @returns {Observable} An observable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself. - */ - observableProto.defaultIfEmpty = function (defaultValue) { - var source = this; - defaultValue === undefined && (defaultValue = null); - return new AnonymousObservable(function (o) { - return source.subscribe(new DefaultIfEmptyObserver(o, defaultValue)); - }, source); - }; - - // Swap out for Array.findIndex - function arrayIndexOfComparer(array, item, comparer) { - for (var i = 0, len = array.length; i < len; i++) { - if (comparer(array[i], item)) { return i; } - } - return -1; - } - - function HashSet(comparer) { - this.comparer = comparer; - this.set = []; - } - HashSet.prototype.push = function(value) { - var retValue = arrayIndexOfComparer(this.set, value, this.comparer) === -1; - retValue && this.set.push(value); - return retValue; - }; - - var DistinctObservable = (function (__super__) { - inherits(DistinctObservable, __super__); - function DistinctObservable(source, keyFn, cmpFn) { - this.source = source; - this._keyFn = keyFn; - this._cmpFn = cmpFn; - __super__.call(this); - } - - DistinctObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new DistinctObserver(o, this._keyFn, this._cmpFn)); - }; - - return DistinctObservable; - }(ObservableBase)); - - var DistinctObserver = (function (__super__) { - inherits(DistinctObserver, __super__); - function DistinctObserver(o, keyFn, cmpFn) { - this._o = o; - this._keyFn = keyFn; - this._h = new HashSet(cmpFn); - __super__.call(this); - } - - DistinctObserver.prototype.next = function (x) { - var key = x; - if (isFunction(this._keyFn)) { - key = tryCatch(this._keyFn)(x); - if (key === errorObj) { return this._o.onError(key.e); } - } - this._h.push(key) && this._o.onNext(x); - }; - - DistinctObserver.prototype.error = function (e) { this._o.onError(e); }; - DistinctObserver.prototype.completed = function () { this._o.onCompleted(); }; - - return DistinctObserver; - }(AbstractObserver)); - - /** - * Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. - * Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large. - * - * @example - * var res = obs = xs.distinct(); - * 2 - obs = xs.distinct(function (x) { return x.id; }); - * 2 - obs = xs.distinct(function (x) { return x.id; }, function (a,b) { return a === b; }); - * @param {Function} [keySelector] A function to compute the comparison key for each element. - * @param {Function} [comparer] Used to compare items in the collection. - * @returns {Observable} An observable sequence only containing the distinct elements, based on a computed key value, from the source sequence. - */ - observableProto.distinct = function (keySelector, comparer) { - comparer || (comparer = defaultComparer); - return new DistinctObservable(this, keySelector, comparer); - }; - - var MapObservable = (function (__super__) { - inherits(MapObservable, __super__); - - function MapObservable(source, selector, thisArg) { - this.source = source; - this.selector = bindCallback(selector, thisArg, 3); - __super__.call(this); - } - - function innerMap(selector, self) { - return function (x, i, o) { return selector.call(this, self.selector(x, i, o), i, o); }; - } - - MapObservable.prototype.internalMap = function (selector, thisArg) { - return new MapObservable(this.source, innerMap(selector, this), thisArg); - }; - - MapObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new InnerObserver(o, this.selector, this)); - }; - - inherits(InnerObserver, AbstractObserver); - function InnerObserver(o, selector, source) { - this.o = o; - this.selector = selector; - this.source = source; - this.i = 0; - AbstractObserver.call(this); - } - - InnerObserver.prototype.next = function(x) { - var result = tryCatch(this.selector)(x, this.i++, this.source); - if (result === errorObj) { return this.o.onError(result.e); } - this.o.onNext(result); - }; - - InnerObserver.prototype.error = function (e) { - this.o.onError(e); - }; - - InnerObserver.prototype.completed = function () { - this.o.onCompleted(); - }; - - return MapObservable; - - }(ObservableBase)); - - /** - * Projects each element of an observable sequence into a new form by incorporating the element's index. - * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source. - */ - observableProto.map = observableProto.select = function (selector, thisArg) { - var selectorFn = typeof selector === 'function' ? selector : function () { return selector; }; - return this instanceof MapObservable ? - this.internalMap(selectorFn, thisArg) : - new MapObservable(this, selectorFn, thisArg); - }; - - function plucker(args, len) { - return function mapper(x) { - var currentProp = x; - for (var i = 0; i < len; i++) { - var p = currentProp[args[i]]; - if (typeof p !== 'undefined') { - currentProp = p; - } else { - return undefined; - } - } - return currentProp; - }; - } - - /** - * Retrieves the value of a specified nested property from all elements in - * the Observable sequence. - * @param {Arguments} arguments The nested properties to pluck. - * @returns {Observable} Returns a new Observable sequence of property values. - */ - observableProto.pluck = function () { - var len = arguments.length, args = new Array(len); - if (len === 0) { throw new Error('List of properties cannot be empty.'); } - for(var i = 0; i < len; i++) { args[i] = arguments[i]; } - return this.map(plucker(args, len)); - }; - - /** - * Projects each notification of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - * @param {Function} onNext A transform function to apply to each element; the second parameter of the function represents the index of the source element. - * @param {Function} onError A transform function to apply when an error occurs in the source sequence. - * @param {Function} onCompleted A transform function to apply when the end of the source sequence is reached. - * @param {Any} [thisArg] An optional "this" to use to invoke each transform. - * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function corresponding to each notification in the input sequence. - */ - observableProto.flatMapObserver = observableProto.selectManyObserver = function (onNext, onError, onCompleted, thisArg) { - var source = this; - return new AnonymousObservable(function (observer) { - var index = 0; - - return source.subscribe( - function (x) { - var result; - try { - result = onNext.call(thisArg, x, index++); - } catch (e) { - observer.onError(e); - return; - } - isPromise(result) && (result = observableFromPromise(result)); - observer.onNext(result); - }, - function (err) { - var result; - try { - result = onError.call(thisArg, err); - } catch (e) { - observer.onError(e); - return; - } - isPromise(result) && (result = observableFromPromise(result)); - observer.onNext(result); - observer.onCompleted(); - }, - function () { - var result; - try { - result = onCompleted.call(thisArg); - } catch (e) { - observer.onError(e); - return; - } - isPromise(result) && (result = observableFromPromise(result)); - observer.onNext(result); - observer.onCompleted(); - }); - }, source).mergeAll(); - }; - -observableProto.flatMap = observableProto.selectMany = observableProto.mergeMap = function(selector, resultSelector, thisArg) { - return new FlatMapObservable(this, selector, resultSelector, thisArg).mergeAll(); -}; - -observableProto.flatMapLatest = observableProto.switchMap = function(selector, resultSelector, thisArg) { - return new FlatMapObservable(this, selector, resultSelector, thisArg).switchLatest(); -}; - - var SkipObservable = (function(__super__) { - inherits(SkipObservable, __super__); - function SkipObservable(source, count) { - this.source = source; - this._count = count; - __super__.call(this); - } - - SkipObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new SkipObserver(o, this._count)); - }; - - function SkipObserver(o, c) { - this._o = o; - this._r = c; - AbstractObserver.call(this); - } - - inherits(SkipObserver, AbstractObserver); - - SkipObserver.prototype.next = function (x) { - if (this._r <= 0) { - this._o.onNext(x); - } else { - this._r--; - } - }; - SkipObserver.prototype.error = function(e) { this._o.onError(e); }; - SkipObserver.prototype.completed = function() { this._o.onCompleted(); }; - - return SkipObservable; - }(ObservableBase)); - - /** - * Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. - * @param {Number} count The number of elements to skip before returning the remaining elements. - * @returns {Observable} An observable sequence that contains the elements that occur after the specified index in the input sequence. - */ - observableProto.skip = function (count) { - if (count < 0) { throw new ArgumentOutOfRangeError(); } - return new SkipObservable(this, count); - }; - - var SkipWhileObservable = (function (__super__) { - inherits(SkipWhileObservable, __super__); - function SkipWhileObservable(source, fn) { - this.source = source; - this._fn = fn; - __super__.call(this); - } - - SkipWhileObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new SkipWhileObserver(o, this)); - }; - - return SkipWhileObservable; - }(ObservableBase)); - - var SkipWhileObserver = (function (__super__) { - inherits(SkipWhileObserver, __super__); - - function SkipWhileObserver(o, p) { - this._o = o; - this._p = p; - this._i = 0; - this._r = false; - __super__.call(this); - } - - SkipWhileObserver.prototype.next = function (x) { - if (!this._r) { - var res = tryCatch(this._p._fn)(x, this._i++, this._p); - if (res === errorObj) { return this._o.onError(res.e); } - this._r = !res; - } - this._r && this._o.onNext(x); - }; - SkipWhileObserver.prototype.error = function (e) { this._o.onError(e); }; - SkipWhileObserver.prototype.completed = function () { this._o.onCompleted(); }; - - return SkipWhileObserver; - }(AbstractObserver)); - - /** - * Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - * The element's index is used in the logic of the predicate function. - * - * var res = source.skipWhile(function (value) { return value < 10; }); - * var res = source.skipWhile(function (value, index) { return value < 10 || index < 10; }); - * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element. - * @param {Any} [thisArg] Object to use as this when executing callback. - * @returns {Observable} An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - observableProto.skipWhile = function (predicate, thisArg) { - var fn = bindCallback(predicate, thisArg, 3); - return new SkipWhileObservable(this, fn); - }; - - var TakeObservable = (function(__super__) { - inherits(TakeObservable, __super__); - function TakeObservable(source, count) { - this.source = source; - this._count = count; - __super__.call(this); - } - - TakeObservable.prototype.subscribeCore = function (o) { - return this.source.subscribe(new TakeObserver(o, this._count)); - }; - - function TakeObserver(o, c) { - this._o = o; - this._c = c; - this._r = c; - AbstractObserver.call(this); - } - - inherits(TakeObserver, AbstractObserver); - - TakeObserver.prototype.next = function (x) { - if (this._r-- > 0) { - this._o.onNext(x); - this._r <= 0 && this._o.onCompleted(); - } - }; - - TakeObserver.prototype.error = function (e) { this._o.onError(e); }; - TakeObserver.prototype.completed = function () { this._o.onCompleted(); }; - - return TakeObservable; - }(ObservableBase)); - - /** - * Returns a specified number of contiguous elements from the start of an observable sequence, using the specified scheduler for the edge case of take(0). - * @param {Number} count The number of elements to return. - * @param {Scheduler} [scheduler] Scheduler used to produce an OnCompleted message in case = _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var Resolver = _ref; + + if (Resolver.isVersion(pattern)) { + return Resolver; + } + } + return null; +} + +// + +var hostedGit = exports.hostedGit = { + github: (_githubResolver || _load_githubResolver()).default, + gitlab: (_gitlabResolver || _load_gitlabResolver()).default, + bitbucket: (_bitbucketResolver || _load_bitbucketResolver()).default +}; + +function hostedGitFragmentToGitUrl(fragment, reporter) { + for (var key in hostedGit) { + var Resolver = hostedGit[key]; + if (Resolver.isVersion(fragment)) { + return Resolver.getGitHTTPUrl((0, (_hostedGitResolver || _load_hostedGitResolver()).explodeHostedGitFragment)(fragment, reporter)); + } + } + + return fragment; +} + +// + +for (var key in registries) { + var _class, _temp; + + var RegistryResolver = registries[key]; + + exotics.add((_temp = _class = function (_ExoticRegistryResolv) { + (0, (_inherits2 || _load_inherits()).default)(_class, _ExoticRegistryResolv); + + function _class() { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, _class); + return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _ExoticRegistryResolv.apply(this, arguments)); + } + + return _class; + }((_registryResolver || _load_registryResolver()).default), _class.protocol = key, _class.factory = RegistryResolver, _temp)); +} + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(56); +var IE8_DOM_DEFINE = __webpack_require__(330); +var toPrimitive = __webpack_require__(222); +var dP = Object.defineProperty; + +exports.f = __webpack_require__(68) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), +/* 64 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = from; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isPromise__ = __webpack_require__(409); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isArrayLike__ = __webpack_require__(406); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isInteropObservable__ = __webpack_require__(969); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_isIterable__ = __webpack_require__(970); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__fromArray__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__fromPromise__ = __webpack_require__(871); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__fromIterable__ = __webpack_require__(869); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__fromObservable__ = __webpack_require__(870); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_subscribeTo__ = __webpack_require__(410); +/** PURE_IMPORTS_START _Observable,_util_isPromise,_util_isArrayLike,_util_isInteropObservable,_util_isIterable,_fromArray,_fromPromise,_fromIterable,_fromObservable,_util_subscribeTo PURE_IMPORTS_END */ + + + + + + + + + + +function from(input, scheduler) { + if (!scheduler) { + if (input instanceof __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */]) { + return input; + } + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_9__util_subscribeTo__["a" /* subscribeTo */])(input)); + } + if (input != null) { + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_isInteropObservable__["a" /* isInteropObservable */])(input)) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__fromObservable__["a" /* fromObservable */])(input, scheduler); + } + else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isPromise__["a" /* isPromise */])(input)) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__fromPromise__["a" /* fromPromise */])(input, scheduler); + } + else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isArrayLike__["a" /* isArrayLike */])(input)) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__fromArray__["a" /* fromArray */])(input, scheduler); + } + else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_isIterable__["a" /* isIterable */])(input) || typeof input === 'string') { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__fromIterable__["a" /* fromIterable */])(input, scheduler); + } + } + throw new TypeError((input !== null && typeof input || input) + ' is not observable'); +} +//# sourceMappingURL=from.js.map + + +/***/ }), +/* 65 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_operators_audit__ = __webpack_require__(392); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_operators_audit__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__internal_operators_auditTime__ = __webpack_require__(879); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return __WEBPACK_IMPORTED_MODULE_1__internal_operators_auditTime__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_operators_buffer__ = __webpack_require__(880); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return __WEBPACK_IMPORTED_MODULE_2__internal_operators_buffer__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__internal_operators_bufferCount__ = __webpack_require__(881); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return __WEBPACK_IMPORTED_MODULE_3__internal_operators_bufferCount__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_operators_bufferTime__ = __webpack_require__(882); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_operators_bufferTime__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__internal_operators_bufferToggle__ = __webpack_require__(883); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_operators_bufferToggle__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_operators_bufferWhen__ = __webpack_require__(884); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return __WEBPACK_IMPORTED_MODULE_6__internal_operators_bufferWhen__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_operators_catchError__ = __webpack_require__(885); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return __WEBPACK_IMPORTED_MODULE_7__internal_operators_catchError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__internal_operators_combineAll__ = __webpack_require__(886); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return __WEBPACK_IMPORTED_MODULE_8__internal_operators_combineAll__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__internal_operators_combineLatest__ = __webpack_require__(887); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return __WEBPACK_IMPORTED_MODULE_9__internal_operators_combineLatest__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__internal_operators_concat__ = __webpack_require__(888); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return __WEBPACK_IMPORTED_MODULE_10__internal_operators_concat__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__internal_operators_concatAll__ = __webpack_require__(393); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return __WEBPACK_IMPORTED_MODULE_11__internal_operators_concatAll__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__internal_operators_concatMap__ = __webpack_require__(394); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return __WEBPACK_IMPORTED_MODULE_12__internal_operators_concatMap__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__internal_operators_concatMapTo__ = __webpack_require__(889); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return __WEBPACK_IMPORTED_MODULE_13__internal_operators_concatMapTo__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__internal_operators_count__ = __webpack_require__(890); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return __WEBPACK_IMPORTED_MODULE_14__internal_operators_count__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__internal_operators_debounce__ = __webpack_require__(891); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_operators_debounce__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_operators_debounceTime__ = __webpack_require__(892); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_operators_debounceTime__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__ = __webpack_require__(129); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_operators_defaultIfEmpty__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_operators_delay__ = __webpack_require__(893); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_operators_delay__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__internal_operators_delayWhen__ = __webpack_require__(894); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return __WEBPACK_IMPORTED_MODULE_19__internal_operators_delayWhen__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__internal_operators_dematerialize__ = __webpack_require__(895); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return __WEBPACK_IMPORTED_MODULE_20__internal_operators_dematerialize__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__internal_operators_distinct__ = __webpack_require__(896); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return __WEBPACK_IMPORTED_MODULE_21__internal_operators_distinct__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_operators_distinctUntilChanged__ = __webpack_require__(395); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return __WEBPACK_IMPORTED_MODULE_22__internal_operators_distinctUntilChanged__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_operators_distinctUntilKeyChanged__ = __webpack_require__(897); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return __WEBPACK_IMPORTED_MODULE_23__internal_operators_distinctUntilKeyChanged__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__internal_operators_elementAt__ = __webpack_require__(898); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return __WEBPACK_IMPORTED_MODULE_24__internal_operators_elementAt__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__internal_operators_endWith__ = __webpack_require__(899); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return __WEBPACK_IMPORTED_MODULE_25__internal_operators_endWith__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__internal_operators_every__ = __webpack_require__(900); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return __WEBPACK_IMPORTED_MODULE_26__internal_operators_every__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__internal_operators_exhaust__ = __webpack_require__(901); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return __WEBPACK_IMPORTED_MODULE_27__internal_operators_exhaust__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_operators_exhaustMap__ = __webpack_require__(902); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_operators_exhaustMap__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_operators_expand__ = __webpack_require__(903); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_operators_expand__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__ = __webpack_require__(130); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_operators_filter__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__internal_operators_finalize__ = __webpack_require__(904); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_operators_finalize__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__internal_operators_find__ = __webpack_require__(396); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return __WEBPACK_IMPORTED_MODULE_32__internal_operators_find__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__internal_operators_findIndex__ = __webpack_require__(905); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return __WEBPACK_IMPORTED_MODULE_33__internal_operators_findIndex__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__internal_operators_first__ = __webpack_require__(906); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return __WEBPACK_IMPORTED_MODULE_34__internal_operators_first__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__internal_operators_groupBy__ = __webpack_require__(397); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return __WEBPACK_IMPORTED_MODULE_35__internal_operators_groupBy__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__internal_operators_ignoreElements__ = __webpack_require__(907); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return __WEBPACK_IMPORTED_MODULE_36__internal_operators_ignoreElements__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__internal_operators_isEmpty__ = __webpack_require__(908); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return __WEBPACK_IMPORTED_MODULE_37__internal_operators_isEmpty__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__internal_operators_last__ = __webpack_require__(909); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return __WEBPACK_IMPORTED_MODULE_38__internal_operators_last__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__ = __webpack_require__(53); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return __WEBPACK_IMPORTED_MODULE_39__internal_operators_map__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__internal_operators_mapTo__ = __webpack_require__(910); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_operators_mapTo__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__internal_operators_materialize__ = __webpack_require__(911); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return __WEBPACK_IMPORTED_MODULE_41__internal_operators_materialize__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__internal_operators_max__ = __webpack_require__(912); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return __WEBPACK_IMPORTED_MODULE_42__internal_operators_max__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__internal_operators_merge__ = __webpack_require__(913); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return __WEBPACK_IMPORTED_MODULE_43__internal_operators_merge__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__ = __webpack_require__(247); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return __WEBPACK_IMPORTED_MODULE_44__internal_operators_mergeAll__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__ = __webpack_require__(131); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_operators_mergeMap__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_operators_mergeMapTo__ = __webpack_require__(914); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return __WEBPACK_IMPORTED_MODULE_46__internal_operators_mergeMapTo__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__internal_operators_mergeScan__ = __webpack_require__(915); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return __WEBPACK_IMPORTED_MODULE_47__internal_operators_mergeScan__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__internal_operators_min__ = __webpack_require__(916); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return __WEBPACK_IMPORTED_MODULE_48__internal_operators_min__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__ = __webpack_require__(104); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_operators_multicast__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_operators_observeOn__ = __webpack_require__(398); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return __WEBPACK_IMPORTED_MODULE_50__internal_operators_observeOn__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__internal_operators_onErrorResumeNext__ = __webpack_require__(917); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return __WEBPACK_IMPORTED_MODULE_51__internal_operators_onErrorResumeNext__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__internal_operators_pairwise__ = __webpack_require__(918); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return __WEBPACK_IMPORTED_MODULE_52__internal_operators_pairwise__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__internal_operators_partition__ = __webpack_require__(919); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return __WEBPACK_IMPORTED_MODULE_53__internal_operators_partition__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__internal_operators_pluck__ = __webpack_require__(920); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return __WEBPACK_IMPORTED_MODULE_54__internal_operators_pluck__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__internal_operators_publish__ = __webpack_require__(921); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return __WEBPACK_IMPORTED_MODULE_55__internal_operators_publish__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__internal_operators_publishBehavior__ = __webpack_require__(922); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return __WEBPACK_IMPORTED_MODULE_56__internal_operators_publishBehavior__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57__internal_operators_publishLast__ = __webpack_require__(923); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return __WEBPACK_IMPORTED_MODULE_57__internal_operators_publishLast__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__internal_operators_publishReplay__ = __webpack_require__(924); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return __WEBPACK_IMPORTED_MODULE_58__internal_operators_publishReplay__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_59__internal_operators_race__ = __webpack_require__(925); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_59__internal_operators_race__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__ = __webpack_require__(171); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return __WEBPACK_IMPORTED_MODULE_60__internal_operators_reduce__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_61__internal_operators_repeat__ = __webpack_require__(926); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return __WEBPACK_IMPORTED_MODULE_61__internal_operators_repeat__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_62__internal_operators_repeatWhen__ = __webpack_require__(927); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return __WEBPACK_IMPORTED_MODULE_62__internal_operators_repeatWhen__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_63__internal_operators_retry__ = __webpack_require__(928); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return __WEBPACK_IMPORTED_MODULE_63__internal_operators_retry__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_64__internal_operators_retryWhen__ = __webpack_require__(929); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return __WEBPACK_IMPORTED_MODULE_64__internal_operators_retryWhen__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__ = __webpack_require__(248); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return __WEBPACK_IMPORTED_MODULE_65__internal_operators_refCount__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_66__internal_operators_sample__ = __webpack_require__(930); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return __WEBPACK_IMPORTED_MODULE_66__internal_operators_sample__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_67__internal_operators_sampleTime__ = __webpack_require__(931); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return __WEBPACK_IMPORTED_MODULE_67__internal_operators_sampleTime__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__ = __webpack_require__(249); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return __WEBPACK_IMPORTED_MODULE_68__internal_operators_scan__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_69__internal_operators_sequenceEqual__ = __webpack_require__(932); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return __WEBPACK_IMPORTED_MODULE_69__internal_operators_sequenceEqual__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_70__internal_operators_share__ = __webpack_require__(933); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return __WEBPACK_IMPORTED_MODULE_70__internal_operators_share__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_71__internal_operators_shareReplay__ = __webpack_require__(934); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return __WEBPACK_IMPORTED_MODULE_71__internal_operators_shareReplay__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_72__internal_operators_single__ = __webpack_require__(935); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return __WEBPACK_IMPORTED_MODULE_72__internal_operators_single__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_73__internal_operators_skip__ = __webpack_require__(936); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return __WEBPACK_IMPORTED_MODULE_73__internal_operators_skip__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_74__internal_operators_skipLast__ = __webpack_require__(937); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return __WEBPACK_IMPORTED_MODULE_74__internal_operators_skipLast__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_75__internal_operators_skipUntil__ = __webpack_require__(938); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return __WEBPACK_IMPORTED_MODULE_75__internal_operators_skipUntil__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_76__internal_operators_skipWhile__ = __webpack_require__(939); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return __WEBPACK_IMPORTED_MODULE_76__internal_operators_skipWhile__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_77__internal_operators_startWith__ = __webpack_require__(940); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return __WEBPACK_IMPORTED_MODULE_77__internal_operators_startWith__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_78__internal_operators_subscribeOn__ = __webpack_require__(941); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return __WEBPACK_IMPORTED_MODULE_78__internal_operators_subscribeOn__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_79__internal_operators_switchAll__ = __webpack_require__(942); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return __WEBPACK_IMPORTED_MODULE_79__internal_operators_switchAll__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__ = __webpack_require__(250); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return __WEBPACK_IMPORTED_MODULE_80__internal_operators_switchMap__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_81__internal_operators_switchMapTo__ = __webpack_require__(943); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return __WEBPACK_IMPORTED_MODULE_81__internal_operators_switchMapTo__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__ = __webpack_require__(251); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_82__internal_operators_take__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__ = __webpack_require__(252); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return __WEBPACK_IMPORTED_MODULE_83__internal_operators_takeLast__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_84__internal_operators_takeUntil__ = __webpack_require__(944); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return __WEBPACK_IMPORTED_MODULE_84__internal_operators_takeUntil__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_85__internal_operators_takeWhile__ = __webpack_require__(945); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return __WEBPACK_IMPORTED_MODULE_85__internal_operators_takeWhile__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_86__internal_operators_tap__ = __webpack_require__(399); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return __WEBPACK_IMPORTED_MODULE_86__internal_operators_tap__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_87__internal_operators_throttle__ = __webpack_require__(400); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return __WEBPACK_IMPORTED_MODULE_87__internal_operators_throttle__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_88__internal_operators_throttleTime__ = __webpack_require__(946); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return __WEBPACK_IMPORTED_MODULE_88__internal_operators_throttleTime__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__ = __webpack_require__(172); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return __WEBPACK_IMPORTED_MODULE_89__internal_operators_throwIfEmpty__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_90__internal_operators_timeInterval__ = __webpack_require__(947); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return __WEBPACK_IMPORTED_MODULE_90__internal_operators_timeInterval__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_91__internal_operators_timeout__ = __webpack_require__(948); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return __WEBPACK_IMPORTED_MODULE_91__internal_operators_timeout__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_92__internal_operators_timeoutWith__ = __webpack_require__(401); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return __WEBPACK_IMPORTED_MODULE_92__internal_operators_timeoutWith__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_93__internal_operators_timestamp__ = __webpack_require__(949); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return __WEBPACK_IMPORTED_MODULE_93__internal_operators_timestamp__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_94__internal_operators_toArray__ = __webpack_require__(950); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return __WEBPACK_IMPORTED_MODULE_94__internal_operators_toArray__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_95__internal_operators_window__ = __webpack_require__(951); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return __WEBPACK_IMPORTED_MODULE_95__internal_operators_window__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_96__internal_operators_windowCount__ = __webpack_require__(952); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return __WEBPACK_IMPORTED_MODULE_96__internal_operators_windowCount__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_97__internal_operators_windowTime__ = __webpack_require__(953); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return __WEBPACK_IMPORTED_MODULE_97__internal_operators_windowTime__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_98__internal_operators_windowToggle__ = __webpack_require__(954); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return __WEBPACK_IMPORTED_MODULE_98__internal_operators_windowToggle__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_99__internal_operators_windowWhen__ = __webpack_require__(955); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return __WEBPACK_IMPORTED_MODULE_99__internal_operators_windowWhen__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_100__internal_operators_withLatestFrom__ = __webpack_require__(956); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return __WEBPACK_IMPORTED_MODULE_100__internal_operators_withLatestFrom__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_101__internal_operators_zip__ = __webpack_require__(957); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_101__internal_operators_zip__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_102__internal_operators_zipAll__ = __webpack_require__(958); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return __WEBPACK_IMPORTED_MODULE_102__internal_operators_zipAll__["a"]; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +//# sourceMappingURL=index.js.map + + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2011 Mark Cavage All rights reserved. + +// If you have no idea what ASN.1 or BER is, see this: +// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +var Ber = __webpack_require__(480); + + + +// --- Exported API + +module.exports = { + + Ber: Ber, + + BerReader: Ber.Reader, + + BerWriter: Ber.Writer + +}; + + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +// optional / simple context binding +var aFunction = __webpack_require__(87); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), +/* 68 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(57)(function(){ - return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +module.exports = !__webpack_require__(74)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); + /***/ }), -/* 50 */ +/* 69 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. -var assert = __webpack_require__(17); -var util = __webpack_require__(4); +var assert = __webpack_require__(22); +var util = __webpack_require__(9); function FingerprintFormatError(fp, format) { if (Error.captureStackTrace) @@ -30518,20 +26657,21 @@ module.exports = { /***/ }), -/* 51 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. module.exports = Signature; -var assert = __webpack_require__(17); -var algs = __webpack_require__(26); -var crypto = __webpack_require__(14); -var errs = __webpack_require__(50); -var utils = __webpack_require__(25); -var asn1 = __webpack_require__(53); -var SSHBuffer = __webpack_require__(139); +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var crypto = __webpack_require__(21); +var errs = __webpack_require__(69); +var utils = __webpack_require__(31); +var asn1 = __webpack_require__(66); +var SSHBuffer = __webpack_require__(142); var InvalidAlgorithmError = errs.InvalidAlgorithmError; var SignatureParseError = errs.SignatureParseError; @@ -30664,7 +26804,7 @@ Signature.prototype.toString = function (format) { Signature.parse = function (data, type, format) { if (typeof (data) === 'string') - data = new Buffer(data, 'base64'); + data = Buffer.from(data, 'base64'); assert.buffer(data, 'data'); assert.string(format, 'format'); assert.string(type, 'type'); @@ -30836,15486 +26976,10 @@ Signature._oldVersionDetect = function (obj) { }; -/***/ }), -/* 52 */ -/***/ (function(module, exports) { - -module.exports = require("http"); - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2011 Mark Cavage All rights reserved. - -// If you have no idea what ASN.1 or BER is, see this: -// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc - -var Ber = __webpack_require__(381); - - - -///--- Exported API - -module.exports = { - - Ber: Ber, - - BerReader: Ber.Reader, - - BerWriter: Ber.Writer - -}; - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.SCOPE_SEPARATOR = undefined; - -var _assign; - -function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _extends2; - -function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var _constants; - -function _load_constants() { - return _constants = __webpack_require__(8); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -var _npmResolver; - -function _load_npmResolver() { - return _npmResolver = _interopRequireDefault(__webpack_require__(158)); -} - -var _envReplace; - -function _load_envReplace() { - return _envReplace = _interopRequireDefault(__webpack_require__(441)); -} - -var _baseRegistry; - -function _load_baseRegistry() { - return _baseRegistry = _interopRequireDefault(__webpack_require__(425)); -} - -var _misc; - -function _load_misc() { - return _misc = __webpack_require__(18); -} - -var _path; - -function _load_path() { - return _path = __webpack_require__(252); -} - -var _normalizeUrl; - -function _load_normalizeUrl() { - return _normalizeUrl = _interopRequireDefault(__webpack_require__(663)); -} - -var _userHomeDir; - -function _load_userHomeDir() { - return _userHomeDir = _interopRequireDefault(__webpack_require__(76)); -} - -var _userHomeDir2; - -function _load_userHomeDir2() { - return _userHomeDir2 = __webpack_require__(76); -} - -var _path2; - -function _load_path2() { - return _path2 = _interopRequireDefault(__webpack_require__(0)); -} - -var _url; - -function _load_url() { - return _url = _interopRequireDefault(__webpack_require__(19)); -} - -var _ini; - -function _load_ini() { - return _ini = _interopRequireDefault(__webpack_require__(606)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var DEFAULT_REGISTRY = 'https://registry.npmjs.org/'; -var REGEX_REGISTRY_HTTP_PROTOCOL = /^https?:/i; -var REGEX_REGISTRY_PREFIX = /^(https?:)?\/\//i; -var REGEX_REGISTRY_SUFFIX = /registry\/?$/; - -var SCOPE_SEPARATOR = exports.SCOPE_SEPARATOR = '%2f'; -// All scoped package names are of the format `@scope%2fpkg` from the use of NpmRegistry.escapeName -// `(?:^|\/)` Match either the start of the string or a `/` but don't capture -// `[^\/?]+?` Match any character that is not '/' or '?' and capture, up until the first occurrence of: -// `(?=%2f|\/)` Match SCOPE_SEPARATOR, the escaped '/', or a raw `/` and don't capture -// The reason for matching a plain `/` is NPM registry being inconsistent about escaping `/` in -// scoped package names: when you're fetching a tarball, it is not escaped, when you want info -// about the package, it is escaped. -var SCOPED_PKG_REGEXP = /(?:^|\/)(@[^\/?]+?)(?=%2f|\/)/; - -// TODO: Use the method from src/cli/commands/global.js for this instead -function getGlobalPrefix() { - if (process.env.PREFIX) { - return process.env.PREFIX; - } else if (process.platform === 'win32') { - // c:\node\node.exe --> prefix=c:\node\ - return (_path2 || _load_path2()).default.dirname(process.execPath); - } else { - // /usr/local/bin/node --> prefix=/usr/local - var prefix = (_path2 || _load_path2()).default.dirname((_path2 || _load_path2()).default.dirname(process.execPath)); - - // destdir only is respected on Unix - if (process.env.DESTDIR) { - prefix = (_path2 || _load_path2()).default.join(process.env.DESTDIR, prefix); - } - - return prefix; - } -} - -var PATH_CONFIG_OPTIONS = new (_set || _load_set()).default(['cache', 'cafile', 'prefix', 'userconfig']); - -function isPathConfigOption(key) { - return PATH_CONFIG_OPTIONS.has(key); -} - -function normalizePath(val) { - if (val === undefined) { - return undefined; - } - - if (typeof val !== 'string') { - val = String(val); - } - - return (0, (_path || _load_path()).resolveWithHome)(val); -} - -function urlParts(requestUrl) { - var normalizedUrl = (0, (_normalizeUrl || _load_normalizeUrl()).default)(requestUrl); - var parsed = (_url || _load_url()).default.parse(normalizedUrl); - var host = parsed.host || ''; - var path = parsed.path || ''; - return { host, path }; -} - -var NpmRegistry = function (_Registry) { - (0, (_inherits2 || _load_inherits()).default)(NpmRegistry, _Registry); - - function NpmRegistry(cwd, registries, requestManager, reporter) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, NpmRegistry); - - var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Registry.call(this, cwd, registries, requestManager, reporter)); - - _this.folder = 'node_modules'; - return _this; - } - - NpmRegistry.escapeName = function escapeName(name) { - // scoped packages contain slashes and the npm registry expects them to be escaped - return name.replace('/', SCOPE_SEPARATOR); - }; - - NpmRegistry.prototype.isScopedPackage = function isScopedPackage(packageIdent) { - return SCOPED_PKG_REGEXP.test(packageIdent); - }; - - NpmRegistry.prototype.getRequestUrl = function getRequestUrl(registry, pathname) { - var isUrl = REGEX_REGISTRY_PREFIX.test(pathname); - - if (isUrl) { - return pathname; - } else { - return (_url || _load_url()).default.resolve((0, (_misc || _load_misc()).addSuffix)(registry, '/'), pathname); - } - }; - - NpmRegistry.prototype.isRequestToRegistry = function isRequestToRegistry(requestUrl, registryUrl) { - var request = urlParts(requestUrl); - var registry = urlParts(registryUrl); - var customHostSuffix = this.getRegistryOrGlobalOption(registryUrl, 'custom-host-suffix'); - - var requestToRegistryHost = request.host === registry.host; - var requestToYarn = (_constants || _load_constants()).YARN_REGISTRY.indexOf(request.host) !== -1 && DEFAULT_REGISTRY.indexOf(registry.host) !== -1; - var requestToRegistryPath = request.path.startsWith(registry.path); - // For some registries, the package path does not prefix with the registry path - var customHostSuffixInUse = typeof customHostSuffix === 'string' && request.host.endsWith(customHostSuffix); - - return (requestToRegistryHost || requestToYarn) && (requestToRegistryPath || customHostSuffixInUse); - }; - - NpmRegistry.prototype.request = function request(pathname) { - var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var packageName = arguments[2]; - - // packageName needs to be escaped when if it is passed - var packageIdent = packageName && NpmRegistry.escapeName(packageName) || pathname; - var registry = opts.registry || this.getRegistry(packageIdent); - var requestUrl = this.getRequestUrl(registry, pathname); - - var alwaysAuth = this.getRegistryOrGlobalOption(registry, 'always-auth'); - - var headers = (0, (_extends2 || _load_extends()).default)({ - Accept: - // This is to use less bandwidth unless we really need to get the full response. - // See https://github.com/npm/npm-registry-client#requests - opts.unfiltered ? 'application/json' : 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*' - }, opts.headers); - - var isToRegistry = this.isRequestToRegistry(requestUrl, registry) || this.requestNeedsAuth(requestUrl); - - // this.token must be checked to account for publish requests on non-scoped packages - if (this.token || isToRegistry && (alwaysAuth || this.isScopedPackage(packageIdent))) { - var authorization = this.getAuth(packageIdent); - if (authorization) { - headers.authorization = authorization; - } - } - - return this.requestManager.request({ - url: requestUrl, - method: opts.method, - body: opts.body, - auth: opts.auth, - headers, - json: !opts.buffer, - buffer: opts.buffer, - process: opts.process, - gzip: true - }); - }; - - NpmRegistry.prototype.requestNeedsAuth = function requestNeedsAuth(requestUrl) { - var config = this.config; - var requestParts = urlParts(requestUrl); - return !!(0, (_keys || _load_keys()).default)(config).find(function (option) { - var parts = option.split(':'); - if (parts.length === 2 && parts[1] === '_authToken') { - var registryParts = urlParts(parts[0]); - if (requestParts.host === registryParts.host && requestParts.path.startsWith(registryParts.path)) { - return true; - } - } - return false; - }); - }; - - NpmRegistry.prototype.checkOutdated = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, name, range) { - var req = yield this.request(NpmRegistry.escapeName(name), { unfiltered: true }); - if (!req) { - throw new Error('couldnt find ' + name); - } - - // By default use top level 'repository' and 'homepage' values - var repository = req.repository, - homepage = req.homepage; - - var wantedPkg = yield (_npmResolver || _load_npmResolver()).default.findVersionInRegistryResponse(config, range, req); - - // But some local repositories like Verdaccio do not return 'repository' nor 'homepage' - // in top level data structure, so we fallback to wanted package manifest - if (!repository && !homepage) { - repository = wantedPkg.repository; - homepage = wantedPkg.homepage; - } - - var url = homepage || repository && repository.url || ''; - - return { - latest: req['dist-tags'].latest, - wanted: wantedPkg.version, - url - }; - }); - - function checkOutdated(_x2, _x3, _x4) { - return _ref.apply(this, arguments); - } - - return checkOutdated; - }(); - - NpmRegistry.prototype.getPossibleConfigLocations = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, reporter) { - // npmrc --> ./.npmrc, ~/.npmrc, ${prefix}/etc/npmrc - var localfile = '.' + filename; - var possibles = [[false, (_path2 || _load_path2()).default.join(this.cwd, localfile)], [true, this.config.userconfig || (_path2 || _load_path2()).default.join((_userHomeDir || _load_userHomeDir()).default, localfile)], [false, (_path2 || _load_path2()).default.join(getGlobalPrefix(), 'etc', filename)]]; - - // When home directory for global install is different from where $HOME/npmrc is stored, - // E.g. /usr/local/share vs /root on linux machines, check the additional location - if ((_userHomeDir2 || _load_userHomeDir2()).home !== (_userHomeDir || _load_userHomeDir()).default) { - possibles.push([true, (_path2 || _load_path2()).default.join((_userHomeDir2 || _load_userHomeDir2()).home, localfile)]); - } - - // npmrc --> ../.npmrc, ../../.npmrc, etc. - var foldersFromRootToCwd = (0, (_path || _load_path()).getPosixPath)(this.cwd).split('/'); - while (foldersFromRootToCwd.length > 1) { - possibles.push([false, (_path2 || _load_path2()).default.join(foldersFromRootToCwd.join((_path2 || _load_path2()).default.sep), localfile)]); - foldersFromRootToCwd.pop(); - } - - var actuals = []; - for (var _iterator = possibles, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref4; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref4 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref4 = _i.value; - } - - var _ref3 = _ref4; - var isHome = _ref3[0]; - var loc = _ref3[1]; - - reporter.verbose(reporter.lang('configPossibleFile', loc)); - if (yield (_fs || _load_fs()).exists(loc)) { - reporter.verbose(reporter.lang('configFileFound', loc)); - actuals.push([isHome, loc, yield (_fs || _load_fs()).readFile(loc)]); - } - } - return actuals; - }); - - function getPossibleConfigLocations(_x5, _x6) { - return _ref2.apply(this, arguments); - } - - return getPossibleConfigLocations; - }(); - - NpmRegistry.getConfigEnv = function getConfigEnv() { - var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : process.env; - - // To match NPM's behavior, HOME is always the user's home directory. - var overrideEnv = { - HOME: (_userHomeDir2 || _load_userHomeDir2()).home - }; - return (0, (_assign || _load_assign()).default)({}, env, overrideEnv); - }; - - NpmRegistry.normalizeConfig = function normalizeConfig(config) { - var env = NpmRegistry.getConfigEnv(); - config = (_baseRegistry || _load_baseRegistry()).default.normalizeConfig(config); - - for (var key in config) { - config[key] = (0, (_envReplace || _load_envReplace()).default)(config[key], env); - if (isPathConfigOption(key)) { - config[key] = normalizePath(config[key]); - } - } - - return config; - }; - - NpmRegistry.prototype.loadConfig = function () { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - // docs: https://docs.npmjs.com/misc/config - this.mergeEnv('npm_config_'); - - for (var _iterator2 = yield this.getPossibleConfigLocations('npmrc', this.reporter), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref7; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref7 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref7 = _i2.value; - } - - var _ref6 = _ref7; - var loc = _ref6[1]; - var file = _ref6[2]; - - var config = NpmRegistry.normalizeConfig((_ini || _load_ini()).default.parse(file)); - - // normalize offline mirror path relative to the current npmrc - var offlineLoc = config['yarn-offline-mirror']; - // don't normalize if we already have a mirror path - if (!this.config['yarn-offline-mirror'] && offlineLoc) { - var mirrorLoc = config['yarn-offline-mirror'] = (_path2 || _load_path2()).default.resolve((_path2 || _load_path2()).default.dirname(loc), offlineLoc); - yield (_fs || _load_fs()).mkdirp(mirrorLoc); - } - - this.config = (0, (_assign || _load_assign()).default)({}, config, this.config); - } - }); - - function loadConfig() { - return _ref5.apply(this, arguments); - } - - return loadConfig; - }(); - - NpmRegistry.prototype.getScope = function getScope(packageIdent) { - var match = packageIdent.match(SCOPED_PKG_REGEXP); - return match && match[1] || ''; - }; - - NpmRegistry.prototype.getRegistry = function getRegistry(packageIdent) { - // Try extracting registry from the url, then scoped registry, and default registry - if (packageIdent.match(REGEX_REGISTRY_PREFIX)) { - var availableRegistries = this.getAvailableRegistries(); - var registry = availableRegistries.find(function (registry) { - return packageIdent.startsWith(registry); - }); - if (registry) { - return String(registry); - } - } - - var _arr = [this.getScope(packageIdent), '']; - for (var _i3 = 0; _i3 < _arr.length; _i3++) { - var scope = _arr[_i3]; - var _registry = this.getScopedOption(scope, 'registry') || this.registries.yarn.getScopedOption(scope, 'registry'); - if (_registry) { - return String(_registry); - } - } - - return DEFAULT_REGISTRY; - }; - - NpmRegistry.prototype.getAuth = function getAuth(packageIdent) { - if (this.token) { - return this.token; - } - - var baseRegistry = this.getRegistry(packageIdent); - var registries = [baseRegistry]; - - // If sending a request to the Yarn registry, we must also send it the auth token for the npm registry - if (baseRegistry === (_constants || _load_constants()).YARN_REGISTRY) { - registries.push(DEFAULT_REGISTRY); - } - - for (var _iterator3 = registries, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref8; - - if (_isArray3) { - if (_i4 >= _iterator3.length) break; - _ref8 = _iterator3[_i4++]; - } else { - _i4 = _iterator3.next(); - if (_i4.done) break; - _ref8 = _i4.value; - } - - var registry = _ref8; - - // Check for bearer token. - var authToken = this.getRegistryOrGlobalOption(registry, '_authToken'); - if (authToken) { - return `Bearer ${String(authToken)}`; - } - - // Check for basic auth token. - var auth = this.getRegistryOrGlobalOption(registry, '_auth'); - if (auth) { - return `Basic ${String(auth)}`; - } - - // Check for basic username/password auth. - var username = this.getRegistryOrGlobalOption(registry, 'username'); - var password = this.getRegistryOrGlobalOption(registry, '_password'); - if (username && password) { - var pw = Buffer.from(String(password), 'base64').toString(); - return 'Basic ' + Buffer.from(String(username) + ':' + pw).toString('base64'); - } - } - - return ''; - }; - - NpmRegistry.prototype.getScopedOption = function getScopedOption(scope, option) { - return this.getOption(scope + (scope ? ':' : '') + option); - }; - - NpmRegistry.prototype.getRegistryOption = function getRegistryOption(registry, option) { - var pre = REGEX_REGISTRY_HTTP_PROTOCOL; - var suf = REGEX_REGISTRY_SUFFIX; - - // When registry is used config scope, the trailing '/' is required - var reg = (0, (_misc || _load_misc()).addSuffix)(registry, '/'); - - // 1st attempt, try to get option for the given registry URL - // 2nd attempt, remove the 'https?:' prefix of the registry URL - // 3nd attempt, remove the 'registry/?' suffix of the registry URL - return this.getScopedOption(reg, option) || pre.test(reg) && this.getRegistryOption(reg.replace(pre, ''), option) || suf.test(reg) && this.getRegistryOption(reg.replace(suf, ''), option); - }; - - NpmRegistry.prototype.getRegistryOrGlobalOption = function getRegistryOrGlobalOption(registry, option) { - return this.getRegistryOption(registry, option) || this.getOption(option); - }; - - return NpmRegistry; -}((_baseRegistry || _load_baseRegistry()).default); - -NpmRegistry.filename = 'package.json'; -exports.default = NpmRegistry; - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(480), __esModule: true }; - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(93); -module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; -}; - -/***/ }), -/* 57 */ -/***/ (function(module, exports) { - -module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } -}; - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(45) - , createDesc = __webpack_require__(97); -module.exports = __webpack_require__(49) ? function(object, key, value){ - return dP.f(object, key, createDesc(1, value)); -} : function(object, key, value){ - object[key] = value; - return object; -}; - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -try { - var util = __webpack_require__(4); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = __webpack_require__(605); -} - - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Base prompt implementation - * Should be extended by prompt types. - */ - -var _ = __webpack_require__(32); -var chalk = __webpack_require__(39); -var runAsync = __webpack_require__(136); -var Choices = __webpack_require__(608); -var ScreenManager = __webpack_require__(619); - -var Prompt = module.exports = function (question, rl, answers) { - // Setup instance defaults property - _.assign(this, { - answers: answers, - status: 'pending' - }); - - // Set defaults prompt options - this.opt = _.defaults(_.clone(question), { - validate: function () { - return true; - }, - filter: function (val) { - return val; - }, - when: function () { - return true; - } - }); - - // Check to make sure prompt requirements are there - if (!this.opt.message) { - this.throwParamError('message'); - } - if (!this.opt.name) { - this.throwParamError('name'); - } - - // Normalize choices - if (Array.isArray(this.opt.choices)) { - this.opt.choices = new Choices(this.opt.choices, answers); - } - - this.rl = rl; - this.screen = new ScreenManager(this.rl); -}; - -/** - * Start the Inquiry session and manage output value filtering - * @return {Promise} - */ - -Prompt.prototype.run = function () { - return new Promise(function (resolve) { - this._run(function (value) { - resolve(value); - }); - }.bind(this)); -}; - -// default noop (this one should be overwritten in prompts) -Prompt.prototype._run = function (cb) { - cb(); -}; - -/** - * Throw an error telling a required parameter is missing - * @param {String} name Name of the missing param - * @return {Throw Error} - */ - -Prompt.prototype.throwParamError = function (name) { - throw new Error('You must provide a `' + name + '` parameter'); -}; - -/** - * Called when the UI closes. Override to do any specific cleanup necessary - */ -Prompt.prototype.close = function () { - this.screen.releaseCursor(); -}; - -/** - * Run the provided validation method each time a submit event occur. - * @param {Rx.Observable} submit - submit event flow - * @return {Object} Object containing two observables: `success` and `error` - */ -Prompt.prototype.handleSubmitEvents = function (submit) { - var self = this; - var validate = runAsync(this.opt.validate); - var filter = runAsync(this.opt.filter); - var validation = submit.flatMap(function (value) { - return filter(value).then(function (filteredValue) { - return validate(filteredValue, self.answers).then(function (isValid) { - return {isValid: isValid, value: filteredValue}; - }, function (err) { - return {isValid: err}; - }); - }, function (err) { - return {isValid: err}; - }); - }).share(); - - var success = validation - .filter(function (state) { - return state.isValid === true; - }) - .take(1); - - var error = validation - .filter(function (state) { - return state.isValid !== true; - }) - .takeUntil(success); - - return { - success: success, - error: error - }; -}; - -/** - * Generate the prompt question string - * @return {String} prompt question string - */ - -Prompt.prototype.getQuestion = function () { - var message = chalk.green('?') + ' ' + chalk.bold(this.opt.message) + ' '; - - // Append the default if available, and if question isn't answered - if (this.opt.default != null && this.status !== 'answered') { - message += chalk.dim('(' + this.opt.default + ') '); - } - - return message; -}; - - -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var rx = __webpack_require__(137); - -function normalizeKeypressEvents(value, key) { - return {value: value, key: key || {}}; -} - -module.exports = function (rl) { - var keypress = rx.Observable.fromEvent(rl.input, 'keypress', normalizeKeypressEvents) - .filter(function (e) { - // Ignore `enter` key. On the readline, we only care about the `line` event. - return e.key.name !== 'enter' && e.key.name !== 'return'; - }); - - return { - line: rx.Observable.fromEvent(rl, 'line'), - keypress: keypress, - - normalizedUpKey: keypress.filter(function (e) { - return e.key.name === 'up' || e.key.name === 'k' || (e.key.name === 'p' && e.key.ctrl); - }).share(), - - normalizedDownKey: keypress.filter(function (e) { - return e.key.name === 'down' || e.key.name === 'j' || (e.key.name === 'n' && e.key.ctrl); - }).share(), - - numberKey: keypress.filter(function (e) { - return e.value && '123456789'.indexOf(e.value) >= 0; - }).map(function (e) { - return Number(e.value); - }).share(), - - spaceKey: keypress.filter(function (e) { - return e.key && e.key.name === 'space'; - }).share(), - - aKey: keypress.filter(function (e) { - return e.key && e.key.name === 'a'; - }).share(), - - iKey: keypress.filter(function (e) { - return e.key && e.key.name === 'i'; - }).share() - }; -}; - - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - -(function(){ - - // Copyright (c) 2005 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Basic JavaScript BN library - subset useful for RSA encryption. - - // Bits per digit - var dbits; - - // JavaScript engine analysis - var canary = 0xdeadbeefcafe; - var j_lm = ((canary&0xffffff)==0xefcafe); - - // (public) Constructor - function BigInteger(a,b,c) { - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); - } - - // return new, unset BigInteger - function nbi() { return new BigInteger(null); } - - // am: Compute w_j += (x*this_i), propagate carries, - // c is initial carry, returns final carry. - // c < 3*dvalue, x < 2*dvalue, this_i < dvalue - // We need to select the fastest one that works in this environment. - - // am1: use a single mult and divide to get the high bits, - // max digit bits should be 26 because - // max internal value = 2*dvalue^2-2*dvalue (< 2^53) - function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this[i++]+w[j]+c; - c = Math.floor(v/0x4000000); - w[j++] = v&0x3ffffff; - } - return c; - } - // am2 avoids a big mult-and-extract completely. - // Max digit bits should be <= 30 because we do bitwise ops - // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) - function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this[i]&0x7fff; - var h = this[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w[j++] = l&0x3fffffff; - } - return c; - } - // Alternately, set max digit bits to 28 since some - // browsers slow down when dealing with 32-bit numbers. - function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this[i]&0x3fff; - var h = this[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w[j++] = l&0xfffffff; - } - return c; - } - var inBrowser = typeof navigator !== "undefined"; - if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; - } - else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; - } - else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; - } - - BigInteger.prototype.DB = dbits; - BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; - r.t = this.t; - r.s = this.s; - } - - // (protected) set from integer value x, -DV <= x < DV - function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this[0] = x; - else if(x < -1) this[0] = x+this.DV; - else this.t = 0; - } - - // return bigint initialized to value - function nbv(i) { var r = nbi(); r.fromInt(i); return r; } - - // (protected) set from string and radix - function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this[this.t++] = x; - else if(sh+k > this.DB) { - this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } - else - this[this.t-1] |= x<= this.DB) sh -= this.DB; - } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; - } - - // (public) return string representation in given radix - function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this[i]&((1<>(p+=this.DB-k); - } - else { - d = (this[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } - } - return m?r:"0"; - } - - // (public) -this - function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } - - // (public) |this| - function bnAbs() { return (this.s<0)?this.negate():this; } - - // (public) return + if this > a, - if this < a, 0 if equal - function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; - return 0; - } - - // returns bit length of the integer x - function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; - } - - // (public) return the number of bits in "this" - function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); - } - - // (protected) r = this << n*DB - function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; - for(i = n-1; i >= 0; --i) r[i] = 0; - r.t = this.t+n; - r.s = this.s; - } - - // (protected) r = this >> n*DB - function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r[i-n] = this[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; - } - - // (protected) r = this << n - function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r[i+ds+1] = (this[i]>>cbs)|c; - c = (this[i]&bm)<= 0; --i) r[i] = 0; - r[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); - } - - // (protected) r = this >> n - function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r[i-ds-1] |= (this[i]&bm)<>bs; - } - if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c -= a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c -= a.s; - } - r.s = (c<0)?-1:0; - if(c < -1) r[i++] = this.DV+c; - else if(c > 0) r[i++] = c; - r.t = i; - r.clamp(); - } - - // (protected) r = this * a, r != this,a (HAC 14.12) - // "this" should be the larger one if appropriate. - function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); - } - - // (protected) r = this^2, r != this (HAC 14.16) - function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x[i],r,2*i,0,1); - if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r[i+x.t] -= x.DV; - r[i+x.t+1] = 1; - } - } - if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); - r.s = 0; - r.clamp(); - } - - // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) - // r != q, this != m. q or r may be null. - function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; - } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } - else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r[r.t++] = 1; - r.subTo(t,r); - } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); - if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r[i] < --qd) r.subTo(t,r); - } - } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); - } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); - } - - // (public) this mod a - function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; - } - - // Modular reduction using "classic" algorithm - function Classic(m) { this.m = m; } - function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; - } - function cRevert(x) { return x; } - function cReduce(x) { x.divRemTo(this.m,null,x); } - function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - Classic.prototype.convert = cConvert; - Classic.prototype.revert = cRevert; - Classic.prototype.reduce = cReduce; - Classic.prototype.mulTo = cMulTo; - Classic.prototype.sqrTo = cSqrTo; - - // (protected) return "-1/this % 2^DB"; useful for Mont. reduction - // justification: - // xy == 1 (mod m) - // xy = 1+km - // xy(2-xy) = (1+km)(1-km) - // x[y(2-xy)] = 1-k^2m^2 - // x[y(2-xy)] == 1 (mod m^2) - // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 - // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. - // JS multiply "overflows" differently from C/C++, so care is needed here. - function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; - } - - // Montgomery reduction - function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; - } - - // xR mod m - function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; - } - - // x/R mod m - function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; - } - - // x = x/R mod m (HAC 14.32) - function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x[i]*mp mod DV - var j = x[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } - } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = "x^2/R mod m"; x != r - function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = "xy/R mod m"; x,y != r - function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Montgomery.prototype.convert = montConvert; - Montgomery.prototype.revert = montRevert; - Montgomery.prototype.reduce = montReduce; - Montgomery.prototype.mulTo = montMulTo; - Montgomery.prototype.sqrTo = montSqrTo; - - // (protected) true iff this is even - function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } - - // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) - function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } - } - return z.revert(r); - } - - // (public) this^e % m, 0 <= e < 2^32 - function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); - } - - // protected - BigInteger.prototype.copyTo = bnpCopyTo; - BigInteger.prototype.fromInt = bnpFromInt; - BigInteger.prototype.fromString = bnpFromString; - BigInteger.prototype.clamp = bnpClamp; - BigInteger.prototype.dlShiftTo = bnpDLShiftTo; - BigInteger.prototype.drShiftTo = bnpDRShiftTo; - BigInteger.prototype.lShiftTo = bnpLShiftTo; - BigInteger.prototype.rShiftTo = bnpRShiftTo; - BigInteger.prototype.subTo = bnpSubTo; - BigInteger.prototype.multiplyTo = bnpMultiplyTo; - BigInteger.prototype.squareTo = bnpSquareTo; - BigInteger.prototype.divRemTo = bnpDivRemTo; - BigInteger.prototype.invDigit = bnpInvDigit; - BigInteger.prototype.isEven = bnpIsEven; - BigInteger.prototype.exp = bnpExp; - - // public - BigInteger.prototype.toString = bnToString; - BigInteger.prototype.negate = bnNegate; - BigInteger.prototype.abs = bnAbs; - BigInteger.prototype.compareTo = bnCompareTo; - BigInteger.prototype.bitLength = bnBitLength; - BigInteger.prototype.mod = bnMod; - BigInteger.prototype.modPowInt = bnModPowInt; - - // "constants" - BigInteger.ZERO = nbv(0); - BigInteger.ONE = nbv(1); - - // Copyright (c) 2005-2009 Tom Wu - // All Rights Reserved. - // See "LICENSE" for details. - - // Extended JavaScript BN functions, required for RSA private ops. - - // Version 1.1: new BigInteger("0", 10) returns "proper" zero - // Version 1.2: square() API, isProbablePrime fix - - // (public) - function bnClone() { var r = nbi(); this.copyTo(r); return r; } - - // (public) return value as integer - function bnIntValue() { - if(this.s < 0) { - if(this.t == 1) return this[0]-this.DV; - else if(this.t == 0) return -1; - } - else if(this.t == 1) return this[0]; - else if(this.t == 0) return 0; - // assumes 16 < DB < 32 - return ((this[1]&((1<<(32-this.DB))-1))<>24; } - - // (public) return value as short (assumes DB>=16) - function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } - - // (protected) return x s.t. r^x < DV - function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } - - // (public) 0 if this == 0, 1 if this > 0 - function bnSigNum() { - if(this.s < 0) return -1; - else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; - else return 1; - } - - // (protected) convert to radix string - function bnpToRadix(b) { - if(b == null) b = 10; - if(this.signum() == 0 || b < 2 || b > 36) return "0"; - var cs = this.chunkSize(b); - var a = Math.pow(b,cs); - var d = nbv(a), y = nbi(), z = nbi(), r = ""; - this.divRemTo(d,y,z); - while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); - } - return z.intValue().toString(b) + r; - } - - // (protected) convert from radix string - function bnpFromRadix(s,b) { - this.fromInt(0); - if(b == null) b = 10; - var cs = this.chunkSize(b); - var d = Math.pow(b,cs), mi = false, j = 0, w = 0; - for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } - } - if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); - } - if(mi) BigInteger.ZERO.subTo(this,this); - } - - // (protected) alternate constructor - function bnpFromNumber(a,b,c) { - if("number" == typeof b) { - // new BigInteger(int,int,RNG) - if(a < 2) this.fromInt(1); - else { - this.fromNumber(a,c); - if(!this.testBit(a-1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); - if(this.isEven()) this.dAddOffset(1,0); // force odd - while(!this.isProbablePrime(b)) { - this.dAddOffset(2,0); - if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); - } - } - } - else { - // new BigInteger(int,RNG) - var x = new Array(), t = a&7; - x.length = (a>>3)+1; - b.nextBytes(x); - if(t > 0) x[0] &= ((1< 0) { - if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) - r[k++] = d|(this.s<<(this.DB-p)); - while(i >= 0) { - if(p < 8) { - d = (this[i]&((1<>(p+=this.DB-8); - } - else { - d = (this[i]>>(p-=8))&0xff; - if(p <= 0) { p += this.DB; --i; } - } - if((d&0x80) != 0) d |= -256; - if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; - if(k > 0 || d != this.s) r[k++] = d; - } - } - return r; - } - - function bnEquals(a) { return(this.compareTo(a)==0); } - function bnMin(a) { return(this.compareTo(a)<0)?this:a; } - function bnMax(a) { return(this.compareTo(a)>0)?this:a; } - - // (protected) r = this op a (bitwise) - function bnpBitwiseTo(a,op,r) { - var i, f, m = Math.min(a.t,this.t); - for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); - if(a.t < this.t) { - f = a.s&this.DM; - for(i = m; i < this.t; ++i) r[i] = op(this[i],f); - r.t = this.t; - } - else { - f = this.s&this.DM; - for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); - r.t = a.t; - } - r.s = op(this.s,a.s); - r.clamp(); - } - - // (public) this & a - function op_and(x,y) { return x&y; } - function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } - - // (public) this | a - function op_or(x,y) { return x|y; } - function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } - - // (public) this ^ a - function op_xor(x,y) { return x^y; } - function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } - - // (public) this & ~a - function op_andnot(x,y) { return x&~y; } - function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } - - // (public) ~this - function bnNot() { - var r = nbi(); - for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; - r.t = this.t; - r.s = ~this.s; - return r; - } - - // (public) this << n - function bnShiftLeft(n) { - var r = nbi(); - if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); - return r; - } - - // (public) this >> n - function bnShiftRight(n) { - var r = nbi(); - if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); - return r; - } - - // return index of lowest 1-bit in x, x < 2^31 - function lbit(x) { - if(x == 0) return -1; - var r = 0; - if((x&0xffff) == 0) { x >>= 16; r += 16; } - if((x&0xff) == 0) { x >>= 8; r += 8; } - if((x&0xf) == 0) { x >>= 4; r += 4; } - if((x&3) == 0) { x >>= 2; r += 2; } - if((x&1) == 0) ++r; - return r; - } - - // (public) returns index of lowest 1-bit (or -1 if none) - function bnGetLowestSetBit() { - for(var i = 0; i < this.t; ++i) - if(this[i] != 0) return i*this.DB+lbit(this[i]); - if(this.s < 0) return this.t*this.DB; - return -1; - } - - // return number of 1 bits in x - function cbit(x) { - var r = 0; - while(x != 0) { x &= x-1; ++r; } - return r; - } - - // (public) return number of set bits - function bnBitCount() { - var r = 0, x = this.s&this.DM; - for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); - return r; - } - - // (public) true iff nth bit is set - function bnTestBit(n) { - var j = Math.floor(n/this.DB); - if(j >= this.t) return(this.s!=0); - return((this[j]&(1<<(n%this.DB)))!=0); - } - - // (protected) this op (1<>= this.DB; - } - if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; - } - else { - c += this.s; - while(i < a.t) { - c += a[i]; - r[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; - } - r.s = (c<0)?-1:0; - if(c > 0) r[i++] = c; - else if(c < -1) r[i++] = this.DV+c; - r.t = i; - r.clamp(); - } - - // (public) this + a - function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } - - // (public) this - a - function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } - - // (public) this * a - function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } - - // (public) this^2 - function bnSquare() { var r = nbi(); this.squareTo(r); return r; } - - // (public) this / a - function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } - - // (public) this % a - function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } - - // (public) [this/a,this%a] - function bnDivideAndRemainder(a) { - var q = nbi(), r = nbi(); - this.divRemTo(a,q,r); - return new Array(q,r); - } - - // (protected) this *= n, this >= 0, 1 < n < DV - function bnpDMultiply(n) { - this[this.t] = this.am(0,n-1,this,0,0,this.t); - ++this.t; - this.clamp(); - } - - // (protected) this += n << w words, this >= 0 - function bnpDAddOffset(n,w) { - if(n == 0) return; - while(this.t <= w) this[this.t++] = 0; - this[w] += n; - while(this[w] >= this.DV) { - this[w] -= this.DV; - if(++w >= this.t) this[this.t++] = 0; - ++this[w]; - } - } - - // A "null" reducer - function NullExp() {} - function nNop(x) { return x; } - function nMulTo(x,y,r) { x.multiplyTo(y,r); } - function nSqrTo(x,r) { x.squareTo(r); } - - NullExp.prototype.convert = nNop; - NullExp.prototype.revert = nNop; - NullExp.prototype.mulTo = nMulTo; - NullExp.prototype.sqrTo = nSqrTo; - - // (public) this^e - function bnPow(e) { return this.exp(e,new NullExp()); } - - // (protected) r = lower n words of "this * a", a.t <= n - // "this" should be the larger one if appropriate. - function bnpMultiplyLowerTo(a,n,r) { - var i = Math.min(this.t+a.t,n); - r.s = 0; // assumes a,this >= 0 - r.t = i; - while(i > 0) r[--i] = 0; - var j; - for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); - for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); - r.clamp(); - } - - // (protected) r = "this * a" without lower n words, n > 0 - // "this" should be the larger one if appropriate. - function bnpMultiplyUpperTo(a,n,r) { - --n; - var i = r.t = this.t+a.t-n; - r.s = 0; // assumes a,this >= 0 - while(--i >= 0) r[i] = 0; - for(i = Math.max(n-this.t,0); i < a.t; ++i) - r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); - r.clamp(); - r.drShiftTo(1,r); - } - - // Barrett modular reduction - function Barrett(m) { - // setup Barrett - this.r2 = nbi(); - this.q3 = nbi(); - BigInteger.ONE.dlShiftTo(2*m.t,this.r2); - this.mu = this.r2.divide(m); - this.m = m; - } - - function barrettConvert(x) { - if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); - else if(x.compareTo(this.m) < 0) return x; - else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } - } - - function barrettRevert(x) { return x; } - - // x = x mod m (HAC 14.42) - function barrettReduce(x) { - x.drShiftTo(this.m.t-1,this.r2); - if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } - this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); - this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); - while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); - x.subTo(this.r2,x); - while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); - } - - // r = x^2 mod m; x != r - function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } - - // r = x*y mod m; x,y != r - function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } - - Barrett.prototype.convert = barrettConvert; - Barrett.prototype.revert = barrettRevert; - Barrett.prototype.reduce = barrettReduce; - Barrett.prototype.mulTo = barrettMulTo; - Barrett.prototype.sqrTo = barrettSqrTo; - - // (public) this^e % m (HAC 14.85) - function bnModPow(e,m) { - var i = e.bitLength(), k, r = nbv(1), z; - if(i <= 0) return r; - else if(i < 18) k = 1; - else if(i < 48) k = 3; - else if(i < 144) k = 4; - else if(i < 768) k = 5; - else k = 6; - if(i < 8) - z = new Classic(m); - else if(m.isEven()) - z = new Barrett(m); - else - z = new Montgomery(m); - - // precomputation - var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { - var g2 = nbi(); - z.sqrTo(g[1],g2); - while(n <= km) { - g[n] = nbi(); - z.mulTo(g2,g[n-2],g[n]); - n += 2; - } - } - - var j = e.t-1, w, is1 = true, r2 = nbi(), t; - i = nbits(e[j])-1; - while(j >= 0) { - if(i >= k1) w = (e[j]>>(i-k1))&km; - else { - w = (e[j]&((1<<(i+1))-1))<<(k1-i); - if(j > 0) w |= e[j-1]>>(this.DB+i-k1); - } - - n = k; - while((w&1) == 0) { w >>= 1; --n; } - if((i -= n) < 0) { i += this.DB; --j; } - if(is1) { // ret == 1, don't bother squaring or multiplying it - g[w].copyTo(r); - is1 = false; - } - else { - while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } - if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } - z.mulTo(r2,g[w],r); - } - - while(j >= 0 && (e[j]&(1< 0) { - x.rShiftTo(g,x); - y.rShiftTo(g,y); - } - while(x.signum() > 0) { - if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); - if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); - if(x.compareTo(y) >= 0) { - x.subTo(y,x); - x.rShiftTo(1,x); - } - else { - y.subTo(x,y); - y.rShiftTo(1,y); - } - } - if(g > 0) y.lShiftTo(g,y); - return y; - } - - // (protected) this % n, n < 2^26 - function bnpModInt(n) { - if(n <= 0) return 0; - var d = this.DV%n, r = (this.s<0)?n-1:0; - if(this.t > 0) - if(d == 0) r = this[0]%n; - else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; - return r; - } - - // (public) 1/this % m (HAC 14.61) - function bnModInverse(m) { - var ac = m.isEven(); - if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; - var u = m.clone(), v = this.clone(); - var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); - while(u.signum() != 0) { - while(u.isEven()) { - u.rShiftTo(1,u); - if(ac) { - if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } - a.rShiftTo(1,a); - } - else if(!b.isEven()) b.subTo(m,b); - b.rShiftTo(1,b); - } - while(v.isEven()) { - v.rShiftTo(1,v); - if(ac) { - if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } - c.rShiftTo(1,c); - } - else if(!d.isEven()) d.subTo(m,d); - d.rShiftTo(1,d); - } - if(u.compareTo(v) >= 0) { - u.subTo(v,u); - if(ac) a.subTo(c,a); - b.subTo(d,b); - } - else { - v.subTo(u,v); - if(ac) c.subTo(a,c); - d.subTo(b,d); - } - } - if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; - if(d.compareTo(m) >= 0) return d.subtract(m); - if(d.signum() < 0) d.addTo(m,d); else return d; - if(d.signum() < 0) return d.add(m); else return d; - } - - var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; - var lplim = (1<<26)/lowprimes[lowprimes.length-1]; - - // (public) test primality with certainty >= 1-.5^t - function bnIsProbablePrime(t) { - var i, x = this.abs(); - if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { - for(i = 0; i < lowprimes.length; ++i) - if(x[0] == lowprimes[i]) return true; - return false; - } - if(x.isEven()) return false; - i = 1; - while(i < lowprimes.length) { - var m = lowprimes[i], j = i+1; - while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; - m = x.modInt(m); - while(i < j) if(m%lowprimes[i++] == 0) return false; - } - return x.millerRabin(t); - } - - // (protected) true if probably prime (HAC 4.24, Miller-Rabin) - function bnpMillerRabin(t) { - var n1 = this.subtract(BigInteger.ONE); - var k = n1.getLowestSetBit(); - if(k <= 0) return false; - var r = n1.shiftRight(k); - t = (t+1)>>1; - if(t > lowprimes.length) t = lowprimes.length; - var a = nbi(); - for(var i = 0; i < t; ++i) { - //Pick bases at random, instead of starting at 2 - a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); - var y = a.modPow(r,this); - if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { - var j = 1; - while(j++ < k && y.compareTo(n1) != 0) { - y = y.modPowInt(2,this); - if(y.compareTo(BigInteger.ONE) == 0) return false; - } - if(y.compareTo(n1) != 0) return false; - } - } - return true; - } - - // protected - BigInteger.prototype.chunkSize = bnpChunkSize; - BigInteger.prototype.toRadix = bnpToRadix; - BigInteger.prototype.fromRadix = bnpFromRadix; - BigInteger.prototype.fromNumber = bnpFromNumber; - BigInteger.prototype.bitwiseTo = bnpBitwiseTo; - BigInteger.prototype.changeBit = bnpChangeBit; - BigInteger.prototype.addTo = bnpAddTo; - BigInteger.prototype.dMultiply = bnpDMultiply; - BigInteger.prototype.dAddOffset = bnpDAddOffset; - BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; - BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; - BigInteger.prototype.modInt = bnpModInt; - BigInteger.prototype.millerRabin = bnpMillerRabin; - - // public - BigInteger.prototype.clone = bnClone; - BigInteger.prototype.intValue = bnIntValue; - BigInteger.prototype.byteValue = bnByteValue; - BigInteger.prototype.shortValue = bnShortValue; - BigInteger.prototype.signum = bnSigNum; - BigInteger.prototype.toByteArray = bnToByteArray; - BigInteger.prototype.equals = bnEquals; - BigInteger.prototype.min = bnMin; - BigInteger.prototype.max = bnMax; - BigInteger.prototype.and = bnAnd; - BigInteger.prototype.or = bnOr; - BigInteger.prototype.xor = bnXor; - BigInteger.prototype.andNot = bnAndNot; - BigInteger.prototype.not = bnNot; - BigInteger.prototype.shiftLeft = bnShiftLeft; - BigInteger.prototype.shiftRight = bnShiftRight; - BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; - BigInteger.prototype.bitCount = bnBitCount; - BigInteger.prototype.testBit = bnTestBit; - BigInteger.prototype.setBit = bnSetBit; - BigInteger.prototype.clearBit = bnClearBit; - BigInteger.prototype.flipBit = bnFlipBit; - BigInteger.prototype.add = bnAdd; - BigInteger.prototype.subtract = bnSubtract; - BigInteger.prototype.multiply = bnMultiply; - BigInteger.prototype.divide = bnDivide; - BigInteger.prototype.remainder = bnRemainder; - BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; - BigInteger.prototype.modPow = bnModPow; - BigInteger.prototype.modInverse = bnModInverse; - BigInteger.prototype.pow = bnPow; - BigInteger.prototype.gcd = bnGCD; - BigInteger.prototype.isProbablePrime = bnIsProbablePrime; - - // JSBN-specific extension - BigInteger.prototype.square = bnSquare; - - // Expose the Barrett function - BigInteger.prototype.Barrett = Barrett - - // BigInteger interfaces not implemented in jsbn: - - // BigInteger(int signum, byte[] magnitude) - // double doubleValue() - // float floatValue() - // int hashCode() - // long longValue() - // static BigInteger valueOf(long val) - - // Random number generator - requires a PRNG backend, e.g. prng4.js - - // For best results, put code like - // - // in your main HTML document. - - var rng_state; - var rng_pool; - var rng_pptr; - - // Mix in a 32-bit integer into the pool - function rng_seed_int(x) { - rng_pool[rng_pptr++] ^= x & 255; - rng_pool[rng_pptr++] ^= (x >> 8) & 255; - rng_pool[rng_pptr++] ^= (x >> 16) & 255; - rng_pool[rng_pptr++] ^= (x >> 24) & 255; - if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; - } - - // Mix in the current time (w/milliseconds) into the pool - function rng_seed_time() { - rng_seed_int(new Date().getTime()); - } - - // Initialize the pool with junk if needed. - if(rng_pool == null) { - rng_pool = new Array(); - rng_pptr = 0; - var t; - if(typeof window !== "undefined" && window.crypto) { - if (window.crypto.getRandomValues) { - // Use webcrypto if available - var ua = new Uint8Array(32); - window.crypto.getRandomValues(ua); - for(t = 0; t < 32; ++t) - rng_pool[rng_pptr++] = ua[t]; - } - else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { - // Extract entropy (256 bits) from NS4 RNG if available - var z = window.crypto.random(32); - for(t = 0; t < z.length; ++t) - rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; - } - } - while(rng_pptr < rng_psize) { // extract some randomness from Math.random() - t = Math.floor(65536 * Math.random()); - rng_pool[rng_pptr++] = t >>> 8; - rng_pool[rng_pptr++] = t & 255; - } - rng_pptr = 0; - rng_seed_time(); - //rng_seed_int(window.screenX); - //rng_seed_int(window.screenY); - } - - function rng_get_byte() { - if(rng_state == null) { - rng_seed_time(); - rng_state = prng_newstate(); - rng_state.init(rng_pool); - for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) - rng_pool[rng_pptr] = 0; - rng_pptr = 0; - //rng_pool = null; - } - // TODO: allow reseeding after first request - return rng_state.next(); - } - - function rng_get_bytes(ba) { - var i; - for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); - } - - function SecureRandom() {} - - SecureRandom.prototype.nextBytes = rng_get_bytes; - - // prng4.js - uses Arcfour as a PRNG - - function Arcfour() { - this.i = 0; - this.j = 0; - this.S = new Array(); - } - - // Initialize arcfour context from key, an array of ints, each from [0..255] - function ARC4init(key) { - var i, j, t; - for(i = 0; i < 256; ++i) - this.S[i] = i; - j = 0; - for(i = 0; i < 256; ++i) { - j = (j + this.S[i] + key[i % key.length]) & 255; - t = this.S[i]; - this.S[i] = this.S[j]; - this.S[j] = t; - } - this.i = 0; - this.j = 0; - } - - function ARC4next() { - var t; - this.i = (this.i + 1) & 255; - this.j = (this.j + this.S[this.i]) & 255; - t = this.S[this.i]; - this.S[this.i] = this.S[this.j]; - this.S[this.j] = t; - return this.S[(t + this.S[this.i]) & 255]; - } - - Arcfour.prototype.init = ARC4init; - Arcfour.prototype.next = ARC4next; - - // Plug in your RNG constructor here - function prng_newstate() { - return new Arcfour(); - } - - // Pool size must be a multiple of 4 and greater than 32. - // An array of bytes the size of the pool will be passed to init() - var rng_psize = 256; - - BigInteger.SecureRandom = SecureRandom; - BigInteger.BigInteger = BigInteger; - if (true) { - exports = module.exports = BigInteger; - } else { - this.BigInteger = BigInteger; - this.SecureRandom = SecureRandom; - } - -}).call(this); - - -/***/ }), -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - write: write -}; - -var assert = __webpack_require__(17); -var asn1 = __webpack_require__(53); -var crypto = __webpack_require__(14); -var algs = __webpack_require__(26); -var utils = __webpack_require__(25); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); - -var pkcs1 = __webpack_require__(201); -var pkcs8 = __webpack_require__(103); -var sshpriv = __webpack_require__(138); -var rfc4253 = __webpack_require__(71); - -var errors = __webpack_require__(50); - -/* - * For reading we support both PKCS#1 and PKCS#8. If we find a private key, - * we just take the public component of it and use that. - */ -function read(buf, options, forceType) { - var input = buf; - if (typeof (buf) !== 'string') { - assert.buffer(buf, 'buf'); - buf = buf.toString('ascii'); - } - - var lines = buf.trim().split('\n'); - - var m = lines[0].match(/*JSSTYLED*/ - /[-]+[ ]*BEGIN ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - assert.ok(m, 'invalid PEM header'); - - var m2 = lines[lines.length - 1].match(/*JSSTYLED*/ - /[-]+[ ]*END ([A-Z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); - assert.ok(m2, 'invalid PEM footer'); - - /* Begin and end banners must match key type */ - assert.equal(m[2], m2[2]); - var type = m[2].toLowerCase(); - - var alg; - if (m[1]) { - /* They also must match algorithms, if given */ - assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); - alg = m[1].trim(); - } - - var headers = {}; - while (true) { - lines = lines.slice(1); - m = lines[0].match(/*JSSTYLED*/ - /^([A-Za-z0-9-]+): (.+)$/); - if (!m) - break; - headers[m[1].toLowerCase()] = m[2]; - } - - var cipher, key, iv; - if (headers['proc-type']) { - var parts = headers['proc-type'].split(','); - if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { - if (typeof (options.passphrase) === 'string') { - options.passphrase = new Buffer( - options.passphrase, 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'PEM')); - } else { - parts = headers['dek-info'].split(','); - assert.ok(parts.length === 2); - cipher = parts[0].toLowerCase(); - iv = new Buffer(parts[1], 'hex'); - key = utils.opensslKeyDeriv(cipher, iv, - options.passphrase, 1).key; - } - } - } - - /* Chop off the first and last lines */ - lines = lines.slice(0, -1).join(''); - buf = new Buffer(lines, 'base64'); - - if (cipher && key && iv) { - var cipherStream = crypto.createDecipheriv(cipher, key, iv); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - if (e.toString().indexOf('bad decrypt') !== -1) { - throw (new Error('Incorrect passphrase ' + - 'supplied, could not decrypt key')); - } - throw (e); - }); - cipherStream.write(buf); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - buf = Buffer.concat(chunks); - } - - /* The new OpenSSH internal format abuses PEM headers */ - if (alg && alg.toLowerCase() === 'openssh') - return (sshpriv.readSSHPrivate(type, buf, options)); - if (alg && alg.toLowerCase() === 'ssh2') - return (rfc4253.readType(type, buf, options)); - - var der = new asn1.BerReader(buf); - der.originalInput = input; - - /* - * All of the PEM file types start with a sequence tag, so chop it - * off here - */ - der.readSequence(); - - /* PKCS#1 type keys name an algorithm in the banner explicitly */ - if (alg) { - if (forceType) - assert.strictEqual(forceType, 'pkcs1'); - return (pkcs1.readPkcs1(alg, type, der)); - } else { - if (forceType) - assert.strictEqual(forceType, 'pkcs8'); - return (pkcs8.readPkcs8(alg, type, der)); - } -} - -function write(key, options, type) { - assert.object(key); - - var alg = {'ecdsa': 'EC', 'rsa': 'RSA', 'dsa': 'DSA'}[key.type]; - var header; - - var der = new asn1.BerWriter(); - - if (PrivateKey.isPrivateKey(key)) { - if (type && type === 'pkcs8') { - header = 'PRIVATE KEY'; - pkcs8.writePkcs8(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs1'); - header = alg + ' PRIVATE KEY'; - pkcs1.writePkcs1(der, key); - } - - } else if (Key.isKey(key)) { - if (type && type === 'pkcs1') { - header = alg + ' PUBLIC KEY'; - pkcs1.writePkcs1(der, key); - } else { - if (type) - assert.strictEqual(type, 'pkcs8'); - header = 'PUBLIC KEY'; - pkcs8.writePkcs8(der, key); - } - - } else { - throw (new Error('key is not a Key or PrivateKey')); - } - - var tmp = der.buffer.toString('base64'); - var len = tmp.length + (tmp.length / 64) + - 18 + 16 + header.length*2 + 10; - var buf = new Buffer(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 64; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} - - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - - -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - ucs2length: __webpack_require__(352), - varOccurences: varOccurences, - varReplace: varReplace, - cleanUpCode: cleanUpCode, - cleanUpVarErrors: cleanUpVarErrors, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - stableStringify: __webpack_require__(194), - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - - -function checkDataType(dataType, data, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; - } -} - - -function checkDataTypes(dataTypes, data) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; - } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, true); - - return code; - } -} - - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } - - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - result[_key2 - 1] = arguments[_key2]; - } - - var res = result; - - if (result.length <= 1) { - res = result[0]; - } - - if (firstData) { - res = err; - err = null; - } - - if (err) { - reject(err); - } else { - resolve(res); - } - }); - - fn.apply(null, args); - }); - }; -} - -function queue(arr, promiseProducer) { - var concurrency = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Infinity; - - concurrency = Math.min(concurrency, arr.length); - - // clone - arr = arr.slice(); - - var results = []; - var total = arr.length; - if (!total) { - return (_promise || _load_promise()).default.resolve(results); - } - - return new (_promise || _load_promise()).default(function (resolve, reject) { - for (var i = 0; i < concurrency; i++) { - next(); - } - - function next() { - var item = arr.shift(); - var promise = promiseProducer(item); - - promise.then(function (result) { - results.push(result); - - total--; - if (total === 0) { - resolve(results); - } else { - if (arr.length) { - next(); - } - } - }, reject); - } - }); -} - -/***/ }), -/* 67 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _normalizePattern2; - -function _load_normalizePattern() { - return _normalizePattern2 = __webpack_require__(42); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var semver = __webpack_require__(20); - -var WorkspaceLayout = function () { - function WorkspaceLayout(workspaces, config) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, WorkspaceLayout); - - this.workspaces = workspaces; - this.config = config; - } - - WorkspaceLayout.prototype.getWorkspaceManifest = function getWorkspaceManifest(key) { - return this.workspaces[key]; - }; - - WorkspaceLayout.prototype.getManifestByPattern = function getManifestByPattern(pattern) { - var _normalizePattern = (0, (_normalizePattern2 || _load_normalizePattern()).normalizePattern)(pattern), - name = _normalizePattern.name, - range = _normalizePattern.range; - - var workspace = this.getWorkspaceManifest(name); - if (!workspace || !semver.satisfies(workspace.manifest.version, range, this.config.looseSemver)) { - return null; - } - return workspace; - }; - - return WorkspaceLayout; -}(); - -exports.default = WorkspaceLayout; - -/***/ }), -/* 68 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function(it, key){ - return hasOwnProperty.call(it, key); -}; - -/***/ }), -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(172) - , defined = __webpack_require__(116); -module.exports = function(it){ - return IObject(defined(it)); -}; - -/***/ }), -/* 70 */ -/***/ (function(module, exports, __webpack_require__) { - -var Stream = __webpack_require__(29); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream; - exports = module.exports = Stream.Readable; - exports.Readable = Stream.Readable; - exports.Writable = Stream.Writable; - exports.Duplex = Stream.Duplex; - exports.Transform = Stream.Transform; - exports.PassThrough = Stream.PassThrough; - exports.Stream = Stream; -} else { - exports = module.exports = __webpack_require__(305); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = __webpack_require__(307); - exports.Duplex = __webpack_require__(81); - exports.Transform = __webpack_require__(306); - exports.PassThrough = __webpack_require__(685); -} - - /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read.bind(undefined, false, undefined), - readType: read.bind(undefined, false), - write: write, - /* semi-private api, used by sshpk-agent */ - readPartial: read.bind(undefined, true), - - /* shared with ssh format */ - readInternal: read, - keyTypeToAlg: keyTypeToAlg, - algToKeyType: algToKeyType -}; - -var assert = __webpack_require__(17); -var algs = __webpack_require__(26); -var utils = __webpack_require__(25); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); -var SSHBuffer = __webpack_require__(139); - -function algToKeyType(alg) { - assert.string(alg); - if (alg === 'ssh-dss') - return ('dsa'); - else if (alg === 'ssh-rsa') - return ('rsa'); - else if (alg === 'ssh-ed25519') - return ('ed25519'); - else if (alg === 'ssh-curve25519') - return ('curve25519'); - else if (alg.match(/^ecdsa-sha2-/)) - return ('ecdsa'); - else - throw (new Error('Unknown algorithm ' + alg)); -} - -function keyTypeToAlg(key) { - assert.object(key); - if (key.type === 'dsa') - return ('ssh-dss'); - else if (key.type === 'rsa') - return ('ssh-rsa'); - else if (key.type === 'ed25519') - return ('ssh-ed25519'); - else if (key.type === 'curve25519') - return ('ssh-curve25519'); - else if (key.type === 'ecdsa') - return ('ecdsa-sha2-' + key.part.curve.data.toString()); - else - throw (new Error('Unknown key type ' + key.type)); -} - -function read(partial, type, buf, options) { - if (typeof (buf) === 'string') - buf = new Buffer(buf); - assert.buffer(buf, 'buf'); - - var key = {}; - - var parts = key.parts = []; - var sshbuf = new SSHBuffer({buffer: buf}); - - var alg = sshbuf.readString(); - assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); - - key.type = algToKeyType(alg); - - var partCount = algs.info[key.type].parts.length; - if (type && type === 'private') - partCount = algs.privInfo[key.type].parts.length; - - while (!sshbuf.atEnd() && parts.length < partCount) - parts.push(sshbuf.readPart()); - while (!partial && !sshbuf.atEnd()) - parts.push(sshbuf.readPart()); - - assert.ok(parts.length >= 1, - 'key must have at least one part'); - assert.ok(partial || sshbuf.atEnd(), - 'leftover bytes at end of key'); - - var Constructor = Key; - var algInfo = algs.info[key.type]; - if (type === 'private' || algInfo.parts.length !== parts.length) { - algInfo = algs.privInfo[key.type]; - Constructor = PrivateKey; - } - assert.strictEqual(algInfo.parts.length, parts.length); - - if (key.type === 'ecdsa') { - var res = /^ecdsa-sha2-(.+)$/.exec(alg); - assert.ok(res !== null); - assert.strictEqual(res[1], parts[0].data.toString()); - } - - var normalized = true; - for (var i = 0; i < algInfo.parts.length; ++i) { - parts[i].name = algInfo.parts[i]; - if (parts[i].name !== 'curve' && - algInfo.normalize !== false) { - var p = parts[i]; - var nd = utils.mpNormalize(p.data); - if (nd !== p.data) { - p.data = nd; - normalized = false; - } - } - } - - if (normalized) - key._rfc4253Cache = sshbuf.toBuffer(); - - if (partial && typeof (partial) === 'object') { - partial.remainder = sshbuf.remainder(); - partial.consumed = sshbuf._offset; - } - - return (new Constructor(key)); -} - -function write(key, options) { - assert.object(key); - - var alg = keyTypeToAlg(key); - var i; - - var algInfo = algs.info[key.type]; - if (PrivateKey.isPrivateKey(key)) - algInfo = algs.privInfo[key.type]; - var parts = algInfo.parts; - - var buf = new SSHBuffer({}); - - buf.writeString(alg); - - for (i = 0; i < parts.length; ++i) { - var data = key.part[parts[i]].data; - if (algInfo.normalize !== false) - data = utils.mpNormalize(data); - buf.writeBuffer(data); - } - - return (buf.toBuffer()); -} - - -/***/ }), -/* 72 */ -/***/ (function(module, exports) { - -module.exports = require("events"); - -/***/ }), -/* 73 */ -/***/ (function(module, exports) { - -module.exports = require("os"); - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _stringify; - -function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); -} - -exports.stringifyLangArgs = stringifyLangArgs; - -var _format; - -function _load_format() { - return _format = __webpack_require__(242); -} - -var _index; - -function _load_index() { - return _index = _interopRequireWildcard(__webpack_require__(243)); -} - -var _isCi; - -function _load_isCi() { - return _isCi = _interopRequireDefault(__webpack_require__(191)); -} - -var _os; - -function _load_os() { - return _os = _interopRequireDefault(__webpack_require__(73)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var util = __webpack_require__(4); -/* eslint no-unused-vars: 0 */ - -var EventEmitter = __webpack_require__(72).EventEmitter; - -function stringifyLangArgs(args) { - return args.map(function (val) { - if (val != null && val.inspect) { - return val.inspect(); - } else { - try { - var str = (0, (_stringify || _load_stringify()).default)(val) || val + ''; - // should match all literal line breaks and - // "u001b" that follow an odd number of backslashes and convert them to ESC - // we do this because the JSON.stringify process has escaped these characters - return str.replace(/((?:^|[^\\])(?:\\{2})*)\\u001[bB]/g, '$1\u001b').replace(/[\\]r[\\]n|([\\])?[\\]n/g, function (match, precededBacklash) { - // precededBacklash not null when "\n" is preceded by a backlash ("\\n") - // match will be "\\n" and we don't replace it with os.EOL - return precededBacklash ? match : (_os || _load_os()).default.EOL; - }); - } catch (e) { - return util.inspect(val); - } - } - }); -} - -var BaseReporter = function () { - function BaseReporter() { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BaseReporter); - - var lang = 'en'; - this.language = lang; - - this.stdout = opts.stdout || process.stdout; - this.stderr = opts.stderr || process.stderr; - this.stdin = opts.stdin || this._getStandardInput(); - this.emoji = !!opts.emoji; - this.nonInteractive = !!opts.nonInteractive; - this.noProgress = !!opts.noProgress || (_isCi || _load_isCi()).default; - this.isVerbose = !!opts.verbose; - - // $FlowFixMe: this is valid! - this.isTTY = this.stdout.isTTY; - - this.peakMemory = 0; - this.startTime = Date.now(); - this.format = (_format || _load_format()).defaultFormatter; - } - - BaseReporter.prototype.lang = function lang(key) { - var msg = (_index || _load_index())[this.language][key] || (_index || _load_index()).en[key]; - if (!msg) { - throw new ReferenceError(`No message defined for language key ${key}`); - } - - // stringify args - - for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - var stringifiedArgs = stringifyLangArgs(args); - - // replace $0 placeholders with args - return msg.replace(/\$(\d+)/g, function (str, i) { - return stringifiedArgs[i]; - }); - }; - - /** - * `stringifyLangArgs` run `JSON.stringify` on strings too causing - * them to appear quoted. This marks them as "raw" and prevents - * the quoting and escaping - */ - - - BaseReporter.prototype.rawText = function rawText(str) { - return { - inspect() { - return str; - } - }; - }; - - BaseReporter.prototype.verbose = function verbose(msg) { - if (this.isVerbose) { - this._verbose(msg); - } - }; - - BaseReporter.prototype.verboseInspect = function verboseInspect(val) { - if (this.isVerbose) { - this._verboseInspect(val); - } - }; - - BaseReporter.prototype._verbose = function _verbose(msg) {}; - - BaseReporter.prototype._verboseInspect = function _verboseInspect(val) {}; - - BaseReporter.prototype._getStandardInput = function _getStandardInput() { - var standardInput = void 0; - - // Accessing stdin in a win32 headless process (e.g., Visual Studio) may throw an exception. - try { - standardInput = process.stdin; - } catch (e) { - console.warn(e.message); - delete process.stdin; - // $FlowFixMe: this is valid! - process.stdin = new EventEmitter(); - standardInput = process.stdin; - } - - return standardInput; - }; - - BaseReporter.prototype.initPeakMemoryCounter = function initPeakMemoryCounter() { - var _this = this; - - this.checkPeakMemory(); - this.peakMemoryInterval = setInterval(function () { - _this.checkPeakMemory(); - }, 1000); - // $FlowFixMe: Node's setInterval returns a Timeout, not a Number - this.peakMemoryInterval.unref(); - }; - - BaseReporter.prototype.checkPeakMemory = function checkPeakMemory() { - var _process$memoryUsage = process.memoryUsage(), - heapTotal = _process$memoryUsage.heapTotal; - - if (heapTotal > this.peakMemory) { - this.peakMemory = heapTotal; - } - }; - - BaseReporter.prototype.close = function close() { - if (this.peakMemoryInterval) { - clearInterval(this.peakMemoryInterval); - this.peakMemoryInterval = null; - } - }; - - BaseReporter.prototype.getTotalTime = function getTotalTime() { - return Date.now() - this.startTime; - }; - - // TODO - - - BaseReporter.prototype.list = function list(key, items, hints) {}; - - // Outputs basic tree structure to console - - - BaseReporter.prototype.tree = function tree(key, obj) {}; - - // called whenever we begin a step in the CLI. - - - BaseReporter.prototype.step = function step(current, total, message, emoji) {}; - - // a error message has been triggered. this however does not always meant an abrupt - // program end. - - - BaseReporter.prototype.error = function error(message) {}; - - // an info message has been triggered. this provides things like stats and diagnostics. - - - BaseReporter.prototype.info = function info(message) {}; - - // a warning message has been triggered. - - - BaseReporter.prototype.warn = function warn(message) {}; - - // a success message has been triggered. - - - BaseReporter.prototype.success = function success(message) {}; - - // a simple log message - // TODO: rethink the {force} parameter. In the meantime, please don't use it (cf comments in #4143). - - - BaseReporter.prototype.log = function log(message) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$force = _ref.force, - force = _ref$force === undefined ? false : _ref$force; - }; - - // a shell command has been executed - - - BaseReporter.prototype.command = function command(_command) {}; - - // inspect and pretty-print any value - - - BaseReporter.prototype.inspect = function inspect(value) {}; - - // the screen shown at the very start of the CLI - - - BaseReporter.prototype.header = function header(command, pkg) {}; - - // the screen shown at the very end of the CLI - - - BaseReporter.prototype.footer = function footer(showPeakMemory) {}; - - // - - - BaseReporter.prototype.table = function table(head, body) {}; - - // render an activity spinner and return a function that will trigger an update - - - BaseReporter.prototype.activity = function activity() { - return { - tick(name) {}, - end() {} - }; - }; - - // - - - BaseReporter.prototype.activitySet = function activitySet(total, workers) { - return { - spinners: Array(workers).fill({ - clear() {}, - setPrefix() {}, - tick() {}, - end() {} - }), - end() {} - }; - }; - - // - - - BaseReporter.prototype.question = function question(_question) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - return (_promise || _load_promise()).default.reject(new Error('Not implemented')); - }; - - // - - - BaseReporter.prototype.questionAffirm = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (question) { - var condition = true; // trick eslint - if (this.nonInteractive) { - return true; - } - - while (condition) { - var answer = yield this.question(question); - answer = answer.toLowerCase(); - - if (answer === 'y' || answer === 'yes') { - return true; - } - if (answer === 'n' || answer === 'no') { - return false; - } - - this.error('Invalid answer for question'); - } - - return false; - }); - - function questionAffirm(_x4) { - return _ref2.apply(this, arguments); - } - - return questionAffirm; - }(); - - // prompt the user to select an option from an array - - - BaseReporter.prototype.select = function select(header, question, options) { - return (_promise || _load_promise()).default.reject(new Error('Not implemented')); - }; - - // render a progress bar and return a function which when called will trigger an update - - - BaseReporter.prototype.progress = function progress(total) { - return function () {}; - }; - - // utility function to disable progress bar - - - BaseReporter.prototype.disableProgress = function disableProgress() { - this.noProgress = true; - }; - - // - - - BaseReporter.prototype.prompt = function prompt(message, choices) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - return (_promise || _load_promise()).default.reject(new Error('Not implemented')); - }; - - return BaseReporter; -}(); - -exports.default = BaseReporter; - -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -exports.explodeHostedGitFragment = explodeHostedGitFragment; - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _index; - -function _load_index() { - return _index = __webpack_require__(40); -} - -var _gitResolver; - -function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(89)); -} - -var _exoticResolver; - -function _load_exoticResolver() { - return _exoticResolver = _interopRequireDefault(__webpack_require__(65)); -} - -var _git; - -function _load_git() { - return _git = _interopRequireDefault(__webpack_require__(159)); -} - -var _guessName; - -function _load_guessName() { - return _guessName = _interopRequireDefault(__webpack_require__(113)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function explodeHostedGitFragment(fragment, reporter) { - var preParts = fragment.split('@'); - if (preParts.length > 2) { - fragment = preParts[1] + '@' + preParts[2]; - } - - var parts = fragment.split(':'); - - if (parts.length == 3) { - // protocol + host + folder - parts[1] = parts[1].indexOf('//') >= 0 ? parts[1].substr(2) : parts[1]; - fragment = parts[1] + '/' + parts[2]; - } else if (parts.length == 2) { - if (parts[0].indexOf('@') == -1) { - // protocol + host - fragment = parts[1]; - } else { - // host + folder - fragment = parts[0] + '/' + parts[1]; - } - } else if (parts.length == 1) { - fragment = parts[0]; - } else { - throw new (_errors || _load_errors()).MessageError(reporter.lang('invalidHostedGitFragment', fragment)); - } - - var userParts = fragment.split('/'); - - if (userParts.length >= 2) { - if (userParts[0].indexOf('@') >= 0) { - userParts.shift(); - } - - var _user = userParts.shift(); - var repoParts = userParts.join('/').split(/(?:[.]git)?#(.*)/); - - if (repoParts.length <= 3) { - return { - user: _user, - repo: repoParts[0].replace(/\.git$/, ''), - hash: repoParts[1] || '' - }; - } - } - - throw new (_errors || _load_errors()).MessageError(reporter.lang('invalidHostedGitFragment', fragment)); -} - -var HostedGitResolver = function (_ExoticResolver) { - (0, (_inherits2 || _load_inherits()).default)(HostedGitResolver, _ExoticResolver); - - function HostedGitResolver(request, fragment) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, HostedGitResolver); - - var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _ExoticResolver.call(this, request, fragment)); - - var exploded = _this.exploded = explodeHostedGitFragment(fragment, _this.reporter); - var user = exploded.user, - repo = exploded.repo, - hash = exploded.hash; - - _this.user = user; - _this.repo = repo; - _this.hash = hash; - return _this; - } - - HostedGitResolver.getTarballUrl = function getTarballUrl(exploded, commit) { - exploded; - commit; - throw new Error('Not implemented'); - }; - - HostedGitResolver.getGitHTTPUrl = function getGitHTTPUrl(exploded) { - exploded; - throw new Error('Not implemented'); - }; - - HostedGitResolver.getGitHTTPBaseUrl = function getGitHTTPBaseUrl(exploded) { - exploded; - throw new Error('Not implemented'); - }; - - HostedGitResolver.getGitSSHUrl = function getGitSSHUrl(exploded) { - exploded; - throw new Error('Not implemented'); - }; - - HostedGitResolver.getHTTPFileUrl = function getHTTPFileUrl(exploded, filename, commit) { - exploded; - filename; - commit; - throw new Error('Not implemented'); - }; - - HostedGitResolver.prototype.getRefOverHTTP = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (url) { - var gitUrl = (_git || _load_git()).default.npmUrlToGitUrl(url); - var client = new (_git || _load_git()).default(this.config, gitUrl, this.hash); - - var out = yield this.config.requestManager.request({ - url: `${url}/info/refs?service=git-upload-pack`, - queue: this.resolver.fetchingQueue - }); - - if (out) { - // clean up output - var lines = out.trim().split('\n'); - - // remove first two lines which contains compatibility info etc - lines = lines.slice(2); - - // remove last line which contains the terminator "0000" - lines.pop(); - - // remove line lengths from start of each line - lines = lines.map(function (line) { - return line.slice(4); - }); - - out = lines.join('\n'); - } else { - throw new Error(this.reporter.lang('hostedGitResolveError')); - } - - return client.setRefHosted(out); - }); - - function getRefOverHTTP(_x) { - return _ref.apply(this, arguments); - } - - return getRefOverHTTP; - }(); - - HostedGitResolver.prototype.resolveOverHTTP = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (url) { - var _this2 = this; - - var commit = yield this.getRefOverHTTP(url); - var config = this.config; - - - var tarballUrl = this.constructor.getTarballUrl(this.exploded, commit); - - var tryRegistry = function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (registry) { - var filename = (_index || _load_index()).registries[registry].filename; - - var href = _this2.constructor.getHTTPFileUrl(_this2.exploded, filename, commit); - var file = yield config.requestManager.request({ - url: href, - queue: _this2.resolver.fetchingQueue - }); - if (!file) { - return null; - } - - var json = yield config.readJson(href, function () { - return JSON.parse(file); - }); - json._uid = commit; - json._remote = { - resolved: tarballUrl, - type: 'tarball', - reference: tarballUrl, - registry - }; - return json; - }); - - return function tryRegistry(_x3) { - return _ref3.apply(this, arguments); - }; - }(); - - var file = yield tryRegistry(this.registry); - if (file) { - return file; - } - - for (var registry in (_index || _load_index()).registries) { - if (registry === this.registry) { - continue; - } - - var _file = yield tryRegistry(registry); - if (_file) { - return _file; - } - } - - return { - name: (0, (_guessName || _load_guessName()).default)(url), - version: '0.0.0', - _uid: commit, - _remote: { - resolved: tarballUrl, - type: 'tarball', - reference: tarballUrl, - registry: 'npm', - hash: undefined - } - }; - }); - - function resolveOverHTTP(_x2) { - return _ref2.apply(this, arguments); - } - - return resolveOverHTTP; - }(); - - HostedGitResolver.prototype.hasHTTPCapability = function () { - var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (url) { - return (yield this.config.requestManager.request({ - url, - method: 'HEAD', - queue: this.resolver.fetchingQueue, - followRedirect: false - })) !== false; - }); - - function hasHTTPCapability(_x4) { - return _ref4.apply(this, arguments); - } - - return hasHTTPCapability; - }(); - - HostedGitResolver.prototype.resolve = function () { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - // If we already have the tarball, just return it without having to make any HTTP requests. - var shrunk = this.request.getLocked('tarball'); - if (shrunk) { - return shrunk; - } - - var httpUrl = this.constructor.getGitHTTPUrl(this.exploded); - var httpBaseUrl = this.constructor.getGitHTTPBaseUrl(this.exploded); - var sshUrl = this.constructor.getGitSSHUrl(this.exploded); - - // If we can access the files over HTTP then we should as it's MUCH faster than git - // archive and tarball unarchiving. The HTTP API is only available for public repos - // though. - if (yield this.hasHTTPCapability(httpBaseUrl)) { - return this.resolveOverHTTP(httpUrl); - } - - // If the url is accessible over git archive then we should immediately delegate to - // the git resolver. - // - // NOTE: Here we use a different url than when we delegate to the git resolver later on. - // This is because `git archive` requires access over ssh and github only allows that - // if you have write permissions - var sshGitUrl = (_git || _load_git()).default.npmUrlToGitUrl(sshUrl); - if (yield (_git || _load_git()).default.hasArchiveCapability(sshGitUrl)) { - var archiveClient = new (_git || _load_git()).default(this.config, sshGitUrl, this.hash); - var commit = yield archiveClient.init(); - return this.fork((_gitResolver || _load_gitResolver()).default, true, `${sshUrl}#${commit}`); - } - - // fallback to the plain git resolver - return this.fork((_gitResolver || _load_gitResolver()).default, true, sshUrl); - }); - - function resolve() { - return _ref5.apply(this, arguments); - } - - return resolve; - }(); - - return HostedGitResolver; -}((_exoticResolver || _load_exoticResolver()).default); - -exports.default = HostedGitResolver; - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.home = undefined; - -var _rootUser; - -function _load_rootUser() { - return _rootUser = _interopRequireDefault(__webpack_require__(455)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var path = __webpack_require__(0); - -var home = exports.home = __webpack_require__(73).homedir(); - -var userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; - -exports.default = userHomeDir; - -/***/ }), -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(277) - , enumBugKeys = __webpack_require__(171); - -module.exports = Object.keys || function keys(O){ - return $keys(O, enumBugKeys); -}; - -/***/ }), -/* 78 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(116); -module.exports = function(it){ - return Object(defined(it)); -}; - -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var $at = __webpack_require__(511)(true); - -// 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(173)(String, 'String', function(iterated){ - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function(){ - var O = this._t - , index = this._i - , point; - if(index >= O.length)return {value: undefined, done: true}; - point = $at(O, index); - this._i += point.length; - return {value: point, done: false}; -}); - -/***/ }), -/* 80 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * micromatch - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -var expand = __webpack_require__(650); -var utils = __webpack_require__(195); - -/** - * The main function. Pass an array of filepaths, - * and a string or array of glob patterns - * - * @param {Array|String} `files` - * @param {Array|String} `patterns` - * @param {Object} `opts` - * @return {Array} Array of matches - */ - -function micromatch(files, patterns, opts) { - if (!files || !patterns) return []; - opts = opts || {}; - - if (typeof opts.cache === 'undefined') { - opts.cache = true; - } - - if (!Array.isArray(patterns)) { - return match(files, patterns, opts); - } - - var len = patterns.length, i = 0; - var omit = [], keep = []; - - while (len--) { - var glob = patterns[i++]; - if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) { - omit.push.apply(omit, match(files, glob.slice(1), opts)); - } else { - keep.push.apply(keep, match(files, glob, opts)); - } - } - return utils.diff(keep, omit); -} - -/** - * Return an array of files that match the given glob pattern. - * - * This function is called by the main `micromatch` function If you only - * need to pass a single pattern you might get very minor speed improvements - * using this function. - * - * @param {Array} `files` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Array} - */ - -function match(files, pattern, opts) { - if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { - throw new Error(msg('match', 'files', 'a string or array')); - } - - files = utils.arrayify(files); - opts = opts || {}; - - var negate = opts.negate || false; - var orig = pattern; - - if (typeof pattern === 'string') { - negate = pattern.charAt(0) === '!'; - if (negate) { - pattern = pattern.slice(1); - } - - // we need to remove the character regardless, - // so the above logic is still needed - if (opts.nonegate === true) { - negate = false; - } - } - - var _isMatch = matcher(pattern, opts); - var len = files.length, i = 0; - var res = []; - - while (i < len) { - var file = files[i++]; - var fp = utils.unixify(file, opts); - - if (!_isMatch(fp)) { continue; } - res.push(fp); - } - - if (res.length === 0) { - if (opts.failglob === true) { - throw new Error('micromatch.match() found no matches for: "' + orig + '".'); - } - - if (opts.nonull || opts.nullglob) { - res.push(utils.unescapeGlob(orig)); - } - } - - // if `negate` was defined, diff negated files - if (negate) { res = utils.diff(files, res); } - - // if `ignore` was defined, diff ignored filed - if (opts.ignore && opts.ignore.length) { - pattern = opts.ignore; - opts = utils.omit(opts, ['ignore']); - res = utils.diff(res, micromatch(res, pattern, opts)); - } - - if (opts.nodupes) { - return utils.unique(res); - } - return res; -} - -/** - * Returns a function that takes a glob pattern or array of glob patterns - * to be used with `Array#filter()`. (Internally this function generates - * the matching function using the [matcher] method). - * - * ```js - * var fn = mm.filter('[a-c]'); - * ['a', 'b', 'c', 'd', 'e'].filter(fn); - * //=> ['a', 'b', 'c'] - * ``` - * @param {String|Array} `patterns` Can be a glob or array of globs. - * @param {Options} `opts` Options to pass to the [matcher] method. - * @return {Function} Filter function to be passed to `Array#filter()`. - */ - -function filter(patterns, opts) { - if (!Array.isArray(patterns) && typeof patterns !== 'string') { - throw new TypeError(msg('filter', 'patterns', 'a string or array')); - } - - patterns = utils.arrayify(patterns); - var len = patterns.length, i = 0; - var patternMatchers = Array(len); - while (i < len) { - patternMatchers[i] = matcher(patterns[i++], opts); - } - - return function(fp) { - if (fp == null) return []; - var len = patternMatchers.length, i = 0; - var res = true; - - fp = utils.unixify(fp, opts); - while (i < len) { - var fn = patternMatchers[i++]; - if (!fn(fp)) { - res = false; - break; - } - } - return res; - }; -} - -/** - * Returns true if the filepath contains the given - * pattern. Can also return a function for matching. - * - * ```js - * isMatch('foo.md', '*.md', {}); - * //=> true - * - * isMatch('*.md', {})('foo.md') - * //=> true - * ``` - * @param {String} `fp` - * @param {String} `pattern` - * @param {Object} `opts` - * @return {Boolean} - */ - -function isMatch(fp, pattern, opts) { - if (typeof fp !== 'string') { - throw new TypeError(msg('isMatch', 'filepath', 'a string')); - } - - fp = utils.unixify(fp, opts); - if (utils.typeOf(pattern) === 'object') { - return matcher(fp, pattern); - } - return matcher(pattern, opts)(fp); -} - -/** - * Returns true if the filepath matches the - * given pattern. - */ - -function contains(fp, pattern, opts) { - if (typeof fp !== 'string') { - throw new TypeError(msg('contains', 'pattern', 'a string')); - } - - opts = opts || {}; - opts.contains = (pattern !== ''); - fp = utils.unixify(fp, opts); - - if (opts.contains && !utils.isGlob(pattern)) { - return fp.indexOf(pattern) !== -1; - } - return matcher(pattern, opts)(fp); -} - -/** - * Returns true if a file path matches any of the - * given patterns. - * - * @param {String} `fp` The filepath to test. - * @param {String|Array} `patterns` Glob patterns to use. - * @param {Object} `opts` Options to pass to the `matcher()` function. - * @return {String} - */ - -function any(fp, patterns, opts) { - if (!Array.isArray(patterns) && typeof patterns !== 'string') { - throw new TypeError(msg('any', 'patterns', 'a string or array')); - } - - patterns = utils.arrayify(patterns); - var len = patterns.length; - - fp = utils.unixify(fp, opts); - while (len--) { - var isMatch = matcher(patterns[len], opts); - if (isMatch(fp)) { - return true; - } - } - return false; -} - -/** - * Filter the keys of an object with the given `glob` pattern - * and `options` - * - * @param {Object} `object` - * @param {Pattern} `object` - * @return {Array} - */ - -function matchKeys(obj, glob, options) { - if (utils.typeOf(obj) !== 'object') { - throw new TypeError(msg('matchKeys', 'first argument', 'an object')); - } - - var fn = matcher(glob, options); - var res = {}; - - for (var key in obj) { - if (obj.hasOwnProperty(key) && fn(key)) { - res[key] = obj[key]; - } - } - return res; -} - -/** - * Return a function for matching based on the - * given `pattern` and `options`. - * - * @param {String} `pattern` - * @param {Object} `options` - * @return {Function} - */ - -function matcher(pattern, opts) { - // pattern is a function - if (typeof pattern === 'function') { - return pattern; - } - // pattern is a regex - if (pattern instanceof RegExp) { - return function(fp) { - return pattern.test(fp); - }; - } - - if (typeof pattern !== 'string') { - throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); - } - - // strings, all the way down... - pattern = utils.unixify(pattern, opts); - - // pattern is a non-glob string - if (!utils.isGlob(pattern)) { - return utils.matchPath(pattern, opts); - } - // pattern is a glob string - var re = makeRe(pattern, opts); - - // `matchBase` is defined - if (opts && opts.matchBase) { - return utils.hasFilename(re, opts); - } - // `matchBase` is not defined - return function(fp) { - fp = utils.unixify(fp, opts); - return re.test(fp); - }; -} - -/** - * Create and cache a regular expression for matching - * file paths. - * - * If the leading character in the `glob` is `!`, a negation - * regex is returned. - * - * @param {String} `glob` - * @param {Object} `options` - * @return {RegExp} - */ - -function toRegex(glob, options) { - // clone options to prevent mutating the original object - var opts = Object.create(options || {}); - var flags = opts.flags || ''; - if (opts.nocase && flags.indexOf('i') === -1) { - flags += 'i'; - } - - var parsed = expand(glob, opts); - - // pass in tokens to avoid parsing more than once - opts.negated = opts.negated || parsed.negated; - opts.negate = opts.negated; - glob = wrapGlob(parsed.pattern, opts); - var re; - - try { - re = new RegExp(glob, flags); - return re; - } catch (err) { - err.reason = 'micromatch invalid regex: (' + re + ')'; - if (opts.strict) throw new SyntaxError(err); - } - - // we're only here if a bad pattern was used and the user - // passed `options.silent`, so match nothing - return /$^/; -} - -/** - * Create the regex to do the matching. If the leading - * character in the `glob` is `!` a negation regex is returned. - * - * @param {String} `glob` - * @param {Boolean} `negate` - */ - -function wrapGlob(glob, opts) { - var prefix = (opts && !opts.contains) ? '^' : ''; - var after = (opts && !opts.contains) ? '$' : ''; - glob = ('(?:' + glob + ')' + after); - if (opts && opts.negate) { - return prefix + ('(?!^' + glob + ').*$'); - } - return prefix + glob; -} - -/** - * Create and cache a regular expression for matching file paths. - * If the leading character in the `glob` is `!`, a negation - * regex is returned. - * - * @param {String} `glob` - * @param {Object} `options` - * @return {RegExp} - */ - -function makeRe(glob, opts) { - if (utils.typeOf(glob) !== 'string') { - throw new Error(msg('makeRe', 'glob', 'a string')); - } - return utils.cache(toRegex, glob, opts); -} - -/** - * Make error messages consistent. Follows this format: - * - * ```js - * msg(methodName, argNumber, nativeType); - * // example: - * msg('matchKeys', 'first', 'an object'); - * ``` - * - * @param {String} `method` - * @param {String} `num` - * @param {String} `type` - * @return {String} - */ - -function msg(method, what, type) { - return 'micromatch.' + method + '(): ' + what + ' should be ' + type + '.'; -} - -/** - * Public methods - */ - -/* eslint no-multi-spaces: 0 */ -micromatch.any = any; -micromatch.braces = micromatch.braceExpand = utils.braces; -micromatch.contains = contains; -micromatch.expand = expand; -micromatch.filter = filter; -micromatch.isMatch = isMatch; -micromatch.makeRe = makeRe; -micromatch.match = match; -micromatch.matcher = matcher; -micromatch.matchKeys = matchKeys; - -/** - * Expose `micromatch` - */ - -module.exports = micromatch; - - -/***/ }), -/* 81 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - - - -/**/ - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - keys.push(key); - }return keys; -}; -/**/ - -module.exports = Duplex; - -/**/ -var processNextTick = __webpack_require__(199); -/**/ - -/**/ -var util = __webpack_require__(100); -util.inherits = __webpack_require__(59); -/**/ - -var Readable = __webpack_require__(305); -var Writable = __webpack_require__(307); - -util.inherits(Duplex, Readable); - -var keys = objectKeys(Writable.prototype); -for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; -} - -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) this.readable = false; - - if (options && options.writable === false) this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - processNextTick(onEndNT, this); -} - -function onEndNT(self) { - self.end(); -} - -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - -/***/ }), -/* 82 */ -/***/ (function(module, exports, __webpack_require__) { - -var buffer = __webpack_require__(105) - -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - Object.keys(buffer).forEach(function (prop) { - exports[prop] = buffer[prop] - }) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -// Copy static methods from Buffer -Object.keys(Buffer).forEach(function (prop) { - SafeBuffer[prop] = Buffer[prop] -}) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} - - -/***/ }), -/* 83 */ -/***/ (function(module, exports, __webpack_require__) { - -var v1 = __webpack_require__(745); -var v4 = __webpack_require__(746); - -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; - -module.exports = uuid; - - -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getInstallationMethod = exports.version = undefined; - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var getInstallationMethod = exports.getInstallationMethod = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var installationMethod = originalInstallationMethod; - - // If there's a package.json in the parent directory, it could have an - // override for the installation method, so we should prefer that over - // whatever was originally in Yarn's package.json. This is the case with - // systems such as Homebrew, which take the tarball and modify the - // installation method so we're aware of the fact that Yarn was installed via - // Homebrew (so things like update notifications can point out the correct - // command to upgrade). - try { - var manifestPath = (_path || _load_path()).default.join(__dirname, '..', 'package.json'); - if ((_fs2 || _load_fs2()).default.existsSync(manifestPath)) { - // non-async version is deprecated - var manifest = yield (0, (_fs || _load_fs()).readJson)(manifestPath); - if (manifest.installationMethod) { - installationMethod = manifest.installationMethod; - } - } - } catch (e) { - // Ignore any errors; this is not critical functionality. - } - return installationMethod; - }); - - return function getInstallationMethod() { - return _ref.apply(this, arguments); - }; -}(); - -var _fs; - -function _load_fs() { - return _fs = __webpack_require__(7); -} - -var _fs2; - -function _load_fs2() { - return _fs2 = _interopRequireDefault(__webpack_require__(10)); -} - -var _path; - -function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// This will be bundled directly in the .js file for production builds -var _require = __webpack_require__(335), - version = _require.version, - originalInstallationMethod = _require.installationMethod; /** - * Determines the current version of Yarn itself. - * - */ - -exports.version = version; - -/***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.run = exports.getBinFolder = undefined; - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -var updateCwd = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { - yield (_fs || _load_fs()).mkdirp(config.globalFolder); - - yield config.init({ - cwd: config.globalFolder, - binLinks: true, - globalFolder: config.globalFolder, - cacheFolder: config._cacheRootFolder, - linkFolder: config.linkFolder - }); - }); - - return function updateCwd(_x) { - return _ref2.apply(this, arguments); - }; -}(); - -var getBins = function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { - // build up list of registry folders to search for binaries - var dirs = []; - for (var _iterator2 = (0, (_keys || _load_keys()).default)((_index || _load_index()).registries), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref4; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref4 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref4 = _i2.value; - } - - var registryName = _ref4; - - var registry = config.registries[registryName]; - dirs.push(registry.loc); - } - - // build up list of binary files - var paths = new (_set || _load_set()).default(); - for (var _iterator3 = dirs, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref5; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref5 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref5 = _i3.value; - } - - var dir = _ref5; - - var binDir = path.join(dir, '.bin'); - if (!(yield (_fs || _load_fs()).exists(binDir))) { - continue; - } - - for (var _iterator4 = yield (_fs || _load_fs()).readdir(binDir), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { - var _ref6; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref6 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref6 = _i4.value; - } - - var name = _ref6; - - paths.add(path.join(binDir, name)); - } - } - return paths; - }); - - return function getBins(_x2) { - return _ref3.apply(this, arguments); - }; -}(); - -var getGlobalPrefix = function () { - var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags) { - if (flags.prefix) { - return flags.prefix; - } else if (config.getOption('prefix', true)) { - return String(config.getOption('prefix', true)); - } else if (process.env.PREFIX) { - return process.env.PREFIX; - } - - var potentialPrefixFolders = [(_constants || _load_constants()).FALLBACK_GLOBAL_PREFIX]; - if (process.platform === 'win32') { - // %LOCALAPPDATA%\Yarn --> C:\Users\Alice\AppData\Local\Yarn - if (process.env.LOCALAPPDATA) { - potentialPrefixFolders.unshift(path.join(process.env.LOCALAPPDATA, 'Yarn')); - } - } else { - potentialPrefixFolders.unshift((_constants || _load_constants()).POSIX_GLOBAL_PREFIX); - } - - var binFolders = potentialPrefixFolders.map(function (prefix) { - return path.join(prefix, 'bin'); - }); - var prefixFolderQueryResult = yield (_fs || _load_fs()).getFirstSuitableFolder(binFolders); - var prefix = prefixFolderQueryResult.folder && path.dirname(prefixFolderQueryResult.folder); - - if (!prefix) { - config.reporter.warn(config.reporter.lang('noGlobalFolder', prefixFolderQueryResult.skipped.map(function (item) { - return path.dirname(item.folder); - }).join(', '))); - - return (_constants || _load_constants()).FALLBACK_GLOBAL_PREFIX; - } - - return prefix; - }); - - return function getGlobalPrefix(_x3, _x4) { - return _ref7.apply(this, arguments); - }; -}(); - -var getBinFolder = exports.getBinFolder = function () { - var _ref8 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags) { - var prefix = yield getGlobalPrefix(config, flags); - return path.resolve(prefix, 'bin'); - }); - - return function getBinFolder(_x5, _x6) { - return _ref8.apply(this, arguments); - }; -}(); - -var initUpdateBins = function () { - var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags) { - var beforeBins = yield getBins(config); - var binFolder = yield getBinFolder(config, flags); - - function throwPermError(err, dest) { - if (err.code === 'EACCES') { - throw new (_errors || _load_errors()).MessageError(reporter.lang('noPermission', dest)); - } else { - throw err; - } - } - - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - try { - yield (_fs || _load_fs()).mkdirp(binFolder); - } catch (err) { - throwPermError(err, binFolder); - } - - var afterBins = yield getBins(config); - - // remove old bins - for (var _iterator5 = beforeBins, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { - var _ref11; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref11 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref11 = _i5.value; - } - - var src = _ref11; - - if (afterBins.has(src)) { - // not old - continue; - } - - // remove old bin - var dest = path.join(binFolder, path.basename(src)); - try { - yield (_fs || _load_fs()).unlink(dest); - } catch (err) { - throwPermError(err, dest); - } - } - - // add new bins - for (var _iterator6 = afterBins, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { - var _ref12; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref12 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref12 = _i6.value; - } - - var _src = _ref12; - - if (beforeBins.has(_src)) { - // already inserted - continue; - } - - // insert new bin - var dest = path.join(binFolder, path.basename(_src)); - try { - yield (_fs || _load_fs()).unlink(dest); - yield (0, (_packageLinker || _load_packageLinker()).linkBin)(_src, dest); - if (process.platform === 'win32' && dest.indexOf('.cmd') !== -1) { - yield (_fs || _load_fs()).rename(dest + '.cmd', dest); - } - } catch (err) { - throwPermError(err, dest); - } - } - }); - }); - - return function initUpdateBins(_x7, _x8, _x9) { - return _ref9.apply(this, arguments); - }; -}(); - -var list = function () { - var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - yield updateCwd(config); - - // install so we get hard file paths - var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.cwd); - var install = new (_install || _load_install()).Install({}, config, new (_baseReporter || _load_baseReporter()).default(), lockfile); - var patterns = yield install.getFlattenedDeps(); - - // dump global modules - for (var _iterator7 = patterns, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { - var _ref14; - - if (_isArray7) { - if (_i7 >= _iterator7.length) break; - _ref14 = _iterator7[_i7++]; - } else { - _i7 = _iterator7.next(); - if (_i7.done) break; - _ref14 = _i7.value; - } - - var pattern = _ref14; - - var manifest = install.resolver.getStrictResolvedPattern(pattern); - ls(manifest, reporter, false); - } - }); - - return function list(_x10, _x11, _x12, _x13) { - return _ref13.apply(this, arguments); - }; -}(); - -exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _index; - -function _load_index() { - return _index = __webpack_require__(40); -} - -var _baseReporter; - -function _load_baseReporter() { - return _baseReporter = _interopRequireDefault(__webpack_require__(74)); -} - -var _buildSubCommands2; - -function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); -} - -var _lockfile; - -function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); -} - -var _install; - -function _load_install() { - return _install = __webpack_require__(34); -} - -var _add; - -function _load_add() { - return _add = __webpack_require__(109); -} - -var _remove; - -function _load_remove() { - return _remove = __webpack_require__(233); -} - -var _upgrade; - -function _load_upgrade() { - return _upgrade = __webpack_require__(149); -} - -var _upgradeInteractive; - -function _load_upgradeInteractive() { - return _upgradeInteractive = __webpack_require__(235); -} - -var _packageLinker; - -function _load_packageLinker() { - return _packageLinker = __webpack_require__(152); -} - -var _constants; - -function _load_constants() { - return _constants = __webpack_require__(8); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var GlobalAdd = function (_Add) { - (0, (_inherits2 || _load_inherits()).default)(GlobalAdd, _Add); - - function GlobalAdd(args, flags, config, reporter, lockfile) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, GlobalAdd); - - var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Add.call(this, args, flags, config, reporter, lockfile)); - - _this.linker.setTopLevelBinLinking(false); - return _this; - } - - GlobalAdd.prototype.maybeOutputSaveTree = function maybeOutputSaveTree() { - for (var _iterator = this.addedPatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var pattern = _ref; - - var manifest = this.resolver.getStrictResolvedPattern(pattern); - ls(manifest, this.reporter, true); - } - return (_promise || _load_promise()).default.resolve(); - }; - - GlobalAdd.prototype._logSuccessSaveLockfile = function _logSuccessSaveLockfile() { - // noop - }; - - return GlobalAdd; -}((_add || _load_add()).Add); - -var path = __webpack_require__(0); - -function hasWrapper(flags, args) { - return args[0] !== 'bin' && args[0] !== 'dir'; -} - -function ls(manifest, reporter, saved) { - var bins = manifest.bin ? (0, (_keys || _load_keys()).default)(manifest.bin) : []; - var human = `${manifest.name}@${manifest.version}`; - if (bins.length) { - if (saved) { - reporter.success(reporter.lang('packageInstalledWithBinaries', human)); - } else { - reporter.info(reporter.lang('packageHasBinaries', human)); - } - reporter.list(`bins-${manifest.name}`, bins); - } else if (saved) { - reporter.warn(reporter.lang('packageHasNoBinaries', human)); - } -} - -var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('global', { - add(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - yield updateCwd(config); - - var updateBins = yield initUpdateBins(config, reporter, flags); - if (args.indexOf('yarn') !== -1) { - reporter.warn(reporter.lang('packageContainsYarnAsGlobal')); - } - - // install module - var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.cwd); - var install = new GlobalAdd(args, flags, config, reporter, lockfile); - yield install.init(); - - // link binaries - yield updateBins(); - })(); - }, - - bin(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - reporter.log((yield getBinFolder(config, flags)), { force: true }); - })(); - }, - - dir(config, reporter, flags, args) { - reporter.log(config.globalFolder, { force: true }); - return (_promise || _load_promise()).default.resolve(); - }, - - ls(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - reporter.warn(`\`yarn global ls\` is deprecated. Please use \`yarn global list\`.`); - yield list(config, reporter, flags, args); - })(); - }, - - list(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - yield list(config, reporter, flags, args); - })(); - }, - - remove(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - yield updateCwd(config); - - var updateBins = yield initUpdateBins(config, reporter, flags); - - // remove module - yield (0, (_remove || _load_remove()).run)(config, reporter, flags, args); - - // remove binaries - yield updateBins(); - })(); - }, - - upgrade(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - yield updateCwd(config); - - var updateBins = yield initUpdateBins(config, reporter, flags); - - // upgrade module - yield (0, (_upgrade || _load_upgrade()).run)(config, reporter, flags, args); - - // update binaries - yield updateBins(); - })(); - }, - - upgradeInteractive(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - yield updateCwd(config); - - var updateBins = yield initUpdateBins(config, reporter, flags); - - // upgrade module - yield (0, (_upgradeInteractive || _load_upgradeInteractive()).run)(config, reporter, flags, args); - - // update binaries - yield updateBins(); - })(); - } -}), - run = _buildSubCommands.run, - _setFlags = _buildSubCommands.setFlags; - -exports.run = run; -function setFlags(commander) { - _setFlags(commander); - commander.description('Installs packages globally on your operating system.'); - commander.option('--prefix ', 'bin prefix to use to install binaries'); - commander.option('--latest', 'upgrade to the latest version of packages'); -} - -/***/ }), -/* 86 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.run = exports.getToken = undefined; - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var getCredentials = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter) { - var _config$registries$ya = config.registries.yarn.config, - username = _config$registries$ya.username, - email = _config$registries$ya.email; - - - if (username) { - reporter.info(`${reporter.lang('npmUsername')}: ${username}`); - } else { - username = yield reporter.question(reporter.lang('npmUsername')); - if (!username) { - return null; - } - } - - if (email) { - reporter.info(`${reporter.lang('npmEmail')}: ${email}`); - } else { - email = yield reporter.question(reporter.lang('npmEmail')); - if (!email) { - return null; - } - } - - yield config.registries.yarn.saveHomeConfig({ username, email }); - - return { username, email }; - }); - - return function getCredentials(_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); - -var getToken = exports.getToken = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter) { - var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - var flags = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - var auth = config.registries.npm.getAuth(name); - if (auth) { - config.registries.npm.setToken(auth); - return function revoke() { - reporter.info(reporter.lang('notRevokingConfigToken')); - return (_promise || _load_promise()).default.resolve(); - }; - } - - var env = process.env.YARN_AUTH_TOKEN || process.env.NPM_AUTH_TOKEN; - if (env) { - config.registries.npm.setToken(`Bearer ${env}`); - return function revoke() { - reporter.info(reporter.lang('notRevokingEnvToken')); - return (_promise || _load_promise()).default.resolve(); - }; - } - - // make sure we're not running in non-interactive mode before asking for login - if (flags.nonInteractive || config.nonInteractive) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('nonInteractiveNoToken')); - } - - // - var creds = yield getCredentials(config, reporter); - if (!creds) { - reporter.warn(reporter.lang('loginAsPublic')); - return function revoke() { - reporter.info(reporter.lang('noTokenToRevoke')); - return (_promise || _load_promise()).default.resolve(); - }; - } - - var username = creds.username, - email = creds.email; - - var password = yield reporter.question(reporter.lang('npmPassword'), { - password: true, - required: true - }); - - // - var userobj = { - _id: `org.couchdb.user:${username}`, - name: username, - password, - email, - type: 'user', - roles: [], - date: new Date().toISOString() - }; - - // - var res = yield config.registries.npm.request(`-/user/org.couchdb.user:${encodeURIComponent(username)}`, { - method: 'PUT', - body: userobj, - auth: { username, password, email } - }); - - if (res && res.ok) { - reporter.success(reporter.lang('loggedIn')); - - var token = res.token; - config.registries.npm.setToken(`Bearer ${token}`); - - return function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - reporter.success(reporter.lang('revokedToken')); - yield config.registries.npm.request(`-/user/token/${token}`, { - method: 'DELETE' - }); - }); - - function revoke() { - return _ref3.apply(this, arguments); - } - - return revoke; - }(); - } else { - throw new (_errors || _load_errors()).MessageError(reporter.lang('incorrectCredentials')); - } - }); - - return function getToken(_x3, _x4) { - return _ref2.apply(this, arguments); - }; -}(); - -var run = exports.run = function () { - var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - yield getCredentials(config, reporter); - }); - - return function run(_x7, _x8, _x9, _x10) { - return _ref4.apply(this, arguments); - }; -}(); - -exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function hasWrapper(commander, args) { - return true; -} - -function setFlags(commander) { - commander.description('Stores registry username and email.'); -} - -/***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _assign; - -function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _path; - -function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); -} - -var _invariant; - -function _load_invariant() { - return _invariant = _interopRequireDefault(__webpack_require__(9)); -} - -var _semver; - -function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(20)); -} - -var _validate; - -function _load_validate() { - return _validate = __webpack_require__(92); -} - -var _lockfile; - -function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); -} - -var _packageReference; - -function _load_packageReference() { - return _packageReference = _interopRequireDefault(__webpack_require__(240)); -} - -var _index; - -function _load_index() { - return _index = __webpack_require__(41); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _version; - -function _load_version() { - return _version = _interopRequireWildcard(__webpack_require__(164)); -} - -var _workspaceResolver; - -function _load_workspaceResolver() { - return _workspaceResolver = _interopRequireDefault(__webpack_require__(435)); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -var _normalizePattern4; - -function _load_normalizePattern() { - return _normalizePattern4 = __webpack_require__(42); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var micromatch = __webpack_require__(80); - -var PackageRequest = function () { - function PackageRequest(req, resolver) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, PackageRequest); - - this.parentRequest = req.parentRequest; - this.parentNames = req.parentNames || []; - this.lockfile = resolver.lockfile; - this.registry = req.registry; - this.reporter = resolver.reporter; - this.resolver = resolver; - this.optional = req.optional; - this.hint = req.hint; - this.pattern = req.pattern; - this.config = resolver.config; - this.foundInfo = null; - } - - PackageRequest.prototype.init = function init() { - this.resolver.usedRegistries.add(this.registry); - }; - - PackageRequest.prototype.getLocked = function getLocked(remoteType) { - // always prioritise root lockfile - var shrunk = this.lockfile.getLocked(this.pattern); - - if (shrunk && shrunk.resolved) { - var resolvedParts = (_version || _load_version()).explodeHashedUrl(shrunk.resolved); - - // Detect Git protocols (git://HOST/PATH or git+PROTOCOL://HOST/PATH) - var preferredRemoteType = /^git(\+[a-z0-9]+)?:\/\//.test(resolvedParts.url) ? 'git' : remoteType; - - return { - name: shrunk.name, - version: shrunk.version, - _uid: shrunk.uid, - _remote: { - resolved: shrunk.resolved, - type: preferredRemoteType, - reference: resolvedParts.url, - hash: resolvedParts.hash, - registry: shrunk.registry - }, - optionalDependencies: shrunk.optionalDependencies || {}, - dependencies: shrunk.dependencies || {}, - prebuiltVariants: shrunk.prebuiltVariants || {} - }; - } else { - return null; - } - }; - - /** - * If the input pattern matches a registry one then attempt to find it on the registry. - * Otherwise fork off to an exotic resolver if one matches. - */ - - PackageRequest.prototype.findVersionOnRegistry = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pattern) { - var _ref2 = yield this.normalize(pattern), - range = _ref2.range, - name = _ref2.name; - - var exoticResolver = (0, (_index || _load_index()).getExoticResolver)(range); - if (exoticResolver) { - var data = yield this.findExoticVersionInfo(exoticResolver, range); - - // clone data as we're manipulating it in place and this could be resolved multiple - // times - data = (0, (_assign || _load_assign()).default)({}, data); - - // this is so the returned package response uses the overridden name. ie. if the - // package's actual name is `bar`, but it's been specified in the manifest like: - // "foo": "http://foo.com/bar.tar.gz" - // then we use the foo name - data.name = name; - return data; - } - - var Resolver = this.getRegistryResolver(); - var resolver = new Resolver(this, name, range); - try { - return yield resolver.resolve(); - } catch (err) { - // if it is not an error thrown by yarn and it has a parent request, - // thow a more readable error - if (!(err instanceof (_errors || _load_errors()).MessageError) && this.parentRequest && this.parentRequest.pattern) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('requiredPackageNotFoundRegistry', pattern, this.parentRequest.pattern, this.registry)); - } - throw err; - } - }); - - function findVersionOnRegistry(_x) { - return _ref.apply(this, arguments); - } - - return findVersionOnRegistry; - }(); - - /** - * Get the registry resolver associated with this package request. - */ - - PackageRequest.prototype.getRegistryResolver = function getRegistryResolver() { - var Resolver = (_index || _load_index()).registries[this.registry]; - if (Resolver) { - return Resolver; - } else { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('unknownRegistryResolver', this.registry)); - } - }; - - PackageRequest.prototype.normalizeRange = function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pattern) { - if (pattern.indexOf(':') > -1 || pattern.indexOf('@') > -1 || (0, (_index || _load_index()).getExoticResolver)(pattern)) { - return pattern; - } - - if (!(_semver || _load_semver()).default.validRange(pattern)) { - try { - if (yield (_fs || _load_fs()).exists((_path || _load_path()).default.join(this.config.cwd, pattern, (_constants || _load_constants()).NODE_PACKAGE_JSON))) { - this.reporter.warn(this.reporter.lang('implicitFileDeprecated', pattern)); - return `file:${pattern}`; - } - } catch (err) { - // pass - } - } - - return pattern; - }); - - function normalizeRange(_x2) { - return _ref3.apply(this, arguments); - } - - return normalizeRange; - }(); - - PackageRequest.prototype.normalize = function () { - var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pattern) { - var _normalizePattern = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(pattern), - name = _normalizePattern.name, - range = _normalizePattern.range, - hasVersion = _normalizePattern.hasVersion; - - var newRange = yield this.normalizeRange(range); - return { name, range: newRange, hasVersion }; - }); - - function normalize(_x3) { - return _ref4.apply(this, arguments); - } - - return normalize; - }(); - - /** - * Construct an exotic resolver instance with the input `ExoticResolver` and `range`. - */ - - PackageRequest.prototype.findExoticVersionInfo = function findExoticVersionInfo(ExoticResolver, range) { - var resolver = new ExoticResolver(this, range); - return resolver.resolve(); - }; - - /** - * If the current pattern matches an exotic resolver then delegate to it or else try - * the registry. - */ - - PackageRequest.prototype.findVersionInfo = function () { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var exoticResolver = (0, (_index || _load_index()).getExoticResolver)(this.pattern); - if (exoticResolver) { - return this.findExoticVersionInfo(exoticResolver, this.pattern); - } else if ((_workspaceResolver || _load_workspaceResolver()).default.isWorkspace(this.pattern, this.resolver.workspaceLayout)) { - (0, (_invariant || _load_invariant()).default)(this.resolver.workspaceLayout, 'expected workspaceLayout'); - var resolver = new (_workspaceResolver || _load_workspaceResolver()).default(this, this.pattern, this.resolver.workspaceLayout); - var manifest = void 0; - if (this.resolver.focus && !(this.pattern.indexOf(this.resolver.workspaceLayout.virtualManifestName) !== -1) && !this.pattern.startsWith((_path || _load_path()).default.basename(this.config.cwd) + '@')) { - var localInfo = this.resolver.workspaceLayout.getManifestByPattern(this.pattern); - (0, (_invariant || _load_invariant()).default)(localInfo, 'expected local info for ' + this.pattern); - var localManifest = localInfo.manifest; - var requestPattern = localManifest.name + '@' + localManifest.version; - manifest = yield this.findVersionOnRegistry(requestPattern); - } - return resolver.resolve(manifest); - } else { - return this.findVersionOnRegistry(this.pattern); - } - }); - - function findVersionInfo() { - return _ref5.apply(this, arguments); - } - - return findVersionInfo; - }(); - - PackageRequest.prototype.reportResolvedRangeMatch = function reportResolvedRangeMatch(info, resolved) {}; - - /** - * Do the final resolve of a package that had a match with an existing version. - * After all unique versions have been discovered, so the best available version - * is found. - */ - - - PackageRequest.prototype.resolveToExistingVersion = function resolveToExistingVersion(info) { - // get final resolved version - var _normalizePattern2 = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(this.pattern), - range = _normalizePattern2.range, - name = _normalizePattern2.name; - - var solvedRange = (_semver || _load_semver()).default.validRange(range) ? info.version : range; - var resolved = this.resolver.getHighestRangeVersionMatch(name, solvedRange, info); - (0, (_invariant || _load_invariant()).default)(resolved, 'should have a resolved reference'); - - this.reportResolvedRangeMatch(info, resolved); - var ref = resolved._reference; - (0, (_invariant || _load_invariant()).default)(ref, 'Resolved package info has no package reference'); - ref.addRequest(this); - ref.addPattern(this.pattern, resolved); - ref.addOptional(this.optional); - }; - - /** - * TODO description - */ - - - PackageRequest.prototype.find = function () { - var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref7) { - var fresh = _ref7.fresh, - frozen = _ref7.frozen; - - // find version info for this package pattern - var info = yield this.findVersionInfo(); - - if (!(_semver || _load_semver()).default.valid(info.version)) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('invalidPackageVersion', info.name, info.version)); - } - - info.fresh = fresh; - (0, (_validate || _load_validate()).cleanDependencies)(info, false, this.reporter, function () { - // swallow warnings - }); - - // check if while we were resolving this dep we've already resolved one that satisfies - // the same range - - var _normalizePattern3 = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(this.pattern), - range = _normalizePattern3.range, - name = _normalizePattern3.name; - - var solvedRange = (_semver || _load_semver()).default.validRange(range) ? info.version : range; - var resolved = !info.fresh || frozen ? this.resolver.getExactVersionMatch(name, solvedRange, info) : this.resolver.getHighestRangeVersionMatch(name, solvedRange, info); - - if (resolved) { - this.resolver.reportPackageWithExistingVersion(this, info); - return; - } - - if (info.flat && !this.resolver.flat) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('flatGlobalError')); - } - - // validate version info - PackageRequest.validateVersionInfo(info, this.reporter); - - // - var remote = info._remote; - (0, (_invariant || _load_invariant()).default)(remote, 'Missing remote'); - - // set package reference - var ref = new (_packageReference || _load_packageReference()).default(this, info, remote); - ref.addPattern(this.pattern, info); - ref.addOptional(this.optional); - ref.setFresh(fresh); - info._reference = ref; - info._remote = remote; - // start installation of dependencies - var promises = []; - var deps = []; - var parentNames = [].concat(this.parentNames, [name]); - // normal deps - for (var depName in info.dependencies) { - var depPattern = depName + '@' + info.dependencies[depName]; - deps.push(depPattern); - promises.push(this.resolver.find({ - pattern: depPattern, - registry: remote.registry, - // dependencies of optional dependencies should themselves be optional - optional: this.optional, - parentRequest: this, - parentNames - })); - } - - // optional deps - for (var _depName in info.optionalDependencies) { - var _depPattern = _depName + '@' + info.optionalDependencies[_depName]; - deps.push(_depPattern); - promises.push(this.resolver.find({ - hint: 'optional', - pattern: _depPattern, - registry: remote.registry, - optional: true, - parentRequest: this, - parentNames - })); - } - if (remote.type === 'workspace' && !this.config.production) { - // workspaces support dev dependencies - for (var _depName2 in info.devDependencies) { - var _depPattern2 = _depName2 + '@' + info.devDependencies[_depName2]; - deps.push(_depPattern2); - promises.push(this.resolver.find({ - hint: 'dev', - pattern: _depPattern2, - registry: remote.registry, - optional: false, - parentRequest: this, - parentNames - })); - } - } - - for (var _iterator = promises, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref8; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref8 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref8 = _i.value; - } - - var promise = _ref8; - - yield promise; - } - - ref.addDependencies(deps); - - // Now that we have all dependencies, it's safe to propagate optional - for (var _iterator2 = ref.requests.slice(1), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref9; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref9 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref9 = _i2.value; - } - - var otherRequest = _ref9; - - ref.addOptional(otherRequest.optional); - } - }); - - function find(_x4) { - return _ref6.apply(this, arguments); - } - - return find; - }(); - - /** - * TODO description - */ - - PackageRequest.validateVersionInfo = function validateVersionInfo(info, reporter) { - // human readable name to use in errors - var human = `${info.name}@${info.version}`; - - info.version = PackageRequest.getPackageVersion(info); - - for (var _iterator3 = (_constants || _load_constants()).REQUIRED_PACKAGE_KEYS, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref10; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref10 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref10 = _i3.value; - } - - var key = _ref10; - - if (!info[key]) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('missingRequiredPackageKey', human, key)); - } - } - }; - - /** - * Returns the package version if present, else defaults to the uid - */ - - PackageRequest.getPackageVersion = function getPackageVersion(info) { - // TODO possibly reconsider this behaviour - return info.version === undefined ? info._uid : info.version; - }; - - /** - * Gets all of the outdated packages and sorts them appropriately - */ - - PackageRequest.getOutdatedPackages = function () { - var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (lockfile, install, config, reporter, filterByPatterns, flags) { - var _ref12 = yield install.fetchRequestFromCwd(), - reqPatterns = _ref12.requests, - workspaceLayout = _ref12.workspaceLayout; - - // Filter out workspace patterns if necessary - - - var depReqPatterns = workspaceLayout ? reqPatterns.filter(function (p) { - return !workspaceLayout.getManifestByPattern(p.pattern); - }) : reqPatterns; - - // filter the list down to just the packages requested. - // prevents us from having to query the metadata for all packages. - if (filterByPatterns && filterByPatterns.length || flags && flags.pattern) { - var filterByNames = filterByPatterns && filterByPatterns.length ? filterByPatterns.map(function (pattern) { - return (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(pattern).name; - }) : []; - depReqPatterns = depReqPatterns.filter(function (dep) { - return filterByNames.indexOf((0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(dep.pattern).name) >= 0 || flags && flags.pattern && micromatch.contains((0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(dep.pattern).name, flags.pattern); - }); - } - - var deps = yield (_promise || _load_promise()).default.all(depReqPatterns.map(function () { - var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref14) { - var pattern = _ref14.pattern, - hint = _ref14.hint, - workspaceName = _ref14.workspaceName, - workspaceLoc = _ref14.workspaceLoc; - - var locked = lockfile.getLocked(pattern); - if (!locked) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('lockfileOutdated')); - } - - var name = locked.name, - current = locked.version; - - var latest = ''; - var wanted = ''; - var url = ''; - - var normalized = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(pattern); - - if ((0, (_index || _load_index()).getExoticResolver)(pattern) || (0, (_index || _load_index()).getExoticResolver)(normalized.range)) { - latest = wanted = 'exotic'; - url = normalized.range; - } else { - var registry = config.registries[locked.registry]; - - var _ref15 = yield registry.checkOutdated(config, name, normalized.range); - - latest = _ref15.latest; - wanted = _ref15.wanted; - url = _ref15.url; - } - - return { - name, - current, - wanted, - latest, - url, - hint, - range: normalized.range, - upgradeTo: '', - workspaceName: workspaceName || '', - workspaceLoc: workspaceLoc || '' - }; - }); - - return function (_x11) { - return _ref13.apply(this, arguments); - }; - }())); - - // Make sure to always output `exotic` versions to be compatible with npm - var isDepOld = function isDepOld(_ref16) { - var current = _ref16.current, - latest = _ref16.latest, - wanted = _ref16.wanted; - return latest === 'exotic' || (_semver || _load_semver()).default.lt(current, wanted) || (_semver || _load_semver()).default.lt(current, latest); - }; - var orderByName = function orderByName(depA, depB) { - return depA.name.localeCompare(depB.name); - }; - return deps.filter(isDepOld).sort(orderByName); - }); - - function getOutdatedPackages(_x5, _x6, _x7, _x8, _x9, _x10) { - return _ref11.apply(this, arguments); - } - - return getOutdatedPackages; - }(); - - return PackageRequest; -}(); - -exports.default = PackageRequest; - -/***/ }), -/* 88 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var BaseResolver = function () { - function BaseResolver(request, fragment) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BaseResolver); - - this.resolver = request.resolver; - this.reporter = request.reporter; - this.fragment = fragment; - this.registry = request.registry; - this.request = request; - this.pattern = request.pattern; - this.config = request.config; - } - - BaseResolver.prototype.fork = function fork(Resolver, resolveArg) { - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } - - var resolver = new (Function.prototype.bind.apply(Resolver, [null].concat([this.request], args)))(); - resolver.registry = this.registry; - return resolver.resolve(resolveArg); - }; - - BaseResolver.prototype.resolve = function resolve(resolveArg) { - throw new Error('Not implemented'); - }; - - return BaseResolver; -}(); - -exports.default = BaseResolver; - -/***/ }), -/* 89 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -var _index; - -function _load_index() { - return _index = __webpack_require__(41); -} - -var _misc; - -function _load_misc() { - return _misc = _interopRequireWildcard(__webpack_require__(18)); -} - -var _version; - -function _load_version() { - return _version = _interopRequireWildcard(__webpack_require__(164)); -} - -var _guessName; - -function _load_guessName() { - return _guessName = _interopRequireDefault(__webpack_require__(113)); -} - -var _index2; - -function _load_index2() { - return _index2 = __webpack_require__(40); -} - -var _exoticResolver; - -function _load_exoticResolver() { - return _exoticResolver = _interopRequireDefault(__webpack_require__(65)); -} - -var _git; - -function _load_git() { - return _git = _interopRequireDefault(__webpack_require__(159)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var urlParse = __webpack_require__(19).parse; - -var GIT_HOSTS = ['github.com', 'gitlab.com', 'bitbucket.com', 'bitbucket.org']; - -var GIT_PATTERN_MATCHERS = [/^git:/, /^git\+.+:/, /^ssh:/, /^https?:.+\.git$/, /^https?:.+\.git#.+/]; - -var GitResolver = function (_ExoticResolver) { - (0, (_inherits2 || _load_inherits()).default)(GitResolver, _ExoticResolver); - - function GitResolver(request, fragment) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, GitResolver); - - var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _ExoticResolver.call(this, request, fragment)); - - var _versionUtil$explodeH = (_version || _load_version()).explodeHashedUrl(fragment), - url = _versionUtil$explodeH.url, - hash = _versionUtil$explodeH.hash; - - _this.url = url; - _this.hash = hash; - return _this; - } - - GitResolver.isVersion = function isVersion(pattern) { - for (var _iterator = GIT_PATTERN_MATCHERS, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var matcher = _ref; - - if (matcher.test(pattern)) { - return true; - } - } - - var _urlParse = urlParse(pattern), - hostname = _urlParse.hostname, - path = _urlParse.path; - - if (hostname && path && GIT_HOSTS.indexOf(hostname) >= 0) { - // only if dependency is pointing to a git repo, - // e.g. facebook/flow and not file in a git repo facebook/flow/archive/v1.0.0.tar.gz - return path.split('/').filter(function (p) { - return !!p; - }).length === 2; - } - - return false; - }; - - GitResolver.prototype.resolve = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (forked) { - var tryRegistry = function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (registry) { - var filename = (_index2 || _load_index2()).registries[registry].filename; - - var file = yield client.getFile(filename); - if (!file) { - return null; - } - - var json = yield config.readJson(`${url}/${filename}`, function () { - return JSON.parse(file); - }); - json._uid = commit; - json._remote = { - resolved: `${url}#${commit}`, - type: 'git', - reference: url, - hash: commit, - registry - }; - return json; - }); - - return function tryRegistry(_x2) { - return _ref3.apply(this, arguments); - }; - }(); - - var url = this.url; - - // shortcut for hosted git. we will fallback to a GitResolver if the hosted git - // optimisations fail which the `forked` flag indicates so we don't get into an - // infinite loop - - var parts = urlParse(url); - if (false) { - // check if this git url uses any of the hostnames defined in our hosted git resolvers - for (var name in (_index || _load_index()).hostedGit) { - var Resolver = (_index || _load_index()).hostedGit[name]; - if (Resolver.hostname !== parts.hostname) { - continue; - } - - // we have a match! clean up the pathname of url artifacts - var pathname = parts.pathname; - pathname = (_misc || _load_misc()).removePrefix(pathname, '/'); // remove prefixed slash - pathname = (_misc || _load_misc()).removeSuffix(pathname, '.git'); // remove .git suffix if present - - var _url = `${pathname}${this.hash ? '#' + decodeURIComponent(this.hash) : ''}`; - return this.fork(Resolver, false, _url); - } - } - - // get from lockfile - var shrunk = this.request.getLocked('git'); - if (shrunk) { - return shrunk; - } - - var config = this.config; - - - var gitUrl = (_git || _load_git()).default.npmUrlToGitUrl(url); - var client = new (_git || _load_git()).default(config, gitUrl, this.hash); - var commit = yield client.init(); - - var file = yield tryRegistry(this.registry); - if (file) { - return file; - } - - for (var registry in (_index2 || _load_index2()).registries) { - if (registry === this.registry) { - continue; - } - - var _file = yield tryRegistry(registry); - if (_file) { - return _file; - } - } - - return { - // This is just the default, it can be overridden with key of dependencies - name: (0, (_guessName || _load_guessName()).default)(url), - version: '0.0.0', - _uid: commit, - _remote: { - resolved: `${url}#${commit}`, - type: 'git', - reference: url, - hash: commit, - registry: 'npm' - } - }; - }); - - function resolve(_x) { - return _ref2.apply(this, arguments); - } - - return resolve; - }(); - - return GitResolver; -}((_exoticResolver || _load_exoticResolver()).default); - -exports.default = GitResolver; - -/***/ }), -/* 90 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.HashStream = undefined; - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -exports.hash = hash; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var crypto = __webpack_require__(14); -var stream = __webpack_require__(29); - -function hash(content) { - var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md5'; - - return crypto.createHash(type).update(content).digest('hex'); -} - -var HashStream = exports.HashStream = function (_stream$Transform) { - (0, (_inherits2 || _load_inherits()).default)(HashStream, _stream$Transform); - - function HashStream(options) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, HashStream); - - var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _stream$Transform.call(this, options)); - - _this._hash = crypto.createHash('sha1'); - _this._updated = false; - return _this; - } - - HashStream.prototype._transform = function _transform(chunk, encoding, callback) { - this._updated = true; - this._hash.update(chunk); - callback(null, chunk); - }; - - HashStream.prototype.getHash = function getHash() { - return this._hash.digest('hex'); - }; - - HashStream.prototype.test = function test(sum) { - return this._updated && sum === this.getHash(); - }; - - return HashStream; -}(stream.Transform); - -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.execCommand = exports.execFromManifest = exports.executeLifecycleScript = exports.makeEnv = exports.IGNORE_MANIFEST_KEYS = undefined; - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _from; - -function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(55)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _stringify; - -function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); -} - -var _assign; - -function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); -} - -var _extends2; - -function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var makeEnv = exports.makeEnv = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (stage, cwd, config) { - var env = (0, (_extends2 || _load_extends()).default)({ - NODE: process.execPath, - INIT_CWD: process.cwd() - }, process.env); - - // Merge in the `env` object specified in .yarnrc - var customEnv = config.getOption('env'); - if (customEnv && typeof customEnv === 'object') { - (0, (_assign || _load_assign()).default)(env, customEnv); - } - - env.npm_lifecycle_event = stage; - env.npm_node_execpath = env.NODE; - env.npm_execpath = env.npm_execpath || process.mainModule && process.mainModule.filename; - - // Set the env to production for npm compat if production mode. - // https://github.com/npm/npm/blob/30d75e738b9cb7a6a3f9b50e971adcbe63458ed3/lib/utils/lifecycle.js#L336 - if (config.production) { - env.NODE_ENV = 'production'; - } - - // Note: npm_config_argv environment variable contains output of nopt - command-line - // parser used by npm. Since we use other parser, we just roughly emulate it's output. (See: #684) - env.npm_config_argv = (0, (_stringify || _load_stringify()).default)({ - remain: [], - cooked: config.commandName === 'run' ? [config.commandName, stage] : [config.commandName], - original: process.argv.slice(2) - }); - - var manifest = yield config.maybeReadManifest(cwd); - if (manifest) { - if (manifest.scripts && Object.prototype.hasOwnProperty.call(manifest.scripts, stage)) { - env.npm_lifecycle_script = manifest.scripts[stage]; - } - - // add npm_package_* - var queue = [['', manifest]]; - while (queue.length) { - var _queue$pop = queue.pop(), - _key = _queue$pop[0], - val = _queue$pop[1]; - - if (typeof val === 'object') { - for (var subKey in val) { - var fullKey = [_key, subKey].filter(Boolean).join('_'); - if (fullKey && fullKey[0] !== '_' && !IGNORE_MANIFEST_KEYS.has(fullKey)) { - queue.push([fullKey, val[subKey]]); - } - } - } else { - var cleanVal = String(val); - if (cleanVal.indexOf('\n') >= 0) { - cleanVal = (0, (_stringify || _load_stringify()).default)(cleanVal); - } - - //replacing invalid chars with underscore - var cleanKey = _key.replace(INVALID_CHAR_REGEX, '_'); - - env[`npm_package_${cleanKey}`] = cleanVal; - } - } - } - - // add npm_config_* and npm_package_config_* from yarn config - var keys = new (_set || _load_set()).default([].concat((0, (_keys || _load_keys()).default)(config.registries.yarn.config), (0, (_keys || _load_keys()).default)(config.registries.npm.config))); - var cleaned = (0, (_from || _load_from()).default)(keys).filter(function (key) { - return !key.match(/:_/) && IGNORE_CONFIG_KEYS.indexOf(key) === -1; - }).map(function (key) { - var val = config.getOption(key); - if (!val) { - val = ''; - } else if (typeof val === 'number') { - val = '' + val; - } else if (typeof val !== 'string') { - val = (0, (_stringify || _load_stringify()).default)(val); - } - - if (val.indexOf('\n') >= 0) { - val = (0, (_stringify || _load_stringify()).default)(val); - } - return [key, val]; - }); - // add npm_config_* - for (var _iterator = cleaned, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var _ref2 = _ref3; - var _key2 = _ref2[0]; - var _val = _ref2[1]; - - var _cleanKey = _key2.replace(/^_+/, ''); - var envKey = `npm_config_${_cleanKey}`.replace(INVALID_CHAR_REGEX, '_'); - env[envKey] = _val; - } - // add npm_package_config_* - if (manifest && manifest.name) { - var packageConfigPrefix = `${manifest.name}:`; - for (var _iterator2 = cleaned, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref5; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref5 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref5 = _i2.value; - } - - var _ref4 = _ref5; - var _key3 = _ref4[0]; - var _val2 = _ref4[1]; - - if (_key3.indexOf(packageConfigPrefix) !== 0) { - continue; - } - var _cleanKey2 = _key3.replace(/^_+/, '').replace(packageConfigPrefix, ''); - var envKey = `npm_package_config_${_cleanKey2}`.replace(INVALID_CHAR_REGEX, '_'); - env[envKey] = _val2; - } - } - - // split up the path - var envPath = env[(_constants || _load_constants()).ENV_PATH_KEY]; - var pathParts = envPath ? envPath.split(path.delimiter) : []; - - // Include the directory that contains node so that we can guarantee that the scripts - // will always run with the exact same Node release than the one use to run Yarn - pathParts.unshift(path.dirname(process.execPath)); - - // Include node-gyp version that was bundled with the current Node.js version, - // if available. - pathParts.unshift(path.join(path.dirname(process.execPath), 'node_modules', 'npm', 'bin', 'node-gyp-bin')); - pathParts.unshift(path.join(path.dirname(process.execPath), '..', 'lib', 'node_modules', 'npm', 'bin', 'node-gyp-bin')); - // Include node-gyp version from homebrew managed npm, if available. - pathParts.unshift(path.join(path.dirname(process.execPath), '..', 'libexec', 'lib', 'node_modules', 'npm', 'bin', 'node-gyp-bin')); - - // Add global bin folder if it is not present already, as some packages depend - // on a globally-installed version of node-gyp. - var globalBin = yield (0, (_global || _load_global()).getBinFolder)(config, {}); - if (pathParts.indexOf(globalBin) === -1) { - pathParts.unshift(globalBin); - } - - // add .bin folders to PATH - for (var _iterator3 = (0, (_keys || _load_keys()).default)((_index || _load_index()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref6; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref6 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref6 = _i3.value; - } - - var registry = _ref6; - - var binFolder = path.join(config.registries[registry].folder, '.bin'); - if (config.workspacesEnabled && config.workspaceRootFolder) { - pathParts.unshift(path.join(config.workspaceRootFolder, binFolder)); - } - pathParts.unshift(path.join(config.linkFolder, binFolder)); - pathParts.unshift(path.join(cwd, binFolder)); - } - - if (config.scriptsPrependNodePath) { - pathParts.unshift(path.join(path.dirname(process.execPath))); - } - - // join path back together - env[(_constants || _load_constants()).ENV_PATH_KEY] = pathParts.join(path.delimiter); - - return env; - }); - - return function makeEnv(_x, _x2, _x3) { - return _ref.apply(this, arguments); - }; -}(); - -var executeLifecycleScript = exports.executeLifecycleScript = function () { - var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref8) { - var stage = _ref8.stage, - config = _ref8.config, - cwd = _ref8.cwd, - cmd = _ref8.cmd, - isInteractive = _ref8.isInteractive, - onProgress = _ref8.onProgress, - customShell = _ref8.customShell; - - var env = yield makeEnv(stage, cwd, config); - - yield checkForGypIfNeeded(config, cmd, env[(_constants || _load_constants()).ENV_PATH_KEY].split(path.delimiter)); - - if (process.platform === 'win32' && (!customShell || customShell === 'cmd')) { - // handle windows run scripts starting with a relative path - cmd = (0, (_fixCmdWinSlashes || _load_fixCmdWinSlashes()).fixCmdWinSlashes)(cmd); - } - - // By default (non-interactive), pipe everything to the terminal and run child process detached - // as long as it's not Windows (since windows does not have /dev/tty) - var stdio = ['ignore', 'pipe', 'pipe']; - var detached = process.platform !== 'win32'; - - if (isInteractive) { - stdio = 'inherit'; - detached = false; - } - - var shell = customShell || true; - var stdout = yield (_child || _load_child()).spawn(cmd, [], { cwd, env, stdio, detached, shell }, onProgress); - - return { cwd, command: cmd, stdout }; - }); - - return function executeLifecycleScript(_x4) { - return _ref7.apply(this, arguments); - }; -}(); - -var _checkForGyp = function () { - var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, paths) { - var reporter = config.reporter; - - // Check every directory in the PATH - - var allChecks = yield (_promise || _load_promise()).default.all(paths.map(function (dir) { - return (0, (_fs || _load_fs()).exists)(path.join(dir, 'node-gyp')); - })); - if (allChecks.some(Boolean)) { - // node-gyp is available somewhere - return; - } - - reporter.info(reporter.lang('packageRequiresNodeGyp')); - - try { - yield (0, (_global || _load_global()).run)(config, reporter, {}, ['add', 'node-gyp']); - } catch (e) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('nodeGypAutoInstallFailed', e.message)); - } - }); - - return function _checkForGyp(_x5, _x6) { - return _ref9.apply(this, arguments); - }; -}(); - -var execFromManifest = exports.execFromManifest = function () { - var _ref10 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, commandName, cwd) { - var pkg = yield config.maybeReadManifest(cwd); - if (!pkg || !pkg.scripts) { - return; - } - - var cmd = pkg.scripts[commandName]; - if (cmd) { - yield execCommand({ stage: commandName, config, cmd, cwd, isInteractive: true }); - } - }); - - return function execFromManifest(_x7, _x8, _x9) { - return _ref10.apply(this, arguments); - }; -}(); - -var execCommand = exports.execCommand = function () { - var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref12) { - var stage = _ref12.stage, - config = _ref12.config, - cmd = _ref12.cmd, - cwd = _ref12.cwd, - isInteractive = _ref12.isInteractive, - customShell = _ref12.customShell; - var reporter = config.reporter; - - try { - reporter.command(cmd); - yield executeLifecycleScript({ stage, config, cwd, cmd, isInteractive, customShell }); - return (_promise || _load_promise()).default.resolve(); - } catch (err) { - if (err instanceof (_errors || _load_errors()).ProcessTermError) { - throw new (_errors || _load_errors()).MessageError(err.EXIT_SIGNAL ? reporter.lang('commandFailedWithSignal', err.EXIT_SIGNAL) : reporter.lang('commandFailedWithCode', err.EXIT_CODE)); - } else { - throw err; - } - } - }); - - return function execCommand(_x10) { - return _ref11.apply(this, arguments); - }; -}(); - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _child; - -function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(47)); -} - -var _fs; - -function _load_fs() { - return _fs = __webpack_require__(7); -} - -var _index; - -function _load_index() { - return _index = __webpack_require__(41); -} - -var _fixCmdWinSlashes; - -function _load_fixCmdWinSlashes() { - return _fixCmdWinSlashes = __webpack_require__(442); -} - -var _global; - -function _load_global() { - return _global = __webpack_require__(85); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var path = __webpack_require__(0); - -var IGNORE_MANIFEST_KEYS = exports.IGNORE_MANIFEST_KEYS = new (_set || _load_set()).default(['readme', 'notice', 'licenseText']); - -// We treat these configs as internal, thus not expose them to process.env. -// This helps us avoid some gyp issues when building native modules. -// See https://github.com/yarnpkg/yarn/issues/2286. -var IGNORE_CONFIG_KEYS = ['lastUpdateCheck']; - -var INVALID_CHAR_REGEX = /\W/g; - -exports.default = executeLifecycleScript; - - -var checkGypPromise = null; -/** - * Special case: Some packages depend on node-gyp, but don't specify this in - * their package.json dependencies. They assume that node-gyp is available - * globally. We need to detect this case and show an error message. - */ -function checkForGypIfNeeded(config, cmd, paths) { - if (cmd.substr(0, cmd.indexOf(' ')) !== 'node-gyp') { - return (_promise || _load_promise()).default.resolve(); - } - - // Ensure this only runs once, rather than multiple times in parallel. - if (!checkGypPromise) { - checkGypPromise = _checkForGyp(config, paths); - } - return checkGypPromise; -} - -/***/ }), -/* 92 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -exports.isValidPackageName = isValidPackageName; - -exports.default = function (info, isRoot, reporter, warn) { - if (isRoot) { - for (var key in (_typos || _load_typos()).default) { - if (key in info) { - warn(reporter.lang('manifestPotentialTypo', key, (_typos || _load_typos()).default[key])); - } - } - } - - // validate name - var name = info.name; - - if (typeof name === 'string') { - if (isRoot && isBuiltinModule(name)) { - warn(reporter.lang('manifestBuiltinModule', name)); - } - - // cannot start with a dot - if (name[0] === '.') { - throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestNameDot')); - } - - // cannot contain the following characters - if (!isValidPackageName(name)) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestNameIllegalChars')); - } - - // cannot equal node_modules or favicon.ico - var lower = name.toLowerCase(); - if (lower === 'node_modules' || lower === 'favicon.ico') { - throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestNameBlacklisted')); - } - } - - // validate license - if (isRoot && !info.private) { - if (typeof info.license === 'string') { - var license = info.license.replace(/\*$/g, ''); - if (!(0, (_util || _load_util()).isValidLicense)(license)) { - warn(reporter.lang('manifestLicenseInvalid')); - } - } else { - warn(reporter.lang('manifestLicenseNone')); - } - } - - // validate strings - for (var _iterator = strings, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _key = _ref; - - var val = info[_key]; - if (val && typeof val !== 'string') { - throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestStringExpected', _key)); - } - } - - cleanDependencies(info, isRoot, reporter, warn); -}; - -exports.cleanDependencies = cleanDependencies; - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _util; - -function _load_util() { - return _util = __webpack_require__(161); -} - -var _typos; - -function _load_typos() { - return _typos = _interopRequireDefault(__webpack_require__(452)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var isBuiltinModule = __webpack_require__(625); - -var strings = ['name', 'version']; - -var dependencyKeys = [ -// npm registry will include optionalDependencies in dependencies and we'll want to dedupe them from the -// other fields first -'optionalDependencies', - -// it's seemingly common to include a dependency in dependencies and devDependencies of the same name but -// different ranges, this can cause a lot of issues with our determinism and the behaviour of npm is -// currently unspecified. -'dependencies', 'devDependencies']; - -function isValidName(name) { - return !name.match(/[\/@\s\+%:]/) && encodeURIComponent(name) === name; -} - -function isValidScopedName(name) { - if (name[0] !== '@') { - return false; - } - - var parts = name.slice(1).split('/'); - return parts.length === 2 && isValidName(parts[0]) && isValidName(parts[1]); -} - -function isValidPackageName(name) { - return isValidName(name) || isValidScopedName(name); -} - -function cleanDependencies(info, isRoot, reporter, warn) { - // get dependency objects - var depTypes = []; - for (var _iterator2 = dependencyKeys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _type = _ref2; - - var deps = info[_type]; - if (!deps || typeof deps !== 'object') { - continue; - } - depTypes.push([_type, deps]); - } - - // aggregate all non-trivial deps (not '' or '*') - var nonTrivialDeps = new (_map || _load_map()).default(); - for (var _iterator3 = depTypes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var _ref3 = _ref4; - var _type2 = _ref3[0]; - var deps = _ref3[1]; - - for (var _iterator5 = (0, (_keys || _load_keys()).default)(deps), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { - var _ref7; - - if (_isArray5) { - if (_i5 >= _iterator5.length) break; - _ref7 = _iterator5[_i5++]; - } else { - _i5 = _iterator5.next(); - if (_i5.done) break; - _ref7 = _i5.value; - } - - var name = _ref7; - - var _version = deps[name]; - if (!nonTrivialDeps.has(name) && _version && _version !== '*') { - nonTrivialDeps.set(name, { type: _type2, version: _version }); - } - } - } - - // overwrite first dep of package with non-trivial version, remove the rest - var setDeps = new (_set || _load_set()).default(); - for (var _iterator4 = depTypes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { - var _ref6; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref6 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref6 = _i4.value; - } - - var _ref5 = _ref6; - var _type3 = _ref5[0]; - var _deps = _ref5[1]; - - for (var _iterator6 = (0, (_keys || _load_keys()).default)(_deps), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { - var _ref8; - - if (_isArray6) { - if (_i6 >= _iterator6.length) break; - _ref8 = _iterator6[_i6++]; - } else { - _i6 = _iterator6.next(); - if (_i6.done) break; - _ref8 = _i6.value; - } - - var _name = _ref8; - - var _version2 = _deps[_name]; - - var dep = nonTrivialDeps.get(_name); - if (dep) { - if (_version2 && _version2 !== '*' && _version2 !== dep.version && isRoot) { - // only throw a warning when at the root - warn(reporter.lang('manifestDependencyCollision', dep.type, _name, dep.version, _type3, _version2)); - } - _version2 = dep.version; - } - - if (setDeps.has(_name)) { - delete _deps[_name]; - } else { - _deps[_name] = _version2; - setDeps.add(_name); - } - } - } -} - -/***/ }), -/* 93 */ -/***/ (function(module, exports) { - -module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; -}; - -/***/ }), -/* 94 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function(it){ - return toString.call(it).slice(8, -1); -}; - -/***/ }), -/* 95 */ -/***/ (function(module, exports) { - -module.exports = {}; - -/***/ }), -/* 96 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(43) - , dPs = __webpack_require__(507) - , enumBugKeys = __webpack_require__(171) - , IE_PROTO = __webpack_require__(177)('IE_PROTO') - , Empty = function(){ /* empty */ } - , PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function(){ - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(170)('iframe') - , i = enumBugKeys.length - , lt = '<' - , gt = '>' - , iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(266).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties){ - var result; - if(O !== null){ - Empty[PROTOTYPE] = anObject(O); - result = new Empty; - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - - -/***/ }), -/* 97 */ -/***/ (function(module, exports) { - -module.exports = function(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; -}; - -/***/ }), -/* 98 */ -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__(45).f - , has = __webpack_require__(68) - , TAG = __webpack_require__(31)('toStringTag'); - -module.exports = function(it, tag, stat){ - if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); -}; - -/***/ }), -/* 99 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(515); -var global = __webpack_require__(30) - , hide = __webpack_require__(58) - , Iterators = __webpack_require__(95) - , TO_STRING_TAG = __webpack_require__(31)('toStringTag'); - -for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ - var NAME = collections[i] - , Collection = global[NAME] - , proto = Collection && Collection.prototype; - if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} - -/***/ }), -/* 100 */ -/***/ (function(module, exports) { - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. - -function isArray(arg) { - if (Array.isArray) { - return Array.isArray(arg); - } - return objectToString(arg) === '[object Array]'; -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = Buffer.isBuffer; - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -/***/ }), -/* 101 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2016 Joyent, Inc. - -module.exports = Certificate; - -var assert = __webpack_require__(17); -var algs = __webpack_require__(26); -var crypto = __webpack_require__(14); -var Fingerprint = __webpack_require__(102); -var Signature = __webpack_require__(51); -var errs = __webpack_require__(50); -var util = __webpack_require__(4); -var utils = __webpack_require__(25); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); -var Identity = __webpack_require__(104); - -var formats = {}; -formats['openssh'] = __webpack_require__(730); -formats['x509'] = __webpack_require__(326); -formats['pem'] = __webpack_require__(731); - -var CertificateParseError = errs.CertificateParseError; -var InvalidAlgorithmError = errs.InvalidAlgorithmError; - -function Certificate(opts) { - assert.object(opts, 'options'); - assert.arrayOfObject(opts.subjects, 'options.subjects'); - utils.assertCompatible(opts.subjects[0], Identity, [1, 0], - 'options.subjects'); - utils.assertCompatible(opts.subjectKey, Key, [1, 0], - 'options.subjectKey'); - utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer'); - if (opts.issuerKey !== undefined) { - utils.assertCompatible(opts.issuerKey, Key, [1, 0], - 'options.issuerKey'); - } - assert.object(opts.signatures, 'options.signatures'); - assert.buffer(opts.serial, 'options.serial'); - assert.date(opts.validFrom, 'options.validFrom'); - assert.date(opts.validUntil, 'optons.validUntil'); - - assert.optionalArrayOfString(opts.purposes, 'options.purposes'); - - this._hashCache = {}; - - this.subjects = opts.subjects; - this.issuer = opts.issuer; - this.subjectKey = opts.subjectKey; - this.issuerKey = opts.issuerKey; - this.signatures = opts.signatures; - this.serial = opts.serial; - this.validFrom = opts.validFrom; - this.validUntil = opts.validUntil; - this.purposes = opts.purposes; -} - -Certificate.formats = formats; - -Certificate.prototype.toBuffer = function (format, options) { - if (format === undefined) - format = 'x509'; - assert.string(format, 'format'); - assert.object(formats[format], 'formats[format]'); - assert.optionalObject(options, 'options'); - - return (formats[format].write(this, options)); -}; - -Certificate.prototype.toString = function (format, options) { - if (format === undefined) - format = 'pem'; - return (this.toBuffer(format, options).toString()); -}; - -Certificate.prototype.fingerprint = function (algo) { - if (algo === undefined) - algo = 'sha256'; - assert.string(algo, 'algorithm'); - var opts = { - type: 'certificate', - hash: this.hash(algo), - algorithm: algo - }; - return (new Fingerprint(opts)); -}; - -Certificate.prototype.hash = function (algo) { - assert.string(algo, 'algorithm'); - algo = algo.toLowerCase(); - if (algs.hashAlgs[algo] === undefined) - throw (new InvalidAlgorithmError(algo)); - - if (this._hashCache[algo]) - return (this._hashCache[algo]); - - var hash = crypto.createHash(algo). - update(this.toBuffer('x509')).digest(); - this._hashCache[algo] = hash; - return (hash); -}; - -Certificate.prototype.isExpired = function (when) { - if (when === undefined) - when = new Date(); - return (!((when.getTime() >= this.validFrom.getTime()) && - (when.getTime() < this.validUntil.getTime()))); -}; - -Certificate.prototype.isSignedBy = function (issuerCert) { - utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer'); - - if (!this.issuer.equals(issuerCert.subjects[0])) - return (false); - if (this.issuer.purposes && this.issuer.purposes.length > 0 && - this.issuer.purposes.indexOf('ca') === -1) { - return (false); - } - - return (this.isSignedByKey(issuerCert.subjectKey)); -}; - -Certificate.prototype.isSignedByKey = function (issuerKey) { - utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey'); - - if (this.issuerKey !== undefined) { - return (this.issuerKey. - fingerprint('sha512').matches(issuerKey)); - } - - var fmt = Object.keys(this.signatures)[0]; - var valid = formats[fmt].verify(this, issuerKey); - if (valid) - this.issuerKey = issuerKey; - return (valid); -}; - -Certificate.prototype.signWith = function (key) { - utils.assertCompatible(key, PrivateKey, [1, 2], 'key'); - var fmts = Object.keys(formats); - var didOne = false; - for (var i = 0; i < fmts.length; ++i) { - if (fmts[i] !== 'pem') { - var ret = formats[fmts[i]].sign(this, key); - if (ret === true) - didOne = true; - } - } - if (!didOne) { - throw (new Error('Failed to sign the certificate for any ' + - 'available certificate formats')); - } -}; - -Certificate.createSelfSigned = function (subjectOrSubjects, key, options) { - var subjects; - if (Array.isArray(subjectOrSubjects)) - subjects = subjectOrSubjects; - else - subjects = [subjectOrSubjects]; - - assert.arrayOfObject(subjects); - subjects.forEach(function (subject) { - utils.assertCompatible(subject, Identity, [1, 0], 'subject'); - }); - - utils.assertCompatible(key, PrivateKey, [1, 2], 'private key'); - - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalObject(options.validFrom, 'options.validFrom'); - assert.optionalObject(options.validUntil, 'options.validUntil'); - var validFrom = options.validFrom; - var validUntil = options.validUntil; - if (validFrom === undefined) - validFrom = new Date(); - if (validUntil === undefined) { - assert.optionalNumber(options.lifetime, 'options.lifetime'); - var lifetime = options.lifetime; - if (lifetime === undefined) - lifetime = 10*365*24*3600; - validUntil = new Date(); - validUntil.setTime(validUntil.getTime() + lifetime*1000); - } - assert.optionalBuffer(options.serial, 'options.serial'); - var serial = options.serial; - if (serial === undefined) - serial = new Buffer('0000000000000001', 'hex'); - - var purposes = options.purposes; - if (purposes === undefined) - purposes = []; - - if (purposes.indexOf('signature') === -1) - purposes.push('signature'); - - /* Self-signed certs are always CAs. */ - if (purposes.indexOf('ca') === -1) - purposes.push('ca'); - if (purposes.indexOf('crl') === -1) - purposes.push('crl'); - - /* - * If we weren't explicitly given any other purposes, do the sensible - * thing and add some basic ones depending on the subject type. - */ - if (purposes.length <= 3) { - var hostSubjects = subjects.filter(function (subject) { - return (subject.type === 'host'); - }); - var userSubjects = subjects.filter(function (subject) { - return (subject.type === 'user'); - }); - if (hostSubjects.length > 0) { - if (purposes.indexOf('serverAuth') === -1) - purposes.push('serverAuth'); - } - if (userSubjects.length > 0) { - if (purposes.indexOf('clientAuth') === -1) - purposes.push('clientAuth'); - } - if (userSubjects.length > 0 || hostSubjects.length > 0) { - if (purposes.indexOf('keyAgreement') === -1) - purposes.push('keyAgreement'); - if (key.type === 'rsa' && - purposes.indexOf('encryption') === -1) - purposes.push('encryption'); - } - } - - var cert = new Certificate({ - subjects: subjects, - issuer: subjects[0], - subjectKey: key.toPublic(), - issuerKey: key.toPublic(), - signatures: {}, - serial: serial, - validFrom: validFrom, - validUntil: validUntil, - purposes: purposes - }); - cert.signWith(key); - - return (cert); -}; - -Certificate.create = - function (subjectOrSubjects, key, issuer, issuerKey, options) { - var subjects; - if (Array.isArray(subjectOrSubjects)) - subjects = subjectOrSubjects; - else - subjects = [subjectOrSubjects]; - - assert.arrayOfObject(subjects); - subjects.forEach(function (subject) { - utils.assertCompatible(subject, Identity, [1, 0], 'subject'); - }); - - utils.assertCompatible(key, Key, [1, 0], 'key'); - if (PrivateKey.isPrivateKey(key)) - key = key.toPublic(); - utils.assertCompatible(issuer, Identity, [1, 0], 'issuer'); - utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key'); - - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalObject(options.validFrom, 'options.validFrom'); - assert.optionalObject(options.validUntil, 'options.validUntil'); - var validFrom = options.validFrom; - var validUntil = options.validUntil; - if (validFrom === undefined) - validFrom = new Date(); - if (validUntil === undefined) { - assert.optionalNumber(options.lifetime, 'options.lifetime'); - var lifetime = options.lifetime; - if (lifetime === undefined) - lifetime = 10*365*24*3600; - validUntil = new Date(); - validUntil.setTime(validUntil.getTime() + lifetime*1000); - } - assert.optionalBuffer(options.serial, 'options.serial'); - var serial = options.serial; - if (serial === undefined) - serial = new Buffer('0000000000000001', 'hex'); - - var purposes = options.purposes; - if (purposes === undefined) - purposes = []; - - if (purposes.indexOf('signature') === -1) - purposes.push('signature'); - - if (options.ca === true) { - if (purposes.indexOf('ca') === -1) - purposes.push('ca'); - if (purposes.indexOf('crl') === -1) - purposes.push('crl'); - } - - var hostSubjects = subjects.filter(function (subject) { - return (subject.type === 'host'); - }); - var userSubjects = subjects.filter(function (subject) { - return (subject.type === 'user'); - }); - if (hostSubjects.length > 0) { - if (purposes.indexOf('serverAuth') === -1) - purposes.push('serverAuth'); - } - if (userSubjects.length > 0) { - if (purposes.indexOf('clientAuth') === -1) - purposes.push('clientAuth'); - } - if (userSubjects.length > 0 || hostSubjects.length > 0) { - if (purposes.indexOf('keyAgreement') === -1) - purposes.push('keyAgreement'); - if (key.type === 'rsa' && - purposes.indexOf('encryption') === -1) - purposes.push('encryption'); - } - - var cert = new Certificate({ - subjects: subjects, - issuer: issuer, - subjectKey: key, - issuerKey: issuerKey.toPublic(), - signatures: {}, - serial: serial, - validFrom: validFrom, - validUntil: validUntil, - purposes: purposes - }); - cert.signWith(issuerKey); - - return (cert); -}; - -Certificate.parse = function (data, format, options) { - if (typeof (data) !== 'string') - assert.buffer(data, 'data'); - if (format === undefined) - format = 'auto'; - assert.string(format, 'format'); - if (typeof (options) === 'string') - options = { filename: options }; - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - assert.optionalString(options.filename, 'options.filename'); - if (options.filename === undefined) - options.filename = '(unnamed)'; - - assert.object(formats[format], 'formats[format]'); - - try { - var k = formats[format].read(data, options); - return (k); - } catch (e) { - throw (new CertificateParseError(options.filename, format, e)); - } -}; - -Certificate.isCertificate = function (obj, ver) { - return (utils.isCompatible(obj, Certificate, ver)); -}; - -/* - * API versions for Certificate: - * [1,0] -- initial ver - */ -Certificate.prototype._sshpkApiVersion = [1, 0]; - -Certificate._oldVersionDetect = function (obj) { - return ([1, 0]); -}; - - -/***/ }), -/* 102 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2015 Joyent, Inc. - -module.exports = Fingerprint; - -var assert = __webpack_require__(17); -var algs = __webpack_require__(26); -var crypto = __webpack_require__(14); -var errs = __webpack_require__(50); -var Key = __webpack_require__(27); -var Certificate = __webpack_require__(101); -var utils = __webpack_require__(25); - -var FingerprintFormatError = errs.FingerprintFormatError; -var InvalidAlgorithmError = errs.InvalidAlgorithmError; - -function Fingerprint(opts) { - assert.object(opts, 'options'); - assert.string(opts.type, 'options.type'); - assert.buffer(opts.hash, 'options.hash'); - assert.string(opts.algorithm, 'options.algorithm'); - - this.algorithm = opts.algorithm.toLowerCase(); - if (algs.hashAlgs[this.algorithm] !== true) - throw (new InvalidAlgorithmError(this.algorithm)); - - this.hash = opts.hash; - this.type = opts.type; -} - -Fingerprint.prototype.toString = function (format) { - if (format === undefined) { - if (this.algorithm === 'md5') - format = 'hex'; - else - format = 'base64'; - } - assert.string(format); - - switch (format) { - case 'hex': - return (addColons(this.hash.toString('hex'))); - case 'base64': - return (sshBase64Format(this.algorithm, - this.hash.toString('base64'))); - default: - throw (new FingerprintFormatError(undefined, format)); - } -}; - -Fingerprint.prototype.matches = function (other) { - assert.object(other, 'key or certificate'); - if (this.type === 'key') { - utils.assertCompatible(other, Key, [1, 0], 'key'); - } else { - utils.assertCompatible(other, Certificate, [1, 0], - 'certificate'); - } - - var theirHash = other.hash(this.algorithm); - var theirHash2 = crypto.createHash(this.algorithm). - update(theirHash).digest('base64'); - - if (this.hash2 === undefined) - this.hash2 = crypto.createHash(this.algorithm). - update(this.hash).digest('base64'); - - return (this.hash2 === theirHash2); -}; - -Fingerprint.parse = function (fp, options) { - assert.string(fp, 'fingerprint'); - - var alg, hash, enAlgs; - if (Array.isArray(options)) { - enAlgs = options; - options = {}; - } - assert.optionalObject(options, 'options'); - if (options === undefined) - options = {}; - if (options.enAlgs !== undefined) - enAlgs = options.enAlgs; - assert.optionalArrayOfString(enAlgs, 'algorithms'); - - var parts = fp.split(':'); - if (parts.length == 2) { - alg = parts[0].toLowerCase(); - /*JSSTYLED*/ - var base64RE = /^[A-Za-z0-9+\/=]+$/; - if (!base64RE.test(parts[1])) - throw (new FingerprintFormatError(fp)); - try { - hash = new Buffer(parts[1], 'base64'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } else if (parts.length > 2) { - alg = 'md5'; - if (parts[0].toLowerCase() === 'md5') - parts = parts.slice(1); - parts = parts.join(''); - /*JSSTYLED*/ - var md5RE = /^[a-fA-F0-9]+$/; - if (!md5RE.test(parts)) - throw (new FingerprintFormatError(fp)); - try { - hash = new Buffer(parts, 'hex'); - } catch (e) { - throw (new FingerprintFormatError(fp)); - } - } - - if (alg === undefined) - throw (new FingerprintFormatError(fp)); - - if (algs.hashAlgs[alg] === undefined) - throw (new InvalidAlgorithmError(alg)); - - if (enAlgs !== undefined) { - enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); - if (enAlgs.indexOf(alg) === -1) - throw (new InvalidAlgorithmError(alg)); - } - - return (new Fingerprint({ - algorithm: alg, - hash: hash, - type: options.type || 'key' - })); -}; - -function addColons(s) { - /*JSSTYLED*/ - return (s.replace(/(.{2})(?=.)/g, '$1:')); -} - -function base64Strip(s) { - /*JSSTYLED*/ - return (s.replace(/=*$/, '')); -} - -function sshBase64Format(alg, h) { - return (alg.toUpperCase() + ':' + base64Strip(h)); -} - -Fingerprint.isFingerprint = function (obj, ver) { - return (utils.isCompatible(obj, Fingerprint, ver)); -}; - -/* - * API versions for Fingerprint: - * [1,0] -- initial ver - * [1,1] -- first tagged ver - */ -Fingerprint.prototype._sshpkApiVersion = [1, 1]; - -Fingerprint._oldVersionDetect = function (obj) { - assert.func(obj.toString); - assert.func(obj.matches); - return ([1, 0]); -}; - - -/***/ }), -/* 103 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readPkcs8: readPkcs8, - write: write, - writePkcs8: writePkcs8, - - readECDSACurve: readECDSACurve, - writeECDSACurve: writeECDSACurve -}; - -var assert = __webpack_require__(17); -var asn1 = __webpack_require__(53); -var algs = __webpack_require__(26); -var utils = __webpack_require__(25); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); -var pem = __webpack_require__(63); - -function read(buf, options) { - return (pem.read(buf, options, 'pkcs8')); -} - -function write(key, options) { - return (pem.write(key, options, 'pkcs8')); -} - -/* Helper to read in a single mpint */ -function readMPInt(der, nm) { - assert.strictEqual(der.peek(), asn1.Ber.Integer, - nm + ' is not an Integer'); - return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); -} - -function readPkcs8(alg, type, der) { - /* Private keys in pkcs#8 format have a weird extra int */ - if (der.peek() === asn1.Ber.Integer) { - assert.strictEqual(type, 'private', - 'unexpected Integer at start of public key'); - der.readString(asn1.Ber.Integer, true); - } - - der.readSequence(); - var next = der.offset + der.length; - - var oid = der.readOID(); - switch (oid) { - case '1.2.840.113549.1.1.1': - der._offset = next; - if (type === 'public') - return (readPkcs8RSAPublic(der)); - else - return (readPkcs8RSAPrivate(der)); - case '1.2.840.10040.4.1': - if (type === 'public') - return (readPkcs8DSAPublic(der)); - else - return (readPkcs8DSAPrivate(der)); - case '1.2.840.10045.2.1': - if (type === 'public') - return (readPkcs8ECDSAPublic(der)); - else - return (readPkcs8ECDSAPrivate(der)); - default: - throw (new Error('Unknown key type OID ' + oid)); - } -} - -function readPkcs8RSAPublic(der) { - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - der.readSequence(); - - // modulus - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'exponent'); - - // now, make the key - var key = { - type: 'rsa', - source: der.originalInput, - parts: [ - { name: 'e', data: e }, - { name: 'n', data: n } - ] - }; - - return (new Key(key)); -} - -function readPkcs8RSAPrivate(der) { - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var ver = readMPInt(der, 'version'); - assert.equal(ver[0], 0x0, 'unknown RSA private key version'); - - // modulus then public exponent - var n = readMPInt(der, 'modulus'); - var e = readMPInt(der, 'public exponent'); - var d = readMPInt(der, 'private exponent'); - var p = readMPInt(der, 'prime1'); - var q = readMPInt(der, 'prime2'); - var dmodp = readMPInt(der, 'exponent1'); - var dmodq = readMPInt(der, 'exponent2'); - var iqmp = readMPInt(der, 'iqmp'); - - // now, make the key - var key = { - type: 'rsa', - parts: [ - { name: 'n', data: n }, - { name: 'e', data: e }, - { name: 'd', data: d }, - { name: 'iqmp', data: iqmp }, - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'dmodp', data: dmodp }, - { name: 'dmodq', data: dmodq } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8DSAPublic(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - // bit string sequence - der.readSequence(asn1.Ber.BitString); - der.readByte(); - - var y = readMPInt(der, 'y'); - - // now, make the key - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y } - ] - }; - - return (new Key(key)); -} - -function readPkcs8DSAPrivate(der) { - der.readSequence(); - - var p = readMPInt(der, 'p'); - var q = readMPInt(der, 'q'); - var g = readMPInt(der, 'g'); - - der.readSequence(asn1.Ber.OctetString); - var x = readMPInt(der, 'x'); - - /* The pkcs#8 format does not include the public key */ - var y = utils.calculateDSAPublic(g, p, x); - - var key = { - type: 'dsa', - parts: [ - { name: 'p', data: p }, - { name: 'q', data: q }, - { name: 'g', data: g }, - { name: 'y', data: y }, - { name: 'x', data: x } - ] - }; - - return (new PrivateKey(key)); -} - -function readECDSACurve(der) { - var curveName, curveNames; - var j, c, cd; - - if (der.peek() === asn1.Ber.OID) { - var oid = der.readOID(); - - curveNames = Object.keys(algs.curves); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - if (cd.pkcs8oid === oid) { - curveName = c; - break; - } - } - - } else { - // ECParameters sequence - der.readSequence(); - var version = der.readString(asn1.Ber.Integer, true); - assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); - - var curve = {}; - - // FieldID sequence - der.readSequence(); - var fieldTypeOid = der.readOID(); - assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', - 'ECDSA key is not from a prime-field'); - var p = curve.p = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - /* - * p always starts with a 1 bit, so count the zeros to get its - * real size. - */ - curve.size = p.length * 8 - utils.countZeros(p); - - // Curve sequence - der.readSequence(); - curve.a = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - curve.b = utils.mpNormalize( - der.readString(asn1.Ber.OctetString, true)); - if (der.peek() === asn1.Ber.BitString) - curve.s = der.readString(asn1.Ber.BitString, true); - - // Combined Gx and Gy - curve.G = der.readString(asn1.Ber.OctetString, true); - assert.strictEqual(curve.G[0], 0x4, - 'uncompressed G is required'); - - curve.n = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - curve.h = utils.mpNormalize( - der.readString(asn1.Ber.Integer, true)); - assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + - 'required'); - - curveNames = Object.keys(algs.curves); - var ks = Object.keys(curve); - for (j = 0; j < curveNames.length; ++j) { - c = curveNames[j]; - cd = algs.curves[c]; - var equal = true; - for (var i = 0; i < ks.length; ++i) { - var k = ks[i]; - if (cd[k] === undefined) - continue; - if (typeof (cd[k]) === 'object' && - cd[k].equals !== undefined) { - if (!cd[k].equals(curve[k])) { - equal = false; - break; - } - } else if (Buffer.isBuffer(cd[k])) { - if (cd[k].toString('binary') - !== curve[k].toString('binary')) { - equal = false; - break; - } - } else { - if (cd[k] !== curve[k]) { - equal = false; - break; - } - } - } - if (equal) { - curveName = c; - break; - } - } - } - return (curveName); -} - -function readPkcs8ECDSAPrivate(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - der.readSequence(asn1.Ber.OctetString); - der.readSequence(); - - var version = readMPInt(der, 'version'); - assert.equal(version[0], 1, 'unknown version of ECDSA key'); - - var d = der.readString(asn1.Ber.OctetString, true); - der.readSequence(0xa1); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: new Buffer(curveName) }, - { name: 'Q', data: Q }, - { name: 'd', data: d } - ] - }; - - return (new PrivateKey(key)); -} - -function readPkcs8ECDSAPublic(der) { - var curveName = readECDSACurve(der); - assert.string(curveName, 'a known elliptic curve'); - - var Q = der.readString(asn1.Ber.BitString, true); - Q = utils.ecNormalize(Q); - - var key = { - type: 'ecdsa', - parts: [ - { name: 'curve', data: new Buffer(curveName) }, - { name: 'Q', data: Q } - ] - }; - - return (new Key(key)); -} - -function writePkcs8(der, key) { - der.startSequence(); - - if (PrivateKey.isPrivateKey(key)) { - var sillyInt = new Buffer(1); - sillyInt[0] = 0x0; - der.writeBuffer(sillyInt, asn1.Ber.Integer); - } - - der.startSequence(); - switch (key.type) { - case 'rsa': - der.writeOID('1.2.840.113549.1.1.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8RSAPrivate(key, der); - else - writePkcs8RSAPublic(key, der); - break; - case 'dsa': - der.writeOID('1.2.840.10040.4.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8DSAPrivate(key, der); - else - writePkcs8DSAPublic(key, der); - break; - case 'ecdsa': - der.writeOID('1.2.840.10045.2.1'); - if (PrivateKey.isPrivateKey(key)) - writePkcs8ECDSAPrivate(key, der); - else - writePkcs8ECDSAPublic(key, der); - break; - default: - throw (new Error('Unsupported key type: ' + key.type)); - } - - der.endSequence(); -} - -function writePkcs8RSAPrivate(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = new Buffer(1); - version[0] = 0; - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.writeBuffer(key.part.d.data, asn1.Ber.Integer); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - if (!key.part.dmodp || !key.part.dmodq) - utils.addRSAMissing(key); - der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); - der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); - der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); - - der.endSequence(); - der.endSequence(); -} - -function writePkcs8RSAPublic(key, der) { - der.writeNull(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - - der.startSequence(); - der.writeBuffer(key.part.n.data, asn1.Ber.Integer); - der.writeBuffer(key.part.e.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); -} - -function writePkcs8DSAPrivate(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.writeBuffer(key.part.x.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writePkcs8DSAPublic(key, der) { - der.startSequence(); - der.writeBuffer(key.part.p.data, asn1.Ber.Integer); - der.writeBuffer(key.part.q.data, asn1.Ber.Integer); - der.writeBuffer(key.part.g.data, asn1.Ber.Integer); - der.endSequence(); - der.endSequence(); - - der.startSequence(asn1.Ber.BitString); - der.writeByte(0x00); - der.writeBuffer(key.part.y.data, asn1.Ber.Integer); - der.endSequence(); -} - -function writeECDSACurve(key, der) { - var curve = algs.curves[key.curve]; - if (curve.pkcs8oid) { - /* This one has a name in pkcs#8, so just write the oid */ - der.writeOID(curve.pkcs8oid); - - } else { - // ECParameters sequence - der.startSequence(); - - var version = new Buffer(1); - version.writeUInt8(1, 0); - der.writeBuffer(version, asn1.Ber.Integer); - - // FieldID sequence - der.startSequence(); - der.writeOID('1.2.840.10045.1.1'); // prime-field - der.writeBuffer(curve.p, asn1.Ber.Integer); - der.endSequence(); - - // Curve sequence - der.startSequence(); - var a = curve.p; - if (a[0] === 0x0) - a = a.slice(1); - der.writeBuffer(a, asn1.Ber.OctetString); - der.writeBuffer(curve.b, asn1.Ber.OctetString); - der.writeBuffer(curve.s, asn1.Ber.BitString); - der.endSequence(); - - der.writeBuffer(curve.G, asn1.Ber.OctetString); - der.writeBuffer(curve.n, asn1.Ber.Integer); - var h = curve.h; - if (!h) { - h = new Buffer(1); - h[0] = 1; - } - der.writeBuffer(h, asn1.Ber.Integer); - - // ECParameters - der.endSequence(); - } -} - -function writePkcs8ECDSAPublic(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); -} - -function writePkcs8ECDSAPrivate(key, der) { - writeECDSACurve(key, der); - der.endSequence(); - - der.startSequence(asn1.Ber.OctetString); - der.startSequence(); - - var version = new Buffer(1); - version[0] = 1; - der.writeBuffer(version, asn1.Ber.Integer); - - der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); - - der.startSequence(0xa1); - var Q = utils.ecNormalize(key.part.Q.data, true); - der.writeBuffer(Q, asn1.Ber.BitString); - der.endSequence(); - - der.endSequence(); - der.endSequence(); -} - - -/***/ }), -/* 104 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2017 Joyent, Inc. - -module.exports = Identity; - -var assert = __webpack_require__(17); -var algs = __webpack_require__(26); -var crypto = __webpack_require__(14); -var Fingerprint = __webpack_require__(102); -var Signature = __webpack_require__(51); -var errs = __webpack_require__(50); -var util = __webpack_require__(4); -var utils = __webpack_require__(25); -var asn1 = __webpack_require__(53); - -/*JSSTYLED*/ -var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; - -var oids = {}; -oids.cn = '2.5.4.3'; -oids.o = '2.5.4.10'; -oids.ou = '2.5.4.11'; -oids.l = '2.5.4.7'; -oids.s = '2.5.4.8'; -oids.c = '2.5.4.6'; -oids.sn = '2.5.4.4'; -oids.dc = '0.9.2342.19200300.100.1.25'; -oids.uid = '0.9.2342.19200300.100.1.1'; -oids.mail = '0.9.2342.19200300.100.1.3'; - -var unoids = {}; -Object.keys(oids).forEach(function (k) { - unoids[oids[k]] = k; -}); - -function Identity(opts) { - var self = this; - assert.object(opts, 'options'); - assert.arrayOfObject(opts.components, 'options.components'); - this.components = opts.components; - this.componentLookup = {}; - this.components.forEach(function (c) { - if (c.name && !c.oid) - c.oid = oids[c.name]; - if (c.oid && !c.name) - c.name = unoids[c.oid]; - if (self.componentLookup[c.name] === undefined) - self.componentLookup[c.name] = []; - self.componentLookup[c.name].push(c); - }); - if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { - this.cn = this.componentLookup.cn[0].value; - } - assert.optionalString(opts.type, 'options.type'); - if (opts.type === undefined) { - if (this.components.length === 1 && - this.componentLookup.cn && - this.componentLookup.cn.length === 1 && - this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { - this.type = 'host'; - this.hostname = this.componentLookup.cn[0].value; - - } else if (this.componentLookup.dc && - this.components.length === this.componentLookup.dc.length) { - this.type = 'host'; - this.hostname = this.componentLookup.dc.map( - function (c) { - return (c.value); - }).join('.'); - - } else if (this.componentLookup.uid && - this.components.length === - this.componentLookup.uid.length) { - this.type = 'user'; - this.uid = this.componentLookup.uid[0].value; - - } else if (this.componentLookup.cn && - this.componentLookup.cn.length === 1 && - this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { - this.type = 'host'; - this.hostname = this.componentLookup.cn[0].value; - - } else if (this.componentLookup.uid && - this.componentLookup.uid.length === 1) { - this.type = 'user'; - this.uid = this.componentLookup.uid[0].value; - - } else if (this.componentLookup.mail && - this.componentLookup.mail.length === 1) { - this.type = 'email'; - this.email = this.componentLookup.mail[0].value; - - } else if (this.componentLookup.cn && - this.componentLookup.cn.length === 1) { - this.type = 'user'; - this.uid = this.componentLookup.cn[0].value; - - } else { - this.type = 'unknown'; - } - } else { - this.type = opts.type; - if (this.type === 'host') - this.hostname = opts.hostname; - else if (this.type === 'user') - this.uid = opts.uid; - else if (this.type === 'email') - this.email = opts.email; - else - throw (new Error('Unknown type ' + this.type)); - } -} - -Identity.prototype.toString = function () { - return (this.components.map(function (c) { - return (c.name.toUpperCase() + '=' + c.value); - }).join(', ')); -}; - -/* - * These are from X.680 -- PrintableString allowed chars are in section 37.4 - * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to - * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006 - * (the basic ASCII character set). - */ -/* JSSTYLED */ -var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; -/* JSSTYLED */ -var NOT_IA5 = /[^\x00-\x7f]/; - -Identity.prototype.toAsn1 = function (der, tag) { - der.startSequence(tag); - this.components.forEach(function (c) { - der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); - der.startSequence(); - der.writeOID(c.oid); - /* - * If we fit in a PrintableString, use that. Otherwise use an - * IA5String or UTF8String. - */ - if (c.value.match(NOT_IA5)) { - var v = new Buffer(c.value, 'utf8'); - der.writeBuffer(v, asn1.Ber.Utf8String); - } else if (c.value.match(NOT_PRINTABLE)) { - der.writeString(c.value, asn1.Ber.IA5String); - } else { - der.writeString(c.value, asn1.Ber.PrintableString); - } - der.endSequence(); - der.endSequence(); - }); - der.endSequence(); -}; - -function globMatch(a, b) { - if (a === '**' || b === '**') - return (true); - var aParts = a.split('.'); - var bParts = b.split('.'); - if (aParts.length !== bParts.length) - return (false); - for (var i = 0; i < aParts.length; ++i) { - if (aParts[i] === '*' || bParts[i] === '*') - continue; - if (aParts[i] !== bParts[i]) - return (false); - } - return (true); -} - -Identity.prototype.equals = function (other) { - if (!Identity.isIdentity(other, [1, 0])) - return (false); - if (other.components.length !== this.components.length) - return (false); - for (var i = 0; i < this.components.length; ++i) { - if (this.components[i].oid !== other.components[i].oid) - return (false); - if (!globMatch(this.components[i].value, - other.components[i].value)) { - return (false); - } - } - return (true); -}; - -Identity.forHost = function (hostname) { - assert.string(hostname, 'hostname'); - return (new Identity({ - type: 'host', - hostname: hostname, - components: [ { name: 'cn', value: hostname } ] - })); -}; - -Identity.forUser = function (uid) { - assert.string(uid, 'uid'); - return (new Identity({ - type: 'user', - uid: uid, - components: [ { name: 'uid', value: uid } ] - })); -}; - -Identity.forEmail = function (email) { - assert.string(email, 'email'); - return (new Identity({ - type: 'email', - email: email, - components: [ { name: 'mail', value: email } ] - })); -}; - -Identity.parseDN = function (dn) { - assert.string(dn, 'dn'); - var parts = dn.split(','); - var cmps = parts.map(function (c) { - c = c.trim(); - var eqPos = c.indexOf('='); - var name = c.slice(0, eqPos).toLowerCase(); - var value = c.slice(eqPos + 1); - return ({ name: name, value: value }); - }); - return (new Identity({ components: cmps })); -}; - -Identity.parseAsn1 = function (der, top) { - var components = []; - der.readSequence(top); - var end = der.offset + der.length; - while (der.offset < end) { - der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); - var after = der.offset + der.length; - der.readSequence(); - var oid = der.readOID(); - var type = der.peek(); - var value; - switch (type) { - case asn1.Ber.PrintableString: - case asn1.Ber.IA5String: - case asn1.Ber.OctetString: - case asn1.Ber.T61String: - value = der.readString(type); - break; - case asn1.Ber.Utf8String: - value = der.readString(type, true); - value = value.toString('utf8'); - break; - case asn1.Ber.CharacterString: - case asn1.Ber.BMPString: - value = der.readString(type, true); - value = value.toString('utf16le'); - break; - default: - throw (new Error('Unknown asn1 type ' + type)); - } - components.push({ oid: oid, value: value }); - der._offset = after; - } - der._offset = end; - return (new Identity({ - components: components - })); -}; - -Identity.isIdentity = function (obj, ver) { - return (utils.isCompatible(obj, Identity, ver)); -}; - -/* - * API versions for Identity: - * [1,0] -- initial ver - */ -Identity.prototype._sshpkApiVersion = [1, 0]; - -Identity._oldVersionDetect = function (obj) { - return ([1, 0]); -}; - - -/***/ }), -/* 105 */ -/***/ (function(module, exports) { - -module.exports = require("buffer"); - -/***/ }), -/* 106 */ -/***/ (function(module, exports) { - -module.exports = require("tty"); - -/***/ }), -/* 107 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _stringify; - -function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); -} - -var _extends2; - -function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -exports.extractWorkspaces = extractWorkspaces; - -var _executeLifecycleScript; - -function _load_executeLifecycleScript() { - return _executeLifecycleScript = __webpack_require__(91); -} - -var _path; - -function _load_path() { - return _path = __webpack_require__(252); -} - -var _index; - -function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(160)); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _packageConstraintResolver; - -function _load_packageConstraintResolver() { - return _packageConstraintResolver = _interopRequireDefault(__webpack_require__(422)); -} - -var _requestManager; - -function _load_requestManager() { - return _requestManager = _interopRequireDefault(__webpack_require__(253)); -} - -var _index2; - -function _load_index2() { - return _index2 = __webpack_require__(40); -} - -var _index3; - -function _load_index3() { - return _index3 = __webpack_require__(146); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var detectIndent = __webpack_require__(540); - -var invariant = __webpack_require__(9); -var path = __webpack_require__(0); -var micromatch = __webpack_require__(80); -var isCi = __webpack_require__(191); - -function sortObject(object) { - var sortedObject = {}; - (0, (_keys || _load_keys()).default)(object).sort().forEach(function (item) { - sortedObject[item] = object[item]; - }); - return sortedObject; -} - -var Config = function () { - function Config(reporter) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Config); - - this.constraintResolver = new (_packageConstraintResolver || _load_packageConstraintResolver()).default(this, reporter); - this.requestManager = new (_requestManager || _load_requestManager()).default(reporter); - this.reporter = reporter; - this._init({}); - } - - // - - - // cache packages in offline mirror folder as new .tgz files - - - // - - - // - - - // - - - // - - - // - - - // - - - // - - - // - - - // - - - // - - - // - - - // - - - // Whether we should ignore executing lifecycle scripts - - - // - - - // - - - // - - - // - - - /** - * Execute a promise produced by factory if it doesn't exist in our cache with - * the associated key. - */ - - Config.prototype.getCache = function getCache(key, factory) { - var _this = this; - - var cached = this.cache[key]; - if (cached) { - return cached; - } - - return this.cache[key] = factory().catch(function (err) { - _this.cache[key] = null; - throw err; - }); - }; - - /** - * Get a config option from our yarn config. - */ - - Config.prototype.getOption = function getOption(key) { - var resolve = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var value = this.registries.yarn.getOption(key); - - if (resolve && typeof value === 'string' && value.length) { - return (0, (_path || _load_path()).resolveWithHome)(value); - } - - return value; - }; - - /** - * Reduce a list of versions to a single one based on an input range. - */ - - Config.prototype.resolveConstraints = function resolveConstraints(versions, range) { - return this.constraintResolver.reduce(versions, range); - }; - - /** - * Initialise config. Fetch registry options, find package roots. - */ - - Config.prototype.init = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _this2 = this; - - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this._init(opts); - - this.workspaceRootFolder = yield this.findWorkspaceRoot(this.cwd); - this.lockfileFolder = this.workspaceRootFolder || this.cwd; - - this.linkedModules = []; - - var linkedModules = void 0; - try { - linkedModules = yield (_fs || _load_fs()).readdir(this.linkFolder); - } catch (err) { - if (err.code === 'ENOENT') { - linkedModules = []; - } else { - throw err; - } - } - - var _loop = function* _loop(dir) { - var linkedPath = path.join(_this2.linkFolder, dir); - - if (dir[0] === '@') { - var _linkedModules; - - // it's a scope, not a package - var scopedLinked = yield (_fs || _load_fs()).readdir(linkedPath); - (_linkedModules = _this2.linkedModules).push.apply(_linkedModules, scopedLinked.map(function (scopedDir) { - return path.join(dir, scopedDir); - })); - } else { - _this2.linkedModules.push(dir); - } - }; - - for (var _iterator = linkedModules, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var dir = _ref2; - yield* _loop(dir); - } - - for (var _iterator2 = (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var _key = _ref3; - - var Registry = (_index2 || _load_index2()).registries[_key]; - - // instantiate registry - var _registry = new Registry(this.cwd, this.registries, this.requestManager, this.reporter); - yield _registry.init({ - registry: opts.registry - }); - - this.registries[_key] = _registry; - this.registryFolders.push(_registry.folder); - var rootModuleFolder = path.join(this.cwd, _registry.folder); - if (this.rootModuleFolders.indexOf(rootModuleFolder) < 0) { - this.rootModuleFolders.push(rootModuleFolder); - } - } - - this.networkConcurrency = opts.networkConcurrency || Number(this.getOption('network-concurrency')) || (_constants || _load_constants()).NETWORK_CONCURRENCY; - - this.childConcurrency = opts.childConcurrency || Number(this.getOption('child-concurrency')) || Number(process.env.CHILD_CONCURRENCY) || (_constants || _load_constants()).CHILD_CONCURRENCY; - - this.networkTimeout = opts.networkTimeout || Number(this.getOption('network-timeout')) || (_constants || _load_constants()).NETWORK_TIMEOUT; - - var httpProxy = opts.httpProxy || this.getOption('proxy'); - var httpsProxy = opts.httpsProxy || this.getOption('https-proxy'); - this.requestManager.setOptions({ - userAgent: String(this.getOption('user-agent')), - httpProxy: httpProxy === false ? false : String(httpProxy || ''), - httpsProxy: httpsProxy === false ? false : String(httpsProxy || ''), - strictSSL: Boolean(this.getOption('strict-ssl')), - ca: Array.prototype.concat(opts.ca || this.getOption('ca') || []).map(String), - cafile: String(opts.cafile || this.getOption('cafile', true) || ''), - cert: String(opts.cert || this.getOption('cert') || ''), - key: String(opts.key || this.getOption('key') || ''), - networkConcurrency: this.networkConcurrency, - networkTimeout: this.networkTimeout - }); - - var cacheRootFolder = opts.cacheFolder || this.getOption('cache-folder', true); - - if (!cacheRootFolder) { - var preferredCacheFolders = (_constants || _load_constants()).PREFERRED_MODULE_CACHE_DIRECTORIES; - var preferredCacheFolder = opts.preferredCacheFolder || this.getOption('preferred-cache-folder', true); - - if (preferredCacheFolder) { - preferredCacheFolders = [String(preferredCacheFolder)].concat(preferredCacheFolders); - } - - var cacheFolderQuery = yield (_fs || _load_fs()).getFirstSuitableFolder(preferredCacheFolders, (_fs || _load_fs()).constants.W_OK | (_fs || _load_fs()).constants.X_OK | (_fs || _load_fs()).constants.R_OK // eslint-disable-line no-bitwise - ); - for (var _iterator3 = cacheFolderQuery.skipped, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref4; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; - } - - var skippedEntry = _ref4; - - this.reporter.warn(this.reporter.lang('cacheFolderSkipped', skippedEntry.folder)); - } - - cacheRootFolder = cacheFolderQuery.folder; - if (cacheRootFolder && cacheFolderQuery.skipped.length > 0) { - this.reporter.warn(this.reporter.lang('cacheFolderSelected', cacheRootFolder)); - } - } - - if (!cacheRootFolder) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('cacheFolderMissing')); - } else { - this._cacheRootFolder = String(cacheRootFolder); - } - this.workspacesEnabled = this.getOption('workspaces-experimental') !== false; - this.workspacesNohoistEnabled = this.getOption('workspaces-nohoist-experimental') !== false; - - this.pruneOfflineMirror = Boolean(this.getOption('yarn-offline-mirror-pruning')); - this.enableMetaFolder = Boolean(this.getOption('enable-meta-folder')); - this.enableLockfileVersions = Boolean(this.getOption('yarn-enable-lockfile-versions')); - this.linkFileDependencies = Boolean(this.getOption('yarn-link-file-dependencies')); - this.packBuiltPackages = Boolean(this.getOption('experimental-pack-script-packages-in-mirror')); - - //init & create cacheFolder, tempFolder - this.cacheFolder = path.join(this._cacheRootFolder, 'v' + String((_constants || _load_constants()).CACHE_VERSION)); - this.tempFolder = opts.tempFolder || path.join(this.cacheFolder, '.tmp'); - yield (_fs || _load_fs()).mkdirp(this.cacheFolder); - yield (_fs || _load_fs()).mkdirp(this.tempFolder); - - if (opts.production !== undefined) { - this.production = Boolean(opts.production); - } else { - this.production = Boolean(this.getOption('production')) || process.env.NODE_ENV === 'production' && process.env.NPM_CONFIG_PRODUCTION !== 'false' && process.env.YARN_PRODUCTION !== 'false'; - } - - if (this.workspaceRootFolder && !this.workspacesEnabled) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesDisabled')); - } - }); - - function init() { - return _ref.apply(this, arguments); - } - - return init; - }(); - - Config.prototype._init = function _init(opts) { - this.rootModuleFolders = []; - this.registryFolders = []; - this.linkedModules = []; - - this.registries = (0, (_map || _load_map()).default)(); - this.cache = (0, (_map || _load_map()).default)(); - - // Ensure the cwd is always an absolute path. - this.cwd = path.resolve(opts.cwd || this.cwd || process.cwd()); - - this.looseSemver = opts.looseSemver == undefined ? true : opts.looseSemver; - - this.commandName = opts.commandName || ''; - - this.preferOffline = !!opts.preferOffline; - this.modulesFolder = opts.modulesFolder; - this.globalFolder = opts.globalFolder || (_constants || _load_constants()).GLOBAL_MODULE_DIRECTORY; - this.linkFolder = opts.linkFolder || (_constants || _load_constants()).LINK_REGISTRY_DIRECTORY; - this.offline = !!opts.offline; - this.binLinks = !!opts.binLinks; - this.updateChecksums = !!opts.updateChecksums; - - this.ignorePlatform = !!opts.ignorePlatform; - this.ignoreScripts = !!opts.ignoreScripts; - - this.disablePrepublish = !!opts.disablePrepublish; - - // $FlowFixMe$ - this.nonInteractive = !!opts.nonInteractive || isCi || !process.stdout.isTTY; - - this.scriptsPrependNodePath = !!opts.scriptsPrependNodePath; - - this.requestManager.setOptions({ - offline: !!opts.offline && !opts.preferOffline, - captureHar: !!opts.captureHar - }); - - if (this.modulesFolder) { - this.rootModuleFolders.push(this.modulesFolder); - } - }; - - /** - * Generate an absolute module path. - */ - - Config.prototype.generateModuleCachePath = function generateModuleCachePath(pkg) { - invariant(this.cacheFolder, 'No package root'); - invariant(pkg, 'Undefined package'); - - var name = pkg.name; - var uid = pkg.uid; - if (pkg.registry) { - name = `${pkg.registry}-${name}`; - } - - var hash = pkg.remote.hash; - - - if (pkg.version && pkg.version !== pkg.uid) { - uid = `${pkg.version}-${uid}`; - } else if (hash) { - uid += `-${hash}`; - } - - return path.join(this.cacheFolder, `${name}-${uid}`); - }; - - /** - * Execute lifecycle scripts in the specified directory. Ignoring when the --ignore-scripts flag has been - * passed. - */ - - Config.prototype.executeLifecycleScript = function executeLifecycleScript(commandName, cwd) { - if (this.ignoreScripts) { - return (_promise || _load_promise()).default.resolve(); - } else { - return (0, (_executeLifecycleScript || _load_executeLifecycleScript()).execFromManifest)(this, commandName, cwd || this.cwd); - } - }; - - /** - * Generate an absolute temporary filename location based on the input filename. - */ - - Config.prototype.getTemp = function getTemp(filename) { - invariant(this.tempFolder, 'No temp folder'); - return path.join(this.tempFolder, filename); - }; - - /** - * Remote packages may be cached in a file system to be available for offline installation. - * Second time the same package needs to be installed it will be loaded from there. - * Given a package's filename, return a path in the offline mirror location. - */ - - Config.prototype.getOfflineMirrorPath = function getOfflineMirrorPath(packageFilename) { - var mirrorPath = void 0; - - var _arr = ['npm', 'yarn']; - for (var _i4 = 0; _i4 < _arr.length; _i4++) { - var _key2 = _arr[_i4]; - var _registry2 = this.registries[_key2]; - - if (_registry2 == null) { - continue; - } - - var registryMirrorPath = _registry2.config['yarn-offline-mirror']; - - if (registryMirrorPath === false) { - return null; - } - - if (registryMirrorPath == null) { - continue; - } - - mirrorPath = registryMirrorPath; - } - - if (mirrorPath == null) { - return null; - } - - if (packageFilename == null) { - return mirrorPath; - } - - return path.join(mirrorPath, path.basename(packageFilename)); - }; - - /** - * Checker whether the folder input is a valid module folder. We output a yarn metadata - * file when we've successfully setup a folder so use this as a marker. - */ - - Config.prototype.isValidModuleDest = function () { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dest) { - if (!(yield (_fs || _load_fs()).exists(dest))) { - return false; - } - - if (!(yield (_fs || _load_fs()).exists(path.join(dest, (_constants || _load_constants()).METADATA_FILENAME)))) { - return false; - } - - return true; - }); - - function isValidModuleDest(_x3) { - return _ref5.apply(this, arguments); - } - - return isValidModuleDest; - }(); - - /** - * Read package metadata and normalized package info. - */ - - Config.prototype.readPackageMetadata = function readPackageMetadata(dir) { - var _this3 = this; - - return this.getCache(`metadata-${dir}`, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var metadata = yield _this3.readJson(path.join(dir, (_constants || _load_constants()).METADATA_FILENAME)); - var pkg = yield _this3.readManifest(dir, metadata.registry); - - return { - package: pkg, - artifacts: metadata.artifacts || [], - hash: metadata.hash, - remote: metadata.remote, - registry: metadata.registry - }; - })); - }; - - /** - * Read normalized package info according yarn-metadata.json - * throw an error if package.json was not found - */ - - Config.prototype.readManifest = function readManifest(dir, priorityRegistry) { - var _this4 = this; - - var isRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - return this.getCache(`manifest-${dir}`, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var manifest = yield _this4.maybeReadManifest(dir, priorityRegistry, isRoot); - - if (manifest) { - return manifest; - } else { - throw new (_errors || _load_errors()).MessageError(_this4.reporter.lang('couldntFindPackagejson', dir), 'ENOENT'); - } - })); - }; - - /** - * try get the manifest file by looking - * 1. manifest file in cache - * 2. manifest file in registry - */ - - - Config.prototype.maybeReadManifest = function () { - var _ref8 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, priorityRegistry) { - var isRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - var metadataLoc = path.join(dir, (_constants || _load_constants()).METADATA_FILENAME); - - if (yield (_fs || _load_fs()).exists(metadataLoc)) { - var metadata = yield this.readJson(metadataLoc); - - if (!priorityRegistry) { - priorityRegistry = metadata.priorityRegistry; - } - - if (typeof metadata.manifest !== 'undefined') { - return metadata.manifest; - } - } - - if (priorityRegistry) { - var file = yield this.tryManifest(dir, priorityRegistry, isRoot); - if (file) { - return file; - } - } - - for (var _iterator4 = (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries), _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { - var _ref9; - - if (_isArray4) { - if (_i5 >= _iterator4.length) break; - _ref9 = _iterator4[_i5++]; - } else { - _i5 = _iterator4.next(); - if (_i5.done) break; - _ref9 = _i5.value; - } - - var _registry3 = _ref9; - - if (priorityRegistry === _registry3) { - continue; - } - - var _file = yield this.tryManifest(dir, _registry3, isRoot); - if (_file) { - return _file; - } - } - - return null; - }); - - function maybeReadManifest(_x5, _x6) { - return _ref8.apply(this, arguments); - } - - return maybeReadManifest; - }(); - - /** - * Read the root manifest. - */ - - Config.prototype.readRootManifest = function readRootManifest() { - return this.readManifest(this.cwd, 'npm', true); - }; - - /** - * Try and find package info with the input directory and registry. - */ - - Config.prototype.tryManifest = function () { - var _ref10 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, registry, isRoot) { - var filename = (_index2 || _load_index2()).registries[registry].filename; - - var loc = path.join(dir, filename); - if (yield (_fs || _load_fs()).exists(loc)) { - var data = yield this.readJson(loc); - data._registry = registry; - data._loc = loc; - return (0, (_index || _load_index()).default)(data, dir, this, isRoot); - } else { - return null; - } - }); - - function tryManifest(_x8, _x9, _x10) { - return _ref10.apply(this, arguments); - } - - return tryManifest; - }(); - - Config.prototype.findManifest = function () { - var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, isRoot) { - for (var _iterator5 = (_index2 || _load_index2()).registryNames, _isArray5 = Array.isArray(_iterator5), _i6 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { - var _ref12; - - if (_isArray5) { - if (_i6 >= _iterator5.length) break; - _ref12 = _iterator5[_i6++]; - } else { - _i6 = _iterator5.next(); - if (_i6.done) break; - _ref12 = _i6.value; - } - - var _registry4 = _ref12; - - var manifest = yield this.tryManifest(dir, _registry4, isRoot); - - if (manifest) { - return manifest; - } - } - - return null; - }); - - function findManifest(_x11, _x12) { - return _ref11.apply(this, arguments); - } - - return findManifest; - }(); - - Config.prototype.findWorkspaceRoot = function () { - var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (initial) { - var previous = null; - var current = path.normalize(initial); - if (!(yield (_fs || _load_fs()).exists(current))) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('folderMissing', current)); - } - - do { - var manifest = yield this.findManifest(current, true); - var ws = extractWorkspaces(manifest); - if (ws && ws.packages) { - var relativePath = path.relative(current, initial); - if (relativePath === '' || micromatch([relativePath], ws.packages).length > 0) { - return current; - } else { - return null; - } - } - - previous = current; - current = path.dirname(current); - } while (current !== previous); - - return null; - }); - - function findWorkspaceRoot(_x13) { - return _ref13.apply(this, arguments); - } - - return findWorkspaceRoot; - }(); - - Config.prototype.resolveWorkspaces = function () { - var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (root, rootManifest) { - var _this5 = this; - - var workspaces = {}; - if (!this.workspacesEnabled) { - return workspaces; - } - - var ws = this.getWorkspaces(rootManifest, true); - var patterns = ws && ws.packages ? ws.packages : []; - - if (!Array.isArray(patterns)) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesSettingMustBeArray')); - } - - var registryFilenames = (_index2 || _load_index2()).registryNames.map(function (registryName) { - return _this5.registries[registryName].constructor.filename; - }).join('|'); - var trailingPattern = `/+(${registryFilenames})`; - // anything under folder (node_modules) should be ignored, thus use the '**' instead of shallow match "*" - var ignorePatterns = this.registryFolders.map(function (folder) { - return `/${folder}/**/+(${registryFilenames})`; - }); - - var files = yield (_promise || _load_promise()).default.all(patterns.map(function (pattern) { - return (_fs || _load_fs()).glob(pattern.replace(/\/?$/, trailingPattern), { - cwd: root, - ignore: ignorePatterns.map(function (ignorePattern) { - return pattern.replace(/\/?$/, ignorePattern); - }) - }); - })); - - for (var _iterator6 = new (_set || _load_set()).default((_ref16 = []).concat.apply(_ref16, files)), _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { - var _ref16; - - var _ref15; - - if (_isArray6) { - if (_i7 >= _iterator6.length) break; - _ref15 = _iterator6[_i7++]; - } else { - _i7 = _iterator6.next(); - if (_i7.done) break; - _ref15 = _i7.value; - } - - var file = _ref15; - - var _loc = path.join(root, path.dirname(file)); - var manifest = yield this.findManifest(_loc, false); - - if (!manifest) { - continue; - } - - if (!manifest.name) { - this.reporter.warn(this.reporter.lang('workspaceNameMandatory', _loc)); - continue; - } - if (!manifest.version) { - this.reporter.warn(this.reporter.lang('workspaceVersionMandatory', _loc)); - continue; - } - - if (Object.prototype.hasOwnProperty.call(workspaces, manifest.name)) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspaceNameDuplicate', manifest.name)); - } - - workspaces[manifest.name] = { loc: _loc, manifest }; - } - - return workspaces; - }); - - function resolveWorkspaces(_x14, _x15) { - return _ref14.apply(this, arguments); - } - - return resolveWorkspaces; - }(); - - // workspaces functions - - - Config.prototype.getWorkspaces = function getWorkspaces(manifest) { - var shouldThrow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - if (!manifest || !this.workspacesEnabled) { - return undefined; - } - - var ws = extractWorkspaces(manifest); - - if (!ws) { - return ws; - } - - // validate eligibility - var wsCopy = (0, (_extends2 || _load_extends()).default)({}, ws); - var warnings = []; - var errors = []; - - // packages - if (wsCopy.packages && wsCopy.packages.length > 0 && !manifest.private) { - errors.push(this.reporter.lang('workspacesRequirePrivateProjects')); - wsCopy = undefined; - } - // nohoist - if (wsCopy && wsCopy.nohoist && wsCopy.nohoist.length > 0) { - if (!this.workspacesNohoistEnabled) { - warnings.push(this.reporter.lang('workspacesNohoistDisabled', manifest.name)); - wsCopy.nohoist = undefined; - } else if (!manifest.private) { - errors.push(this.reporter.lang('workspacesNohoistRequirePrivatePackages', manifest.name)); - wsCopy.nohoist = undefined; - } - } - - if (errors.length > 0 && shouldThrow) { - throw new (_errors || _load_errors()).MessageError(errors.join('\n')); - } - - var msg = errors.concat(warnings).join('\n'); - if (msg.length > 0) { - this.reporter.warn(msg); - } - - return wsCopy; - }; - - /** - * Description - */ - - Config.prototype.getFolder = function getFolder(pkg) { - var registryName = pkg._registry; - if (!registryName) { - var ref = pkg._reference; - invariant(ref, 'expected reference'); - registryName = ref.registry; - } - return this.registries[registryName].folder; - }; - - /** - * Get root manifests. - */ - - Config.prototype.getRootManifests = function () { - var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var manifests = {}; - for (var _iterator7 = (_index2 || _load_index2()).registryNames, _isArray7 = Array.isArray(_iterator7), _i8 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { - var _ref18; - - if (_isArray7) { - if (_i8 >= _iterator7.length) break; - _ref18 = _iterator7[_i8++]; - } else { - _i8 = _iterator7.next(); - if (_i8.done) break; - _ref18 = _i8.value; - } - - var _registryName = _ref18; - - var _registry5 = (_index2 || _load_index2()).registries[_registryName]; - var jsonLoc = path.join(this.cwd, _registry5.filename); - - var _object = {}; - var _exists = false; - var _indent = void 0; - if (yield (_fs || _load_fs()).exists(jsonLoc)) { - _exists = true; - - var info = yield this.readJson(jsonLoc, (_fs || _load_fs()).readJsonAndFile); - _object = info.object; - _indent = detectIndent(info.content).indent || undefined; - } - manifests[_registryName] = { loc: jsonLoc, object: _object, exists: _exists, indent: _indent }; - } - return manifests; - }); - - function getRootManifests() { - return _ref17.apply(this, arguments); - } - - return getRootManifests; - }(); - - /** - * Save root manifests. - */ - - Config.prototype.saveRootManifests = function () { - var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (manifests) { - for (var _iterator8 = (_index2 || _load_index2()).registryNames, _isArray8 = Array.isArray(_iterator8), _i9 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) { - var _ref20; - - if (_isArray8) { - if (_i9 >= _iterator8.length) break; - _ref20 = _iterator8[_i9++]; - } else { - _i9 = _iterator8.next(); - if (_i9.done) break; - _ref20 = _i9.value; - } - - var _registryName2 = _ref20; - var _manifests$_registryN = manifests[_registryName2], - _loc2 = _manifests$_registryN.loc, - _object2 = _manifests$_registryN.object, - _exists2 = _manifests$_registryN.exists, - _indent2 = _manifests$_registryN.indent; - - if (!_exists2 && !(0, (_keys || _load_keys()).default)(_object2).length) { - continue; - } - - for (var _iterator9 = (_constants || _load_constants()).DEPENDENCY_TYPES, _isArray9 = Array.isArray(_iterator9), _i10 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) { - var _ref21; - - if (_isArray9) { - if (_i10 >= _iterator9.length) break; - _ref21 = _iterator9[_i10++]; - } else { - _i10 = _iterator9.next(); - if (_i10.done) break; - _ref21 = _i10.value; - } - - var field = _ref21; - - if (_object2[field]) { - _object2[field] = sortObject(_object2[field]); - } - } - - yield (_fs || _load_fs()).writeFilePreservingEol(_loc2, (0, (_stringify || _load_stringify()).default)(_object2, null, _indent2 || (_constants || _load_constants()).DEFAULT_INDENT) + '\n'); - } - }); - - function saveRootManifests(_x17) { - return _ref19.apply(this, arguments); - } - - return saveRootManifests; - }(); - - /** - * Call the passed factory (defaults to fs.readJson) and rethrow a pretty error message if it was the result - * of a syntax error. - */ - - Config.prototype.readJson = function readJson(loc) { - var factory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (_fs || _load_fs()).readJson; - - try { - return factory(loc); - } catch (err) { - if (err instanceof SyntaxError) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('jsonError', loc, err.message)); - } else { - throw err; - } - } - }; - - Config.create = function () { - var _ref22 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var reporter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new (_index3 || _load_index3()).NoopReporter(); - - var config = new Config(reporter); - yield config.init(opts); - return config; - }); - - function create() { - return _ref22.apply(this, arguments); - } - - return create; - }(); - - return Config; -}(); - -exports.default = Config; -function extractWorkspaces(manifest) { - if (!manifest || !manifest.workspaces) { - return undefined; - } - - if (Array.isArray(manifest.workspaces)) { - return { packages: manifest.workspaces }; - } - - if (manifest.workspaces.packages && Array.isArray(manifest.workspaces.packages) || manifest.workspaces.nohoist && Array.isArray(manifest.workspaces.nohoist)) { - return manifest.workspaces; - } - - return undefined; -} - -/***/ }), -/* 108 */ -/***/ (function(module, exports) { - -module.exports = require("net"); - -/***/ }), -/* 109 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.run = exports.Add = undefined; - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _extends2; - -function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _possibleConstructorReturn2; - -function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); -} - -var _inherits2; - -function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -var run = exports.run = function () { - var _ref12 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - if (!args.length) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('missingAddDependencies')); - } - - var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); - - yield (0, (_install || _load_install()).wrapLifecycle)(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var install = new Add(args, flags, config, reporter, lockfile); - yield install.init(); - })); - }); - - return function run(_x4, _x5, _x6, _x7) { - return _ref12.apply(this, arguments); - }; -}(); - -exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; - -var _lockfile; - -function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); -} - -var _normalizePattern2; - -function _load_normalizePattern() { - return _normalizePattern2 = __webpack_require__(42); -} - -var _workspaceLayout; - -function _load_workspaceLayout() { - return _workspaceLayout = _interopRequireDefault(__webpack_require__(67)); -} - -var _index; - -function _load_index() { - return _index = __webpack_require__(41); -} - -var _list; - -function _load_list() { - return _list = __webpack_require__(232); -} - -var _install; - -function _load_install() { - return _install = __webpack_require__(34); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -var _invariant; - -function _load_invariant() { - return _invariant = _interopRequireDefault(__webpack_require__(9)); -} - -var _path; - -function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); -} - -var _semver; - -function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(20)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var SILENCE_DEPENDENCY_TYPE_WARNINGS = ['upgrade', 'upgrade-interactive']; - -var Add = exports.Add = function (_Install) { - (0, (_inherits2 || _load_inherits()).default)(Add, _Install); - - function Add(args, flags, config, reporter, lockfile) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Add); - - var workspaceRootIsCwd = config.cwd === config.lockfileFolder; - var _flags = flags ? (0, (_extends2 || _load_extends()).default)({}, flags, { workspaceRootIsCwd }) : { workspaceRootIsCwd }; - - var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Install.call(this, _flags, config, reporter, lockfile)); - - _this.args = args; - // only one flag is supported, so we can figure out which one was passed to `yarn add` - _this.flagToOrigin = [flags.dev && 'devDependencies', flags.optional && 'optionalDependencies', flags.peer && 'peerDependencies', 'dependencies'].filter(Boolean).shift(); - return _this; - } - - /** - * TODO - */ - - Add.prototype.prepareRequests = function prepareRequests(requests) { - var requestsWithArgs = requests.slice(); - - for (var _iterator = this.args, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var _pattern = _ref; - - requestsWithArgs.push({ - pattern: _pattern, - registry: 'npm', - optional: false - }); - } - return requestsWithArgs; - }; - - /** - * returns version for a pattern based on Manifest - */ - - - Add.prototype.getPatternVersion = function getPatternVersion(pattern, pkg) { - var tilde = this.flags.tilde; - var configPrefix = String(this.config.getOption('save-prefix')); - var exact = this.flags.exact || Boolean(this.config.getOption('save-exact')) || configPrefix === ''; - - var _normalizePattern = (0, (_normalizePattern2 || _load_normalizePattern()).normalizePattern)(pattern), - hasVersion = _normalizePattern.hasVersion, - range = _normalizePattern.range; - - var version = void 0; - - if ((0, (_index || _load_index()).getExoticResolver)(pattern)) { - // wasn't a name/range tuple so this is just a raw exotic pattern - version = pattern; - } else if (hasVersion && range && ((_semver || _load_semver()).default.satisfies(pkg.version, range) || (0, (_index || _load_index()).getExoticResolver)(range))) { - // if the user specified a range then use it verbatim - version = range; - } - - if (!version || (_semver || _load_semver()).default.valid(version)) { - var prefix = configPrefix || '^'; - - if (tilde) { - prefix = '~'; - } else if (version || exact) { - prefix = ''; - } - version = `${prefix}${pkg.version}`; - } - - return version; - }; - - Add.prototype.preparePatterns = function preparePatterns(patterns) { - var preparedPatterns = patterns.slice(); - for (var _iterator2 = this.resolver.dedupePatterns(this.args), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref2; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref2 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref2 = _i2.value; - } - - var _pattern2 = _ref2; - - var pkg = this.resolver.getResolvedPattern(_pattern2); - (0, (_invariant || _load_invariant()).default)(pkg, `missing package ${_pattern2}`); - var _version = this.getPatternVersion(_pattern2, pkg); - var newPattern = `${pkg.name}@${_version}`; - preparedPatterns.push(newPattern); - this.addedPatterns.push(newPattern); - if (newPattern === _pattern2) { - continue; - } - this.resolver.replacePattern(_pattern2, newPattern); - } - return preparedPatterns; - }; - - Add.prototype.preparePatternsForLinking = function preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) { - // remove the newly added patterns if cwd != root and update the in-memory package dependency instead - if (cwdIsRoot) { - return patterns; - } - - var manifest = void 0; - var cwdPackage = `${cwdManifest.name}@${cwdManifest.version}`; - try { - manifest = this.resolver.getStrictResolvedPattern(cwdPackage); - } catch (e) { - this.reporter.warn(this.reporter.lang('unknownPackage', cwdPackage)); - return patterns; - } - - var newPatterns = patterns; - this._iterateAddedPackages(function (pattern, registry, dependencyType, pkgName, version) { - // remove added package from patterns list - var filtered = newPatterns.filter(function (p) { - return p !== pattern; - }); - (0, (_invariant || _load_invariant()).default)(newPatterns.length - filtered.length > 0, `expect added pattern '${pattern}' in the list: ${patterns.toString()}`); - newPatterns = filtered; - - // add new package into in-memory manifest so they can be linked properly - manifest[dependencyType] = manifest[dependencyType] || {}; - if (manifest[dependencyType][pkgName] === version) { - // package already existed - return; - } - - // update dependencies in the manifest - (0, (_invariant || _load_invariant()).default)(manifest._reference, 'manifest._reference should not be null'); - var ref = manifest._reference; - - ref['dependencies'] = ref['dependencies'] || []; - ref['dependencies'].push(pattern); - }); - - return newPatterns; - }; - - Add.prototype.bailout = function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { - var lockfileCache = this.lockfile.cache; - if (!lockfileCache) { - return false; - } - var match = yield this.integrityChecker.check(patterns, lockfileCache, this.flags, workspaceLayout); - var haveLockfile = yield (_fs || _load_fs()).exists((_path || _load_path()).default.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME)); - if (match.integrityFileMissing && haveLockfile) { - // Integrity file missing, force script installations - this.scripts.setForce(true); - } - return false; - }); - - function bailout(_x, _x2) { - return _ref3.apply(this, arguments); - } - - return bailout; - }(); - - /** - * Description - */ - - Add.prototype.init = function () { - var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var isWorkspaceRoot = this.config.workspaceRootFolder && this.config.cwd === this.config.workspaceRootFolder; - - // running "yarn add something" in a workspace root is often a mistake - if (isWorkspaceRoot && !this.flags.ignoreWorkspaceRootCheck) { - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesAddRootCheck')); - } - - this.addedPatterns = []; - var patterns = yield (_install || _load_install()).Install.prototype.init.call(this); - yield this.maybeOutputSaveTree(patterns); - yield this.savePackages(); - return patterns; - }); - - function init() { - return _ref4.apply(this, arguments); - } - - return init; - }(); - - /** - * Description - */ - - Add.prototype.fetchRequestFromCwd = function fetchRequestFromCwd() { - return (_install || _load_install()).Install.prototype.fetchRequestFromCwd.call(this, this.args); - }; - - /** - * Output a tree of any newly added dependencies. - */ - - Add.prototype.maybeOutputSaveTree = function () { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns) { - // don't limit the shown tree depth - var opts = { - reqDepth: 0 - }; - - // restore the original patterns - var merged = [].concat(patterns, this.addedPatterns); - - var _ref6 = yield (0, (_list || _load_list()).buildTree)(this.resolver, this.linker, merged, opts, true, true), - trees = _ref6.trees, - count = _ref6.count; - - if (count === 1) { - this.reporter.success(this.reporter.lang('savedNewDependency')); - } else { - this.reporter.success(this.reporter.lang('savedNewDependencies', count)); - } - - if (!count) { - return; - } - - var resolverPatterns = new (_set || _load_set()).default(); - for (var _iterator3 = patterns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref7; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref7 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref7 = _i3.value; - } - - var _pattern3 = _ref7; - - var _ref9 = this.resolver.getResolvedPattern(_pattern3) || {}, - _version2 = _ref9.version, - name = _ref9.name; - - resolverPatterns.add(`${name}@${_version2}`); - } - var directRequireDependencies = trees.filter(function (_ref8) { - var name = _ref8.name; - return resolverPatterns.has(name); - }); - - this.reporter.info(this.reporter.lang('directDependencies')); - this.reporter.tree('newDirectDependencies', directRequireDependencies); - this.reporter.info(this.reporter.lang('allDependencies')); - this.reporter.tree('newAllDependencies', trees); - }); - - function maybeOutputSaveTree(_x3) { - return _ref5.apply(this, arguments); - } - - return maybeOutputSaveTree; - }(); - - /** - * Save added packages to manifest if any of the --save flags were used. - */ - - Add.prototype.savePackages = function () { - var _ref10 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var _this2 = this; - - // fill rootPatternsToOrigin without `excludePatterns` - yield (_install || _load_install()).Install.prototype.fetchRequestFromCwd.call(this); - // // get all the different registry manifests in this folder - var manifests = yield this.config.getRootManifests(); - - this._iterateAddedPackages(function (pattern, registry, dependencyType, pkgName, version) { - // add it to manifest - var object = manifests[registry].object; - - - object[dependencyType] = object[dependencyType] || {}; - object[dependencyType][pkgName] = version; - if (SILENCE_DEPENDENCY_TYPE_WARNINGS.indexOf(_this2.config.commandName) === -1 && dependencyType !== _this2.flagToOrigin) { - _this2.reporter.warn(_this2.reporter.lang('moduleAlreadyInManifest', pkgName, dependencyType, _this2.flagToOrigin)); - } - }); - - yield this.config.saveRootManifests(manifests); - }); - - function savePackages() { - return _ref10.apply(this, arguments); - } - - return savePackages; - }(); - - Add.prototype._iterateAddedPackages = function _iterateAddedPackages(f) { - var _this3 = this; - - var patternOrigins = (0, (_keys || _load_keys()).default)(this.rootPatternsToOrigin); - - // add new patterns to their appropriate registry manifest - - var _loop = function _loop(_pattern4) { - var pkg = _this3.resolver.getResolvedPattern(_pattern4); - (0, (_invariant || _load_invariant()).default)(pkg, `missing package ${_pattern4}`); - var version = _this3.getPatternVersion(_pattern4, pkg); - var ref = pkg._reference; - (0, (_invariant || _load_invariant()).default)(ref, 'expected package reference'); - // lookup the package to determine dependency type; used during `yarn upgrade` - var depType = patternOrigins.reduce(function (acc, prev) { - if (prev.indexOf(`${pkg.name}@`) === 0) { - return _this3.rootPatternsToOrigin[prev]; - } - return acc; - }, null); - - // depType is calculated when `yarn upgrade` command is used - var target = depType || _this3.flagToOrigin; - - f(_pattern4, ref.registry, target, pkg.name, version); - }; - - for (var _iterator4 = this.addedPatterns, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { - var _ref11; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref11 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref11 = _i4.value; - } - - var _pattern4 = _ref11; - - _loop(_pattern4); - } - }; - - return Add; -}((_install || _load_install()).Install); - -function hasWrapper(commander) { - return true; -} - -function setFlags(commander) { - commander.description('Installs a package and any packages that it depends on.'); - commander.usage('add [packages ...] [flags]'); - commander.option('-W, --ignore-workspace-root-check', 'required to run yarn add inside a workspace root'); - commander.option('-D, --dev', 'save package to your `devDependencies`'); - commander.option('-P, --peer', 'save package to your `peerDependencies`'); - commander.option('-O, --optional', 'save package to your `optionalDependencies`'); - commander.option('-E, --exact', 'install exact version'); - commander.option('-T, --tilde', 'install most recent release with the same minor version'); -} - -/***/ }), -/* 110 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.run = exports.pack = exports.packTarball = undefined; - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _from; - -function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(55)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var packTarball = exports.packTarball = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { - var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - mapHeader = _ref2.mapHeader; - - var pkg = yield config.readRootManifest(); - var bundledDependencies = pkg.bundledDependencies, - main = pkg.main, - onlyFiles = pkg.files; - - // include required files - - var filters = NEVER_IGNORE.slice(); - // include default filters unless `files` is used - if (!onlyFiles) { - filters = filters.concat(DEFAULT_IGNORE); - } - if (main) { - filters = filters.concat((0, (_filter || _load_filter()).ignoreLinesToRegex)(['!/' + main])); - } - - // include bundledDependencies - if (bundledDependencies) { - var folder = config.getFolder(pkg); - filters = (0, (_filter || _load_filter()).ignoreLinesToRegex)(bundledDependencies.map(function (name) { - return `!${folder}/${name}`; - }), '.'); - } - - // `files` field - if (onlyFiles) { - var lines = ['*']; - lines = lines.concat(onlyFiles.map(function (filename) { - return `!${filename}`; - }), onlyFiles.map(function (filename) { - return `!${path.join(filename, '**')}`; - })); - var regexes = (0, (_filter || _load_filter()).ignoreLinesToRegex)(lines, '.'); - filters = filters.concat(regexes); - } - - var files = yield (_fs || _load_fs()).walk(config.cwd, null, new (_set || _load_set()).default(FOLDERS_IGNORE)); - var dotIgnoreFiles = (0, (_filter || _load_filter()).filterOverridenGitignores)(files); - - // create ignores - for (var _iterator = dotIgnoreFiles, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref3; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref3 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref3 = _i.value; - } - - var file = _ref3; - - var raw = yield (_fs || _load_fs()).readFile(file.absolute); - var _lines = raw.split('\n'); - - var _regexes = (0, (_filter || _load_filter()).ignoreLinesToRegex)(_lines, path.dirname(file.relative)); - filters = filters.concat(_regexes); - } - - // files to definitely keep, takes precedence over ignore filter - var keepFiles = new (_set || _load_set()).default(); - - // files to definitely ignore - var ignoredFiles = new (_set || _load_set()).default(); - - // list of files that didn't match any of our patterns, if a directory in the chain above was matched - // then we should inherit it - var possibleKeepFiles = new (_set || _load_set()).default(); - - // apply filters - (0, (_filter || _load_filter()).sortFilter)(files, filters, keepFiles, possibleKeepFiles, ignoredFiles); - - return packWithIgnoreAndHeaders(config.cwd, function (name) { - var relative = path.relative(config.cwd, name); - // Don't ignore directories, since we need to recurse inside them to check for unignored files. - if (fs2.lstatSync(name).isDirectory()) { - var isParentOfKeptFile = (0, (_from || _load_from()).default)(keepFiles).some(function (name) { - return !path.relative(relative, name).startsWith('..'); - }); - return !isParentOfKeptFile; - } - // Otherwise, ignore a file if we're not supposed to keep it. - return !keepFiles.has(relative); - }, { mapHeader }); - }); - - return function packTarball(_x) { - return _ref.apply(this, arguments); - }; -}(); - -var pack = exports.pack = function () { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { - var packer = yield packTarball(config); - var compressor = packer.pipe(new zlib.Gzip()); - - return compressor; - }); - - return function pack(_x4) { - return _ref5.apply(this, arguments); - }; -}(); - -var run = exports.run = function () { - var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - var pkg = yield config.readRootManifest(); - if (!pkg.name) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('noName')); - } - if (!pkg.version) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('noVersion')); - } - - var normaliseScope = function normaliseScope(name) { - return name[0] === '@' ? name.substr(1).replace('/', '-') : name; - }; - var filename = flags.filename || path.join(config.cwd, `${normaliseScope(pkg.name)}-v${pkg.version}.tgz`); - - yield config.executeLifecycleScript('prepack'); - - var stream = yield pack(config); - - yield new (_promise || _load_promise()).default(function (resolve, reject) { - stream.pipe(fs2.createWriteStream(filename)); - stream.on('error', reject); - stream.on('close', resolve); - }); - - yield config.executeLifecycleScript('postpack'); - - reporter.success(reporter.lang('packWroteTarball', filename)); - }); - - return function run(_x5, _x6, _x7, _x8) { - return _ref6.apply(this, arguments); - }; -}(); - -exports.packWithIgnoreAndHeaders = packWithIgnoreAndHeaders; -exports.setFlags = setFlags; -exports.hasWrapper = hasWrapper; - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -var _filter; - -function _load_filter() { - return _filter = __webpack_require__(249); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var zlib = __webpack_require__(206); -var path = __webpack_require__(0); -var tar = __webpack_require__(140); -var fs2 = __webpack_require__(10); - -var FOLDERS_IGNORE = [ -// never allow version control folders -'.git', 'CVS', '.svn', '.hg', 'node_modules']; - -var DEFAULT_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([].concat(FOLDERS_IGNORE, [ - -// ignore cruft -'yarn.lock', '.lock-wscript', '.wafpickle-{0..9}', '*.swp', '._*', 'npm-debug.log', 'yarn-error.log', '.npmrc', '.yarnrc', '.npmignore', '.gitignore', '.DS_Store'])); - -var NEVER_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([ -// never ignore these files -'!/package.json', '!/readme*', '!/+(license|licence)*', '!/+(changes|changelog|history)*']); - -function packWithIgnoreAndHeaders(cwd, ignoreFunction) { - var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - mapHeader = _ref4.mapHeader; - - return tar.pack(cwd, { - ignore: ignoreFunction, - map: function map(header) { - var suffix = header.name === '.' ? '' : `/${header.name}`; - header.name = `package${suffix}`; - delete header.uid; - delete header.gid; - return mapHeader ? mapHeader(header) : header; - } - }); -} - -function setFlags(commander) { - commander.description('Creates a compressed gzip archive of package dependencies.'); - commander.option('-f, --filename ', 'filename'); -} - -function hasWrapper(commander, args) { - return true; -} - -/***/ }), -/* 111 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _stringify; - -function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _index; - -function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(160)); -} - -var _constants; - -function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var path = __webpack_require__(0); -/* eslint no-unused-vars: 0 */ - -var BaseFetcher = function () { - function BaseFetcher(dest, remote, config) { - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BaseFetcher); - - this.reporter = config.reporter; - this.packageName = remote.packageName; - this.reference = remote.reference; - this.registry = remote.registry; - this.hash = remote.hash; - this.remote = remote; - this.config = config; - this.dest = dest; - } - - BaseFetcher.prototype.setupMirrorFromCache = function setupMirrorFromCache() { - // fetcher subclasses may use this to perform actions such as copying over a cached tarball to the offline - // mirror etc - return (_promise || _load_promise()).default.resolve(); - }; - - BaseFetcher.prototype._fetch = function _fetch() { - return (_promise || _load_promise()).default.reject(new Error('Not implemented')); - }; - - BaseFetcher.prototype.fetch = function fetch(defaultManifest) { - var _this = this; - - return (_fs || _load_fs()).lockQueue.push(this.dest, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - yield (_fs || _load_fs()).mkdirp(_this.dest); - - // fetch package and get the hash - - var _ref2 = yield _this._fetch(), - hash = _ref2.hash; - - var pkg = yield (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - // load the new normalized manifest - try { - return yield _this.config.readManifest(_this.dest, _this.registry); - } catch (e) { - if (e.code === 'ENOENT' && defaultManifest) { - return (0, (_index || _load_index()).default)(defaultManifest, _this.dest, _this.config, false); - } else { - throw e; - } - } - })(); - - yield (_fs || _load_fs()).writeFile(path.join(_this.dest, (_constants || _load_constants()).METADATA_FILENAME), (0, (_stringify || _load_stringify()).default)({ - manifest: pkg, - artifacts: [], - remote: _this.remote, - registry: _this.registry, - hash - }, null, ' ')); - - return { - hash, - dest: _this.dest, - package: pkg, - cached: false - }; - })); - }; - - return BaseFetcher; -}(); - -exports.default = BaseFetcher; - -/***/ }), -/* 112 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _stringify; - -function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); -} - -var _classCallCheck2; - -function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var debug = __webpack_require__(533)('yarn'); - -var BlockingQueue = function () { - function BlockingQueue(alias) { - var maxConcurrency = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity; - (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BlockingQueue); - - this.concurrencyQueue = []; - this.maxConcurrency = maxConcurrency; - this.runningCount = 0; - this.warnedStuck = false; - this.alias = alias; - this.first = true; - - this.running = (0, (_map || _load_map()).default)(); - this.queue = (0, (_map || _load_map()).default)(); - - this.stuckTick = this.stuckTick.bind(this); - } - - BlockingQueue.prototype.stillActive = function stillActive() { - if (this.stuckTimer) { - clearTimeout(this.stuckTimer); - } - - this.stuckTimer = setTimeout(this.stuckTick, 5000); - - // We need to check the existence of unref because of https://github.com/facebook/jest/issues/4559 - // $FlowFixMe: Node's setInterval returns a Timeout, not a Number - this.stuckTimer.unref && this.stuckTimer.unref(); - }; - - BlockingQueue.prototype.stuckTick = function stuckTick() { - if (this.runningCount === 1) { - this.warnedStuck = true; - debug(`The ${(0, (_stringify || _load_stringify()).default)(this.alias)} blocking queue may be stuck. 5 seconds ` + `without any activity with 1 worker: ${(0, (_keys || _load_keys()).default)(this.running)[0]}`); - } - }; - - BlockingQueue.prototype.push = function push(key, factory) { - var _this = this; - - if (this.first) { - this.first = false; - } else { - this.stillActive(); - } - - return new (_promise || _load_promise()).default(function (resolve, reject) { - // we're already running so push ourselves to the queue - var queue = _this.queue[key] = _this.queue[key] || []; - queue.push({ factory, resolve, reject }); - - if (!_this.running[key]) { - _this.shift(key); - } - }); - }; - - BlockingQueue.prototype.shift = function shift(key) { - var _this2 = this; - - if (this.running[key]) { - delete this.running[key]; - this.runningCount--; - - if (this.stuckTimer) { - clearTimeout(this.stuckTimer); - this.stuckTimer = null; - } - - if (this.warnedStuck) { - this.warnedStuck = false; - debug(`${(0, (_stringify || _load_stringify()).default)(this.alias)} blocking queue finally resolved. Nothing to worry about.`); - } - } - - var queue = this.queue[key]; - if (!queue) { - return; - } - - var _queue$shift = queue.shift(), - resolve = _queue$shift.resolve, - reject = _queue$shift.reject, - factory = _queue$shift.factory; - - if (!queue.length) { - delete this.queue[key]; - } - - var next = function next() { - _this2.shift(key); - _this2.shiftConcurrencyQueue(); - }; - - var run = function run() { - _this2.running[key] = true; - _this2.runningCount++; - - factory().then(function (val) { - resolve(val); - next(); - return null; - }).catch(function (err) { - reject(err); - next(); - }); - }; - - this.maybePushConcurrencyQueue(run); - }; - - BlockingQueue.prototype.maybePushConcurrencyQueue = function maybePushConcurrencyQueue(run) { - if (this.runningCount < this.maxConcurrency) { - run(); - } else { - this.concurrencyQueue.push(run); - } - }; - - BlockingQueue.prototype.shiftConcurrencyQueue = function shiftConcurrencyQueue() { - if (this.runningCount < this.maxConcurrency) { - var fn = this.concurrencyQueue.shift(); - if (fn) { - fn(); - } - } - }; - - return BlockingQueue; -}(); - -exports.default = BlockingQueue; - -/***/ }), -/* 113 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -exports.default = guessName; - -var _url; - -function _load_url() { - return _url = _interopRequireDefault(__webpack_require__(19)); -} - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function cleanup(name) { - name = name.replace(/-\d+\.\d+\.\d+/, ''); - return name.replace(/\.git$|\.zip$|\.tar\.gz$|\.tar\.bz2$/, ''); -} - -function guessNameFallback(source) { - // If cannot parse as url, just return cleaned up last part - var parts = source.split('/'); - return cleanup(parts[parts.length - 1]); -} - -function guessName(source) { - try { - var parsed = (_url || _load_url()).default.parse(source); - - if (!parsed.pathname) { - return guessNameFallback(source); - } - - var parts = parsed.pathname.split('/'); - - // Priority goes to part that ends with .git - for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; - } - - var part = _ref; - - if (part.match(/\.git$/)) { - return cleanup(part); - } - } - - // Most likely a directory - if (parsed.host == null) { - return cleanup(parts[parts.length - 1]); - } - - // A site like github or gitlab - if (parts.length > 2) { - return cleanup(parts[2]); - } - - // Privately hosted package? - if (parts.length > 1) { - return cleanup(parts[1]); - } - - return guessNameFallback(source); - } catch (e) { - return guessNameFallback(source); - } -} - -/***/ }), -/* 114 */ -/***/ (function(module, exports, __webpack_require__) { - -// Load modules - -var Http = __webpack_require__(52); -var Hoek = __webpack_require__(464); - - -// Declare internals - -var internals = {}; - -exports.wrap = function (error, statusCode, message) { - - Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object'); - return (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 : undefined); // Avoids settings null message - Error.captureStackTrace(error, ctor); // Filter the stack to our external API - error.data = data || null; - internals.initialize(error, statusCode); - return error; -}; - -internals.initialize = function (error, statusCode, message) { - - var numberCode = parseInt(statusCode, 10); - Hoek.assert(!isNaN(numberCode) && numberCode >= 400, 'First argument must be a number (400+):', statusCode); - - error.isBoom = true; - error.isServer = numberCode >= 500; - - if (!error.hasOwnProperty('data')) { - error.data = null; - } - - error.output = { - statusCode: numberCode, - payload: {}, - headers: {} - }; - - error.reformat = internals.reformat; - error.reformat(); - - if (!message && - !error.message) { - - message = error.output.payload.error; - } - - if (message) { - error.message = (message + (error.message ? ': ' + error.message : '')); - } - - return error; -}; - - -internals.reformat = function () { - - this.output.payload.statusCode = this.output.statusCode; - this.output.payload.error = Http.STATUS_CODES[this.output.statusCode] || 'Unknown'; - - if (this.output.statusCode === 500) { - this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user - } - else if (this.message) { - this.output.payload.message = this.message; - } -}; - - -// 4xx Client Errors - -exports.badRequest = function (message, data) { - - return internals.create(400, message, data, exports.badRequest); -}; - - -exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[]) - - var err = internals.create(401, message, undefined, exports.unauthorized); - - if (!scheme) { - return err; - } - - var wwwAuthenticate = ''; - var i = 0; - var il = 0; - - if (typeof scheme === 'string') { - - // function (message, scheme, attributes) - - wwwAuthenticate = scheme; - - if (attributes || message) { - err.output.payload.attributes = {}; - } - - if (attributes) { - var names = Object.keys(attributes); - for (i = 0, il = names.length; i < il; ++i) { - var name = names[i]; - if (i) { - wwwAuthenticate += ','; - } - - var value = attributes[name]; - if (value === null || - value === undefined) { // Value can be zero - - value = ''; - } - wwwAuthenticate += ' ' + name + '="' + Hoek.escapeHeaderAttribute(value.toString()) + '"'; - err.output.payload.attributes[name] = value; - } - } - - if (message) { - if (attributes) { - wwwAuthenticate += ','; - } - wwwAuthenticate += ' error="' + Hoek.escapeHeaderAttribute(message) + '"'; - err.output.payload.attributes.error = message; - } - else { - err.isMissing = true; - } - } - else { - - // function (message, wwwAuthenticate[]) - - var wwwArray = scheme; - for (i = 0, il = wwwArray.length; i < il; ++i) { - if (i) { - wwwAuthenticate += ', '; - } - - wwwAuthenticate += wwwArray[i]; - } - } - - err.output.headers['WWW-Authenticate'] = wwwAuthenticate; - - return err; -}; - - -exports.forbidden = function (message, data) { - - return internals.create(403, message, data, exports.forbidden); -}; - - -exports.notFound = function (message, data) { - - return internals.create(404, message, data, exports.notFound); -}; - - -exports.methodNotAllowed = function (message, data) { - - return internals.create(405, message, data, exports.methodNotAllowed); -}; - - -exports.notAcceptable = function (message, data) { - - return internals.create(406, message, data, exports.notAcceptable); -}; - - -exports.proxyAuthRequired = function (message, data) { - - return internals.create(407, message, data, exports.proxyAuthRequired); -}; - - -exports.clientTimeout = function (message, data) { - - return internals.create(408, message, data, exports.clientTimeout); -}; - - -exports.conflict = function (message, data) { - - return internals.create(409, message, data, exports.conflict); -}; - - -exports.resourceGone = function (message, data) { - - return internals.create(410, message, data, exports.resourceGone); -}; - - -exports.lengthRequired = function (message, data) { - - return internals.create(411, message, data, exports.lengthRequired); -}; - - -exports.preconditionFailed = function (message, data) { - - return internals.create(412, message, data, exports.preconditionFailed); -}; - - -exports.entityTooLarge = function (message, data) { - - return internals.create(413, message, data, exports.entityTooLarge); -}; - - -exports.uriTooLong = function (message, data) { - - return internals.create(414, message, data, exports.uriTooLong); -}; - - -exports.unsupportedMediaType = function (message, data) { - - return internals.create(415, message, data, exports.unsupportedMediaType); -}; - - -exports.rangeNotSatisfiable = function (message, data) { - - return internals.create(416, message, data, exports.rangeNotSatisfiable); -}; - - -exports.expectationFailed = function (message, data) { - - return internals.create(417, message, data, exports.expectationFailed); -}; - -exports.badData = function (message, data) { - - return internals.create(422, message, data, exports.badData); -}; - - -exports.preconditionRequired = function (message, data) { - - return internals.create(428, message, data, exports.preconditionRequired); -}; - - -exports.tooManyRequests = function (message, data) { - - return internals.create(429, message, data, exports.tooManyRequests); -}; - - -// 5xx Server Errors - -exports.internal = function (message, data, statusCode) { - - return internals.serverError(message, data, statusCode, exports.internal); -}; - -internals.serverError = function (message, data, statusCode, ctor) { - - var error; - if (data instanceof Error) { - error = exports.wrap(data, statusCode, message); - } else { - error = internals.create(statusCode || 500, message, undefined, ctor); - error.data = data; - } - - return error; -}; - - -exports.notImplemented = function (message, data) { - - return internals.serverError(message, data, 501, exports.notImplemented); -}; - - -exports.badGateway = function (message, data) { - - return internals.serverError(message, data, 502, exports.badGateway); -}; - - -exports.serverTimeout = function (message, data) { - - return internals.serverError(message, data, 503, exports.serverTimeout); -}; - - -exports.gatewayTimeout = function (message, data) { - - return internals.serverError(message, data, 504, exports.gatewayTimeout); -}; - - -exports.badImplementation = function (message, data) { - - var err = internals.serverError(message, data, 500, exports.badImplementation); - err.isDeveloperError = true; - return err; -}; - - -/***/ }), -/* 115 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -const escapeStringRegexp = __webpack_require__(184); -const ansiStyles = __webpack_require__(377); -const supportsColor = __webpack_require__(471); - -const template = __webpack_require__(472); - -const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; - -// `color-convert` models to exclude from the Chalk API due to conflicts and such -const skipModels = new Set(['gray']); - -const styles = Object.create(null); - -function applyOptions(obj, options) { - options = options || {}; - - // Detect level if not set manually - const scLevel = supportsColor ? supportsColor.level : 0; - obj.level = options.level === undefined ? scLevel : options.level; - obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0; -} - -function Chalk(options) { - // We check for this.template here since calling `chalk.constructor()` - // by itself will have a `this` of a previously constructed chalk object - if (!this || !(this instanceof Chalk) || this.template) { - const chalk = {}; - applyOptions(chalk, options); - - chalk.template = function () { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk.template].concat(args)); - }; - - Object.setPrototypeOf(chalk, Chalk.prototype); - Object.setPrototypeOf(chalk.template, chalk); - - chalk.template.constructor = Chalk; - - return chalk.template; - } - - applyOptions(this, options); -} - -// Use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\u001B[94m'; -} - -for (const key of Object.keys(ansiStyles)) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - styles[key] = { - get() { - const codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], key); - } - }; -} - -ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); -for (const model of Object.keys(ansiStyles.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - - styles[model] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); - }; - } - }; -} - -ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); -for (const model of Object.keys(ansiStyles.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const level = this.level; - return function () { - const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - const codes = { - open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], model); - }; - } - }; -} - -const proto = Object.defineProperties(() => {}, styles); - -function build(_styles, key) { - const builder = function () { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - - const self = this; - - Object.defineProperty(builder, 'level', { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } - }); - - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } - }); - - // See below for fix regarding invisible grey/dim combination on Windows - builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey'; - - // `__proto__` is used because we must return a function, but there is - // no way to create a function with a different prototype - builder.__proto__ = proto; // eslint-disable-line no-proto - - return builder; -} - -function applyStyle() { - // Support varags, but simply cast to string in case there's only one arg - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (let a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || this.level <= 0 || !str) { - return str; - } - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - const originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - for (const code of this._styles.slice().reverse()) { - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - - // Close the styling before a linebreak and reopen - // after next line to fix a bleed issue on macOS - // https://github.com/chalk/chalk/pull/92 - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); - } - - // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - ansiStyles.dim.open = originalDim; - - return str; -} - -function chalkTag(chalk, strings) { - if (!Array.isArray(strings)) { - // If chalk() was called by itself or with a string, - // return the string itself as a string. - return [].slice.call(arguments, 1).join(' '); - } - - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return template(chalk, parts.join('')); -} - -Object.defineProperties(Chalk.prototype, styles); - -module.exports = Chalk(); // eslint-disable-line new-cap -module.exports.supportsColor = supportsColor; - - -/***/ }), -/* 116 */ -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; -}; - -/***/ }), -/* 117 */ -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__(56) - , call = __webpack_require__(271) - , isArrayIter = __webpack_require__(269) - , anObject = __webpack_require__(43) - , toLength = __webpack_require__(120) - , getIterFn = __webpack_require__(183) - , BREAK = {} - , RETURN = {}; -var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ - var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) - , f = ctx(fn, that, entries ? 2 : 1) - , index = 0 - , length, step, iterator, result; - if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if(result === BREAK || result === RETURN)return result; - } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ - result = call(iterator, f, step.value, entries); - if(result === BREAK || result === RETURN)return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; - -/***/ }), -/* 118 */ -/***/ (function(module, exports) { - -module.exports = true; - -/***/ }), -/* 119 */ -/***/ (function(module, exports) { - -exports.f = {}.propertyIsEnumerable; - -/***/ }), -/* 120 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(179) - , min = Math.min; -module.exports = function(it){ - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - -/***/ }), -/* 121 */ -/***/ (function(module, exports) { - -var id = 0 - , px = Math.random(); -module.exports = function(key){ - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - -/***/ }), -/* 122 */ -/***/ (function(module, exports) { - - - -/***/ }), -/* 123 */ -/***/ (function(module, exports, __webpack_require__) { - -// Basic Javascript Elliptic Curve implementation -// Ported loosely from BouncyCastle's Java EC code -// Only Fp curves implemented for now - -// Requires jsbn.js and jsbn2.js -var BigInteger = __webpack_require__(62).BigInteger -var Barrett = BigInteger.prototype.Barrett - -// ---------------- -// ECFieldElementFp - -// constructor -function ECFieldElementFp(q,x) { - this.x = x; - // TODO if(x.compareTo(q) >= 0) error - this.q = q; -} - -function feFpEquals(other) { - if(other == this) return true; - return (this.q.equals(other.q) && this.x.equals(other.x)); -} - -function feFpToBigInteger() { - return this.x; -} - -function feFpNegate() { - return new ECFieldElementFp(this.q, this.x.negate().mod(this.q)); -} - -function feFpAdd(b) { - return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q)); -} - -function feFpSubtract(b) { - return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q)); -} - -function feFpMultiply(b) { - return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q)); -} - -function feFpSquare() { - return new ECFieldElementFp(this.q, this.x.square().mod(this.q)); -} - -function feFpDivide(b) { - return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q)); -} - -ECFieldElementFp.prototype.equals = feFpEquals; -ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger; -ECFieldElementFp.prototype.negate = feFpNegate; -ECFieldElementFp.prototype.add = feFpAdd; -ECFieldElementFp.prototype.subtract = feFpSubtract; -ECFieldElementFp.prototype.multiply = feFpMultiply; -ECFieldElementFp.prototype.square = feFpSquare; -ECFieldElementFp.prototype.divide = feFpDivide; - -// ---------------- -// ECPointFp - -// constructor -function ECPointFp(curve,x,y,z) { - this.curve = curve; - this.x = x; - this.y = y; - // Projective coordinates: either zinv == null or z * zinv == 1 - // z and zinv are just BigIntegers, not fieldElements - if(z == null) { - this.z = BigInteger.ONE; - } - else { - this.z = z; - } - this.zinv = null; - //TODO: compression flag -} - -function pointFpGetX() { - if(this.zinv == null) { - this.zinv = this.z.modInverse(this.curve.q); - } - var r = this.x.toBigInteger().multiply(this.zinv); - this.curve.reduce(r); - return this.curve.fromBigInteger(r); -} - -function pointFpGetY() { - if(this.zinv == null) { - this.zinv = this.z.modInverse(this.curve.q); - } - var r = this.y.toBigInteger().multiply(this.zinv); - this.curve.reduce(r); - return this.curve.fromBigInteger(r); -} - -function pointFpEquals(other) { - if(other == this) return true; - if(this.isInfinity()) return other.isInfinity(); - if(other.isInfinity()) return this.isInfinity(); - var u, v; - // u = Y2 * Z1 - Y1 * Z2 - u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q); - if(!u.equals(BigInteger.ZERO)) return false; - // v = X2 * Z1 - X1 * Z2 - v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q); - return v.equals(BigInteger.ZERO); -} - -function pointFpIsInfinity() { - if((this.x == null) && (this.y == null)) return true; - return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO); -} - -function pointFpNegate() { - return new ECPointFp(this.curve, this.x, this.y.negate(), this.z); -} - -function pointFpAdd(b) { - if(this.isInfinity()) return b; - if(b.isInfinity()) return this; - - // u = Y2 * Z1 - Y1 * Z2 - var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q); - // v = X2 * Z1 - X1 * Z2 - var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q); - - if(BigInteger.ZERO.equals(v)) { - if(BigInteger.ZERO.equals(u)) { - return this.twice(); // this == b, so double - } - return this.curve.getInfinity(); // this = -b, so infinity - } - - var THREE = new BigInteger("3"); - var x1 = this.x.toBigInteger(); - var y1 = this.y.toBigInteger(); - var x2 = b.x.toBigInteger(); - var y2 = b.y.toBigInteger(); - - var v2 = v.square(); - var v3 = v2.multiply(v); - var x1v2 = x1.multiply(v2); - var zu2 = u.square().multiply(this.z); - - // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3) - var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q); - // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3 - var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q); - // z3 = v^3 * z1 * z2 - var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q); - - return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); -} - -function pointFpTwice() { - if(this.isInfinity()) return this; - if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity(); - - // TODO: optimized handling of constants - var THREE = new BigInteger("3"); - var x1 = this.x.toBigInteger(); - var y1 = this.y.toBigInteger(); - - var y1z1 = y1.multiply(this.z); - var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q); - var a = this.curve.a.toBigInteger(); - - // w = 3 * x1^2 + a * z1^2 - var w = x1.square().multiply(THREE); - if(!BigInteger.ZERO.equals(a)) { - w = w.add(this.z.square().multiply(a)); - } - w = w.mod(this.curve.q); - //this.curve.reduce(w); - // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1) - var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q); - // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3 - var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q); - // z3 = 8 * (y1 * z1)^3 - var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q); - - return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); -} - -// Simple NAF (Non-Adjacent Form) multiplication algorithm -// TODO: modularize the multiplication algorithm -function pointFpMultiply(k) { - if(this.isInfinity()) return this; - if(k.signum() == 0) return this.curve.getInfinity(); - - var e = k; - var h = e.multiply(new BigInteger("3")); - - var neg = this.negate(); - var R = this; - - var i; - for(i = h.bitLength() - 2; i > 0; --i) { - R = R.twice(); - - var hBit = h.testBit(i); - var eBit = e.testBit(i); - - if (hBit != eBit) { - R = R.add(hBit ? this : neg); - } - } - - return R; -} - -// Compute this*j + x*k (simultaneous multiplication) -function pointFpMultiplyTwo(j,x,k) { - var i; - if(j.bitLength() > k.bitLength()) - i = j.bitLength() - 1; - else - i = k.bitLength() - 1; - - var R = this.curve.getInfinity(); - var both = this.add(x); - while(i >= 0) { - R = R.twice(); - if(j.testBit(i)) { - if(k.testBit(i)) { - R = R.add(both); - } - else { - R = R.add(this); - } - } - else { - if(k.testBit(i)) { - R = R.add(x); - } - } - --i; - } - - return R; -} - -ECPointFp.prototype.getX = pointFpGetX; -ECPointFp.prototype.getY = pointFpGetY; -ECPointFp.prototype.equals = pointFpEquals; -ECPointFp.prototype.isInfinity = pointFpIsInfinity; -ECPointFp.prototype.negate = pointFpNegate; -ECPointFp.prototype.add = pointFpAdd; -ECPointFp.prototype.twice = pointFpTwice; -ECPointFp.prototype.multiply = pointFpMultiply; -ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo; - -// ---------------- -// ECCurveFp - -// constructor -function ECCurveFp(q,a,b) { - this.q = q; - this.a = this.fromBigInteger(a); - this.b = this.fromBigInteger(b); - this.infinity = new ECPointFp(this, null, null); - this.reducer = new Barrett(this.q); -} - -function curveFpGetQ() { - return this.q; -} - -function curveFpGetA() { - return this.a; -} - -function curveFpGetB() { - return this.b; -} - -function curveFpEquals(other) { - if(other == this) return true; - return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b)); -} - -function curveFpGetInfinity() { - return this.infinity; -} - -function curveFpFromBigInteger(x) { - return new ECFieldElementFp(this.q, x); -} - -function curveReduce(x) { - this.reducer.reduce(x); -} - -// for now, work with hex strings because they're easier in JS -function curveFpDecodePointHex(s) { - switch(parseInt(s.substr(0,2), 16)) { // first byte - case 0: - return this.infinity; - case 2: - case 3: - // point compression not supported yet - return null; - case 4: - case 6: - case 7: - var len = (s.length - 2) / 2; - var xHex = s.substr(2, len); - var yHex = s.substr(len+2, len); - - return new ECPointFp(this, - this.fromBigInteger(new BigInteger(xHex, 16)), - this.fromBigInteger(new BigInteger(yHex, 16))); - - default: // unsupported - return null; - } -} - -function curveFpEncodePointHex(p) { - if (p.isInfinity()) return "00"; - var xHex = p.getX().toBigInteger().toString(16); - var yHex = p.getY().toBigInteger().toString(16); - var oLen = this.getQ().toString(16).length; - if ((oLen % 2) != 0) oLen++; - while (xHex.length < oLen) { - xHex = "0" + xHex; - } - while (yHex.length < oLen) { - yHex = "0" + yHex; - } - return "04" + xHex + yHex; -} - -ECCurveFp.prototype.getQ = curveFpGetQ; -ECCurveFp.prototype.getA = curveFpGetA; -ECCurveFp.prototype.getB = curveFpGetB; -ECCurveFp.prototype.equals = curveFpEquals; -ECCurveFp.prototype.getInfinity = curveFpGetInfinity; -ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger; -ECCurveFp.prototype.reduce = curveReduce; -//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex; -ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex; - -// from: https://github.com/kaielvin/jsbn-ec-point-compression -ECCurveFp.prototype.decodePointHex = function(s) -{ - var yIsEven; - switch(parseInt(s.substr(0,2), 16)) { // first byte - case 0: - return this.infinity; - case 2: - yIsEven = false; - case 3: - if(yIsEven == undefined) yIsEven = true; - var len = s.length - 2; - var xHex = s.substr(2, len); - var x = this.fromBigInteger(new BigInteger(xHex,16)); - var alpha = x.multiply(x.square().add(this.getA())).add(this.getB()); - var beta = alpha.sqrt(); - - if (beta == null) throw "Invalid point compression"; - - var betaValue = beta.toBigInteger(); - if (betaValue.testBit(0) != yIsEven) - { - // Use the other root - beta = this.fromBigInteger(this.getQ().subtract(betaValue)); - } - return new ECPointFp(this,x,beta); - case 4: - case 6: - case 7: - var len = (s.length - 2) / 2; - var xHex = s.substr(2, len); - var yHex = s.substr(len+2, len); - - return new ECPointFp(this, - this.fromBigInteger(new BigInteger(xHex, 16)), - this.fromBigInteger(new BigInteger(yHex, 16))); - - default: // unsupported - return null; - } -} -ECCurveFp.prototype.encodeCompressedPointHex = function(p) -{ - if (p.isInfinity()) return "00"; - var xHex = p.getX().toBigInteger().toString(16); - var oLen = this.getQ().toString(16).length; - if ((oLen % 2) != 0) oLen++; - while (xHex.length < oLen) - xHex = "0" + xHex; - var yPrefix; - if(p.getY().toBigInteger().isEven()) yPrefix = "02"; - else yPrefix = "03"; - - return yPrefix + xHex; -} - - -ECFieldElementFp.prototype.getR = function() -{ - if(this.r != undefined) return this.r; - - this.r = null; - var bitLength = this.q.bitLength(); - if (bitLength > 128) - { - var firstWord = this.q.shiftRight(bitLength - 64); - if (firstWord.intValue() == -1) - { - this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q); - } - } - return this.r; -} -ECFieldElementFp.prototype.modMult = function(x1,x2) -{ - return this.modReduce(x1.multiply(x2)); -} -ECFieldElementFp.prototype.modReduce = function(x) -{ - if (this.getR() != null) - { - var qLen = q.bitLength(); - while (x.bitLength() > (qLen + 1)) - { - var u = x.shiftRight(qLen); - var v = x.subtract(u.shiftLeft(qLen)); - if (!this.getR().equals(BigInteger.ONE)) - { - u = u.multiply(this.getR()); - } - x = u.add(v); - } - while (x.compareTo(q) >= 0) - { - x = x.subtract(q); - } - } - else - { - x = x.mod(q); - } - return x; -} -ECFieldElementFp.prototype.sqrt = function() -{ - if (!this.q.testBit(0)) throw "unsupported"; - - // p mod 4 == 3 - if (this.q.testBit(1)) - { - var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q)); - return z.square().equals(this) ? z : null; - } - - // p mod 4 == 1 - var qMinusOne = this.q.subtract(BigInteger.ONE); - - var legendreExponent = qMinusOne.shiftRight(1); - if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE))) - { - return null; - } - - var u = qMinusOne.shiftRight(2); - var k = u.shiftLeft(1).add(BigInteger.ONE); - - var Q = this.x; - var fourQ = modDouble(modDouble(Q)); - - var U, V; - do - { - var P; - do - { - P = new BigInteger(this.q.bitLength(), new SecureRandom()); - } - while (P.compareTo(this.q) >= 0 - || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne))); - - var result = this.lucasSequence(P, Q, k); - U = result[0]; - V = result[1]; - - if (this.modMult(V, V).equals(fourQ)) - { - // Integer division by 2, mod q - if (V.testBit(0)) - { - V = V.add(q); - } - - V = V.shiftRight(1); - - return new ECFieldElementFp(q,V); - } - } - while (U.equals(BigInteger.ONE) || U.equals(qMinusOne)); - - return null; -} -ECFieldElementFp.prototype.lucasSequence = function(P,Q,k) -{ - var n = k.bitLength(); - var s = k.getLowestSetBit(); - - var Uh = BigInteger.ONE; - var Vl = BigInteger.TWO; - var Vh = P; - var Ql = BigInteger.ONE; - var Qh = BigInteger.ONE; - - for (var j = n - 1; j >= s + 1; --j) - { - Ql = this.modMult(Ql, Qh); - - if (k.testBit(j)) - { - Qh = this.modMult(Ql, Q); - Uh = this.modMult(Uh, Vh); - Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); - Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1))); - } - else - { - Qh = Ql; - Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); - Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); - Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); - } - } - - Ql = this.modMult(Ql, Qh); - Qh = this.modMult(Ql, Q); - Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); - Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); - Ql = this.modMult(Ql, Qh); - - for (var j = 1; j <= s; ++j) - { - Uh = this.modMult(Uh, Vl); - Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); - Ql = this.modMult(Ql, Ql); - } - - return [ Uh, Vl ]; -} - -var exports = { - ECCurveFp: ECCurveFp, - ECPointFp: ECPointFp, - ECFieldElementFp: ECFieldElementFp -} - -module.exports = exports - - -/***/ }), -/* 124 */ -/***/ (function(module, exports, __webpack_require__) { - -// Load modules - -var Sntp = __webpack_require__(319); -var Boom = __webpack_require__(114); - - -// Declare internals - -var internals = {}; - - -exports.version = function () { - - return __webpack_require__(599).version; -}; - - -exports.limits = { - maxMatchLength: 4096 // Limit the length of uris and headers to avoid a DoS attack on string matching -}; - - -// Extract host and port from request - -// $1 $2 -internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+))?(?:(?:\r\n)?\s)*$/; // (IPv4, hostname)|(IPv6) - - -exports.parseHost = function (req, hostHeaderName) { - - hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host'); - var hostHeader = req.headers[hostHeaderName]; - if (!hostHeader) { - return null; - } - - if (hostHeader.length > exports.limits.maxMatchLength) { - return null; - } - - var hostParts = hostHeader.match(internals.hostHeaderRegex); - if (!hostParts) { - return null; - } - - return { - name: hostParts[1], - port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80)) - }; -}; - - -// Parse Content-Type header content - -exports.parseContentType = function (header) { - - if (!header) { - return ''; - } - - return header.split(';')[0].trim().toLowerCase(); -}; - - -// Convert node's to request configuration object - -exports.parseRequest = function (req, options) { - - if (!req.headers) { - return req; - } - - // Obtain host and port information - - var host; - if (!options.host || - !options.port) { - - host = exports.parseHost(req, options.hostHeaderName); - if (!host) { - return new Error('Invalid Host header'); - } - } - - var request = { - method: req.method, - url: req.url, - host: options.host || host.name, - port: options.port || host.port, - authorization: req.headers.authorization, - contentType: req.headers['content-type'] || '' - }; - - return request; -}; - - -exports.now = function (localtimeOffsetMsec) { - - return Sntp.now() + (localtimeOffsetMsec || 0); -}; - - -exports.nowSecs = function (localtimeOffsetMsec) { - - return Math.floor(exports.now(localtimeOffsetMsec) / 1000); -}; - - -internals.authHeaderRegex = /^(\w+)(?:\s+(.*))?$/; // Header: scheme[ something] -internals.attributeRegex = /^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/; // !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9 - - -// Parse Hawk HTTP Authorization header - -exports.parseAuthorizationHeader = function (header, keys) { - - keys = keys || ['id', 'ts', 'nonce', 'hash', 'ext', 'mac', 'app', 'dlg']; - - if (!header) { - return Boom.unauthorized(null, 'Hawk'); - } - - if (header.length > exports.limits.maxMatchLength) { - return Boom.badRequest('Header length too long'); - } - - var headerParts = header.match(internals.authHeaderRegex); - if (!headerParts) { - return Boom.badRequest('Invalid header syntax'); - } - - var scheme = headerParts[1]; - if (scheme.toLowerCase() !== 'hawk') { - return Boom.unauthorized(null, 'Hawk'); - } - - var attributesString = headerParts[2]; - if (!attributesString) { - return Boom.badRequest('Invalid header syntax'); - } - - var attributes = {}; - var errorMessage = ''; - var verify = attributesString.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g, function ($0, $1, $2) { - - // Check valid attribute names - - if (keys.indexOf($1) === -1) { - errorMessage = 'Unknown attribute: ' + $1; - return; - } - - // Allowed attribute value characters - - if ($2.match(internals.attributeRegex) === null) { - errorMessage = 'Bad attribute value: ' + $1; - return; - } - - // Check for duplicates - - if (attributes.hasOwnProperty($1)) { - errorMessage = 'Duplicate attribute: ' + $1; - return; - } - - attributes[$1] = $2; - return ''; - }); - - if (verify !== '') { - return Boom.badRequest(errorMessage || 'Bad header format'); - } - - return attributes; -}; - - -exports.unauthorized = function (message, attributes) { - - return Boom.unauthorized(message, 'Hawk', attributes); -}; - - - -/***/ }), -/* 125 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2012 Joyent, Inc. All rights reserved. - -var assert = __webpack_require__(126); -var sshpk = __webpack_require__(202); -var util = __webpack_require__(4); - -var HASH_ALGOS = { - 'sha1': true, - 'sha256': true, - 'sha512': true -}; - -var PK_ALGOS = { - 'rsa': true, - 'dsa': true, - 'ecdsa': true -}; - -function HttpSignatureError(message, caller) { - if (Error.captureStackTrace) - Error.captureStackTrace(this, caller || HttpSignatureError); - - this.message = message; - this.name = caller.name; -} -util.inherits(HttpSignatureError, Error); - -function InvalidAlgorithmError(message) { - HttpSignatureError.call(this, message, InvalidAlgorithmError); -} -util.inherits(InvalidAlgorithmError, HttpSignatureError); - -function validateAlgorithm(algorithm) { - var alg = algorithm.toLowerCase().split('-'); - - if (alg.length !== 2) { - throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' + - 'valid algorithm')); - } - - if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) { - throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' + - 'are not supported')); - } - - if (!HASH_ALGOS[alg[1]]) { - throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' + - 'supported hash algorithm')); - } - - return (alg); -} - -///--- API - -module.exports = { - - HASH_ALGOS: HASH_ALGOS, - PK_ALGOS: PK_ALGOS, - - HttpSignatureError: HttpSignatureError, - InvalidAlgorithmError: InvalidAlgorithmError, - - validateAlgorithm: validateAlgorithm, - - /** - * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. - * - * The intent of this module is to interoperate with OpenSSL only, - * specifically the node crypto module's `verify` method. - * - * @param {String} key an OpenSSH public key. - * @return {String} PEM encoded form of the RSA public key. - * @throws {TypeError} on bad input. - * @throws {Error} on invalid ssh key formatted data. - */ - sshKeyToPEM: function sshKeyToPEM(key) { - assert.string(key, 'ssh_key'); - - var k = sshpk.parseKey(key, 'ssh'); - return (k.toString('pem')); - }, - - - /** - * Generates an OpenSSH fingerprint from an ssh public key. - * - * @param {String} key an OpenSSH public key. - * @return {String} key fingerprint. - * @throws {TypeError} on bad input. - * @throws {Error} if what you passed doesn't look like an ssh public key. - */ - fingerprint: function fingerprint(key) { - assert.string(key, 'ssh_key'); - - var k = sshpk.parseKey(key, 'ssh'); - return (k.fingerprint('md5').toString('hex')); - }, - - /** - * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa) - * - * The reverse of the above function. - */ - pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) { - assert.equal('string', typeof (pem), 'typeof pem'); - - var k = sshpk.parseKey(pem, 'pem'); - k.comment = comment; - return (k.toString('ssh')); - } -}; - - -/***/ }), -/* 126 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright (c) 2012, Mark Cavage. All rights reserved. -// Copyright 2015 Joyent, Inc. - -var assert = __webpack_require__(36); -var Stream = __webpack_require__(29).Stream; -var util = __webpack_require__(4); - - -///--- Globals - -/* JSSTYLED */ -var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; - - -///--- Internal - -function _capitalize(str) { - return (str.charAt(0).toUpperCase() + str.slice(1)); -} - -function _toss(name, expected, oper, arg, actual) { - throw new assert.AssertionError({ - message: util.format('%s (%s) is required', name, expected), - actual: (actual === undefined) ? typeof (arg) : actual(arg), - expected: expected, - operator: oper || '===', - stackStartFunction: _toss.caller - }); -} - -function _getClass(arg) { - return (Object.prototype.toString.call(arg).slice(8, -1)); -} - -function noop() { - // Why even bother with asserts? -} - - -///--- Exports - -var types = { - bool: { - check: function (arg) { return typeof (arg) === 'boolean'; } - }, - func: { - check: function (arg) { return typeof (arg) === 'function'; } - }, - string: { - check: function (arg) { return typeof (arg) === 'string'; } - }, - object: { - check: function (arg) { - return typeof (arg) === 'object' && arg !== null; - } - }, - number: { - check: function (arg) { - return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); - } - }, - buffer: { - check: function (arg) { return Buffer.isBuffer(arg); }, - operator: 'Buffer.isBuffer' - }, - array: { - check: function (arg) { return Array.isArray(arg); }, - operator: 'Array.isArray' - }, - stream: { - check: function (arg) { return arg instanceof Stream; }, - operator: 'instanceof', - actual: _getClass - }, - date: { - check: function (arg) { return arg instanceof Date; }, - operator: 'instanceof', - actual: _getClass - }, - regexp: { - check: function (arg) { return arg instanceof RegExp; }, - operator: 'instanceof', - actual: _getClass - }, - uuid: { - check: function (arg) { - return typeof (arg) === 'string' && UUID_REGEXP.test(arg); - }, - operator: 'isUUID' - } -}; - -function _setExports(ndebug) { - var keys = Object.keys(types); - var out; - - /* re-export standard assert */ - if (process.env.NODE_NDEBUG) { - out = noop; - } else { - out = function (arg, msg) { - if (!arg) { - _toss(msg, 'true', arg); - } - }; - } - - /* standard checks */ - keys.forEach(function (k) { - if (ndebug) { - out[k] = noop; - return; - } - var type = types[k]; - out[k] = function (arg, msg) { - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* optional checks */ - keys.forEach(function (k) { - var name = 'optional' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!type.check(arg)) { - _toss(msg, k, type.operator, arg, type.actual); - } - }; - }); - - /* arrayOf checks */ - keys.forEach(function (k) { - var name = 'arrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* optionalArrayOf checks */ - keys.forEach(function (k) { - var name = 'optionalArrayOf' + _capitalize(k); - if (ndebug) { - out[name] = noop; - return; - } - var type = types[k]; - var expected = '[' + k + ']'; - out[name] = function (arg, msg) { - if (arg === undefined || arg === null) { - return; - } - if (!Array.isArray(arg)) { - _toss(msg, expected, type.operator, arg, type.actual); - } - var i; - for (i = 0; i < arg.length; i++) { - if (!type.check(arg[i])) { - _toss(msg, expected, type.operator, arg, type.actual); - } - } - }; - }); - - /* re-export built-in assertions */ - Object.keys(assert).forEach(function (k) { - if (k === 'AssertionError') { - out[k] = assert[k]; - return; - } - if (ndebug) { - out[k] = noop; - return; - } - out[k] = assert[k]; - }); - - /* export ourselves (for unit tests _only_) */ - out._setExports = _setExports; - - return out; -} - -module.exports = _setExports(process.env.NODE_NDEBUG); - - -/***/ }), -/* 127 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var chalk = __webpack_require__(39); -var figures = __webpack_require__(186); - -/** - * Separator object - * Used to space/separate choices group - * @constructor - * @param {String} line Separation line content (facultative) - */ - -var Separator = module.exports = function (line) { - this.type = 'separator'; - this.line = chalk.dim(line || new Array(15).join(figures.line)); -}; - -/** - * Helper function returning false if object is a separator - * @param {Object} obj object to test against - * @return {Boolean} `false` if object is a separator - */ - -Separator.exclude = function (obj) { - return obj.type !== 'separator'; -}; - -/** - * Stringify separator - * @return {String} the separator display string - */ - -Separator.prototype.toString = function () { - return this.line; -}; - - -/***/ }), -/* 128 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _ = __webpack_require__(32); -var chalk = __webpack_require__(39); - -/** - * The paginator keep trakcs of a pointer index in a list and return - * a subset of the choices if the list is too long. - */ - -var Paginator = module.exports = function () { - this.pointer = 0; - this.lastIndex = 0; -}; - -Paginator.prototype.paginate = function (output, active, pageSize) { - pageSize = pageSize || 7; - var middleOfList = Math.floor(pageSize / 2); - var lines = output.split('\n'); - - // Make sure there's enough lines to paginate - if (lines.length <= pageSize) { - return output; - } - - // Move the pointer only when the user go down and limit it to the middle of the list - if (this.pointer < middleOfList && this.lastIndex < active && active - this.lastIndex < pageSize) { - this.pointer = Math.min(middleOfList, this.pointer + active - this.lastIndex); - } - this.lastIndex = active; - - // Duplicate the lines so it give an infinite list look - var infinite = _.flatten([lines, lines, lines]); - var topIndex = Math.max(0, active + lines.length - this.pointer); - - var section = infinite.splice(topIndex, pageSize).join('\n'); - return section + '\n' + chalk.dim('(Move up and down to reveal more choices)'); -}; - - -/***/ }), -/* 129 */ -/***/ (function(module, exports) { - -/*! - * is-extglob - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - return typeof str === 'string' - && /[@?!+*]\(/.test(str); -}; - - -/***/ }), -/* 130 */ -/***/ (function(module, exports, __webpack_require__) { - -/*! - * is-glob - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - -var isExtglob = __webpack_require__(129); - -module.exports = function isGlob(str) { - return typeof str === 'string' - && (/[*!?{}(|)[\]]/.test(str) - || isExtglob(str)); -}; - -/***/ }), -/* 131 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * @fileOverview - * Core operations on curve 25519 required for the higher level modules. - */ - -/* - * Copyright (c) 2007, 2013, 2014 Michele Bini - * Copyright (c) 2014 Mega Limited - * under the MIT License. - * - * Authors: Guy K. Kloss, Michele Bini - * - * You should have received a copy of the license along with this program. - */ - -var crypto = __webpack_require__(14); - - /** - * @exports jodid25519/core - * Core operations on curve 25519 required for the higher level modules. - * - * @description - * Core operations on curve 25519 required for the higher level modules. - * - *

- * This core code is extracted from Michele Bini's curve255.js implementation, - * which is used as a base for Curve25519 ECDH and Ed25519 EdDSA operations. - *

- */ - var ns = {}; - - function _setbit(n, c, v) { - var i = c >> 4; - var a = n[i]; - a = a + (1 << (c & 0xf)) * v; - n[i] = a; - } - - function _getbit(n, c) { - return (n[c >> 4] >> (c & 0xf)) & 1; - } - - function _ZERO() { - return [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - } - - function _ONE() { - return [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - } - - // Basepoint. - function _BASE() { - return [9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - } - - // return -1, 0, +1 when a is less than, equal, or greater than b - function _bigintcmp(a, b) { - // The following code is a bit tricky to avoid code branching - var c, abs_r, mask; - var r = 0; - for (c = 15; c >= 0; c--) { - var x = a[c]; - var y = b[c]; - r = r + (x - y) * (1 - r * r); - // http://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs - // correct for [-294967295, 294967295] - mask = r >> 31; - abs_r = (r + mask) ^ mask; - // http://stackoverflow.com/questions/596467/how-do-i-convert-a-number-to-an-integer-in-javascript - // this rounds towards zero - r = ~~((r << 1) / (abs_r + 1)); - } - return r; - } - - function _bigintadd(a, b) { - var r = []; - var v; - r[0] = (v = a[0] + b[0]) & 0xffff; - r[1] = (v = (v >>> 16) + a[1] + b[1]) & 0xffff; - r[2] = (v = (v >>> 16) + a[2] + b[2]) & 0xffff; - r[3] = (v = (v >>> 16) + a[3] + b[3]) & 0xffff; - r[4] = (v = (v >>> 16) + a[4] + b[4]) & 0xffff; - r[5] = (v = (v >>> 16) + a[5] + b[5]) & 0xffff; - r[6] = (v = (v >>> 16) + a[6] + b[6]) & 0xffff; - r[7] = (v = (v >>> 16) + a[7] + b[7]) & 0xffff; - r[8] = (v = (v >>> 16) + a[8] + b[8]) & 0xffff; - r[9] = (v = (v >>> 16) + a[9] + b[9]) & 0xffff; - r[10] = (v = (v >>> 16) + a[10] + b[10]) & 0xffff; - r[11] = (v = (v >>> 16) + a[11] + b[11]) & 0xffff; - r[12] = (v = (v >>> 16) + a[12] + b[12]) & 0xffff; - r[13] = (v = (v >>> 16) + a[13] + b[13]) & 0xffff; - r[14] = (v = (v >>> 16) + a[14] + b[14]) & 0xffff; - r[15] = (v >>> 16) + a[15] + b[15]; - return r; - } - - function _bigintsub(a, b) { - var r = []; - var v; - r[0] = (v = 0x80000 + a[0] - b[0]) & 0xffff; - r[1] = (v = (v >>> 16) + 0x7fff8 + a[1] - b[1]) & 0xffff; - r[2] = (v = (v >>> 16) + 0x7fff8 + a[2] - b[2]) & 0xffff; - r[3] = (v = (v >>> 16) + 0x7fff8 + a[3] - b[3]) & 0xffff; - r[4] = (v = (v >>> 16) + 0x7fff8 + a[4] - b[4]) & 0xffff; - r[5] = (v = (v >>> 16) + 0x7fff8 + a[5] - b[5]) & 0xffff; - r[6] = (v = (v >>> 16) + 0x7fff8 + a[6] - b[6]) & 0xffff; - r[7] = (v = (v >>> 16) + 0x7fff8 + a[7] - b[7]) & 0xffff; - r[8] = (v = (v >>> 16) + 0x7fff8 + a[8] - b[8]) & 0xffff; - r[9] = (v = (v >>> 16) + 0x7fff8 + a[9] - b[9]) & 0xffff; - r[10] = (v = (v >>> 16) + 0x7fff8 + a[10] - b[10]) & 0xffff; - r[11] = (v = (v >>> 16) + 0x7fff8 + a[11] - b[11]) & 0xffff; - r[12] = (v = (v >>> 16) + 0x7fff8 + a[12] - b[12]) & 0xffff; - r[13] = (v = (v >>> 16) + 0x7fff8 + a[13] - b[13]) & 0xffff; - r[14] = (v = (v >>> 16) + 0x7fff8 + a[14] - b[14]) & 0xffff; - r[15] = (v >>> 16) - 8 + a[15] - b[15]; - return r; - } - - function _sqr8h(a7, a6, a5, a4, a3, a2, a1, a0) { - // 'division by 0x10000' can not be replaced by '>> 16' because - // more than 32 bits of precision are needed similarly - // 'multiplication by 2' cannot be replaced by '<< 1' - var r = []; - var v; - r[0] = (v = a0 * a0) & 0xffff; - r[1] = (v = (0 | (v / 0x10000)) + 2 * a0 * a1) & 0xffff; - r[2] = (v = (0 | (v / 0x10000)) + 2 * a0 * a2 + a1 * a1) & 0xffff; - r[3] = (v = (0 | (v / 0x10000)) + 2 * a0 * a3 + 2 * a1 * a2) & 0xffff; - r[4] = (v = (0 | (v / 0x10000)) + 2 * a0 * a4 + 2 * a1 * a3 + a2 - * a2) & 0xffff; - r[5] = (v = (0 | (v / 0x10000)) + 2 * a0 * a5 + 2 * a1 * a4 + 2 - * a2 * a3) & 0xffff; - r[6] = (v = (0 | (v / 0x10000)) + 2 * a0 * a6 + 2 * a1 * a5 + 2 - * a2 * a4 + a3 * a3) & 0xffff; - r[7] = (v = (0 | (v / 0x10000)) + 2 * a0 * a7 + 2 * a1 * a6 + 2 - * a2 * a5 + 2 * a3 * a4) & 0xffff; - r[8] = (v = (0 | (v / 0x10000)) + 2 * a1 * a7 + 2 * a2 * a6 + 2 - * a3 * a5 + a4 * a4) & 0xffff; - r[9] = (v = (0 | (v / 0x10000)) + 2 * a2 * a7 + 2 * a3 * a6 + 2 - * a4 * a5) & 0xffff; - r[10] = (v = (0 | (v / 0x10000)) + 2 * a3 * a7 + 2 * a4 * a6 - + a5 * a5) & 0xffff; - r[11] = (v = (0 | (v / 0x10000)) + 2 * a4 * a7 + 2 * a5 * a6) & 0xffff; - r[12] = (v = (0 | (v / 0x10000)) + 2 * a5 * a7 + a6 * a6) & 0xffff; - r[13] = (v = (0 | (v / 0x10000)) + 2 * a6 * a7) & 0xffff; - r[14] = (v = (0 | (v / 0x10000)) + a7 * a7) & 0xffff; - r[15] = 0 | (v / 0x10000); - return r; - } - - function _sqrmodp(a) { - var x = _sqr8h(a[15], a[14], a[13], a[12], a[11], a[10], a[9], - a[8]); - var z = _sqr8h(a[7], a[6], a[5], a[4], a[3], a[2], a[1], a[0]); - var y = _sqr8h(a[15] + a[7], a[14] + a[6], a[13] + a[5], a[12] - + a[4], - a[11] + a[3], a[10] + a[2], a[9] + a[1], a[8] - + a[0]); - var r = []; - var v; - r[0] = (v = 0x800000 + z[0] + (y[8] - x[8] - z[8] + x[0] - 0x80) - * 38) & 0xffff; - r[1] = (v = 0x7fff80 + (v >>> 16) + z[1] - + (y[9] - x[9] - z[9] + x[1]) * 38) & 0xffff; - r[2] = (v = 0x7fff80 + (v >>> 16) + z[2] - + (y[10] - x[10] - z[10] + x[2]) * 38) & 0xffff; - r[3] = (v = 0x7fff80 + (v >>> 16) + z[3] - + (y[11] - x[11] - z[11] + x[3]) * 38) & 0xffff; - r[4] = (v = 0x7fff80 + (v >>> 16) + z[4] - + (y[12] - x[12] - z[12] + x[4]) * 38) & 0xffff; - r[5] = (v = 0x7fff80 + (v >>> 16) + z[5] - + (y[13] - x[13] - z[13] + x[5]) * 38) & 0xffff; - r[6] = (v = 0x7fff80 + (v >>> 16) + z[6] - + (y[14] - x[14] - z[14] + x[6]) * 38) & 0xffff; - r[7] = (v = 0x7fff80 + (v >>> 16) + z[7] - + (y[15] - x[15] - z[15] + x[7]) * 38) & 0xffff; - r[8] = (v = 0x7fff80 + (v >>> 16) + z[8] + y[0] - x[0] - z[0] - + x[8] * 38) & 0xffff; - r[9] = (v = 0x7fff80 + (v >>> 16) + z[9] + y[1] - x[1] - z[1] - + x[9] * 38) & 0xffff; - r[10] = (v = 0x7fff80 + (v >>> 16) + z[10] + y[2] - x[2] - z[2] - + x[10] * 38) & 0xffff; - r[11] = (v = 0x7fff80 + (v >>> 16) + z[11] + y[3] - x[3] - z[3] - + x[11] * 38) & 0xffff; - r[12] = (v = 0x7fff80 + (v >>> 16) + z[12] + y[4] - x[4] - z[4] - + x[12] * 38) & 0xffff; - r[13] = (v = 0x7fff80 + (v >>> 16) + z[13] + y[5] - x[5] - z[5] - + x[13] * 38) & 0xffff; - r[14] = (v = 0x7fff80 + (v >>> 16) + z[14] + y[6] - x[6] - z[6] - + x[14] * 38) & 0xffff; - r[15] = 0x7fff80 + (v >>> 16) + z[15] + y[7] - x[7] - z[7] - + x[15] * 38; - _reduce(r); - return r; - } - - function _mul8h(a7, a6, a5, a4, a3, a2, a1, a0, b7, b6, b5, b4, b3, - b2, b1, b0) { - // 'division by 0x10000' can not be replaced by '>> 16' because - // more than 32 bits of precision are needed - var r = []; - var v; - r[0] = (v = a0 * b0) & 0xffff; - r[1] = (v = (0 | (v / 0x10000)) + a0 * b1 + a1 * b0) & 0xffff; - r[2] = (v = (0 | (v / 0x10000)) + a0 * b2 + a1 * b1 + a2 * b0) & 0xffff; - r[3] = (v = (0 | (v / 0x10000)) + a0 * b3 + a1 * b2 + a2 * b1 - + a3 * b0) & 0xffff; - r[4] = (v = (0 | (v / 0x10000)) + a0 * b4 + a1 * b3 + a2 * b2 - + a3 * b1 + a4 * b0) & 0xffff; - r[5] = (v = (0 | (v / 0x10000)) + a0 * b5 + a1 * b4 + a2 * b3 - + a3 * b2 + a4 * b1 + a5 * b0) & 0xffff; - r[6] = (v = (0 | (v / 0x10000)) + a0 * b6 + a1 * b5 + a2 * b4 - + a3 * b3 + a4 * b2 + a5 * b1 + a6 * b0) & 0xffff; - r[7] = (v = (0 | (v / 0x10000)) + a0 * b7 + a1 * b6 + a2 * b5 - + a3 * b4 + a4 * b3 + a5 * b2 + a6 * b1 + a7 * b0) & 0xffff; - r[8] = (v = (0 | (v / 0x10000)) + a1 * b7 + a2 * b6 + a3 * b5 - + a4 * b4 + a5 * b3 + a6 * b2 + a7 * b1) & 0xffff; - r[9] = (v = (0 | (v / 0x10000)) + a2 * b7 + a3 * b6 + a4 * b5 - + a5 * b4 + a6 * b3 + a7 * b2) & 0xffff; - r[10] = (v = (0 | (v / 0x10000)) + a3 * b7 + a4 * b6 + a5 * b5 - + a6 * b4 + a7 * b3) & 0xffff; - r[11] = (v = (0 | (v / 0x10000)) + a4 * b7 + a5 * b6 + a6 * b5 - + a7 * b4) & 0xffff; - r[12] = (v = (0 | (v / 0x10000)) + a5 * b7 + a6 * b6 + a7 * b5) & 0xffff; - r[13] = (v = (0 | (v / 0x10000)) + a6 * b7 + a7 * b6) & 0xffff; - r[14] = (v = (0 | (v / 0x10000)) + a7 * b7) & 0xffff; - r[15] = (0 | (v / 0x10000)); - return r; - } - - function _mulmodp(a, b) { - // Karatsuba multiplication scheme: x*y = (b^2+b)*x1*y1 - - // b*(x1-x0)*(y1-y0) + (b+1)*x0*y0 - var x = _mul8h(a[15], a[14], a[13], a[12], a[11], a[10], a[9], - a[8], b[15], b[14], b[13], b[12], b[11], b[10], - b[9], b[8]); - var z = _mul8h(a[7], a[6], a[5], a[4], a[3], a[2], a[1], a[0], - b[7], b[6], b[5], b[4], b[3], b[2], b[1], b[0]); - var y = _mul8h(a[15] + a[7], a[14] + a[6], a[13] + a[5], a[12] - + a[4], - a[11] + a[3], a[10] + a[2], a[9] + a[1], a[8] - + a[0], - b[15] + b[7], b[14] + b[6], b[13] + b[5], b[12] - + b[4], - b[11] + b[3], b[10] + b[2], b[9] + b[1], b[8] - + b[0]); - var r = []; - var v; - r[0] = (v = 0x800000 + z[0] + (y[8] - x[8] - z[8] + x[0] - 0x80) - * 38) & 0xffff; - r[1] = (v = 0x7fff80 + (v >>> 16) + z[1] - + (y[9] - x[9] - z[9] + x[1]) * 38) & 0xffff; - r[2] = (v = 0x7fff80 + (v >>> 16) + z[2] - + (y[10] - x[10] - z[10] + x[2]) * 38) & 0xffff; - r[3] = (v = 0x7fff80 + (v >>> 16) + z[3] - + (y[11] - x[11] - z[11] + x[3]) * 38) & 0xffff; - r[4] = (v = 0x7fff80 + (v >>> 16) + z[4] - + (y[12] - x[12] - z[12] + x[4]) * 38) & 0xffff; - r[5] = (v = 0x7fff80 + (v >>> 16) + z[5] - + (y[13] - x[13] - z[13] + x[5]) * 38) & 0xffff; - r[6] = (v = 0x7fff80 + (v >>> 16) + z[6] - + (y[14] - x[14] - z[14] + x[6]) * 38) & 0xffff; - r[7] = (v = 0x7fff80 + (v >>> 16) + z[7] - + (y[15] - x[15] - z[15] + x[7]) * 38) & 0xffff; - r[8] = (v = 0x7fff80 + (v >>> 16) + z[8] + y[0] - x[0] - z[0] - + x[8] * 38) & 0xffff; - r[9] = (v = 0x7fff80 + (v >>> 16) + z[9] + y[1] - x[1] - z[1] - + x[9] * 38) & 0xffff; - r[10] = (v = 0x7fff80 + (v >>> 16) + z[10] + y[2] - x[2] - z[2] - + x[10] * 38) & 0xffff; - r[11] = (v = 0x7fff80 + (v >>> 16) + z[11] + y[3] - x[3] - z[3] - + x[11] * 38) & 0xffff; - r[12] = (v = 0x7fff80 + (v >>> 16) + z[12] + y[4] - x[4] - z[4] - + x[12] * 38) & 0xffff; - r[13] = (v = 0x7fff80 + (v >>> 16) + z[13] + y[5] - x[5] - z[5] - + x[13] * 38) & 0xffff; - r[14] = (v = 0x7fff80 + (v >>> 16) + z[14] + y[6] - x[6] - z[6] - + x[14] * 38) & 0xffff; - r[15] = 0x7fff80 + (v >>> 16) + z[15] + y[7] - x[7] - z[7] - + x[15] * 38; - _reduce(r); - return r; - } - - function _reduce(arr) { - var aCopy = arr.slice(0); - var choice = [arr, aCopy]; - var v = arr[15]; - // Use the dummy copy instead of just returning to be more constant time. - var a = choice[(v < 0x8000) & 1]; - a[15] = v & 0x7fff; - // >32-bits of precision are required here so '/ 0x8000' can not be - // replaced by the arithmetic equivalent '>>> 15' - v = (0 | (v / 0x8000)) * 19; - a[0] = (v += a[0]) & 0xffff; - v = v >>> 16; - a[1] = (v += a[1]) & 0xffff; - v = v >>> 16; - a[2] = (v += a[2]) & 0xffff; - v = v >>> 16; - a[3] = (v += a[3]) & 0xffff; - v = v >>> 16; - a[4] = (v += a[4]) & 0xffff; - v = v >>> 16; - a[5] = (v += a[5]) & 0xffff; - v = v >>> 16; - a[6] = (v += a[6]) & 0xffff; - v = v >>> 16; - a[7] = (v += a[7]) & 0xffff; - v = v >>> 16; - a[8] = (v += a[8]) & 0xffff; - v = v >>> 16; - a[9] = (v += a[9]) & 0xffff; - v = v >>> 16; - a[10] = (v += a[10]) & 0xffff; - v = v >>> 16; - a[11] = (v += a[11]) & 0xffff; - v = v >>> 16; - a[12] = (v += a[12]) & 0xffff; - v = v >>> 16; - a[13] = (v += a[13]) & 0xffff; - v = v >>> 16; - a[14] = (v += a[14]) & 0xffff; - v = v >>> 16; - a[15] += v; - } - - function _addmodp(a, b) { - var r = []; - var v; - r[0] = (v = ((0 | (a[15] >>> 15)) + (0 | (b[15] >>> 15))) * 19 - + a[0] + b[0]) & 0xffff; - r[1] = (v = (v >>> 16) + a[1] + b[1]) & 0xffff; - r[2] = (v = (v >>> 16) + a[2] + b[2]) & 0xffff; - r[3] = (v = (v >>> 16) + a[3] + b[3]) & 0xffff; - r[4] = (v = (v >>> 16) + a[4] + b[4]) & 0xffff; - r[5] = (v = (v >>> 16) + a[5] + b[5]) & 0xffff; - r[6] = (v = (v >>> 16) + a[6] + b[6]) & 0xffff; - r[7] = (v = (v >>> 16) + a[7] + b[7]) & 0xffff; - r[8] = (v = (v >>> 16) + a[8] + b[8]) & 0xffff; - r[9] = (v = (v >>> 16) + a[9] + b[9]) & 0xffff; - r[10] = (v = (v >>> 16) + a[10] + b[10]) & 0xffff; - r[11] = (v = (v >>> 16) + a[11] + b[11]) & 0xffff; - r[12] = (v = (v >>> 16) + a[12] + b[12]) & 0xffff; - r[13] = (v = (v >>> 16) + a[13] + b[13]) & 0xffff; - r[14] = (v = (v >>> 16) + a[14] + b[14]) & 0xffff; - r[15] = (v >>> 16) + (a[15] & 0x7fff) + (b[15] & 0x7fff); - return r; - } - - function _submodp(a, b) { - var r = []; - var v; - r[0] = (v = 0x80000 - + ((0 | (a[15] >>> 15)) - (0 | (b[15] >>> 15)) - 1) - * 19 + a[0] - b[0]) & 0xffff; - r[1] = (v = (v >>> 16) + 0x7fff8 + a[1] - b[1]) & 0xffff; - r[2] = (v = (v >>> 16) + 0x7fff8 + a[2] - b[2]) & 0xffff; - r[3] = (v = (v >>> 16) + 0x7fff8 + a[3] - b[3]) & 0xffff; - r[4] = (v = (v >>> 16) + 0x7fff8 + a[4] - b[4]) & 0xffff; - r[5] = (v = (v >>> 16) + 0x7fff8 + a[5] - b[5]) & 0xffff; - r[6] = (v = (v >>> 16) + 0x7fff8 + a[6] - b[6]) & 0xffff; - r[7] = (v = (v >>> 16) + 0x7fff8 + a[7] - b[7]) & 0xffff; - r[8] = (v = (v >>> 16) + 0x7fff8 + a[8] - b[8]) & 0xffff; - r[9] = (v = (v >>> 16) + 0x7fff8 + a[9] - b[9]) & 0xffff; - r[10] = (v = (v >>> 16) + 0x7fff8 + a[10] - b[10]) & 0xffff; - r[11] = (v = (v >>> 16) + 0x7fff8 + a[11] - b[11]) & 0xffff; - r[12] = (v = (v >>> 16) + 0x7fff8 + a[12] - b[12]) & 0xffff; - r[13] = (v = (v >>> 16) + 0x7fff8 + a[13] - b[13]) & 0xffff; - r[14] = (v = (v >>> 16) + 0x7fff8 + a[14] - b[14]) & 0xffff; - r[15] = (v >>> 16) + 0x7ff8 + (a[15] & 0x7fff) - - (b[15] & 0x7fff); - return r; - } - - function _invmodp(a) { - var c = a; - var i = 250; - while (--i) { - a = _sqrmodp(a); - a = _mulmodp(a, c); - } - a = _sqrmodp(a); - a = _sqrmodp(a); - a = _mulmodp(a, c); - a = _sqrmodp(a); - a = _sqrmodp(a); - a = _mulmodp(a, c); - a = _sqrmodp(a); - a = _mulmodp(a, c); - return a; - } - - function _mulasmall(a) { - // 'division by 0x10000' can not be replaced by '>> 16' because - // more than 32 bits of precision are needed - var m = 121665; - var r = []; - var v; - r[0] = (v = a[0] * m) & 0xffff; - r[1] = (v = (0 | (v / 0x10000)) + a[1] * m) & 0xffff; - r[2] = (v = (0 | (v / 0x10000)) + a[2] * m) & 0xffff; - r[3] = (v = (0 | (v / 0x10000)) + a[3] * m) & 0xffff; - r[4] = (v = (0 | (v / 0x10000)) + a[4] * m) & 0xffff; - r[5] = (v = (0 | (v / 0x10000)) + a[5] * m) & 0xffff; - r[6] = (v = (0 | (v / 0x10000)) + a[6] * m) & 0xffff; - r[7] = (v = (0 | (v / 0x10000)) + a[7] * m) & 0xffff; - r[8] = (v = (0 | (v / 0x10000)) + a[8] * m) & 0xffff; - r[9] = (v = (0 | (v / 0x10000)) + a[9] * m) & 0xffff; - r[10] = (v = (0 | (v / 0x10000)) + a[10] * m) & 0xffff; - r[11] = (v = (0 | (v / 0x10000)) + a[11] * m) & 0xffff; - r[12] = (v = (0 | (v / 0x10000)) + a[12] * m) & 0xffff; - r[13] = (v = (0 | (v / 0x10000)) + a[13] * m) & 0xffff; - r[14] = (v = (0 | (v / 0x10000)) + a[14] * m) & 0xffff; - r[15] = (0 | (v / 0x10000)) + a[15] * m; - _reduce(r); - return r; - } - - function _dbl(x, z) { - var x_2, z_2, m, n, o; - m = _sqrmodp(_addmodp(x, z)); - n = _sqrmodp(_submodp(x, z)); - o = _submodp(m, n); - x_2 = _mulmodp(n, m); - z_2 = _mulmodp(_addmodp(_mulasmall(o), m), o); - return [x_2, z_2]; - } - - function _sum(x, z, x_p, z_p, x_1) { - var x_3, z_3, p, q; - p = _mulmodp(_submodp(x, z), _addmodp(x_p, z_p)); - q = _mulmodp(_addmodp(x, z), _submodp(x_p, z_p)); - x_3 = _sqrmodp(_addmodp(p, q)); - z_3 = _mulmodp(_sqrmodp(_submodp(p, q)), x_1); - return [x_3, z_3]; - } - - function _generateKey(curve25519) { - var buffer = crypto.randomBytes(32); - - // For Curve25519 DH keys, we need to apply some bit mask on generated - // keys: - // * clear bit 0, 1, 2 of first byte - // * clear bit 7 of last byte - // * set bit 6 of last byte - if (curve25519 === true) { - buffer[0] &= 0xf8; - buffer[31] = (buffer[31] & 0x7f) | 0x40; - } - var result = []; - for (var i = 0; i < buffer.length; i++) { - result.push(String.fromCharCode(buffer[i])); - } - return result.join(''); - } - - // Expose some functions to the outside through this name space. - // Note: This is not part of the public API. - ns.getbit = _getbit; - ns.setbit = _setbit; - ns.addmodp = _addmodp; - ns.invmodp = _invmodp; - ns.mulmodp = _mulmodp; - ns.reduce = _reduce; - ns.dbl = _dbl; - ns.sum = _sum; - ns.ZERO = _ZERO; - ns.ONE = _ONE; - ns.BASE = _BASE; - ns.bigintadd = _bigintadd; - ns.bigintsub = _bigintsub; - ns.bigintcmp = _bigintcmp; - ns.mulmodp = _mulmodp; - ns.sqrmodp = _sqrmodp; - ns.generateKey = _generateKey; - - -module.exports = ns; - - -/***/ }), -/* 132 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * @fileOverview - * A collection of general utility functions.. - */ - -/* - * Copyright (c) 2011, 2012, 2014 Ron Garret - * Copyright (c) 2007, 2013, 2014 Michele Bini - * Copyright (c) 2014 Mega Limited - * under the MIT License. - * - * Authors: Guy K. Kloss, Michele Bini, Ron Garret - * - * You should have received a copy of the license along with this program. - */ - -var core = __webpack_require__(131); - - /** - * @exports jodid25519/utils - * A collection of general utility functions.. - * - * @description - * A collection of general utility functions.. - */ - var ns = {}; - - var _HEXCHARS = "0123456789abcdef"; - - function _hexencode(vector) { - var result = []; - for (var i = vector.length - 1; i >= 0; i--) { - var value = vector[i]; - result.push(_HEXCHARS.substr((value >>> 12) & 0x0f, 1)); - result.push(_HEXCHARS.substr((value >>> 8) & 0x0f, 1)); - result.push(_HEXCHARS.substr((value >>> 4) & 0x0f, 1)); - result.push(_HEXCHARS.substr(value & 0x0f, 1)); - } - return result.join(''); - } - - function _hexdecode(vector) { - var result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - for (var i = vector.length - 1, l = 0; i >= 0; i -= 4) { - result[l] = (_HEXCHARS.indexOf(vector.charAt(i))) - | (_HEXCHARS.indexOf(vector.charAt(i - 1)) << 4) - | (_HEXCHARS.indexOf(vector.charAt(i - 2)) << 8) - | (_HEXCHARS.indexOf(vector.charAt(i - 3)) << 12); - l++; - } - return result; - } - - var _BASE32CHARS = "abcdefghijklmnopqrstuvwxyz234567"; - - var _BASE32VALUES = (function () { - var result = {}; - for (var i = 0; i < _BASE32CHARS.length; i++) { - result[_BASE32CHARS.charAt(i)] = i; - } - return result; - })(); - - function _base32encode(n) { - var c; - var r = ""; - for (c = 0; c < 255; c += 5) { - r = _BASE32CHARS.substr(core.getbit(n, c) - + (core.getbit(n, c + 1) << 1) - + (core.getbit(n, c + 2) << 2) - + (core.getbit(n, c + 3) << 3) - + (core.getbit(n, c + 4) << 4), 1) - + r; - } - return r; - } - - function _base32decode(n) { - var c = 0; - var r = core.ZERO(); - var l = n.length; - for (c = 0; (l > 0) && (c < 255); c += 5) { - l--; - var v = _BASE32VALUES[n.substr(l, 1)]; - core.setbit(r, c, v & 1); - v >>= 1; - core.setbit(r, c + 1, v & 1); - v >>= 1; - core.setbit(r, c + 2, v & 1); - v >>= 1; - core.setbit(r, c + 3, v & 1); - v >>= 1; - core.setbit(r, c + 4, v & 1); - } - return r; - } - - function _map(f, l) { - var result = new Array(l.length); - for (var i = 0; i < l.length; i++) { - result[i] = f(l[i]); - } - return result; - } - - function _chr(n) { - return String.fromCharCode(n); - } - - function _ord(c) { - return c.charCodeAt(0); - } - - function _bytes2string(bytes) { - return _map(_chr, bytes).join(''); - } - - function _string2bytes(s) { - return _map(_ord, s); - } - - - // Expose some functions to the outside through this name space. - - /** - * Encodes an array of unsigned 8-bit integers to a hex string. - * - * @function - * @param vector {array} - * Array containing the byte values. - * @returns {string} - * String containing vector in a hexadecimal representation. - */ - ns.hexEncode = _hexencode; - - - /** - * Decodes a hex string to an array of unsigned 8-bit integers. - * - * @function - * @param vector {string} - * String containing vector in a hexadecimal representation. - * @returns {array} - * Array containing the byte values. - */ - ns.hexDecode = _hexdecode; - - - /** - * Encodes an array of unsigned 8-bit integers using base32 encoding. - * - * @function - * @param vector {array} - * Array containing the byte values. - * @returns {string} - * String containing vector in a hexadecimal representation. - */ - ns.base32encode = _base32encode; - - - /** - * Decodes a base32 encoded string to an array of unsigned 8-bit integers. - * - * @function - * @param vector {string} - * String containing vector in a hexadecimal representation. - * @returns {array} - * Array containing the byte values. - */ - ns.base32decode = _base32decode; - - - /** - * Converts an unsigned 8-bit integer array representation to a byte string. - * - * @function - * @param vector {array} - * Array containing the byte values. - * @returns {string} - * Byte string representation of vector. - */ - ns.bytes2string = _bytes2string; - - - /** - * Converts a byte string representation to an array of unsigned - * 8-bit integers. - * - * @function - * @param vector {array} - * Array containing the byte values. - * @returns {string} - * Byte string representation of vector. - */ - ns.string2bytes = _string2bytes; - -module.exports = ns; - - -/***/ }), -/* 133 */ -/***/ (function(module, exports, __webpack_require__) { - -var isBuffer = __webpack_require__(624); -var toString = Object.prototype.toString; - -/** - * Get the native `typeof` a value. - * - * @param {*} `val` - * @return {*} Native javascript type - */ - -module.exports = function kindOf(val) { - // primitivies - if (typeof val === 'undefined') { - return 'undefined'; - } - if (val === null) { - return 'null'; - } - if (val === true || val === false || val instanceof Boolean) { - return 'boolean'; - } - if (typeof val === 'string' || val instanceof String) { - return 'string'; - } - if (typeof val === 'number' || val instanceof Number) { - return 'number'; - } - - // functions - if (typeof val === 'function' || val instanceof Function) { - return 'function'; - } - - // array - if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { - return 'array'; - } - - // check for instances of RegExp and Date before calling `toString` - if (val instanceof RegExp) { - return 'regexp'; - } - if (val instanceof Date) { - return 'date'; - } - - // other objects - var type = toString.call(val); - - if (type === '[object RegExp]') { - return 'regexp'; - } - if (type === '[object Date]') { - return 'date'; - } - if (type === '[object Arguments]') { - return 'arguments'; - } - if (type === '[object Error]') { - return 'error'; - } - - // buffer - if (isBuffer(val)) { - return 'buffer'; - } - - // es6: Map, WeakMap, Set, WeakSet - if (type === '[object Set]') { - return 'set'; - } - if (type === '[object WeakSet]') { - return 'weakset'; - } - if (type === '[object Map]') { - return 'map'; - } - if (type === '[object WeakMap]') { - return 'weakmap'; - } - if (type === '[object Symbol]') { - return 'symbol'; - } - - // typed arrays - if (type === '[object Int8Array]') { - return 'int8array'; - } - if (type === '[object Uint8Array]') { - return 'uint8array'; - } - if (type === '[object Uint8ClampedArray]') { - return 'uint8clampedarray'; - } - if (type === '[object Int16Array]') { - return 'int16array'; - } - if (type === '[object Uint16Array]') { - return 'uint16array'; - } - if (type === '[object Int32Array]') { - return 'int32array'; - } - if (type === '[object Uint32Array]') { - return 'uint32array'; - } - if (type === '[object Float32Array]') { - return 'float32array'; - } - if (type === '[object Float64Array]') { - return 'float64array'; - } - - // must be a plain object - return 'object'; -}; - - -/***/ }), -/* 134 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = __webpack_require__(0) -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __webpack_require__(465) - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } - - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} - - -/***/ }), -/* 135 */ -/***/ (function(module, exports, __webpack_require__) { - -var wrappy = __webpack_require__(203) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} - - -/***/ }), -/* 136 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isPromise = __webpack_require__(635); - -/** - * Return a function that will run a function asynchronously or synchronously - * - * example: - * runAsync(wrappedFunction, callback)(...args); - * - * @param {Function} func Function to run - * @param {Function} cb Callback function passed the `func` returned value - * @return {Function(arguments)} Arguments to pass to `func`. This function will in turn - * return a Promise (Node >= 0.12) or call the callbacks. - */ - -var runAsync = module.exports = function (func, cb) { - cb = cb || function () {}; - - return function () { - var async = false; - var args = arguments; - - var promise = new Promise(function (resolve, reject) { - var answer = func.apply({ - async: function () { - async = true; - return function (err, value) { - if (err) { - reject(err); - } else { - resolve(value); - } - }; - } - }, Array.prototype.slice.call(args)); - - if (!async) { - if (isPromise(answer)) { - answer.then(resolve, reject); - } else { - resolve(answer); - } - } - }); - - promise.then(cb.bind(null, null), cb); - - return promise; - } -}; - -runAsync.cb = function (func, cb) { - return runAsync(function () { - var args = Array.prototype.slice.call(arguments); - if (args.length === func.length - 1) { - args.push(this.async()); - } - return func.apply(this, args); - }, cb); -}; - - -/***/ }), -/* 137 */ -/***/ (function(module, exports, __webpack_require__) { - -var Rx = __webpack_require__(46); -__webpack_require__(711); -__webpack_require__(712); -__webpack_require__(713); -__webpack_require__(316); -__webpack_require__(714); -__webpack_require__(715); -__webpack_require__(716); -__webpack_require__(717); -__webpack_require__(317); -__webpack_require__(718); -__webpack_require__(719); - -module.exports = Rx; - - -/***/ }), -/* 138 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2015 Joyent, Inc. - -module.exports = { - read: read, - readSSHPrivate: readSSHPrivate, - write: write -}; - -var assert = __webpack_require__(17); -var asn1 = __webpack_require__(53); -var algs = __webpack_require__(26); -var utils = __webpack_require__(25); -var crypto = __webpack_require__(14); - -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); -var pem = __webpack_require__(63); -var rfc4253 = __webpack_require__(71); -var SSHBuffer = __webpack_require__(139); -var errors = __webpack_require__(50); - -var bcrypt; - -function read(buf, options) { - return (pem.read(buf, options)); -} - -var MAGIC = 'openssh-key-v1'; - -function readSSHPrivate(type, buf, options) { - buf = new SSHBuffer({buffer: buf}); - - var magic = buf.readCString(); - assert.strictEqual(magic, MAGIC, 'bad magic string'); - - var cipher = buf.readString(); - var kdf = buf.readString(); - var kdfOpts = buf.readBuffer(); - - var nkeys = buf.readInt(); - if (nkeys !== 1) { - throw (new Error('OpenSSH-format key file contains ' + - 'multiple keys: this is unsupported.')); - } - - var pubKey = buf.readBuffer(); - - if (type === 'public') { - assert.ok(buf.atEnd(), 'excess bytes left after key'); - return (rfc4253.read(pubKey)); - } - - var privKeyBlob = buf.readBuffer(); - assert.ok(buf.atEnd(), 'excess bytes left after key'); - - var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); - switch (kdf) { - case 'none': - if (cipher !== 'none') { - throw (new Error('OpenSSH-format key uses KDF "none" ' + - 'but specifies a cipher other than "none"')); - } - break; - case 'bcrypt': - var salt = kdfOptsBuf.readBuffer(); - var rounds = kdfOptsBuf.readInt(); - var cinf = utils.opensshCipherInfo(cipher); - if (bcrypt === undefined) { - bcrypt = __webpack_require__(256); - } - - if (typeof (options.passphrase) === 'string') { - options.passphrase = new Buffer(options.passphrase, - 'utf-8'); - } - if (!Buffer.isBuffer(options.passphrase)) { - throw (new errors.KeyEncryptedError( - options.filename, 'OpenSSH')); - } - - var pass = new Uint8Array(options.passphrase); - var salti = new Uint8Array(salt); - /* Use the pbkdf to derive both the key and the IV. */ - var out = new Uint8Array(cinf.keySize + cinf.blockSize); - var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, - out, out.length, rounds); - if (res !== 0) { - throw (new Error('bcrypt_pbkdf function returned ' + - 'failure, parameters invalid')); - } - out = new Buffer(out); - var ckey = out.slice(0, cinf.keySize); - var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); - var cipherStream = crypto.createDecipheriv(cinf.opensslName, - ckey, iv); - cipherStream.setAutoPadding(false); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - if (e.toString().indexOf('bad decrypt') !== -1) { - throw (new Error('Incorrect passphrase ' + - 'supplied, could not decrypt key')); - } - throw (e); - }); - cipherStream.write(privKeyBlob); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - privKeyBlob = Buffer.concat(chunks); - break; - default: - throw (new Error( - 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); - } - - buf = new SSHBuffer({buffer: privKeyBlob}); - - var checkInt1 = buf.readInt(); - var checkInt2 = buf.readInt(); - if (checkInt1 !== checkInt2) { - throw (new Error('Incorrect passphrase supplied, could not ' + - 'decrypt key')); - } - - var ret = {}; - var key = rfc4253.readInternal(ret, 'private', buf.remainder()); - - buf.skip(ret.consumed); - - var comment = buf.readString(); - key.comment = comment; - - return (key); -} - -function write(key, options) { - var pubKey; - if (PrivateKey.isPrivateKey(key)) - pubKey = key.toPublic(); - else - pubKey = key; - - var cipher = 'none'; - var kdf = 'none'; - var kdfopts = new Buffer(0); - var cinf = { blockSize: 8 }; - var passphrase; - if (options !== undefined) { - passphrase = options.passphrase; - if (typeof (passphrase) === 'string') - passphrase = new Buffer(passphrase, 'utf-8'); - if (passphrase !== undefined) { - assert.buffer(passphrase, 'options.passphrase'); - assert.optionalString(options.cipher, 'options.cipher'); - cipher = options.cipher; - if (cipher === undefined) - cipher = 'aes128-ctr'; - cinf = utils.opensshCipherInfo(cipher); - kdf = 'bcrypt'; - } - } - - var privBuf; - if (PrivateKey.isPrivateKey(key)) { - privBuf = new SSHBuffer({}); - var checkInt = crypto.randomBytes(4).readUInt32BE(0); - privBuf.writeInt(checkInt); - privBuf.writeInt(checkInt); - privBuf.write(key.toBuffer('rfc4253')); - privBuf.writeString(key.comment || ''); - - var n = 1; - while (privBuf._offset % cinf.blockSize !== 0) - privBuf.writeChar(n++); - privBuf = privBuf.toBuffer(); - } - - switch (kdf) { - case 'none': - break; - case 'bcrypt': - var salt = crypto.randomBytes(16); - var rounds = 16; - var kdfssh = new SSHBuffer({}); - kdfssh.writeBuffer(salt); - kdfssh.writeInt(rounds); - kdfopts = kdfssh.toBuffer(); - - if (bcrypt === undefined) { - bcrypt = __webpack_require__(256); - } - var pass = new Uint8Array(passphrase); - var salti = new Uint8Array(salt); - /* Use the pbkdf to derive both the key and the IV. */ - var out = new Uint8Array(cinf.keySize + cinf.blockSize); - var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, - out, out.length, rounds); - if (res !== 0) { - throw (new Error('bcrypt_pbkdf function returned ' + - 'failure, parameters invalid')); - } - out = new Buffer(out); - var ckey = out.slice(0, cinf.keySize); - var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); - - var cipherStream = crypto.createCipheriv(cinf.opensslName, - ckey, iv); - cipherStream.setAutoPadding(false); - var chunk, chunks = []; - cipherStream.once('error', function (e) { - throw (e); - }); - cipherStream.write(privBuf); - cipherStream.end(); - while ((chunk = cipherStream.read()) !== null) - chunks.push(chunk); - privBuf = Buffer.concat(chunks); - break; - default: - throw (new Error('Unsupported kdf ' + kdf)); - } - - var buf = new SSHBuffer({}); - - buf.writeCString(MAGIC); - buf.writeString(cipher); /* cipher */ - buf.writeString(kdf); /* kdf */ - buf.writeBuffer(kdfopts); /* kdfoptions */ - - buf.writeInt(1); /* nkeys */ - buf.writeBuffer(pubKey.toBuffer('rfc4253')); - - if (privBuf) - buf.writeBuffer(privBuf); - - buf = buf.toBuffer(); - - var header; - if (PrivateKey.isPrivateKey(key)) - header = 'OPENSSH PRIVATE KEY'; - else - header = 'OPENSSH PUBLIC KEY'; - - var tmp = buf.toString('base64'); - var len = tmp.length + (tmp.length / 70) + - 18 + 16 + header.length*2 + 10; - buf = new Buffer(len); - var o = 0; - o += buf.write('-----BEGIN ' + header + '-----\n', o); - for (var i = 0; i < tmp.length; ) { - var limit = i + 70; - if (limit > tmp.length) - limit = tmp.length; - o += buf.write(tmp.slice(i, limit), o); - buf[o++] = 10; - i = limit; - } - o += buf.write('-----END ' + header + '-----\n', o); - - return (buf.slice(0, o)); -} - - -/***/ }), -/* 139 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2015 Joyent, Inc. - -module.exports = SSHBuffer; - -var assert = __webpack_require__(17); - -function SSHBuffer(opts) { - assert.object(opts, 'options'); - if (opts.buffer !== undefined) - assert.buffer(opts.buffer, 'options.buffer'); - - this._size = opts.buffer ? opts.buffer.length : 1024; - this._buffer = opts.buffer || (new Buffer(this._size)); - this._offset = 0; -} - -SSHBuffer.prototype.toBuffer = function () { - return (this._buffer.slice(0, this._offset)); -}; - -SSHBuffer.prototype.atEnd = function () { - return (this._offset >= this._buffer.length); -}; - -SSHBuffer.prototype.remainder = function () { - return (this._buffer.slice(this._offset)); -}; - -SSHBuffer.prototype.skip = function (n) { - this._offset += n; -}; - -SSHBuffer.prototype.expand = function () { - this._size *= 2; - var buf = new Buffer(this._size); - this._buffer.copy(buf, 0); - this._buffer = buf; -}; - -SSHBuffer.prototype.readPart = function () { - return ({data: this.readBuffer()}); -}; - -SSHBuffer.prototype.readBuffer = function () { - var len = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - assert.ok(this._offset + len <= this._buffer.length, - 'length out of bounds at +0x' + this._offset.toString(16) + - ' (data truncated?)'); - var buf = this._buffer.slice(this._offset, this._offset + len); - this._offset += len; - return (buf); -}; - -SSHBuffer.prototype.readString = function () { - return (this.readBuffer().toString()); -}; - -SSHBuffer.prototype.readCString = function () { - var offset = this._offset; - while (offset < this._buffer.length && - this._buffer[offset] !== 0x00) - offset++; - assert.ok(offset < this._buffer.length, 'c string does not terminate'); - var str = this._buffer.slice(this._offset, offset).toString(); - this._offset = offset + 1; - return (str); -}; - -SSHBuffer.prototype.readInt = function () { - var v = this._buffer.readUInt32BE(this._offset); - this._offset += 4; - return (v); -}; - -SSHBuffer.prototype.readInt64 = function () { - assert.ok(this._offset + 8 < this._buffer.length, - 'buffer not long enough to read Int64'); - var v = this._buffer.slice(this._offset, this._offset + 8); - this._offset += 8; - return (v); -}; - -SSHBuffer.prototype.readChar = function () { - var v = this._buffer[this._offset++]; - return (v); -}; - -SSHBuffer.prototype.writeBuffer = function (buf) { - while (this._offset + 4 + buf.length > this._size) - this.expand(); - this._buffer.writeUInt32BE(buf.length, this._offset); - this._offset += 4; - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; - -SSHBuffer.prototype.writeString = function (str) { - this.writeBuffer(new Buffer(str, 'utf8')); -}; - -SSHBuffer.prototype.writeCString = function (str) { - while (this._offset + 1 + str.length > this._size) - this.expand(); - this._buffer.write(str, this._offset); - this._offset += str.length; - this._buffer[this._offset++] = 0; -}; - -SSHBuffer.prototype.writeInt = function (v) { - while (this._offset + 4 > this._size) - this.expand(); - this._buffer.writeUInt32BE(v, this._offset); - this._offset += 4; -}; - -SSHBuffer.prototype.writeInt64 = function (v) { - assert.buffer(v, 'value'); - if (v.length > 8) { - var lead = v.slice(0, v.length - 8); - for (var i = 0; i < lead.length; ++i) { - assert.strictEqual(lead[i], 0, - 'must fit in 64 bits of precision'); - } - v = v.slice(v.length - 8, v.length); - } - while (this._offset + 8 > this._size) - this.expand(); - v.copy(this._buffer, this._offset); - this._offset += 8; -}; - -SSHBuffer.prototype.writeChar = function (v) { - while (this._offset + 1 > this._size) - this.expand(); - this._buffer[this._offset++] = v; -}; - -SSHBuffer.prototype.writePart = function (p) { - this.writeBuffer(p.data); -}; - -SSHBuffer.prototype.write = function (buf) { - while (this._offset + buf.length > this._size) - this.expand(); - buf.copy(this._buffer, this._offset); - this._offset += buf.length; -}; - - -/***/ }), -/* 140 */ -/***/ (function(module, exports, __webpack_require__) { - -var chownr = __webpack_require__(473) -var tar = __webpack_require__(329) -var pump = __webpack_require__(301) -var mkdirp = __webpack_require__(196) -var fs = __webpack_require__(10) -var path = __webpack_require__(0) -var os = __webpack_require__(73) - -var win32 = os.platform() === 'win32' - -var noop = function () {} - -var echo = function (name) { - return name -} - -var normalize = !win32 ? echo : function (name) { - return name.replace(/\\/g, '/').replace(/[:?<>|]/g, '_') -} - -var statAll = function (fs, stat, cwd, ignore, entries, sort) { - var queue = entries || ['.'] - - return function loop (callback) { - if (!queue.length) return callback() - var next = queue.shift() - var nextAbs = path.join(cwd, next) - - stat(nextAbs, function (err, stat) { - if (err) return callback(err) - - if (!stat.isDirectory()) return callback(null, next, stat) - - fs.readdir(nextAbs, function (err, files) { - if (err) return callback(err) - - if (sort) files.sort() - for (var i = 0; i < files.length; i++) { - if (!ignore(path.join(cwd, next, files[i]))) queue.push(path.join(next, files[i])) - } - - callback(null, next, stat) - }) - }) - } -} - -var strip = function (map, level) { - return function (header) { - header.name = header.name.split('/').slice(level).join('/') - - var linkname = header.linkname - if (linkname && (header.type === 'link' || path.isAbsolute(linkname))) { - header.linkname = linkname.split('/').slice(level).join('/') - } - - return map(header) - } -} - -exports.pack = function (cwd, opts) { - if (!cwd) cwd = '.' - if (!opts) opts = {} - - var xfs = opts.fs || fs - var ignore = opts.ignore || opts.filter || noop - var map = opts.map || noop - var mapStream = opts.mapStream || echo - var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd, ignore, opts.entries, opts.sort) - var strict = opts.strict !== false - var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask() - var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0 - var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0 - var pack = opts.pack || tar.pack() - var finish = opts.finish || noop - - if (opts.strip) map = strip(map, opts.strip) - - if (opts.readable) { - dmode |= parseInt(555, 8) - fmode |= parseInt(444, 8) - } - if (opts.writable) { - dmode |= parseInt(333, 8) - fmode |= parseInt(222, 8) - } - - var onsymlink = function (filename, header) { - xfs.readlink(path.join(cwd, filename), function (err, linkname) { - if (err) return pack.destroy(err) - header.linkname = normalize(linkname) - pack.entry(header, onnextentry) - }) - } - - var onstat = function (err, filename, stat) { - if (err) return pack.destroy(err) - if (!filename) { - if (opts.finalize !== false) pack.finalize() - return finish(pack) - } - - if (stat.isSocket()) return onnextentry() // tar does not support sockets... - - var header = { - name: normalize(filename), - mode: (stat.mode | (stat.isDirectory() ? dmode : fmode)) & umask, - mtime: stat.mtime, - size: stat.size, - type: 'file', - uid: stat.uid, - gid: stat.gid - } - - if (stat.isDirectory()) { - header.size = 0 - header.type = 'directory' - header = map(header) || header - return pack.entry(header, onnextentry) - } - - if (stat.isSymbolicLink()) { - header.size = 0 - header.type = 'symlink' - header = map(header) || header - return onsymlink(filename, header) - } - - // TODO: add fifo etc... - - header = map(header) || header - - if (!stat.isFile()) { - if (strict) return pack.destroy(new Error('unsupported type for ' + filename)) - return onnextentry() - } - - var entry = pack.entry(header, onnextentry) - if (!entry) return - - var rs = mapStream(xfs.createReadStream(path.join(cwd, filename)), header) - - rs.on('error', function (err) { // always forward errors on destroy - entry.destroy(err) - }) - - pump(rs, entry) - } - - var onnextentry = function (err) { - if (err) return pack.destroy(err) - statNext(onstat) - } - - onnextentry() - - return pack -} - -var head = function (list) { - return list.length ? list[list.length - 1] : null -} - -var processGetuid = function () { - return process.getuid ? process.getuid() : -1 -} - -var processUmask = function () { - return process.umask ? process.umask() : 0 -} - -exports.extract = function (cwd, opts) { - if (!cwd) cwd = '.' - if (!opts) opts = {} - - var xfs = opts.fs || fs - var ignore = opts.ignore || opts.filter || noop - var map = opts.map || noop - var mapStream = opts.mapStream || echo - var own = opts.chown !== false && !win32 && processGetuid() === 0 - var extract = opts.extract || tar.extract() - var stack = [] - var now = new Date() - var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask() - var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0 - var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0 - var strict = opts.strict !== false - - if (opts.strip) map = strip(map, opts.strip) - - if (opts.readable) { - dmode |= parseInt(555, 8) - fmode |= parseInt(444, 8) - } - if (opts.writable) { - dmode |= parseInt(333, 8) - fmode |= parseInt(222, 8) - } - - var utimesParent = function (name, cb) { // we just set the mtime on the parent dir again everytime we write an entry - var top - while ((top = head(stack)) && name.slice(0, top[0].length) !== top[0]) stack.pop() - if (!top) return cb() - xfs.utimes(top[0], now, top[1], cb) - } - - var utimes = function (name, header, cb) { - if (opts.utimes === false) return cb() - - if (header.type === 'directory') return xfs.utimes(name, now, header.mtime, cb) - if (header.type === 'symlink') return utimesParent(name, cb) // TODO: how to set mtime on link? - - xfs.utimes(name, now, header.mtime, function (err) { - if (err) return cb(err) - utimesParent(name, cb) - }) - } - - var chperm = function (name, header, cb) { - var link = header.type === 'symlink' - var chmod = link ? xfs.lchmod : xfs.chmod - var chown = link ? xfs.lchown : xfs.chown - - if (!chmod) return cb() - - var mode = (header.mode | (header.type === 'directory' ? dmode : fmode)) & umask - chmod(name, mode, function (err) { - if (err) return cb(err) - if (!own) return cb() - if (!chown) return cb() - chown(name, header.uid, header.gid, cb) - }) - } - - extract.on('entry', function (header, stream, next) { - header = map(header) || header - header.name = normalize(header.name) - var name = path.join(cwd, path.join('/', header.name)) - - if (ignore(name, header)) { - stream.resume() - return next() - } - - var stat = function (err) { - if (err) return next(err) - utimes(name, header, function (err) { - if (err) return next(err) - if (win32) return next() - chperm(name, header, next) - }) - } - - var onsymlink = function () { - if (win32) return next() // skip symlinks on win for now before it can be tested - xfs.unlink(name, function () { - xfs.symlink(header.linkname, name, stat) - }) - } - - var onlink = function () { - if (win32) return next() // skip links on win for now before it can be tested - xfs.unlink(name, function () { - var srcpath = path.resolve(cwd, header.linkname) - - xfs.link(srcpath, name, function (err) { - if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) { - stream = xfs.createReadStream(srcpath) - return onfile() - } - - stat(err) - }) - }) - } - - var onfile = function () { - var ws = xfs.createWriteStream(name) - var rs = mapStream(stream, header) - - ws.on('error', function (err) { // always forward errors on destroy - rs.destroy(err) - }) - - pump(rs, ws, function (err) { - if (err) return next(err) - ws.on('close', stat) - }) - } - - if (header.type === 'directory') { - stack.push([name, header.mtime]) - return mkdirfix(name, { - fs: xfs, own: own, uid: header.uid, gid: header.gid - }, stat) - } - - mkdirfix(path.dirname(name), { - fs: xfs, own: own, uid: header.uid, gid: header.gid - }, function (err) { - if (err) return next(err) - - switch (header.type) { - case 'file': return onfile() - case 'link': return onlink() - case 'symlink': return onsymlink() - } - - if (strict) return next(new Error('unsupported type for ' + name + ' (' + header.type + ')')) - - stream.resume() - next() - }) - }) - - if (opts.finish) extract.on('finish', opts.finish) - - return extract -} - -function mkdirfix (name, opts, cb) { - mkdirp(name, {fs: opts.xfs}, function (err, made) { - if (!err && made && opts.own) { - chownr(made, opts.uid, opts.gid, cb) - } else { - cb(err) - } - }) -} - - -/***/ }), -/* 141 */ -/***/ (function(module, exports, __webpack_require__) { - (function(nacl) { 'use strict'; @@ -48692,7 +29356,7 @@ nacl.setPRNG = function(fn) { }); } else if (true) { // Node.js. - crypto = __webpack_require__(14); + crypto = __webpack_require__(21); if (crypto && crypto.randomBytes) { nacl.setPRNG(function(x, n) { var i, v = crypto.randomBytes(n); @@ -48707,31 +29371,16176 @@ nacl.setPRNG = function(fn) { /***/ }), -/* 142 */ +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * Base prompt implementation + * Should be extended by prompt types. + */ + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var chalk = __webpack_require__(35); +var runAsync = __webpack_require__(165); + +var _require = __webpack_require__(65), + filter = _require.filter, + flatMap = _require.flatMap, + share = _require.share, + take = _require.take, + takeUntil = _require.takeUntil; + +var Choices = __webpack_require__(491); +var ScreenManager = __webpack_require__(502); + +var Prompt = function () { + function Prompt(question, rl, answers) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Prompt); + + // Setup instance defaults property + _.assign(this, { + answers: answers, + status: 'pending' + }); + + // Set defaults prompt options + this.opt = _.defaults(_.clone(question), { + validate: function validate() { + return true; + }, + filter: function filter(val) { + return val; + }, + when: function when() { + return true; + }, + suffix: '', + prefix: chalk.green('?') + }); + + // Make sure name is present + if (!this.opt.name) { + this.throwParamError('name'); + } + + // Set default message if no message defined + if (!this.opt.message) { + this.opt.message = this.opt.name + ':'; + } + + // Normalize choices + if (Array.isArray(this.opt.choices)) { + this.opt.choices = new Choices(this.opt.choices, answers); + } + + this.rl = rl; + this.screen = new ScreenManager(this.rl); + } + + /** + * Start the Inquiry session and manage output value filtering + * @return {Promise} + */ + + Prompt.prototype.run = function run() { + var _this = this; + + return new (_promise || _load_promise()).default(function (resolve) { + _this._run(function (value) { + return resolve(value); + }); + }); + }; + + // Default noop (this one should be overwritten in prompts) + + + Prompt.prototype._run = function _run(cb) { + cb(); + }; + + /** + * Throw an error telling a required parameter is missing + * @param {String} name Name of the missing param + * @return {Throw Error} + */ + + Prompt.prototype.throwParamError = function throwParamError(name) { + throw new Error('You must provide a `' + name + '` parameter'); + }; + + /** + * Called when the UI closes. Override to do any specific cleanup necessary + */ + + + Prompt.prototype.close = function close() { + this.screen.releaseCursor(); + }; + + /** + * Run the provided validation method each time a submit event occur. + * @param {Rx.Observable} submit - submit event flow + * @return {Object} Object containing two observables: `success` and `error` + */ + + + Prompt.prototype.handleSubmitEvents = function handleSubmitEvents(submit) { + var self = this; + var validate = runAsync(this.opt.validate); + var asyncFilter = runAsync(this.opt.filter); + var validation = submit.pipe(flatMap(function (value) { + return asyncFilter(value, self.answers).then(function (filteredValue) { + return validate(filteredValue, self.answers).then(function (isValid) { + return { isValid: isValid, value: filteredValue }; + }, function (err) { + return { isValid: err }; + }); + }, function (err) { + return { isValid: err }; + }); + }), share()); + + var success = validation.pipe(filter(function (state) { + return state.isValid === true; + }), take(1)); + var error = validation.pipe(filter(function (state) { + return state.isValid !== true; + }), takeUntil(success)); + + return { + success: success, + error: error + }; + }; + + /** + * Generate the prompt question string + * @return {String} prompt question string + */ + + Prompt.prototype.getQuestion = function getQuestion() { + var message = this.opt.prefix + ' ' + chalk.bold(this.opt.message) + this.opt.suffix + chalk.reset(' '); + + // Append the default if available, and if question isn't answered + if (this.opt.default != null && this.status !== 'answered') { + // If default password is supplied, hide it + if (this.opt.type === 'password') { + message += chalk.italic.dim('[hidden] '); + } else { + message += chalk.dim('(' + this.opt.default + ') '); + } + } + + return message; + }; + + return Prompt; +}(); + +module.exports = Prompt; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _require = __webpack_require__(166), + fromEvent = _require.fromEvent; + +var _require2 = __webpack_require__(65), + filter = _require2.filter, + map = _require2.map, + share = _require2.share; + +function normalizeKeypressEvents(value, key) { + return { value: value, key: key || {} }; +} + +module.exports = function (rl) { + var keypress = fromEvent(rl.input, 'keypress', normalizeKeypressEvents) + // Ignore `enter` key. On the readline, we only care about the `line` event. + .pipe(filter(function (_ref) { + var key = _ref.key; + return key.name !== 'enter' && key.name !== 'return'; + })); + + return { + line: fromEvent(rl, 'line'), + keypress: keypress, + + normalizedUpKey: keypress.pipe(filter(function (_ref2) { + var key = _ref2.key; + return key.name === 'up' || key.name === 'k' || key.name === 'p' && key.ctrl; + }), share()), + + normalizedDownKey: keypress.pipe(filter(function (_ref3) { + var key = _ref3.key; + return key.name === 'down' || key.name === 'j' || key.name === 'n' && key.ctrl; + }), share()), + + numberKey: keypress.pipe(filter(function (e) { + return e.value && '123456789'.indexOf(e.value) >= 0; + }), map(function (e) { + return Number(e.value); + }), share()), + + spaceKey: keypress.pipe(filter(function (_ref4) { + var key = _ref4.key; + return key && key.name === 'space'; + }), share()), + aKey: keypress.pipe(filter(function (_ref5) { + var key = _ref5.key; + return key && key.name === 'a'; + }), share()), + iKey: keypress.pipe(filter(function (_ref6) { + var key = _ref6.key; + return key && key.name === 'i'; + }), share()) + }; +}; + +/***/ }), +/* 74 */ /***/ (function(module, exports) { -module.exports = require("child_process"); +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; + + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(63); +var createDesc = __webpack_require__(123); +module.exports = __webpack_require__(68) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +try { + var util = __webpack_require__(9); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = __webpack_require__(734); +} + + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +(function(){ + + // Copyright (c) 2005 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Basic JavaScript BN library - subset useful for RSA encryption. + + // Bits per digit + var dbits; + + // JavaScript engine analysis + var canary = 0xdeadbeefcafe; + var j_lm = ((canary&0xffffff)==0xefcafe); + + // (public) Constructor + function BigInteger(a,b,c) { + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); + } + + // return new, unset BigInteger + function nbi() { return new BigInteger(null); } + + // am: Compute w_j += (x*this_i), propagate carries, + // c is initial carry, returns final carry. + // c < 3*dvalue, x < 2*dvalue, this_i < dvalue + // We need to select the fastest one that works in this environment. + + // am1: use a single mult and divide to get the high bits, + // max digit bits should be 26 because + // max internal value = 2*dvalue^2-2*dvalue (< 2^53) + function am1(i,x,w,j,c,n) { + while(--n >= 0) { + var v = x*this[i++]+w[j]+c; + c = Math.floor(v/0x4000000); + w[j++] = v&0x3ffffff; + } + return c; + } + // am2 avoids a big mult-and-extract completely. + // Max digit bits should be <= 30 because we do bitwise ops + // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) + function am2(i,x,w,j,c,n) { + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this[i]&0x7fff; + var h = this[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w[j++] = l&0x3fffffff; + } + return c; + } + // Alternately, set max digit bits to 28 since some + // browsers slow down when dealing with 32-bit numbers. + function am3(i,x,w,j,c,n) { + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this[i]&0x3fff; + var h = this[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w[j++] = l&0xfffffff; + } + return c; + } + var inBrowser = typeof navigator !== "undefined"; + if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { + BigInteger.prototype.am = am2; + dbits = 30; + } + else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { + BigInteger.prototype.am = am1; + dbits = 26; + } + else { // Mozilla/Netscape seems to prefer am3 + BigInteger.prototype.am = am3; + dbits = 28; + } + + BigInteger.prototype.DB = dbits; + BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; + r.t = this.t; + r.s = this.s; + } + + // (protected) set from integer value x, -DV <= x < DV + function bnpFromInt(x) { + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this[0] = x; + else if(x < -1) this[0] = x+this.DV; + else this.t = 0; + } + + // return bigint initialized to value + function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + + // (protected) set from string and radix + function bnpFromString(s,b) { + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this[this.t++] = x; + else if(sh+k > this.DB) { + this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + } + else + this[this.t-1] |= x<= this.DB) sh -= this.DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; + } + + // (public) return string representation in given radix + function bnToString(b) { + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this[i]&((1<>(p+=this.DB-k); + } + else { + d = (this[i]>>(p-=k))&km; + if(p <= 0) { p += this.DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; + } + + // (public) -this + function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + + // (public) |this| + function bnAbs() { return (this.s<0)?this.negate():this; } + + // (public) return + if this > a, - if this < a, 0 if equal + function bnCompareTo(a) { + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return (this.s<0)?-r:r; + while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; + return 0; + } + + // returns bit length of the integer x + function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; + } + + // (public) return the number of bits in "this" + function bnBitLength() { + if(this.t <= 0) return 0; + return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); + } + + // (protected) r = this << n*DB + function bnpDLShiftTo(n,r) { + var i; + for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; + for(i = n-1; i >= 0; --i) r[i] = 0; + r.t = this.t+n; + r.s = this.s; + } + + // (protected) r = this >> n*DB + function bnpDRShiftTo(n,r) { + for(var i = n; i < this.t; ++i) r[i-n] = this[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; + } + + // (protected) r = this << n + function bnpLShiftTo(n,r) { + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<= 0; --i) { + r[i+ds+1] = (this[i]>>cbs)|c; + c = (this[i]&bm)<= 0; --i) r[i] = 0; + r[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); + } + + // (protected) r = this >> n + function bnpRShiftTo(n,r) { + r.s = this.s; + var ds = Math.floor(n/this.DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r[i-ds-1] |= (this[i]&bm)<>bs; + } + if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c -= a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r[i++] = this.DV+c; + else if(c > 0) r[i++] = c; + r.t = i; + r.clamp(); + } + + // (protected) r = this * a, r != this,a (HAC 14.12) + // "this" should be the larger one if appropriate. + function bnpMultiplyTo(a,r) { + var x = this.abs(), y = a.abs(); + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); + } + + // (protected) r = this^2, r != this (HAC 14.16) + function bnpSquareTo(r) { + var x = this.abs(); + var i = r.t = 2*x.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x[i],r,2*i,0,1); + if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { + r[i+x.t] -= x.DV; + r[i+x.t+1] = 1; + } + } + if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); + r.s = 0; + r.clamp(); + } + + // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) + // r != q, this != m. q or r may be null. + function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + var y0 = y[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y[ys-2]>>this.F2:0); + var d1 = this.FV/yt, d2 = (1<= 0) { + r[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); + if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); + } + + // (public) this mod a + function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; + } + + // Modular reduction using "classic" algorithm + function Classic(m) { this.m = m; } + function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; + } + function cRevert(x) { return x; } + function cReduce(x) { x.divRemTo(this.m,null,x); } + function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + Classic.prototype.convert = cConvert; + Classic.prototype.revert = cRevert; + Classic.prototype.reduce = cReduce; + Classic.prototype.mulTo = cMulTo; + Classic.prototype.sqrTo = cSqrTo; + + // (protected) return "-1/this % 2^DB"; useful for Mont. reduction + // justification: + // xy == 1 (mod m) + // xy = 1+km + // xy(2-xy) = (1+km)(1-km) + // x[y(2-xy)] = 1-k^2m^2 + // x[y(2-xy)] == 1 (mod m^2) + // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 + // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. + // JS multiply "overflows" differently from C/C++, so care is needed here. + function bnpInvDigit() { + if(this.t < 1) return 0; + var x = this[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?this.DV-y:-y; + } + + // Montgomery reduction + function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(m.DB-15))-1; + this.mt2 = 2*m.t; + } + + // xR mod m + function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; + } + + // x/R mod m + function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; + } + + // x = x/R mod m (HAC 14.32) + function montReduce(x) { + while(x.t <= this.mt2) // pad x so am has enough room later + x[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x[i]*mp mod DV + var j = x[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = "x^2/R mod m"; x != r + function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = "xy/R mod m"; x,y != r + function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Montgomery.prototype.convert = montConvert; + Montgomery.prototype.revert = montRevert; + Montgomery.prototype.reduce = montReduce; + Montgomery.prototype.mulTo = montMulTo; + Montgomery.prototype.sqrTo = montSqrTo; + + // (protected) true iff this is even + function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } + + // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) + function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); + } + + // (public) this^e % m, 0 <= e < 2^32 + function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); + } + + // protected + BigInteger.prototype.copyTo = bnpCopyTo; + BigInteger.prototype.fromInt = bnpFromInt; + BigInteger.prototype.fromString = bnpFromString; + BigInteger.prototype.clamp = bnpClamp; + BigInteger.prototype.dlShiftTo = bnpDLShiftTo; + BigInteger.prototype.drShiftTo = bnpDRShiftTo; + BigInteger.prototype.lShiftTo = bnpLShiftTo; + BigInteger.prototype.rShiftTo = bnpRShiftTo; + BigInteger.prototype.subTo = bnpSubTo; + BigInteger.prototype.multiplyTo = bnpMultiplyTo; + BigInteger.prototype.squareTo = bnpSquareTo; + BigInteger.prototype.divRemTo = bnpDivRemTo; + BigInteger.prototype.invDigit = bnpInvDigit; + BigInteger.prototype.isEven = bnpIsEven; + BigInteger.prototype.exp = bnpExp; + + // public + BigInteger.prototype.toString = bnToString; + BigInteger.prototype.negate = bnNegate; + BigInteger.prototype.abs = bnAbs; + BigInteger.prototype.compareTo = bnCompareTo; + BigInteger.prototype.bitLength = bnBitLength; + BigInteger.prototype.mod = bnMod; + BigInteger.prototype.modPowInt = bnModPowInt; + + // "constants" + BigInteger.ZERO = nbv(0); + BigInteger.ONE = nbv(1); + + // Copyright (c) 2005-2009 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Extended JavaScript BN functions, required for RSA private ops. + + // Version 1.1: new BigInteger("0", 10) returns "proper" zero + // Version 1.2: square() API, isProbablePrime fix + + // (public) + function bnClone() { var r = nbi(); this.copyTo(r); return r; } + + // (public) return value as integer + function bnIntValue() { + if(this.s < 0) { + if(this.t == 1) return this[0]-this.DV; + else if(this.t == 0) return -1; + } + else if(this.t == 1) return this[0]; + else if(this.t == 0) return 0; + // assumes 16 < DB < 32 + return ((this[1]&((1<<(32-this.DB))-1))<>24; } + + // (public) return value as short (assumes DB>=16) + function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } + + // (protected) return x s.t. r^x < DV + function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } + + // (public) 0 if this == 0, 1 if this > 0 + function bnSigNum() { + if(this.s < 0) return -1; + else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; + else return 1; + } + + // (protected) convert to radix string + function bnpToRadix(b) { + if(b == null) b = 10; + if(this.signum() == 0 || b < 2 || b > 36) return "0"; + var cs = this.chunkSize(b); + var a = Math.pow(b,cs); + var d = nbv(a), y = nbi(), z = nbi(), r = ""; + this.divRemTo(d,y,z); + while(y.signum() > 0) { + r = (a+z.intValue()).toString(b).substr(1) + r; + y.divRemTo(d,y,z); + } + return z.intValue().toString(b) + r; + } + + // (protected) convert from radix string + function bnpFromRadix(s,b) { + this.fromInt(0); + if(b == null) b = 10; + var cs = this.chunkSize(b); + var d = Math.pow(b,cs), mi = false, j = 0, w = 0; + for(var i = 0; i < s.length; ++i) { + var x = intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b*w+x; + if(++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w,0); + j = 0; + w = 0; + } + } + if(j > 0) { + this.dMultiply(Math.pow(b,j)); + this.dAddOffset(w,0); + } + if(mi) BigInteger.ZERO.subTo(this,this); + } + + // (protected) alternate constructor + function bnpFromNumber(a,b,c) { + if("number" == typeof b) { + // new BigInteger(int,int,RNG) + if(a < 2) this.fromInt(1); + else { + this.fromNumber(a,c); + if(!this.testBit(a-1)) // force MSB set + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + if(this.isEven()) this.dAddOffset(1,0); // force odd + while(!this.isProbablePrime(b)) { + this.dAddOffset(2,0); + if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); + } + } + } + else { + // new BigInteger(int,RNG) + var x = new Array(), t = a&7; + x.length = (a>>3)+1; + b.nextBytes(x); + if(t > 0) x[0] &= ((1< 0) { + if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) + r[k++] = d|(this.s<<(this.DB-p)); + while(i >= 0) { + if(p < 8) { + d = (this[i]&((1<>(p+=this.DB-8); + } + else { + d = (this[i]>>(p-=8))&0xff; + if(p <= 0) { p += this.DB; --i; } + } + if((d&0x80) != 0) d |= -256; + if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; + if(k > 0 || d != this.s) r[k++] = d; + } + } + return r; + } + + function bnEquals(a) { return(this.compareTo(a)==0); } + function bnMin(a) { return(this.compareTo(a)<0)?this:a; } + function bnMax(a) { return(this.compareTo(a)>0)?this:a; } + + // (protected) r = this op a (bitwise) + function bnpBitwiseTo(a,op,r) { + var i, f, m = Math.min(a.t,this.t); + for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); + if(a.t < this.t) { + f = a.s&this.DM; + for(i = m; i < this.t; ++i) r[i] = op(this[i],f); + r.t = this.t; + } + else { + f = this.s&this.DM; + for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); + r.t = a.t; + } + r.s = op(this.s,a.s); + r.clamp(); + } + + // (public) this & a + function op_and(x,y) { return x&y; } + function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } + + // (public) this | a + function op_or(x,y) { return x|y; } + function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } + + // (public) this ^ a + function op_xor(x,y) { return x^y; } + function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } + + // (public) this & ~a + function op_andnot(x,y) { return x&~y; } + function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } + + // (public) ~this + function bnNot() { + var r = nbi(); + for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; + r.t = this.t; + r.s = ~this.s; + return r; + } + + // (public) this << n + function bnShiftLeft(n) { + var r = nbi(); + if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); + return r; + } + + // (public) this >> n + function bnShiftRight(n) { + var r = nbi(); + if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); + return r; + } + + // return index of lowest 1-bit in x, x < 2^31 + function lbit(x) { + if(x == 0) return -1; + var r = 0; + if((x&0xffff) == 0) { x >>= 16; r += 16; } + if((x&0xff) == 0) { x >>= 8; r += 8; } + if((x&0xf) == 0) { x >>= 4; r += 4; } + if((x&3) == 0) { x >>= 2; r += 2; } + if((x&1) == 0) ++r; + return r; + } + + // (public) returns index of lowest 1-bit (or -1 if none) + function bnGetLowestSetBit() { + for(var i = 0; i < this.t; ++i) + if(this[i] != 0) return i*this.DB+lbit(this[i]); + if(this.s < 0) return this.t*this.DB; + return -1; + } + + // return number of 1 bits in x + function cbit(x) { + var r = 0; + while(x != 0) { x &= x-1; ++r; } + return r; + } + + // (public) return number of set bits + function bnBitCount() { + var r = 0, x = this.s&this.DM; + for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); + return r; + } + + // (public) true iff nth bit is set + function bnTestBit(n) { + var j = Math.floor(n/this.DB); + if(j >= this.t) return(this.s!=0); + return((this[j]&(1<<(n%this.DB)))!=0); + } + + // (protected) this op (1<>= this.DB; + } + if(a.t < this.t) { + c += a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c += a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += a.s; + } + r.s = (c<0)?-1:0; + if(c > 0) r[i++] = c; + else if(c < -1) r[i++] = this.DV+c; + r.t = i; + r.clamp(); + } + + // (public) this + a + function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } + + // (public) this - a + function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } + + // (public) this * a + function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + + // (public) this^2 + function bnSquare() { var r = nbi(); this.squareTo(r); return r; } + + // (public) this / a + function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + + // (public) this % a + function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + + // (public) [this/a,this%a] + function bnDivideAndRemainder(a) { + var q = nbi(), r = nbi(); + this.divRemTo(a,q,r); + return new Array(q,r); + } + + // (protected) this *= n, this >= 0, 1 < n < DV + function bnpDMultiply(n) { + this[this.t] = this.am(0,n-1,this,0,0,this.t); + ++this.t; + this.clamp(); + } + + // (protected) this += n << w words, this >= 0 + function bnpDAddOffset(n,w) { + if(n == 0) return; + while(this.t <= w) this[this.t++] = 0; + this[w] += n; + while(this[w] >= this.DV) { + this[w] -= this.DV; + if(++w >= this.t) this[this.t++] = 0; + ++this[w]; + } + } + + // A "null" reducer + function NullExp() {} + function nNop(x) { return x; } + function nMulTo(x,y,r) { x.multiplyTo(y,r); } + function nSqrTo(x,r) { x.squareTo(r); } + + NullExp.prototype.convert = nNop; + NullExp.prototype.revert = nNop; + NullExp.prototype.mulTo = nMulTo; + NullExp.prototype.sqrTo = nSqrTo; + + // (public) this^e + function bnPow(e) { return this.exp(e,new NullExp()); } + + // (protected) r = lower n words of "this * a", a.t <= n + // "this" should be the larger one if appropriate. + function bnpMultiplyLowerTo(a,n,r) { + var i = Math.min(this.t+a.t,n); + r.s = 0; // assumes a,this >= 0 + r.t = i; + while(i > 0) r[--i] = 0; + var j; + for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); + for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); + r.clamp(); + } + + // (protected) r = "this * a" without lower n words, n > 0 + // "this" should be the larger one if appropriate. + function bnpMultiplyUpperTo(a,n,r) { + --n; + var i = r.t = this.t+a.t-n; + r.s = 0; // assumes a,this >= 0 + while(--i >= 0) r[i] = 0; + for(i = Math.max(n-this.t,0); i < a.t; ++i) + r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); + r.clamp(); + r.drShiftTo(1,r); + } + + // Barrett modular reduction + function Barrett(m) { + // setup Barrett + this.r2 = nbi(); + this.q3 = nbi(); + BigInteger.ONE.dlShiftTo(2*m.t,this.r2); + this.mu = this.r2.divide(m); + this.m = m; + } + + function barrettConvert(x) { + if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); + else if(x.compareTo(this.m) < 0) return x; + else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } + } + + function barrettRevert(x) { return x; } + + // x = x mod m (HAC 14.42) + function barrettReduce(x) { + x.drShiftTo(this.m.t-1,this.r2); + if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } + this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); + this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); + while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); + x.subTo(this.r2,x); + while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = x^2 mod m; x != r + function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = x*y mod m; x,y != r + function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Barrett.prototype.convert = barrettConvert; + Barrett.prototype.revert = barrettRevert; + Barrett.prototype.reduce = barrettReduce; + Barrett.prototype.mulTo = barrettMulTo; + Barrett.prototype.sqrTo = barrettSqrTo; + + // (public) this^e % m (HAC 14.85) + function bnModPow(e,m) { + var i = e.bitLength(), k, r = nbv(1), z; + if(i <= 0) return r; + else if(i < 18) k = 1; + else if(i < 48) k = 3; + else if(i < 144) k = 4; + else if(i < 768) k = 5; + else k = 6; + if(i < 8) + z = new Classic(m); + else if(m.isEven()) + z = new Barrett(m); + else + z = new Montgomery(m); + + // precomputation + var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { + var g2 = nbi(); + z.sqrTo(g[1],g2); + while(n <= km) { + g[n] = nbi(); + z.mulTo(g2,g[n-2],g[n]); + n += 2; + } + } + + var j = e.t-1, w, is1 = true, r2 = nbi(), t; + i = nbits(e[j])-1; + while(j >= 0) { + if(i >= k1) w = (e[j]>>(i-k1))&km; + else { + w = (e[j]&((1<<(i+1))-1))<<(k1-i); + if(j > 0) w |= e[j-1]>>(this.DB+i-k1); + } + + n = k; + while((w&1) == 0) { w >>= 1; --n; } + if((i -= n) < 0) { i += this.DB; --j; } + if(is1) { // ret == 1, don't bother squaring or multiplying it + g[w].copyTo(r); + is1 = false; + } + else { + while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } + if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } + z.mulTo(r2,g[w],r); + } + + while(j >= 0 && (e[j]&(1< 0) { + x.rShiftTo(g,x); + y.rShiftTo(g,y); + } + while(x.signum() > 0) { + if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); + if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); + if(x.compareTo(y) >= 0) { + x.subTo(y,x); + x.rShiftTo(1,x); + } + else { + y.subTo(x,y); + y.rShiftTo(1,y); + } + } + if(g > 0) y.lShiftTo(g,y); + return y; + } + + // (protected) this % n, n < 2^26 + function bnpModInt(n) { + if(n <= 0) return 0; + var d = this.DV%n, r = (this.s<0)?n-1:0; + if(this.t > 0) + if(d == 0) r = this[0]%n; + else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; + return r; + } + + // (public) 1/this % m (HAC 14.61) + function bnModInverse(m) { + var ac = m.isEven(); + if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; + var u = m.clone(), v = this.clone(); + var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); + while(u.signum() != 0) { + while(u.isEven()) { + u.rShiftTo(1,u); + if(ac) { + if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } + a.rShiftTo(1,a); + } + else if(!b.isEven()) b.subTo(m,b); + b.rShiftTo(1,b); + } + while(v.isEven()) { + v.rShiftTo(1,v); + if(ac) { + if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } + c.rShiftTo(1,c); + } + else if(!d.isEven()) d.subTo(m,d); + d.rShiftTo(1,d); + } + if(u.compareTo(v) >= 0) { + u.subTo(v,u); + if(ac) a.subTo(c,a); + b.subTo(d,b); + } + else { + v.subTo(u,v); + if(ac) c.subTo(a,c); + d.subTo(b,d); + } + } + if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; + if(d.compareTo(m) >= 0) return d.subtract(m); + if(d.signum() < 0) d.addTo(m,d); else return d; + if(d.signum() < 0) return d.add(m); else return d; + } + + var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; + var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + + // (public) test primality with certainty >= 1-.5^t + function bnIsProbablePrime(t) { + var i, x = this.abs(); + if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { + for(i = 0; i < lowprimes.length; ++i) + if(x[0] == lowprimes[i]) return true; + return false; + } + if(x.isEven()) return false; + i = 1; + while(i < lowprimes.length) { + var m = lowprimes[i], j = i+1; + while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while(i < j) if(m%lowprimes[i++] == 0) return false; + } + return x.millerRabin(t); + } + + // (protected) true if probably prime (HAC 4.24, Miller-Rabin) + function bnpMillerRabin(t) { + var n1 = this.subtract(BigInteger.ONE); + var k = n1.getLowestSetBit(); + if(k <= 0) return false; + var r = n1.shiftRight(k); + t = (t+1)>>1; + if(t > lowprimes.length) t = lowprimes.length; + var a = nbi(); + for(var i = 0; i < t; ++i) { + //Pick bases at random, instead of starting at 2 + a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); + var y = a.modPow(r,this); + if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while(j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2,this); + if(y.compareTo(BigInteger.ONE) == 0) return false; + } + if(y.compareTo(n1) != 0) return false; + } + } + return true; + } + + // protected + BigInteger.prototype.chunkSize = bnpChunkSize; + BigInteger.prototype.toRadix = bnpToRadix; + BigInteger.prototype.fromRadix = bnpFromRadix; + BigInteger.prototype.fromNumber = bnpFromNumber; + BigInteger.prototype.bitwiseTo = bnpBitwiseTo; + BigInteger.prototype.changeBit = bnpChangeBit; + BigInteger.prototype.addTo = bnpAddTo; + BigInteger.prototype.dMultiply = bnpDMultiply; + BigInteger.prototype.dAddOffset = bnpDAddOffset; + BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; + BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; + BigInteger.prototype.modInt = bnpModInt; + BigInteger.prototype.millerRabin = bnpMillerRabin; + + // public + BigInteger.prototype.clone = bnClone; + BigInteger.prototype.intValue = bnIntValue; + BigInteger.prototype.byteValue = bnByteValue; + BigInteger.prototype.shortValue = bnShortValue; + BigInteger.prototype.signum = bnSigNum; + BigInteger.prototype.toByteArray = bnToByteArray; + BigInteger.prototype.equals = bnEquals; + BigInteger.prototype.min = bnMin; + BigInteger.prototype.max = bnMax; + BigInteger.prototype.and = bnAnd; + BigInteger.prototype.or = bnOr; + BigInteger.prototype.xor = bnXor; + BigInteger.prototype.andNot = bnAndNot; + BigInteger.prototype.not = bnNot; + BigInteger.prototype.shiftLeft = bnShiftLeft; + BigInteger.prototype.shiftRight = bnShiftRight; + BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; + BigInteger.prototype.bitCount = bnBitCount; + BigInteger.prototype.testBit = bnTestBit; + BigInteger.prototype.setBit = bnSetBit; + BigInteger.prototype.clearBit = bnClearBit; + BigInteger.prototype.flipBit = bnFlipBit; + BigInteger.prototype.add = bnAdd; + BigInteger.prototype.subtract = bnSubtract; + BigInteger.prototype.multiply = bnMultiply; + BigInteger.prototype.divide = bnDivide; + BigInteger.prototype.remainder = bnRemainder; + BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; + BigInteger.prototype.modPow = bnModPow; + BigInteger.prototype.modInverse = bnModInverse; + BigInteger.prototype.pow = bnPow; + BigInteger.prototype.gcd = bnGCD; + BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + + // JSBN-specific extension + BigInteger.prototype.square = bnSquare; + + // Expose the Barrett function + BigInteger.prototype.Barrett = Barrett + + // BigInteger interfaces not implemented in jsbn: + + // BigInteger(int signum, byte[] magnitude) + // double doubleValue() + // float floatValue() + // int hashCode() + // long longValue() + // static BigInteger valueOf(long val) + + // Random number generator - requires a PRNG backend, e.g. prng4.js + + // For best results, put code like + // + // in your main HTML document. + + var rng_state; + var rng_pool; + var rng_pptr; + + // Mix in a 32-bit integer into the pool + function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= (x >> 8) & 255; + rng_pool[rng_pptr++] ^= (x >> 16) & 255; + rng_pool[rng_pptr++] ^= (x >> 24) & 255; + if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; + } + + // Mix in the current time (w/milliseconds) into the pool + function rng_seed_time() { + rng_seed_int(new Date().getTime()); + } + + // Initialize the pool with junk if needed. + if(rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + if(typeof window !== "undefined" && window.crypto) { + if (window.crypto.getRandomValues) { + // Use webcrypto if available + var ua = new Uint8Array(32); + window.crypto.getRandomValues(ua); + for(t = 0; t < 32; ++t) + rng_pool[rng_pptr++] = ua[t]; + } + else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { + // Extract entropy (256 bits) from NS4 RNG if available + var z = window.crypto.random(32); + for(t = 0; t < z.length; ++t) + rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; + } + } + while(rng_pptr < rng_psize) { // extract some randomness from Math.random() + t = Math.floor(65536 * Math.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + //rng_seed_int(window.screenX); + //rng_seed_int(window.screenY); + } + + function rng_get_byte() { + if(rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + //rng_pool = null; + } + // TODO: allow reseeding after first request + return rng_state.next(); + } + + function rng_get_bytes(ba) { + var i; + for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); + } + + function SecureRandom() {} + + SecureRandom.prototype.nextBytes = rng_get_bytes; + + // prng4.js - uses Arcfour as a PRNG + + function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); + } + + // Initialize arcfour context from key, an array of ints, each from [0..255] + function ARC4init(key) { + var i, j, t; + for(i = 0; i < 256; ++i) + this.S[i] = i; + j = 0; + for(i = 0; i < 256; ++i) { + j = (j + this.S[i] + key[i % key.length]) & 255; + t = this.S[i]; + this.S[i] = this.S[j]; + this.S[j] = t; + } + this.i = 0; + this.j = 0; + } + + function ARC4next() { + var t; + this.i = (this.i + 1) & 255; + this.j = (this.j + this.S[this.i]) & 255; + t = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t; + return this.S[(t + this.S[this.i]) & 255]; + } + + Arcfour.prototype.init = ARC4init; + Arcfour.prototype.next = ARC4next; + + // Plug in your RNG constructor here + function prng_newstate() { + return new Arcfour(); + } + + // Pool size must be a multiple of 4 and greater than 32. + // An array of bytes the size of the pool will be passed to init() + var rng_psize = 256; + + BigInteger.SecureRandom = SecureRandom; + BigInteger.BigInteger = BigInteger; + if (true) { + exports = module.exports = BigInteger; + } else { + this.BigInteger = BigInteger; + this.SecureRandom = SecureRandom; + } + +}).call(this); + + +/***/ }), +/* 78 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return InnerSubscriber; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +var InnerSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](InnerSubscriber, _super); + function InnerSubscriber(parent, outerValue, outerIndex) { + var _this = _super.call(this) || this; + _this.parent = parent; + _this.outerValue = outerValue; + _this.outerIndex = outerIndex; + _this.index = 0; + return _this; + } + InnerSubscriber.prototype._next = function (value) { + this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this); + }; + InnerSubscriber.prototype._error = function (error) { + this.parent.notifyError(error, this); + this.unsubscribe(); + }; + InnerSubscriber.prototype._complete = function () { + this.parent.notifyComplete(this); + this.unsubscribe(); + }; + return InnerSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); + +//# sourceMappingURL=InnerSubscriber.js.map + + +/***/ }), +/* 79 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = fromArray; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_subscribeToArray__ = __webpack_require__(411); +/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToArray PURE_IMPORTS_END */ + + + +function fromArray(input, scheduler) { + if (!scheduler) { + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_subscribeToArray__["a" /* subscribeToArray */])(input)); + } + else { + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { + var sub = new __WEBPACK_IMPORTED_MODULE_1__Subscription__["a" /* Subscription */](); + var i = 0; + sub.add(scheduler.schedule(function () { + if (i === input.length) { + subscriber.complete(); + return; + } + subscriber.next(input[i++]); + if (!subscriber.closed) { + sub.add(this.schedule()); + } + })); + return sub; + }); + } +} +//# sourceMappingURL=fromArray.js.map + + +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = __webpack_require__(22); +var asn1 = __webpack_require__(66); +var crypto = __webpack_require__(21); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var utils = __webpack_require__(31); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); + +var pkcs1 = __webpack_require__(259); +var pkcs8 = __webpack_require__(140); +var sshpriv = __webpack_require__(176); +var rfc4253 = __webpack_require__(91); + +var errors = __webpack_require__(69); + +/* + * For reading we support both PKCS#1 and PKCS#8. If we find a private key, + * we just take the public component of it and use that. + */ +function read(buf, options, forceType) { + var input = buf; + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + + var lines = buf.trim().split('\n'); + + var m = lines[0].match(/*JSSTYLED*/ + /[-]+[ ]*BEGIN ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + assert.ok(m, 'invalid PEM header'); + + var m2 = lines[lines.length - 1].match(/*JSSTYLED*/ + /[-]+[ ]*END ([A-Z0-9][A-Za-z0-9]+ )?(PUBLIC|PRIVATE) KEY[ ]*[-]+/); + assert.ok(m2, 'invalid PEM footer'); + + /* Begin and end banners must match key type */ + assert.equal(m[2], m2[2]); + var type = m[2].toLowerCase(); + + var alg; + if (m[1]) { + /* They also must match algorithms, if given */ + assert.equal(m[1], m2[1], 'PEM header and footer mismatch'); + alg = m[1].trim(); + } + + var headers = {}; + while (true) { + lines = lines.slice(1); + m = lines[0].match(/*JSSTYLED*/ + /^([A-Za-z0-9-]+): (.+)$/); + if (!m) + break; + headers[m[1].toLowerCase()] = m[2]; + } + + var cipher, key, iv; + if (headers['proc-type']) { + var parts = headers['proc-type'].split(','); + if (parts[0] === '4' && parts[1] === 'ENCRYPTED') { + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from( + options.passphrase, 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'PEM')); + } else { + parts = headers['dek-info'].split(','); + assert.ok(parts.length === 2); + cipher = parts[0].toLowerCase(); + iv = Buffer.from(parts[1], 'hex'); + key = utils.opensslKeyDeriv(cipher, iv, + options.passphrase, 1).key; + } + } + } + + /* Chop off the first and last lines */ + lines = lines.slice(0, -1).join(''); + buf = Buffer.from(lines, 'base64'); + + if (cipher && key && iv) { + var cipherStream = crypto.createDecipheriv(cipher, key, iv); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(buf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + buf = Buffer.concat(chunks); + } + + /* The new OpenSSH internal format abuses PEM headers */ + if (alg && alg.toLowerCase() === 'openssh') + return (sshpriv.readSSHPrivate(type, buf, options)); + if (alg && alg.toLowerCase() === 'ssh2') + return (rfc4253.readType(type, buf, options)); + + var der = new asn1.BerReader(buf); + der.originalInput = input; + + /* + * All of the PEM file types start with a sequence tag, so chop it + * off here + */ + der.readSequence(); + + /* PKCS#1 type keys name an algorithm in the banner explicitly */ + if (alg) { + if (forceType) + assert.strictEqual(forceType, 'pkcs1'); + return (pkcs1.readPkcs1(alg, type, der)); + } else { + if (forceType) + assert.strictEqual(forceType, 'pkcs8'); + return (pkcs8.readPkcs8(alg, type, der)); + } +} + +function write(key, options, type) { + assert.object(key); + + var alg = { + 'ecdsa': 'EC', + 'rsa': 'RSA', + 'dsa': 'DSA', + 'ed25519': 'EdDSA' + }[key.type]; + var header; + + var der = new asn1.BerWriter(); + + if (PrivateKey.isPrivateKey(key)) { + if (type && type === 'pkcs8') { + header = 'PRIVATE KEY'; + pkcs8.writePkcs8(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs1'); + header = alg + ' PRIVATE KEY'; + pkcs1.writePkcs1(der, key); + } + + } else if (Key.isKey(key)) { + if (type && type === 'pkcs1') { + header = alg + ' PUBLIC KEY'; + pkcs1.writePkcs1(der, key); + } else { + if (type) + assert.strictEqual(type, 'pkcs8'); + header = 'PUBLIC KEY'; + pkcs8.writePkcs8(der, key); + } + + } else { + throw (new Error('key is not a Key or PrivateKey')); + } + + var tmp = der.buffer.toString('base64'); + var len = tmp.length + (tmp.length / 64) + + 18 + 16 + header.length*2 + 10; + var buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 64; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} + + +/***/ }), +/* 81 */ +/***/ (function(module, exports) { + +module.exports = require("os"); + +/***/ }), +/* 82 */ +/***/ (function(module, exports) { + +module.exports = require("http"); + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SCOPE_SEPARATOR = undefined; + +var _assign; + +function _load_assign() { + return _assign = _interopRequireDefault(__webpack_require__(23)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(14); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _npmResolver; + +function _load_npmResolver() { + return _npmResolver = _interopRequireDefault(__webpack_require__(198)); +} + +var _envReplace; + +function _load_envReplace() { + return _envReplace = _interopRequireDefault(__webpack_require__(555)); +} + +var _baseRegistry; + +function _load_baseRegistry() { + return _baseRegistry = _interopRequireDefault(__webpack_require__(539)); +} + +var _misc; + +function _load_misc() { + return _misc = __webpack_require__(27); +} + +var _path; + +function _load_path() { + return _path = __webpack_require__(315); +} + +var _normalizeUrl; + +function _load_normalizeUrl() { + return _normalizeUrl = _interopRequireDefault(__webpack_require__(365)); +} + +var _userHomeDir; + +function _load_userHomeDir() { + return _userHomeDir = _interopRequireDefault(__webpack_require__(97)); +} + +var _userHomeDir2; + +function _load_userHomeDir2() { + return _userHomeDir2 = __webpack_require__(97); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _login; + +function _load_login() { + return _login = __webpack_require__(94); +} + +var _path2; + +function _load_path2() { + return _path2 = _interopRequireDefault(__webpack_require__(2)); +} + +var _url; + +function _load_url() { + return _url = _interopRequireDefault(__webpack_require__(29)); +} + +var _ini; + +function _load_ini() { + return _ini = _interopRequireDefault(__webpack_require__(735)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var DEFAULT_REGISTRY = 'https://registry.npmjs.org/'; +var REGEX_REGISTRY_HTTP_PROTOCOL = /^https?:/i; +var REGEX_REGISTRY_PREFIX = /^(https?:)?\/\//i; +var REGEX_REGISTRY_SUFFIX = /registry\/?$/; + +var SCOPE_SEPARATOR = exports.SCOPE_SEPARATOR = '%2f'; +// All scoped package names are of the format `@scope%2fpkg` from the use of NpmRegistry.escapeName +// `(?:^|\/)` Match either the start of the string or a `/` but don't capture +// `[^\/?]+?` Match any character that is not '/' or '?' and capture, up until the first occurrence of: +// `(?=%2f|\/)` Match SCOPE_SEPARATOR, the escaped '/', or a raw `/` and don't capture +// The reason for matching a plain `/` is NPM registry being inconsistent about escaping `/` in +// scoped package names: when you're fetching a tarball, it is not escaped, when you want info +// about the package, it is escaped. +var SCOPED_PKG_REGEXP = /(?:^|\/)(@[^\/?]+?)(?=%2f|\/)/; + +// TODO: Use the method from src/cli/commands/global.js for this instead +function getGlobalPrefix() { + if (process.env.PREFIX) { + return process.env.PREFIX; + } else if (process.platform === 'win32') { + // c:\node\node.exe --> prefix=c:\node\ + return (_path2 || _load_path2()).default.dirname(process.execPath); + } else { + // /usr/local/bin/node --> prefix=/usr/local + var prefix = (_path2 || _load_path2()).default.dirname((_path2 || _load_path2()).default.dirname(process.execPath)); + + // destdir only is respected on Unix + if (process.env.DESTDIR) { + prefix = (_path2 || _load_path2()).default.join(process.env.DESTDIR, prefix); + } + + return prefix; + } +} + +var PATH_CONFIG_OPTIONS = new (_set || _load_set()).default(['cache', 'cafile', 'prefix', 'userconfig']); + +function isPathConfigOption(key) { + return PATH_CONFIG_OPTIONS.has(key); +} + +function normalizePath(val) { + if (val === undefined) { + return undefined; + } + + if (typeof val !== 'string') { + val = String(val); + } + + return (0, (_path || _load_path()).resolveWithHome)(val); +} + +function urlParts(requestUrl) { + var normalizedUrl = (0, (_normalizeUrl || _load_normalizeUrl()).default)(requestUrl); + var parsed = (_url || _load_url()).default.parse(normalizedUrl); + var host = parsed.host || ''; + var path = parsed.path || ''; + return { host, path }; +} + +var NpmRegistry = function (_Registry) { + (0, (_inherits2 || _load_inherits()).default)(NpmRegistry, _Registry); + + function NpmRegistry(cwd, registries, requestManager, reporter, enableDefaultRc, extraneousRcFiles) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, NpmRegistry); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Registry.call(this, cwd, registries, requestManager, reporter, enableDefaultRc, extraneousRcFiles)); + + _this.folder = 'node_modules'; + return _this; + } + + NpmRegistry.escapeName = function escapeName(name) { + // scoped packages contain slashes and the npm registry expects them to be escaped + return name.replace('/', SCOPE_SEPARATOR); + }; + + NpmRegistry.prototype.isScopedPackage = function isScopedPackage(packageIdent) { + return SCOPED_PKG_REGEXP.test(packageIdent); + }; + + NpmRegistry.prototype.getRequestUrl = function getRequestUrl(registry, pathname) { + var isUrl = REGEX_REGISTRY_PREFIX.test(pathname); + + if (isUrl) { + return pathname; + } else { + return (_url || _load_url()).default.resolve((0, (_misc || _load_misc()).addSuffix)(registry, '/'), pathname); + } + }; + + NpmRegistry.prototype.isRequestToRegistry = function isRequestToRegistry(requestUrl, registryUrl) { + var request = urlParts(requestUrl); + var registry = urlParts(registryUrl); + var customHostSuffix = this.getRegistryOrGlobalOption(registryUrl, 'custom-host-suffix'); + + var requestToRegistryHost = request.host === registry.host; + var requestToYarn = (_constants || _load_constants()).YARN_REGISTRY.indexOf(request.host) !== -1 && DEFAULT_REGISTRY.indexOf(registry.host) !== -1; + var requestToRegistryPath = request.path.startsWith(registry.path); + // For some registries, the package path does not prefix with the registry path + var customHostSuffixInUse = typeof customHostSuffix === 'string' && request.host.endsWith(customHostSuffix); + + return (requestToRegistryHost || requestToYarn) && (requestToRegistryPath || customHostSuffixInUse); + }; + + NpmRegistry.prototype.request = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pathname) { + var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var packageName = arguments[2]; + + // packageName needs to be escaped when if it is passed + var packageIdent = packageName && NpmRegistry.escapeName(packageName) || pathname; + var registry = opts.registry || this.getRegistry(packageIdent); + var requestUrl = this.getRequestUrl(registry, pathname); + + var alwaysAuth = this.getRegistryOrGlobalOption(registry, 'always-auth'); + + var headers = (0, (_extends2 || _load_extends()).default)({ + Accept: + // This is to use less bandwidth unless we really need to get the full response. + // See https://github.com/npm/npm-registry-client#requests + opts.unfiltered ? 'application/json' : 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*' + }, opts.headers); + + var isToRegistry = this.isRequestToRegistry(requestUrl, registry) || this.requestNeedsAuth(requestUrl); + + // this.token must be checked to account for publish requests on non-scoped packages + if (this.token || isToRegistry && (alwaysAuth || this.isScopedPackage(packageIdent))) { + var authorization = this.getAuth(packageIdent); + if (authorization) { + headers.authorization = authorization; + } + } + + if (this.otp) { + headers['npm-otp'] = this.otp; + } + + try { + return yield this.requestManager.request({ + url: requestUrl, + method: opts.method, + body: opts.body, + auth: opts.auth, + headers, + json: !opts.buffer, + buffer: opts.buffer, + process: opts.process, + gzip: true + }); + } catch (error) { + if (error instanceof (_errors || _load_errors()).OneTimePasswordError) { + if (this.otp) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('incorrectOneTimePassword')); + } + + this.reporter.info(this.reporter.lang('twoFactorAuthenticationEnabled')); + this.otp = yield (0, (_login || _load_login()).getOneTimePassword)(this.reporter); + + this.requestManager.clearCache(); + + return this.request(pathname, opts, packageName); + } else { + throw error; + } + } + }); + + function request(_x) { + return _ref.apply(this, arguments); + } + + return request; + }(); + + NpmRegistry.prototype.requestNeedsAuth = function requestNeedsAuth(requestUrl) { + var config = this.config; + var requestParts = urlParts(requestUrl); + return !!(0, (_keys || _load_keys()).default)(config).find(function (option) { + var parts = option.split(':'); + if (parts.length === 2 && parts[1] === '_authToken' || parts[1] === '_password') { + var registryParts = urlParts(parts[0]); + if (requestParts.host === registryParts.host && requestParts.path.startsWith(registryParts.path)) { + return true; + } + } + return false; + }); + }; + + NpmRegistry.prototype.checkOutdated = function () { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, name, range) { + var escapedName = NpmRegistry.escapeName(name); + var req = yield this.request(escapedName, { unfiltered: true }); + if (!req) { + throw new Error(`couldn't find ${name}`); + } + + // By default use top level 'repository' and 'homepage' values + var repository = req.repository, + homepage = req.homepage; + + var wantedPkg = yield (_npmResolver || _load_npmResolver()).default.findVersionInRegistryResponse(config, escapedName, range, req); + + // But some local repositories like Verdaccio do not return 'repository' nor 'homepage' + // in top level data structure, so we fallback to wanted package manifest + if (!repository && !homepage) { + repository = wantedPkg.repository; + homepage = wantedPkg.homepage; + } + + var latest = req['dist-tags'].latest; + // In certain cases, registries do not return a 'latest' tag. + if (!latest) { + latest = wantedPkg.version; + } + + var url = homepage || repository && repository.url || ''; + + return { + latest, + wanted: wantedPkg.version, + url + }; + }); + + function checkOutdated(_x3, _x4, _x5) { + return _ref2.apply(this, arguments); + } + + return checkOutdated; + }(); + + NpmRegistry.prototype.getPossibleConfigLocations = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (filename, reporter) { + var possibles = []; + + for (var _iterator = this.extraneousRcFiles.slice().reverse(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref4; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref4 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref4 = _i.value; + } + + var rcFile = _ref4; + + possibles.push([false, (_path2 || _load_path2()).default.resolve(process.cwd(), rcFile)]); + } + + if (this.enableDefaultRc) { + // npmrc --> ./.npmrc, ~/.npmrc, ${prefix}/etc/npmrc + var localfile = '.' + filename; + possibles = possibles.concat([[false, (_path2 || _load_path2()).default.join(this.cwd, localfile)], [true, this.config.userconfig || (_path2 || _load_path2()).default.join((_userHomeDir || _load_userHomeDir()).default, localfile)], [false, (_path2 || _load_path2()).default.join(getGlobalPrefix(), 'etc', filename)]]); + + // When home directory for global install is different from where $HOME/npmrc is stored, + // E.g. /usr/local/share vs /root on linux machines, check the additional location + if ((_userHomeDir2 || _load_userHomeDir2()).home !== (_userHomeDir || _load_userHomeDir()).default) { + possibles.push([true, (_path2 || _load_path2()).default.join((_userHomeDir2 || _load_userHomeDir2()).home, localfile)]); + } + + // npmrc --> ../.npmrc, ../../.npmrc, etc. + var foldersFromRootToCwd = (0, (_path || _load_path()).getPosixPath)(this.cwd).split('/'); + while (foldersFromRootToCwd.length > 1) { + possibles.push([false, (_path2 || _load_path2()).default.join(foldersFromRootToCwd.join((_path2 || _load_path2()).default.sep), localfile)]); + foldersFromRootToCwd.pop(); + } + } + + var actuals = []; + for (var _iterator2 = possibles, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref6; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref6 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref6 = _i2.value; + } + + var _ref5 = _ref6; + var isHome = _ref5[0]; + var loc = _ref5[1]; + + reporter.verbose(reporter.lang('configPossibleFile', loc)); + if (yield (_fs || _load_fs()).exists(loc)) { + reporter.verbose(reporter.lang('configFileFound', loc)); + actuals.push([isHome, loc, yield (_fs || _load_fs()).readFile(loc)]); + } + } + + return actuals; + }); + + function getPossibleConfigLocations(_x6, _x7) { + return _ref3.apply(this, arguments); + } + + return getPossibleConfigLocations; + }(); + + NpmRegistry.getConfigEnv = function getConfigEnv() { + var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : process.env; + + // To match NPM's behavior, HOME is always the user's home directory. + var overrideEnv = { + HOME: (_userHomeDir2 || _load_userHomeDir2()).home + }; + return (0, (_assign || _load_assign()).default)({}, env, overrideEnv); + }; + + NpmRegistry.normalizeConfig = function normalizeConfig(config) { + var env = NpmRegistry.getConfigEnv(); + config = (_baseRegistry || _load_baseRegistry()).default.normalizeConfig(config); + + for (var key in config) { + config[key] = (0, (_envReplace || _load_envReplace()).default)(config[key], env); + if (isPathConfigOption(key)) { + config[key] = normalizePath(config[key]); + } + } + + return config; + }; + + NpmRegistry.prototype.loadConfig = function () { + var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // docs: https://docs.npmjs.com/misc/config + this.mergeEnv('npm_config_'); + + for (var _iterator3 = yield this.getPossibleConfigLocations('npmrc', this.reporter), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref9; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref9 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref9 = _i3.value; + } + + var _ref8 = _ref9; + var loc = _ref8[1]; + var file = _ref8[2]; + + var config = NpmRegistry.normalizeConfig((_ini || _load_ini()).default.parse(file)); + + // normalize offline mirror path relative to the current npmrc + var offlineLoc = config['yarn-offline-mirror']; + // don't normalize if we already have a mirror path + if (!this.config['yarn-offline-mirror'] && offlineLoc) { + var mirrorLoc = config['yarn-offline-mirror'] = (_path2 || _load_path2()).default.resolve((_path2 || _load_path2()).default.dirname(loc), offlineLoc); + yield (_fs || _load_fs()).mkdirp(mirrorLoc); + } + + this.config = (0, (_assign || _load_assign()).default)({}, config, this.config); + } + }); + + function loadConfig() { + return _ref7.apply(this, arguments); + } + + return loadConfig; + }(); + + NpmRegistry.prototype.getScope = function getScope(packageIdent) { + var match = packageIdent.match(SCOPED_PKG_REGEXP); + return match && match[1] || ''; + }; + + NpmRegistry.prototype.getRegistry = function getRegistry(packageIdent) { + // Try extracting registry from the url, then scoped registry, and default registry + if (packageIdent.match(REGEX_REGISTRY_PREFIX)) { + var availableRegistries = this.getAvailableRegistries(); + var registry = availableRegistries.find(function (registry) { + return packageIdent.startsWith(registry); + }); + if (registry) { + return String(registry); + } + } + + var _arr = [this.getScope(packageIdent), '']; + for (var _i4 = 0; _i4 < _arr.length; _i4++) { + var scope = _arr[_i4]; + var _registry = this.getScopedOption(scope, 'registry') || this.registries.yarn.getScopedOption(scope, 'registry'); + if (_registry) { + return String(_registry); + } + } + + return DEFAULT_REGISTRY; + }; + + NpmRegistry.prototype.getAuthByRegistry = function getAuthByRegistry(registry) { + // Check for bearer token. + var authToken = this.getRegistryOrGlobalOption(registry, '_authToken'); + if (authToken) { + return `Bearer ${String(authToken)}`; + } + + // Check for basic auth token. + var auth = this.getRegistryOrGlobalOption(registry, '_auth'); + if (auth) { + return `Basic ${String(auth)}`; + } + + // Check for basic username/password auth. + var username = this.getRegistryOrGlobalOption(registry, 'username'); + var password = this.getRegistryOrGlobalOption(registry, '_password'); + if (username && password) { + var pw = Buffer.from(String(password), 'base64').toString(); + return 'Basic ' + Buffer.from(String(username) + ':' + pw).toString('base64'); + } + + return ''; + }; + + NpmRegistry.prototype.getAuth = function getAuth(packageIdent) { + if (this.token) { + return this.token; + } + + var baseRegistry = this.getRegistry(packageIdent); + var registries = [baseRegistry]; + + // If sending a request to the Yarn registry, we must also send it the auth token for the npm registry + if (baseRegistry === (_constants || _load_constants()).YARN_REGISTRY) { + registries.push(DEFAULT_REGISTRY); + } + + for (var _iterator4 = registries, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref10; + + if (_isArray4) { + if (_i5 >= _iterator4.length) break; + _ref10 = _iterator4[_i5++]; + } else { + _i5 = _iterator4.next(); + if (_i5.done) break; + _ref10 = _i5.value; + } + + var registry = _ref10; + + var auth = this.getAuthByRegistry(registry); + + if (auth) { + return auth; + } + } + + return ''; + }; + + NpmRegistry.prototype.getScopedOption = function getScopedOption(scope, option) { + return this.getOption(scope + (scope ? ':' : '') + option); + }; + + NpmRegistry.prototype.getRegistryOption = function getRegistryOption(registry, option) { + var pre = REGEX_REGISTRY_HTTP_PROTOCOL; + var suf = REGEX_REGISTRY_SUFFIX; + + // When registry is used config scope, the trailing '/' is required + var reg = (0, (_misc || _load_misc()).addSuffix)(registry, '/'); + + // 1st attempt, try to get option for the given registry URL + // 2nd attempt, remove the 'https?:' prefix of the registry URL + // 3nd attempt, remove the 'registry/?' suffix of the registry URL + return this.getScopedOption(reg, option) || pre.test(reg) && this.getRegistryOption(reg.replace(pre, ''), option) || suf.test(reg) && this.getRegistryOption(reg.replace(suf, ''), option); + }; + + NpmRegistry.prototype.getRegistryOrGlobalOption = function getRegistryOrGlobalOption(registry, option) { + return this.getRegistryOption(registry, option) || this.getOption(option); + }; + + return NpmRegistry; +}((_baseRegistry || _load_baseRegistry()).default); + +NpmRegistry.filename = 'package.json'; +exports.default = NpmRegistry; + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +var _baseResolver; + +function _load_baseResolver() { + return _baseResolver = _interopRequireDefault(__webpack_require__(113)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var ExoticResolver = function (_BaseResolver) { + (0, (_inherits2 || _load_inherits()).default)(ExoticResolver, _BaseResolver); + + function ExoticResolver() { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ExoticResolver); + return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _BaseResolver.apply(this, arguments)); + } + + ExoticResolver.isVersion = function isVersion(pattern) { + var proto = this.protocol; + if (proto) { + return pattern.startsWith(`${proto}:`); + } else { + throw new Error('No protocol specified'); + } + }; + + return ExoticResolver; +}((_baseResolver || _load_baseResolver()).default); + +exports.default = ExoticResolver; + +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +exports.wait = wait; +exports.promisify = promisify; +exports.queue = queue; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function wait(delay) { + return new (_promise || _load_promise()).default(function (resolve) { + setTimeout(resolve, delay); + }); +} + +function promisify(fn, firstData) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return new (_promise || _load_promise()).default(function (resolve, reject) { + args.push(function (err) { + for (var _len2 = arguments.length, result = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + result[_key2 - 1] = arguments[_key2]; + } + + var res = result; + + if (result.length <= 1) { + res = result[0]; + } + + if (firstData) { + res = err; + err = null; + } + + if (err) { + reject(err); + } else { + resolve(res); + } + }); + + fn.apply(null, args); + }); + }; +} + +function queue(arr, promiseProducer) { + var concurrency = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Infinity; + + concurrency = Math.min(concurrency, arr.length); + + // clone + arr = arr.slice(); + + var results = []; + var total = arr.length; + if (!total) { + return (_promise || _load_promise()).default.resolve(results); + } + + return new (_promise || _load_promise()).default(function (resolve, reject) { + for (var i = 0; i < concurrency; i++) { + next(); + } + + function next() { + var item = arr.shift(); + var promise = promiseProducer(item); + + promise.then(function (result) { + results.push(result); + + total--; + if (total === 0) { + resolve(results); + } else { + if (arr.length) { + next(); + } + } + }, reject); + } + }); +} + +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _normalizePattern2; + +function _load_normalizePattern() { + return _normalizePattern2 = __webpack_require__(51); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var semver = __webpack_require__(26); + +var WorkspaceLayout = function () { + function WorkspaceLayout(workspaces, config) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, WorkspaceLayout); + + this.workspaces = workspaces; + this.config = config; + } + + WorkspaceLayout.prototype.getWorkspaceManifest = function getWorkspaceManifest(key) { + return this.workspaces[key]; + }; + + WorkspaceLayout.prototype.getManifestByPattern = function getManifestByPattern(pattern) { + var _normalizePattern = (0, (_normalizePattern2 || _load_normalizePattern()).normalizePattern)(pattern), + name = _normalizePattern.name, + range = _normalizePattern.range; + + var workspace = this.getWorkspaceManifest(name); + if (!workspace || !semver.satisfies(workspace.manifest.version, range, this.config.looseSemver)) { + return null; + } + return workspace; + }; + + return WorkspaceLayout; +}(); + +exports.default = WorkspaceLayout; + +/***/ }), +/* 87 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 88 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { + +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(213); +var defined = __webpack_require__(210); +module.exports = function (it) { + return IObject(defined(it)); +}; + + +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + +var Stream = __webpack_require__(34); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = __webpack_require__(370); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = __webpack_require__(372); + exports.Duplex = __webpack_require__(103); + exports.Transform = __webpack_require__(371); + exports.PassThrough = __webpack_require__(832); +} + + +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read.bind(undefined, false, undefined), + readType: read.bind(undefined, false), + write: write, + /* semi-private api, used by sshpk-agent */ + readPartial: read.bind(undefined, true), + + /* shared with ssh format */ + readInternal: read, + keyTypeToAlg: keyTypeToAlg, + algToKeyType: algToKeyType +}; + +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var utils = __webpack_require__(31); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); +var SSHBuffer = __webpack_require__(142); + +function algToKeyType(alg) { + assert.string(alg); + if (alg === 'ssh-dss') + return ('dsa'); + else if (alg === 'ssh-rsa') + return ('rsa'); + else if (alg === 'ssh-ed25519') + return ('ed25519'); + else if (alg === 'ssh-curve25519') + return ('curve25519'); + else if (alg.match(/^ecdsa-sha2-/)) + return ('ecdsa'); + else + throw (new Error('Unknown algorithm ' + alg)); +} + +function keyTypeToAlg(key) { + assert.object(key); + if (key.type === 'dsa') + return ('ssh-dss'); + else if (key.type === 'rsa') + return ('ssh-rsa'); + else if (key.type === 'ed25519') + return ('ssh-ed25519'); + else if (key.type === 'curve25519') + return ('ssh-curve25519'); + else if (key.type === 'ecdsa') + return ('ecdsa-sha2-' + key.part.curve.data.toString()); + else + throw (new Error('Unknown key type ' + key.type)); +} + +function read(partial, type, buf, options) { + if (typeof (buf) === 'string') + buf = Buffer.from(buf); + assert.buffer(buf, 'buf'); + + var key = {}; + + var parts = key.parts = []; + var sshbuf = new SSHBuffer({buffer: buf}); + + var alg = sshbuf.readString(); + assert.ok(!sshbuf.atEnd(), 'key must have at least one part'); + + key.type = algToKeyType(alg); + + var partCount = algs.info[key.type].parts.length; + if (type && type === 'private') + partCount = algs.privInfo[key.type].parts.length; + + while (!sshbuf.atEnd() && parts.length < partCount) + parts.push(sshbuf.readPart()); + while (!partial && !sshbuf.atEnd()) + parts.push(sshbuf.readPart()); + + assert.ok(parts.length >= 1, + 'key must have at least one part'); + assert.ok(partial || sshbuf.atEnd(), + 'leftover bytes at end of key'); + + var Constructor = Key; + var algInfo = algs.info[key.type]; + if (type === 'private' || algInfo.parts.length !== parts.length) { + algInfo = algs.privInfo[key.type]; + Constructor = PrivateKey; + } + assert.strictEqual(algInfo.parts.length, parts.length); + + if (key.type === 'ecdsa') { + var res = /^ecdsa-sha2-(.+)$/.exec(alg); + assert.ok(res !== null); + assert.strictEqual(res[1], parts[0].data.toString()); + } + + var normalized = true; + for (var i = 0; i < algInfo.parts.length; ++i) { + var p = parts[i]; + p.name = algInfo.parts[i]; + /* + * OpenSSH stores ed25519 "private" keys as seed + public key + * concat'd together (k followed by A). We want to keep them + * separate for other formats that don't do this. + */ + if (key.type === 'ed25519' && p.name === 'k') + p.data = p.data.slice(0, 32); + + if (p.name !== 'curve' && algInfo.normalize !== false) { + var nd; + if (key.type === 'ed25519') { + nd = utils.zeroPadToLength(p.data, 32); + } else { + nd = utils.mpNormalize(p.data); + } + if (nd.toString('binary') !== + p.data.toString('binary')) { + p.data = nd; + normalized = false; + } + } + } + + if (normalized) + key._rfc4253Cache = sshbuf.toBuffer(); + + if (partial && typeof (partial) === 'object') { + partial.remainder = sshbuf.remainder(); + partial.consumed = sshbuf._offset; + } + + return (new Constructor(key)); +} + +function write(key, options) { + assert.object(key); + + var alg = keyTypeToAlg(key); + var i; + + var algInfo = algs.info[key.type]; + if (PrivateKey.isPrivateKey(key)) + algInfo = algs.privInfo[key.type]; + var parts = algInfo.parts; + + var buf = new SSHBuffer({}); + + buf.writeString(alg); + + for (i = 0; i < parts.length; ++i) { + var data = key.part[parts[i]].data; + if (algInfo.normalize !== false) { + if (key.type === 'ed25519') + data = utils.zeroPadToLength(data, 32); + else + data = utils.mpNormalize(data); + } + if (key.type === 'ed25519' && parts[i] === 'k') + data = Buffer.concat([data, key.part.A.data]); + buf.writeBuffer(data); + } + + return (buf.toBuffer()); +} + + +/***/ }), +/* 92 */ +/***/ (function(module, exports) { + +module.exports = require("events"); + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: __webpack_require__(228), + ucs2length: __webpack_require__(447), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i 2 && arguments[2] !== undefined ? arguments[2] : ''; + var flags = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var registry = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ''; + + var auth = registry ? config.registries.npm.getAuthByRegistry(registry) : config.registries.npm.getAuth(name); + + if (config.otp) { + config.registries.npm.setOtp(config.otp); + } + + if (auth) { + config.registries.npm.setToken(auth); + return function revoke() { + reporter.info(reporter.lang('notRevokingConfigToken')); + return (_promise || _load_promise()).default.resolve(); + }; + } + + var env = process.env.YARN_AUTH_TOKEN || process.env.NPM_AUTH_TOKEN; + if (env) { + config.registries.npm.setToken(`Bearer ${env}`); + return function revoke() { + reporter.info(reporter.lang('notRevokingEnvToken')); + return (_promise || _load_promise()).default.resolve(); + }; + } + + // make sure we're not running in non-interactive mode before asking for login + if (flags.nonInteractive || config.nonInteractive) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('nonInteractiveNoToken')); + } + + // + var creds = yield getCredentials(config, reporter); + if (!creds) { + reporter.warn(reporter.lang('loginAsPublic')); + return function revoke() { + reporter.info(reporter.lang('noTokenToRevoke')); + return (_promise || _load_promise()).default.resolve(); + }; + } + + var username = creds.username, + email = creds.email; + + var password = yield reporter.question(reporter.lang('npmPassword'), { + password: true, + required: true + }); + + // + var userobj = { + _id: `org.couchdb.user:${username}`, + name: username, + password, + email, + type: 'user', + roles: [], + date: new Date().toISOString() + }; + + // + var res = yield config.registries.npm.request(`-/user/org.couchdb.user:${encodeURIComponent(username)}`, { + method: 'PUT', + body: userobj, + auth: { username, password, email } + }); + + if (res && res.ok) { + reporter.success(reporter.lang('loggedIn')); + + var token = res.token; + config.registries.npm.setToken(`Bearer ${token}`); + + return function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + reporter.success(reporter.lang('revokedToken')); + yield config.registries.npm.request(`-/user/token/${token}`, { + method: 'DELETE' + }); + }); + + function revoke() { + return _ref3.apply(this, arguments); + } + + return revoke; + }(); + } else { + throw new (_errors || _load_errors()).MessageError(reporter.lang('incorrectCredentials')); + } + }); + + return function getToken(_x3, _x4) { + return _ref2.apply(this, arguments); + }; +}(); + +var run = exports.run = function () { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + yield getCredentials(config, reporter); + }); + + return function run(_x8, _x9, _x10, _x11) { + return _ref4.apply(this, arguments); + }; +}(); + +exports.getOneTimePassword = getOneTimePassword; +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function getOneTimePassword(reporter) { + return reporter.question(reporter.lang('npmOneTimePassword')); +} + +function hasWrapper(commander, args) { + return true; +} + +function setFlags(commander) { + commander.description('Stores registry username and email.'); +} + +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +exports.stringifyLangArgs = stringifyLangArgs; + +var _format; + +function _load_format() { + return _format = __webpack_require__(303); +} + +var _index; + +function _load_index() { + return _index = _interopRequireWildcard(__webpack_require__(304)); +} + +var _isCi; + +function _load_isCi() { + return _isCi = _interopRequireDefault(__webpack_require__(232)); +} + +var _os; + +function _load_os() { + return _os = _interopRequireDefault(__webpack_require__(81)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/* eslint no-unused-vars: 0 */ + +var util = __webpack_require__(9); +var EventEmitter = __webpack_require__(92).EventEmitter; + +function stringifyLangArgs(args) { + return args.map(function (val) { + if (val != null && val.inspect) { + return val.inspect(); + } else { + try { + var str = (0, (_stringify || _load_stringify()).default)(val) || val + ''; + // should match all literal line breaks and + // "u001b" that follow an odd number of backslashes and convert them to ESC + // we do this because the JSON.stringify process has escaped these characters + return str.replace(/((?:^|[^\\])(?:\\{2})*)\\u001[bB]/g, '$1\u001b').replace(/[\\]r[\\]n|([\\])?[\\]n/g, function (match, precededBacklash) { + // precededBacklash not null when "\n" is preceded by a backlash ("\\n") + // match will be "\\n" and we don't replace it with os.EOL + return precededBacklash ? match : (_os || _load_os()).default.EOL; + }); + } catch (e) { + return util.inspect(val); + } + } + }); +} + +var BaseReporter = function () { + function BaseReporter() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BaseReporter); + + var lang = 'en'; + this.language = lang; + + this.stdout = opts.stdout || process.stdout; + this.stderr = opts.stderr || process.stderr; + this.stdin = opts.stdin || this._getStandardInput(); + this.emoji = !!opts.emoji; + this.nonInteractive = !!opts.nonInteractive; + this.noProgress = !!opts.noProgress || (_isCi || _load_isCi()).default; + this.isVerbose = !!opts.verbose; + + // $FlowFixMe: this is valid! + this.isTTY = this.stdout.isTTY; + + this.peakMemory = 0; + this.startTime = Date.now(); + this.format = (_format || _load_format()).defaultFormatter; + } + + BaseReporter.prototype.lang = function lang(key) { + var msg = (_index || _load_index())[this.language][key] || (_index || _load_index()).en[key]; + if (!msg) { + throw new ReferenceError(`No message defined for language key ${key}`); + } + + // stringify args + + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var stringifiedArgs = stringifyLangArgs(args); + + // replace $0 placeholders with args + return msg.replace(/\$(\d+)/g, function (str, i) { + return stringifiedArgs[i]; + }); + }; + + /** + * `stringifyLangArgs` run `JSON.stringify` on strings too causing + * them to appear quoted. This marks them as "raw" and prevents + * the quoting and escaping + */ + + + BaseReporter.prototype.rawText = function rawText(str) { + return { + inspect() { + return str; + } + }; + }; + + BaseReporter.prototype.verbose = function verbose(msg) { + if (this.isVerbose) { + this._verbose(msg); + } + }; + + BaseReporter.prototype.verboseInspect = function verboseInspect(val) { + if (this.isVerbose) { + this._verboseInspect(val); + } + }; + + BaseReporter.prototype._verbose = function _verbose(msg) {}; + + BaseReporter.prototype._verboseInspect = function _verboseInspect(val) {}; + + BaseReporter.prototype._getStandardInput = function _getStandardInput() { + var standardInput = void 0; + + // Accessing stdin in a win32 headless process (e.g., Visual Studio) may throw an exception. + try { + standardInput = process.stdin; + } catch (e) { + console.warn(e.message); + delete process.stdin; + // $FlowFixMe: this is valid! + process.stdin = new EventEmitter(); + standardInput = process.stdin; + } + + return standardInput; + }; + + BaseReporter.prototype.initPeakMemoryCounter = function initPeakMemoryCounter() { + var _this = this; + + this.checkPeakMemory(); + this.peakMemoryInterval = setInterval(function () { + _this.checkPeakMemory(); + }, 1000); + // $FlowFixMe: Node's setInterval returns a Timeout, not a Number + this.peakMemoryInterval.unref(); + }; + + BaseReporter.prototype.checkPeakMemory = function checkPeakMemory() { + var _process$memoryUsage = process.memoryUsage(), + heapTotal = _process$memoryUsage.heapTotal; + + if (heapTotal > this.peakMemory) { + this.peakMemory = heapTotal; + } + }; + + BaseReporter.prototype.close = function close() { + if (this.peakMemoryInterval) { + clearInterval(this.peakMemoryInterval); + this.peakMemoryInterval = null; + } + }; + + BaseReporter.prototype.getTotalTime = function getTotalTime() { + return Date.now() - this.startTime; + }; + + // TODO + + + BaseReporter.prototype.list = function list(key, items, hints) {}; + + // Outputs basic tree structure to console + + + BaseReporter.prototype.tree = function tree(key, obj) { + var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref$force = _ref.force, + force = _ref$force === undefined ? false : _ref$force; + }; + + // called whenever we begin a step in the CLI. + + + BaseReporter.prototype.step = function step(current, total, message, emoji) {}; + + // a error message has been triggered. this however does not always meant an abrupt + // program end. + + + BaseReporter.prototype.error = function error(message) {}; + + // an info message has been triggered. this provides things like stats and diagnostics. + + + BaseReporter.prototype.info = function info(message) {}; + + // a warning message has been triggered. + + + BaseReporter.prototype.warn = function warn(message) {}; + + // a success message has been triggered. + + + BaseReporter.prototype.success = function success(message) {}; + + // a simple log message + // TODO: rethink the {force} parameter. In the meantime, please don't use it (cf comments in #4143). + + + BaseReporter.prototype.log = function log(message) { + var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref2$force = _ref2.force, + force = _ref2$force === undefined ? false : _ref2$force; + }; + + // a shell command has been executed + + + BaseReporter.prototype.command = function command(_command) {}; + + // inspect and pretty-print any value + + + BaseReporter.prototype.inspect = function inspect(value) {}; + + // the screen shown at the very start of the CLI + + + BaseReporter.prototype.header = function header(command, pkg) {}; + + // the screen shown at the very end of the CLI + + + BaseReporter.prototype.footer = function footer(showPeakMemory) {}; + + // a table structure + + + BaseReporter.prototype.table = function table(head, body) {}; + + // security audit action to resolve advisories + + + BaseReporter.prototype.auditAction = function auditAction(recommendation) {}; + + // security audit requires manual review + + + BaseReporter.prototype.auditManualReview = function auditManualReview() {}; + + // security audit advisory + + + BaseReporter.prototype.auditAdvisory = function auditAdvisory(resolution, _auditAdvisory) {}; + + // summary for security audit report + + + BaseReporter.prototype.auditSummary = function auditSummary(auditMetadata) {}; + + // render an activity spinner and return a function that will trigger an update + + + BaseReporter.prototype.activity = function activity() { + return { + tick(name) {}, + end() {} + }; + }; + + // + + + BaseReporter.prototype.activitySet = function activitySet(total, workers) { + return { + spinners: Array(workers).fill({ + clear() {}, + setPrefix() {}, + tick() {}, + end() {} + }), + end() {} + }; + }; + + // + + + BaseReporter.prototype.question = function question(_question) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + return (_promise || _load_promise()).default.reject(new Error('Not implemented')); + }; + + // + + + BaseReporter.prototype.questionAffirm = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (question) { + var condition = true; // trick eslint + if (this.nonInteractive) { + return true; + } + + while (condition) { + var answer = yield this.question(question); + answer = answer.toLowerCase(); + + if (answer === 'y' || answer === 'yes') { + return true; + } + if (answer === 'n' || answer === 'no') { + return false; + } + + this.error('Invalid answer for question'); + } + + return false; + }); + + function questionAffirm(_x5) { + return _ref3.apply(this, arguments); + } + + return questionAffirm; + }(); + + // prompt the user to select an option from an array + + + BaseReporter.prototype.select = function select(header, question, options) { + return (_promise || _load_promise()).default.reject(new Error('Not implemented')); + }; + + // render a progress bar and return a function which when called will trigger an update + + + BaseReporter.prototype.progress = function progress(total) { + return function () {}; + }; + + // utility function to disable progress bar + + + BaseReporter.prototype.disableProgress = function disableProgress() { + this.noProgress = true; + }; + + // + + + BaseReporter.prototype.prompt = function prompt(message, choices) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + return (_promise || _load_promise()).default.reject(new Error('Not implemented')); + }; + + return BaseReporter; +}(); + +exports.default = BaseReporter; + +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +exports.explodeHostedGitFragment = explodeHostedGitFragment; + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _index; + +function _load_index() { + return _index = __webpack_require__(59); +} + +var _gitResolver; + +function _load_gitResolver() { + return _gitResolver = _interopRequireDefault(__webpack_require__(114)); +} + +var _exoticResolver; + +function _load_exoticResolver() { + return _exoticResolver = _interopRequireDefault(__webpack_require__(84)); +} + +var _git; + +function _load_git() { + return _git = _interopRequireDefault(__webpack_require__(199)); +} + +var _guessName; + +function _load_guessName() { + return _guessName = _interopRequireDefault(__webpack_require__(154)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parseHash(fragment) { + var hashPosition = fragment.indexOf('#'); + return hashPosition === -1 ? '' : fragment.substr(hashPosition + 1); +} + +function explodeHostedGitFragment(fragment, reporter) { + var hash = parseHash(fragment); + + var preParts = fragment.split('@'); + if (preParts.length > 2) { + fragment = preParts[1] + '@' + preParts[2]; + } + + var parts = fragment.replace(/(.*?)#.*/, '$1') // Strip hash + .replace(/.*:(.*)/, '$1') // Strip prefixed protocols + .replace(/.git$/, '') // Strip the .git suffix + .split('/'); + + var user = parts[parts.length - 2]; + var repo = parts[parts.length - 1]; + + if (user === undefined || repo === undefined) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('invalidHostedGitFragment', fragment)); + } + + return { + user, + repo, + hash + }; +} + +var HostedGitResolver = function (_ExoticResolver) { + (0, (_inherits2 || _load_inherits()).default)(HostedGitResolver, _ExoticResolver); + + function HostedGitResolver(request, fragment) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, HostedGitResolver); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _ExoticResolver.call(this, request, fragment)); + + var exploded = _this.exploded = explodeHostedGitFragment(fragment, _this.reporter); + var user = exploded.user, + repo = exploded.repo, + hash = exploded.hash; + + _this.user = user; + _this.repo = repo; + _this.hash = hash; + return _this; + } + + HostedGitResolver.getTarballUrl = function getTarballUrl(exploded, commit) { + exploded; + commit; + throw new Error('Not implemented'); + }; + + HostedGitResolver.getGitHTTPUrl = function getGitHTTPUrl(exploded) { + exploded; + throw new Error('Not implemented'); + }; + + HostedGitResolver.getGitHTTPBaseUrl = function getGitHTTPBaseUrl(exploded) { + exploded; + throw new Error('Not implemented'); + }; + + HostedGitResolver.getGitSSHUrl = function getGitSSHUrl(exploded) { + exploded; + throw new Error('Not implemented'); + }; + + HostedGitResolver.getHTTPFileUrl = function getHTTPFileUrl(exploded, filename, commit) { + exploded; + filename; + commit; + throw new Error('Not implemented'); + }; + + HostedGitResolver.prototype.getRefOverHTTP = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (url) { + var gitUrl = (_git || _load_git()).default.npmUrlToGitUrl(url); + var client = new (_git || _load_git()).default(this.config, gitUrl, this.hash); + + var out = yield this.config.requestManager.request({ + url: `${url}/info/refs?service=git-upload-pack`, + queue: this.resolver.fetchingQueue + }); + + if (out) { + // clean up output + var lines = out.trim().split('\n'); + + // remove first two lines which contains compatibility info etc + lines = lines.slice(2); + + // remove last line which contains the terminator "0000" + lines.pop(); + + // remove line lengths from start of each line + lines = lines.map(function (line) { + return line.slice(4); + }); + + out = lines.join('\n'); + } else { + throw new Error(this.reporter.lang('hostedGitResolveError')); + } + + return client.setRefHosted(out); + }); + + function getRefOverHTTP(_x) { + return _ref.apply(this, arguments); + } + + return getRefOverHTTP; + }(); + + HostedGitResolver.prototype.resolveOverHTTP = function () { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (url) { + var _this2 = this; + + var commit = yield this.getRefOverHTTP(url); + var config = this.config; + + + var tarballUrl = this.constructor.getTarballUrl(this.exploded, commit); + + var tryRegistry = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (registry) { + var filename = (_index || _load_index()).registries[registry].filename; + + var href = _this2.constructor.getHTTPFileUrl(_this2.exploded, filename, commit); + var file = yield config.requestManager.request({ + url: href, + queue: _this2.resolver.fetchingQueue + }); + if (!file) { + return null; + } + + var json = yield config.readJson(href, function () { + return JSON.parse(file); + }); + json._uid = commit; + json._remote = { + resolved: tarballUrl, + type: 'tarball', + reference: tarballUrl, + registry + }; + return json; + }); + + return function tryRegistry(_x3) { + return _ref3.apply(this, arguments); + }; + }(); + + var file = yield tryRegistry(this.registry); + if (file) { + return file; + } + + for (var registry in (_index || _load_index()).registries) { + if (registry === this.registry) { + continue; + } + + var _file = yield tryRegistry(registry); + if (_file) { + return _file; + } + } + + return { + name: (0, (_guessName || _load_guessName()).default)(url), + version: '0.0.0', + _uid: commit, + _remote: { + resolved: tarballUrl, + type: 'tarball', + reference: tarballUrl, + registry: 'npm', + hash: undefined + } + }; + }); + + function resolveOverHTTP(_x2) { + return _ref2.apply(this, arguments); + } + + return resolveOverHTTP; + }(); + + HostedGitResolver.prototype.hasHTTPCapability = function () { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (url) { + return (yield this.config.requestManager.request({ + url, + method: 'HEAD', + queue: this.resolver.fetchingQueue, + followRedirect: false + })) !== false; + }); + + function hasHTTPCapability(_x4) { + return _ref4.apply(this, arguments); + } + + return hasHTTPCapability; + }(); + + HostedGitResolver.prototype.resolve = function () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // If we already have the tarball, just return it without having to make any HTTP requests. + var shrunk = this.request.getLocked('tarball'); + if (shrunk) { + return shrunk; + } + + var httpUrl = this.constructor.getGitHTTPUrl(this.exploded); + var httpBaseUrl = this.constructor.getGitHTTPBaseUrl(this.exploded); + var sshUrl = this.constructor.getGitSSHUrl(this.exploded); + + // If we can access the files over HTTP then we should as it's MUCH faster than git + // archive and tarball unarchiving. The HTTP API is only available for public repos + // though. + if (yield this.hasHTTPCapability(httpBaseUrl)) { + return this.resolveOverHTTP(httpUrl); + } + + // If the url is accessible over git archive then we should immediately delegate to + // the git resolver. + // + // NOTE: Here we use a different url than when we delegate to the git resolver later on. + // This is because `git archive` requires access over ssh and github only allows that + // if you have write permissions + var sshGitUrl = (_git || _load_git()).default.npmUrlToGitUrl(sshUrl); + if (yield (_git || _load_git()).default.hasArchiveCapability(sshGitUrl)) { + var archiveClient = new (_git || _load_git()).default(this.config, sshGitUrl, this.hash); + var commit = yield archiveClient.init(); + return this.fork((_gitResolver || _load_gitResolver()).default, true, `${sshUrl}#${commit}`); + } + + // fallback to the plain git resolver + return this.fork((_gitResolver || _load_gitResolver()).default, true, sshUrl); + }); + + function resolve() { + return _ref5.apply(this, arguments); + } + + return resolve; + }(); + + return HostedGitResolver; +}((_exoticResolver || _load_exoticResolver()).default); + +exports.default = HostedGitResolver; + +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.home = undefined; + +var _rootUser; + +function _load_rootUser() { + return _rootUser = _interopRequireDefault(__webpack_require__(569)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var path = __webpack_require__(2); + +var home = exports.home = __webpack_require__(81).homedir(); + +var userHomeDir = (_rootUser || _load_rootUser()).default ? path.resolve('/usr/local/share') : home; + +exports.default = userHomeDir; + +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(340); +var enumBugKeys = __webpack_require__(212); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(210); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var $at = __webpack_require__(642)(true); + +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(214)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); + + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +/***/ }), +/* 102 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * micromatch + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + + + +var expand = __webpack_require__(792); +var utils = __webpack_require__(233); + +/** + * The main function. Pass an array of filepaths, + * and a string or array of glob patterns + * + * @param {Array|String} `files` + * @param {Array|String} `patterns` + * @param {Object} `opts` + * @return {Array} Array of matches + */ + +function micromatch(files, patterns, opts) { + if (!files || !patterns) return []; + opts = opts || {}; + + if (typeof opts.cache === 'undefined') { + opts.cache = true; + } + + if (!Array.isArray(patterns)) { + return match(files, patterns, opts); + } + + var len = patterns.length, i = 0; + var omit = [], keep = []; + + while (len--) { + var glob = patterns[i++]; + if (typeof glob === 'string' && glob.charCodeAt(0) === 33 /* ! */) { + omit.push.apply(omit, match(files, glob.slice(1), opts)); + } else { + keep.push.apply(keep, match(files, glob, opts)); + } + } + return utils.diff(keep, omit); +} + +/** + * Return an array of files that match the given glob pattern. + * + * This function is called by the main `micromatch` function If you only + * need to pass a single pattern you might get very minor speed improvements + * using this function. + * + * @param {Array} `files` + * @param {String} `pattern` + * @param {Object} `options` + * @return {Array} + */ + +function match(files, pattern, opts) { + if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) { + throw new Error(msg('match', 'files', 'a string or array')); + } + + files = utils.arrayify(files); + opts = opts || {}; + + var negate = opts.negate || false; + var orig = pattern; + + if (typeof pattern === 'string') { + negate = pattern.charAt(0) === '!'; + if (negate) { + pattern = pattern.slice(1); + } + + // we need to remove the character regardless, + // so the above logic is still needed + if (opts.nonegate === true) { + negate = false; + } + } + + var _isMatch = matcher(pattern, opts); + var len = files.length, i = 0; + var res = []; + + while (i < len) { + var file = files[i++]; + var fp = utils.unixify(file, opts); + + if (!_isMatch(fp)) { continue; } + res.push(fp); + } + + if (res.length === 0) { + if (opts.failglob === true) { + throw new Error('micromatch.match() found no matches for: "' + orig + '".'); + } + + if (opts.nonull || opts.nullglob) { + res.push(utils.unescapeGlob(orig)); + } + } + + // if `negate` was defined, diff negated files + if (negate) { res = utils.diff(files, res); } + + // if `ignore` was defined, diff ignored filed + if (opts.ignore && opts.ignore.length) { + pattern = opts.ignore; + opts = utils.omit(opts, ['ignore']); + res = utils.diff(res, micromatch(res, pattern, opts)); + } + + if (opts.nodupes) { + return utils.unique(res); + } + return res; +} + +/** + * Returns a function that takes a glob pattern or array of glob patterns + * to be used with `Array#filter()`. (Internally this function generates + * the matching function using the [matcher] method). + * + * ```js + * var fn = mm.filter('[a-c]'); + * ['a', 'b', 'c', 'd', 'e'].filter(fn); + * //=> ['a', 'b', 'c'] + * ``` + * @param {String|Array} `patterns` Can be a glob or array of globs. + * @param {Options} `opts` Options to pass to the [matcher] method. + * @return {Function} Filter function to be passed to `Array#filter()`. + */ + +function filter(patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('filter', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length, i = 0; + var patternMatchers = Array(len); + while (i < len) { + patternMatchers[i] = matcher(patterns[i++], opts); + } + + return function(fp) { + if (fp == null) return []; + var len = patternMatchers.length, i = 0; + var res = true; + + fp = utils.unixify(fp, opts); + while (i < len) { + var fn = patternMatchers[i++]; + if (!fn(fp)) { + res = false; + break; + } + } + return res; + }; +} + +/** + * Returns true if the filepath contains the given + * pattern. Can also return a function for matching. + * + * ```js + * isMatch('foo.md', '*.md', {}); + * //=> true + * + * isMatch('*.md', {})('foo.md') + * //=> true + * ``` + * @param {String} `fp` + * @param {String} `pattern` + * @param {Object} `opts` + * @return {Boolean} + */ + +function isMatch(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('isMatch', 'filepath', 'a string')); + } + + fp = utils.unixify(fp, opts); + if (utils.typeOf(pattern) === 'object') { + return matcher(fp, pattern); + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if the filepath matches the + * given pattern. + */ + +function contains(fp, pattern, opts) { + if (typeof fp !== 'string') { + throw new TypeError(msg('contains', 'pattern', 'a string')); + } + + opts = opts || {}; + opts.contains = (pattern !== ''); + fp = utils.unixify(fp, opts); + + if (opts.contains && !utils.isGlob(pattern)) { + return fp.indexOf(pattern) !== -1; + } + return matcher(pattern, opts)(fp); +} + +/** + * Returns true if a file path matches any of the + * given patterns. + * + * @param {String} `fp` The filepath to test. + * @param {String|Array} `patterns` Glob patterns to use. + * @param {Object} `opts` Options to pass to the `matcher()` function. + * @return {String} + */ + +function any(fp, patterns, opts) { + if (!Array.isArray(patterns) && typeof patterns !== 'string') { + throw new TypeError(msg('any', 'patterns', 'a string or array')); + } + + patterns = utils.arrayify(patterns); + var len = patterns.length; + + fp = utils.unixify(fp, opts); + while (len--) { + var isMatch = matcher(patterns[len], opts); + if (isMatch(fp)) { + return true; + } + } + return false; +} + +/** + * Filter the keys of an object with the given `glob` pattern + * and `options` + * + * @param {Object} `object` + * @param {Pattern} `object` + * @return {Array} + */ + +function matchKeys(obj, glob, options) { + if (utils.typeOf(obj) !== 'object') { + throw new TypeError(msg('matchKeys', 'first argument', 'an object')); + } + + var fn = matcher(glob, options); + var res = {}; + + for (var key in obj) { + if (obj.hasOwnProperty(key) && fn(key)) { + res[key] = obj[key]; + } + } + return res; +} + +/** + * Return a function for matching based on the + * given `pattern` and `options`. + * + * @param {String} `pattern` + * @param {Object} `options` + * @return {Function} + */ + +function matcher(pattern, opts) { + // pattern is a function + if (typeof pattern === 'function') { + return pattern; + } + // pattern is a regex + if (pattern instanceof RegExp) { + return function(fp) { + return pattern.test(fp); + }; + } + + if (typeof pattern !== 'string') { + throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function')); + } + + // strings, all the way down... + pattern = utils.unixify(pattern, opts); + + // pattern is a non-glob string + if (!utils.isGlob(pattern)) { + return utils.matchPath(pattern, opts); + } + // pattern is a glob string + var re = makeRe(pattern, opts); + + // `matchBase` is defined + if (opts && opts.matchBase) { + return utils.hasFilename(re, opts); + } + // `matchBase` is not defined + return function(fp) { + fp = utils.unixify(fp, opts); + return re.test(fp); + }; +} + +/** + * Create and cache a regular expression for matching + * file paths. + * + * If the leading character in the `glob` is `!`, a negation + * regex is returned. + * + * @param {String} `glob` + * @param {Object} `options` + * @return {RegExp} + */ + +function toRegex(glob, options) { + // clone options to prevent mutating the original object + var opts = Object.create(options || {}); + var flags = opts.flags || ''; + if (opts.nocase && flags.indexOf('i') === -1) { + flags += 'i'; + } + + var parsed = expand(glob, opts); + + // pass in tokens to avoid parsing more than once + opts.negated = opts.negated || parsed.negated; + opts.negate = opts.negated; + glob = wrapGlob(parsed.pattern, opts); + var re; + + try { + re = new RegExp(glob, flags); + return re; + } catch (err) { + err.reason = 'micromatch invalid regex: (' + re + ')'; + if (opts.strict) throw new SyntaxError(err); + } + + // we're only here if a bad pattern was used and the user + // passed `options.silent`, so match nothing + return /$^/; +} + +/** + * Create the regex to do the matching. If the leading + * character in the `glob` is `!` a negation regex is returned. + * + * @param {String} `glob` + * @param {Boolean} `negate` + */ + +function wrapGlob(glob, opts) { + var prefix = (opts && !opts.contains) ? '^' : ''; + var after = (opts && !opts.contains) ? '$' : ''; + glob = ('(?:' + glob + ')' + after); + if (opts && opts.negate) { + return prefix + ('(?!^' + glob + ').*$'); + } + return prefix + glob; +} + +/** + * Create and cache a regular expression for matching file paths. + * If the leading character in the `glob` is `!`, a negation + * regex is returned. + * + * @param {String} `glob` + * @param {Object} `options` + * @return {RegExp} + */ + +function makeRe(glob, opts) { + if (utils.typeOf(glob) !== 'string') { + throw new Error(msg('makeRe', 'glob', 'a string')); + } + return utils.cache(toRegex, glob, opts); +} + +/** + * Make error messages consistent. Follows this format: + * + * ```js + * msg(methodName, argNumber, nativeType); + * // example: + * msg('matchKeys', 'first', 'an object'); + * ``` + * + * @param {String} `method` + * @param {String} `num` + * @param {String} `type` + * @return {String} + */ + +function msg(method, what, type) { + return 'micromatch.' + method + '(): ' + what + ' should be ' + type + '.'; +} + +/** + * Public methods + */ + +/* eslint no-multi-spaces: 0 */ +micromatch.any = any; +micromatch.braces = micromatch.braceExpand = utils.braces; +micromatch.contains = contains; +micromatch.expand = expand; +micromatch.filter = filter; +micromatch.isMatch = isMatch; +micromatch.makeRe = makeRe; +micromatch.match = match; +micromatch.matcher = matcher; +micromatch.matchKeys = matchKeys; + +/** + * Expose `micromatch` + */ + +module.exports = micromatch; + + +/***/ }), +/* 103 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + + + +/**/ + +var pna = __webpack_require__(164); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = __webpack_require__(101); +util.inherits = __webpack_require__(76); +/**/ + +var Readable = __webpack_require__(370); +var Writable = __webpack_require__(372); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; + +/***/ }), +/* 104 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = multicast; +/* unused harmony export MulticastOperator */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_ConnectableObservable__ = __webpack_require__(387); +/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */ + +function multicast(subjectOrSubjectFactory, selector) { + return function multicastOperatorFunction(source) { + var subjectFactory; + if (typeof subjectOrSubjectFactory === 'function') { + subjectFactory = subjectOrSubjectFactory; + } + else { + subjectFactory = function subjectFactory() { + return subjectOrSubjectFactory; + }; + } + if (typeof selector === 'function') { + return source.lift(new MulticastOperator(subjectFactory, selector)); + } + var connectable = Object.create(source, __WEBPACK_IMPORTED_MODULE_0__observable_ConnectableObservable__["b" /* connectableObservableDescriptor */]); + connectable.source = source; + connectable.subjectFactory = subjectFactory; + return connectable; + }; +} +var MulticastOperator = /*@__PURE__*/ (function () { + function MulticastOperator(subjectFactory, selector) { + this.subjectFactory = subjectFactory; + this.selector = selector; + } + MulticastOperator.prototype.call = function (subscriber, source) { + var selector = this.selector; + var subject = this.subjectFactory(); + var subscription = selector(subject).subscribe(subscriber); + subscription.add(source.subscribe(subject)); + return subscription; + }; + return MulticastOperator; +}()); + +//# sourceMappingURL=multicast.js.map + + +/***/ }), +/* 105 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return observable; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable'; +//# sourceMappingURL=observable.js.map + + +/***/ }), +/* 106 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = identity; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function identity(x) { + return x; +} +//# sourceMappingURL=identity.js.map + + +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const Buffer = __webpack_require__(58).Buffer + +const crypto = __webpack_require__(21) +const Transform = __webpack_require__(34).Transform + +const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] + +const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i +const SRI_REGEX = /^([^-]+)-([^?]+)([?\S*]*)$/ +const STRICT_SRI_REGEX = /^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/ +const VCHAR_REGEX = /^[\x21-\x7E]+$/ + +class Hash { + get isHash () { return true } + constructor (hash, opts) { + const strict = !!(opts && opts.strict) + this.source = hash.trim() + // 3.1. Integrity metadata (called "Hash" by ssri) + // https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description + const match = this.source.match( + strict + ? STRICT_SRI_REGEX + : SRI_REGEX + ) + if (!match) { return } + if (strict && !SPEC_ALGORITHMS.some(a => a === match[1])) { return } + this.algorithm = match[1] + this.digest = match[2] + + const rawOpts = match[3] + this.options = rawOpts ? rawOpts.slice(1).split('?') : [] + } + hexDigest () { + return this.digest && Buffer.from(this.digest, 'base64').toString('hex') + } + toJSON () { + return this.toString() + } + toString (opts) { + if (opts && opts.strict) { + // Strict mode enforces the standard as close to the foot of the + // letter as it can. + if (!( + // The spec has very restricted productions for algorithms. + // https://www.w3.org/TR/CSP2/#source-list-syntax + SPEC_ALGORITHMS.some(x => x === this.algorithm) && + // Usually, if someone insists on using a "different" base64, we + // leave it as-is, since there's multiple standards, and the + // specified is not a URL-safe variant. + // https://www.w3.org/TR/CSP2/#base64_value + this.digest.match(BASE64_REGEX) && + // Option syntax is strictly visual chars. + // https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression + // https://tools.ietf.org/html/rfc5234#appendix-B.1 + (this.options || []).every(opt => opt.match(VCHAR_REGEX)) + )) { + return '' + } + } + const options = this.options && this.options.length + ? `?${this.options.join('?')}` + : '' + return `${this.algorithm}-${this.digest}${options}` + } +} + +class Integrity { + get isIntegrity () { return true } + toJSON () { + return this.toString() + } + toString (opts) { + opts = opts || {} + let sep = opts.sep || ' ' + if (opts.strict) { + // Entries must be separated by whitespace, according to spec. + sep = sep.replace(/\S+/g, ' ') + } + return Object.keys(this).map(k => { + return this[k].map(hash => { + return Hash.prototype.toString.call(hash, opts) + }).filter(x => x.length).join(sep) + }).filter(x => x.length).join(sep) + } + concat (integrity, opts) { + const other = typeof integrity === 'string' + ? integrity + : stringify(integrity, opts) + return parse(`${this.toString(opts)} ${other}`, opts) + } + hexDigest () { + return parse(this, {single: true}).hexDigest() + } + match (integrity, opts) { + const other = parse(integrity, opts) + const algo = other.pickAlgorithm(opts) + return ( + this[algo] && + other[algo] && + this[algo].find(hash => + other[algo].find(otherhash => + hash.digest === otherhash.digest + ) + ) + ) || false + } + pickAlgorithm (opts) { + const pickAlgorithm = (opts && opts.pickAlgorithm) || getPrioritizedHash + const keys = Object.keys(this) + if (!keys.length) { + throw new Error(`No algorithms available for ${ + JSON.stringify(this.toString()) + }`) + } + return keys.reduce((acc, algo) => { + return pickAlgorithm(acc, algo) || acc + }) + } +} + +module.exports.parse = parse +function parse (sri, opts) { + opts = opts || {} + if (typeof sri === 'string') { + return _parse(sri, opts) + } else if (sri.algorithm && sri.digest) { + const fullSri = new Integrity() + fullSri[sri.algorithm] = [sri] + return _parse(stringify(fullSri, opts), opts) + } else { + return _parse(stringify(sri, opts), opts) + } +} + +function _parse (integrity, opts) { + // 3.4.3. Parse metadata + // https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + if (opts.single) { + return new Hash(integrity, opts) + } + return integrity.trim().split(/\s+/).reduce((acc, string) => { + const hash = new Hash(string, opts) + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm + if (!acc[algo]) { acc[algo] = [] } + acc[algo].push(hash) + } + return acc + }, new Integrity()) +} + +module.exports.stringify = stringify +function stringify (obj, opts) { + if (obj.algorithm && obj.digest) { + return Hash.prototype.toString.call(obj, opts) + } else if (typeof obj === 'string') { + return stringify(parse(obj, opts), opts) + } else { + return Integrity.prototype.toString.call(obj, opts) + } +} + +module.exports.fromHex = fromHex +function fromHex (hexDigest, algorithm, opts) { + const optString = (opts && opts.options && opts.options.length) + ? `?${opts.options.join('?')}` + : '' + return parse( + `${algorithm}-${ + Buffer.from(hexDigest, 'hex').toString('base64') + }${optString}`, opts + ) +} + +module.exports.fromData = fromData +function fromData (data, opts) { + opts = opts || {} + const algorithms = opts.algorithms || ['sha512'] + const optString = opts.options && opts.options.length + ? `?${opts.options.join('?')}` + : '' + return algorithms.reduce((acc, algo) => { + const digest = crypto.createHash(algo).update(data).digest('base64') + const hash = new Hash( + `${algo}-${digest}${optString}`, + opts + ) + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm + if (!acc[algo]) { acc[algo] = [] } + acc[algo].push(hash) + } + return acc + }, new Integrity()) +} + +module.exports.fromStream = fromStream +function fromStream (stream, opts) { + opts = opts || {} + const P = opts.Promise || Promise + const istream = integrityStream(opts) + return new P((resolve, reject) => { + stream.pipe(istream) + stream.on('error', reject) + istream.on('error', reject) + let sri + istream.on('integrity', s => { sri = s }) + istream.on('end', () => resolve(sri)) + istream.on('data', () => {}) + }) +} + +module.exports.checkData = checkData +function checkData (data, sri, opts) { + opts = opts || {} + sri = parse(sri, opts) + if (!Object.keys(sri).length) { + if (opts.error) { + throw Object.assign( + new Error('No valid integrity hashes to check against'), { + code: 'EINTEGRITY' + } + ) + } else { + return false + } + } + const algorithm = sri.pickAlgorithm(opts) + const digest = crypto.createHash(algorithm).update(data).digest('base64') + const newSri = parse({algorithm, digest}) + const match = newSri.match(sri, opts) + if (match || !opts.error) { + return match + } else if (typeof opts.size === 'number' && (data.length !== opts.size)) { + const err = new Error(`data size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${data.length}`) + err.code = 'EBADSIZE' + err.found = data.length + err.expected = opts.size + err.sri = sri + throw err + } else { + const err = new Error(`Integrity checksum failed when using ${algorithm}: Wanted ${sri}, but got ${newSri}. (${data.length} bytes)`) + err.code = 'EINTEGRITY' + err.found = newSri + err.expected = sri + err.algorithm = algorithm + err.sri = sri + throw err + } +} + +module.exports.checkStream = checkStream +function checkStream (stream, sri, opts) { + opts = opts || {} + const P = opts.Promise || Promise + const checker = integrityStream(Object.assign({}, opts, { + integrity: sri + })) + return new P((resolve, reject) => { + stream.pipe(checker) + stream.on('error', reject) + checker.on('error', reject) + let sri + checker.on('verified', s => { sri = s }) + checker.on('end', () => resolve(sri)) + checker.on('data', () => {}) + }) +} + +module.exports.integrityStream = integrityStream +function integrityStream (opts) { + opts = opts || {} + // For verification + const sri = opts.integrity && parse(opts.integrity, opts) + const goodSri = sri && Object.keys(sri).length + const algorithm = goodSri && sri.pickAlgorithm(opts) + const digests = goodSri && sri[algorithm] + // Calculating stream + const algorithms = Array.from( + new Set( + (opts.algorithms || ['sha512']) + .concat(algorithm ? [algorithm] : []) + ) + ) + const hashes = algorithms.map(crypto.createHash) + let streamSize = 0 + const stream = new Transform({ + transform (chunk, enc, cb) { + streamSize += chunk.length + hashes.forEach(h => h.update(chunk, enc)) + cb(null, chunk, enc) + } + }).on('end', () => { + const optString = (opts.options && opts.options.length) + ? `?${opts.options.join('?')}` + : '' + const newSri = parse(hashes.map((h, i) => { + return `${algorithms[i]}-${h.digest('base64')}${optString}` + }).join(' '), opts) + // Integrity verification mode + const match = goodSri && newSri.match(sri, opts) + if (typeof opts.size === 'number' && streamSize !== opts.size) { + const err = new Error(`stream size mismatch when checking ${sri}.\n Wanted: ${opts.size}\n Found: ${streamSize}`) + err.code = 'EBADSIZE' + err.found = streamSize + err.expected = opts.size + err.sri = sri + stream.emit('error', err) + } else if (opts.integrity && !match) { + const err = new Error(`${sri} integrity checksum failed when using ${algorithm}: wanted ${digests} but got ${newSri}. (${streamSize} bytes)`) + err.code = 'EINTEGRITY' + err.found = newSri + err.expected = digests + err.algorithm = algorithm + err.sri = sri + stream.emit('error', err) + } else { + stream.emit('size', streamSize) + stream.emit('integrity', newSri) + match && stream.emit('verified', match) + } + }) + return stream +} + +module.exports.create = createIntegrity +function createIntegrity (opts) { + opts = opts || {} + const algorithms = opts.algorithms || ['sha512'] + const optString = opts.options && opts.options.length + ? `?${opts.options.join('?')}` + : '' + + const hashes = algorithms.map(crypto.createHash) + + return { + update: function (chunk, enc) { + hashes.forEach(h => h.update(chunk, enc)) + return this + }, + digest: function (enc) { + const integrity = algorithms.reduce((acc, algo) => { + const digest = hashes.shift().digest('base64') + const hash = new Hash( + `${algo}-${digest}${optString}`, + opts + ) + if (hash.algorithm && hash.digest) { + const algo = hash.algorithm + if (!acc[algo]) { acc[algo] = [] } + acc[algo].push(hash) + } + return acc + }, new Integrity()) + + return integrity + } + } +} + +const NODE_HASHES = new Set(crypto.getHashes()) + +// This is a Best Effort™ at a reasonable priority for hash algos +const DEFAULT_PRIORITY = [ + 'md5', 'whirlpool', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', + // TODO - it's unclear _which_ of these Node will actually use as its name + // for the algorithm, so we guesswork it based on the OpenSSL names. + 'sha3', + 'sha3-256', 'sha3-384', 'sha3-512', + 'sha3_256', 'sha3_384', 'sha3_512' +].filter(algo => NODE_HASHES.has(algo)) + +function getPrioritizedHash (algo1, algo2) { + return DEFAULT_PRIORITY.indexOf(algo1.toLowerCase()) >= DEFAULT_PRIORITY.indexOf(algo2.toLowerCase()) + ? algo1 + : algo2 +} + + +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { + +var v1 = __webpack_require__(998); +var v4 = __webpack_require__(999); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; + + +/***/ }), +/* 109 */ +/***/ (function(module, exports) { + +module.exports = require("buffer"); + +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getInstallationMethod = exports.version = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var getInstallationMethod = exports.getInstallationMethod = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var installationMethod = originalInstallationMethod; + + // If there's a package.json in the parent directory, it could have an + // override for the installation method, so we should prefer that over + // whatever was originally in Yarn's package.json. This is the case with + // systems such as Homebrew, which take the tarball and modify the + // installation method so we're aware of the fact that Yarn was installed via + // Homebrew (so things like update notifications can point out the correct + // command to upgrade). + try { + var manifestPath = (_path || _load_path()).default.join(__dirname, '..', 'package.json'); + if ((_fs2 || _load_fs2()).default.existsSync(manifestPath)) { + // non-async version is deprecated + var manifest = yield (0, (_fs || _load_fs()).readJson)(manifestPath); + if (manifest.installationMethod) { + installationMethod = manifest.installationMethod; + } + } + } catch (e) { + // Ignore any errors; this is not critical functionality. + } + return installationMethod; + }); + + return function getInstallationMethod() { + return _ref.apply(this, arguments); + }; +}(); + +var _fs; + +function _load_fs() { + return _fs = __webpack_require__(8); +} + +var _fs2; + +function _load_fs2() { + return _fs2 = _interopRequireDefault(__webpack_require__(12)); +} + +var _path; + +function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(2)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// This will be bundled directly in the .js file for production builds +var _require = __webpack_require__(432), + version = _require.version, + originalInstallationMethod = _require.installationMethod; /** + * Determines the current version of Yarn itself. + * + */ + +exports.version = version; + +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = exports.getBinFolder = undefined; + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +var updateCwd = function () { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + yield (_fs || _load_fs()).mkdirp(config.globalFolder); + + yield config.init({ + cwd: config.globalFolder, + binLinks: true, + globalFolder: config.globalFolder, + cacheFolder: config._cacheRootFolder, + linkFolder: config.linkFolder, + enableDefaultRc: config.enableDefaultRc, + extraneousYarnrcFiles: config.extraneousYarnrcFiles + }); + }); + + return function updateCwd(_x) { + return _ref2.apply(this, arguments); + }; +}(); + +var getBins = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + // build up list of registry folders to search for binaries + var dirs = []; + for (var _iterator2 = (0, (_keys || _load_keys()).default)((_index || _load_index()).registries), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref4; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref4 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref4 = _i2.value; + } + + var registryName = _ref4; + + var registry = config.registries[registryName]; + dirs.push(registry.loc); + } + + // build up list of binary files + var paths = new (_set || _load_set()).default(); + for (var _iterator3 = dirs, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref5; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref5 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref5 = _i3.value; + } + + var dir = _ref5; + + var binDir = path.join(dir, '.bin'); + if (!(yield (_fs || _load_fs()).exists(binDir))) { + continue; + } + + for (var _iterator4 = yield (_fs || _load_fs()).readdir(binDir), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref6; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref6 = _i4.value; + } + + var name = _ref6; + + paths.add(path.join(binDir, name)); + } + } + return paths; + }); + + return function getBins(_x2) { + return _ref3.apply(this, arguments); + }; +}(); + +var getGlobalPrefix = function () { + var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags) { + if (flags.prefix) { + return flags.prefix; + } else if (config.getOption('prefix', true)) { + return String(config.getOption('prefix', true)); + } else if (process.env.PREFIX) { + return process.env.PREFIX; + } + + var potentialPrefixFolders = [(_constants || _load_constants()).FALLBACK_GLOBAL_PREFIX]; + if (process.platform === 'win32') { + // %LOCALAPPDATA%\Yarn --> C:\Users\Alice\AppData\Local\Yarn + if (process.env.LOCALAPPDATA) { + potentialPrefixFolders.unshift(path.join(process.env.LOCALAPPDATA, 'Yarn')); + } + } else { + potentialPrefixFolders.unshift((_constants || _load_constants()).POSIX_GLOBAL_PREFIX); + } + + var binFolders = potentialPrefixFolders.map(function (prefix) { + return path.join(prefix, 'bin'); + }); + var prefixFolderQueryResult = yield (_fs || _load_fs()).getFirstSuitableFolder(binFolders); + var prefix = prefixFolderQueryResult.folder && path.dirname(prefixFolderQueryResult.folder); + + if (!prefix) { + config.reporter.warn(config.reporter.lang('noGlobalFolder', prefixFolderQueryResult.skipped.map(function (item) { + return path.dirname(item.folder); + }).join(', '))); + + return (_constants || _load_constants()).FALLBACK_GLOBAL_PREFIX; + } + + return prefix; + }); + + return function getGlobalPrefix(_x3, _x4) { + return _ref7.apply(this, arguments); + }; +}(); + +var getBinFolder = exports.getBinFolder = function () { + var _ref8 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, flags) { + var prefix = yield getGlobalPrefix(config, flags); + return path.resolve(prefix, 'bin'); + }); + + return function getBinFolder(_x5, _x6) { + return _ref8.apply(this, arguments); + }; +}(); + +var initUpdateBins = function () { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags) { + var beforeBins = yield getBins(config); + var binFolder = yield getBinFolder(config, flags); + + function throwPermError(err, dest) { + if (err.code === 'EACCES') { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noPermission', dest)); + } else { + throw err; + } + } + + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + try { + yield (_fs || _load_fs()).mkdirp(binFolder); + } catch (err) { + throwPermError(err, binFolder); + } + + var afterBins = yield getBins(config); + + // remove old bins + for (var _iterator5 = beforeBins, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { + var _ref11; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref11 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref11 = _i5.value; + } + + var src = _ref11; + + if (afterBins.has(src)) { + // not old + continue; + } + + // remove old bin + var dest = path.join(binFolder, path.basename(src)); + try { + yield (_fs || _load_fs()).unlink(dest); + } catch (err) { + throwPermError(err, dest); + } + } + + // add new bins + for (var _iterator6 = afterBins, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { + var _ref12; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref12 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref12 = _i6.value; + } + + var _src = _ref12; + + // insert new bin + var dest = path.join(binFolder, path.basename(_src)); + try { + yield (_fs || _load_fs()).unlink(dest); + yield (0, (_packageLinker || _load_packageLinker()).linkBin)(_src, dest); + if (process.platform === 'win32' && dest.indexOf('.cmd') !== -1) { + yield (_fs || _load_fs()).rename(dest + '.cmd', dest); + } + } catch (err) { + throwPermError(err, dest); + } + } + }); + }); + + return function initUpdateBins(_x7, _x8, _x9) { + return _ref9.apply(this, arguments); + }; +}(); + +var list = function () { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + yield updateCwd(config); + + // install so we get hard file paths + var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.cwd); + var install = new (_install || _load_install()).Install({}, config, new (_baseReporter || _load_baseReporter()).default(), lockfile); + var patterns = yield install.getFlattenedDeps(); + + // dump global modules + for (var _iterator7 = patterns, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { + var _ref14; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref14 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref14 = _i7.value; + } + + var pattern = _ref14; + + var manifest = install.resolver.getStrictResolvedPattern(pattern); + ls(manifest, reporter, false); + } + }); + + return function list(_x10, _x11, _x12, _x13) { + return _ref13.apply(this, arguments); + }; +}(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _index; + +function _load_index() { + return _index = __webpack_require__(59); +} + +var _baseReporter; + +function _load_baseReporter() { + return _baseReporter = _interopRequireDefault(__webpack_require__(95)); +} + +var _buildSubCommands2; + +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(24)); +} + +var _install; + +function _load_install() { + return _install = __webpack_require__(40); +} + +var _add; + +function _load_add() { + return _add = __webpack_require__(149); +} + +var _remove; + +function _load_remove() { + return _remove = __webpack_require__(293); +} + +var _upgrade; + +function _load_upgrade() { + return _upgrade = __webpack_require__(189); +} + +var _upgradeInteractive; + +function _load_upgradeInteractive() { + return _upgradeInteractive = __webpack_require__(296); +} + +var _packageLinker; + +function _load_packageLinker() { + return _packageLinker = __webpack_require__(192); +} + +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(14); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var GlobalAdd = function (_Add) { + (0, (_inherits2 || _load_inherits()).default)(GlobalAdd, _Add); + + function GlobalAdd(args, flags, config, reporter, lockfile) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, GlobalAdd); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Add.call(this, args, flags, config, reporter, lockfile)); + + _this.linker.setTopLevelBinLinking(false); + return _this; + } + + GlobalAdd.prototype.maybeOutputSaveTree = function maybeOutputSaveTree() { + for (var _iterator = this.addedPatterns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var pattern = _ref; + + var manifest = this.resolver.getStrictResolvedPattern(pattern); + ls(manifest, this.reporter, true); + } + return (_promise || _load_promise()).default.resolve(); + }; + + GlobalAdd.prototype._logSuccessSaveLockfile = function _logSuccessSaveLockfile() { + // noop + }; + + return GlobalAdd; +}((_add || _load_add()).Add); + +var path = __webpack_require__(2); + +function hasWrapper(flags, args) { + return args[0] !== 'bin' && args[0] !== 'dir'; +} + +function ls(manifest, reporter, saved) { + var bins = manifest.bin ? (0, (_keys || _load_keys()).default)(manifest.bin) : []; + var human = `${manifest.name}@${manifest.version}`; + if (bins.length) { + if (saved) { + reporter.success(reporter.lang('packageInstalledWithBinaries', human)); + } else { + reporter.info(reporter.lang('packageHasBinaries', human)); + } + reporter.list(`bins-${manifest.name}`, bins); + } else if (saved) { + reporter.warn(reporter.lang('packageHasNoBinaries', human)); + } +} + +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('global', { + add(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield updateCwd(config); + + var updateBins = yield initUpdateBins(config, reporter, flags); + if (args.indexOf('yarn') !== -1) { + reporter.warn(reporter.lang('packageContainsYarnAsGlobal')); + } + + // install module + var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.cwd); + var install = new GlobalAdd(args, flags, config, reporter, lockfile); + yield install.init(); + + // link binaries + yield updateBins(); + })(); + }, + + bin(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + reporter.log((yield getBinFolder(config, flags)), { force: true }); + })(); + }, + + dir(config, reporter, flags, args) { + reporter.log(config.globalFolder, { force: true }); + return (_promise || _load_promise()).default.resolve(); + }, + + ls(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + reporter.warn(`\`yarn global ls\` is deprecated. Please use \`yarn global list\`.`); + yield list(config, reporter, flags, args); + })(); + }, + + list(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield list(config, reporter, flags, args); + })(); + }, + + remove(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield updateCwd(config); + + var updateBins = yield initUpdateBins(config, reporter, flags); + + // remove module + yield (0, (_remove || _load_remove()).run)(config, reporter, flags, args); + + // remove binaries + yield updateBins(); + })(); + }, + + upgrade(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield updateCwd(config); + + var updateBins = yield initUpdateBins(config, reporter, flags); + + // upgrade module + yield (0, (_upgrade || _load_upgrade()).run)(config, reporter, flags, args); + + // update binaries + yield updateBins(); + })(); + }, + + upgradeInteractive(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield updateCwd(config); + + var updateBins = yield initUpdateBins(config, reporter, flags); + + // upgrade module + yield (0, (_upgradeInteractive || _load_upgradeInteractive()).run)(config, reporter, flags, args); + + // update binaries + yield updateBins(); + })(); + } +}), + run = _buildSubCommands.run, + _setFlags = _buildSubCommands.setFlags; + +exports.run = run; +function setFlags(commander) { + _setFlags(commander); + commander.description('Installs packages globally on your operating system.'); + commander.option('--prefix ', 'bin prefix to use to install binaries'); + commander.option('--latest', 'upgrade to the latest version of packages'); +} + +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _assign; + +function _load_assign() { + return _assign = _interopRequireDefault(__webpack_require__(23)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _path; + +function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(2)); +} + +var _invariant; + +function _load_invariant() { + return _invariant = _interopRequireDefault(__webpack_require__(13)); +} + +var _semver; + +function _load_semver() { + return _semver = _interopRequireDefault(__webpack_require__(26)); +} + +var _validate; + +function _load_validate() { + return _validate = __webpack_require__(116); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(24)); +} + +var _packageReference; + +function _load_packageReference() { + return _packageReference = _interopRequireDefault(__webpack_require__(301)); +} + +var _index; + +function _load_index() { + return _index = __webpack_require__(62); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(14)); +} + +var _version; + +function _load_version() { + return _version = _interopRequireWildcard(__webpack_require__(204)); +} + +var _workspaceResolver; + +function _load_workspaceResolver() { + return _workspaceResolver = _interopRequireDefault(__webpack_require__(549)); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _normalizePattern4; + +function _load_normalizePattern() { + return _normalizePattern4 = __webpack_require__(51); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var micromatch = __webpack_require__(102); + +var PackageRequest = function () { + function PackageRequest(req, resolver) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, PackageRequest); + + this.parentRequest = req.parentRequest; + this.parentNames = req.parentNames || []; + this.lockfile = resolver.lockfile; + this.registry = req.registry; + this.reporter = resolver.reporter; + this.resolver = resolver; + this.optional = req.optional; + this.hint = req.hint; + this.pattern = req.pattern; + this.config = resolver.config; + this.foundInfo = null; + } + + PackageRequest.prototype.init = function init() { + this.resolver.usedRegistries.add(this.registry); + }; + + PackageRequest.prototype.getLocked = function getLocked(remoteType) { + // always prioritise root lockfile + var shrunk = this.lockfile.getLocked(this.pattern); + + if (shrunk && shrunk.resolved) { + var resolvedParts = (_version || _load_version()).explodeHashedUrl(shrunk.resolved); + + // Detect Git protocols (git://HOST/PATH or git+PROTOCOL://HOST/PATH) + var preferredRemoteType = /^git(\+[a-z0-9]+)?:\/\//.test(resolvedParts.url) ? 'git' : remoteType; + + return { + name: shrunk.name, + version: shrunk.version, + _uid: shrunk.uid, + _remote: { + resolved: shrunk.resolved, + type: preferredRemoteType, + reference: resolvedParts.url, + hash: resolvedParts.hash, + integrity: shrunk.integrity, + registry: shrunk.registry, + packageName: shrunk.name + }, + optionalDependencies: shrunk.optionalDependencies || {}, + dependencies: shrunk.dependencies || {}, + prebuiltVariants: shrunk.prebuiltVariants || {} + }; + } else { + return null; + } + }; + + /** + * If the input pattern matches a registry one then attempt to find it on the registry. + * Otherwise fork off to an exotic resolver if one matches. + */ + + PackageRequest.prototype.findVersionOnRegistry = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pattern) { + var _ref2 = yield this.normalize(pattern), + range = _ref2.range, + name = _ref2.name; + + var exoticResolver = (0, (_index || _load_index()).getExoticResolver)(range); + if (exoticResolver) { + var data = yield this.findExoticVersionInfo(exoticResolver, range); + + // clone data as we're manipulating it in place and this could be resolved multiple + // times + data = (0, (_assign || _load_assign()).default)({}, data); + + // this is so the returned package response uses the overridden name. ie. if the + // package's actual name is `bar`, but it's been specified in the manifest like: + // "foo": "http://foo.com/bar.tar.gz" + // then we use the foo name + data.name = name; + return data; + } + + var Resolver = this.getRegistryResolver(); + var resolver = new Resolver(this, name, range); + try { + return yield resolver.resolve(); + } catch (err) { + // if it is not an error thrown by yarn and it has a parent request, + // thow a more readable error + if (!(err instanceof (_errors || _load_errors()).MessageError) && this.parentRequest && this.parentRequest.pattern) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('requiredPackageNotFoundRegistry', pattern, this.parentRequest.pattern, this.registry)); + } + throw err; + } + }); + + function findVersionOnRegistry(_x) { + return _ref.apply(this, arguments); + } + + return findVersionOnRegistry; + }(); + + /** + * Get the registry resolver associated with this package request. + */ + + PackageRequest.prototype.getRegistryResolver = function getRegistryResolver() { + var Resolver = (_index || _load_index()).registries[this.registry]; + if (Resolver) { + return Resolver; + } else { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('unknownRegistryResolver', this.registry)); + } + }; + + PackageRequest.prototype.normalizeRange = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pattern) { + if (pattern.indexOf(':') > -1 || pattern.indexOf('@') > -1 || (0, (_index || _load_index()).getExoticResolver)(pattern)) { + return pattern; + } + + if (!(_semver || _load_semver()).default.validRange(pattern)) { + try { + if (yield (_fs || _load_fs()).exists((_path || _load_path()).default.join(this.config.cwd, pattern, (_constants || _load_constants()).NODE_PACKAGE_JSON))) { + this.reporter.warn(this.reporter.lang('implicitFileDeprecated', pattern)); + return `file:${pattern}`; + } + } catch (err) { + // pass + } + } + + return pattern; + }); + + function normalizeRange(_x2) { + return _ref3.apply(this, arguments); + } + + return normalizeRange; + }(); + + PackageRequest.prototype.normalize = function () { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pattern) { + var _normalizePattern = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(pattern), + name = _normalizePattern.name, + range = _normalizePattern.range, + hasVersion = _normalizePattern.hasVersion; + + var newRange = yield this.normalizeRange(range); + return { name, range: newRange, hasVersion }; + }); + + function normalize(_x3) { + return _ref4.apply(this, arguments); + } + + return normalize; + }(); + + /** + * Construct an exotic resolver instance with the input `ExoticResolver` and `range`. + */ + + PackageRequest.prototype.findExoticVersionInfo = function findExoticVersionInfo(ExoticResolver, range) { + var resolver = new ExoticResolver(this, range); + return resolver.resolve(); + }; + + /** + * If the current pattern matches an exotic resolver then delegate to it or else try + * the registry. + */ + + PackageRequest.prototype.findVersionInfo = function () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var exoticResolver = (0, (_index || _load_index()).getExoticResolver)(this.pattern); + if (exoticResolver) { + return this.findExoticVersionInfo(exoticResolver, this.pattern); + } else if ((_workspaceResolver || _load_workspaceResolver()).default.isWorkspace(this.pattern, this.resolver.workspaceLayout)) { + (0, (_invariant || _load_invariant()).default)(this.resolver.workspaceLayout, 'expected workspaceLayout'); + var resolver = new (_workspaceResolver || _load_workspaceResolver()).default(this, this.pattern, this.resolver.workspaceLayout); + var manifest = void 0; + if (this.config.focus && !(this.pattern.indexOf(this.resolver.workspaceLayout.virtualManifestName) !== -1) && !this.pattern.startsWith(this.config.focusedWorkspaceName + '@')) { + var localInfo = this.resolver.workspaceLayout.getManifestByPattern(this.pattern); + (0, (_invariant || _load_invariant()).default)(localInfo, 'expected local info for ' + this.pattern); + var localManifest = localInfo.manifest; + var requestPattern = localManifest.name + '@' + localManifest.version; + manifest = yield this.findVersionOnRegistry(requestPattern); + } + return resolver.resolve(manifest); + } else { + return this.findVersionOnRegistry(this.pattern); + } + }); + + function findVersionInfo() { + return _ref5.apply(this, arguments); + } + + return findVersionInfo; + }(); + + PackageRequest.prototype.reportResolvedRangeMatch = function reportResolvedRangeMatch(info, resolved) {}; + + /** + * Do the final resolve of a package that had a match with an existing version. + * After all unique versions have been discovered, so the best available version + * is found. + */ + + + PackageRequest.prototype.resolveToExistingVersion = function resolveToExistingVersion(info) { + // get final resolved version + var _normalizePattern2 = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(this.pattern), + range = _normalizePattern2.range, + name = _normalizePattern2.name; + + var solvedRange = (_semver || _load_semver()).default.validRange(range) ? info.version : range; + var resolved = this.resolver.getHighestRangeVersionMatch(name, solvedRange, info); + (0, (_invariant || _load_invariant()).default)(resolved, 'should have a resolved reference'); + + this.reportResolvedRangeMatch(info, resolved); + var ref = resolved._reference; + (0, (_invariant || _load_invariant()).default)(ref, 'Resolved package info has no package reference'); + ref.addRequest(this); + ref.addPattern(this.pattern, resolved); + ref.addOptional(this.optional); + }; + + /** + * TODO description + */ + + + PackageRequest.prototype.find = function () { + var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref7) { + var fresh = _ref7.fresh, + frozen = _ref7.frozen; + + // find version info for this package pattern + var info = yield this.findVersionInfo(); + + if (!(_semver || _load_semver()).default.valid(info.version)) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('invalidPackageVersion', info.name, info.version)); + } + + info.fresh = fresh; + (0, (_validate || _load_validate()).cleanDependencies)(info, false, this.reporter, function () { + // swallow warnings + }); + + // check if while we were resolving this dep we've already resolved one that satisfies + // the same range + + var _normalizePattern3 = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(this.pattern), + range = _normalizePattern3.range, + name = _normalizePattern3.name; + + var solvedRange = (_semver || _load_semver()).default.validRange(range) ? info.version : range; + var resolved = !info.fresh || frozen ? this.resolver.getExactVersionMatch(name, solvedRange, info) : this.resolver.getHighestRangeVersionMatch(name, solvedRange, info); + + if (resolved) { + this.resolver.reportPackageWithExistingVersion(this, info); + return; + } + + if (info.flat && !this.resolver.flat) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('flatGlobalError', `${info.name}@${info.version}`)); + } + + // validate version info + PackageRequest.validateVersionInfo(info, this.reporter); + + // + var remote = info._remote; + (0, (_invariant || _load_invariant()).default)(remote, 'Missing remote'); + + // set package reference + var ref = new (_packageReference || _load_packageReference()).default(this, info, remote); + ref.addPattern(this.pattern, info); + ref.addOptional(this.optional); + ref.setFresh(fresh); + info._reference = ref; + info._remote = remote; + // start installation of dependencies + var promises = []; + var deps = []; + var parentNames = [].concat(this.parentNames, [name]); + // normal deps + for (var depName in info.dependencies) { + var depPattern = depName + '@' + info.dependencies[depName]; + deps.push(depPattern); + promises.push(this.resolver.find({ + pattern: depPattern, + registry: remote.registry, + // dependencies of optional dependencies should themselves be optional + optional: this.optional, + parentRequest: this, + parentNames + })); + } + + // optional deps + for (var _depName in info.optionalDependencies) { + var _depPattern = _depName + '@' + info.optionalDependencies[_depName]; + deps.push(_depPattern); + promises.push(this.resolver.find({ + hint: 'optional', + pattern: _depPattern, + registry: remote.registry, + optional: true, + parentRequest: this, + parentNames + })); + } + if (remote.type === 'workspace' && !this.config.production) { + // workspaces support dev dependencies + for (var _depName2 in info.devDependencies) { + var _depPattern2 = _depName2 + '@' + info.devDependencies[_depName2]; + deps.push(_depPattern2); + promises.push(this.resolver.find({ + hint: 'dev', + pattern: _depPattern2, + registry: remote.registry, + optional: false, + parentRequest: this, + parentNames + })); + } + } + + for (var _iterator = promises, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref8; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref8 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref8 = _i.value; + } + + var promise = _ref8; + + yield promise; + } + + ref.addDependencies(deps); + + // Now that we have all dependencies, it's safe to propagate optional + for (var _iterator2 = ref.requests.slice(1), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref9; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref9 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref9 = _i2.value; + } + + var otherRequest = _ref9; + + ref.addOptional(otherRequest.optional); + } + }); + + function find(_x4) { + return _ref6.apply(this, arguments); + } + + return find; + }(); + + /** + * TODO description + */ + + PackageRequest.validateVersionInfo = function validateVersionInfo(info, reporter) { + // human readable name to use in errors + var human = `${info.name}@${info.version}`; + + info.version = PackageRequest.getPackageVersion(info); + + for (var _iterator3 = (_constants || _load_constants()).REQUIRED_PACKAGE_KEYS, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref10; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref10 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref10 = _i3.value; + } + + var key = _ref10; + + if (!info[key]) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('missingRequiredPackageKey', human, key)); + } + } + }; + + /** + * Returns the package version if present, else defaults to the uid + */ + + PackageRequest.getPackageVersion = function getPackageVersion(info) { + // TODO possibly reconsider this behaviour + return info.version === undefined ? info._uid : info.version; + }; + + /** + * Gets all of the outdated packages and sorts them appropriately + */ + + PackageRequest.getOutdatedPackages = function () { + var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (lockfile, install, config, reporter, filterByPatterns, flags) { + var _ref12 = yield install.fetchRequestFromCwd(), + reqPatterns = _ref12.requests, + workspaceLayout = _ref12.workspaceLayout; + + // Filter out workspace patterns if necessary + + + var depReqPatterns = workspaceLayout ? reqPatterns.filter(function (p) { + return !workspaceLayout.getManifestByPattern(p.pattern); + }) : reqPatterns; + + // filter the list down to just the packages requested. + // prevents us from having to query the metadata for all packages. + if (filterByPatterns && filterByPatterns.length || flags && flags.pattern) { + var filterByNames = filterByPatterns && filterByPatterns.length ? filterByPatterns.map(function (pattern) { + return (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(pattern).name; + }) : []; + depReqPatterns = depReqPatterns.filter(function (dep) { + return filterByNames.indexOf((0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(dep.pattern).name) >= 0 || flags && flags.pattern && micromatch.contains((0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(dep.pattern).name, flags.pattern); + }); + } + + var deps = yield (_promise || _load_promise()).default.all(depReqPatterns.map(function () { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref14) { + var pattern = _ref14.pattern, + hint = _ref14.hint, + workspaceName = _ref14.workspaceName, + workspaceLoc = _ref14.workspaceLoc; + + var locked = lockfile.getLocked(pattern); + if (!locked) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('lockfileOutdated')); + } + + var name = locked.name, + current = locked.version; + + var latest = ''; + var wanted = ''; + var url = ''; + + var normalized = (0, (_normalizePattern4 || _load_normalizePattern()).normalizePattern)(pattern); + + if ((0, (_index || _load_index()).getExoticResolver)(pattern) || (0, (_index || _load_index()).getExoticResolver)(normalized.range)) { + latest = wanted = 'exotic'; + url = normalized.range; + } else { + var registry = config.registries[locked.registry]; + + var _ref15 = yield registry.checkOutdated(config, name, normalized.range); + + latest = _ref15.latest; + wanted = _ref15.wanted; + url = _ref15.url; + } + + return { + name, + current, + wanted, + latest, + url, + hint, + range: normalized.range, + upgradeTo: '', + workspaceName: workspaceName || '', + workspaceLoc: workspaceLoc || '' + }; + }); + + return function (_x11) { + return _ref13.apply(this, arguments); + }; + }())); + + // Make sure to always output `exotic` versions to be compatible with npm + var isDepOld = function isDepOld(_ref16) { + var current = _ref16.current, + latest = _ref16.latest, + wanted = _ref16.wanted; + return latest === 'exotic' || (_semver || _load_semver()).default.lt(current, wanted) || (_semver || _load_semver()).default.lt(current, latest); + }; + var orderByName = function orderByName(depA, depB) { + return depA.name.localeCompare(depB.name); + }; + return deps.filter(isDepOld).sort(orderByName); + }); + + function getOutdatedPackages(_x5, _x6, _x7, _x8, _x9, _x10) { + return _ref11.apply(this, arguments); + } + + return getOutdatedPackages; + }(); + + return PackageRequest; +}(); + +exports.default = PackageRequest; + +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var BaseResolver = function () { + function BaseResolver(request, fragment) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BaseResolver); + + this.resolver = request.resolver; + this.reporter = request.reporter; + this.fragment = fragment; + this.registry = request.registry; + this.request = request; + this.pattern = request.pattern; + this.config = request.config; + } + + BaseResolver.prototype.fork = function fork(Resolver, resolveArg) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + var resolver = new (Function.prototype.bind.apply(Resolver, [null].concat([this.request], args)))(); + resolver.registry = this.registry; + return resolver.resolve(resolveArg); + }; + + BaseResolver.prototype.resolve = function resolve(resolveArg) { + throw new Error('Not implemented'); + }; + + return BaseResolver; +}(); + +exports.default = BaseResolver; + +/***/ }), +/* 114 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +var _index; + +function _load_index() { + return _index = __webpack_require__(62); +} + +var _misc; + +function _load_misc() { + return _misc = _interopRequireWildcard(__webpack_require__(27)); +} + +var _version; + +function _load_version() { + return _version = _interopRequireWildcard(__webpack_require__(204)); +} + +var _guessName; + +function _load_guessName() { + return _guessName = _interopRequireDefault(__webpack_require__(154)); +} + +var _index2; + +function _load_index2() { + return _index2 = __webpack_require__(59); +} + +var _exoticResolver; + +function _load_exoticResolver() { + return _exoticResolver = _interopRequireDefault(__webpack_require__(84)); +} + +var _git; + +function _load_git() { + return _git = _interopRequireDefault(__webpack_require__(199)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var urlParse = __webpack_require__(29).parse; + +var GIT_HOSTS = ['github.com', 'gitlab.com', 'bitbucket.com', 'bitbucket.org']; + +var GIT_PATTERN_MATCHERS = [/^git:/, /^git\+.+:/, /^ssh:/, /^https?:.+\.git$/, /^https?:.+\.git#.+/]; + +var GitResolver = function (_ExoticResolver) { + (0, (_inherits2 || _load_inherits()).default)(GitResolver, _ExoticResolver); + + function GitResolver(request, fragment) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, GitResolver); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _ExoticResolver.call(this, request, fragment)); + + var _versionUtil$explodeH = (_version || _load_version()).explodeHashedUrl(fragment), + url = _versionUtil$explodeH.url, + hash = _versionUtil$explodeH.hash; + + _this.url = url; + _this.hash = hash; + return _this; + } + + GitResolver.isVersion = function isVersion(pattern) { + for (var _iterator = GIT_PATTERN_MATCHERS, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var matcher = _ref; + + if (matcher.test(pattern)) { + return true; + } + } + + var _urlParse = urlParse(pattern), + hostname = _urlParse.hostname, + path = _urlParse.path; + + if (hostname && path && GIT_HOSTS.indexOf(hostname) >= 0) { + // only if dependency is pointing to a git repo, + // e.g. facebook/flow and not file in a git repo facebook/flow/archive/v1.0.0.tar.gz + return path.split('/').filter(function (p) { + return !!p; + }).length === 2; + } + + return false; + }; + + GitResolver.prototype.resolve = function () { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (forked) { + var tryRegistry = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (registry) { + var filename = (_index2 || _load_index2()).registries[registry].filename; + + var file = yield client.getFile(filename); + if (!file) { + return null; + } + + var json = yield config.readJson(`${url}/${filename}`, function () { + return JSON.parse(file); + }); + json._uid = commit; + json._remote = { + resolved: `${url}#${commit}`, + type: 'git', + reference: url, + hash: commit, + registry + }; + return json; + }); + + return function tryRegistry(_x2) { + return _ref3.apply(this, arguments); + }; + }(); + + var url = this.url; + + // shortcut for hosted git. we will fallback to a GitResolver if the hosted git + // optimisations fail which the `forked` flag indicates so we don't get into an + // infinite loop + + var parts = urlParse(url); + if (false) { + // check if this git url uses any of the hostnames defined in our hosted git resolvers + for (var name in (_index || _load_index()).hostedGit) { + var Resolver = (_index || _load_index()).hostedGit[name]; + if (Resolver.hostname !== parts.hostname) { + continue; + } + + // we have a match! clean up the pathname of url artifacts + var pathname = parts.pathname; + pathname = (_misc || _load_misc()).removePrefix(pathname, '/'); // remove prefixed slash + pathname = (_misc || _load_misc()).removeSuffix(pathname, '.git'); // remove .git suffix if present + + var _url = `${pathname}${this.hash ? '#' + decodeURIComponent(this.hash) : ''}`; + return this.fork(Resolver, false, _url); + } + } + + // get from lockfile + var shrunk = this.request.getLocked('git'); + if (shrunk) { + return shrunk; + } + + var config = this.config; + + + var gitUrl = (_git || _load_git()).default.npmUrlToGitUrl(url); + var client = new (_git || _load_git()).default(config, gitUrl, this.hash); + var commit = yield client.init(); + + var file = yield tryRegistry(this.registry); + if (file) { + return file; + } + + for (var registry in (_index2 || _load_index2()).registries) { + if (registry === this.registry) { + continue; + } + + var _file = yield tryRegistry(registry); + if (_file) { + return _file; + } + } + + return { + // This is just the default, it can be overridden with key of dependencies + name: (0, (_guessName || _load_guessName()).default)(url), + version: '0.0.0', + _uid: commit, + _remote: { + resolved: `${url}#${commit}`, + type: 'git', + reference: url, + hash: commit, + registry: 'npm' + } + }; + }); + + function resolve(_x) { + return _ref2.apply(this, arguments); + } + + return resolve; + }(); + + return GitResolver; +}((_exoticResolver || _load_exoticResolver()).default); + +exports.default = GitResolver; + +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.execCommand = exports.execFromManifest = exports.executeLifecycleScript = exports.makeEnv = exports.getWrappersFolder = exports.IGNORE_MANIFEST_KEYS = undefined; + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _from; + +function _load_from() { + return _from = _interopRequireDefault(__webpack_require__(52)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +var _assign; + +function _load_assign() { + return _assign = _interopRequireDefault(__webpack_require__(23)); +} + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var getWrappersFolder = exports.getWrappersFolder = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + if (wrappersFolder) { + return wrappersFolder; + } + + wrappersFolder = yield (_fs || _load_fs()).makeTempDir(); + + yield (0, (_portableScript || _load_portableScript()).makePortableProxyScript)(process.execPath, wrappersFolder, { + proxyBasename: 'node' + }); + + yield (0, (_portableScript || _load_portableScript()).makePortableProxyScript)(process.execPath, wrappersFolder, { + proxyBasename: 'yarn', + prependArguments: [process.argv[1]] + }); + + return wrappersFolder; + }); + + return function getWrappersFolder(_x) { + return _ref.apply(this, arguments); + }; +}(); + +var makeEnv = exports.makeEnv = function () { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (stage, cwd, config) { + var env = (0, (_extends2 || _load_extends()).default)({ + NODE: process.execPath, + INIT_CWD: process.cwd() + }, process.env); + + // Merge in the `env` object specified in .yarnrc + var customEnv = config.getOption('env'); + if (customEnv && typeof customEnv === 'object') { + (0, (_assign || _load_assign()).default)(env, customEnv); + } + + env.npm_lifecycle_event = stage; + env.npm_node_execpath = env.NODE; + env.npm_execpath = env.npm_execpath || process.mainModule && process.mainModule.filename; + + // Set the env to production for npm compat if production mode. + // https://github.com/npm/npm/blob/30d75e738b9cb7a6a3f9b50e971adcbe63458ed3/lib/utils/lifecycle.js#L336 + if (config.production) { + env.NODE_ENV = 'production'; + } + + // Note: npm_config_argv environment variable contains output of nopt - command-line + // parser used by npm. Since we use other parser, we just roughly emulate it's output. (See: #684) + env.npm_config_argv = (0, (_stringify || _load_stringify()).default)({ + remain: [], + cooked: config.commandName === 'run' ? [config.commandName, stage] : [config.commandName], + original: process.argv.slice(2) + }); + + var manifest = yield config.maybeReadManifest(cwd); + if (manifest) { + if (manifest.scripts && Object.prototype.hasOwnProperty.call(manifest.scripts, stage)) { + env.npm_lifecycle_script = manifest.scripts[stage]; + } + + // add npm_package_* + var queue = [['', manifest]]; + while (queue.length) { + var _queue$pop = queue.pop(), + _key = _queue$pop[0], + val = _queue$pop[1]; + + if (typeof val === 'object') { + for (var subKey in val) { + var fullKey = [_key, subKey].filter(Boolean).join('_'); + if (fullKey && fullKey[0] !== '_' && !IGNORE_MANIFEST_KEYS.has(fullKey)) { + queue.push([fullKey, val[subKey]]); + } + } + } else { + var cleanVal = String(val); + if (cleanVal.indexOf('\n') >= 0) { + cleanVal = (0, (_stringify || _load_stringify()).default)(cleanVal); + } + + //replacing invalid chars with underscore + var cleanKey = _key.replace(INVALID_CHAR_REGEX, '_'); + + env[`npm_package_${cleanKey}`] = cleanVal; + } + } + } + + // add npm_config_* and npm_package_config_* from yarn config + var keys = new (_set || _load_set()).default([].concat((0, (_keys || _load_keys()).default)(config.registries.yarn.config), (0, (_keys || _load_keys()).default)(config.registries.npm.config))); + var cleaned = (0, (_from || _load_from()).default)(keys).filter(function (key) { + return !key.match(/:_/) && IGNORE_CONFIG_KEYS.indexOf(key) === -1; + }).map(function (key) { + var val = config.getOption(key); + if (!val) { + val = ''; + } else if (typeof val === 'number') { + val = '' + val; + } else if (typeof val !== 'string') { + val = (0, (_stringify || _load_stringify()).default)(val); + } + + if (val.indexOf('\n') >= 0) { + val = (0, (_stringify || _load_stringify()).default)(val); + } + return [key, val]; + }); + // add npm_config_* + for (var _iterator = cleaned, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref4; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref4 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref4 = _i.value; + } + + var _ref3 = _ref4; + var _key2 = _ref3[0]; + var _val = _ref3[1]; + + var _cleanKey = _key2.replace(/^_+/, ''); + var envKey = `npm_config_${_cleanKey}`.replace(INVALID_CHAR_REGEX, '_'); + env[envKey] = _val; + } + // add npm_package_config_* + if (manifest && manifest.name) { + var packageConfigPrefix = `${manifest.name}:`; + for (var _iterator2 = cleaned, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref6; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref6 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref6 = _i2.value; + } + + var _ref5 = _ref6; + var _key3 = _ref5[0]; + var _val2 = _ref5[1]; + + if (_key3.indexOf(packageConfigPrefix) !== 0) { + continue; + } + var _cleanKey2 = _key3.replace(/^_+/, '').replace(packageConfigPrefix, ''); + var envKey = `npm_package_config_${_cleanKey2}`.replace(INVALID_CHAR_REGEX, '_'); + env[envKey] = _val2; + } + } + + // split up the path + var envPath = env[(_constants || _load_constants()).ENV_PATH_KEY]; + var pathParts = envPath ? envPath.split(path.delimiter) : []; + + // Include the directory that contains node so that we can guarantee that the scripts + // will always run with the exact same Node release than the one use to run Yarn + var execBin = path.dirname(process.execPath); + if (pathParts.indexOf(execBin) === -1) { + pathParts.unshift(execBin); + } + + // Include node-gyp version that was bundled with the current Node.js version, + // if available. + pathParts.unshift(path.join(path.dirname(process.execPath), 'node_modules', 'npm', 'bin', 'node-gyp-bin')); + pathParts.unshift(path.join(path.dirname(process.execPath), '..', 'lib', 'node_modules', 'npm', 'bin', 'node-gyp-bin')); + // Include node-gyp version from homebrew managed npm, if available. + pathParts.unshift(path.join(path.dirname(process.execPath), '..', 'libexec', 'lib', 'node_modules', 'npm', 'bin', 'node-gyp-bin')); + + // Add global bin folder if it is not present already, as some packages depend + // on a globally-installed version of node-gyp. + var globalBin = yield (0, (_global || _load_global()).getBinFolder)(config, {}); + if (pathParts.indexOf(globalBin) === -1) { + pathParts.unshift(globalBin); + } + + // Add node_modules .bin folders to the PATH + for (var _iterator3 = (0, (_keys || _load_keys()).default)((_index || _load_index()).registries), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref7; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref7 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref7 = _i3.value; + } + + var registry = _ref7; + + var binFolder = path.join(config.registries[registry].folder, '.bin'); + if (config.workspacesEnabled && config.workspaceRootFolder) { + pathParts.unshift(path.join(config.workspaceRootFolder, binFolder)); + } + pathParts.unshift(path.join(config.linkFolder, binFolder)); + pathParts.unshift(path.join(cwd, binFolder)); + if (config.modulesFolder) { + pathParts.unshift(path.join(config.modulesFolder, '.bin')); + } + } + + var pnpFile = void 0; + + if (process.versions.pnp) { + pnpFile = (_dynamicRequire || _load_dynamicRequire()).dynamicRequire.resolve('pnpapi'); + } else { + var candidate = `${config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`; + if (yield (_fs || _load_fs()).exists(candidate)) { + pnpFile = candidate; + } + } + + if (pnpFile) { + var pnpApi = (0, (_dynamicRequire || _load_dynamicRequire()).dynamicRequire)(pnpFile); + + var packageLocator = pnpApi.findPackageLocator(`${cwd}/`); + var packageInformation = pnpApi.getPackageInformation(packageLocator); + + for (var _iterator4 = packageInformation.packageDependencies.entries(), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref9; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref9 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref9 = _i4.value; + } + + var _ref8 = _ref9; + var name = _ref8[0]; + var reference = _ref8[1]; + + var dependencyInformation = pnpApi.getPackageInformation({ name, reference }); + + if (!dependencyInformation || !dependencyInformation.packageLocation) { + continue; + } + + var binFolder = `${dependencyInformation.packageLocation}/.bin`; + if (yield (_fs || _load_fs()).exists(binFolder)) { + pathParts.unshift(binFolder); + } + } + + // Note that NODE_OPTIONS doesn't support any style of quoting its arguments at the moment + // For this reason, it won't work if the user has a space inside its $PATH + env.NODE_OPTIONS = env.NODE_OPTIONS || ''; + env.NODE_OPTIONS += ` --require ${pnpFile}`; + } + + pathParts.unshift((yield getWrappersFolder(config))); + + // join path back together + env[(_constants || _load_constants()).ENV_PATH_KEY] = pathParts.join(path.delimiter); + + return env; + }); + + return function makeEnv(_x2, _x3, _x4) { + return _ref2.apply(this, arguments); + }; +}(); + +var executeLifecycleScript = exports.executeLifecycleScript = function () { + var _ref10 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref11) { + var stage = _ref11.stage, + config = _ref11.config, + cwd = _ref11.cwd, + cmd = _ref11.cmd, + isInteractive = _ref11.isInteractive, + onProgress = _ref11.onProgress, + customShell = _ref11.customShell; + + var env = yield makeEnv(stage, cwd, config); + + yield checkForGypIfNeeded(config, cmd, env[(_constants || _load_constants()).ENV_PATH_KEY].split(path.delimiter)); + + if (process.platform === 'win32' && (!customShell || customShell === 'cmd')) { + // handle windows run scripts starting with a relative path + cmd = (0, (_fixCmdWinSlashes || _load_fixCmdWinSlashes()).fixCmdWinSlashes)(cmd); + } + + // By default (non-interactive), pipe everything to the terminal and run child process detached + // as long as it's not Windows (since windows does not have /dev/tty) + var stdio = ['ignore', 'pipe', 'pipe']; + var detached = process.platform !== 'win32'; + + if (isInteractive) { + stdio = 'inherit'; + detached = false; + } + + var shell = customShell || true; + var stdout = yield (_child || _load_child()).spawn(cmd, [], { cwd, env, stdio, detached, shell }, onProgress); + + return { cwd, command: cmd, stdout }; + }); + + return function executeLifecycleScript(_x5) { + return _ref10.apply(this, arguments); + }; +}(); + +var _checkForGyp = function () { + var _ref12 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, paths) { + var reporter = config.reporter; + + // Check every directory in the PATH + + var allChecks = yield (_promise || _load_promise()).default.all(paths.map(function (dir) { + return (_fs || _load_fs()).exists(path.join(dir, 'node-gyp')); + })); + if (allChecks.some(Boolean)) { + // node-gyp is available somewhere + return; + } + + reporter.info(reporter.lang('packageRequiresNodeGyp')); + + try { + yield (0, (_global || _load_global()).run)(config, reporter, {}, ['add', 'node-gyp']); + } catch (e) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('nodeGypAutoInstallFailed', e.message)); + } + }); + + return function _checkForGyp(_x6, _x7) { + return _ref12.apply(this, arguments); + }; +}(); + +var execFromManifest = exports.execFromManifest = function () { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, commandName, cwd) { + var pkg = yield config.maybeReadManifest(cwd); + if (!pkg || !pkg.scripts) { + return; + } + + var cmd = pkg.scripts[commandName]; + if (cmd) { + yield execCommand({ stage: commandName, config, cmd, cwd, isInteractive: true }); + } + }); + + return function execFromManifest(_x8, _x9, _x10) { + return _ref13.apply(this, arguments); + }; +}(); + +var execCommand = exports.execCommand = function () { + var _ref14 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref15) { + var stage = _ref15.stage, + config = _ref15.config, + cmd = _ref15.cmd, + cwd = _ref15.cwd, + isInteractive = _ref15.isInteractive, + customShell = _ref15.customShell; + var reporter = config.reporter; + + try { + reporter.command(cmd); + yield executeLifecycleScript({ stage, config, cwd, cmd, isInteractive, customShell }); + return (_promise || _load_promise()).default.resolve(); + } catch (err) { + if (err instanceof (_errors || _load_errors()).ProcessTermError) { + throw new (_errors || _load_errors()).MessageError(err.EXIT_SIGNAL ? reporter.lang('commandFailedWithSignal', err.EXIT_SIGNAL) : reporter.lang('commandFailedWithCode', err.EXIT_CODE)); + } else { + throw err; + } + } + }); + + return function execCommand(_x11) { + return _ref14.apply(this, arguments); + }; +}(); + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(14)); +} + +var _child; + +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(60)); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _dynamicRequire; + +function _load_dynamicRequire() { + return _dynamicRequire = __webpack_require__(310); +} + +var _portableScript; + +function _load_portableScript() { + return _portableScript = __webpack_require__(316); +} + +var _index; + +function _load_index() { + return _index = __webpack_require__(62); +} + +var _fixCmdWinSlashes; + +function _load_fixCmdWinSlashes() { + return _fixCmdWinSlashes = __webpack_require__(556); +} + +var _global; + +function _load_global() { + return _global = __webpack_require__(111); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var path = __webpack_require__(2); + +var IGNORE_MANIFEST_KEYS = exports.IGNORE_MANIFEST_KEYS = new (_set || _load_set()).default(['readme', 'notice', 'licenseText']); + +// We treat these configs as internal, thus not expose them to process.env. +// This helps us avoid some gyp issues when building native modules. +// See https://github.com/yarnpkg/yarn/issues/2286. +var IGNORE_CONFIG_KEYS = ['lastUpdateCheck']; + +var wrappersFolder = null; + +var INVALID_CHAR_REGEX = /\W/g; + +exports.default = executeLifecycleScript; + + +var checkGypPromise = null; +/** + * Special case: Some packages depend on node-gyp, but don't specify this in + * their package.json dependencies. They assume that node-gyp is available + * globally. We need to detect this case and show an error message. + */ +function checkForGypIfNeeded(config, cmd, paths) { + if (cmd.substr(0, cmd.indexOf(' ')) !== 'node-gyp') { + return (_promise || _load_promise()).default.resolve(); + } + + // Ensure this only runs once, rather than multiple times in parallel. + if (!checkGypPromise) { + checkGypPromise = _checkForGyp(config, paths); + } + return checkGypPromise; +} + +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(41)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +exports.isValidPackageName = isValidPackageName; + +exports.default = function (info, isRoot, reporter, warn) { + if (isRoot) { + for (var key in (_typos || _load_typos()).default) { + if (key in info) { + warn(reporter.lang('manifestPotentialTypo', key, (_typos || _load_typos()).default[key])); + } + } + } + + // validate name + var name = info.name; + + if (typeof name === 'string') { + if (isRoot && isBuiltinModule(name)) { + warn(reporter.lang('manifestBuiltinModule', name)); + } + + // cannot start with a dot + if (name[0] === '.') { + throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestNameDot')); + } + + // cannot contain the following characters + if (!isValidPackageName(name)) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestNameIllegalChars')); + } + + // cannot equal node_modules or favicon.ico + var lower = name.toLowerCase(); + if (lower === 'node_modules' || lower === 'favicon.ico') { + throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestNameBlacklisted')); + } + } + + // validate license + if (isRoot && !info.private) { + if (typeof info.license === 'string') { + var license = info.license.replace(/\*$/g, ''); + if (!(0, (_util || _load_util()).isValidLicense)(license)) { + warn(reporter.lang('manifestLicenseInvalid')); + } + } else { + warn(reporter.lang('manifestLicenseNone')); + } + } + + // validate strings + for (var _iterator = strings, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _key = _ref; + + var val = info[_key]; + if (val && typeof val !== 'string') { + throw new (_errors || _load_errors()).MessageError(reporter.lang('manifestStringExpected', _key)); + } + } + + cleanDependencies(info, isRoot, reporter, warn); +}; + +exports.cleanDependencies = cleanDependencies; + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _util; + +function _load_util() { + return _util = __webpack_require__(201); +} + +var _typos; + +function _load_typos() { + return _typos = _interopRequireDefault(__webpack_require__(566)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isBuiltinModule = __webpack_require__(767); + +var strings = ['name', 'version']; + +var dependencyKeys = [ +// npm registry will include optionalDependencies in dependencies and we'll want to dedupe them from the +// other fields first +'optionalDependencies', + +// it's seemingly common to include a dependency in dependencies and devDependencies of the same name but +// different ranges, this can cause a lot of issues with our determinism and the behaviour of npm is +// currently unspecified. +'dependencies', 'devDependencies']; + +function isValidName(name) { + return !name.match(/[\/@\s\+%:]/) && encodeURIComponent(name) === name; +} + +function isValidScopedName(name) { + if (name[0] !== '@') { + return false; + } + + var parts = name.slice(1).split('/'); + return parts.length === 2 && isValidName(parts[0]) && isValidName(parts[1]); +} + +function isValidPackageName(name) { + return isValidName(name) || isValidScopedName(name); +} + +function cleanDependencies(info, isRoot, reporter, warn) { + // get dependency objects + var depTypes = []; + for (var _iterator2 = dependencyKeys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _type = _ref2; + + var deps = info[_type]; + if (!deps || typeof deps !== 'object') { + continue; + } + depTypes.push([_type, deps]); + } + + // aggregate all non-trivial deps (not '' or '*') + var nonTrivialDeps = new (_map || _load_map()).default(); + for (var _iterator3 = depTypes, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + var _ref3 = _ref4; + var _type2 = _ref3[0]; + var deps = _ref3[1]; + + for (var _iterator5 = (0, (_keys || _load_keys()).default)(deps), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { + var _ref7; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref7 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref7 = _i5.value; + } + + var name = _ref7; + + var _version = deps[name]; + if (!nonTrivialDeps.has(name) && _version && _version !== '*') { + nonTrivialDeps.set(name, { type: _type2, version: _version }); + } + } + } + + // overwrite first dep of package with non-trivial version, remove the rest + var setDeps = new (_set || _load_set()).default(); + for (var _iterator4 = depTypes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref6; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref6 = _i4.value; + } + + var _ref5 = _ref6; + var _type3 = _ref5[0]; + var _deps = _ref5[1]; + + for (var _iterator6 = (0, (_keys || _load_keys()).default)(_deps), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { + var _ref8; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref8 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref8 = _i6.value; + } + + var _name = _ref8; + + var _version2 = _deps[_name]; + + var dep = nonTrivialDeps.get(_name); + if (dep) { + if (_version2 && _version2 !== '*' && _version2 !== dep.version && isRoot) { + // only throw a warning when at the root + warn(reporter.lang('manifestDependencyCollision', dep.type, _name, dep.version, _type3, _version2)); + } + _version2 = dep.version; + } + + if (setDeps.has(_name)) { + delete _deps[_name]; + } else { + _deps[_name] = _version2; + setDeps.add(_name); + } + } + } +} + +/***/ }), +/* 117 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(67); +var call = __webpack_require__(334); +var isArrayIter = __webpack_require__(332); +var anObject = __webpack_require__(56); +var toLength = __webpack_require__(155); +var getIterFn = __webpack_require__(226); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; + + +/***/ }), +/* 119 */ +/***/ (function(module, exports) { + +module.exports = {}; + + +/***/ }), +/* 120 */ +/***/ (function(module, exports) { + +module.exports = true; + + +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(56); +var dPs = __webpack_require__(638); +var enumBugKeys = __webpack_require__(212); +var IE_PROTO = __webpack_require__(219)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(211)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(329).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; + + +/***/ }), +/* 122 */ +/***/ (function(module, exports) { + +exports.f = {}.propertyIsEnumerable; + + +/***/ }), +/* 123 */ +/***/ (function(module, exports) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(63).f; +var has = __webpack_require__(88); +var TAG = __webpack_require__(43)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(647); +var global = __webpack_require__(36); +var hide = __webpack_require__(75); +var Iterators = __webpack_require__(119); +var TO_STRING_TAG = __webpack_require__(43)('toStringTag'); + +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); + +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} + + +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { + +// Basic Javascript Elliptic Curve implementation +// Ported loosely from BouncyCastle's Java EC code +// Only Fp curves implemented for now + +// Requires jsbn.js and jsbn2.js +var BigInteger = __webpack_require__(77).BigInteger +var Barrett = BigInteger.prototype.Barrett + +// ---------------- +// ECFieldElementFp + +// constructor +function ECFieldElementFp(q,x) { + this.x = x; + // TODO if(x.compareTo(q) >= 0) error + this.q = q; +} + +function feFpEquals(other) { + if(other == this) return true; + return (this.q.equals(other.q) && this.x.equals(other.x)); +} + +function feFpToBigInteger() { + return this.x; +} + +function feFpNegate() { + return new ECFieldElementFp(this.q, this.x.negate().mod(this.q)); +} + +function feFpAdd(b) { + return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q)); +} + +function feFpSubtract(b) { + return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q)); +} + +function feFpMultiply(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q)); +} + +function feFpSquare() { + return new ECFieldElementFp(this.q, this.x.square().mod(this.q)); +} + +function feFpDivide(b) { + return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q)); +} + +ECFieldElementFp.prototype.equals = feFpEquals; +ECFieldElementFp.prototype.toBigInteger = feFpToBigInteger; +ECFieldElementFp.prototype.negate = feFpNegate; +ECFieldElementFp.prototype.add = feFpAdd; +ECFieldElementFp.prototype.subtract = feFpSubtract; +ECFieldElementFp.prototype.multiply = feFpMultiply; +ECFieldElementFp.prototype.square = feFpSquare; +ECFieldElementFp.prototype.divide = feFpDivide; + +// ---------------- +// ECPointFp + +// constructor +function ECPointFp(curve,x,y,z) { + this.curve = curve; + this.x = x; + this.y = y; + // Projective coordinates: either zinv == null or z * zinv == 1 + // z and zinv are just BigIntegers, not fieldElements + if(z == null) { + this.z = BigInteger.ONE; + } + else { + this.z = z; + } + this.zinv = null; + //TODO: compression flag +} + +function pointFpGetX() { + if(this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.x.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); +} + +function pointFpGetY() { + if(this.zinv == null) { + this.zinv = this.z.modInverse(this.curve.q); + } + var r = this.y.toBigInteger().multiply(this.zinv); + this.curve.reduce(r); + return this.curve.fromBigInteger(r); +} + +function pointFpEquals(other) { + if(other == this) return true; + if(this.isInfinity()) return other.isInfinity(); + if(other.isInfinity()) return this.isInfinity(); + var u, v; + // u = Y2 * Z1 - Y1 * Z2 + u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q); + if(!u.equals(BigInteger.ZERO)) return false; + // v = X2 * Z1 - X1 * Z2 + v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q); + return v.equals(BigInteger.ZERO); +} + +function pointFpIsInfinity() { + if((this.x == null) && (this.y == null)) return true; + return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO); +} + +function pointFpNegate() { + return new ECPointFp(this.curve, this.x, this.y.negate(), this.z); +} + +function pointFpAdd(b) { + if(this.isInfinity()) return b; + if(b.isInfinity()) return this; + + // u = Y2 * Z1 - Y1 * Z2 + var u = b.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(b.z)).mod(this.curve.q); + // v = X2 * Z1 - X1 * Z2 + var v = b.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(b.z)).mod(this.curve.q); + + if(BigInteger.ZERO.equals(v)) { + if(BigInteger.ZERO.equals(u)) { + return this.twice(); // this == b, so double + } + return this.curve.getInfinity(); // this = -b, so infinity + } + + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + var x2 = b.x.toBigInteger(); + var y2 = b.y.toBigInteger(); + + var v2 = v.square(); + var v3 = v2.multiply(v); + var x1v2 = x1.multiply(v2); + var zu2 = u.square().multiply(this.z); + + // x3 = v * (z2 * (z1 * u^2 - 2 * x1 * v^2) - v^3) + var x3 = zu2.subtract(x1v2.shiftLeft(1)).multiply(b.z).subtract(v3).multiply(v).mod(this.curve.q); + // y3 = z2 * (3 * x1 * u * v^2 - y1 * v^3 - z1 * u^3) + u * v^3 + var y3 = x1v2.multiply(THREE).multiply(u).subtract(y1.multiply(v3)).subtract(zu2.multiply(u)).multiply(b.z).add(u.multiply(v3)).mod(this.curve.q); + // z3 = v^3 * z1 * z2 + var z3 = v3.multiply(this.z).multiply(b.z).mod(this.curve.q); + + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); +} + +function pointFpTwice() { + if(this.isInfinity()) return this; + if(this.y.toBigInteger().signum() == 0) return this.curve.getInfinity(); + + // TODO: optimized handling of constants + var THREE = new BigInteger("3"); + var x1 = this.x.toBigInteger(); + var y1 = this.y.toBigInteger(); + + var y1z1 = y1.multiply(this.z); + var y1sqz1 = y1z1.multiply(y1).mod(this.curve.q); + var a = this.curve.a.toBigInteger(); + + // w = 3 * x1^2 + a * z1^2 + var w = x1.square().multiply(THREE); + if(!BigInteger.ZERO.equals(a)) { + w = w.add(this.z.square().multiply(a)); + } + w = w.mod(this.curve.q); + //this.curve.reduce(w); + // x3 = 2 * y1 * z1 * (w^2 - 8 * x1 * y1^2 * z1) + var x3 = w.square().subtract(x1.shiftLeft(3).multiply(y1sqz1)).shiftLeft(1).multiply(y1z1).mod(this.curve.q); + // y3 = 4 * y1^2 * z1 * (3 * w * x1 - 2 * y1^2 * z1) - w^3 + var y3 = w.multiply(THREE).multiply(x1).subtract(y1sqz1.shiftLeft(1)).shiftLeft(2).multiply(y1sqz1).subtract(w.square().multiply(w)).mod(this.curve.q); + // z3 = 8 * (y1 * z1)^3 + var z3 = y1z1.square().multiply(y1z1).shiftLeft(3).mod(this.curve.q); + + return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3); +} + +// Simple NAF (Non-Adjacent Form) multiplication algorithm +// TODO: modularize the multiplication algorithm +function pointFpMultiply(k) { + if(this.isInfinity()) return this; + if(k.signum() == 0) return this.curve.getInfinity(); + + var e = k; + var h = e.multiply(new BigInteger("3")); + + var neg = this.negate(); + var R = this; + + var i; + for(i = h.bitLength() - 2; i > 0; --i) { + R = R.twice(); + + var hBit = h.testBit(i); + var eBit = e.testBit(i); + + if (hBit != eBit) { + R = R.add(hBit ? this : neg); + } + } + + return R; +} + +// Compute this*j + x*k (simultaneous multiplication) +function pointFpMultiplyTwo(j,x,k) { + var i; + if(j.bitLength() > k.bitLength()) + i = j.bitLength() - 1; + else + i = k.bitLength() - 1; + + var R = this.curve.getInfinity(); + var both = this.add(x); + while(i >= 0) { + R = R.twice(); + if(j.testBit(i)) { + if(k.testBit(i)) { + R = R.add(both); + } + else { + R = R.add(this); + } + } + else { + if(k.testBit(i)) { + R = R.add(x); + } + } + --i; + } + + return R; +} + +ECPointFp.prototype.getX = pointFpGetX; +ECPointFp.prototype.getY = pointFpGetY; +ECPointFp.prototype.equals = pointFpEquals; +ECPointFp.prototype.isInfinity = pointFpIsInfinity; +ECPointFp.prototype.negate = pointFpNegate; +ECPointFp.prototype.add = pointFpAdd; +ECPointFp.prototype.twice = pointFpTwice; +ECPointFp.prototype.multiply = pointFpMultiply; +ECPointFp.prototype.multiplyTwo = pointFpMultiplyTwo; + +// ---------------- +// ECCurveFp + +// constructor +function ECCurveFp(q,a,b) { + this.q = q; + this.a = this.fromBigInteger(a); + this.b = this.fromBigInteger(b); + this.infinity = new ECPointFp(this, null, null); + this.reducer = new Barrett(this.q); +} + +function curveFpGetQ() { + return this.q; +} + +function curveFpGetA() { + return this.a; +} + +function curveFpGetB() { + return this.b; +} + +function curveFpEquals(other) { + if(other == this) return true; + return(this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b)); +} + +function curveFpGetInfinity() { + return this.infinity; +} + +function curveFpFromBigInteger(x) { + return new ECFieldElementFp(this.q, x); +} + +function curveReduce(x) { + this.reducer.reduce(x); +} + +// for now, work with hex strings because they're easier in JS +function curveFpDecodePointHex(s) { + switch(parseInt(s.substr(0,2), 16)) { // first byte + case 0: + return this.infinity; + case 2: + case 3: + // point compression not supported yet + return null; + case 4: + case 6: + case 7: + var len = (s.length - 2) / 2; + var xHex = s.substr(2, len); + var yHex = s.substr(len+2, len); + + return new ECPointFp(this, + this.fromBigInteger(new BigInteger(xHex, 16)), + this.fromBigInteger(new BigInteger(yHex, 16))); + + default: // unsupported + return null; + } +} + +function curveFpEncodePointHex(p) { + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var yHex = p.getY().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if ((oLen % 2) != 0) oLen++; + while (xHex.length < oLen) { + xHex = "0" + xHex; + } + while (yHex.length < oLen) { + yHex = "0" + yHex; + } + return "04" + xHex + yHex; +} + +ECCurveFp.prototype.getQ = curveFpGetQ; +ECCurveFp.prototype.getA = curveFpGetA; +ECCurveFp.prototype.getB = curveFpGetB; +ECCurveFp.prototype.equals = curveFpEquals; +ECCurveFp.prototype.getInfinity = curveFpGetInfinity; +ECCurveFp.prototype.fromBigInteger = curveFpFromBigInteger; +ECCurveFp.prototype.reduce = curveReduce; +//ECCurveFp.prototype.decodePointHex = curveFpDecodePointHex; +ECCurveFp.prototype.encodePointHex = curveFpEncodePointHex; + +// from: https://github.com/kaielvin/jsbn-ec-point-compression +ECCurveFp.prototype.decodePointHex = function(s) +{ + var yIsEven; + switch(parseInt(s.substr(0,2), 16)) { // first byte + case 0: + return this.infinity; + case 2: + yIsEven = false; + case 3: + if(yIsEven == undefined) yIsEven = true; + var len = s.length - 2; + var xHex = s.substr(2, len); + var x = this.fromBigInteger(new BigInteger(xHex,16)); + var alpha = x.multiply(x.square().add(this.getA())).add(this.getB()); + var beta = alpha.sqrt(); + + if (beta == null) throw "Invalid point compression"; + + var betaValue = beta.toBigInteger(); + if (betaValue.testBit(0) != yIsEven) + { + // Use the other root + beta = this.fromBigInteger(this.getQ().subtract(betaValue)); + } + return new ECPointFp(this,x,beta); + case 4: + case 6: + case 7: + var len = (s.length - 2) / 2; + var xHex = s.substr(2, len); + var yHex = s.substr(len+2, len); + + return new ECPointFp(this, + this.fromBigInteger(new BigInteger(xHex, 16)), + this.fromBigInteger(new BigInteger(yHex, 16))); + + default: // unsupported + return null; + } +} +ECCurveFp.prototype.encodeCompressedPointHex = function(p) +{ + if (p.isInfinity()) return "00"; + var xHex = p.getX().toBigInteger().toString(16); + var oLen = this.getQ().toString(16).length; + if ((oLen % 2) != 0) oLen++; + while (xHex.length < oLen) + xHex = "0" + xHex; + var yPrefix; + if(p.getY().toBigInteger().isEven()) yPrefix = "02"; + else yPrefix = "03"; + + return yPrefix + xHex; +} + + +ECFieldElementFp.prototype.getR = function() +{ + if(this.r != undefined) return this.r; + + this.r = null; + var bitLength = this.q.bitLength(); + if (bitLength > 128) + { + var firstWord = this.q.shiftRight(bitLength - 64); + if (firstWord.intValue() == -1) + { + this.r = BigInteger.ONE.shiftLeft(bitLength).subtract(this.q); + } + } + return this.r; +} +ECFieldElementFp.prototype.modMult = function(x1,x2) +{ + return this.modReduce(x1.multiply(x2)); +} +ECFieldElementFp.prototype.modReduce = function(x) +{ + if (this.getR() != null) + { + var qLen = q.bitLength(); + while (x.bitLength() > (qLen + 1)) + { + var u = x.shiftRight(qLen); + var v = x.subtract(u.shiftLeft(qLen)); + if (!this.getR().equals(BigInteger.ONE)) + { + u = u.multiply(this.getR()); + } + x = u.add(v); + } + while (x.compareTo(q) >= 0) + { + x = x.subtract(q); + } + } + else + { + x = x.mod(q); + } + return x; +} +ECFieldElementFp.prototype.sqrt = function() +{ + if (!this.q.testBit(0)) throw "unsupported"; + + // p mod 4 == 3 + if (this.q.testBit(1)) + { + var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q)); + return z.square().equals(this) ? z : null; + } + + // p mod 4 == 1 + var qMinusOne = this.q.subtract(BigInteger.ONE); + + var legendreExponent = qMinusOne.shiftRight(1); + if (!(this.x.modPow(legendreExponent, this.q).equals(BigInteger.ONE))) + { + return null; + } + + var u = qMinusOne.shiftRight(2); + var k = u.shiftLeft(1).add(BigInteger.ONE); + + var Q = this.x; + var fourQ = modDouble(modDouble(Q)); + + var U, V; + do + { + var P; + do + { + P = new BigInteger(this.q.bitLength(), new SecureRandom()); + } + while (P.compareTo(this.q) >= 0 + || !(P.multiply(P).subtract(fourQ).modPow(legendreExponent, this.q).equals(qMinusOne))); + + var result = this.lucasSequence(P, Q, k); + U = result[0]; + V = result[1]; + + if (this.modMult(V, V).equals(fourQ)) + { + // Integer division by 2, mod q + if (V.testBit(0)) + { + V = V.add(q); + } + + V = V.shiftRight(1); + + return new ECFieldElementFp(q,V); + } + } + while (U.equals(BigInteger.ONE) || U.equals(qMinusOne)); + + return null; +} +ECFieldElementFp.prototype.lucasSequence = function(P,Q,k) +{ + var n = k.bitLength(); + var s = k.getLowestSetBit(); + + var Uh = BigInteger.ONE; + var Vl = BigInteger.TWO; + var Vh = P; + var Ql = BigInteger.ONE; + var Qh = BigInteger.ONE; + + for (var j = n - 1; j >= s + 1; --j) + { + Ql = this.modMult(Ql, Qh); + + if (k.testBit(j)) + { + Qh = this.modMult(Ql, Q); + Uh = this.modMult(Uh, Vh); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vh = this.modReduce(Vh.multiply(Vh).subtract(Qh.shiftLeft(1))); + } + else + { + Qh = Ql; + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vh = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + } + } + + Ql = this.modMult(Ql, Qh); + Qh = this.modMult(Ql, Q); + Uh = this.modReduce(Uh.multiply(Vl).subtract(Ql)); + Vl = this.modReduce(Vh.multiply(Vl).subtract(P.multiply(Ql))); + Ql = this.modMult(Ql, Qh); + + for (var j = 1; j <= s; ++j) + { + Uh = this.modMult(Uh, Vl); + Vl = this.modReduce(Vl.multiply(Vl).subtract(Ql.shiftLeft(1))); + Ql = this.modMult(Ql, Ql); + } + + return [ Uh, Vl ]; +} + +var exports = { + ECCurveFp: ECCurveFp, + ECPointFp: ECPointFp, + ECFieldElementFp: ECFieldElementFp +} + +module.exports = exports + + +/***/ }), +/* 127 */ +/***/ (function(module, exports) { + + +module.exports = function(det, rec, confidence, name, lang) { + this.confidence = confidence; + this.name = name || rec.name(det); + this.lang = lang; +}; + + +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { + +var wrappy = __webpack_require__(430) +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} + + +/***/ }), +/* 129 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = defaultIfEmpty; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +function defaultIfEmpty(defaultValue) { + if (defaultValue === void 0) { + defaultValue = null; + } + return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); }; +} +var DefaultIfEmptyOperator = /*@__PURE__*/ (function () { + function DefaultIfEmptyOperator(defaultValue) { + this.defaultValue = defaultValue; + } + DefaultIfEmptyOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue)); + }; + return DefaultIfEmptyOperator; +}()); +var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](DefaultIfEmptySubscriber, _super); + function DefaultIfEmptySubscriber(destination, defaultValue) { + var _this = _super.call(this, destination) || this; + _this.defaultValue = defaultValue; + _this.isEmpty = true; + return _this; + } + DefaultIfEmptySubscriber.prototype._next = function (value) { + this.isEmpty = false; + this.destination.next(value); + }; + DefaultIfEmptySubscriber.prototype._complete = function () { + if (this.isEmpty) { + this.destination.next(this.defaultValue); + } + this.destination.complete(); + }; + return DefaultIfEmptySubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=defaultIfEmpty.js.map + + +/***/ }), +/* 130 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = filter; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +function filter(predicate, thisArg) { + return function filterOperatorFunction(source) { + return source.lift(new FilterOperator(predicate, thisArg)); + }; +} +var FilterOperator = /*@__PURE__*/ (function () { + function FilterOperator(predicate, thisArg) { + this.predicate = predicate; + this.thisArg = thisArg; + } + FilterOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg)); + }; + return FilterOperator; +}()); +var FilterSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](FilterSubscriber, _super); + function FilterSubscriber(destination, predicate, thisArg) { + var _this = _super.call(this, destination) || this; + _this.predicate = predicate; + _this.thisArg = thisArg; + _this.count = 0; + return _this; + } + FilterSubscriber.prototype._next = function (value) { + var result; + try { + result = this.predicate.call(this.thisArg, value, this.count++); + } + catch (err) { + this.destination.error(err); + return; + } + if (result) { + this.destination.next(value); + } + }; + return FilterSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=filter.js.map + + +/***/ }), +/* 131 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = mergeMap; +/* unused harmony export MergeMapOperator */ +/* unused harmony export MergeMapSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InnerSubscriber__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__observable_from__ = __webpack_require__(64); +/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */ + + + + + + +function mergeMap(project, resultSelector, concurrent) { + if (concurrent === void 0) { + concurrent = Number.POSITIVE_INFINITY; + } + if (typeof resultSelector === 'function') { + return function (source) { return source.pipe(mergeMap(function (a, i) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__observable_from__["a" /* from */])(project(a, i)).pipe(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__map__["a" /* map */])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); }; + } + else if (typeof resultSelector === 'number') { + concurrent = resultSelector; + } + return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); }; +} +var MergeMapOperator = /*@__PURE__*/ (function () { + function MergeMapOperator(project, concurrent) { + if (concurrent === void 0) { + concurrent = Number.POSITIVE_INFINITY; + } + this.project = project; + this.concurrent = concurrent; + } + MergeMapOperator.prototype.call = function (observer, source) { + return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent)); + }; + return MergeMapOperator; +}()); + +var MergeMapSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](MergeMapSubscriber, _super); + function MergeMapSubscriber(destination, project, concurrent) { + if (concurrent === void 0) { + concurrent = Number.POSITIVE_INFINITY; + } + var _this = _super.call(this, destination) || this; + _this.project = project; + _this.concurrent = concurrent; + _this.hasCompleted = false; + _this.buffer = []; + _this.active = 0; + _this.index = 0; + return _this; + } + MergeMapSubscriber.prototype._next = function (value) { + if (this.active < this.concurrent) { + this._tryNext(value); + } + else { + this.buffer.push(value); + } + }; + MergeMapSubscriber.prototype._tryNext = function (value) { + var result; + var index = this.index++; + try { + result = this.project(value, index); + } + catch (err) { + this.destination.error(err); + return; + } + this.active++; + this._innerSub(result, value, index); + }; + MergeMapSubscriber.prototype._innerSub = function (ish, value, index) { + var innerSubscriber = new __WEBPACK_IMPORTED_MODULE_3__InnerSubscriber__["a" /* InnerSubscriber */](this, undefined, undefined); + var destination = this.destination; + destination.add(innerSubscriber); + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_subscribeToResult__["a" /* subscribeToResult */])(this, ish, value, index, innerSubscriber); + }; + MergeMapSubscriber.prototype._complete = function () { + this.hasCompleted = true; + if (this.active === 0 && this.buffer.length === 0) { + this.destination.complete(); + } + this.unsubscribe(); + }; + MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.destination.next(innerValue); + }; + MergeMapSubscriber.prototype.notifyComplete = function (innerSub) { + var buffer = this.buffer; + this.remove(innerSub); + this.active--; + if (buffer.length > 0) { + this._next(buffer.shift()); + } + else if (this.active === 0 && this.hasCompleted) { + this.destination.complete(); + } + }; + return MergeMapSubscriber; +}(__WEBPACK_IMPORTED_MODULE_2__OuterSubscriber__["a" /* OuterSubscriber */])); + +//# sourceMappingURL=mergeMap.js.map + + +/***/ }), +/* 132 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncAction; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Action__ = __webpack_require__(959); +/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */ + + +var AsyncAction = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AsyncAction, _super); + function AsyncAction(scheduler, work) { + var _this = _super.call(this, scheduler, work) || this; + _this.scheduler = scheduler; + _this.work = work; + _this.pending = false; + return _this; + } + AsyncAction.prototype.schedule = function (state, delay) { + if (delay === void 0) { + delay = 0; + } + if (this.closed) { + return this; + } + this.state = state; + var id = this.id; + var scheduler = this.scheduler; + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, delay); + } + this.pending = true; + this.delay = delay; + this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); + return this; + }; + AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + return setInterval(scheduler.flush.bind(scheduler, this), delay); + }; + AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) { + if (delay === void 0) { + delay = 0; + } + if (delay !== null && this.delay === delay && this.pending === false) { + return id; + } + clearInterval(id); + }; + AsyncAction.prototype.execute = function (state, delay) { + if (this.closed) { + return new Error('executing a cancelled action'); + } + this.pending = false; + var error = this._execute(state, delay); + if (error) { + return error; + } + else if (this.pending === false && this.id != null) { + this.id = this.recycleAsyncId(this.scheduler, this.id, null); + } + }; + AsyncAction.prototype._execute = function (state, delay) { + var errored = false; + var errorValue = undefined; + try { + this.work(state); + } + catch (e) { + errored = true; + errorValue = !!e && e || new Error(e); + } + if (errored) { + this.unsubscribe(); + return errorValue; + } + }; + AsyncAction.prototype._unsubscribe = function () { + var id = this.id; + var scheduler = this.scheduler; + var actions = scheduler.actions; + var index = actions.indexOf(this); + this.work = null; + this.state = null; + this.pending = false; + this.scheduler = null; + if (index !== -1) { + actions.splice(index, 1); + } + if (id != null) { + this.id = this.recycleAsyncId(scheduler, id, null); + } + this.delay = null; + }; + return AsyncAction; +}(__WEBPACK_IMPORTED_MODULE_1__Action__["a" /* Action */])); + +//# sourceMappingURL=AsyncAction.js.map + + +/***/ }), +/* 133 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncScheduler; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Scheduler__ = __webpack_require__(385); +/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */ + + +var AsyncScheduler = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AsyncScheduler, _super); + function AsyncScheduler(SchedulerAction, now) { + if (now === void 0) { + now = __WEBPACK_IMPORTED_MODULE_1__Scheduler__["a" /* Scheduler */].now; + } + var _this = _super.call(this, SchedulerAction, function () { + if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) { + return AsyncScheduler.delegate.now(); + } + else { + return now(); + } + }) || this; + _this.actions = []; + _this.active = false; + _this.scheduled = undefined; + return _this; + } + AsyncScheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { + delay = 0; + } + if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) { + return AsyncScheduler.delegate.schedule(work, delay, state); + } + else { + return _super.prototype.schedule.call(this, work, delay, state); + } + }; + AsyncScheduler.prototype.flush = function (action) { + var actions = this.actions; + if (this.active) { + actions.push(action); + return; + } + var error; + this.active = true; + do { + if (error = action.execute(action.state, action.delay)) { + break; + } + } while (action = actions.shift()); + this.active = false; + if (error) { + while (action = actions.shift()) { + action.unsubscribe(); + } + throw error; + } + }; + return AsyncScheduler; +}(__WEBPACK_IMPORTED_MODULE_1__Scheduler__["a" /* Scheduler */])); + +//# sourceMappingURL=AsyncScheduler.js.map + + +/***/ }), +/* 134 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export getSymbolIterator */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return iterator; }); +/* unused harmony export $$iterator */ +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function getSymbolIterator() { + if (typeof Symbol !== 'function' || !Symbol.iterator) { + return '@@iterator'; + } + return Symbol.iterator; +} +var iterator = /*@__PURE__*/ getSymbolIterator(); +var $$iterator = iterator; +//# sourceMappingURL=iterator.js.map + + +/***/ }), +/* 135 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArgumentOutOfRangeError; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function ArgumentOutOfRangeErrorImpl() { + Error.call(this); + this.message = 'argument out of range'; + this.name = 'ArgumentOutOfRangeError'; + return this; +} +ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype); +var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl; +//# sourceMappingURL=ArgumentOutOfRangeError.js.map + + +/***/ }), +/* 136 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EmptyError; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function EmptyErrorImpl() { + Error.call(this); + this.message = 'no elements in sequence'; + this.name = 'EmptyError'; + return this; +} +EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype); +var EmptyError = EmptyErrorImpl; +//# sourceMappingURL=EmptyError.js.map + + +/***/ }), +/* 137 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isFunction; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function isFunction(x) { + return typeof x === 'function'; +} +//# sourceMappingURL=isFunction.js.map + + +/***/ }), +/* 138 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2016 Joyent, Inc. + +module.exports = Certificate; + +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var crypto = __webpack_require__(21); +var Fingerprint = __webpack_require__(139); +var Signature = __webpack_require__(70); +var errs = __webpack_require__(69); +var util = __webpack_require__(9); +var utils = __webpack_require__(31); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); +var Identity = __webpack_require__(141); + +var formats = {}; +formats['openssh'] = __webpack_require__(981); +formats['x509'] = __webpack_require__(421); +formats['pem'] = __webpack_require__(982); + +var CertificateParseError = errs.CertificateParseError; +var InvalidAlgorithmError = errs.InvalidAlgorithmError; + +function Certificate(opts) { + assert.object(opts, 'options'); + assert.arrayOfObject(opts.subjects, 'options.subjects'); + utils.assertCompatible(opts.subjects[0], Identity, [1, 0], + 'options.subjects'); + utils.assertCompatible(opts.subjectKey, Key, [1, 0], + 'options.subjectKey'); + utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer'); + if (opts.issuerKey !== undefined) { + utils.assertCompatible(opts.issuerKey, Key, [1, 0], + 'options.issuerKey'); + } + assert.object(opts.signatures, 'options.signatures'); + assert.buffer(opts.serial, 'options.serial'); + assert.date(opts.validFrom, 'options.validFrom'); + assert.date(opts.validUntil, 'optons.validUntil'); + + assert.optionalArrayOfString(opts.purposes, 'options.purposes'); + + this._hashCache = {}; + + this.subjects = opts.subjects; + this.issuer = opts.issuer; + this.subjectKey = opts.subjectKey; + this.issuerKey = opts.issuerKey; + this.signatures = opts.signatures; + this.serial = opts.serial; + this.validFrom = opts.validFrom; + this.validUntil = opts.validUntil; + this.purposes = opts.purposes; +} + +Certificate.formats = formats; + +Certificate.prototype.toBuffer = function (format, options) { + if (format === undefined) + format = 'x509'; + assert.string(format, 'format'); + assert.object(formats[format], 'formats[format]'); + assert.optionalObject(options, 'options'); + + return (formats[format].write(this, options)); +}; + +Certificate.prototype.toString = function (format, options) { + if (format === undefined) + format = 'pem'; + return (this.toBuffer(format, options).toString()); +}; + +Certificate.prototype.fingerprint = function (algo) { + if (algo === undefined) + algo = 'sha256'; + assert.string(algo, 'algorithm'); + var opts = { + type: 'certificate', + hash: this.hash(algo), + algorithm: algo + }; + return (new Fingerprint(opts)); +}; + +Certificate.prototype.hash = function (algo) { + assert.string(algo, 'algorithm'); + algo = algo.toLowerCase(); + if (algs.hashAlgs[algo] === undefined) + throw (new InvalidAlgorithmError(algo)); + + if (this._hashCache[algo]) + return (this._hashCache[algo]); + + var hash = crypto.createHash(algo). + update(this.toBuffer('x509')).digest(); + this._hashCache[algo] = hash; + return (hash); +}; + +Certificate.prototype.isExpired = function (when) { + if (when === undefined) + when = new Date(); + return (!((when.getTime() >= this.validFrom.getTime()) && + (when.getTime() < this.validUntil.getTime()))); +}; + +Certificate.prototype.isSignedBy = function (issuerCert) { + utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer'); + + if (!this.issuer.equals(issuerCert.subjects[0])) + return (false); + if (this.issuer.purposes && this.issuer.purposes.length > 0 && + this.issuer.purposes.indexOf('ca') === -1) { + return (false); + } + + return (this.isSignedByKey(issuerCert.subjectKey)); +}; + +Certificate.prototype.isSignedByKey = function (issuerKey) { + utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey'); + + if (this.issuerKey !== undefined) { + return (this.issuerKey. + fingerprint('sha512').matches(issuerKey)); + } + + var fmt = Object.keys(this.signatures)[0]; + var valid = formats[fmt].verify(this, issuerKey); + if (valid) + this.issuerKey = issuerKey; + return (valid); +}; + +Certificate.prototype.signWith = function (key) { + utils.assertCompatible(key, PrivateKey, [1, 2], 'key'); + var fmts = Object.keys(formats); + var didOne = false; + for (var i = 0; i < fmts.length; ++i) { + if (fmts[i] !== 'pem') { + var ret = formats[fmts[i]].sign(this, key); + if (ret === true) + didOne = true; + } + } + if (!didOne) { + throw (new Error('Failed to sign the certificate for any ' + + 'available certificate formats')); + } +}; + +Certificate.createSelfSigned = function (subjectOrSubjects, key, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + + assert.arrayOfObject(subjects); + subjects.forEach(function (subject) { + utils.assertCompatible(subject, Identity, [1, 0], 'subject'); + }); + + utils.assertCompatible(key, PrivateKey, [1, 2], 'private key'); + + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalObject(options.validFrom, 'options.validFrom'); + assert.optionalObject(options.validUntil, 'options.validUntil'); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === undefined) + validFrom = new Date(); + if (validUntil === undefined) { + assert.optionalNumber(options.lifetime, 'options.lifetime'); + var lifetime = options.lifetime; + if (lifetime === undefined) + lifetime = 10*365*24*3600; + validUntil = new Date(); + validUntil.setTime(validUntil.getTime() + lifetime*1000); + } + assert.optionalBuffer(options.serial, 'options.serial'); + var serial = options.serial; + if (serial === undefined) + serial = Buffer.from('0000000000000001', 'hex'); + + var purposes = options.purposes; + if (purposes === undefined) + purposes = []; + + if (purposes.indexOf('signature') === -1) + purposes.push('signature'); + + /* Self-signed certs are always CAs. */ + if (purposes.indexOf('ca') === -1) + purposes.push('ca'); + if (purposes.indexOf('crl') === -1) + purposes.push('crl'); + + /* + * If we weren't explicitly given any other purposes, do the sensible + * thing and add some basic ones depending on the subject type. + */ + if (purposes.length <= 3) { + var hostSubjects = subjects.filter(function (subject) { + return (subject.type === 'host'); + }); + var userSubjects = subjects.filter(function (subject) { + return (subject.type === 'user'); + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf('serverAuth') === -1) + purposes.push('serverAuth'); + } + if (userSubjects.length > 0) { + if (purposes.indexOf('clientAuth') === -1) + purposes.push('clientAuth'); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf('keyAgreement') === -1) + purposes.push('keyAgreement'); + if (key.type === 'rsa' && + purposes.indexOf('encryption') === -1) + purposes.push('encryption'); + } + } + + var cert = new Certificate({ + subjects: subjects, + issuer: subjects[0], + subjectKey: key.toPublic(), + issuerKey: key.toPublic(), + signatures: {}, + serial: serial, + validFrom: validFrom, + validUntil: validUntil, + purposes: purposes + }); + cert.signWith(key); + + return (cert); +}; + +Certificate.create = + function (subjectOrSubjects, key, issuer, issuerKey, options) { + var subjects; + if (Array.isArray(subjectOrSubjects)) + subjects = subjectOrSubjects; + else + subjects = [subjectOrSubjects]; + + assert.arrayOfObject(subjects); + subjects.forEach(function (subject) { + utils.assertCompatible(subject, Identity, [1, 0], 'subject'); + }); + + utils.assertCompatible(key, Key, [1, 0], 'key'); + if (PrivateKey.isPrivateKey(key)) + key = key.toPublic(); + utils.assertCompatible(issuer, Identity, [1, 0], 'issuer'); + utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key'); + + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalObject(options.validFrom, 'options.validFrom'); + assert.optionalObject(options.validUntil, 'options.validUntil'); + var validFrom = options.validFrom; + var validUntil = options.validUntil; + if (validFrom === undefined) + validFrom = new Date(); + if (validUntil === undefined) { + assert.optionalNumber(options.lifetime, 'options.lifetime'); + var lifetime = options.lifetime; + if (lifetime === undefined) + lifetime = 10*365*24*3600; + validUntil = new Date(); + validUntil.setTime(validUntil.getTime() + lifetime*1000); + } + assert.optionalBuffer(options.serial, 'options.serial'); + var serial = options.serial; + if (serial === undefined) + serial = Buffer.from('0000000000000001', 'hex'); + + var purposes = options.purposes; + if (purposes === undefined) + purposes = []; + + if (purposes.indexOf('signature') === -1) + purposes.push('signature'); + + if (options.ca === true) { + if (purposes.indexOf('ca') === -1) + purposes.push('ca'); + if (purposes.indexOf('crl') === -1) + purposes.push('crl'); + } + + var hostSubjects = subjects.filter(function (subject) { + return (subject.type === 'host'); + }); + var userSubjects = subjects.filter(function (subject) { + return (subject.type === 'user'); + }); + if (hostSubjects.length > 0) { + if (purposes.indexOf('serverAuth') === -1) + purposes.push('serverAuth'); + } + if (userSubjects.length > 0) { + if (purposes.indexOf('clientAuth') === -1) + purposes.push('clientAuth'); + } + if (userSubjects.length > 0 || hostSubjects.length > 0) { + if (purposes.indexOf('keyAgreement') === -1) + purposes.push('keyAgreement'); + if (key.type === 'rsa' && + purposes.indexOf('encryption') === -1) + purposes.push('encryption'); + } + + var cert = new Certificate({ + subjects: subjects, + issuer: issuer, + subjectKey: key, + issuerKey: issuerKey.toPublic(), + signatures: {}, + serial: serial, + validFrom: validFrom, + validUntil: validUntil, + purposes: purposes + }); + cert.signWith(issuerKey); + + return (cert); +}; + +Certificate.parse = function (data, format, options) { + if (typeof (data) !== 'string') + assert.buffer(data, 'data'); + if (format === undefined) + format = 'auto'; + assert.string(format, 'format'); + if (typeof (options) === 'string') + options = { filename: options }; + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + assert.optionalString(options.filename, 'options.filename'); + if (options.filename === undefined) + options.filename = '(unnamed)'; + + assert.object(formats[format], 'formats[format]'); + + try { + var k = formats[format].read(data, options); + return (k); + } catch (e) { + throw (new CertificateParseError(options.filename, format, e)); + } +}; + +Certificate.isCertificate = function (obj, ver) { + return (utils.isCompatible(obj, Certificate, ver)); +}; + +/* + * API versions for Certificate: + * [1,0] -- initial ver + */ +Certificate.prototype._sshpkApiVersion = [1, 0]; + +Certificate._oldVersionDetect = function (obj) { + return ([1, 0]); +}; + + +/***/ }), +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = Fingerprint; + +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var crypto = __webpack_require__(21); +var errs = __webpack_require__(69); +var Key = __webpack_require__(33); +var Certificate = __webpack_require__(138); +var utils = __webpack_require__(31); + +var FingerprintFormatError = errs.FingerprintFormatError; +var InvalidAlgorithmError = errs.InvalidAlgorithmError; + +function Fingerprint(opts) { + assert.object(opts, 'options'); + assert.string(opts.type, 'options.type'); + assert.buffer(opts.hash, 'options.hash'); + assert.string(opts.algorithm, 'options.algorithm'); + + this.algorithm = opts.algorithm.toLowerCase(); + if (algs.hashAlgs[this.algorithm] !== true) + throw (new InvalidAlgorithmError(this.algorithm)); + + this.hash = opts.hash; + this.type = opts.type; +} + +Fingerprint.prototype.toString = function (format) { + if (format === undefined) { + if (this.algorithm === 'md5') + format = 'hex'; + else + format = 'base64'; + } + assert.string(format); + + switch (format) { + case 'hex': + return (addColons(this.hash.toString('hex'))); + case 'base64': + return (sshBase64Format(this.algorithm, + this.hash.toString('base64'))); + default: + throw (new FingerprintFormatError(undefined, format)); + } +}; + +Fingerprint.prototype.matches = function (other) { + assert.object(other, 'key or certificate'); + if (this.type === 'key') { + utils.assertCompatible(other, Key, [1, 0], 'key'); + } else { + utils.assertCompatible(other, Certificate, [1, 0], + 'certificate'); + } + + var theirHash = other.hash(this.algorithm); + var theirHash2 = crypto.createHash(this.algorithm). + update(theirHash).digest('base64'); + + if (this.hash2 === undefined) + this.hash2 = crypto.createHash(this.algorithm). + update(this.hash).digest('base64'); + + return (this.hash2 === theirHash2); +}; + +Fingerprint.parse = function (fp, options) { + assert.string(fp, 'fingerprint'); + + var alg, hash, enAlgs; + if (Array.isArray(options)) { + enAlgs = options; + options = {}; + } + assert.optionalObject(options, 'options'); + if (options === undefined) + options = {}; + if (options.enAlgs !== undefined) + enAlgs = options.enAlgs; + assert.optionalArrayOfString(enAlgs, 'algorithms'); + + var parts = fp.split(':'); + if (parts.length == 2) { + alg = parts[0].toLowerCase(); + /*JSSTYLED*/ + var base64RE = /^[A-Za-z0-9+\/=]+$/; + if (!base64RE.test(parts[1])) + throw (new FingerprintFormatError(fp)); + try { + hash = Buffer.from(parts[1], 'base64'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } else if (parts.length > 2) { + alg = 'md5'; + if (parts[0].toLowerCase() === 'md5') + parts = parts.slice(1); + parts = parts.join(''); + /*JSSTYLED*/ + var md5RE = /^[a-fA-F0-9]+$/; + if (!md5RE.test(parts)) + throw (new FingerprintFormatError(fp)); + try { + hash = Buffer.from(parts, 'hex'); + } catch (e) { + throw (new FingerprintFormatError(fp)); + } + } + + if (alg === undefined) + throw (new FingerprintFormatError(fp)); + + if (algs.hashAlgs[alg] === undefined) + throw (new InvalidAlgorithmError(alg)); + + if (enAlgs !== undefined) { + enAlgs = enAlgs.map(function (a) { return a.toLowerCase(); }); + if (enAlgs.indexOf(alg) === -1) + throw (new InvalidAlgorithmError(alg)); + } + + return (new Fingerprint({ + algorithm: alg, + hash: hash, + type: options.type || 'key' + })); +}; + +function addColons(s) { + /*JSSTYLED*/ + return (s.replace(/(.{2})(?=.)/g, '$1:')); +} + +function base64Strip(s) { + /*JSSTYLED*/ + return (s.replace(/=*$/, '')); +} + +function sshBase64Format(alg, h) { + return (alg.toUpperCase() + ':' + base64Strip(h)); +} + +Fingerprint.isFingerprint = function (obj, ver) { + return (utils.isCompatible(obj, Fingerprint, ver)); +}; + +/* + * API versions for Fingerprint: + * [1,0] -- initial ver + * [1,1] -- first tagged ver + */ +Fingerprint.prototype._sshpkApiVersion = [1, 1]; + +Fingerprint._oldVersionDetect = function (obj) { + assert.func(obj.toString); + assert.func(obj.matches); + return ([1, 0]); +}; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readPkcs8: readPkcs8, + write: write, + writePkcs8: writePkcs8, + + readECDSACurve: readECDSACurve, + writeECDSACurve: writeECDSACurve +}; + +var assert = __webpack_require__(22); +var asn1 = __webpack_require__(66); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var utils = __webpack_require__(31); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); +var pem = __webpack_require__(80); + +function read(buf, options) { + return (pem.read(buf, options, 'pkcs8')); +} + +function write(key, options) { + return (pem.write(key, options, 'pkcs8')); +} + +/* Helper to read in a single mpint */ +function readMPInt(der, nm) { + assert.strictEqual(der.peek(), asn1.Ber.Integer, + nm + ' is not an Integer'); + return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true))); +} + +function readPkcs8(alg, type, der) { + /* Private keys in pkcs#8 format have a weird extra int */ + if (der.peek() === asn1.Ber.Integer) { + assert.strictEqual(type, 'private', + 'unexpected Integer at start of public key'); + der.readString(asn1.Ber.Integer, true); + } + + der.readSequence(); + var next = der.offset + der.length; + + var oid = der.readOID(); + switch (oid) { + case '1.2.840.113549.1.1.1': + der._offset = next; + if (type === 'public') + return (readPkcs8RSAPublic(der)); + else + return (readPkcs8RSAPrivate(der)); + case '1.2.840.10040.4.1': + if (type === 'public') + return (readPkcs8DSAPublic(der)); + else + return (readPkcs8DSAPrivate(der)); + case '1.2.840.10045.2.1': + if (type === 'public') + return (readPkcs8ECDSAPublic(der)); + else + return (readPkcs8ECDSAPrivate(der)); + case '1.3.101.112': + if (type === 'public') { + return (readPkcs8EdDSAPublic(der)); + } else { + return (readPkcs8EdDSAPrivate(der)); + } + case '1.3.101.110': + if (type === 'public') { + return (readPkcs8X25519Public(der)); + } else { + return (readPkcs8X25519Private(der)); + } + default: + throw (new Error('Unknown key type OID ' + oid)); + } +} + +function readPkcs8RSAPublic(der) { + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + der.readSequence(); + + // modulus + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'exponent'); + + // now, make the key + var key = { + type: 'rsa', + source: der.originalInput, + parts: [ + { name: 'e', data: e }, + { name: 'n', data: n } + ] + }; + + return (new Key(key)); +} + +function readPkcs8RSAPrivate(der) { + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var ver = readMPInt(der, 'version'); + assert.equal(ver[0], 0x0, 'unknown RSA private key version'); + + // modulus then public exponent + var n = readMPInt(der, 'modulus'); + var e = readMPInt(der, 'public exponent'); + var d = readMPInt(der, 'private exponent'); + var p = readMPInt(der, 'prime1'); + var q = readMPInt(der, 'prime2'); + var dmodp = readMPInt(der, 'exponent1'); + var dmodq = readMPInt(der, 'exponent2'); + var iqmp = readMPInt(der, 'iqmp'); + + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'n', data: n }, + { name: 'e', data: e }, + { name: 'd', data: d }, + { name: 'iqmp', data: iqmp }, + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'dmodp', data: dmodp }, + { name: 'dmodq', data: dmodq } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8DSAPublic(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + // bit string sequence + der.readSequence(asn1.Ber.BitString); + der.readByte(); + + var y = readMPInt(der, 'y'); + + // now, make the key + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y } + ] + }; + + return (new Key(key)); +} + +function readPkcs8DSAPrivate(der) { + der.readSequence(); + + var p = readMPInt(der, 'p'); + var q = readMPInt(der, 'q'); + var g = readMPInt(der, 'g'); + + der.readSequence(asn1.Ber.OctetString); + var x = readMPInt(der, 'x'); + + /* The pkcs#8 format does not include the public key */ + var y = utils.calculateDSAPublic(g, p, x); + + var key = { + type: 'dsa', + parts: [ + { name: 'p', data: p }, + { name: 'q', data: q }, + { name: 'g', data: g }, + { name: 'y', data: y }, + { name: 'x', data: x } + ] + }; + + return (new PrivateKey(key)); +} + +function readECDSACurve(der) { + var curveName, curveNames; + var j, c, cd; + + if (der.peek() === asn1.Ber.OID) { + var oid = der.readOID(); + + curveNames = Object.keys(algs.curves); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + if (cd.pkcs8oid === oid) { + curveName = c; + break; + } + } + + } else { + // ECParameters sequence + der.readSequence(); + var version = der.readString(asn1.Ber.Integer, true); + assert.strictEqual(version[0], 1, 'ECDSA key not version 1'); + + var curve = {}; + + // FieldID sequence + der.readSequence(); + var fieldTypeOid = der.readOID(); + assert.strictEqual(fieldTypeOid, '1.2.840.10045.1.1', + 'ECDSA key is not from a prime-field'); + var p = curve.p = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + /* + * p always starts with a 1 bit, so count the zeros to get its + * real size. + */ + curve.size = p.length * 8 - utils.countZeros(p); + + // Curve sequence + der.readSequence(); + curve.a = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + curve.b = utils.mpNormalize( + der.readString(asn1.Ber.OctetString, true)); + if (der.peek() === asn1.Ber.BitString) + curve.s = der.readString(asn1.Ber.BitString, true); + + // Combined Gx and Gy + curve.G = der.readString(asn1.Ber.OctetString, true); + assert.strictEqual(curve.G[0], 0x4, + 'uncompressed G is required'); + + curve.n = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + curve.h = utils.mpNormalize( + der.readString(asn1.Ber.Integer, true)); + assert.strictEqual(curve.h[0], 0x1, 'a cofactor=1 curve is ' + + 'required'); + + curveNames = Object.keys(algs.curves); + var ks = Object.keys(curve); + for (j = 0; j < curveNames.length; ++j) { + c = curveNames[j]; + cd = algs.curves[c]; + var equal = true; + for (var i = 0; i < ks.length; ++i) { + var k = ks[i]; + if (cd[k] === undefined) + continue; + if (typeof (cd[k]) === 'object' && + cd[k].equals !== undefined) { + if (!cd[k].equals(curve[k])) { + equal = false; + break; + } + } else if (Buffer.isBuffer(cd[k])) { + if (cd[k].toString('binary') + !== curve[k].toString('binary')) { + equal = false; + break; + } + } else { + if (cd[k] !== curve[k]) { + equal = false; + break; + } + } + } + if (equal) { + curveName = c; + break; + } + } + } + return (curveName); +} + +function readPkcs8ECDSAPrivate(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + der.readSequence(asn1.Ber.OctetString); + der.readSequence(); + + var version = readMPInt(der, 'version'); + assert.equal(version[0], 1, 'unknown version of ECDSA key'); + + var d = der.readString(asn1.Ber.OctetString, true); + der.readSequence(0xa1); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curveName) }, + { name: 'Q', data: Q }, + { name: 'd', data: d } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8ECDSAPublic(der) { + var curveName = readECDSACurve(der); + assert.string(curveName, 'a known elliptic curve'); + + var Q = der.readString(asn1.Ber.BitString, true); + Q = utils.ecNormalize(Q); + + var key = { + type: 'ecdsa', + parts: [ + { name: 'curve', data: Buffer.from(curveName) }, + { name: 'Q', data: Q } + ] + }; + + return (new Key(key)); +} + +function readPkcs8EdDSAPublic(der) { + if (der.peek() === 0x00) + der.readByte(); + + var A = utils.readBitString(der); + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) } + ] + }; + + return (new Key(key)); +} + +function readPkcs8X25519Public(der) { + var A = utils.readBitString(der); + + var key = { + type: 'curve25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) } + ] + }; + + return (new Key(key)); +} + +function readPkcs8EdDSAPrivate(der) { + if (der.peek() === 0x00) + der.readByte(); + + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + + var A; + if (der.peek() === asn1.Ber.BitString) { + A = utils.readBitString(der); + A = utils.zeroPadToLength(A, 32); + } else { + A = utils.calculateED25519Public(k); + } + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: utils.zeroPadToLength(k, 32) } + ] + }; + + return (new PrivateKey(key)); +} + +function readPkcs8X25519Private(der) { + if (der.peek() === 0x00) + der.readByte(); + + der.readSequence(asn1.Ber.OctetString); + var k = der.readString(asn1.Ber.OctetString, true); + k = utils.zeroPadToLength(k, 32); + + var A = utils.calculateX25519Public(k); + + var key = { + type: 'curve25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: utils.zeroPadToLength(k, 32) } + ] + }; + + return (new PrivateKey(key)); +} + +function writePkcs8(der, key) { + der.startSequence(); + + if (PrivateKey.isPrivateKey(key)) { + var sillyInt = Buffer.from([0]); + der.writeBuffer(sillyInt, asn1.Ber.Integer); + } + + der.startSequence(); + switch (key.type) { + case 'rsa': + der.writeOID('1.2.840.113549.1.1.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8RSAPrivate(key, der); + else + writePkcs8RSAPublic(key, der); + break; + case 'dsa': + der.writeOID('1.2.840.10040.4.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8DSAPrivate(key, der); + else + writePkcs8DSAPublic(key, der); + break; + case 'ecdsa': + der.writeOID('1.2.840.10045.2.1'); + if (PrivateKey.isPrivateKey(key)) + writePkcs8ECDSAPrivate(key, der); + else + writePkcs8ECDSAPublic(key, der); + break; + case 'ed25519': + der.writeOID('1.3.101.112'); + if (PrivateKey.isPrivateKey(key)) + throw (new Error('Ed25519 private keys in pkcs8 ' + + 'format are not supported')); + writePkcs8EdDSAPublic(key, der); + break; + default: + throw (new Error('Unsupported key type: ' + key.type)); + } + + der.endSequence(); +} + +function writePkcs8RSAPrivate(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = Buffer.from([0]); + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.writeBuffer(key.part.d.data, asn1.Ber.Integer); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + if (!key.part.dmodp || !key.part.dmodq) + utils.addRSAMissing(key); + der.writeBuffer(key.part.dmodp.data, asn1.Ber.Integer); + der.writeBuffer(key.part.dmodq.data, asn1.Ber.Integer); + der.writeBuffer(key.part.iqmp.data, asn1.Ber.Integer); + + der.endSequence(); + der.endSequence(); +} + +function writePkcs8RSAPublic(key, der) { + der.writeNull(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + + der.startSequence(); + der.writeBuffer(key.part.n.data, asn1.Ber.Integer); + der.writeBuffer(key.part.e.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); +} + +function writePkcs8DSAPrivate(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.writeBuffer(key.part.x.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writePkcs8DSAPublic(key, der) { + der.startSequence(); + der.writeBuffer(key.part.p.data, asn1.Ber.Integer); + der.writeBuffer(key.part.q.data, asn1.Ber.Integer); + der.writeBuffer(key.part.g.data, asn1.Ber.Integer); + der.endSequence(); + der.endSequence(); + + der.startSequence(asn1.Ber.BitString); + der.writeByte(0x00); + der.writeBuffer(key.part.y.data, asn1.Ber.Integer); + der.endSequence(); +} + +function writeECDSACurve(key, der) { + var curve = algs.curves[key.curve]; + if (curve.pkcs8oid) { + /* This one has a name in pkcs#8, so just write the oid */ + der.writeOID(curve.pkcs8oid); + + } else { + // ECParameters sequence + der.startSequence(); + + var version = Buffer.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + + // FieldID sequence + der.startSequence(); + der.writeOID('1.2.840.10045.1.1'); // prime-field + der.writeBuffer(curve.p, asn1.Ber.Integer); + der.endSequence(); + + // Curve sequence + der.startSequence(); + var a = curve.p; + if (a[0] === 0x0) + a = a.slice(1); + der.writeBuffer(a, asn1.Ber.OctetString); + der.writeBuffer(curve.b, asn1.Ber.OctetString); + der.writeBuffer(curve.s, asn1.Ber.BitString); + der.endSequence(); + + der.writeBuffer(curve.G, asn1.Ber.OctetString); + der.writeBuffer(curve.n, asn1.Ber.Integer); + var h = curve.h; + if (!h) { + h = Buffer.from([1]); + } + der.writeBuffer(h, asn1.Ber.Integer); + + // ECParameters + der.endSequence(); + } +} + +function writePkcs8ECDSAPublic(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); +} + +function writePkcs8ECDSAPrivate(key, der) { + writeECDSACurve(key, der); + der.endSequence(); + + der.startSequence(asn1.Ber.OctetString); + der.startSequence(); + + var version = Buffer.from([1]); + der.writeBuffer(version, asn1.Ber.Integer); + + der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); + + der.startSequence(0xa1); + var Q = utils.ecNormalize(key.part.Q.data, true); + der.writeBuffer(Q, asn1.Ber.BitString); + der.endSequence(); + + der.endSequence(); + der.endSequence(); +} + +function writePkcs8EdDSAPublic(key, der) { + der.endSequence(); + + utils.writeBitString(der, key.part.A.data); +} + +function writePkcs8EdDSAPrivate(key, der) { + der.endSequence(); + + var k = utils.mpNormalize(key.part.k.data, true); + der.startSequence(asn1.Ber.OctetString); + der.writeBuffer(k, asn1.Ber.OctetString); + der.endSequence(); +} + + +/***/ }), +/* 141 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2017 Joyent, Inc. + +module.exports = Identity; + +var assert = __webpack_require__(22); +var algs = __webpack_require__(37); +var crypto = __webpack_require__(21); +var Fingerprint = __webpack_require__(139); +var Signature = __webpack_require__(70); +var errs = __webpack_require__(69); +var util = __webpack_require__(9); +var utils = __webpack_require__(31); +var asn1 = __webpack_require__(66); +var Buffer = __webpack_require__(20).Buffer; + +/*JSSTYLED*/ +var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i; + +var oids = {}; +oids.cn = '2.5.4.3'; +oids.o = '2.5.4.10'; +oids.ou = '2.5.4.11'; +oids.l = '2.5.4.7'; +oids.s = '2.5.4.8'; +oids.c = '2.5.4.6'; +oids.sn = '2.5.4.4'; +oids.dc = '0.9.2342.19200300.100.1.25'; +oids.uid = '0.9.2342.19200300.100.1.1'; +oids.mail = '0.9.2342.19200300.100.1.3'; + +var unoids = {}; +Object.keys(oids).forEach(function (k) { + unoids[oids[k]] = k; +}); + +function Identity(opts) { + var self = this; + assert.object(opts, 'options'); + assert.arrayOfObject(opts.components, 'options.components'); + this.components = opts.components; + this.componentLookup = {}; + this.components.forEach(function (c) { + if (c.name && !c.oid) + c.oid = oids[c.name]; + if (c.oid && !c.name) + c.name = unoids[c.oid]; + if (self.componentLookup[c.name] === undefined) + self.componentLookup[c.name] = []; + self.componentLookup[c.name].push(c); + }); + if (this.componentLookup.cn && this.componentLookup.cn.length > 0) { + this.cn = this.componentLookup.cn[0].value; + } + assert.optionalString(opts.type, 'options.type'); + if (opts.type === undefined) { + if (this.components.length === 1 && + this.componentLookup.cn && + this.componentLookup.cn.length === 1 && + this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = 'host'; + this.hostname = this.componentLookup.cn[0].value; + + } else if (this.componentLookup.dc && + this.components.length === this.componentLookup.dc.length) { + this.type = 'host'; + this.hostname = this.componentLookup.dc.map( + function (c) { + return (c.value); + }).join('.'); + + } else if (this.componentLookup.uid && + this.components.length === + this.componentLookup.uid.length) { + this.type = 'user'; + this.uid = this.componentLookup.uid[0].value; + + } else if (this.componentLookup.cn && + this.componentLookup.cn.length === 1 && + this.componentLookup.cn[0].value.match(DNS_NAME_RE)) { + this.type = 'host'; + this.hostname = this.componentLookup.cn[0].value; + + } else if (this.componentLookup.uid && + this.componentLookup.uid.length === 1) { + this.type = 'user'; + this.uid = this.componentLookup.uid[0].value; + + } else if (this.componentLookup.mail && + this.componentLookup.mail.length === 1) { + this.type = 'email'; + this.email = this.componentLookup.mail[0].value; + + } else if (this.componentLookup.cn && + this.componentLookup.cn.length === 1) { + this.type = 'user'; + this.uid = this.componentLookup.cn[0].value; + + } else { + this.type = 'unknown'; + } + } else { + this.type = opts.type; + if (this.type === 'host') + this.hostname = opts.hostname; + else if (this.type === 'user') + this.uid = opts.uid; + else if (this.type === 'email') + this.email = opts.email; + else + throw (new Error('Unknown type ' + this.type)); + } +} + +Identity.prototype.toString = function () { + return (this.components.map(function (c) { + return (c.name.toUpperCase() + '=' + c.value); + }).join(', ')); +}; + +/* + * These are from X.680 -- PrintableString allowed chars are in section 37.4 + * table 8. Spec for IA5Strings is "1,6 + SPACE + DEL" where 1 refers to + * ISO IR #001 (standard ASCII control characters) and 6 refers to ISO IR #006 + * (the basic ASCII character set). + */ +/* JSSTYLED */ +var NOT_PRINTABLE = /[^a-zA-Z0-9 '(),+.\/:=?-]/; +/* JSSTYLED */ +var NOT_IA5 = /[^\x00-\x7f]/; + +Identity.prototype.toAsn1 = function (der, tag) { + der.startSequence(tag); + this.components.forEach(function (c) { + der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set); + der.startSequence(); + der.writeOID(c.oid); + /* + * If we fit in a PrintableString, use that. Otherwise use an + * IA5String or UTF8String. + * + * If this identity was parsed from a DN, use the ASN.1 types + * from the original representation (otherwise this might not + * be a full match for the original in some validators). + */ + if (c.asn1type === asn1.Ber.Utf8String || + c.value.match(NOT_IA5)) { + var v = Buffer.from(c.value, 'utf8'); + der.writeBuffer(v, asn1.Ber.Utf8String); + + } else if (c.asn1type === asn1.Ber.IA5String || + c.value.match(NOT_PRINTABLE)) { + der.writeString(c.value, asn1.Ber.IA5String); + + } else { + var type = asn1.Ber.PrintableString; + if (c.asn1type !== undefined) + type = c.asn1type; + der.writeString(c.value, type); + } + der.endSequence(); + der.endSequence(); + }); + der.endSequence(); +}; + +function globMatch(a, b) { + if (a === '**' || b === '**') + return (true); + var aParts = a.split('.'); + var bParts = b.split('.'); + if (aParts.length !== bParts.length) + return (false); + for (var i = 0; i < aParts.length; ++i) { + if (aParts[i] === '*' || bParts[i] === '*') + continue; + if (aParts[i] !== bParts[i]) + return (false); + } + return (true); +} + +Identity.prototype.equals = function (other) { + if (!Identity.isIdentity(other, [1, 0])) + return (false); + if (other.components.length !== this.components.length) + return (false); + for (var i = 0; i < this.components.length; ++i) { + if (this.components[i].oid !== other.components[i].oid) + return (false); + if (!globMatch(this.components[i].value, + other.components[i].value)) { + return (false); + } + } + return (true); +}; + +Identity.forHost = function (hostname) { + assert.string(hostname, 'hostname'); + return (new Identity({ + type: 'host', + hostname: hostname, + components: [ { name: 'cn', value: hostname } ] + })); +}; + +Identity.forUser = function (uid) { + assert.string(uid, 'uid'); + return (new Identity({ + type: 'user', + uid: uid, + components: [ { name: 'uid', value: uid } ] + })); +}; + +Identity.forEmail = function (email) { + assert.string(email, 'email'); + return (new Identity({ + type: 'email', + email: email, + components: [ { name: 'mail', value: email } ] + })); +}; + +Identity.parseDN = function (dn) { + assert.string(dn, 'dn'); + var parts = dn.split(','); + var cmps = parts.map(function (c) { + c = c.trim(); + var eqPos = c.indexOf('='); + var name = c.slice(0, eqPos).toLowerCase(); + var value = c.slice(eqPos + 1); + return ({ name: name, value: value }); + }); + return (new Identity({ components: cmps })); +}; + +Identity.parseAsn1 = function (der, top) { + var components = []; + der.readSequence(top); + var end = der.offset + der.length; + while (der.offset < end) { + der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set); + var after = der.offset + der.length; + der.readSequence(); + var oid = der.readOID(); + var type = der.peek(); + var value; + switch (type) { + case asn1.Ber.PrintableString: + case asn1.Ber.IA5String: + case asn1.Ber.OctetString: + case asn1.Ber.T61String: + value = der.readString(type); + break; + case asn1.Ber.Utf8String: + value = der.readString(type, true); + value = value.toString('utf8'); + break; + case asn1.Ber.CharacterString: + case asn1.Ber.BMPString: + value = der.readString(type, true); + value = value.toString('utf16le'); + break; + default: + throw (new Error('Unknown asn1 type ' + type)); + } + components.push({ oid: oid, asn1type: type, value: value }); + der._offset = after; + } + der._offset = end; + return (new Identity({ + components: components + })); +}; + +Identity.isIdentity = function (obj, ver) { + return (utils.isCompatible(obj, Identity, ver)); +}; + +/* + * API versions for Identity: + * [1,0] -- initial ver + */ +Identity.prototype._sshpkApiVersion = [1, 0]; + +Identity._oldVersionDetect = function (obj) { + return ([1, 0]); +}; + + +/***/ }), +/* 142 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = SSHBuffer; + +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; + +function SSHBuffer(opts) { + assert.object(opts, 'options'); + if (opts.buffer !== undefined) + assert.buffer(opts.buffer, 'options.buffer'); + + this._size = opts.buffer ? opts.buffer.length : 1024; + this._buffer = opts.buffer || Buffer.alloc(this._size); + this._offset = 0; +} + +SSHBuffer.prototype.toBuffer = function () { + return (this._buffer.slice(0, this._offset)); +}; + +SSHBuffer.prototype.atEnd = function () { + return (this._offset >= this._buffer.length); +}; + +SSHBuffer.prototype.remainder = function () { + return (this._buffer.slice(this._offset)); +}; + +SSHBuffer.prototype.skip = function (n) { + this._offset += n; +}; + +SSHBuffer.prototype.expand = function () { + this._size *= 2; + var buf = Buffer.alloc(this._size); + this._buffer.copy(buf, 0); + this._buffer = buf; +}; + +SSHBuffer.prototype.readPart = function () { + return ({data: this.readBuffer()}); +}; + +SSHBuffer.prototype.readBuffer = function () { + var len = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + assert.ok(this._offset + len <= this._buffer.length, + 'length out of bounds at +0x' + this._offset.toString(16) + + ' (data truncated?)'); + var buf = this._buffer.slice(this._offset, this._offset + len); + this._offset += len; + return (buf); +}; + +SSHBuffer.prototype.readString = function () { + return (this.readBuffer().toString()); +}; + +SSHBuffer.prototype.readCString = function () { + var offset = this._offset; + while (offset < this._buffer.length && + this._buffer[offset] !== 0x00) + offset++; + assert.ok(offset < this._buffer.length, 'c string does not terminate'); + var str = this._buffer.slice(this._offset, offset).toString(); + this._offset = offset + 1; + return (str); +}; + +SSHBuffer.prototype.readInt = function () { + var v = this._buffer.readUInt32BE(this._offset); + this._offset += 4; + return (v); +}; + +SSHBuffer.prototype.readInt64 = function () { + assert.ok(this._offset + 8 < this._buffer.length, + 'buffer not long enough to read Int64'); + var v = this._buffer.slice(this._offset, this._offset + 8); + this._offset += 8; + return (v); +}; + +SSHBuffer.prototype.readChar = function () { + var v = this._buffer[this._offset++]; + return (v); +}; + +SSHBuffer.prototype.writeBuffer = function (buf) { + while (this._offset + 4 + buf.length > this._size) + this.expand(); + this._buffer.writeUInt32BE(buf.length, this._offset); + this._offset += 4; + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; + +SSHBuffer.prototype.writeString = function (str) { + this.writeBuffer(Buffer.from(str, 'utf8')); +}; + +SSHBuffer.prototype.writeCString = function (str) { + while (this._offset + 1 + str.length > this._size) + this.expand(); + this._buffer.write(str, this._offset); + this._offset += str.length; + this._buffer[this._offset++] = 0; +}; + +SSHBuffer.prototype.writeInt = function (v) { + while (this._offset + 4 > this._size) + this.expand(); + this._buffer.writeUInt32BE(v, this._offset); + this._offset += 4; +}; + +SSHBuffer.prototype.writeInt64 = function (v) { + assert.buffer(v, 'value'); + if (v.length > 8) { + var lead = v.slice(0, v.length - 8); + for (var i = 0; i < lead.length; ++i) { + assert.strictEqual(lead[i], 0, + 'must fit in 64 bits of precision'); + } + v = v.slice(v.length - 8, v.length); + } + while (this._offset + 8 > this._size) + this.expand(); + v.copy(this._buffer, this._offset); + this._offset += 8; +}; + +SSHBuffer.prototype.writeChar = function (v) { + while (this._offset + 1 > this._size) + this.expand(); + this._buffer[this._offset++] = v; +}; + +SSHBuffer.prototype.writePart = function (p) { + this.writeBuffer(p.data); +}; + +SSHBuffer.prototype.write = function (buf) { + while (this._offset + buf.length > this._size) + this.expand(); + buf.copy(this._buffer, this._offset); + this._offset += buf.length; +}; + /***/ }), /* 143 */ /***/ (function(module, exports) { -module.exports = require("https"); +module.exports = require("tty"); /***/ }), /* 144 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { -module.exports = require("querystring"); +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(41)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +exports.extractWorkspaces = extractWorkspaces; + +var _executeLifecycleScript; + +function _load_executeLifecycleScript() { + return _executeLifecycleScript = __webpack_require__(115); +} + +var _path; + +function _load_path() { + return _path = __webpack_require__(315); +} + +var _conversion; + +function _load_conversion() { + return _conversion = __webpack_require__(267); +} + +var _index; + +function _load_index() { + return _index = _interopRequireDefault(__webpack_require__(200)); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(14)); +} + +var _packageConstraintResolver; + +function _load_packageConstraintResolver() { + return _packageConstraintResolver = _interopRequireDefault(__webpack_require__(536)); +} + +var _requestManager; + +function _load_requestManager() { + return _requestManager = _interopRequireDefault(__webpack_require__(317)); +} + +var _index2; + +function _load_index2() { + return _index2 = __webpack_require__(59); +} + +var _index3; + +function _load_index3() { + return _index3 = __webpack_require__(182); +} + +var _map2; + +function _load_map2() { + return _map2 = _interopRequireDefault(__webpack_require__(50)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var detectIndent = __webpack_require__(679); +var invariant = __webpack_require__(13); +var path = __webpack_require__(2); +var micromatch = __webpack_require__(102); +var isCi = __webpack_require__(232); + +function sortObject(object) { + var sortedObject = {}; + (0, (_keys || _load_keys()).default)(object).sort().forEach(function (item) { + sortedObject[item] = object[item]; + }); + return sortedObject; +} + +var Config = function () { + function Config(reporter) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Config); + + this.constraintResolver = new (_packageConstraintResolver || _load_packageConstraintResolver()).default(this, reporter); + this.requestManager = new (_requestManager || _load_requestManager()).default(reporter); + this.reporter = reporter; + this._init({}); + } + + // + + + // + + + // cache packages in offline mirror folder as new .tgz files + + + // + + + // + + + // + + + // + + + // + + + // + + + // + + + // + + + // + + + // + + + // + + + // + + + // Whether we should ignore executing lifecycle scripts + + + // + + + // + + + // + + + // + + + /** + * Execute a promise produced by factory if it doesn't exist in our cache with + * the associated key. + */ + + Config.prototype.getCache = function getCache(key, factory) { + var _this = this; + + var cached = this.cache[key]; + if (cached) { + return cached; + } + + return this.cache[key] = factory().catch(function (err) { + _this.cache[key] = null; + throw err; + }); + }; + + /** + * Get a config option from our yarn config. + */ + + Config.prototype.getOption = function getOption(key) { + var resolve = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var value = this.registries.yarn.getOption(key); + + if (resolve && typeof value === 'string' && value.length) { + return (0, (_path || _load_path()).resolveWithHome)(value); + } + + return value; + }; + + /** + * Reduce a list of versions to a single one based on an input range. + */ + + Config.prototype.resolveConstraints = function resolveConstraints(versions, range) { + return this.constraintResolver.reduce(versions, range); + }; + + /** + * Initialise config. Fetch registry options, find package roots. + */ + + Config.prototype.init = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _this2 = this; + + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this._init(opts); + + this.workspaceRootFolder = yield this.findWorkspaceRoot(this.cwd); + this.lockfileFolder = this.workspaceRootFolder || this.cwd; + + // using focus in a workspace root is not allowed + if (this.focus && (!this.workspaceRootFolder || this.cwd === this.workspaceRootFolder)) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesFocusRootCheck')); + } + + if (this.focus) { + var focusedWorkspaceManifest = yield this.readRootManifest(); + this.focusedWorkspaceName = focusedWorkspaceManifest.name; + } + + this.linkedModules = []; + + var linkedModules = void 0; + try { + linkedModules = yield (_fs || _load_fs()).readdir(this.linkFolder); + } catch (err) { + if (err.code === 'ENOENT') { + linkedModules = []; + } else { + throw err; + } + } + + var _loop = function* _loop(dir) { + var linkedPath = path.join(_this2.linkFolder, dir); + + if (dir[0] === '@') { + var _linkedModules; + + // it's a scope, not a package + var scopedLinked = yield (_fs || _load_fs()).readdir(linkedPath); + (_linkedModules = _this2.linkedModules).push.apply(_linkedModules, scopedLinked.map(function (scopedDir) { + return path.join(dir, scopedDir); + })); + } else { + _this2.linkedModules.push(dir); + } + }; + + for (var _iterator = linkedModules, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var dir = _ref2; + yield* _loop(dir); + } + + for (var _iterator2 = (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var _key = _ref3; + + var Registry = (_index2 || _load_index2()).registries[_key]; + + var extraneousRcFiles = Registry === (_index2 || _load_index2()).registries.yarn ? this.extraneousYarnrcFiles : []; + + // instantiate registry + var _registry = new Registry(this.cwd, this.registries, this.requestManager, this.reporter, this.enableDefaultRc, extraneousRcFiles); + yield _registry.init({ + registry: opts.registry + }); + + this.registries[_key] = _registry; + if (this.registryFolders.indexOf(_registry.folder) === -1) { + this.registryFolders.push(_registry.folder); + } + var rootModuleFolder = path.join(this.cwd, _registry.folder); + if (this.rootModuleFolders.indexOf(rootModuleFolder) === -1) { + this.rootModuleFolders.push(rootModuleFolder); + } + } + + if (this.modulesFolder) { + this.registryFolders.push(this.modulesFolder); + } + + this.networkConcurrency = opts.networkConcurrency || Number(this.getOption('network-concurrency')) || (_constants || _load_constants()).NETWORK_CONCURRENCY; + + this.childConcurrency = opts.childConcurrency || Number(this.getOption('child-concurrency')) || Number(process.env.CHILD_CONCURRENCY) || (_constants || _load_constants()).CHILD_CONCURRENCY; + + this.networkTimeout = opts.networkTimeout || Number(this.getOption('network-timeout')) || (_constants || _load_constants()).NETWORK_TIMEOUT; + + var httpProxy = opts.httpProxy || this.getOption('proxy'); + var httpsProxy = opts.httpsProxy || this.getOption('https-proxy'); + this.requestManager.setOptions({ + userAgent: String(this.getOption('user-agent')), + httpProxy: httpProxy === false ? false : String(httpProxy || ''), + httpsProxy: httpsProxy === false ? false : String(httpsProxy || ''), + strictSSL: Boolean(this.getOption('strict-ssl')), + ca: Array.prototype.concat(opts.ca || this.getOption('ca') || []).map(String), + cafile: String(opts.cafile || this.getOption('cafile', true) || ''), + cert: String(opts.cert || this.getOption('cert') || ''), + key: String(opts.key || this.getOption('key') || ''), + networkConcurrency: this.networkConcurrency, + networkTimeout: this.networkTimeout + }); + + var cacheRootFolder = opts.cacheFolder || this.getOption('cache-folder', true); + + if (!cacheRootFolder) { + var preferredCacheFolders = (_constants || _load_constants()).PREFERRED_MODULE_CACHE_DIRECTORIES; + var preferredCacheFolder = opts.preferredCacheFolder || this.getOption('preferred-cache-folder', true); + + if (preferredCacheFolder) { + preferredCacheFolders = [String(preferredCacheFolder)].concat(preferredCacheFolders); + } + + var cacheFolderQuery = yield (_fs || _load_fs()).getFirstSuitableFolder(preferredCacheFolders, (_fs || _load_fs()).constants.W_OK | (_fs || _load_fs()).constants.X_OK | (_fs || _load_fs()).constants.R_OK // eslint-disable-line no-bitwise + ); + for (var _iterator3 = cacheFolderQuery.skipped, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + var skippedEntry = _ref4; + + this.reporter.warn(this.reporter.lang('cacheFolderSkipped', skippedEntry.folder)); + } + + cacheRootFolder = cacheFolderQuery.folder; + if (cacheRootFolder && cacheFolderQuery.skipped.length > 0) { + this.reporter.warn(this.reporter.lang('cacheFolderSelected', cacheRootFolder)); + } + } + + if (!cacheRootFolder) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('cacheFolderMissing')); + } else { + this._cacheRootFolder = String(cacheRootFolder); + } + + var manifest = yield this.maybeReadManifest(this.cwd); + + var plugnplayByEnv = this.getOption('plugnplay-override'); + if (plugnplayByEnv != null) { + this.plugnplayEnabled = plugnplayByEnv !== 'false' && plugnplayByEnv !== '0'; + this.plugnplayPersist = false; + } else if (opts.enablePnp || opts.disablePnp) { + this.plugnplayEnabled = !!opts.enablePnp; + this.plugnplayPersist = true; + } else if (manifest && manifest.installConfig && manifest.installConfig.pnp) { + this.plugnplayEnabled = !!manifest.installConfig.pnp; + this.plugnplayPersist = false; + } else { + this.plugnplayEnabled = false; + this.plugnplayEnabled = false; + } + + if (process.platform === 'win32') { + var cacheRootFolderDrive = path.parse(this._cacheRootFolder).root; + var lockfileFolderDrive = path.parse(this.lockfileFolder).root; + + if (cacheRootFolderDrive !== lockfileFolderDrive) { + if (this.plugnplayEnabled) { + this.reporter.warn(this.reporter.lang('plugnplayWindowsSupport')); + } + this.plugnplayEnabled = false; + this.plugnplayPersist = false; + } + } + + this.plugnplayShebang = String(this.getOption('plugnplay-shebang') || '') || '/usr/bin/env node'; + this.plugnplayBlacklist = String(this.getOption('plugnplay-blacklist') || '') || null; + + this.workspacesEnabled = this.getOption('workspaces-experimental') !== false; + this.workspacesNohoistEnabled = this.getOption('workspaces-nohoist-experimental') !== false; + + this.offlineCacheFolder = String(this.getOption('offline-cache-folder') || '') || null; + + this.pruneOfflineMirror = Boolean(this.getOption('yarn-offline-mirror-pruning')); + this.enableMetaFolder = Boolean(this.getOption('enable-meta-folder')); + this.enableLockfileVersions = Boolean(this.getOption('yarn-enable-lockfile-versions')); + this.linkFileDependencies = Boolean(this.getOption('yarn-link-file-dependencies')); + this.packBuiltPackages = Boolean(this.getOption('experimental-pack-script-packages-in-mirror')); + + this.autoAddIntegrity = !(0, (_conversion || _load_conversion()).boolifyWithDefault)(String(this.getOption('unsafe-disable-integrity-migration')), true); + + //init & create cacheFolder, tempFolder + this.cacheFolder = path.join(this._cacheRootFolder, 'v' + String((_constants || _load_constants()).CACHE_VERSION)); + this.tempFolder = opts.tempFolder || path.join(this.cacheFolder, '.tmp'); + yield (_fs || _load_fs()).mkdirp(this.cacheFolder); + yield (_fs || _load_fs()).mkdirp(this.tempFolder); + + if (opts.production !== undefined) { + this.production = Boolean(opts.production); + } else { + this.production = Boolean(this.getOption('production')) || process.env.NODE_ENV === 'production' && process.env.NPM_CONFIG_PRODUCTION !== 'false' && process.env.YARN_PRODUCTION !== 'false'; + } + + if (this.workspaceRootFolder && !this.workspacesEnabled) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesDisabled')); + } + }); + + function init() { + return _ref.apply(this, arguments); + } + + return init; + }(); + + Config.prototype._init = function _init(opts) { + this.rootModuleFolders = []; + this.registryFolders = []; + this.linkedModules = []; + + this.registries = (0, (_map2 || _load_map2()).default)(); + this.cache = (0, (_map2 || _load_map2()).default)(); + + // Ensure the cwd is always an absolute path. + this.cwd = path.resolve(opts.cwd || this.cwd || process.cwd()); + + this.looseSemver = opts.looseSemver == undefined ? true : opts.looseSemver; + + this.commandName = opts.commandName || ''; + + this.enableDefaultRc = opts.enableDefaultRc !== false; + this.extraneousYarnrcFiles = opts.extraneousYarnrcFiles || []; + + this.preferOffline = !!opts.preferOffline; + this.modulesFolder = opts.modulesFolder; + this.globalFolder = opts.globalFolder || (_constants || _load_constants()).GLOBAL_MODULE_DIRECTORY; + this.linkFolder = opts.linkFolder || (_constants || _load_constants()).LINK_REGISTRY_DIRECTORY; + this.offline = !!opts.offline; + this.binLinks = !!opts.binLinks; + this.updateChecksums = !!opts.updateChecksums; + this.plugnplayUnplugged = []; + this.plugnplayPurgeUnpluggedPackages = false; + + this.ignorePlatform = !!opts.ignorePlatform; + this.ignoreScripts = !!opts.ignoreScripts; + + this.disablePrepublish = !!opts.disablePrepublish; + + // $FlowFixMe$ + this.nonInteractive = !!opts.nonInteractive || isCi || !process.stdout.isTTY; + + this.scriptsPrependNodePath = !!opts.scriptsPrependNodePath; + + this.requestManager.setOptions({ + offline: !!opts.offline && !opts.preferOffline, + captureHar: !!opts.captureHar + }); + + if (this.modulesFolder) { + this.rootModuleFolders.push(this.modulesFolder); + } + + this.focus = !!opts.focus; + this.focusedWorkspaceName = ''; + + this.otp = opts.otp || ''; + }; + + /** + * Generate a name suitable as unique filesystem identifier for the specified package. + */ + + Config.prototype.generateUniquePackageSlug = function generateUniquePackageSlug(pkg) { + var slug = pkg.name; + + slug = slug.replace(/[^@a-z0-9]+/g, '-'); + slug = slug.replace(/^-+|-+$/g, ''); + + if (pkg.registry) { + slug = `${pkg.registry}-${slug}`; + } else { + slug = `unknown-${slug}`; + } + + var hash = pkg.remote.hash; + + + if (pkg.version) { + slug += `-${pkg.version}`; + } + + if (pkg.uid && pkg.version !== pkg.uid) { + slug += `-${pkg.uid}`; + } else if (hash) { + slug += `-${hash}`; + } + + return slug; + }; + + /** + * Generate an absolute module path. + */ + + Config.prototype.generateModuleCachePath = function generateModuleCachePath(pkg) { + invariant(this.cacheFolder, 'No package root'); + invariant(pkg, 'Undefined package'); + + var slug = this.generateUniquePackageSlug(pkg); + return path.join(this.cacheFolder, slug, 'node_modules', pkg.name); + }; + + /** + */ + + Config.prototype.getUnpluggedPath = function getUnpluggedPath() { + return path.join(this.lockfileFolder, '.pnp', 'unplugged'); + }; + + /** + */ + + Config.prototype.generatePackageUnpluggedPath = function generatePackageUnpluggedPath(pkg) { + var slug = this.generateUniquePackageSlug(pkg); + return path.join(this.getUnpluggedPath(), slug, 'node_modules', pkg.name); + }; + + /** + */ + + Config.prototype.listUnpluggedPackageFolders = function () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var unpluggedPackages = new (_map || _load_map()).default(); + var unpluggedPath = this.getUnpluggedPath(); + + if (!(yield (_fs || _load_fs()).exists(unpluggedPath))) { + return unpluggedPackages; + } + + for (var _iterator4 = yield (_fs || _load_fs()).readdir(unpluggedPath), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref6; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref6 = _i4.value; + } + + var unpluggedName = _ref6; + + var nmListing = yield (_fs || _load_fs()).readdir(path.join(unpluggedPath, unpluggedName, 'node_modules')); + invariant(nmListing.length === 1, 'A single folder should be in the unplugged directory'); + + var target = path.join(unpluggedPath, unpluggedName, `node_modules`, nmListing[0]); + unpluggedPackages.set(unpluggedName, target); + } + + return unpluggedPackages; + }); + + function listUnpluggedPackageFolders() { + return _ref5.apply(this, arguments); + } + + return listUnpluggedPackageFolders; + }(); + + /** + * Execute lifecycle scripts in the specified directory. Ignoring when the --ignore-scripts flag has been + * passed. + */ + + Config.prototype.executeLifecycleScript = function executeLifecycleScript(commandName, cwd) { + if (this.ignoreScripts) { + return (_promise || _load_promise()).default.resolve(); + } else { + return (0, (_executeLifecycleScript || _load_executeLifecycleScript()).execFromManifest)(this, commandName, cwd || this.cwd); + } + }; + + /** + * Generate an absolute temporary filename location based on the input filename. + */ + + Config.prototype.getTemp = function getTemp(filename) { + invariant(this.tempFolder, 'No temp folder'); + return path.join(this.tempFolder, filename); + }; + + /** + * Remote packages may be cached in a file system to be available for offline installation. + * Second time the same package needs to be installed it will be loaded from there. + * Given a package's filename, return a path in the offline mirror location. + */ + + Config.prototype.getOfflineMirrorPath = function getOfflineMirrorPath(packageFilename) { + var mirrorPath = void 0; + + var _arr = ['npm', 'yarn']; + for (var _i5 = 0; _i5 < _arr.length; _i5++) { + var _key2 = _arr[_i5]; + var _registry2 = this.registries[_key2]; + + if (_registry2 == null) { + continue; + } + + var registryMirrorPath = _registry2.config['yarn-offline-mirror']; + + if (registryMirrorPath === false) { + return null; + } + + if (registryMirrorPath == null) { + continue; + } + + mirrorPath = registryMirrorPath; + } + + if (mirrorPath == null) { + return null; + } + + if (packageFilename == null) { + return mirrorPath; + } + + return path.join(mirrorPath, path.basename(packageFilename)); + }; + + /** + * Checker whether the folder input is a valid module folder. We output a yarn metadata + * file when we've successfully setup a folder so use this as a marker. + */ + + Config.prototype.isValidModuleDest = function () { + var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dest) { + if (!(yield (_fs || _load_fs()).exists(dest))) { + return false; + } + + if (!(yield (_fs || _load_fs()).exists(path.join(dest, (_constants || _load_constants()).METADATA_FILENAME)))) { + return false; + } + + return true; + }); + + function isValidModuleDest(_x3) { + return _ref7.apply(this, arguments); + } + + return isValidModuleDest; + }(); + + /** + * Read package metadata and normalized package info. + */ + + Config.prototype.readPackageMetadata = function readPackageMetadata(dir) { + var _this3 = this; + + return this.getCache(`metadata-${dir}`, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var metadata = yield _this3.readJson(path.join(dir, (_constants || _load_constants()).METADATA_FILENAME)); + var pkg = yield _this3.readManifest(dir, metadata.registry); + + return { + package: pkg, + artifacts: metadata.artifacts || [], + hash: metadata.hash, + remote: metadata.remote, + registry: metadata.registry + }; + })); + }; + + /** + * Read normalized package info according yarn-metadata.json + * throw an error if package.json was not found + */ + + Config.prototype.readManifest = function readManifest(dir, priorityRegistry) { + var _this4 = this; + + var isRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + return this.getCache(`manifest-${dir}`, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var manifest = yield _this4.maybeReadManifest(dir, priorityRegistry, isRoot); + + if (manifest) { + return manifest; + } else { + throw new (_errors || _load_errors()).MessageError(_this4.reporter.lang('couldntFindPackagejson', dir), 'ENOENT'); + } + })); + }; + + /** + * try get the manifest file by looking + * 1. manifest file in cache + * 2. manifest file in registry + */ + + + Config.prototype.maybeReadManifest = function () { + var _ref10 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, priorityRegistry) { + var isRoot = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var metadataLoc = path.join(dir, (_constants || _load_constants()).METADATA_FILENAME); + + if (yield (_fs || _load_fs()).exists(metadataLoc)) { + var metadata = yield this.readJson(metadataLoc); + + if (!priorityRegistry) { + priorityRegistry = metadata.priorityRegistry; + } + + if (typeof metadata.manifest !== 'undefined') { + return metadata.manifest; + } + } + + if (priorityRegistry) { + var file = yield this.tryManifest(dir, priorityRegistry, isRoot); + if (file) { + return file; + } + } + + for (var _iterator5 = (0, (_keys || _load_keys()).default)((_index2 || _load_index2()).registries), _isArray5 = Array.isArray(_iterator5), _i6 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { + var _ref11; + + if (_isArray5) { + if (_i6 >= _iterator5.length) break; + _ref11 = _iterator5[_i6++]; + } else { + _i6 = _iterator5.next(); + if (_i6.done) break; + _ref11 = _i6.value; + } + + var _registry3 = _ref11; + + if (priorityRegistry === _registry3) { + continue; + } + + var _file = yield this.tryManifest(dir, _registry3, isRoot); + if (_file) { + return _file; + } + } + + return null; + }); + + function maybeReadManifest(_x5, _x6) { + return _ref10.apply(this, arguments); + } + + return maybeReadManifest; + }(); + + /** + * Read the root manifest. + */ + + Config.prototype.readRootManifest = function readRootManifest() { + return this.readManifest(this.cwd, 'npm', true); + }; + + /** + * Try and find package info with the input directory and registry. + */ + + Config.prototype.tryManifest = function () { + var _ref12 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, registry, isRoot) { + var filename = (_index2 || _load_index2()).registries[registry].filename; + + var loc = path.join(dir, filename); + if (yield (_fs || _load_fs()).exists(loc)) { + var data = yield this.readJson(loc); + data._registry = registry; + data._loc = loc; + return (0, (_index || _load_index()).default)(data, dir, this, isRoot); + } else { + return null; + } + }); + + function tryManifest(_x8, _x9, _x10) { + return _ref12.apply(this, arguments); + } + + return tryManifest; + }(); + + Config.prototype.findManifest = function () { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, isRoot) { + for (var _iterator6 = (_index2 || _load_index2()).registryNames, _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { + var _ref14; + + if (_isArray6) { + if (_i7 >= _iterator6.length) break; + _ref14 = _iterator6[_i7++]; + } else { + _i7 = _iterator6.next(); + if (_i7.done) break; + _ref14 = _i7.value; + } + + var _registry4 = _ref14; + + var manifest = yield this.tryManifest(dir, _registry4, isRoot); + + if (manifest) { + return manifest; + } + } + + return null; + }); + + function findManifest(_x11, _x12) { + return _ref13.apply(this, arguments); + } + + return findManifest; + }(); + + Config.prototype.findWorkspaceRoot = function () { + var _ref15 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (initial) { + var previous = null; + var current = path.normalize(initial); + if (!(yield (_fs || _load_fs()).exists(current))) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('folderMissing', current)); + } + + do { + var manifest = yield this.findManifest(current, true); + var ws = extractWorkspaces(manifest); + if (ws && ws.packages) { + var relativePath = path.relative(current, initial); + if (relativePath === '' || micromatch([relativePath], ws.packages).length > 0) { + return current; + } else { + return null; + } + } + + previous = current; + current = path.dirname(current); + } while (current !== previous); + + return null; + }); + + function findWorkspaceRoot(_x13) { + return _ref15.apply(this, arguments); + } + + return findWorkspaceRoot; + }(); + + Config.prototype.resolveWorkspaces = function () { + var _ref16 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (root, rootManifest) { + var _this5 = this; + + var workspaces = {}; + if (!this.workspacesEnabled) { + return workspaces; + } + + var ws = this.getWorkspaces(rootManifest, true); + var patterns = ws && ws.packages ? ws.packages : []; + + if (!Array.isArray(patterns)) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesSettingMustBeArray')); + } + + var registryFilenames = (_index2 || _load_index2()).registryNames.map(function (registryName) { + return _this5.registries[registryName].constructor.filename; + }).join('|'); + var trailingPattern = `/+(${registryFilenames})`; + // anything under folder (node_modules) should be ignored, thus use the '**' instead of shallow match "*" + var ignorePatterns = this.registryFolders.map(function (folder) { + return `/${folder}/**/+(${registryFilenames})`; + }); + + var files = yield (_promise || _load_promise()).default.all(patterns.map(function (pattern) { + return (_fs || _load_fs()).glob(pattern.replace(/\/?$/, trailingPattern), { + cwd: root, + ignore: ignorePatterns.map(function (ignorePattern) { + return pattern.replace(/\/?$/, ignorePattern); + }) + }); + })); + + for (var _iterator7 = new (_set || _load_set()).default((_ref18 = []).concat.apply(_ref18, files)), _isArray7 = Array.isArray(_iterator7), _i8 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { + var _ref18; + + var _ref17; + + if (_isArray7) { + if (_i8 >= _iterator7.length) break; + _ref17 = _iterator7[_i8++]; + } else { + _i8 = _iterator7.next(); + if (_i8.done) break; + _ref17 = _i8.value; + } + + var file = _ref17; + + var _loc = path.join(root, path.dirname(file)); + var manifest = yield this.findManifest(_loc, false); + + if (!manifest) { + continue; + } + + if (!manifest.name) { + this.reporter.warn(this.reporter.lang('workspaceNameMandatory', _loc)); + continue; + } + if (!manifest.version) { + this.reporter.warn(this.reporter.lang('workspaceVersionMandatory', _loc)); + continue; + } + + if (Object.prototype.hasOwnProperty.call(workspaces, manifest.name)) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspaceNameDuplicate', manifest.name)); + } + + workspaces[manifest.name] = { loc: _loc, manifest }; + } + + return workspaces; + }); + + function resolveWorkspaces(_x14, _x15) { + return _ref16.apply(this, arguments); + } + + return resolveWorkspaces; + }(); + + // workspaces functions + + + Config.prototype.getWorkspaces = function getWorkspaces(manifest) { + var shouldThrow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (!manifest || !this.workspacesEnabled) { + return undefined; + } + + var ws = extractWorkspaces(manifest); + + if (!ws) { + return ws; + } + + // validate eligibility + var wsCopy = (0, (_extends2 || _load_extends()).default)({}, ws); + var warnings = []; + var errors = []; + + // packages + if (wsCopy.packages && wsCopy.packages.length > 0 && !manifest.private) { + errors.push(this.reporter.lang('workspacesRequirePrivateProjects')); + wsCopy = undefined; + } + // nohoist + if (wsCopy && wsCopy.nohoist && wsCopy.nohoist.length > 0) { + if (!this.workspacesNohoistEnabled) { + warnings.push(this.reporter.lang('workspacesNohoistDisabled', manifest.name)); + wsCopy.nohoist = undefined; + } else if (!manifest.private) { + errors.push(this.reporter.lang('workspacesNohoistRequirePrivatePackages', manifest.name)); + wsCopy.nohoist = undefined; + } + } + + if (errors.length > 0 && shouldThrow) { + throw new (_errors || _load_errors()).MessageError(errors.join('\n')); + } + + var msg = errors.concat(warnings).join('\n'); + if (msg.length > 0) { + this.reporter.warn(msg); + } + + return wsCopy; + }; + + /** + * Description + */ + + Config.prototype.getFolder = function getFolder(pkg) { + var registryName = pkg._registry; + if (!registryName) { + var ref = pkg._reference; + invariant(ref, 'expected reference'); + registryName = ref.registry; + } + return this.registries[registryName].folder; + }; + + /** + * Get root manifests. + */ + + Config.prototype.getRootManifests = function () { + var _ref19 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var manifests = {}; + for (var _iterator8 = (_index2 || _load_index2()).registryNames, _isArray8 = Array.isArray(_iterator8), _i9 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) { + var _ref20; + + if (_isArray8) { + if (_i9 >= _iterator8.length) break; + _ref20 = _iterator8[_i9++]; + } else { + _i9 = _iterator8.next(); + if (_i9.done) break; + _ref20 = _i9.value; + } + + var _registryName = _ref20; + + var _registry5 = (_index2 || _load_index2()).registries[_registryName]; + var jsonLoc = path.join(this.cwd, _registry5.filename); + + var _object = {}; + var _exists = false; + var _indent = void 0; + if (yield (_fs || _load_fs()).exists(jsonLoc)) { + _exists = true; + + var info = yield this.readJson(jsonLoc, (_fs || _load_fs()).readJsonAndFile); + _object = info.object; + _indent = detectIndent(info.content).indent || undefined; + } + manifests[_registryName] = { loc: jsonLoc, object: _object, exists: _exists, indent: _indent }; + } + return manifests; + }); + + function getRootManifests() { + return _ref19.apply(this, arguments); + } + + return getRootManifests; + }(); + + /** + * Save root manifests. + */ + + Config.prototype.saveRootManifests = function () { + var _ref21 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (manifests) { + for (var _iterator9 = (_index2 || _load_index2()).registryNames, _isArray9 = Array.isArray(_iterator9), _i10 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) { + var _ref22; + + if (_isArray9) { + if (_i10 >= _iterator9.length) break; + _ref22 = _iterator9[_i10++]; + } else { + _i10 = _iterator9.next(); + if (_i10.done) break; + _ref22 = _i10.value; + } + + var _registryName2 = _ref22; + var _manifests$_registryN = manifests[_registryName2], + _loc2 = _manifests$_registryN.loc, + _object2 = _manifests$_registryN.object, + _exists2 = _manifests$_registryN.exists, + _indent2 = _manifests$_registryN.indent; + + if (!_exists2 && !(0, (_keys || _load_keys()).default)(_object2).length) { + continue; + } + + for (var _iterator10 = (_constants || _load_constants()).DEPENDENCY_TYPES, _isArray10 = Array.isArray(_iterator10), _i11 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator10);;) { + var _ref23; + + if (_isArray10) { + if (_i11 >= _iterator10.length) break; + _ref23 = _iterator10[_i11++]; + } else { + _i11 = _iterator10.next(); + if (_i11.done) break; + _ref23 = _i11.value; + } + + var field = _ref23; + + if (_object2[field]) { + _object2[field] = sortObject(_object2[field]); + } + } + + yield (_fs || _load_fs()).writeFilePreservingEol(_loc2, (0, (_stringify || _load_stringify()).default)(_object2, null, _indent2 || (_constants || _load_constants()).DEFAULT_INDENT) + '\n'); + } + }); + + function saveRootManifests(_x17) { + return _ref21.apply(this, arguments); + } + + return saveRootManifests; + }(); + + /** + * Call the passed factory (defaults to fs.readJson) and rethrow a pretty error message if it was the result + * of a syntax error. + */ + + Config.prototype.readJson = function readJson(loc) { + var factory = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (_fs || _load_fs()).readJson; + + try { + return factory(loc); + } catch (err) { + if (err instanceof SyntaxError) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('jsonError', loc, err.message)); + } else { + throw err; + } + } + }; + + Config.create = function () { + var _ref24 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var reporter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new (_index3 || _load_index3()).NoopReporter(); + + var config = new Config(reporter); + yield config.init(opts); + return config; + }); + + function create() { + return _ref24.apply(this, arguments); + } + + return create; + }(); + + return Config; +}(); + +exports.default = Config; +function extractWorkspaces(manifest) { + if (!manifest || !manifest.workspaces) { + return undefined; + } + + if (Array.isArray(manifest.workspaces)) { + return { packages: manifest.workspaces }; + } + + if (manifest.workspaces.packages && Array.isArray(manifest.workspaces.packages) || manifest.workspaces.nohoist && Array.isArray(manifest.workspaces.nohoist)) { + return manifest.workspaces; + } + + return undefined; +} /***/ }), /* 145 */ /***/ (function(module, exports) { -module.exports = require("readline"); +module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if(!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; + /***/ }), /* 146 */ +/***/ (function(module, exports) { + +module.exports = require("net"); + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var chalk = __webpack_require__(35); +var figures = __webpack_require__(229); + +/** + * Separator object + * Used to space/separate choices group + * @constructor + * @param {String} line Separation line content (facultative) + */ + +var Separator = function () { + function Separator(line) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Separator); + + this.type = 'separator'; + this.line = chalk.dim(line || new Array(15).join(figures.line)); + } + + /** + * Stringify separator + * @return {String} the separator display string + */ + + + Separator.prototype.toString = function toString() { + return this.line; + }; + + return Separator; +}(); + +/** + * Helper function returning false if object is a separator + * @param {Object} obj object to test against + * @return {Boolean} `false` if object is a separator + */ + +Separator.exclude = function (obj) { + return obj.type !== 'separator'; +}; + +module.exports = Separator; + +/***/ }), +/* 148 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var chalk = __webpack_require__(35); + +/** + * The paginator keeps track of a pointer index in a list and returns + * a subset of the choices if the list is too long. + */ + +var Paginator = function () { + function Paginator(screen) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Paginator); + + this.pointer = 0; + this.lastIndex = 0; + this.screen = screen; + } + + Paginator.prototype.paginate = function paginate(output, active, pageSize) { + pageSize = pageSize || 7; + var middleOfList = Math.floor(pageSize / 2); + var lines = output.split('\n'); + + if (this.screen) { + lines = this.screen.breakLines(lines); + active = _.sum(lines.map(function (lineParts) { + return lineParts.length; + }).splice(0, active)); + lines = _.flatten(lines); + } + + // Make sure there's enough lines to paginate + if (lines.length <= pageSize) { + return output; + } + + // Move the pointer only when the user go down and limit it to the middle of the list + if (this.pointer < middleOfList && this.lastIndex < active && active - this.lastIndex < pageSize) { + this.pointer = Math.min(middleOfList, this.pointer + active - this.lastIndex); + } + this.lastIndex = active; + + // Duplicate the lines so it give an infinite list look + var infinite = _.flatten([lines, lines, lines]); + var topIndex = Math.max(0, active + lines.length - this.pointer); + + var section = infinite.splice(topIndex, pageSize).join('\n'); + return section + '\n' + chalk.dim('(Move up and down to reveal more choices)'); + }; + + return Paginator; +}(); + +module.exports = Paginator; + +/***/ }), +/* 149 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = exports.Add = undefined; + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +var run = exports.run = function () { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (!args.length) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('missingAddDependencies')); + } + + var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + + yield (0, (_install || _load_install()).wrapLifecycle)(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var install = new Add(args, flags, config, reporter, lockfile); + yield install.init(); + })); + }); + + return function run(_x5, _x6, _x7, _x8) { + return _ref13.apply(this, arguments); + }; +}(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(24)); +} + +var _normalizePattern2; + +function _load_normalizePattern() { + return _normalizePattern2 = __webpack_require__(51); +} + +var _workspaceLayout; + +function _load_workspaceLayout() { + return _workspaceLayout = _interopRequireDefault(__webpack_require__(86)); +} + +var _index; + +function _load_index() { + return _index = __webpack_require__(62); +} + +var _list; + +function _load_list() { + return _list = __webpack_require__(292); +} + +var _install; + +function _load_install() { + return _install = __webpack_require__(40); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(14)); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _invariant; + +function _load_invariant() { + return _invariant = _interopRequireDefault(__webpack_require__(13)); +} + +var _path; + +function _load_path() { + return _path = _interopRequireDefault(__webpack_require__(2)); +} + +var _semver; + +function _load_semver() { + return _semver = _interopRequireDefault(__webpack_require__(26)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var SILENCE_DEPENDENCY_TYPE_WARNINGS = ['upgrade', 'upgrade-interactive']; + +var Add = exports.Add = function (_Install) { + (0, (_inherits2 || _load_inherits()).default)(Add, _Install); + + function Add(args, flags, config, reporter, lockfile) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Add); + + var workspaceRootIsCwd = config.cwd === config.lockfileFolder; + var _flags = flags ? (0, (_extends2 || _load_extends()).default)({}, flags, { workspaceRootIsCwd }) : { workspaceRootIsCwd }; + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Install.call(this, _flags, config, reporter, lockfile)); + + _this.args = args; + // only one flag is supported, so we can figure out which one was passed to `yarn add` + _this.flagToOrigin = [flags.dev && 'devDependencies', flags.optional && 'optionalDependencies', flags.peer && 'peerDependencies', 'dependencies'].filter(Boolean).shift(); + return _this; + } + + /** + * TODO + */ + + Add.prototype.prepareRequests = function prepareRequests(requests) { + var requestsWithArgs = requests.slice(); + + for (var _iterator = this.args, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _pattern = _ref; + + requestsWithArgs.push({ + pattern: _pattern, + registry: 'npm', + optional: false + }); + } + return requestsWithArgs; + }; + + /** + * returns version for a pattern based on Manifest + */ + + + Add.prototype.getPatternVersion = function getPatternVersion(pattern, pkg) { + var tilde = this.flags.tilde; + var configPrefix = String(this.config.getOption('save-prefix')); + var exact = this.flags.exact || Boolean(this.config.getOption('save-exact')) || configPrefix === ''; + + var _normalizePattern = (0, (_normalizePattern2 || _load_normalizePattern()).normalizePattern)(pattern), + hasVersion = _normalizePattern.hasVersion, + range = _normalizePattern.range; + + var version = void 0; + + if ((0, (_index || _load_index()).getExoticResolver)(pattern)) { + // wasn't a name/range tuple so this is just a raw exotic pattern + version = pattern; + } else if (hasVersion && range && ((_semver || _load_semver()).default.satisfies(pkg.version, range) || (0, (_index || _load_index()).getExoticResolver)(range))) { + // if the user specified a range then use it verbatim + version = range; + } + + if (!version || (_semver || _load_semver()).default.valid(version)) { + var prefix = configPrefix || '^'; + + if (tilde) { + prefix = '~'; + } else if (version || exact) { + prefix = ''; + } + version = `${prefix}${pkg.version}`; + } + + return version; + }; + + Add.prototype.preparePatterns = function preparePatterns(patterns) { + var preparedPatterns = patterns.slice(); + for (var _iterator2 = this.resolver.dedupePatterns(this.args), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _pattern2 = _ref2; + + var pkg = this.resolver.getResolvedPattern(_pattern2); + (0, (_invariant || _load_invariant()).default)(pkg, `missing package ${_pattern2}`); + var _version = this.getPatternVersion(_pattern2, pkg); + var newPattern = `${pkg.name}@${_version}`; + preparedPatterns.push(newPattern); + this.addedPatterns.push(newPattern); + if (newPattern === _pattern2) { + continue; + } + this.resolver.replacePattern(_pattern2, newPattern); + } + return preparedPatterns; + }; + + Add.prototype.preparePatternsForLinking = function preparePatternsForLinking(patterns, cwdManifest, cwdIsRoot) { + // remove the newly added patterns if cwd != root and update the in-memory package dependency instead + if (cwdIsRoot) { + return patterns; + } + + var manifest = void 0; + var cwdPackage = `${cwdManifest.name}@${cwdManifest.version}`; + try { + manifest = this.resolver.getStrictResolvedPattern(cwdPackage); + } catch (e) { + this.reporter.warn(this.reporter.lang('unknownPackage', cwdPackage)); + return patterns; + } + + var newPatterns = patterns; + this._iterateAddedPackages(function (pattern, registry, dependencyType, pkgName, version) { + // remove added package from patterns list + var filtered = newPatterns.filter(function (p) { + return p !== pattern; + }); + (0, (_invariant || _load_invariant()).default)(newPatterns.length - filtered.length > 0, `expect added pattern '${pattern}' in the list: ${patterns.toString()}`); + newPatterns = filtered; + + // add new package into in-memory manifest so they can be linked properly + manifest[dependencyType] = manifest[dependencyType] || {}; + if (manifest[dependencyType][pkgName] === version) { + // package already existed + return; + } + + // update dependencies in the manifest + (0, (_invariant || _load_invariant()).default)(manifest._reference, 'manifest._reference should not be null'); + var ref = manifest._reference; + + ref['dependencies'] = ref['dependencies'] || []; + ref['dependencies'].push(pattern); + }); + + return newPatterns; + }; + + Add.prototype.bailout = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { + var lockfileCache = this.lockfile.cache; + if (!lockfileCache) { + return false; + } + var match = yield this.integrityChecker.check(patterns, lockfileCache, this.flags, workspaceLayout); + var haveLockfile = yield (_fs || _load_fs()).exists((_path || _load_path()).default.join(this.config.lockfileFolder, (_constants || _load_constants()).LOCKFILE_FILENAME)); + if (match.integrityFileMissing && haveLockfile) { + // Integrity file missing, force script installations + this.scripts.setForce(true); + } + return false; + }); + + function bailout(_x, _x2) { + return _ref3.apply(this, arguments); + } + + return bailout; + }(); + + /** + * Description + */ + + Add.prototype.init = function () { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var isWorkspaceRoot = this.config.workspaceRootFolder && this.config.cwd === this.config.workspaceRootFolder; + + // running "yarn add something" in a workspace root is often a mistake + if (isWorkspaceRoot && !this.flags.ignoreWorkspaceRootCheck) { + throw new (_errors || _load_errors()).MessageError(this.reporter.lang('workspacesAddRootCheck')); + } + + this.addedPatterns = []; + var patterns = yield (_install || _load_install()).Install.prototype.init.call(this); + yield this.maybeOutputSaveTree(patterns); + return patterns; + }); + + function init() { + return _ref4.apply(this, arguments); + } + + return init; + }(); + + Add.prototype.applyChanges = function () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (manifests) { + var _this2 = this; + + yield (_install || _load_install()).Install.prototype.applyChanges.call(this, manifests); + + // fill rootPatternsToOrigin without `excludePatterns` + yield (_install || _load_install()).Install.prototype.fetchRequestFromCwd.call(this); + + this._iterateAddedPackages(function (pattern, registry, dependencyType, pkgName, version) { + // add it to manifest + var object = manifests[registry].object; + + + object[dependencyType] = object[dependencyType] || {}; + object[dependencyType][pkgName] = version; + if (SILENCE_DEPENDENCY_TYPE_WARNINGS.indexOf(_this2.config.commandName) === -1 && dependencyType !== _this2.flagToOrigin) { + _this2.reporter.warn(_this2.reporter.lang('moduleAlreadyInManifest', pkgName, dependencyType, _this2.flagToOrigin)); + } + }); + + return true; + }); + + function applyChanges(_x3) { + return _ref5.apply(this, arguments); + } + + return applyChanges; + }(); + + /** + * Description + */ + + Add.prototype.fetchRequestFromCwd = function fetchRequestFromCwd() { + return (_install || _load_install()).Install.prototype.fetchRequestFromCwd.call(this, this.args); + }; + + /** + * Output a tree of any newly added dependencies. + */ + + Add.prototype.maybeOutputSaveTree = function () { + var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns) { + // don't limit the shown tree depth + var opts = { + reqDepth: 0 + }; + + // restore the original patterns + var merged = [].concat(patterns, this.addedPatterns); + + var _ref7 = yield (0, (_list || _load_list()).buildTree)(this.resolver, this.linker, merged, opts, true, true), + trees = _ref7.trees, + count = _ref7.count; + + if (count === 1) { + this.reporter.success(this.reporter.lang('savedNewDependency')); + } else { + this.reporter.success(this.reporter.lang('savedNewDependencies', count)); + } + + if (!count) { + return; + } + + var resolverPatterns = new (_set || _load_set()).default(); + for (var _iterator3 = patterns, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref8; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref8 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref8 = _i3.value; + } + + var _pattern3 = _ref8; + + var _ref10 = this.resolver.getResolvedPattern(_pattern3) || {}, + _version2 = _ref10.version, + name = _ref10.name; + + resolverPatterns.add(`${name}@${_version2}`); + } + var directRequireDependencies = trees.filter(function (_ref9) { + var name = _ref9.name; + return resolverPatterns.has(name); + }); + + this.reporter.info(this.reporter.lang('directDependencies')); + this.reporter.tree('newDirectDependencies', directRequireDependencies); + this.reporter.info(this.reporter.lang('allDependencies')); + this.reporter.tree('newAllDependencies', trees); + }); + + function maybeOutputSaveTree(_x4) { + return _ref6.apply(this, arguments); + } + + return maybeOutputSaveTree; + }(); + + /** + * Save added packages to manifest if any of the --save flags were used. + */ + + Add.prototype.savePackages = function () { + var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {}); + + function savePackages() { + return _ref11.apply(this, arguments); + } + + return savePackages; + }(); + + Add.prototype._iterateAddedPackages = function _iterateAddedPackages(f) { + var _this3 = this; + + var patternOrigins = (0, (_keys || _load_keys()).default)(this.rootPatternsToOrigin); + + // add new patterns to their appropriate registry manifest + + var _loop = function _loop(_pattern4) { + var pkg = _this3.resolver.getResolvedPattern(_pattern4); + (0, (_invariant || _load_invariant()).default)(pkg, `missing package ${_pattern4}`); + var version = _this3.getPatternVersion(_pattern4, pkg); + var ref = pkg._reference; + (0, (_invariant || _load_invariant()).default)(ref, 'expected package reference'); + // lookup the package to determine dependency type; used during `yarn upgrade` + var depType = patternOrigins.reduce(function (acc, prev) { + if (prev.indexOf(`${pkg.name}@`) === 0) { + return _this3.rootPatternsToOrigin[prev]; + } + return acc; + }, null); + + // depType is calculated when `yarn upgrade` command is used + var target = depType || _this3.flagToOrigin; + + f(_pattern4, ref.registry, target, pkg.name, version); + }; + + for (var _iterator4 = this.addedPatterns, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref12; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref12 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref12 = _i4.value; + } + + var _pattern4 = _ref12; + + _loop(_pattern4); + } + }; + + return Add; +}((_install || _load_install()).Install); + +function hasWrapper(commander) { + return true; +} + +function setFlags(commander) { + commander.description('Installs a package and any packages that it depends on.'); + commander.usage('add [packages ...] [flags]'); + commander.option('-W, --ignore-workspace-root-check', 'required to run yarn add inside a workspace root'); + commander.option('-D, --dev', 'save package to your `devDependencies`'); + commander.option('-P, --peer', 'save package to your `peerDependencies`'); + commander.option('-O, --optional', 'save package to your `optionalDependencies`'); + commander.option('-E, --exact', 'install exact version'); + commander.option('-T, --tilde', 'install most recent release with the same minor version'); + commander.option('-A', '--audit', 'Run vulnerability audit on installed packages'); +} + +/***/ }), +/* 150 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = exports.pack = exports.packTarball = undefined; + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _from; + +function _load_from() { + return _from = _interopRequireDefault(__webpack_require__(52)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var packTarball = exports.packTarball = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + mapHeader = _ref2.mapHeader; + + var pkg = yield config.readRootManifest(); + var bundleDependencies = pkg.bundleDependencies, + main = pkg.main, + onlyFiles = pkg.files; + + // include required files + + var filters = NEVER_IGNORE.slice(); + // include default filters unless `files` is used + if (!onlyFiles) { + filters = filters.concat(DEFAULT_IGNORE); + } + if (main) { + filters = filters.concat((0, (_filter || _load_filter()).ignoreLinesToRegex)(['!/' + main])); + } + + // include bundleDependencies + var bundleDependenciesFiles = []; + if (bundleDependencies) { + for (var _iterator = bundleDependencies, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref3; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref3 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref3 = _i.value; + } + + var dependency = _ref3; + + var dependencyList = depsFor(dependency, config.cwd); + + for (var _iterator2 = dependencyList, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref4; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref4 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref4 = _i2.value; + } + + var dep = _ref4; + + var filesForBundledDep = yield (_fs || _load_fs()).walk(dep.baseDir, null, new (_set || _load_set()).default(FOLDERS_IGNORE)); + bundleDependenciesFiles = bundleDependenciesFiles.concat(filesForBundledDep); + } + } + } + + // `files` field + if (onlyFiles) { + var lines = ['*']; + lines = lines.concat(onlyFiles.map(function (filename) { + return `!${filename}`; + }), onlyFiles.map(function (filename) { + return `!${path.join(filename, '**')}`; + })); + var regexes = (0, (_filter || _load_filter()).ignoreLinesToRegex)(lines, './'); + filters = filters.concat(regexes); + } + + var files = yield (_fs || _load_fs()).walk(config.cwd, null, new (_set || _load_set()).default(FOLDERS_IGNORE)); + var dotIgnoreFiles = (0, (_filter || _load_filter()).filterOverridenGitignores)(files); + + // create ignores + for (var _iterator3 = dotIgnoreFiles, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref5; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref5 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref5 = _i3.value; + } + + var file = _ref5; + + var raw = yield (_fs || _load_fs()).readFile(file.absolute); + var _lines = raw.split('\n'); + + var _regexes = (0, (_filter || _load_filter()).ignoreLinesToRegex)(_lines, path.dirname(file.relative)); + filters = filters.concat(_regexes); + } + + // files to definitely keep, takes precedence over ignore filter + var keepFiles = new (_set || _load_set()).default(); + + // files to definitely ignore + var ignoredFiles = new (_set || _load_set()).default(); + + // list of files that didn't match any of our patterns, if a directory in the chain above was matched + // then we should inherit it + var possibleKeepFiles = new (_set || _load_set()).default(); + + // apply filters + (0, (_filter || _load_filter()).sortFilter)(files, filters, keepFiles, possibleKeepFiles, ignoredFiles); + + // add the files for the bundled dependencies to the set of files to keep + for (var _iterator4 = bundleDependenciesFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref6; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref6 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref6 = _i4.value; + } + + var _file = _ref6; + + var realPath = yield (_fs || _load_fs()).realpath(config.cwd); + keepFiles.add(path.relative(realPath, _file.absolute)); + } + + return packWithIgnoreAndHeaders(config.cwd, function (name) { + var relative = path.relative(config.cwd, name); + // Don't ignore directories, since we need to recurse inside them to check for unignored files. + if (fs2.lstatSync(name).isDirectory()) { + var isParentOfKeptFile = (0, (_from || _load_from()).default)(keepFiles).some(function (name) { + return !path.relative(relative, name).startsWith('..'); + }); + return !isParentOfKeptFile; + } + // Otherwise, ignore a file if we're not supposed to keep it. + return !keepFiles.has(relative); + }, { mapHeader }); + }); + + return function packTarball(_x) { + return _ref.apply(this, arguments); + }; +}(); + +var pack = exports.pack = function () { + var _ref8 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + var packer = yield packTarball(config); + var compressor = packer.pipe(new zlib.Gzip()); + + return compressor; + }); + + return function pack(_x4) { + return _ref8.apply(this, arguments); + }; +}(); + +var run = exports.run = function () { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var pkg = yield config.readRootManifest(); + if (!pkg.name) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noName')); + } + if (!pkg.version) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noVersion')); + } + + var normaliseScope = function normaliseScope(name) { + return name[0] === '@' ? name.substr(1).replace('/', '-') : name; + }; + var filename = flags.filename || path.join(config.cwd, `${normaliseScope(pkg.name)}-v${pkg.version}.tgz`); + + yield config.executeLifecycleScript('prepack'); + + var stream = yield pack(config); + + yield new (_promise || _load_promise()).default(function (resolve, reject) { + stream.pipe(fs2.createWriteStream(filename)); + stream.on('error', reject); + stream.on('close', resolve); + }); + + yield config.executeLifecycleScript('postpack'); + + reporter.success(reporter.lang('packWroteTarball', filename)); + }); + + return function run(_x5, _x6, _x7, _x8) { + return _ref9.apply(this, arguments); + }; +}(); + +exports.packWithIgnoreAndHeaders = packWithIgnoreAndHeaders; +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _filter; + +function _load_filter() { + return _filter = __webpack_require__(311); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var zlib = __webpack_require__(181); +var path = __webpack_require__(2); +var tar = __webpack_require__(177); +var fs2 = __webpack_require__(12); +var depsFor = __webpack_require__(726); + +var FOLDERS_IGNORE = [ +// never allow version control folders +'.git', 'CVS', '.svn', '.hg', 'node_modules']; + +var DEFAULT_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([].concat(FOLDERS_IGNORE, [ + +// ignore cruft +'yarn.lock', '.lock-wscript', '.wafpickle-{0..9}', '*.swp', '._*', 'npm-debug.log', 'yarn-error.log', '.npmrc', '.yarnrc', '.npmignore', '.gitignore', '.DS_Store'])); + +var NEVER_IGNORE = (0, (_filter || _load_filter()).ignoreLinesToRegex)([ +// never ignore these files +'!/package.json', '!/readme*', '!/+(license|licence)*', '!/+(changes|changelog|history)*']); + +function packWithIgnoreAndHeaders(cwd, ignoreFunction) { + var _ref7 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + mapHeader = _ref7.mapHeader; + + return tar.pack(cwd, { + ignore: ignoreFunction, + map: function map(header) { + var suffix = header.name === '.' ? '' : `/${header.name}`; + header.name = `package${suffix}`; + delete header.uid; + delete header.gid; + return mapHeader ? mapHeader(header) : header; + } + }); +} + +function setFlags(commander) { + commander.description('Creates a compressed gzip archive of package dependencies.'); + commander.option('-f, --filename ', 'filename'); +} + +function hasWrapper(commander, args) { + return true; +} + +/***/ }), +/* 151 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _index; + +function _load_index() { + return _index = _interopRequireDefault(__webpack_require__(200)); +} + +var _portableScript; + +function _load_portableScript() { + return _portableScript = __webpack_require__(316); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(14)); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _mutex; + +function _load_mutex() { + return _mutex = _interopRequireDefault(__webpack_require__(313)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var cmdShim = __webpack_require__(183); +/* eslint no-unused-vars: 0 */ + +var path = __webpack_require__(2); + +var BaseFetcher = function () { + function BaseFetcher(dest, remote, config) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BaseFetcher); + + this.reporter = config.reporter; + this.packageName = remote.packageName; + this.reference = remote.reference; + this.registry = remote.registry; + this.hash = remote.hash; + this.remote = remote; + this.config = config; + this.dest = dest; + } + + BaseFetcher.prototype.setupMirrorFromCache = function setupMirrorFromCache() { + // fetcher subclasses may use this to perform actions such as copying over a cached tarball to the offline + // mirror etc + return (_promise || _load_promise()).default.resolve(); + }; + + BaseFetcher.prototype._fetch = function _fetch() { + return (_promise || _load_promise()).default.reject(new Error('Not implemented')); + }; + + BaseFetcher.prototype.fetch = function fetch(defaultManifest) { + var _this = this; + + return (_fs || _load_fs()).lockQueue.push(this.dest, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield (_fs || _load_fs()).mkdirp(_this.dest); + + // fetch package and get the hash + + var _ref2 = yield _this._fetch(), + hash = _ref2.hash; + + var pkg = yield (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + // load the new normalized manifest + try { + return yield _this.config.readManifest(_this.dest, _this.registry); + } catch (e) { + if (e.code === 'ENOENT' && defaultManifest) { + return (0, (_index || _load_index()).default)(defaultManifest, _this.dest, _this.config, false); + } else { + throw e; + } + } + })(); + + if (pkg.bin) { + for (var _iterator = (0, (_keys || _load_keys()).default)(pkg.bin), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref4; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref4 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref4 = _i.value; + } + + var binName = _ref4; + + var binDest = `${_this.dest}/.bin`; + + // Using any sort of absolute path here would prevent makePortableProxyScript from preserving symlinks when + // calling the binary + var src = path.resolve(_this.dest, pkg.bin[binName]); + + if (yield (_fs || _load_fs()).exists(src)) { + // We ensure that the target is executable + yield (_fs || _load_fs()).chmod(src, 0o755); + } + + yield (_fs || _load_fs()).mkdirp(binDest); + if (process.platform === 'win32') { + var unlockMutex = yield (0, (_mutex || _load_mutex()).default)(src); + try { + yield cmdShim.ifExists(src, `${binDest}/${binName}`); + } finally { + unlockMutex(); + } + } else { + yield (_fs || _load_fs()).symlink(src, `${binDest}/${binName}`); + } + } + } + + yield (_fs || _load_fs()).writeFile(path.join(_this.dest, (_constants || _load_constants()).METADATA_FILENAME), (0, (_stringify || _load_stringify()).default)({ + manifest: pkg, + artifacts: [], + remote: _this.remote, + registry: _this.registry, + hash + }, null, ' ')); + + return { + hash, + dest: _this.dest, + package: pkg, + cached: false + }; + })); + }; + + return BaseFetcher; +}(); + +exports.default = BaseFetcher; + +/***/ }), +/* 152 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(50)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var debug = __webpack_require__(672)('yarn'); + +var BlockingQueue = function () { + function BlockingQueue(alias) { + var maxConcurrency = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity; + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BlockingQueue); + + this.concurrencyQueue = []; + this.maxConcurrency = maxConcurrency; + this.runningCount = 0; + this.warnedStuck = false; + this.alias = alias; + this.first = true; + + this.running = (0, (_map || _load_map()).default)(); + this.queue = (0, (_map || _load_map()).default)(); + + this.stuckTick = this.stuckTick.bind(this); + } + + BlockingQueue.prototype.stillActive = function stillActive() { + if (this.stuckTimer) { + clearTimeout(this.stuckTimer); + } + + this.stuckTimer = setTimeout(this.stuckTick, 5000); + + // We need to check the existence of unref because of https://github.com/facebook/jest/issues/4559 + // $FlowFixMe: Node's setInterval returns a Timeout, not a Number + this.stuckTimer.unref && this.stuckTimer.unref(); + }; + + BlockingQueue.prototype.stuckTick = function stuckTick() { + if (this.runningCount === 1) { + this.warnedStuck = true; + debug(`The ${(0, (_stringify || _load_stringify()).default)(this.alias)} blocking queue may be stuck. 5 seconds ` + `without any activity with 1 worker: ${(0, (_keys || _load_keys()).default)(this.running)[0]}`); + } + }; + + BlockingQueue.prototype.push = function push(key, factory) { + var _this = this; + + if (this.first) { + this.first = false; + } else { + this.stillActive(); + } + + return new (_promise || _load_promise()).default(function (resolve, reject) { + // we're already running so push ourselves to the queue + var queue = _this.queue[key] = _this.queue[key] || []; + queue.push({ factory, resolve, reject }); + + if (!_this.running[key]) { + _this.shift(key); + } + }); + }; + + BlockingQueue.prototype.shift = function shift(key) { + var _this2 = this; + + if (this.running[key]) { + delete this.running[key]; + this.runningCount--; + + if (this.stuckTimer) { + clearTimeout(this.stuckTimer); + this.stuckTimer = null; + } + + if (this.warnedStuck) { + this.warnedStuck = false; + debug(`${(0, (_stringify || _load_stringify()).default)(this.alias)} blocking queue finally resolved. Nothing to worry about.`); + } + } + + var queue = this.queue[key]; + if (!queue) { + return; + } + + var _queue$shift = queue.shift(), + resolve = _queue$shift.resolve, + reject = _queue$shift.reject, + factory = _queue$shift.factory; + + if (!queue.length) { + delete this.queue[key]; + } + + var next = function next() { + _this2.shift(key); + _this2.shiftConcurrencyQueue(); + }; + + var run = function run() { + _this2.running[key] = true; + _this2.runningCount++; + + factory().then(function (val) { + resolve(val); + next(); + return null; + }).catch(function (err) { + reject(err); + next(); + }); + }; + + this.maybePushConcurrencyQueue(run); + }; + + BlockingQueue.prototype.maybePushConcurrencyQueue = function maybePushConcurrencyQueue(run) { + if (this.runningCount < this.maxConcurrency) { + run(); + } else { + this.concurrencyQueue.push(run); + } + }; + + BlockingQueue.prototype.shiftConcurrencyQueue = function shiftConcurrencyQueue() { + if (this.runningCount < this.maxConcurrency) { + var fn = this.concurrencyQueue.shift(); + if (fn) { + fn(); + } + } + }; + + return BlockingQueue; +}(); + +exports.default = BlockingQueue; + +/***/ }), +/* 153 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.HashStream = undefined; + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +exports.hash = hash; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var crypto = __webpack_require__(21); +var stream = __webpack_require__(34); + +function hash(content) { + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'md5'; + + return crypto.createHash(type).update(content).digest('hex'); +} + +var HashStream = exports.HashStream = function (_stream$Transform) { + (0, (_inherits2 || _load_inherits()).default)(HashStream, _stream$Transform); + + function HashStream(options) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, HashStream); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _stream$Transform.call(this, options)); + + _this._hash = crypto.createHash('sha1'); + _this._updated = false; + return _this; + } + + HashStream.prototype._transform = function _transform(chunk, encoding, callback) { + this._updated = true; + this._hash.update(chunk); + callback(null, chunk); + }; + + HashStream.prototype.getHash = function getHash() { + return this._hash.digest('hex'); + }; + + HashStream.prototype.test = function test(sum) { + return this._updated && sum === this.getHash(); + }; + + return HashStream; +}(stream.Transform); + +/***/ }), +/* 154 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +exports.default = guessName; + +var _url; + +function _load_url() { + return _url = _interopRequireDefault(__webpack_require__(29)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function cleanup(name) { + name = name.replace(/-\d+\.\d+\.\d+/, ''); + return name.replace(/\.git$|\.zip$|\.tar\.gz$|\.tar\.bz2$/, ''); +} + +function guessNameFallback(source) { + // If cannot parse as url, just return cleaned up last part + var parts = source.split('/'); + return cleanup(parts[parts.length - 1]); +} + +function guessName(source) { + try { + var parsed = (_url || _load_url()).default.parse(source); + + if (!parsed.pathname) { + return guessNameFallback(source); + } + + var parts = parsed.pathname.split('/'); + + // Priority goes to part that ends with .git + for (var _iterator = parts, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var part = _ref; + + if (part.match(/\.git$/)) { + return cleanup(part); + } + } + + // Most likely a directory + if (parsed.host == null) { + return cleanup(parts[parts.length - 1]); + } + + // A site like github or gitlab + if (parts.length > 2) { + return cleanup(parts[2]); + } + + // Privately hosted package? + if (parts.length > 1) { + return cleanup(parts[1]); + } + + return guessNameFallback(source); + } catch (e) { + return guessNameFallback(source); + } +} + +/***/ }), +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.15 ToLength +var toInteger = __webpack_require__(221); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; + + +/***/ }), +/* 156 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 157 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 158 */ +/***/ (function(module, exports, __webpack_require__) { + +var once = __webpack_require__(128); + +var noop = function() {}; + +var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === 'function'; +}; + +var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 +}; + +var eos = function(stream, opts, callback) { + if (typeof opts === 'function') return eos(stream, null, opts); + if (!opts) opts = {}; + + callback = once(callback || noop); + + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || (opts.readable !== false && stream.readable); + var writable = opts.writable || (opts.writable !== false && stream.writable); + + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); + }; + + var onerror = function(err) { + callback.call(stream, err); + }; + + var onclose = function() { + if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); + }; + + var onrequest = function() { + stream.req.on('finish', onfinish); + }; + + if (isRequest(stream)) { + stream.on('complete', onfinish); + stream.on('abort', onclose); + if (stream.req) onrequest(); + else stream.on('request', onrequest); + } else if (writable && !ws) { // legacy streams + stream.on('end', onlegacyfinish); + stream.on('close', onlegacyfinish); + } + + if (isChildProcess(stream)) stream.on('exit', onexit); + + stream.on('end', onend); + stream.on('finish', onfinish); + if (opts.error !== false) stream.on('error', onerror); + stream.on('close', onclose); + + return function() { + stream.removeListener('complete', onfinish); + stream.removeListener('abort', onclose); + stream.removeListener('request', onrequest); + if (stream.req) stream.req.removeListener('finish', onfinish); + stream.removeListener('end', onlegacyfinish); + stream.removeListener('close', onlegacyfinish); + stream.removeListener('finish', onfinish); + stream.removeListener('exit', onexit); + stream.removeListener('end', onend); + stream.removeListener('error', onerror); + stream.removeListener('close', onclose); + }; +}; + +module.exports = eos; + + +/***/ }), +/* 159 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2012 Joyent, Inc. All rights reserved. + +var assert = __webpack_require__(22); +var sshpk = __webpack_require__(260); +var util = __webpack_require__(9); + +var HASH_ALGOS = { + 'sha1': true, + 'sha256': true, + 'sha512': true +}; + +var PK_ALGOS = { + 'rsa': true, + 'dsa': true, + 'ecdsa': true +}; + +function HttpSignatureError(message, caller) { + if (Error.captureStackTrace) + Error.captureStackTrace(this, caller || HttpSignatureError); + + this.message = message; + this.name = caller.name; +} +util.inherits(HttpSignatureError, Error); + +function InvalidAlgorithmError(message) { + HttpSignatureError.call(this, message, InvalidAlgorithmError); +} +util.inherits(InvalidAlgorithmError, HttpSignatureError); + +function validateAlgorithm(algorithm) { + var alg = algorithm.toLowerCase().split('-'); + + if (alg.length !== 2) { + throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' is not a ' + + 'valid algorithm')); + } + + if (alg[0] !== 'hmac' && !PK_ALGOS[alg[0]]) { + throw (new InvalidAlgorithmError(alg[0].toUpperCase() + ' type keys ' + + 'are not supported')); + } + + if (!HASH_ALGOS[alg[1]]) { + throw (new InvalidAlgorithmError(alg[1].toUpperCase() + ' is not a ' + + 'supported hash algorithm')); + } + + return (alg); +} + +///--- API + +module.exports = { + + HASH_ALGOS: HASH_ALGOS, + PK_ALGOS: PK_ALGOS, + + HttpSignatureError: HttpSignatureError, + InvalidAlgorithmError: InvalidAlgorithmError, + + validateAlgorithm: validateAlgorithm, + + /** + * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file. + * + * The intent of this module is to interoperate with OpenSSL only, + * specifically the node crypto module's `verify` method. + * + * @param {String} key an OpenSSH public key. + * @return {String} PEM encoded form of the RSA public key. + * @throws {TypeError} on bad input. + * @throws {Error} on invalid ssh key formatted data. + */ + sshKeyToPEM: function sshKeyToPEM(key) { + assert.string(key, 'ssh_key'); + + var k = sshpk.parseKey(key, 'ssh'); + return (k.toString('pem')); + }, + + + /** + * Generates an OpenSSH fingerprint from an ssh public key. + * + * @param {String} key an OpenSSH public key. + * @return {String} key fingerprint. + * @throws {TypeError} on bad input. + * @throws {Error} if what you passed doesn't look like an ssh public key. + */ + fingerprint: function fingerprint(key) { + assert.string(key, 'ssh_key'); + + var k = sshpk.parseKey(key, 'ssh'); + return (k.fingerprint('md5').toString('hex')); + }, + + /** + * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa) + * + * The reverse of the above function. + */ + pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) { + assert.equal('string', typeof (pem), 'typeof pem'); + + var k = sshpk.parseKey(pem, 'pem'); + k.comment = comment; + return (k.toString('ssh')); + } +}; + + +/***/ }), +/* 160 */ +/***/ (function(module, exports) { + +/*! + * is-extglob + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + return typeof str === 'string' + && /[@?!+*]\(/.test(str); +}; + + +/***/ }), +/* 161 */ +/***/ (function(module, exports, __webpack_require__) { + +/*! + * is-glob + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +var isExtglob = __webpack_require__(160); + +module.exports = function isGlob(str) { + return typeof str === 'string' + && (/[*!?{}(|)[\]]/.test(str) + || isExtglob(str)); +}; + +/***/ }), +/* 162 */ +/***/ (function(module, exports, __webpack_require__) { + +var isBuffer = __webpack_require__(766); +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + // primitivies + if (typeof val === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (typeof val === 'string' || val instanceof String) { + return 'string'; + } + if (typeof val === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (typeof val === 'function' || val instanceof Function) { + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + var type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + + +/***/ }), +/* 163 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = __webpack_require__(2) +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = __webpack_require__(578) + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new TypeError('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + if (pattern.length > 1024 * 64) { + throw new TypeError('pattern is too long') + } + + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + + +/***/ }), +/* 164 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (!process.version || + process.version.indexOf('v0.') === 0 || + process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { + module.exports = { nextTick: nextTick }; +} else { + module.exports = process +} + +function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== 'function') { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } +} + + + +/***/ }), +/* 165 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isPromise = __webpack_require__(778); + +/** + * Return a function that will run a function asynchronously or synchronously + * + * example: + * runAsync(wrappedFunction, callback)(...args); + * + * @param {Function} func Function to run + * @param {Function} cb Callback function passed the `func` returned value + * @return {Function(arguments)} Arguments to pass to `func`. This function will in turn + * return a Promise (Node >= 0.12) or call the callbacks. + */ + +var runAsync = module.exports = function (func, cb) { + cb = cb || function () {}; + + return function () { + var async = false; + var args = arguments; + + var promise = new Promise(function (resolve, reject) { + var answer = func.apply({ + async: function () { + async = true; + return function (err, value) { + if (err) { + reject(err); + } else { + resolve(value); + } + }; + } + }, Array.prototype.slice.call(args)); + + if (!async) { + if (isPromise(answer)) { + answer.then(resolve, reject); + } else { + resolve(answer); + } + } + }); + + promise.then(cb.bind(null, null), cb); + + return promise; + } +}; + +runAsync.cb = function (func, cb) { + return runAsync(function () { + var args = Array.prototype.slice.call(arguments); + if (args.length === func.length - 1) { + args.push(this.async()); + } + return func.apply(this, args); + }, cb); +}; + + +/***/ }), +/* 166 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_Observable__ = __webpack_require__(16); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_Observable__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__internal_observable_ConnectableObservable__ = __webpack_require__(387); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return __WEBPACK_IMPORTED_MODULE_1__internal_observable_ConnectableObservable__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__internal_operators_groupBy__ = __webpack_require__(397); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return __WEBPACK_IMPORTED_MODULE_2__internal_operators_groupBy__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__ = __webpack_require__(105); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return __WEBPACK_IMPORTED_MODULE_3__internal_symbol_observable__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__internal_Subject__ = __webpack_require__(42); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return __WEBPACK_IMPORTED_MODULE_4__internal_Subject__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__ = __webpack_require__(383); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return __WEBPACK_IMPORTED_MODULE_5__internal_BehaviorSubject__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__ = __webpack_require__(240); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return __WEBPACK_IMPORTED_MODULE_6__internal_ReplaySubject__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__ = __webpack_require__(167); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return __WEBPACK_IMPORTED_MODULE_7__internal_AsyncSubject__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__internal_scheduler_asap__ = __webpack_require__(402); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return __WEBPACK_IMPORTED_MODULE_8__internal_scheduler_asap__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__internal_scheduler_async__ = __webpack_require__(46); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return __WEBPACK_IMPORTED_MODULE_9__internal_scheduler_async__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__internal_scheduler_queue__ = __webpack_require__(403); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return __WEBPACK_IMPORTED_MODULE_10__internal_scheduler_queue__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__internal_scheduler_animationFrame__ = __webpack_require__(967); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return __WEBPACK_IMPORTED_MODULE_11__internal_scheduler_animationFrame__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__internal_scheduler_VirtualTimeScheduler__ = __webpack_require__(966); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return __WEBPACK_IMPORTED_MODULE_12__internal_scheduler_VirtualTimeScheduler__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return __WEBPACK_IMPORTED_MODULE_12__internal_scheduler_VirtualTimeScheduler__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__internal_Scheduler__ = __webpack_require__(385); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return __WEBPACK_IMPORTED_MODULE_13__internal_Scheduler__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__internal_Subscription__ = __webpack_require__(30); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return __WEBPACK_IMPORTED_MODULE_14__internal_Subscription__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__ = __webpack_require__(5); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return __WEBPACK_IMPORTED_MODULE_15__internal_Subscriber__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__internal_Notification__ = __webpack_require__(168); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return __WEBPACK_IMPORTED_MODULE_16__internal_Notification__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__ = __webpack_require__(256); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return __WEBPACK_IMPORTED_MODULE_17__internal_util_pipe__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__ = __webpack_require__(175); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return __WEBPACK_IMPORTED_MODULE_18__internal_util_noop__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__ = __webpack_require__(106); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return __WEBPACK_IMPORTED_MODULE_19__internal_util_identity__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__ = __webpack_require__(971); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return __WEBPACK_IMPORTED_MODULE_20__internal_util_isObservable__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__ = __webpack_require__(135); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return __WEBPACK_IMPORTED_MODULE_21__internal_util_ArgumentOutOfRangeError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__ = __webpack_require__(136); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return __WEBPACK_IMPORTED_MODULE_22__internal_util_EmptyError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__ = __webpack_require__(173); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return __WEBPACK_IMPORTED_MODULE_23__internal_util_ObjectUnsubscribedError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__internal_util_UnsubscriptionError__ = __webpack_require__(405); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return __WEBPACK_IMPORTED_MODULE_24__internal_util_UnsubscriptionError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__internal_util_TimeoutError__ = __webpack_require__(404); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return __WEBPACK_IMPORTED_MODULE_25__internal_util_TimeoutError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__internal_observable_bindCallback__ = __webpack_require__(864); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return __WEBPACK_IMPORTED_MODULE_26__internal_observable_bindCallback__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__ = __webpack_require__(865); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return __WEBPACK_IMPORTED_MODULE_27__internal_observable_bindNodeCallback__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__ = __webpack_require__(241); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return __WEBPACK_IMPORTED_MODULE_28__internal_observable_combineLatest__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__ = __webpack_require__(170); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return __WEBPACK_IMPORTED_MODULE_29__internal_observable_concat__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__ = __webpack_require__(242); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return __WEBPACK_IMPORTED_MODULE_30__internal_observable_defer__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__ = __webpack_require__(45); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__internal_observable_forkJoin__ = __webpack_require__(866); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return __WEBPACK_IMPORTED_MODULE_32__internal_observable_forkJoin__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__internal_observable_from__ = __webpack_require__(64); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return __WEBPACK_IMPORTED_MODULE_33__internal_observable_from__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__internal_observable_fromEvent__ = __webpack_require__(867); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return __WEBPACK_IMPORTED_MODULE_34__internal_observable_fromEvent__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__internal_observable_fromEventPattern__ = __webpack_require__(868); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return __WEBPACK_IMPORTED_MODULE_35__internal_observable_fromEventPattern__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__internal_observable_generate__ = __webpack_require__(872); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return __WEBPACK_IMPORTED_MODULE_36__internal_observable_generate__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__internal_observable_iif__ = __webpack_require__(873); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return __WEBPACK_IMPORTED_MODULE_37__internal_observable_iif__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__internal_observable_interval__ = __webpack_require__(874); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return __WEBPACK_IMPORTED_MODULE_38__internal_observable_interval__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__internal_observable_merge__ = __webpack_require__(388); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return __WEBPACK_IMPORTED_MODULE_39__internal_observable_merge__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__ = __webpack_require__(389); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__ = __webpack_require__(243); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return __WEBPACK_IMPORTED_MODULE_41__internal_observable_of__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__internal_observable_onErrorResumeNext__ = __webpack_require__(875); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return __WEBPACK_IMPORTED_MODULE_42__internal_observable_onErrorResumeNext__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__internal_observable_pairs__ = __webpack_require__(876); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return __WEBPACK_IMPORTED_MODULE_43__internal_observable_pairs__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__internal_observable_race__ = __webpack_require__(390); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return __WEBPACK_IMPORTED_MODULE_44__internal_observable_race__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__internal_observable_range__ = __webpack_require__(877); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return __WEBPACK_IMPORTED_MODULE_45__internal_observable_range__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__ = __webpack_require__(245); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return __WEBPACK_IMPORTED_MODULE_46__internal_observable_throwError__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__internal_observable_timer__ = __webpack_require__(391); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return __WEBPACK_IMPORTED_MODULE_47__internal_observable_timer__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__internal_observable_using__ = __webpack_require__(878); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return __WEBPACK_IMPORTED_MODULE_48__internal_observable_using__["a"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__ = __webpack_require__(246); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return __WEBPACK_IMPORTED_MODULE_49__internal_observable_zip__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return __WEBPACK_IMPORTED_MODULE_31__internal_observable_empty__["b"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return __WEBPACK_IMPORTED_MODULE_40__internal_observable_never__["b"]; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__internal_config__ = __webpack_require__(169); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return __WEBPACK_IMPORTED_MODULE_50__internal_config__["a"]; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +//# sourceMappingURL=index.js.map + + +/***/ }), +/* 167 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AsyncSubject; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscription__ = __webpack_require__(30); +/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */ + + + +var AsyncSubject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AsyncSubject, _super); + function AsyncSubject() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.value = null; + _this.hasNext = false; + _this.hasCompleted = false; + return _this; + } + AsyncSubject.prototype._subscribe = function (subscriber) { + if (this.hasError) { + subscriber.error(this.thrownError); + return __WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */].EMPTY; + } + else if (this.hasCompleted && this.hasNext) { + subscriber.next(this.value); + subscriber.complete(); + return __WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */].EMPTY; + } + return _super.prototype._subscribe.call(this, subscriber); + }; + AsyncSubject.prototype.next = function (value) { + if (!this.hasCompleted) { + this.value = value; + this.hasNext = true; + } + }; + AsyncSubject.prototype.error = function (error) { + if (!this.hasCompleted) { + _super.prototype.error.call(this, error); + } + }; + AsyncSubject.prototype.complete = function () { + this.hasCompleted = true; + if (this.hasNext) { + _super.prototype.next.call(this, this.value); + } + _super.prototype.complete.call(this); + }; + return AsyncSubject; +}(__WEBPACK_IMPORTED_MODULE_1__Subject__["a" /* Subject */])); + +//# sourceMappingURL=AsyncSubject.js.map + + +/***/ }), +/* 168 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Notification; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__observable_empty__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__observable_of__ = __webpack_require__(243); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__observable_throwError__ = __webpack_require__(245); +/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */ + + + +var Notification = /*@__PURE__*/ (function () { + function Notification(kind, value, error) { + this.kind = kind; + this.value = value; + this.error = error; + this.hasValue = kind === 'N'; + } + Notification.prototype.observe = function (observer) { + switch (this.kind) { + case 'N': + return observer.next && observer.next(this.value); + case 'E': + return observer.error && observer.error(this.error); + case 'C': + return observer.complete && observer.complete(); + } + }; + Notification.prototype.do = function (next, error, complete) { + var kind = this.kind; + switch (kind) { + case 'N': + return next && next(this.value); + case 'E': + return error && error(this.error); + case 'C': + return complete && complete(); + } + }; + Notification.prototype.accept = function (nextOrObserver, error, complete) { + if (nextOrObserver && typeof nextOrObserver.next === 'function') { + return this.observe(nextOrObserver); + } + else { + return this.do(nextOrObserver, error, complete); + } + }; + Notification.prototype.toObservable = function () { + var kind = this.kind; + switch (kind) { + case 'N': + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__observable_of__["a" /* of */])(this.value); + case 'E': + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__observable_throwError__["a" /* throwError */])(this.error); + case 'C': + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__observable_empty__["a" /* empty */])(); + } + throw new Error('unexpected notification kind value'); + }; + Notification.createNext = function (value) { + if (typeof value !== 'undefined') { + return new Notification('N', value); + } + return Notification.undefinedValueNotification; + }; + Notification.createError = function (err) { + return new Notification('E', undefined, err); + }; + Notification.createComplete = function () { + return Notification.completeNotification; + }; + Notification.completeNotification = new Notification('C'); + Notification.undefinedValueNotification = new Notification('N', undefined); + return Notification; +}()); + +//# sourceMappingURL=Notification.js.map + + +/***/ }), +/* 169 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return config; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +var _enable_super_gross_mode_that_will_cause_bad_things = false; +var config = { + Promise: undefined, + set useDeprecatedSynchronousErrorHandling(value) { + if (value) { + var error = /*@__PURE__*/ new Error(); + /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack); + } + else if (_enable_super_gross_mode_that_will_cause_bad_things) { + /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3'); + } + _enable_super_gross_mode_that_will_cause_bad_things = value; + }, + get useDeprecatedSynchronousErrorHandling() { + return _enable_super_gross_mode_that_will_cause_bad_things; + }, +}; +//# sourceMappingURL=config.js.map + + +/***/ }), +/* 170 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = concat; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__of__ = __webpack_require__(243); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__from__ = __webpack_require__(64); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__operators_concatAll__ = __webpack_require__(393); +/** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */ + + + + +function concat() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + if (observables.length === 1 || (observables.length === 2 && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_isScheduler__["a" /* isScheduler */])(observables[1]))) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__from__["a" /* from */])(observables[0]); + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__operators_concatAll__["a" /* concatAll */])()(__WEBPACK_IMPORTED_MODULE_1__of__["a" /* of */].apply(void 0, observables)); +} +//# sourceMappingURL=concat.js.map + + +/***/ }), +/* 171 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = reduce; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__scan__ = __webpack_require__(249); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLast__ = __webpack_require__(252); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__ = __webpack_require__(129); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_pipe__ = __webpack_require__(256); +/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */ + + + + +function reduce(accumulator, seed) { + if (arguments.length >= 2) { + return function reduceOperatorFunctionWithSeed(source) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["a" /* pipe */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__scan__["a" /* scan */])(accumulator, seed), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__takeLast__["a" /* takeLast */])(1), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__defaultIfEmpty__["a" /* defaultIfEmpty */])(seed))(source); + }; + } + return function reduceOperatorFunction(source) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_pipe__["a" /* pipe */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__scan__["a" /* scan */])(function (acc, value, index) { return accumulator(acc, value, index + 1); }), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__takeLast__["a" /* takeLast */])(1))(source); + }; +} +//# sourceMappingURL=reduce.js.map + + +/***/ }), +/* 172 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return throwIfEmpty; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__tap__ = __webpack_require__(399); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__ = __webpack_require__(136); +/** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */ + + +var throwIfEmpty = function (errorFactory) { + if (errorFactory === void 0) { + errorFactory = defaultErrorFactory; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__tap__["a" /* tap */])({ + hasValue: false, + next: function () { this.hasValue = true; }, + complete: function () { + if (!this.hasValue) { + throw errorFactory(); + } + } + }); +}; +function defaultErrorFactory() { + return new __WEBPACK_IMPORTED_MODULE_1__util_EmptyError__["a" /* EmptyError */](); +} +//# sourceMappingURL=throwIfEmpty.js.map + + +/***/ }), +/* 173 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ObjectUnsubscribedError; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function ObjectUnsubscribedErrorImpl() { + Error.call(this); + this.message = 'object unsubscribed'; + this.name = 'ObjectUnsubscribedError'; + return this; +} +ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype); +var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl; +//# sourceMappingURL=ObjectUnsubscribedError.js.map + + +/***/ }), +/* 174 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isNumeric; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray__ = __webpack_require__(47); +/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */ + +function isNumeric(val) { + return !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__isArray__["a" /* isArray */])(val) && (val - parseFloat(val) + 1) >= 0; +} +//# sourceMappingURL=isNumeric.js.map + + +/***/ }), +/* 175 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = noop; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function noop() { } +//# sourceMappingURL=noop.js.map + + +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2015 Joyent, Inc. + +module.exports = { + read: read, + readSSHPrivate: readSSHPrivate, + write: write +}; + +var assert = __webpack_require__(22); +var asn1 = __webpack_require__(66); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var utils = __webpack_require__(31); +var crypto = __webpack_require__(21); + +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); +var pem = __webpack_require__(80); +var rfc4253 = __webpack_require__(91); +var SSHBuffer = __webpack_require__(142); +var errors = __webpack_require__(69); + +var bcrypt; + +function read(buf, options) { + return (pem.read(buf, options)); +} + +var MAGIC = 'openssh-key-v1'; + +function readSSHPrivate(type, buf, options) { + buf = new SSHBuffer({buffer: buf}); + + var magic = buf.readCString(); + assert.strictEqual(magic, MAGIC, 'bad magic string'); + + var cipher = buf.readString(); + var kdf = buf.readString(); + var kdfOpts = buf.readBuffer(); + + var nkeys = buf.readInt(); + if (nkeys !== 1) { + throw (new Error('OpenSSH-format key file contains ' + + 'multiple keys: this is unsupported.')); + } + + var pubKey = buf.readBuffer(); + + if (type === 'public') { + assert.ok(buf.atEnd(), 'excess bytes left after key'); + return (rfc4253.read(pubKey)); + } + + var privKeyBlob = buf.readBuffer(); + assert.ok(buf.atEnd(), 'excess bytes left after key'); + + var kdfOptsBuf = new SSHBuffer({ buffer: kdfOpts }); + switch (kdf) { + case 'none': + if (cipher !== 'none') { + throw (new Error('OpenSSH-format key uses KDF "none" ' + + 'but specifies a cipher other than "none"')); + } + break; + case 'bcrypt': + var salt = kdfOptsBuf.readBuffer(); + var rounds = kdfOptsBuf.readInt(); + var cinf = utils.opensshCipherInfo(cipher); + if (bcrypt === undefined) { + bcrypt = __webpack_require__(319); + } + + if (typeof (options.passphrase) === 'string') { + options.passphrase = Buffer.from(options.passphrase, + 'utf-8'); + } + if (!Buffer.isBuffer(options.passphrase)) { + throw (new errors.KeyEncryptedError( + options.filename, 'OpenSSH')); + } + + var pass = new Uint8Array(options.passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = Buffer.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + var cipherStream = crypto.createDecipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + if (e.toString().indexOf('bad decrypt') !== -1) { + throw (new Error('Incorrect passphrase ' + + 'supplied, could not decrypt key')); + } + throw (e); + }); + cipherStream.write(privKeyBlob); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privKeyBlob = Buffer.concat(chunks); + break; + default: + throw (new Error( + 'OpenSSH-format key uses unknown KDF "' + kdf + '"')); + } + + buf = new SSHBuffer({buffer: privKeyBlob}); + + var checkInt1 = buf.readInt(); + var checkInt2 = buf.readInt(); + if (checkInt1 !== checkInt2) { + throw (new Error('Incorrect passphrase supplied, could not ' + + 'decrypt key')); + } + + var ret = {}; + var key = rfc4253.readInternal(ret, 'private', buf.remainder()); + + buf.skip(ret.consumed); + + var comment = buf.readString(); + key.comment = comment; + + return (key); +} + +function write(key, options) { + var pubKey; + if (PrivateKey.isPrivateKey(key)) + pubKey = key.toPublic(); + else + pubKey = key; + + var cipher = 'none'; + var kdf = 'none'; + var kdfopts = Buffer.alloc(0); + var cinf = { blockSize: 8 }; + var passphrase; + if (options !== undefined) { + passphrase = options.passphrase; + if (typeof (passphrase) === 'string') + passphrase = Buffer.from(passphrase, 'utf-8'); + if (passphrase !== undefined) { + assert.buffer(passphrase, 'options.passphrase'); + assert.optionalString(options.cipher, 'options.cipher'); + cipher = options.cipher; + if (cipher === undefined) + cipher = 'aes128-ctr'; + cinf = utils.opensshCipherInfo(cipher); + kdf = 'bcrypt'; + } + } + + var privBuf; + if (PrivateKey.isPrivateKey(key)) { + privBuf = new SSHBuffer({}); + var checkInt = crypto.randomBytes(4).readUInt32BE(0); + privBuf.writeInt(checkInt); + privBuf.writeInt(checkInt); + privBuf.write(key.toBuffer('rfc4253')); + privBuf.writeString(key.comment || ''); + + var n = 1; + while (privBuf._offset % cinf.blockSize !== 0) + privBuf.writeChar(n++); + privBuf = privBuf.toBuffer(); + } + + switch (kdf) { + case 'none': + break; + case 'bcrypt': + var salt = crypto.randomBytes(16); + var rounds = 16; + var kdfssh = new SSHBuffer({}); + kdfssh.writeBuffer(salt); + kdfssh.writeInt(rounds); + kdfopts = kdfssh.toBuffer(); + + if (bcrypt === undefined) { + bcrypt = __webpack_require__(319); + } + var pass = new Uint8Array(passphrase); + var salti = new Uint8Array(salt); + /* Use the pbkdf to derive both the key and the IV. */ + var out = new Uint8Array(cinf.keySize + cinf.blockSize); + var res = bcrypt.pbkdf(pass, pass.length, salti, salti.length, + out, out.length, rounds); + if (res !== 0) { + throw (new Error('bcrypt_pbkdf function returned ' + + 'failure, parameters invalid')); + } + out = Buffer.from(out); + var ckey = out.slice(0, cinf.keySize); + var iv = out.slice(cinf.keySize, cinf.keySize + cinf.blockSize); + + var cipherStream = crypto.createCipheriv(cinf.opensslName, + ckey, iv); + cipherStream.setAutoPadding(false); + var chunk, chunks = []; + cipherStream.once('error', function (e) { + throw (e); + }); + cipherStream.write(privBuf); + cipherStream.end(); + while ((chunk = cipherStream.read()) !== null) + chunks.push(chunk); + privBuf = Buffer.concat(chunks); + break; + default: + throw (new Error('Unsupported kdf ' + kdf)); + } + + var buf = new SSHBuffer({}); + + buf.writeCString(MAGIC); + buf.writeString(cipher); /* cipher */ + buf.writeString(kdf); /* kdf */ + buf.writeBuffer(kdfopts); /* kdfoptions */ + + buf.writeInt(1); /* nkeys */ + buf.writeBuffer(pubKey.toBuffer('rfc4253')); + + if (privBuf) + buf.writeBuffer(privBuf); + + buf = buf.toBuffer(); + + var header; + if (PrivateKey.isPrivateKey(key)) + header = 'OPENSSH PRIVATE KEY'; + else + header = 'OPENSSH PUBLIC KEY'; + + var tmp = buf.toString('base64'); + var len = tmp.length + (tmp.length / 70) + + 18 + 16 + header.length*2 + 10; + buf = Buffer.alloc(len); + var o = 0; + o += buf.write('-----BEGIN ' + header + '-----\n', o); + for (var i = 0; i < tmp.length; ) { + var limit = i + 70; + if (limit > tmp.length) + limit = tmp.length; + o += buf.write(tmp.slice(i, limit), o); + buf[o++] = 10; + i = limit; + } + o += buf.write('-----END ' + header + '-----\n', o); + + return (buf.slice(0, o)); +} + + +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { + +var chownr = __webpack_require__(587) +var tar = __webpack_require__(425) +var pump = __webpack_require__(821) +var mkdirp = __webpack_require__(234) +var fs = __webpack_require__(12) +var path = __webpack_require__(2) +var os = __webpack_require__(81) + +var win32 = os.platform() === 'win32' + +var noop = function () {} + +var echo = function (name) { + return name +} + +var normalize = !win32 ? echo : function (name) { + return name.replace(/\\/g, '/').replace(/[:?<>|]/g, '_') +} + +var statAll = function (fs, stat, cwd, ignore, entries, sort) { + var queue = entries || ['.'] + + return function loop (callback) { + if (!queue.length) return callback() + var next = queue.shift() + var nextAbs = path.join(cwd, next) + + stat(nextAbs, function (err, stat) { + if (err) return callback(err) + + if (!stat.isDirectory()) return callback(null, next, stat) + + fs.readdir(nextAbs, function (err, files) { + if (err) return callback(err) + + if (sort) files.sort() + for (var i = 0; i < files.length; i++) { + if (!ignore(path.join(cwd, next, files[i]))) queue.push(path.join(next, files[i])) + } + + callback(null, next, stat) + }) + }) + } +} + +var strip = function (map, level) { + return function (header) { + header.name = header.name.split('/').slice(level).join('/') + + var linkname = header.linkname + if (linkname && (header.type === 'link' || path.isAbsolute(linkname))) { + header.linkname = linkname.split('/').slice(level).join('/') + } + + return map(header) + } +} + +exports.pack = function (cwd, opts) { + if (!cwd) cwd = '.' + if (!opts) opts = {} + + var xfs = opts.fs || fs + var ignore = opts.ignore || opts.filter || noop + var map = opts.map || noop + var mapStream = opts.mapStream || echo + var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd, ignore, opts.entries, opts.sort) + var strict = opts.strict !== false + var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask() + var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0 + var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0 + var pack = opts.pack || tar.pack() + var finish = opts.finish || noop + + if (opts.strip) map = strip(map, opts.strip) + + if (opts.readable) { + dmode |= parseInt(555, 8) + fmode |= parseInt(444, 8) + } + if (opts.writable) { + dmode |= parseInt(333, 8) + fmode |= parseInt(222, 8) + } + + var onsymlink = function (filename, header) { + xfs.readlink(path.join(cwd, filename), function (err, linkname) { + if (err) return pack.destroy(err) + header.linkname = normalize(linkname) + pack.entry(header, onnextentry) + }) + } + + var onstat = function (err, filename, stat) { + if (err) return pack.destroy(err) + if (!filename) { + if (opts.finalize !== false) pack.finalize() + return finish(pack) + } + + if (stat.isSocket()) return onnextentry() // tar does not support sockets... + + var header = { + name: normalize(filename), + mode: (stat.mode | (stat.isDirectory() ? dmode : fmode)) & umask, + mtime: stat.mtime, + size: stat.size, + type: 'file', + uid: stat.uid, + gid: stat.gid + } + + if (stat.isDirectory()) { + header.size = 0 + header.type = 'directory' + header = map(header) || header + return pack.entry(header, onnextentry) + } + + if (stat.isSymbolicLink()) { + header.size = 0 + header.type = 'symlink' + header = map(header) || header + return onsymlink(filename, header) + } + + // TODO: add fifo etc... + + header = map(header) || header + + if (!stat.isFile()) { + if (strict) return pack.destroy(new Error('unsupported type for ' + filename)) + return onnextentry() + } + + var entry = pack.entry(header, onnextentry) + if (!entry) return + + var rs = mapStream(xfs.createReadStream(path.join(cwd, filename)), header) + + rs.on('error', function (err) { // always forward errors on destroy + entry.destroy(err) + }) + + pump(rs, entry) + } + + var onnextentry = function (err) { + if (err) return pack.destroy(err) + statNext(onstat) + } + + onnextentry() + + return pack +} + +var head = function (list) { + return list.length ? list[list.length - 1] : null +} + +var processGetuid = function () { + return process.getuid ? process.getuid() : -1 +} + +var processUmask = function () { + return process.umask ? process.umask() : 0 +} + +exports.extract = function (cwd, opts) { + if (!cwd) cwd = '.' + if (!opts) opts = {} + + var xfs = opts.fs || fs + var ignore = opts.ignore || opts.filter || noop + var map = opts.map || noop + var mapStream = opts.mapStream || echo + var own = opts.chown !== false && !win32 && processGetuid() === 0 + var extract = opts.extract || tar.extract() + var stack = [] + var now = new Date() + var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask() + var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0 + var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0 + var strict = opts.strict !== false + + if (opts.strip) map = strip(map, opts.strip) + + if (opts.readable) { + dmode |= parseInt(555, 8) + fmode |= parseInt(444, 8) + } + if (opts.writable) { + dmode |= parseInt(333, 8) + fmode |= parseInt(222, 8) + } + + var utimesParent = function (name, cb) { // we just set the mtime on the parent dir again everytime we write an entry + var top + while ((top = head(stack)) && name.slice(0, top[0].length) !== top[0]) stack.pop() + if (!top) return cb() + xfs.utimes(top[0], now, top[1], cb) + } + + var utimes = function (name, header, cb) { + if (opts.utimes === false) return cb() + + if (header.type === 'directory') return xfs.utimes(name, now, header.mtime, cb) + if (header.type === 'symlink') return utimesParent(name, cb) // TODO: how to set mtime on link? + + xfs.utimes(name, now, header.mtime, function (err) { + if (err) return cb(err) + utimesParent(name, cb) + }) + } + + var chperm = function (name, header, cb) { + var link = header.type === 'symlink' + var chmod = link ? xfs.lchmod : xfs.chmod + var chown = link ? xfs.lchown : xfs.chown + + if (!chmod) return cb() + + var mode = (header.mode | (header.type === 'directory' ? dmode : fmode)) & umask + chmod(name, mode, function (err) { + if (err) return cb(err) + if (!own) return cb() + if (!chown) return cb() + chown(name, header.uid, header.gid, cb) + }) + } + + extract.on('entry', function (header, stream, next) { + header = map(header) || header + header.name = normalize(header.name) + var name = path.join(cwd, path.join('/', header.name)) + + if (ignore(name, header)) { + stream.resume() + return next() + } + + var stat = function (err) { + if (err) return next(err) + utimes(name, header, function (err) { + if (err) return next(err) + if (win32) return next() + chperm(name, header, next) + }) + } + + var onsymlink = function () { + if (win32) return next() // skip symlinks on win for now before it can be tested + xfs.unlink(name, function () { + xfs.symlink(header.linkname, name, stat) + }) + } + + var onlink = function () { + if (win32) return next() // skip links on win for now before it can be tested + xfs.unlink(name, function () { + var srcpath = path.join(cwd, path.join('/', header.linkname)) + + xfs.link(srcpath, name, function (err) { + if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) { + stream = xfs.createReadStream(srcpath) + return onfile() + } + + stat(err) + }) + }) + } + + var onfile = function () { + var ws = xfs.createWriteStream(name) + var rs = mapStream(stream, header) + + ws.on('error', function (err) { // always forward errors on destroy + rs.destroy(err) + }) + + pump(rs, ws, function (err) { + if (err) return next(err) + ws.on('close', stat) + }) + } + + if (header.type === 'directory') { + stack.push([name, header.mtime]) + return mkdirfix(name, { + fs: xfs, own: own, uid: header.uid, gid: header.gid + }, stat) + } + + var dir = path.dirname(name) + + validate(xfs, dir, path.join(cwd, '.'), function (err, valid) { + if (err) return next(err) + if (!valid) return next(new Error(dir + ' is not a valid path')) + + mkdirfix(dir, { + fs: xfs, own: own, uid: header.uid, gid: header.gid + }, function (err) { + if (err) return next(err) + + switch (header.type) { + case 'file': return onfile() + case 'link': return onlink() + case 'symlink': return onsymlink() + } + + if (strict) return next(new Error('unsupported type for ' + name + ' (' + header.type + ')')) + + stream.resume() + next() + }) + }) + }) + + if (opts.finish) extract.on('finish', opts.finish) + + return extract +} + +function validate (fs, name, root, cb) { + if (name === root) return cb(null, true) + fs.lstat(name, function (err, st) { + if (err && err.code !== 'ENOENT') return cb(err) + if (err || st.isDirectory()) return validate(fs, path.join(name, '..'), root, cb) + cb(null, false) + }) +} + +function mkdirfix (name, opts, cb) { + mkdirp(name, {fs: opts.fs}, function (err, made) { + if (!err && made && opts.own) { + chownr(made, opts.uid, opts.gid, cb) + } else { + cb(err) + } + }) +} + + +/***/ }), +/* 178 */ +/***/ (function(module, exports) { + +module.exports = require("https"); + +/***/ }), +/* 179 */ +/***/ (function(module, exports) { + +module.exports = require("querystring"); + +/***/ }), +/* 180 */ +/***/ (function(module, exports) { + +module.exports = require("readline"); + +/***/ }), +/* 181 */ +/***/ (function(module, exports) { + +module.exports = require("zlib"); + +/***/ }), +/* 182 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48744,7 +45553,7 @@ Object.defineProperty(exports, "__esModule", { var _consoleReporter; function _load_consoleReporter() { - return _consoleReporter = __webpack_require__(428); + return _consoleReporter = __webpack_require__(542); } Object.defineProperty(exports, 'ConsoleReporter', { @@ -48757,7 +45566,7 @@ Object.defineProperty(exports, 'ConsoleReporter', { var _bufferReporter; function _load_bufferReporter() { - return _bufferReporter = __webpack_require__(427); + return _bufferReporter = __webpack_require__(541); } Object.defineProperty(exports, 'BufferReporter', { @@ -48770,7 +45579,7 @@ Object.defineProperty(exports, 'BufferReporter', { var _eventReporter; function _load_eventReporter() { - return _eventReporter = __webpack_require__(432); + return _eventReporter = __webpack_require__(546); } Object.defineProperty(exports, 'EventReporter', { @@ -48783,7 +45592,7 @@ Object.defineProperty(exports, 'EventReporter', { var _jsonReporter; function _load_jsonReporter() { - return _jsonReporter = __webpack_require__(154); + return _jsonReporter = __webpack_require__(194); } Object.defineProperty(exports, 'JSONReporter', { @@ -48796,7 +45605,7 @@ Object.defineProperty(exports, 'JSONReporter', { var _noopReporter; function _load_noopReporter() { - return _noopReporter = __webpack_require__(434); + return _noopReporter = __webpack_require__(548); } Object.defineProperty(exports, 'NoopReporter', { @@ -48809,7 +45618,7 @@ Object.defineProperty(exports, 'NoopReporter', { var _baseReporter; function _load_baseReporter() { - return _baseReporter = __webpack_require__(74); + return _baseReporter = __webpack_require__(95); } Object.defineProperty(exports, 'Reporter', { @@ -48822,7 +45631,599 @@ Object.defineProperty(exports, 'Reporter', { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/* 147 */ +/* 183 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// On windows, create a .cmd file. +// Read the #! in the file to see what it uses. The vast majority +// of the time, this will be either: +// "#!/usr/bin/env " +// or: +// "#! " +// +// Write a binroot/pkg.bin + ".cmd" file that has this line in it: +// @ %~dp0 %* + +module.exports = cmdShim +cmdShim.ifExists = cmdShimIfExists + +const fs = __webpack_require__(802) + +const mkdir = __webpack_require__(800) +const path = __webpack_require__(2) +const isWindows = __webpack_require__(781) +const shebangExpr = /^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ +const DEFAULT_OPTIONS = { + // Create PowerShell file by default if the option hasn't been specified + createPwshFile: true, + createCmdFile: isWindows() +} + +function cmdShimIfExists (src, to, opts) { + opts = Object.assign({}, DEFAULT_OPTIONS, opts) + return fs.stat(src) + .then(() => cmdShim(src, to, opts)) + .catch(() => {}) +} + +// Try to unlink, but ignore errors. +// Any problems will surface later. +function rm (path) { + return fs.unlink(path).catch(() => {}) +} + +function cmdShim (src, to, opts) { + opts = Object.assign({}, DEFAULT_OPTIONS, opts) + return fs.stat(src) + .then(() => cmdShim_(src, to, opts)) +} + +function cmdShim_ (src, to, opts) { + return Promise.all([ + rm(to), + rm(`${to}.ps1`), + opts.createCmdFile && rm(`${to}.cmd`) + ]) + .then(() => writeShim(src, to, opts)) +} + +function writeShim (src, to, opts) { + opts = Object.assign({}, DEFAULT_OPTIONS, opts) + const defaultArgs = opts.preserveSymlinks ? '--preserve-symlinks' : '' + // make a cmd file and a sh script + // First, check if the bin is a #! of some sort. + // If not, then assume it's something that'll be compiled, or some other + // sort of script, and just call it directly. + return mkdir(path.dirname(to)) + .then(() => { + return fs.readFile(src, 'utf8') + .then(data => { + const firstLine = data.trim().split(/\r*\n/)[0] + const shebang = firstLine.match(shebangExpr) + if (!shebang) return writeShim_(src, to, Object.assign({}, opts, {args: defaultArgs})) + const prog = shebang[1] + const args = (shebang[2] && ((defaultArgs && (shebang[2] + ' ' + defaultArgs)) || shebang[2])) || defaultArgs + return writeShim_(src, to, Object.assign({}, opts, {prog, args})) + }) + .catch(() => writeShim_(src, to, Object.assign({}, opts, {args: defaultArgs}))) + }) +} + +function writeShim_ (src, to, opts) { + opts = Object.assign({}, DEFAULT_OPTIONS, opts) + let shTarget = path.relative(path.dirname(to), src) + let target = shTarget.split('/').join('\\') + let longProg + let prog = opts.prog + let shProg = prog && prog.split('\\').join('/') + let shLongProg + let pwshProg = shProg && `"${shProg}$exe"` + let pwshLongProg + shTarget = shTarget.split('\\').join('/') + let args = opts.args || '' + let { + win32: nodePath, + posix: shNodePath + } = normalizePathEnvVar(opts.nodePath) + if (!prog) { + prog = `"%~dp0\\${target}"` + shProg = `"$basedir/${shTarget}"` + pwshProg = shProg + args = '' + target = '' + shTarget = '' + } else { + longProg = `"%~dp0\\${prog}.exe"` + shLongProg = '"$basedir/' + prog + '"' + pwshLongProg = `"$basedir/${prog}$exe"` + target = `"%~dp0\\${target}"` + shTarget = `"$basedir/${shTarget}"` + } + + let cmd + if (opts.createCmdFile) { + // @IF EXIST "%~dp0\node.exe" ( + // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) ELSE ( + // SETLOCAL + // SET PATHEXT=%PATHEXT:;.JS;=;% + // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) + cmd = nodePath ? `@SET NODE_PATH=${nodePath}\r\n` : '' + if (longProg) { + cmd += '@IF EXIST ' + longProg + ' (\r\n' + + ' ' + longProg + ' ' + args + ' ' + target + ' %*\r\n' + + ') ELSE (\r\n' + + ' @SETLOCAL\r\n' + + ' @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n' + + ' ' + prog + ' ' + args + ' ' + target + ' %*\r\n' + + ')' + } else { + cmd += `@${prog} ${args} ${target} %*\r\n` + } + } + + // #!/bin/sh + // basedir=`dirname "$0"` + // + // case `uname` in + // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + // esac + // + // if [ -x "$basedir/node.exe" ]; then + // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // else + // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // fi + // exit $ret + + let sh = '#!/bin/sh\n' + sh = sh + + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" + + '\n' + + 'case `uname` in\n' + + ' *CYGWIN*) basedir=`cygpath -w "$basedir"`;;\n' + + 'esac\n' + + '\n' + const env = opts.nodePath ? `NODE_PATH="${shNodePath}" ` : '' + + if (shLongProg) { + sh = sh + + 'if [ -x ' + shLongProg + ' ]; then\n' + + ' ' + env + shLongProg + ' ' + args + ' ' + shTarget + ' "$@"\n' + + ' ret=$?\n' + + 'else \n' + + ' ' + env + shProg + ' ' + args + ' ' + shTarget + ' "$@"\n' + + ' ret=$?\n' + + 'fi\n' + + 'exit $ret\n' + } else { + sh = sh + env + shProg + ' ' + args + ' ' + shTarget + ' "$@"\n' + + 'exit $?\n' + } + + // #!/usr/bin/env pwsh + // $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + // + // $ret=0 + // $exe = "" + // if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + // # Fix case when both the Windows and Linux builds of Node + // # are installed in the same directory + // $exe = ".exe" + // } + // if (Test-Path "$basedir/node") { + // & "$basedir/node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args + // $ret=$LASTEXITCODE + // } else { + // & "node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args + // $ret=$LASTEXITCODE + // } + // exit $ret + let pwsh = '#!/usr/bin/env pwsh\n' + + '$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n' + + '\n' + + '$exe=""\n' + + (opts.nodePath ? '$env_node_path=$env:NODE_PATH\n' + + `$env:NODE_PATH="${nodePath}"\n` : '') + + 'if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {\n' + + ' # Fix case when both the Windows and Linux builds of Node\n' + + ' # are installed in the same directory\n' + + ' $exe=".exe"\n' + + '}' + if (opts.nodePath) { + pwsh = pwsh + + ' else {\n' + + ` $env:NODE_PATH="${shNodePath}"\n` + + '}' + } + pwsh += '\n' + if (shLongProg) { + pwsh = pwsh + + '$ret=0\n' + + `if (Test-Path ${pwshLongProg}) {\n` + + ` & ${pwshLongProg} ${args} ${shTarget} $args\n` + + ' $ret=$LASTEXITCODE\n' + + '} else {\n' + + ` & ${pwshProg} ${args} ${shTarget} $args\n` + + ' $ret=$LASTEXITCODE\n' + + '}\n' + + (opts.nodePath ? '$env:NODE_PATH=$env_node_path\n' : '') + + 'exit $ret\n' + } else { + pwsh = pwsh + + `& ${pwshProg} ${args} ${shTarget} $args\n` + + (opts.nodePath ? '$env:NODE_PATH=$env_node_path\n' : '') + + 'exit $LASTEXITCODE\n' + } + + return Promise.all([ + opts.createCmdFile && fs.writeFile(to + '.cmd', cmd, 'utf8'), + opts.createPwshFile && fs.writeFile(`${to}.ps1`, pwsh, 'utf8'), + fs.writeFile(to, sh, 'utf8') + ]) + .then(() => chmodShim(to, opts)) +} + +function chmodShim (to, {createCmdFile, createPwshFile}) { + return Promise.all([ + fs.chmod(to, 0o755), + createPwshFile && fs.chmod(`${to}.ps1`, 0o755), + createCmdFile && fs.chmod(`${to}.cmd`, 0o755) + ]) +} + +/** + * @param {string|string[]} nodePath + * @returns {{win32:string,posix:string}} + */ +function normalizePathEnvVar (nodePath) { + if (!nodePath) { + return { + win32: nodePath, + posix: nodePath + } + } + let split = (typeof nodePath === 'string' ? nodePath.split(path.delimiter) : Array.from(nodePath)) + let result = {} + for (let i = 0; i < split.length; i++) { + const win32 = split[i].split('/').join('\\') + const posix = isWindows() ? split[i].split('\\').join('/').replace(/^([^:\\/]*):/, (_, $1) => `/mnt/${$1.toLowerCase()}`) : split[i] + + result.win32 = result.win32 ? `${result.win32};${win32}` : win32 + result.posix = result.posix ? `${result.posix}:${posix}` : posix + + result[i] = {win32, posix} + } + return result +} + + +/***/ }), +/* 184 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var resolve = __webpack_require__(185); + +module.exports = { + Validation: errorSubclass(ValidationError), + MissingRef: errorSubclass(MissingRefError) +}; + + +function ValidationError(errors) { + this.message = 'validation failed'; + this.errors = errors; + this.ajv = this.validation = true; +} + + +MissingRefError.message = function (baseId, ref) { + return 'can\'t resolve reference ' + ref + ' from id ' + baseId; +}; + + +function MissingRefError(baseId, ref, message) { + this.message = message || MissingRefError.message(baseId, ref); + this.missingRef = resolve.url(baseId, ref); + this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); +} + + +function errorSubclass(Subclass) { + Subclass.prototype = Object.create(Error.prototype); + Subclass.prototype.constructor = Subclass; + return Subclass; +} + + +/***/ }), +/* 185 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var url = __webpack_require__(29) + , equal = __webpack_require__(228) + , util = __webpack_require__(93) + , SchemaObject = __webpack_require__(270) + , traverse = __webpack_require__(782); + +module.exports = resolve; + +resolve.normalizeId = normalizeId; +resolve.fullPath = getFullPath; +resolve.url = resolveUrl; +resolve.ids = resolveIds; +resolve.inlineRef = inlineRef; +resolve.schema = resolveSchema; + +/** + * [resolve and compile the references ($ref)] + * @this Ajv + * @param {Function} compile reference to schema compilation funciton (localCompile) + * @param {Object} root object with information about the root schema for the current schema + * @param {String} ref reference to resolve + * @return {Object|Function} schema object (if the schema can be inlined) or validation function + */ +function resolve(compile, root, ref) { + /* jshint validthis: true */ + var refVal = this._refs[ref]; + if (typeof refVal == 'string') { + if (this._refs[refVal]) refVal = this._refs[refVal]; + else return resolve.call(this, compile, root, refVal); + } + + refVal = refVal || this._schemas[ref]; + if (refVal instanceof SchemaObject) { + return inlineRef(refVal.schema, this._opts.inlineRefs) + ? refVal.schema + : refVal.validate || this._compile(refVal); + } + + var res = resolveSchema.call(this, root, ref); + var schema, v, baseId; + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + + if (schema instanceof SchemaObject) { + v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); + } else if (schema !== undefined) { + v = inlineRef(schema, this._opts.inlineRefs) + ? schema + : compile.call(this, schema, root, undefined, baseId); + } + + return v; +} + + +/** + * Resolve schema, its root and baseId + * @this Ajv + * @param {Object} root root object with properties schema, refVal, refs + * @param {String} ref reference to resolve + * @return {Object} object with properties schema, root, baseId + */ +function resolveSchema(root, ref) { + /* jshint validthis: true */ + var p = url.parse(ref, false, true) + , refPath = _getFullPath(p) + , baseId = getFullPath(this._getId(root.schema)); + if (refPath !== baseId) { + var id = normalizeId(refPath); + var refVal = this._refs[id]; + if (typeof refVal == 'string') { + return resolveRecursive.call(this, root, refVal, p); + } else if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + root = refVal; + } else { + refVal = this._schemas[id]; + if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + if (id == normalizeId(ref)) + return { schema: refVal, root: root, baseId: baseId }; + root = refVal; + } else { + return; + } + } + if (!root.schema) return; + baseId = getFullPath(this._getId(root.schema)); + } + return getJsonPointer.call(this, p, baseId, root.schema, root); +} + + +/* @this Ajv */ +function resolveRecursive(root, ref, parsedRef) { + /* jshint validthis: true */ + var res = resolveSchema.call(this, root, ref); + if (res) { + var schema = res.schema; + var baseId = res.baseId; + root = res.root; + var id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + return getJsonPointer.call(this, parsedRef, baseId, schema, root); + } +} + + +var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); +/* @this Ajv */ +function getJsonPointer(parsedRef, baseId, schema, root) { + /* jshint validthis: true */ + parsedRef.hash = parsedRef.hash || ''; + if (parsedRef.hash.slice(0,2) != '#/') return; + var parts = parsedRef.hash.split('/'); + + for (var i = 1; i < parts.length; i++) { + var part = parts[i]; + if (part) { + part = util.unescapeFragment(part); + schema = schema[part]; + if (schema === undefined) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + if (schema.$ref) { + var $ref = resolveUrl(baseId, schema.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + } + } + } + } + if (schema !== undefined && schema !== root.schema) + return { schema: schema, root: root, baseId: baseId }; +} + + +var SIMPLE_INLINED = util.toHash([ + 'type', 'format', 'pattern', + 'maxLength', 'minLength', + 'maxProperties', 'minProperties', + 'maxItems', 'minItems', + 'maximum', 'minimum', + 'uniqueItems', 'multipleOf', + 'required', 'enum' +]); +function inlineRef(schema, limit) { + if (limit === false) return false; + if (limit === undefined || limit === true) return checkNoRef(schema); + else if (limit) return countKeys(schema) <= limit; +} + + +function checkNoRef(schema) { + var item; + if (Array.isArray(schema)) { + for (var i=0; i All rights reserved. @@ -48830,7 +46231,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de module.exports = { - newInvalidAsn1Error: function(msg) { + newInvalidAsn1Error: function (msg) { var e = new Error(); e.name = 'InvalidAsn1Error'; e.message = msg || ''; @@ -48841,7 +46242,7 @@ module.exports = { /***/ }), -/* 148 */ +/* 187 */ /***/ (function(module, exports) { // Copyright 2011 Mark Cavage All rights reserved. @@ -48883,7 +46284,99 @@ module.exports = { /***/ }), -/* 149 */ +/* 188 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * Inquirer.js + * A collection of common interactive command line user interfaces. + */ + +var inquirer = module.exports; + +/** + * Client interfaces + */ + +inquirer.prompts = {}; + +inquirer.Separator = __webpack_require__(147); + +inquirer.ui = { + BottomBar: __webpack_require__(500), + Prompt: __webpack_require__(501) +}; + +/** + * Create a new self-contained prompt module. + */ +inquirer.createPromptModule = function (opt) { + var promptModule = function promptModule(questions) { + var ui = new inquirer.ui.Prompt(promptModule.prompts, opt); + var promise = ui.run(questions); + + // Monkey patch the UI on the promise object so + // that it remains publicly accessible. + promise.ui = ui; + + return promise; + }; + promptModule.prompts = {}; + + /** + * Register a prompt type + * @param {String} name Prompt type name + * @param {Function} prompt Prompt constructor + * @return {inquirer} + */ + + promptModule.registerPrompt = function (name, prompt) { + promptModule.prompts[name] = prompt; + return this; + }; + + /** + * Register the defaults provider prompts + */ + + promptModule.restoreDefaultPrompts = function () { + this.registerPrompt('list', __webpack_require__(496)); + this.registerPrompt('input', __webpack_require__(283)); + this.registerPrompt('number', __webpack_require__(497)); + this.registerPrompt('confirm', __webpack_require__(493)); + this.registerPrompt('rawlist', __webpack_require__(499)); + this.registerPrompt('expand', __webpack_require__(495)); + this.registerPrompt('checkbox', __webpack_require__(492)); + this.registerPrompt('password', __webpack_require__(498)); + this.registerPrompt('editor', __webpack_require__(494)); + }; + + promptModule.restoreDefaultPrompts(); + + return promptModule; +}; + +/** + * Public CLI helper interface + * @param {Array|Object|Rx.Observable} questions - Questions settings array + * @param {Function} cb - Callback being passed the user answers + * @return {inquirer.ui.Prompt} + */ + +inquirer.prompt = inquirer.createPromptModule(); + +// Expose helper functions on the top level for easiest usage by common users +inquirer.registerPrompt = function (name, prompt) { + inquirer.prompt.registerPrompt(name, prompt); +}; +inquirer.restoreDefaultPrompts = function () { + inquirer.prompt.restoreDefaultPrompts(); +}; + +/***/ }), +/* 189 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -48903,13 +46396,13 @@ function _load_asyncToGenerator() { var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var run = exports.run = function () { @@ -49001,31 +46494,31 @@ exports.hasWrapper = hasWrapper; var _add; function _load_add() { - return _add = __webpack_require__(109); + return _add = __webpack_require__(149); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(87)); + return _packageRequest = _interopRequireDefault(__webpack_require__(112)); } var _normalizePattern; function _load_normalizePattern() { - return _normalizePattern = __webpack_require__(42); + return _normalizePattern = __webpack_require__(51); } var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -49173,6 +46666,7 @@ function setFlags(commander) { commander.option('-P, --pattern [pattern]', 'upgrade packages that match pattern'); commander.option('-T, --tilde', 'install most recent release with the same minor version. Only used when --latest is specified.'); commander.option('-C, --caret', 'install most recent release with the same major version. Only used when --latest is specified.'); + commander.option('-A', '--audit', 'Run vulnerability audit on installed packages'); } function hasWrapper(commander, args) { @@ -49182,7 +46676,7 @@ function hasWrapper(commander, args) { var requireLockfile = exports.requireLockfile = true; /***/ }), -/* 150 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49196,25 +46690,25 @@ exports.integrityErrors = undefined; var _stringify; function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); + return _stringify = _interopRequireDefault(__webpack_require__(39)); } var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _asyncToGenerator2; @@ -49226,46 +46720,46 @@ function _load_asyncToGenerator() { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _constants; function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); + return _constants = _interopRequireWildcard(__webpack_require__(14)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); } var _packageNameUtils; function _load_packageNameUtils() { - return _packageNameUtils = __webpack_require__(162); + return _packageNameUtils = __webpack_require__(202); } var _workspaceLayout; function _load_workspaceLayout() { - return _workspaceLayout = _interopRequireDefault(__webpack_require__(67)); + return _workspaceLayout = _interopRequireDefault(__webpack_require__(86)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); -var path = __webpack_require__(0); +var path = __webpack_require__(2); var integrityErrors = exports.integrityErrors = { EXPECTED_IS_NOT_A_JSON: 'integrityFailedExpectedIsNotAJSON', @@ -49567,14 +47061,18 @@ var InstallationIntegrityChecker = function () { if (flags.ignoreScripts) { result.flags.push('ignoreScripts'); } - if (flags.focus) { - result.flags.push('focus: ' + path.basename(this.config.cwd)); + if (this.config.focus) { + result.flags.push('focus: ' + this.config.focusedWorkspaceName); } if (this.config.production) { result.flags.push('production'); } + if (this.config.plugnplayEnabled) { + result.flags.push('plugnplay'); + } + var linkedModules = this.config.linkedModules; if (linkedModules.length) { @@ -49879,7 +47377,7 @@ var InstallationIntegrityChecker = function () { exports.default = InstallationIntegrityChecker; /***/ }), -/* 151 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -49893,19 +47391,19 @@ exports.fetchOneRemote = undefined; var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); + return _map = _interopRequireDefault(__webpack_require__(41)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _asyncToGenerator2; @@ -49999,25 +47497,25 @@ exports.fetch = fetch; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _index; function _load_index() { - return _index = _interopRequireWildcard(__webpack_require__(419)); + return _index = _interopRequireWildcard(__webpack_require__(532)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _promise2; function _load_promise2() { - return _promise2 = _interopRequireWildcard(__webpack_require__(66)); + return _promise2 = _interopRequireWildcard(__webpack_require__(85)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -50102,7 +47600,7 @@ function fetch(pkgs, config) { } /***/ }), -/* 152 */ +/* 192 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -50116,43 +47614,43 @@ exports.linkBin = undefined; var _from; function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(55)); + return _from = _interopRequireDefault(__webpack_require__(52)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); + return _map = _interopRequireDefault(__webpack_require__(41)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _asyncToGenerator2; @@ -50185,59 +47683,66 @@ var linkBin = exports.linkBin = function () { var _packageHoister; function _load_packageHoister() { - return _packageHoister = _interopRequireDefault(__webpack_require__(423)); + return _packageHoister = _interopRequireDefault(__webpack_require__(537)); } var _constants; function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); + return _constants = _interopRequireWildcard(__webpack_require__(14)); } var _promise2; function _load_promise2() { - return _promise2 = _interopRequireWildcard(__webpack_require__(66)); + return _promise2 = _interopRequireWildcard(__webpack_require__(85)); +} + +var _normalizePattern2; + +function _load_normalizePattern() { + return _normalizePattern2 = __webpack_require__(51); } var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _mutex; function _load_mutex() { - return _mutex = _interopRequireDefault(__webpack_require__(447)); + return _mutex = _interopRequireDefault(__webpack_require__(313)); } var _semver; function _load_semver() { - return _semver = __webpack_require__(163); + return _semver = __webpack_require__(203); } var _workspaceLayout; function _load_workspaceLayout() { - return _workspaceLayout = _interopRequireDefault(__webpack_require__(67)); + return _workspaceLayout = _interopRequireDefault(__webpack_require__(86)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); -var cmdShim = (_promise2 || _load_promise2()).promisify(__webpack_require__(259)); -var path = __webpack_require__(0); +var cmdShim = __webpack_require__(183); +var path = __webpack_require__(2); +var semver = __webpack_require__(26); // Concurrency for creating bin links disabled because of the issue #1961 var linkBinConcurrency = 1; @@ -50250,6 +47755,7 @@ var PackageLinker = function () { this.config = config; this.artifacts = {}; this.topLevelBinLinking = true; + this.unplugged = []; } PackageLinker.prototype.setArtifacts = function setArtifacts(artifacts) { @@ -50402,6 +47908,7 @@ var PackageLinker = function () { _loc = _ref8.loc; if (_dep3._reference && _dep3._reference.locations.length) { + invariant(!_dep3._reference.isPlugnplay, "Plug'n'play packages should not be referenced here"); yield this.linkSelfDependencies(_dep3, _loc, dir); } } @@ -50433,9 +47940,21 @@ var PackageLinker = function () { return allLocations.indexOf(loc) !== -1 || allLocations.push(loc); }); - var distancePairs = allLocations.map(function (loc) { + var locationBinLocPairs = allLocations.map(function (loc) { + return [loc, binLoc]; + }); + if (binLoc !== realBinLoc) { + locationBinLocPairs.push.apply(locationBinLocPairs, allLocations.map(function (loc) { + return [loc, realBinLoc]; + })); + } + + var distancePairs = locationBinLocPairs.map(function (_ref11) { + var loc = _ref11[0], + curBinLoc = _ref11[1]; + var distance = 0; - var curLoc = realBinLoc; + var curLoc = curBinLoc; var notFound = false; while (path.join(curLoc, ref.name) !== loc && path.join(curLoc, moduleFolder, ref.name) !== loc) { @@ -50457,6 +47976,8 @@ var PackageLinker = function () { }); filteredDistancePairs; + invariant(filteredDistancePairs.length > 0, `could not find a copy of ${pkg.name} to link in ${binLoc}`); + //get smallest distance from package location var minItem = filteredDistancePairs.reduce(function (min, cur) { return cur[1] < min[1] ? cur : min; @@ -50474,28 +47995,26 @@ var PackageLinker = function () { }(); PackageLinker.prototype.getFlatHoistedTree = function getFlatHoistedTree(patterns, workspaceLayout) { - var _ref11 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - ignoreOptional = _ref11.ignoreOptional, - focus = _ref11.focus; + var _ref12 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + ignoreOptional = _ref12.ignoreOptional; var hoister = new (_packageHoister || _load_packageHoister()).default(this.config, this.resolver, { ignoreOptional, workspaceLayout }); hoister.seed(patterns); - if (focus) { + if (this.config.focus) { hoister.markShallowWorkspaceEntries(); } return hoister.init(); }; PackageLinker.prototype.copyModules = function () { - var _ref12 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { var _this2 = this; - var _ref13 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - linkDuplicates = _ref13.linkDuplicates, - ignoreOptional = _ref13.ignoreOptional, - focus = _ref13.focus; + var _ref14 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + linkDuplicates = _ref14.linkDuplicates, + ignoreOptional = _ref14.ignoreOptional; - var flatTree = this.getFlatHoistedTree(patterns, workspaceLayout, { ignoreOptional, focus }); + var flatTree = this.getFlatHoistedTree(patterns, workspaceLayout, { ignoreOptional }); // sorted tree makes file creation and copying not to interfere with each other flatTree = flatTree.sort(function (dep1, dep2) { return dep1[0].localeCompare(dep2[0]); @@ -50538,38 +48057,38 @@ var PackageLinker = function () { // does not apply to symlinked dependencies var metadata = yield _this2.config.readPackageMetadata(src); for (var _iterator15 = metadata.artifacts, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator15);;) { - var _ref31; + var _ref32; if (_isArray15) { if (_i15 >= _iterator15.length) break; - _ref31 = _iterator15[_i15++]; + _ref32 = _iterator15[_i15++]; } else { _i15 = _iterator15.next(); if (_i15.done) break; - _ref31 = _i15.value; + _ref32 = _i15.value; } - var file = _ref31; + var file = _ref32; artifactFiles.push(path.join(dest, file)); } } for (var _iterator16 = symlinkPaths.entries(), _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator16);;) { - var _ref33; + var _ref34; if (_isArray16) { if (_i16 >= _iterator16.length) break; - _ref33 = _iterator16[_i16++]; + _ref34 = _iterator16[_i16++]; } else { _i16 = _iterator16.next(); if (_i16.done) break; - _ref33 = _i16.value; + _ref34 = _i16.value; } - var _ref32 = _ref33; - var symlink = _ref32[0]; - var realpath = _ref32[1]; + var _ref33 = _ref34; + var symlink = _ref33[0]; + var realpath = _ref33[1]; if (dest.indexOf(symlink + path.sep) === 0) { // after hoisting we end up with this structure @@ -50580,23 +48099,39 @@ var PackageLinker = function () { } } + if (_this2.config.plugnplayEnabled) { + ref.isPlugnplay = true; + if (yield _this2._isUnplugged(pkg, ref)) { + dest = _this2.config.generatePackageUnpluggedPath(ref); + + // We don't skip the copy if the unplugged package isn't materialized yet + if (yield (_fs || _load_fs()).exists(dest)) { + ref.addLocation(dest); + return 'continue'; + } + } else { + ref.addLocation(src); + return 'continue'; + } + } + ref.addLocation(dest); var integrityArtifacts = _this2.artifacts[`${pkg.name}@${pkg.version}`]; if (integrityArtifacts) { for (var _iterator17 = integrityArtifacts, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator17);;) { - var _ref34; + var _ref35; if (_isArray17) { if (_i17 >= _iterator17.length) break; - _ref34 = _iterator17[_i17++]; + _ref35 = _iterator17[_i17++]; } else { _i17 = _iterator17.next(); if (_i17.done) break; - _ref34 = _i17.value; + _ref35 = _i17.value; } - var _file = _ref34; + var _file = _ref35; artifactFiles.push(path.join(dest, _file)); } @@ -50632,23 +48167,23 @@ var PackageLinker = function () { }; for (var _iterator5 = flatTree, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { - var _ref15; + var _ref16; if (_isArray5) { if (_i5 >= _iterator5.length) break; - _ref15 = _iterator5[_i5++]; + _ref16 = _iterator5[_i5++]; } else { _i5 = _iterator5.next(); if (_i5.done) break; - _ref15 = _i5.value; + _ref16 = _i5.value; } - var _ref14 = _ref15; - var folder = _ref14[0]; - var _ref14$ = _ref14[1]; - var pkg = _ref14$.pkg; - var _loc3 = _ref14$.loc; - var isShallow = _ref14$.isShallow; + var _ref15 = _ref16; + var folder = _ref15[0]; + var _ref15$ = _ref15[1]; + var pkg = _ref15$.pkg; + var _loc3 = _ref15$.loc; + var isShallow = _ref15$.isShallow; var _ret2 = yield* _loop2(folder, pkg, isShallow, _loc3); @@ -50659,39 +48194,39 @@ var PackageLinker = function () { var scopedPaths = new (_set || _load_set()).default(); var findExtraneousFiles = function () { - var _ref16 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (basePath) { + var _ref17 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (basePath) { for (var _iterator6 = _this2.config.registryFolders, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { - var _ref17; + var _ref18; if (_isArray6) { if (_i6 >= _iterator6.length) break; - _ref17 = _iterator6[_i6++]; + _ref18 = _iterator6[_i6++]; } else { _i6 = _iterator6.next(); if (_i6.done) break; - _ref17 = _i6.value; + _ref18 = _i6.value; } - var folder = _ref17; + var folder = _ref18; - var _loc4 = path.join(basePath, folder); + var _loc4 = path.resolve(basePath, folder); if (yield (_fs || _load_fs()).exists(_loc4)) { var files = yield (_fs || _load_fs()).readdir(_loc4); for (var _iterator7 = files, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { - var _ref18; + var _ref19; if (_isArray7) { if (_i7 >= _iterator7.length) break; - _ref18 = _iterator7[_i7++]; + _ref19 = _iterator7[_i7++]; } else { _i7 = _iterator7.next(); if (_i7.done) break; - _ref18 = _i7.value; + _ref19 = _i7.value; } - var file = _ref18; + var file = _ref19; var filepath = path.join(_loc4, file); @@ -50700,18 +48235,18 @@ var PackageLinker = function () { scopedPaths.add(filepath); for (var _iterator8 = yield (_fs || _load_fs()).readdir(filepath), _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) { - var _ref19; + var _ref20; if (_isArray8) { if (_i8 >= _iterator8.length) break; - _ref19 = _iterator8[_i8++]; + _ref20 = _iterator8[_i8++]; } else { _i8 = _iterator8.next(); if (_i8.done) break; - _ref19 = _i8.value; + _ref20 = _i8.value; } - var subfile = _ref19; + var subfile = _ref20; possibleExtraneous.add(path.join(filepath, subfile)); } @@ -50724,25 +48259,25 @@ var PackageLinker = function () { }); return function findExtraneousFiles(_x15) { - return _ref16.apply(this, arguments); + return _ref17.apply(this, arguments); }; }(); yield findExtraneousFiles(this.config.lockfileFolder); if (workspaceLayout) { for (var _iterator9 = (0, (_keys || _load_keys()).default)(workspaceLayout.workspaces), _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) { - var _ref20; + var _ref21; if (_isArray9) { if (_i9 >= _iterator9.length) break; - _ref20 = _iterator9[_i9++]; + _ref21 = _iterator9[_i9++]; } else { _i9 = _iterator9.next(); if (_i9.done) break; - _ref20 = _i9.value; + _ref21 = _i9.value; } - var workspaceName = _ref20; + var workspaceName = _ref21; yield findExtraneousFiles(workspaceLayout.workspaces[workspaceName].loc); } @@ -50769,18 +48304,18 @@ var PackageLinker = function () { // TODO: Consolidate this logic with `this.config.linkedModules` logic for (var _iterator10 = linkedModules, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator10);;) { - var _ref21; + var _ref22; if (_isArray10) { if (_i10 >= _iterator10.length) break; - _ref21 = _iterator10[_i10++]; + _ref22 = _iterator10[_i10++]; } else { _i10 = _iterator10.next(); if (_i10.done) break; - _ref21 = _i10.value; + _ref22 = _i10.value; } - var entry = _ref21; + var entry = _ref22; var entryPath = path.join(this.config.linkFolder, entry); var stat = yield (_fs || _load_fs()).lstat(entryPath); @@ -50799,18 +48334,18 @@ var PackageLinker = function () { var scopeName = entry; for (var _iterator18 = yield (_fs || _load_fs()).readdir(entryPath), _isArray18 = Array.isArray(_iterator18), _i18 = 0, _iterator18 = _isArray18 ? _iterator18 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator18);;) { - var _ref35; + var _ref36; if (_isArray18) { if (_i18 >= _iterator18.length) break; - _ref35 = _iterator18[_i18++]; + _ref36 = _iterator18[_i18++]; } else { _i18 = _iterator18.next(); if (_i18.done) break; - _ref35 = _i18.value; + _ref36 = _i18.value; } - var entry2 = _ref35; + var entry2 = _ref36; var entryPath2 = path.join(entryPath, entry2); var stat2 = yield (_fs || _load_fs()).lstat(entryPath2); @@ -50830,18 +48365,18 @@ var PackageLinker = function () { } for (var _iterator11 = possibleExtraneous, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator11);;) { - var _ref22; + var _ref23; if (_isArray11) { if (_i11 >= _iterator11.length) break; - _ref22 = _iterator11[_i11++]; + _ref23 = _iterator11[_i11++]; } else { _i11 = _iterator11.next(); if (_i11.done) break; - _ref22 = _i11.value; + _ref23 = _i11.value; } - var _loc5 = _ref22; + var _loc5 = _ref23; var packageName = path.basename(_loc5); var scopeName = path.basename(path.dirname(_loc5)); @@ -50862,7 +48397,7 @@ var PackageLinker = function () { possibleExtraneous, artifactFiles, - ignoreBasenames: [(_constants || _load_constants()).METADATA_FILENAME, (_constants || _load_constants()).TARBALL_FILENAME], + ignoreBasenames: [(_constants || _load_constants()).METADATA_FILENAME, (_constants || _load_constants()).TARBALL_FILENAME, '.bin'], onStart: function onStart(num) { tick = _this2.reporter.progress(num); @@ -50874,6 +48409,7 @@ var PackageLinker = function () { } } }); + yield (_fs || _load_fs()).hardlinkBulk((0, (_from || _load_from()).default)(hardlinkQueue.values()), this.reporter, { possibleExtraneous, artifactFiles, @@ -50891,18 +48427,18 @@ var PackageLinker = function () { // remove all extraneous files that weren't in the tree for (var _iterator12 = possibleExtraneous, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator12);;) { - var _ref23; + var _ref24; if (_isArray12) { if (_i12 >= _iterator12.length) break; - _ref23 = _iterator12[_i12++]; + _ref24 = _iterator12[_i12++]; } else { _i12 = _iterator12.next(); if (_i12.done) break; - _ref23 = _i12.value; + _ref24 = _i12.value; } - var _loc6 = _ref23; + var _loc6 = _ref24; this.reporter.verbose(this.reporter.lang('verboseFileRemoveExtraneous', _loc6)); yield (_fs || _load_fs()).unlink(_loc6); @@ -50910,18 +48446,18 @@ var PackageLinker = function () { // remove any empty scoped directories for (var _iterator13 = scopedPaths, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator13);;) { - var _ref24; + var _ref25; if (_isArray13) { if (_i13 >= _iterator13.length) break; - _ref24 = _iterator13[_i13++]; + _ref25 = _iterator13[_i13++]; } else { _i13 = _iterator13.next(); if (_i13.done) break; - _ref24 = _i13.value; + _ref25 = _i13.value; } - var scopedPath = _ref24; + var scopedPath = _ref25; var files = yield (_fs || _load_fs()).readdir(scopedPath); if (files.length === 0) { @@ -50936,14 +48472,14 @@ var PackageLinker = function () { // create links in transient dependencies yield (_promise2 || _load_promise2()).queue(flatTree, function () { - var _ref25 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref26) { - var dest = _ref26[0], - _ref26$ = _ref26[1], - pkg = _ref26$.pkg, - isNohoist = _ref26$.isNohoist, - parts = _ref26$.parts; + var _ref26 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref27) { + var dest = _ref27[0], + _ref27$ = _ref27[1], + pkg = _ref27$.pkg, + isNohoist = _ref27$.isNohoist, + parts = _ref27$.parts; - if (pkg._reference && pkg._reference.locations.length) { + if (pkg._reference && pkg._reference.locations.length && !pkg._reference.isPlugnplay) { var binLoc = path.join(dest, _this2.config.getFolder(pkg)); yield _this2.linkBinDependencies(pkg, binLoc); if (isNohoist) { @@ -50953,53 +48489,59 @@ var PackageLinker = function () { } tickBin(); } + tickBin(); }); return function (_x16) { - return _ref25.apply(this, arguments); + return _ref26.apply(this, arguments); }; }(), linkBinConcurrency); // create links at top level for all dependencies. yield (_promise2 || _load_promise2()).queue(topLevelDependencies, function () { - var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref28) { - var dest = _ref28[0], - pkg = _ref28[1].pkg; + var _ref28 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref29) { + var dest = _ref29[0], + pkg = _ref29[1].pkg; - if (pkg._reference && pkg._reference.locations.length && pkg.bin && (0, (_keys || _load_keys()).default)(pkg.bin).length) { - var binLoc = path.join(_this2.config.lockfileFolder, _this2.config.getFolder(pkg)); + if (pkg._reference && pkg._reference.locations.length && !pkg._reference.isPlugnplay && pkg.bin && (0, (_keys || _load_keys()).default)(pkg.bin).length) { + var binLoc = void 0; + if (_this2.config.modulesFolder) { + binLoc = path.join(_this2.config.modulesFolder); + } else { + binLoc = path.join(_this2.config.lockfileFolder, _this2.config.getFolder(pkg)); + } yield _this2.linkSelfDependencies(pkg, dest, binLoc); - tickBin(); } + tickBin(); }); return function (_x17) { - return _ref27.apply(this, arguments); + return _ref28.apply(this, arguments); }; }(), linkBinConcurrency); } for (var _iterator14 = flatTree, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator14);;) { - var _ref30; + var _ref31; if (_isArray14) { if (_i14 >= _iterator14.length) break; - _ref30 = _iterator14[_i14++]; + _ref31 = _iterator14[_i14++]; } else { _i14 = _iterator14.next(); if (_i14.done) break; - _ref30 = _i14.value; + _ref31 = _i14.value; } - var _ref29 = _ref30; - var pkg = _ref29[1].pkg; + var _ref30 = _ref31; + var pkg = _ref30[1].pkg; yield this._warnForMissingBundledDependencies(pkg); } }); function copyModules(_x12, _x13) { - return _ref12.apply(this, arguments); + return _ref13.apply(this, arguments); } return copyModules; @@ -51008,20 +48550,20 @@ var PackageLinker = function () { PackageLinker.prototype._buildTreeHash = function _buildTreeHash(flatTree) { var hash = new (_map || _load_map()).default(); for (var _iterator19 = flatTree, _isArray19 = Array.isArray(_iterator19), _i19 = 0, _iterator19 = _isArray19 ? _iterator19 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator19);;) { - var _ref37; + var _ref38; if (_isArray19) { if (_i19 >= _iterator19.length) break; - _ref37 = _iterator19[_i19++]; + _ref38 = _iterator19[_i19++]; } else { _i19 = _iterator19.next(); if (_i19.done) break; - _ref37 = _i19.value; + _ref38 = _i19.value; } - var _ref36 = _ref37; - var _dest = _ref36[0]; - var hoistManifest = _ref36[1]; + var _ref37 = _ref38; + var _dest = _ref37[0]; + var hoistManifest = _ref37[1]; var key = hoistManifest.parts.join('#'); hash.set(key, [_dest, hoistManifest]); @@ -51048,20 +48590,20 @@ var PackageLinker = function () { PackageLinker.prototype.determineTopLevelBinLinkOrder = function determineTopLevelBinLinkOrder(flatTree) { var linksToCreate = new (_map || _load_map()).default(); for (var _iterator20 = flatTree, _isArray20 = Array.isArray(_iterator20), _i20 = 0, _iterator20 = _isArray20 ? _iterator20 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator20);;) { - var _ref39; + var _ref40; if (_isArray20) { if (_i20 >= _iterator20.length) break; - _ref39 = _iterator20[_i20++]; + _ref40 = _iterator20[_i20++]; } else { _i20 = _iterator20.next(); if (_i20.done) break; - _ref39 = _i20.value; + _ref40 = _i20.value; } - var _ref38 = _ref39; - var _dest2 = _ref38[0]; - var hoistManifest = _ref38[1]; + var _ref39 = _ref40; + var _dest2 = _ref39[0]; + var hoistManifest = _ref39[1]; var pkg = hoistManifest.pkg, isDirectRequire = hoistManifest.isDirectRequire, isNohoist = hoistManifest.isNohoist, @@ -51083,18 +48625,18 @@ var PackageLinker = function () { var transientBins = []; var topLevelBins = []; for (var _iterator21 = (0, (_from || _load_from()).default)(linksToCreate.values()), _isArray21 = Array.isArray(_iterator21), _i21 = 0, _iterator21 = _isArray21 ? _iterator21 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator21);;) { - var _ref40; + var _ref41; if (_isArray21) { if (_i21 >= _iterator21.length) break; - _ref40 = _iterator21[_i21++]; + _ref41 = _iterator21[_i21++]; } else { _i21 = _iterator21.next(); if (_i21.done) break; - _ref40 = _i21.value; + _ref41 = _i21.value; } - var linkToCreate = _ref40; + var linkToCreate = _ref41; if (linkToCreate[1].isDirectRequire) { topLevelBins.push(linkToCreate); @@ -51110,11 +48652,15 @@ var PackageLinker = function () { var _loop3 = function _loop3(pkg) { var peerDeps = pkg.peerDependencies; + var peerDepsMeta = pkg.peerDependenciesMeta; + if (!peerDeps) { return 'continue'; } + var ref = pkg._reference; invariant(ref, 'Package reference is missing'); + // TODO: We are taking the "shortest" ref tree but there may be multiple ref trees with the same length var refTree = ref.requests.map(function (req) { return req.parentNames; @@ -51125,18 +48671,18 @@ var PackageLinker = function () { var getLevelDistance = function getLevelDistance(pkgRef) { var minDistance = Infinity; for (var _iterator23 = pkgRef.requests, _isArray23 = Array.isArray(_iterator23), _i23 = 0, _iterator23 = _isArray23 ? _iterator23 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator23);;) { - var _ref42; + var _ref43; if (_isArray23) { if (_i23 >= _iterator23.length) break; - _ref42 = _iterator23[_i23++]; + _ref43 = _iterator23[_i23++]; } else { _i23 = _iterator23.next(); if (_i23.done) break; - _ref42 = _i23.value; + _ref43 = _i23.value; } - var req = _ref42; + var req = _ref43; var distance = refTree.length - req.parentNames.length; @@ -51152,24 +48698,28 @@ var PackageLinker = function () { for (var peerDepName in peerDeps) { var range = peerDeps[peerDepName]; + var meta = peerDepsMeta && peerDepsMeta[peerDepName]; + + var isOptional = !!(meta && meta.optional); + var peerPkgs = _this3.resolver.getAllInfoForPackageName(peerDepName); var peerError = 'unmetPeer'; var resolvedLevelDistance = Infinity; var resolvedPeerPkg = void 0; for (var _iterator24 = peerPkgs, _isArray24 = Array.isArray(_iterator24), _i24 = 0, _iterator24 = _isArray24 ? _iterator24 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator24);;) { - var _ref43; + var _ref44; if (_isArray24) { if (_i24 >= _iterator24.length) break; - _ref43 = _iterator24[_i24++]; + _ref44 = _iterator24[_i24++]; } else { _i24 = _iterator24.next(); if (_i24.done) break; - _ref43 = _i24.value; + _ref44 = _i24.value; } - var peerPkg = _ref43; + var peerPkg = _ref44; var peerPkgRef = peerPkg._reference; if (!(peerPkgRef && peerPkgRef.patterns)) { @@ -51189,25 +48739,25 @@ var PackageLinker = function () { if (resolvedPeerPkg) { ref.addDependencies(resolvedPeerPkg.patterns); _this3.reporter.verbose(_this3.reporter.lang('selectedPeer', `${pkg.name}@${pkg.version}`, `${peerDepName}@${resolvedPeerPkg.version}`, resolvedPeerPkg.level)); - } else { + } else if (!isOptional) { _this3.reporter.warn(_this3.reporter.lang(peerError, `${refTree.join(' > ')} > ${pkg.name}@${pkg.version}`, `${peerDepName}@${range}`)); } } }; for (var _iterator22 = this.resolver.getManifests(), _isArray22 = Array.isArray(_iterator22), _i22 = 0, _iterator22 = _isArray22 ? _iterator22 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator22);;) { - var _ref41; + var _ref42; if (_isArray22) { if (_i22 >= _iterator22.length) break; - _ref41 = _iterator22[_i22++]; + _ref42 = _iterator22[_i22++]; } else { _i22 = _iterator22.next(); if (_i22.done) break; - _ref41 = _i22.value; + _ref42 = _i22.value; } - var pkg = _ref41; + var pkg = _ref42; var _ret3 = _loop3(pkg); @@ -51220,7 +48770,7 @@ var PackageLinker = function () { }; PackageLinker.prototype._warnForMissingBundledDependencies = function () { - var _ref44 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pkg) { + var _ref45 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pkg) { var _this4 = this; var ref = pkg._reference; @@ -51244,43 +48794,77 @@ var PackageLinker = function () { }; for (var _iterator25 = pkg.bundleDependencies, _isArray25 = Array.isArray(_iterator25), _i25 = 0, _iterator25 = _isArray25 ? _iterator25 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator25);;) { - var _ref45; + var _ref46; if (_isArray25) { if (_i25 >= _iterator25.length) break; - _ref45 = _iterator25[_i25++]; + _ref46 = _iterator25[_i25++]; } else { _i25 = _iterator25.next(); if (_i25.done) break; - _ref45 = _i25.value; + _ref46 = _i25.value; } - var depName = _ref45; + var depName = _ref46; yield* _loop4(depName); } } }); function _warnForMissingBundledDependencies(_x18) { - return _ref44.apply(this, arguments); + return _ref45.apply(this, arguments); } return _warnForMissingBundledDependencies; }(); - PackageLinker.prototype.init = function () { - var _ref46 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { - var _ref47 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - linkDuplicates = _ref47.linkDuplicates, - ignoreOptional = _ref47.ignoreOptional, - focus = _ref47.focus; + PackageLinker.prototype._isUnplugged = function () { + var _ref47 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (pkg, ref) { + // If an unplugged folder exists for the specified package, we simply use it + if (yield (_fs || _load_fs()).exists(this.config.generatePackageUnpluggedPath(ref))) { + return true; + } - this.resolvePeerModules(); - yield this.copyModules(patterns, workspaceLayout, { linkDuplicates, ignoreOptional, focus }); + // If the package has a postinstall script, we also unplug it (otherwise they would run into the cache) + if (!this.config.ignoreScripts && pkg.scripts && (pkg.scripts.preinstall || pkg.scripts.install || pkg.scripts.postinstall)) { + return true; + } + + // Check whether the user explicitly requested for the package to be unplugged + return this.unplugged.some(function (patternToUnplug) { + var _normalizePattern = (0, (_normalizePattern2 || _load_normalizePattern()).normalizePattern)(patternToUnplug), + name = _normalizePattern.name, + range = _normalizePattern.range, + hasVersion = _normalizePattern.hasVersion; + + var satisfiesSemver = hasVersion ? semver.satisfies(ref.version, range) : true; + return name === ref.name && satisfiesSemver; + }); }); - function init(_x19, _x20) { - return _ref46.apply(this, arguments); + function _isUnplugged(_x19, _x20) { + return _ref47.apply(this, arguments); + } + + return _isUnplugged; + }(); + + PackageLinker.prototype.init = function () { + var _ref48 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (patterns, workspaceLayout) { + var _ref49 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + linkDuplicates = _ref49.linkDuplicates, + ignoreOptional = _ref49.ignoreOptional; + + this.resolvePeerModules(); + yield this.copyModules(patterns, workspaceLayout, { linkDuplicates, ignoreOptional }); + + if (!this.config.plugnplayEnabled) { + yield (_fs || _load_fs()).unlink(`${this.config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`); + } + }); + + function init(_x21, _x22) { + return _ref48.apply(this, arguments); } return init; @@ -51292,7 +48876,7 @@ var PackageLinker = function () { exports.default = PackageLinker; /***/ }), -/* 153 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51309,14 +48893,14 @@ exports.clearNthLine = clearNthLine; var _tty; function _load_tty() { - return _tty = _interopRequireDefault(__webpack_require__(106)); + return _tty = _interopRequireDefault(__webpack_require__(143)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var readline = __webpack_require__(145); +var readline = __webpack_require__(180); -var _require = __webpack_require__(115), +var _require = __webpack_require__(35), supportsColor = _require.supportsColor; var CLEAR_WHOLE_LINE = 0; @@ -51381,7 +48965,7 @@ function clearNthLine(stdout, n) { } /***/ }), -/* 154 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51394,37 +48978,37 @@ Object.defineProperty(exports, "__esModule", { var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _stringify; function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); + return _stringify = _interopRequireDefault(__webpack_require__(39)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } var _baseReporter; function _load_baseReporter() { - return _baseReporter = _interopRequireDefault(__webpack_require__(74)); + return _baseReporter = _interopRequireDefault(__webpack_require__(95)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -51600,13 +49184,25 @@ var JSONReporter = function (_BaseReporter) { }; }; + JSONReporter.prototype.auditAction = function auditAction(recommendation) { + this._dump('auditAction', recommendation); + }; + + JSONReporter.prototype.auditAdvisory = function auditAdvisory(resolution, _auditAdvisory) { + this._dump('auditAdvisory', { resolution, advisory: _auditAdvisory }); + }; + + JSONReporter.prototype.auditSummary = function auditSummary(auditMetadata) { + this._dump('auditSummary', auditMetadata); + }; + return JSONReporter; }((_baseReporter || _load_baseReporter()).default); exports.default = JSONReporter; /***/ }), -/* 155 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51620,55 +49216,55 @@ exports.shouldUpdateLockfile = undefined; var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(20)); + return _semver = _interopRequireDefault(__webpack_require__(26)); } var _minimatch; function _load_minimatch() { - return _minimatch = _interopRequireDefault(__webpack_require__(134)); + return _minimatch = _interopRequireDefault(__webpack_require__(163)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } var _normalizePattern2; function _load_normalizePattern() { - return _normalizePattern2 = __webpack_require__(42); + return _normalizePattern2 = __webpack_require__(51); } var _parsePackagePath; function _load_parsePackagePath() { - return _parsePackagePath = _interopRequireDefault(__webpack_require__(251)); + return _parsePackagePath = _interopRequireDefault(__webpack_require__(314)); } var _parsePackagePath2; function _load_parsePackagePath2() { - return _parsePackagePath2 = __webpack_require__(251); + return _parsePackagePath2 = __webpack_require__(314); } var _resolvers; function _load_resolvers() { - return _resolvers = __webpack_require__(41); + return _resolvers = __webpack_require__(62); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -51772,7 +49368,7 @@ var shouldUpdateLockfile = exports.shouldUpdateLockfile = function shouldUpdateL }; /***/ }), -/* 156 */ +/* 196 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51792,61 +49388,61 @@ function _load_asyncToGenerator() { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } var _path; function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); + return _path = _interopRequireDefault(__webpack_require__(2)); } var _invariant; function _load_invariant() { - return _invariant = _interopRequireDefault(__webpack_require__(9)); + return _invariant = _interopRequireDefault(__webpack_require__(13)); } var _uuid; function _load_uuid() { - return _uuid = _interopRequireDefault(__webpack_require__(83)); + return _uuid = _interopRequireDefault(__webpack_require__(108)); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _exoticResolver; function _load_exoticResolver() { - return _exoticResolver = _interopRequireDefault(__webpack_require__(65)); + return _exoticResolver = _interopRequireDefault(__webpack_require__(84)); } var _misc; function _load_misc() { - return _misc = _interopRequireWildcard(__webpack_require__(18)); + return _misc = _interopRequireWildcard(__webpack_require__(27)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -51943,7 +49539,7 @@ FileResolver.prefixMatcher = /^\.{1,2}\//; exports.default = FileResolver; /***/ }), -/* 157 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -51956,19 +49552,19 @@ Object.defineProperty(exports, "__esModule", { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } exports.explodeGistFragment = explodeGistFragment; @@ -51976,25 +49572,25 @@ exports.explodeGistFragment = explodeGistFragment; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(89)); + return _gitResolver = _interopRequireDefault(__webpack_require__(114)); } var _exoticResolver; function _load_exoticResolver() { - return _exoticResolver = _interopRequireDefault(__webpack_require__(65)); + return _exoticResolver = _interopRequireDefault(__webpack_require__(84)); } var _misc; function _load_misc() { - return _misc = _interopRequireWildcard(__webpack_require__(18)); + return _misc = _interopRequireWildcard(__webpack_require__(27)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -52044,7 +49640,7 @@ GistResolver.protocol = 'gist'; exports.default = GistResolver; /***/ }), -/* 158 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52057,19 +49653,19 @@ Object.defineProperty(exports, "__esModule", { var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _asyncToGenerator2; @@ -52081,80 +49677,79 @@ function _load_asyncToGenerator() { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +var _cache; + +function _load_cache() { + return _cache = __webpack_require__(289); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _registryResolver; function _load_registryResolver() { - return _registryResolver = _interopRequireDefault(__webpack_require__(440)); + return _registryResolver = _interopRequireDefault(__webpack_require__(554)); } var _npmRegistry; function _load_npmRegistry() { - return _npmRegistry = _interopRequireDefault(__webpack_require__(54)); -} - -var _npmRegistry2; - -function _load_npmRegistry2() { - return _npmRegistry2 = __webpack_require__(54); + return _npmRegistry = _interopRequireDefault(__webpack_require__(83)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } var _packageNameUtils; function _load_packageNameUtils() { - return _packageNameUtils = __webpack_require__(162); + return _packageNameUtils = __webpack_require__(202); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var inquirer = __webpack_require__(189); -var tty = __webpack_require__(106); -var invariant = __webpack_require__(9); -var path = __webpack_require__(0); -var semver = __webpack_require__(20); +var inquirer = __webpack_require__(188); +var tty = __webpack_require__(143); +var path = __webpack_require__(2); +var semver = __webpack_require__(26); +var ssri = __webpack_require__(107); -var NPM_REGISTRY = /http[s]:\/\/registry.npmjs.org/g; var NPM_REGISTRY_ID = 'npm'; var NpmResolver = function (_RegistryResolver) { @@ -52166,13 +49761,13 @@ var NpmResolver = function (_RegistryResolver) { } NpmResolver.findVersionInRegistryResponse = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, range, body, request) { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, name, range, body, request) { if (body.versions && (0, (_keys || _load_keys()).default)(body.versions).length === 0) { throw new (_errors || _load_errors()).MessageError(config.reporter.lang('registryNoVersions', body.name)); } if (!body['dist-tags'] || !body.versions) { - throw new (_errors || _load_errors()).MessageError(config.reporter.lang('malformedRegistryResponse', body.name)); + throw new (_errors || _load_errors()).MessageError(config.reporter.lang('malformedRegistryResponse', name)); } if (range in body['dist-tags']) { @@ -52213,7 +49808,7 @@ var NpmResolver = function (_RegistryResolver) { throw new (_errors || _load_errors()).MessageError(config.reporter.lang('couldntFindVersionThatMatchesRange', body.name, range)); }); - function findVersionInRegistryResponse(_x, _x2, _x3, _x4) { + function findVersionInRegistryResponse(_x, _x2, _x3, _x4, _x5) { return _ref.apply(this, arguments); } @@ -52221,7 +49816,7 @@ var NpmResolver = function (_RegistryResolver) { }(); NpmResolver.prototype.resolveRequest = function () { - var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (desiredVersion) { if (this.config.offline) { var res = yield this.resolveRequestOffline(); if (res != null) { @@ -52229,16 +49824,18 @@ var NpmResolver = function (_RegistryResolver) { } } - var body = yield this.config.registries.npm.request((_npmRegistry || _load_npmRegistry()).default.escapeName(this.name)); + var escapedName = (_npmRegistry || _load_npmRegistry()).default.escapeName(this.name); + var desiredRange = desiredVersion || this.range; + var body = yield this.config.registries.npm.request(escapedName); if (body) { - return NpmResolver.findVersionInRegistryResponse(this.config, this.range, body, this.request); + return NpmResolver.findVersionInRegistryResponse(this.config, escapedName, desiredRange, body, this.request); } else { return null; } }); - function resolveRequest() { + function resolveRequest(_x6) { return _ref2.apply(this, arguments); } @@ -52249,71 +49846,31 @@ var NpmResolver = function (_RegistryResolver) { var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { var _this2 = this; - var escapedName = (_npmRegistry || _load_npmRegistry()).default.escapeName(this.name); - var scope = this.config.registries.npm.getScope(escapedName); - - // find modules of this name - var prefix = scope ? escapedName.split((_npmRegistry2 || _load_npmRegistry2()).SCOPE_SEPARATOR)[1] : `${NPM_REGISTRY_ID}-${this.name}-`; - - invariant(this.config.cacheFolder, 'expected packages root'); - var cacheFolder = path.join(this.config.cacheFolder, scope ? `${NPM_REGISTRY_ID}-${scope}` : ''); - - var files = yield this.config.getCache('cachedPackages', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var files = yield (_fs || _load_fs()).readdir(cacheFolder); - var validFiles = []; - - for (var _iterator = files, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref5; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref5 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref5 = _i.value; - } - - var _name = _ref5; - - // no hidden files - if (_name[0] === '.') { - continue; - } - - // ensure valid module cache - var dir = path.join(cacheFolder, _name); - if (yield _this2.config.isValidModuleDest(dir)) { - validFiles.push(_name); - } - } - - return validFiles; - })); + var packageDirs = yield this.config.getCache('cachedPackages', function () { + return (0, (_cache || _load_cache()).getCachedPackagesDirs)(_this2.config, _this2.config.cacheFolder); + }); var versions = (0, (_map || _load_map()).default)(); - for (var _iterator2 = files, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref6; + for (var _iterator = packageDirs, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref4; - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref6 = _iterator2[_i2++]; + if (_isArray) { + if (_i >= _iterator.length) break; + _ref4 = _iterator[_i++]; } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref6 = _i2.value; + _i = _iterator.next(); + if (_i.done) break; + _ref4 = _i.value; } - var _name2 = _ref6; + var dir = _ref4; - // check if folder starts with our prefix - if (_name2.indexOf(prefix) !== 0) { + // check if folder contains the registry prefix + if (dir.indexOf(`${NPM_REGISTRY_ID}-`) === -1) { continue; } - var dir = path.join(cacheFolder, _name2); - // read manifest and validate correct name var pkg = yield this.config.readManifest(dir, NPM_REGISTRY_ID); if (pkg.name !== this.name) { @@ -52350,14 +49907,14 @@ var NpmResolver = function (_RegistryResolver) { NpmResolver.prototype.cleanRegistry = function cleanRegistry(url) { if (this.config.getOption('registry') === (_constants || _load_constants()).YARN_REGISTRY) { - return url.replace(NPM_REGISTRY, (_constants || _load_constants()).YARN_REGISTRY); + return url.replace((_constants || _load_constants()).NPM_REGISTRY_RE, (_constants || _load_constants()).YARN_REGISTRY); } else { return url; } }; NpmResolver.prototype.resolve = function () { - var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { // lockfile var shrunk = this.request.getLocked('tarball'); if (shrunk) { @@ -52367,16 +49924,24 @@ var NpmResolver = function (_RegistryResolver) { var offlineMirrorPath = this.config.getOfflineMirrorPath(); if (prebuiltVariants[prebuiltName] && offlineMirrorPath) { var filename = path.join(offlineMirrorPath, 'prebuilt', prebuiltName + '.tgz'); - if (shrunk._remote && (yield (_fs || _load_fs()).exists(filename))) { - shrunk._remote.reference = `file:${filename}`; - shrunk._remote.hash = prebuiltVariants[prebuiltName]; + var _remote = shrunk._remote; + + if (_remote && (yield (_fs || _load_fs()).exists(filename))) { + _remote.reference = `file:${filename}`; + _remote.hash = prebuiltVariants[prebuiltName]; + _remote.integrity = ssri.fromHex(_remote.hash, 'sha1').toString(); } } } + } + if (shrunk && shrunk._remote && (shrunk._remote.integrity || this.config.offline || !this.config.autoAddIntegrity)) { + // if the integrity field does not exist, we're not network-restricted, and the + // migration hasn't been disabled, it needs to be created return shrunk; } - var info = yield this.resolveRequest(); + var desiredVersion = shrunk && shrunk.version ? shrunk.version : null; + var info = yield this.resolveRequest(desiredVersion); if (info == null) { throw new (_errors || _load_errors()).MessageError(this.reporter.lang('packageNotFoundRegistry', this.name, NPM_REGISTRY_ID)); } @@ -52384,6 +49949,11 @@ var NpmResolver = function (_RegistryResolver) { var deprecated = info.deprecated, dist = info.dist; + if (shrunk && shrunk._remote) { + shrunk._remote.integrity = dist && dist.integrity ? ssri.parse(dist.integrity) : ssri.fromHex(dist && dist.shasum ? dist.shasum : '', 'sha1'); + return shrunk; + } + if (typeof deprecated === 'string') { var human = `${info.name}@${info.version}`; var parentNames = this.request.parentNames; @@ -52399,6 +49969,7 @@ var NpmResolver = function (_RegistryResolver) { type: 'tarball', reference: this.cleanRegistry(dist.tarball), hash: dist.shasum, + integrity: dist.integrity ? ssri.parse(dist.integrity) : ssri.fromHex(dist.shasum, 'sha1'), registry: NPM_REGISTRY_ID, packageName: info.name }; @@ -52410,7 +49981,7 @@ var NpmResolver = function (_RegistryResolver) { }); function resolve() { - return _ref7.apply(this, arguments); + return _ref5.apply(this, arguments); } return resolve; @@ -52423,7 +49994,7 @@ NpmResolver.registry = NPM_REGISTRY_ID; exports.default = NpmResolver; /***/ }), -/* 159 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -52436,7 +50007,7 @@ Object.defineProperty(exports, "__esModule", { var _from; function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(55)); + return _from = _interopRequireDefault(__webpack_require__(52)); } var _asyncToGenerator2; @@ -52448,91 +50019,91 @@ function _load_asyncToGenerator() { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _invariant; function _load_invariant() { - return _invariant = _interopRequireDefault(__webpack_require__(9)); + return _invariant = _interopRequireDefault(__webpack_require__(13)); } var _string_decoder; function _load_string_decoder() { - return _string_decoder = __webpack_require__(205); + return _string_decoder = __webpack_require__(264); } var _tarFs; function _load_tarFs() { - return _tarFs = _interopRequireDefault(__webpack_require__(140)); + return _tarFs = _interopRequireDefault(__webpack_require__(177)); } var _tarStream; function _load_tarStream() { - return _tarStream = _interopRequireDefault(__webpack_require__(329)); + return _tarStream = _interopRequireDefault(__webpack_require__(425)); } var _url; function _load_url() { - return _url = _interopRequireDefault(__webpack_require__(19)); + return _url = _interopRequireDefault(__webpack_require__(29)); } var _fs; function _load_fs() { - return _fs = __webpack_require__(10); + return _fs = __webpack_require__(12); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _gitSpawn; function _load_gitSpawn() { - return _gitSpawn = __webpack_require__(250); + return _gitSpawn = __webpack_require__(312); } var _gitRefResolver; function _load_gitRefResolver() { - return _gitRefResolver = __webpack_require__(444); + return _gitRefResolver = __webpack_require__(559); } var _crypto; function _load_crypto() { - return _crypto = _interopRequireWildcard(__webpack_require__(90)); + return _crypto = _interopRequireWildcard(__webpack_require__(153)); } var _fs2; function _load_fs2() { - return _fs2 = _interopRequireWildcard(__webpack_require__(7)); + return _fs2 = _interopRequireWildcard(__webpack_require__(8)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -52886,6 +50457,7 @@ var Git = function () { return (_fs2 || _load_fs2()).lockQueue.push(gitUrl.repository, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { if (yield (_fs2 || _load_fs2()).exists(cwd)) { + yield (0, (_gitSpawn || _load_gitSpawn()).spawn)(['fetch', '--tags'], { cwd }); yield (0, (_gitSpawn || _load_gitSpawn()).spawn)(['pull'], { cwd }); } else { yield (0, (_gitSpawn || _load_gitSpawn()).spawn)(['clone', gitUrl.repository, cwd]); @@ -53149,7 +50721,7 @@ var Git = function () { exports.default = Git; /***/ }), -/* 160 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53168,24 +50740,24 @@ function _load_asyncToGenerator() { var _resolveRelative; function _load_resolveRelative() { - return _resolveRelative = _interopRequireDefault(__webpack_require__(451)); + return _resolveRelative = _interopRequireDefault(__webpack_require__(565)); } var _validate; function _load_validate() { - return _validate = _interopRequireDefault(__webpack_require__(92)); + return _validate = _interopRequireDefault(__webpack_require__(116)); } var _fix; function _load_fix() { - return _fix = _interopRequireDefault(__webpack_require__(448)); + return _fix = _interopRequireDefault(__webpack_require__(562)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); +var path = __webpack_require__(2); exports.default = function () { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (info, moduleLoc, config, isRoot) { @@ -53236,7 +50808,7 @@ exports.default = function () { }(); /***/ }), -/* 161 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53253,7 +50825,7 @@ exports.extractDescription = extractDescription; exports.extractRepositoryUrl = extractRepositoryUrl; -var validateLicense = __webpack_require__(747); +var validateLicense = __webpack_require__(1000); function isValidLicense(license) { return !!license && validateLicense(license).validForNewPackages; @@ -53358,7 +50930,7 @@ function extractRepositoryUrl(repository) { } /***/ }), -/* 162 */ +/* 202 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53384,7 +50956,7 @@ function getSystemParams() { } /***/ }), -/* 163 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53399,7 +50971,7 @@ exports.diffWithUnstable = diffWithUnstable; var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(20)); + return _semver = _interopRequireDefault(__webpack_require__(26)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -53423,7 +50995,12 @@ function satisfiesWithPrereleases(version, range) { if (!version) { return false; } - var semverVersion = new (_semver || _load_semver()).default.SemVer(version, semverRange.loose); + var semverVersion = void 0; + try { + semverVersion = new (_semver || _load_semver()).default.SemVer(version, semverRange.loose); + } catch (err) { + return false; + } // A range has multiple sets of comparators. A version must satisfy all comparators in a set // and at least one set to satisfy the range. @@ -53516,7 +51093,7 @@ function diffWithUnstable(version1, version2) { } /***/ }), -/* 164 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -53536,128 +51113,19 @@ function explodeHashedUrl(url) { } /***/ }), -/* 165 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(488), __esModule: true }; +module.exports = { "default": __webpack_require__(616), __esModule: true }; /***/ }), -/* 166 */ +/* 206 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -var buffer = __webpack_require__(105); -var Buffer = buffer.Buffer; -var SlowBuffer = buffer.SlowBuffer; -var MAX_LEN = buffer.kMaxLength || 2147483647; -exports.alloc = function alloc(size, fill, encoding) { - if (typeof Buffer.alloc === 'function') { - return Buffer.alloc(size, fill, encoding); - } - if (typeof encoding === 'number') { - throw new TypeError('encoding must not be number'); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - var enc = encoding; - var _fill = fill; - if (_fill === undefined) { - enc = undefined; - _fill = 0; - } - var buf = new Buffer(size); - if (typeof _fill === 'string') { - var fillBuf = new Buffer(_fill, enc); - var flen = fillBuf.length; - var i = -1; - while (++i < size) { - buf[i] = fillBuf[i % flen]; - } - } else { - buf.fill(_fill); - } - return buf; -} -exports.allocUnsafe = function allocUnsafe(size) { - if (typeof Buffer.allocUnsafe === 'function') { - return Buffer.allocUnsafe(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - return new Buffer(size); -} -exports.from = function from(value, encodingOrOffset, length) { - if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { - return Buffer.from(value, encodingOrOffset, length); - } - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number'); - } - if (typeof value === 'string') { - return new Buffer(value, encodingOrOffset); - } - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - var offset = encodingOrOffset; - if (arguments.length === 1) { - return new Buffer(value); - } - if (typeof offset === 'undefined') { - offset = 0; - } - var len = length; - if (typeof len === 'undefined') { - len = value.byteLength - offset; - } - if (offset >= value.byteLength) { - throw new RangeError('\'offset\' is out of bounds'); - } - if (len > value.byteLength - offset) { - throw new RangeError('\'length\' is out of bounds'); - } - return new Buffer(value.slice(offset, offset + len)); - } - if (Buffer.isBuffer(value)) { - var out = new Buffer(value.length); - value.copy(out, 0, 0, value.length); - return out; - } - if (value) { - if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { - return new Buffer(value); - } - if (value.type === 'Buffer' && Array.isArray(value.data)) { - return new Buffer(value.data); - } - } - - throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); -} -exports.allocUnsafeSlow = function allocUnsafeSlow(size) { - if (typeof Buffer.allocUnsafeSlow === 'function') { - return Buffer.allocUnsafeSlow(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size >= MAX_LEN) { - throw new RangeError('size is too large'); - } - return new SlowBuffer(size); -} - +module.exports = { "default": __webpack_require__(619), __esModule: true }; /***/ }), -/* 167 */ +/* 207 */ /***/ (function(module, exports) { function Caseless (dict) { @@ -53730,33 +51198,34 @@ module.exports.httpify = function (resp, headers) { /***/ }), -/* 168 */ +/* 208 */ /***/ (function(module, exports) { -module.exports = function(it, Constructor, name, forbiddenField){ - if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { throw TypeError(name + ': incorrect invocation!'); } return it; }; + /***/ }), -/* 169 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(94) - , TAG = __webpack_require__(31)('toStringTag') - // ES3 wrong here - , ARG = cof(function(){ return arguments; }()) == 'Arguments'; +var cof = __webpack_require__(117); +var TAG = __webpack_require__(43)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error -var tryGet = function(it, key){ +var tryGet = function (it, key) { try { return it[key]; - } catch(e){ /* empty */ } + } catch (e) { /* empty */ } }; -module.exports = function(it){ +module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case @@ -53767,20 +51236,33 @@ module.exports = function(it){ : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; + /***/ }), -/* 170 */ +/* 210 */ +/***/ (function(module, exports) { + +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), +/* 211 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(44) - , document = __webpack_require__(30).document - // in old IE typeof document.createElement is 'object' - , is = isObject(document) && isObject(document.createElement); -module.exports = function(it){ +var isObject = __webpack_require__(48); +var document = __webpack_require__(36).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { return is ? document.createElement(it) : {}; }; + /***/ }), -/* 171 */ +/* 212 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys @@ -53788,270 +51270,307 @@ module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); + /***/ }), -/* 172 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(94); -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ +var cof = __webpack_require__(117); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; + /***/ }), -/* 173 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var LIBRARY = __webpack_require__(118) - , $export = __webpack_require__(38) - , redefine = __webpack_require__(279) - , hide = __webpack_require__(58) - , has = __webpack_require__(68) - , Iterators = __webpack_require__(95) - , $iterCreate = __webpack_require__(503) - , setToStringTag = __webpack_require__(98) - , getPrototypeOf = __webpack_require__(276) - , ITERATOR = __webpack_require__(31)('iterator') - , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` - , FF_ITERATOR = '@@iterator' - , KEYS = 'keys' - , VALUES = 'values'; +var LIBRARY = __webpack_require__(120); +var $export = __webpack_require__(32); +var redefine = __webpack_require__(344); +var hide = __webpack_require__(75); +var Iterators = __webpack_require__(119); +var $iterCreate = __webpack_require__(635); +var setToStringTag = __webpack_require__(124); +var getPrototypeOf = __webpack_require__(339); +var ITERATOR = __webpack_require__(43)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; -var returnThis = function(){ return this; }; +var returnThis = function () { return this; }; -module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); - var getMethod = function(kind){ - if(!BUGGY && kind in proto)return proto[kind]; - switch(kind){ - case KEYS: return function keys(){ return new Constructor(this, kind); }; - case VALUES: return function values(){ return new Constructor(this, kind); }; - } return function entries(){ return new Constructor(this, kind); }; + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; }; - var TAG = NAME + ' Iterator' - , DEF_VALUES = DEFAULT == VALUES - , VALUES_BUG = false - , proto = Base.prototype - , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] - , $default = $native || getMethod(DEFAULT) - , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined - , $anyNative = NAME == 'Array' ? proto.entries || $native : $native - , methods, key, IteratorPrototype; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; // Fix native - if($anyNative){ - IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); - if(IteratorPrototype !== Object.prototype){ + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines - if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF - if(DEF_VALUES && $native && $native.name !== VALUES){ + if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; - $default = function values(){ return $native.call(this); }; + $default = function values() { return $native.call(this); }; } // Define iterator - if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if(DEFAULT){ + Iterators[TAG] = returnThis; + if (DEFAULT) { methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; - if(FORCED)for(key in methods){ - if(!(key in proto))redefine(proto, key, methods[key]); + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; + /***/ }), -/* 174 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { -var META = __webpack_require__(121)('meta') - , isObject = __webpack_require__(44) - , has = __webpack_require__(68) - , setDesc = __webpack_require__(45).f - , id = 0; -var isExtensible = Object.isExtensible || function(){ +var META = __webpack_require__(156)('meta'); +var isObject = __webpack_require__(48); +var has = __webpack_require__(88); +var setDesc = __webpack_require__(63).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { return true; }; -var FREEZE = !__webpack_require__(57)(function(){ +var FREEZE = !__webpack_require__(74)(function () { return isExtensible(Object.preventExtensions({})); }); -var setMeta = function(it){ - setDesc(it, META, {value: { +var setMeta = function (it) { + setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs - }}); + } }); }; -var fastKey = function(it, create){ +var fastKey = function (it, create) { // return primitive with prefix - if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if(!has(it, META)){ + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { // can't set metadata to uncaught frozen object - if(!isExtensible(it))return 'F'; + if (!isExtensible(it)) return 'F'; // not necessary to add metadata - if(!create)return 'E'; + if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; -var getWeak = function(it, create){ - if(!has(it, META)){ +var getWeak = function (it, create) { + if (!has(it, META)) { // can't set metadata to uncaught frozen object - if(!isExtensible(it))return true; + if (!isExtensible(it)) return true; // not necessary to add metadata - if(!create)return false; + if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling -var onFreeze = function(it){ - if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, onFreeze: onFreeze }; -/***/ }), -/* 175 */ -/***/ (function(module, exports) { - -exports.f = Object.getOwnPropertySymbols; /***/ }), -/* 176 */ -/***/ (function(module, exports, __webpack_require__) { - -var hide = __webpack_require__(58); -module.exports = function(target, src, safe){ - for(var key in src){ - if(safe && target[key])target[key] = src[key]; - else hide(target, key, src[key]); - } return target; -}; - -/***/ }), -/* 177 */ -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__(178)('keys') - , uid = __webpack_require__(121); -module.exports = function(key){ - return shared[key] || (shared[key] = uid(key)); -}; - -/***/ }), -/* 178 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(30) - , SHARED = '__core-js_shared__' - , store = global[SHARED] || (global[SHARED] = {}); -module.exports = function(key){ - return store[key] || (store[key] = {}); -}; - -/***/ }), -/* 179 */ -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil - , floor = Math.floor; -module.exports = function(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - -/***/ }), -/* 180 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(44); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function(it, S){ - if(!isObject(it))return it; - var fn, val; - if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; - if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - throw TypeError("Can't convert object to primitive value"); -}; - -/***/ }), -/* 181 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(30) - , core = __webpack_require__(22) - , LIBRARY = __webpack_require__(118) - , wksExt = __webpack_require__(182) - , defineProperty = __webpack_require__(45).f; -module.exports = function(name){ - var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); -}; - -/***/ }), -/* 182 */ -/***/ (function(module, exports, __webpack_require__) { - -exports.f = __webpack_require__(31); - -/***/ }), -/* 183 */ -/***/ (function(module, exports, __webpack_require__) { - -var classof = __webpack_require__(169) - , ITERATOR = __webpack_require__(31)('iterator') - , Iterators = __webpack_require__(95); -module.exports = __webpack_require__(22).getIteratorMethod = function(it){ - if(it != undefined)return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - -/***/ }), -/* 184 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(87); -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} -module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); +module.exports.f = function (C) { + return new PromiseCapability(C); }; /***/ }), -/* 185 */ +/* 217 */ +/***/ (function(module, exports) { + +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { + +var hide = __webpack_require__(75); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; + + +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { + +var shared = __webpack_require__(220)('keys'); +var uid = __webpack_require__(156); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { + +var core = __webpack_require__(25); +var global = __webpack_require__(36); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(120) ? 'pure' : 'global', + copyright: '© 2018 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), +/* 221 */ +/***/ (function(module, exports) { + +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; + + +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(48); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(48); +module.exports = function (it, TYPE) { + if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); + return it; +}; + + +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(36); +var core = __webpack_require__(25); +var LIBRARY = __webpack_require__(120); +var wksExt = __webpack_require__(225); +var defineProperty = __webpack_require__(63).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; + + +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { + +exports.f = __webpack_require__(43); + + +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { + +var classof = __webpack_require__(209); +var ITERATOR = __webpack_require__(43)('iterator'); +var Iterators = __webpack_require__(119); +module.exports = __webpack_require__(25).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; + + +/***/ }), +/* 227 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -54059,6 +51578,8 @@ module.exports = function (str) { var hasOwn = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; +var defineProperty = Object.defineProperty; +var gOPD = Object.getOwnPropertyDescriptor; var isArray = function isArray(arr) { if (typeof Array.isArray === 'function') { @@ -54088,6 +51609,35 @@ var isPlainObject = function isPlainObject(obj) { return typeof key === 'undefined' || hasOwn.call(obj, key); }; +// If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target +var setProperty = function setProperty(target, options) { + if (defineProperty && options.name === '__proto__') { + defineProperty(target, options.name, { + enumerable: true, + configurable: true, + value: options.newValue, + writable: true + }); + } else { + target[options.name] = options.newValue; + } +}; + +// Return undefined instead of __proto__ if '__proto__' is not an own property +var getProperty = function getProperty(obj, name) { + if (name === '__proto__') { + if (!hasOwn.call(obj, name)) { + return void 0; + } else if (gOPD) { + // In early versions of node, obj['__proto__'] is buggy when obj has + // __proto__ as an own property. Object.getOwnPropertyDescriptor() works. + return gOPD(obj, name).value; + } + } + + return obj[name]; +}; + module.exports = function extend() { var options, name, src, copy, copyIsArray, clone; var target = arguments[0]; @@ -54112,8 +51662,8 @@ module.exports = function extend() { if (options != null) { // Extend the base object for (name in options) { - src = target[name]; - copy = options[name]; + src = getProperty(target, name); + copy = getProperty(options, name); // Prevent never-ending loop if (target !== copy) { @@ -54127,11 +51677,11 @@ module.exports = function extend() { } // Never move original objects, clone them - target[name] = extend(deep, clone, copy); + setProperty(target, { name: name, newValue: extend(deep, clone, copy) }); // Don't bring in undefined values } else if (typeof copy !== 'undefined') { - target[name] = copy; + setProperty(target, { name: name, newValue: copy }); } } } @@ -54144,12 +51694,74 @@ module.exports = function extend() { /***/ }), -/* 186 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const escapeStringRegexp = __webpack_require__(184); + +var isArray = Array.isArray; +var keyList = Object.keys; +var hasProp = Object.prototype.hasOwnProperty; + +module.exports = function equal(a, b) { + if (a === b) return true; + + var arrA = isArray(a) + , arrB = isArray(b) + , i + , length + , key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = 0; i < length; i++) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + if (a instanceof Object && b instanceof Object) { + var keys = keyList(a); + length = keys.length; + + if (length !== keyList(b).length) + return false; + + for (i = 0; i < length; i++) + if (!hasProp.call(b, keys[i])) return false; + + for (i = 0; i < length; i++) { + key = keys[i]; + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + return false; +}; + + +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const escapeStringRegexp = __webpack_require__(353); const platform = process.platform; @@ -54298,7 +51910,7 @@ module.exports = Object.assign(fn, figures); /***/ }), -/* 187 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { // Approach: @@ -54343,27 +51955,27 @@ module.exports = Object.assign(fn, figures); module.exports = glob -var fs = __webpack_require__(10) -var rp = __webpack_require__(288) -var minimatch = __webpack_require__(134) +var fs = __webpack_require__(12) +var rp = __webpack_require__(355) +var minimatch = __webpack_require__(163) var Minimatch = minimatch.Minimatch -var inherits = __webpack_require__(59) -var EE = __webpack_require__(72).EventEmitter -var path = __webpack_require__(0) -var assert = __webpack_require__(36) -var isAbsolute = __webpack_require__(198) -var globSync = __webpack_require__(567) -var common = __webpack_require__(289) +var inherits = __webpack_require__(76) +var EE = __webpack_require__(92).EventEmitter +var path = __webpack_require__(2) +var assert = __webpack_require__(49) +var isAbsolute = __webpack_require__(237) +var globSync = __webpack_require__(699) +var common = __webpack_require__(356) var alphasort = common.alphasort var alphasorti = common.alphasorti var setopts = common.setopts var ownProp = common.ownProp -var inflight = __webpack_require__(604) -var util = __webpack_require__(4) +var inflight = __webpack_require__(733) +var util = __webpack_require__(9) var childrenIgnored = common.childrenIgnored var isIgnored = common.isIgnored -var once = __webpack_require__(135) +var once = __webpack_require__(128) function glob (pattern, options, cb) { if (typeof options === 'function') cb = options, options = {} @@ -55094,638 +52706,49 @@ Glob.prototype._stat2 = function (f, abs, er, stat, cb) { /***/ }), -/* 188 */ -/***/ (function(module, exports, __webpack_require__) { - -// Load modules - -var Crypto = __webpack_require__(14); -var Url = __webpack_require__(19); -var Utils = __webpack_require__(124); - - -// Declare internals - -var internals = {}; - - -// MAC normalization format version - -exports.headerVersion = '1'; // Prevent comparison of mac values generated with different normalized string formats - - -// Supported HMAC algorithms - -exports.algorithms = ['sha1', 'sha256']; - - -// Calculate the request MAC - -/* - type: 'header', // 'header', 'bewit', 'response' - credentials: { - key: 'aoijedoaijsdlaksjdl', - algorithm: 'sha256' // 'sha1', 'sha256' - }, - options: { - method: 'GET', - resource: '/resource?a=1&b=2', - host: 'example.com', - port: 8080, - ts: 1357718381034, - nonce: 'd3d345f', - hash: 'U4MKKSmiVxk37JCCrAVIjV/OhB3y+NdwoCr6RShbVkE=', - ext: 'app-specific-data', - app: 'hf48hd83qwkj', // Application id (Oz) - dlg: 'd8djwekds9cj' // Delegated by application id (Oz), requires options.app - } -*/ - -exports.calculateMac = function (type, credentials, options) { - - var normalized = exports.generateNormalizedString(type, options); - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key).update(normalized); - var digest = hmac.digest('base64'); - return digest; -}; - - -exports.generateNormalizedString = function (type, options) { - - var resource = options.resource || ''; - if (resource && - resource[0] !== '/') { - - var url = Url.parse(resource, false); - resource = url.path; // Includes query - } - - var normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' + - options.ts + '\n' + - options.nonce + '\n' + - (options.method || '').toUpperCase() + '\n' + - resource + '\n' + - options.host.toLowerCase() + '\n' + - options.port + '\n' + - (options.hash || '') + '\n'; - - if (options.ext) { - normalized += options.ext.replace('\\', '\\\\').replace('\n', '\\n'); - } - - normalized += '\n'; - - if (options.app) { - normalized += options.app + '\n' + - (options.dlg || '') + '\n'; - } - - return normalized; -}; - - -exports.calculatePayloadHash = function (payload, algorithm, contentType) { - - var hash = exports.initializePayloadHash(algorithm, contentType); - hash.update(payload || ''); - return exports.finalizePayloadHash(hash); -}; - - -exports.initializePayloadHash = function (algorithm, contentType) { - - var hash = Crypto.createHash(algorithm); - hash.update('hawk.' + exports.headerVersion + '.payload\n'); - hash.update(Utils.parseContentType(contentType) + '\n'); - return hash; -}; - - -exports.finalizePayloadHash = function (hash) { - - hash.update('\n'); - return hash.digest('base64'); -}; - - -exports.calculateTsMac = function (ts, credentials) { - - var hmac = Crypto.createHmac(credentials.algorithm, credentials.key); - hmac.update('hawk.' + exports.headerVersion + '.ts\n' + ts + '\n'); - return hmac.digest('base64'); -}; - - -exports.timestampMessage = function (credentials, localtimeOffsetMsec) { - - var now = Utils.nowSecs(localtimeOffsetMsec); - var tsm = exports.calculateTsMac(now, credentials); - return { ts: now, tsm: tsm }; -}; +/* 231 */ +/***/ (function(module, exports) { +module.exports = [["0","\u0000",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","ⅰ",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","Ⅰ",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c","‐"],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996","〇"],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]] /***/ }), -/* 189 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Inquirer.js - * A collection of common interactive command line user interfaces. - */ - -var inquirer = module.exports; - -/** - * Client interfaces - */ - -inquirer.prompts = {}; - -inquirer.Separator = __webpack_require__(127); - -inquirer.ui = { - BottomBar: __webpack_require__(617), - Prompt: __webpack_require__(618) -}; - -/** - * Create a new self-contained prompt module. - */ -inquirer.createPromptModule = function (opt) { - var promptModule = function (questions) { - var ui = new inquirer.ui.Prompt(promptModule.prompts, opt); - var promise = ui.run(questions); - - // Monkey patch the UI on the promise object so - // that it remains publicly accessible. - promise.ui = ui; - - return promise; - }; - promptModule.prompts = {}; - - /** - * Register a prompt type - * @param {String} name Prompt type name - * @param {Function} prompt Prompt constructor - * @return {inquirer} - */ - - promptModule.registerPrompt = function (name, prompt) { - promptModule.prompts[name] = prompt; - return this; - }; - - /** - * Register the defaults provider prompts - */ - - promptModule.restoreDefaultPrompts = function () { - this.registerPrompt('list', __webpack_require__(614)); - this.registerPrompt('input', __webpack_require__(613)); - this.registerPrompt('confirm', __webpack_require__(610)); - this.registerPrompt('rawlist', __webpack_require__(616)); - this.registerPrompt('expand', __webpack_require__(612)); - this.registerPrompt('checkbox', __webpack_require__(609)); - this.registerPrompt('password', __webpack_require__(615)); - this.registerPrompt('editor', __webpack_require__(611)); - }; - - promptModule.restoreDefaultPrompts(); - - return promptModule; -}; - -/** - * Public CLI helper interface - * @param {Array|Object|rx.Observable} questions - Questions settings array - * @param {Function} cb - Callback being passed the user answers - * @return {inquirer.ui.Prompt} - */ - -inquirer.prompt = inquirer.createPromptModule(); - -// Expose helper functions on the top level for easiest usage by common users -inquirer.registerPrompt = function (name, prompt) { - inquirer.prompt.registerPrompt(name, prompt); -}; -inquirer.restoreDefaultPrompts = function () { - inquirer.prompt.restoreDefaultPrompts(); -}; - - -/***/ }), -/* 190 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var ansiRegex = __webpack_require__(221)(); - -module.exports = function (str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; - - -/***/ }), -/* 191 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = __webpack_require__(474).isCI +module.exports = __webpack_require__(588).isCI /***/ }), -/* 192 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* - * Copyright (c) 2014 Mega Limited - * under the MIT License. - * - * Authors: Guy K. Kloss - * - * You should have received a copy of the license along with this program. - */ - -var dh = __webpack_require__(638); -var eddsa = __webpack_require__(639); -var curve255 = __webpack_require__(193); -var utils = __webpack_require__(132); - - /** - * @exports jodid25519 - * Curve 25519-based cryptography collection. - * - * @description - * EC Diffie-Hellman (ECDH) based on Curve25519 and digital signatures - * (EdDSA) based on Ed25519. - */ - var ns = {}; - - /** Module version indicator as string (format: [major.minor.patch]). */ - ns.VERSION = '0.7.1'; - - ns.dh = dh; - ns.eddsa = eddsa; - ns.curve255 = curve255; - ns.utils = utils; - -module.exports = ns; - - -/***/ }), -/* 193 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * @fileOverview - * Core operations on curve 25519 required for the higher level modules. - */ - -/* - * Copyright (c) 2007, 2013, 2014 Michele Bini - * Copyright (c) 2014 Mega Limited - * under the MIT License. - * - * Authors: Guy K. Kloss, Michele Bini - * - * You should have received a copy of the license along with this program. - */ - -var core = __webpack_require__(131); -var utils = __webpack_require__(132); - - /** - * @exports jodid25519/curve255 - * Legacy compatibility module for Michele Bini's previous curve255.js. - * - * @description - * Legacy compatibility module for Michele Bini's previous curve255.js. - * - *

- * This code presents an API with all key formats as previously available - * from Michele Bini's curve255.js implementation. - *

- */ - var ns = {}; - - function curve25519_raw(f, c) { - var a, x_1, q; - - x_1 = c; - a = core.dbl(x_1, core.ONE()); - q = [x_1, core.ONE()]; - - var n = 255; - - while (core.getbit(f, n) == 0) { - n--; - // For correct constant-time operation, bit 255 should always be - // set to 1 so the following 'while' loop is never entered. - if (n < 0) { - return core.ZERO(); - } - } - n--; - - var aq = [a, q]; - - while (n >= 0) { - var r, s; - var b = core.getbit(f, n); - r = core.sum(aq[0][0], aq[0][1], aq[1][0], aq[1][1], x_1); - s = core.dbl(aq[1 - b][0], aq[1 - b][1]); - aq[1 - b] = s; - aq[b] = r; - n--; - } - q = aq[1]; - - q[1] = core.invmodp(q[1]); - q[0] = core.mulmodp(q[0], q[1]); - core.reduce(q[0]); - return q[0]; - } - - function curve25519b32(a, b) { - return _base32encode(curve25519(_base32decode(a), - _base32decode(b))); - } - - function curve25519(f, c) { - if (!c) { - c = core.BASE(); - } - f[0] &= 0xFFF8; - f[15] = (f[15] & 0x7FFF) | 0x4000; - return curve25519_raw(f, c); - } - - function _hexEncodeVector(k) { - var hexKey = utils.hexEncode(k); - // Pad with '0' at the front. - hexKey = new Array(64 + 1 - hexKey.length).join('0') + hexKey; - // Invert bytes. - return hexKey.split(/(..)/).reverse().join(''); - } - - function _hexDecodeVector(v) { - // assert(length(x) == 64); - // Invert bytes. - var hexKey = v.split(/(..)/).reverse().join(''); - return utils.hexDecode(hexKey); - } - - - // Expose some functions to the outside through this name space. - - /** - * Computes the scalar product of a point on the curve 25519. - * - * This function is used for the DH key-exchange protocol. - * - * Before multiplication, some bit operations are applied to the - * private key to ensure it is a valid Curve25519 secret key. - * It is the user's responsibility to make sure that the private - * key is a uniformly random, secret value. - * - * @function - * @param f {array} - * Private key. - * @param c {array} - * Public point on the curve. If not given, the curve's base point is used. - * @returns {array} - * Key point resulting from scalar product. - */ - ns.curve25519 = curve25519; - - /** - * Computes the scalar product of a point on the curve 25519. - * - * This variant does not make sure that the private key is valid. - * The user has the responsibility to ensure the private key is - * valid or that this results in a safe protocol. Unless you know - * exactly what you are doing, you should not use this variant, - * please use 'curve25519' instead. - * - * @function - * @param f {array} - * Private key. - * @param c {array} - * Public point on the curve. If not given, the curve's base point is used. - * @returns {array} - * Key point resulting from scalar product. - */ - ns.curve25519_raw = curve25519_raw; - - /** - * Encodes the internal representation of a key to a canonical hex - * representation. - * - * This is the format commonly used in other libraries and for - * test vectors, and is equivalent to the hex dump of the key in - * little-endian binary format. - * - * @function - * @param n {array} - * Array representation of key. - * @returns {string} - * Hexadecimal string representation of key. - */ - ns.hexEncodeVector = _hexEncodeVector; - - /** - * Decodes a canonical hex representation of a key - * to an internally compatible array representation. - * - * @function - * @param n {string} - * Hexadecimal string representation of key. - * @returns {array} - * Array representation of key. - */ - ns.hexDecodeVector = _hexDecodeVector; - - /** - * Encodes the internal representation of a key into a - * hexadecimal representation. - * - * This is a strict positional notation, most significant digit first. - * - * @function - * @param n {array} - * Array representation of key. - * @returns {string} - * Hexadecimal string representation of key. - */ - ns.hexencode = utils.hexEncode; - - /** - * Decodes a hex representation of a key to an internally - * compatible array representation. - * - * @function - * @param n {string} - * Hexadecimal string representation of key. - * @returns {array} - * Array representation of key. - */ - ns.hexdecode = utils.hexDecode; - - /** - * Encodes the internal representation of a key to a base32 - * representation. - * - * @function - * @param n {array} - * Array representation of key. - * @returns {string} - * Base32 string representation of key. - */ - ns.base32encode = utils.base32encode; - - /** - * Decodes a base32 representation of a key to an internally - * compatible array representation. - * - * @function - * @param n {string} - * Base32 string representation of key. - * @returns {array} - * Array representation of key. - */ - ns.base32decode = utils.base32decode; - -module.exports = ns; - - -/***/ }), -/* 194 */ -/***/ (function(module, exports, __webpack_require__) { - -var json = typeof JSON !== 'undefined' ? JSON : __webpack_require__(642); - -module.exports = function (obj, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var space = opts.space || ''; - if (typeof space === 'number') space = Array(space+1).join(' '); - var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; - var replacer = opts.replacer || function(key, value) { return value; }; - - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - - var seen = []; - return (function stringify (parent, key, node, level) { - var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; - var colonSeparator = space ? ': ' : ':'; - - if (node && node.toJSON && typeof node.toJSON === 'function') { - node = node.toJSON(); - } - - node = replacer.call(parent, key, node); - - if (node === undefined) { - return; - } - if (typeof node !== 'object' || node === null) { - return json.stringify(node); - } - if (isArray(node)) { - var out = []; - for (var i = 0; i < node.length; i++) { - var item = stringify(node, i, node[i], level+1) || json.stringify(null); - out.push(indent + space + item); - } - return '[' + out.join(',') + indent + ']'; - } - else { - if (seen.indexOf(node) !== -1) { - if (cycles) return json.stringify('__cycle__'); - throw new TypeError('Converting circular structure to JSON'); - } - else seen.push(node); - - var keys = objectKeys(node).sort(cmp && cmp(node)); - var out = []; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify(node, key, node[key], level+1); - - if(!value) continue; - - var keyValue = json.stringify(key) - + colonSeparator - + value; - ; - out.push(indent + space + keyValue); - } - seen.splice(seen.indexOf(node), 1); - return '{' + out.join(',') + indent + '}'; - } - })({ '': obj }, '', obj, 0); -}; - -var isArray = Array.isArray || function (x) { - return {}.toString.call(x) === '[object Array]'; -}; - -var objectKeys = Object.keys || function (obj) { - var has = Object.prototype.hasOwnProperty || function () { return true }; - var keys = []; - for (var key in obj) { - if (has.call(obj, key)) keys.push(key); - } - return keys; -}; - - -/***/ }), -/* 195 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var win32 = process && process.platform === 'win32'; -var path = __webpack_require__(0); -var fileRe = __webpack_require__(557); +var path = __webpack_require__(2); +var fileRe = __webpack_require__(690); var utils = module.exports; /** * Module dependencies */ -utils.diff = __webpack_require__(652); -utils.unique = __webpack_require__(654); -utils.braces = __webpack_require__(655); -utils.brackets = __webpack_require__(546); -utils.extglob = __webpack_require__(556); -utils.isExtglob = __webpack_require__(129); -utils.isGlob = __webpack_require__(130); -utils.typeOf = __webpack_require__(133); -utils.normalize = __webpack_require__(662); -utils.omit = __webpack_require__(667); -utils.parseGlob = __webpack_require__(670); -utils.cache = __webpack_require__(688); +utils.diff = __webpack_require__(794); +utils.unique = __webpack_require__(795); +utils.braces = __webpack_require__(796); +utils.brackets = __webpack_require__(683); +utils.extglob = __webpack_require__(688); +utils.isExtglob = __webpack_require__(160); +utils.isGlob = __webpack_require__(161); +utils.typeOf = __webpack_require__(162); +utils.normalize = __webpack_require__(805); +utils.omit = __webpack_require__(809); +utils.parseGlob = __webpack_require__(813); +utils.cache = __webpack_require__(835); /** * Get the filename of a filepath @@ -55855,11 +52878,11 @@ module.exports = utils; /***/ }), -/* 196 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { -var path = __webpack_require__(0); -var fs = __webpack_require__(10); +var path = __webpack_require__(2); +var fs = __webpack_require__(12); var _0777 = parseInt('0777', 8); module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; @@ -55959,13 +52982,110 @@ mkdirP.sync = function sync (p, opts, made) { /***/ }), -/* 197 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(660); +module.exports = __webpack_require__(803); /***/ }), -/* 198 */ +/* 236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + +/***/ }), +/* 237 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -55992,71 +53112,21 @@ module.exports.win32 = win32; /***/ }), -/* 199 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -if (!process.version || - process.version.indexOf('v0.') === 0 || - process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) { - module.exports = nextTick; -} else { - module.exports = process.nextTick; -} - -function nextTick(fn, arg1, arg2, arg3) { - if (typeof fn !== 'function') { - throw new TypeError('"callback" argument must be a function'); - } - var len = arguments.length; - var args, i; - switch (len) { - case 0: - case 1: - return process.nextTick(fn); - case 2: - return process.nextTick(function afterTickOne() { - fn.call(null, arg1); - }); - case 3: - return process.nextTick(function afterTickTwo() { - fn.call(null, arg1, arg2); - }); - case 4: - return process.nextTick(function afterTickThree() { - fn.call(null, arg1, arg2, arg3); - }); - default: - args = new Array(len - 1); - i = 0; - while (i < args.length) { - args[i++] = arguments[i]; - } - return process.nextTick(function afterTick() { - fn.apply(null, args); - }); - } -} - - -/***/ }), -/* 200 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var jsonSafeStringify = __webpack_require__(641) - , crypto = __webpack_require__(14) - , Buffer = __webpack_require__(82).Buffer +var jsonSafeStringify = __webpack_require__(784) +var crypto = __webpack_require__(21) +var Buffer = __webpack_require__(58).Buffer var defer = typeof setImmediate === 'undefined' ? process.nextTick : setImmediate -function paramsHaveRequestBody(params) { +function paramsHaveRequestBody (params) { return ( params.body || params.requestBodyStream || @@ -56105,17 +53175,1869 @@ function version () { } exports.paramsHaveRequestBody = paramsHaveRequestBody -exports.safeStringify = safeStringify -exports.md5 = md5 -exports.isReadStream = isReadStream -exports.toBase64 = toBase64 -exports.copy = copy -exports.version = version -exports.defer = defer +exports.safeStringify = safeStringify +exports.md5 = md5 +exports.isReadStream = isReadStream +exports.toBase64 = toBase64 +exports.copy = copy +exports.version = version +exports.defer = defer /***/ }), -/* 201 */ +/* 239 */ +/***/ (function(module, exports, __webpack_require__) { + +var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; + +function specifierIncluded(specifier) { + var parts = specifier.split(' '); + var op = parts.length > 1 ? parts[0] : '='; + var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); + + for (var i = 0; i < 3; ++i) { + var cur = Number(current[i] || 0); + var ver = Number(versionParts[i] || 0); + if (cur === ver) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + if (op === '<') { + return cur < ver; + } else if (op === '>=') { + return cur >= ver; + } else { + return false; + } + } + return op === '>='; +} + +function matchesRange(range) { + var specifiers = range.split(/ ?&& ?/); + if (specifiers.length === 0) { return false; } + for (var i = 0; i < specifiers.length; ++i) { + if (!specifierIncluded(specifiers[i])) { return false; } + } + return true; +} + +function versionIncluded(specifierValue) { + if (typeof specifierValue === 'boolean') { return specifierValue; } + if (specifierValue && typeof specifierValue === 'object') { + for (var i = 0; i < specifierValue.length; ++i) { + if (matchesRange(specifierValue[i])) { return true; } + } + return false; + } + return matchesRange(specifierValue); +} + +var data = __webpack_require__(856); + +var core = {}; +for (var mod in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, mod)) { + core[mod] = versionIncluded(data[mod]); + } +} +module.exports = core; + + +/***/ }), +/* 240 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ReplaySubject; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler_queue__ = __webpack_require__(403); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscription__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__operators_observeOn__ = __webpack_require__(398); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_ObjectUnsubscribedError__ = __webpack_require__(173); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__SubjectSubscription__ = __webpack_require__(386); +/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */ + + + + + + + +var ReplaySubject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ReplaySubject, _super); + function ReplaySubject(bufferSize, windowTime, scheduler) { + if (bufferSize === void 0) { + bufferSize = Number.POSITIVE_INFINITY; + } + if (windowTime === void 0) { + windowTime = Number.POSITIVE_INFINITY; + } + var _this = _super.call(this) || this; + _this.scheduler = scheduler; + _this._events = []; + _this._infiniteTimeWindow = false; + _this._bufferSize = bufferSize < 1 ? 1 : bufferSize; + _this._windowTime = windowTime < 1 ? 1 : windowTime; + if (windowTime === Number.POSITIVE_INFINITY) { + _this._infiniteTimeWindow = true; + _this.next = _this.nextInfiniteTimeWindow; + } + else { + _this.next = _this.nextTimeWindow; + } + return _this; + } + ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) { + var _events = this._events; + _events.push(value); + if (_events.length > this._bufferSize) { + _events.shift(); + } + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype.nextTimeWindow = function (value) { + this._events.push(new ReplayEvent(this._getNow(), value)); + this._trimBufferThenGetEvents(); + _super.prototype.next.call(this, value); + }; + ReplaySubject.prototype._subscribe = function (subscriber) { + var _infiniteTimeWindow = this._infiniteTimeWindow; + var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents(); + var scheduler = this.scheduler; + var len = _events.length; + var subscription; + if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_5__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else if (this.isStopped || this.hasError) { + subscription = __WEBPACK_IMPORTED_MODULE_3__Subscription__["a" /* Subscription */].EMPTY; + } + else { + this.observers.push(subscriber); + subscription = new __WEBPACK_IMPORTED_MODULE_6__SubjectSubscription__["a" /* SubjectSubscription */](this, subscriber); + } + if (scheduler) { + subscriber.add(subscriber = new __WEBPACK_IMPORTED_MODULE_4__operators_observeOn__["a" /* ObserveOnSubscriber */](subscriber, scheduler)); + } + if (_infiniteTimeWindow) { + for (var i = 0; i < len && !subscriber.closed; i++) { + subscriber.next(_events[i]); + } + } + else { + for (var i = 0; i < len && !subscriber.closed; i++) { + subscriber.next(_events[i].value); + } + } + if (this.hasError) { + subscriber.error(this.thrownError); + } + else if (this.isStopped) { + subscriber.complete(); + } + return subscription; + }; + ReplaySubject.prototype._getNow = function () { + return (this.scheduler || __WEBPACK_IMPORTED_MODULE_2__scheduler_queue__["a" /* queue */]).now(); + }; + ReplaySubject.prototype._trimBufferThenGetEvents = function () { + var now = this._getNow(); + var _bufferSize = this._bufferSize; + var _windowTime = this._windowTime; + var _events = this._events; + var eventsCount = _events.length; + var spliceCount = 0; + while (spliceCount < eventsCount) { + if ((now - _events[spliceCount].time) < _windowTime) { + break; + } + spliceCount++; + } + if (eventsCount > _bufferSize) { + spliceCount = Math.max(spliceCount, eventsCount - _bufferSize); + } + if (spliceCount > 0) { + _events.splice(0, spliceCount); + } + return _events; + }; + return ReplaySubject; +}(__WEBPACK_IMPORTED_MODULE_1__Subject__["a" /* Subject */])); + +var ReplayEvent = /*@__PURE__*/ (function () { + function ReplayEvent(time, value) { + this.time = time; + this.value = value; + } + return ReplayEvent; +}()); +//# sourceMappingURL=ReplaySubject.js.map + + +/***/ }), +/* 241 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = combineLatest; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return CombineLatestOperator; }); +/* unused harmony export CombineLatestSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isArray__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__fromArray__ = __webpack_require__(79); +/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */ + + + + + + +var NONE = {}; +function combineLatest() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var resultSelector = null; + var scheduler = null; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isScheduler__["a" /* isScheduler */])(observables[observables.length - 1])) { + scheduler = observables.pop(); + } + if (typeof observables[observables.length - 1] === 'function') { + resultSelector = observables.pop(); + } + if (observables.length === 1 && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isArray__["a" /* isArray */])(observables[0])) { + observables = observables[0]; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__fromArray__["a" /* fromArray */])(observables, scheduler).lift(new CombineLatestOperator(resultSelector)); +} +var CombineLatestOperator = /*@__PURE__*/ (function () { + function CombineLatestOperator(resultSelector) { + this.resultSelector = resultSelector; + } + CombineLatestOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector)); + }; + return CombineLatestOperator; +}()); + +var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](CombineLatestSubscriber, _super); + function CombineLatestSubscriber(destination, resultSelector) { + var _this = _super.call(this, destination) || this; + _this.resultSelector = resultSelector; + _this.active = 0; + _this.values = []; + _this.observables = []; + return _this; + } + CombineLatestSubscriber.prototype._next = function (observable) { + this.values.push(NONE); + this.observables.push(observable); + }; + CombineLatestSubscriber.prototype._complete = function () { + var observables = this.observables; + var len = observables.length; + if (len === 0) { + this.destination.complete(); + } + else { + this.active = len; + this.toRespond = len; + for (var i = 0; i < len; i++) { + var observable = observables[i]; + this.add(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__["a" /* subscribeToResult */])(this, observable, observable, i)); + } + } + }; + CombineLatestSubscriber.prototype.notifyComplete = function (unused) { + if ((this.active -= 1) === 0) { + this.destination.complete(); + } + }; + CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + var values = this.values; + var oldVal = values[outerIndex]; + var toRespond = !this.toRespond + ? 0 + : oldVal === NONE ? --this.toRespond : this.toRespond; + values[outerIndex] = innerValue; + if (toRespond === 0) { + if (this.resultSelector) { + this._tryResultSelector(values); + } + else { + this.destination.next(values.slice()); + } + } + }; + CombineLatestSubscriber.prototype._tryResultSelector = function (values) { + var result; + try { + result = this.resultSelector.apply(this, values); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return CombineLatestSubscriber; +}(__WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__["a" /* OuterSubscriber */])); + +//# sourceMappingURL=combineLatest.js.map + + +/***/ }), +/* 242 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = defer; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__from__ = __webpack_require__(64); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__empty__ = __webpack_require__(45); +/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */ + + + +function defer(observableFactory) { + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { + var input; + try { + input = observableFactory(); + } + catch (err) { + subscriber.error(err); + return undefined; + } + var source = input ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__from__["a" /* from */])(input) : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__empty__["a" /* empty */])(); + return source.subscribe(subscriber); + }); +} +//# sourceMappingURL=defer.js.map + + +/***/ }), +/* 243 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = of; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util_isScheduler__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fromArray__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__empty__ = __webpack_require__(45); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__scalar__ = __webpack_require__(244); +/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */ + + + + +function of() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var scheduler = args[args.length - 1]; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__util_isScheduler__["a" /* isScheduler */])(scheduler)) { + args.pop(); + } + else { + scheduler = undefined; + } + switch (args.length) { + case 0: + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__empty__["a" /* empty */])(scheduler); + case 1: + return scheduler ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__fromArray__["a" /* fromArray */])(args, scheduler) : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__scalar__["a" /* scalar */])(args[0]); + default: + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__fromArray__["a" /* fromArray */])(args, scheduler); + } +} +//# sourceMappingURL=of.js.map + + +/***/ }), +/* 244 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = scalar; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */ + +function scalar(value) { + var result = new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { + subscriber.next(value); + subscriber.complete(); + }); + result._isScalar = true; + result.value = value; + return result; +} +//# sourceMappingURL=scalar.js.map + + +/***/ }), +/* 245 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = throwError; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */ + +function throwError(error, scheduler) { + if (!scheduler) { + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { return subscriber.error(error); }); + } + else { + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); }); + } +} +function dispatch(_a) { + var error = _a.error, subscriber = _a.subscriber; + subscriber.error(error); +} +//# sourceMappingURL=throwError.js.map + + +/***/ }), +/* 246 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = zip; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ZipOperator; }); +/* unused harmony export ZipSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fromArray__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isArray__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__ = __webpack_require__(134); +/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */ + + + + + + + +function zip() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var resultSelector = observables[observables.length - 1]; + if (typeof resultSelector === 'function') { + observables.pop(); + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__fromArray__["a" /* fromArray */])(observables, undefined).lift(new ZipOperator(resultSelector)); +} +var ZipOperator = /*@__PURE__*/ (function () { + function ZipOperator(resultSelector) { + this.resultSelector = resultSelector; + } + ZipOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector)); + }; + return ZipOperator; +}()); + +var ZipSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ZipSubscriber, _super); + function ZipSubscriber(destination, resultSelector, values) { + if (values === void 0) { + values = Object.create(null); + } + var _this = _super.call(this, destination) || this; + _this.iterators = []; + _this.active = 0; + _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null; + _this.values = values; + return _this; + } + ZipSubscriber.prototype._next = function (value) { + var iterators = this.iterators; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isArray__["a" /* isArray */])(value)) { + iterators.push(new StaticArrayIterator(value)); + } + else if (typeof value[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__["a" /* iterator */]] === 'function') { + iterators.push(new StaticIterator(value[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__["a" /* iterator */]]())); + } + else { + iterators.push(new ZipBufferIterator(this.destination, this, value)); + } + }; + ZipSubscriber.prototype._complete = function () { + var iterators = this.iterators; + var len = iterators.length; + this.unsubscribe(); + if (len === 0) { + this.destination.complete(); + return; + } + this.active = len; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + if (iterator.stillUnsubscribed) { + var destination = this.destination; + destination.add(iterator.subscribe(iterator, i)); + } + else { + this.active--; + } + } + }; + ZipSubscriber.prototype.notifyInactive = function () { + this.active--; + if (this.active === 0) { + this.destination.complete(); + } + }; + ZipSubscriber.prototype.checkIterators = function () { + var iterators = this.iterators; + var len = iterators.length; + var destination = this.destination; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) { + return; + } + } + var shouldComplete = false; + var args = []; + for (var i = 0; i < len; i++) { + var iterator = iterators[i]; + var result = iterator.next(); + if (iterator.hasCompleted()) { + shouldComplete = true; + } + if (result.done) { + destination.complete(); + return; + } + args.push(result.value); + } + if (this.resultSelector) { + this._tryresultSelector(args); + } + else { + destination.next(args); + } + if (shouldComplete) { + destination.complete(); + } + }; + ZipSubscriber.prototype._tryresultSelector = function (args) { + var result; + try { + result = this.resultSelector.apply(this, args); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(result); + }; + return ZipSubscriber; +}(__WEBPACK_IMPORTED_MODULE_3__Subscriber__["a" /* Subscriber */])); + +var StaticIterator = /*@__PURE__*/ (function () { + function StaticIterator(iterator) { + this.iterator = iterator; + this.nextResult = iterator.next(); + } + StaticIterator.prototype.hasValue = function () { + return true; + }; + StaticIterator.prototype.next = function () { + var result = this.nextResult; + this.nextResult = this.iterator.next(); + return result; + }; + StaticIterator.prototype.hasCompleted = function () { + var nextResult = this.nextResult; + return nextResult && nextResult.done; + }; + return StaticIterator; +}()); +var StaticArrayIterator = /*@__PURE__*/ (function () { + function StaticArrayIterator(array) { + this.array = array; + this.index = 0; + this.length = 0; + this.length = array.length; + } + StaticArrayIterator.prototype[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__["a" /* iterator */]] = function () { + return this; + }; + StaticArrayIterator.prototype.next = function (value) { + var i = this.index++; + var array = this.array; + return i < this.length ? { value: array[i], done: false } : { value: null, done: true }; + }; + StaticArrayIterator.prototype.hasValue = function () { + return this.array.length > this.index; + }; + StaticArrayIterator.prototype.hasCompleted = function () { + return this.array.length === this.index; + }; + return StaticArrayIterator; +}()); +var ZipBufferIterator = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ZipBufferIterator, _super); + function ZipBufferIterator(destination, parent, observable) { + var _this = _super.call(this, destination) || this; + _this.parent = parent; + _this.observable = observable; + _this.stillUnsubscribed = true; + _this.buffer = []; + _this.isComplete = false; + return _this; + } + ZipBufferIterator.prototype[__WEBPACK_IMPORTED_MODULE_6__internal_symbol_iterator__["a" /* iterator */]] = function () { + return this; + }; + ZipBufferIterator.prototype.next = function () { + var buffer = this.buffer; + if (buffer.length === 0 && this.isComplete) { + return { value: null, done: true }; + } + else { + return { value: buffer.shift(), done: false }; + } + }; + ZipBufferIterator.prototype.hasValue = function () { + return this.buffer.length > 0; + }; + ZipBufferIterator.prototype.hasCompleted = function () { + return this.buffer.length === 0 && this.isComplete; + }; + ZipBufferIterator.prototype.notifyComplete = function () { + if (this.buffer.length > 0) { + this.isComplete = true; + this.parent.notifyInactive(); + } + else { + this.destination.complete(); + } + }; + ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.buffer.push(innerValue); + this.parent.checkIterators(); + }; + ZipBufferIterator.prototype.subscribe = function (value, index) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__util_subscribeToResult__["a" /* subscribeToResult */])(this, this.observable, this, index); + }; + return ZipBufferIterator; +}(__WEBPACK_IMPORTED_MODULE_4__OuterSubscriber__["a" /* OuterSubscriber */])); +//# sourceMappingURL=zip.js.map + + +/***/ }), +/* 247 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = mergeAll; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(131); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_identity__ = __webpack_require__(106); +/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */ + + +function mergeAll(concurrent) { + if (concurrent === void 0) { + concurrent = Number.POSITIVE_INFINITY; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__mergeMap__["a" /* mergeMap */])(__WEBPACK_IMPORTED_MODULE_1__util_identity__["a" /* identity */], concurrent); +} +//# sourceMappingURL=mergeAll.js.map + + +/***/ }), +/* 248 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = refCount; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +function refCount() { + return function refCountOperatorFunction(source) { + return source.lift(new RefCountOperator(source)); + }; +} +var RefCountOperator = /*@__PURE__*/ (function () { + function RefCountOperator(connectable) { + this.connectable = connectable; + } + RefCountOperator.prototype.call = function (subscriber, source) { + var connectable = this.connectable; + connectable._refCount++; + var refCounter = new RefCountSubscriber(subscriber, connectable); + var subscription = source.subscribe(refCounter); + if (!refCounter.closed) { + refCounter.connection = connectable.connect(); + } + return subscription; + }; + return RefCountOperator; +}()); +var RefCountSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](RefCountSubscriber, _super); + function RefCountSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + RefCountSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (!connectable) { + this.connection = null; + return; + } + this.connectable = null; + var refCount = connectable._refCount; + if (refCount <= 0) { + this.connection = null; + return; + } + connectable._refCount = refCount - 1; + if (refCount > 1) { + this.connection = null; + return; + } + var connection = this.connection; + var sharedConnection = connectable._connection; + this.connection = null; + if (sharedConnection && (!connection || sharedConnection === connection)) { + sharedConnection.unsubscribe(); + } + }; + return RefCountSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=refCount.js.map + + +/***/ }), +/* 249 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = scan; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +function scan(accumulator, seed) { + var hasSeed = false; + if (arguments.length >= 2) { + hasSeed = true; + } + return function scanOperatorFunction(source) { + return source.lift(new ScanOperator(accumulator, seed, hasSeed)); + }; +} +var ScanOperator = /*@__PURE__*/ (function () { + function ScanOperator(accumulator, seed, hasSeed) { + if (hasSeed === void 0) { + hasSeed = false; + } + this.accumulator = accumulator; + this.seed = seed; + this.hasSeed = hasSeed; + } + ScanOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed)); + }; + return ScanOperator; +}()); +var ScanSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ScanSubscriber, _super); + function ScanSubscriber(destination, accumulator, _seed, hasSeed) { + var _this = _super.call(this, destination) || this; + _this.accumulator = accumulator; + _this._seed = _seed; + _this.hasSeed = hasSeed; + _this.index = 0; + return _this; + } + Object.defineProperty(ScanSubscriber.prototype, "seed", { + get: function () { + return this._seed; + }, + set: function (value) { + this.hasSeed = true; + this._seed = value; + }, + enumerable: true, + configurable: true + }); + ScanSubscriber.prototype._next = function (value) { + if (!this.hasSeed) { + this.seed = value; + this.destination.next(value); + } + else { + return this._tryNext(value); + } + }; + ScanSubscriber.prototype._tryNext = function (value) { + var index = this.index++; + var result; + try { + result = this.accumulator(this.seed, value, index); + } + catch (err) { + this.destination.error(err); + } + this.seed = result; + this.destination.next(result); + }; + return ScanSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=scan.js.map + + +/***/ }), +/* 250 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = switchMap; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__InnerSubscriber__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__map__ = __webpack_require__(53); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__observable_from__ = __webpack_require__(64); +/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */ + + + + + + +function switchMap(project, resultSelector) { + if (typeof resultSelector === 'function') { + return function (source) { return source.pipe(switchMap(function (a, i) { return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__observable_from__["a" /* from */])(project(a, i)).pipe(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__map__["a" /* map */])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); }; + } + return function (source) { return source.lift(new SwitchMapOperator(project)); }; +} +var SwitchMapOperator = /*@__PURE__*/ (function () { + function SwitchMapOperator(project) { + this.project = project; + } + SwitchMapOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new SwitchMapSubscriber(subscriber, this.project)); + }; + return SwitchMapOperator; +}()); +var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SwitchMapSubscriber, _super); + function SwitchMapSubscriber(destination, project) { + var _this = _super.call(this, destination) || this; + _this.project = project; + _this.index = 0; + return _this; + } + SwitchMapSubscriber.prototype._next = function (value) { + var result; + var index = this.index++; + try { + result = this.project(value, index); + } + catch (error) { + this.destination.error(error); + return; + } + this._innerSub(result, value, index); + }; + SwitchMapSubscriber.prototype._innerSub = function (result, value, index) { + var innerSubscription = this.innerSubscription; + if (innerSubscription) { + innerSubscription.unsubscribe(); + } + var innerSubscriber = new __WEBPACK_IMPORTED_MODULE_2__InnerSubscriber__["a" /* InnerSubscriber */](this, undefined, undefined); + var destination = this.destination; + destination.add(innerSubscriber); + this.innerSubscription = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_subscribeToResult__["a" /* subscribeToResult */])(this, result, value, index, innerSubscriber); + }; + SwitchMapSubscriber.prototype._complete = function () { + var innerSubscription = this.innerSubscription; + if (!innerSubscription || innerSubscription.closed) { + _super.prototype._complete.call(this); + } + this.unsubscribe(); + }; + SwitchMapSubscriber.prototype._unsubscribe = function () { + this.innerSubscription = null; + }; + SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) { + var destination = this.destination; + destination.remove(innerSub); + this.innerSubscription = null; + if (this.isStopped) { + _super.prototype._complete.call(this); + } + }; + SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.destination.next(innerValue); + }; + return SwitchMapSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__["a" /* OuterSubscriber */])); +//# sourceMappingURL=switchMap.js.map + + +/***/ }), +/* 251 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = take; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(135); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_empty__ = __webpack_require__(45); +/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */ + + + + +function take(count) { + return function (source) { + if (count === 0) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__observable_empty__["a" /* empty */])(); + } + else { + return source.lift(new TakeOperator(count)); + } + }; +} +var TakeOperator = /*@__PURE__*/ (function () { + function TakeOperator(total) { + this.total = total; + if (this.total < 0) { + throw new __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__["a" /* ArgumentOutOfRangeError */]; + } + } + TakeOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new TakeSubscriber(subscriber, this.total)); + }; + return TakeOperator; +}()); +var TakeSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](TakeSubscriber, _super); + function TakeSubscriber(destination, total) { + var _this = _super.call(this, destination) || this; + _this.total = total; + _this.count = 0; + return _this; + } + TakeSubscriber.prototype._next = function (value) { + var total = this.total; + var count = ++this.count; + if (count <= total) { + this.destination.next(value); + if (count === total) { + this.destination.complete(); + this.unsubscribe(); + } + } + }; + return TakeSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=take.js.map + + +/***/ }), +/* 252 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = takeLast; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__ = __webpack_require__(135); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__observable_empty__ = __webpack_require__(45); +/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */ + + + + +function takeLast(count) { + return function takeLastOperatorFunction(source) { + if (count === 0) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__observable_empty__["a" /* empty */])(); + } + else { + return source.lift(new TakeLastOperator(count)); + } + }; +} +var TakeLastOperator = /*@__PURE__*/ (function () { + function TakeLastOperator(total) { + this.total = total; + if (this.total < 0) { + throw new __WEBPACK_IMPORTED_MODULE_2__util_ArgumentOutOfRangeError__["a" /* ArgumentOutOfRangeError */]; + } + } + TakeLastOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new TakeLastSubscriber(subscriber, this.total)); + }; + return TakeLastOperator; +}()); +var TakeLastSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](TakeLastSubscriber, _super); + function TakeLastSubscriber(destination, total) { + var _this = _super.call(this, destination) || this; + _this.total = total; + _this.ring = new Array(); + _this.count = 0; + return _this; + } + TakeLastSubscriber.prototype._next = function (value) { + var ring = this.ring; + var total = this.total; + var count = this.count++; + if (ring.length < total) { + ring.push(value); + } + else { + var index = count % total; + ring[index] = value; + } + }; + TakeLastSubscriber.prototype._complete = function () { + var destination = this.destination; + var count = this.count; + if (count > 0) { + var total = this.count >= this.total ? this.total : this.count; + var ring = this.ring; + for (var i = 0; i < total; i++) { + var idx = (count++) % total; + destination.next(ring[idx]); + } + } + destination.complete(); + }; + return TakeLastSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=takeLast.js.map + + +/***/ }), +/* 253 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return rxSubscriber; }); +/* unused harmony export $$rxSubscriber */ +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +var rxSubscriber = typeof Symbol === 'function' + ? /*@__PURE__*/ Symbol('rxSubscriber') + : '@@rxSubscriber_' + /*@__PURE__*/ Math.random(); +var $$rxSubscriber = rxSubscriber; +//# sourceMappingURL=rxSubscriber.js.map + + +/***/ }), +/* 254 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = canReportError; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */ + +function canReportError(observer) { + while (observer) { + var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped; + if (closed_1 || isStopped) { + return false; + } + else if (destination && destination instanceof __WEBPACK_IMPORTED_MODULE_0__Subscriber__["a" /* Subscriber */]) { + observer = destination; + } + else { + observer = null; + } + } + return true; +} +//# sourceMappingURL=canReportError.js.map + + +/***/ }), +/* 255 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = hostReportError; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function hostReportError(err) { + setTimeout(function () { throw err; }); +} +//# sourceMappingURL=hostReportError.js.map + + +/***/ }), +/* 256 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = pipe; +/* harmony export (immutable) */ __webpack_exports__["b"] = pipeFromArray; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__noop__ = __webpack_require__(175); +/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */ + +function pipe() { + var fns = []; + for (var _i = 0; _i < arguments.length; _i++) { + fns[_i] = arguments[_i]; + } + return pipeFromArray(fns); +} +function pipeFromArray(fns) { + if (!fns) { + return __WEBPACK_IMPORTED_MODULE_0__noop__["a" /* noop */]; + } + if (fns.length === 1) { + return fns[0]; + } + return function piped(input) { + return fns.reduce(function (prev, fn) { return fn(prev); }, input); + }; +} +//# sourceMappingURL=pipe.js.map + + +/***/ }), +/* 257 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2017 Joyent, Inc. + +module.exports = { + DiffieHellman: DiffieHellman, + generateECDSA: generateECDSA, + generateED25519: generateED25519 +}; + +var assert = __webpack_require__(22); +var crypto = __webpack_require__(21); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var utils = __webpack_require__(31); +var nacl; + +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); + +var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); + +var ecdh, ec, jsbn; + +function DiffieHellman(key) { + utils.assertCompatible(key, Key, [1, 4], 'key'); + this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); + this._algo = key.type; + this._curve = key.curve; + this._key = key; + if (key.type === 'dsa') { + if (!CRYPTO_HAVE_ECDH) { + throw (new Error('Due to bugs in the node 0.10 ' + + 'crypto API, node 0.12.x or later is required ' + + 'to use DH')); + } + this._dh = crypto.createDiffieHellman( + key.part.p.data, undefined, + key.part.g.data, undefined); + this._p = key.part.p; + this._g = key.part.g; + if (this._isPriv) + this._dh.setPrivateKey(key.part.x.data); + this._dh.setPublicKey(key.part.y.data); + + } else if (key.type === 'ecdsa') { + if (!CRYPTO_HAVE_ECDH) { + if (ecdh === undefined) + ecdh = __webpack_require__(352); + if (ec === undefined) + ec = __webpack_require__(126); + if (jsbn === undefined) + jsbn = __webpack_require__(77).BigInteger; + + this._ecParams = new X9ECParameters(this._curve); + + if (this._isPriv) { + this._priv = new ECPrivate( + this._ecParams, key.part.d.data); + } + return; + } + + var curve = { + 'nistp256': 'prime256v1', + 'nistp384': 'secp384r1', + 'nistp521': 'secp521r1' + }[key.curve]; + this._dh = crypto.createECDH(curve); + if (typeof (this._dh) !== 'object' || + typeof (this._dh.setPrivateKey) !== 'function') { + CRYPTO_HAVE_ECDH = false; + DiffieHellman.call(this, key); + return; + } + if (this._isPriv) + this._dh.setPrivateKey(key.part.d.data); + this._dh.setPublicKey(key.part.Q.data); + + } else if (key.type === 'curve25519') { + if (nacl === undefined) + nacl = __webpack_require__(71); + + if (this._isPriv) { + utils.assertCompatible(key, PrivateKey, [1, 5], 'key'); + this._priv = key.part.k.data; + } + + } else { + throw (new Error('DH not supported for ' + key.type + ' keys')); + } +} + +DiffieHellman.prototype.getPublicKey = function () { + if (this._isPriv) + return (this._key.toPublic()); + return (this._key); +}; + +DiffieHellman.prototype.getPrivateKey = function () { + if (this._isPriv) + return (this._key); + else + return (undefined); +}; +DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; + +DiffieHellman.prototype._keyCheck = function (pk, isPub) { + assert.object(pk, 'key'); + if (!isPub) + utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); + utils.assertCompatible(pk, Key, [1, 4], 'key'); + + if (pk.type !== this._algo) { + throw (new Error('A ' + pk.type + ' key cannot be used in ' + + this._algo + ' Diffie-Hellman')); + } + + if (pk.curve !== this._curve) { + throw (new Error('A key from the ' + pk.curve + ' curve ' + + 'cannot be used with a ' + this._curve + + ' Diffie-Hellman')); + } + + if (pk.type === 'dsa') { + assert.deepEqual(pk.part.p, this._p, + 'DSA key prime does not match'); + assert.deepEqual(pk.part.g, this._g, + 'DSA key generator does not match'); + } +}; + +DiffieHellman.prototype.setKey = function (pk) { + this._keyCheck(pk); + + if (pk.type === 'dsa') { + this._dh.setPrivateKey(pk.part.x.data); + this._dh.setPublicKey(pk.part.y.data); + + } else if (pk.type === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.setPrivateKey(pk.part.d.data); + this._dh.setPublicKey(pk.part.Q.data); + } else { + this._priv = new ECPrivate( + this._ecParams, pk.part.d.data); + } + + } else if (pk.type === 'curve25519') { + var k = pk.part.k; + if (!pk.part.k) + k = pk.part.r; + this._priv = k.data; + if (this._priv[0] === 0x00) + this._priv = this._priv.slice(1); + this._priv = this._priv.slice(0, 32); + } + this._key = pk; + this._isPriv = true; +}; +DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; + +DiffieHellman.prototype.computeSecret = function (otherpk) { + this._keyCheck(otherpk, true); + if (!this._isPriv) + throw (new Error('DH exchange has not been initialized with ' + + 'a private key yet')); + + var pub; + if (this._algo === 'dsa') { + return (this._dh.computeSecret( + otherpk.part.y.data)); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + return (this._dh.computeSecret( + otherpk.part.Q.data)); + } else { + pub = new ECPublic( + this._ecParams, otherpk.part.Q.data); + return (this._priv.deriveSharedSecret(pub)); + } + + } else if (this._algo === 'curve25519') { + pub = otherpk.part.A.data; + while (pub[0] === 0x00 && pub.length > 32) + pub = pub.slice(1); + var priv = this._priv; + assert.strictEqual(pub.length, 32); + assert.strictEqual(priv.length, 32); + + var secret = nacl.box.before(new Uint8Array(pub), + new Uint8Array(priv)); + + return (Buffer.from(secret)); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; + +DiffieHellman.prototype.generateKey = function () { + var parts = []; + var priv, pub; + if (this._algo === 'dsa') { + this._dh.generateKeys(); + + parts.push({name: 'p', data: this._p.data}); + parts.push({name: 'q', data: this._key.part.q.data}); + parts.push({name: 'g', data: this._g.data}); + parts.push({name: 'y', data: this._dh.getPublicKey()}); + parts.push({name: 'x', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'dsa', + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else if (this._algo === 'ecdsa') { + if (CRYPTO_HAVE_ECDH) { + this._dh.generateKeys(); + + parts.push({name: 'curve', + data: Buffer.from(this._curve)}); + parts.push({name: 'Q', data: this._dh.getPublicKey()}); + parts.push({name: 'd', data: this._dh.getPrivateKey()}); + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + + } else { + var n = this._ecParams.getN(); + var r = new jsbn(crypto.randomBytes(n.bitLength())); + var n1 = n.subtract(jsbn.ONE); + priv = r.mod(n1).add(jsbn.ONE); + pub = this._ecParams.getG().multiply(priv); + + priv = Buffer.from(priv.toByteArray()); + pub = Buffer.from(this._ecParams.getCurve(). + encodePointHex(pub), 'hex'); + + this._priv = new ECPrivate(this._ecParams, priv); + + parts.push({name: 'curve', + data: Buffer.from(this._curve)}); + parts.push({name: 'Q', data: pub}); + parts.push({name: 'd', data: priv}); + + this._key = new PrivateKey({ + type: 'ecdsa', + curve: this._curve, + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + } else if (this._algo === 'curve25519') { + var pair = nacl.box.keyPair(); + priv = Buffer.from(pair.secretKey); + pub = Buffer.from(pair.publicKey); + priv = Buffer.concat([priv, pub]); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + + parts.push({name: 'A', data: pub}); + parts.push({name: 'k', data: priv}); + this._key = new PrivateKey({ + type: 'curve25519', + parts: parts + }); + this._isPriv = true; + return (this._key); + } + + throw (new Error('Invalid algorithm: ' + this._algo)); +}; +DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; + +/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ + +function X9ECParameters(name) { + var params = algs.curves[name]; + assert.object(params); + + var p = new jsbn(params.p); + var a = new jsbn(params.a); + var b = new jsbn(params.b); + var n = new jsbn(params.n); + var h = jsbn.ONE; + var curve = new ec.ECCurveFp(p, a, b); + var G = curve.decodePointHex(params.G.toString('hex')); + + this.curve = curve; + this.g = G; + this.n = n; + this.h = h; +} +X9ECParameters.prototype.getCurve = function () { return (this.curve); }; +X9ECParameters.prototype.getG = function () { return (this.g); }; +X9ECParameters.prototype.getN = function () { return (this.n); }; +X9ECParameters.prototype.getH = function () { return (this.h); }; + +function ECPublic(params, buffer) { + this._params = params; + if (buffer[0] === 0x00) + buffer = buffer.slice(1); + this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); +} + +function ECPrivate(params, buffer) { + this._params = params; + this._priv = new jsbn(utils.mpNormalize(buffer)); +} +ECPrivate.prototype.deriveSharedSecret = function (pubKey) { + assert.ok(pubKey instanceof ECPublic); + var S = pubKey._pub.multiply(this._priv); + return (Buffer.from(S.getX().toBigInteger().toByteArray())); +}; + +function generateED25519() { + if (nacl === undefined) + nacl = __webpack_require__(71); + + var pair = nacl.sign.keyPair(); + var priv = Buffer.from(pair.secretKey); + var pub = Buffer.from(pair.publicKey); + assert.strictEqual(priv.length, 64); + assert.strictEqual(pub.length, 32); + + var parts = []; + parts.push({name: 'A', data: pub}); + parts.push({name: 'k', data: priv.slice(0, 32)}); + var key = new PrivateKey({ + type: 'ed25519', + parts: parts + }); + return (key); +} + +/* Generates a new ECDSA private key on a given curve. */ +function generateECDSA(curve) { + var parts = []; + var key; + + if (CRYPTO_HAVE_ECDH) { + /* + * Node crypto doesn't expose key generation directly, but the + * ECDH instances can generate keys. It turns out this just + * calls into the OpenSSL generic key generator, and we can + * read its output happily without doing an actual DH. So we + * use that here. + */ + var osCurve = { + 'nistp256': 'prime256v1', + 'nistp384': 'secp384r1', + 'nistp521': 'secp521r1' + }[curve]; + + var dh = crypto.createECDH(osCurve); + dh.generateKeys(); + + parts.push({name: 'curve', + data: Buffer.from(curve)}); + parts.push({name: 'Q', data: dh.getPublicKey()}); + parts.push({name: 'd', data: dh.getPrivateKey()}); + + key = new PrivateKey({ + type: 'ecdsa', + curve: curve, + parts: parts + }); + return (key); + } else { + if (ecdh === undefined) + ecdh = __webpack_require__(352); + if (ec === undefined) + ec = __webpack_require__(126); + if (jsbn === undefined) + jsbn = __webpack_require__(77).BigInteger; + + var ecParams = new X9ECParameters(curve); + + /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */ + var n = ecParams.getN(); + /* + * The crypto.randomBytes() function can only give us whole + * bytes, so taking a nod from X9.62, we round up. + */ + var cByteLen = Math.ceil((n.bitLength() + 64) / 8); + var c = new jsbn(crypto.randomBytes(cByteLen)); + + var n1 = n.subtract(jsbn.ONE); + var priv = c.mod(n1).add(jsbn.ONE); + var pub = ecParams.getG().multiply(priv); + + priv = Buffer.from(priv.toByteArray()); + pub = Buffer.from(ecParams.getCurve(). + encodePointHex(pub), 'hex'); + + parts.push({name: 'curve', data: Buffer.from(curve)}); + parts.push({name: 'Q', data: pub}); + parts.push({name: 'd', data: priv}); + + key = new PrivateKey({ + type: 'ecdsa', + curve: curve, + parts: parts + }); + return (key); + } +} + + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright 2017 Joyent, Inc. + +module.exports = { + read: read, + write: write +}; + +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); +var utils = __webpack_require__(31); +var SSHBuffer = __webpack_require__(142); +var Dhe = __webpack_require__(257); + +var supportedAlgos = { + 'rsa-sha1' : 5, + 'rsa-sha256' : 8, + 'rsa-sha512' : 10, + 'ecdsa-p256-sha256' : 13, + 'ecdsa-p384-sha384' : 14 + /* + * ed25519 is hypothetically supported with id 15 + * but the common tools available don't appear to be + * capable of generating/using ed25519 keys + */ +}; + +var supportedAlgosById = {}; +Object.keys(supportedAlgos).forEach(function (k) { + supportedAlgosById[supportedAlgos[k]] = k.toUpperCase(); +}); + +function read(buf, options) { + if (typeof (buf) !== 'string') { + assert.buffer(buf, 'buf'); + buf = buf.toString('ascii'); + } + var lines = buf.split('\n'); + if (lines[0].match(/^Private-key-format\: v1/)) { + var algElems = lines[1].split(' '); + var algoNum = parseInt(algElems[1], 10); + var algoName = algElems[2]; + if (!supportedAlgosById[algoNum]) + throw (new Error('Unsupported algorithm: ' + algoName)); + return (readDNSSECPrivateKey(algoNum, lines.slice(2))); + } + + // skip any comment-lines + var line = 0; + /* JSSTYLED */ + while (lines[line].match(/^\;/)) + line++; + // we should now have *one single* line left with our KEY on it. + if ((lines[line].match(/\. IN KEY /) || + lines[line].match(/\. IN DNSKEY /)) && lines[line+1].length === 0) { + return (readRFC3110(lines[line])); + } + throw (new Error('Cannot parse dnssec key')); +} + +function readRFC3110(keyString) { + var elems = keyString.split(' '); + //unused var flags = parseInt(elems[3], 10); + //unused var protocol = parseInt(elems[4], 10); + var algorithm = parseInt(elems[5], 10); + if (!supportedAlgosById[algorithm]) + throw (new Error('Unsupported algorithm: ' + algorithm)); + var base64key = elems.slice(6, elems.length).join(); + var keyBuffer = Buffer.from(base64key, 'base64'); + if (supportedAlgosById[algorithm].match(/^RSA-/)) { + // join the rest of the body into a single base64-blob + var publicExponentLen = keyBuffer.readUInt8(0); + if (publicExponentLen != 3 && publicExponentLen != 1) + throw (new Error('Cannot parse dnssec key: ' + + 'unsupported exponent length')); + + var publicExponent = keyBuffer.slice(1, publicExponentLen+1); + publicExponent = utils.mpNormalize(publicExponent); + var modulus = keyBuffer.slice(1+publicExponentLen); + modulus = utils.mpNormalize(modulus); + // now, make the key + var rsaKey = { + type: 'rsa', + parts: [] + }; + rsaKey.parts.push({ name: 'e', data: publicExponent}); + rsaKey.parts.push({ name: 'n', data: modulus}); + return (new Key(rsaKey)); + } + if (supportedAlgosById[algorithm] === 'ECDSA-P384-SHA384' || + supportedAlgosById[algorithm] === 'ECDSA-P256-SHA256') { + var curve = 'nistp384'; + var size = 384; + if (supportedAlgosById[algorithm].match(/^ECDSA-P256-SHA256/)) { + curve = 'nistp256'; + size = 256; + } + + var ecdsaKey = { + type: 'ecdsa', + curve: curve, + size: size, + parts: [ + {name: 'curve', data: Buffer.from(curve) }, + {name: 'Q', data: utils.ecNormalize(keyBuffer) } + ] + }; + return (new Key(ecdsaKey)); + } + throw (new Error('Unsupported algorithm: ' + + supportedAlgosById[algorithm])); +} + +function elementToBuf(e) { + return (Buffer.from(e.split(' ')[1], 'base64')); +} + +function readDNSSECRSAPrivateKey(elements) { + var rsaParams = {}; + elements.forEach(function (element) { + if (element.split(' ')[0] === 'Modulus:') + rsaParams['n'] = elementToBuf(element); + else if (element.split(' ')[0] === 'PublicExponent:') + rsaParams['e'] = elementToBuf(element); + else if (element.split(' ')[0] === 'PrivateExponent:') + rsaParams['d'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Prime1:') + rsaParams['p'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Prime2:') + rsaParams['q'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Exponent1:') + rsaParams['dmodp'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Exponent2:') + rsaParams['dmodq'] = elementToBuf(element); + else if (element.split(' ')[0] === 'Coefficient:') + rsaParams['iqmp'] = elementToBuf(element); + }); + // now, make the key + var key = { + type: 'rsa', + parts: [ + { name: 'e', data: utils.mpNormalize(rsaParams['e'])}, + { name: 'n', data: utils.mpNormalize(rsaParams['n'])}, + { name: 'd', data: utils.mpNormalize(rsaParams['d'])}, + { name: 'p', data: utils.mpNormalize(rsaParams['p'])}, + { name: 'q', data: utils.mpNormalize(rsaParams['q'])}, + { name: 'dmodp', + data: utils.mpNormalize(rsaParams['dmodp'])}, + { name: 'dmodq', + data: utils.mpNormalize(rsaParams['dmodq'])}, + { name: 'iqmp', + data: utils.mpNormalize(rsaParams['iqmp'])} + ] + }; + return (new PrivateKey(key)); +} + +function readDNSSECPrivateKey(alg, elements) { + if (supportedAlgosById[alg].match(/^RSA-/)) { + return (readDNSSECRSAPrivateKey(elements)); + } + if (supportedAlgosById[alg] === 'ECDSA-P384-SHA384' || + supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { + var d = Buffer.from(elements[0].split(' ')[1], 'base64'); + var curve = 'nistp384'; + var size = 384; + if (supportedAlgosById[alg] === 'ECDSA-P256-SHA256') { + curve = 'nistp256'; + size = 256; + } + // DNSSEC generates the public-key on the fly (go calculate it) + var publicKey = utils.publicFromPrivateECDSA(curve, d); + var Q = publicKey.part['Q'].data; + var ecdsaKey = { + type: 'ecdsa', + curve: curve, + size: size, + parts: [ + {name: 'curve', data: Buffer.from(curve) }, + {name: 'd', data: d }, + {name: 'Q', data: Q } + ] + }; + return (new PrivateKey(ecdsaKey)); + } + throw (new Error('Unsupported algorithm: ' + supportedAlgosById[alg])); +} + +function dnssecTimestamp(date) { + var year = date.getFullYear() + ''; //stringify + var month = (date.getMonth() + 1); + var timestampStr = year + month + date.getUTCDate(); + timestampStr += '' + date.getUTCHours() + date.getUTCMinutes(); + timestampStr += date.getUTCSeconds(); + return (timestampStr); +} + +function rsaAlgFromOptions(opts) { + if (!opts || !opts.hashAlgo || opts.hashAlgo === 'sha1') + return ('5 (RSASHA1)'); + else if (opts.hashAlgo === 'sha256') + return ('8 (RSASHA256)'); + else if (opts.hashAlgo === 'sha512') + return ('10 (RSASHA512)'); + else + throw (new Error('Unknown or unsupported hash: ' + + opts.hashAlgo)); +} + +function writeRSA(key, options) { + // if we're missing parts, add them. + if (!key.part.dmodp || !key.part.dmodq) { + utils.addRSAMissing(key); + } + + var out = ''; + out += 'Private-key-format: v1.3\n'; + out += 'Algorithm: ' + rsaAlgFromOptions(options) + '\n'; + var n = utils.mpDenormalize(key.part['n'].data); + out += 'Modulus: ' + n.toString('base64') + '\n'; + var e = utils.mpDenormalize(key.part['e'].data); + out += 'PublicExponent: ' + e.toString('base64') + '\n'; + var d = utils.mpDenormalize(key.part['d'].data); + out += 'PrivateExponent: ' + d.toString('base64') + '\n'; + var p = utils.mpDenormalize(key.part['p'].data); + out += 'Prime1: ' + p.toString('base64') + '\n'; + var q = utils.mpDenormalize(key.part['q'].data); + out += 'Prime2: ' + q.toString('base64') + '\n'; + var dmodp = utils.mpDenormalize(key.part['dmodp'].data); + out += 'Exponent1: ' + dmodp.toString('base64') + '\n'; + var dmodq = utils.mpDenormalize(key.part['dmodq'].data); + out += 'Exponent2: ' + dmodq.toString('base64') + '\n'; + var iqmp = utils.mpDenormalize(key.part['iqmp'].data); + out += 'Coefficient: ' + iqmp.toString('base64') + '\n'; + // Assume that we're valid as-of now + var timestamp = new Date(); + out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; + return (Buffer.from(out, 'ascii')); +} + +function writeECDSA(key, options) { + var out = ''; + out += 'Private-key-format: v1.3\n'; + + if (key.curve === 'nistp256') { + out += 'Algorithm: 13 (ECDSAP256SHA256)\n'; + } else if (key.curve === 'nistp384') { + out += 'Algorithm: 14 (ECDSAP384SHA384)\n'; + } else { + throw (new Error('Unsupported curve')); + } + var base64Key = key.part['d'].data.toString('base64'); + out += 'PrivateKey: ' + base64Key + '\n'; + + // Assume that we're valid as-of now + var timestamp = new Date(); + out += 'Created: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Publish: ' + dnssecTimestamp(timestamp) + '\n'; + out += 'Activate: ' + dnssecTimestamp(timestamp) + '\n'; + + return (Buffer.from(out, 'ascii')); +} + +function write(key, options) { + if (PrivateKey.isPrivateKey(key)) { + if (key.type === 'rsa') { + return (writeRSA(key, options)); + } else if (key.type === 'ecdsa') { + return (writeECDSA(key, options)); + } else { + throw (new Error('Unsupported algorithm: ' + key.type)); + } + } else if (Key.isKey(key)) { + /* + * RFC3110 requires a keyname, and a keytype, which we + * don't really have a mechanism for specifying such + * additional metadata. + */ + throw (new Error('Format "dnssec" only supports ' + + 'writing private keys')); + } else { + throw (new Error('key is not a Key or PrivateKey')); + } +} + + +/***/ }), +/* 259 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -56127,16 +55049,17 @@ module.exports = { writePkcs1: writePkcs1 }; -var assert = __webpack_require__(17); -var asn1 = __webpack_require__(53); -var algs = __webpack_require__(26); -var utils = __webpack_require__(25); +var assert = __webpack_require__(22); +var asn1 = __webpack_require__(66); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var utils = __webpack_require__(31); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); -var pem = __webpack_require__(63); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); +var pem = __webpack_require__(80); -var pkcs8 = __webpack_require__(103); +var pkcs8 = __webpack_require__(140); var readECDSACurve = pkcs8.readECDSACurve; function read(buf, options) { @@ -56175,6 +55098,11 @@ function readPkcs1(alg, type, der) { else if (type === 'public') return (readPkcs1ECDSAPublic(der)); throw (new Error('Unknown key type: ' + type)); + case 'EDDSA': + case 'EdDSA': + if (type === 'private') + return (readPkcs1EdDSAPrivate(der)); + throw (new Error(type + ' keys not supported with EdDSA')); default: throw (new Error('Unknown key algo: ' + alg)); } @@ -56254,6 +55182,31 @@ function readPkcs1DSAPrivate(der) { return (new PrivateKey(key)); } +function readPkcs1EdDSAPrivate(der) { + var version = readMPInt(der, 'version'); + assert.strictEqual(version.readUInt8(0), 1); + + // private key + var k = der.readString(asn1.Ber.OctetString, true); + + der.readSequence(0xa0); + var oid = der.readOID(); + assert.strictEqual(oid, '1.3.101.112', 'the ed25519 curve identifier'); + + der.readSequence(0xa1); + var A = utils.readBitString(der); + + var key = { + type: 'ed25519', + parts: [ + { name: 'A', data: utils.zeroPadToLength(A, 32) }, + { name: 'k', data: k } + ] + }; + + return (new PrivateKey(key)); +} + function readPkcs1DSAPublic(der) { var y = readMPInt(der, 'y'); var p = readMPInt(der, 'p'); @@ -56299,7 +55252,7 @@ function readPkcs1ECDSAPublic(der) { var key = { type: 'ecdsa', parts: [ - { name: 'curve', data: new Buffer(curve) }, + { name: 'curve', data: Buffer.from(curve) }, { name: 'Q', data: Q } ] }; @@ -56325,7 +55278,7 @@ function readPkcs1ECDSAPrivate(der) { var key = { type: 'ecdsa', parts: [ - { name: 'curve', data: new Buffer(curve) }, + { name: 'curve', data: Buffer.from(curve) }, { name: 'Q', data: Q }, { name: 'd', data: d } ] @@ -56356,6 +55309,12 @@ function writePkcs1(der, key) { else writePkcs1ECDSAPublic(der, key); break; + case 'ed25519': + if (PrivateKey.isPrivateKey(key)) + writePkcs1EdDSAPrivate(der, key); + else + writePkcs1EdDSAPublic(der, key); + break; default: throw (new Error('Unknown key algo: ' + key.type)); } @@ -56369,8 +55328,7 @@ function writePkcs1RSAPublic(der, key) { } function writePkcs1RSAPrivate(der, key) { - var ver = new Buffer(1); - ver[0] = 0; + var ver = Buffer.from([0]); der.writeBuffer(ver, asn1.Ber.Integer); der.writeBuffer(key.part.n.data, asn1.Ber.Integer); @@ -56386,8 +55344,7 @@ function writePkcs1RSAPrivate(der, key) { } function writePkcs1DSAPrivate(der, key) { - var ver = new Buffer(1); - ver[0] = 0; + var ver = Buffer.from([0]); der.writeBuffer(ver, asn1.Ber.Integer); der.writeBuffer(key.part.p.data, asn1.Ber.Integer); @@ -56420,8 +55377,7 @@ function writePkcs1ECDSAPublic(der, key) { } function writePkcs1ECDSAPrivate(der, key) { - var ver = new Buffer(1); - ver[0] = 1; + var ver = Buffer.from([1]); der.writeBuffer(ver, asn1.Ber.Integer); der.writeBuffer(key.part.d.data, asn1.Ber.OctetString); @@ -56439,20 +55395,39 @@ function writePkcs1ECDSAPrivate(der, key) { der.endSequence(); } +function writePkcs1EdDSAPrivate(der, key) { + var ver = Buffer.from([1]); + der.writeBuffer(ver, asn1.Ber.Integer); + + der.writeBuffer(key.part.k.data, asn1.Ber.OctetString); + + der.startSequence(0xa0); + der.writeOID('1.3.101.112'); + der.endSequence(); + + der.startSequence(0xa1); + utils.writeBitString(der, key.part.A.data); + der.endSequence(); +} + +function writePkcs1EdDSAPublic(der, key) { + throw (new Error('Public keys are not supported for EdDSA PKCS#1')); +} + /***/ }), -/* 202 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. -var Key = __webpack_require__(27); -var Fingerprint = __webpack_require__(102); -var Signature = __webpack_require__(51); -var PrivateKey = __webpack_require__(28); -var Certificate = __webpack_require__(101); -var Identity = __webpack_require__(104); -var errs = __webpack_require__(50); +var Key = __webpack_require__(33); +var Fingerprint = __webpack_require__(139); +var Signature = __webpack_require__(70); +var PrivateKey = __webpack_require__(38); +var Certificate = __webpack_require__(138); +var Identity = __webpack_require__(141); +var errs = __webpack_require__(69); module.exports = { /* top-level classes */ @@ -56486,64 +55461,36 @@ module.exports = { /***/ }), -/* 203 */ -/***/ (function(module, exports) { +/* 261 */ +/***/ (function(module, exports, __webpack_require__) { -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) +"use strict"; - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') +const ansiRegex = __webpack_require__(988); - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} +module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input; /***/ }), -/* 204 */ +/* 262 */ +/***/ (function(module, exports) { + +module.exports = require("child_process"); + +/***/ }), +/* 263 */ /***/ (function(module, exports) { module.exports = require("punycode"); /***/ }), -/* 205 */ +/* 264 */ /***/ (function(module, exports) { module.exports = require("string_decoder"); /***/ }), -/* 206 */ -/***/ (function(module, exports) { - -module.exports = require("zlib"); - -/***/ }), -/* 207 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56556,254 +55503,272 @@ Object.defineProperty(exports, "__esModule", { var _constants; function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); + return _constants = _interopRequireWildcard(__webpack_require__(14)); } var _access; function _load_access() { - return _access = _interopRequireWildcard(__webpack_require__(392)); + return _access = _interopRequireWildcard(__webpack_require__(505)); } var _add; function _load_add() { - return _add = _interopRequireWildcard(__webpack_require__(109)); + return _add = _interopRequireWildcard(__webpack_require__(149)); +} + +var _audit; + +function _load_audit() { + return _audit = _interopRequireWildcard(__webpack_require__(287)); } var _autoclean; function _load_autoclean() { - return _autoclean = _interopRequireWildcard(__webpack_require__(229)); + return _autoclean = _interopRequireWildcard(__webpack_require__(288)); } var _bin; function _load_bin() { - return _bin = _interopRequireWildcard(__webpack_require__(393)); + return _bin = _interopRequireWildcard(__webpack_require__(506)); } var _cache; function _load_cache() { - return _cache = _interopRequireWildcard(__webpack_require__(394)); + return _cache = _interopRequireWildcard(__webpack_require__(289)); } var _check; function _load_check() { - return _check = _interopRequireWildcard(__webpack_require__(230)); + return _check = _interopRequireWildcard(__webpack_require__(290)); } var _config; function _load_config() { - return _config = _interopRequireWildcard(__webpack_require__(395)); + return _config = _interopRequireWildcard(__webpack_require__(507)); } var _create; function _load_create() { - return _create = _interopRequireWildcard(__webpack_require__(396)); + return _create = _interopRequireWildcard(__webpack_require__(508)); } var _exec; function _load_exec() { - return _exec = _interopRequireWildcard(__webpack_require__(397)); + return _exec = _interopRequireWildcard(__webpack_require__(509)); } var _generateLockEntry; function _load_generateLockEntry() { - return _generateLockEntry = _interopRequireWildcard(__webpack_require__(398)); + return _generateLockEntry = _interopRequireWildcard(__webpack_require__(510)); } var _global; function _load_global() { - return _global = _interopRequireWildcard(__webpack_require__(85)); + return _global = _interopRequireWildcard(__webpack_require__(111)); } var _help; function _load_help() { - return _help = _interopRequireWildcard(__webpack_require__(399)); + return _help = _interopRequireWildcard(__webpack_require__(511)); } var _import; function _load_import() { - return _import = _interopRequireWildcard(__webpack_require__(400)); + return _import = _interopRequireWildcard(__webpack_require__(512)); } var _info; function _load_info() { - return _info = _interopRequireWildcard(__webpack_require__(401)); + return _info = _interopRequireWildcard(__webpack_require__(513)); } var _init; function _load_init() { - return _init = _interopRequireWildcard(__webpack_require__(402)); + return _init = _interopRequireWildcard(__webpack_require__(514)); } var _install; function _load_install() { - return _install = _interopRequireWildcard(__webpack_require__(34)); + return _install = _interopRequireWildcard(__webpack_require__(40)); } var _licenses; function _load_licenses() { - return _licenses = _interopRequireWildcard(__webpack_require__(403)); + return _licenses = _interopRequireWildcard(__webpack_require__(515)); } var _link; function _load_link() { - return _link = _interopRequireWildcard(__webpack_require__(231)); + return _link = _interopRequireWildcard(__webpack_require__(291)); } var _login; function _load_login() { - return _login = _interopRequireWildcard(__webpack_require__(86)); + return _login = _interopRequireWildcard(__webpack_require__(94)); } var _logout; function _load_logout() { - return _logout = _interopRequireWildcard(__webpack_require__(404)); + return _logout = _interopRequireWildcard(__webpack_require__(516)); } var _list; function _load_list() { - return _list = _interopRequireWildcard(__webpack_require__(232)); + return _list = _interopRequireWildcard(__webpack_require__(292)); } var _node; function _load_node() { - return _node = _interopRequireWildcard(__webpack_require__(405)); + return _node = _interopRequireWildcard(__webpack_require__(517)); } var _outdated; function _load_outdated() { - return _outdated = _interopRequireWildcard(__webpack_require__(406)); + return _outdated = _interopRequireWildcard(__webpack_require__(518)); } var _owner; function _load_owner() { - return _owner = _interopRequireWildcard(__webpack_require__(407)); + return _owner = _interopRequireWildcard(__webpack_require__(519)); } var _pack; function _load_pack() { - return _pack = _interopRequireWildcard(__webpack_require__(110)); + return _pack = _interopRequireWildcard(__webpack_require__(150)); +} + +var _policies; + +function _load_policies() { + return _policies = _interopRequireWildcard(__webpack_require__(520)); } var _publish; function _load_publish() { - return _publish = _interopRequireWildcard(__webpack_require__(408)); + return _publish = _interopRequireWildcard(__webpack_require__(521)); } var _remove; function _load_remove() { - return _remove = _interopRequireWildcard(__webpack_require__(233)); + return _remove = _interopRequireWildcard(__webpack_require__(293)); } var _run; function _load_run() { - return _run = _interopRequireWildcard(__webpack_require__(409)); + return _run = _interopRequireWildcard(__webpack_require__(294)); } var _tag; function _load_tag() { - return _tag = _interopRequireWildcard(__webpack_require__(234)); + return _tag = _interopRequireWildcard(__webpack_require__(295)); } var _team; function _load_team() { - return _team = _interopRequireWildcard(__webpack_require__(410)); + return _team = _interopRequireWildcard(__webpack_require__(522)); +} + +var _unplug; + +function _load_unplug() { + return _unplug = _interopRequireWildcard(__webpack_require__(524)); } var _unlink; function _load_unlink() { - return _unlink = _interopRequireWildcard(__webpack_require__(411)); + return _unlink = _interopRequireWildcard(__webpack_require__(523)); } var _upgrade; function _load_upgrade() { - return _upgrade = _interopRequireWildcard(__webpack_require__(149)); + return _upgrade = _interopRequireWildcard(__webpack_require__(189)); } var _version; function _load_version() { - return _version = _interopRequireWildcard(__webpack_require__(236)); + return _version = _interopRequireWildcard(__webpack_require__(297)); } var _versions; function _load_versions() { - return _versions = _interopRequireWildcard(__webpack_require__(412)); + return _versions = _interopRequireWildcard(__webpack_require__(525)); } var _why; function _load_why() { - return _why = _interopRequireWildcard(__webpack_require__(413)); + return _why = _interopRequireWildcard(__webpack_require__(526)); } var _workspaces; function _load_workspaces() { - return _workspaces = _interopRequireWildcard(__webpack_require__(415)); + return _workspaces = _interopRequireWildcard(__webpack_require__(528)); } var _workspace; function _load_workspace() { - return _workspace = _interopRequireWildcard(__webpack_require__(414)); + return _workspace = _interopRequireWildcard(__webpack_require__(527)); } var _upgradeInteractive; function _load_upgradeInteractive() { - return _upgradeInteractive = _interopRequireWildcard(__webpack_require__(235)); + return _upgradeInteractive = _interopRequireWildcard(__webpack_require__(296)); } var _useless; function _load_useless() { - return _useless = _interopRequireDefault(__webpack_require__(391)); + return _useless = _interopRequireDefault(__webpack_require__(504)); } var _aliases; function _load_aliases() { - return _aliases = _interopRequireDefault(__webpack_require__(228)); + return _aliases = _interopRequireDefault(__webpack_require__(286)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -var chalk = __webpack_require__(115); +var chalk = __webpack_require__(35); var getDocsLink = function getDocsLink(name) { @@ -56816,6 +55781,7 @@ var getDocsInfo = function getDocsInfo(name) { var commands = { access: _access || _load_access(), add: _add || _load_add(), + audit: _audit || _load_audit(), autoclean: _autoclean || _load_autoclean(), bin: _bin || _load_bin(), cache: _cache || _load_cache(), @@ -56841,12 +55807,14 @@ var commands = { outdated: _outdated || _load_outdated(), owner: _owner || _load_owner(), pack: _pack || _load_pack(), + policies: _policies || _load_policies(), prune: (0, (_useless || _load_useless()).default)("The prune command isn't necessary. `yarn install` will prune extraneous packages."), publish: _publish || _load_publish(), remove: _remove || _load_remove(), run: _run || _load_run(), tag: _tag || _load_tag(), team: _team || _load_team(), + unplug: _unplug || _load_unplug(), unlink: _unlink || _load_unlink(), upgrade: _upgrade || _load_upgrade(), version: _version || _load_version(), @@ -56869,7 +55837,225 @@ for (var _key in (_aliases || _load_aliases()).default) { exports.default = commands; /***/ }), -/* 208 */ +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(41)); +} + +var _assign; + +function _load_assign() { + return _assign = _interopRequireDefault(__webpack_require__(23)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +exports.getRcConfigForCwd = getRcConfigForCwd; +exports.getRcArgs = getRcArgs; + +var _fs; + +function _load_fs() { + return _fs = __webpack_require__(12); +} + +var _path; + +function _load_path() { + return _path = __webpack_require__(2); +} + +var _commander; + +function _load_commander() { + return _commander = _interopRequireDefault(__webpack_require__(269)); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = __webpack_require__(24); +} + +var _rc; + +function _load_rc() { + return _rc = _interopRequireWildcard(__webpack_require__(568)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Keys that will get resolved relative to the path of the rc file they belong to +var PATH_KEYS = new (_set || _load_set()).default(['yarn-path', 'cache-folder', 'global-folder', 'modules-folder', 'cwd', 'offline-cache-folder']); + +// given a cwd, load all .yarnrc files relative to it + + +function getRcConfigForCwd(cwd, args) { + var config = {}; + + if (args.indexOf('--no-default-rc') === -1) { + (0, (_assign || _load_assign()).default)(config, (_rc || _load_rc()).findRc('yarn', cwd, function (fileText, filePath) { + return loadRcFile(fileText, filePath); + })); + } + + for (var index = args.indexOf('--use-yarnrc'); index !== -1; index = args.indexOf('--use-yarnrc', index + 1)) { + var value = args[index + 1]; + + if (value && value.charAt(0) !== '-') { + (0, (_assign || _load_assign()).default)(config, loadRcFile((0, (_fs || _load_fs()).readFileSync)(value).toString(), value)); + } + } + + return config; +} + +function loadRcFile(fileText, filePath) { + var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc'), + values = _parse.object; + + // some keys reference directories so keep their relativity + + + for (var _key in values) { + if (PATH_KEYS.has(_key.replace(/^(--)?([^.]+\.)*/, ''))) { + values[_key] = (0, (_path || _load_path()).resolve)((0, (_path || _load_path()).dirname)(filePath), values[_key]); + } + } + + return values; +} + +// get the built of arguments of a .yarnrc chain of the passed cwd +function buildRcArgs(cwd, args) { + var config = getRcConfigForCwd(cwd, args); + + var argsForCommands = new (_map || _load_map()).default(); + + for (var _key2 in config) { + // args can be prefixed with the command name they're meant for, eg. + // `--install.check-files true` + var keyMatch = _key2.match(/^--(?:([^.]+)\.)?(.*)$/); + if (!keyMatch) { + continue; + } + + var commandName = keyMatch[1] || '*'; + var arg = keyMatch[2]; + var value = config[_key2]; + + // create args for this command name if we didn't previously have them + var _args = argsForCommands.get(commandName) || []; + argsForCommands.set(commandName, _args); + + // turn config value into appropriate cli flag + var option = (_commander || _load_commander()).default.optionFor(`--${arg}`); + + // If commander doesn't recognize the option or it takes a value after it + if (!option || option.optional || option.required) { + _args.push(`--${arg}`, value); + } else if (value === true) { + // we can't force remove an arg from cli + _args.push(`--${arg}`); + } + } + + return argsForCommands; +} + +// extract the value of a --cwd arg if present +function extractCwdArg(args) { + for (var i = 0, I = args.length; i < I; ++i) { + var arg = args[i]; + if (arg === '--') { + return null; + } else if (arg === '--cwd') { + return args[i + 1]; + } + } + return null; +} + +// get a list of arguments from .yarnrc that apply to this commandName +function getRcArgs(commandName, args) { + var previousCwds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + + // for the cwd, use the --cwd arg if it was passed or else use process.cwd() + var origCwd = extractCwdArg(args) || process.cwd(); + + // get a map of command names and their arguments + var argMap = buildRcArgs(origCwd, args); + + // concat wildcard arguments and arguments meant for this specific command + var newArgs = [].concat(argMap.get('*') || [], argMap.get(commandName) || []); + + // check if the .yarnrc args specified a cwd + var newCwd = extractCwdArg(newArgs); + if (newCwd && newCwd !== origCwd) { + // ensure that we don't enter into a loop + if (previousCwds.indexOf(newCwd) !== -1) { + throw new Error(`Recursive .yarnrc files specifying --cwd flags. Bailing out.`); + } + + // if we have a new cwd then let's refetch the .yarnrc args relative to it + return getRcArgs(commandName, newArgs, previousCwds.concat(origCwd)); + } + + return newArgs; +} + +/***/ }), +/* 267 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +exports.boolify = boolify; +exports.boolifyWithDefault = boolifyWithDefault; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var FALSY_STRINGS = new (_set || _load_set()).default(['0', 'false']); + +function boolify(val) { + return !FALSY_STRINGS.has(val.toString().toLowerCase()); +} + +function boolifyWithDefault(val, defaultResult) { + return val === '' || val === null || val === undefined ? defaultResult : boolify(val); +} + +/***/ }), +/* 268 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -56882,14 +56068,14 @@ Object.defineProperty(exports, "__esModule", { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } exports.isOffline = isOffline; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var os = __webpack_require__(73); +var os = __webpack_require__(81); var IGNORE_INTERFACES = ['lo0', 'awdl0', 'bridge0']; var LOCAL_IPS = ['127.0.0.1', '::1']; @@ -56941,20 +56127,25 @@ function isOffline() { } /***/ }), -/* 209 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ -var EventEmitter = __webpack_require__(72).EventEmitter; -var spawn = __webpack_require__(142).spawn; -var readlink = __webpack_require__(570).readlinkSync; -var path = __webpack_require__(0); +var EventEmitter = __webpack_require__(92).EventEmitter; +var spawn = __webpack_require__(262).spawn; +var path = __webpack_require__(2); var dirname = path.dirname; var basename = path.basename; -var fs = __webpack_require__(10); +var fs = __webpack_require__(12); + +/** + * Inherit `Command` from `EventEmitter.prototype`. + */ + +__webpack_require__(9).inherits(Command, EventEmitter); /** * Expose the root command. @@ -56984,9 +56175,9 @@ exports.Option = Option; function Option(flags, description) { this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); + this.required = flags.indexOf('<') >= 0; + this.optional = flags.indexOf('[') >= 0; + this.bool = flags.indexOf('-no-') === -1; flags = flags.split(/[ ,|]+/); if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); this.long = flags.shift(); @@ -57006,6 +56197,18 @@ Option.prototype.name = function() { .replace('no-', ''); }; +/** + * Return option name, in a camelcase format that can be used + * as a object attribute key. + * + * @return {String} + * @api private + */ + +Option.prototype.attributeName = function() { + return camelcase(this.name()); +}; + /** * Check if `arg` matches the short or long flag. * @@ -57015,7 +56218,7 @@ Option.prototype.name = function() { */ Option.prototype.is = function(arg) { - return arg == this.short || arg == this.long; + return this.short === arg || this.long === arg; }; /** @@ -57034,12 +56237,6 @@ function Command(name) { this._name = name || ''; } -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - /** * Add command `name`. * @@ -57102,6 +56299,10 @@ Command.prototype.__proto__ = EventEmitter.prototype; */ Command.prototype.command = function(name, desc, opts) { + if (typeof desc === 'object' && desc !== null) { + opts = desc; + desc = null; + } opts = opts || {}; var args = name.split(/ +/); var cmd = new Command(args.shift()); @@ -57112,7 +56313,6 @@ Command.prototype.command = function(name, desc, opts) { this._execs[cmd._name] = true; if (opts.isDefault) this.defaultExecutable = cmd._name; } - cmd._noHelp = !!opts.noHelp; this.commands.push(cmd); cmd.parseExpectedArgs(args); @@ -57128,7 +56328,7 @@ Command.prototype.command = function(name, desc, opts) { * @api public */ -Command.prototype.arguments = function (desc) { +Command.prototype.arguments = function(desc) { return this.parseExpectedArgs(desc.split(/ +/)); }; @@ -57224,7 +56424,7 @@ Command.prototype.action = function(fn) { if (parsed.args.length) args = parsed.args.concat(args); self._args.forEach(function(arg, i) { - if (arg.required && null == args[i]) { + if (arg.required && args[i] == null) { self.missingArgument(arg.name); } else if (arg.variadic) { if (i !== self._args.length - 1) { @@ -57248,8 +56448,8 @@ Command.prototype.action = function(fn) { }; var parent = this.parent || this; var name = parent === this ? '*' : this._name; - parent.on(name, listener); - if (this._alias) parent.on(this._alias, listener); + parent.on('command:' + name, listener); + if (this._alias) parent.on('command:' + this._alias, listener); return this; }; @@ -57296,39 +56496,41 @@ Command.prototype.action = function(fn) { * * @param {String} flags * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue + * @param {Function|*} [fn] or default + * @param {*} [defaultValue] * @return {Command} for chaining * @api public */ Command.prototype.option = function(flags, description, fn, defaultValue) { - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); + var self = this, + option = new Option(flags, description), + oname = option.name(), + name = option.attributeName(); // default as 3rd arg - if (typeof fn != 'function') { + if (typeof fn !== 'function') { if (fn instanceof RegExp) { var regex = fn; fn = function(val, def) { var m = regex.exec(val); return m ? m[0] : def; - } - } - else { + }; + } else { defaultValue = fn; fn = null; } } // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { + if (!option.bool || option.optional || option.required) { // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; + if (!option.bool) defaultValue = true; // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; + if (defaultValue !== undefined) { + self[name] = defaultValue; + option.defaultValue = defaultValue; + } } // register the option @@ -57336,23 +56538,23 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { // when it's passed assign the value // and conditionally invoke the callback - this.on(oname, function(val) { + this.on('option:' + oname, function(val) { // coercion - if (null !== val && fn) val = fn(val, undefined === self[name] - ? defaultValue - : self[name]); + if (val !== null && fn) { + val = fn(val, self[name] === undefined ? defaultValue : self[name]); + } // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { + if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') { // if no value, bool true, and we have a default, then use it! - if (null == val) { + if (val == null) { self[name] = option.bool ? defaultValue || true : false; } else { self[name] = val; } - } else if (null !== val) { + } else if (val !== null) { // reassign self[name] = val; } @@ -57369,8 +56571,8 @@ Command.prototype.option = function(flags, description, fn, defaultValue) { * @api public */ Command.prototype.allowUnknownOption = function(arg) { - this._allowUnknownOption = arguments.length === 0 || arg; - return this; + this._allowUnknownOption = arguments.length === 0 || arg; + return this; }; /** @@ -57405,11 +56607,24 @@ Command.prototype.parse = function(argv) { // executable sub-commands var name = result.args[0]; - if (this._execs[name] && typeof this._execs[name] != "function") { + + var aliasCommand = null; + // check alias of sub commands + if (name) { + aliasCommand = this.commands.filter(function(command) { + return command.alias() === name; + })[0]; + } + + if (this._execs[name] && typeof this._execs[name] !== 'function') { + return this.executeSubCommand(argv, args, parsed.unknown); + } else if (aliasCommand) { + // is alias of a subCommand + args[0] = aliasCommand._name; return this.executeSubCommand(argv, args, parsed.unknown); } else if (this.defaultExecutable) { // use the default subcommand - args.unshift(name = this.defaultExecutable); + args.unshift(this.defaultExecutable); return this.executeSubCommand(argv, args, parsed.unknown); } @@ -57429,10 +56644,10 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { args = args.concat(unknown); if (!args.length) this.help(); - if ('help' == args[0] && 1 == args.length) this.help(); + if (args[0] === 'help' && args.length === 1) this.help(); // --help - if ('help' == args[0]) { + if (args[0] === 'help') { args[0] = args[1]; args[1] = '--help'; } @@ -57442,15 +56657,14 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { // name of the subcommand, link `pm-install` var bin = basename(f, '.js') + '-' + args[0]; - // In case of globally installed, get the base dir where executable // subcommand file should be located at - var baseDir - , link = readlink(f); + var baseDir, + link = fs.lstatSync(f).isSymbolicLink() ? fs.readlinkSync(f) : f; // when symbolink is relative path if (link !== f && link.charAt(0) !== '/') { - link = path.join(dirname(f), link) + link = path.join(dirname(f), link); } baseDir = dirname(link); @@ -57471,24 +56685,32 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { var proc; if (process.platform !== 'win32') { if (isExplicitJS) { - args.unshift(localBin); + args.unshift(bin); // add executable arguments to spawn args = (process.execArgv || []).concat(args); - proc = spawn('node', args, { stdio: 'inherit', customFds: [0, 1, 2] }); + proc = spawn(process.argv[0], args, { stdio: 'inherit', customFds: [0, 1, 2] }); } else { proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] }); } } else { - args.unshift(localBin); - proc = spawn(process.execPath, args, { stdio: 'inherit'}); + args.unshift(bin); + proc = spawn(process.execPath, args, { stdio: 'inherit' }); } + var signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; + signals.forEach(function(signal) { + process.on(signal, function() { + if (proc.killed === false && proc.exitCode === null) { + proc.kill(signal); + } + }); + }); proc.on('close', process.exit.bind(process)); proc.on('error', function(err) { - if (err.code == "ENOENT") { + if (err.code === 'ENOENT') { console.error('\n %s(1) does not exist, try --help\n', bin); - } else if (err.code == "EACCES") { + } else if (err.code === 'EACCES') { console.error('\n %s(1) not executable. try chmod or run with root\n', bin); } process.exit(1); @@ -57509,15 +56731,15 @@ Command.prototype.executeSubCommand = function(argv, args, unknown) { */ Command.prototype.normalize = function(args) { - var ret = [] - , arg - , lastOpt - , index; + var ret = [], + arg, + lastOpt, + index; for (var i = 0, len = args.length; i < len; ++i) { arg = args[i]; if (i > 0) { - lastOpt = this.optionFor(args[i-1]); + lastOpt = this.optionFor(args[i - 1]); } if (arg === '--') { @@ -57526,7 +56748,7 @@ Command.prototype.normalize = function(args) { break; } else if (lastOpt && lastOpt.required) { ret.push(arg); - } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { + } else if (arg.length > 1 && arg[0] === '-' && arg[1] !== '-') { arg.slice(1).split('').forEach(function(c) { ret.push('-' + c); }); @@ -57557,10 +56779,10 @@ Command.prototype.parseArgs = function(args, unknown) { if (args.length) { name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); + if (this.listeners('command:' + name).length) { + this.emit('command:' + args.shift(), args, unknown); } else { - this.emit('*', args); + this.emit('command:*', args); } } else { outputHelpIfNecessary(this, unknown); @@ -57601,11 +56823,11 @@ Command.prototype.optionFor = function(arg) { */ Command.prototype.parseOptions = function(argv) { - var args = [] - , len = argv.length - , literal - , option - , arg; + var args = [], + len = argv.length, + literal, + option, + arg; var unknownOptions = []; @@ -57614,13 +56836,13 @@ Command.prototype.parseOptions = function(argv) { arg = argv[i]; // literal args after -- - if ('--' == arg) { - literal = true; + if (literal) { + args.push(arg); continue; } - if (literal) { - args.push(arg); + if (arg === '--') { + literal = true; continue; } @@ -57632,32 +56854,32 @@ Command.prototype.parseOptions = function(argv) { // requires arg if (option.required) { arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - this.emit(option.name(), arg); + if (arg == null) return this.optionMissingArgument(option); + this.emit('option:' + option.name(), arg); // optional arg } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || ('-' == arg[0] && '-' != arg)) { + arg = argv[i + 1]; + if (arg == null || (arg[0] === '-' && arg !== '-')) { arg = null; } else { ++i; } - this.emit(option.name(), arg); + this.emit('option:' + option.name(), arg); // bool } else { - this.emit(option.name()); + this.emit('option:' + option.name()); } continue; } // looks like an option - if (arg.length > 1 && '-' == arg[0]) { + if (arg.length > 1 && arg[0] === '-') { unknownOptions.push(arg); // If the next argument looks like it might be // an argument for this option, we pass it on. // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { + if ((i + 1) < argv.length && argv[i + 1][0] !== '-') { unknownOptions.push(argv[++i]); } continue; @@ -57677,12 +56899,12 @@ Command.prototype.parseOptions = function(argv) { * @api public */ Command.prototype.opts = function() { - var result = {} - , len = this.options.length; + var result = {}, + len = this.options.length; - for (var i = 0 ; i < len; i++) { - var key = camelcase(this.options[i].name()); - result[key] = key === 'version' ? this._version : this[key]; + for (var i = 0; i < len; i++) { + var key = this.options[i].attributeName(); + result[key] = key === this._versionOptionName ? this._version : this[key]; } return result; }; @@ -57756,17 +56978,19 @@ Command.prototype.variadicArgNotLast = function(name) { * which will print the version number when passed. * * @param {String} str - * @param {String} flags + * @param {String} [flags] * @return {Command} for chaining * @api public */ Command.prototype.version = function(str, flags) { - if (0 == arguments.length) return this._version; + if (arguments.length === 0) return this._version; this._version = str; flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function() { + var versionOption = new Option(flags, 'output the version number'); + this._versionOptionName = versionOption.long.substr(2) || 'version'; + this.options.push(versionOption); + this.on('option:' + this._versionOptionName, function() { process.stdout.write(str + '\n'); process.exit(0); }); @@ -57777,13 +57001,15 @@ Command.prototype.version = function(str, flags) { * Set the description to `str`. * * @param {String} str + * @param {Object} argsDescription * @return {String|Command} * @api public */ -Command.prototype.description = function(str) { - if (0 === arguments.length) return this._description; +Command.prototype.description = function(str, argsDescription) { + if (arguments.length === 0) return this._description; this._description = str; + this._argsDescription = argsDescription; return this; }; @@ -57796,8 +57022,16 @@ Command.prototype.description = function(str) { */ Command.prototype.alias = function(alias) { - if (0 == arguments.length) return this._alias; - this._alias = alias; + var command = this; + if (this.commands.length !== 0) { + command = this.commands[this.commands.length - 1]; + } + + if (arguments.length === 0) return command._alias; + + if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); + + command._alias = alias; return this; }; @@ -57814,26 +57048,67 @@ Command.prototype.usage = function(str) { return humanReadableArgName(arg); }); - var usage = '[options]' - + (this.commands.length ? ' [command]' : '') - + (this._args.length ? ' ' + args.join(' ') : ''); + var usage = '[options]' + + (this.commands.length ? ' [command]' : '') + + (this._args.length ? ' ' + args.join(' ') : ''); - if (0 == arguments.length) return this._usage || usage; + if (arguments.length === 0) return this._usage || usage; this._usage = str; return this; }; /** - * Get the name of the command + * Get or set the name of the command * - * @param {String} name + * @param {String} str * @return {String|Command} * @api public */ -Command.prototype.name = function() { - return this._name; +Command.prototype.name = function(str) { + if (arguments.length === 0) return this._name; + this._name = str; + return this; +}; + +/** + * Return prepared commands. + * + * @return {Array} + * @api private + */ + +Command.prototype.prepareCommands = function() { + return this.commands.filter(function(cmd) { + return !cmd._noHelp; + }).map(function(cmd) { + var args = cmd._args.map(function(arg) { + return humanReadableArgName(arg); + }).join(' '); + + return [ + cmd._name + + (cmd._alias ? '|' + cmd._alias : '') + + (cmd.options.length ? ' [options]' : '') + + (args ? ' ' + args : ''), + cmd._description + ]; + }); +}; + +/** + * Return the largest command length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestCommandLength = function() { + var commands = this.prepareCommands(); + return commands.reduce(function(max, command) { + return Math.max(max, command[0].length); + }, 0); }; /** @@ -57844,11 +57119,52 @@ Command.prototype.name = function() { */ Command.prototype.largestOptionLength = function() { - return this.options.reduce(function(max, option) { + var options = [].slice.call(this.options); + options.push({ + flags: '-h, --help' + }); + return options.reduce(function(max, option) { return Math.max(max, option.flags.length); }, 0); }; +/** + * Return the largest arg length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestArgLength = function() { + return this._args.reduce(function(max, arg) { + return Math.max(max, arg.name.length); + }, 0); +}; + +/** + * Return the pad width. + * + * @return {Number} + * @api private + */ + +Command.prototype.padWidth = function() { + var width = this.largestOptionLength(); + if (this._argsDescription && this._args.length) { + if (this.largestArgLength() > width) { + width = this.largestArgLength(); + } + } + + if (this.commands && this.commands.length) { + if (this.largestCommandLength() > width) { + width = this.largestCommandLength(); + } + } + + return width; +}; + /** * Return help for options. * @@ -57857,14 +57173,14 @@ Command.prototype.largestOptionLength = function() { */ Command.prototype.optionHelp = function() { - var width = this.largestOptionLength(); + var width = this.padWidth(); - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option) { - return pad(option.flags, width) + ' ' + option.description; - })) - .join('\n'); + // Append the help information + return this.options.map(function(option) { + return pad(option.flags, width) + ' ' + option.description + + ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + option.defaultValue + ')' : ''); + }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) + .join('\n'); }; /** @@ -57877,35 +57193,17 @@ Command.prototype.optionHelp = function() { Command.prototype.commandHelp = function() { if (!this.commands.length) return ''; - var commands = this.commands.filter(function(cmd) { - return !cmd._noHelp; - }).map(function(cmd) { - var args = cmd._args.map(function(arg) { - return humanReadableArgName(arg); - }).join(' '); - - return [ - cmd._name - + (cmd._alias ? '|' + cmd._alias : '') - + (cmd.options.length ? ' [options]' : '') - + ' ' + args - , cmd.description() - ]; - }); - - var width = commands.reduce(function(max, command) { - return Math.max(max, command[0].length); - }, 0); + var commands = this.prepareCommands(); + var width = this.padWidth(); return [ - '' - , ' Commands:' - , '' - , commands.map(function(cmd) { + ' Commands:', + '', + commands.map(function(cmd) { var desc = cmd[1] ? ' ' + cmd[1] : ''; - return pad(cmd[0], width) + desc; - }).join('\n').replace(/^/gm, ' ') - , '' + return (desc ? pad(cmd[0], width) : cmd[0]) + desc; + }).join('\n').replace(/^/gm, ' '), + '' ].join('\n'); }; @@ -57920,9 +57218,20 @@ Command.prototype.helpInformation = function() { var desc = []; if (this._description) { desc = [ - ' ' + this._description - , '' + ' ' + this._description, + '' ]; + + var argsDescription = this._argsDescription; + if (argsDescription && this._args.length) { + var width = this.padWidth(); + desc.push(' Arguments:'); + desc.push(''); + this._args.forEach(function(arg) { + desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); + }); + desc.push(''); + } } var cmdName = this._name; @@ -57930,9 +57239,9 @@ Command.prototype.helpInformation = function() { cmdName = cmdName + '|' + this._alias; } var usage = [ + '', + ' Usage: ' + cmdName + ' ' + this.usage(), '' - ,' Usage: ' + cmdName + ' ' + this.usage() - , '' ]; var cmds = []; @@ -57940,17 +57249,16 @@ Command.prototype.helpInformation = function() { if (commandHelp) cmds = [commandHelp]; var options = [ - ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' + ' Options:', + '', + '' + this.optionHelp().replace(/^/gm, ' '), + '' ]; return usage - .concat(cmds) .concat(desc) .concat(options) + .concat(cmds) .join('\n'); }; @@ -57964,7 +57272,7 @@ Command.prototype.outputHelp = function(cb) { if (!cb) { cb = function(passthru) { return passthru; - } + }; } process.stdout.write(cb(this.helpInformation())); this.emit('--help'); @@ -58020,7 +57328,7 @@ function pad(str, width) { function outputHelpIfNecessary(cmd, options) { options = options || []; for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { + if (options[i] === '--help' || options[i] === '-h') { cmd.outputHelp(); process.exit(0); } @@ -58040,7 +57348,7 @@ function humanReadableArgName(arg) { return arg.required ? '<' + nameOutput + '>' - : '[' + nameOutput + ']' + : '[' + nameOutput + ']'; } // for versions before node v0.8 when there weren't `fs.existsSync` @@ -58055,578 +57363,14 @@ function exists(file) { } - /***/ }), -/* 210 */ -/***/ (function(module, exports) { - -function webpackEmptyContext(req) { - throw new Error("Cannot find module '" + req + "'."); -} -webpackEmptyContext.keys = function() { return []; }; -webpackEmptyContext.resolve = webpackEmptyContext; -module.exports = webpackEmptyContext; -webpackEmptyContext.id = 210; - -/***/ }), -/* 211 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = { - setup: setupAsync, - compile: compileAsync -}; - - -var util = __webpack_require__(64); - -var ASYNC = { - '*': checkGenerators, - 'co*': checkGenerators, - 'es7': checkAsyncFunction -}; - -var TRANSPILE = { - 'nodent': getNodent, - 'regenerator': getRegenerator -}; - -var MODES = [ - { async: 'co*' }, - { async: 'es7', transpile: 'nodent' }, - { async: 'co*', transpile: 'regenerator' } -]; - - -var regenerator, nodent; - - -function setupAsync(opts, required) { - if (required !== false) required = true; - var async = opts.async - , transpile = opts.transpile - , check; - - switch (typeof transpile) { - case 'string': - var get = TRANSPILE[transpile]; - if (!get) throw new Error('bad transpiler: ' + transpile); - return (opts._transpileFunc = get(opts, required)); - case 'undefined': - case 'boolean': - if (typeof async == 'string') { - check = ASYNC[async]; - if (!check) throw new Error('bad async mode: ' + async); - return (opts.transpile = check(opts, required)); - } - - for (var i=0; i', - $notOp = $isMax ? '>' : '<'; + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; if ($isDataExcl) { var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, $opExpr = 'op' + $lvl, $opStr = '\' + ' + $opExpr + ' + \''; out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { '; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; var $errorKeyword = $exclusiveKeyword; var $$outStack = $$outStack || []; $$outStack.push(out); @@ -58721,27 +57447,49 @@ module.exports = function generate__limit(it, $keyword) { } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += ' } else if( '; + out += ' } else if ( '; if ($isData) { out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; } - out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; } else { - var $exclusive = $schemaExcl === true, + var $exclIsNumber = typeof $schemaExcl == 'number', $opStr = $op; - if (!$exclusive) $opStr += '='; - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; } - out += ' ' + ($data) + ' ' + ($notOp); - if ($exclusive) { - out += '='; - } - out += ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') {'; } - var $errorKeyword = $keyword; + $errorKeyword = $errorKeyword || $keyword; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ @@ -58752,7 +57500,7 @@ module.exports = function generate__limit(it, $keyword) { if ($isData) { out += '\' + ' + ($schemaValue); } else { - out += '' + ($schema) + '\''; + out += '' + ($schemaValue) + '\''; } } if (it.opts.verbose) { @@ -58788,12 +57536,12 @@ module.exports = function generate__limit(it, $keyword) { /***/ }), -/* 217 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate__limitItems(it, $keyword) { +module.exports = function generate__limitItems(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -58803,7 +57551,7 @@ module.exports = function generate__limitItems(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $errorKeyword; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -58871,12 +57619,12 @@ module.exports = function generate__limitItems(it, $keyword) { /***/ }), -/* 218 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate__limitLength(it, $keyword) { +module.exports = function generate__limitLength(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -58886,7 +57634,7 @@ module.exports = function generate__limitLength(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $errorKeyword; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -58959,12 +57707,12 @@ module.exports = function generate__limitLength(it, $keyword) { /***/ }), -/* 219 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate__limitProperties(it, $keyword) { +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -58974,7 +57722,7 @@ module.exports = function generate__limitProperties(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $errorKeyword; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -59042,34 +57790,28 @@ module.exports = function generate__limitProperties(it, $keyword) { /***/ }), -/* 220 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_validate(it, $keyword) { +module.exports = function generate_validate(it, $keyword, $ruleType) { var out = ''; - var $async = it.schema.$async === true; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.root.schema.id); - it.baseId = it.baseId || it.rootId; if ($async) { it.async = true; var $es7 = it.opts.async == 'es7'; it.yieldAwait = $es7 ? 'await' : 'yield'; } - delete it.isTop; - it.dataPathArr = [undefined]; out += ' var validate = '; if ($async) { if ($es7) { out += ' (async function '; } else { - if (it.opts.async == 'co*') { + if (it.opts.async != '*') { out += 'co.wrap'; } out += '(function* '; @@ -59077,91 +57819,38 @@ module.exports = function generate_validate(it, $keyword) { } else { out += ' (function '; } - out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data;'; - } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; + out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - if ($coerceToTypes) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; - } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; - } - if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; + out += ' , message: \'boolean schema is false\' '; } if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { @@ -59178,25 +57867,200 @@ module.exports = function generate_validate(it, $keyword) { } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += ' } else { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } } '; + } + if (it.isTop) { + out += ' }); return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); } } - var $refKeywords; - if (it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'))) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"'); - } else if (it.opts.extendRefs == 'ignore') { - $refKeywords = false; - console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } else if (it.opts.extendRefs !== true) { - console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour'); + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; } } if (it.schema.$ref && !$refKeywords) { @@ -59212,6 +58076,9 @@ module.exports = function generate_validate(it, $keyword) { $closingBraces2 += '}'; } } else { + if (it.opts.v5 && it.schema.patternGroups) { + it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); + } var arr2 = it.RULES; if (arr2) { var $rulesGroup, i2 = -1, @@ -59273,9 +58140,12 @@ module.exports = function generate_validate(it, $keyword) { while (i5 < l5) { $rule = arr5[i5 += 1]; if ($shouldUseRule($rule)) { - out += ' ' + ($rule.code(it, $rule.keyword)) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } } } } @@ -59287,7 +58157,6 @@ module.exports = function generate_validate(it, $keyword) { if ($rulesGroup.type) { out += ' } '; if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - var $typeChecked = true; out += ' else { '; var $schemaPath = it.schemaPath + '.type', $errSchemaPath = it.errSchemaPath + '/type'; @@ -59295,7 +58164,7 @@ module.exports = function generate_validate(it, $keyword) { $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; if ($typeIsArray) { out += '' + ($typeSchema.join(",")); } else { @@ -59346,57 +58215,12 @@ module.exports = function generate_validate(it, $keyword) { } } } - if ($typeSchema && !$typeChecked && !$coerceToTypes) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - } if ($breakOnError) { out += ' ' + ($closingBraces2) + ' '; } if ($top) { if ($async) { - out += ' if (errors === 0) return true; '; + out += ' if (errors === 0) return data; '; out += ' else throw new ValidationError(vErrors); '; } else { out += ' validate.errors = vErrors; '; @@ -59407,35 +58231,38 @@ module.exports = function generate_validate(it, $keyword) { out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; } out = it.util.cleanUpCode(out); - if ($top && $breakOnError) { - out = it.util.cleanUpVarErrors(out, $async); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); } function $shouldUseGroup($rulesGroup) { - for (var i = 0; i < $rulesGroup.rules.length; i++) - if ($shouldUseRule($rulesGroup.rules[i])) return true; + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; } function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.keyword == 'properties' && (it.schema.additionalProperties === false || typeof it.schema.additionalProperties == 'object' || (it.schema.patternProperties && Object.keys(it.schema.patternProperties).length) || (it.opts.v5 && it.schema.patternGroups && Object.keys(it.schema.patternGroups).length))); + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; } return out; } /***/ }), -/* 221 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -module.exports = function () { - return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; -}; +module.exports = __webpack_require__(475)().Promise /***/ }), -/* 222 */ +/* 277 */ /***/ (function(module, exports) { // API @@ -59470,10 +58297,10 @@ function clean(key) /***/ }), -/* 223 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { -var defer = __webpack_require__(385); +var defer = __webpack_require__(484); // API module.exports = async; @@ -59510,11 +58337,11 @@ function async(callback) /***/ }), -/* 224 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { -var async = __webpack_require__(223) - , abort = __webpack_require__(222) +var async = __webpack_require__(278) + , abort = __webpack_require__(277) ; // API @@ -59591,7 +58418,7 @@ function runJob(iterator, key, item, callback) /***/ }), -/* 225 */ +/* 280 */ /***/ (function(module, exports) { // API @@ -59634,11 +58461,11 @@ function state(list, sortMethod) /***/ }), -/* 226 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { -var abort = __webpack_require__(222) - , async = __webpack_require__(223) +var abort = __webpack_require__(277) + , async = __webpack_require__(278) ; // API @@ -59669,12 +58496,12 @@ function terminator(callback) /***/ }), -/* 227 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { -var iterate = __webpack_require__(224) - , initState = __webpack_require__(225) - , terminator = __webpack_require__(226) +var iterate = __webpack_require__(279) + , initState = __webpack_require__(280) + , terminator = __webpack_require__(281) ; // Public API @@ -59750,7 +58577,310 @@ function descending(a, b) /***/ }), -/* 228 */ +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `input` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var chalk = __webpack_require__(35); + +var _require = __webpack_require__(65), + map = _require.map, + takeUntil = _require.takeUntil; + +var Base = __webpack_require__(72); +var observe = __webpack_require__(73); + +var InputPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(InputPrompt, _Base); + + function InputPrompt() { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, InputPrompt); + return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.apply(this, arguments)); + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + InputPrompt.prototype._run = function _run(cb) { + this.done = cb; + + // Once user confirm (enter key) + var events = observe(this.rl); + var submit = events.line.pipe(map(this.filterInput.bind(this))); + + var validation = this.handleSubmitEvents(submit); + validation.success.forEach(this.onEnd.bind(this)); + validation.error.forEach(this.onError.bind(this)); + + events.keypress.pipe(takeUntil(validation.success)).forEach(this.onKeypress.bind(this)); + + // Init + this.render(); + + return this; + }; + + /** + * Render the prompt to screen + * @return {InputPrompt} self + */ + + InputPrompt.prototype.render = function render(error) { + var bottomContent = ''; + var appendContent = ''; + var message = this.getQuestion(); + var transformer = this.opt.transformer; + var isFinal = this.status === 'answered'; + + if (isFinal) { + appendContent = this.answer; + } else { + appendContent = this.rl.line; + } + + if (transformer) { + message += transformer(appendContent, this.answers, { isFinal }); + } else { + message += isFinal ? chalk.cyan(appendContent) : appendContent; + } + + if (error) { + bottomContent = chalk.red('>> ') + error; + } + + this.screen.render(message, bottomContent); + }; + + /** + * When user press `enter` key + */ + + InputPrompt.prototype.filterInput = function filterInput(input) { + if (!input) { + return this.opt.default == null ? '' : this.opt.default; + } + return input; + }; + + InputPrompt.prototype.onEnd = function onEnd(state) { + this.answer = state.value; + this.status = 'answered'; + + // Re-render prompt + this.render(); + + this.screen.done(); + this.done(state.value); + }; + + InputPrompt.prototype.onError = function onError(state) { + this.render(state.isValid); + }; + + /** + * When user press a key + */ + + InputPrompt.prototype.onKeypress = function onKeypress() { + // If user press a key, just clear the default value + if (this.opt.default) { + this.opt.default = undefined; + } + + this.render(); + }; + + return InputPrompt; +}(Base); + +module.exports = InputPrompt; + +/***/ }), +/* 284 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var MuteStream = __webpack_require__(364); +var readline = __webpack_require__(180); + +/** + * Base interface class other can inherits from + */ + +var UI = function () { + function UI(opt) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, UI); + + // Instantiate the Readline interface + // @Note: Don't reassign if already present (allow test to override the Stream) + if (!this.rl) { + this.rl = readline.createInterface(setupReadlineOptions(opt)); + } + this.rl.resume(); + + this.onForceClose = this.onForceClose.bind(this); + + // Make sure new prompt start on a newline when closing + process.on('exit', this.onForceClose); + + // Terminate process on SIGINT (which will call process.on('exit') in return) + this.rl.on('SIGINT', this.onForceClose); + } + + /** + * Handle the ^C exit + * @return {null} + */ + + UI.prototype.onForceClose = function onForceClose() { + this.close(); + process.kill(process.pid, 'SIGINT'); + console.log(''); + }; + + /** + * Close the interface and cleanup listeners + */ + + UI.prototype.close = function close() { + // Remove events listeners + this.rl.removeListener('SIGINT', this.onForceClose); + process.removeListener('exit', this.onForceClose); + + this.rl.output.unmute(); + + if (this.activePrompt && typeof this.activePrompt.close === 'function') { + this.activePrompt.close(); + } + + // Close the readline + this.rl.output.end(); + this.rl.pause(); + this.rl.close(); + }; + + return UI; +}(); + +function setupReadlineOptions(opt) { + opt = opt || {}; + + // Default `input` to stdin + var input = opt.input || process.stdin; + + // Add mute capabilities to the output + var ms = new MuteStream(); + ms.pipe(opt.output || process.stdout); + var output = ms; + + return _.extend({ + terminal: true, + input: input, + output: output + }, _.omit(opt, ['input', 'output'])); +} + +module.exports = UI; + +/***/ }), +/* 285 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var ansiEscapes = __webpack_require__(470); + +/** + * Move cursor left by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go left (default to 1) + */ + +exports.left = function (rl, x) { + rl.output.write(ansiEscapes.cursorBackward(x)); +}; + +/** + * Move cursor right by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go left (default to 1) + */ + +exports.right = function (rl, x) { + rl.output.write(ansiEscapes.cursorForward(x)); +}; + +/** + * Move cursor up by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go up (default to 1) + */ + +exports.up = function (rl, x) { + rl.output.write(ansiEscapes.cursorUp(x)); +}; + +/** + * Move cursor down by `x` + * @param {Readline} rl - Readline instance + * @param {Number} x - How far to go down (default to 1) + */ + +exports.down = function (rl, x) { + rl.output.write(ansiEscapes.cursorDown(x)); +}; + +/** + * Clear current line + * @param {Readline} rl - Readline instance + * @param {Number} len - number of line to delete + */ +exports.clearLine = function (rl, len) { + rl.output.write(ansiEscapes.eraseLines(len)); +}; + +/***/ }), +/* 286 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59765,7 +58895,338 @@ exports.default = { }; /***/ }), -/* 229 */ +/* 287 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = undefined; + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _assign; + +function _load_assign() { + return _assign = _interopRequireDefault(__webpack_require__(23)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var run = exports.run = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var audit = new Audit(config, reporter); + var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + var install = new (_install || _load_install()).Install({}, config, reporter, lockfile); + + var _ref2 = yield install.fetchRequestFromCwd(), + manifest = _ref2.manifest, + requests = _ref2.requests, + patterns = _ref2.patterns, + workspaceLayout = _ref2.workspaceLayout; + + yield install.resolver.init(requests, { + workspaceLayout + }); + + var vulnerabilities = yield audit.performAudit(manifest, install.resolver, install.linker, patterns); + + var EXIT_INFO = 1; + var EXIT_LOW = 2; + var EXIT_MODERATE = 4; + var EXIT_HIGH = 8; + var EXIT_CRITICAL = 16; + + var exitCode = (vulnerabilities.info ? EXIT_INFO : 0) + (vulnerabilities.low ? EXIT_LOW : 0) + (vulnerabilities.moderate ? EXIT_MODERATE : 0) + (vulnerabilities.high ? EXIT_HIGH : 0) + (vulnerabilities.critical ? EXIT_CRITICAL : 0); + + if (flags.summary) { + audit.summary(); + } else { + audit.report(); + } + + return exitCode; + }); + + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +}(); + +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; + +var _promise; + +function _load_promise() { + return _promise = __webpack_require__(85); +} + +var _hoistedTreeBuilder; + +function _load_hoistedTreeBuilder() { + return _hoistedTreeBuilder = __webpack_require__(534); +} + +var _install; + +function _load_install() { + return _install = __webpack_require__(40); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(24)); +} + +var _constants; + +function _load_constants() { + return _constants = __webpack_require__(14); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var zlib = __webpack_require__(181); +var gzip = (0, (_promise || _load_promise()).promisify)(zlib.gzip); + +function setFlags(commander) { + commander.description('Checks for known security issues with the installed packages.'); + commander.option('--summary', 'Only print the summary.'); +} + +function hasWrapper(commander, args) { + return true; +} + +var Audit = function () { + function Audit(config, reporter) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Audit); + + this.config = config; + this.reporter = reporter; + } + + Audit.prototype._mapHoistedNodes = function _mapHoistedNodes(auditNode, hoistedNodes) { + for (var _iterator = hoistedNodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref3; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref3 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref3 = _i.value; + } + + var node = _ref3; + + var pkg = node.manifest.pkg; + var _requires = (0, (_assign || _load_assign()).default)({}, pkg.dependencies || {}, pkg.optionalDependencies || {}); + for (var _iterator2 = (0, (_keys || _load_keys()).default)(_requires), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref4; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref4 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref4 = _i2.value; + } + + var _name = _ref4; + + if (!_requires[_name]) { + _requires[_name] = '*'; + } + } + auditNode.dependencies[node.name] = { + version: node.version, + integrity: pkg._remote ? pkg._remote.integrity || '' : '', + requires: _requires, + dependencies: {} + }; + if (node.children) { + this._mapHoistedNodes(auditNode.dependencies[node.name], node.children); + } + } + }; + + Audit.prototype._mapHoistedTreesToAuditTree = function _mapHoistedTreesToAuditTree(manifest, hoistedTrees) { + var auditTree = { + name: manifest.name || undefined, + version: manifest.version || undefined, + install: [], + remove: [], + metadata: { + //TODO: What do we send here? npm sends npm version, node version, etc. + }, + requires: (0, (_assign || _load_assign()).default)({}, manifest.dependencies || {}, manifest.devDependencies || {}, manifest.optionalDependencies || {}), + integrity: undefined, + dependencies: {} + }; + + this._mapHoistedNodes(auditTree, hoistedTrees); + return auditTree; + }; + + Audit.prototype._fetchAudit = function () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (auditTree) { + var responseJson = void 0; + var registry = (_constants || _load_constants()).YARN_REGISTRY; + this.reporter.verbose(`Audit Request: ${(0, (_stringify || _load_stringify()).default)(auditTree, null, 2)}`); + var requestBody = yield gzip((0, (_stringify || _load_stringify()).default)(auditTree)); + var response = yield this.config.requestManager.request({ + url: `${registry}/-/npm/v1/security/audits`, + method: 'POST', + body: requestBody, + headers: { + 'Content-Encoding': 'gzip', + 'Content-Type': 'application/json', + Accept: 'application/json' + } + }); + + try { + responseJson = JSON.parse(response); + } catch (ex) { + throw new Error(`Unexpected audit response (Invalid JSON): ${response}`); + } + if (!responseJson.metadata) { + throw new Error(`Unexpected audit response (Missing Metadata): ${(0, (_stringify || _load_stringify()).default)(responseJson, null, 2)}`); + } + this.reporter.verbose(`Audit Response: ${(0, (_stringify || _load_stringify()).default)(responseJson, null, 2)}`); + return responseJson; + }); + + function _fetchAudit(_x5) { + return _ref5.apply(this, arguments); + } + + return _fetchAudit; + }(); + + Audit.prototype._insertWorkspacePackagesIntoManifest = function _insertWorkspacePackagesIntoManifest(manifest, resolver) { + if (resolver.workspaceLayout) { + var workspaceAggregatorName = resolver.workspaceLayout.virtualManifestName; + var workspaceManifest = resolver.workspaceLayout.workspaces[workspaceAggregatorName].manifest; + + manifest.dependencies = (0, (_assign || _load_assign()).default)(manifest.dependencies || {}, workspaceManifest.dependencies); + manifest.devDependencies = (0, (_assign || _load_assign()).default)(manifest.devDependencies || {}, workspaceManifest.devDependencies); + manifest.optionalDependencies = (0, (_assign || _load_assign()).default)(manifest.optionalDependencies || {}, workspaceManifest.optionalDependencies); + } + }; + + Audit.prototype.performAudit = function () { + var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (manifest, resolver, linker, patterns) { + this._insertWorkspacePackagesIntoManifest(manifest, resolver); + var hoistedTrees = yield (0, (_hoistedTreeBuilder || _load_hoistedTreeBuilder()).buildTree)(resolver, linker, patterns); + var auditTree = this._mapHoistedTreesToAuditTree(manifest, hoistedTrees); + this.auditData = yield this._fetchAudit(auditTree); + return this.auditData.metadata.vulnerabilities; + }); + + function performAudit(_x6, _x7, _x8, _x9) { + return _ref6.apply(this, arguments); + } + + return performAudit; + }(); + + Audit.prototype.summary = function summary() { + if (!this.auditData) { + return; + } + this.reporter.auditSummary(this.auditData.metadata); + }; + + Audit.prototype.report = function report() { + var _this = this; + + if (!this.auditData) { + return; + } + + var reportAdvisory = function reportAdvisory(resolution) { + var advisory = _this.auditData.advisories[resolution.id.toString()]; + _this.reporter.auditAdvisory(resolution, advisory); + }; + + if ((0, (_keys || _load_keys()).default)(this.auditData.advisories).length !== 0) { + // let printedManualReviewHeader = false; + + this.auditData.actions.forEach(function (action) { + action.resolves.forEach(reportAdvisory); + + /* The following block has been temporarily removed + * because the actions returned by npm are not valid for yarn. + * Removing this action reporting until we can come up with a way + * to correctly resolve issues. + */ + // if (action.action === 'update' || action.action === 'install') { + // // these advisories can be resolved automatically by running a yarn command + // const recommendation: AuditActionRecommendation = { + // cmd: `yarn upgrade ${action.module}@${action.target}`, + // isBreaking: action.isMajor, + // action, + // }; + // this.reporter.auditAction(recommendation); + // action.resolves.forEach(reportAdvisory); + // } + + // if (action.action === 'review') { + // // these advisories cannot be resolved automatically and require manual review + // if (!printedManualReviewHeader) { + // this.reporter.auditManualReview(); + // } + // printedManualReviewHeader = true; + // action.resolves.forEach(reportAdvisory); + // } + }); + } + + this.summary(); + }; + + return Audit; +}(); + +exports.default = Audit; + +/***/ }), +/* 288 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -59779,13 +59240,19 @@ exports.run = exports.clean = exports.noArguments = exports.requireLockfile = un var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _asyncToGenerator2; @@ -59796,7 +59263,7 @@ function _load_asyncToGenerator() { var clean = exports.clean = function () { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter) { - var loc = path.join(config.cwd, (_constants || _load_constants()).CLEAN_FILENAME); + var loc = path.join(config.lockfileFolder, (_constants || _load_constants()).CLEAN_FILENAME); var file = yield (_fs || _load_fs()).readFile(loc); var lines = file.split('\n'); var filters = (0, (_filter || _load_filter()).ignoreLinesToRegex)(lines); @@ -59824,22 +59291,63 @@ var clean = exports.clean = function () { var name = _ref2; var registry = config.registries[name]; - locs.add(path.join(config.cwd, registry.folder)); + locs.add(path.join(config.lockfileFolder, registry.folder)); } - for (var _iterator2 = locs, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref3; + var workspaceRootFolder = config.workspaceRootFolder; + if (workspaceRootFolder) { + var manifest = yield config.findManifest(workspaceRootFolder, false); + invariant(manifest && manifest.workspaces, 'We must find a manifest with a "workspaces" property'); - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; + var workspaces = yield config.resolveWorkspaces(workspaceRootFolder, manifest); + + for (var _iterator2 = (0, (_keys || _load_keys()).default)(workspaces), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var workspaceName = _ref3; + + for (var _iterator3 = (_index || _load_index()).registryNames, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + var _name = _ref4; + + var registry = config.registries[_name]; + locs.add(path.join(workspaces[workspaceName].loc, registry.folder)); + } + } + } + + for (var _iterator4 = locs, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref5; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref5 = _iterator4[_i4++]; } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref5 = _i4.value; } - var folder = _ref3; + var folder = _ref5; if (!(yield (_fs || _load_fs()).exists(folder))) { continue; @@ -59856,19 +59364,19 @@ var clean = exports.clean = function () { var tick = reporter.progress(ignoreFiles.size); // TODO make sure `main` field of all modules isn't ignored - for (var _iterator3 = ignoreFiles, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref4; + for (var _iterator5 = ignoreFiles, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { + var _ref6; - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref4 = _iterator3[_i3++]; + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref6 = _iterator5[_i5++]; } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref4 = _i3.value; + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref6 = _i5.value; } - var _file = _ref4; + var _file = _ref6; var _loc = path.join(folder, _file); var stat = yield (_fs || _load_fs()).lstat(_loc); @@ -59876,19 +59384,19 @@ var clean = exports.clean = function () { removedFiles++; } - for (var _iterator4 = ignoreFiles, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { - var _ref5; + for (var _iterator6 = ignoreFiles, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { + var _ref7; - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref5 = _iterator4[_i4++]; + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref7 = _iterator6[_i6++]; } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref5 = _i4.value; + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref7 = _i6.value; } - var _file2 = _ref5; + var _file2 = _ref7; var _loc2 = path.join(folder, _file2); yield (_fs || _load_fs()).unlink(_loc2); @@ -59905,7 +59413,7 @@ var clean = exports.clean = function () { }(); var runInit = function () { - var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (cwd, reporter) { + var _ref8 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (cwd, reporter) { reporter.step(1, 1, reporter.lang('cleanCreatingFile', (_constants || _load_constants()).CLEAN_FILENAME)); var cleanLoc = path.join(cwd, (_constants || _load_constants()).CLEAN_FILENAME); yield (_fs || _load_fs()).writeFile(cleanLoc, `${DEFAULT_FILTER}\n`, { flag: 'wx' }); @@ -59913,41 +59421,41 @@ var runInit = function () { }); return function runInit(_x3, _x4) { - return _ref6.apply(this, arguments); + return _ref8.apply(this, arguments); }; }(); var runAutoClean = function () { - var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter) { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter) { reporter.step(1, 1, reporter.lang('cleaning')); - var _ref8 = yield clean(config, reporter), - removedFiles = _ref8.removedFiles, - removedSize = _ref8.removedSize; + var _ref10 = yield clean(config, reporter), + removedFiles = _ref10.removedFiles, + removedSize = _ref10.removedSize; reporter.info(reporter.lang('cleanRemovedFiles', removedFiles)); reporter.info(reporter.lang('cleanSavedSize', Number((removedSize / 1024 / 1024).toFixed(2)))); }); return function runAutoClean(_x5, _x6) { - return _ref7.apply(this, arguments); + return _ref9.apply(this, arguments); }; }(); var checkForCleanFile = function () { - var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (cwd) { + var _ref11 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (cwd) { var cleanLoc = path.join(cwd, (_constants || _load_constants()).CLEAN_FILENAME); var exists = yield (_fs || _load_fs()).exists(cleanLoc); return exists; }); return function checkForCleanFile(_x7) { - return _ref9.apply(this, arguments); + return _ref11.apply(this, arguments); }; }(); var run = exports.run = function () { - var _ref10 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var _ref12 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { var cleanFileExists = yield checkForCleanFile(config.cwd); if (flags.init && cleanFileExists) { @@ -59964,7 +59472,7 @@ var run = exports.run = function () { }); return function run(_x8, _x9, _x10, _x11) { - return _ref10.apply(this, arguments); + return _ref12.apply(this, arguments); }; }(); @@ -59974,32 +59482,33 @@ exports.hasWrapper = hasWrapper; var _index; function _load_index() { - return _index = __webpack_require__(40); + return _index = __webpack_require__(59); } var _filter; function _load_filter() { - return _filter = __webpack_require__(249); + return _filter = __webpack_require__(311); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); +var invariant = __webpack_require__(13); +var path = __webpack_require__(2); var requireLockfile = exports.requireLockfile = true; var noArguments = exports.noArguments = true; @@ -60064,7 +59573,286 @@ function hasWrapper(commander) { } /***/ }), -/* 230 */ +/* 289 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.examples = exports.run = exports.getCachedPackagesDirs = undefined; + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var getCachedPackagesDirs = exports.getCachedPackagesDirs = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, currentPath) { + var results = []; + var stat = yield (_fs || _load_fs()).lstat(currentPath); + + if (!stat.isDirectory()) { + return results; + } + + var folders = yield (_fs || _load_fs()).readdir(currentPath); + for (var _iterator = folders, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var folder = _ref2; + + if (folder[0] === '.') { + continue; + } + var packageParentPath = path.join(currentPath, folder, 'node_modules'); + + var candidates = yield (_fs || _load_fs()).readdir(packageParentPath); + invariant(candidates.length === 1, `There should only be one folder in a package cache (got ${candidates.join(',')})`); + + for (var _iterator2 = candidates, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref3; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref3 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref3 = _i2.value; + } + + var candidate = _ref3; + + var candidatePath = path.join(packageParentPath, candidate); + if (candidate.charAt(0) === '@') { + var subCandidates = yield (_fs || _load_fs()).readdir(candidatePath); + invariant(subCandidates.length === 1, `There should only be one folder in a package cache (got ${subCandidates.join(',')})`); + + for (var _iterator3 = subCandidates, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + var subCandidate = _ref4; + + var subCandidatePath = path.join(candidatePath, subCandidate); + results.push(subCandidatePath); + } + } else { + results.push(candidatePath); + } + } + } + + return results; + }); + + return function getCachedPackagesDirs(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); + +var getCachedPackages = function () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + var paths = yield getCachedPackagesDirs(config, config.cacheFolder); + return _getMetadataWithPath(config.readPackageMetadata.bind(config), paths).then(function (packages) { + return packages.filter(function (p) { + return !!p; + }); + }); + }); + + return function getCachedPackages(_x3) { + return _ref5.apply(this, arguments); + }; +}(); + +var list = function () { + var _ref6 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var filterOut = function filterOut() { + var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + registry = _ref7.registry, + manifest = _ref7.package, + remote = _ref7.remote; + + if (flags.pattern && !micromatch.contains(manifest.name, flags.pattern)) { + return false; + } + return true; + }; + + var forReport = function forReport() { + var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + registry = _ref8.registry, + manifest = _ref8.package, + remote = _ref8.remote; + + return [manifest.name, manifest.version, registry, remote && remote.resolved || '']; + }; + + var packages = yield getCachedPackages(config); + var body = packages.filter(filterOut).map(forReport); + reporter.table(['Name', 'Version', 'Registry', 'Resolved'], body); + }); + + return function list(_x4, _x5, _x6, _x7) { + return _ref6.apply(this, arguments); + }; +}(); + +var clean = function () { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (config.cacheFolder) { + var activity = reporter.activity(); + + if (args.length > 0) { + // Clear named packages from cache + var packages = yield getCachedPackages(config); + var shouldDelete = function shouldDelete() { + var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + registry = _ref10.registry, + manifest = _ref10.package, + remote = _ref10.remote; + + return args.indexOf(manifest.name) !== -1; + }; + var packagesToDelete = packages.filter(shouldDelete); + + for (var _iterator4 = packagesToDelete, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref11; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref11 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref11 = _i4.value; + } + + var manifest = _ref11; + + var relativePath = path.relative(config.cacheFolder, manifest._path); + while (relativePath && relativePath !== '.') { + yield (_fs || _load_fs()).unlink(path.resolve(config.cacheFolder, relativePath)); + relativePath = path.dirname(relativePath); + } + } + + activity.end(); + reporter.success(reporter.lang('clearedPackageFromCache', args[0])); + } else { + // Clear all cache + yield (_fs || _load_fs()).unlink(config._cacheRootFolder); + yield (_fs || _load_fs()).mkdirp(config.cacheFolder); + activity.end(); + reporter.success(reporter.lang('clearedCache')); + } + } + }); + + return function clean(_x10, _x11, _x12, _x13) { + return _ref9.apply(this, arguments); + }; +}(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _buildSubCommands2; + +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var invariant = __webpack_require__(13); +var path = __webpack_require__(2); +var micromatch = __webpack_require__(102); + +function hasWrapper(flags, args) { + return args[0] !== 'dir'; +} + +function _getMetadataWithPath(getMetadataFn, paths) { + return (_promise || _load_promise()).default.all(paths.map(function (path) { + return getMetadataFn(path).then(function (r) { + r._path = path; + return r; + }).catch(function (error) { + return undefined; + }); + })); +} + +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('cache', { + ls(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + reporter.warn(`\`yarn cache ls\` is deprecated. Please use \`yarn cache list\`.`); + yield list(config, reporter, flags, args); + })(); + }, + list, + clean, + dir(config, reporter) { + reporter.log(config.cacheFolder, { force: true }); + } +}), + run = _buildSubCommands.run, + _setFlags = _buildSubCommands.setFlags, + examples = _buildSubCommands.examples; + +exports.run = run; +exports.examples = examples; +function setFlags(commander) { + _setFlags(commander); + commander.description('Yarn cache list will print out every cached package.'); + commander.option('--pattern [pattern]', 'filter cached packages by pattern'); +} + +/***/ }), +/* 290 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60078,19 +59866,19 @@ exports.run = exports.verifyTreeCheck = exports.noArguments = exports.requireLoc var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _asyncToGenerator2; @@ -60158,6 +59946,11 @@ var verifyTreeCheck = exports.verifyTreeCheck = function () { continue; } locationsVisited.add(manifestLoc + `@${dep.version}`); + // When plugnplay is enabled, packages aren't copied to the node_modules folder, so this check doesn't make sense + // TODO: We ideally should check that the packages are located inside the cache instead + if (config.plugnplayEnabled) { + continue; + } if (!(yield (_fs || _load_fs()).exists(manifestLoc))) { reportError('packageNotInstalled', `${dep.originalKey}`); continue; @@ -60290,7 +60083,6 @@ var run = exports.run = function () { return; } - var mainPackageJson = yield config.readJson(path.join(config.cwd, 'package.json')); var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.cwd); var install = new (_install || _load_install()).Install(flags, config, reporter, lockfile); @@ -60351,7 +60143,7 @@ var run = exports.run = function () { var bundledDeps = {}; // check if any of the node_modules are out of sync - var res = yield install.linker.getFlatHoistedTree(patterns); + var res = yield install.linker.getFlatHoistedTree(patterns, workspaceLayout); for (var _iterator3 = res, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { var _ref9; @@ -60469,9 +60261,12 @@ var run = exports.run = function () { var foundHuman = `${humaniseLocation(path.dirname(depPkgLoc)).join('#')}@${depPkg.version}`; if (!semver.satisfies(depPkg.version, range, config.looseSemver)) { // module isn't correct semver - var resRange = mainPackageJson.resolutions && mainPackageJson.resolutions[_name3]; - if (resRange) { - var resHuman = `${human}#${_name3}@${resRange}`; + var resPattern = install.resolutionMap.find(_name3, _originalKey.split('#')); + if (resPattern) { + var resHuman = `${human}#${resPattern}`; + + var _normalizePattern = (0, (_normalizePattern2 || _load_normalizePattern()).normalizePattern)(resPattern), + resRange = _normalizePattern.range; if (semver.satisfies(depPkg.version, resRange, config.looseSemver)) { reporter.warn(reporter.lang('incompatibleResolutionVersion', foundHuman, subHuman)); @@ -60546,46 +60341,51 @@ exports.setFlags = setFlags; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _integrityChecker; function _load_integrityChecker() { - return _integrityChecker = _interopRequireDefault(__webpack_require__(150)); + return _integrityChecker = _interopRequireDefault(__webpack_require__(190)); } var _integrityChecker2; function _load_integrityChecker2() { - return _integrityChecker2 = __webpack_require__(150); + return _integrityChecker2 = __webpack_require__(190); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); +} + +var _normalizePattern2; + +function _load_normalizePattern() { + return _normalizePattern2 = __webpack_require__(51); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var semver = __webpack_require__(20); - -var path = __webpack_require__(0); +var semver = __webpack_require__(26); +var path = __webpack_require__(2); var requireLockfile = exports.requireLockfile = false; var noArguments = exports.noArguments = true; @@ -60601,7 +60401,7 @@ function setFlags(commander) { } /***/ }), -/* 231 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60615,7 +60415,7 @@ exports.run = exports.getRegistryFolder = undefined; var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _asyncToGenerator2; @@ -60729,34 +60529,29 @@ exports.setFlags = setFlags; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _promise; - -function _load_promise() { - return _promise = _interopRequireWildcard(__webpack_require__(66)); + return _errors = __webpack_require__(7); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _global; function _load_global() { - return _global = __webpack_require__(85); + return _global = __webpack_require__(111); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); -var cmdShim = (_promise || _load_promise()).promisify(__webpack_require__(259)); -var path = __webpack_require__(0); +var invariant = __webpack_require__(13); + +var cmdShim = __webpack_require__(183); +var path = __webpack_require__(2); function hasWrapper(commander, args) { return true; @@ -60767,7 +60562,7 @@ function setFlags(commander) { } /***/ }), -/* 232 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -60781,13 +60576,13 @@ exports.run = exports.buildTree = exports.requireLockfile = undefined; var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _asyncToGenerator2; @@ -60799,7 +60594,7 @@ function _load_asyncToGenerator() { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var buildTree = exports.buildTree = function () { @@ -61025,7 +60820,7 @@ var run = exports.run = function () { }); } - reporter.tree('list', trees); + reporter.tree('list', trees, { force: true }); }); return function run(_x8, _x9, _x10, _x11) { @@ -61043,20 +60838,20 @@ exports.getDevDeps = getDevDeps; var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); -var micromatch = __webpack_require__(80); +var micromatch = __webpack_require__(102); var requireLockfile = exports.requireLockfile = true; @@ -61139,7 +60934,7 @@ function getDevDeps(manifest) { } /***/ }), -/* 233 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61153,19 +60948,19 @@ exports.run = exports.requireLockfile = undefined; var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _asyncToGenerator2; @@ -61292,7 +61087,7 @@ var run = exports.run = function () { } // reinstall so we can get the updated lockfile - reporter.step(++step, totalSteps, reporter.lang('uninstallRegenerate'), emoji.get('page_with_curl')); + reporter.step(++step, totalSteps, reporter.lang('uninstallRegenerate'), emoji.get('hammer')); var installFlags = (0, (_extends2 || _load_extends()).default)({ force: true, workspaceRootIsCwd: true }, flags); var reinstall = new (_install || _load_install()).Install(installFlags, config, new (_index2 || _load_index2()).NoopReporter(), lockfile); yield reinstall.init(); @@ -61312,52 +61107,52 @@ exports.hasWrapper = hasWrapper; var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _index; function _load_index() { - return _index = __webpack_require__(40); + return _index = __webpack_require__(59); } var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _index2; function _load_index2() { - return _index2 = __webpack_require__(146); + return _index2 = __webpack_require__(182); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _constants; function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); + return _constants = _interopRequireWildcard(__webpack_require__(14)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); +var path = __webpack_require__(2); -var emoji = __webpack_require__(197); +var emoji = __webpack_require__(235); var requireLockfile = exports.requireLockfile = true; @@ -61372,7 +61167,444 @@ function hasWrapper(commander, args) { } /***/ }), -/* 234 */ +/* 294 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.run = exports.getBinEntries = undefined; + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _from; + +function _load_from() { + return _from = _interopRequireDefault(__webpack_require__(52)); +} + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(41)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _create; + +function _load_create() { + return _create = _interopRequireDefault(__webpack_require__(205)); +} + +var getBinEntries = exports.getBinEntries = function () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + var binFolders = new (_set || _load_set()).default(); + var binEntries = new (_map || _load_map()).default(); + + // Setup the node_modules/.bin folders for analysis + for (var _iterator2 = (0, (_keys || _load_keys()).default)((_index || _load_index()).registries), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref4; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref4 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref4 = _i2.value; + } + + var registry = _ref4; + + binFolders.add(path.join(config.cwd, config.registries[registry].folder, '.bin')); + } + + // Same thing, but for the pnp dependencies, located inside the cache + if (yield (_fs || _load_fs()).exists(`${config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`)) { + var pnpApi = (0, (_dynamicRequire || _load_dynamicRequire()).dynamicRequire)(`${config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`); + + var packageLocator = pnpApi.findPackageLocator(`${config.cwd}/`); + var packageInformation = pnpApi.getPackageInformation(packageLocator); + + for (var _iterator3 = packageInformation.packageDependencies.entries(), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref6; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref6 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref6 = _i3.value; + } + + var _ref5 = _ref6; + var name = _ref5[0]; + var reference = _ref5[1]; + + var dependencyInformation = pnpApi.getPackageInformation({ name, reference }); + + if (dependencyInformation.packageLocation) { + binFolders.add(`${dependencyInformation.packageLocation}/.bin`); + } + } + } + + // Build up a list of possible scripts by exploring the folders marked for analysis + for (var _iterator4 = binFolders, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref7; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref7 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref7 = _i4.value; + } + + var binFolder = _ref7; + + if (yield (_fs || _load_fs()).exists(binFolder)) { + for (var _iterator5 = yield (_fs || _load_fs()).readdir(binFolder), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator5);;) { + var _ref8; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref8 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref8 = _i5.value; + } + + var _name = _ref8; + + binEntries.set(_name, path.join(binFolder, _name)); + } + } + } + + return binEntries; + }); + + return function getBinEntries(_x) { + return _ref3.apply(this, arguments); + }; +}(); + +var run = exports.run = function () { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var runCommand = function () { + var _ref13 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (args) { + var action = args.shift(); + + // build up list of commands + var cmds = []; + + if (pkgScripts && action in pkgScripts) { + var preAction = `pre${action}`; + if (preAction in pkgScripts) { + cmds.push([preAction, pkgScripts[preAction]]); + } + + var script = scripts.get(action); + invariant(script, 'Script must exist'); + cmds.push([action, script]); + + var postAction = `post${action}`; + if (postAction in pkgScripts) { + cmds.push([postAction, pkgScripts[postAction]]); + } + } else if (scripts.has(action)) { + var _script = scripts.get(action); + invariant(_script, 'Script must exist'); + cmds.push([action, _script]); + } + + if (cmds.length) { + // Disable wrapper in executed commands + process.env.YARN_WRAP_OUTPUT = 'false'; + for (var _iterator8 = cmds, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator8);;) { + var _ref15; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref15 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref15 = _i8.value; + } + + var _ref14 = _ref15; + var stage = _ref14[0]; + var cmd = _ref14[1]; + + // only tack on trailing arguments for default script, ignore for pre and post - #1595 + var cmdWithArgs = stage === action ? sh`${unquoted(cmd)} ${args}` : cmd; + var customShell = config.getOption('script-shell'); + yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).execCommand)({ + stage, + config, + cmd: cmdWithArgs, + cwd: flags.into || config.cwd, + isInteractive: true, + customShell: customShell ? String(customShell) : undefined + }); + } + } else if (action === 'env') { + reporter.log((0, (_stringify || _load_stringify()).default)((yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).makeEnv)('env', config.cwd, config)), null, 2), { force: true }); + } else { + var suggestion = void 0; + + for (var commandName in scripts) { + var steps = leven(commandName, action); + if (steps < 2) { + suggestion = commandName; + } + } + + var msg = `Command ${(0, (_stringify || _load_stringify()).default)(action)} not found.`; + if (suggestion) { + msg += ` Did you mean ${(0, (_stringify || _load_stringify()).default)(suggestion)}?`; + } + throw new (_errors || _load_errors()).MessageError(msg); + } + }); + + return function runCommand(_x6) { + return _ref13.apply(this, arguments); + }; + }(); + + // list possible scripts if none specified + + + var pkg = yield config.readManifest(config.cwd); + + var binCommands = new (_set || _load_set()).default(); + var pkgCommands = new (_set || _load_set()).default(); + + var scripts = new (_map || _load_map()).default(); + + for (var _iterator6 = yield getBinEntries(config), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator6);;) { + var _ref11; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref11 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref11 = _i6.value; + } + + var _ref10 = _ref11; + var name = _ref10[0]; + var loc = _ref10[1]; + + scripts.set(name, quoteForShell(loc)); + binCommands.add(name); + } + + var pkgScripts = pkg.scripts; + + if (pkgScripts) { + for (var _iterator7 = (0, (_keys || _load_keys()).default)(pkgScripts).sort(), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator7);;) { + var _ref12; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref12 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref12 = _i7.value; + } + + var _name2 = _ref12; + + scripts.set(_name2, pkgScripts[_name2] || ''); + pkgCommands.add(_name2); + } + } + + if (args.length === 0) { + if (binCommands.size > 0) { + reporter.info(`${reporter.lang('binCommands') + (0, (_from || _load_from()).default)(binCommands).join(', ')}`); + } else { + reporter.error(reporter.lang('noBinAvailable')); + } + + var printedCommands = new (_map || _load_map()).default(); + + for (var _iterator9 = pkgCommands, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator9);;) { + var _ref16; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref16 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref16 = _i9.value; + } + + var pkgCommand = _ref16; + + var action = scripts.get(pkgCommand); + invariant(action, 'Action must exists'); + printedCommands.set(pkgCommand, action); + } + + if (pkgCommands.size > 0) { + reporter.info(`${reporter.lang('possibleCommands')}`); + reporter.list('possibleCommands', (0, (_from || _load_from()).default)(pkgCommands), toObject(printedCommands)); + if (!flags.nonInteractive) { + yield reporter.question(reporter.lang('commandQuestion')).then(function (answer) { + return runCommand(answer.trim().split(' ')); + }, function () { + return reporter.error(reporter.lang('commandNotSpecified')); + }); + } + } else { + reporter.error(reporter.lang('noScriptsAvailable')); + } + return (_promise || _load_promise()).default.resolve(); + } else { + return runCommand(args); + } + }); + + return function run(_x2, _x3, _x4, _x5) { + return _ref9.apply(this, arguments); + }; +}(); + +exports.setFlags = setFlags; +exports.hasWrapper = hasWrapper; + +var _executeLifecycleScript; + +function _load_executeLifecycleScript() { + return _executeLifecycleScript = __webpack_require__(115); +} + +var _dynamicRequire; + +function _load_dynamicRequire() { + return _dynamicRequire = __webpack_require__(310); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _index; + +function _load_index() { + return _index = __webpack_require__(62); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _constants; + +function _load_constants() { + return _constants = _interopRequireWildcard(__webpack_require__(14)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var invariant = __webpack_require__(13); +var leven = __webpack_require__(786); +var path = __webpack_require__(2); + +var _require = __webpack_require__(820), + quoteForShell = _require.quoteForShell, + sh = _require.sh, + unquoted = _require.unquoted; + +function toObject(input) { + var output = (0, (_create || _load_create()).default)(null); + + for (var _iterator = input.entries(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref2; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref2 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref2 = _i.value; + } + + var _ref = _ref2; + var key = _ref[0]; + var val = _ref[1]; + + output[key] = val; + } + + return output; +} + +function setFlags(commander) { + commander.description('Runs a defined package script.'); +} + +function hasWrapper(commander, args) { + return true; +} + +/***/ }), +/* 295 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61481,37 +61713,37 @@ exports.setFlags = setFlags; var _buildSubCommands2; function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); } var _login; function _load_login() { - return _login = __webpack_require__(86); + return _login = __webpack_require__(94); } var _npmRegistry; function _load_npmRegistry() { - return _npmRegistry = _interopRequireDefault(__webpack_require__(54)); + return _npmRegistry = _interopRequireDefault(__webpack_require__(83)); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _normalizePattern2; function _load_normalizePattern() { - return _normalizePattern2 = __webpack_require__(42); + return _normalizePattern2 = __webpack_require__(51); } var _validate; function _load_validate() { - return _validate = __webpack_require__(92); + return _validate = __webpack_require__(116); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -61602,7 +61834,7 @@ exports.hasWrapper = hasWrapper; exports.examples = examples; /***/ }), -/* 235 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61616,25 +61848,25 @@ exports.run = exports.requireLockfile = undefined; var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _asyncToGenerator2; @@ -61655,6 +61887,10 @@ var run = exports.run = function () { return; } + // Fail early with runtime compatibility checks so that it doesn't fail after you've made your selections + var install = new (_install2 || _load_install()).Install(flags, config, reporter, lockfile); + yield install.checkCompatibility(); + var usesWorkspaces = !!config.workspaceRootFolder; var maxLengthArr = { @@ -61793,9 +62029,9 @@ var run = exports.run = function () { flags.workspaceRootIsCwd = false; var _deps = answers.filter(isHint(hint)); if (_deps.length) { - var install = new (_install || _load_install()).Install(flags, config, reporter, lockfile); + var _install = new (_install2 || _load_install()).Install(flags, config, reporter, lockfile); - var _ref4 = yield install.fetchRequestFromCwd(), + var _ref4 = yield _install.fetchRequestFromCwd(), packagePatterns = _ref4.requests; var depsByWorkspace = _deps.reduce(function (acc, dep) { @@ -61848,48 +62084,48 @@ exports.hasWrapper = hasWrapper; var _inquirer; function _load_inquirer() { - return _inquirer = _interopRequireDefault(__webpack_require__(189)); + return _inquirer = _interopRequireDefault(__webpack_require__(188)); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _add; function _load_add() { - return _add = __webpack_require__(109); + return _add = __webpack_require__(149); } var _upgrade; function _load_upgrade() { - return _upgrade = __webpack_require__(149); + return _upgrade = __webpack_require__(189); } var _colorForVersions; function _load_colorForVersions() { - return _colorForVersions = _interopRequireDefault(__webpack_require__(247)); + return _colorForVersions = _interopRequireDefault(__webpack_require__(308)); } var _colorizeDiff; function _load_colorizeDiff() { - return _colorizeDiff = _interopRequireDefault(__webpack_require__(248)); + return _colorizeDiff = _interopRequireDefault(__webpack_require__(309)); } -var _install; +var _install2; function _load_install() { - return _install = __webpack_require__(34); + return _install2 = __webpack_require__(40); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); +var path = __webpack_require__(2); var requireLockfile = exports.requireLockfile = true; @@ -61908,7 +62144,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 236 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -61922,19 +62158,19 @@ exports.run = exports.setVersion = undefined; var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _asyncToGenerator2; @@ -62000,7 +62236,9 @@ var setVersion = exports.setVersion = function () { while (!newVersion) { // make sure we're not running in non-interactive mode before asking for new version if (flags.nonInteractive || config.nonInteractive) { - throw new (_errors || _load_errors()).MessageError(reporter.lang('nonInteractiveNoVersionSpecified')); + // if no version is specified, use current version in package.json + newVersion = oldVersion; + break; } newVersion = yield reporter.question(reporter.lang('newVersion')); @@ -62129,46 +62367,46 @@ exports.hasWrapper = hasWrapper; var _index; function _load_index() { - return _index = __webpack_require__(40); + return _index = __webpack_require__(59); } var _executeLifecycleScript; function _load_executeLifecycleScript() { - return _executeLifecycleScript = __webpack_require__(91); + return _executeLifecycleScript = __webpack_require__(115); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _gitSpawn; function _load_gitSpawn() { - return _gitSpawn = __webpack_require__(250); + return _gitSpawn = __webpack_require__(312); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); -var semver = __webpack_require__(20); -var path = __webpack_require__(0); +var invariant = __webpack_require__(13); +var semver = __webpack_require__(26); +var path = __webpack_require__(2); var NEW_VERSION_FLAG = '--new-version [version]'; function isValidNewVersion(oldVersion, newVersion, looseSemver) { @@ -62191,7 +62429,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 237 */ +/* 298 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62202,10 +62440,46 @@ Object.defineProperty(exports, "__esModule", { }); exports.LocalTarballFetcher = undefined; +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _from; + +function _load_from() { + return _from = _interopRequireDefault(__webpack_require__(52)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _keys; + +function _load_keys() { + return _keys = _interopRequireDefault(__webpack_require__(15)); +} + +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _assign; + +function _load_assign() { + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _asyncToGenerator2; @@ -62217,84 +62491,106 @@ function _load_asyncToGenerator() { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); -} - -var _http; - -function _load_http() { - return _http = _interopRequireDefault(__webpack_require__(52)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _constants; function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); -} - -var _crypto; - -function _load_crypto() { - return _crypto = _interopRequireWildcard(__webpack_require__(90)); + return _constants = _interopRequireWildcard(__webpack_require__(14)); } var _baseFetcher; function _load_baseFetcher() { - return _baseFetcher = _interopRequireDefault(__webpack_require__(111)); + return _baseFetcher = _interopRequireDefault(__webpack_require__(151)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); +} + +var _normalizeUrl; + +function _load_normalizeUrl() { + return _normalizeUrl = _interopRequireDefault(__webpack_require__(365)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); - -var tarFs = __webpack_require__(140); -var url = __webpack_require__(19); -var fs = __webpack_require__(10); -var stream = __webpack_require__(29); -var gunzip = __webpack_require__(571); -var invariant = __webpack_require__(9); +var crypto = __webpack_require__(21); +var path = __webpack_require__(2); +var tarFs = __webpack_require__(177); +var url = __webpack_require__(29); +var fs = __webpack_require__(12); +var stream = __webpack_require__(34); +var gunzip = __webpack_require__(702); +var invariant = __webpack_require__(13); +var ssri = __webpack_require__(107); var RE_URL_NAME_MATCH = /\/(?:(@[^/]+)\/)?[^/]+\/-\/(?:@[^/]+\/)?([^/]+)$/; +var isHashAlgorithmSupported = function isHashAlgorithmSupported(name) { + var cachedResult = isHashAlgorithmSupported.__cache[name]; + if (cachedResult != null) { + return cachedResult; + } + var supported = true; + try { + crypto.createHash(name); + } catch (error) { + if (error.message !== 'Digest method not supported') { + throw error; + } + supported = false; + } + + isHashAlgorithmSupported.__cache[name] = supported; + return supported; +}; +isHashAlgorithmSupported.__cache = {}; + var TarballFetcher = function (_BaseFetcher) { (0, (_inherits2 || _load_inherits()).default)(TarballFetcher, _BaseFetcher); function TarballFetcher() { + var _temp, _this, _ret; + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, TarballFetcher); - return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _BaseFetcher.apply(this, arguments)); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _BaseFetcher.call.apply(_BaseFetcher, [this].concat(args))), _this), _this.validateError = null, _this.validateIntegrity = null, _temp), (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(_this, _ret); } TarballFetcher.prototype.setupMirrorFromCache = function () { @@ -62351,64 +62647,113 @@ var TarballFetcher = function (_BaseFetcher) { TarballFetcher.prototype.createExtractor = function createExtractor(resolve, reject, tarballPath) { var _this2 = this; - var validateStream = new (_crypto || _load_crypto()).HashStream(); - var extractorStream = gunzip(); + var integrityInfo = this._supportedIntegrity(); + + var now = new Date(); + + var fs = __webpack_require__(12); + var patchedFs = (0, (_assign || _load_assign()).default)({}, fs, { + utimes: function utimes(path, atime, mtime, cb) { + fs.stat(path, function (err, stat) { + if (err) { + cb(err); + return; + } + if (stat.isDirectory()) { + fs.utimes(path, atime, mtime, cb); + return; + } + fs.open(path, 'a', function (err, fd) { + if (err) { + cb(err); + return; + } + fs.futimes(fd, atime, mtime, function (err) { + if (err) { + fs.close(fd, function () { + return cb(err); + }); + } else { + fs.close(fd, function (err) { + return cb(err); + }); + } + }); + }); + }); + } + }); + + var validateStream = new ssri.integrityStream(integrityInfo); var untarStream = tarFs.extract(this.dest, { strip: 1, dmode: 0o755, // all dirs should be readable fmode: 0o644, // all files should be readable - chown: false // don't chown. just leave as it is + chown: false, // don't chown. just leave as it is + map: function map(header) { + header.mtime = now; + return header; + }, + fs: patchedFs + }); + var extractorStream = gunzip(); + + validateStream.once('error', function (err) { + _this2.validateError = err; + }); + validateStream.once('integrity', function (sri) { + _this2.validateIntegrity = sri; }); - extractorStream.pipe(untarStream).on('error', function (error) { - error.message = `${error.message}${tarballPath ? ` (${tarballPath})` : ''}`; - reject(error); - }).on('finish', (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - var expectHash = _this2.hash; - var actualHash = validateStream.getHash(); + untarStream.on('error', function (err) { + reject(new (_errors || _load_errors()).MessageError(_this2.config.reporter.lang('errorExtractingTarball', err.message, tarballPath))); + }); - if (!expectHash || expectHash === actualHash) { - resolve({ - hash: actualHash - }); - } else if (_this2.config.updateChecksums) { - // checksums differ and should be updated - // update hash, destination and cached package - var destUpdatedHash = _this2.dest.replace(_this2.hash || '', actualHash); - yield (_fs || _load_fs()).unlink(destUpdatedHash); - yield (_fs || _load_fs()).rename(_this2.dest, destUpdatedHash); - _this2.dest = _this2.dest.replace(_this2.hash || '', actualHash); - _this2.hash = actualHash; - resolve({ - hash: actualHash - }); - } else { - reject(new (_errors || _load_errors()).SecurityError(_this2.config.reporter.lang('fetchBadHashWithPath', _this2.packageName, _this2.remote.reference, actualHash, expectHash))); + extractorStream.pipe(untarStream).on('finish', function () { + var error = _this2.validateError; + var hexDigest = _this2.validateIntegrity ? _this2.validateIntegrity.hexDigest() : ''; + if (_this2.config.updateChecksums && _this2.remote.integrity && _this2.validateIntegrity && _this2.remote.integrity !== _this2.validateIntegrity.toString()) { + _this2.remote.integrity = _this2.validateIntegrity.toString(); } - })); + + if (integrityInfo.algorithms.length === 0) { + return reject(new (_errors || _load_errors()).SecurityError(_this2.config.reporter.lang('fetchBadIntegrityAlgorithm', _this2.packageName, _this2.remote.reference))); + } + + if (error) { + if (_this2.config.updateChecksums) { + _this2.remote.integrity = error.found.toString(); + } else { + return reject(new (_errors || _load_errors()).SecurityError(_this2.config.reporter.lang('fetchBadHashWithPath', _this2.packageName, _this2.remote.reference, error.found.toString(), error.expected.toString()))); + } + } + + return resolve({ + hash: _this2.hash || hexDigest + }); + }); return { validateStream, extractorStream }; }; - TarballFetcher.prototype.getLocalPaths = function* getLocalPaths(override) { - if (override) { - yield path.resolve(this.config.cwd, override); - } - yield this.getTarballMirrorPath(); - yield this.getTarballCachePath(); + TarballFetcher.prototype.getLocalPaths = function getLocalPaths(override) { + var paths = [override ? path.resolve(this.config.cwd, override) : null, this.getTarballMirrorPath(), this.getTarballCachePath()]; + // $FlowFixMe: https://github.com/facebook/flow/issues/1414 + return paths.filter(function (path) { + return path != null; + }); }; TarballFetcher.prototype.fetchFromLocal = function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (override) { + var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (override) { var _this3 = this; - var _ref4 = yield (_fs || _load_fs()).readFirstAvailableStream(this.getLocalPaths(override)), - stream = _ref4.stream, - triedPaths = _ref4.triedPaths; + var tarPaths = this.getLocalPaths(override); + var stream = yield (_fs || _load_fs()).readFirstAvailableStream(tarPaths); return new (_promise || _load_promise()).default(function (resolve, reject) { if (!stream) { - reject(new (_errors || _load_errors()).MessageError(_this3.reporter.lang('tarballNotInNetworkOrCache', _this3.reference, triedPaths))); + reject(new (_errors || _load_errors()).MessageError(_this3.reporter.lang('tarballNotInNetworkOrCache', _this3.reference, tarPaths))); return; } invariant(stream, 'stream should be available at this point'); @@ -62426,88 +62771,88 @@ var TarballFetcher = function (_BaseFetcher) { }); function fetchFromLocal(_x) { - return _ref3.apply(this, arguments); + return _ref2.apply(this, arguments); } return fetchFromLocal; }(); TarballFetcher.prototype.fetchFromExternal = function () { - var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { var _this4 = this; var registry = this.config.registries[this.registry]; - var retriesRemaining = 2; - do { - try { - return yield registry.request(this.reference, { - headers: { - 'Accept-Encoding': 'gzip' - }, - buffer: true, - process: function process(req, resolve, reject) { - // should we save this to the offline cache? - var reporter = _this4.config.reporter; + try { + var headers = this.requestHeaders(); + return yield registry.request(this.reference, { + headers: (0, (_extends2 || _load_extends()).default)({ + 'Accept-Encoding': 'gzip' + }, headers), + buffer: true, + process: function process(req, resolve, reject) { + // should we save this to the offline cache? + var tarballMirrorPath = _this4.getTarballMirrorPath(); + var tarballCachePath = _this4.getTarballCachePath(); - var tarballMirrorPath = _this4.getTarballMirrorPath(); - var tarballCachePath = _this4.getTarballCachePath(); + var _createExtractor2 = _this4.createExtractor(resolve, reject), + validateStream = _createExtractor2.validateStream, + extractorStream = _createExtractor2.extractorStream; - var _createExtractor2 = _this4.createExtractor(resolve, reject), - validateStream = _createExtractor2.validateStream, - extractorStream = _createExtractor2.extractorStream; + req.pipe(validateStream); - req.on('response', function (res) { - if (res.statusCode >= 400) { - var statusDescription = (_http || _load_http()).default.STATUS_CODES[res.statusCode]; - reject(new (_errors || _load_errors()).ResponseError(reporter.lang('requestFailed', `${res.statusCode} ${statusDescription}`), res.statusCode)); - } - }); - req.pipe(validateStream); - - if (tarballMirrorPath) { - validateStream.pipe(fs.createWriteStream(tarballMirrorPath)).on('error', reject); - } - - if (tarballCachePath) { - validateStream.pipe(fs.createWriteStream(tarballCachePath)).on('error', reject); - } - - validateStream.pipe(extractorStream).on('error', reject); - } - }, this.packageName); - } catch (err) { - if (err instanceof (_errors || _load_errors()).ResponseError && err.responseCode >= 500 && retriesRemaining > 1) { - retriesRemaining--; - this.reporter.warn(this.reporter.lang('retryOnInternalServerError')); - yield (0, (_misc || _load_misc()).sleep)(3000); - } else { - var tarballMirrorPath = this.getTarballMirrorPath(); - var tarballCachePath = this.getTarballCachePath(); - - if (tarballMirrorPath && (yield (_fs || _load_fs()).exists(tarballMirrorPath))) { - yield (_fs || _load_fs()).unlink(tarballMirrorPath); + if (tarballMirrorPath) { + validateStream.pipe(fs.createWriteStream(tarballMirrorPath)).on('error', reject); } - if (tarballCachePath && (yield (_fs || _load_fs()).exists(tarballCachePath))) { - yield (_fs || _load_fs()).unlink(tarballCachePath); + if (tarballCachePath) { + validateStream.pipe(fs.createWriteStream(tarballCachePath)).on('error', reject); } - throw err; + validateStream.pipe(extractorStream).on('error', reject); } + }, this.packageName); + } catch (err) { + var tarballMirrorPath = this.getTarballMirrorPath(); + var tarballCachePath = this.getTarballCachePath(); + + if (tarballMirrorPath && (yield (_fs || _load_fs()).exists(tarballMirrorPath))) { + yield (_fs || _load_fs()).unlink(tarballMirrorPath); } - } while (retriesRemaining > 0); - // Unreachable code, this is just to make Flow happy - throw new Error('Ran out of retries!'); + + if (tarballCachePath && (yield (_fs || _load_fs()).exists(tarballCachePath))) { + yield (_fs || _load_fs()).unlink(tarballCachePath); + } + + throw err; + } }); function fetchFromExternal() { - return _ref5.apply(this, arguments); + return _ref3.apply(this, arguments); } return fetchFromExternal; }(); + TarballFetcher.prototype.requestHeaders = function requestHeaders() { + var registry = this.config.registries.yarn; + var config = registry.config; + var requestParts = urlParts(this.reference); + return (0, (_keys || _load_keys()).default)(config).reduce(function (headers, option) { + var parts = option.split(':'); + if (parts.length === 3 && parts[1] === '_header') { + var registryParts = urlParts(parts[0]); + if (requestParts.host === registryParts.host && requestParts.path.startsWith(registryParts.path)) { + var headerName = parts[2]; + var headerValue = config[option]; + headers[headerName] = headerValue; + } + } + return headers; + }, {}); + }; + TarballFetcher.prototype._fetch = function _fetch() { var _this5 = this; @@ -62527,6 +62872,52 @@ var TarballFetcher = function (_BaseFetcher) { }); }; + TarballFetcher.prototype._findIntegrity = function _findIntegrity() { + if (this.remote.integrity) { + return ssri.parse(this.remote.integrity); + } + if (this.hash) { + return ssri.fromHex(this.hash, 'sha1'); + } + return null; + }; + + TarballFetcher.prototype._supportedIntegrity = function _supportedIntegrity() { + var expectedIntegrity = this._findIntegrity() || {}; + var expectedIntegrityAlgorithms = (0, (_keys || _load_keys()).default)(expectedIntegrity); + var shouldValidateIntegrity = (this.hash || this.remote.integrity) && !this.config.updateChecksums; + + if (expectedIntegrityAlgorithms.length === 0 && !shouldValidateIntegrity) { + var _algorithms = this.config.updateChecksums ? ['sha512'] : ['sha1']; + // for consistency, return sha1 for packages without a remote integrity (eg. github) + return { integrity: null, algorithms: _algorithms }; + } + + var algorithms = new (_set || _load_set()).default(); + var integrity = {}; + for (var _iterator = expectedIntegrityAlgorithms, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref4; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref4 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref4 = _i.value; + } + + var algorithm = _ref4; + + if (isHashAlgorithmSupported(algorithm)) { + algorithms.add(algorithm); + integrity[algorithm] = expectedIntegrity[algorithm]; + } + } + + return { integrity, algorithms: (0, (_from || _load_from()).default)(algorithms) }; + }; + return TarballFetcher; }((_baseFetcher || _load_baseFetcher()).default); @@ -62547,8 +62938,16 @@ var LocalTarballFetcher = exports.LocalTarballFetcher = function (_TarballFetche return LocalTarballFetcher; }(TarballFetcher); +function urlParts(requestUrl) { + var normalizedUrl = (0, (_normalizeUrl || _load_normalizeUrl()).default)(requestUrl); + var parsed = url.parse(normalizedUrl); + var host = parsed.host || ''; + var path = parsed.path || ''; + return { host, path }; +} + /***/ }), -/* 238 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -62561,19 +62960,19 @@ Object.defineProperty(exports, "__esModule", { var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } exports.default = function (str) { @@ -62586,37 +62985,37 @@ exports.default = function (str) { var _util; function _load_util() { - return _util = _interopRequireDefault(__webpack_require__(4)); + return _util = _interopRequireDefault(__webpack_require__(9)); } var _invariant; function _load_invariant() { - return _invariant = _interopRequireDefault(__webpack_require__(9)); + return _invariant = _interopRequireDefault(__webpack_require__(13)); } var _stripBom; function _load_stripBom() { - return _stripBom = _interopRequireDefault(__webpack_require__(327)); + return _stripBom = _interopRequireDefault(__webpack_require__(423)); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -62669,44 +63068,43 @@ function* tokenise(input) { } else if (input[0] === '#') { chop++; - var val = ''; - while (input[chop] !== '\n') { - val += input[chop]; - chop++; + var nextNewline = input.indexOf('\n', chop); + if (nextNewline === -1) { + nextNewline = input.length; } + var val = input.substring(chop, nextNewline); + chop = nextNewline; yield buildToken(TOKEN_TYPES.comment, val); } else if (input[0] === ' ') { if (lastNewline) { - var indent = ''; - for (var i = 0; input[i] === ' '; i++) { - indent += input[i]; + var indentSize = 1; + for (var i = 1; input[i] === ' '; i++) { + indentSize++; } - if (indent.length % 2) { + if (indentSize % 2) { throw new TypeError('Invalid number of spaces'); } else { - chop = indent.length; - yield buildToken(TOKEN_TYPES.indent, indent.length / 2); + chop = indentSize; + yield buildToken(TOKEN_TYPES.indent, indentSize / 2); } } else { chop++; } } else if (input[0] === '"') { - var _val = ''; - - for (var _i = 0;; _i++) { - var currentChar = input[_i]; - _val += currentChar; - - if (_i > 0 && currentChar === '"') { + var _i = 1; + for (; _i < input.length; _i++) { + if (input[_i] === '"') { var isEscaped = input[_i - 1] === '\\' && input[_i - 2] !== '\\'; if (!isEscaped) { + _i++; break; } } } + var _val = input.substring(0, _i); - chop = _val.length; + chop = _i; try { yield buildToken(TOKEN_TYPES.string, JSON.parse(_val)); @@ -62718,10 +63116,7 @@ function* tokenise(input) { } } } else if (/^[0-9]/.test(input)) { - var _val2 = ''; - for (var _i2 = 0; /^[0-9]$/.test(input[_i2]); _i2++) { - _val2 += input[_i2]; - } + var _val2 = /^[0-9]+/.exec(input)[0]; chop = _val2.length; yield buildToken(TOKEN_TYPES.number, +_val2); @@ -62738,16 +63133,15 @@ function* tokenise(input) { yield buildToken(TOKEN_TYPES.comma); chop++; } else if (/^[a-zA-Z\/-]/g.test(input)) { - var name = ''; - for (var _i3 = 0; _i3 < input.length; _i3++) { - var char = input[_i3]; + var _i2 = 0; + for (; _i2 < input.length; _i2++) { + var char = input[_i2]; if (char === ':' || char === ' ' || char === '\n' || char === '\r' || char === ',') { break; - } else { - name += char; } } - chop = name.length; + var name = input.substring(0, _i2); + chop = _i2; yield buildToken(TOKEN_TYPES.string, name); } else { @@ -62901,16 +63295,16 @@ var Parser = function () { // parse object var val = this.parse(indent + 1); - for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i4 = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + for (var _iterator = keys, _isArray = Array.isArray(_iterator), _i3 = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { var _ref; if (_isArray) { - if (_i4 >= _iterator.length) break; - _ref = _iterator[_i4++]; + if (_i3 >= _iterator.length) break; + _ref = _iterator[_i3++]; } else { - _i4 = _iterator.next(); - if (_i4.done) break; - _ref = _i4.value; + _i3 = _iterator.next(); + if (_i3.done) break; + _ref = _i3.value; } var _key2 = _ref; @@ -62923,16 +63317,16 @@ var Parser = function () { } } else if (isValidPropValueToken(valToken)) { // plain value - for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i5 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + for (var _iterator2 = keys, _isArray2 = Array.isArray(_iterator2), _i4 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { var _ref2; if (_isArray2) { - if (_i5 >= _iterator2.length) break; - _ref2 = _iterator2[_i5++]; + if (_i4 >= _iterator2.length) break; + _ref2 = _iterator2[_i4++]; } else { - _i5 = _iterator2.next(); - if (_i5.done) break; - _ref2 = _i5.value; + _i4 = _iterator2.next(); + if (_i4.done) break; + _ref2 = _i4.value; } var _key3 = _ref2; @@ -63036,7 +63430,7 @@ function parseWithConflict(str, fileLoc) { } /***/ }), -/* 239 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63049,13 +63443,13 @@ Object.defineProperty(exports, "__esModule", { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } exports.testEngine = testEngine; @@ -63065,38 +63459,38 @@ exports.check = check; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); } var _yarnVersion; function _load_yarnVersion() { - return _yarnVersion = __webpack_require__(84); + return _yarnVersion = __webpack_require__(110); } var _semver; function _load_semver() { - return _semver = __webpack_require__(163); + return _semver = __webpack_require__(203); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); -var semver = __webpack_require__(20); +var semver = __webpack_require__(26); var VERSIONS = (0, (_assign || _load_assign()).default)({}, process.versions, { yarn: (_yarnVersion || _load_yarnVersion()).version @@ -63269,7 +63663,7 @@ function checkOne(info, config, ignoreEngines) { if (VERSIONS[name]) { if (!testEngine(name, range, VERSIONS, config.looseSemver)) { - pushError(reporter.lang('incompatibleEngine', name, range)); + pushError(reporter.lang('incompatibleEngine', name, range, VERSIONS[name])); } } else if (ignore.indexOf(name) < 0) { reporter.warn(`${human}: ${reporter.lang('invalidEngine', name)}`); @@ -63302,7 +63696,7 @@ function check(infos, config, ignoreEngines) { } /***/ }), -/* 240 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63315,19 +63709,19 @@ Object.defineProperty(exports, "__esModule", { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -63342,6 +63736,8 @@ var PackageReference = function () { this.config = request.config; this.hint = request.hint; + this.isPlugnplay = false; + this.registry = remote.registry; this.version = info.version; this.name = info.name; @@ -63367,7 +63763,9 @@ var PackageReference = function () { }; PackageReference.prototype.addLocation = function addLocation(loc) { - this.locations.push(loc); + if (this.locations.indexOf(loc) === -1) { + this.locations.push(loc); + } }; PackageReference.prototype.addRequest = function addRequest(request) { @@ -63457,7 +63855,7 @@ var PackageReference = function () { exports.default = PackageReference; /***/ }), -/* 241 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -63476,92 +63874,92 @@ function _load_asyncToGenerator() { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _index; function _load_index() { - return _index = __webpack_require__(41); + return _index = __webpack_require__(62); } var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(87)); + return _packageRequest = _interopRequireDefault(__webpack_require__(112)); } var _normalizePattern2; function _load_normalizePattern() { - return _normalizePattern2 = __webpack_require__(42); + return _normalizePattern2 = __webpack_require__(51); } var _requestManager; function _load_requestManager() { - return _requestManager = _interopRequireDefault(__webpack_require__(253)); + return _requestManager = _interopRequireDefault(__webpack_require__(317)); } var _blockingQueue; function _load_blockingQueue() { - return _blockingQueue = _interopRequireDefault(__webpack_require__(112)); + return _blockingQueue = _interopRequireDefault(__webpack_require__(152)); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } var _workspaceLayout; function _load_workspaceLayout() { - return _workspaceLayout = _interopRequireDefault(__webpack_require__(67)); + return _workspaceLayout = _interopRequireDefault(__webpack_require__(86)); } var _resolutionMap; function _load_resolutionMap() { - return _resolutionMap = _interopRequireDefault(__webpack_require__(155)); + return _resolutionMap = _interopRequireDefault(__webpack_require__(195)); } var _resolutionMap2; function _load_resolutionMap2() { - return _resolutionMap2 = __webpack_require__(155); + return _resolutionMap2 = __webpack_require__(195); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); -var semver = __webpack_require__(20); +var semver = __webpack_require__(26); var PackageResolver = function () { function PackageResolver(config, lockfile) { @@ -63575,7 +63973,6 @@ var PackageResolver = function () { this.resolutionMap = resolutionMap; this.usedRegistries = new (_set || _load_set()).default(); this.flat = false; - this.focus = false; this.reporter = config.reporter; this.lockfile = lockfile; @@ -64252,18 +64649,15 @@ var PackageResolver = function () { var _ref18 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { isFlat: false, isFrozen: false, - workspaceLayout: undefined, - focus: false + workspaceLayout: undefined }, isFlat = _ref18.isFlat, isFrozen = _ref18.isFrozen, - workspaceLayout = _ref18.workspaceLayout, - focus = _ref18.focus; + workspaceLayout = _ref18.workspaceLayout; this.flat = Boolean(isFlat); this.frozen = Boolean(isFrozen); this.workspaceLayout = workspaceLayout; - this.focus = Boolean(focus); var activity = this.activity = this.reporter.activity(); for (var _iterator14 = deps, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator14);;) { @@ -64470,7 +64864,7 @@ var PackageResolver = function () { exports.default = PackageResolver; /***/ }), -/* 242 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64508,7 +64902,7 @@ var defaultFormatter = exports.defaultFormatter = { }; /***/ }), -/* 243 */ +/* 304 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64522,7 +64916,7 @@ exports.en = undefined; var _en; function _load_en() { - return _en = _interopRequireDefault(__webpack_require__(433)); + return _en = _interopRequireDefault(__webpack_require__(547)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -64530,7 +64924,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.en = (_en || _load_en()).default; /***/ }), -/* 244 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64543,25 +64937,25 @@ Object.defineProperty(exports, "__esModule", { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } var _hostedGitResolver; function _load_hostedGitResolver() { - return _hostedGitResolver = _interopRequireDefault(__webpack_require__(75)); + return _hostedGitResolver = _interopRequireDefault(__webpack_require__(96)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -64616,7 +65010,7 @@ GitHubResolver.hostname = 'github.com'; exports.default = GitHubResolver; /***/ }), -/* 245 */ +/* 306 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64636,44 +65030,44 @@ function _load_asyncToGenerator() { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } var _exoticResolver; function _load_exoticResolver() { - return _exoticResolver = _interopRequireDefault(__webpack_require__(65)); + return _exoticResolver = _interopRequireDefault(__webpack_require__(84)); } var _misc; function _load_misc() { - return _misc = _interopRequireWildcard(__webpack_require__(18)); + return _misc = _interopRequireWildcard(__webpack_require__(27)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); +var path = __webpack_require__(2); var LINK_PROTOCOL_PREFIX = exports.LINK_PROTOCOL_PREFIX = 'link:'; @@ -64727,7 +65121,7 @@ LinkResolver.protocol = 'link'; exports.default = LinkResolver; /***/ }), -/* 246 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64740,25 +65134,25 @@ Object.defineProperty(exports, "__esModule", { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } var _npmResolver; function _load_npmResolver() { - return _npmResolver = _interopRequireDefault(__webpack_require__(158)); + return _npmResolver = _interopRequireDefault(__webpack_require__(198)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -64777,7 +65171,7 @@ var YarnResolver = function (_NpmResolver) { exports.default = YarnResolver; /***/ }), -/* 247 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64800,25 +65194,25 @@ exports.default = function (from, to) { var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(20)); + return _semver = _interopRequireDefault(__webpack_require__(26)); } var _semver2; function _load_semver2() { - return _semver2 = __webpack_require__(163); + return _semver2 = __webpack_require__(203); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/* 248 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64844,7 +65238,17 @@ exports.default = function (from, to, reporter) { }; /***/ }), -/* 249 */ +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// $FlowFixMe We want this require to be dynamic +exports.dynamicRequire = true ? require : require; // eslint-disable-line + +/***/ }), +/* 311 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -64857,13 +65261,13 @@ Object.defineProperty(exports, "__esModule", { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } exports.sortFilter = sortFilter; @@ -64874,13 +65278,13 @@ exports.filterOverridenGitignores = filterOverridenGitignores; var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var mm = __webpack_require__(80); -var path = __webpack_require__(0); +var mm = __webpack_require__(102); +var path = __webpack_require__(2); var WHITESPACE_RE = /^\s+$/; @@ -65043,7 +65447,7 @@ function matchesFilter(filter, basename, loc) { filterByBasename = false; } // the micromatch regex expects unix path separators - loc = loc.replace('\\', '/'); + loc = loc.replace(/\\/g, '/'); return filter.regex.test(loc) || filter.regex.test(`/${loc}`) || filterByBasename && filter.regex.test(basename) || mm.isMatch(loc, filter.pattern); } @@ -65098,9 +65502,9 @@ function filterOverridenGitignores(files) { } else { //don't include .gitignore if .npmignore or .yarnignore are present var dir = path.dirname(file.absolute); - var higherPriorityIgnoreFilePaths = [`${dir}/${IGNORE_FILENAMES[0]}`, `${dir}/${IGNORE_FILENAMES[1]}`]; + var higherPriorityIgnoreFilePaths = [path.join(dir, IGNORE_FILENAMES[0]), path.join(dir, IGNORE_FILENAMES[1])]; var hasHigherPriorityFiles = files.find(function (file) { - return higherPriorityIgnoreFilePaths.indexOf(file.absolute) > -1; + return higherPriorityIgnoreFilePaths.indexOf(path.normalize(file.absolute)) > -1; }); if (!hasHigherPriorityFiles) { return [].concat(acc, [file]); @@ -65111,7 +65515,7 @@ function filterOverridenGitignores(files) { } /***/ }), -/* 250 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65125,25 +65529,25 @@ exports.spawn = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); + return _map = _interopRequireDefault(__webpack_require__(41)); } var _path; function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); + return _path = _interopRequireDefault(__webpack_require__(2)); } var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(47)); + return _child = _interopRequireWildcard(__webpack_require__(60)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -65177,7 +65581,56 @@ var spawn = exports.spawn = function spawn(args) { }; /***/ }), -/* 251 */ +/* 313 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _map; + +function _load_map() { + return _map = _interopRequireDefault(__webpack_require__(41)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var lockPromises = new (_map || _load_map()).default(); + +/** + * Acquires a mutex lock over the given key. If the lock can't be acquired, it waits until it's available. + * @param key Key to get the lock for. + * @return {Promise.} A Promise that resolves when the lock is acquired, with the function that + * must be called to release the lock. + */ + +exports.default = function (key) { + var unlockNext = void 0; + var willLock = new (_promise || _load_promise()).default(function (resolve) { + return unlockNext = resolve; + }); + var lockPromise = lockPromises.get(key) || (_promise || _load_promise()).default.resolve(); + var willUnlock = lockPromise.then(function () { + return unlockNext; + }); + lockPromises.set(key, lockPromise.then(function () { + return willLock; + })); + return willUnlock; +}; + +/***/ }), +/* 314 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65204,7 +65657,7 @@ function isValidPackagePath(input) { } /***/ }), -/* 252 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65219,10 +65672,10 @@ exports.resolveWithHome = resolveWithHome; var _path; function _load_path() { - return _path = __webpack_require__(0); + return _path = __webpack_require__(2); } -var userHome = __webpack_require__(76).default; +var userHome = __webpack_require__(97).default; function getPosixPath(path) { return path.replace(/\\/g, '/'); @@ -65238,7 +65691,87 @@ function resolveWithHome(path) { } /***/ }), -/* 253 */ +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _from; + +function _load_from() { + return _from = _interopRequireDefault(__webpack_require__(52)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var makePortableProxyScriptUnix = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (source, destination, options) { + var environment = options.extraEnvironment ? (0, (_from || _load_from()).default)(options.extraEnvironment.entries()).map(function (_ref2) { + var key = _ref2[0], + value = _ref2[1]; + return `${key}="${value}"`; + }).join(' ') + ' ' : ''; + + var prependedArguments = options.prependArguments ? ' ' + options.prependArguments.map(function (arg) { + return `"${arg}"`; + }).join(' ') : ''; + var appendedArguments = options.appendArguments ? ' ' + options.appendArguments.map(function (arg) { + return `"${arg}"`; + }).join(' ') : ''; + + var filePath = `${destination}/${options.proxyBasename || path.basename(source)}`; + + // Unless impossible we want to preserve any symlinks used to call us when forwarding the call to the binary (so we + // cannot use realpath or transform relative paths into absolute ones), but we also need to tell the sh interpreter + // that the symlink should be resolved relative to the script directory (hence dirname "$0" at runtime). + var sourcePath = path.isAbsolute(source) ? source : `$(dirname "$0")/../${source}`; + + yield (_fs || _load_fs()).mkdirp(destination); + + if (process.platform === 'win32') { + yield (_fs || _load_fs()).writeFile(filePath + '.cmd', `@${environment}"${sourcePath}" ${prependedArguments} ${appendedArguments} %*\r\n`); + } else { + yield (_fs || _load_fs()).writeFile(filePath, `#!/bin/sh\n\n${environment}exec "${sourcePath}"${prependedArguments} "$@"${appendedArguments}\n`); + yield (_fs || _load_fs()).chmod(filePath, 0o755); + } + }); + + return function makePortableProxyScriptUnix(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); + +exports.makePortableProxyScript = makePortableProxyScript; + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var path = __webpack_require__(2); + +function makePortableProxyScript(source, destination) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + return makePortableProxyScriptUnix(source, destination, options); +} + +/***/ }), +/* 317 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65251,85 +65784,91 @@ Object.defineProperty(exports, "__esModule", { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _fs; function _load_fs() { - return _fs = _interopRequireDefault(__webpack_require__(10)); + return _fs = _interopRequireDefault(__webpack_require__(12)); +} + +var _http; + +function _load_http() { + return _http = _interopRequireDefault(__webpack_require__(82)); } var _url; function _load_url() { - return _url = _interopRequireDefault(__webpack_require__(19)); + return _url = _interopRequireDefault(__webpack_require__(29)); } var _dnscache; function _load_dnscache() { - return _dnscache = _interopRequireDefault(__webpack_require__(542)); + return _dnscache = _interopRequireDefault(__webpack_require__(681)); } var _invariant; function _load_invariant() { - return _invariant = _interopRequireDefault(__webpack_require__(9)); + return _invariant = _interopRequireDefault(__webpack_require__(13)); } var _requestCaptureHar; function _load_requestCaptureHar() { - return _requestCaptureHar = _interopRequireDefault(__webpack_require__(692)); + return _requestCaptureHar = _interopRequireDefault(__webpack_require__(839)); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _blockingQueue; function _load_blockingQueue() { - return _blockingQueue = _interopRequireDefault(__webpack_require__(112)); + return _blockingQueue = _interopRequireDefault(__webpack_require__(152)); } var _constants; function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); + return _constants = _interopRequireWildcard(__webpack_require__(14)); } var _network; function _load_network() { - return _network = _interopRequireWildcard(__webpack_require__(208)); + return _network = _interopRequireWildcard(__webpack_require__(268)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); + return _map = _interopRequireDefault(__webpack_require__(50)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -65344,6 +65883,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de ttl: 300, cachesize: 10 }); + var successHosts = (0, (_map || _load_map()).default)(); var controlOffline = (_network || _load_network()).isOffline(); @@ -65446,7 +65986,7 @@ var RequestManager = function () { RequestManager.prototype._getRequestModule = function _getRequestModule() { if (!this._requestModule) { - var request = __webpack_require__(693); + var request = __webpack_require__(840); if (this.captureHar) { this._requestCaptureHar = new (_requestCaptureHar || _load_requestCaptureHar()).default(request); this._requestModule = this._requestCaptureHar.request.bind(this._requestCaptureHar); @@ -65554,9 +66094,36 @@ var RequestManager = function () { * isn't already one. */ - RequestManager.prototype.queueForOffline = function queueForOffline(opts) { + RequestManager.prototype.queueForRetry = function queueForRetry(opts) { + if (opts.retryReason) { + var containsReason = false; + + for (var _iterator = this.offlineQueue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var queuedOpts = _ref; + + if (queuedOpts.retryReason === opts.retryReason) { + containsReason = true; + break; + } + } + + if (!containsReason) { + this.reporter.info(opts.retryReason); + } + } + if (!this.offlineQueue.length) { - this.reporter.info(this.reporter.lang('offlineRetrying')); this.initOfflineRetry(); } @@ -65574,19 +66141,19 @@ var RequestManager = function () { setTimeout(function () { var queue = _this2.offlineQueue; _this2.offlineQueue = []; - for (var _iterator = queue, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref; + for (var _iterator2 = queue, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref2; - if (_isArray) { - if (_i >= _iterator.length) break; - _ref = _iterator[_i++]; + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; } else { - _i = _iterator.next(); - if (_i.done) break; - _ref = _i.value; + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; } - var opts = _ref; + var opts = _ref2; _this2.execute(opts); } @@ -65620,6 +66187,23 @@ var RequestManager = function () { rejectNext(err); }; + var queueForRetry = function queueForRetry(reason) { + var attempts = params.retryAttempts || 0; + if (attempts >= _this3.maxRetryAttempts - 1) { + return false; + } + if (opts.params.method && opts.params.method.toUpperCase() !== 'GET') { + return false; + } + params.retryAttempts = attempts + 1; + if (typeof params.cleanup === 'function') { + params.cleanup(); + } + opts.retryReason = reason; + _this3.queueForRetry(opts); + return true; + }; + var calledOnError = false; var onError = function onError(err) { if (calledOnError) { @@ -65627,15 +66211,10 @@ var RequestManager = function () { } calledOnError = true; - var attempts = params.retryAttempts || 0; - if (attempts < _this3.maxRetryAttempts - 1 && _this3.isPossibleOfflineError(err)) { - params.retryAttempts = attempts + 1; - if (typeof params.cleanup === 'function') { - params.cleanup(); + if (_this3.isPossibleOfflineError(err)) { + if (!queueForRetry(_this3.reporter.lang('offlineRetrying'))) { + reject(err); } - _this3.queueForOffline(opts); - } else { - reject(err); } }; @@ -65652,18 +66231,38 @@ var RequestManager = function () { _this3.reporter.verbose(_this3.reporter.lang('verboseRequestFinish', params.url, res.statusCode)); + if (res.statusCode === 408 || res.statusCode >= 500) { + var description = `${res.statusCode} ${(_http || _load_http()).default.STATUS_CODES[res.statusCode]}`; + if (!queueForRetry(_this3.reporter.lang('internalServerErrorRetrying', description))) { + throw new (_errors || _load_errors()).ResponseError(_this3.reporter.lang('requestFailed', description), res.statusCode); + } else { + return; + } + } + + if (res.statusCode === 401 && res.headers['www-authenticate']) { + var authMethods = res.headers['www-authenticate'].split(/,\s*/).map(function (s) { + return s.toLowerCase(); + }); + + if (authMethods.indexOf('otp') !== -1) { + reject(new (_errors || _load_errors()).OneTimePasswordError()); + return; + } + } + if (body && typeof body.error === 'string') { reject(new Error(body.error)); return; } - if (res.statusCode === 403) { + if ([400, 401, 404].concat(params.rejectStatusCode || []).indexOf(res.statusCode) !== -1) { + // So this is actually a rejection ... the hosted git resolver uses this to know whether http is supported + resolve(false); + } else if (res.statusCode >= 400) { var errMsg = body && body.message || reporter.lang('requestError', params.url, res.statusCode); reject(new Error(errMsg)); } else { - if ([400, 401, 404].concat(params.rejectStatusCode || []).indexOf(res.statusCode) !== -1) { - body = false; - } resolve(body); } }; @@ -65715,8 +66314,19 @@ var RequestManager = function () { req.on('data', queue.stillActive.bind(queue)); } - if (params.process) { - params.process(req, resolve, reject); + var process = params.process; + if (process) { + req.on('response', function (res) { + if (res.statusCode >= 200 && res.statusCode < 300) { + return; + } + + var description = `${res.statusCode} ${(_http || _load_http()).default.STATUS_CODES[res.statusCode]}`; + reject(new (_errors || _load_errors()).ResponseError(_this3.reporter.lang('requestFailed', description), res.statusCode)); + + req.abort(); + }); + process(req, resolve, reject); } }; @@ -65751,13 +66361,7 @@ var RequestManager = function () { exports.default = RequestManager; /***/ }), -/* 254 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(485), __esModule: true }; - -/***/ }), -/* 255 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -65765,11 +66369,11 @@ module.exports = { "default": __webpack_require__(485), __esModule: true }; exports.__esModule = true; -var _iterator = __webpack_require__(460); +var _iterator = __webpack_require__(575); var _iterator2 = _interopRequireDefault(_iterator); -var _symbol = __webpack_require__(459); +var _symbol = __webpack_require__(574); var _symbol2 = _interopRequireDefault(_symbol); @@ -65784,13 +66388,13 @@ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.d }; /***/ }), -/* 256 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var crypto_hash_sha512 = __webpack_require__(141).lowlevel.crypto_hash; +var crypto_hash_sha512 = __webpack_require__(71).lowlevel.crypto_hash; /* * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a @@ -66347,11 +66951,11 @@ module.exports = { /***/ }), -/* 257 */ +/* 320 */ /***/ (function(module, exports, __webpack_require__) { -var bufferFill = __webpack_require__(467) -var allocUnsafe = __webpack_require__(466) +var bufferFill = __webpack_require__(580) +var allocUnsafe = __webpack_require__(579) module.exports = function alloc (size, fill, encoding) { if (typeof size !== 'number') { @@ -66361,7 +66965,7 @@ module.exports = function alloc (size, fill, encoding) { if (size < 0) { throw new RangeError('"size" argument must not be negative') } - + if (Buffer.alloc) { return Buffer.alloc(size, fill, encoding) } @@ -66385,12 +66989,12 @@ module.exports = function alloc (size, fill, encoding) { /***/ }), -/* 258 */ +/* 321 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const restoreCursor = __webpack_require__(706); +const restoreCursor = __webpack_require__(858); let hidden = false; @@ -66431,193 +67035,317 @@ exports.toggle = (force, stream) => { /***/ }), -/* 259 */ +/* 322 */ /***/ (function(module, exports, __webpack_require__) { -// On windows, create a .cmd file. -// Read the #! in the file to see what it uses. The vast majority -// of the time, this will be either: -// "#!/usr/bin/env " -// or: -// "#! " -// -// Write a binroot/pkg.bin + ".cmd" file that has this line in it: -// @ %~dp0 %* +var objectAssign = __webpack_require__(236); +var stringWidth = __webpack_require__(985); -module.exports = cmdShim -cmdShim.ifExists = cmdShimIfExists - -var fs = __webpack_require__(291) - -var mkdir = __webpack_require__(196) - , path = __webpack_require__(0) - , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ - -function cmdShimIfExists (from, to, cb) { - fs.stat(from, function (er) { - if (er) return cb() - cmdShim(from, to, cb) - }) +function codeRegex(capture){ + return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g } -// Try to unlink, but ignore errors. -// Any problems will surface later. -function rm (path, cb) { - fs.unlink(path, function(er) { - cb() - }) +function strlen(str){ + var code = codeRegex(); + var stripped = ("" + str).replace(code,''); + var split = stripped.split("\n"); + return split.reduce(function (memo, s) { return (stringWidth(s) > memo) ? stringWidth(s) : memo }, 0); } -function cmdShim (from, to, cb) { - fs.stat(from, function (er, stat) { - if (er) - return cb(er) - - cmdShim_(from, to, cb) - }) +function repeat(str,times){ + return Array(times + 1).join(str); } -function cmdShim_ (from, to, cb) { - var then = times(2, next, cb) - rm(to, then) - rm(to + ".cmd", then) +function pad(str, len, pad, dir) { + var length = strlen(str); + if (len + 1 >= length) { + var padlen = len - length; + switch (dir) { + case 'right': + str = repeat(pad, padlen) + str; + break; - function next(er) { - writeShim(from, to, cb) - } -} + case 'center': + var right = Math.ceil((padlen) / 2); + var left = padlen - right; + str = repeat(pad, left) + str + repeat(pad, right); + break; -function writeShim (from, to, cb) { - // make a cmd file and a sh script - // First, check if the bin is a #! of some sort. - // If not, then assume it's something that'll be compiled, or some other - // sort of script, and just call it directly. - mkdir(path.dirname(to), function (er) { - if (er) - return cb(er) - fs.readFile(from, "utf8", function (er, data) { - if (er) return writeShim_(from, to, null, null, cb) - var firstLine = data.trim().split(/\r*\n/)[0] - , shebang = firstLine.match(shebangExpr) - if (!shebang) return writeShim_(from, to, null, null, cb) - var prog = shebang[1] - , args = shebang[2] || "" - return writeShim_(from, to, prog, args, cb) - }) - }) -} - -function writeShim_ (from, to, prog, args, cb) { - var shTarget = path.relative(path.dirname(to), from) - , target = shTarget.split("/").join("\\") - , longProg - , shProg = prog && prog.split("\\").join("/") - , shLongProg - shTarget = shTarget.split("\\").join("/") - args = args || "" - if (!prog) { - prog = "\"%~dp0\\" + target + "\"" - shProg = "\"$basedir/" + shTarget + "\"" - args = "" - target = "" - shTarget = "" - } else { - longProg = "\"%~dp0\\" + prog + ".exe\"" - shLongProg = "\"$basedir/" + prog + "\"" - target = "\"%~dp0\\" + target + "\"" - shTarget = "\"$basedir/" + shTarget + "\"" - } - - // @IF EXIST "%~dp0\node.exe" ( - // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* - // ) ELSE ( - // SETLOCAL - // SET PATHEXT=%PATHEXT:;.JS;=;% - // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* - // ) - var cmd - if (longProg) { - cmd = "@IF EXIST " + longProg + " (\r\n" - + " " + longProg + " " + args + " " + target + " %*\r\n" - + ") ELSE (\r\n" - + " @SETLOCAL\r\n" - + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" - + " " + prog + " " + args + " " + target + " %*\r\n" - + ")" - } else { - cmd = "@" + prog + " " + args + " " + target + " %*\r\n" - } - - // #!/bin/sh - // basedir=`dirname "$0"` - // - // case `uname` in - // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; - // esac - // - // if [ -x "$basedir/node.exe" ]; then - // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // else - // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // fi - // exit $ret - - var sh = "#!/bin/sh\n" - - if (shLongProg) { - sh = sh - + "basedir=$(dirname \"$(echo \"$0\" | sed -e 's,\\\\,/,g')\")\n" - + "\n" - + "case `uname` in\n" - + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" - + "esac\n" - + "\n" - - sh = sh - + "if [ -x "+shLongProg+" ]; then\n" - + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "else \n" - + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "fi\n" - + "exit $ret\n" - } else { - sh = shProg + " " + args + " " + shTarget + " \"$@\"\n" - + "exit $?\n" - } - - var then = times(2, next, cb) - fs.writeFile(to + ".cmd", cmd, "utf8", then) - fs.writeFile(to, sh, "utf8", then) - function next () { - chmodShim(to, cb) - } -} - -function chmodShim (to, cb) { - var then = times(2, cb, cb) - fs.chmod(to, 0755, then) - fs.chmod(to + ".cmd", 0755, then) -} - -function times(n, ok, cb) { - var errState = null - return function(er) { - if (!errState) { - if (er) - cb(errState = er) - else if (--n === 0) - ok() + default : + str = str + repeat(pad,padlen); + break; } } + return str; } +var codeCache = {}; + +function addToCodeCache(name,on,off){ + on = '\u001b[' + on + 'm'; + off = '\u001b[' + off + 'm'; + codeCache[on] = {set:name,to:true}; + codeCache[off] = {set:name,to:false}; + codeCache[name] = {on:on,off:off}; +} + +//https://github.com/Marak/colors.js/blob/master/lib/styles.js +addToCodeCache('bold', 1, 22); +addToCodeCache('italics', 3, 23); +addToCodeCache('underline', 4, 24); +addToCodeCache('inverse', 7, 27); +addToCodeCache('strikethrough', 9, 29); + + +function updateState(state, controlChars){ + var controlCode = controlChars[1] ? parseInt(controlChars[1].split(';')[0]) : 0; + if ( (controlCode >= 30 && controlCode <= 39) + || (controlCode >= 90 && controlCode <= 97) + ) { + state.lastForegroundAdded = controlChars[0]; + return; + } + if ( (controlCode >= 40 && controlCode <= 49) + || (controlCode >= 100 && controlCode <= 107) + ) { + state.lastBackgroundAdded = controlChars[0]; + return; + } + if (controlCode === 0) { + for (var i in state) { + /* istanbul ignore else */ + if (state.hasOwnProperty(i)) { + delete state[i]; + } + } + return; + } + var info = codeCache[controlChars[0]]; + if (info) { + state[info.set] = info.to; + } +} + +function readState(line){ + var code = codeRegex(true); + var controlChars = code.exec(line); + var state = {}; + while(controlChars !== null){ + updateState(state, controlChars); + controlChars = code.exec(line); + } + return state; +} + +function unwindState(state,ret){ + var lastBackgroundAdded = state.lastBackgroundAdded; + var lastForegroundAdded = state.lastForegroundAdded; + + delete state.lastBackgroundAdded; + delete state.lastForegroundAdded; + + Object.keys(state).forEach(function(key){ + if(state[key]){ + ret += codeCache[key].off; + } + }); + + if(lastBackgroundAdded && (lastBackgroundAdded != '\u001b[49m')){ + ret += '\u001b[49m'; + } + if(lastForegroundAdded && (lastForegroundAdded != '\u001b[39m')){ + ret += '\u001b[39m'; + } + + return ret; +} + +function rewindState(state,ret){ + var lastBackgroundAdded = state.lastBackgroundAdded; + var lastForegroundAdded = state.lastForegroundAdded; + + delete state.lastBackgroundAdded; + delete state.lastForegroundAdded; + + Object.keys(state).forEach(function(key){ + if(state[key]){ + ret = codeCache[key].on + ret; + } + }); + + if(lastBackgroundAdded && (lastBackgroundAdded != '\u001b[49m')){ + ret = lastBackgroundAdded + ret; + } + if(lastForegroundAdded && (lastForegroundAdded != '\u001b[39m')){ + ret = lastForegroundAdded + ret; + } + + return ret; +} + +function truncateWidth(str, desiredLength){ + if (str.length === strlen(str)) { + return str.substr(0, desiredLength); + } + + while (strlen(str) > desiredLength){ + str = str.slice(0, -1); + } + + return str; +} + +function truncateWidthWithAnsi(str, desiredLength){ + var code = codeRegex(true); + var split = str.split(codeRegex()); + var splitIndex = 0; + var retLen = 0; + var ret = ''; + var myArray; + var state = {}; + + while(retLen < desiredLength){ + myArray = code.exec(str); + var toAdd = split[splitIndex]; + splitIndex++; + if (retLen + strlen(toAdd) > desiredLength){ + toAdd = truncateWidth(toAdd, desiredLength - retLen); + } + ret += toAdd; + retLen += strlen(toAdd); + + if(retLen < desiredLength){ + if (!myArray) { break; } // full-width chars may cause a whitespace which cannot be filled + ret += myArray[0]; + updateState(state,myArray); + } + } + + return unwindState(state,ret); +} + +function truncate(str, desiredLength, truncateChar){ + truncateChar = truncateChar || '…'; + var lengthOfStr = strlen(str); + if(lengthOfStr <= desiredLength){ + return str; + } + desiredLength -= strlen(truncateChar); + + var ret = truncateWidthWithAnsi(str, desiredLength); + + return ret + truncateChar; +} + + +function defaultOptions(){ + return{ + chars: { + 'top': '─' + , 'top-mid': '┬' + , 'top-left': '┌' + , 'top-right': '┐' + , 'bottom': '─' + , 'bottom-mid': '┴' + , 'bottom-left': '└' + , 'bottom-right': '┘' + , 'left': '│' + , 'left-mid': '├' + , 'mid': '─' + , 'mid-mid': '┼' + , 'right': '│' + , 'right-mid': '┤' + , 'middle': '│' + } + , truncate: '…' + , colWidths: [] + , rowHeights: [] + , colAligns: [] + , rowAligns: [] + , style: { + 'padding-left': 1 + , 'padding-right': 1 + , head: ['red'] + , border: ['grey'] + , compact : false + } + , head: [] + }; +} + +function mergeOptions(options,defaults){ + options = options || {}; + defaults = defaults || defaultOptions(); + var ret = objectAssign({}, defaults, options); + ret.chars = objectAssign({}, defaults.chars, options.chars); + ret.style = objectAssign({}, defaults.style, options.style); + return ret; +} + +function wordWrap(maxLength,input){ + var lines = []; + var split = input.split(/(\s+)/g); + var line = []; + var lineLength = 0; + var whitespace; + for (var i = 0; i < split.length; i += 2) { + var word = split[i]; + var newLength = lineLength + strlen(word); + if (lineLength > 0 && whitespace) { + newLength += whitespace.length; + } + if(newLength > maxLength){ + if(lineLength !== 0){ + lines.push(line.join('')); + } + line = [word]; + lineLength = strlen(word); + } else { + line.push(whitespace || '', word); + lineLength = newLength; + } + whitespace = split[i+1]; + } + if(lineLength){ + lines.push(line.join('')); + } + return lines; +} + +function multiLineWordWrap(maxLength, input){ + var output = []; + input = input.split('\n'); + for(var i = 0; i < input.length; i++){ + output.push.apply(output,wordWrap(maxLength,input[i])); + } + return output; +} + +function colorizeLines(input){ + var state = {}; + var output = []; + for(var i = 0; i < input.length; i++){ + var line = rewindState(state,input[i]) ; + state = readState(line); + var temp = objectAssign({},state); + output.push(unwindState(temp,line)); + } + return output; +} + +module.exports = { + strlen:strlen, + repeat:repeat, + pad:pad, + truncate:truncate, + mergeOptions:mergeOptions, + wordWrap:multiLineWordWrap, + colorizeLines:colorizeLines +}; + /***/ }), -/* 260 */ +/* 323 */ /***/ (function(module, exports) { @@ -66860,11 +67588,11 @@ function isObject(val) { /***/ }), -/* 261 */ +/* 324 */ /***/ (function(module, exports, __webpack_require__) { /* MIT license */ -var cssKeywords = __webpack_require__(478); +var cssKeywords = __webpack_require__(597); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). @@ -66960,41 +67688,48 @@ convert.rgb.hsl = function (rgb) { }; convert.rgb.hsv = function (rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; + var rdif; + var gdif; + var bdif; var h; var s; - var v; - if (max === 0) { - s = 0; + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = s = 0; } else { - s = (delta / max * 1000) / 10; + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } } - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - v = ((max / 255) * 1000) / 10; - - return [h, s, v]; + return [ + h * 360, + s * 100, + v * 100 + ]; }; convert.rgb.hwb = function (rgb) { @@ -67727,12 +68462,13 @@ convert.rgb.gray = function (rgb) { /***/ }), -/* 262 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { -var util = __webpack_require__(4); -var Stream = __webpack_require__(29).Stream; -var DelayedStream = __webpack_require__(539); +var util = __webpack_require__(9); +var Stream = __webpack_require__(34).Stream; +var DelayedStream = __webpack_require__(678); +var defer = __webpack_require__(609); module.exports = CombinedStream; function CombinedStream() { @@ -67820,7 +68556,7 @@ CombinedStream.prototype._getNext = function() { this._handleErrors(stream); } - this._pipeNext(stream); + defer(this._pipeNext.bind(this, stream)); }.bind(this)); }; @@ -67921,52 +68657,54 @@ CombinedStream.prototype._emitError = function(err) { /***/ }), -/* 263 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var dP = __webpack_require__(45).f - , create = __webpack_require__(96) - , redefineAll = __webpack_require__(176) - , ctx = __webpack_require__(56) - , anInstance = __webpack_require__(168) - , defined = __webpack_require__(116) - , forOf = __webpack_require__(117) - , $iterDefine = __webpack_require__(173) - , step = __webpack_require__(273) - , setSpecies = __webpack_require__(280) - , DESCRIPTORS = __webpack_require__(49) - , fastKey = __webpack_require__(174).fastKey - , SIZE = DESCRIPTORS ? '_s' : 'size'; +var dP = __webpack_require__(63).f; +var create = __webpack_require__(121); +var redefineAll = __webpack_require__(218); +var ctx = __webpack_require__(67); +var anInstance = __webpack_require__(208); +var forOf = __webpack_require__(118); +var $iterDefine = __webpack_require__(214); +var step = __webpack_require__(336); +var setSpecies = __webpack_require__(347); +var DESCRIPTORS = __webpack_require__(68); +var fastKey = __webpack_require__(215).fastKey; +var validate = __webpack_require__(223); +var SIZE = DESCRIPTORS ? '_s' : 'size'; -var getEntry = function(that, key){ +var getEntry = function (that, key) { // fast case - var index = fastKey(key), entry; - if(index !== 'F')return that._i[index]; + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; // frozen object case - for(entry = that._f; entry; entry = entry.n){ - if(entry.k == key)return entry; + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; } }; module.exports = { - getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ - var C = wrapper(function(that, iterable){ + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size - if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() - clear: function clear(){ - for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { entry.r = true; - if(entry.p)entry.p = entry.p.n = undefined; + if (entry.p) entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; @@ -67974,51 +68712,51 @@ module.exports = { }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) - 'delete': function(key){ - var that = this - , entry = getEntry(that, key); - if(entry){ - var next = entry.n - , prev = entry.p; + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; delete that._i[entry.i]; entry.r = true; - if(prev)prev.n = next; - if(next)next.p = prev; - if(that._f == entry)that._f = next; - if(that._l == entry)that._l = prev; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function forEach(callbackfn /*, that = undefined */){ - anInstance(this, C, 'forEach'); - var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) - , entry; - while(entry = entry ? entry.n : this._f){ + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { f(entry.v, entry.k, this); // revert to the last existing entry - while(entry && entry.r)entry = entry.p; + while (entry && entry.r) entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) - has: function has(key){ - return !!getEntry(this, key); + has: function has(key) { + return !!getEntry(validate(this, NAME), key); } }); - if(DESCRIPTORS)dP(C.prototype, 'size', { - get: function(){ - return defined(this[SIZE]); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; } }); return C; }, - def: function(that, key, value){ - var entry = getEntry(that, key) - , prev, index; + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; // change existing entry - if(entry){ + if (entry) { entry.v = value; // create new entry } else { @@ -68030,108 +68768,110 @@ module.exports = { n: undefined, // <- next entry r: false // <- removed }; - if(!that._f)that._f = entry; - if(prev)prev.n = entry; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; that[SIZE]++; // add to index - if(index !== 'F')that._i[index] = entry; + if (index !== 'F') that._i[index] = entry; } return that; }, getEntry: getEntry, - setStrong: function(C, NAME, IS_MAP){ + setStrong: function (C, NAME, IS_MAP) { // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - $iterDefine(C, NAME, function(iterated, kind){ - this._t = iterated; // target - this._k = kind; // kind - this._l = undefined; // previous - }, function(){ - var that = this - , kind = that._k - , entry = that._l; + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; // revert to the last existing entry - while(entry && entry.r)entry = entry.p; + while (entry && entry.r) entry = entry.p; // get next entry - if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { // or finish the iteration that._t = undefined; return step(1); } // return step by kind - if(kind == 'keys' )return step(0, entry.k); - if(kind == 'values')return step(0, entry.v); + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); return step(0, [entry.k, entry.v]); - }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; + /***/ }), -/* 264 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { // https://github.com/DavidBruant/Map-Set.prototype.toJSON -var classof = __webpack_require__(169) - , from = __webpack_require__(495); -module.exports = function(NAME){ - return function toJSON(){ - if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); +var classof = __webpack_require__(209); +var from = __webpack_require__(627); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); return from(this); }; }; + /***/ }), -/* 265 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var global = __webpack_require__(30) - , $export = __webpack_require__(38) - , meta = __webpack_require__(174) - , fails = __webpack_require__(57) - , hide = __webpack_require__(58) - , redefineAll = __webpack_require__(176) - , forOf = __webpack_require__(117) - , anInstance = __webpack_require__(168) - , isObject = __webpack_require__(44) - , setToStringTag = __webpack_require__(98) - , dP = __webpack_require__(45).f - , each = __webpack_require__(497)(0) - , DESCRIPTORS = __webpack_require__(49); +var global = __webpack_require__(36); +var $export = __webpack_require__(32); +var meta = __webpack_require__(215); +var fails = __webpack_require__(74); +var hide = __webpack_require__(75); +var redefineAll = __webpack_require__(218); +var forOf = __webpack_require__(118); +var anInstance = __webpack_require__(208); +var isObject = __webpack_require__(48); +var setToStringTag = __webpack_require__(124); +var dP = __webpack_require__(63).f; +var each = __webpack_require__(629)(0); +var DESCRIPTORS = __webpack_require__(68); -module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ - var Base = global[NAME] - , C = Base - , ADDER = IS_MAP ? 'set' : 'add' - , proto = C && C.prototype - , O = {}; - if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { new C().entries().next(); - }))){ + }))) { // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { - C = wrapper(function(target, iterable){ + C = wrapper(function (target, iterable) { anInstance(target, C, NAME, '_c'); - target._c = new Base; - if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); }); - each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { var IS_ADDER = KEY == 'add' || KEY == 'set'; - if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { anInstance(this, C, KEY); - if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; var result = this._c[KEY](a === 0 ? 0 : a, b); return IS_ADDER ? this : result; }); }); - if('size' in proto)dP(C.prototype, 'size', { - get: function(){ + IS_WEAK || dP(C.prototype, 'size', { + get: function () { return this._c.size; } }); @@ -68142,33 +68882,37 @@ module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ O[NAME] = C; $export($export.G + $export.W + $export.F, O); - if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); return C; }; -/***/ }), -/* 266 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(30).document && document.documentElement; /***/ }), -/* 267 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(49) && !__webpack_require__(57)(function(){ - return Object.defineProperty(__webpack_require__(170)('div'), 'a', {get: function(){ return 7; }}).a != 7; +var document = __webpack_require__(36).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(68) && !__webpack_require__(74)(function () { + return Object.defineProperty(__webpack_require__(211)('div'), 'a', { get: function () { return 7; } }).a != 7; }); + /***/ }), -/* 268 */ +/* 331 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 -module.exports = function(fn, args, that){ +module.exports = function (fn, args, that) { var un = that === undefined; - switch(args.length){ + switch (args.length) { case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) @@ -68179,353 +68923,403 @@ module.exports = function(fn, args, that){ : 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); + } return fn.apply(that, args); }; + /***/ }), -/* 269 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator -var Iterators = __webpack_require__(95) - , ITERATOR = __webpack_require__(31)('iterator') - , ArrayProto = Array.prototype; +var Iterators = __webpack_require__(119); +var ITERATOR = __webpack_require__(43)('iterator'); +var ArrayProto = Array.prototype; -module.exports = function(it){ +module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; + /***/ }), -/* 270 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) -var cof = __webpack_require__(94); -module.exports = Array.isArray || function isArray(arg){ +var cof = __webpack_require__(117); +module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; + /***/ }), -/* 271 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error -var anObject = __webpack_require__(43); -module.exports = function(iterator, fn, value, entries){ +var anObject = __webpack_require__(56); +module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) - } catch(e){ + } catch (e) { var ret = iterator['return']; - if(ret !== undefined)anObject(ret.call(iterator)); + if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; + /***/ }), -/* 272 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { -var ITERATOR = __webpack_require__(31)('iterator') - , SAFE_CLOSING = false; +var ITERATOR = __webpack_require__(43)('iterator'); +var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); - riter['return'] = function(){ SAFE_CLOSING = true; }; - Array.from(riter, function(){ throw 2; }); -} catch(e){ /* empty */ } + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } -module.exports = function(exec, skipClosing){ - if(!skipClosing && !SAFE_CLOSING)return false; +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { - var arr = [7] - , iter = arr[ITERATOR](); - iter.next = function(){ return {done: safe = true}; }; - arr[ITERATOR] = function(){ return iter; }; + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; exec(arr); - } catch(e){ /* empty */ } + } catch (e) { /* empty */ } return safe; }; + /***/ }), -/* 273 */ +/* 336 */ /***/ (function(module, exports) { -module.exports = function(done, value){ - return {value: value, done: !!done}; +module.exports = function (done, value) { + return { value: value, done: !!done }; }; + /***/ }), -/* 274 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { -var pIE = __webpack_require__(119) - , createDesc = __webpack_require__(97) - , toIObject = __webpack_require__(69) - , toPrimitive = __webpack_require__(180) - , has = __webpack_require__(68) - , IE8_DOM_DEFINE = __webpack_require__(267) - , gOPD = Object.getOwnPropertyDescriptor; +var pIE = __webpack_require__(122); +var createDesc = __webpack_require__(123); +var toIObject = __webpack_require__(89); +var toPrimitive = __webpack_require__(222); +var has = __webpack_require__(88); +var IE8_DOM_DEFINE = __webpack_require__(330); +var gOPD = Object.getOwnPropertyDescriptor; -exports.f = __webpack_require__(49) ? gOPD : function getOwnPropertyDescriptor(O, P){ +exports.f = __webpack_require__(68) ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); - if(IE8_DOM_DEFINE)try { + if (IE8_DOM_DEFINE) try { return gOPD(O, P); - } catch(e){ /* empty */ } - if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); + } catch (e) { /* empty */ } + if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; + /***/ }), -/* 275 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(277) - , hiddenKeys = __webpack_require__(171).concat('length', 'prototype'); +var $keys = __webpack_require__(340); +var hiddenKeys = __webpack_require__(212).concat('length', 'prototype'); -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; + /***/ }), -/* 276 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(68) - , toObject = __webpack_require__(78) - , IE_PROTO = __webpack_require__(177)('IE_PROTO') - , ObjectProto = Object.prototype; +var has = __webpack_require__(88); +var toObject = __webpack_require__(99); +var IE_PROTO = __webpack_require__(219)('IE_PROTO'); +var ObjectProto = Object.prototype; -module.exports = Object.getPrototypeOf || function(O){ +module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); - if(has(O, IE_PROTO))return O[IE_PROTO]; - if(typeof O.constructor == 'function' && O instanceof O.constructor){ + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; + /***/ }), -/* 277 */ +/* 340 */ /***/ (function(module, exports, __webpack_require__) { -var has = __webpack_require__(68) - , toIObject = __webpack_require__(69) - , arrayIndexOf = __webpack_require__(496)(false) - , IE_PROTO = __webpack_require__(177)('IE_PROTO'); +var has = __webpack_require__(88); +var toIObject = __webpack_require__(89); +var arrayIndexOf = __webpack_require__(628)(false); +var IE_PROTO = __webpack_require__(219)('IE_PROTO'); -module.exports = function(object, names){ - var O = toIObject(object) - , i = 0 - , result = [] - , key; - for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); // Don't enum bug & hidden keys - while(names.length > i)if(has(O, key = names[i++])){ + while (names.length > i) if (has(O, key = names[i++])) { ~arrayIndexOf(result, key) || result.push(key); } return result; }; + /***/ }), -/* 278 */ +/* 341 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives -var $export = __webpack_require__(38) - , core = __webpack_require__(22) - , fails = __webpack_require__(57); -module.exports = function(KEY, exec){ - var fn = (core.Object || {})[KEY] || Object[KEY] - , exp = {}; +var $export = __webpack_require__(32); +var core = __webpack_require__(25); +var fails = __webpack_require__(74); +module.exports = function (KEY, exec) { + var fn = (core.Object || {})[KEY] || Object[KEY]; + var exp = {}; exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; + /***/ }), -/* 279 */ +/* 342 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 343 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(58); +var anObject = __webpack_require__(56); +var isObject = __webpack_require__(48); +var newPromiseCapability = __webpack_require__(216); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + /***/ }), -/* 280 */ +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(75); + + +/***/ }), +/* 345 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var global = __webpack_require__(30) - , core = __webpack_require__(22) - , dP = __webpack_require__(45) - , DESCRIPTORS = __webpack_require__(49) - , SPECIES = __webpack_require__(31)('species'); +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(32); +var aFunction = __webpack_require__(87); +var ctx = __webpack_require__(67); +var forOf = __webpack_require__(118); -module.exports = function(KEY){ +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); + }); + } else { + forOf(source, false, A.push, A); + } + return new this(A); + } }); +}; + + +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(32); + +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; + + +/***/ }), +/* 347 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(36); +var core = __webpack_require__(25); +var dP = __webpack_require__(63); +var DESCRIPTORS = __webpack_require__(68); +var SPECIES = __webpack_require__(43)('species'); + +module.exports = function (KEY) { var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; - if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { configurable: true, - get: function(){ return this; } + get: function () { return this; } }); }; + /***/ }), -/* 281 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(56) - , invoke = __webpack_require__(268) - , html = __webpack_require__(266) - , cel = __webpack_require__(170) - , global = __webpack_require__(30) - , process = global.process - , setTask = global.setImmediate - , clearTask = global.clearImmediate - , MessageChannel = global.MessageChannel - , counter = 0 - , queue = {} - , ONREADYSTATECHANGE = 'onreadystatechange' - , defer, channel, port; -var run = function(){ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(56); +var aFunction = __webpack_require__(87); +var SPECIES = __webpack_require__(43)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 349 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(67); +var invoke = __webpack_require__(331); +var html = __webpack_require__(329); +var cel = __webpack_require__(211); +var global = __webpack_require__(36); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { var id = +this; - if(queue.hasOwnProperty(id)){ + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { var fn = queue[id]; delete queue[id]; fn(); } }; -var listener = function(event){ +var listener = function (event) { run.call(event.data); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if(!setTask || !clearTask){ - setTask = function setImmediate(fn){ - var args = [], i = 1; - while(arguments.length > i)args.push(arguments[i++]); - queue[++counter] = function(){ +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func invoke(typeof fn == 'function' ? fn : Function(fn), args); }; defer(counter); return counter; }; - clearTask = function clearImmediate(id){ + clearTask = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- - if(__webpack_require__(94)(process) == 'process'){ - defer = function(id){ + if (__webpack_require__(117)(process) == 'process') { + defer = function (id) { process.nextTick(ctx(run, id, 1)); }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; // Browsers with MessageChannel, includes WebWorkers - } else if(MessageChannel){ - channel = new MessageChannel; - port = channel.port2; + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; channel.port1.onmessage = listener; defer = ctx(port.postMessage, port, 1); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ - defer = function(id){ + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { global.postMessage(id + '', '*'); }; global.addEventListener('message', listener, false); // IE8- - } else if(ONREADYSTATECHANGE in cel('script')){ - defer = function(id){ - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run.call(id); }; }; // Rest old browsers } else { - defer = function(id){ + defer = function (id) { setTimeout(ctx(run, id, 1), 0); }; } } module.exports = { - set: setTask, + set: setTask, clear: clearTask }; -/***/ }), -/* 282 */ -/***/ (function(module, exports, __webpack_require__) { - -// Load modules - -var Crypto = __webpack_require__(14); -var Boom = __webpack_require__(114); - - -// Declare internals - -var internals = {}; - - -// Generate a cryptographically strong pseudo-random data - -exports.randomString = function (size) { - - var buffer = exports.randomBits((size + 1) * 6); - if (buffer instanceof Error) { - return buffer; - } - - var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); - return string.slice(0, size); -}; - - -exports.randomBits = function (bits) { - - if (!bits || - bits < 0) { - - return Boom.internal('Invalid random bits count'); - } - - var bytes = Math.ceil(bits / 8); - try { - return Crypto.randomBytes(bytes); - } - catch (err) { - return Boom.internal('Failed generating random bits: ' + err.message); - } -}; - - -// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match) - -exports.fixedTimeComparison = function (a, b) { - - if (typeof a !== 'string' || - typeof b !== 'string') { - - return false; - } - - var mismatch = (a.length === b.length ? 0 : 1); - if (mismatch) { - b = a; - } - - for (var i = 0, il = a.length; i < il; ++i) { - var ac = a.charCodeAt(i); - var bc = b.charCodeAt(i); - mismatch |= (ac ^ bc); - } - - return (mismatch === 0); -}; - - - /***/ }), -/* 283 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { @@ -68541,7 +69335,7 @@ exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; -exports.humanize = __webpack_require__(659); +exports.humanize = __webpack_require__(801); /** * Active `debug` instances. @@ -68756,24 +69550,30 @@ function coerce(val) { /***/ }), -/* 284 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { -var stream = __webpack_require__(70) -var eos = __webpack_require__(543) -var inherits = __webpack_require__(59) -var shift = __webpack_require__(732) +var stream = __webpack_require__(90) +var eos = __webpack_require__(158) +var inherits = __webpack_require__(76) +var shift = __webpack_require__(983) -var SIGNAL_FLUSH = new Buffer([0]) +var SIGNAL_FLUSH = (Buffer.from && Buffer.from !== Uint8Array.from) + ? Buffer.from([0]) + : new Buffer([0]) var onuncork = function(self, fn) { if (self._corked) self.once('uncork', fn) else fn() } +var autoDestroy = function (self, err) { + if (self._autoDestroy) self.destroy(err) +} + var destroyer = function(self, end) { return function(err) { - if (err) self.destroy(err.message === 'premature close' ? null : err) + if (err) autoDestroy(self, err.message === 'premature close' ? null : err) else if (end && !self._ended) self.end() } } @@ -68798,6 +69598,7 @@ var Duplexify = function(writable, readable, opts) { this._readable = null this._readable2 = null + this._autoDestroy = !opts || opts.autoDestroy !== false this._forwardDestroy = !opts || opts.destroy !== false this._forwardEnd = !opts || opts.end !== false this._corked = 1 // start corked @@ -68990,13 +69791,14 @@ module.exports = Duplexify /***/ }), -/* 285 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { -var crypto = __webpack_require__(14); -var BigInteger = __webpack_require__(62).BigInteger; -var ECPointFp = __webpack_require__(123).ECPointFp; -exports.ECCurves = __webpack_require__(545); +var crypto = __webpack_require__(21); +var BigInteger = __webpack_require__(77).BigInteger; +var ECPointFp = __webpack_require__(126).ECPointFp; +var Buffer = __webpack_require__(20).Buffer; +exports.ECCurves = __webpack_require__(682); // zero prepad function unstupid(hex,len) @@ -69035,17 +69837,17 @@ exports.ECKey = function(curve, key, isPublic) if(this.P) { // var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2); -// this.PublicKey = new Buffer("04"+pubhex,"hex"); - this.PublicKey = new Buffer(c.getCurve().encodeCompressedPointHex(this.P),"hex"); +// this.PublicKey = Buffer.from("04"+pubhex,"hex"); + this.PublicKey = Buffer.from(c.getCurve().encodeCompressedPointHex(this.P),"hex"); } if(priv) { - this.PrivateKey = new Buffer(unstupid(priv.toString(16),bytes*2),"hex"); + this.PrivateKey = Buffer.from(unstupid(priv.toString(16),bytes*2),"hex"); this.deriveSharedSecret = function(key) { if(!key || !key.P) return false; var S = key.P.multiply(priv); - return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex"); + return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex"); } } } @@ -69053,268 +69855,91 @@ exports.ECKey = function(curve, key, isPublic) /***/ }), -/* 286 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { -var once = __webpack_require__(135); +"use strict"; -var noop = function() {}; -var isRequest = function(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -}; +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; -var isChildProcess = function(stream) { - return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3 -}; - -var eos = function(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - - callback = once(callback || noop); - - var ws = stream._writableState; - var rs = stream._readableState; - var readable = opts.readable || (opts.readable !== false && stream.readable); - var writable = opts.writable || (opts.writable !== false && stream.writable); - - var onlegacyfinish = function() { - if (!stream.writable) onfinish(); - }; - - var onfinish = function() { - writable = false; - if (!readable) callback.call(stream); - }; - - var onend = function() { - readable = false; - if (!writable) callback.call(stream); - }; - - var onexit = function(exitCode) { - callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); - }; - - var onclose = function() { - if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); - }; - - var onrequest = function() { - stream.req.on('finish', onfinish); - }; - - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest(); - else stream.on('request', onrequest); - } else if (writable && !ws) { // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); +module.exports = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); } - if (isChildProcess(stream)) stream.on('exit', onexit); - - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', callback); - stream.on('close', onclose); - - return function() { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', callback); - stream.removeListener('close', onclose); - }; + return str.replace(matchOperatorsRe, '\\$&'); }; -module.exports = eos; - /***/ }), -/* 287 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { -/* - * extsprintf.js: extended POSIX-style sprintf - */ +"use strict"; -var mod_assert = __webpack_require__(36); -var mod_util = __webpack_require__(4); -/* - * Public interface - */ -exports.sprintf = jsSprintf; +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; -/* - * Stripped down version of s[n]printf(3c). We make a best effort to throw an - * exception when given a format string we don't understand, rather than - * ignoring it, so that we won't break existing programs if/when we go implement - * the rest of this. - * - * This implementation currently supports specifying - * - field alignment ('-' flag), - * - zero-pad ('0' flag) - * - always show numeric sign ('+' flag), - * - field width - * - conversions for strings, decimal integers, and floats (numbers). - * - argument size specifiers. These are all accepted but ignored, since - * Javascript has no notion of the physical size of an argument. - * - * Everything else is currently unsupported, most notably precision, unsigned - * numbers, non-decimal numbers, and characters. - */ -function jsSprintf(fmt) -{ - var regex = [ - '([^%]*)', /* normal text */ - '%', /* start of format */ - '([\'\\-+ #0]*?)', /* flags (optional) */ - '([1-9]\\d*)?', /* width (optional) */ - '(\\.([1-9]\\d*))?', /* precision (optional) */ - '[lhjztL]*?', /* length mods (ignored) */ - '([diouxXfFeEgGaAcCsSp%jr])' /* conversion */ - ].join(''); + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); - var re = new RegExp(regex); - var args = Array.prototype.slice.call(arguments, 1); - var flags, width, precision, conversion; - var left, pad, sign, arg, match; - var ret = ''; - var argn = 1; + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } - mod_assert.equal('string', typeof (fmt)); + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); - while ((match = re.exec(fmt)) !== null) { - ret += match[1]; - fmt = fmt.substring(match[0].length); + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } - flags = match[2] || ''; - width = match[3] || 0; - precision = match[4] || ''; - conversion = match[6]; - left = false; - sign = false; - pad = ' '; + if (node === null) return 'null'; - if (conversion == '%') { - ret += '%'; - continue; - } + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } - if (args.length === 0) - throw (new Error('too few args to sprintf')); + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); - arg = args.shift(); - argn++; - - if (flags.match(/[\' #]/)) - throw (new Error( - 'unsupported flags: ' + flags)); - - if (precision.length > 0) - throw (new Error( - 'non-zero precision not supported')); - - if (flags.match(/-/)) - left = true; - - if (flags.match(/0/)) - pad = '0'; - - if (flags.match(/\+/)) - sign = true; - - switch (conversion) { - case 's': - if (arg === undefined || arg === null) - throw (new Error('argument ' + argn + - ': attempted to print undefined or null ' + - 'as a string')); - ret += doPad(pad, width, left, arg.toString()); - break; - - case 'd': - arg = Math.floor(arg); - /*jsl:fallthru*/ - case 'f': - sign = sign && arg > 0 ? '+' : ''; - ret += sign + doPad(pad, width, left, - arg.toString()); - break; - - case 'j': /* non-standard */ - if (width === 0) - width = 10; - ret += mod_util.inspect(arg, false, width); - break; - - case 'r': /* non-standard */ - ret += dumpException(arg); - break; - - default: - throw (new Error('unsupported conversion: ' + - conversion)); - } - } - - ret += fmt; - return (ret); -} - -function doPad(chr, width, left, str) -{ - var ret = str; - - while (ret.length < width) { - if (left) - ret += chr; - else - ret = chr + ret; - } - - return (ret); -} - -/* - * This function dumps long stack traces for exceptions having a cause() method. - * See node-verror for an example. - */ -function dumpException(ex) -{ - var ret; - - if (!(ex instanceof Error)) - throw (new Error(jsSprintf('invalid type for %%r: %j', ex))); - - /* Note that V8 prepends "ex.stack" with ex.toString(). */ - ret = 'EXCEPTION: ' + ex.constructor.name + ': ' + ex.stack; - - if (ex.cause && typeof (ex.cause) === 'function') { - var cex = ex.cause(); - if (cex) { - ret += '\nCaused by: ' + dumpException(cex); - } - } - - return (ret); -} + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; /***/ }), -/* 288 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { module.exports = realpath @@ -69324,13 +69949,13 @@ realpath.realpathSync = realpathSync realpath.monkeypatch = monkeypatch realpath.unmonkeypatch = unmonkeypatch -var fs = __webpack_require__(10) +var fs = __webpack_require__(12) var origRealpath = fs.realpath var origRealpathSync = fs.realpathSync var version = process.version var ok = /^v[0-5]\./.test(version) -var old = __webpack_require__(564) +var old = __webpack_require__(696) function newError (er) { return er && er.syscall === 'realpath' && ( @@ -69386,7 +70011,7 @@ function unmonkeypatch () { /***/ }), -/* 289 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { exports.alphasort = alphasort @@ -69403,9 +70028,9 @@ function ownProp (obj, field) { return Object.prototype.hasOwnProperty.call(obj, field) } -var path = __webpack_require__(0) -var minimatch = __webpack_require__(134) -var isAbsolute = __webpack_require__(198) +var path = __webpack_require__(2) +var minimatch = __webpack_require__(163) +var isAbsolute = __webpack_require__(237) var Minimatch = minimatch.Minimatch function alphasorti (a, b) { @@ -69632,13 +70257,13 @@ function childrenIgnored (self, path) { /***/ }), -/* 290 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var fs = __webpack_require__(10) +var fs = __webpack_require__(12) module.exports = clone(fs) @@ -69660,15 +70285,15 @@ function clone (obj) { /***/ }), -/* 291 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { -var fs = __webpack_require__(10) -var polyfills = __webpack_require__(569) -var legacy = __webpack_require__(568) +var fs = __webpack_require__(12) +var polyfills = __webpack_require__(701) +var legacy = __webpack_require__(700) var queue = [] -var util = __webpack_require__(4) +var util = __webpack_require__(9) function noop () {} @@ -69685,11 +70310,11 @@ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { process.on('exit', function() { debug(queue) - __webpack_require__(36).equal(queue.length, 0) + __webpack_require__(49).equal(queue.length, 0) }) } -module.exports = patch(__webpack_require__(290)) +module.exports = patch(__webpack_require__(357)) if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH) { module.exports = patch(fs) } @@ -69928,1163 +70553,19 @@ function retry () { /***/ }), -/* 292 */ -/***/ (function(module, exports, __webpack_require__) { - -// Load modules - -var Crypto = __webpack_require__(14); -var Path = __webpack_require__(0); -var Util = __webpack_require__(4); -var Escape = __webpack_require__(598); - - -// Declare internals - -var internals = {}; - - -// Clone object or array - -exports.clone = function (obj, seen) { - - if (typeof obj !== 'object' || - obj === null) { - - return obj; - } - - seen = seen || { orig: [], copy: [] }; - - var lookup = seen.orig.indexOf(obj); - if (lookup !== -1) { - return seen.copy[lookup]; - } - - var newObj; - var cloneDeep = false; - - if (!Array.isArray(obj)) { - 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 = Object.getPrototypeOf(obj); - if (proto && - proto.isImmutable) { - - newObj = obj; - } - else { - newObj = Object.create(proto); - cloneDeep = true; - } - } - } - else { - newObj = []; - cloneDeep = true; - } - - seen.orig.push(obj); - seen.copy.push(newObj); - - if (cloneDeep) { - var keys = Object.getOwnPropertyNames(obj); - for (var i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; - var descriptor = Object.getOwnPropertyDescriptor(obj, key); - if (descriptor && - (descriptor.get || - descriptor.set)) { - - Object.defineProperty(newObj, key, descriptor); - } - else { - newObj[key] = exports.clone(obj[key], seen); - } - } - } - - return newObj; -}; - - -// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied -/*eslint-disable */ -exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) { -/*eslint-enable */ - exports.assert(target && typeof target === 'object', 'Invalid target value: must be an object'); - exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source value: must be null, undefined, or an object'); - - if (!source) { - return target; - } - - if (Array.isArray(source)) { - exports.assert(Array.isArray(target), 'Cannot merge array onto an object'); - if (isMergeArrays === false) { // isMergeArrays defaults to true - target.length = 0; // Must not change target assignment - } - - for (var i = 0, il = source.length; i < il; ++i) { - target.push(exports.clone(source[i])); - } - - return target; - } - - var keys = Object.keys(source); - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; - var value = source[key]; - if (value && - typeof value === 'object') { - - if (!target[key] || - typeof target[key] !== 'object' || - (Array.isArray(target[key]) ^ Array.isArray(value)) || - value instanceof Date || - Buffer.isBuffer(value) || - value instanceof RegExp) { - - target[key] = exports.clone(value); - } - else { - exports.merge(target[key], value, isNullOverride, isMergeArrays); - } - } - else { - if (value !== null && - value !== undefined) { // Explicit to preserve empty strings - - target[key] = value; - } - else if (isNullOverride !== false) { // Defaults to true - target[key] = value; - } - } - } - - return target; -}; - - -// Apply options to a copy of the defaults - -exports.applyToDefaults = function (defaults, options, isNullOverride) { - - exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object'); - exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object'); - - if (!options) { // If no options, return null - return null; - } - - var copy = exports.clone(defaults); - - if (options === true) { // If options is set to true, use defaults - return copy; - } - - return exports.merge(copy, options, isNullOverride === true, false); -}; - - -// Clone an object except for the listed keys which are shallow copied - -exports.cloneWithShallow = function (source, keys) { - - if (!source || - typeof source !== 'object') { - - return source; - } - - var storage = internals.store(source, keys); // Move shallow copy items to storage - var copy = exports.clone(source); // Deep copy the rest - internals.restore(copy, source, storage); // Shallow copy the stored items and restore - return copy; -}; - - -internals.store = function (source, keys) { - - var storage = {}; - for (var i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; - var value = exports.reach(source, key); - if (value !== undefined) { - storage[key] = value; - internals.reachSet(source, key, undefined); - } - } - - return storage; -}; - - -internals.restore = function (copy, source, storage) { - - var keys = Object.keys(storage); - for (var i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; - internals.reachSet(copy, key, storage[key]); - internals.reachSet(source, key, storage[key]); - } -}; - - -internals.reachSet = function (obj, key, value) { - - var path = key.split('.'); - var ref = obj; - for (var i = 0, il = path.length; i < il; ++i) { - var segment = path[i]; - if (i + 1 === il) { - ref[segment] = value; - } - - ref = ref[segment]; - } -}; - - -// Apply options to defaults except for the listed keys which are shallow copied from option without merging - -exports.applyToDefaultsWithShallow = function (defaults, options, keys) { - - exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object'); - exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object'); - exports.assert(keys && Array.isArray(keys), 'Invalid keys'); - - if (!options) { // If no options, return null - return null; - } - - var copy = exports.cloneWithShallow(defaults, keys); - - if (options === true) { // If options is set to true, use defaults - return copy; - } - - var storage = internals.store(options, keys); // Move shallow copy items to storage - exports.merge(copy, options, false, false); // Deep copy the rest - internals.restore(copy, options, storage); // Shallow copy the stored items and restore - return copy; -}; - - -// Deep object or array comparison - -exports.deepEqual = function (obj, ref, options, seen) { - - options = options || { prototype: true }; - - var type = typeof obj; - - if (type !== typeof ref) { - return false; - } - - if (type !== 'object' || - obj === null || - ref === null) { - - if (obj === ref) { // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql - return obj !== 0 || 1 / obj === 1 / ref; // -0 / +0 - } - - return obj !== obj && ref !== ref; // NaN - } - - seen = seen || []; - if (seen.indexOf(obj) !== -1) { - return true; // If previous comparison failed, it would have stopped execution - } - - seen.push(obj); - - if (Array.isArray(obj)) { - if (!Array.isArray(ref)) { - return false; - } - - if (!options.part && obj.length !== ref.length) { - return false; - } - - for (var i = 0, il = obj.length; i < il; ++i) { - if (options.part) { - var found = false; - for (var r = 0, rl = ref.length; r < rl; ++r) { - if (exports.deepEqual(obj[i], ref[r], options, seen)) { - found = true; - break; - } - } - - return found; - } - - if (!exports.deepEqual(obj[i], ref[i], options, seen)) { - return false; - } - } - - return true; - } - - if (Buffer.isBuffer(obj)) { - if (!Buffer.isBuffer(ref)) { - return false; - } - - if (obj.length !== ref.length) { - return false; - } - - for (var j = 0, jl = obj.length; j < jl; ++j) { - if (obj[j] !== ref[j]) { - return false; - } - } - - return true; - } - - if (obj instanceof Date) { - return (ref instanceof Date && obj.getTime() === ref.getTime()); - } - - if (obj instanceof RegExp) { - return (ref instanceof RegExp && obj.toString() === ref.toString()); - } - - if (options.prototype) { - if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) { - return false; - } - } - - var keys = Object.getOwnPropertyNames(obj); - - if (!options.part && keys.length !== Object.getOwnPropertyNames(ref).length) { - return false; - } - - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; - var descriptor = Object.getOwnPropertyDescriptor(obj, key); - if (descriptor.get) { - if (!exports.deepEqual(descriptor, Object.getOwnPropertyDescriptor(ref, key), options, seen)) { - return false; - } - } - else if (!exports.deepEqual(obj[key], ref[key], options, seen)) { - return false; - } - } - - return true; -}; - - -// Remove duplicate items from array - -exports.unique = function (array, key) { - - var index = {}; - var result = []; - - for (var i = 0, il = array.length; i < il; ++i) { - var id = (key ? array[i][key] : array[i]); - if (index[id] !== true) { - - result.push(array[i]); - index[id] = true; - } - } - - return result; -}; - - -// Convert array into object - -exports.mapToObject = function (array, key) { - - if (!array) { - return null; - } - - var obj = {}; - for (var i = 0, il = array.length; i < il; ++i) { - if (key) { - if (array[i][key]) { - obj[array[i][key]] = true; - } - } - else { - obj[array[i]] = true; - } - } - - return obj; -}; - - -// Find the common unique items in two arrays - -exports.intersect = function (array1, array2, justFirst) { - - if (!array1 || !array2) { - return []; - } - - var common = []; - var hash = (Array.isArray(array1) ? exports.mapToObject(array1) : array1); - var found = {}; - for (var i = 0, il = array2.length; i < il; ++i) { - if (hash[array2[i]] && !found[array2[i]]) { - if (justFirst) { - return array2[i]; - } - - common.push(array2[i]); - found[array2[i]] = true; - } - } - - return (justFirst ? null : common); -}; - - -// Test if the reference contains the values - -exports.contain = function (ref, values, options) { - - /* - string -> string(s) - array -> item(s) - object -> key(s) - object -> object (key:value) - */ - - var valuePairs = null; - if (typeof ref === 'object' && - typeof values === 'object' && - !Array.isArray(ref) && - !Array.isArray(values)) { - - valuePairs = values; - values = Object.keys(values); - } - else { - values = [].concat(values); - } - - options = options || {}; // deep, once, only, part - - exports.assert(arguments.length >= 2, 'Insufficient arguments'); - exports.assert(typeof ref === 'string' || typeof ref === 'object', 'Reference must be string or an object'); - exports.assert(values.length, 'Values array cannot be empty'); - - var compare, compareFlags; - if (options.deep) { - compare = exports.deepEqual; - - var hasOnly = options.hasOwnProperty('only'), hasPart = options.hasOwnProperty('part'); - - compareFlags = { - prototype: hasOnly ? options.only : hasPart ? !options.part : false, - part: hasOnly ? !options.only : hasPart ? options.part : true - }; - } - else { - compare = function (a, b) { - - return a === b; - }; - } - - var misses = false; - var matches = new Array(values.length); - for (var i = 0, il = matches.length; i < il; ++i) { - matches[i] = 0; - } - - if (typeof ref === 'string') { - var pattern = '('; - for (i = 0, il = values.length; i < il; ++i) { - var value = values[i]; - exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value'); - pattern += (i ? '|' : '') + exports.escapeRegex(value); - } - - var regex = new RegExp(pattern + ')', 'g'); - var leftovers = ref.replace(regex, function ($0, $1) { - - var index = values.indexOf($1); - ++matches[index]; - return ''; // Remove from string - }); - - misses = !!leftovers; - } - else if (Array.isArray(ref)) { - for (i = 0, il = ref.length; i < il; ++i) { - for (var j = 0, jl = values.length, matched = false; j < jl && matched === false; ++j) { - matched = compare(values[j], ref[i], compareFlags) && j; - } - - if (matched !== false) { - ++matches[matched]; - } - else { - misses = true; - } - } - } - else { - var keys = Object.keys(ref); - for (i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; - var pos = values.indexOf(key); - if (pos !== -1) { - if (valuePairs && - !compare(valuePairs[key], ref[key], compareFlags)) { - - return false; - } - - ++matches[pos]; - } - else { - misses = true; - } - } - } - - var result = false; - for (i = 0, il = matches.length; i < il; ++i) { - result = result || !!matches[i]; - if ((options.once && matches[i] > 1) || - (!options.part && !matches[i])) { - - return false; - } - } - - if (options.only && - misses) { - - return false; - } - - return result; -}; - - -// Flatten array - -exports.flatten = function (array, target) { - - var result = target || []; - - for (var i = 0, il = array.length; i < il; ++i) { - if (Array.isArray(array[i])) { - exports.flatten(array[i], result); - } - else { - result.push(array[i]); - } - } - - return result; -}; - - -// Convert an object key chain string ('a.b.c') to reference (object[a][b][c]) - -exports.reach = function (obj, chain, options) { - - if (chain === false || - chain === null || - typeof chain === 'undefined') { - - return obj; - } - - options = options || {}; - if (typeof options === 'string') { - options = { separator: options }; - } - - var path = chain.split(options.separator || '.'); - var ref = obj; - for (var i = 0, il = path.length; i < il; ++i) { - var key = path[i]; - if (key[0] === '-' && Array.isArray(ref)) { - key = key.slice(1, key.length); - key = ref.length - key; - } - - if (!ref || - !ref.hasOwnProperty(key) || - (typeof ref !== 'object' && options.functions === false)) { // Only object and function can have properties - - exports.assert(!options.strict || i + 1 === il, 'Missing segment', key, 'in reach path ', chain); - exports.assert(typeof ref === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain); - ref = options.default; - break; - } - - ref = ref[key]; - } - - return ref; -}; - - -exports.reachTemplate = function (obj, template, options) { - - return template.replace(/{([^}]+)}/g, function ($0, chain) { - - var value = exports.reach(obj, chain, options); - return (value === undefined || value === null ? '' : value); - }); -}; - - -exports.formatStack = function (stack) { - - var trace = []; - for (var i = 0, il = stack.length; i < il; ++i) { - var item = stack[i]; - trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]); - } - - return trace; -}; - - -exports.formatTrace = function (trace) { - - var display = []; - - for (var i = 0, il = trace.length; i < il; ++i) { - var row = trace[i]; - display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')'); - } - - return display; -}; - - -exports.callStack = function (slice) { - - // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi - - var v8 = Error.prepareStackTrace; - Error.prepareStackTrace = function (err, stack) { - - return stack; - }; - - var capture = {}; - Error.captureStackTrace(capture, arguments.callee); /*eslint no-caller:0 */ - var stack = capture.stack; - - Error.prepareStackTrace = v8; - - var trace = exports.formatStack(stack); - - if (slice) { - return trace.slice(slice); - } - - return trace; -}; - - -exports.displayStack = function (slice) { - - var trace = exports.callStack(slice === undefined ? 1 : slice + 1); - - return exports.formatTrace(trace); -}; - - -exports.abortThrow = false; - - -exports.abort = function (message, hideStack) { - - if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) { - throw new Error(message || 'Unknown error'); - } - - var stack = ''; - if (!hideStack) { - stack = exports.displayStack(1).join('\n\t'); - } - console.log('ABORT: ' + message + '\n\t' + stack); - process.exit(1); -}; - - -exports.assert = function (condition /*, msg1, msg2, msg3 */) { - - if (condition) { - return; - } - - if (arguments.length === 2 && arguments[1] instanceof Error) { - throw arguments[1]; - } - - var msgs = []; - for (var i = 1, il = arguments.length; i < il; ++i) { - if (arguments[i] !== '') { - msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations - } - } - - msgs = msgs.map(function (msg) { - - return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg); - }); - throw new Error(msgs.join(' ') || 'Unknown error'); -}; - - -exports.Timer = function () { - - this.ts = 0; - this.reset(); -}; - - -exports.Timer.prototype.reset = function () { - - this.ts = Date.now(); -}; - - -exports.Timer.prototype.elapsed = function () { - - return Date.now() - this.ts; -}; - - -exports.Bench = function () { - - this.ts = 0; - this.reset(); -}; - - -exports.Bench.prototype.reset = function () { - - this.ts = exports.Bench.now(); -}; - - -exports.Bench.prototype.elapsed = function () { - - return exports.Bench.now() - this.ts; -}; - - -exports.Bench.now = function () { - - var ts = process.hrtime(); - return (ts[0] * 1e3) + (ts[1] / 1e6); -}; - - -// Escape string for Regex construction - -exports.escapeRegex = function (string) { - - // Escape ^$.*+-?=!:|\/()[]{}, - return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&'); -}; - - -// Base64url (RFC 4648) encode - -exports.base64urlEncode = function (value, encoding) { - - var buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary')); - return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, ''); -}; - - -// Base64url (RFC 4648) decode - -exports.base64urlDecode = function (value, encoding) { - - if (value && - !/^[\w\-]*$/.test(value)) { - - return new Error('Invalid character'); - } - - try { - var buf = new Buffer(value, 'base64'); - return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary')); - } - catch (err) { - return err; - } -}; - - -// Escape attribute value for use in HTTP header - -exports.escapeHeaderAttribute = function (attribute) { - - // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, " - - exports.assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')'); - - return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash -}; - - -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 = false; - var wrapped = function () { - - if (!once) { - once = true; - method.apply(null, arguments); - } - }; - - wrapped._hoekOnce = true; - - return wrapped; -}; - - -exports.isAbsolutePath = function (path, platform) { - - if (!path) { - return false; - } - - if (Path.isAbsolute) { // node >= 0.11 - return Path.isAbsolute(path); - } - - platform = platform || process.platform; - - // Unix - - if (platform !== 'win32') { - return path[0] === '/'; - } - - // Windows - - return !!/^(?:[a-zA-Z]:[\\\/])|(?:[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/])/.test(path); // C:\ or \\something\something -}; - - -exports.isInteger = function (value) { - - return (typeof value === 'number' && - parseFloat(value) === parseInt(value, 10) && - !isNaN(value)); -}; - - -exports.ignore = function () { }; - - -exports.inherits = Util.inherits; - - -exports.format = Util.format; - - -exports.transform = function (source, transform, options) { - - exports.assert(source === null || source === undefined || typeof source === 'object' || Array.isArray(source), 'Invalid source object: must be null, undefined, an object, or an array'); - - if (Array.isArray(source)) { - var results = []; - for (var i = 0, il = source.length; i < il; ++i) { - results.push(exports.transform(source[i], transform, options)); - } - return results; - } - - var result = {}; - var keys = Object.keys(transform); - - for (var k = 0, kl = keys.length; k < kl; ++k) { - var key = keys[k]; - var path = key.split('.'); - var sourcePath = transform[key]; - - exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings'); - - var segment; - var res = result; - - while (path.length > 1) { - segment = path.shift(); - if (!res[segment]) { - res[segment] = {}; - } - res = res[segment]; - } - segment = path.shift(); - res[segment] = exports.reach(source, sourcePath, options); - } - - return result; -}; - - -exports.uniqueFilename = function (path, extension) { - - if (extension) { - extension = extension[0] !== '.' ? '.' + extension : extension; - } - else { - 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 JSON.stringify.apply(null, arguments); - } - catch (err) { - return '[Cannot display object: ' + err.message + ']'; - } -}; - - -exports.shallow = function (source) { - - var target = {}; - var keys = Object.keys(source); - for (var i = 0, il = keys.length; i < il; ++i) { - var key = keys[i]; - target[key] = source[key]; - } - - return target; -}; +/* 359 */ +/***/ (function(module, exports) { +module.exports = [["0","\u0000",127],["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],["a3a1","ㄐ",25,"˙ˉˊˇˋ"],["a3e1","€"],["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]] /***/ }), -/* 293 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var _ = __webpack_require__(32); -var MuteStream = __webpack_require__(299); -var readline = __webpack_require__(145); - -/** - * Base interface class other can inherits from - */ - -var UI = module.exports = function (opt) { - // Instantiate the Readline interface - // @Note: Don't reassign if already present (allow test to override the Stream) - if (!this.rl) { - this.rl = readline.createInterface(setupReadlineOptions(opt)); - } - this.rl.resume(); - - this.onForceClose = this.onForceClose.bind(this); - - // Make sure new prompt start on a newline when closing - this.rl.on('SIGINT', this.onForceClose); - process.on('exit', this.onForceClose); -}; - -/** - * Handle the ^C exit - * @return {null} - */ - -UI.prototype.onForceClose = function () { - this.close(); - console.log(''); -}; - -/** - * Close the interface and cleanup listeners - */ - -UI.prototype.close = function () { - // Remove events listeners - this.rl.removeListener('SIGINT', this.onForceClose); - process.removeListener('exit', this.onForceClose); - - this.rl.output.unmute(); - - if (this.activePrompt && typeof this.activePrompt.close === 'function') { - this.activePrompt.close(); - } - - // Close the readline - this.rl.output.end(); - this.rl.pause(); - this.rl.close(); -}; - -function setupReadlineOptions(opt) { - opt = opt || {}; - - // Default `input` to stdin - var input = opt.input || process.stdin; - - // Add mute capabilities to the output - var ms = new MuteStream(); - ms.pipe(opt.output || process.stdout); - var output = ms; - - return _.extend({ - terminal: true, - input: input, - output: output - }, _.omit(opt, ['input', 'output'])); -} +/* 360 */ +/***/ (function(module, exports) { +module.exports = [["a140","",62],["a180","",32],["a240","",62],["a280","",32],["a2ab","",5],["a2e3","€"],["a2ef",""],["a2fd",""],["a340","",62],["a380","",31," "],["a440","",62],["a480","",32],["a4f4","",10],["a540","",62],["a580","",32],["a5f7","",7],["a640","",62],["a680","",32],["a6b9","",7],["a6d9","",6],["a6ec",""],["a6f3",""],["a6f6","",8],["a740","",62],["a780","",32],["a7c2","",14],["a7f2","",12],["a896","",10],["a8bc",""],["a8bf","ǹ"],["a8c1",""],["a8ea","",20],["a958",""],["a95b",""],["a95d",""],["a989","〾⿰",11],["a997","",12],["a9f0","",14],["aaa1","",93],["aba1","",93],["aca1","",93],["ada1","",93],["aea1","",93],["afa1","",93],["d7fa","",4],["f8a1","",93],["f9a1","",93],["faa1","",93],["fba1","",93],["fca1","",93],["fda1","",93],["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]] /***/ }), -/* 294 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var ansiEscapes = __webpack_require__(376); - -/** - * Move cursor left by `x` - * @param {Readline} rl - Readline instance - * @param {Number} x - How far to go left (default to 1) - */ - -exports.left = function (rl, x) { - rl.output.write(ansiEscapes.cursorBackward(x)); -}; - -/** - * Move cursor right by `x` - * @param {Readline} rl - Readline instance - * @param {Number} x - How far to go left (default to 1) - */ - -exports.right = function (rl, x) { - rl.output.write(ansiEscapes.cursorForward(x)); -}; - -/** - * Move cursor up by `x` - * @param {Readline} rl - Readline instance - * @param {Number} x - How far to go up (default to 1) - */ - -exports.up = function (rl, x) { - rl.output.write(ansiEscapes.cursorUp(x)); -}; - -/** - * Move cursor down by `x` - * @param {Readline} rl - Readline instance - * @param {Number} x - How far to go down (default to 1) - */ - -exports.down = function (rl, x) { - rl.output.write(ansiEscapes.cursorDown(x)); -}; - -/** - * Clear current line - * @param {Readline} rl - Readline instance - * @param {Number} len - number of line to delete - */ -exports.clearLine = function (rl, len) { - rl.output.write(ansiEscapes.eraseLines(len)); -}; - - -/***/ }), -/* 295 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * is-primitive - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ - - - -// see http://jsperf.com/testing-value-is-primitive/7 -module.exports = function isPrimitive(value) { - return value == null || (typeof value !== 'function' && typeof value !== 'object'); -}; - - -/***/ }), -/* 296 */ +/* 361 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -71095,10 +70576,10 @@ module.exports = Array.isArray || function (arr) { /***/ }), -/* 297 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { -var stream = __webpack_require__(29) +var stream = __webpack_require__(34) function isStream (obj) { @@ -71128,7 +70609,7 @@ module.exports.isDuplex = isDuplex /***/ }), -/* 298 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71146,16 +70627,16 @@ module.exports.isDuplex = isDuplex * @private */ -var db = __webpack_require__(657) -var extname = __webpack_require__(0).extname +var db = __webpack_require__(798) +var extname = __webpack_require__(2).extname /** * Module variables. * @private */ -var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/ -var textTypeRegExp = /^text\//i +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i /** * Module exports. @@ -71186,7 +70667,7 @@ function charset (type) { } // TODO: use media-typer - var match = extractTypeRegExp.exec(type) + var match = EXTRACT_TYPE_REGEXP.exec(type) var mime = match && db[match[1].toLowerCase()] if (mime && mime.charset) { @@ -71194,7 +70675,7 @@ function charset (type) { } // default text/* to utf-8 - if (match && textTypeRegExp.test(match[1])) { + if (match && TEXT_TYPE_REGEXP.test(match[1])) { return 'UTF-8' } @@ -71244,7 +70725,7 @@ function extension (type) { } // TODO: use media-typer - var match = extractTypeRegExp.exec(type) + var match = EXTRACT_TYPE_REGEXP.exec(type) // get extensions var exts = match && exports.extensions[match[1].toLowerCase()] @@ -71323,10 +70804,10 @@ function populateMaps (extensions, types) { /***/ }), -/* 299 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { -var Stream = __webpack_require__(29) +var Stream = __webpack_require__(34) module.exports = MuteStream @@ -71474,7 +70955,177 @@ MuteStream.prototype.close = proxy('close') /***/ }), -/* 300 */ +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const url = __webpack_require__(29); +const punycode = __webpack_require__(263); +const queryString = __webpack_require__(826); +const prependHttp = __webpack_require__(817); +const sortKeys = __webpack_require__(975); + +const DEFAULT_PORTS = { + 'http:': 80, + 'https:': 443, + 'ftp:': 21 +}; + +// Protocols that always contain a `//`` bit +const slashedProtocol = { + http: true, + https: true, + ftp: true, + gopher: true, + file: true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true +}; + +function testParameter(name, filters) { + return filters.some(filter => filter instanceof RegExp ? filter.test(name) : filter === name); +} + +module.exports = (str, opts) => { + opts = Object.assign({ + normalizeProtocol: true, + normalizeHttps: false, + stripFragment: true, + stripWWW: true, + removeQueryParameters: [/^utm_\w+/i], + removeTrailingSlash: true, + removeDirectoryIndex: false, + sortQueryParameters: true + }, opts); + + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + const hasRelativeProtocol = str.startsWith('//'); + + // Prepend protocol + str = prependHttp(str.trim()).replace(/^\/\//, 'http://'); + + const urlObj = url.parse(str); + + if (opts.normalizeHttps && urlObj.protocol === 'https:') { + urlObj.protocol = 'http:'; + } + + if (!urlObj.hostname && !urlObj.pathname) { + throw new Error('Invalid URL'); + } + + // Prevent these from being used by `url.format` + delete urlObj.host; + delete urlObj.query; + + // Remove fragment + if (opts.stripFragment) { + delete urlObj.hash; + } + + // Remove default port + const port = DEFAULT_PORTS[urlObj.protocol]; + if (Number(urlObj.port) === port) { + delete urlObj.port; + } + + // Remove duplicate slashes + if (urlObj.pathname) { + urlObj.pathname = urlObj.pathname.replace(/\/{2,}/g, '/'); + } + + // Decode URI octets + if (urlObj.pathname) { + urlObj.pathname = decodeURI(urlObj.pathname); + } + + // Remove directory index + if (opts.removeDirectoryIndex === true) { + opts.removeDirectoryIndex = [/^index\.[a-z]+$/]; + } + + if (Array.isArray(opts.removeDirectoryIndex) && opts.removeDirectoryIndex.length > 0) { + let pathComponents = urlObj.pathname.split('/'); + const lastComponent = pathComponents[pathComponents.length - 1]; + + if (testParameter(lastComponent, opts.removeDirectoryIndex)) { + pathComponents = pathComponents.slice(0, pathComponents.length - 1); + urlObj.pathname = pathComponents.slice(1).join('/') + '/'; + } + } + + // Resolve relative paths, but only for slashed protocols + if (slashedProtocol[urlObj.protocol]) { + const domain = urlObj.protocol + '//' + urlObj.hostname; + const relative = url.resolve(domain, urlObj.pathname); + urlObj.pathname = relative.replace(domain, ''); + } + + if (urlObj.hostname) { + // IDN to Unicode + urlObj.hostname = punycode.toUnicode(urlObj.hostname).toLowerCase(); + + // Remove trailing dot + urlObj.hostname = urlObj.hostname.replace(/\.$/, ''); + + // Remove `www.` + if (opts.stripWWW) { + urlObj.hostname = urlObj.hostname.replace(/^www\./, ''); + } + } + + // Remove URL with empty query string + if (urlObj.search === '?') { + delete urlObj.search; + } + + const queryParameters = queryString.parse(urlObj.search); + + // Remove query unwanted parameters + if (Array.isArray(opts.removeQueryParameters)) { + for (const key in queryParameters) { + if (testParameter(key, opts.removeQueryParameters)) { + delete queryParameters[key]; + } + } + } + + // Sort query parameters + if (opts.sortQueryParameters) { + urlObj.search = queryString.stringify(sortKeys(queryParameters)); + } + + // Decode query parameters + if (urlObj.search !== null) { + urlObj.search = decodeURIComponent(urlObj.search); + } + + // Take advantage of many of the Node `url` normalizations + str = url.format(urlObj); + + // Remove ending `/` + if (opts.removeTrailingSlash || urlObj.pathname === '/') { + str = str.replace(/\/$/, ''); + } + + // Restore relative protocol, if applicable + if (hasRelativeProtocol && !opts.normalizeProtocol) { + str = str.replace(/^http:\/\//, '//'); + } + + return str; +}; + + +/***/ }), +/* 366 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory){ @@ -71775,93 +71426,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 301 */ -/***/ (function(module, exports, __webpack_require__) { - -var once = __webpack_require__(135) -var eos = __webpack_require__(286) -var fs = __webpack_require__(10) // we only need fs to get the ReadStream and WriteStream prototypes - -var noop = function () {} - -var isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - if (!fs) return false // browser - return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) -} - -var isRequest = function (stream) { - return stream.setHeader && isFn(stream.abort) -} - -var destroyer = function (stream, reading, writing, callback) { - callback = once(callback) - - var closed = false - stream.on('close', function () { - closed = true - }) - - eos(stream, {readable: reading, writable: writing}, function (err) { - if (err) return callback(err) - closed = true - callback() - }) - - var destroyed = false - return function (err) { - if (closed) return - if (destroyed) return - destroyed = true - - if (isFS(stream)) return stream.close() // use close for fs streams to avoid fd leaks - if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want - - if (isFn(stream.destroy)) return stream.destroy() - - callback(err || new Error('stream was destroyed')) - } -} - -var call = function (fn) { - fn() -} - -var pipe = function (from, to) { - return from.pipe(to) -} - -var pump = function () { - var streams = Array.prototype.slice.call(arguments) - var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop - - if (Array.isArray(streams[0])) streams = streams[0] - if (streams.length < 2) throw new Error('pump requires two streams per minimum') - - var error - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1 - var writing = i > 0 - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err - if (err) destroys.forEach(call) - if (reading) return - destroys.forEach(call) - callback(error) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump - - -/***/ }), -/* 302 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71886,15 +71451,15 @@ module.exports = { /***/ }), -/* 303 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var stringify = __webpack_require__(679); -var parse = __webpack_require__(678); -var formats = __webpack_require__(302); +var stringify = __webpack_require__(825); +var parse = __webpack_require__(824); +var formats = __webpack_require__(367); module.exports = { formats: formats, @@ -71904,7 +71469,7 @@ module.exports = { /***/ }), -/* 304 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -71921,7 +71486,30 @@ var hexTable = (function () { return array; }()); -exports.arrayToObject = function (source, options) { +var compactQueue = function compactQueue(queue) { + var obj; + + while (queue.length) { + var item = queue.pop(); + obj = item.obj[item.prop]; + + if (Array.isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } + + return obj; +}; + +var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? Object.create(null) : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== 'undefined') { @@ -71932,7 +71520,7 @@ exports.arrayToObject = function (source, options) { return obj; }; -exports.merge = function (target, source, options) { +var merge = function merge(target, source, options) { if (!source) { return target; } @@ -71957,14 +71545,14 @@ exports.merge = function (target, source, options) { var mergeTarget = target; if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = exports.arrayToObject(target, options); + mergeTarget = arrayToObject(target, options); } if (Array.isArray(target) && Array.isArray(source)) { source.forEach(function (item, i) { if (has.call(target, i)) { if (target[i] && typeof target[i] === 'object') { - target[i] = exports.merge(target[i], item, options); + target[i] = merge(target[i], item, options); } else { target.push(item); } @@ -71978,8 +71566,8 @@ exports.merge = function (target, source, options) { return Object.keys(source).reduce(function (acc, key) { var value = source[key]; - if (Object.prototype.hasOwnProperty.call(acc, key)) { - acc[key] = exports.merge(acc[key], value, options); + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); } else { acc[key] = value; } @@ -71987,7 +71575,14 @@ exports.merge = function (target, source, options) { }, mergeTarget); }; -exports.decode = function (str) { +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str) { try { return decodeURIComponent(str.replace(/\+/g, ' ')); } catch (e) { @@ -71995,7 +71590,7 @@ exports.decode = function (str) { } }; -exports.encode = function (str) { +var encode = function encode(str) { // This code was originally written by Brian White (mscdex) for the io.js core querystring library. // It has been adapted here for stricter adherence to RFC 3986 if (str.length === 0) { @@ -72009,13 +71604,13 @@ exports.encode = function (str) { var c = string.charCodeAt(i); if ( - c === 0x2D || // - - c === 0x2E || // . - c === 0x5F || // _ - c === 0x7E || // ~ - (c >= 0x30 && c <= 0x39) || // 0-9 - (c >= 0x41 && c <= 0x5A) || // a-z - (c >= 0x61 && c <= 0x7A) // A-Z + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z ) { out += string.charAt(i); continue; @@ -72038,52 +71633,42 @@ exports.encode = function (str) { i += 1; c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] + hexTable[0x80 | ((c >> 12) & 0x3F)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]; // eslint-disable-line max-len + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; } return out; }; -exports.compact = function (obj, references) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; - var refs = references || []; - var lookup = refs.indexOf(obj); - if (lookup !== -1) { - return refs[lookup]; - } + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; - refs.push(obj); - - if (Array.isArray(obj)) { - var compacted = []; - - for (var i = 0; i < obj.length; ++i) { - if (obj[i] && typeof obj[i] === 'object') { - compacted.push(exports.compact(obj[i], refs)); - } else if (typeof obj[i] !== 'undefined') { - compacted.push(obj[i]); + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); } } - - return compacted; } - var keys = Object.keys(obj); - keys.forEach(function (key) { - obj[key] = exports.compact(obj[key], refs); - }); - - return obj; + return compactQueue(queue); }; -exports.isRegExp = function (obj) { +var isRegExp = function isRegExp(obj) { return Object.prototype.toString.call(obj) === '[object RegExp]'; }; -exports.isBuffer = function (obj) { +var isBuffer = function isBuffer(obj) { if (obj === null || typeof obj === 'undefined') { return false; } @@ -72091,22 +71676,55 @@ exports.isBuffer = function (obj) { return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); }; +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + merge: merge +}; + /***/ }), -/* 305 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +/**/ + +var pna = __webpack_require__(164); +/**/ + module.exports = Readable; /**/ -var processNextTick = __webpack_require__(199); -/**/ - -/**/ -var isArray = __webpack_require__(296); +var isArray = __webpack_require__(361); /**/ /**/ @@ -72116,7 +71734,7 @@ var Duplex; Readable.ReadableState = ReadableState; /**/ -var EE = __webpack_require__(72).EventEmitter; +var EE = __webpack_require__(92).EventEmitter; var EElistenerCount = function (emitter, type) { return emitter.listeners(type).length; @@ -72124,21 +71742,29 @@ var EElistenerCount = function (emitter, type) { /**/ /**/ -var Stream = __webpack_require__(308); -/**/ - -var Buffer = __webpack_require__(105).Buffer; -/**/ -var bufferShim = __webpack_require__(166); +var Stream = __webpack_require__(374); /**/ /**/ -var util = __webpack_require__(100); -util.inherits = __webpack_require__(59); + +var Buffer = __webpack_require__(58).Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + /**/ /**/ -var debugUtil = __webpack_require__(4); +var util = __webpack_require__(101); +util.inherits = __webpack_require__(76); +/**/ + +/**/ +var debugUtil = __webpack_require__(9); var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); @@ -72147,7 +71773,8 @@ if (debugUtil && debugUtil.debuglog) { } /**/ -var BufferList = __webpack_require__(686); +var BufferList = __webpack_require__(833); +var destroyImpl = __webpack_require__(373); var StringDecoder; util.inherits(Readable, Stream); @@ -72157,36 +71784,43 @@ var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; function prependListener(emitter, event, fn) { // Sadly this is not cacheable as some libraries bundle their own // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') { - return emitter.prependListener(event, fn); - } else { - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; - } + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; } function ReadableState(options, stream) { - Duplex = Duplex || __webpack_require__(81); + Duplex = Duplex || __webpack_require__(103); options = options || {}; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + // object stream flag. Used to make read(n) ignore n and to // make all the buffer merging and length checks go away this.objectMode = !!options.objectMode; - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer // Note: 0 is a valid value, means "don't call _read preemptively ever" var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; // cast to ints. - this.highWaterMark = ~~this.highWaterMark; + this.highWaterMark = Math.floor(this.highWaterMark); // A linked list is used to store data chunks instead of an array because the // linked list can remove elements from the beginning faster than @@ -72200,10 +71834,10 @@ function ReadableState(options, stream) { this.endEmitted = false; this.reading = false; - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. this.sync = true; // whenever we return null, then we set a flag to say @@ -72213,15 +71847,14 @@ function ReadableState(options, stream) { this.readableListening = false; this.resumeScheduled = false; + // has it been destroyed + this.destroyed = false; + // Crypto is kind of old and crusty. Historically, its default string // encoding is 'binary' so we have to make this configurable. // Everything else in the universe uses 'utf8', though. this.defaultEncoding = options.defaultEncoding || 'utf8'; - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - // the number of writers that are awaiting a drain event in .pipe()s this.awaitDrain = 0; @@ -72231,14 +71864,14 @@ function ReadableState(options, stream) { this.decoder = null; this.encoding = null; if (options.encoding) { - if (!StringDecoder) StringDecoder = __webpack_require__(309).StringDecoder; + if (!StringDecoder) StringDecoder = __webpack_require__(422).StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } function Readable(options) { - Duplex = Duplex || __webpack_require__(81); + Duplex = Duplex || __webpack_require__(103); if (!(this instanceof Readable)) return new Readable(options); @@ -72247,87 +71880,129 @@ function Readable(options) { // legacy this.readable = true; - if (options && typeof options.read === 'function') this._read = options.read; + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } Stream.call(this); } +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + // Manually shove something into the read() buffer. // This returns true if the highWaterMark has not been hit yet, // similar to how Writable.write() returns true if you should // write() some more. Readable.prototype.push = function (chunk, encoding) { var state = this._readableState; + var skipChunkCheck; - if (!state.objectMode && typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = bufferShim.from(chunk, encoding); - encoding = ''; + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; } + } else { + skipChunkCheck = true; } - return readableAddChunk(this, state, chunk, encoding, false); + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); }; // Unshift should *always* be something directly out of read() Readable.prototype.unshift = function (chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); + return readableAddChunk(this, chunk, null, true, false); }; -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null) { +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { state.reading = false; 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 { - var skipAdd; - if (state.decoder && !addToFront && !encoding) { - chunk = state.decoder.write(chunk); - skipAdd = !state.objectMode && chunk.length === 0; + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); } - if (!addToFront) state.reading = false; - - // Don't add to the buffer if we've decoded to an empty string chunk and - // we're not in object mode - if (!skipAdd) { - // if we want the data now, just emit it. - if (state.flowing && state.length === 0 && !state.sync) { - stream.emit('data', chunk); - stream.read(0); + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - - if (state.needReadable) emitReadable(stream); + addChunk(stream, state, chunk, false); } } - - maybeReadMore(stream, state); + } else if (!addToFront) { + state.reading = false; } - } else if (!addToFront) { - state.reading = false; } return needMoreData(state); } +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + // if it's past the high water mark, we can push in some more. // Also, if we have no data yet, we can stand some // more bytes. This is to work around cases where hwm=0, @@ -72339,9 +72014,13 @@ function needMoreData(state) { return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); } +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + // backwards compatibility. Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = __webpack_require__(309).StringDecoder; + if (!StringDecoder) StringDecoder = __webpack_require__(422).StringDecoder; this._readableState.decoder = new StringDecoder(enc); this._readableState.encoding = enc; return this; @@ -72487,14 +72166,6 @@ Readable.prototype.read = function (n) { return ret; }; -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - function onEofChunk(stream, state) { if (state.ended) return; if (state.decoder) { @@ -72519,7 +72190,7 @@ function emitReadable(stream) { if (!state.emittedReadable) { debug('emitReadable', state.flowing); state.emittedReadable = true; - if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); } } @@ -72538,7 +72209,7 @@ function emitReadable_(stream) { function maybeReadMore(stream, state) { if (!state.readingMore) { state.readingMore = true; - processNextTick(maybeReadMore_, stream, state); + pna.nextTick(maybeReadMore_, stream, state); } } @@ -72582,14 +72253,17 @@ Readable.prototype.pipe = function (dest, pipeOpts) { var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); dest.on('unpipe', onunpipe); - function onunpipe(readable) { + function onunpipe(readable, unpipeInfo) { debug('onunpipe'); if (readable === src) { - cleanup(); + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } } } @@ -72615,7 +72289,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { dest.removeListener('error', onerror); dest.removeListener('unpipe', onunpipe); src.removeListener('end', onend); - src.removeListener('end', cleanup); + src.removeListener('end', unpipe); src.removeListener('data', ondata); cleanedUp = true; @@ -72708,6 +72382,7 @@ function pipeOnDrain(src) { Readable.prototype.unpipe = function (dest) { var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; // if we're not piping anywhere, then do nothing. if (state.pipesCount === 0) return this; @@ -72723,7 +72398,7 @@ Readable.prototype.unpipe = function (dest) { state.pipes = null; state.pipesCount = 0; state.flowing = false; - if (dest) dest.emit('unpipe', this); + if (dest) dest.emit('unpipe', this, unpipeInfo); return this; } @@ -72738,7 +72413,7 @@ Readable.prototype.unpipe = function (dest) { state.flowing = false; for (var i = 0; i < len; i++) { - dests[i].emit('unpipe', this); + dests[i].emit('unpipe', this, unpipeInfo); }return this; } @@ -72750,7 +72425,7 @@ Readable.prototype.unpipe = function (dest) { state.pipesCount -= 1; if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this); + dest.emit('unpipe', this, unpipeInfo); return this; }; @@ -72769,9 +72444,9 @@ Readable.prototype.on = function (ev, fn) { state.readableListening = state.needReadable = true; state.emittedReadable = false; if (!state.reading) { - processNextTick(nReadingNextTick, this); + pna.nextTick(nReadingNextTick, this); } else if (state.length) { - emitReadable(this, state); + emitReadable(this); } } } @@ -72800,7 +72475,7 @@ Readable.prototype.resume = function () { function resume(stream, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; - processNextTick(resume_, stream, state); + pna.nextTick(resume_, stream, state); } } @@ -72837,18 +72512,19 @@ function flow(stream) { // This is *not* part of the readable stream interface. // It is an ugly unfortunate mess of history. Readable.prototype.wrap = function (stream) { + var _this = this; + var state = this._readableState; var paused = false; - var self = this; stream.on('end', function () { debug('wrapped end'); if (state.decoder && !state.ended) { var chunk = state.decoder.end(); - if (chunk && chunk.length) self.push(chunk); + if (chunk && chunk.length) _this.push(chunk); } - self.push(null); + _this.push(null); }); stream.on('data', function (chunk) { @@ -72858,7 +72534,7 @@ Readable.prototype.wrap = function (stream) { // don't skip over falsy values in objectMode if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = self.push(chunk); + var ret = _this.push(chunk); if (!ret) { paused = true; stream.pause(); @@ -72879,12 +72555,12 @@ Readable.prototype.wrap = function (stream) { // proxy certain important events. for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n])); + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); } // when we try to consume some more bytes, simply unpause the // underlying stream. - self._read = function (n) { + this._read = function (n) { debug('wrapped _read', n); if (paused) { paused = false; @@ -72892,9 +72568,19 @@ Readable.prototype.wrap = function (stream) { } }; - return self; + return this; }; +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + // exposed for testing purposes only. Readable._fromList = fromList; @@ -72972,7 +72658,7 @@ function copyFromBufferString(n, list) { // This function is designed to be inlinable, so please take care when making // changes to the function body. function copyFromBuffer(n, list) { - var ret = bufferShim.allocUnsafe(n); + var ret = Buffer.allocUnsafe(n); var p = list.head; var c = 1; p.data.copy(ret); @@ -73007,7 +72693,7 @@ function endReadable(stream) { if (!state.endEmitted) { state.ended = true; - processNextTick(endReadableNT, state, stream); + pna.nextTick(endReadableNT, state, stream); } } @@ -73020,12 +72706,6 @@ function endReadableNT(state, stream) { } } -function forEach(xs, f) { - for (var i = 0, l = xs.length; i < l; i++) { - f(xs[i], i); - } -} - function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) return i; @@ -73034,10 +72714,31 @@ function indexOf(xs, x) { } /***/ }), -/* 306 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + // a transform stream is a readable/writable stream where you do // something with the data. Sometimes it's called a "filter", // but that's not a great name for it, since that implies a thing where @@ -73084,46 +72785,37 @@ function indexOf(xs, x) { module.exports = Transform; -var Duplex = __webpack_require__(81); +var Duplex = __webpack_require__(103); /**/ -var util = __webpack_require__(100); -util.inherits = __webpack_require__(59); +var util = __webpack_require__(101); +util.inherits = __webpack_require__(76); /**/ util.inherits(Transform, Duplex); -function TransformState(stream) { - this.afterTransform = function (er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; - this.writeencoding = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; +function afterTransform(er, data) { + var ts = this._transformState; ts.transforming = false; var cb = ts.writecb; - if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } ts.writechunk = null; ts.writecb = null; - if (data !== null && data !== undefined) stream.push(data); + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); cb(er); - var rs = stream._readableState; + var rs = this._readableState; rs.reading = false; if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); + this._read(rs.highWaterMark); } } @@ -73132,9 +72824,14 @@ function Transform(options) { Duplex.call(this, options); - this._transformState = new TransformState(this); - - var stream = this; + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; // start out asking for a readable event once data is transformed. this._readableState.needReadable = true; @@ -73151,11 +72848,19 @@ function Transform(options) { } // When the writable side finishes, then flush out anything remaining. - this.once('prefinish', function () { - if (typeof this._flush === 'function') this._flush(function (er, data) { - done(stream, er, data); - });else done(stream); - }); + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } } Transform.prototype.push = function (chunk, encoding) { @@ -73204,42 +72909,92 @@ Transform.prototype._read = function (n) { } }; +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + function done(stream, er, data) { if (er) return stream.emit('error', er); - if (data !== null && data !== undefined) stream.push(data); + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); // if there's nothing in the write buffer, then that means // that nothing more will ever be provided - var ws = stream._writableState; - var ts = stream._transformState; + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); - if (ws.length) throw new Error('Calling transform done when ws.length != 0'); - - if (ts.transforming) throw new Error('Calling transform done when still transforming'); + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); return stream.push(null); } /***/ }), -/* 307 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. -module.exports = Writable; - /**/ -var processNextTick = __webpack_require__(199); + +var pna = __webpack_require__(164); /**/ +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + /**/ -var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; /**/ /**/ @@ -73249,56 +73004,71 @@ var Duplex; Writable.WritableState = WritableState; /**/ -var util = __webpack_require__(100); -util.inherits = __webpack_require__(59); +var util = __webpack_require__(101); +util.inherits = __webpack_require__(76); /**/ /**/ var internalUtil = { - deprecate: __webpack_require__(744) + deprecate: __webpack_require__(997) }; /**/ /**/ -var Stream = __webpack_require__(308); +var Stream = __webpack_require__(374); /**/ -var Buffer = __webpack_require__(105).Buffer; /**/ -var bufferShim = __webpack_require__(166); + +var Buffer = __webpack_require__(58).Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + /**/ +var destroyImpl = __webpack_require__(373); + util.inherits(Writable, Stream); function nop() {} -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - function WritableState(options, stream) { - Duplex = Duplex || __webpack_require__(81); + Duplex = Duplex || __webpack_require__(103); options = options || {}; + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + // object stream flag to indicate whether or not this stream // contains buffers or objects. this.objectMode = !!options.objectMode; - if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false // Note: 0 is a valid value, means that we always return false if // the entire buffer is not flushed immediately on write() var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; var defaultHwm = this.objectMode ? 16 : 16 * 1024; - this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; // cast to ints. - this.highWaterMark = ~~this.highWaterMark; + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; // drain event flag. this.needDrain = false; @@ -73309,6 +73079,9 @@ function WritableState(options, stream) { // when 'finish' is emitted this.finished = false; + // has it been destroyed + this.destroyed = false; + // should we decode strings into buffers before passing to _write? // this is here so that some node-core streams can optimize string // handling at a lower level. @@ -73390,7 +73163,7 @@ WritableState.prototype.getBuffer = function getBuffer() { Object.defineProperty(WritableState.prototype, 'buffer', { get: internalUtil.deprecate(function () { return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') }); } catch (_) {} })(); @@ -73403,6 +73176,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot Object.defineProperty(Writable, Symbol.hasInstance, { value: function (object) { if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; return object && object._writableState instanceof WritableState; } @@ -73414,7 +73188,7 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot } function Writable(options) { - Duplex = Duplex || __webpack_require__(81); + Duplex = Duplex || __webpack_require__(103); // Writable ctor is applied to Duplexes, too. // `realHasInstance` is necessary because using plain `instanceof` @@ -73436,6 +73210,10 @@ function Writable(options) { if (typeof options.write === 'function') this._write = options.write; if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; } Stream.call(this); @@ -73450,7 +73228,7 @@ function writeAfterEnd(stream, cb) { var er = new Error('write after end'); // TODO: defer error events consistently everywhere, not just the cb stream.emit('error', er); - processNextTick(cb, er); + pna.nextTick(cb, er); } // Checks that a user-supplied chunk is valid, especially for the particular @@ -73467,7 +73245,7 @@ function validChunk(stream, state, chunk, cb) { } if (er) { stream.emit('error', er); - processNextTick(cb, er); + pna.nextTick(cb, er); valid = false; } return valid; @@ -73476,7 +73254,11 @@ function validChunk(stream, state, chunk, cb) { Writable.prototype.write = function (chunk, encoding, cb) { var state = this._writableState; var ret = false; - var isBuf = Buffer.isBuffer(chunk); + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } if (typeof encoding === 'function') { cb = encoding; @@ -73521,18 +73303,32 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = bufferShim.from(chunk, encoding); + chunk = Buffer.from(chunk, encoding); } return chunk; } +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + // if we're already writing something, then just put this // in the queue, and wait our turn. Otherwise, call _write // If we return false, then we need a drain event, so set that flag. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { if (!isBuf) { - chunk = decodeChunk(state, chunk, encoding); - if (Buffer.isBuffer(chunk)) encoding = 'buffer'; + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } } var len = state.objectMode ? 1 : chunk.length; @@ -73544,7 +73340,13 @@ function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { if (state.writing || state.corked) { var last = state.lastBufferedRequest; - state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; if (last) { last.next = state.lastBufferedRequest; } else { @@ -73569,10 +73371,26 @@ function doWrite(stream, state, writev, len, chunk, encoding, cb) { function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; - if (sync) processNextTick(cb, er);else cb(er); - stream._writableState.errorEmitted = true; - stream.emit('error', er); + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } } function onwriteStateUpdate(state) { @@ -73637,11 +73455,14 @@ function clearBuffer(stream, state) { holder.entry = entry; var count = 0; + var allBuffers = true; while (entry) { buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; entry = entry.next; count += 1; } + buffer.allBuffers = allBuffers; doWrite(stream, state, true, state.length, buffer, '', holder.finish); @@ -73655,6 +73476,7 @@ function clearBuffer(stream, state) { } else { state.corkedRequestsFree = new CorkedRequest(state); } + state.bufferedRequestCount = 0; } else { // Slow case, write chunks one-by-one while (entry) { @@ -73665,6 +73487,7 @@ function clearBuffer(stream, state) { doWrite(stream, state, false, len, chunk, encoding, cb); entry = entry.next; + state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then // it means that we need to wait until it does. // also, that means that the chunk and cb are currently @@ -73677,7 +73500,6 @@ function clearBuffer(stream, state) { if (entry === null) state.lastBufferedRequest = null; } - state.bufferedRequestCount = 0; state.bufferedRequest = entry; state.bufferProcessing = false; } @@ -73715,23 +73537,37 @@ Writable.prototype.end = function (chunk, encoding, cb) { function needFinish(state) { return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } - -function prefinish(stream, state) { - if (!state.prefinished) { +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } state.prefinished = true; stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } } } function finishMaybe(stream, state) { var need = needFinish(state); if (need) { + prefinish(stream, state); if (state.pendingcb === 0) { - prefinish(stream, state); state.finished = true; stream.emit('finish'); - } else { - prefinish(stream, state); } } return need; @@ -73741,323 +73577,144 @@ function endWritable(stream, state, cb) { state.ending = true; finishMaybe(stream, state); if (cb) { - if (state.finished) processNextTick(cb);else stream.once('finish', cb); + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); } state.ended = true; stream.writable = false; } -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - - this.next = null; - this.entry = null; - this.finish = function (err) { - var entry = _this.entry; - _this.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - if (state.corkedRequestsFree) { - state.corkedRequestsFree.next = _this; - } else { - state.corkedRequestsFree = _this; - } - }; +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } } -/***/ }), -/* 308 */ -/***/ (function(module, exports, __webpack_require__) { +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } -module.exports = __webpack_require__(29); + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; /***/ }), -/* 309 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var Buffer = __webpack_require__(82).Buffer; +/**/ -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + 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 true; - default: - return false; - } -}; +var pna = __webpack_require__(164); +/**/ -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); } + return this; } -}; -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.StringDecoder = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; + if (this._readableState) { + this._readableState.destroyed = true; } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return -1; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'.repeat(p); - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'.repeat(p + 1); - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'.repeat(p + 2); + this._destroy(err || null, function (err) { + if (!cb && err) { + pna.nextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; } + } else if (cb) { + cb(err); } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; } } -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; +function emitErrorNT(self, err) { + self.emit('error', err); } -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character for each buffered byte of a (partial) -// character needs to be added to the output. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed); - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} +module.exports = { + destroy: destroy, + undestroy: undestroy +}; /***/ }), -/* 310 */ +/* 374 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(34); + + +/***/ }), +/* 375 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74082,19 +73739,18 @@ module.exports = function repeat(ele, num) { /***/ }), -/* 311 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var tough = __webpack_require__(702) +var tough = __webpack_require__(850) var Cookie = tough.Cookie - , CookieJar = tough.CookieJar +var CookieJar = tough.CookieJar - -exports.parse = function(str) { +exports.parse = function (str) { if (str && str.uri) { str = str.uri } @@ -74105,30 +73761,30 @@ exports.parse = function(str) { } // Adapt the sometimes-Async api of tough.CookieJar to our requirements -function RequestJar(store) { +function RequestJar (store) { var self = this self._jar = new CookieJar(store, {looseMode: true}) } -RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) { +RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) { var self = this return self._jar.setCookieSync(cookieOrStr, uri, options || {}) } -RequestJar.prototype.getCookieString = function(uri) { +RequestJar.prototype.getCookieString = function (uri) { var self = this return self._jar.getCookieStringSync(uri) } -RequestJar.prototype.getCookies = function(uri) { +RequestJar.prototype.getCookies = function (uri) { var self = this return self._jar.getCookiesSync(uri) } -exports.jar = function(store) { +exports.jar = function (store) { return new RequestJar(store) } /***/ }), -/* 312 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74196,7 +73852,7 @@ exports.pathMatch = pathMatch; /***/ }), -/* 313 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74231,7 +73887,7 @@ exports.pathMatch = pathMatch; * POSSIBILITY OF SUCH DAMAGE. */ -var pubsuffix = __webpack_require__(314); +var pubsuffix = __webpack_require__(379); // Gives the permutation of all possible domainMatch()es of a given domain. The // array is in shortest-to-longest order. Handy for indexing. @@ -74259,7 +73915,7 @@ exports.permuteDomain = permuteDomain; /***/ }), -/* 314 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74270,7 +73926,7 @@ exports.permuteDomain = permuteDomain; -var punycode = __webpack_require__(204); +var punycode = __webpack_require__(263); module.exports.getPublicSuffix = function getPublicSuffix(domain) { /*! @@ -74358,13 +74014,13 @@ module.exports.getPublicSuffix = function getPublicSuffix(domain) { // See public-suffix.txt for more information var index = module.exports.index = Object.freeze( -{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"marketplace.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"taxi.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"an":true,"com.an":true,"net.an":true,"org.an":true,"edu.an":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"ar":true,"com.ar":true,"edu.ar":true,"gob.ar":true,"gov.ar":true,"int.ar":true,"mil.ar":true,"net.ar":true,"org.ar":true,"tur.ar":true,"arpa":true,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"au":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"org.ba":true,"net.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"unsa.ba":true,"unbi.ba":true,"co.ba":true,"com.ba":true,"rs.ba":true,"bb":true,"biz.bb":true,"co.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"tv.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gov.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"br":true,"adm.br":true,"adv.br":true,"agr.br":true,"am.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"coop.br":true,"ecn.br":true,"eco.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"flog.br":true,"fm.br":true,"fnd.br":true,"fot.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"gov.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jor.br":true,"jus.br":true,"leg.br":true,"lel.br":true,"mat.br":true,"med.br":true,"mil.br":true,"mp.br":true,"mus.br":true,"net.br":true,"*.nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"slg.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"vet.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bv":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"co.cm":true,"com.cm":true,"gov.cm":true,"net.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cw":true,"com.cw":true,"edu.cw":true,"net.cw":true,"org.cw":true,"cx":true,"gov.cx":true,"ac.cy":true,"biz.cy":true,"com.cy":true,"ekloges.cy":true,"gov.cy":true,"ltd.cy":true,"name.cy":true,"net.cy":true,"org.cy":true,"parliament.cy":true,"press.cy":true,"pro.cy":true,"tm.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"et":true,"com.et":true,"gov.et":true,"org.et":true,"edu.et":true,"biz.et":true,"name.et":true,"info.et":true,"net.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gb":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"net.gg":true,"org.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"co.gl":true,"com.gl":true,"edu.gl":true,"net.gl":true,"org.gl":true,"gm":true,"gn":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"gt":true,"com.gt":true,"edu.gt":true,"gob.gt":true,"ind.gt":true,"mil.gt":true,"net.gt":true,"org.gt":true,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"net.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"biz.id":true,"co.id":true,"desa.id":true,"go.id":true,"mil.id":true,"my.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"il":true,"ac.il":true,"co.il":true,"gov.il":true,"idf.il":true,"k12.il":true,"muni.il":true,"net.il":true,"org.il":true,"im":true,"ac.im":true,"co.im":true,"com.im":true,"ltd.co.im":true,"net.im":true,"org.im":true,"plc.co.im":true,"tt.im":true,"tv.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"abr.it":true,"abruzzo.it":true,"aosta-valley.it":true,"aostavalley.it":true,"bas.it":true,"basilicata.it":true,"cal.it":true,"calabria.it":true,"cam.it":true,"campania.it":true,"emilia-romagna.it":true,"emiliaromagna.it":true,"emr.it":true,"friuli-v-giulia.it":true,"friuli-ve-giulia.it":true,"friuli-vegiulia.it":true,"friuli-venezia-giulia.it":true,"friuli-veneziagiulia.it":true,"friuli-vgiulia.it":true,"friuliv-giulia.it":true,"friulive-giulia.it":true,"friulivegiulia.it":true,"friulivenezia-giulia.it":true,"friuliveneziagiulia.it":true,"friulivgiulia.it":true,"fvg.it":true,"laz.it":true,"lazio.it":true,"lig.it":true,"liguria.it":true,"lom.it":true,"lombardia.it":true,"lombardy.it":true,"lucania.it":true,"mar.it":true,"marche.it":true,"mol.it":true,"molise.it":true,"piedmont.it":true,"piemonte.it":true,"pmn.it":true,"pug.it":true,"puglia.it":true,"sar.it":true,"sardegna.it":true,"sardinia.it":true,"sic.it":true,"sicilia.it":true,"sicily.it":true,"taa.it":true,"tos.it":true,"toscana.it":true,"trentino-a-adige.it":true,"trentino-aadige.it":true,"trentino-alto-adige.it":true,"trentino-altoadige.it":true,"trentino-s-tirol.it":true,"trentino-stirol.it":true,"trentino-sud-tirol.it":true,"trentino-sudtirol.it":true,"trentino-sued-tirol.it":true,"trentino-suedtirol.it":true,"trentinoa-adige.it":true,"trentinoaadige.it":true,"trentinoalto-adige.it":true,"trentinoaltoadige.it":true,"trentinos-tirol.it":true,"trentinostirol.it":true,"trentinosud-tirol.it":true,"trentinosudtirol.it":true,"trentinosued-tirol.it":true,"trentinosuedtirol.it":true,"tuscany.it":true,"umb.it":true,"umbria.it":true,"val-d-aosta.it":true,"val-daosta.it":true,"vald-aosta.it":true,"valdaosta.it":true,"valle-aosta.it":true,"valle-d-aosta.it":true,"valle-daosta.it":true,"valleaosta.it":true,"valled-aosta.it":true,"valledaosta.it":true,"vallee-aoste.it":true,"valleeaoste.it":true,"vao.it":true,"vda.it":true,"ven.it":true,"veneto.it":true,"ag.it":true,"agrigento.it":true,"al.it":true,"alessandria.it":true,"alto-adige.it":true,"altoadige.it":true,"an.it":true,"ancona.it":true,"andria-barletta-trani.it":true,"andria-trani-barletta.it":true,"andriabarlettatrani.it":true,"andriatranibarletta.it":true,"ao.it":true,"aosta.it":true,"aoste.it":true,"ap.it":true,"aq.it":true,"aquila.it":true,"ar.it":true,"arezzo.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"asti.it":true,"at.it":true,"av.it":true,"avellino.it":true,"ba.it":true,"balsan.it":true,"bari.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"belluno.it":true,"benevento.it":true,"bergamo.it":true,"bg.it":true,"bi.it":true,"biella.it":true,"bl.it":true,"bn.it":true,"bo.it":true,"bologna.it":true,"bolzano.it":true,"bozen.it":true,"br.it":true,"brescia.it":true,"brindisi.it":true,"bs.it":true,"bt.it":true,"bz.it":true,"ca.it":true,"cagliari.it":true,"caltanissetta.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"campobasso.it":true,"carbonia-iglesias.it":true,"carboniaiglesias.it":true,"carrara-massa.it":true,"carraramassa.it":true,"caserta.it":true,"catania.it":true,"catanzaro.it":true,"cb.it":true,"ce.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"ch.it":true,"chieti.it":true,"ci.it":true,"cl.it":true,"cn.it":true,"co.it":true,"como.it":true,"cosenza.it":true,"cr.it":true,"cremona.it":true,"crotone.it":true,"cs.it":true,"ct.it":true,"cuneo.it":true,"cz.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"en.it":true,"enna.it":true,"fc.it":true,"fe.it":true,"fermo.it":true,"ferrara.it":true,"fg.it":true,"fi.it":true,"firenze.it":true,"florence.it":true,"fm.it":true,"foggia.it":true,"forli-cesena.it":true,"forlicesena.it":true,"fr.it":true,"frosinone.it":true,"ge.it":true,"genoa.it":true,"genova.it":true,"go.it":true,"gorizia.it":true,"gr.it":true,"grosseto.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"im.it":true,"imperia.it":true,"is.it":true,"isernia.it":true,"kr.it":true,"la-spezia.it":true,"laquila.it":true,"laspezia.it":true,"latina.it":true,"lc.it":true,"le.it":true,"lecce.it":true,"lecco.it":true,"li.it":true,"livorno.it":true,"lo.it":true,"lodi.it":true,"lt.it":true,"lu.it":true,"lucca.it":true,"macerata.it":true,"mantova.it":true,"massa-carrara.it":true,"massacarrara.it":true,"matera.it":true,"mb.it":true,"mc.it":true,"me.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"messina.it":true,"mi.it":true,"milan.it":true,"milano.it":true,"mn.it":true,"mo.it":true,"modena.it":true,"monza-brianza.it":true,"monza-e-della-brianza.it":true,"monza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"ms.it":true,"mt.it":true,"na.it":true,"naples.it":true,"napoli.it":true,"no.it":true,"novara.it":true,"nu.it":true,"nuoro.it":true,"og.it":true,"ogliastra.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"or.it":true,"oristano.it":true,"ot.it":true,"pa.it":true,"padova.it":true,"padua.it":true,"palermo.it":true,"parma.it":true,"pavia.it":true,"pc.it":true,"pd.it":true,"pe.it":true,"perugia.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"pescara.it":true,"pg.it":true,"pi.it":true,"piacenza.it":true,"pisa.it":true,"pistoia.it":true,"pn.it":true,"po.it":true,"pordenone.it":true,"potenza.it":true,"pr.it":true,"prato.it":true,"pt.it":true,"pu.it":true,"pv.it":true,"pz.it":true,"ra.it":true,"ragusa.it":true,"ravenna.it":true,"rc.it":true,"re.it":true,"reggio-calabria.it":true,"reggio-emilia.it":true,"reggiocalabria.it":true,"reggioemilia.it":true,"rg.it":true,"ri.it":true,"rieti.it":true,"rimini.it":true,"rm.it":true,"rn.it":true,"ro.it":true,"roma.it":true,"rome.it":true,"rovigo.it":true,"sa.it":true,"salerno.it":true,"sassari.it":true,"savona.it":true,"si.it":true,"siena.it":true,"siracusa.it":true,"so.it":true,"sondrio.it":true,"sp.it":true,"sr.it":true,"ss.it":true,"suedtirol.it":true,"sv.it":true,"ta.it":true,"taranto.it":true,"te.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"teramo.it":true,"terni.it":true,"tn.it":true,"to.it":true,"torino.it":true,"tp.it":true,"tr.it":true,"trani-andria-barletta.it":true,"trani-barletta-andria.it":true,"traniandriabarletta.it":true,"tranibarlettaandria.it":true,"trapani.it":true,"trentino.it":true,"trento.it":true,"treviso.it":true,"trieste.it":true,"ts.it":true,"turin.it":true,"tv.it":true,"ud.it":true,"udine.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"va.it":true,"varese.it":true,"vb.it":true,"vc.it":true,"ve.it":true,"venezia.it":true,"venice.it":true,"verbania.it":true,"vercelli.it":true,"verona.it":true,"vi.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vicenza.it":true,"viterbo.it":true,"vr.it":true,"vs.it":true,"vt.it":true,"vv.it":true,"je":true,"co.je":true,"net.je":true,"org.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"aichi.jp":true,"akita.jp":true,"aomori.jp":true,"chiba.jp":true,"ehime.jp":true,"fukui.jp":true,"fukuoka.jp":true,"fukushima.jp":true,"gifu.jp":true,"gunma.jp":true,"hiroshima.jp":true,"hokkaido.jp":true,"hyogo.jp":true,"ibaraki.jp":true,"ishikawa.jp":true,"iwate.jp":true,"kagawa.jp":true,"kagoshima.jp":true,"kanagawa.jp":true,"kochi.jp":true,"kumamoto.jp":true,"kyoto.jp":true,"mie.jp":true,"miyagi.jp":true,"miyazaki.jp":true,"nagano.jp":true,"nagasaki.jp":true,"nara.jp":true,"niigata.jp":true,"oita.jp":true,"okayama.jp":true,"okinawa.jp":true,"osaka.jp":true,"saga.jp":true,"saitama.jp":true,"shiga.jp":true,"shimane.jp":true,"shizuoka.jp":true,"tochigi.jp":true,"tokushima.jp":true,"tokyo.jp":true,"tottori.jp":true,"toyama.jp":true,"wakayama.jp":true,"yamagata.jp":true,"yamaguchi.jp":true,"yamanashi.jp":true,"xn--4pvxs.jp":true,"xn--vgu402c.jp":true,"xn--c3s14m.jp":true,"xn--f6qx53a.jp":true,"xn--8pvr4u.jp":true,"xn--uist22h.jp":true,"xn--djrs72d6uy.jp":true,"xn--mkru45i.jp":true,"xn--0trq7p7nn.jp":true,"xn--8ltr62k.jp":true,"xn--2m4a15e.jp":true,"xn--efvn9s.jp":true,"xn--32vp30h.jp":true,"xn--4it797k.jp":true,"xn--1lqs71d.jp":true,"xn--5rtp49c.jp":true,"xn--5js045d.jp":true,"xn--ehqz56n.jp":true,"xn--1lqs03n.jp":true,"xn--qqqt11m.jp":true,"xn--kbrq7o.jp":true,"xn--pssu33l.jp":true,"xn--ntsq17g.jp":true,"xn--uisz3g.jp":true,"xn--6btw5a.jp":true,"xn--1ctwo.jp":true,"xn--6orx2r.jp":true,"xn--rht61e.jp":true,"xn--rht27z.jp":true,"xn--djty4k.jp":true,"xn--nit225k.jp":true,"xn--rht3d.jp":true,"xn--klty5x.jp":true,"xn--kltx9a.jp":true,"xn--kltp7d.jp":true,"xn--uuwu58a.jp":true,"xn--zbx025d.jp":true,"xn--ntso0iqx3a.jp":true,"xn--elqq16h.jp":true,"xn--4it168d.jp":true,"xn--klt787d.jp":true,"xn--rny31h.jp":true,"xn--7t0a264c.jp":true,"xn--5rtq34k.jp":true,"xn--k7yn95e.jp":true,"xn--tor131o.jp":true,"xn--d5qv7z876c.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.nagoya.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.yokohama.jp":true,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.nagoya.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.yokohama.jp":false,"aisai.aichi.jp":true,"ama.aichi.jp":true,"anjo.aichi.jp":true,"asuke.aichi.jp":true,"chiryu.aichi.jp":true,"chita.aichi.jp":true,"fuso.aichi.jp":true,"gamagori.aichi.jp":true,"handa.aichi.jp":true,"hazu.aichi.jp":true,"hekinan.aichi.jp":true,"higashiura.aichi.jp":true,"ichinomiya.aichi.jp":true,"inazawa.aichi.jp":true,"inuyama.aichi.jp":true,"isshiki.aichi.jp":true,"iwakura.aichi.jp":true,"kanie.aichi.jp":true,"kariya.aichi.jp":true,"kasugai.aichi.jp":true,"kira.aichi.jp":true,"kiyosu.aichi.jp":true,"komaki.aichi.jp":true,"konan.aichi.jp":true,"kota.aichi.jp":true,"mihama.aichi.jp":true,"miyoshi.aichi.jp":true,"nishio.aichi.jp":true,"nisshin.aichi.jp":true,"obu.aichi.jp":true,"oguchi.aichi.jp":true,"oharu.aichi.jp":true,"okazaki.aichi.jp":true,"owariasahi.aichi.jp":true,"seto.aichi.jp":true,"shikatsu.aichi.jp":true,"shinshiro.aichi.jp":true,"shitara.aichi.jp":true,"tahara.aichi.jp":true,"takahama.aichi.jp":true,"tobishima.aichi.jp":true,"toei.aichi.jp":true,"togo.aichi.jp":true,"tokai.aichi.jp":true,"tokoname.aichi.jp":true,"toyoake.aichi.jp":true,"toyohashi.aichi.jp":true,"toyokawa.aichi.jp":true,"toyone.aichi.jp":true,"toyota.aichi.jp":true,"tsushima.aichi.jp":true,"yatomi.aichi.jp":true,"akita.akita.jp":true,"daisen.akita.jp":true,"fujisato.akita.jp":true,"gojome.akita.jp":true,"hachirogata.akita.jp":true,"happou.akita.jp":true,"higashinaruse.akita.jp":true,"honjo.akita.jp":true,"honjyo.akita.jp":true,"ikawa.akita.jp":true,"kamikoani.akita.jp":true,"kamioka.akita.jp":true,"katagami.akita.jp":true,"kazuno.akita.jp":true,"kitaakita.akita.jp":true,"kosaka.akita.jp":true,"kyowa.akita.jp":true,"misato.akita.jp":true,"mitane.akita.jp":true,"moriyoshi.akita.jp":true,"nikaho.akita.jp":true,"noshiro.akita.jp":true,"odate.akita.jp":true,"oga.akita.jp":true,"ogata.akita.jp":true,"semboku.akita.jp":true,"yokote.akita.jp":true,"yurihonjo.akita.jp":true,"aomori.aomori.jp":true,"gonohe.aomori.jp":true,"hachinohe.aomori.jp":true,"hashikami.aomori.jp":true,"hiranai.aomori.jp":true,"hirosaki.aomori.jp":true,"itayanagi.aomori.jp":true,"kuroishi.aomori.jp":true,"misawa.aomori.jp":true,"mutsu.aomori.jp":true,"nakadomari.aomori.jp":true,"noheji.aomori.jp":true,"oirase.aomori.jp":true,"owani.aomori.jp":true,"rokunohe.aomori.jp":true,"sannohe.aomori.jp":true,"shichinohe.aomori.jp":true,"shingo.aomori.jp":true,"takko.aomori.jp":true,"towada.aomori.jp":true,"tsugaru.aomori.jp":true,"tsuruta.aomori.jp":true,"abiko.chiba.jp":true,"asahi.chiba.jp":true,"chonan.chiba.jp":true,"chosei.chiba.jp":true,"choshi.chiba.jp":true,"chuo.chiba.jp":true,"funabashi.chiba.jp":true,"futtsu.chiba.jp":true,"hanamigawa.chiba.jp":true,"ichihara.chiba.jp":true,"ichikawa.chiba.jp":true,"ichinomiya.chiba.jp":true,"inzai.chiba.jp":true,"isumi.chiba.jp":true,"kamagaya.chiba.jp":true,"kamogawa.chiba.jp":true,"kashiwa.chiba.jp":true,"katori.chiba.jp":true,"katsuura.chiba.jp":true,"kimitsu.chiba.jp":true,"kisarazu.chiba.jp":true,"kozaki.chiba.jp":true,"kujukuri.chiba.jp":true,"kyonan.chiba.jp":true,"matsudo.chiba.jp":true,"midori.chiba.jp":true,"mihama.chiba.jp":true,"minamiboso.chiba.jp":true,"mobara.chiba.jp":true,"mutsuzawa.chiba.jp":true,"nagara.chiba.jp":true,"nagareyama.chiba.jp":true,"narashino.chiba.jp":true,"narita.chiba.jp":true,"noda.chiba.jp":true,"oamishirasato.chiba.jp":true,"omigawa.chiba.jp":true,"onjuku.chiba.jp":true,"otaki.chiba.jp":true,"sakae.chiba.jp":true,"sakura.chiba.jp":true,"shimofusa.chiba.jp":true,"shirako.chiba.jp":true,"shiroi.chiba.jp":true,"shisui.chiba.jp":true,"sodegaura.chiba.jp":true,"sosa.chiba.jp":true,"tako.chiba.jp":true,"tateyama.chiba.jp":true,"togane.chiba.jp":true,"tohnosho.chiba.jp":true,"tomisato.chiba.jp":true,"urayasu.chiba.jp":true,"yachimata.chiba.jp":true,"yachiyo.chiba.jp":true,"yokaichiba.chiba.jp":true,"yokoshibahikari.chiba.jp":true,"yotsukaido.chiba.jp":true,"ainan.ehime.jp":true,"honai.ehime.jp":true,"ikata.ehime.jp":true,"imabari.ehime.jp":true,"iyo.ehime.jp":true,"kamijima.ehime.jp":true,"kihoku.ehime.jp":true,"kumakogen.ehime.jp":true,"masaki.ehime.jp":true,"matsuno.ehime.jp":true,"matsuyama.ehime.jp":true,"namikata.ehime.jp":true,"niihama.ehime.jp":true,"ozu.ehime.jp":true,"saijo.ehime.jp":true,"seiyo.ehime.jp":true,"shikokuchuo.ehime.jp":true,"tobe.ehime.jp":true,"toon.ehime.jp":true,"uchiko.ehime.jp":true,"uwajima.ehime.jp":true,"yawatahama.ehime.jp":true,"echizen.fukui.jp":true,"eiheiji.fukui.jp":true,"fukui.fukui.jp":true,"ikeda.fukui.jp":true,"katsuyama.fukui.jp":true,"mihama.fukui.jp":true,"minamiechizen.fukui.jp":true,"obama.fukui.jp":true,"ohi.fukui.jp":true,"ono.fukui.jp":true,"sabae.fukui.jp":true,"sakai.fukui.jp":true,"takahama.fukui.jp":true,"tsuruga.fukui.jp":true,"wakasa.fukui.jp":true,"ashiya.fukuoka.jp":true,"buzen.fukuoka.jp":true,"chikugo.fukuoka.jp":true,"chikuho.fukuoka.jp":true,"chikujo.fukuoka.jp":true,"chikushino.fukuoka.jp":true,"chikuzen.fukuoka.jp":true,"chuo.fukuoka.jp":true,"dazaifu.fukuoka.jp":true,"fukuchi.fukuoka.jp":true,"hakata.fukuoka.jp":true,"higashi.fukuoka.jp":true,"hirokawa.fukuoka.jp":true,"hisayama.fukuoka.jp":true,"iizuka.fukuoka.jp":true,"inatsuki.fukuoka.jp":true,"kaho.fukuoka.jp":true,"kasuga.fukuoka.jp":true,"kasuya.fukuoka.jp":true,"kawara.fukuoka.jp":true,"keisen.fukuoka.jp":true,"koga.fukuoka.jp":true,"kurate.fukuoka.jp":true,"kurogi.fukuoka.jp":true,"kurume.fukuoka.jp":true,"minami.fukuoka.jp":true,"miyako.fukuoka.jp":true,"miyama.fukuoka.jp":true,"miyawaka.fukuoka.jp":true,"mizumaki.fukuoka.jp":true,"munakata.fukuoka.jp":true,"nakagawa.fukuoka.jp":true,"nakama.fukuoka.jp":true,"nishi.fukuoka.jp":true,"nogata.fukuoka.jp":true,"ogori.fukuoka.jp":true,"okagaki.fukuoka.jp":true,"okawa.fukuoka.jp":true,"oki.fukuoka.jp":true,"omuta.fukuoka.jp":true,"onga.fukuoka.jp":true,"onojo.fukuoka.jp":true,"oto.fukuoka.jp":true,"saigawa.fukuoka.jp":true,"sasaguri.fukuoka.jp":true,"shingu.fukuoka.jp":true,"shinyoshitomi.fukuoka.jp":true,"shonai.fukuoka.jp":true,"soeda.fukuoka.jp":true,"sue.fukuoka.jp":true,"tachiarai.fukuoka.jp":true,"tagawa.fukuoka.jp":true,"takata.fukuoka.jp":true,"toho.fukuoka.jp":true,"toyotsu.fukuoka.jp":true,"tsuiki.fukuoka.jp":true,"ukiha.fukuoka.jp":true,"umi.fukuoka.jp":true,"usui.fukuoka.jp":true,"yamada.fukuoka.jp":true,"yame.fukuoka.jp":true,"yanagawa.fukuoka.jp":true,"yukuhashi.fukuoka.jp":true,"aizubange.fukushima.jp":true,"aizumisato.fukushima.jp":true,"aizuwakamatsu.fukushima.jp":true,"asakawa.fukushima.jp":true,"bandai.fukushima.jp":true,"date.fukushima.jp":true,"fukushima.fukushima.jp":true,"furudono.fukushima.jp":true,"futaba.fukushima.jp":true,"hanawa.fukushima.jp":true,"higashi.fukushima.jp":true,"hirata.fukushima.jp":true,"hirono.fukushima.jp":true,"iitate.fukushima.jp":true,"inawashiro.fukushima.jp":true,"ishikawa.fukushima.jp":true,"iwaki.fukushima.jp":true,"izumizaki.fukushima.jp":true,"kagamiishi.fukushima.jp":true,"kaneyama.fukushima.jp":true,"kawamata.fukushima.jp":true,"kitakata.fukushima.jp":true,"kitashiobara.fukushima.jp":true,"koori.fukushima.jp":true,"koriyama.fukushima.jp":true,"kunimi.fukushima.jp":true,"miharu.fukushima.jp":true,"mishima.fukushima.jp":true,"namie.fukushima.jp":true,"nango.fukushima.jp":true,"nishiaizu.fukushima.jp":true,"nishigo.fukushima.jp":true,"okuma.fukushima.jp":true,"omotego.fukushima.jp":true,"ono.fukushima.jp":true,"otama.fukushima.jp":true,"samegawa.fukushima.jp":true,"shimogo.fukushima.jp":true,"shirakawa.fukushima.jp":true,"showa.fukushima.jp":true,"soma.fukushima.jp":true,"sukagawa.fukushima.jp":true,"taishin.fukushima.jp":true,"tamakawa.fukushima.jp":true,"tanagura.fukushima.jp":true,"tenei.fukushima.jp":true,"yabuki.fukushima.jp":true,"yamato.fukushima.jp":true,"yamatsuri.fukushima.jp":true,"yanaizu.fukushima.jp":true,"yugawa.fukushima.jp":true,"anpachi.gifu.jp":true,"ena.gifu.jp":true,"gifu.gifu.jp":true,"ginan.gifu.jp":true,"godo.gifu.jp":true,"gujo.gifu.jp":true,"hashima.gifu.jp":true,"hichiso.gifu.jp":true,"hida.gifu.jp":true,"higashishirakawa.gifu.jp":true,"ibigawa.gifu.jp":true,"ikeda.gifu.jp":true,"kakamigahara.gifu.jp":true,"kani.gifu.jp":true,"kasahara.gifu.jp":true,"kasamatsu.gifu.jp":true,"kawaue.gifu.jp":true,"kitagata.gifu.jp":true,"mino.gifu.jp":true,"minokamo.gifu.jp":true,"mitake.gifu.jp":true,"mizunami.gifu.jp":true,"motosu.gifu.jp":true,"nakatsugawa.gifu.jp":true,"ogaki.gifu.jp":true,"sakahogi.gifu.jp":true,"seki.gifu.jp":true,"sekigahara.gifu.jp":true,"shirakawa.gifu.jp":true,"tajimi.gifu.jp":true,"takayama.gifu.jp":true,"tarui.gifu.jp":true,"toki.gifu.jp":true,"tomika.gifu.jp":true,"wanouchi.gifu.jp":true,"yamagata.gifu.jp":true,"yaotsu.gifu.jp":true,"yoro.gifu.jp":true,"annaka.gunma.jp":true,"chiyoda.gunma.jp":true,"fujioka.gunma.jp":true,"higashiagatsuma.gunma.jp":true,"isesaki.gunma.jp":true,"itakura.gunma.jp":true,"kanna.gunma.jp":true,"kanra.gunma.jp":true,"katashina.gunma.jp":true,"kawaba.gunma.jp":true,"kiryu.gunma.jp":true,"kusatsu.gunma.jp":true,"maebashi.gunma.jp":true,"meiwa.gunma.jp":true,"midori.gunma.jp":true,"minakami.gunma.jp":true,"naganohara.gunma.jp":true,"nakanojo.gunma.jp":true,"nanmoku.gunma.jp":true,"numata.gunma.jp":true,"oizumi.gunma.jp":true,"ora.gunma.jp":true,"ota.gunma.jp":true,"shibukawa.gunma.jp":true,"shimonita.gunma.jp":true,"shinto.gunma.jp":true,"showa.gunma.jp":true,"takasaki.gunma.jp":true,"takayama.gunma.jp":true,"tamamura.gunma.jp":true,"tatebayashi.gunma.jp":true,"tomioka.gunma.jp":true,"tsukiyono.gunma.jp":true,"tsumagoi.gunma.jp":true,"ueno.gunma.jp":true,"yoshioka.gunma.jp":true,"asaminami.hiroshima.jp":true,"daiwa.hiroshima.jp":true,"etajima.hiroshima.jp":true,"fuchu.hiroshima.jp":true,"fukuyama.hiroshima.jp":true,"hatsukaichi.hiroshima.jp":true,"higashihiroshima.hiroshima.jp":true,"hongo.hiroshima.jp":true,"jinsekikogen.hiroshima.jp":true,"kaita.hiroshima.jp":true,"kui.hiroshima.jp":true,"kumano.hiroshima.jp":true,"kure.hiroshima.jp":true,"mihara.hiroshima.jp":true,"miyoshi.hiroshima.jp":true,"naka.hiroshima.jp":true,"onomichi.hiroshima.jp":true,"osakikamijima.hiroshima.jp":true,"otake.hiroshima.jp":true,"saka.hiroshima.jp":true,"sera.hiroshima.jp":true,"seranishi.hiroshima.jp":true,"shinichi.hiroshima.jp":true,"shobara.hiroshima.jp":true,"takehara.hiroshima.jp":true,"abashiri.hokkaido.jp":true,"abira.hokkaido.jp":true,"aibetsu.hokkaido.jp":true,"akabira.hokkaido.jp":true,"akkeshi.hokkaido.jp":true,"asahikawa.hokkaido.jp":true,"ashibetsu.hokkaido.jp":true,"ashoro.hokkaido.jp":true,"assabu.hokkaido.jp":true,"atsuma.hokkaido.jp":true,"bibai.hokkaido.jp":true,"biei.hokkaido.jp":true,"bifuka.hokkaido.jp":true,"bihoro.hokkaido.jp":true,"biratori.hokkaido.jp":true,"chippubetsu.hokkaido.jp":true,"chitose.hokkaido.jp":true,"date.hokkaido.jp":true,"ebetsu.hokkaido.jp":true,"embetsu.hokkaido.jp":true,"eniwa.hokkaido.jp":true,"erimo.hokkaido.jp":true,"esan.hokkaido.jp":true,"esashi.hokkaido.jp":true,"fukagawa.hokkaido.jp":true,"fukushima.hokkaido.jp":true,"furano.hokkaido.jp":true,"furubira.hokkaido.jp":true,"haboro.hokkaido.jp":true,"hakodate.hokkaido.jp":true,"hamatonbetsu.hokkaido.jp":true,"hidaka.hokkaido.jp":true,"higashikagura.hokkaido.jp":true,"higashikawa.hokkaido.jp":true,"hiroo.hokkaido.jp":true,"hokuryu.hokkaido.jp":true,"hokuto.hokkaido.jp":true,"honbetsu.hokkaido.jp":true,"horokanai.hokkaido.jp":true,"horonobe.hokkaido.jp":true,"ikeda.hokkaido.jp":true,"imakane.hokkaido.jp":true,"ishikari.hokkaido.jp":true,"iwamizawa.hokkaido.jp":true,"iwanai.hokkaido.jp":true,"kamifurano.hokkaido.jp":true,"kamikawa.hokkaido.jp":true,"kamishihoro.hokkaido.jp":true,"kamisunagawa.hokkaido.jp":true,"kamoenai.hokkaido.jp":true,"kayabe.hokkaido.jp":true,"kembuchi.hokkaido.jp":true,"kikonai.hokkaido.jp":true,"kimobetsu.hokkaido.jp":true,"kitahiroshima.hokkaido.jp":true,"kitami.hokkaido.jp":true,"kiyosato.hokkaido.jp":true,"koshimizu.hokkaido.jp":true,"kunneppu.hokkaido.jp":true,"kuriyama.hokkaido.jp":true,"kuromatsunai.hokkaido.jp":true,"kushiro.hokkaido.jp":true,"kutchan.hokkaido.jp":true,"kyowa.hokkaido.jp":true,"mashike.hokkaido.jp":true,"matsumae.hokkaido.jp":true,"mikasa.hokkaido.jp":true,"minamifurano.hokkaido.jp":true,"mombetsu.hokkaido.jp":true,"moseushi.hokkaido.jp":true,"mukawa.hokkaido.jp":true,"muroran.hokkaido.jp":true,"naie.hokkaido.jp":true,"nakagawa.hokkaido.jp":true,"nakasatsunai.hokkaido.jp":true,"nakatombetsu.hokkaido.jp":true,"nanae.hokkaido.jp":true,"nanporo.hokkaido.jp":true,"nayoro.hokkaido.jp":true,"nemuro.hokkaido.jp":true,"niikappu.hokkaido.jp":true,"niki.hokkaido.jp":true,"nishiokoppe.hokkaido.jp":true,"noboribetsu.hokkaido.jp":true,"numata.hokkaido.jp":true,"obihiro.hokkaido.jp":true,"obira.hokkaido.jp":true,"oketo.hokkaido.jp":true,"okoppe.hokkaido.jp":true,"otaru.hokkaido.jp":true,"otobe.hokkaido.jp":true,"otofuke.hokkaido.jp":true,"otoineppu.hokkaido.jp":true,"oumu.hokkaido.jp":true,"ozora.hokkaido.jp":true,"pippu.hokkaido.jp":true,"rankoshi.hokkaido.jp":true,"rebun.hokkaido.jp":true,"rikubetsu.hokkaido.jp":true,"rishiri.hokkaido.jp":true,"rishirifuji.hokkaido.jp":true,"saroma.hokkaido.jp":true,"sarufutsu.hokkaido.jp":true,"shakotan.hokkaido.jp":true,"shari.hokkaido.jp":true,"shibecha.hokkaido.jp":true,"shibetsu.hokkaido.jp":true,"shikabe.hokkaido.jp":true,"shikaoi.hokkaido.jp":true,"shimamaki.hokkaido.jp":true,"shimizu.hokkaido.jp":true,"shimokawa.hokkaido.jp":true,"shinshinotsu.hokkaido.jp":true,"shintoku.hokkaido.jp":true,"shiranuka.hokkaido.jp":true,"shiraoi.hokkaido.jp":true,"shiriuchi.hokkaido.jp":true,"sobetsu.hokkaido.jp":true,"sunagawa.hokkaido.jp":true,"taiki.hokkaido.jp":true,"takasu.hokkaido.jp":true,"takikawa.hokkaido.jp":true,"takinoue.hokkaido.jp":true,"teshikaga.hokkaido.jp":true,"tobetsu.hokkaido.jp":true,"tohma.hokkaido.jp":true,"tomakomai.hokkaido.jp":true,"tomari.hokkaido.jp":true,"toya.hokkaido.jp":true,"toyako.hokkaido.jp":true,"toyotomi.hokkaido.jp":true,"toyoura.hokkaido.jp":true,"tsubetsu.hokkaido.jp":true,"tsukigata.hokkaido.jp":true,"urakawa.hokkaido.jp":true,"urausu.hokkaido.jp":true,"uryu.hokkaido.jp":true,"utashinai.hokkaido.jp":true,"wakkanai.hokkaido.jp":true,"wassamu.hokkaido.jp":true,"yakumo.hokkaido.jp":true,"yoichi.hokkaido.jp":true,"aioi.hyogo.jp":true,"akashi.hyogo.jp":true,"ako.hyogo.jp":true,"amagasaki.hyogo.jp":true,"aogaki.hyogo.jp":true,"asago.hyogo.jp":true,"ashiya.hyogo.jp":true,"awaji.hyogo.jp":true,"fukusaki.hyogo.jp":true,"goshiki.hyogo.jp":true,"harima.hyogo.jp":true,"himeji.hyogo.jp":true,"ichikawa.hyogo.jp":true,"inagawa.hyogo.jp":true,"itami.hyogo.jp":true,"kakogawa.hyogo.jp":true,"kamigori.hyogo.jp":true,"kamikawa.hyogo.jp":true,"kasai.hyogo.jp":true,"kasuga.hyogo.jp":true,"kawanishi.hyogo.jp":true,"miki.hyogo.jp":true,"minamiawaji.hyogo.jp":true,"nishinomiya.hyogo.jp":true,"nishiwaki.hyogo.jp":true,"ono.hyogo.jp":true,"sanda.hyogo.jp":true,"sannan.hyogo.jp":true,"sasayama.hyogo.jp":true,"sayo.hyogo.jp":true,"shingu.hyogo.jp":true,"shinonsen.hyogo.jp":true,"shiso.hyogo.jp":true,"sumoto.hyogo.jp":true,"taishi.hyogo.jp":true,"taka.hyogo.jp":true,"takarazuka.hyogo.jp":true,"takasago.hyogo.jp":true,"takino.hyogo.jp":true,"tamba.hyogo.jp":true,"tatsuno.hyogo.jp":true,"toyooka.hyogo.jp":true,"yabu.hyogo.jp":true,"yashiro.hyogo.jp":true,"yoka.hyogo.jp":true,"yokawa.hyogo.jp":true,"ami.ibaraki.jp":true,"asahi.ibaraki.jp":true,"bando.ibaraki.jp":true,"chikusei.ibaraki.jp":true,"daigo.ibaraki.jp":true,"fujishiro.ibaraki.jp":true,"hitachi.ibaraki.jp":true,"hitachinaka.ibaraki.jp":true,"hitachiomiya.ibaraki.jp":true,"hitachiota.ibaraki.jp":true,"ibaraki.ibaraki.jp":true,"ina.ibaraki.jp":true,"inashiki.ibaraki.jp":true,"itako.ibaraki.jp":true,"iwama.ibaraki.jp":true,"joso.ibaraki.jp":true,"kamisu.ibaraki.jp":true,"kasama.ibaraki.jp":true,"kashima.ibaraki.jp":true,"kasumigaura.ibaraki.jp":true,"koga.ibaraki.jp":true,"miho.ibaraki.jp":true,"mito.ibaraki.jp":true,"moriya.ibaraki.jp":true,"naka.ibaraki.jp":true,"namegata.ibaraki.jp":true,"oarai.ibaraki.jp":true,"ogawa.ibaraki.jp":true,"omitama.ibaraki.jp":true,"ryugasaki.ibaraki.jp":true,"sakai.ibaraki.jp":true,"sakuragawa.ibaraki.jp":true,"shimodate.ibaraki.jp":true,"shimotsuma.ibaraki.jp":true,"shirosato.ibaraki.jp":true,"sowa.ibaraki.jp":true,"suifu.ibaraki.jp":true,"takahagi.ibaraki.jp":true,"tamatsukuri.ibaraki.jp":true,"tokai.ibaraki.jp":true,"tomobe.ibaraki.jp":true,"tone.ibaraki.jp":true,"toride.ibaraki.jp":true,"tsuchiura.ibaraki.jp":true,"tsukuba.ibaraki.jp":true,"uchihara.ibaraki.jp":true,"ushiku.ibaraki.jp":true,"yachiyo.ibaraki.jp":true,"yamagata.ibaraki.jp":true,"yawara.ibaraki.jp":true,"yuki.ibaraki.jp":true,"anamizu.ishikawa.jp":true,"hakui.ishikawa.jp":true,"hakusan.ishikawa.jp":true,"kaga.ishikawa.jp":true,"kahoku.ishikawa.jp":true,"kanazawa.ishikawa.jp":true,"kawakita.ishikawa.jp":true,"komatsu.ishikawa.jp":true,"nakanoto.ishikawa.jp":true,"nanao.ishikawa.jp":true,"nomi.ishikawa.jp":true,"nonoichi.ishikawa.jp":true,"noto.ishikawa.jp":true,"shika.ishikawa.jp":true,"suzu.ishikawa.jp":true,"tsubata.ishikawa.jp":true,"tsurugi.ishikawa.jp":true,"uchinada.ishikawa.jp":true,"wajima.ishikawa.jp":true,"fudai.iwate.jp":true,"fujisawa.iwate.jp":true,"hanamaki.iwate.jp":true,"hiraizumi.iwate.jp":true,"hirono.iwate.jp":true,"ichinohe.iwate.jp":true,"ichinoseki.iwate.jp":true,"iwaizumi.iwate.jp":true,"iwate.iwate.jp":true,"joboji.iwate.jp":true,"kamaishi.iwate.jp":true,"kanegasaki.iwate.jp":true,"karumai.iwate.jp":true,"kawai.iwate.jp":true,"kitakami.iwate.jp":true,"kuji.iwate.jp":true,"kunohe.iwate.jp":true,"kuzumaki.iwate.jp":true,"miyako.iwate.jp":true,"mizusawa.iwate.jp":true,"morioka.iwate.jp":true,"ninohe.iwate.jp":true,"noda.iwate.jp":true,"ofunato.iwate.jp":true,"oshu.iwate.jp":true,"otsuchi.iwate.jp":true,"rikuzentakata.iwate.jp":true,"shiwa.iwate.jp":true,"shizukuishi.iwate.jp":true,"sumita.iwate.jp":true,"tanohata.iwate.jp":true,"tono.iwate.jp":true,"yahaba.iwate.jp":true,"yamada.iwate.jp":true,"ayagawa.kagawa.jp":true,"higashikagawa.kagawa.jp":true,"kanonji.kagawa.jp":true,"kotohira.kagawa.jp":true,"manno.kagawa.jp":true,"marugame.kagawa.jp":true,"mitoyo.kagawa.jp":true,"naoshima.kagawa.jp":true,"sanuki.kagawa.jp":true,"tadotsu.kagawa.jp":true,"takamatsu.kagawa.jp":true,"tonosho.kagawa.jp":true,"uchinomi.kagawa.jp":true,"utazu.kagawa.jp":true,"zentsuji.kagawa.jp":true,"akune.kagoshima.jp":true,"amami.kagoshima.jp":true,"hioki.kagoshima.jp":true,"isa.kagoshima.jp":true,"isen.kagoshima.jp":true,"izumi.kagoshima.jp":true,"kagoshima.kagoshima.jp":true,"kanoya.kagoshima.jp":true,"kawanabe.kagoshima.jp":true,"kinko.kagoshima.jp":true,"kouyama.kagoshima.jp":true,"makurazaki.kagoshima.jp":true,"matsumoto.kagoshima.jp":true,"minamitane.kagoshima.jp":true,"nakatane.kagoshima.jp":true,"nishinoomote.kagoshima.jp":true,"satsumasendai.kagoshima.jp":true,"soo.kagoshima.jp":true,"tarumizu.kagoshima.jp":true,"yusui.kagoshima.jp":true,"aikawa.kanagawa.jp":true,"atsugi.kanagawa.jp":true,"ayase.kanagawa.jp":true,"chigasaki.kanagawa.jp":true,"ebina.kanagawa.jp":true,"fujisawa.kanagawa.jp":true,"hadano.kanagawa.jp":true,"hakone.kanagawa.jp":true,"hiratsuka.kanagawa.jp":true,"isehara.kanagawa.jp":true,"kaisei.kanagawa.jp":true,"kamakura.kanagawa.jp":true,"kiyokawa.kanagawa.jp":true,"matsuda.kanagawa.jp":true,"minamiashigara.kanagawa.jp":true,"miura.kanagawa.jp":true,"nakai.kanagawa.jp":true,"ninomiya.kanagawa.jp":true,"odawara.kanagawa.jp":true,"oi.kanagawa.jp":true,"oiso.kanagawa.jp":true,"sagamihara.kanagawa.jp":true,"samukawa.kanagawa.jp":true,"tsukui.kanagawa.jp":true,"yamakita.kanagawa.jp":true,"yamato.kanagawa.jp":true,"yokosuka.kanagawa.jp":true,"yugawara.kanagawa.jp":true,"zama.kanagawa.jp":true,"zushi.kanagawa.jp":true,"aki.kochi.jp":true,"geisei.kochi.jp":true,"hidaka.kochi.jp":true,"higashitsuno.kochi.jp":true,"ino.kochi.jp":true,"kagami.kochi.jp":true,"kami.kochi.jp":true,"kitagawa.kochi.jp":true,"kochi.kochi.jp":true,"mihara.kochi.jp":true,"motoyama.kochi.jp":true,"muroto.kochi.jp":true,"nahari.kochi.jp":true,"nakamura.kochi.jp":true,"nankoku.kochi.jp":true,"nishitosa.kochi.jp":true,"niyodogawa.kochi.jp":true,"ochi.kochi.jp":true,"okawa.kochi.jp":true,"otoyo.kochi.jp":true,"otsuki.kochi.jp":true,"sakawa.kochi.jp":true,"sukumo.kochi.jp":true,"susaki.kochi.jp":true,"tosa.kochi.jp":true,"tosashimizu.kochi.jp":true,"toyo.kochi.jp":true,"tsuno.kochi.jp":true,"umaji.kochi.jp":true,"yasuda.kochi.jp":true,"yusuhara.kochi.jp":true,"amakusa.kumamoto.jp":true,"arao.kumamoto.jp":true,"aso.kumamoto.jp":true,"choyo.kumamoto.jp":true,"gyokuto.kumamoto.jp":true,"hitoyoshi.kumamoto.jp":true,"kamiamakusa.kumamoto.jp":true,"kashima.kumamoto.jp":true,"kikuchi.kumamoto.jp":true,"kosa.kumamoto.jp":true,"kumamoto.kumamoto.jp":true,"mashiki.kumamoto.jp":true,"mifune.kumamoto.jp":true,"minamata.kumamoto.jp":true,"minamioguni.kumamoto.jp":true,"nagasu.kumamoto.jp":true,"nishihara.kumamoto.jp":true,"oguni.kumamoto.jp":true,"ozu.kumamoto.jp":true,"sumoto.kumamoto.jp":true,"takamori.kumamoto.jp":true,"uki.kumamoto.jp":true,"uto.kumamoto.jp":true,"yamaga.kumamoto.jp":true,"yamato.kumamoto.jp":true,"yatsushiro.kumamoto.jp":true,"ayabe.kyoto.jp":true,"fukuchiyama.kyoto.jp":true,"higashiyama.kyoto.jp":true,"ide.kyoto.jp":true,"ine.kyoto.jp":true,"joyo.kyoto.jp":true,"kameoka.kyoto.jp":true,"kamo.kyoto.jp":true,"kita.kyoto.jp":true,"kizu.kyoto.jp":true,"kumiyama.kyoto.jp":true,"kyotamba.kyoto.jp":true,"kyotanabe.kyoto.jp":true,"kyotango.kyoto.jp":true,"maizuru.kyoto.jp":true,"minami.kyoto.jp":true,"minamiyamashiro.kyoto.jp":true,"miyazu.kyoto.jp":true,"muko.kyoto.jp":true,"nagaokakyo.kyoto.jp":true,"nakagyo.kyoto.jp":true,"nantan.kyoto.jp":true,"oyamazaki.kyoto.jp":true,"sakyo.kyoto.jp":true,"seika.kyoto.jp":true,"tanabe.kyoto.jp":true,"uji.kyoto.jp":true,"ujitawara.kyoto.jp":true,"wazuka.kyoto.jp":true,"yamashina.kyoto.jp":true,"yawata.kyoto.jp":true,"asahi.mie.jp":true,"inabe.mie.jp":true,"ise.mie.jp":true,"kameyama.mie.jp":true,"kawagoe.mie.jp":true,"kiho.mie.jp":true,"kisosaki.mie.jp":true,"kiwa.mie.jp":true,"komono.mie.jp":true,"kumano.mie.jp":true,"kuwana.mie.jp":true,"matsusaka.mie.jp":true,"meiwa.mie.jp":true,"mihama.mie.jp":true,"minamiise.mie.jp":true,"misugi.mie.jp":true,"miyama.mie.jp":true,"nabari.mie.jp":true,"shima.mie.jp":true,"suzuka.mie.jp":true,"tado.mie.jp":true,"taiki.mie.jp":true,"taki.mie.jp":true,"tamaki.mie.jp":true,"toba.mie.jp":true,"tsu.mie.jp":true,"udono.mie.jp":true,"ureshino.mie.jp":true,"watarai.mie.jp":true,"yokkaichi.mie.jp":true,"furukawa.miyagi.jp":true,"higashimatsushima.miyagi.jp":true,"ishinomaki.miyagi.jp":true,"iwanuma.miyagi.jp":true,"kakuda.miyagi.jp":true,"kami.miyagi.jp":true,"kawasaki.miyagi.jp":true,"kesennuma.miyagi.jp":true,"marumori.miyagi.jp":true,"matsushima.miyagi.jp":true,"minamisanriku.miyagi.jp":true,"misato.miyagi.jp":true,"murata.miyagi.jp":true,"natori.miyagi.jp":true,"ogawara.miyagi.jp":true,"ohira.miyagi.jp":true,"onagawa.miyagi.jp":true,"osaki.miyagi.jp":true,"rifu.miyagi.jp":true,"semine.miyagi.jp":true,"shibata.miyagi.jp":true,"shichikashuku.miyagi.jp":true,"shikama.miyagi.jp":true,"shiogama.miyagi.jp":true,"shiroishi.miyagi.jp":true,"tagajo.miyagi.jp":true,"taiwa.miyagi.jp":true,"tome.miyagi.jp":true,"tomiya.miyagi.jp":true,"wakuya.miyagi.jp":true,"watari.miyagi.jp":true,"yamamoto.miyagi.jp":true,"zao.miyagi.jp":true,"aya.miyazaki.jp":true,"ebino.miyazaki.jp":true,"gokase.miyazaki.jp":true,"hyuga.miyazaki.jp":true,"kadogawa.miyazaki.jp":true,"kawaminami.miyazaki.jp":true,"kijo.miyazaki.jp":true,"kitagawa.miyazaki.jp":true,"kitakata.miyazaki.jp":true,"kitaura.miyazaki.jp":true,"kobayashi.miyazaki.jp":true,"kunitomi.miyazaki.jp":true,"kushima.miyazaki.jp":true,"mimata.miyazaki.jp":true,"miyakonojo.miyazaki.jp":true,"miyazaki.miyazaki.jp":true,"morotsuka.miyazaki.jp":true,"nichinan.miyazaki.jp":true,"nishimera.miyazaki.jp":true,"nobeoka.miyazaki.jp":true,"saito.miyazaki.jp":true,"shiiba.miyazaki.jp":true,"shintomi.miyazaki.jp":true,"takaharu.miyazaki.jp":true,"takanabe.miyazaki.jp":true,"takazaki.miyazaki.jp":true,"tsuno.miyazaki.jp":true,"achi.nagano.jp":true,"agematsu.nagano.jp":true,"anan.nagano.jp":true,"aoki.nagano.jp":true,"asahi.nagano.jp":true,"azumino.nagano.jp":true,"chikuhoku.nagano.jp":true,"chikuma.nagano.jp":true,"chino.nagano.jp":true,"fujimi.nagano.jp":true,"hakuba.nagano.jp":true,"hara.nagano.jp":true,"hiraya.nagano.jp":true,"iida.nagano.jp":true,"iijima.nagano.jp":true,"iiyama.nagano.jp":true,"iizuna.nagano.jp":true,"ikeda.nagano.jp":true,"ikusaka.nagano.jp":true,"ina.nagano.jp":true,"karuizawa.nagano.jp":true,"kawakami.nagano.jp":true,"kiso.nagano.jp":true,"kisofukushima.nagano.jp":true,"kitaaiki.nagano.jp":true,"komagane.nagano.jp":true,"komoro.nagano.jp":true,"matsukawa.nagano.jp":true,"matsumoto.nagano.jp":true,"miasa.nagano.jp":true,"minamiaiki.nagano.jp":true,"minamimaki.nagano.jp":true,"minamiminowa.nagano.jp":true,"minowa.nagano.jp":true,"miyada.nagano.jp":true,"miyota.nagano.jp":true,"mochizuki.nagano.jp":true,"nagano.nagano.jp":true,"nagawa.nagano.jp":true,"nagiso.nagano.jp":true,"nakagawa.nagano.jp":true,"nakano.nagano.jp":true,"nozawaonsen.nagano.jp":true,"obuse.nagano.jp":true,"ogawa.nagano.jp":true,"okaya.nagano.jp":true,"omachi.nagano.jp":true,"omi.nagano.jp":true,"ookuwa.nagano.jp":true,"ooshika.nagano.jp":true,"otaki.nagano.jp":true,"otari.nagano.jp":true,"sakae.nagano.jp":true,"sakaki.nagano.jp":true,"saku.nagano.jp":true,"sakuho.nagano.jp":true,"shimosuwa.nagano.jp":true,"shinanomachi.nagano.jp":true,"shiojiri.nagano.jp":true,"suwa.nagano.jp":true,"suzaka.nagano.jp":true,"takagi.nagano.jp":true,"takamori.nagano.jp":true,"takayama.nagano.jp":true,"tateshina.nagano.jp":true,"tatsuno.nagano.jp":true,"togakushi.nagano.jp":true,"togura.nagano.jp":true,"tomi.nagano.jp":true,"ueda.nagano.jp":true,"wada.nagano.jp":true,"yamagata.nagano.jp":true,"yamanouchi.nagano.jp":true,"yasaka.nagano.jp":true,"yasuoka.nagano.jp":true,"chijiwa.nagasaki.jp":true,"futsu.nagasaki.jp":true,"goto.nagasaki.jp":true,"hasami.nagasaki.jp":true,"hirado.nagasaki.jp":true,"iki.nagasaki.jp":true,"isahaya.nagasaki.jp":true,"kawatana.nagasaki.jp":true,"kuchinotsu.nagasaki.jp":true,"matsuura.nagasaki.jp":true,"nagasaki.nagasaki.jp":true,"obama.nagasaki.jp":true,"omura.nagasaki.jp":true,"oseto.nagasaki.jp":true,"saikai.nagasaki.jp":true,"sasebo.nagasaki.jp":true,"seihi.nagasaki.jp":true,"shimabara.nagasaki.jp":true,"shinkamigoto.nagasaki.jp":true,"togitsu.nagasaki.jp":true,"tsushima.nagasaki.jp":true,"unzen.nagasaki.jp":true,"ando.nara.jp":true,"gose.nara.jp":true,"heguri.nara.jp":true,"higashiyoshino.nara.jp":true,"ikaruga.nara.jp":true,"ikoma.nara.jp":true,"kamikitayama.nara.jp":true,"kanmaki.nara.jp":true,"kashiba.nara.jp":true,"kashihara.nara.jp":true,"katsuragi.nara.jp":true,"kawai.nara.jp":true,"kawakami.nara.jp":true,"kawanishi.nara.jp":true,"koryo.nara.jp":true,"kurotaki.nara.jp":true,"mitsue.nara.jp":true,"miyake.nara.jp":true,"nara.nara.jp":true,"nosegawa.nara.jp":true,"oji.nara.jp":true,"ouda.nara.jp":true,"oyodo.nara.jp":true,"sakurai.nara.jp":true,"sango.nara.jp":true,"shimoichi.nara.jp":true,"shimokitayama.nara.jp":true,"shinjo.nara.jp":true,"soni.nara.jp":true,"takatori.nara.jp":true,"tawaramoto.nara.jp":true,"tenkawa.nara.jp":true,"tenri.nara.jp":true,"uda.nara.jp":true,"yamatokoriyama.nara.jp":true,"yamatotakada.nara.jp":true,"yamazoe.nara.jp":true,"yoshino.nara.jp":true,"aga.niigata.jp":true,"agano.niigata.jp":true,"gosen.niigata.jp":true,"itoigawa.niigata.jp":true,"izumozaki.niigata.jp":true,"joetsu.niigata.jp":true,"kamo.niigata.jp":true,"kariwa.niigata.jp":true,"kashiwazaki.niigata.jp":true,"minamiuonuma.niigata.jp":true,"mitsuke.niigata.jp":true,"muika.niigata.jp":true,"murakami.niigata.jp":true,"myoko.niigata.jp":true,"nagaoka.niigata.jp":true,"niigata.niigata.jp":true,"ojiya.niigata.jp":true,"omi.niigata.jp":true,"sado.niigata.jp":true,"sanjo.niigata.jp":true,"seiro.niigata.jp":true,"seirou.niigata.jp":true,"sekikawa.niigata.jp":true,"shibata.niigata.jp":true,"tagami.niigata.jp":true,"tainai.niigata.jp":true,"tochio.niigata.jp":true,"tokamachi.niigata.jp":true,"tsubame.niigata.jp":true,"tsunan.niigata.jp":true,"uonuma.niigata.jp":true,"yahiko.niigata.jp":true,"yoita.niigata.jp":true,"yuzawa.niigata.jp":true,"beppu.oita.jp":true,"bungoono.oita.jp":true,"bungotakada.oita.jp":true,"hasama.oita.jp":true,"hiji.oita.jp":true,"himeshima.oita.jp":true,"hita.oita.jp":true,"kamitsue.oita.jp":true,"kokonoe.oita.jp":true,"kuju.oita.jp":true,"kunisaki.oita.jp":true,"kusu.oita.jp":true,"oita.oita.jp":true,"saiki.oita.jp":true,"taketa.oita.jp":true,"tsukumi.oita.jp":true,"usa.oita.jp":true,"usuki.oita.jp":true,"yufu.oita.jp":true,"akaiwa.okayama.jp":true,"asakuchi.okayama.jp":true,"bizen.okayama.jp":true,"hayashima.okayama.jp":true,"ibara.okayama.jp":true,"kagamino.okayama.jp":true,"kasaoka.okayama.jp":true,"kibichuo.okayama.jp":true,"kumenan.okayama.jp":true,"kurashiki.okayama.jp":true,"maniwa.okayama.jp":true,"misaki.okayama.jp":true,"nagi.okayama.jp":true,"niimi.okayama.jp":true,"nishiawakura.okayama.jp":true,"okayama.okayama.jp":true,"satosho.okayama.jp":true,"setouchi.okayama.jp":true,"shinjo.okayama.jp":true,"shoo.okayama.jp":true,"soja.okayama.jp":true,"takahashi.okayama.jp":true,"tamano.okayama.jp":true,"tsuyama.okayama.jp":true,"wake.okayama.jp":true,"yakage.okayama.jp":true,"aguni.okinawa.jp":true,"ginowan.okinawa.jp":true,"ginoza.okinawa.jp":true,"gushikami.okinawa.jp":true,"haebaru.okinawa.jp":true,"higashi.okinawa.jp":true,"hirara.okinawa.jp":true,"iheya.okinawa.jp":true,"ishigaki.okinawa.jp":true,"ishikawa.okinawa.jp":true,"itoman.okinawa.jp":true,"izena.okinawa.jp":true,"kadena.okinawa.jp":true,"kin.okinawa.jp":true,"kitadaito.okinawa.jp":true,"kitanakagusuku.okinawa.jp":true,"kumejima.okinawa.jp":true,"kunigami.okinawa.jp":true,"minamidaito.okinawa.jp":true,"motobu.okinawa.jp":true,"nago.okinawa.jp":true,"naha.okinawa.jp":true,"nakagusuku.okinawa.jp":true,"nakijin.okinawa.jp":true,"nanjo.okinawa.jp":true,"nishihara.okinawa.jp":true,"ogimi.okinawa.jp":true,"okinawa.okinawa.jp":true,"onna.okinawa.jp":true,"shimoji.okinawa.jp":true,"taketomi.okinawa.jp":true,"tarama.okinawa.jp":true,"tokashiki.okinawa.jp":true,"tomigusuku.okinawa.jp":true,"tonaki.okinawa.jp":true,"urasoe.okinawa.jp":true,"uruma.okinawa.jp":true,"yaese.okinawa.jp":true,"yomitan.okinawa.jp":true,"yonabaru.okinawa.jp":true,"yonaguni.okinawa.jp":true,"zamami.okinawa.jp":true,"abeno.osaka.jp":true,"chihayaakasaka.osaka.jp":true,"chuo.osaka.jp":true,"daito.osaka.jp":true,"fujiidera.osaka.jp":true,"habikino.osaka.jp":true,"hannan.osaka.jp":true,"higashiosaka.osaka.jp":true,"higashisumiyoshi.osaka.jp":true,"higashiyodogawa.osaka.jp":true,"hirakata.osaka.jp":true,"ibaraki.osaka.jp":true,"ikeda.osaka.jp":true,"izumi.osaka.jp":true,"izumiotsu.osaka.jp":true,"izumisano.osaka.jp":true,"kadoma.osaka.jp":true,"kaizuka.osaka.jp":true,"kanan.osaka.jp":true,"kashiwara.osaka.jp":true,"katano.osaka.jp":true,"kawachinagano.osaka.jp":true,"kishiwada.osaka.jp":true,"kita.osaka.jp":true,"kumatori.osaka.jp":true,"matsubara.osaka.jp":true,"minato.osaka.jp":true,"minoh.osaka.jp":true,"misaki.osaka.jp":true,"moriguchi.osaka.jp":true,"neyagawa.osaka.jp":true,"nishi.osaka.jp":true,"nose.osaka.jp":true,"osakasayama.osaka.jp":true,"sakai.osaka.jp":true,"sayama.osaka.jp":true,"sennan.osaka.jp":true,"settsu.osaka.jp":true,"shijonawate.osaka.jp":true,"shimamoto.osaka.jp":true,"suita.osaka.jp":true,"tadaoka.osaka.jp":true,"taishi.osaka.jp":true,"tajiri.osaka.jp":true,"takaishi.osaka.jp":true,"takatsuki.osaka.jp":true,"tondabayashi.osaka.jp":true,"toyonaka.osaka.jp":true,"toyono.osaka.jp":true,"yao.osaka.jp":true,"ariake.saga.jp":true,"arita.saga.jp":true,"fukudomi.saga.jp":true,"genkai.saga.jp":true,"hamatama.saga.jp":true,"hizen.saga.jp":true,"imari.saga.jp":true,"kamimine.saga.jp":true,"kanzaki.saga.jp":true,"karatsu.saga.jp":true,"kashima.saga.jp":true,"kitagata.saga.jp":true,"kitahata.saga.jp":true,"kiyama.saga.jp":true,"kouhoku.saga.jp":true,"kyuragi.saga.jp":true,"nishiarita.saga.jp":true,"ogi.saga.jp":true,"omachi.saga.jp":true,"ouchi.saga.jp":true,"saga.saga.jp":true,"shiroishi.saga.jp":true,"taku.saga.jp":true,"tara.saga.jp":true,"tosu.saga.jp":true,"yoshinogari.saga.jp":true,"arakawa.saitama.jp":true,"asaka.saitama.jp":true,"chichibu.saitama.jp":true,"fujimi.saitama.jp":true,"fujimino.saitama.jp":true,"fukaya.saitama.jp":true,"hanno.saitama.jp":true,"hanyu.saitama.jp":true,"hasuda.saitama.jp":true,"hatogaya.saitama.jp":true,"hatoyama.saitama.jp":true,"hidaka.saitama.jp":true,"higashichichibu.saitama.jp":true,"higashimatsuyama.saitama.jp":true,"honjo.saitama.jp":true,"ina.saitama.jp":true,"iruma.saitama.jp":true,"iwatsuki.saitama.jp":true,"kamiizumi.saitama.jp":true,"kamikawa.saitama.jp":true,"kamisato.saitama.jp":true,"kasukabe.saitama.jp":true,"kawagoe.saitama.jp":true,"kawaguchi.saitama.jp":true,"kawajima.saitama.jp":true,"kazo.saitama.jp":true,"kitamoto.saitama.jp":true,"koshigaya.saitama.jp":true,"kounosu.saitama.jp":true,"kuki.saitama.jp":true,"kumagaya.saitama.jp":true,"matsubushi.saitama.jp":true,"minano.saitama.jp":true,"misato.saitama.jp":true,"miyashiro.saitama.jp":true,"miyoshi.saitama.jp":true,"moroyama.saitama.jp":true,"nagatoro.saitama.jp":true,"namegawa.saitama.jp":true,"niiza.saitama.jp":true,"ogano.saitama.jp":true,"ogawa.saitama.jp":true,"ogose.saitama.jp":true,"okegawa.saitama.jp":true,"omiya.saitama.jp":true,"otaki.saitama.jp":true,"ranzan.saitama.jp":true,"ryokami.saitama.jp":true,"saitama.saitama.jp":true,"sakado.saitama.jp":true,"satte.saitama.jp":true,"sayama.saitama.jp":true,"shiki.saitama.jp":true,"shiraoka.saitama.jp":true,"soka.saitama.jp":true,"sugito.saitama.jp":true,"toda.saitama.jp":true,"tokigawa.saitama.jp":true,"tokorozawa.saitama.jp":true,"tsurugashima.saitama.jp":true,"urawa.saitama.jp":true,"warabi.saitama.jp":true,"yashio.saitama.jp":true,"yokoze.saitama.jp":true,"yono.saitama.jp":true,"yorii.saitama.jp":true,"yoshida.saitama.jp":true,"yoshikawa.saitama.jp":true,"yoshimi.saitama.jp":true,"aisho.shiga.jp":true,"gamo.shiga.jp":true,"higashiomi.shiga.jp":true,"hikone.shiga.jp":true,"koka.shiga.jp":true,"konan.shiga.jp":true,"kosei.shiga.jp":true,"koto.shiga.jp":true,"kusatsu.shiga.jp":true,"maibara.shiga.jp":true,"moriyama.shiga.jp":true,"nagahama.shiga.jp":true,"nishiazai.shiga.jp":true,"notogawa.shiga.jp":true,"omihachiman.shiga.jp":true,"otsu.shiga.jp":true,"ritto.shiga.jp":true,"ryuoh.shiga.jp":true,"takashima.shiga.jp":true,"takatsuki.shiga.jp":true,"torahime.shiga.jp":true,"toyosato.shiga.jp":true,"yasu.shiga.jp":true,"akagi.shimane.jp":true,"ama.shimane.jp":true,"gotsu.shimane.jp":true,"hamada.shimane.jp":true,"higashiizumo.shimane.jp":true,"hikawa.shimane.jp":true,"hikimi.shimane.jp":true,"izumo.shimane.jp":true,"kakinoki.shimane.jp":true,"masuda.shimane.jp":true,"matsue.shimane.jp":true,"misato.shimane.jp":true,"nishinoshima.shimane.jp":true,"ohda.shimane.jp":true,"okinoshima.shimane.jp":true,"okuizumo.shimane.jp":true,"shimane.shimane.jp":true,"tamayu.shimane.jp":true,"tsuwano.shimane.jp":true,"unnan.shimane.jp":true,"yakumo.shimane.jp":true,"yasugi.shimane.jp":true,"yatsuka.shimane.jp":true,"arai.shizuoka.jp":true,"atami.shizuoka.jp":true,"fuji.shizuoka.jp":true,"fujieda.shizuoka.jp":true,"fujikawa.shizuoka.jp":true,"fujinomiya.shizuoka.jp":true,"fukuroi.shizuoka.jp":true,"gotemba.shizuoka.jp":true,"haibara.shizuoka.jp":true,"hamamatsu.shizuoka.jp":true,"higashiizu.shizuoka.jp":true,"ito.shizuoka.jp":true,"iwata.shizuoka.jp":true,"izu.shizuoka.jp":true,"izunokuni.shizuoka.jp":true,"kakegawa.shizuoka.jp":true,"kannami.shizuoka.jp":true,"kawanehon.shizuoka.jp":true,"kawazu.shizuoka.jp":true,"kikugawa.shizuoka.jp":true,"kosai.shizuoka.jp":true,"makinohara.shizuoka.jp":true,"matsuzaki.shizuoka.jp":true,"minamiizu.shizuoka.jp":true,"mishima.shizuoka.jp":true,"morimachi.shizuoka.jp":true,"nishiizu.shizuoka.jp":true,"numazu.shizuoka.jp":true,"omaezaki.shizuoka.jp":true,"shimada.shizuoka.jp":true,"shimizu.shizuoka.jp":true,"shimoda.shizuoka.jp":true,"shizuoka.shizuoka.jp":true,"susono.shizuoka.jp":true,"yaizu.shizuoka.jp":true,"yoshida.shizuoka.jp":true,"ashikaga.tochigi.jp":true,"bato.tochigi.jp":true,"haga.tochigi.jp":true,"ichikai.tochigi.jp":true,"iwafune.tochigi.jp":true,"kaminokawa.tochigi.jp":true,"kanuma.tochigi.jp":true,"karasuyama.tochigi.jp":true,"kuroiso.tochigi.jp":true,"mashiko.tochigi.jp":true,"mibu.tochigi.jp":true,"moka.tochigi.jp":true,"motegi.tochigi.jp":true,"nasu.tochigi.jp":true,"nasushiobara.tochigi.jp":true,"nikko.tochigi.jp":true,"nishikata.tochigi.jp":true,"nogi.tochigi.jp":true,"ohira.tochigi.jp":true,"ohtawara.tochigi.jp":true,"oyama.tochigi.jp":true,"sakura.tochigi.jp":true,"sano.tochigi.jp":true,"shimotsuke.tochigi.jp":true,"shioya.tochigi.jp":true,"takanezawa.tochigi.jp":true,"tochigi.tochigi.jp":true,"tsuga.tochigi.jp":true,"ujiie.tochigi.jp":true,"utsunomiya.tochigi.jp":true,"yaita.tochigi.jp":true,"aizumi.tokushima.jp":true,"anan.tokushima.jp":true,"ichiba.tokushima.jp":true,"itano.tokushima.jp":true,"kainan.tokushima.jp":true,"komatsushima.tokushima.jp":true,"matsushige.tokushima.jp":true,"mima.tokushima.jp":true,"minami.tokushima.jp":true,"miyoshi.tokushima.jp":true,"mugi.tokushima.jp":true,"nakagawa.tokushima.jp":true,"naruto.tokushima.jp":true,"sanagochi.tokushima.jp":true,"shishikui.tokushima.jp":true,"tokushima.tokushima.jp":true,"wajiki.tokushima.jp":true,"adachi.tokyo.jp":true,"akiruno.tokyo.jp":true,"akishima.tokyo.jp":true,"aogashima.tokyo.jp":true,"arakawa.tokyo.jp":true,"bunkyo.tokyo.jp":true,"chiyoda.tokyo.jp":true,"chofu.tokyo.jp":true,"chuo.tokyo.jp":true,"edogawa.tokyo.jp":true,"fuchu.tokyo.jp":true,"fussa.tokyo.jp":true,"hachijo.tokyo.jp":true,"hachioji.tokyo.jp":true,"hamura.tokyo.jp":true,"higashikurume.tokyo.jp":true,"higashimurayama.tokyo.jp":true,"higashiyamato.tokyo.jp":true,"hino.tokyo.jp":true,"hinode.tokyo.jp":true,"hinohara.tokyo.jp":true,"inagi.tokyo.jp":true,"itabashi.tokyo.jp":true,"katsushika.tokyo.jp":true,"kita.tokyo.jp":true,"kiyose.tokyo.jp":true,"kodaira.tokyo.jp":true,"koganei.tokyo.jp":true,"kokubunji.tokyo.jp":true,"komae.tokyo.jp":true,"koto.tokyo.jp":true,"kouzushima.tokyo.jp":true,"kunitachi.tokyo.jp":true,"machida.tokyo.jp":true,"meguro.tokyo.jp":true,"minato.tokyo.jp":true,"mitaka.tokyo.jp":true,"mizuho.tokyo.jp":true,"musashimurayama.tokyo.jp":true,"musashino.tokyo.jp":true,"nakano.tokyo.jp":true,"nerima.tokyo.jp":true,"ogasawara.tokyo.jp":true,"okutama.tokyo.jp":true,"ome.tokyo.jp":true,"oshima.tokyo.jp":true,"ota.tokyo.jp":true,"setagaya.tokyo.jp":true,"shibuya.tokyo.jp":true,"shinagawa.tokyo.jp":true,"shinjuku.tokyo.jp":true,"suginami.tokyo.jp":true,"sumida.tokyo.jp":true,"tachikawa.tokyo.jp":true,"taito.tokyo.jp":true,"tama.tokyo.jp":true,"toshima.tokyo.jp":true,"chizu.tottori.jp":true,"hino.tottori.jp":true,"kawahara.tottori.jp":true,"koge.tottori.jp":true,"kotoura.tottori.jp":true,"misasa.tottori.jp":true,"nanbu.tottori.jp":true,"nichinan.tottori.jp":true,"sakaiminato.tottori.jp":true,"tottori.tottori.jp":true,"wakasa.tottori.jp":true,"yazu.tottori.jp":true,"yonago.tottori.jp":true,"asahi.toyama.jp":true,"fuchu.toyama.jp":true,"fukumitsu.toyama.jp":true,"funahashi.toyama.jp":true,"himi.toyama.jp":true,"imizu.toyama.jp":true,"inami.toyama.jp":true,"johana.toyama.jp":true,"kamiichi.toyama.jp":true,"kurobe.toyama.jp":true,"nakaniikawa.toyama.jp":true,"namerikawa.toyama.jp":true,"nanto.toyama.jp":true,"nyuzen.toyama.jp":true,"oyabe.toyama.jp":true,"taira.toyama.jp":true,"takaoka.toyama.jp":true,"tateyama.toyama.jp":true,"toga.toyama.jp":true,"tonami.toyama.jp":true,"toyama.toyama.jp":true,"unazuki.toyama.jp":true,"uozu.toyama.jp":true,"yamada.toyama.jp":true,"arida.wakayama.jp":true,"aridagawa.wakayama.jp":true,"gobo.wakayama.jp":true,"hashimoto.wakayama.jp":true,"hidaka.wakayama.jp":true,"hirogawa.wakayama.jp":true,"inami.wakayama.jp":true,"iwade.wakayama.jp":true,"kainan.wakayama.jp":true,"kamitonda.wakayama.jp":true,"katsuragi.wakayama.jp":true,"kimino.wakayama.jp":true,"kinokawa.wakayama.jp":true,"kitayama.wakayama.jp":true,"koya.wakayama.jp":true,"koza.wakayama.jp":true,"kozagawa.wakayama.jp":true,"kudoyama.wakayama.jp":true,"kushimoto.wakayama.jp":true,"mihama.wakayama.jp":true,"misato.wakayama.jp":true,"nachikatsuura.wakayama.jp":true,"shingu.wakayama.jp":true,"shirahama.wakayama.jp":true,"taiji.wakayama.jp":true,"tanabe.wakayama.jp":true,"wakayama.wakayama.jp":true,"yuasa.wakayama.jp":true,"yura.wakayama.jp":true,"asahi.yamagata.jp":true,"funagata.yamagata.jp":true,"higashine.yamagata.jp":true,"iide.yamagata.jp":true,"kahoku.yamagata.jp":true,"kaminoyama.yamagata.jp":true,"kaneyama.yamagata.jp":true,"kawanishi.yamagata.jp":true,"mamurogawa.yamagata.jp":true,"mikawa.yamagata.jp":true,"murayama.yamagata.jp":true,"nagai.yamagata.jp":true,"nakayama.yamagata.jp":true,"nanyo.yamagata.jp":true,"nishikawa.yamagata.jp":true,"obanazawa.yamagata.jp":true,"oe.yamagata.jp":true,"oguni.yamagata.jp":true,"ohkura.yamagata.jp":true,"oishida.yamagata.jp":true,"sagae.yamagata.jp":true,"sakata.yamagata.jp":true,"sakegawa.yamagata.jp":true,"shinjo.yamagata.jp":true,"shirataka.yamagata.jp":true,"shonai.yamagata.jp":true,"takahata.yamagata.jp":true,"tendo.yamagata.jp":true,"tozawa.yamagata.jp":true,"tsuruoka.yamagata.jp":true,"yamagata.yamagata.jp":true,"yamanobe.yamagata.jp":true,"yonezawa.yamagata.jp":true,"yuza.yamagata.jp":true,"abu.yamaguchi.jp":true,"hagi.yamaguchi.jp":true,"hikari.yamaguchi.jp":true,"hofu.yamaguchi.jp":true,"iwakuni.yamaguchi.jp":true,"kudamatsu.yamaguchi.jp":true,"mitou.yamaguchi.jp":true,"nagato.yamaguchi.jp":true,"oshima.yamaguchi.jp":true,"shimonoseki.yamaguchi.jp":true,"shunan.yamaguchi.jp":true,"tabuse.yamaguchi.jp":true,"tokuyama.yamaguchi.jp":true,"toyota.yamaguchi.jp":true,"ube.yamaguchi.jp":true,"yuu.yamaguchi.jp":true,"chuo.yamanashi.jp":true,"doshi.yamanashi.jp":true,"fuefuki.yamanashi.jp":true,"fujikawa.yamanashi.jp":true,"fujikawaguchiko.yamanashi.jp":true,"fujiyoshida.yamanashi.jp":true,"hayakawa.yamanashi.jp":true,"hokuto.yamanashi.jp":true,"ichikawamisato.yamanashi.jp":true,"kai.yamanashi.jp":true,"kofu.yamanashi.jp":true,"koshu.yamanashi.jp":true,"kosuge.yamanashi.jp":true,"minami-alps.yamanashi.jp":true,"minobu.yamanashi.jp":true,"nakamichi.yamanashi.jp":true,"nanbu.yamanashi.jp":true,"narusawa.yamanashi.jp":true,"nirasaki.yamanashi.jp":true,"nishikatsura.yamanashi.jp":true,"oshino.yamanashi.jp":true,"otsuki.yamanashi.jp":true,"showa.yamanashi.jp":true,"tabayama.yamanashi.jp":true,"tsuru.yamanashi.jp":true,"uenohara.yamanashi.jp":true,"yamanakako.yamanashi.jp":true,"yamanashi.yamanashi.jp":true,"*.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"kp":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"lb":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"ac.lk":true,"lr":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"co.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"com.ms":true,"edu.ms":true,"gov.ms":true,"net.ms":true,"org.ms":true,"mt":true,"com.mt":true,"edu.mt":true,"net.mt":true,"org.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"*.mz":true,"teledata.mz":false,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ng":true,"com.ng":true,"edu.ng":true,"name.ng":true,"net.ng":true,"org.ng":true,"sch.ng":true,"gov.ng":true,"mil.ng":true,"mobi.ng":true,"*.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"nz":true,"ac.nz":true,"co.nz":true,"cri.nz":true,"geek.nz":true,"gen.nz":true,"govt.nz":true,"health.nz":true,"iwi.nz":true,"kiwi.nz":true,"maori.nz":true,"mil.nz":true,"xn--mori-qsa.nz":true,"net.nz":true,"org.nz":true,"parliament.nz":true,"school.nz":true,"om":true,"co.om":true,"com.om":true,"edu.om":true,"gov.om":true,"med.om":true,"museum.om":true,"net.om":true,"org.om":true,"pro.om":true,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"com.pl":true,"net.pl":true,"org.pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"gov.pl":true,"ap.gov.pl":true,"ic.gov.pl":true,"is.gov.pl":true,"us.gov.pl":true,"kmpsp.gov.pl":true,"kppsp.gov.pl":true,"kwpsp.gov.pl":true,"psp.gov.pl":true,"wskr.gov.pl":true,"kwp.gov.pl":true,"mw.gov.pl":true,"ug.gov.pl":true,"um.gov.pl":true,"umig.gov.pl":true,"ugim.gov.pl":true,"upow.gov.pl":true,"uw.gov.pl":true,"starostwo.gov.pl":true,"pa.gov.pl":true,"po.gov.pl":true,"psse.gov.pl":true,"pup.gov.pl":true,"rzgw.gov.pl":true,"sa.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"wsa.gov.pl":true,"sko.gov.pl":true,"uzs.gov.pl":true,"wiih.gov.pl":true,"winb.gov.pl":true,"pinb.gov.pl":true,"wios.gov.pl":true,"witd.gov.pl":true,"wzmiuw.gov.pl":true,"piw.gov.pl":true,"wiw.gov.pl":true,"griw.gov.pl":true,"wif.gov.pl":true,"oum.gov.pl":true,"sdn.gov.pl":true,"zp.gov.pl":true,"uppo.gov.pl":true,"mup.gov.pl":true,"wuoz.gov.pl":true,"konsulat.gov.pl":true,"oirm.gov.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"post":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aca.pro":true,"bar.pro":true,"cpa.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"eng.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"py":true,"com.py":true,"coop.py":true,"edu.py":true,"gov.py":true,"mil.py":true,"net.py":true,"org.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"com.re":true,"asso.re":true,"nom.re":true,"ro":true,"com.ro":true,"org.ro":true,"tm.ro":true,"nt.ro":true,"nom.ro":true,"info.ro":true,"rec.ro":true,"arts.ro":true,"firm.ro":true,"store.ro":true,"www.ro":true,"rs":true,"co.rs":true,"org.rs":true,"edu.rs":true,"ac.rs":true,"gov.rs":true,"in.rs":true,"ru":true,"ac.ru":true,"com.ru":true,"edu.ru":true,"int.ru":true,"net.ru":true,"org.ru":true,"pp.ru":true,"adygeya.ru":true,"altai.ru":true,"amur.ru":true,"arkhangelsk.ru":true,"astrakhan.ru":true,"bashkiria.ru":true,"belgorod.ru":true,"bir.ru":true,"bryansk.ru":true,"buryatia.ru":true,"cbg.ru":true,"chel.ru":true,"chelyabinsk.ru":true,"chita.ru":true,"chukotka.ru":true,"chuvashia.ru":true,"dagestan.ru":true,"dudinka.ru":true,"e-burg.ru":true,"grozny.ru":true,"irkutsk.ru":true,"ivanovo.ru":true,"izhevsk.ru":true,"jar.ru":true,"joshkar-ola.ru":true,"kalmykia.ru":true,"kaluga.ru":true,"kamchatka.ru":true,"karelia.ru":true,"kazan.ru":true,"kchr.ru":true,"kemerovo.ru":true,"khabarovsk.ru":true,"khakassia.ru":true,"khv.ru":true,"kirov.ru":true,"koenig.ru":true,"komi.ru":true,"kostroma.ru":true,"krasnoyarsk.ru":true,"kuban.ru":true,"kurgan.ru":true,"kursk.ru":true,"lipetsk.ru":true,"magadan.ru":true,"mari.ru":true,"mari-el.ru":true,"marine.ru":true,"mordovia.ru":true,"msk.ru":true,"murmansk.ru":true,"nalchik.ru":true,"nnov.ru":true,"nov.ru":true,"novosibirsk.ru":true,"nsk.ru":true,"omsk.ru":true,"orenburg.ru":true,"oryol.ru":true,"palana.ru":true,"penza.ru":true,"perm.ru":true,"ptz.ru":true,"rnd.ru":true,"ryazan.ru":true,"sakhalin.ru":true,"samara.ru":true,"saratov.ru":true,"simbirsk.ru":true,"smolensk.ru":true,"spb.ru":true,"stavropol.ru":true,"stv.ru":true,"surgut.ru":true,"tambov.ru":true,"tatarstan.ru":true,"tom.ru":true,"tomsk.ru":true,"tsaritsyn.ru":true,"tsk.ru":true,"tula.ru":true,"tuva.ru":true,"tver.ru":true,"tyumen.ru":true,"udm.ru":true,"udmurtia.ru":true,"ulan-ude.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"vladivostok.ru":true,"volgograd.ru":true,"vologda.ru":true,"voronezh.ru":true,"vrn.ru":true,"vyatka.ru":true,"yakutia.ru":true,"yamal.ru":true,"yaroslavl.ru":true,"yekaterinburg.ru":true,"yuzhno-sakhalinsk.ru":true,"amursk.ru":true,"baikal.ru":true,"cmw.ru":true,"fareast.ru":true,"jamal.ru":true,"kms.ru":true,"k-uralsk.ru":true,"kustanai.ru":true,"kuzbass.ru":true,"magnitka.ru":true,"mytis.ru":true,"nakhodka.ru":true,"nkz.ru":true,"norilsk.ru":true,"oskol.ru":true,"pyatigorsk.ru":true,"rubtsovsk.ru":true,"snz.ru":true,"syzran.ru":true,"vdonsk.ru":true,"zgrad.ru":true,"gov.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"tv.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"com.sh":true,"net.sh":true,"gov.sh":true,"org.sh":true,"mil.sh":true,"si":true,"sj":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"adygeya.su":true,"arkhangelsk.su":true,"balashov.su":true,"bashkiria.su":true,"bryansk.su":true,"dagestan.su":true,"grozny.su":true,"ivanovo.su":true,"kalmykia.su":true,"kaluga.su":true,"karelia.su":true,"khakassia.su":true,"krasnodar.su":true,"kurgan.su":true,"lenug.su":true,"mordovia.su":true,"msk.su":true,"murmansk.su":true,"nalchik.su":true,"nov.su":true,"obninsk.su":true,"penza.su":true,"pokrovsk.su":true,"sochi.su":true,"spb.su":true,"togliatti.su":true,"troitsk.su":true,"tula.su":true,"tuva.su":true,"vladikavkaz.su":true,"vladimir.su":true,"vologda.su":true,"sv":true,"com.sv":true,"edu.sv":true,"gob.sv":true,"org.sv":true,"red.sv":true,"sx":true,"gov.sx":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"com.tm":true,"co.tm":true,"org.tm":true,"net.tm":true,"nom.tm":true,"gov.tm":true,"mil.tm":true,"edu.tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"tp":true,"tr":true,"com.tr":true,"info.tr":true,"biz.tr":true,"net.tr":true,"org.tr":true,"web.tr":true,"gen.tr":true,"tv.tr":true,"av.tr":true,"dr.tr":true,"bbs.tr":true,"name.tr":true,"tel.tr":true,"gov.tr":true,"bel.tr":true,"pol.tr":true,"mil.tr":true,"k12.tr":true,"edu.tr":true,"kep.tr":true,"nc.tr":true,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"tz":true,"ac.tz":true,"co.tz":true,"go.tz":true,"hotel.tz":true,"info.tz":true,"me.tz":true,"mil.tz":true,"mobi.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"tv.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"cherkasy.ua":true,"chernigov.ua":true,"chernihiv.ua":true,"chernivtsi.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"cr.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"dnipropetrovsk.ua":true,"dominic.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkiv.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"khmelnytskyi.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"krym.ua":true,"ks.ua":true,"kv.ua":true,"kyiv.ua":true,"lg.ua":true,"lt.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lv.ua":true,"lviv.ua":true,"mk.ua":true,"mykolaiv.ua":true,"nikolaev.ua":true,"od.ua":true,"odesa.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rivne.ua":true,"rovno.ua":true,"rv.ua":true,"sb.ua":true,"sebastopol.ua":true,"sevastopol.ua":true,"sm.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uz.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vinnytsia.ua":true,"vn.ua":true,"volyn.ua":true,"yalta.ua":true,"zaporizhzhe.ua":true,"zaporizhzhia.ua":true,"zhitomir.ua":true,"zhytomyr.ua":true,"zp.ua":true,"zt.ua":true,"ug":true,"co.ug":true,"or.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"com.ug":true,"org.ug":true,"uk":true,"ac.uk":true,"co.uk":true,"gov.uk":true,"ltd.uk":true,"me.uk":true,"net.uk":true,"nhs.uk":true,"org.uk":true,"plc.uk":true,"police.uk":true,"*.sch.uk":true,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.de.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"uy":true,"com.uy":true,"edu.uy":true,"gub.uy":true,"mil.uy":true,"net.uy":true,"org.uy":true,"uz":true,"co.uz":true,"com.uz":true,"net.uz":true,"org.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"ve":true,"arts.ve":true,"co.ve":true,"com.ve":true,"e12.ve":true,"edu.ve":true,"firm.ve":true,"gob.ve":true,"gov.ve":true,"info.ve":true,"int.ve":true,"mil.ve":true,"net.ve":true,"org.ve":true,"rec.ve":true,"store.ve":true,"tec.ve":true,"web.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"com.vu":true,"edu.vu":true,"net.vu":true,"org.vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--y9a3aq":true,"xn--54b7fta0cc":true,"xn--90ais":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--node":true,"xn--qxam":true,"xn--j6w193g":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbtx2b":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--80ao21a":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--d1alf":true,"xn--l1acc":true,"xn--mix891f":true,"xn--mix082f":true,"xn--mgbx4cd0ab":true,"xn--mgb9awbf":true,"xn--mgbai9azgqp6j":true,"xn--mgbai9a5eva00b":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--o1ac.xn--90a3ac":true,"xn--c1avg.xn--90a3ac":true,"xn--90azh.xn--90a3ac":true,"xn--d1at.xn--90a3ac":true,"xn--o1ach.xn--90a3ac":true,"xn--80au.xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--mgbpl2fh":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"ac.za":true,"agrica.za":true,"alt.za":true,"co.za":true,"edu.za":true,"gov.za":true,"grondar.za":true,"law.za":true,"mil.za":true,"net.za":true,"ngo.za":true,"nis.za":true,"nom.za":true,"org.za":true,"school.za":true,"tm.za":true,"web.za":true,"*.zm":true,"*.zw":true,"aaa":true,"aarp":true,"abarth":true,"abb":true,"abbott":true,"abbvie":true,"abc":true,"able":true,"abogado":true,"abudhabi":true,"academy":true,"accenture":true,"accountant":true,"accountants":true,"aco":true,"active":true,"actor":true,"adac":true,"ads":true,"adult":true,"aeg":true,"aetna":true,"afamilycompany":true,"afl":true,"africa":true,"africamagic":true,"agakhan":true,"agency":true,"aig":true,"aigo":true,"airbus":true,"airforce":true,"airtel":true,"akdn":true,"alfaromeo":true,"alibaba":true,"alipay":true,"allfinanz":true,"allstate":true,"ally":true,"alsace":true,"alstom":true,"americanexpress":true,"americanfamily":true,"amex":true,"amfam":true,"amica":true,"amsterdam":true,"analytics":true,"android":true,"anquan":true,"anz":true,"aol":true,"apartments":true,"app":true,"apple":true,"aquarelle":true,"aramco":true,"archi":true,"army":true,"arte":true,"asda":true,"associates":true,"athleta":true,"attorney":true,"auction":true,"audi":true,"audible":true,"audio":true,"auspost":true,"author":true,"auto":true,"autos":true,"avianca":true,"aws":true,"axa":true,"azure":true,"baby":true,"baidu":true,"banamex":true,"bananarepublic":true,"band":true,"bank":true,"bar":true,"barcelona":true,"barclaycard":true,"barclays":true,"barefoot":true,"bargains":true,"basketball":true,"bauhaus":true,"bayern":true,"bbc":true,"bbt":true,"bbva":true,"bcg":true,"bcn":true,"beats":true,"beer":true,"bentley":true,"berlin":true,"best":true,"bestbuy":true,"bet":true,"bharti":true,"bible":true,"bid":true,"bike":true,"bing":true,"bingo":true,"bio":true,"black":true,"blackfriday":true,"blanco":true,"blockbuster":true,"blog":true,"bloomberg":true,"blue":true,"bms":true,"bmw":true,"bnl":true,"bnpparibas":true,"boats":true,"boehringer":true,"bofa":true,"bom":true,"bond":true,"boo":true,"book":true,"booking":true,"boots":true,"bosch":true,"bostik":true,"bot":true,"boutique":true,"bradesco":true,"bridgestone":true,"broadway":true,"broker":true,"brother":true,"brussels":true,"budapest":true,"bugatti":true,"build":true,"builders":true,"business":true,"buy":true,"buzz":true,"bzh":true,"cab":true,"cafe":true,"cal":true,"call":true,"calvinklein":true,"camera":true,"camp":true,"cancerresearch":true,"canon":true,"capetown":true,"capital":true,"capitalone":true,"car":true,"caravan":true,"cards":true,"care":true,"career":true,"careers":true,"cars":true,"cartier":true,"casa":true,"case":true,"caseih":true,"cash":true,"casino":true,"catering":true,"cba":true,"cbn":true,"cbre":true,"cbs":true,"ceb":true,"center":true,"ceo":true,"cern":true,"cfa":true,"cfd":true,"chanel":true,"channel":true,"chase":true,"chat":true,"cheap":true,"chintai":true,"chloe":true,"christmas":true,"chrome":true,"chrysler":true,"church":true,"cipriani":true,"circle":true,"cisco":true,"citadel":true,"citi":true,"citic":true,"city":true,"cityeats":true,"claims":true,"cleaning":true,"click":true,"clinic":true,"clothing":true,"cloud":true,"club":true,"clubmed":true,"coach":true,"codes":true,"coffee":true,"college":true,"cologne":true,"comcast":true,"commbank":true,"community":true,"company":true,"computer":true,"comsec":true,"condos":true,"construction":true,"consulting":true,"contact":true,"contractors":true,"cooking":true,"cookingchannel":true,"cool":true,"corsica":true,"country":true,"coupon":true,"coupons":true,"courses":true,"credit":true,"creditcard":true,"creditunion":true,"cricket":true,"crown":true,"crs":true,"cruises":true,"csc":true,"cuisinella":true,"cymru":true,"cyou":true,"dabur":true,"dad":true,"dance":true,"date":true,"dating":true,"datsun":true,"day":true,"dclk":true,"dds":true,"deal":true,"dealer":true,"deals":true,"degree":true,"delivery":true,"dell":true,"deloitte":true,"delta":true,"democrat":true,"dental":true,"dentist":true,"desi":true,"design":true,"dev":true,"dhl":true,"diamonds":true,"diet":true,"digital":true,"direct":true,"directory":true,"discount":true,"discover":true,"dish":true,"dnp":true,"docs":true,"dodge":true,"dog":true,"doha":true,"domains":true,"doosan":true,"dot":true,"download":true,"drive":true,"dstv":true,"dtv":true,"dubai":true,"duck":true,"dunlop":true,"duns":true,"dupont":true,"durban":true,"dvag":true,"dwg":true,"earth":true,"eat":true,"edeka":true,"education":true,"email":true,"emerck":true,"emerson":true,"energy":true,"engineer":true,"engineering":true,"enterprises":true,"epost":true,"epson":true,"equipment":true,"ericsson":true,"erni":true,"esq":true,"estate":true,"esurance":true,"etisalat":true,"eurovision":true,"eus":true,"events":true,"everbank":true,"exchange":true,"expert":true,"exposed":true,"express":true,"extraspace":true,"fage":true,"fail":true,"fairwinds":true,"faith":true,"family":true,"fan":true,"fans":true,"farm":true,"farmers":true,"fashion":true,"fast":true,"fedex":true,"feedback":true,"ferrari":true,"ferrero":true,"fiat":true,"fidelity":true,"fido":true,"film":true,"final":true,"finance":true,"financial":true,"fire":true,"firestone":true,"firmdale":true,"fish":true,"fishing":true,"fit":true,"fitness":true,"flickr":true,"flights":true,"flir":true,"florist":true,"flowers":true,"flsmidth":true,"fly":true,"foo":true,"foodnetwork":true,"football":true,"ford":true,"forex":true,"forsale":true,"forum":true,"foundation":true,"fox":true,"fresenius":true,"frl":true,"frogans":true,"frontdoor":true,"frontier":true,"ftr":true,"fujitsu":true,"fujixerox":true,"fund":true,"furniture":true,"futbol":true,"fyi":true,"gal":true,"gallery":true,"gallo":true,"gallup":true,"game":true,"games":true,"gap":true,"garden":true,"gbiz":true,"gdn":true,"gea":true,"gent":true,"genting":true,"george":true,"ggee":true,"gift":true,"gifts":true,"gives":true,"giving":true,"glade":true,"glass":true,"gle":true,"global":true,"globo":true,"gmail":true,"gmo":true,"gmx":true,"godaddy":true,"gold":true,"goldpoint":true,"golf":true,"goo":true,"goodhands":true,"goodyear":true,"goog":true,"google":true,"gop":true,"got":true,"gotv":true,"grainger":true,"graphics":true,"gratis":true,"green":true,"gripe":true,"group":true,"guardian":true,"gucci":true,"guge":true,"guide":true,"guitars":true,"guru":true,"hamburg":true,"hangout":true,"haus":true,"hbo":true,"hdfc":true,"hdfcbank":true,"health":true,"healthcare":true,"help":true,"helsinki":true,"here":true,"hermes":true,"hgtv":true,"hiphop":true,"hisamitsu":true,"hitachi":true,"hiv":true,"hkt":true,"hockey":true,"holdings":true,"holiday":true,"homedepot":true,"homegoods":true,"homes":true,"homesense":true,"honda":true,"honeywell":true,"horse":true,"host":true,"hosting":true,"hot":true,"hoteles":true,"hotmail":true,"house":true,"how":true,"hsbc":true,"htc":true,"hughes":true,"hyatt":true,"hyundai":true,"ibm":true,"icbc":true,"ice":true,"icu":true,"ieee":true,"ifm":true,"iinet":true,"ikano":true,"imamat":true,"imdb":true,"immo":true,"immobilien":true,"industries":true,"infiniti":true,"ing":true,"ink":true,"institute":true,"insurance":true,"insure":true,"intel":true,"international":true,"intuit":true,"investments":true,"ipiranga":true,"irish":true,"iselect":true,"ismaili":true,"ist":true,"istanbul":true,"itau":true,"itv":true,"iveco":true,"iwc":true,"jaguar":true,"java":true,"jcb":true,"jcp":true,"jeep":true,"jetzt":true,"jewelry":true,"jio":true,"jlc":true,"jll":true,"jmp":true,"jnj":true,"joburg":true,"jot":true,"joy":true,"jpmorgan":true,"jprs":true,"juegos":true,"juniper":true,"kaufen":true,"kddi":true,"kerryhotels":true,"kerrylogistics":true,"kerryproperties":true,"kfh":true,"kia":true,"kim":true,"kinder":true,"kindle":true,"kitchen":true,"kiwi":true,"koeln":true,"komatsu":true,"kosher":true,"kpmg":true,"kpn":true,"krd":true,"kred":true,"kuokgroup":true,"kyknet":true,"kyoto":true,"lacaixa":true,"ladbrokes":true,"lamborghini":true,"lancaster":true,"lancia":true,"lancome":true,"land":true,"landrover":true,"lanxess":true,"lasalle":true,"lat":true,"latino":true,"latrobe":true,"law":true,"lawyer":true,"lds":true,"lease":true,"leclerc":true,"lefrak":true,"legal":true,"lego":true,"lexus":true,"lgbt":true,"liaison":true,"lidl":true,"life":true,"lifeinsurance":true,"lifestyle":true,"lighting":true,"like":true,"lilly":true,"limited":true,"limo":true,"lincoln":true,"linde":true,"link":true,"lipsy":true,"live":true,"living":true,"lixil":true,"loan":true,"loans":true,"locker":true,"locus":true,"loft":true,"lol":true,"london":true,"lotte":true,"lotto":true,"love":true,"lpl":true,"lplfinancial":true,"ltd":true,"ltda":true,"lundbeck":true,"lupin":true,"luxe":true,"luxury":true,"macys":true,"madrid":true,"maif":true,"maison":true,"makeup":true,"man":true,"management":true,"mango":true,"market":true,"marketing":true,"markets":true,"marriott":true,"marshalls":true,"maserati":true,"mattel":true,"mba":true,"mcd":true,"mcdonalds":true,"mckinsey":true,"med":true,"media":true,"meet":true,"melbourne":true,"meme":true,"memorial":true,"men":true,"menu":true,"meo":true,"metlife":true,"miami":true,"microsoft":true,"mini":true,"mint":true,"mit":true,"mitsubishi":true,"mlb":true,"mls":true,"mma":true,"mnet":true,"mobily":true,"moda":true,"moe":true,"moi":true,"mom":true,"monash":true,"money":true,"monster":true,"montblanc":true,"mopar":true,"mormon":true,"mortgage":true,"moscow":true,"moto":true,"motorcycles":true,"mov":true,"movie":true,"movistar":true,"msd":true,"mtn":true,"mtpc":true,"mtr":true,"multichoice":true,"mutual":true,"mutuelle":true,"mzansimagic":true,"nab":true,"nadex":true,"nagoya":true,"naspers":true,"nationwide":true,"natura":true,"navy":true,"nba":true,"nec":true,"netbank":true,"netflix":true,"network":true,"neustar":true,"new":true,"newholland":true,"news":true,"next":true,"nextdirect":true,"nexus":true,"nfl":true,"ngo":true,"nhk":true,"nico":true,"nike":true,"nikon":true,"ninja":true,"nissan":true,"nokia":true,"northwesternmutual":true,"norton":true,"now":true,"nowruz":true,"nowtv":true,"nra":true,"nrw":true,"ntt":true,"nyc":true,"obi":true,"observer":true,"off":true,"office":true,"okinawa":true,"olayan":true,"olayangroup":true,"oldnavy":true,"ollo":true,"omega":true,"one":true,"ong":true,"onl":true,"online":true,"onyourside":true,"ooo":true,"open":true,"oracle":true,"orange":true,"organic":true,"orientexpress":true,"osaka":true,"otsuka":true,"ott":true,"ovh":true,"page":true,"pamperedchef":true,"panasonic":true,"panerai":true,"paris":true,"pars":true,"partners":true,"parts":true,"party":true,"passagens":true,"pay":true,"payu":true,"pccw":true,"pet":true,"pfizer":true,"pharmacy":true,"philips":true,"photo":true,"photography":true,"photos":true,"physio":true,"piaget":true,"pics":true,"pictet":true,"pictures":true,"pid":true,"pin":true,"ping":true,"pink":true,"pioneer":true,"pizza":true,"place":true,"play":true,"playstation":true,"plumbing":true,"plus":true,"pnc":true,"pohl":true,"poker":true,"politie":true,"porn":true,"pramerica":true,"praxi":true,"press":true,"prime":true,"prod":true,"productions":true,"prof":true,"progressive":true,"promo":true,"properties":true,"property":true,"protection":true,"pru":true,"prudential":true,"pub":true,"qpon":true,"quebec":true,"quest":true,"qvc":true,"racing":true,"raid":true,"read":true,"realestate":true,"realtor":true,"realty":true,"recipes":true,"red":true,"redstone":true,"redumbrella":true,"rehab":true,"reise":true,"reisen":true,"reit":true,"reliance":true,"ren":true,"rent":true,"rentals":true,"repair":true,"report":true,"republican":true,"rest":true,"restaurant":true,"review":true,"reviews":true,"rexroth":true,"rich":true,"richardli":true,"ricoh":true,"rightathome":true,"ril":true,"rio":true,"rip":true,"rocher":true,"rocks":true,"rodeo":true,"rogers":true,"room":true,"rsvp":true,"ruhr":true,"run":true,"rwe":true,"ryukyu":true,"saarland":true,"safe":true,"safety":true,"sakura":true,"sale":true,"salon":true,"samsclub":true,"samsung":true,"sandvik":true,"sandvikcoromant":true,"sanofi":true,"sap":true,"sapo":true,"sarl":true,"sas":true,"save":true,"saxo":true,"sbi":true,"sbs":true,"sca":true,"scb":true,"schaeffler":true,"schmidt":true,"scholarships":true,"school":true,"schule":true,"schwarz":true,"science":true,"scjohnson":true,"scor":true,"scot":true,"seat":true,"secure":true,"security":true,"seek":true,"sener":true,"services":true,"ses":true,"seven":true,"sew":true,"sex":true,"sexy":true,"sfr":true,"shangrila":true,"sharp":true,"shaw":true,"shell":true,"shia":true,"shiksha":true,"shoes":true,"shouji":true,"show":true,"showtime":true,"shriram":true,"silk":true,"sina":true,"singles":true,"site":true,"ski":true,"skin":true,"sky":true,"skype":true,"sling":true,"smart":true,"smile":true,"sncf":true,"soccer":true,"social":true,"softbank":true,"software":true,"sohu":true,"solar":true,"solutions":true,"song":true,"sony":true,"soy":true,"space":true,"spiegel":true,"spot":true,"spreadbetting":true,"srl":true,"srt":true,"stada":true,"staples":true,"star":true,"starhub":true,"statebank":true,"statefarm":true,"statoil":true,"stc":true,"stcgroup":true,"stockholm":true,"storage":true,"store":true,"studio":true,"study":true,"style":true,"sucks":true,"supersport":true,"supplies":true,"supply":true,"support":true,"surf":true,"surgery":true,"suzuki":true,"swatch":true,"swiftcover":true,"swiss":true,"sydney":true,"symantec":true,"systems":true,"tab":true,"taipei":true,"talk":true,"taobao":true,"target":true,"tatamotors":true,"tatar":true,"tattoo":true,"tax":true,"taxi":true,"tci":true,"tdk":true,"team":true,"tech":true,"technology":true,"telecity":true,"telefonica":true,"temasek":true,"tennis":true,"teva":true,"thd":true,"theater":true,"theatre":true,"theguardian":true,"tiaa":true,"tickets":true,"tienda":true,"tiffany":true,"tips":true,"tires":true,"tirol":true,"tjmaxx":true,"tjx":true,"tkmaxx":true,"tmall":true,"today":true,"tokyo":true,"tools":true,"top":true,"toray":true,"toshiba":true,"total":true,"tours":true,"town":true,"toyota":true,"toys":true,"trade":true,"trading":true,"training":true,"travelchannel":true,"travelers":true,"travelersinsurance":true,"trust":true,"trv":true,"tube":true,"tui":true,"tunes":true,"tushu":true,"tvs":true,"ubank":true,"ubs":true,"uconnect":true,"university":true,"uno":true,"uol":true,"ups":true,"vacations":true,"vana":true,"vanguard":true,"vegas":true,"ventures":true,"verisign":true,"versicherung":true,"vet":true,"viajes":true,"video":true,"vig":true,"viking":true,"villas":true,"vin":true,"vip":true,"virgin":true,"visa":true,"vision":true,"vista":true,"vistaprint":true,"viva":true,"vivo":true,"vlaanderen":true,"vodka":true,"volkswagen":true,"vote":true,"voting":true,"voto":true,"voyage":true,"vuelos":true,"wales":true,"walmart":true,"walter":true,"wang":true,"wanggou":true,"warman":true,"watch":true,"watches":true,"weather":true,"weatherchannel":true,"webcam":true,"weber":true,"website":true,"wed":true,"wedding":true,"weibo":true,"weir":true,"whoswho":true,"wien":true,"wiki":true,"williamhill":true,"win":true,"windows":true,"wine":true,"winners":true,"wme":true,"wolterskluwer":true,"woodside":true,"work":true,"works":true,"world":true,"wtc":true,"wtf":true,"xbox":true,"xerox":true,"xfinity":true,"xihuan":true,"xin":true,"xn--11b4c3d":true,"xn--1ck2e1b":true,"xn--1qqw23a":true,"xn--30rr7y":true,"xn--3bst00m":true,"xn--3ds443g":true,"xn--3oq18vl8pn36a":true,"xn--3pxu8k":true,"xn--42c2d9a":true,"xn--45q11c":true,"xn--4gbrim":true,"xn--4gq48lf9j":true,"xn--55qw42g":true,"xn--55qx5d":true,"xn--5su34j936bgsg":true,"xn--5tzm5g":true,"xn--6frz82g":true,"xn--6qq986b3xl":true,"xn--80adxhks":true,"xn--80asehdb":true,"xn--80aswg":true,"xn--8y0a063a":true,"xn--9dbq2a":true,"xn--9et52u":true,"xn--9krt00a":true,"xn--b4w605ferd":true,"xn--bck1b9a5dre4c":true,"xn--c1avg":true,"xn--c2br7g":true,"xn--cck2b3b":true,"xn--cg4bki":true,"xn--czr694b":true,"xn--czrs0t":true,"xn--czru2d":true,"xn--d1acj3b":true,"xn--eckvdtc9d":true,"xn--efvy88h":true,"xn--estv75g":true,"xn--fct429k":true,"xn--fhbei":true,"xn--fiq228c5hs":true,"xn--fiq64b":true,"xn--fjq720a":true,"xn--flw351e":true,"xn--fzys8d69uvgm":true,"xn--g2xx48c":true,"xn--gckr3f0f":true,"xn--hxt814e":true,"xn--i1b6b1a6a2e":true,"xn--imr513n":true,"xn--io0a7i":true,"xn--j1aef":true,"xn--jlq61u9w7b":true,"xn--jvr189m":true,"xn--kcrx77d1x4a":true,"xn--kpu716f":true,"xn--kput3i":true,"xn--mgba3a3ejt":true,"xn--mgba7c0bbn0a":true,"xn--mgbaakc7dvf":true,"xn--mgbab2bd":true,"xn--mgbb9fbpob":true,"xn--mgbca7dzdo":true,"xn--mgbt3dhd":true,"xn--mk1bu44c":true,"xn--mxtq1m":true,"xn--ngbc5azd":true,"xn--ngbe9e0a":true,"xn--nqv7f":true,"xn--nqv7fs00ema":true,"xn--nyqy26a":true,"xn--p1acf":true,"xn--pbt977c":true,"xn--pssy2u":true,"xn--q9jyb4c":true,"xn--qcka1pmc":true,"xn--rhqv96g":true,"xn--rovu88b":true,"xn--ses554g":true,"xn--t60b56a":true,"xn--tckwe":true,"xn--unup4y":true,"xn--vermgensberater-ctb":true,"xn--vermgensberatung-pwb":true,"xn--vhquv":true,"xn--vuq861b":true,"xn--w4r85el8fhu5dnra":true,"xn--w4rs40l":true,"xn--xhq521b":true,"xn--zfr164b":true,"xperia":true,"xyz":true,"yachts":true,"yahoo":true,"yamaxun":true,"yandex":true,"yodobashi":true,"yoga":true,"yokohama":true,"you":true,"youtube":true,"yun":true,"zappos":true,"zara":true,"zero":true,"zip":true,"zippo":true,"zone":true,"zuerich":true,"cloudfront.net":true,"ap-northeast-1.compute.amazonaws.com":true,"ap-southeast-1.compute.amazonaws.com":true,"ap-southeast-2.compute.amazonaws.com":true,"cn-north-1.compute.amazonaws.cn":true,"compute.amazonaws.cn":true,"compute.amazonaws.com":true,"compute-1.amazonaws.com":true,"eu-west-1.compute.amazonaws.com":true,"eu-central-1.compute.amazonaws.com":true,"sa-east-1.compute.amazonaws.com":true,"us-east-1.amazonaws.com":true,"us-gov-west-1.compute.amazonaws.com":true,"us-west-1.compute.amazonaws.com":true,"us-west-2.compute.amazonaws.com":true,"z-1.compute-1.amazonaws.com":true,"z-2.compute-1.amazonaws.com":true,"elasticbeanstalk.com":true,"elb.amazonaws.com":true,"s3.amazonaws.com":true,"s3-ap-northeast-1.amazonaws.com":true,"s3-ap-southeast-1.amazonaws.com":true,"s3-ap-southeast-2.amazonaws.com":true,"s3-external-1.amazonaws.com":true,"s3-external-2.amazonaws.com":true,"s3-fips-us-gov-west-1.amazonaws.com":true,"s3-eu-central-1.amazonaws.com":true,"s3-eu-west-1.amazonaws.com":true,"s3-sa-east-1.amazonaws.com":true,"s3-us-gov-west-1.amazonaws.com":true,"s3-us-west-1.amazonaws.com":true,"s3-us-west-2.amazonaws.com":true,"s3.cn-north-1.amazonaws.com.cn":true,"s3.eu-central-1.amazonaws.com":true,"betainabox.com":true,"ae.org":true,"ar.com":true,"br.com":true,"cn.com":true,"com.de":true,"com.se":true,"de.com":true,"eu.com":true,"gb.com":true,"gb.net":true,"hu.com":true,"hu.net":true,"jp.net":true,"jpn.com":true,"kr.com":true,"mex.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"se.net":true,"uk.com":true,"uk.net":true,"us.com":true,"uy.com":true,"za.bz":true,"za.com":true,"africa.com":true,"gr.com":true,"in.net":true,"us.org":true,"co.com":true,"c.la":true,"cloudcontrolled.com":true,"cloudcontrolapp.com":true,"co.ca":true,"c.cdn77.org":true,"cdn77-ssl.net":true,"r.cdn77.net":true,"rsc.cdn77.org":true,"ssl.origin.cdn77-secure.org":true,"co.nl":true,"co.no":true,"*.platform.sh":true,"cupcake.is":true,"dreamhosters.com":true,"duckdns.org":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true,"eu.org":true,"al.eu.org":true,"asso.eu.org":true,"at.eu.org":true,"au.eu.org":true,"be.eu.org":true,"bg.eu.org":true,"ca.eu.org":true,"cd.eu.org":true,"ch.eu.org":true,"cn.eu.org":true,"cy.eu.org":true,"cz.eu.org":true,"de.eu.org":true,"dk.eu.org":true,"edu.eu.org":true,"ee.eu.org":true,"es.eu.org":true,"fi.eu.org":true,"fr.eu.org":true,"gr.eu.org":true,"hr.eu.org":true,"hu.eu.org":true,"ie.eu.org":true,"il.eu.org":true,"in.eu.org":true,"int.eu.org":true,"is.eu.org":true,"it.eu.org":true,"jp.eu.org":true,"kr.eu.org":true,"lt.eu.org":true,"lu.eu.org":true,"lv.eu.org":true,"mc.eu.org":true,"me.eu.org":true,"mk.eu.org":true,"mt.eu.org":true,"my.eu.org":true,"net.eu.org":true,"ng.eu.org":true,"nl.eu.org":true,"no.eu.org":true,"nz.eu.org":true,"paris.eu.org":true,"pl.eu.org":true,"pt.eu.org":true,"q-a.eu.org":true,"ro.eu.org":true,"ru.eu.org":true,"se.eu.org":true,"si.eu.org":true,"sk.eu.org":true,"tr.eu.org":true,"uk.eu.org":true,"us.eu.org":true,"a.ssl.fastly.net":true,"b.ssl.fastly.net":true,"global.ssl.fastly.net":true,"a.prod.fastly.net":true,"global.prod.fastly.net":true,"firebaseapp.com":true,"flynnhub.com":true,"service.gov.uk":true,"github.io":true,"githubusercontent.com":true,"ro.com":true,"appspot.com":true,"blogspot.ae":true,"blogspot.al":true,"blogspot.am":true,"blogspot.ba":true,"blogspot.be":true,"blogspot.bg":true,"blogspot.bj":true,"blogspot.ca":true,"blogspot.cf":true,"blogspot.ch":true,"blogspot.cl":true,"blogspot.co.at":true,"blogspot.co.id":true,"blogspot.co.il":true,"blogspot.co.ke":true,"blogspot.co.nz":true,"blogspot.co.uk":true,"blogspot.co.za":true,"blogspot.com":true,"blogspot.com.ar":true,"blogspot.com.au":true,"blogspot.com.br":true,"blogspot.com.by":true,"blogspot.com.co":true,"blogspot.com.cy":true,"blogspot.com.ee":true,"blogspot.com.eg":true,"blogspot.com.es":true,"blogspot.com.mt":true,"blogspot.com.ng":true,"blogspot.com.tr":true,"blogspot.com.uy":true,"blogspot.cv":true,"blogspot.cz":true,"blogspot.de":true,"blogspot.dk":true,"blogspot.fi":true,"blogspot.fr":true,"blogspot.gr":true,"blogspot.hk":true,"blogspot.hr":true,"blogspot.hu":true,"blogspot.ie":true,"blogspot.in":true,"blogspot.is":true,"blogspot.it":true,"blogspot.jp":true,"blogspot.kr":true,"blogspot.li":true,"blogspot.lt":true,"blogspot.lu":true,"blogspot.md":true,"blogspot.mk":true,"blogspot.mr":true,"blogspot.mx":true,"blogspot.my":true,"blogspot.nl":true,"blogspot.no":true,"blogspot.pe":true,"blogspot.pt":true,"blogspot.qa":true,"blogspot.re":true,"blogspot.ro":true,"blogspot.rs":true,"blogspot.ru":true,"blogspot.se":true,"blogspot.sg":true,"blogspot.si":true,"blogspot.sk":true,"blogspot.sn":true,"blogspot.td":true,"blogspot.tw":true,"blogspot.ug":true,"blogspot.vn":true,"codespot.com":true,"googleapis.com":true,"googlecode.com":true,"pagespeedmobilizer.com":true,"withgoogle.com":true,"withyoutube.com":true,"herokuapp.com":true,"herokussl.com":true,"iki.fi":true,"biz.at":true,"info.at":true,"co.pl":true,"azurewebsites.net":true,"azure-mobile.net":true,"cloudapp.net":true,"bmoattachments.org":true,"4u.com":true,"nfshost.com":true,"nyc.mn":true,"nid.io":true,"operaunite.com":true,"outsystemscloud.com":true,"art.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pantheon.io":true,"gotpantheon.com":true,"priv.at":true,"qa2.com":true,"rhcloud.com":true,"sandcats.io":true,"biz.ua":true,"co.ua":true,"pp.ua":true,"sinaapp.com":true,"vipsinaapp.com":true,"1kapp.com":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"hk.com":true,"hk.org":true,"ltd.hk":true,"inc.hk":true,"yolasite.com":true,"za.net":true,"za.org":true}); +{"ac":true,"com.ac":true,"edu.ac":true,"gov.ac":true,"net.ac":true,"mil.ac":true,"org.ac":true,"ad":true,"nom.ad":true,"ae":true,"co.ae":true,"net.ae":true,"org.ae":true,"sch.ae":true,"ac.ae":true,"gov.ae":true,"mil.ae":true,"aero":true,"accident-investigation.aero":true,"accident-prevention.aero":true,"aerobatic.aero":true,"aeroclub.aero":true,"aerodrome.aero":true,"agents.aero":true,"aircraft.aero":true,"airline.aero":true,"airport.aero":true,"air-surveillance.aero":true,"airtraffic.aero":true,"air-traffic-control.aero":true,"ambulance.aero":true,"amusement.aero":true,"association.aero":true,"author.aero":true,"ballooning.aero":true,"broker.aero":true,"caa.aero":true,"cargo.aero":true,"catering.aero":true,"certification.aero":true,"championship.aero":true,"charter.aero":true,"civilaviation.aero":true,"club.aero":true,"conference.aero":true,"consultant.aero":true,"consulting.aero":true,"control.aero":true,"council.aero":true,"crew.aero":true,"design.aero":true,"dgca.aero":true,"educator.aero":true,"emergency.aero":true,"engine.aero":true,"engineer.aero":true,"entertainment.aero":true,"equipment.aero":true,"exchange.aero":true,"express.aero":true,"federation.aero":true,"flight.aero":true,"freight.aero":true,"fuel.aero":true,"gliding.aero":true,"government.aero":true,"groundhandling.aero":true,"group.aero":true,"hanggliding.aero":true,"homebuilt.aero":true,"insurance.aero":true,"journal.aero":true,"journalist.aero":true,"leasing.aero":true,"logistics.aero":true,"magazine.aero":true,"maintenance.aero":true,"media.aero":true,"microlight.aero":true,"modelling.aero":true,"navigation.aero":true,"parachuting.aero":true,"paragliding.aero":true,"passenger-association.aero":true,"pilot.aero":true,"press.aero":true,"production.aero":true,"recreation.aero":true,"repbody.aero":true,"res.aero":true,"research.aero":true,"rotorcraft.aero":true,"safety.aero":true,"scientist.aero":true,"services.aero":true,"show.aero":true,"skydiving.aero":true,"software.aero":true,"student.aero":true,"trader.aero":true,"trading.aero":true,"trainer.aero":true,"union.aero":true,"workinggroup.aero":true,"works.aero":true,"af":true,"gov.af":true,"com.af":true,"org.af":true,"net.af":true,"edu.af":true,"ag":true,"com.ag":true,"org.ag":true,"net.ag":true,"co.ag":true,"nom.ag":true,"ai":true,"off.ai":true,"com.ai":true,"net.ai":true,"org.ai":true,"al":true,"com.al":true,"edu.al":true,"gov.al":true,"mil.al":true,"net.al":true,"org.al":true,"am":true,"ao":true,"ed.ao":true,"gv.ao":true,"og.ao":true,"co.ao":true,"pb.ao":true,"it.ao":true,"aq":true,"ar":true,"com.ar":true,"edu.ar":true,"gob.ar":true,"gov.ar":true,"int.ar":true,"mil.ar":true,"musica.ar":true,"net.ar":true,"org.ar":true,"tur.ar":true,"arpa":true,"e164.arpa":true,"in-addr.arpa":true,"ip6.arpa":true,"iris.arpa":true,"uri.arpa":true,"urn.arpa":true,"as":true,"gov.as":true,"asia":true,"at":true,"ac.at":true,"co.at":true,"gv.at":true,"or.at":true,"au":true,"com.au":true,"net.au":true,"org.au":true,"edu.au":true,"gov.au":true,"asn.au":true,"id.au":true,"info.au":true,"conf.au":true,"oz.au":true,"act.au":true,"nsw.au":true,"nt.au":true,"qld.au":true,"sa.au":true,"tas.au":true,"vic.au":true,"wa.au":true,"act.edu.au":true,"nsw.edu.au":true,"nt.edu.au":true,"qld.edu.au":true,"sa.edu.au":true,"tas.edu.au":true,"vic.edu.au":true,"wa.edu.au":true,"qld.gov.au":true,"sa.gov.au":true,"tas.gov.au":true,"vic.gov.au":true,"wa.gov.au":true,"aw":true,"com.aw":true,"ax":true,"az":true,"com.az":true,"net.az":true,"int.az":true,"gov.az":true,"org.az":true,"edu.az":true,"info.az":true,"pp.az":true,"mil.az":true,"name.az":true,"pro.az":true,"biz.az":true,"ba":true,"com.ba":true,"edu.ba":true,"gov.ba":true,"mil.ba":true,"net.ba":true,"org.ba":true,"bb":true,"biz.bb":true,"co.bb":true,"com.bb":true,"edu.bb":true,"gov.bb":true,"info.bb":true,"net.bb":true,"org.bb":true,"store.bb":true,"tv.bb":true,"*.bd":true,"be":true,"ac.be":true,"bf":true,"gov.bf":true,"bg":true,"a.bg":true,"b.bg":true,"c.bg":true,"d.bg":true,"e.bg":true,"f.bg":true,"g.bg":true,"h.bg":true,"i.bg":true,"j.bg":true,"k.bg":true,"l.bg":true,"m.bg":true,"n.bg":true,"o.bg":true,"p.bg":true,"q.bg":true,"r.bg":true,"s.bg":true,"t.bg":true,"u.bg":true,"v.bg":true,"w.bg":true,"x.bg":true,"y.bg":true,"z.bg":true,"0.bg":true,"1.bg":true,"2.bg":true,"3.bg":true,"4.bg":true,"5.bg":true,"6.bg":true,"7.bg":true,"8.bg":true,"9.bg":true,"bh":true,"com.bh":true,"edu.bh":true,"net.bh":true,"org.bh":true,"gov.bh":true,"bi":true,"co.bi":true,"com.bi":true,"edu.bi":true,"or.bi":true,"org.bi":true,"biz":true,"bj":true,"asso.bj":true,"barreau.bj":true,"gouv.bj":true,"bm":true,"com.bm":true,"edu.bm":true,"gov.bm":true,"net.bm":true,"org.bm":true,"*.bn":true,"bo":true,"com.bo":true,"edu.bo":true,"gob.bo":true,"int.bo":true,"org.bo":true,"net.bo":true,"mil.bo":true,"tv.bo":true,"web.bo":true,"academia.bo":true,"agro.bo":true,"arte.bo":true,"blog.bo":true,"bolivia.bo":true,"ciencia.bo":true,"cooperativa.bo":true,"democracia.bo":true,"deporte.bo":true,"ecologia.bo":true,"economia.bo":true,"empresa.bo":true,"indigena.bo":true,"industria.bo":true,"info.bo":true,"medicina.bo":true,"movimiento.bo":true,"musica.bo":true,"natural.bo":true,"nombre.bo":true,"noticias.bo":true,"patria.bo":true,"politica.bo":true,"profesional.bo":true,"plurinacional.bo":true,"pueblo.bo":true,"revista.bo":true,"salud.bo":true,"tecnologia.bo":true,"tksat.bo":true,"transporte.bo":true,"wiki.bo":true,"br":true,"9guacu.br":true,"abc.br":true,"adm.br":true,"adv.br":true,"agr.br":true,"aju.br":true,"am.br":true,"anani.br":true,"aparecida.br":true,"arq.br":true,"art.br":true,"ato.br":true,"b.br":true,"belem.br":true,"bhz.br":true,"bio.br":true,"blog.br":true,"bmd.br":true,"boavista.br":true,"bsb.br":true,"campinagrande.br":true,"campinas.br":true,"caxias.br":true,"cim.br":true,"cng.br":true,"cnt.br":true,"com.br":true,"contagem.br":true,"coop.br":true,"cri.br":true,"cuiaba.br":true,"curitiba.br":true,"def.br":true,"ecn.br":true,"eco.br":true,"edu.br":true,"emp.br":true,"eng.br":true,"esp.br":true,"etc.br":true,"eti.br":true,"far.br":true,"feira.br":true,"flog.br":true,"floripa.br":true,"fm.br":true,"fnd.br":true,"fortal.br":true,"fot.br":true,"foz.br":true,"fst.br":true,"g12.br":true,"ggf.br":true,"goiania.br":true,"gov.br":true,"ac.gov.br":true,"al.gov.br":true,"am.gov.br":true,"ap.gov.br":true,"ba.gov.br":true,"ce.gov.br":true,"df.gov.br":true,"es.gov.br":true,"go.gov.br":true,"ma.gov.br":true,"mg.gov.br":true,"ms.gov.br":true,"mt.gov.br":true,"pa.gov.br":true,"pb.gov.br":true,"pe.gov.br":true,"pi.gov.br":true,"pr.gov.br":true,"rj.gov.br":true,"rn.gov.br":true,"ro.gov.br":true,"rr.gov.br":true,"rs.gov.br":true,"sc.gov.br":true,"se.gov.br":true,"sp.gov.br":true,"to.gov.br":true,"gru.br":true,"imb.br":true,"ind.br":true,"inf.br":true,"jab.br":true,"jampa.br":true,"jdf.br":true,"joinville.br":true,"jor.br":true,"jus.br":true,"leg.br":true,"lel.br":true,"londrina.br":true,"macapa.br":true,"maceio.br":true,"manaus.br":true,"maringa.br":true,"mat.br":true,"med.br":true,"mil.br":true,"morena.br":true,"mp.br":true,"mus.br":true,"natal.br":true,"net.br":true,"niteroi.br":true,"*.nom.br":true,"not.br":true,"ntr.br":true,"odo.br":true,"org.br":true,"osasco.br":true,"palmas.br":true,"poa.br":true,"ppg.br":true,"pro.br":true,"psc.br":true,"psi.br":true,"pvh.br":true,"qsl.br":true,"radio.br":true,"rec.br":true,"recife.br":true,"ribeirao.br":true,"rio.br":true,"riobranco.br":true,"riopreto.br":true,"salvador.br":true,"sampa.br":true,"santamaria.br":true,"santoandre.br":true,"saobernardo.br":true,"saogonca.br":true,"sjc.br":true,"slg.br":true,"slz.br":true,"sorocaba.br":true,"srv.br":true,"taxi.br":true,"teo.br":true,"the.br":true,"tmp.br":true,"trd.br":true,"tur.br":true,"tv.br":true,"udi.br":true,"vet.br":true,"vix.br":true,"vlog.br":true,"wiki.br":true,"zlg.br":true,"bs":true,"com.bs":true,"net.bs":true,"org.bs":true,"edu.bs":true,"gov.bs":true,"bt":true,"com.bt":true,"edu.bt":true,"gov.bt":true,"net.bt":true,"org.bt":true,"bv":true,"bw":true,"co.bw":true,"org.bw":true,"by":true,"gov.by":true,"mil.by":true,"com.by":true,"of.by":true,"bz":true,"com.bz":true,"net.bz":true,"org.bz":true,"edu.bz":true,"gov.bz":true,"ca":true,"ab.ca":true,"bc.ca":true,"mb.ca":true,"nb.ca":true,"nf.ca":true,"nl.ca":true,"ns.ca":true,"nt.ca":true,"nu.ca":true,"on.ca":true,"pe.ca":true,"qc.ca":true,"sk.ca":true,"yk.ca":true,"gc.ca":true,"cat":true,"cc":true,"cd":true,"gov.cd":true,"cf":true,"cg":true,"ch":true,"ci":true,"org.ci":true,"or.ci":true,"com.ci":true,"co.ci":true,"edu.ci":true,"ed.ci":true,"ac.ci":true,"net.ci":true,"go.ci":true,"asso.ci":true,"xn--aroport-bya.ci":true,"int.ci":true,"presse.ci":true,"md.ci":true,"gouv.ci":true,"*.ck":true,"www.ck":false,"cl":true,"gov.cl":true,"gob.cl":true,"co.cl":true,"mil.cl":true,"cm":true,"co.cm":true,"com.cm":true,"gov.cm":true,"net.cm":true,"cn":true,"ac.cn":true,"com.cn":true,"edu.cn":true,"gov.cn":true,"net.cn":true,"org.cn":true,"mil.cn":true,"xn--55qx5d.cn":true,"xn--io0a7i.cn":true,"xn--od0alg.cn":true,"ah.cn":true,"bj.cn":true,"cq.cn":true,"fj.cn":true,"gd.cn":true,"gs.cn":true,"gz.cn":true,"gx.cn":true,"ha.cn":true,"hb.cn":true,"he.cn":true,"hi.cn":true,"hl.cn":true,"hn.cn":true,"jl.cn":true,"js.cn":true,"jx.cn":true,"ln.cn":true,"nm.cn":true,"nx.cn":true,"qh.cn":true,"sc.cn":true,"sd.cn":true,"sh.cn":true,"sn.cn":true,"sx.cn":true,"tj.cn":true,"xj.cn":true,"xz.cn":true,"yn.cn":true,"zj.cn":true,"hk.cn":true,"mo.cn":true,"tw.cn":true,"co":true,"arts.co":true,"com.co":true,"edu.co":true,"firm.co":true,"gov.co":true,"info.co":true,"int.co":true,"mil.co":true,"net.co":true,"nom.co":true,"org.co":true,"rec.co":true,"web.co":true,"com":true,"coop":true,"cr":true,"ac.cr":true,"co.cr":true,"ed.cr":true,"fi.cr":true,"go.cr":true,"or.cr":true,"sa.cr":true,"cu":true,"com.cu":true,"edu.cu":true,"org.cu":true,"net.cu":true,"gov.cu":true,"inf.cu":true,"cv":true,"cw":true,"com.cw":true,"edu.cw":true,"net.cw":true,"org.cw":true,"cx":true,"gov.cx":true,"cy":true,"ac.cy":true,"biz.cy":true,"com.cy":true,"ekloges.cy":true,"gov.cy":true,"ltd.cy":true,"name.cy":true,"net.cy":true,"org.cy":true,"parliament.cy":true,"press.cy":true,"pro.cy":true,"tm.cy":true,"cz":true,"de":true,"dj":true,"dk":true,"dm":true,"com.dm":true,"net.dm":true,"org.dm":true,"edu.dm":true,"gov.dm":true,"do":true,"art.do":true,"com.do":true,"edu.do":true,"gob.do":true,"gov.do":true,"mil.do":true,"net.do":true,"org.do":true,"sld.do":true,"web.do":true,"dz":true,"com.dz":true,"org.dz":true,"net.dz":true,"gov.dz":true,"edu.dz":true,"asso.dz":true,"pol.dz":true,"art.dz":true,"ec":true,"com.ec":true,"info.ec":true,"net.ec":true,"fin.ec":true,"k12.ec":true,"med.ec":true,"pro.ec":true,"org.ec":true,"edu.ec":true,"gov.ec":true,"gob.ec":true,"mil.ec":true,"edu":true,"ee":true,"edu.ee":true,"gov.ee":true,"riik.ee":true,"lib.ee":true,"med.ee":true,"com.ee":true,"pri.ee":true,"aip.ee":true,"org.ee":true,"fie.ee":true,"eg":true,"com.eg":true,"edu.eg":true,"eun.eg":true,"gov.eg":true,"mil.eg":true,"name.eg":true,"net.eg":true,"org.eg":true,"sci.eg":true,"*.er":true,"es":true,"com.es":true,"nom.es":true,"org.es":true,"gob.es":true,"edu.es":true,"et":true,"com.et":true,"gov.et":true,"org.et":true,"edu.et":true,"biz.et":true,"name.et":true,"info.et":true,"net.et":true,"eu":true,"fi":true,"aland.fi":true,"*.fj":true,"*.fk":true,"fm":true,"fo":true,"fr":true,"com.fr":true,"asso.fr":true,"nom.fr":true,"prd.fr":true,"presse.fr":true,"tm.fr":true,"aeroport.fr":true,"assedic.fr":true,"avocat.fr":true,"avoues.fr":true,"cci.fr":true,"chambagri.fr":true,"chirurgiens-dentistes.fr":true,"experts-comptables.fr":true,"geometre-expert.fr":true,"gouv.fr":true,"greta.fr":true,"huissier-justice.fr":true,"medecin.fr":true,"notaires.fr":true,"pharmacien.fr":true,"port.fr":true,"veterinaire.fr":true,"ga":true,"gb":true,"gd":true,"ge":true,"com.ge":true,"edu.ge":true,"gov.ge":true,"org.ge":true,"mil.ge":true,"net.ge":true,"pvt.ge":true,"gf":true,"gg":true,"co.gg":true,"net.gg":true,"org.gg":true,"gh":true,"com.gh":true,"edu.gh":true,"gov.gh":true,"org.gh":true,"mil.gh":true,"gi":true,"com.gi":true,"ltd.gi":true,"gov.gi":true,"mod.gi":true,"edu.gi":true,"org.gi":true,"gl":true,"co.gl":true,"com.gl":true,"edu.gl":true,"net.gl":true,"org.gl":true,"gm":true,"gn":true,"ac.gn":true,"com.gn":true,"edu.gn":true,"gov.gn":true,"org.gn":true,"net.gn":true,"gov":true,"gp":true,"com.gp":true,"net.gp":true,"mobi.gp":true,"edu.gp":true,"org.gp":true,"asso.gp":true,"gq":true,"gr":true,"com.gr":true,"edu.gr":true,"net.gr":true,"org.gr":true,"gov.gr":true,"gs":true,"gt":true,"com.gt":true,"edu.gt":true,"gob.gt":true,"ind.gt":true,"mil.gt":true,"net.gt":true,"org.gt":true,"*.gu":true,"gw":true,"gy":true,"co.gy":true,"com.gy":true,"edu.gy":true,"gov.gy":true,"net.gy":true,"org.gy":true,"hk":true,"com.hk":true,"edu.hk":true,"gov.hk":true,"idv.hk":true,"net.hk":true,"org.hk":true,"xn--55qx5d.hk":true,"xn--wcvs22d.hk":true,"xn--lcvr32d.hk":true,"xn--mxtq1m.hk":true,"xn--gmqw5a.hk":true,"xn--ciqpn.hk":true,"xn--gmq050i.hk":true,"xn--zf0avx.hk":true,"xn--io0a7i.hk":true,"xn--mk0axi.hk":true,"xn--od0alg.hk":true,"xn--od0aq3b.hk":true,"xn--tn0ag.hk":true,"xn--uc0atv.hk":true,"xn--uc0ay4a.hk":true,"hm":true,"hn":true,"com.hn":true,"edu.hn":true,"org.hn":true,"net.hn":true,"mil.hn":true,"gob.hn":true,"hr":true,"iz.hr":true,"from.hr":true,"name.hr":true,"com.hr":true,"ht":true,"com.ht":true,"shop.ht":true,"firm.ht":true,"info.ht":true,"adult.ht":true,"net.ht":true,"pro.ht":true,"org.ht":true,"med.ht":true,"art.ht":true,"coop.ht":true,"pol.ht":true,"asso.ht":true,"edu.ht":true,"rel.ht":true,"gouv.ht":true,"perso.ht":true,"hu":true,"co.hu":true,"info.hu":true,"org.hu":true,"priv.hu":true,"sport.hu":true,"tm.hu":true,"2000.hu":true,"agrar.hu":true,"bolt.hu":true,"casino.hu":true,"city.hu":true,"erotica.hu":true,"erotika.hu":true,"film.hu":true,"forum.hu":true,"games.hu":true,"hotel.hu":true,"ingatlan.hu":true,"jogasz.hu":true,"konyvelo.hu":true,"lakas.hu":true,"media.hu":true,"news.hu":true,"reklam.hu":true,"sex.hu":true,"shop.hu":true,"suli.hu":true,"szex.hu":true,"tozsde.hu":true,"utazas.hu":true,"video.hu":true,"id":true,"ac.id":true,"biz.id":true,"co.id":true,"desa.id":true,"go.id":true,"mil.id":true,"my.id":true,"net.id":true,"or.id":true,"sch.id":true,"web.id":true,"ie":true,"gov.ie":true,"il":true,"ac.il":true,"co.il":true,"gov.il":true,"idf.il":true,"k12.il":true,"muni.il":true,"net.il":true,"org.il":true,"im":true,"ac.im":true,"co.im":true,"com.im":true,"ltd.co.im":true,"net.im":true,"org.im":true,"plc.co.im":true,"tt.im":true,"tv.im":true,"in":true,"co.in":true,"firm.in":true,"net.in":true,"org.in":true,"gen.in":true,"ind.in":true,"nic.in":true,"ac.in":true,"edu.in":true,"res.in":true,"gov.in":true,"mil.in":true,"info":true,"int":true,"eu.int":true,"io":true,"com.io":true,"iq":true,"gov.iq":true,"edu.iq":true,"mil.iq":true,"com.iq":true,"org.iq":true,"net.iq":true,"ir":true,"ac.ir":true,"co.ir":true,"gov.ir":true,"id.ir":true,"net.ir":true,"org.ir":true,"sch.ir":true,"xn--mgba3a4f16a.ir":true,"xn--mgba3a4fra.ir":true,"is":true,"net.is":true,"com.is":true,"edu.is":true,"gov.is":true,"org.is":true,"int.is":true,"it":true,"gov.it":true,"edu.it":true,"abr.it":true,"abruzzo.it":true,"aosta-valley.it":true,"aostavalley.it":true,"bas.it":true,"basilicata.it":true,"cal.it":true,"calabria.it":true,"cam.it":true,"campania.it":true,"emilia-romagna.it":true,"emiliaromagna.it":true,"emr.it":true,"friuli-v-giulia.it":true,"friuli-ve-giulia.it":true,"friuli-vegiulia.it":true,"friuli-venezia-giulia.it":true,"friuli-veneziagiulia.it":true,"friuli-vgiulia.it":true,"friuliv-giulia.it":true,"friulive-giulia.it":true,"friulivegiulia.it":true,"friulivenezia-giulia.it":true,"friuliveneziagiulia.it":true,"friulivgiulia.it":true,"fvg.it":true,"laz.it":true,"lazio.it":true,"lig.it":true,"liguria.it":true,"lom.it":true,"lombardia.it":true,"lombardy.it":true,"lucania.it":true,"mar.it":true,"marche.it":true,"mol.it":true,"molise.it":true,"piedmont.it":true,"piemonte.it":true,"pmn.it":true,"pug.it":true,"puglia.it":true,"sar.it":true,"sardegna.it":true,"sardinia.it":true,"sic.it":true,"sicilia.it":true,"sicily.it":true,"taa.it":true,"tos.it":true,"toscana.it":true,"trentino-a-adige.it":true,"trentino-aadige.it":true,"trentino-alto-adige.it":true,"trentino-altoadige.it":true,"trentino-s-tirol.it":true,"trentino-stirol.it":true,"trentino-sud-tirol.it":true,"trentino-sudtirol.it":true,"trentino-sued-tirol.it":true,"trentino-suedtirol.it":true,"trentinoa-adige.it":true,"trentinoaadige.it":true,"trentinoalto-adige.it":true,"trentinoaltoadige.it":true,"trentinos-tirol.it":true,"trentinostirol.it":true,"trentinosud-tirol.it":true,"trentinosudtirol.it":true,"trentinosued-tirol.it":true,"trentinosuedtirol.it":true,"tuscany.it":true,"umb.it":true,"umbria.it":true,"val-d-aosta.it":true,"val-daosta.it":true,"vald-aosta.it":true,"valdaosta.it":true,"valle-aosta.it":true,"valle-d-aosta.it":true,"valle-daosta.it":true,"valleaosta.it":true,"valled-aosta.it":true,"valledaosta.it":true,"vallee-aoste.it":true,"valleeaoste.it":true,"vao.it":true,"vda.it":true,"ven.it":true,"veneto.it":true,"ag.it":true,"agrigento.it":true,"al.it":true,"alessandria.it":true,"alto-adige.it":true,"altoadige.it":true,"an.it":true,"ancona.it":true,"andria-barletta-trani.it":true,"andria-trani-barletta.it":true,"andriabarlettatrani.it":true,"andriatranibarletta.it":true,"ao.it":true,"aosta.it":true,"aoste.it":true,"ap.it":true,"aq.it":true,"aquila.it":true,"ar.it":true,"arezzo.it":true,"ascoli-piceno.it":true,"ascolipiceno.it":true,"asti.it":true,"at.it":true,"av.it":true,"avellino.it":true,"ba.it":true,"balsan.it":true,"bari.it":true,"barletta-trani-andria.it":true,"barlettatraniandria.it":true,"belluno.it":true,"benevento.it":true,"bergamo.it":true,"bg.it":true,"bi.it":true,"biella.it":true,"bl.it":true,"bn.it":true,"bo.it":true,"bologna.it":true,"bolzano.it":true,"bozen.it":true,"br.it":true,"brescia.it":true,"brindisi.it":true,"bs.it":true,"bt.it":true,"bz.it":true,"ca.it":true,"cagliari.it":true,"caltanissetta.it":true,"campidano-medio.it":true,"campidanomedio.it":true,"campobasso.it":true,"carbonia-iglesias.it":true,"carboniaiglesias.it":true,"carrara-massa.it":true,"carraramassa.it":true,"caserta.it":true,"catania.it":true,"catanzaro.it":true,"cb.it":true,"ce.it":true,"cesena-forli.it":true,"cesenaforli.it":true,"ch.it":true,"chieti.it":true,"ci.it":true,"cl.it":true,"cn.it":true,"co.it":true,"como.it":true,"cosenza.it":true,"cr.it":true,"cremona.it":true,"crotone.it":true,"cs.it":true,"ct.it":true,"cuneo.it":true,"cz.it":true,"dell-ogliastra.it":true,"dellogliastra.it":true,"en.it":true,"enna.it":true,"fc.it":true,"fe.it":true,"fermo.it":true,"ferrara.it":true,"fg.it":true,"fi.it":true,"firenze.it":true,"florence.it":true,"fm.it":true,"foggia.it":true,"forli-cesena.it":true,"forlicesena.it":true,"fr.it":true,"frosinone.it":true,"ge.it":true,"genoa.it":true,"genova.it":true,"go.it":true,"gorizia.it":true,"gr.it":true,"grosseto.it":true,"iglesias-carbonia.it":true,"iglesiascarbonia.it":true,"im.it":true,"imperia.it":true,"is.it":true,"isernia.it":true,"kr.it":true,"la-spezia.it":true,"laquila.it":true,"laspezia.it":true,"latina.it":true,"lc.it":true,"le.it":true,"lecce.it":true,"lecco.it":true,"li.it":true,"livorno.it":true,"lo.it":true,"lodi.it":true,"lt.it":true,"lu.it":true,"lucca.it":true,"macerata.it":true,"mantova.it":true,"massa-carrara.it":true,"massacarrara.it":true,"matera.it":true,"mb.it":true,"mc.it":true,"me.it":true,"medio-campidano.it":true,"mediocampidano.it":true,"messina.it":true,"mi.it":true,"milan.it":true,"milano.it":true,"mn.it":true,"mo.it":true,"modena.it":true,"monza-brianza.it":true,"monza-e-della-brianza.it":true,"monza.it":true,"monzabrianza.it":true,"monzaebrianza.it":true,"monzaedellabrianza.it":true,"ms.it":true,"mt.it":true,"na.it":true,"naples.it":true,"napoli.it":true,"no.it":true,"novara.it":true,"nu.it":true,"nuoro.it":true,"og.it":true,"ogliastra.it":true,"olbia-tempio.it":true,"olbiatempio.it":true,"or.it":true,"oristano.it":true,"ot.it":true,"pa.it":true,"padova.it":true,"padua.it":true,"palermo.it":true,"parma.it":true,"pavia.it":true,"pc.it":true,"pd.it":true,"pe.it":true,"perugia.it":true,"pesaro-urbino.it":true,"pesarourbino.it":true,"pescara.it":true,"pg.it":true,"pi.it":true,"piacenza.it":true,"pisa.it":true,"pistoia.it":true,"pn.it":true,"po.it":true,"pordenone.it":true,"potenza.it":true,"pr.it":true,"prato.it":true,"pt.it":true,"pu.it":true,"pv.it":true,"pz.it":true,"ra.it":true,"ragusa.it":true,"ravenna.it":true,"rc.it":true,"re.it":true,"reggio-calabria.it":true,"reggio-emilia.it":true,"reggiocalabria.it":true,"reggioemilia.it":true,"rg.it":true,"ri.it":true,"rieti.it":true,"rimini.it":true,"rm.it":true,"rn.it":true,"ro.it":true,"roma.it":true,"rome.it":true,"rovigo.it":true,"sa.it":true,"salerno.it":true,"sassari.it":true,"savona.it":true,"si.it":true,"siena.it":true,"siracusa.it":true,"so.it":true,"sondrio.it":true,"sp.it":true,"sr.it":true,"ss.it":true,"suedtirol.it":true,"sv.it":true,"ta.it":true,"taranto.it":true,"te.it":true,"tempio-olbia.it":true,"tempioolbia.it":true,"teramo.it":true,"terni.it":true,"tn.it":true,"to.it":true,"torino.it":true,"tp.it":true,"tr.it":true,"trani-andria-barletta.it":true,"trani-barletta-andria.it":true,"traniandriabarletta.it":true,"tranibarlettaandria.it":true,"trapani.it":true,"trentino.it":true,"trento.it":true,"treviso.it":true,"trieste.it":true,"ts.it":true,"turin.it":true,"tv.it":true,"ud.it":true,"udine.it":true,"urbino-pesaro.it":true,"urbinopesaro.it":true,"va.it":true,"varese.it":true,"vb.it":true,"vc.it":true,"ve.it":true,"venezia.it":true,"venice.it":true,"verbania.it":true,"vercelli.it":true,"verona.it":true,"vi.it":true,"vibo-valentia.it":true,"vibovalentia.it":true,"vicenza.it":true,"viterbo.it":true,"vr.it":true,"vs.it":true,"vt.it":true,"vv.it":true,"je":true,"co.je":true,"net.je":true,"org.je":true,"*.jm":true,"jo":true,"com.jo":true,"org.jo":true,"net.jo":true,"edu.jo":true,"sch.jo":true,"gov.jo":true,"mil.jo":true,"name.jo":true,"jobs":true,"jp":true,"ac.jp":true,"ad.jp":true,"co.jp":true,"ed.jp":true,"go.jp":true,"gr.jp":true,"lg.jp":true,"ne.jp":true,"or.jp":true,"aichi.jp":true,"akita.jp":true,"aomori.jp":true,"chiba.jp":true,"ehime.jp":true,"fukui.jp":true,"fukuoka.jp":true,"fukushima.jp":true,"gifu.jp":true,"gunma.jp":true,"hiroshima.jp":true,"hokkaido.jp":true,"hyogo.jp":true,"ibaraki.jp":true,"ishikawa.jp":true,"iwate.jp":true,"kagawa.jp":true,"kagoshima.jp":true,"kanagawa.jp":true,"kochi.jp":true,"kumamoto.jp":true,"kyoto.jp":true,"mie.jp":true,"miyagi.jp":true,"miyazaki.jp":true,"nagano.jp":true,"nagasaki.jp":true,"nara.jp":true,"niigata.jp":true,"oita.jp":true,"okayama.jp":true,"okinawa.jp":true,"osaka.jp":true,"saga.jp":true,"saitama.jp":true,"shiga.jp":true,"shimane.jp":true,"shizuoka.jp":true,"tochigi.jp":true,"tokushima.jp":true,"tokyo.jp":true,"tottori.jp":true,"toyama.jp":true,"wakayama.jp":true,"yamagata.jp":true,"yamaguchi.jp":true,"yamanashi.jp":true,"xn--4pvxs.jp":true,"xn--vgu402c.jp":true,"xn--c3s14m.jp":true,"xn--f6qx53a.jp":true,"xn--8pvr4u.jp":true,"xn--uist22h.jp":true,"xn--djrs72d6uy.jp":true,"xn--mkru45i.jp":true,"xn--0trq7p7nn.jp":true,"xn--8ltr62k.jp":true,"xn--2m4a15e.jp":true,"xn--efvn9s.jp":true,"xn--32vp30h.jp":true,"xn--4it797k.jp":true,"xn--1lqs71d.jp":true,"xn--5rtp49c.jp":true,"xn--5js045d.jp":true,"xn--ehqz56n.jp":true,"xn--1lqs03n.jp":true,"xn--qqqt11m.jp":true,"xn--kbrq7o.jp":true,"xn--pssu33l.jp":true,"xn--ntsq17g.jp":true,"xn--uisz3g.jp":true,"xn--6btw5a.jp":true,"xn--1ctwo.jp":true,"xn--6orx2r.jp":true,"xn--rht61e.jp":true,"xn--rht27z.jp":true,"xn--djty4k.jp":true,"xn--nit225k.jp":true,"xn--rht3d.jp":true,"xn--klty5x.jp":true,"xn--kltx9a.jp":true,"xn--kltp7d.jp":true,"xn--uuwu58a.jp":true,"xn--zbx025d.jp":true,"xn--ntso0iqx3a.jp":true,"xn--elqq16h.jp":true,"xn--4it168d.jp":true,"xn--klt787d.jp":true,"xn--rny31h.jp":true,"xn--7t0a264c.jp":true,"xn--5rtq34k.jp":true,"xn--k7yn95e.jp":true,"xn--tor131o.jp":true,"xn--d5qv7z876c.jp":true,"*.kawasaki.jp":true,"*.kitakyushu.jp":true,"*.kobe.jp":true,"*.nagoya.jp":true,"*.sapporo.jp":true,"*.sendai.jp":true,"*.yokohama.jp":true,"city.kawasaki.jp":false,"city.kitakyushu.jp":false,"city.kobe.jp":false,"city.nagoya.jp":false,"city.sapporo.jp":false,"city.sendai.jp":false,"city.yokohama.jp":false,"aisai.aichi.jp":true,"ama.aichi.jp":true,"anjo.aichi.jp":true,"asuke.aichi.jp":true,"chiryu.aichi.jp":true,"chita.aichi.jp":true,"fuso.aichi.jp":true,"gamagori.aichi.jp":true,"handa.aichi.jp":true,"hazu.aichi.jp":true,"hekinan.aichi.jp":true,"higashiura.aichi.jp":true,"ichinomiya.aichi.jp":true,"inazawa.aichi.jp":true,"inuyama.aichi.jp":true,"isshiki.aichi.jp":true,"iwakura.aichi.jp":true,"kanie.aichi.jp":true,"kariya.aichi.jp":true,"kasugai.aichi.jp":true,"kira.aichi.jp":true,"kiyosu.aichi.jp":true,"komaki.aichi.jp":true,"konan.aichi.jp":true,"kota.aichi.jp":true,"mihama.aichi.jp":true,"miyoshi.aichi.jp":true,"nishio.aichi.jp":true,"nisshin.aichi.jp":true,"obu.aichi.jp":true,"oguchi.aichi.jp":true,"oharu.aichi.jp":true,"okazaki.aichi.jp":true,"owariasahi.aichi.jp":true,"seto.aichi.jp":true,"shikatsu.aichi.jp":true,"shinshiro.aichi.jp":true,"shitara.aichi.jp":true,"tahara.aichi.jp":true,"takahama.aichi.jp":true,"tobishima.aichi.jp":true,"toei.aichi.jp":true,"togo.aichi.jp":true,"tokai.aichi.jp":true,"tokoname.aichi.jp":true,"toyoake.aichi.jp":true,"toyohashi.aichi.jp":true,"toyokawa.aichi.jp":true,"toyone.aichi.jp":true,"toyota.aichi.jp":true,"tsushima.aichi.jp":true,"yatomi.aichi.jp":true,"akita.akita.jp":true,"daisen.akita.jp":true,"fujisato.akita.jp":true,"gojome.akita.jp":true,"hachirogata.akita.jp":true,"happou.akita.jp":true,"higashinaruse.akita.jp":true,"honjo.akita.jp":true,"honjyo.akita.jp":true,"ikawa.akita.jp":true,"kamikoani.akita.jp":true,"kamioka.akita.jp":true,"katagami.akita.jp":true,"kazuno.akita.jp":true,"kitaakita.akita.jp":true,"kosaka.akita.jp":true,"kyowa.akita.jp":true,"misato.akita.jp":true,"mitane.akita.jp":true,"moriyoshi.akita.jp":true,"nikaho.akita.jp":true,"noshiro.akita.jp":true,"odate.akita.jp":true,"oga.akita.jp":true,"ogata.akita.jp":true,"semboku.akita.jp":true,"yokote.akita.jp":true,"yurihonjo.akita.jp":true,"aomori.aomori.jp":true,"gonohe.aomori.jp":true,"hachinohe.aomori.jp":true,"hashikami.aomori.jp":true,"hiranai.aomori.jp":true,"hirosaki.aomori.jp":true,"itayanagi.aomori.jp":true,"kuroishi.aomori.jp":true,"misawa.aomori.jp":true,"mutsu.aomori.jp":true,"nakadomari.aomori.jp":true,"noheji.aomori.jp":true,"oirase.aomori.jp":true,"owani.aomori.jp":true,"rokunohe.aomori.jp":true,"sannohe.aomori.jp":true,"shichinohe.aomori.jp":true,"shingo.aomori.jp":true,"takko.aomori.jp":true,"towada.aomori.jp":true,"tsugaru.aomori.jp":true,"tsuruta.aomori.jp":true,"abiko.chiba.jp":true,"asahi.chiba.jp":true,"chonan.chiba.jp":true,"chosei.chiba.jp":true,"choshi.chiba.jp":true,"chuo.chiba.jp":true,"funabashi.chiba.jp":true,"futtsu.chiba.jp":true,"hanamigawa.chiba.jp":true,"ichihara.chiba.jp":true,"ichikawa.chiba.jp":true,"ichinomiya.chiba.jp":true,"inzai.chiba.jp":true,"isumi.chiba.jp":true,"kamagaya.chiba.jp":true,"kamogawa.chiba.jp":true,"kashiwa.chiba.jp":true,"katori.chiba.jp":true,"katsuura.chiba.jp":true,"kimitsu.chiba.jp":true,"kisarazu.chiba.jp":true,"kozaki.chiba.jp":true,"kujukuri.chiba.jp":true,"kyonan.chiba.jp":true,"matsudo.chiba.jp":true,"midori.chiba.jp":true,"mihama.chiba.jp":true,"minamiboso.chiba.jp":true,"mobara.chiba.jp":true,"mutsuzawa.chiba.jp":true,"nagara.chiba.jp":true,"nagareyama.chiba.jp":true,"narashino.chiba.jp":true,"narita.chiba.jp":true,"noda.chiba.jp":true,"oamishirasato.chiba.jp":true,"omigawa.chiba.jp":true,"onjuku.chiba.jp":true,"otaki.chiba.jp":true,"sakae.chiba.jp":true,"sakura.chiba.jp":true,"shimofusa.chiba.jp":true,"shirako.chiba.jp":true,"shiroi.chiba.jp":true,"shisui.chiba.jp":true,"sodegaura.chiba.jp":true,"sosa.chiba.jp":true,"tako.chiba.jp":true,"tateyama.chiba.jp":true,"togane.chiba.jp":true,"tohnosho.chiba.jp":true,"tomisato.chiba.jp":true,"urayasu.chiba.jp":true,"yachimata.chiba.jp":true,"yachiyo.chiba.jp":true,"yokaichiba.chiba.jp":true,"yokoshibahikari.chiba.jp":true,"yotsukaido.chiba.jp":true,"ainan.ehime.jp":true,"honai.ehime.jp":true,"ikata.ehime.jp":true,"imabari.ehime.jp":true,"iyo.ehime.jp":true,"kamijima.ehime.jp":true,"kihoku.ehime.jp":true,"kumakogen.ehime.jp":true,"masaki.ehime.jp":true,"matsuno.ehime.jp":true,"matsuyama.ehime.jp":true,"namikata.ehime.jp":true,"niihama.ehime.jp":true,"ozu.ehime.jp":true,"saijo.ehime.jp":true,"seiyo.ehime.jp":true,"shikokuchuo.ehime.jp":true,"tobe.ehime.jp":true,"toon.ehime.jp":true,"uchiko.ehime.jp":true,"uwajima.ehime.jp":true,"yawatahama.ehime.jp":true,"echizen.fukui.jp":true,"eiheiji.fukui.jp":true,"fukui.fukui.jp":true,"ikeda.fukui.jp":true,"katsuyama.fukui.jp":true,"mihama.fukui.jp":true,"minamiechizen.fukui.jp":true,"obama.fukui.jp":true,"ohi.fukui.jp":true,"ono.fukui.jp":true,"sabae.fukui.jp":true,"sakai.fukui.jp":true,"takahama.fukui.jp":true,"tsuruga.fukui.jp":true,"wakasa.fukui.jp":true,"ashiya.fukuoka.jp":true,"buzen.fukuoka.jp":true,"chikugo.fukuoka.jp":true,"chikuho.fukuoka.jp":true,"chikujo.fukuoka.jp":true,"chikushino.fukuoka.jp":true,"chikuzen.fukuoka.jp":true,"chuo.fukuoka.jp":true,"dazaifu.fukuoka.jp":true,"fukuchi.fukuoka.jp":true,"hakata.fukuoka.jp":true,"higashi.fukuoka.jp":true,"hirokawa.fukuoka.jp":true,"hisayama.fukuoka.jp":true,"iizuka.fukuoka.jp":true,"inatsuki.fukuoka.jp":true,"kaho.fukuoka.jp":true,"kasuga.fukuoka.jp":true,"kasuya.fukuoka.jp":true,"kawara.fukuoka.jp":true,"keisen.fukuoka.jp":true,"koga.fukuoka.jp":true,"kurate.fukuoka.jp":true,"kurogi.fukuoka.jp":true,"kurume.fukuoka.jp":true,"minami.fukuoka.jp":true,"miyako.fukuoka.jp":true,"miyama.fukuoka.jp":true,"miyawaka.fukuoka.jp":true,"mizumaki.fukuoka.jp":true,"munakata.fukuoka.jp":true,"nakagawa.fukuoka.jp":true,"nakama.fukuoka.jp":true,"nishi.fukuoka.jp":true,"nogata.fukuoka.jp":true,"ogori.fukuoka.jp":true,"okagaki.fukuoka.jp":true,"okawa.fukuoka.jp":true,"oki.fukuoka.jp":true,"omuta.fukuoka.jp":true,"onga.fukuoka.jp":true,"onojo.fukuoka.jp":true,"oto.fukuoka.jp":true,"saigawa.fukuoka.jp":true,"sasaguri.fukuoka.jp":true,"shingu.fukuoka.jp":true,"shinyoshitomi.fukuoka.jp":true,"shonai.fukuoka.jp":true,"soeda.fukuoka.jp":true,"sue.fukuoka.jp":true,"tachiarai.fukuoka.jp":true,"tagawa.fukuoka.jp":true,"takata.fukuoka.jp":true,"toho.fukuoka.jp":true,"toyotsu.fukuoka.jp":true,"tsuiki.fukuoka.jp":true,"ukiha.fukuoka.jp":true,"umi.fukuoka.jp":true,"usui.fukuoka.jp":true,"yamada.fukuoka.jp":true,"yame.fukuoka.jp":true,"yanagawa.fukuoka.jp":true,"yukuhashi.fukuoka.jp":true,"aizubange.fukushima.jp":true,"aizumisato.fukushima.jp":true,"aizuwakamatsu.fukushima.jp":true,"asakawa.fukushima.jp":true,"bandai.fukushima.jp":true,"date.fukushima.jp":true,"fukushima.fukushima.jp":true,"furudono.fukushima.jp":true,"futaba.fukushima.jp":true,"hanawa.fukushima.jp":true,"higashi.fukushima.jp":true,"hirata.fukushima.jp":true,"hirono.fukushima.jp":true,"iitate.fukushima.jp":true,"inawashiro.fukushima.jp":true,"ishikawa.fukushima.jp":true,"iwaki.fukushima.jp":true,"izumizaki.fukushima.jp":true,"kagamiishi.fukushima.jp":true,"kaneyama.fukushima.jp":true,"kawamata.fukushima.jp":true,"kitakata.fukushima.jp":true,"kitashiobara.fukushima.jp":true,"koori.fukushima.jp":true,"koriyama.fukushima.jp":true,"kunimi.fukushima.jp":true,"miharu.fukushima.jp":true,"mishima.fukushima.jp":true,"namie.fukushima.jp":true,"nango.fukushima.jp":true,"nishiaizu.fukushima.jp":true,"nishigo.fukushima.jp":true,"okuma.fukushima.jp":true,"omotego.fukushima.jp":true,"ono.fukushima.jp":true,"otama.fukushima.jp":true,"samegawa.fukushima.jp":true,"shimogo.fukushima.jp":true,"shirakawa.fukushima.jp":true,"showa.fukushima.jp":true,"soma.fukushima.jp":true,"sukagawa.fukushima.jp":true,"taishin.fukushima.jp":true,"tamakawa.fukushima.jp":true,"tanagura.fukushima.jp":true,"tenei.fukushima.jp":true,"yabuki.fukushima.jp":true,"yamato.fukushima.jp":true,"yamatsuri.fukushima.jp":true,"yanaizu.fukushima.jp":true,"yugawa.fukushima.jp":true,"anpachi.gifu.jp":true,"ena.gifu.jp":true,"gifu.gifu.jp":true,"ginan.gifu.jp":true,"godo.gifu.jp":true,"gujo.gifu.jp":true,"hashima.gifu.jp":true,"hichiso.gifu.jp":true,"hida.gifu.jp":true,"higashishirakawa.gifu.jp":true,"ibigawa.gifu.jp":true,"ikeda.gifu.jp":true,"kakamigahara.gifu.jp":true,"kani.gifu.jp":true,"kasahara.gifu.jp":true,"kasamatsu.gifu.jp":true,"kawaue.gifu.jp":true,"kitagata.gifu.jp":true,"mino.gifu.jp":true,"minokamo.gifu.jp":true,"mitake.gifu.jp":true,"mizunami.gifu.jp":true,"motosu.gifu.jp":true,"nakatsugawa.gifu.jp":true,"ogaki.gifu.jp":true,"sakahogi.gifu.jp":true,"seki.gifu.jp":true,"sekigahara.gifu.jp":true,"shirakawa.gifu.jp":true,"tajimi.gifu.jp":true,"takayama.gifu.jp":true,"tarui.gifu.jp":true,"toki.gifu.jp":true,"tomika.gifu.jp":true,"wanouchi.gifu.jp":true,"yamagata.gifu.jp":true,"yaotsu.gifu.jp":true,"yoro.gifu.jp":true,"annaka.gunma.jp":true,"chiyoda.gunma.jp":true,"fujioka.gunma.jp":true,"higashiagatsuma.gunma.jp":true,"isesaki.gunma.jp":true,"itakura.gunma.jp":true,"kanna.gunma.jp":true,"kanra.gunma.jp":true,"katashina.gunma.jp":true,"kawaba.gunma.jp":true,"kiryu.gunma.jp":true,"kusatsu.gunma.jp":true,"maebashi.gunma.jp":true,"meiwa.gunma.jp":true,"midori.gunma.jp":true,"minakami.gunma.jp":true,"naganohara.gunma.jp":true,"nakanojo.gunma.jp":true,"nanmoku.gunma.jp":true,"numata.gunma.jp":true,"oizumi.gunma.jp":true,"ora.gunma.jp":true,"ota.gunma.jp":true,"shibukawa.gunma.jp":true,"shimonita.gunma.jp":true,"shinto.gunma.jp":true,"showa.gunma.jp":true,"takasaki.gunma.jp":true,"takayama.gunma.jp":true,"tamamura.gunma.jp":true,"tatebayashi.gunma.jp":true,"tomioka.gunma.jp":true,"tsukiyono.gunma.jp":true,"tsumagoi.gunma.jp":true,"ueno.gunma.jp":true,"yoshioka.gunma.jp":true,"asaminami.hiroshima.jp":true,"daiwa.hiroshima.jp":true,"etajima.hiroshima.jp":true,"fuchu.hiroshima.jp":true,"fukuyama.hiroshima.jp":true,"hatsukaichi.hiroshima.jp":true,"higashihiroshima.hiroshima.jp":true,"hongo.hiroshima.jp":true,"jinsekikogen.hiroshima.jp":true,"kaita.hiroshima.jp":true,"kui.hiroshima.jp":true,"kumano.hiroshima.jp":true,"kure.hiroshima.jp":true,"mihara.hiroshima.jp":true,"miyoshi.hiroshima.jp":true,"naka.hiroshima.jp":true,"onomichi.hiroshima.jp":true,"osakikamijima.hiroshima.jp":true,"otake.hiroshima.jp":true,"saka.hiroshima.jp":true,"sera.hiroshima.jp":true,"seranishi.hiroshima.jp":true,"shinichi.hiroshima.jp":true,"shobara.hiroshima.jp":true,"takehara.hiroshima.jp":true,"abashiri.hokkaido.jp":true,"abira.hokkaido.jp":true,"aibetsu.hokkaido.jp":true,"akabira.hokkaido.jp":true,"akkeshi.hokkaido.jp":true,"asahikawa.hokkaido.jp":true,"ashibetsu.hokkaido.jp":true,"ashoro.hokkaido.jp":true,"assabu.hokkaido.jp":true,"atsuma.hokkaido.jp":true,"bibai.hokkaido.jp":true,"biei.hokkaido.jp":true,"bifuka.hokkaido.jp":true,"bihoro.hokkaido.jp":true,"biratori.hokkaido.jp":true,"chippubetsu.hokkaido.jp":true,"chitose.hokkaido.jp":true,"date.hokkaido.jp":true,"ebetsu.hokkaido.jp":true,"embetsu.hokkaido.jp":true,"eniwa.hokkaido.jp":true,"erimo.hokkaido.jp":true,"esan.hokkaido.jp":true,"esashi.hokkaido.jp":true,"fukagawa.hokkaido.jp":true,"fukushima.hokkaido.jp":true,"furano.hokkaido.jp":true,"furubira.hokkaido.jp":true,"haboro.hokkaido.jp":true,"hakodate.hokkaido.jp":true,"hamatonbetsu.hokkaido.jp":true,"hidaka.hokkaido.jp":true,"higashikagura.hokkaido.jp":true,"higashikawa.hokkaido.jp":true,"hiroo.hokkaido.jp":true,"hokuryu.hokkaido.jp":true,"hokuto.hokkaido.jp":true,"honbetsu.hokkaido.jp":true,"horokanai.hokkaido.jp":true,"horonobe.hokkaido.jp":true,"ikeda.hokkaido.jp":true,"imakane.hokkaido.jp":true,"ishikari.hokkaido.jp":true,"iwamizawa.hokkaido.jp":true,"iwanai.hokkaido.jp":true,"kamifurano.hokkaido.jp":true,"kamikawa.hokkaido.jp":true,"kamishihoro.hokkaido.jp":true,"kamisunagawa.hokkaido.jp":true,"kamoenai.hokkaido.jp":true,"kayabe.hokkaido.jp":true,"kembuchi.hokkaido.jp":true,"kikonai.hokkaido.jp":true,"kimobetsu.hokkaido.jp":true,"kitahiroshima.hokkaido.jp":true,"kitami.hokkaido.jp":true,"kiyosato.hokkaido.jp":true,"koshimizu.hokkaido.jp":true,"kunneppu.hokkaido.jp":true,"kuriyama.hokkaido.jp":true,"kuromatsunai.hokkaido.jp":true,"kushiro.hokkaido.jp":true,"kutchan.hokkaido.jp":true,"kyowa.hokkaido.jp":true,"mashike.hokkaido.jp":true,"matsumae.hokkaido.jp":true,"mikasa.hokkaido.jp":true,"minamifurano.hokkaido.jp":true,"mombetsu.hokkaido.jp":true,"moseushi.hokkaido.jp":true,"mukawa.hokkaido.jp":true,"muroran.hokkaido.jp":true,"naie.hokkaido.jp":true,"nakagawa.hokkaido.jp":true,"nakasatsunai.hokkaido.jp":true,"nakatombetsu.hokkaido.jp":true,"nanae.hokkaido.jp":true,"nanporo.hokkaido.jp":true,"nayoro.hokkaido.jp":true,"nemuro.hokkaido.jp":true,"niikappu.hokkaido.jp":true,"niki.hokkaido.jp":true,"nishiokoppe.hokkaido.jp":true,"noboribetsu.hokkaido.jp":true,"numata.hokkaido.jp":true,"obihiro.hokkaido.jp":true,"obira.hokkaido.jp":true,"oketo.hokkaido.jp":true,"okoppe.hokkaido.jp":true,"otaru.hokkaido.jp":true,"otobe.hokkaido.jp":true,"otofuke.hokkaido.jp":true,"otoineppu.hokkaido.jp":true,"oumu.hokkaido.jp":true,"ozora.hokkaido.jp":true,"pippu.hokkaido.jp":true,"rankoshi.hokkaido.jp":true,"rebun.hokkaido.jp":true,"rikubetsu.hokkaido.jp":true,"rishiri.hokkaido.jp":true,"rishirifuji.hokkaido.jp":true,"saroma.hokkaido.jp":true,"sarufutsu.hokkaido.jp":true,"shakotan.hokkaido.jp":true,"shari.hokkaido.jp":true,"shibecha.hokkaido.jp":true,"shibetsu.hokkaido.jp":true,"shikabe.hokkaido.jp":true,"shikaoi.hokkaido.jp":true,"shimamaki.hokkaido.jp":true,"shimizu.hokkaido.jp":true,"shimokawa.hokkaido.jp":true,"shinshinotsu.hokkaido.jp":true,"shintoku.hokkaido.jp":true,"shiranuka.hokkaido.jp":true,"shiraoi.hokkaido.jp":true,"shiriuchi.hokkaido.jp":true,"sobetsu.hokkaido.jp":true,"sunagawa.hokkaido.jp":true,"taiki.hokkaido.jp":true,"takasu.hokkaido.jp":true,"takikawa.hokkaido.jp":true,"takinoue.hokkaido.jp":true,"teshikaga.hokkaido.jp":true,"tobetsu.hokkaido.jp":true,"tohma.hokkaido.jp":true,"tomakomai.hokkaido.jp":true,"tomari.hokkaido.jp":true,"toya.hokkaido.jp":true,"toyako.hokkaido.jp":true,"toyotomi.hokkaido.jp":true,"toyoura.hokkaido.jp":true,"tsubetsu.hokkaido.jp":true,"tsukigata.hokkaido.jp":true,"urakawa.hokkaido.jp":true,"urausu.hokkaido.jp":true,"uryu.hokkaido.jp":true,"utashinai.hokkaido.jp":true,"wakkanai.hokkaido.jp":true,"wassamu.hokkaido.jp":true,"yakumo.hokkaido.jp":true,"yoichi.hokkaido.jp":true,"aioi.hyogo.jp":true,"akashi.hyogo.jp":true,"ako.hyogo.jp":true,"amagasaki.hyogo.jp":true,"aogaki.hyogo.jp":true,"asago.hyogo.jp":true,"ashiya.hyogo.jp":true,"awaji.hyogo.jp":true,"fukusaki.hyogo.jp":true,"goshiki.hyogo.jp":true,"harima.hyogo.jp":true,"himeji.hyogo.jp":true,"ichikawa.hyogo.jp":true,"inagawa.hyogo.jp":true,"itami.hyogo.jp":true,"kakogawa.hyogo.jp":true,"kamigori.hyogo.jp":true,"kamikawa.hyogo.jp":true,"kasai.hyogo.jp":true,"kasuga.hyogo.jp":true,"kawanishi.hyogo.jp":true,"miki.hyogo.jp":true,"minamiawaji.hyogo.jp":true,"nishinomiya.hyogo.jp":true,"nishiwaki.hyogo.jp":true,"ono.hyogo.jp":true,"sanda.hyogo.jp":true,"sannan.hyogo.jp":true,"sasayama.hyogo.jp":true,"sayo.hyogo.jp":true,"shingu.hyogo.jp":true,"shinonsen.hyogo.jp":true,"shiso.hyogo.jp":true,"sumoto.hyogo.jp":true,"taishi.hyogo.jp":true,"taka.hyogo.jp":true,"takarazuka.hyogo.jp":true,"takasago.hyogo.jp":true,"takino.hyogo.jp":true,"tamba.hyogo.jp":true,"tatsuno.hyogo.jp":true,"toyooka.hyogo.jp":true,"yabu.hyogo.jp":true,"yashiro.hyogo.jp":true,"yoka.hyogo.jp":true,"yokawa.hyogo.jp":true,"ami.ibaraki.jp":true,"asahi.ibaraki.jp":true,"bando.ibaraki.jp":true,"chikusei.ibaraki.jp":true,"daigo.ibaraki.jp":true,"fujishiro.ibaraki.jp":true,"hitachi.ibaraki.jp":true,"hitachinaka.ibaraki.jp":true,"hitachiomiya.ibaraki.jp":true,"hitachiota.ibaraki.jp":true,"ibaraki.ibaraki.jp":true,"ina.ibaraki.jp":true,"inashiki.ibaraki.jp":true,"itako.ibaraki.jp":true,"iwama.ibaraki.jp":true,"joso.ibaraki.jp":true,"kamisu.ibaraki.jp":true,"kasama.ibaraki.jp":true,"kashima.ibaraki.jp":true,"kasumigaura.ibaraki.jp":true,"koga.ibaraki.jp":true,"miho.ibaraki.jp":true,"mito.ibaraki.jp":true,"moriya.ibaraki.jp":true,"naka.ibaraki.jp":true,"namegata.ibaraki.jp":true,"oarai.ibaraki.jp":true,"ogawa.ibaraki.jp":true,"omitama.ibaraki.jp":true,"ryugasaki.ibaraki.jp":true,"sakai.ibaraki.jp":true,"sakuragawa.ibaraki.jp":true,"shimodate.ibaraki.jp":true,"shimotsuma.ibaraki.jp":true,"shirosato.ibaraki.jp":true,"sowa.ibaraki.jp":true,"suifu.ibaraki.jp":true,"takahagi.ibaraki.jp":true,"tamatsukuri.ibaraki.jp":true,"tokai.ibaraki.jp":true,"tomobe.ibaraki.jp":true,"tone.ibaraki.jp":true,"toride.ibaraki.jp":true,"tsuchiura.ibaraki.jp":true,"tsukuba.ibaraki.jp":true,"uchihara.ibaraki.jp":true,"ushiku.ibaraki.jp":true,"yachiyo.ibaraki.jp":true,"yamagata.ibaraki.jp":true,"yawara.ibaraki.jp":true,"yuki.ibaraki.jp":true,"anamizu.ishikawa.jp":true,"hakui.ishikawa.jp":true,"hakusan.ishikawa.jp":true,"kaga.ishikawa.jp":true,"kahoku.ishikawa.jp":true,"kanazawa.ishikawa.jp":true,"kawakita.ishikawa.jp":true,"komatsu.ishikawa.jp":true,"nakanoto.ishikawa.jp":true,"nanao.ishikawa.jp":true,"nomi.ishikawa.jp":true,"nonoichi.ishikawa.jp":true,"noto.ishikawa.jp":true,"shika.ishikawa.jp":true,"suzu.ishikawa.jp":true,"tsubata.ishikawa.jp":true,"tsurugi.ishikawa.jp":true,"uchinada.ishikawa.jp":true,"wajima.ishikawa.jp":true,"fudai.iwate.jp":true,"fujisawa.iwate.jp":true,"hanamaki.iwate.jp":true,"hiraizumi.iwate.jp":true,"hirono.iwate.jp":true,"ichinohe.iwate.jp":true,"ichinoseki.iwate.jp":true,"iwaizumi.iwate.jp":true,"iwate.iwate.jp":true,"joboji.iwate.jp":true,"kamaishi.iwate.jp":true,"kanegasaki.iwate.jp":true,"karumai.iwate.jp":true,"kawai.iwate.jp":true,"kitakami.iwate.jp":true,"kuji.iwate.jp":true,"kunohe.iwate.jp":true,"kuzumaki.iwate.jp":true,"miyako.iwate.jp":true,"mizusawa.iwate.jp":true,"morioka.iwate.jp":true,"ninohe.iwate.jp":true,"noda.iwate.jp":true,"ofunato.iwate.jp":true,"oshu.iwate.jp":true,"otsuchi.iwate.jp":true,"rikuzentakata.iwate.jp":true,"shiwa.iwate.jp":true,"shizukuishi.iwate.jp":true,"sumita.iwate.jp":true,"tanohata.iwate.jp":true,"tono.iwate.jp":true,"yahaba.iwate.jp":true,"yamada.iwate.jp":true,"ayagawa.kagawa.jp":true,"higashikagawa.kagawa.jp":true,"kanonji.kagawa.jp":true,"kotohira.kagawa.jp":true,"manno.kagawa.jp":true,"marugame.kagawa.jp":true,"mitoyo.kagawa.jp":true,"naoshima.kagawa.jp":true,"sanuki.kagawa.jp":true,"tadotsu.kagawa.jp":true,"takamatsu.kagawa.jp":true,"tonosho.kagawa.jp":true,"uchinomi.kagawa.jp":true,"utazu.kagawa.jp":true,"zentsuji.kagawa.jp":true,"akune.kagoshima.jp":true,"amami.kagoshima.jp":true,"hioki.kagoshima.jp":true,"isa.kagoshima.jp":true,"isen.kagoshima.jp":true,"izumi.kagoshima.jp":true,"kagoshima.kagoshima.jp":true,"kanoya.kagoshima.jp":true,"kawanabe.kagoshima.jp":true,"kinko.kagoshima.jp":true,"kouyama.kagoshima.jp":true,"makurazaki.kagoshima.jp":true,"matsumoto.kagoshima.jp":true,"minamitane.kagoshima.jp":true,"nakatane.kagoshima.jp":true,"nishinoomote.kagoshima.jp":true,"satsumasendai.kagoshima.jp":true,"soo.kagoshima.jp":true,"tarumizu.kagoshima.jp":true,"yusui.kagoshima.jp":true,"aikawa.kanagawa.jp":true,"atsugi.kanagawa.jp":true,"ayase.kanagawa.jp":true,"chigasaki.kanagawa.jp":true,"ebina.kanagawa.jp":true,"fujisawa.kanagawa.jp":true,"hadano.kanagawa.jp":true,"hakone.kanagawa.jp":true,"hiratsuka.kanagawa.jp":true,"isehara.kanagawa.jp":true,"kaisei.kanagawa.jp":true,"kamakura.kanagawa.jp":true,"kiyokawa.kanagawa.jp":true,"matsuda.kanagawa.jp":true,"minamiashigara.kanagawa.jp":true,"miura.kanagawa.jp":true,"nakai.kanagawa.jp":true,"ninomiya.kanagawa.jp":true,"odawara.kanagawa.jp":true,"oi.kanagawa.jp":true,"oiso.kanagawa.jp":true,"sagamihara.kanagawa.jp":true,"samukawa.kanagawa.jp":true,"tsukui.kanagawa.jp":true,"yamakita.kanagawa.jp":true,"yamato.kanagawa.jp":true,"yokosuka.kanagawa.jp":true,"yugawara.kanagawa.jp":true,"zama.kanagawa.jp":true,"zushi.kanagawa.jp":true,"aki.kochi.jp":true,"geisei.kochi.jp":true,"hidaka.kochi.jp":true,"higashitsuno.kochi.jp":true,"ino.kochi.jp":true,"kagami.kochi.jp":true,"kami.kochi.jp":true,"kitagawa.kochi.jp":true,"kochi.kochi.jp":true,"mihara.kochi.jp":true,"motoyama.kochi.jp":true,"muroto.kochi.jp":true,"nahari.kochi.jp":true,"nakamura.kochi.jp":true,"nankoku.kochi.jp":true,"nishitosa.kochi.jp":true,"niyodogawa.kochi.jp":true,"ochi.kochi.jp":true,"okawa.kochi.jp":true,"otoyo.kochi.jp":true,"otsuki.kochi.jp":true,"sakawa.kochi.jp":true,"sukumo.kochi.jp":true,"susaki.kochi.jp":true,"tosa.kochi.jp":true,"tosashimizu.kochi.jp":true,"toyo.kochi.jp":true,"tsuno.kochi.jp":true,"umaji.kochi.jp":true,"yasuda.kochi.jp":true,"yusuhara.kochi.jp":true,"amakusa.kumamoto.jp":true,"arao.kumamoto.jp":true,"aso.kumamoto.jp":true,"choyo.kumamoto.jp":true,"gyokuto.kumamoto.jp":true,"kamiamakusa.kumamoto.jp":true,"kikuchi.kumamoto.jp":true,"kumamoto.kumamoto.jp":true,"mashiki.kumamoto.jp":true,"mifune.kumamoto.jp":true,"minamata.kumamoto.jp":true,"minamioguni.kumamoto.jp":true,"nagasu.kumamoto.jp":true,"nishihara.kumamoto.jp":true,"oguni.kumamoto.jp":true,"ozu.kumamoto.jp":true,"sumoto.kumamoto.jp":true,"takamori.kumamoto.jp":true,"uki.kumamoto.jp":true,"uto.kumamoto.jp":true,"yamaga.kumamoto.jp":true,"yamato.kumamoto.jp":true,"yatsushiro.kumamoto.jp":true,"ayabe.kyoto.jp":true,"fukuchiyama.kyoto.jp":true,"higashiyama.kyoto.jp":true,"ide.kyoto.jp":true,"ine.kyoto.jp":true,"joyo.kyoto.jp":true,"kameoka.kyoto.jp":true,"kamo.kyoto.jp":true,"kita.kyoto.jp":true,"kizu.kyoto.jp":true,"kumiyama.kyoto.jp":true,"kyotamba.kyoto.jp":true,"kyotanabe.kyoto.jp":true,"kyotango.kyoto.jp":true,"maizuru.kyoto.jp":true,"minami.kyoto.jp":true,"minamiyamashiro.kyoto.jp":true,"miyazu.kyoto.jp":true,"muko.kyoto.jp":true,"nagaokakyo.kyoto.jp":true,"nakagyo.kyoto.jp":true,"nantan.kyoto.jp":true,"oyamazaki.kyoto.jp":true,"sakyo.kyoto.jp":true,"seika.kyoto.jp":true,"tanabe.kyoto.jp":true,"uji.kyoto.jp":true,"ujitawara.kyoto.jp":true,"wazuka.kyoto.jp":true,"yamashina.kyoto.jp":true,"yawata.kyoto.jp":true,"asahi.mie.jp":true,"inabe.mie.jp":true,"ise.mie.jp":true,"kameyama.mie.jp":true,"kawagoe.mie.jp":true,"kiho.mie.jp":true,"kisosaki.mie.jp":true,"kiwa.mie.jp":true,"komono.mie.jp":true,"kumano.mie.jp":true,"kuwana.mie.jp":true,"matsusaka.mie.jp":true,"meiwa.mie.jp":true,"mihama.mie.jp":true,"minamiise.mie.jp":true,"misugi.mie.jp":true,"miyama.mie.jp":true,"nabari.mie.jp":true,"shima.mie.jp":true,"suzuka.mie.jp":true,"tado.mie.jp":true,"taiki.mie.jp":true,"taki.mie.jp":true,"tamaki.mie.jp":true,"toba.mie.jp":true,"tsu.mie.jp":true,"udono.mie.jp":true,"ureshino.mie.jp":true,"watarai.mie.jp":true,"yokkaichi.mie.jp":true,"furukawa.miyagi.jp":true,"higashimatsushima.miyagi.jp":true,"ishinomaki.miyagi.jp":true,"iwanuma.miyagi.jp":true,"kakuda.miyagi.jp":true,"kami.miyagi.jp":true,"kawasaki.miyagi.jp":true,"marumori.miyagi.jp":true,"matsushima.miyagi.jp":true,"minamisanriku.miyagi.jp":true,"misato.miyagi.jp":true,"murata.miyagi.jp":true,"natori.miyagi.jp":true,"ogawara.miyagi.jp":true,"ohira.miyagi.jp":true,"onagawa.miyagi.jp":true,"osaki.miyagi.jp":true,"rifu.miyagi.jp":true,"semine.miyagi.jp":true,"shibata.miyagi.jp":true,"shichikashuku.miyagi.jp":true,"shikama.miyagi.jp":true,"shiogama.miyagi.jp":true,"shiroishi.miyagi.jp":true,"tagajo.miyagi.jp":true,"taiwa.miyagi.jp":true,"tome.miyagi.jp":true,"tomiya.miyagi.jp":true,"wakuya.miyagi.jp":true,"watari.miyagi.jp":true,"yamamoto.miyagi.jp":true,"zao.miyagi.jp":true,"aya.miyazaki.jp":true,"ebino.miyazaki.jp":true,"gokase.miyazaki.jp":true,"hyuga.miyazaki.jp":true,"kadogawa.miyazaki.jp":true,"kawaminami.miyazaki.jp":true,"kijo.miyazaki.jp":true,"kitagawa.miyazaki.jp":true,"kitakata.miyazaki.jp":true,"kitaura.miyazaki.jp":true,"kobayashi.miyazaki.jp":true,"kunitomi.miyazaki.jp":true,"kushima.miyazaki.jp":true,"mimata.miyazaki.jp":true,"miyakonojo.miyazaki.jp":true,"miyazaki.miyazaki.jp":true,"morotsuka.miyazaki.jp":true,"nichinan.miyazaki.jp":true,"nishimera.miyazaki.jp":true,"nobeoka.miyazaki.jp":true,"saito.miyazaki.jp":true,"shiiba.miyazaki.jp":true,"shintomi.miyazaki.jp":true,"takaharu.miyazaki.jp":true,"takanabe.miyazaki.jp":true,"takazaki.miyazaki.jp":true,"tsuno.miyazaki.jp":true,"achi.nagano.jp":true,"agematsu.nagano.jp":true,"anan.nagano.jp":true,"aoki.nagano.jp":true,"asahi.nagano.jp":true,"azumino.nagano.jp":true,"chikuhoku.nagano.jp":true,"chikuma.nagano.jp":true,"chino.nagano.jp":true,"fujimi.nagano.jp":true,"hakuba.nagano.jp":true,"hara.nagano.jp":true,"hiraya.nagano.jp":true,"iida.nagano.jp":true,"iijima.nagano.jp":true,"iiyama.nagano.jp":true,"iizuna.nagano.jp":true,"ikeda.nagano.jp":true,"ikusaka.nagano.jp":true,"ina.nagano.jp":true,"karuizawa.nagano.jp":true,"kawakami.nagano.jp":true,"kiso.nagano.jp":true,"kisofukushima.nagano.jp":true,"kitaaiki.nagano.jp":true,"komagane.nagano.jp":true,"komoro.nagano.jp":true,"matsukawa.nagano.jp":true,"matsumoto.nagano.jp":true,"miasa.nagano.jp":true,"minamiaiki.nagano.jp":true,"minamimaki.nagano.jp":true,"minamiminowa.nagano.jp":true,"minowa.nagano.jp":true,"miyada.nagano.jp":true,"miyota.nagano.jp":true,"mochizuki.nagano.jp":true,"nagano.nagano.jp":true,"nagawa.nagano.jp":true,"nagiso.nagano.jp":true,"nakagawa.nagano.jp":true,"nakano.nagano.jp":true,"nozawaonsen.nagano.jp":true,"obuse.nagano.jp":true,"ogawa.nagano.jp":true,"okaya.nagano.jp":true,"omachi.nagano.jp":true,"omi.nagano.jp":true,"ookuwa.nagano.jp":true,"ooshika.nagano.jp":true,"otaki.nagano.jp":true,"otari.nagano.jp":true,"sakae.nagano.jp":true,"sakaki.nagano.jp":true,"saku.nagano.jp":true,"sakuho.nagano.jp":true,"shimosuwa.nagano.jp":true,"shinanomachi.nagano.jp":true,"shiojiri.nagano.jp":true,"suwa.nagano.jp":true,"suzaka.nagano.jp":true,"takagi.nagano.jp":true,"takamori.nagano.jp":true,"takayama.nagano.jp":true,"tateshina.nagano.jp":true,"tatsuno.nagano.jp":true,"togakushi.nagano.jp":true,"togura.nagano.jp":true,"tomi.nagano.jp":true,"ueda.nagano.jp":true,"wada.nagano.jp":true,"yamagata.nagano.jp":true,"yamanouchi.nagano.jp":true,"yasaka.nagano.jp":true,"yasuoka.nagano.jp":true,"chijiwa.nagasaki.jp":true,"futsu.nagasaki.jp":true,"goto.nagasaki.jp":true,"hasami.nagasaki.jp":true,"hirado.nagasaki.jp":true,"iki.nagasaki.jp":true,"isahaya.nagasaki.jp":true,"kawatana.nagasaki.jp":true,"kuchinotsu.nagasaki.jp":true,"matsuura.nagasaki.jp":true,"nagasaki.nagasaki.jp":true,"obama.nagasaki.jp":true,"omura.nagasaki.jp":true,"oseto.nagasaki.jp":true,"saikai.nagasaki.jp":true,"sasebo.nagasaki.jp":true,"seihi.nagasaki.jp":true,"shimabara.nagasaki.jp":true,"shinkamigoto.nagasaki.jp":true,"togitsu.nagasaki.jp":true,"tsushima.nagasaki.jp":true,"unzen.nagasaki.jp":true,"ando.nara.jp":true,"gose.nara.jp":true,"heguri.nara.jp":true,"higashiyoshino.nara.jp":true,"ikaruga.nara.jp":true,"ikoma.nara.jp":true,"kamikitayama.nara.jp":true,"kanmaki.nara.jp":true,"kashiba.nara.jp":true,"kashihara.nara.jp":true,"katsuragi.nara.jp":true,"kawai.nara.jp":true,"kawakami.nara.jp":true,"kawanishi.nara.jp":true,"koryo.nara.jp":true,"kurotaki.nara.jp":true,"mitsue.nara.jp":true,"miyake.nara.jp":true,"nara.nara.jp":true,"nosegawa.nara.jp":true,"oji.nara.jp":true,"ouda.nara.jp":true,"oyodo.nara.jp":true,"sakurai.nara.jp":true,"sango.nara.jp":true,"shimoichi.nara.jp":true,"shimokitayama.nara.jp":true,"shinjo.nara.jp":true,"soni.nara.jp":true,"takatori.nara.jp":true,"tawaramoto.nara.jp":true,"tenkawa.nara.jp":true,"tenri.nara.jp":true,"uda.nara.jp":true,"yamatokoriyama.nara.jp":true,"yamatotakada.nara.jp":true,"yamazoe.nara.jp":true,"yoshino.nara.jp":true,"aga.niigata.jp":true,"agano.niigata.jp":true,"gosen.niigata.jp":true,"itoigawa.niigata.jp":true,"izumozaki.niigata.jp":true,"joetsu.niigata.jp":true,"kamo.niigata.jp":true,"kariwa.niigata.jp":true,"kashiwazaki.niigata.jp":true,"minamiuonuma.niigata.jp":true,"mitsuke.niigata.jp":true,"muika.niigata.jp":true,"murakami.niigata.jp":true,"myoko.niigata.jp":true,"nagaoka.niigata.jp":true,"niigata.niigata.jp":true,"ojiya.niigata.jp":true,"omi.niigata.jp":true,"sado.niigata.jp":true,"sanjo.niigata.jp":true,"seiro.niigata.jp":true,"seirou.niigata.jp":true,"sekikawa.niigata.jp":true,"shibata.niigata.jp":true,"tagami.niigata.jp":true,"tainai.niigata.jp":true,"tochio.niigata.jp":true,"tokamachi.niigata.jp":true,"tsubame.niigata.jp":true,"tsunan.niigata.jp":true,"uonuma.niigata.jp":true,"yahiko.niigata.jp":true,"yoita.niigata.jp":true,"yuzawa.niigata.jp":true,"beppu.oita.jp":true,"bungoono.oita.jp":true,"bungotakada.oita.jp":true,"hasama.oita.jp":true,"hiji.oita.jp":true,"himeshima.oita.jp":true,"hita.oita.jp":true,"kamitsue.oita.jp":true,"kokonoe.oita.jp":true,"kuju.oita.jp":true,"kunisaki.oita.jp":true,"kusu.oita.jp":true,"oita.oita.jp":true,"saiki.oita.jp":true,"taketa.oita.jp":true,"tsukumi.oita.jp":true,"usa.oita.jp":true,"usuki.oita.jp":true,"yufu.oita.jp":true,"akaiwa.okayama.jp":true,"asakuchi.okayama.jp":true,"bizen.okayama.jp":true,"hayashima.okayama.jp":true,"ibara.okayama.jp":true,"kagamino.okayama.jp":true,"kasaoka.okayama.jp":true,"kibichuo.okayama.jp":true,"kumenan.okayama.jp":true,"kurashiki.okayama.jp":true,"maniwa.okayama.jp":true,"misaki.okayama.jp":true,"nagi.okayama.jp":true,"niimi.okayama.jp":true,"nishiawakura.okayama.jp":true,"okayama.okayama.jp":true,"satosho.okayama.jp":true,"setouchi.okayama.jp":true,"shinjo.okayama.jp":true,"shoo.okayama.jp":true,"soja.okayama.jp":true,"takahashi.okayama.jp":true,"tamano.okayama.jp":true,"tsuyama.okayama.jp":true,"wake.okayama.jp":true,"yakage.okayama.jp":true,"aguni.okinawa.jp":true,"ginowan.okinawa.jp":true,"ginoza.okinawa.jp":true,"gushikami.okinawa.jp":true,"haebaru.okinawa.jp":true,"higashi.okinawa.jp":true,"hirara.okinawa.jp":true,"iheya.okinawa.jp":true,"ishigaki.okinawa.jp":true,"ishikawa.okinawa.jp":true,"itoman.okinawa.jp":true,"izena.okinawa.jp":true,"kadena.okinawa.jp":true,"kin.okinawa.jp":true,"kitadaito.okinawa.jp":true,"kitanakagusuku.okinawa.jp":true,"kumejima.okinawa.jp":true,"kunigami.okinawa.jp":true,"minamidaito.okinawa.jp":true,"motobu.okinawa.jp":true,"nago.okinawa.jp":true,"naha.okinawa.jp":true,"nakagusuku.okinawa.jp":true,"nakijin.okinawa.jp":true,"nanjo.okinawa.jp":true,"nishihara.okinawa.jp":true,"ogimi.okinawa.jp":true,"okinawa.okinawa.jp":true,"onna.okinawa.jp":true,"shimoji.okinawa.jp":true,"taketomi.okinawa.jp":true,"tarama.okinawa.jp":true,"tokashiki.okinawa.jp":true,"tomigusuku.okinawa.jp":true,"tonaki.okinawa.jp":true,"urasoe.okinawa.jp":true,"uruma.okinawa.jp":true,"yaese.okinawa.jp":true,"yomitan.okinawa.jp":true,"yonabaru.okinawa.jp":true,"yonaguni.okinawa.jp":true,"zamami.okinawa.jp":true,"abeno.osaka.jp":true,"chihayaakasaka.osaka.jp":true,"chuo.osaka.jp":true,"daito.osaka.jp":true,"fujiidera.osaka.jp":true,"habikino.osaka.jp":true,"hannan.osaka.jp":true,"higashiosaka.osaka.jp":true,"higashisumiyoshi.osaka.jp":true,"higashiyodogawa.osaka.jp":true,"hirakata.osaka.jp":true,"ibaraki.osaka.jp":true,"ikeda.osaka.jp":true,"izumi.osaka.jp":true,"izumiotsu.osaka.jp":true,"izumisano.osaka.jp":true,"kadoma.osaka.jp":true,"kaizuka.osaka.jp":true,"kanan.osaka.jp":true,"kashiwara.osaka.jp":true,"katano.osaka.jp":true,"kawachinagano.osaka.jp":true,"kishiwada.osaka.jp":true,"kita.osaka.jp":true,"kumatori.osaka.jp":true,"matsubara.osaka.jp":true,"minato.osaka.jp":true,"minoh.osaka.jp":true,"misaki.osaka.jp":true,"moriguchi.osaka.jp":true,"neyagawa.osaka.jp":true,"nishi.osaka.jp":true,"nose.osaka.jp":true,"osakasayama.osaka.jp":true,"sakai.osaka.jp":true,"sayama.osaka.jp":true,"sennan.osaka.jp":true,"settsu.osaka.jp":true,"shijonawate.osaka.jp":true,"shimamoto.osaka.jp":true,"suita.osaka.jp":true,"tadaoka.osaka.jp":true,"taishi.osaka.jp":true,"tajiri.osaka.jp":true,"takaishi.osaka.jp":true,"takatsuki.osaka.jp":true,"tondabayashi.osaka.jp":true,"toyonaka.osaka.jp":true,"toyono.osaka.jp":true,"yao.osaka.jp":true,"ariake.saga.jp":true,"arita.saga.jp":true,"fukudomi.saga.jp":true,"genkai.saga.jp":true,"hamatama.saga.jp":true,"hizen.saga.jp":true,"imari.saga.jp":true,"kamimine.saga.jp":true,"kanzaki.saga.jp":true,"karatsu.saga.jp":true,"kashima.saga.jp":true,"kitagata.saga.jp":true,"kitahata.saga.jp":true,"kiyama.saga.jp":true,"kouhoku.saga.jp":true,"kyuragi.saga.jp":true,"nishiarita.saga.jp":true,"ogi.saga.jp":true,"omachi.saga.jp":true,"ouchi.saga.jp":true,"saga.saga.jp":true,"shiroishi.saga.jp":true,"taku.saga.jp":true,"tara.saga.jp":true,"tosu.saga.jp":true,"yoshinogari.saga.jp":true,"arakawa.saitama.jp":true,"asaka.saitama.jp":true,"chichibu.saitama.jp":true,"fujimi.saitama.jp":true,"fujimino.saitama.jp":true,"fukaya.saitama.jp":true,"hanno.saitama.jp":true,"hanyu.saitama.jp":true,"hasuda.saitama.jp":true,"hatogaya.saitama.jp":true,"hatoyama.saitama.jp":true,"hidaka.saitama.jp":true,"higashichichibu.saitama.jp":true,"higashimatsuyama.saitama.jp":true,"honjo.saitama.jp":true,"ina.saitama.jp":true,"iruma.saitama.jp":true,"iwatsuki.saitama.jp":true,"kamiizumi.saitama.jp":true,"kamikawa.saitama.jp":true,"kamisato.saitama.jp":true,"kasukabe.saitama.jp":true,"kawagoe.saitama.jp":true,"kawaguchi.saitama.jp":true,"kawajima.saitama.jp":true,"kazo.saitama.jp":true,"kitamoto.saitama.jp":true,"koshigaya.saitama.jp":true,"kounosu.saitama.jp":true,"kuki.saitama.jp":true,"kumagaya.saitama.jp":true,"matsubushi.saitama.jp":true,"minano.saitama.jp":true,"misato.saitama.jp":true,"miyashiro.saitama.jp":true,"miyoshi.saitama.jp":true,"moroyama.saitama.jp":true,"nagatoro.saitama.jp":true,"namegawa.saitama.jp":true,"niiza.saitama.jp":true,"ogano.saitama.jp":true,"ogawa.saitama.jp":true,"ogose.saitama.jp":true,"okegawa.saitama.jp":true,"omiya.saitama.jp":true,"otaki.saitama.jp":true,"ranzan.saitama.jp":true,"ryokami.saitama.jp":true,"saitama.saitama.jp":true,"sakado.saitama.jp":true,"satte.saitama.jp":true,"sayama.saitama.jp":true,"shiki.saitama.jp":true,"shiraoka.saitama.jp":true,"soka.saitama.jp":true,"sugito.saitama.jp":true,"toda.saitama.jp":true,"tokigawa.saitama.jp":true,"tokorozawa.saitama.jp":true,"tsurugashima.saitama.jp":true,"urawa.saitama.jp":true,"warabi.saitama.jp":true,"yashio.saitama.jp":true,"yokoze.saitama.jp":true,"yono.saitama.jp":true,"yorii.saitama.jp":true,"yoshida.saitama.jp":true,"yoshikawa.saitama.jp":true,"yoshimi.saitama.jp":true,"aisho.shiga.jp":true,"gamo.shiga.jp":true,"higashiomi.shiga.jp":true,"hikone.shiga.jp":true,"koka.shiga.jp":true,"konan.shiga.jp":true,"kosei.shiga.jp":true,"koto.shiga.jp":true,"kusatsu.shiga.jp":true,"maibara.shiga.jp":true,"moriyama.shiga.jp":true,"nagahama.shiga.jp":true,"nishiazai.shiga.jp":true,"notogawa.shiga.jp":true,"omihachiman.shiga.jp":true,"otsu.shiga.jp":true,"ritto.shiga.jp":true,"ryuoh.shiga.jp":true,"takashima.shiga.jp":true,"takatsuki.shiga.jp":true,"torahime.shiga.jp":true,"toyosato.shiga.jp":true,"yasu.shiga.jp":true,"akagi.shimane.jp":true,"ama.shimane.jp":true,"gotsu.shimane.jp":true,"hamada.shimane.jp":true,"higashiizumo.shimane.jp":true,"hikawa.shimane.jp":true,"hikimi.shimane.jp":true,"izumo.shimane.jp":true,"kakinoki.shimane.jp":true,"masuda.shimane.jp":true,"matsue.shimane.jp":true,"misato.shimane.jp":true,"nishinoshima.shimane.jp":true,"ohda.shimane.jp":true,"okinoshima.shimane.jp":true,"okuizumo.shimane.jp":true,"shimane.shimane.jp":true,"tamayu.shimane.jp":true,"tsuwano.shimane.jp":true,"unnan.shimane.jp":true,"yakumo.shimane.jp":true,"yasugi.shimane.jp":true,"yatsuka.shimane.jp":true,"arai.shizuoka.jp":true,"atami.shizuoka.jp":true,"fuji.shizuoka.jp":true,"fujieda.shizuoka.jp":true,"fujikawa.shizuoka.jp":true,"fujinomiya.shizuoka.jp":true,"fukuroi.shizuoka.jp":true,"gotemba.shizuoka.jp":true,"haibara.shizuoka.jp":true,"hamamatsu.shizuoka.jp":true,"higashiizu.shizuoka.jp":true,"ito.shizuoka.jp":true,"iwata.shizuoka.jp":true,"izu.shizuoka.jp":true,"izunokuni.shizuoka.jp":true,"kakegawa.shizuoka.jp":true,"kannami.shizuoka.jp":true,"kawanehon.shizuoka.jp":true,"kawazu.shizuoka.jp":true,"kikugawa.shizuoka.jp":true,"kosai.shizuoka.jp":true,"makinohara.shizuoka.jp":true,"matsuzaki.shizuoka.jp":true,"minamiizu.shizuoka.jp":true,"mishima.shizuoka.jp":true,"morimachi.shizuoka.jp":true,"nishiizu.shizuoka.jp":true,"numazu.shizuoka.jp":true,"omaezaki.shizuoka.jp":true,"shimada.shizuoka.jp":true,"shimizu.shizuoka.jp":true,"shimoda.shizuoka.jp":true,"shizuoka.shizuoka.jp":true,"susono.shizuoka.jp":true,"yaizu.shizuoka.jp":true,"yoshida.shizuoka.jp":true,"ashikaga.tochigi.jp":true,"bato.tochigi.jp":true,"haga.tochigi.jp":true,"ichikai.tochigi.jp":true,"iwafune.tochigi.jp":true,"kaminokawa.tochigi.jp":true,"kanuma.tochigi.jp":true,"karasuyama.tochigi.jp":true,"kuroiso.tochigi.jp":true,"mashiko.tochigi.jp":true,"mibu.tochigi.jp":true,"moka.tochigi.jp":true,"motegi.tochigi.jp":true,"nasu.tochigi.jp":true,"nasushiobara.tochigi.jp":true,"nikko.tochigi.jp":true,"nishikata.tochigi.jp":true,"nogi.tochigi.jp":true,"ohira.tochigi.jp":true,"ohtawara.tochigi.jp":true,"oyama.tochigi.jp":true,"sakura.tochigi.jp":true,"sano.tochigi.jp":true,"shimotsuke.tochigi.jp":true,"shioya.tochigi.jp":true,"takanezawa.tochigi.jp":true,"tochigi.tochigi.jp":true,"tsuga.tochigi.jp":true,"ujiie.tochigi.jp":true,"utsunomiya.tochigi.jp":true,"yaita.tochigi.jp":true,"aizumi.tokushima.jp":true,"anan.tokushima.jp":true,"ichiba.tokushima.jp":true,"itano.tokushima.jp":true,"kainan.tokushima.jp":true,"komatsushima.tokushima.jp":true,"matsushige.tokushima.jp":true,"mima.tokushima.jp":true,"minami.tokushima.jp":true,"miyoshi.tokushima.jp":true,"mugi.tokushima.jp":true,"nakagawa.tokushima.jp":true,"naruto.tokushima.jp":true,"sanagochi.tokushima.jp":true,"shishikui.tokushima.jp":true,"tokushima.tokushima.jp":true,"wajiki.tokushima.jp":true,"adachi.tokyo.jp":true,"akiruno.tokyo.jp":true,"akishima.tokyo.jp":true,"aogashima.tokyo.jp":true,"arakawa.tokyo.jp":true,"bunkyo.tokyo.jp":true,"chiyoda.tokyo.jp":true,"chofu.tokyo.jp":true,"chuo.tokyo.jp":true,"edogawa.tokyo.jp":true,"fuchu.tokyo.jp":true,"fussa.tokyo.jp":true,"hachijo.tokyo.jp":true,"hachioji.tokyo.jp":true,"hamura.tokyo.jp":true,"higashikurume.tokyo.jp":true,"higashimurayama.tokyo.jp":true,"higashiyamato.tokyo.jp":true,"hino.tokyo.jp":true,"hinode.tokyo.jp":true,"hinohara.tokyo.jp":true,"inagi.tokyo.jp":true,"itabashi.tokyo.jp":true,"katsushika.tokyo.jp":true,"kita.tokyo.jp":true,"kiyose.tokyo.jp":true,"kodaira.tokyo.jp":true,"koganei.tokyo.jp":true,"kokubunji.tokyo.jp":true,"komae.tokyo.jp":true,"koto.tokyo.jp":true,"kouzushima.tokyo.jp":true,"kunitachi.tokyo.jp":true,"machida.tokyo.jp":true,"meguro.tokyo.jp":true,"minato.tokyo.jp":true,"mitaka.tokyo.jp":true,"mizuho.tokyo.jp":true,"musashimurayama.tokyo.jp":true,"musashino.tokyo.jp":true,"nakano.tokyo.jp":true,"nerima.tokyo.jp":true,"ogasawara.tokyo.jp":true,"okutama.tokyo.jp":true,"ome.tokyo.jp":true,"oshima.tokyo.jp":true,"ota.tokyo.jp":true,"setagaya.tokyo.jp":true,"shibuya.tokyo.jp":true,"shinagawa.tokyo.jp":true,"shinjuku.tokyo.jp":true,"suginami.tokyo.jp":true,"sumida.tokyo.jp":true,"tachikawa.tokyo.jp":true,"taito.tokyo.jp":true,"tama.tokyo.jp":true,"toshima.tokyo.jp":true,"chizu.tottori.jp":true,"hino.tottori.jp":true,"kawahara.tottori.jp":true,"koge.tottori.jp":true,"kotoura.tottori.jp":true,"misasa.tottori.jp":true,"nanbu.tottori.jp":true,"nichinan.tottori.jp":true,"sakaiminato.tottori.jp":true,"tottori.tottori.jp":true,"wakasa.tottori.jp":true,"yazu.tottori.jp":true,"yonago.tottori.jp":true,"asahi.toyama.jp":true,"fuchu.toyama.jp":true,"fukumitsu.toyama.jp":true,"funahashi.toyama.jp":true,"himi.toyama.jp":true,"imizu.toyama.jp":true,"inami.toyama.jp":true,"johana.toyama.jp":true,"kamiichi.toyama.jp":true,"kurobe.toyama.jp":true,"nakaniikawa.toyama.jp":true,"namerikawa.toyama.jp":true,"nanto.toyama.jp":true,"nyuzen.toyama.jp":true,"oyabe.toyama.jp":true,"taira.toyama.jp":true,"takaoka.toyama.jp":true,"tateyama.toyama.jp":true,"toga.toyama.jp":true,"tonami.toyama.jp":true,"toyama.toyama.jp":true,"unazuki.toyama.jp":true,"uozu.toyama.jp":true,"yamada.toyama.jp":true,"arida.wakayama.jp":true,"aridagawa.wakayama.jp":true,"gobo.wakayama.jp":true,"hashimoto.wakayama.jp":true,"hidaka.wakayama.jp":true,"hirogawa.wakayama.jp":true,"inami.wakayama.jp":true,"iwade.wakayama.jp":true,"kainan.wakayama.jp":true,"kamitonda.wakayama.jp":true,"katsuragi.wakayama.jp":true,"kimino.wakayama.jp":true,"kinokawa.wakayama.jp":true,"kitayama.wakayama.jp":true,"koya.wakayama.jp":true,"koza.wakayama.jp":true,"kozagawa.wakayama.jp":true,"kudoyama.wakayama.jp":true,"kushimoto.wakayama.jp":true,"mihama.wakayama.jp":true,"misato.wakayama.jp":true,"nachikatsuura.wakayama.jp":true,"shingu.wakayama.jp":true,"shirahama.wakayama.jp":true,"taiji.wakayama.jp":true,"tanabe.wakayama.jp":true,"wakayama.wakayama.jp":true,"yuasa.wakayama.jp":true,"yura.wakayama.jp":true,"asahi.yamagata.jp":true,"funagata.yamagata.jp":true,"higashine.yamagata.jp":true,"iide.yamagata.jp":true,"kahoku.yamagata.jp":true,"kaminoyama.yamagata.jp":true,"kaneyama.yamagata.jp":true,"kawanishi.yamagata.jp":true,"mamurogawa.yamagata.jp":true,"mikawa.yamagata.jp":true,"murayama.yamagata.jp":true,"nagai.yamagata.jp":true,"nakayama.yamagata.jp":true,"nanyo.yamagata.jp":true,"nishikawa.yamagata.jp":true,"obanazawa.yamagata.jp":true,"oe.yamagata.jp":true,"oguni.yamagata.jp":true,"ohkura.yamagata.jp":true,"oishida.yamagata.jp":true,"sagae.yamagata.jp":true,"sakata.yamagata.jp":true,"sakegawa.yamagata.jp":true,"shinjo.yamagata.jp":true,"shirataka.yamagata.jp":true,"shonai.yamagata.jp":true,"takahata.yamagata.jp":true,"tendo.yamagata.jp":true,"tozawa.yamagata.jp":true,"tsuruoka.yamagata.jp":true,"yamagata.yamagata.jp":true,"yamanobe.yamagata.jp":true,"yonezawa.yamagata.jp":true,"yuza.yamagata.jp":true,"abu.yamaguchi.jp":true,"hagi.yamaguchi.jp":true,"hikari.yamaguchi.jp":true,"hofu.yamaguchi.jp":true,"iwakuni.yamaguchi.jp":true,"kudamatsu.yamaguchi.jp":true,"mitou.yamaguchi.jp":true,"nagato.yamaguchi.jp":true,"oshima.yamaguchi.jp":true,"shimonoseki.yamaguchi.jp":true,"shunan.yamaguchi.jp":true,"tabuse.yamaguchi.jp":true,"tokuyama.yamaguchi.jp":true,"toyota.yamaguchi.jp":true,"ube.yamaguchi.jp":true,"yuu.yamaguchi.jp":true,"chuo.yamanashi.jp":true,"doshi.yamanashi.jp":true,"fuefuki.yamanashi.jp":true,"fujikawa.yamanashi.jp":true,"fujikawaguchiko.yamanashi.jp":true,"fujiyoshida.yamanashi.jp":true,"hayakawa.yamanashi.jp":true,"hokuto.yamanashi.jp":true,"ichikawamisato.yamanashi.jp":true,"kai.yamanashi.jp":true,"kofu.yamanashi.jp":true,"koshu.yamanashi.jp":true,"kosuge.yamanashi.jp":true,"minami-alps.yamanashi.jp":true,"minobu.yamanashi.jp":true,"nakamichi.yamanashi.jp":true,"nanbu.yamanashi.jp":true,"narusawa.yamanashi.jp":true,"nirasaki.yamanashi.jp":true,"nishikatsura.yamanashi.jp":true,"oshino.yamanashi.jp":true,"otsuki.yamanashi.jp":true,"showa.yamanashi.jp":true,"tabayama.yamanashi.jp":true,"tsuru.yamanashi.jp":true,"uenohara.yamanashi.jp":true,"yamanakako.yamanashi.jp":true,"yamanashi.yamanashi.jp":true,"ke":true,"ac.ke":true,"co.ke":true,"go.ke":true,"info.ke":true,"me.ke":true,"mobi.ke":true,"ne.ke":true,"or.ke":true,"sc.ke":true,"kg":true,"org.kg":true,"net.kg":true,"com.kg":true,"edu.kg":true,"gov.kg":true,"mil.kg":true,"*.kh":true,"ki":true,"edu.ki":true,"biz.ki":true,"net.ki":true,"org.ki":true,"gov.ki":true,"info.ki":true,"com.ki":true,"km":true,"org.km":true,"nom.km":true,"gov.km":true,"prd.km":true,"tm.km":true,"edu.km":true,"mil.km":true,"ass.km":true,"com.km":true,"coop.km":true,"asso.km":true,"presse.km":true,"medecin.km":true,"notaires.km":true,"pharmaciens.km":true,"veterinaire.km":true,"gouv.km":true,"kn":true,"net.kn":true,"org.kn":true,"edu.kn":true,"gov.kn":true,"kp":true,"com.kp":true,"edu.kp":true,"gov.kp":true,"org.kp":true,"rep.kp":true,"tra.kp":true,"kr":true,"ac.kr":true,"co.kr":true,"es.kr":true,"go.kr":true,"hs.kr":true,"kg.kr":true,"mil.kr":true,"ms.kr":true,"ne.kr":true,"or.kr":true,"pe.kr":true,"re.kr":true,"sc.kr":true,"busan.kr":true,"chungbuk.kr":true,"chungnam.kr":true,"daegu.kr":true,"daejeon.kr":true,"gangwon.kr":true,"gwangju.kr":true,"gyeongbuk.kr":true,"gyeonggi.kr":true,"gyeongnam.kr":true,"incheon.kr":true,"jeju.kr":true,"jeonbuk.kr":true,"jeonnam.kr":true,"seoul.kr":true,"ulsan.kr":true,"*.kw":true,"ky":true,"edu.ky":true,"gov.ky":true,"com.ky":true,"org.ky":true,"net.ky":true,"kz":true,"org.kz":true,"edu.kz":true,"net.kz":true,"gov.kz":true,"mil.kz":true,"com.kz":true,"la":true,"int.la":true,"net.la":true,"info.la":true,"edu.la":true,"gov.la":true,"per.la":true,"com.la":true,"org.la":true,"lb":true,"com.lb":true,"edu.lb":true,"gov.lb":true,"net.lb":true,"org.lb":true,"lc":true,"com.lc":true,"net.lc":true,"co.lc":true,"org.lc":true,"edu.lc":true,"gov.lc":true,"li":true,"lk":true,"gov.lk":true,"sch.lk":true,"net.lk":true,"int.lk":true,"com.lk":true,"org.lk":true,"edu.lk":true,"ngo.lk":true,"soc.lk":true,"web.lk":true,"ltd.lk":true,"assn.lk":true,"grp.lk":true,"hotel.lk":true,"ac.lk":true,"lr":true,"com.lr":true,"edu.lr":true,"gov.lr":true,"org.lr":true,"net.lr":true,"ls":true,"co.ls":true,"org.ls":true,"lt":true,"gov.lt":true,"lu":true,"lv":true,"com.lv":true,"edu.lv":true,"gov.lv":true,"org.lv":true,"mil.lv":true,"id.lv":true,"net.lv":true,"asn.lv":true,"conf.lv":true,"ly":true,"com.ly":true,"net.ly":true,"gov.ly":true,"plc.ly":true,"edu.ly":true,"sch.ly":true,"med.ly":true,"org.ly":true,"id.ly":true,"ma":true,"co.ma":true,"net.ma":true,"gov.ma":true,"org.ma":true,"ac.ma":true,"press.ma":true,"mc":true,"tm.mc":true,"asso.mc":true,"md":true,"me":true,"co.me":true,"net.me":true,"org.me":true,"edu.me":true,"ac.me":true,"gov.me":true,"its.me":true,"priv.me":true,"mg":true,"org.mg":true,"nom.mg":true,"gov.mg":true,"prd.mg":true,"tm.mg":true,"edu.mg":true,"mil.mg":true,"com.mg":true,"co.mg":true,"mh":true,"mil":true,"mk":true,"com.mk":true,"org.mk":true,"net.mk":true,"edu.mk":true,"gov.mk":true,"inf.mk":true,"name.mk":true,"ml":true,"com.ml":true,"edu.ml":true,"gouv.ml":true,"gov.ml":true,"net.ml":true,"org.ml":true,"presse.ml":true,"*.mm":true,"mn":true,"gov.mn":true,"edu.mn":true,"org.mn":true,"mo":true,"com.mo":true,"net.mo":true,"org.mo":true,"edu.mo":true,"gov.mo":true,"mobi":true,"mp":true,"mq":true,"mr":true,"gov.mr":true,"ms":true,"com.ms":true,"edu.ms":true,"gov.ms":true,"net.ms":true,"org.ms":true,"mt":true,"com.mt":true,"edu.mt":true,"net.mt":true,"org.mt":true,"mu":true,"com.mu":true,"net.mu":true,"org.mu":true,"gov.mu":true,"ac.mu":true,"co.mu":true,"or.mu":true,"museum":true,"academy.museum":true,"agriculture.museum":true,"air.museum":true,"airguard.museum":true,"alabama.museum":true,"alaska.museum":true,"amber.museum":true,"ambulance.museum":true,"american.museum":true,"americana.museum":true,"americanantiques.museum":true,"americanart.museum":true,"amsterdam.museum":true,"and.museum":true,"annefrank.museum":true,"anthro.museum":true,"anthropology.museum":true,"antiques.museum":true,"aquarium.museum":true,"arboretum.museum":true,"archaeological.museum":true,"archaeology.museum":true,"architecture.museum":true,"art.museum":true,"artanddesign.museum":true,"artcenter.museum":true,"artdeco.museum":true,"arteducation.museum":true,"artgallery.museum":true,"arts.museum":true,"artsandcrafts.museum":true,"asmatart.museum":true,"assassination.museum":true,"assisi.museum":true,"association.museum":true,"astronomy.museum":true,"atlanta.museum":true,"austin.museum":true,"australia.museum":true,"automotive.museum":true,"aviation.museum":true,"axis.museum":true,"badajoz.museum":true,"baghdad.museum":true,"bahn.museum":true,"bale.museum":true,"baltimore.museum":true,"barcelona.museum":true,"baseball.museum":true,"basel.museum":true,"baths.museum":true,"bauern.museum":true,"beauxarts.museum":true,"beeldengeluid.museum":true,"bellevue.museum":true,"bergbau.museum":true,"berkeley.museum":true,"berlin.museum":true,"bern.museum":true,"bible.museum":true,"bilbao.museum":true,"bill.museum":true,"birdart.museum":true,"birthplace.museum":true,"bonn.museum":true,"boston.museum":true,"botanical.museum":true,"botanicalgarden.museum":true,"botanicgarden.museum":true,"botany.museum":true,"brandywinevalley.museum":true,"brasil.museum":true,"bristol.museum":true,"british.museum":true,"britishcolumbia.museum":true,"broadcast.museum":true,"brunel.museum":true,"brussel.museum":true,"brussels.museum":true,"bruxelles.museum":true,"building.museum":true,"burghof.museum":true,"bus.museum":true,"bushey.museum":true,"cadaques.museum":true,"california.museum":true,"cambridge.museum":true,"can.museum":true,"canada.museum":true,"capebreton.museum":true,"carrier.museum":true,"cartoonart.museum":true,"casadelamoneda.museum":true,"castle.museum":true,"castres.museum":true,"celtic.museum":true,"center.museum":true,"chattanooga.museum":true,"cheltenham.museum":true,"chesapeakebay.museum":true,"chicago.museum":true,"children.museum":true,"childrens.museum":true,"childrensgarden.museum":true,"chiropractic.museum":true,"chocolate.museum":true,"christiansburg.museum":true,"cincinnati.museum":true,"cinema.museum":true,"circus.museum":true,"civilisation.museum":true,"civilization.museum":true,"civilwar.museum":true,"clinton.museum":true,"clock.museum":true,"coal.museum":true,"coastaldefence.museum":true,"cody.museum":true,"coldwar.museum":true,"collection.museum":true,"colonialwilliamsburg.museum":true,"coloradoplateau.museum":true,"columbia.museum":true,"columbus.museum":true,"communication.museum":true,"communications.museum":true,"community.museum":true,"computer.museum":true,"computerhistory.museum":true,"xn--comunicaes-v6a2o.museum":true,"contemporary.museum":true,"contemporaryart.museum":true,"convent.museum":true,"copenhagen.museum":true,"corporation.museum":true,"xn--correios-e-telecomunicaes-ghc29a.museum":true,"corvette.museum":true,"costume.museum":true,"countryestate.museum":true,"county.museum":true,"crafts.museum":true,"cranbrook.museum":true,"creation.museum":true,"cultural.museum":true,"culturalcenter.museum":true,"culture.museum":true,"cyber.museum":true,"cymru.museum":true,"dali.museum":true,"dallas.museum":true,"database.museum":true,"ddr.museum":true,"decorativearts.museum":true,"delaware.museum":true,"delmenhorst.museum":true,"denmark.museum":true,"depot.museum":true,"design.museum":true,"detroit.museum":true,"dinosaur.museum":true,"discovery.museum":true,"dolls.museum":true,"donostia.museum":true,"durham.museum":true,"eastafrica.museum":true,"eastcoast.museum":true,"education.museum":true,"educational.museum":true,"egyptian.museum":true,"eisenbahn.museum":true,"elburg.museum":true,"elvendrell.museum":true,"embroidery.museum":true,"encyclopedic.museum":true,"england.museum":true,"entomology.museum":true,"environment.museum":true,"environmentalconservation.museum":true,"epilepsy.museum":true,"essex.museum":true,"estate.museum":true,"ethnology.museum":true,"exeter.museum":true,"exhibition.museum":true,"family.museum":true,"farm.museum":true,"farmequipment.museum":true,"farmers.museum":true,"farmstead.museum":true,"field.museum":true,"figueres.museum":true,"filatelia.museum":true,"film.museum":true,"fineart.museum":true,"finearts.museum":true,"finland.museum":true,"flanders.museum":true,"florida.museum":true,"force.museum":true,"fortmissoula.museum":true,"fortworth.museum":true,"foundation.museum":true,"francaise.museum":true,"frankfurt.museum":true,"franziskaner.museum":true,"freemasonry.museum":true,"freiburg.museum":true,"fribourg.museum":true,"frog.museum":true,"fundacio.museum":true,"furniture.museum":true,"gallery.museum":true,"garden.museum":true,"gateway.museum":true,"geelvinck.museum":true,"gemological.museum":true,"geology.museum":true,"georgia.museum":true,"giessen.museum":true,"glas.museum":true,"glass.museum":true,"gorge.museum":true,"grandrapids.museum":true,"graz.museum":true,"guernsey.museum":true,"halloffame.museum":true,"hamburg.museum":true,"handson.museum":true,"harvestcelebration.museum":true,"hawaii.museum":true,"health.museum":true,"heimatunduhren.museum":true,"hellas.museum":true,"helsinki.museum":true,"hembygdsforbund.museum":true,"heritage.museum":true,"histoire.museum":true,"historical.museum":true,"historicalsociety.museum":true,"historichouses.museum":true,"historisch.museum":true,"historisches.museum":true,"history.museum":true,"historyofscience.museum":true,"horology.museum":true,"house.museum":true,"humanities.museum":true,"illustration.museum":true,"imageandsound.museum":true,"indian.museum":true,"indiana.museum":true,"indianapolis.museum":true,"indianmarket.museum":true,"intelligence.museum":true,"interactive.museum":true,"iraq.museum":true,"iron.museum":true,"isleofman.museum":true,"jamison.museum":true,"jefferson.museum":true,"jerusalem.museum":true,"jewelry.museum":true,"jewish.museum":true,"jewishart.museum":true,"jfk.museum":true,"journalism.museum":true,"judaica.museum":true,"judygarland.museum":true,"juedisches.museum":true,"juif.museum":true,"karate.museum":true,"karikatur.museum":true,"kids.museum":true,"koebenhavn.museum":true,"koeln.museum":true,"kunst.museum":true,"kunstsammlung.museum":true,"kunstunddesign.museum":true,"labor.museum":true,"labour.museum":true,"lajolla.museum":true,"lancashire.museum":true,"landes.museum":true,"lans.museum":true,"xn--lns-qla.museum":true,"larsson.museum":true,"lewismiller.museum":true,"lincoln.museum":true,"linz.museum":true,"living.museum":true,"livinghistory.museum":true,"localhistory.museum":true,"london.museum":true,"losangeles.museum":true,"louvre.museum":true,"loyalist.museum":true,"lucerne.museum":true,"luxembourg.museum":true,"luzern.museum":true,"mad.museum":true,"madrid.museum":true,"mallorca.museum":true,"manchester.museum":true,"mansion.museum":true,"mansions.museum":true,"manx.museum":true,"marburg.museum":true,"maritime.museum":true,"maritimo.museum":true,"maryland.museum":true,"marylhurst.museum":true,"media.museum":true,"medical.museum":true,"medizinhistorisches.museum":true,"meeres.museum":true,"memorial.museum":true,"mesaverde.museum":true,"michigan.museum":true,"midatlantic.museum":true,"military.museum":true,"mill.museum":true,"miners.museum":true,"mining.museum":true,"minnesota.museum":true,"missile.museum":true,"missoula.museum":true,"modern.museum":true,"moma.museum":true,"money.museum":true,"monmouth.museum":true,"monticello.museum":true,"montreal.museum":true,"moscow.museum":true,"motorcycle.museum":true,"muenchen.museum":true,"muenster.museum":true,"mulhouse.museum":true,"muncie.museum":true,"museet.museum":true,"museumcenter.museum":true,"museumvereniging.museum":true,"music.museum":true,"national.museum":true,"nationalfirearms.museum":true,"nationalheritage.museum":true,"nativeamerican.museum":true,"naturalhistory.museum":true,"naturalhistorymuseum.museum":true,"naturalsciences.museum":true,"nature.museum":true,"naturhistorisches.museum":true,"natuurwetenschappen.museum":true,"naumburg.museum":true,"naval.museum":true,"nebraska.museum":true,"neues.museum":true,"newhampshire.museum":true,"newjersey.museum":true,"newmexico.museum":true,"newport.museum":true,"newspaper.museum":true,"newyork.museum":true,"niepce.museum":true,"norfolk.museum":true,"north.museum":true,"nrw.museum":true,"nuernberg.museum":true,"nuremberg.museum":true,"nyc.museum":true,"nyny.museum":true,"oceanographic.museum":true,"oceanographique.museum":true,"omaha.museum":true,"online.museum":true,"ontario.museum":true,"openair.museum":true,"oregon.museum":true,"oregontrail.museum":true,"otago.museum":true,"oxford.museum":true,"pacific.museum":true,"paderborn.museum":true,"palace.museum":true,"paleo.museum":true,"palmsprings.museum":true,"panama.museum":true,"paris.museum":true,"pasadena.museum":true,"pharmacy.museum":true,"philadelphia.museum":true,"philadelphiaarea.museum":true,"philately.museum":true,"phoenix.museum":true,"photography.museum":true,"pilots.museum":true,"pittsburgh.museum":true,"planetarium.museum":true,"plantation.museum":true,"plants.museum":true,"plaza.museum":true,"portal.museum":true,"portland.museum":true,"portlligat.museum":true,"posts-and-telecommunications.museum":true,"preservation.museum":true,"presidio.museum":true,"press.museum":true,"project.museum":true,"public.museum":true,"pubol.museum":true,"quebec.museum":true,"railroad.museum":true,"railway.museum":true,"research.museum":true,"resistance.museum":true,"riodejaneiro.museum":true,"rochester.museum":true,"rockart.museum":true,"roma.museum":true,"russia.museum":true,"saintlouis.museum":true,"salem.museum":true,"salvadordali.museum":true,"salzburg.museum":true,"sandiego.museum":true,"sanfrancisco.museum":true,"santabarbara.museum":true,"santacruz.museum":true,"santafe.museum":true,"saskatchewan.museum":true,"satx.museum":true,"savannahga.museum":true,"schlesisches.museum":true,"schoenbrunn.museum":true,"schokoladen.museum":true,"school.museum":true,"schweiz.museum":true,"science.museum":true,"scienceandhistory.museum":true,"scienceandindustry.museum":true,"sciencecenter.museum":true,"sciencecenters.museum":true,"science-fiction.museum":true,"sciencehistory.museum":true,"sciences.museum":true,"sciencesnaturelles.museum":true,"scotland.museum":true,"seaport.museum":true,"settlement.museum":true,"settlers.museum":true,"shell.museum":true,"sherbrooke.museum":true,"sibenik.museum":true,"silk.museum":true,"ski.museum":true,"skole.museum":true,"society.museum":true,"sologne.museum":true,"soundandvision.museum":true,"southcarolina.museum":true,"southwest.museum":true,"space.museum":true,"spy.museum":true,"square.museum":true,"stadt.museum":true,"stalbans.museum":true,"starnberg.museum":true,"state.museum":true,"stateofdelaware.museum":true,"station.museum":true,"steam.museum":true,"steiermark.museum":true,"stjohn.museum":true,"stockholm.museum":true,"stpetersburg.museum":true,"stuttgart.museum":true,"suisse.museum":true,"surgeonshall.museum":true,"surrey.museum":true,"svizzera.museum":true,"sweden.museum":true,"sydney.museum":true,"tank.museum":true,"tcm.museum":true,"technology.museum":true,"telekommunikation.museum":true,"television.museum":true,"texas.museum":true,"textile.museum":true,"theater.museum":true,"time.museum":true,"timekeeping.museum":true,"topology.museum":true,"torino.museum":true,"touch.museum":true,"town.museum":true,"transport.museum":true,"tree.museum":true,"trolley.museum":true,"trust.museum":true,"trustee.museum":true,"uhren.museum":true,"ulm.museum":true,"undersea.museum":true,"university.museum":true,"usa.museum":true,"usantiques.museum":true,"usarts.museum":true,"uscountryestate.museum":true,"usculture.museum":true,"usdecorativearts.museum":true,"usgarden.museum":true,"ushistory.museum":true,"ushuaia.museum":true,"uslivinghistory.museum":true,"utah.museum":true,"uvic.museum":true,"valley.museum":true,"vantaa.museum":true,"versailles.museum":true,"viking.museum":true,"village.museum":true,"virginia.museum":true,"virtual.museum":true,"virtuel.museum":true,"vlaanderen.museum":true,"volkenkunde.museum":true,"wales.museum":true,"wallonie.museum":true,"war.museum":true,"washingtondc.museum":true,"watchandclock.museum":true,"watch-and-clock.museum":true,"western.museum":true,"westfalen.museum":true,"whaling.museum":true,"wildlife.museum":true,"williamsburg.museum":true,"windmill.museum":true,"workshop.museum":true,"york.museum":true,"yorkshire.museum":true,"yosemite.museum":true,"youth.museum":true,"zoological.museum":true,"zoology.museum":true,"xn--9dbhblg6di.museum":true,"xn--h1aegh.museum":true,"mv":true,"aero.mv":true,"biz.mv":true,"com.mv":true,"coop.mv":true,"edu.mv":true,"gov.mv":true,"info.mv":true,"int.mv":true,"mil.mv":true,"museum.mv":true,"name.mv":true,"net.mv":true,"org.mv":true,"pro.mv":true,"mw":true,"ac.mw":true,"biz.mw":true,"co.mw":true,"com.mw":true,"coop.mw":true,"edu.mw":true,"gov.mw":true,"int.mw":true,"museum.mw":true,"net.mw":true,"org.mw":true,"mx":true,"com.mx":true,"org.mx":true,"gob.mx":true,"edu.mx":true,"net.mx":true,"my":true,"com.my":true,"net.my":true,"org.my":true,"gov.my":true,"edu.my":true,"mil.my":true,"name.my":true,"mz":true,"ac.mz":true,"adv.mz":true,"co.mz":true,"edu.mz":true,"gov.mz":true,"mil.mz":true,"net.mz":true,"org.mz":true,"na":true,"info.na":true,"pro.na":true,"name.na":true,"school.na":true,"or.na":true,"dr.na":true,"us.na":true,"mx.na":true,"ca.na":true,"in.na":true,"cc.na":true,"tv.na":true,"ws.na":true,"mobi.na":true,"co.na":true,"com.na":true,"org.na":true,"name":true,"nc":true,"asso.nc":true,"nom.nc":true,"ne":true,"net":true,"nf":true,"com.nf":true,"net.nf":true,"per.nf":true,"rec.nf":true,"web.nf":true,"arts.nf":true,"firm.nf":true,"info.nf":true,"other.nf":true,"store.nf":true,"ng":true,"com.ng":true,"edu.ng":true,"gov.ng":true,"i.ng":true,"mil.ng":true,"mobi.ng":true,"name.ng":true,"net.ng":true,"org.ng":true,"sch.ng":true,"ni":true,"ac.ni":true,"biz.ni":true,"co.ni":true,"com.ni":true,"edu.ni":true,"gob.ni":true,"in.ni":true,"info.ni":true,"int.ni":true,"mil.ni":true,"net.ni":true,"nom.ni":true,"org.ni":true,"web.ni":true,"nl":true,"bv.nl":true,"no":true,"fhs.no":true,"vgs.no":true,"fylkesbibl.no":true,"folkebibl.no":true,"museum.no":true,"idrett.no":true,"priv.no":true,"mil.no":true,"stat.no":true,"dep.no":true,"kommune.no":true,"herad.no":true,"aa.no":true,"ah.no":true,"bu.no":true,"fm.no":true,"hl.no":true,"hm.no":true,"jan-mayen.no":true,"mr.no":true,"nl.no":true,"nt.no":true,"of.no":true,"ol.no":true,"oslo.no":true,"rl.no":true,"sf.no":true,"st.no":true,"svalbard.no":true,"tm.no":true,"tr.no":true,"va.no":true,"vf.no":true,"gs.aa.no":true,"gs.ah.no":true,"gs.bu.no":true,"gs.fm.no":true,"gs.hl.no":true,"gs.hm.no":true,"gs.jan-mayen.no":true,"gs.mr.no":true,"gs.nl.no":true,"gs.nt.no":true,"gs.of.no":true,"gs.ol.no":true,"gs.oslo.no":true,"gs.rl.no":true,"gs.sf.no":true,"gs.st.no":true,"gs.svalbard.no":true,"gs.tm.no":true,"gs.tr.no":true,"gs.va.no":true,"gs.vf.no":true,"akrehamn.no":true,"xn--krehamn-dxa.no":true,"algard.no":true,"xn--lgrd-poac.no":true,"arna.no":true,"brumunddal.no":true,"bryne.no":true,"bronnoysund.no":true,"xn--brnnysund-m8ac.no":true,"drobak.no":true,"xn--drbak-wua.no":true,"egersund.no":true,"fetsund.no":true,"floro.no":true,"xn--flor-jra.no":true,"fredrikstad.no":true,"hokksund.no":true,"honefoss.no":true,"xn--hnefoss-q1a.no":true,"jessheim.no":true,"jorpeland.no":true,"xn--jrpeland-54a.no":true,"kirkenes.no":true,"kopervik.no":true,"krokstadelva.no":true,"langevag.no":true,"xn--langevg-jxa.no":true,"leirvik.no":true,"mjondalen.no":true,"xn--mjndalen-64a.no":true,"mo-i-rana.no":true,"mosjoen.no":true,"xn--mosjen-eya.no":true,"nesoddtangen.no":true,"orkanger.no":true,"osoyro.no":true,"xn--osyro-wua.no":true,"raholt.no":true,"xn--rholt-mra.no":true,"sandnessjoen.no":true,"xn--sandnessjen-ogb.no":true,"skedsmokorset.no":true,"slattum.no":true,"spjelkavik.no":true,"stathelle.no":true,"stavern.no":true,"stjordalshalsen.no":true,"xn--stjrdalshalsen-sqb.no":true,"tananger.no":true,"tranby.no":true,"vossevangen.no":true,"afjord.no":true,"xn--fjord-lra.no":true,"agdenes.no":true,"al.no":true,"xn--l-1fa.no":true,"alesund.no":true,"xn--lesund-hua.no":true,"alstahaug.no":true,"alta.no":true,"xn--lt-liac.no":true,"alaheadju.no":true,"xn--laheadju-7ya.no":true,"alvdal.no":true,"amli.no":true,"xn--mli-tla.no":true,"amot.no":true,"xn--mot-tla.no":true,"andebu.no":true,"andoy.no":true,"xn--andy-ira.no":true,"andasuolo.no":true,"ardal.no":true,"xn--rdal-poa.no":true,"aremark.no":true,"arendal.no":true,"xn--s-1fa.no":true,"aseral.no":true,"xn--seral-lra.no":true,"asker.no":true,"askim.no":true,"askvoll.no":true,"askoy.no":true,"xn--asky-ira.no":true,"asnes.no":true,"xn--snes-poa.no":true,"audnedaln.no":true,"aukra.no":true,"aure.no":true,"aurland.no":true,"aurskog-holand.no":true,"xn--aurskog-hland-jnb.no":true,"austevoll.no":true,"austrheim.no":true,"averoy.no":true,"xn--avery-yua.no":true,"balestrand.no":true,"ballangen.no":true,"balat.no":true,"xn--blt-elab.no":true,"balsfjord.no":true,"bahccavuotna.no":true,"xn--bhccavuotna-k7a.no":true,"bamble.no":true,"bardu.no":true,"beardu.no":true,"beiarn.no":true,"bajddar.no":true,"xn--bjddar-pta.no":true,"baidar.no":true,"xn--bidr-5nac.no":true,"berg.no":true,"bergen.no":true,"berlevag.no":true,"xn--berlevg-jxa.no":true,"bearalvahki.no":true,"xn--bearalvhki-y4a.no":true,"bindal.no":true,"birkenes.no":true,"bjarkoy.no":true,"xn--bjarky-fya.no":true,"bjerkreim.no":true,"bjugn.no":true,"bodo.no":true,"xn--bod-2na.no":true,"badaddja.no":true,"xn--bdddj-mrabd.no":true,"budejju.no":true,"bokn.no":true,"bremanger.no":true,"bronnoy.no":true,"xn--brnny-wuac.no":true,"bygland.no":true,"bykle.no":true,"barum.no":true,"xn--brum-voa.no":true,"bo.telemark.no":true,"xn--b-5ga.telemark.no":true,"bo.nordland.no":true,"xn--b-5ga.nordland.no":true,"bievat.no":true,"xn--bievt-0qa.no":true,"bomlo.no":true,"xn--bmlo-gra.no":true,"batsfjord.no":true,"xn--btsfjord-9za.no":true,"bahcavuotna.no":true,"xn--bhcavuotna-s4a.no":true,"dovre.no":true,"drammen.no":true,"drangedal.no":true,"dyroy.no":true,"xn--dyry-ira.no":true,"donna.no":true,"xn--dnna-gra.no":true,"eid.no":true,"eidfjord.no":true,"eidsberg.no":true,"eidskog.no":true,"eidsvoll.no":true,"eigersund.no":true,"elverum.no":true,"enebakk.no":true,"engerdal.no":true,"etne.no":true,"etnedal.no":true,"evenes.no":true,"evenassi.no":true,"xn--eveni-0qa01ga.no":true,"evje-og-hornnes.no":true,"farsund.no":true,"fauske.no":true,"fuossko.no":true,"fuoisku.no":true,"fedje.no":true,"fet.no":true,"finnoy.no":true,"xn--finny-yua.no":true,"fitjar.no":true,"fjaler.no":true,"fjell.no":true,"flakstad.no":true,"flatanger.no":true,"flekkefjord.no":true,"flesberg.no":true,"flora.no":true,"fla.no":true,"xn--fl-zia.no":true,"folldal.no":true,"forsand.no":true,"fosnes.no":true,"frei.no":true,"frogn.no":true,"froland.no":true,"frosta.no":true,"frana.no":true,"xn--frna-woa.no":true,"froya.no":true,"xn--frya-hra.no":true,"fusa.no":true,"fyresdal.no":true,"forde.no":true,"xn--frde-gra.no":true,"gamvik.no":true,"gangaviika.no":true,"xn--ggaviika-8ya47h.no":true,"gaular.no":true,"gausdal.no":true,"gildeskal.no":true,"xn--gildeskl-g0a.no":true,"giske.no":true,"gjemnes.no":true,"gjerdrum.no":true,"gjerstad.no":true,"gjesdal.no":true,"gjovik.no":true,"xn--gjvik-wua.no":true,"gloppen.no":true,"gol.no":true,"gran.no":true,"grane.no":true,"granvin.no":true,"gratangen.no":true,"grimstad.no":true,"grong.no":true,"kraanghke.no":true,"xn--kranghke-b0a.no":true,"grue.no":true,"gulen.no":true,"hadsel.no":true,"halden.no":true,"halsa.no":true,"hamar.no":true,"hamaroy.no":true,"habmer.no":true,"xn--hbmer-xqa.no":true,"hapmir.no":true,"xn--hpmir-xqa.no":true,"hammerfest.no":true,"hammarfeasta.no":true,"xn--hmmrfeasta-s4ac.no":true,"haram.no":true,"hareid.no":true,"harstad.no":true,"hasvik.no":true,"aknoluokta.no":true,"xn--koluokta-7ya57h.no":true,"hattfjelldal.no":true,"aarborte.no":true,"haugesund.no":true,"hemne.no":true,"hemnes.no":true,"hemsedal.no":true,"heroy.more-og-romsdal.no":true,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":true,"heroy.nordland.no":true,"xn--hery-ira.nordland.no":true,"hitra.no":true,"hjartdal.no":true,"hjelmeland.no":true,"hobol.no":true,"xn--hobl-ira.no":true,"hof.no":true,"hol.no":true,"hole.no":true,"holmestrand.no":true,"holtalen.no":true,"xn--holtlen-hxa.no":true,"hornindal.no":true,"horten.no":true,"hurdal.no":true,"hurum.no":true,"hvaler.no":true,"hyllestad.no":true,"hagebostad.no":true,"xn--hgebostad-g3a.no":true,"hoyanger.no":true,"xn--hyanger-q1a.no":true,"hoylandet.no":true,"xn--hylandet-54a.no":true,"ha.no":true,"xn--h-2fa.no":true,"ibestad.no":true,"inderoy.no":true,"xn--indery-fya.no":true,"iveland.no":true,"jevnaker.no":true,"jondal.no":true,"jolster.no":true,"xn--jlster-bya.no":true,"karasjok.no":true,"karasjohka.no":true,"xn--krjohka-hwab49j.no":true,"karlsoy.no":true,"galsa.no":true,"xn--gls-elac.no":true,"karmoy.no":true,"xn--karmy-yua.no":true,"kautokeino.no":true,"guovdageaidnu.no":true,"klepp.no":true,"klabu.no":true,"xn--klbu-woa.no":true,"kongsberg.no":true,"kongsvinger.no":true,"kragero.no":true,"xn--krager-gya.no":true,"kristiansand.no":true,"kristiansund.no":true,"krodsherad.no":true,"xn--krdsherad-m8a.no":true,"kvalsund.no":true,"rahkkeravju.no":true,"xn--rhkkervju-01af.no":true,"kvam.no":true,"kvinesdal.no":true,"kvinnherad.no":true,"kviteseid.no":true,"kvitsoy.no":true,"xn--kvitsy-fya.no":true,"kvafjord.no":true,"xn--kvfjord-nxa.no":true,"giehtavuoatna.no":true,"kvanangen.no":true,"xn--kvnangen-k0a.no":true,"navuotna.no":true,"xn--nvuotna-hwa.no":true,"kafjord.no":true,"xn--kfjord-iua.no":true,"gaivuotna.no":true,"xn--givuotna-8ya.no":true,"larvik.no":true,"lavangen.no":true,"lavagis.no":true,"loabat.no":true,"xn--loabt-0qa.no":true,"lebesby.no":true,"davvesiida.no":true,"leikanger.no":true,"leirfjord.no":true,"leka.no":true,"leksvik.no":true,"lenvik.no":true,"leangaviika.no":true,"xn--leagaviika-52b.no":true,"lesja.no":true,"levanger.no":true,"lier.no":true,"lierne.no":true,"lillehammer.no":true,"lillesand.no":true,"lindesnes.no":true,"lindas.no":true,"xn--linds-pra.no":true,"lom.no":true,"loppa.no":true,"lahppi.no":true,"xn--lhppi-xqa.no":true,"lund.no":true,"lunner.no":true,"luroy.no":true,"xn--lury-ira.no":true,"luster.no":true,"lyngdal.no":true,"lyngen.no":true,"ivgu.no":true,"lardal.no":true,"lerdal.no":true,"xn--lrdal-sra.no":true,"lodingen.no":true,"xn--ldingen-q1a.no":true,"lorenskog.no":true,"xn--lrenskog-54a.no":true,"loten.no":true,"xn--lten-gra.no":true,"malvik.no":true,"masoy.no":true,"xn--msy-ula0h.no":true,"muosat.no":true,"xn--muost-0qa.no":true,"mandal.no":true,"marker.no":true,"marnardal.no":true,"masfjorden.no":true,"meland.no":true,"meldal.no":true,"melhus.no":true,"meloy.no":true,"xn--mely-ira.no":true,"meraker.no":true,"xn--merker-kua.no":true,"moareke.no":true,"xn--moreke-jua.no":true,"midsund.no":true,"midtre-gauldal.no":true,"modalen.no":true,"modum.no":true,"molde.no":true,"moskenes.no":true,"moss.no":true,"mosvik.no":true,"malselv.no":true,"xn--mlselv-iua.no":true,"malatvuopmi.no":true,"xn--mlatvuopmi-s4a.no":true,"namdalseid.no":true,"aejrie.no":true,"namsos.no":true,"namsskogan.no":true,"naamesjevuemie.no":true,"xn--nmesjevuemie-tcba.no":true,"laakesvuemie.no":true,"nannestad.no":true,"narvik.no":true,"narviika.no":true,"naustdal.no":true,"nedre-eiker.no":true,"nes.akershus.no":true,"nes.buskerud.no":true,"nesna.no":true,"nesodden.no":true,"nesseby.no":true,"unjarga.no":true,"xn--unjrga-rta.no":true,"nesset.no":true,"nissedal.no":true,"nittedal.no":true,"nord-aurdal.no":true,"nord-fron.no":true,"nord-odal.no":true,"norddal.no":true,"nordkapp.no":true,"davvenjarga.no":true,"xn--davvenjrga-y4a.no":true,"nordre-land.no":true,"nordreisa.no":true,"raisa.no":true,"xn--risa-5na.no":true,"nore-og-uvdal.no":true,"notodden.no":true,"naroy.no":true,"xn--nry-yla5g.no":true,"notteroy.no":true,"xn--nttery-byae.no":true,"odda.no":true,"oksnes.no":true,"xn--ksnes-uua.no":true,"oppdal.no":true,"oppegard.no":true,"xn--oppegrd-ixa.no":true,"orkdal.no":true,"orland.no":true,"xn--rland-uua.no":true,"orskog.no":true,"xn--rskog-uua.no":true,"orsta.no":true,"xn--rsta-fra.no":true,"os.hedmark.no":true,"os.hordaland.no":true,"osen.no":true,"osteroy.no":true,"xn--ostery-fya.no":true,"ostre-toten.no":true,"xn--stre-toten-zcb.no":true,"overhalla.no":true,"ovre-eiker.no":true,"xn--vre-eiker-k8a.no":true,"oyer.no":true,"xn--yer-zna.no":true,"oygarden.no":true,"xn--ygarden-p1a.no":true,"oystre-slidre.no":true,"xn--ystre-slidre-ujb.no":true,"porsanger.no":true,"porsangu.no":true,"xn--porsgu-sta26f.no":true,"porsgrunn.no":true,"radoy.no":true,"xn--rady-ira.no":true,"rakkestad.no":true,"rana.no":true,"ruovat.no":true,"randaberg.no":true,"rauma.no":true,"rendalen.no":true,"rennebu.no":true,"rennesoy.no":true,"xn--rennesy-v1a.no":true,"rindal.no":true,"ringebu.no":true,"ringerike.no":true,"ringsaker.no":true,"rissa.no":true,"risor.no":true,"xn--risr-ira.no":true,"roan.no":true,"rollag.no":true,"rygge.no":true,"ralingen.no":true,"xn--rlingen-mxa.no":true,"rodoy.no":true,"xn--rdy-0nab.no":true,"romskog.no":true,"xn--rmskog-bya.no":true,"roros.no":true,"xn--rros-gra.no":true,"rost.no":true,"xn--rst-0na.no":true,"royken.no":true,"xn--ryken-vua.no":true,"royrvik.no":true,"xn--ryrvik-bya.no":true,"rade.no":true,"xn--rde-ula.no":true,"salangen.no":true,"siellak.no":true,"saltdal.no":true,"salat.no":true,"xn--slt-elab.no":true,"xn--slat-5na.no":true,"samnanger.no":true,"sande.more-og-romsdal.no":true,"sande.xn--mre-og-romsdal-qqb.no":true,"sande.vestfold.no":true,"sandefjord.no":true,"sandnes.no":true,"sandoy.no":true,"xn--sandy-yua.no":true,"sarpsborg.no":true,"sauda.no":true,"sauherad.no":true,"sel.no":true,"selbu.no":true,"selje.no":true,"seljord.no":true,"sigdal.no":true,"siljan.no":true,"sirdal.no":true,"skaun.no":true,"skedsmo.no":true,"ski.no":true,"skien.no":true,"skiptvet.no":true,"skjervoy.no":true,"xn--skjervy-v1a.no":true,"skierva.no":true,"xn--skierv-uta.no":true,"skjak.no":true,"xn--skjk-soa.no":true,"skodje.no":true,"skanland.no":true,"xn--sknland-fxa.no":true,"skanit.no":true,"xn--sknit-yqa.no":true,"smola.no":true,"xn--smla-hra.no":true,"snillfjord.no":true,"snasa.no":true,"xn--snsa-roa.no":true,"snoasa.no":true,"snaase.no":true,"xn--snase-nra.no":true,"sogndal.no":true,"sokndal.no":true,"sola.no":true,"solund.no":true,"songdalen.no":true,"sortland.no":true,"spydeberg.no":true,"stange.no":true,"stavanger.no":true,"steigen.no":true,"steinkjer.no":true,"stjordal.no":true,"xn--stjrdal-s1a.no":true,"stokke.no":true,"stor-elvdal.no":true,"stord.no":true,"stordal.no":true,"storfjord.no":true,"omasvuotna.no":true,"strand.no":true,"stranda.no":true,"stryn.no":true,"sula.no":true,"suldal.no":true,"sund.no":true,"sunndal.no":true,"surnadal.no":true,"sveio.no":true,"svelvik.no":true,"sykkylven.no":true,"sogne.no":true,"xn--sgne-gra.no":true,"somna.no":true,"xn--smna-gra.no":true,"sondre-land.no":true,"xn--sndre-land-0cb.no":true,"sor-aurdal.no":true,"xn--sr-aurdal-l8a.no":true,"sor-fron.no":true,"xn--sr-fron-q1a.no":true,"sor-odal.no":true,"xn--sr-odal-q1a.no":true,"sor-varanger.no":true,"xn--sr-varanger-ggb.no":true,"matta-varjjat.no":true,"xn--mtta-vrjjat-k7af.no":true,"sorfold.no":true,"xn--srfold-bya.no":true,"sorreisa.no":true,"xn--srreisa-q1a.no":true,"sorum.no":true,"xn--srum-gra.no":true,"tana.no":true,"deatnu.no":true,"time.no":true,"tingvoll.no":true,"tinn.no":true,"tjeldsund.no":true,"dielddanuorri.no":true,"tjome.no":true,"xn--tjme-hra.no":true,"tokke.no":true,"tolga.no":true,"torsken.no":true,"tranoy.no":true,"xn--trany-yua.no":true,"tromso.no":true,"xn--troms-zua.no":true,"tromsa.no":true,"romsa.no":true,"trondheim.no":true,"troandin.no":true,"trysil.no":true,"trana.no":true,"xn--trna-woa.no":true,"trogstad.no":true,"xn--trgstad-r1a.no":true,"tvedestrand.no":true,"tydal.no":true,"tynset.no":true,"tysfjord.no":true,"divtasvuodna.no":true,"divttasvuotna.no":true,"tysnes.no":true,"tysvar.no":true,"xn--tysvr-vra.no":true,"tonsberg.no":true,"xn--tnsberg-q1a.no":true,"ullensaker.no":true,"ullensvang.no":true,"ulvik.no":true,"utsira.no":true,"vadso.no":true,"xn--vads-jra.no":true,"cahcesuolo.no":true,"xn--hcesuolo-7ya35b.no":true,"vaksdal.no":true,"valle.no":true,"vang.no":true,"vanylven.no":true,"vardo.no":true,"xn--vard-jra.no":true,"varggat.no":true,"xn--vrggt-xqad.no":true,"vefsn.no":true,"vaapste.no":true,"vega.no":true,"vegarshei.no":true,"xn--vegrshei-c0a.no":true,"vennesla.no":true,"verdal.no":true,"verran.no":true,"vestby.no":true,"vestnes.no":true,"vestre-slidre.no":true,"vestre-toten.no":true,"vestvagoy.no":true,"xn--vestvgy-ixa6o.no":true,"vevelstad.no":true,"vik.no":true,"vikna.no":true,"vindafjord.no":true,"volda.no":true,"voss.no":true,"varoy.no":true,"xn--vry-yla5g.no":true,"vagan.no":true,"xn--vgan-qoa.no":true,"voagat.no":true,"vagsoy.no":true,"xn--vgsy-qoa0j.no":true,"vaga.no":true,"xn--vg-yiab.no":true,"valer.ostfold.no":true,"xn--vler-qoa.xn--stfold-9xa.no":true,"valer.hedmark.no":true,"xn--vler-qoa.hedmark.no":true,"*.np":true,"nr":true,"biz.nr":true,"info.nr":true,"gov.nr":true,"edu.nr":true,"org.nr":true,"net.nr":true,"com.nr":true,"nu":true,"nz":true,"ac.nz":true,"co.nz":true,"cri.nz":true,"geek.nz":true,"gen.nz":true,"govt.nz":true,"health.nz":true,"iwi.nz":true,"kiwi.nz":true,"maori.nz":true,"mil.nz":true,"xn--mori-qsa.nz":true,"net.nz":true,"org.nz":true,"parliament.nz":true,"school.nz":true,"om":true,"co.om":true,"com.om":true,"edu.om":true,"gov.om":true,"med.om":true,"museum.om":true,"net.om":true,"org.om":true,"pro.om":true,"onion":true,"org":true,"pa":true,"ac.pa":true,"gob.pa":true,"com.pa":true,"org.pa":true,"sld.pa":true,"edu.pa":true,"net.pa":true,"ing.pa":true,"abo.pa":true,"med.pa":true,"nom.pa":true,"pe":true,"edu.pe":true,"gob.pe":true,"nom.pe":true,"mil.pe":true,"org.pe":true,"com.pe":true,"net.pe":true,"pf":true,"com.pf":true,"org.pf":true,"edu.pf":true,"*.pg":true,"ph":true,"com.ph":true,"net.ph":true,"org.ph":true,"gov.ph":true,"edu.ph":true,"ngo.ph":true,"mil.ph":true,"i.ph":true,"pk":true,"com.pk":true,"net.pk":true,"edu.pk":true,"org.pk":true,"fam.pk":true,"biz.pk":true,"web.pk":true,"gov.pk":true,"gob.pk":true,"gok.pk":true,"gon.pk":true,"gop.pk":true,"gos.pk":true,"info.pk":true,"pl":true,"com.pl":true,"net.pl":true,"org.pl":true,"aid.pl":true,"agro.pl":true,"atm.pl":true,"auto.pl":true,"biz.pl":true,"edu.pl":true,"gmina.pl":true,"gsm.pl":true,"info.pl":true,"mail.pl":true,"miasta.pl":true,"media.pl":true,"mil.pl":true,"nieruchomosci.pl":true,"nom.pl":true,"pc.pl":true,"powiat.pl":true,"priv.pl":true,"realestate.pl":true,"rel.pl":true,"sex.pl":true,"shop.pl":true,"sklep.pl":true,"sos.pl":true,"szkola.pl":true,"targi.pl":true,"tm.pl":true,"tourism.pl":true,"travel.pl":true,"turystyka.pl":true,"gov.pl":true,"ap.gov.pl":true,"ic.gov.pl":true,"is.gov.pl":true,"us.gov.pl":true,"kmpsp.gov.pl":true,"kppsp.gov.pl":true,"kwpsp.gov.pl":true,"psp.gov.pl":true,"wskr.gov.pl":true,"kwp.gov.pl":true,"mw.gov.pl":true,"ug.gov.pl":true,"um.gov.pl":true,"umig.gov.pl":true,"ugim.gov.pl":true,"upow.gov.pl":true,"uw.gov.pl":true,"starostwo.gov.pl":true,"pa.gov.pl":true,"po.gov.pl":true,"psse.gov.pl":true,"pup.gov.pl":true,"rzgw.gov.pl":true,"sa.gov.pl":true,"so.gov.pl":true,"sr.gov.pl":true,"wsa.gov.pl":true,"sko.gov.pl":true,"uzs.gov.pl":true,"wiih.gov.pl":true,"winb.gov.pl":true,"pinb.gov.pl":true,"wios.gov.pl":true,"witd.gov.pl":true,"wzmiuw.gov.pl":true,"piw.gov.pl":true,"wiw.gov.pl":true,"griw.gov.pl":true,"wif.gov.pl":true,"oum.gov.pl":true,"sdn.gov.pl":true,"zp.gov.pl":true,"uppo.gov.pl":true,"mup.gov.pl":true,"wuoz.gov.pl":true,"konsulat.gov.pl":true,"oirm.gov.pl":true,"augustow.pl":true,"babia-gora.pl":true,"bedzin.pl":true,"beskidy.pl":true,"bialowieza.pl":true,"bialystok.pl":true,"bielawa.pl":true,"bieszczady.pl":true,"boleslawiec.pl":true,"bydgoszcz.pl":true,"bytom.pl":true,"cieszyn.pl":true,"czeladz.pl":true,"czest.pl":true,"dlugoleka.pl":true,"elblag.pl":true,"elk.pl":true,"glogow.pl":true,"gniezno.pl":true,"gorlice.pl":true,"grajewo.pl":true,"ilawa.pl":true,"jaworzno.pl":true,"jelenia-gora.pl":true,"jgora.pl":true,"kalisz.pl":true,"kazimierz-dolny.pl":true,"karpacz.pl":true,"kartuzy.pl":true,"kaszuby.pl":true,"katowice.pl":true,"kepno.pl":true,"ketrzyn.pl":true,"klodzko.pl":true,"kobierzyce.pl":true,"kolobrzeg.pl":true,"konin.pl":true,"konskowola.pl":true,"kutno.pl":true,"lapy.pl":true,"lebork.pl":true,"legnica.pl":true,"lezajsk.pl":true,"limanowa.pl":true,"lomza.pl":true,"lowicz.pl":true,"lubin.pl":true,"lukow.pl":true,"malbork.pl":true,"malopolska.pl":true,"mazowsze.pl":true,"mazury.pl":true,"mielec.pl":true,"mielno.pl":true,"mragowo.pl":true,"naklo.pl":true,"nowaruda.pl":true,"nysa.pl":true,"olawa.pl":true,"olecko.pl":true,"olkusz.pl":true,"olsztyn.pl":true,"opoczno.pl":true,"opole.pl":true,"ostroda.pl":true,"ostroleka.pl":true,"ostrowiec.pl":true,"ostrowwlkp.pl":true,"pila.pl":true,"pisz.pl":true,"podhale.pl":true,"podlasie.pl":true,"polkowice.pl":true,"pomorze.pl":true,"pomorskie.pl":true,"prochowice.pl":true,"pruszkow.pl":true,"przeworsk.pl":true,"pulawy.pl":true,"radom.pl":true,"rawa-maz.pl":true,"rybnik.pl":true,"rzeszow.pl":true,"sanok.pl":true,"sejny.pl":true,"slask.pl":true,"slupsk.pl":true,"sosnowiec.pl":true,"stalowa-wola.pl":true,"skoczow.pl":true,"starachowice.pl":true,"stargard.pl":true,"suwalki.pl":true,"swidnica.pl":true,"swiebodzin.pl":true,"swinoujscie.pl":true,"szczecin.pl":true,"szczytno.pl":true,"tarnobrzeg.pl":true,"tgory.pl":true,"turek.pl":true,"tychy.pl":true,"ustka.pl":true,"walbrzych.pl":true,"warmia.pl":true,"warszawa.pl":true,"waw.pl":true,"wegrow.pl":true,"wielun.pl":true,"wlocl.pl":true,"wloclawek.pl":true,"wodzislaw.pl":true,"wolomin.pl":true,"wroclaw.pl":true,"zachpomor.pl":true,"zagan.pl":true,"zarow.pl":true,"zgora.pl":true,"zgorzelec.pl":true,"pm":true,"pn":true,"gov.pn":true,"co.pn":true,"org.pn":true,"edu.pn":true,"net.pn":true,"post":true,"pr":true,"com.pr":true,"net.pr":true,"org.pr":true,"gov.pr":true,"edu.pr":true,"isla.pr":true,"pro.pr":true,"biz.pr":true,"info.pr":true,"name.pr":true,"est.pr":true,"prof.pr":true,"ac.pr":true,"pro":true,"aaa.pro":true,"aca.pro":true,"acct.pro":true,"avocat.pro":true,"bar.pro":true,"cpa.pro":true,"eng.pro":true,"jur.pro":true,"law.pro":true,"med.pro":true,"recht.pro":true,"ps":true,"edu.ps":true,"gov.ps":true,"sec.ps":true,"plo.ps":true,"com.ps":true,"org.ps":true,"net.ps":true,"pt":true,"net.pt":true,"gov.pt":true,"org.pt":true,"edu.pt":true,"int.pt":true,"publ.pt":true,"com.pt":true,"nome.pt":true,"pw":true,"co.pw":true,"ne.pw":true,"or.pw":true,"ed.pw":true,"go.pw":true,"belau.pw":true,"py":true,"com.py":true,"coop.py":true,"edu.py":true,"gov.py":true,"mil.py":true,"net.py":true,"org.py":true,"qa":true,"com.qa":true,"edu.qa":true,"gov.qa":true,"mil.qa":true,"name.qa":true,"net.qa":true,"org.qa":true,"sch.qa":true,"re":true,"asso.re":true,"com.re":true,"nom.re":true,"ro":true,"arts.ro":true,"com.ro":true,"firm.ro":true,"info.ro":true,"nom.ro":true,"nt.ro":true,"org.ro":true,"rec.ro":true,"store.ro":true,"tm.ro":true,"www.ro":true,"rs":true,"ac.rs":true,"co.rs":true,"edu.rs":true,"gov.rs":true,"in.rs":true,"org.rs":true,"ru":true,"ac.ru":true,"edu.ru":true,"gov.ru":true,"int.ru":true,"mil.ru":true,"test.ru":true,"rw":true,"gov.rw":true,"net.rw":true,"edu.rw":true,"ac.rw":true,"com.rw":true,"co.rw":true,"int.rw":true,"mil.rw":true,"gouv.rw":true,"sa":true,"com.sa":true,"net.sa":true,"org.sa":true,"gov.sa":true,"med.sa":true,"pub.sa":true,"edu.sa":true,"sch.sa":true,"sb":true,"com.sb":true,"edu.sb":true,"gov.sb":true,"net.sb":true,"org.sb":true,"sc":true,"com.sc":true,"gov.sc":true,"net.sc":true,"org.sc":true,"edu.sc":true,"sd":true,"com.sd":true,"net.sd":true,"org.sd":true,"edu.sd":true,"med.sd":true,"tv.sd":true,"gov.sd":true,"info.sd":true,"se":true,"a.se":true,"ac.se":true,"b.se":true,"bd.se":true,"brand.se":true,"c.se":true,"d.se":true,"e.se":true,"f.se":true,"fh.se":true,"fhsk.se":true,"fhv.se":true,"g.se":true,"h.se":true,"i.se":true,"k.se":true,"komforb.se":true,"kommunalforbund.se":true,"komvux.se":true,"l.se":true,"lanbib.se":true,"m.se":true,"n.se":true,"naturbruksgymn.se":true,"o.se":true,"org.se":true,"p.se":true,"parti.se":true,"pp.se":true,"press.se":true,"r.se":true,"s.se":true,"t.se":true,"tm.se":true,"u.se":true,"w.se":true,"x.se":true,"y.se":true,"z.se":true,"sg":true,"com.sg":true,"net.sg":true,"org.sg":true,"gov.sg":true,"edu.sg":true,"per.sg":true,"sh":true,"com.sh":true,"net.sh":true,"gov.sh":true,"org.sh":true,"mil.sh":true,"si":true,"sj":true,"sk":true,"sl":true,"com.sl":true,"net.sl":true,"edu.sl":true,"gov.sl":true,"org.sl":true,"sm":true,"sn":true,"art.sn":true,"com.sn":true,"edu.sn":true,"gouv.sn":true,"org.sn":true,"perso.sn":true,"univ.sn":true,"so":true,"com.so":true,"net.so":true,"org.so":true,"sr":true,"st":true,"co.st":true,"com.st":true,"consulado.st":true,"edu.st":true,"embaixada.st":true,"gov.st":true,"mil.st":true,"net.st":true,"org.st":true,"principe.st":true,"saotome.st":true,"store.st":true,"su":true,"sv":true,"com.sv":true,"edu.sv":true,"gob.sv":true,"org.sv":true,"red.sv":true,"sx":true,"gov.sx":true,"sy":true,"edu.sy":true,"gov.sy":true,"net.sy":true,"mil.sy":true,"com.sy":true,"org.sy":true,"sz":true,"co.sz":true,"ac.sz":true,"org.sz":true,"tc":true,"td":true,"tel":true,"tf":true,"tg":true,"th":true,"ac.th":true,"co.th":true,"go.th":true,"in.th":true,"mi.th":true,"net.th":true,"or.th":true,"tj":true,"ac.tj":true,"biz.tj":true,"co.tj":true,"com.tj":true,"edu.tj":true,"go.tj":true,"gov.tj":true,"int.tj":true,"mil.tj":true,"name.tj":true,"net.tj":true,"nic.tj":true,"org.tj":true,"test.tj":true,"web.tj":true,"tk":true,"tl":true,"gov.tl":true,"tm":true,"com.tm":true,"co.tm":true,"org.tm":true,"net.tm":true,"nom.tm":true,"gov.tm":true,"mil.tm":true,"edu.tm":true,"tn":true,"com.tn":true,"ens.tn":true,"fin.tn":true,"gov.tn":true,"ind.tn":true,"intl.tn":true,"nat.tn":true,"net.tn":true,"org.tn":true,"info.tn":true,"perso.tn":true,"tourism.tn":true,"edunet.tn":true,"rnrt.tn":true,"rns.tn":true,"rnu.tn":true,"mincom.tn":true,"agrinet.tn":true,"defense.tn":true,"turen.tn":true,"to":true,"com.to":true,"gov.to":true,"net.to":true,"org.to":true,"edu.to":true,"mil.to":true,"tr":true,"com.tr":true,"info.tr":true,"biz.tr":true,"net.tr":true,"org.tr":true,"web.tr":true,"gen.tr":true,"tv.tr":true,"av.tr":true,"dr.tr":true,"bbs.tr":true,"name.tr":true,"tel.tr":true,"gov.tr":true,"bel.tr":true,"pol.tr":true,"mil.tr":true,"k12.tr":true,"edu.tr":true,"kep.tr":true,"nc.tr":true,"gov.nc.tr":true,"travel":true,"tt":true,"co.tt":true,"com.tt":true,"org.tt":true,"net.tt":true,"biz.tt":true,"info.tt":true,"pro.tt":true,"int.tt":true,"coop.tt":true,"jobs.tt":true,"mobi.tt":true,"travel.tt":true,"museum.tt":true,"aero.tt":true,"name.tt":true,"gov.tt":true,"edu.tt":true,"tv":true,"tw":true,"edu.tw":true,"gov.tw":true,"mil.tw":true,"com.tw":true,"net.tw":true,"org.tw":true,"idv.tw":true,"game.tw":true,"ebiz.tw":true,"club.tw":true,"xn--zf0ao64a.tw":true,"xn--uc0atv.tw":true,"xn--czrw28b.tw":true,"tz":true,"ac.tz":true,"co.tz":true,"go.tz":true,"hotel.tz":true,"info.tz":true,"me.tz":true,"mil.tz":true,"mobi.tz":true,"ne.tz":true,"or.tz":true,"sc.tz":true,"tv.tz":true,"ua":true,"com.ua":true,"edu.ua":true,"gov.ua":true,"in.ua":true,"net.ua":true,"org.ua":true,"cherkassy.ua":true,"cherkasy.ua":true,"chernigov.ua":true,"chernihiv.ua":true,"chernivtsi.ua":true,"chernovtsy.ua":true,"ck.ua":true,"cn.ua":true,"cr.ua":true,"crimea.ua":true,"cv.ua":true,"dn.ua":true,"dnepropetrovsk.ua":true,"dnipropetrovsk.ua":true,"dominic.ua":true,"donetsk.ua":true,"dp.ua":true,"if.ua":true,"ivano-frankivsk.ua":true,"kh.ua":true,"kharkiv.ua":true,"kharkov.ua":true,"kherson.ua":true,"khmelnitskiy.ua":true,"khmelnytskyi.ua":true,"kiev.ua":true,"kirovograd.ua":true,"km.ua":true,"kr.ua":true,"krym.ua":true,"ks.ua":true,"kv.ua":true,"kyiv.ua":true,"lg.ua":true,"lt.ua":true,"lugansk.ua":true,"lutsk.ua":true,"lv.ua":true,"lviv.ua":true,"mk.ua":true,"mykolaiv.ua":true,"nikolaev.ua":true,"od.ua":true,"odesa.ua":true,"odessa.ua":true,"pl.ua":true,"poltava.ua":true,"rivne.ua":true,"rovno.ua":true,"rv.ua":true,"sb.ua":true,"sebastopol.ua":true,"sevastopol.ua":true,"sm.ua":true,"sumy.ua":true,"te.ua":true,"ternopil.ua":true,"uz.ua":true,"uzhgorod.ua":true,"vinnica.ua":true,"vinnytsia.ua":true,"vn.ua":true,"volyn.ua":true,"yalta.ua":true,"zaporizhzhe.ua":true,"zaporizhzhia.ua":true,"zhitomir.ua":true,"zhytomyr.ua":true,"zp.ua":true,"zt.ua":true,"ug":true,"co.ug":true,"or.ug":true,"ac.ug":true,"sc.ug":true,"go.ug":true,"ne.ug":true,"com.ug":true,"org.ug":true,"uk":true,"ac.uk":true,"co.uk":true,"gov.uk":true,"ltd.uk":true,"me.uk":true,"net.uk":true,"nhs.uk":true,"org.uk":true,"plc.uk":true,"police.uk":true,"*.sch.uk":true,"us":true,"dni.us":true,"fed.us":true,"isa.us":true,"kids.us":true,"nsn.us":true,"ak.us":true,"al.us":true,"ar.us":true,"as.us":true,"az.us":true,"ca.us":true,"co.us":true,"ct.us":true,"dc.us":true,"de.us":true,"fl.us":true,"ga.us":true,"gu.us":true,"hi.us":true,"ia.us":true,"id.us":true,"il.us":true,"in.us":true,"ks.us":true,"ky.us":true,"la.us":true,"ma.us":true,"md.us":true,"me.us":true,"mi.us":true,"mn.us":true,"mo.us":true,"ms.us":true,"mt.us":true,"nc.us":true,"nd.us":true,"ne.us":true,"nh.us":true,"nj.us":true,"nm.us":true,"nv.us":true,"ny.us":true,"oh.us":true,"ok.us":true,"or.us":true,"pa.us":true,"pr.us":true,"ri.us":true,"sc.us":true,"sd.us":true,"tn.us":true,"tx.us":true,"ut.us":true,"vi.us":true,"vt.us":true,"va.us":true,"wa.us":true,"wi.us":true,"wv.us":true,"wy.us":true,"k12.ak.us":true,"k12.al.us":true,"k12.ar.us":true,"k12.as.us":true,"k12.az.us":true,"k12.ca.us":true,"k12.co.us":true,"k12.ct.us":true,"k12.dc.us":true,"k12.de.us":true,"k12.fl.us":true,"k12.ga.us":true,"k12.gu.us":true,"k12.ia.us":true,"k12.id.us":true,"k12.il.us":true,"k12.in.us":true,"k12.ks.us":true,"k12.ky.us":true,"k12.la.us":true,"k12.ma.us":true,"k12.md.us":true,"k12.me.us":true,"k12.mi.us":true,"k12.mn.us":true,"k12.mo.us":true,"k12.ms.us":true,"k12.mt.us":true,"k12.nc.us":true,"k12.ne.us":true,"k12.nh.us":true,"k12.nj.us":true,"k12.nm.us":true,"k12.nv.us":true,"k12.ny.us":true,"k12.oh.us":true,"k12.ok.us":true,"k12.or.us":true,"k12.pa.us":true,"k12.pr.us":true,"k12.ri.us":true,"k12.sc.us":true,"k12.tn.us":true,"k12.tx.us":true,"k12.ut.us":true,"k12.vi.us":true,"k12.vt.us":true,"k12.va.us":true,"k12.wa.us":true,"k12.wi.us":true,"k12.wy.us":true,"cc.ak.us":true,"cc.al.us":true,"cc.ar.us":true,"cc.as.us":true,"cc.az.us":true,"cc.ca.us":true,"cc.co.us":true,"cc.ct.us":true,"cc.dc.us":true,"cc.de.us":true,"cc.fl.us":true,"cc.ga.us":true,"cc.gu.us":true,"cc.hi.us":true,"cc.ia.us":true,"cc.id.us":true,"cc.il.us":true,"cc.in.us":true,"cc.ks.us":true,"cc.ky.us":true,"cc.la.us":true,"cc.ma.us":true,"cc.md.us":true,"cc.me.us":true,"cc.mi.us":true,"cc.mn.us":true,"cc.mo.us":true,"cc.ms.us":true,"cc.mt.us":true,"cc.nc.us":true,"cc.nd.us":true,"cc.ne.us":true,"cc.nh.us":true,"cc.nj.us":true,"cc.nm.us":true,"cc.nv.us":true,"cc.ny.us":true,"cc.oh.us":true,"cc.ok.us":true,"cc.or.us":true,"cc.pa.us":true,"cc.pr.us":true,"cc.ri.us":true,"cc.sc.us":true,"cc.sd.us":true,"cc.tn.us":true,"cc.tx.us":true,"cc.ut.us":true,"cc.vi.us":true,"cc.vt.us":true,"cc.va.us":true,"cc.wa.us":true,"cc.wi.us":true,"cc.wv.us":true,"cc.wy.us":true,"lib.ak.us":true,"lib.al.us":true,"lib.ar.us":true,"lib.as.us":true,"lib.az.us":true,"lib.ca.us":true,"lib.co.us":true,"lib.ct.us":true,"lib.dc.us":true,"lib.fl.us":true,"lib.ga.us":true,"lib.gu.us":true,"lib.hi.us":true,"lib.ia.us":true,"lib.id.us":true,"lib.il.us":true,"lib.in.us":true,"lib.ks.us":true,"lib.ky.us":true,"lib.la.us":true,"lib.ma.us":true,"lib.md.us":true,"lib.me.us":true,"lib.mi.us":true,"lib.mn.us":true,"lib.mo.us":true,"lib.ms.us":true,"lib.mt.us":true,"lib.nc.us":true,"lib.nd.us":true,"lib.ne.us":true,"lib.nh.us":true,"lib.nj.us":true,"lib.nm.us":true,"lib.nv.us":true,"lib.ny.us":true,"lib.oh.us":true,"lib.ok.us":true,"lib.or.us":true,"lib.pa.us":true,"lib.pr.us":true,"lib.ri.us":true,"lib.sc.us":true,"lib.sd.us":true,"lib.tn.us":true,"lib.tx.us":true,"lib.ut.us":true,"lib.vi.us":true,"lib.vt.us":true,"lib.va.us":true,"lib.wa.us":true,"lib.wi.us":true,"lib.wy.us":true,"pvt.k12.ma.us":true,"chtr.k12.ma.us":true,"paroch.k12.ma.us":true,"ann-arbor.mi.us":true,"cog.mi.us":true,"dst.mi.us":true,"eaton.mi.us":true,"gen.mi.us":true,"mus.mi.us":true,"tec.mi.us":true,"washtenaw.mi.us":true,"uy":true,"com.uy":true,"edu.uy":true,"gub.uy":true,"mil.uy":true,"net.uy":true,"org.uy":true,"uz":true,"co.uz":true,"com.uz":true,"net.uz":true,"org.uz":true,"va":true,"vc":true,"com.vc":true,"net.vc":true,"org.vc":true,"gov.vc":true,"mil.vc":true,"edu.vc":true,"ve":true,"arts.ve":true,"co.ve":true,"com.ve":true,"e12.ve":true,"edu.ve":true,"firm.ve":true,"gob.ve":true,"gov.ve":true,"info.ve":true,"int.ve":true,"mil.ve":true,"net.ve":true,"org.ve":true,"rec.ve":true,"store.ve":true,"tec.ve":true,"web.ve":true,"vg":true,"vi":true,"co.vi":true,"com.vi":true,"k12.vi":true,"net.vi":true,"org.vi":true,"vn":true,"com.vn":true,"net.vn":true,"org.vn":true,"edu.vn":true,"gov.vn":true,"int.vn":true,"ac.vn":true,"biz.vn":true,"info.vn":true,"name.vn":true,"pro.vn":true,"health.vn":true,"vu":true,"com.vu":true,"edu.vu":true,"net.vu":true,"org.vu":true,"wf":true,"ws":true,"com.ws":true,"net.ws":true,"org.ws":true,"gov.ws":true,"edu.ws":true,"yt":true,"xn--mgbaam7a8h":true,"xn--y9a3aq":true,"xn--54b7fta0cc":true,"xn--90ae":true,"xn--90ais":true,"xn--fiqs8s":true,"xn--fiqz9s":true,"xn--lgbbat1ad8j":true,"xn--wgbh1c":true,"xn--e1a4c":true,"xn--node":true,"xn--qxam":true,"xn--j6w193g":true,"xn--2scrj9c":true,"xn--3hcrj9c":true,"xn--45br5cyl":true,"xn--h2breg3eve":true,"xn--h2brj9c8c":true,"xn--mgbgu82a":true,"xn--rvc1e0am3e":true,"xn--h2brj9c":true,"xn--mgbbh1a71e":true,"xn--fpcrj9c3d":true,"xn--gecrj9c":true,"xn--s9brj9c":true,"xn--45brj9c":true,"xn--xkc2dl3a5ee0h":true,"xn--mgba3a4f16a":true,"xn--mgba3a4fra":true,"xn--mgbtx2b":true,"xn--mgbayh7gpa":true,"xn--3e0b707e":true,"xn--80ao21a":true,"xn--fzc2c9e2c":true,"xn--xkc2al3hye2a":true,"xn--mgbc0a9azcg":true,"xn--d1alf":true,"xn--l1acc":true,"xn--mix891f":true,"xn--mix082f":true,"xn--mgbx4cd0ab":true,"xn--mgb9awbf":true,"xn--mgbai9azgqp6j":true,"xn--mgbai9a5eva00b":true,"xn--ygbi2ammx":true,"xn--90a3ac":true,"xn--o1ac.xn--90a3ac":true,"xn--c1avg.xn--90a3ac":true,"xn--90azh.xn--90a3ac":true,"xn--d1at.xn--90a3ac":true,"xn--o1ach.xn--90a3ac":true,"xn--80au.xn--90a3ac":true,"xn--p1ai":true,"xn--wgbl6a":true,"xn--mgberp4a5d4ar":true,"xn--mgberp4a5d4a87g":true,"xn--mgbqly7c0a67fbc":true,"xn--mgbqly7cvafr":true,"xn--mgbpl2fh":true,"xn--yfro4i67o":true,"xn--clchc0ea0b2g2a9gcd":true,"xn--ogbpf8fl":true,"xn--mgbtf8fl":true,"xn--o3cw4h":true,"xn--12c1fe0br.xn--o3cw4h":true,"xn--12co0c3b4eva.xn--o3cw4h":true,"xn--h3cuzk1di.xn--o3cw4h":true,"xn--o3cyx2a.xn--o3cw4h":true,"xn--m3ch0j3a.xn--o3cw4h":true,"xn--12cfi8ixb8l.xn--o3cw4h":true,"xn--pgbs0dh":true,"xn--kpry57d":true,"xn--kprw13d":true,"xn--nnx388a":true,"xn--j1amh":true,"xn--mgb2ddes":true,"xxx":true,"*.ye":true,"ac.za":true,"agric.za":true,"alt.za":true,"co.za":true,"edu.za":true,"gov.za":true,"grondar.za":true,"law.za":true,"mil.za":true,"net.za":true,"ngo.za":true,"nis.za":true,"nom.za":true,"org.za":true,"school.za":true,"tm.za":true,"web.za":true,"zm":true,"ac.zm":true,"biz.zm":true,"co.zm":true,"com.zm":true,"edu.zm":true,"gov.zm":true,"info.zm":true,"mil.zm":true,"net.zm":true,"org.zm":true,"sch.zm":true,"zw":true,"ac.zw":true,"co.zw":true,"gov.zw":true,"mil.zw":true,"org.zw":true,"aaa":true,"aarp":true,"abarth":true,"abb":true,"abbott":true,"abbvie":true,"abc":true,"able":true,"abogado":true,"abudhabi":true,"academy":true,"accenture":true,"accountant":true,"accountants":true,"aco":true,"active":true,"actor":true,"adac":true,"ads":true,"adult":true,"aeg":true,"aetna":true,"afamilycompany":true,"afl":true,"africa":true,"agakhan":true,"agency":true,"aig":true,"aigo":true,"airbus":true,"airforce":true,"airtel":true,"akdn":true,"alfaromeo":true,"alibaba":true,"alipay":true,"allfinanz":true,"allstate":true,"ally":true,"alsace":true,"alstom":true,"americanexpress":true,"americanfamily":true,"amex":true,"amfam":true,"amica":true,"amsterdam":true,"analytics":true,"android":true,"anquan":true,"anz":true,"aol":true,"apartments":true,"app":true,"apple":true,"aquarelle":true,"arab":true,"aramco":true,"archi":true,"army":true,"art":true,"arte":true,"asda":true,"associates":true,"athleta":true,"attorney":true,"auction":true,"audi":true,"audible":true,"audio":true,"auspost":true,"author":true,"auto":true,"autos":true,"avianca":true,"aws":true,"axa":true,"azure":true,"baby":true,"baidu":true,"banamex":true,"bananarepublic":true,"band":true,"bank":true,"bar":true,"barcelona":true,"barclaycard":true,"barclays":true,"barefoot":true,"bargains":true,"baseball":true,"basketball":true,"bauhaus":true,"bayern":true,"bbc":true,"bbt":true,"bbva":true,"bcg":true,"bcn":true,"beats":true,"beauty":true,"beer":true,"bentley":true,"berlin":true,"best":true,"bestbuy":true,"bet":true,"bharti":true,"bible":true,"bid":true,"bike":true,"bing":true,"bingo":true,"bio":true,"black":true,"blackfriday":true,"blanco":true,"blockbuster":true,"blog":true,"bloomberg":true,"blue":true,"bms":true,"bmw":true,"bnl":true,"bnpparibas":true,"boats":true,"boehringer":true,"bofa":true,"bom":true,"bond":true,"boo":true,"book":true,"booking":true,"boots":true,"bosch":true,"bostik":true,"boston":true,"bot":true,"boutique":true,"box":true,"bradesco":true,"bridgestone":true,"broadway":true,"broker":true,"brother":true,"brussels":true,"budapest":true,"bugatti":true,"build":true,"builders":true,"business":true,"buy":true,"buzz":true,"bzh":true,"cab":true,"cafe":true,"cal":true,"call":true,"calvinklein":true,"cam":true,"camera":true,"camp":true,"cancerresearch":true,"canon":true,"capetown":true,"capital":true,"capitalone":true,"car":true,"caravan":true,"cards":true,"care":true,"career":true,"careers":true,"cars":true,"cartier":true,"casa":true,"case":true,"caseih":true,"cash":true,"casino":true,"catering":true,"catholic":true,"cba":true,"cbn":true,"cbre":true,"cbs":true,"ceb":true,"center":true,"ceo":true,"cern":true,"cfa":true,"cfd":true,"chanel":true,"channel":true,"chase":true,"chat":true,"cheap":true,"chintai":true,"christmas":true,"chrome":true,"chrysler":true,"church":true,"cipriani":true,"circle":true,"cisco":true,"citadel":true,"citi":true,"citic":true,"city":true,"cityeats":true,"claims":true,"cleaning":true,"click":true,"clinic":true,"clinique":true,"clothing":true,"cloud":true,"club":true,"clubmed":true,"coach":true,"codes":true,"coffee":true,"college":true,"cologne":true,"comcast":true,"commbank":true,"community":true,"company":true,"compare":true,"computer":true,"comsec":true,"condos":true,"construction":true,"consulting":true,"contact":true,"contractors":true,"cooking":true,"cookingchannel":true,"cool":true,"corsica":true,"country":true,"coupon":true,"coupons":true,"courses":true,"credit":true,"creditcard":true,"creditunion":true,"cricket":true,"crown":true,"crs":true,"cruise":true,"cruises":true,"csc":true,"cuisinella":true,"cymru":true,"cyou":true,"dabur":true,"dad":true,"dance":true,"data":true,"date":true,"dating":true,"datsun":true,"day":true,"dclk":true,"dds":true,"deal":true,"dealer":true,"deals":true,"degree":true,"delivery":true,"dell":true,"deloitte":true,"delta":true,"democrat":true,"dental":true,"dentist":true,"desi":true,"design":true,"dev":true,"dhl":true,"diamonds":true,"diet":true,"digital":true,"direct":true,"directory":true,"discount":true,"discover":true,"dish":true,"diy":true,"dnp":true,"docs":true,"doctor":true,"dodge":true,"dog":true,"doha":true,"domains":true,"dot":true,"download":true,"drive":true,"dtv":true,"dubai":true,"duck":true,"dunlop":true,"duns":true,"dupont":true,"durban":true,"dvag":true,"dvr":true,"earth":true,"eat":true,"eco":true,"edeka":true,"education":true,"email":true,"emerck":true,"energy":true,"engineer":true,"engineering":true,"enterprises":true,"epost":true,"epson":true,"equipment":true,"ericsson":true,"erni":true,"esq":true,"estate":true,"esurance":true,"etisalat":true,"eurovision":true,"eus":true,"events":true,"everbank":true,"exchange":true,"expert":true,"exposed":true,"express":true,"extraspace":true,"fage":true,"fail":true,"fairwinds":true,"faith":true,"family":true,"fan":true,"fans":true,"farm":true,"farmers":true,"fashion":true,"fast":true,"fedex":true,"feedback":true,"ferrari":true,"ferrero":true,"fiat":true,"fidelity":true,"fido":true,"film":true,"final":true,"finance":true,"financial":true,"fire":true,"firestone":true,"firmdale":true,"fish":true,"fishing":true,"fit":true,"fitness":true,"flickr":true,"flights":true,"flir":true,"florist":true,"flowers":true,"fly":true,"foo":true,"food":true,"foodnetwork":true,"football":true,"ford":true,"forex":true,"forsale":true,"forum":true,"foundation":true,"fox":true,"free":true,"fresenius":true,"frl":true,"frogans":true,"frontdoor":true,"frontier":true,"ftr":true,"fujitsu":true,"fujixerox":true,"fun":true,"fund":true,"furniture":true,"futbol":true,"fyi":true,"gal":true,"gallery":true,"gallo":true,"gallup":true,"game":true,"games":true,"gap":true,"garden":true,"gbiz":true,"gdn":true,"gea":true,"gent":true,"genting":true,"george":true,"ggee":true,"gift":true,"gifts":true,"gives":true,"giving":true,"glade":true,"glass":true,"gle":true,"global":true,"globo":true,"gmail":true,"gmbh":true,"gmo":true,"gmx":true,"godaddy":true,"gold":true,"goldpoint":true,"golf":true,"goo":true,"goodhands":true,"goodyear":true,"goog":true,"google":true,"gop":true,"got":true,"grainger":true,"graphics":true,"gratis":true,"green":true,"gripe":true,"grocery":true,"group":true,"guardian":true,"gucci":true,"guge":true,"guide":true,"guitars":true,"guru":true,"hair":true,"hamburg":true,"hangout":true,"haus":true,"hbo":true,"hdfc":true,"hdfcbank":true,"health":true,"healthcare":true,"help":true,"helsinki":true,"here":true,"hermes":true,"hgtv":true,"hiphop":true,"hisamitsu":true,"hitachi":true,"hiv":true,"hkt":true,"hockey":true,"holdings":true,"holiday":true,"homedepot":true,"homegoods":true,"homes":true,"homesense":true,"honda":true,"honeywell":true,"horse":true,"hospital":true,"host":true,"hosting":true,"hot":true,"hoteles":true,"hotels":true,"hotmail":true,"house":true,"how":true,"hsbc":true,"hughes":true,"hyatt":true,"hyundai":true,"ibm":true,"icbc":true,"ice":true,"icu":true,"ieee":true,"ifm":true,"ikano":true,"imamat":true,"imdb":true,"immo":true,"immobilien":true,"industries":true,"infiniti":true,"ing":true,"ink":true,"institute":true,"insurance":true,"insure":true,"intel":true,"international":true,"intuit":true,"investments":true,"ipiranga":true,"irish":true,"iselect":true,"ismaili":true,"ist":true,"istanbul":true,"itau":true,"itv":true,"iveco":true,"iwc":true,"jaguar":true,"java":true,"jcb":true,"jcp":true,"jeep":true,"jetzt":true,"jewelry":true,"jio":true,"jlc":true,"jll":true,"jmp":true,"jnj":true,"joburg":true,"jot":true,"joy":true,"jpmorgan":true,"jprs":true,"juegos":true,"juniper":true,"kaufen":true,"kddi":true,"kerryhotels":true,"kerrylogistics":true,"kerryproperties":true,"kfh":true,"kia":true,"kim":true,"kinder":true,"kindle":true,"kitchen":true,"kiwi":true,"koeln":true,"komatsu":true,"kosher":true,"kpmg":true,"kpn":true,"krd":true,"kred":true,"kuokgroup":true,"kyoto":true,"lacaixa":true,"ladbrokes":true,"lamborghini":true,"lamer":true,"lancaster":true,"lancia":true,"lancome":true,"land":true,"landrover":true,"lanxess":true,"lasalle":true,"lat":true,"latino":true,"latrobe":true,"law":true,"lawyer":true,"lds":true,"lease":true,"leclerc":true,"lefrak":true,"legal":true,"lego":true,"lexus":true,"lgbt":true,"liaison":true,"lidl":true,"life":true,"lifeinsurance":true,"lifestyle":true,"lighting":true,"like":true,"lilly":true,"limited":true,"limo":true,"lincoln":true,"linde":true,"link":true,"lipsy":true,"live":true,"living":true,"lixil":true,"loan":true,"loans":true,"locker":true,"locus":true,"loft":true,"lol":true,"london":true,"lotte":true,"lotto":true,"love":true,"lpl":true,"lplfinancial":true,"ltd":true,"ltda":true,"lundbeck":true,"lupin":true,"luxe":true,"luxury":true,"macys":true,"madrid":true,"maif":true,"maison":true,"makeup":true,"man":true,"management":true,"mango":true,"map":true,"market":true,"marketing":true,"markets":true,"marriott":true,"marshalls":true,"maserati":true,"mattel":true,"mba":true,"mckinsey":true,"med":true,"media":true,"meet":true,"melbourne":true,"meme":true,"memorial":true,"men":true,"menu":true,"meo":true,"merckmsd":true,"metlife":true,"miami":true,"microsoft":true,"mini":true,"mint":true,"mit":true,"mitsubishi":true,"mlb":true,"mls":true,"mma":true,"mobile":true,"mobily":true,"moda":true,"moe":true,"moi":true,"mom":true,"monash":true,"money":true,"monster":true,"mopar":true,"mormon":true,"mortgage":true,"moscow":true,"moto":true,"motorcycles":true,"mov":true,"movie":true,"movistar":true,"msd":true,"mtn":true,"mtpc":true,"mtr":true,"mutual":true,"nab":true,"nadex":true,"nagoya":true,"nationwide":true,"natura":true,"navy":true,"nba":true,"nec":true,"netbank":true,"netflix":true,"network":true,"neustar":true,"new":true,"newholland":true,"news":true,"next":true,"nextdirect":true,"nexus":true,"nfl":true,"ngo":true,"nhk":true,"nico":true,"nike":true,"nikon":true,"ninja":true,"nissan":true,"nissay":true,"nokia":true,"northwesternmutual":true,"norton":true,"now":true,"nowruz":true,"nowtv":true,"nra":true,"nrw":true,"ntt":true,"nyc":true,"obi":true,"observer":true,"off":true,"office":true,"okinawa":true,"olayan":true,"olayangroup":true,"oldnavy":true,"ollo":true,"omega":true,"one":true,"ong":true,"onl":true,"online":true,"onyourside":true,"ooo":true,"open":true,"oracle":true,"orange":true,"organic":true,"origins":true,"osaka":true,"otsuka":true,"ott":true,"ovh":true,"page":true,"panasonic":true,"panerai":true,"paris":true,"pars":true,"partners":true,"parts":true,"party":true,"passagens":true,"pay":true,"pccw":true,"pet":true,"pfizer":true,"pharmacy":true,"phd":true,"philips":true,"phone":true,"photo":true,"photography":true,"photos":true,"physio":true,"piaget":true,"pics":true,"pictet":true,"pictures":true,"pid":true,"pin":true,"ping":true,"pink":true,"pioneer":true,"pizza":true,"place":true,"play":true,"playstation":true,"plumbing":true,"plus":true,"pnc":true,"pohl":true,"poker":true,"politie":true,"porn":true,"pramerica":true,"praxi":true,"press":true,"prime":true,"prod":true,"productions":true,"prof":true,"progressive":true,"promo":true,"properties":true,"property":true,"protection":true,"pru":true,"prudential":true,"pub":true,"pwc":true,"qpon":true,"quebec":true,"quest":true,"qvc":true,"racing":true,"radio":true,"raid":true,"read":true,"realestate":true,"realtor":true,"realty":true,"recipes":true,"red":true,"redstone":true,"redumbrella":true,"rehab":true,"reise":true,"reisen":true,"reit":true,"reliance":true,"ren":true,"rent":true,"rentals":true,"repair":true,"report":true,"republican":true,"rest":true,"restaurant":true,"review":true,"reviews":true,"rexroth":true,"rich":true,"richardli":true,"ricoh":true,"rightathome":true,"ril":true,"rio":true,"rip":true,"rmit":true,"rocher":true,"rocks":true,"rodeo":true,"rogers":true,"room":true,"rsvp":true,"rugby":true,"ruhr":true,"run":true,"rwe":true,"ryukyu":true,"saarland":true,"safe":true,"safety":true,"sakura":true,"sale":true,"salon":true,"samsclub":true,"samsung":true,"sandvik":true,"sandvikcoromant":true,"sanofi":true,"sap":true,"sapo":true,"sarl":true,"sas":true,"save":true,"saxo":true,"sbi":true,"sbs":true,"sca":true,"scb":true,"schaeffler":true,"schmidt":true,"scholarships":true,"school":true,"schule":true,"schwarz":true,"science":true,"scjohnson":true,"scor":true,"scot":true,"search":true,"seat":true,"secure":true,"security":true,"seek":true,"select":true,"sener":true,"services":true,"ses":true,"seven":true,"sew":true,"sex":true,"sexy":true,"sfr":true,"shangrila":true,"sharp":true,"shaw":true,"shell":true,"shia":true,"shiksha":true,"shoes":true,"shop":true,"shopping":true,"shouji":true,"show":true,"showtime":true,"shriram":true,"silk":true,"sina":true,"singles":true,"site":true,"ski":true,"skin":true,"sky":true,"skype":true,"sling":true,"smart":true,"smile":true,"sncf":true,"soccer":true,"social":true,"softbank":true,"software":true,"sohu":true,"solar":true,"solutions":true,"song":true,"sony":true,"soy":true,"space":true,"spiegel":true,"spot":true,"spreadbetting":true,"srl":true,"srt":true,"stada":true,"staples":true,"star":true,"starhub":true,"statebank":true,"statefarm":true,"statoil":true,"stc":true,"stcgroup":true,"stockholm":true,"storage":true,"store":true,"stream":true,"studio":true,"study":true,"style":true,"sucks":true,"supplies":true,"supply":true,"support":true,"surf":true,"surgery":true,"suzuki":true,"swatch":true,"swiftcover":true,"swiss":true,"sydney":true,"symantec":true,"systems":true,"tab":true,"taipei":true,"talk":true,"taobao":true,"target":true,"tatamotors":true,"tatar":true,"tattoo":true,"tax":true,"taxi":true,"tci":true,"tdk":true,"team":true,"tech":true,"technology":true,"telecity":true,"telefonica":true,"temasek":true,"tennis":true,"teva":true,"thd":true,"theater":true,"theatre":true,"tiaa":true,"tickets":true,"tienda":true,"tiffany":true,"tips":true,"tires":true,"tirol":true,"tjmaxx":true,"tjx":true,"tkmaxx":true,"tmall":true,"today":true,"tokyo":true,"tools":true,"top":true,"toray":true,"toshiba":true,"total":true,"tours":true,"town":true,"toyota":true,"toys":true,"trade":true,"trading":true,"training":true,"travelchannel":true,"travelers":true,"travelersinsurance":true,"trust":true,"trv":true,"tube":true,"tui":true,"tunes":true,"tushu":true,"tvs":true,"ubank":true,"ubs":true,"uconnect":true,"unicom":true,"university":true,"uno":true,"uol":true,"ups":true,"vacations":true,"vana":true,"vanguard":true,"vegas":true,"ventures":true,"verisign":true,"versicherung":true,"vet":true,"viajes":true,"video":true,"vig":true,"viking":true,"villas":true,"vin":true,"vip":true,"virgin":true,"visa":true,"vision":true,"vista":true,"vistaprint":true,"viva":true,"vivo":true,"vlaanderen":true,"vodka":true,"volkswagen":true,"volvo":true,"vote":true,"voting":true,"voto":true,"voyage":true,"vuelos":true,"wales":true,"walmart":true,"walter":true,"wang":true,"wanggou":true,"warman":true,"watch":true,"watches":true,"weather":true,"weatherchannel":true,"webcam":true,"weber":true,"website":true,"wed":true,"wedding":true,"weibo":true,"weir":true,"whoswho":true,"wien":true,"wiki":true,"williamhill":true,"win":true,"windows":true,"wine":true,"winners":true,"wme":true,"wolterskluwer":true,"woodside":true,"work":true,"works":true,"world":true,"wow":true,"wtc":true,"wtf":true,"xbox":true,"xerox":true,"xfinity":true,"xihuan":true,"xin":true,"xn--11b4c3d":true,"xn--1ck2e1b":true,"xn--1qqw23a":true,"xn--30rr7y":true,"xn--3bst00m":true,"xn--3ds443g":true,"xn--3oq18vl8pn36a":true,"xn--3pxu8k":true,"xn--42c2d9a":true,"xn--45q11c":true,"xn--4gbrim":true,"xn--55qw42g":true,"xn--55qx5d":true,"xn--5su34j936bgsg":true,"xn--5tzm5g":true,"xn--6frz82g":true,"xn--6qq986b3xl":true,"xn--80adxhks":true,"xn--80aqecdr1a":true,"xn--80asehdb":true,"xn--80aswg":true,"xn--8y0a063a":true,"xn--9dbq2a":true,"xn--9et52u":true,"xn--9krt00a":true,"xn--b4w605ferd":true,"xn--bck1b9a5dre4c":true,"xn--c1avg":true,"xn--c2br7g":true,"xn--cck2b3b":true,"xn--cg4bki":true,"xn--czr694b":true,"xn--czrs0t":true,"xn--czru2d":true,"xn--d1acj3b":true,"xn--eckvdtc9d":true,"xn--efvy88h":true,"xn--estv75g":true,"xn--fct429k":true,"xn--fhbei":true,"xn--fiq228c5hs":true,"xn--fiq64b":true,"xn--fjq720a":true,"xn--flw351e":true,"xn--fzys8d69uvgm":true,"xn--g2xx48c":true,"xn--gckr3f0f":true,"xn--gk3at1e":true,"xn--hxt814e":true,"xn--i1b6b1a6a2e":true,"xn--imr513n":true,"xn--io0a7i":true,"xn--j1aef":true,"xn--jlq61u9w7b":true,"xn--jvr189m":true,"xn--kcrx77d1x4a":true,"xn--kpu716f":true,"xn--kput3i":true,"xn--mgba3a3ejt":true,"xn--mgba7c0bbn0a":true,"xn--mgbaakc7dvf":true,"xn--mgbab2bd":true,"xn--mgbb9fbpob":true,"xn--mgbca7dzdo":true,"xn--mgbi4ecexp":true,"xn--mgbt3dhd":true,"xn--mk1bu44c":true,"xn--mxtq1m":true,"xn--ngbc5azd":true,"xn--ngbe9e0a":true,"xn--ngbrx":true,"xn--nqv7f":true,"xn--nqv7fs00ema":true,"xn--nyqy26a":true,"xn--p1acf":true,"xn--pbt977c":true,"xn--pssy2u":true,"xn--q9jyb4c":true,"xn--qcka1pmc":true,"xn--rhqv96g":true,"xn--rovu88b":true,"xn--ses554g":true,"xn--t60b56a":true,"xn--tckwe":true,"xn--tiq49xqyj":true,"xn--unup4y":true,"xn--vermgensberater-ctb":true,"xn--vermgensberatung-pwb":true,"xn--vhquv":true,"xn--vuq861b":true,"xn--w4r85el8fhu5dnra":true,"xn--w4rs40l":true,"xn--xhq521b":true,"xn--zfr164b":true,"xperia":true,"xyz":true,"yachts":true,"yahoo":true,"yamaxun":true,"yandex":true,"yodobashi":true,"yoga":true,"yokohama":true,"you":true,"youtube":true,"yun":true,"zappos":true,"zara":true,"zero":true,"zip":true,"zippo":true,"zone":true,"zuerich":true,"cc.ua":true,"inf.ua":true,"ltd.ua":true,"1password.ca":true,"1password.com":true,"1password.eu":true,"beep.pl":true,"*.compute.estate":true,"*.alces.network":true,"alwaysdata.net":true,"cloudfront.net":true,"*.compute.amazonaws.com":true,"*.compute-1.amazonaws.com":true,"*.compute.amazonaws.com.cn":true,"us-east-1.amazonaws.com":true,"cn-north-1.eb.amazonaws.com.cn":true,"elasticbeanstalk.com":true,"ap-northeast-1.elasticbeanstalk.com":true,"ap-northeast-2.elasticbeanstalk.com":true,"ap-south-1.elasticbeanstalk.com":true,"ap-southeast-1.elasticbeanstalk.com":true,"ap-southeast-2.elasticbeanstalk.com":true,"ca-central-1.elasticbeanstalk.com":true,"eu-central-1.elasticbeanstalk.com":true,"eu-west-1.elasticbeanstalk.com":true,"eu-west-2.elasticbeanstalk.com":true,"eu-west-3.elasticbeanstalk.com":true,"sa-east-1.elasticbeanstalk.com":true,"us-east-1.elasticbeanstalk.com":true,"us-east-2.elasticbeanstalk.com":true,"us-gov-west-1.elasticbeanstalk.com":true,"us-west-1.elasticbeanstalk.com":true,"us-west-2.elasticbeanstalk.com":true,"*.elb.amazonaws.com":true,"*.elb.amazonaws.com.cn":true,"s3.amazonaws.com":true,"s3-ap-northeast-1.amazonaws.com":true,"s3-ap-northeast-2.amazonaws.com":true,"s3-ap-south-1.amazonaws.com":true,"s3-ap-southeast-1.amazonaws.com":true,"s3-ap-southeast-2.amazonaws.com":true,"s3-ca-central-1.amazonaws.com":true,"s3-eu-central-1.amazonaws.com":true,"s3-eu-west-1.amazonaws.com":true,"s3-eu-west-2.amazonaws.com":true,"s3-eu-west-3.amazonaws.com":true,"s3-external-1.amazonaws.com":true,"s3-fips-us-gov-west-1.amazonaws.com":true,"s3-sa-east-1.amazonaws.com":true,"s3-us-gov-west-1.amazonaws.com":true,"s3-us-east-2.amazonaws.com":true,"s3-us-west-1.amazonaws.com":true,"s3-us-west-2.amazonaws.com":true,"s3.ap-northeast-2.amazonaws.com":true,"s3.ap-south-1.amazonaws.com":true,"s3.cn-north-1.amazonaws.com.cn":true,"s3.ca-central-1.amazonaws.com":true,"s3.eu-central-1.amazonaws.com":true,"s3.eu-west-2.amazonaws.com":true,"s3.eu-west-3.amazonaws.com":true,"s3.us-east-2.amazonaws.com":true,"s3.dualstack.ap-northeast-1.amazonaws.com":true,"s3.dualstack.ap-northeast-2.amazonaws.com":true,"s3.dualstack.ap-south-1.amazonaws.com":true,"s3.dualstack.ap-southeast-1.amazonaws.com":true,"s3.dualstack.ap-southeast-2.amazonaws.com":true,"s3.dualstack.ca-central-1.amazonaws.com":true,"s3.dualstack.eu-central-1.amazonaws.com":true,"s3.dualstack.eu-west-1.amazonaws.com":true,"s3.dualstack.eu-west-2.amazonaws.com":true,"s3.dualstack.eu-west-3.amazonaws.com":true,"s3.dualstack.sa-east-1.amazonaws.com":true,"s3.dualstack.us-east-1.amazonaws.com":true,"s3.dualstack.us-east-2.amazonaws.com":true,"s3-website-us-east-1.amazonaws.com":true,"s3-website-us-west-1.amazonaws.com":true,"s3-website-us-west-2.amazonaws.com":true,"s3-website-ap-northeast-1.amazonaws.com":true,"s3-website-ap-southeast-1.amazonaws.com":true,"s3-website-ap-southeast-2.amazonaws.com":true,"s3-website-eu-west-1.amazonaws.com":true,"s3-website-sa-east-1.amazonaws.com":true,"s3-website.ap-northeast-2.amazonaws.com":true,"s3-website.ap-south-1.amazonaws.com":true,"s3-website.ca-central-1.amazonaws.com":true,"s3-website.eu-central-1.amazonaws.com":true,"s3-website.eu-west-2.amazonaws.com":true,"s3-website.eu-west-3.amazonaws.com":true,"s3-website.us-east-2.amazonaws.com":true,"t3l3p0rt.net":true,"tele.amune.org":true,"on-aptible.com":true,"user.party.eus":true,"pimienta.org":true,"poivron.org":true,"potager.org":true,"sweetpepper.org":true,"myasustor.com":true,"myfritz.net":true,"*.awdev.ca":true,"*.advisor.ws":true,"backplaneapp.io":true,"betainabox.com":true,"bnr.la":true,"boomla.net":true,"boxfuse.io":true,"square7.ch":true,"bplaced.com":true,"bplaced.de":true,"square7.de":true,"bplaced.net":true,"square7.net":true,"browsersafetymark.io":true,"mycd.eu":true,"ae.org":true,"ar.com":true,"br.com":true,"cn.com":true,"com.de":true,"com.se":true,"de.com":true,"eu.com":true,"gb.com":true,"gb.net":true,"hu.com":true,"hu.net":true,"jp.net":true,"jpn.com":true,"kr.com":true,"mex.com":true,"no.com":true,"qc.com":true,"ru.com":true,"sa.com":true,"se.com":true,"se.net":true,"uk.com":true,"uk.net":true,"us.com":true,"uy.com":true,"za.bz":true,"za.com":true,"africa.com":true,"gr.com":true,"in.net":true,"us.org":true,"co.com":true,"c.la":true,"certmgr.org":true,"xenapponazure.com":true,"virtueeldomein.nl":true,"c66.me":true,"cloud66.ws":true,"jdevcloud.com":true,"wpdevcloud.com":true,"cloudaccess.host":true,"freesite.host":true,"cloudaccess.net":true,"cloudcontrolled.com":true,"cloudcontrolapp.com":true,"co.ca":true,"co.cz":true,"c.cdn77.org":true,"cdn77-ssl.net":true,"r.cdn77.net":true,"rsc.cdn77.org":true,"ssl.origin.cdn77-secure.org":true,"cloudns.asia":true,"cloudns.biz":true,"cloudns.club":true,"cloudns.cc":true,"cloudns.eu":true,"cloudns.in":true,"cloudns.info":true,"cloudns.org":true,"cloudns.pro":true,"cloudns.pw":true,"cloudns.us":true,"co.nl":true,"co.no":true,"webhosting.be":true,"hosting-cluster.nl":true,"dyn.cosidns.de":true,"dynamisches-dns.de":true,"dnsupdater.de":true,"internet-dns.de":true,"l-o-g-i-n.de":true,"dynamic-dns.info":true,"feste-ip.net":true,"knx-server.net":true,"static-access.net":true,"realm.cz":true,"*.cryptonomic.net":true,"cupcake.is":true,"cyon.link":true,"cyon.site":true,"daplie.me":true,"localhost.daplie.me":true,"biz.dk":true,"co.dk":true,"firm.dk":true,"reg.dk":true,"store.dk":true,"debian.net":true,"dedyn.io":true,"dnshome.de":true,"drayddns.com":true,"dreamhosters.com":true,"mydrobo.com":true,"drud.io":true,"drud.us":true,"duckdns.org":true,"dy.fi":true,"tunk.org":true,"dyndns-at-home.com":true,"dyndns-at-work.com":true,"dyndns-blog.com":true,"dyndns-free.com":true,"dyndns-home.com":true,"dyndns-ip.com":true,"dyndns-mail.com":true,"dyndns-office.com":true,"dyndns-pics.com":true,"dyndns-remote.com":true,"dyndns-server.com":true,"dyndns-web.com":true,"dyndns-wiki.com":true,"dyndns-work.com":true,"dyndns.biz":true,"dyndns.info":true,"dyndns.org":true,"dyndns.tv":true,"at-band-camp.net":true,"ath.cx":true,"barrel-of-knowledge.info":true,"barrell-of-knowledge.info":true,"better-than.tv":true,"blogdns.com":true,"blogdns.net":true,"blogdns.org":true,"blogsite.org":true,"boldlygoingnowhere.org":true,"broke-it.net":true,"buyshouses.net":true,"cechire.com":true,"dnsalias.com":true,"dnsalias.net":true,"dnsalias.org":true,"dnsdojo.com":true,"dnsdojo.net":true,"dnsdojo.org":true,"does-it.net":true,"doesntexist.com":true,"doesntexist.org":true,"dontexist.com":true,"dontexist.net":true,"dontexist.org":true,"doomdns.com":true,"doomdns.org":true,"dvrdns.org":true,"dyn-o-saur.com":true,"dynalias.com":true,"dynalias.net":true,"dynalias.org":true,"dynathome.net":true,"dyndns.ws":true,"endofinternet.net":true,"endofinternet.org":true,"endoftheinternet.org":true,"est-a-la-maison.com":true,"est-a-la-masion.com":true,"est-le-patron.com":true,"est-mon-blogueur.com":true,"for-better.biz":true,"for-more.biz":true,"for-our.info":true,"for-some.biz":true,"for-the.biz":true,"forgot.her.name":true,"forgot.his.name":true,"from-ak.com":true,"from-al.com":true,"from-ar.com":true,"from-az.net":true,"from-ca.com":true,"from-co.net":true,"from-ct.com":true,"from-dc.com":true,"from-de.com":true,"from-fl.com":true,"from-ga.com":true,"from-hi.com":true,"from-ia.com":true,"from-id.com":true,"from-il.com":true,"from-in.com":true,"from-ks.com":true,"from-ky.com":true,"from-la.net":true,"from-ma.com":true,"from-md.com":true,"from-me.org":true,"from-mi.com":true,"from-mn.com":true,"from-mo.com":true,"from-ms.com":true,"from-mt.com":true,"from-nc.com":true,"from-nd.com":true,"from-ne.com":true,"from-nh.com":true,"from-nj.com":true,"from-nm.com":true,"from-nv.com":true,"from-ny.net":true,"from-oh.com":true,"from-ok.com":true,"from-or.com":true,"from-pa.com":true,"from-pr.com":true,"from-ri.com":true,"from-sc.com":true,"from-sd.com":true,"from-tn.com":true,"from-tx.com":true,"from-ut.com":true,"from-va.com":true,"from-vt.com":true,"from-wa.com":true,"from-wi.com":true,"from-wv.com":true,"from-wy.com":true,"ftpaccess.cc":true,"fuettertdasnetz.de":true,"game-host.org":true,"game-server.cc":true,"getmyip.com":true,"gets-it.net":true,"go.dyndns.org":true,"gotdns.com":true,"gotdns.org":true,"groks-the.info":true,"groks-this.info":true,"ham-radio-op.net":true,"here-for-more.info":true,"hobby-site.com":true,"hobby-site.org":true,"home.dyndns.org":true,"homedns.org":true,"homeftp.net":true,"homeftp.org":true,"homeip.net":true,"homelinux.com":true,"homelinux.net":true,"homelinux.org":true,"homeunix.com":true,"homeunix.net":true,"homeunix.org":true,"iamallama.com":true,"in-the-band.net":true,"is-a-anarchist.com":true,"is-a-blogger.com":true,"is-a-bookkeeper.com":true,"is-a-bruinsfan.org":true,"is-a-bulls-fan.com":true,"is-a-candidate.org":true,"is-a-caterer.com":true,"is-a-celticsfan.org":true,"is-a-chef.com":true,"is-a-chef.net":true,"is-a-chef.org":true,"is-a-conservative.com":true,"is-a-cpa.com":true,"is-a-cubicle-slave.com":true,"is-a-democrat.com":true,"is-a-designer.com":true,"is-a-doctor.com":true,"is-a-financialadvisor.com":true,"is-a-geek.com":true,"is-a-geek.net":true,"is-a-geek.org":true,"is-a-green.com":true,"is-a-guru.com":true,"is-a-hard-worker.com":true,"is-a-hunter.com":true,"is-a-knight.org":true,"is-a-landscaper.com":true,"is-a-lawyer.com":true,"is-a-liberal.com":true,"is-a-libertarian.com":true,"is-a-linux-user.org":true,"is-a-llama.com":true,"is-a-musician.com":true,"is-a-nascarfan.com":true,"is-a-nurse.com":true,"is-a-painter.com":true,"is-a-patsfan.org":true,"is-a-personaltrainer.com":true,"is-a-photographer.com":true,"is-a-player.com":true,"is-a-republican.com":true,"is-a-rockstar.com":true,"is-a-socialist.com":true,"is-a-soxfan.org":true,"is-a-student.com":true,"is-a-teacher.com":true,"is-a-techie.com":true,"is-a-therapist.com":true,"is-an-accountant.com":true,"is-an-actor.com":true,"is-an-actress.com":true,"is-an-anarchist.com":true,"is-an-artist.com":true,"is-an-engineer.com":true,"is-an-entertainer.com":true,"is-by.us":true,"is-certified.com":true,"is-found.org":true,"is-gone.com":true,"is-into-anime.com":true,"is-into-cars.com":true,"is-into-cartoons.com":true,"is-into-games.com":true,"is-leet.com":true,"is-lost.org":true,"is-not-certified.com":true,"is-saved.org":true,"is-slick.com":true,"is-uberleet.com":true,"is-very-bad.org":true,"is-very-evil.org":true,"is-very-good.org":true,"is-very-nice.org":true,"is-very-sweet.org":true,"is-with-theband.com":true,"isa-geek.com":true,"isa-geek.net":true,"isa-geek.org":true,"isa-hockeynut.com":true,"issmarterthanyou.com":true,"isteingeek.de":true,"istmein.de":true,"kicks-ass.net":true,"kicks-ass.org":true,"knowsitall.info":true,"land-4-sale.us":true,"lebtimnetz.de":true,"leitungsen.de":true,"likes-pie.com":true,"likescandy.com":true,"merseine.nu":true,"mine.nu":true,"misconfused.org":true,"mypets.ws":true,"myphotos.cc":true,"neat-url.com":true,"office-on-the.net":true,"on-the-web.tv":true,"podzone.net":true,"podzone.org":true,"readmyblog.org":true,"saves-the-whales.com":true,"scrapper-site.net":true,"scrapping.cc":true,"selfip.biz":true,"selfip.com":true,"selfip.info":true,"selfip.net":true,"selfip.org":true,"sells-for-less.com":true,"sells-for-u.com":true,"sells-it.net":true,"sellsyourhome.org":true,"servebbs.com":true,"servebbs.net":true,"servebbs.org":true,"serveftp.net":true,"serveftp.org":true,"servegame.org":true,"shacknet.nu":true,"simple-url.com":true,"space-to-rent.com":true,"stuff-4-sale.org":true,"stuff-4-sale.us":true,"teaches-yoga.com":true,"thruhere.net":true,"traeumtgerade.de":true,"webhop.biz":true,"webhop.info":true,"webhop.net":true,"webhop.org":true,"worse-than.tv":true,"writesthisblog.com":true,"ddnss.de":true,"dyn.ddnss.de":true,"dyndns.ddnss.de":true,"dyndns1.de":true,"dyn-ip24.de":true,"home-webserver.de":true,"dyn.home-webserver.de":true,"myhome-server.de":true,"ddnss.org":true,"definima.net":true,"definima.io":true,"ddnsfree.com":true,"ddnsgeek.com":true,"giize.com":true,"gleeze.com":true,"kozow.com":true,"loseyourip.com":true,"ooguy.com":true,"theworkpc.com":true,"casacam.net":true,"dynu.net":true,"accesscam.org":true,"camdvr.org":true,"freeddns.org":true,"mywire.org":true,"webredirect.org":true,"myddns.rocks":true,"blogsite.xyz":true,"dynv6.net":true,"e4.cz":true,"mytuleap.com":true,"enonic.io":true,"customer.enonic.io":true,"eu.org":true,"al.eu.org":true,"asso.eu.org":true,"at.eu.org":true,"au.eu.org":true,"be.eu.org":true,"bg.eu.org":true,"ca.eu.org":true,"cd.eu.org":true,"ch.eu.org":true,"cn.eu.org":true,"cy.eu.org":true,"cz.eu.org":true,"de.eu.org":true,"dk.eu.org":true,"edu.eu.org":true,"ee.eu.org":true,"es.eu.org":true,"fi.eu.org":true,"fr.eu.org":true,"gr.eu.org":true,"hr.eu.org":true,"hu.eu.org":true,"ie.eu.org":true,"il.eu.org":true,"in.eu.org":true,"int.eu.org":true,"is.eu.org":true,"it.eu.org":true,"jp.eu.org":true,"kr.eu.org":true,"lt.eu.org":true,"lu.eu.org":true,"lv.eu.org":true,"mc.eu.org":true,"me.eu.org":true,"mk.eu.org":true,"mt.eu.org":true,"my.eu.org":true,"net.eu.org":true,"ng.eu.org":true,"nl.eu.org":true,"no.eu.org":true,"nz.eu.org":true,"paris.eu.org":true,"pl.eu.org":true,"pt.eu.org":true,"q-a.eu.org":true,"ro.eu.org":true,"ru.eu.org":true,"se.eu.org":true,"si.eu.org":true,"sk.eu.org":true,"tr.eu.org":true,"uk.eu.org":true,"us.eu.org":true,"eu-1.evennode.com":true,"eu-2.evennode.com":true,"eu-3.evennode.com":true,"eu-4.evennode.com":true,"us-1.evennode.com":true,"us-2.evennode.com":true,"us-3.evennode.com":true,"us-4.evennode.com":true,"twmail.cc":true,"twmail.net":true,"twmail.org":true,"mymailer.com.tw":true,"url.tw":true,"apps.fbsbx.com":true,"ru.net":true,"adygeya.ru":true,"bashkiria.ru":true,"bir.ru":true,"cbg.ru":true,"com.ru":true,"dagestan.ru":true,"grozny.ru":true,"kalmykia.ru":true,"kustanai.ru":true,"marine.ru":true,"mordovia.ru":true,"msk.ru":true,"mytis.ru":true,"nalchik.ru":true,"nov.ru":true,"pyatigorsk.ru":true,"spb.ru":true,"vladikavkaz.ru":true,"vladimir.ru":true,"abkhazia.su":true,"adygeya.su":true,"aktyubinsk.su":true,"arkhangelsk.su":true,"armenia.su":true,"ashgabad.su":true,"azerbaijan.su":true,"balashov.su":true,"bashkiria.su":true,"bryansk.su":true,"bukhara.su":true,"chimkent.su":true,"dagestan.su":true,"east-kazakhstan.su":true,"exnet.su":true,"georgia.su":true,"grozny.su":true,"ivanovo.su":true,"jambyl.su":true,"kalmykia.su":true,"kaluga.su":true,"karacol.su":true,"karaganda.su":true,"karelia.su":true,"khakassia.su":true,"krasnodar.su":true,"kurgan.su":true,"kustanai.su":true,"lenug.su":true,"mangyshlak.su":true,"mordovia.su":true,"msk.su":true,"murmansk.su":true,"nalchik.su":true,"navoi.su":true,"north-kazakhstan.su":true,"nov.su":true,"obninsk.su":true,"penza.su":true,"pokrovsk.su":true,"sochi.su":true,"spb.su":true,"tashkent.su":true,"termez.su":true,"togliatti.su":true,"troitsk.su":true,"tselinograd.su":true,"tula.su":true,"tuva.su":true,"vladikavkaz.su":true,"vladimir.su":true,"vologda.su":true,"channelsdvr.net":true,"fastlylb.net":true,"map.fastlylb.net":true,"freetls.fastly.net":true,"map.fastly.net":true,"a.prod.fastly.net":true,"global.prod.fastly.net":true,"a.ssl.fastly.net":true,"b.ssl.fastly.net":true,"global.ssl.fastly.net":true,"fhapp.xyz":true,"fedorainfracloud.org":true,"fedorapeople.org":true,"cloud.fedoraproject.org":true,"app.os.fedoraproject.org":true,"app.os.stg.fedoraproject.org":true,"filegear.me":true,"firebaseapp.com":true,"flynnhub.com":true,"flynnhosting.net":true,"freebox-os.com":true,"freeboxos.com":true,"fbx-os.fr":true,"fbxos.fr":true,"freebox-os.fr":true,"freeboxos.fr":true,"*.futurecms.at":true,"futurehosting.at":true,"futuremailing.at":true,"*.ex.ortsinfo.at":true,"*.kunden.ortsinfo.at":true,"*.statics.cloud":true,"service.gov.uk":true,"github.io":true,"githubusercontent.com":true,"gitlab.io":true,"homeoffice.gov.uk":true,"ro.im":true,"shop.ro":true,"goip.de":true,"*.0emm.com":true,"appspot.com":true,"blogspot.ae":true,"blogspot.al":true,"blogspot.am":true,"blogspot.ba":true,"blogspot.be":true,"blogspot.bg":true,"blogspot.bj":true,"blogspot.ca":true,"blogspot.cf":true,"blogspot.ch":true,"blogspot.cl":true,"blogspot.co.at":true,"blogspot.co.id":true,"blogspot.co.il":true,"blogspot.co.ke":true,"blogspot.co.nz":true,"blogspot.co.uk":true,"blogspot.co.za":true,"blogspot.com":true,"blogspot.com.ar":true,"blogspot.com.au":true,"blogspot.com.br":true,"blogspot.com.by":true,"blogspot.com.co":true,"blogspot.com.cy":true,"blogspot.com.ee":true,"blogspot.com.eg":true,"blogspot.com.es":true,"blogspot.com.mt":true,"blogspot.com.ng":true,"blogspot.com.tr":true,"blogspot.com.uy":true,"blogspot.cv":true,"blogspot.cz":true,"blogspot.de":true,"blogspot.dk":true,"blogspot.fi":true,"blogspot.fr":true,"blogspot.gr":true,"blogspot.hk":true,"blogspot.hr":true,"blogspot.hu":true,"blogspot.ie":true,"blogspot.in":true,"blogspot.is":true,"blogspot.it":true,"blogspot.jp":true,"blogspot.kr":true,"blogspot.li":true,"blogspot.lt":true,"blogspot.lu":true,"blogspot.md":true,"blogspot.mk":true,"blogspot.mr":true,"blogspot.mx":true,"blogspot.my":true,"blogspot.nl":true,"blogspot.no":true,"blogspot.pe":true,"blogspot.pt":true,"blogspot.qa":true,"blogspot.re":true,"blogspot.ro":true,"blogspot.rs":true,"blogspot.ru":true,"blogspot.se":true,"blogspot.sg":true,"blogspot.si":true,"blogspot.sk":true,"blogspot.sn":true,"blogspot.td":true,"blogspot.tw":true,"blogspot.ug":true,"blogspot.vn":true,"cloudfunctions.net":true,"cloud.goog":true,"codespot.com":true,"googleapis.com":true,"googlecode.com":true,"pagespeedmobilizer.com":true,"publishproxy.com":true,"withgoogle.com":true,"withyoutube.com":true,"hashbang.sh":true,"hasura-app.io":true,"hepforge.org":true,"herokuapp.com":true,"herokussl.com":true,"moonscale.net":true,"iki.fi":true,"biz.at":true,"info.at":true,"info.cx":true,"ac.leg.br":true,"al.leg.br":true,"am.leg.br":true,"ap.leg.br":true,"ba.leg.br":true,"ce.leg.br":true,"df.leg.br":true,"es.leg.br":true,"go.leg.br":true,"ma.leg.br":true,"mg.leg.br":true,"ms.leg.br":true,"mt.leg.br":true,"pa.leg.br":true,"pb.leg.br":true,"pe.leg.br":true,"pi.leg.br":true,"pr.leg.br":true,"rj.leg.br":true,"rn.leg.br":true,"ro.leg.br":true,"rr.leg.br":true,"rs.leg.br":true,"sc.leg.br":true,"se.leg.br":true,"sp.leg.br":true,"to.leg.br":true,"pixolino.com":true,"ipifony.net":true,"*.triton.zone":true,"*.cns.joyent.com":true,"js.org":true,"keymachine.de":true,"knightpoint.systems":true,"co.krd":true,"edu.krd":true,"git-repos.de":true,"lcube-server.de":true,"svn-repos.de":true,"linkyard.cloud":true,"linkyard-cloud.ch":true,"we.bs":true,"barsy.bg":true,"barsyonline.com":true,"barsy.de":true,"barsy.eu":true,"barsy.in":true,"barsy.net":true,"barsy.online":true,"barsy.support":true,"*.magentosite.cloud":true,"hb.cldmail.ru":true,"cloud.metacentrum.cz":true,"custom.metacentrum.cz":true,"meteorapp.com":true,"eu.meteorapp.com":true,"co.pl":true,"azurewebsites.net":true,"azure-mobile.net":true,"cloudapp.net":true,"mozilla-iot.org":true,"bmoattachments.org":true,"net.ru":true,"org.ru":true,"pp.ru":true,"bitballoon.com":true,"netlify.com":true,"4u.com":true,"ngrok.io":true,"nh-serv.co.uk":true,"nfshost.com":true,"nsupdate.info":true,"nerdpol.ovh":true,"blogsyte.com":true,"brasilia.me":true,"cable-modem.org":true,"ciscofreak.com":true,"collegefan.org":true,"couchpotatofries.org":true,"damnserver.com":true,"ddns.me":true,"ditchyourip.com":true,"dnsfor.me":true,"dnsiskinky.com":true,"dvrcam.info":true,"dynns.com":true,"eating-organic.net":true,"fantasyleague.cc":true,"geekgalaxy.com":true,"golffan.us":true,"health-carereform.com":true,"homesecuritymac.com":true,"homesecuritypc.com":true,"hopto.me":true,"ilovecollege.info":true,"loginto.me":true,"mlbfan.org":true,"mmafan.biz":true,"myactivedirectory.com":true,"mydissent.net":true,"myeffect.net":true,"mymediapc.net":true,"mypsx.net":true,"mysecuritycamera.com":true,"mysecuritycamera.net":true,"mysecuritycamera.org":true,"net-freaks.com":true,"nflfan.org":true,"nhlfan.net":true,"no-ip.ca":true,"no-ip.co.uk":true,"no-ip.net":true,"noip.us":true,"onthewifi.com":true,"pgafan.net":true,"point2this.com":true,"pointto.us":true,"privatizehealthinsurance.net":true,"quicksytes.com":true,"read-books.org":true,"securitytactics.com":true,"serveexchange.com":true,"servehumour.com":true,"servep2p.com":true,"servesarcasm.com":true,"stufftoread.com":true,"ufcfan.org":true,"unusualperson.com":true,"workisboring.com":true,"3utilities.com":true,"bounceme.net":true,"ddns.net":true,"ddnsking.com":true,"gotdns.ch":true,"hopto.org":true,"myftp.biz":true,"myftp.org":true,"myvnc.com":true,"no-ip.biz":true,"no-ip.info":true,"no-ip.org":true,"noip.me":true,"redirectme.net":true,"servebeer.com":true,"serveblog.net":true,"servecounterstrike.com":true,"serveftp.com":true,"servegame.com":true,"servehalflife.com":true,"servehttp.com":true,"serveirc.com":true,"serveminecraft.net":true,"servemp3.com":true,"servepics.com":true,"servequake.com":true,"sytes.net":true,"webhop.me":true,"zapto.org":true,"stage.nodeart.io":true,"nodum.co":true,"nodum.io":true,"nyc.mn":true,"nom.ae":true,"nom.ai":true,"nom.al":true,"nym.by":true,"nym.bz":true,"nom.cl":true,"nom.gd":true,"nom.gl":true,"nym.gr":true,"nom.gt":true,"nom.hn":true,"nom.im":true,"nym.kz":true,"nym.la":true,"nom.li":true,"nym.li":true,"nym.lt":true,"nym.lu":true,"nym.me":true,"nom.mk":true,"nym.mx":true,"nom.nu":true,"nym.nz":true,"nym.pe":true,"nym.pt":true,"nom.pw":true,"nom.qa":true,"nom.rs":true,"nom.si":true,"nym.sk":true,"nym.su":true,"nym.sx":true,"nym.tw":true,"nom.ug":true,"nom.uy":true,"nom.vc":true,"nom.vg":true,"cya.gg":true,"nid.io":true,"opencraft.hosting":true,"operaunite.com":true,"outsystemscloud.com":true,"ownprovider.com":true,"oy.lc":true,"pgfog.com":true,"pagefrontapp.com":true,"art.pl":true,"gliwice.pl":true,"krakow.pl":true,"poznan.pl":true,"wroc.pl":true,"zakopane.pl":true,"pantheonsite.io":true,"gotpantheon.com":true,"mypep.link":true,"on-web.fr":true,"*.platform.sh":true,"*.platformsh.site":true,"xen.prgmr.com":true,"priv.at":true,"protonet.io":true,"chirurgiens-dentistes-en-france.fr":true,"byen.site":true,"qa2.com":true,"dev-myqnapcloud.com":true,"alpha-myqnapcloud.com":true,"myqnapcloud.com":true,"*.quipelements.com":true,"vapor.cloud":true,"vaporcloud.io":true,"rackmaze.com":true,"rackmaze.net":true,"rhcloud.com":true,"resindevice.io":true,"devices.resinstaging.io":true,"hzc.io":true,"wellbeingzone.eu":true,"ptplus.fit":true,"wellbeingzone.co.uk":true,"sandcats.io":true,"logoip.de":true,"logoip.com":true,"schokokeks.net":true,"scrysec.com":true,"firewall-gateway.com":true,"firewall-gateway.de":true,"my-gateway.de":true,"my-router.de":true,"spdns.de":true,"spdns.eu":true,"firewall-gateway.net":true,"my-firewall.org":true,"myfirewall.org":true,"spdns.org":true,"*.s5y.io":true,"*.sensiosite.cloud":true,"biz.ua":true,"co.ua":true,"pp.ua":true,"shiftedit.io":true,"myshopblocks.com":true,"1kapp.com":true,"appchizi.com":true,"applinzi.com":true,"sinaapp.com":true,"vipsinaapp.com":true,"bounty-full.com":true,"alpha.bounty-full.com":true,"beta.bounty-full.com":true,"static.land":true,"dev.static.land":true,"sites.static.land":true,"apps.lair.io":true,"*.stolos.io":true,"spacekit.io":true,"stackspace.space":true,"storj.farm":true,"temp-dns.com":true,"diskstation.me":true,"dscloud.biz":true,"dscloud.me":true,"dscloud.mobi":true,"dsmynas.com":true,"dsmynas.net":true,"dsmynas.org":true,"familyds.com":true,"familyds.net":true,"familyds.org":true,"i234.me":true,"myds.me":true,"synology.me":true,"vpnplus.to":true,"taifun-dns.de":true,"gda.pl":true,"gdansk.pl":true,"gdynia.pl":true,"med.pl":true,"sopot.pl":true,"cust.dev.thingdust.io":true,"cust.disrec.thingdust.io":true,"cust.prod.thingdust.io":true,"cust.testing.thingdust.io":true,"bloxcms.com":true,"townnews-staging.com":true,"12hp.at":true,"2ix.at":true,"4lima.at":true,"lima-city.at":true,"12hp.ch":true,"2ix.ch":true,"4lima.ch":true,"lima-city.ch":true,"trafficplex.cloud":true,"de.cool":true,"12hp.de":true,"2ix.de":true,"4lima.de":true,"lima-city.de":true,"1337.pictures":true,"clan.rip":true,"lima-city.rocks":true,"webspace.rocks":true,"lima.zone":true,"*.transurl.be":true,"*.transurl.eu":true,"*.transurl.nl":true,"tuxfamily.org":true,"dd-dns.de":true,"diskstation.eu":true,"diskstation.org":true,"dray-dns.de":true,"draydns.de":true,"dyn-vpn.de":true,"dynvpn.de":true,"mein-vigor.de":true,"my-vigor.de":true,"my-wan.de":true,"syno-ds.de":true,"synology-diskstation.de":true,"synology-ds.de":true,"uber.space":true,"hk.com":true,"hk.org":true,"ltd.hk":true,"inc.hk":true,"lib.de.us":true,"2038.io":true,"router.management":true,"v-info.info":true,"wedeploy.io":true,"wedeploy.me":true,"wedeploy.sh":true,"remotewd.com":true,"wmflabs.org":true,"cistron.nl":true,"demon.nl":true,"xs4all.space":true,"official.academy":true,"yolasite.com":true,"ybo.faith":true,"yombo.me":true,"homelink.one":true,"ybo.party":true,"ybo.review":true,"ybo.science":true,"ybo.trade":true,"za.net":true,"za.org":true,"now.sh":true}); // END of automatically generated file /***/ }), -/* 315 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -74442,877 +74098,1681 @@ Store.prototype.getAllCookies = function(cb) { /***/ }), -/* 316 */ +/* 381 */ +/***/ (function(module, exports) { + +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; + + +/***/ }), +/* 382 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information. +var path = __webpack_require__(2); +var fs = __webpack_require__(12); +var parse = path.parse || __webpack_require__(814); -;(function (factory) { - var objectTypes = { - 'function': true, - 'object': true - }; +module.exports = function nodeModulesPaths(start, opts) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules']; - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } + // ensure that `start` is an absolute path at this point, + // resolving against the process' current working directory + var absoluteStart = path.resolve(start); - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global); - var freeSelf = checkGlobal(objectTypes[typeof self] && self); - var freeWindow = checkGlobal(objectTypes[typeof window] && window); - var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null; - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); - var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); - - // Because of build optimizers - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(46)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Rx, exports) { - return factory(root, exports, Rx); - }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof module === 'object' && module && module.exports === freeExports) { - module.exports = factory(root, module.exports, require('./rx')); - } else { - root.Rx = factory(root, {}, root.Rx); - } -}.call(this, function (root, exp, Rx, undefined) { - - var Observable = Rx.Observable, - observableProto = Observable.prototype, - AnonymousObservable = Rx.AnonymousObservable, - ObservableBase = Rx.ObservableBase, - Subject = Rx.Subject, - AsyncSubject = Rx.AsyncSubject, - Observer = Rx.Observer, - ScheduledObserver = Rx.internals.ScheduledObserver, - disposableCreate = Rx.Disposable.create, - disposableEmpty = Rx.Disposable.empty, - BinaryDisposable = Rx.BinaryDisposable, - currentThreadScheduler = Rx.Scheduler.currentThread, - isFunction = Rx.helpers.isFunction, - inherits = Rx.internals.inherits, - addProperties = Rx.internals.addProperties, - checkDisposed = Rx.Disposable.checkDisposed; - - // Utilities - function cloneArray(arr) { - var len = arr.length, a = new Array(len); - for(var i = 0; i < len; i++) { a[i] = arr[i]; } - return a; - } - - var MulticastObservable = (function (__super__) { - inherits(MulticastObservable, __super__); - function MulticastObservable(source, fn1, fn2) { - this.source = source; - this._fn1 = fn1; - this._fn2 = fn2; - __super__.call(this); + if (opts && opts.preserveSymlinks === false) { + try { + absoluteStart = fs.realpathSync(absoluteStart); + } catch (err) { + if (err.code !== 'ENOENT') { + throw err; + } + } } - MulticastObservable.prototype.subscribeCore = function (o) { - var connectable = this.source.multicast(this._fn1()); - return new BinaryDisposable(this._fn2(connectable).subscribe(o), connectable.connect()); - }; - - return MulticastObservable; - }(ObservableBase)); - - /** - * Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each - * subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's - * invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay. - * - * @example - * 1 - res = source.multicast(observable); - * 2 - res = source.multicast(function () { return new Subject(); }, function (x) { return x; }); - * - * @param {Function|Subject} subjectOrSubjectSelector - * Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. - * Or: - * Subject to push source elements into. - * - * @param {Function} [selector] Optional selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. Specified only if 0; }, - /** - * Notifies all subscribed observers about the end of the sequence. - */ - onCompleted: function () { - checkDisposed(this); - if (this.isStopped) { return; } - this.isStopped = true; - for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { - os[i].onCompleted(); - } + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } - this.observers.length = 0; - }, - /** - * Notifies all subscribed observers about the exception. - * @param {Mixed} error The exception to send to all observers. - */ - onError: function (error) { - checkDisposed(this); - if (this.isStopped) { return; } - this.isStopped = true; - this.hasError = true; - this.error = error; + var dirs = paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.join(prefix, aPath, moduleDir); + })); + }, []); - for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { - os[i].onError(error); - } + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; - this.observers.length = 0; - }, - /** - * Notifies all subscribed observers about the arrival of the specified element in the sequence. - * @param {Mixed} value The value to send to all observers. - */ - onNext: function (value) { - checkDisposed(this); - if (this.isStopped) { return; } - this.value = value; - for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { - os[i].onNext(value); - } - }, - /** - * Unsubscribe all observers and release resources. - */ - dispose: function () { - this.isDisposed = true; - this.observers = null; - this.value = null; - this.error = null; - } + +/***/ }), +/* 383 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BehaviorSubject; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_ObjectUnsubscribedError__ = __webpack_require__(173); +/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */ + + + +var BehaviorSubject = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](BehaviorSubject, _super); + function BehaviorSubject(_value) { + var _this = _super.call(this) || this; + _this._value = _value; + return _this; + } + Object.defineProperty(BehaviorSubject.prototype, "value", { + get: function () { + return this.getValue(); + }, + enumerable: true, + configurable: true }); - - return BehaviorSubject; - }(Observable)); - - /** - * Represents an object that is both an observable sequence as well as an observer. - * Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies. - */ - var ReplaySubject = Rx.ReplaySubject = (function (__super__) { - - var maxSafeInteger = Math.pow(2, 53) - 1; - - function createRemovableDisposable(subject, observer) { - return disposableCreate(function () { - observer.dispose(); - !subject.isDisposed && subject.observers.splice(subject.observers.indexOf(observer), 1); - }); - } - - inherits(ReplaySubject, __super__); - - /** - * Initializes a new instance of the ReplaySubject class with the specified buffer size, window size and scheduler. - * @param {Number} [bufferSize] Maximum element count of the replay buffer. - * @param {Number} [windowSize] Maximum time length of the replay buffer. - * @param {Scheduler} [scheduler] Scheduler the observers are invoked on. - */ - function ReplaySubject(bufferSize, windowSize, scheduler) { - this.bufferSize = bufferSize == null ? maxSafeInteger : bufferSize; - this.windowSize = windowSize == null ? maxSafeInteger : windowSize; - this.scheduler = scheduler || currentThreadScheduler; - this.q = []; - this.observers = []; - this.isStopped = false; - this.isDisposed = false; - this.hasError = false; - this.error = null; - __super__.call(this); - } - - addProperties(ReplaySubject.prototype, Observer.prototype, { - _subscribe: function (o) { - checkDisposed(this); - var so = new ScheduledObserver(this.scheduler, o), subscription = createRemovableDisposable(this, so); - - this._trim(this.scheduler.now()); - this.observers.push(so); - - for (var i = 0, len = this.q.length; i < len; i++) { - so.onNext(this.q[i].value); + BehaviorSubject.prototype._subscribe = function (subscriber) { + var subscription = _super.prototype._subscribe.call(this, subscriber); + if (subscription && !subscription.closed) { + subscriber.next(this._value); } - - if (this.hasError) { - so.onError(this.error); - } else if (this.isStopped) { - so.onCompleted(); - } - - so.ensureActive(); return subscription; - }, - /** - * Indicates whether the subject has observers subscribed to it. - * @returns {Boolean} Indicates whether the subject has observers subscribed to it. - */ - hasObservers: function () { checkDisposed(this); return this.observers.length > 0; }, - _trim: function (now) { - while (this.q.length > this.bufferSize) { - this.q.shift(); - } - while (this.q.length > 0 && (now - this.q[0].interval) > this.windowSize) { - this.q.shift(); - } - }, - /** - * Notifies all subscribed observers about the arrival of the specified element in the sequence. - * @param {Mixed} value The value to send to all observers. - */ - onNext: function (value) { - checkDisposed(this); - if (this.isStopped) { return; } - var now = this.scheduler.now(); - this.q.push({ interval: now, value: value }); - this._trim(now); - - for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { - var observer = os[i]; - observer.onNext(value); - observer.ensureActive(); - } - }, - /** - * Notifies all subscribed observers about the exception. - * @param {Mixed} error The exception to send to all observers. - */ - onError: function (error) { - checkDisposed(this); - if (this.isStopped) { return; } - this.isStopped = true; - this.error = error; - this.hasError = true; - var now = this.scheduler.now(); - this._trim(now); - for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { - var observer = os[i]; - observer.onError(error); - observer.ensureActive(); - } - this.observers.length = 0; - }, - /** - * Notifies all subscribed observers about the end of the sequence. - */ - onCompleted: function () { - checkDisposed(this); - if (this.isStopped) { return; } - this.isStopped = true; - var now = this.scheduler.now(); - this._trim(now); - for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { - var observer = os[i]; - observer.onCompleted(); - observer.ensureActive(); - } - this.observers.length = 0; - }, - /** - * Unsubscribe all observers and release resources. - */ - dispose: function () { - this.isDisposed = true; - this.observers = null; - } - }); - - return ReplaySubject; - }(Observable)); - - var RefCountObservable = (function (__super__) { - inherits(RefCountObservable, __super__); - function RefCountObservable(source) { - this.source = source; - this._count = 0; - this._connectableSubscription = null; - __super__.call(this); - } - - RefCountObservable.prototype.subscribeCore = function (o) { - var subscription = this.source.subscribe(o); - ++this._count === 1 && (this._connectableSubscription = this.source.connect()); - return new RefCountDisposable(this, subscription); }; - - function RefCountDisposable(p, s) { - this._p = p; - this._s = s; - this.isDisposed = false; - } - - RefCountDisposable.prototype.dispose = function () { - if (!this.isDisposed) { - this.isDisposed = true; - this._s.dispose(); - --this._p._count === 0 && this._p._connectableSubscription.dispose(); - } + BehaviorSubject.prototype.getValue = function () { + if (this.hasError) { + throw this.thrownError; + } + else if (this.closed) { + throw new __WEBPACK_IMPORTED_MODULE_2__util_ObjectUnsubscribedError__["a" /* ObjectUnsubscribedError */](); + } + else { + return this._value; + } }; - - return RefCountObservable; - }(ObservableBase)); - - var ConnectableObservable = Rx.ConnectableObservable = (function (__super__) { - inherits(ConnectableObservable, __super__); - function ConnectableObservable(source, subject) { - this.source = source; - this._connection = null; - this._source = source.asObservable(); - this._subject = subject; - __super__.call(this); - } - - function ConnectDisposable(parent, subscription) { - this._p = parent; - this._s = subscription; - } - - ConnectDisposable.prototype.dispose = function () { - if (this._s) { - this._s.dispose(); - this._s = null; - this._p._connection = null; - } + BehaviorSubject.prototype.next = function (value) { + _super.prototype.next.call(this, this._value = value); }; + return BehaviorSubject; +}(__WEBPACK_IMPORTED_MODULE_1__Subject__["a" /* Subject */])); +//# sourceMappingURL=BehaviorSubject.js.map + + +/***/ }), +/* 384 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return empty; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(169); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_hostReportError__ = __webpack_require__(255); +/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */ + + +var empty = { + closed: true, + next: function (value) { }, + error: function (err) { + if (__WEBPACK_IMPORTED_MODULE_0__config__["a" /* config */].useDeprecatedSynchronousErrorHandling) { + throw err; + } + else { + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_hostReportError__["a" /* hostReportError */])(err); + } + }, + complete: function () { } +}; +//# sourceMappingURL=Observer.js.map + + +/***/ }), +/* 385 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Scheduler; }); +var Scheduler = /*@__PURE__*/ (function () { + function Scheduler(SchedulerAction, now) { + if (now === void 0) { + now = Scheduler.now; + } + this.SchedulerAction = SchedulerAction; + this.now = now; + } + Scheduler.prototype.schedule = function (work, delay, state) { + if (delay === void 0) { + delay = 0; + } + return new this.SchedulerAction(this, work).schedule(state, delay); + }; + Scheduler.now = function () { return Date.now(); }; + return Scheduler; +}()); + +//# sourceMappingURL=Scheduler.js.map + + +/***/ }), +/* 386 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SubjectSubscription; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscription__ = __webpack_require__(30); +/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */ + + +var SubjectSubscription = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](SubjectSubscription, _super); + function SubjectSubscription(subject, subscriber) { + var _this = _super.call(this) || this; + _this.subject = subject; + _this.subscriber = subscriber; + _this.closed = false; + return _this; + } + SubjectSubscription.prototype.unsubscribe = function () { + if (this.closed) { + return; + } + this.closed = true; + var subject = this.subject; + var observers = subject.observers; + this.subject = null; + if (!observers || observers.length === 0 || subject.isStopped || subject.closed) { + return; + } + var subscriberIndex = observers.indexOf(this.subscriber); + if (subscriberIndex !== -1) { + observers.splice(subscriberIndex, 1); + } + }; + return SubjectSubscription; +}(__WEBPACK_IMPORTED_MODULE_1__Subscription__["a" /* Subscription */])); + +//# sourceMappingURL=SubjectSubscription.js.map + + +/***/ }), +/* 387 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ConnectableObservable; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return connectableObservableDescriptor; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subject__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Subscription__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__operators_refCount__ = __webpack_require__(248); +/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */ + + + + + + +var ConnectableObservable = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ConnectableObservable, _super); + function ConnectableObservable(source, subjectFactory) { + var _this = _super.call(this) || this; + _this.source = source; + _this.subjectFactory = subjectFactory; + _this._refCount = 0; + _this._isComplete = false; + return _this; + } + ConnectableObservable.prototype._subscribe = function (subscriber) { + return this.getSubject().subscribe(subscriber); + }; + ConnectableObservable.prototype.getSubject = function () { + var subject = this._subject; + if (!subject || subject.isStopped) { + this._subject = this.subjectFactory(); + } + return this._subject; + }; ConnectableObservable.prototype.connect = function () { - if (!this._connection) { - if (this._subject.isStopped) { - return disposableEmpty; + var connection = this._connection; + if (!connection) { + this._isComplete = false; + connection = this._connection = new __WEBPACK_IMPORTED_MODULE_4__Subscription__["a" /* Subscription */](); + connection.add(this.source + .subscribe(new ConnectableSubscriber(this.getSubject(), this))); + if (connection.closed) { + this._connection = null; + connection = __WEBPACK_IMPORTED_MODULE_4__Subscription__["a" /* Subscription */].EMPTY; + } + else { + this._connection = connection; + } } - var subscription = this._source.subscribe(this._subject); - this._connection = new ConnectDisposable(this, subscription); - } - return this._connection; + return connection; }; - - ConnectableObservable.prototype._subscribe = function (o) { - return this._subject.subscribe(o); - }; - ConnectableObservable.prototype.refCount = function () { - return new RefCountObservable(this); + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__operators_refCount__["a" /* refCount */])()(this); }; - return ConnectableObservable; - }(Observable)); +}(__WEBPACK_IMPORTED_MODULE_2__Observable__["a" /* Observable */])); - /** - * Returns an observable sequence that shares a single subscription to the underlying sequence. This observable sequence - * can be resubscribed to, even if all prior subscriptions have ended. (unlike `.publish().refCount()`) - * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source. - */ - observableProto.singleInstance = function() { - var source = this, hasObservable = false, observable; - - function getObservable() { - if (!hasObservable) { - hasObservable = true; - observable = source['finally'](function() { hasObservable = false; }).publish().refCount(); - } - return observable; +var connectableProto = ConnectableObservable.prototype; +var connectableObservableDescriptor = { + operator: { value: null }, + _refCount: { value: 0, writable: true }, + _subject: { value: null, writable: true }, + _connection: { value: null, writable: true }, + _subscribe: { value: connectableProto._subscribe }, + _isComplete: { value: connectableProto._isComplete, writable: true }, + getSubject: { value: connectableProto.getSubject }, + connect: { value: connectableProto.connect }, + refCount: { value: connectableProto.refCount } +}; +var ConnectableSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ConnectableSubscriber, _super); + function ConnectableSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; } - - return new AnonymousObservable(function(o) { - return getObservable().subscribe(o); - }); - }; - - return Rx; -})); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)(module))) - -/***/ }), -/* 317 */ -/***/ (function(module, exports, __webpack_require__) { - -/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information. - -;(function (factory) { - var objectTypes = { - 'function': true, - 'object': true - }; - - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; - } - - var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) ? exports : null; - var freeModule = (objectTypes[typeof module] && module && !module.nodeType) ? module : null; - var freeGlobal = checkGlobal(freeExports && freeModule && typeof global === 'object' && global); - var freeSelf = checkGlobal(objectTypes[typeof self] && self); - var freeWindow = checkGlobal(objectTypes[typeof window] && window); - var moduleExports = (freeModule && freeModule.exports === freeExports) ? freeExports : null; - var thisGlobal = checkGlobal(objectTypes[typeof this] && this); - var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')(); - - // Because of build optimizers - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(46)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Rx, exports) { - return factory(root, exports, Rx); - }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof module === 'object' && module && module.exports === freeExports) { - module.exports = factory(root, module.exports, require('./rx')); - } else { - root.Rx = factory(root, {}, root.Rx); - } -}.call(this, function (root, exp, Rx, undefined) { - - // Aliases - var Scheduler = Rx.Scheduler, - ScheduledItem = Rx.internals.ScheduledItem, - SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive, - PriorityQueue = Rx.internals.PriorityQueue, - inherits = Rx.internals.inherits, - defaultSubComparer = Rx.helpers.defaultSubComparer, - notImplemented = Rx.helpers.notImplemented; - - /** Provides a set of extension methods for virtual time scheduling. */ - var VirtualTimeScheduler = Rx.VirtualTimeScheduler = (function (__super__) { - inherits(VirtualTimeScheduler, __super__); - - /** - * Creates a new virtual time scheduler with the specified initial clock value and absolute time comparer. - * - * @constructor - * @param {Number} initialClock Initial value for the clock. - * @param {Function} comparer Comparer to determine causality of events based on absolute time. - */ - function VirtualTimeScheduler(initialClock, comparer) { - this.clock = initialClock; - this.comparer = comparer; - this.isEnabled = false; - this.queue = new PriorityQueue(1024); - __super__.call(this); - } - - var VirtualTimeSchedulerPrototype = VirtualTimeScheduler.prototype; - - VirtualTimeSchedulerPrototype.now = function () { - return this.toAbsoluteTime(this.clock); + ConnectableSubscriber.prototype._error = function (err) { + this._unsubscribe(); + _super.prototype._error.call(this, err); }; - - VirtualTimeSchedulerPrototype.schedule = function (state, action) { - return this.scheduleAbsolute(state, this.clock, action); + ConnectableSubscriber.prototype._complete = function () { + this.connectable._isComplete = true; + this._unsubscribe(); + _super.prototype._complete.call(this); }; - - VirtualTimeSchedulerPrototype.scheduleFuture = function (state, dueTime, action) { - var dt = dueTime instanceof Date ? - this.toRelativeTime(dueTime - this.now()) : - this.toRelativeTime(dueTime); - - return this.scheduleRelative(state, dt, action); - }; - - /** - * Adds a relative time value to an absolute time value. - * @param {Number} absolute Absolute virtual time value. - * @param {Number} relative Relative virtual time value to add. - * @return {Number} Resulting absolute virtual time sum value. - */ - VirtualTimeSchedulerPrototype.add = notImplemented; - - /** - * Converts an absolute time to a number - * @param {Any} The absolute time. - * @returns {Number} The absolute time in ms - */ - VirtualTimeSchedulerPrototype.toAbsoluteTime = notImplemented; - - /** - * Converts the TimeSpan value to a relative virtual time value. - * @param {Number} timeSpan TimeSpan value to convert. - * @return {Number} Corresponding relative virtual time value. - */ - VirtualTimeSchedulerPrototype.toRelativeTime = notImplemented; - - /** - * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be emulated using recursive scheduling. - * @param {Mixed} state Initial state passed to the action upon the first iteration. - * @param {Number} period Period for running the work periodically. - * @param {Function} action Action to be executed, potentially updating the state. - * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort). - */ - VirtualTimeSchedulerPrototype.schedulePeriodic = function (state, period, action) { - var s = new SchedulePeriodicRecursive(this, state, period, action); - return s.start(); - }; - - /** - * Schedules an action to be executed after dueTime. - * @param {Mixed} state State passed to the action to be executed. - * @param {Number} dueTime Relative time after which to execute the action. - * @param {Function} action Action to be executed. - * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). - */ - VirtualTimeSchedulerPrototype.scheduleRelative = function (state, dueTime, action) { - var runAt = this.add(this.clock, dueTime); - return this.scheduleAbsolute(state, runAt, action); - }; - - /** - * Starts the virtual time scheduler. - */ - VirtualTimeSchedulerPrototype.start = function () { - if (!this.isEnabled) { - this.isEnabled = true; - do { - var next = this.getNext(); - if (next !== null) { - this.comparer(next.dueTime, this.clock) > 0 && (this.clock = next.dueTime); - next.invoke(); - } else { - this.isEnabled = false; - } - } while (this.isEnabled); - } - }; - - /** - * Stops the virtual time scheduler. - */ - VirtualTimeSchedulerPrototype.stop = function () { - this.isEnabled = false; - }; - - /** - * Advances the scheduler's clock to the specified time, running all work till that point. - * @param {Number} time Absolute time to advance the scheduler's clock to. - */ - VirtualTimeSchedulerPrototype.advanceTo = function (time) { - var dueToClock = this.comparer(this.clock, time); - if (this.comparer(this.clock, time) > 0) { throw new ArgumentOutOfRangeError(); } - if (dueToClock === 0) { return; } - if (!this.isEnabled) { - this.isEnabled = true; - do { - var next = this.getNext(); - if (next !== null && this.comparer(next.dueTime, time) <= 0) { - this.comparer(next.dueTime, this.clock) > 0 && (this.clock = next.dueTime); - next.invoke(); - } else { - this.isEnabled = false; - } - } while (this.isEnabled); - this.clock = time; - } - }; - - /** - * Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan. - * @param {Number} time Relative time to advance the scheduler's clock by. - */ - VirtualTimeSchedulerPrototype.advanceBy = function (time) { - var dt = this.add(this.clock, time), - dueToClock = this.comparer(this.clock, dt); - if (dueToClock > 0) { throw new ArgumentOutOfRangeError(); } - if (dueToClock === 0) { return; } - - this.advanceTo(dt); - }; - - /** - * Advances the scheduler's clock by the specified relative time. - * @param {Number} time Relative time to advance the scheduler's clock by. - */ - VirtualTimeSchedulerPrototype.sleep = function (time) { - var dt = this.add(this.clock, time); - if (this.comparer(this.clock, dt) >= 0) { throw new ArgumentOutOfRangeError(); } - - this.clock = dt; - }; - - /** - * Gets the next scheduled item to be executed. - * @returns {ScheduledItem} The next scheduled item. - */ - VirtualTimeSchedulerPrototype.getNext = function () { - while (this.queue.length > 0) { - var next = this.queue.peek(); - if (next.isCancelled()) { - this.queue.dequeue(); - } else { - return next; + ConnectableSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (connectable) { + this.connectable = null; + var connection = connectable._connection; + connectable._refCount = 0; + connectable._subject = null; + connectable._connection = null; + if (connection) { + connection.unsubscribe(); + } } - } - return null; }; - - /** - * Schedules an action to be executed at dueTime. - * @param {Mixed} state State passed to the action to be executed. - * @param {Number} dueTime Absolute time at which to execute the action. - * @param {Function} action Action to be executed. - * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). - */ - VirtualTimeSchedulerPrototype.scheduleAbsolute = function (state, dueTime, action) { - var self = this; - - function run(scheduler, state1) { - self.queue.remove(si); - return action(scheduler, state1); - } - - var si = new ScheduledItem(this, state, run, dueTime, this.comparer); - this.queue.enqueue(si); - - return si.disposable; - }; - - return VirtualTimeScheduler; - }(Scheduler)); - - /** Provides a virtual time scheduler that uses Date for absolute time and number for relative time. */ - Rx.HistoricalScheduler = (function (__super__) { - inherits(HistoricalScheduler, __super__); - - /** - * Creates a new historical scheduler with the specified initial clock value. - * @constructor - * @param {Number} initialClock Initial value for the clock. - * @param {Function} comparer Comparer to determine causality of events based on absolute time. - */ - function HistoricalScheduler(initialClock, comparer) { - var clock = initialClock == null ? 0 : initialClock; - var cmp = comparer || defaultSubComparer; - __super__.call(this, clock, cmp); + return ConnectableSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subject__["b" /* SubjectSubscriber */])); +var RefCountOperator = /*@__PURE__*/ (function () { + function RefCountOperator(connectable) { + this.connectable = connectable; } - - var HistoricalSchedulerProto = HistoricalScheduler.prototype; - - /** - * Adds a relative time value to an absolute time value. - * @param {Number} absolute Absolute virtual time value. - * @param {Number} relative Relative virtual time value to add. - * @return {Number} Resulting absolute virtual time sum value. - */ - HistoricalSchedulerProto.add = function (absolute, relative) { - return absolute + relative; + RefCountOperator.prototype.call = function (subscriber, source) { + var connectable = this.connectable; + connectable._refCount++; + var refCounter = new RefCountSubscriber(subscriber, connectable); + var subscription = source.subscribe(refCounter); + if (!refCounter.closed) { + refCounter.connection = connectable.connect(); + } + return subscription; }; - - HistoricalSchedulerProto.toAbsoluteTime = function (absolute) { - return new Date(absolute).getTime(); + return RefCountOperator; +}()); +var RefCountSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](RefCountSubscriber, _super); + function RefCountSubscriber(destination, connectable) { + var _this = _super.call(this, destination) || this; + _this.connectable = connectable; + return _this; + } + RefCountSubscriber.prototype._unsubscribe = function () { + var connectable = this.connectable; + if (!connectable) { + this.connection = null; + return; + } + this.connectable = null; + var refCount = connectable._refCount; + if (refCount <= 0) { + this.connection = null; + return; + } + connectable._refCount = refCount - 1; + if (refCount > 1) { + this.connection = null; + return; + } + var connection = this.connection; + var sharedConnection = connectable._connection; + this.connection = null; + if (sharedConnection && (!connection || sharedConnection === connection)) { + sharedConnection.unsubscribe(); + } }; + return RefCountSubscriber; +}(__WEBPACK_IMPORTED_MODULE_3__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=ConnectableObservable.js.map - /** - * Converts the TimeSpan value to a relative virtual time value. - * @memberOf HistoricalScheduler - * @param {Number} timeSpan TimeSpan value to convert. - * @return {Number} Corresponding relative virtual time value. - */ - HistoricalSchedulerProto.toRelativeTime = function (timeSpan) { - return timeSpan; - }; - - return HistoricalScheduler; - }(Rx.VirtualTimeScheduler)); - - return Rx; -})); - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)(module))) /***/ }), -/* 318 */ +/* 388 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = merge; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isScheduler__ = __webpack_require__(55); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__ = __webpack_require__(247); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fromArray__ = __webpack_require__(79); +/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */ + + + + +function merge() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + var concurrent = Number.POSITIVE_INFINITY; + var scheduler = null; + var last = observables[observables.length - 1]; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isScheduler__["a" /* isScheduler */])(last)) { + scheduler = observables.pop(); + if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') { + concurrent = observables.pop(); + } + } + else if (typeof last === 'number') { + concurrent = observables.pop(); + } + if (scheduler === null && observables.length === 1 && observables[0] instanceof __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */]) { + return observables[0]; + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__operators_mergeAll__["a" /* mergeAll */])(concurrent)(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__fromArray__["a" /* fromArray */])(observables, scheduler)); +} +//# sourceMappingURL=merge.js.map + + +/***/ }), +/* 389 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NEVER; }); +/* harmony export (immutable) */ __webpack_exports__["a"] = never; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_noop__ = __webpack_require__(175); +/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */ + + +var NEVER = /*@__PURE__*/ new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](__WEBPACK_IMPORTED_MODULE_1__util_noop__["a" /* noop */]); +function never() { + return NEVER; +} +//# sourceMappingURL=never.js.map + + +/***/ }), +/* 390 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = race; +/* unused harmony export RaceOperator */ +/* unused harmony export RaceSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_isArray__ = __webpack_require__(47); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__fromArray__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(19); +/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ + + + + + +function race() { + var observables = []; + for (var _i = 0; _i < arguments.length; _i++) { + observables[_i] = arguments[_i]; + } + if (observables.length === 1) { + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_isArray__["a" /* isArray */])(observables[0])) { + observables = observables[0]; + } + else { + return observables[0]; + } + } + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__fromArray__["a" /* fromArray */])(observables, undefined).lift(new RaceOperator()); +} +var RaceOperator = /*@__PURE__*/ (function () { + function RaceOperator() { + } + RaceOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new RaceSubscriber(subscriber)); + }; + return RaceOperator; +}()); + +var RaceSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](RaceSubscriber, _super); + function RaceSubscriber(destination) { + var _this = _super.call(this, destination) || this; + _this.hasFirst = false; + _this.observables = []; + _this.subscriptions = []; + return _this; + } + RaceSubscriber.prototype._next = function (observable) { + this.observables.push(observable); + }; + RaceSubscriber.prototype._complete = function () { + var observables = this.observables; + var len = observables.length; + if (len === 0) { + this.destination.complete(); + } + else { + for (var i = 0; i < len && !this.hasFirst; i++) { + var observable = observables[i]; + var subscription = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__["a" /* subscribeToResult */])(this, observable, observable, i); + if (this.subscriptions) { + this.subscriptions.push(subscription); + } + this.add(subscription); + } + this.observables = null; + } + }; + RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + if (!this.hasFirst) { + this.hasFirst = true; + for (var i = 0; i < this.subscriptions.length; i++) { + if (i !== outerIndex) { + var subscription = this.subscriptions[i]; + subscription.unsubscribe(); + this.remove(subscription); + } + } + this.subscriptions = null; + } + this.destination.next(innerValue); + }; + return RaceSubscriber; +}(__WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__["a" /* OuterSubscriber */])); + +//# sourceMappingURL=race.js.map + + +/***/ }), +/* 391 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = timer; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isNumeric__ = __webpack_require__(174); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isScheduler__ = __webpack_require__(55); +/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */ + + + + +function timer(dueTime, periodOrScheduler, scheduler) { + if (dueTime === void 0) { + dueTime = 0; + } + var period = -1; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isNumeric__["a" /* isNumeric */])(periodOrScheduler)) { + period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler); + } + else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_isScheduler__["a" /* isScheduler */])(periodOrScheduler)) { + scheduler = periodOrScheduler; + } + if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_isScheduler__["a" /* isScheduler */])(scheduler)) { + scheduler = __WEBPACK_IMPORTED_MODULE_1__scheduler_async__["a" /* async */]; + } + return new __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */](function (subscriber) { + var due = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isNumeric__["a" /* isNumeric */])(dueTime) + ? dueTime + : (+dueTime - scheduler.now()); + return scheduler.schedule(dispatch, due, { + index: 0, period: period, subscriber: subscriber + }); + }); +} +function dispatch(state) { + var index = state.index, period = state.period, subscriber = state.subscriber; + subscriber.next(index); + if (subscriber.closed) { + return; + } + else if (period === -1) { + return subscriber.complete(); + } + state.index = index + 1; + this.schedule(state, period); +} +//# sourceMappingURL=timer.js.map + + +/***/ }), +/* 392 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = audit; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_tryCatch__ = __webpack_require__(57); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_errorObject__ = __webpack_require__(54); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(19); +/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ + + + + + +function audit(durationSelector) { + return function auditOperatorFunction(source) { + return source.lift(new AuditOperator(durationSelector)); + }; +} +var AuditOperator = /*@__PURE__*/ (function () { + function AuditOperator(durationSelector) { + this.durationSelector = durationSelector; + } + AuditOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector)); + }; + return AuditOperator; +}()); +var AuditSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](AuditSubscriber, _super); + function AuditSubscriber(destination, durationSelector) { + var _this = _super.call(this, destination) || this; + _this.durationSelector = durationSelector; + _this.hasValue = false; + return _this; + } + AuditSubscriber.prototype._next = function (value) { + this.value = value; + this.hasValue = true; + if (!this.throttled) { + var duration = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util_tryCatch__["a" /* tryCatch */])(this.durationSelector)(value); + if (duration === __WEBPACK_IMPORTED_MODULE_2__util_errorObject__["a" /* errorObject */]) { + this.destination.error(__WEBPACK_IMPORTED_MODULE_2__util_errorObject__["a" /* errorObject */].e); + } + else { + var innerSubscription = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__["a" /* subscribeToResult */])(this, duration); + if (!innerSubscription || innerSubscription.closed) { + this.clearThrottle(); + } + else { + this.add(this.throttled = innerSubscription); + } + } + } + }; + AuditSubscriber.prototype.clearThrottle = function () { + var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled; + if (throttled) { + this.remove(throttled); + this.throttled = null; + throttled.unsubscribe(); + } + if (hasValue) { + this.value = null; + this.hasValue = false; + this.destination.next(value); + } + }; + AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) { + this.clearThrottle(); + }; + AuditSubscriber.prototype.notifyComplete = function () { + this.clearThrottle(); + }; + return AuditSubscriber; +}(__WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__["a" /* OuterSubscriber */])); +//# sourceMappingURL=audit.js.map + + +/***/ }), +/* 393 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = concatAll; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeAll__ = __webpack_require__(247); +/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */ + +function concatAll() { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__mergeAll__["a" /* mergeAll */])(1); +} +//# sourceMappingURL=concatAll.js.map + + +/***/ }), +/* 394 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = concatMap; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mergeMap__ = __webpack_require__(131); +/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */ + +function concatMap(project, resultSelector) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__mergeMap__["a" /* mergeMap */])(project, resultSelector, 1); +} +//# sourceMappingURL=concatMap.js.map + + +/***/ }), +/* 395 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = distinctUntilChanged; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_tryCatch__ = __webpack_require__(57); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_errorObject__ = __webpack_require__(54); +/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */ + + + + +function distinctUntilChanged(compare, keySelector) { + return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); }; +} +var DistinctUntilChangedOperator = /*@__PURE__*/ (function () { + function DistinctUntilChangedOperator(compare, keySelector) { + this.compare = compare; + this.keySelector = keySelector; + } + DistinctUntilChangedOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector)); + }; + return DistinctUntilChangedOperator; +}()); +var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](DistinctUntilChangedSubscriber, _super); + function DistinctUntilChangedSubscriber(destination, compare, keySelector) { + var _this = _super.call(this, destination) || this; + _this.keySelector = keySelector; + _this.hasKey = false; + if (typeof compare === 'function') { + _this.compare = compare; + } + return _this; + } + DistinctUntilChangedSubscriber.prototype.compare = function (x, y) { + return x === y; + }; + DistinctUntilChangedSubscriber.prototype._next = function (value) { + var keySelector = this.keySelector; + var key = value; + if (keySelector) { + key = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_tryCatch__["a" /* tryCatch */])(this.keySelector)(value); + if (key === __WEBPACK_IMPORTED_MODULE_3__util_errorObject__["a" /* errorObject */]) { + return this.destination.error(__WEBPACK_IMPORTED_MODULE_3__util_errorObject__["a" /* errorObject */].e); + } + } + var result = false; + if (this.hasKey) { + result = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_tryCatch__["a" /* tryCatch */])(this.compare)(this.key, key); + if (result === __WEBPACK_IMPORTED_MODULE_3__util_errorObject__["a" /* errorObject */]) { + return this.destination.error(__WEBPACK_IMPORTED_MODULE_3__util_errorObject__["a" /* errorObject */].e); + } + } + else { + this.hasKey = true; + } + if (Boolean(result) === false) { + this.key = key; + this.destination.next(value); + } + }; + return DistinctUntilChangedSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=distinctUntilChanged.js.map + + +/***/ }), +/* 396 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = find; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return FindValueOperator; }); +/* unused harmony export FindValueSubscriber */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */ + + +function find(predicate, thisArg) { + if (typeof predicate !== 'function') { + throw new TypeError('predicate is not a function'); + } + return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); }; +} +var FindValueOperator = /*@__PURE__*/ (function () { + function FindValueOperator(predicate, source, yieldIndex, thisArg) { + this.predicate = predicate; + this.source = source; + this.yieldIndex = yieldIndex; + this.thisArg = thisArg; + } + FindValueOperator.prototype.call = function (observer, source) { + return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg)); + }; + return FindValueOperator; +}()); + +var FindValueSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](FindValueSubscriber, _super); + function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) { + var _this = _super.call(this, destination) || this; + _this.predicate = predicate; + _this.source = source; + _this.yieldIndex = yieldIndex; + _this.thisArg = thisArg; + _this.index = 0; + return _this; + } + FindValueSubscriber.prototype.notifyComplete = function (value) { + var destination = this.destination; + destination.next(value); + destination.complete(); + this.unsubscribe(); + }; + FindValueSubscriber.prototype._next = function (value) { + var _a = this, predicate = _a.predicate, thisArg = _a.thisArg; + var index = this.index++; + try { + var result = predicate.call(thisArg || this, value, index, this.source); + if (result) { + this.notifyComplete(this.yieldIndex ? index : value); + } + } + catch (err) { + this.destination.error(err); + } + }; + FindValueSubscriber.prototype._complete = function () { + this.notifyComplete(this.yieldIndex ? -1 : undefined); + }; + return FindValueSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); + +//# sourceMappingURL=find.js.map + + +/***/ }), +/* 397 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["b"] = groupBy; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GroupedObservable; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Subscription__ = __webpack_require__(30); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Subject__ = __webpack_require__(42); +/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */ + + + + + +function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) { + return function (source) { + return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector)); + }; +} +var GroupByOperator = /*@__PURE__*/ (function () { + function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) { + this.keySelector = keySelector; + this.elementSelector = elementSelector; + this.durationSelector = durationSelector; + this.subjectSelector = subjectSelector; + } + GroupByOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector)); + }; + return GroupByOperator; +}()); +var GroupBySubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](GroupBySubscriber, _super); + function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) { + var _this = _super.call(this, destination) || this; + _this.keySelector = keySelector; + _this.elementSelector = elementSelector; + _this.durationSelector = durationSelector; + _this.subjectSelector = subjectSelector; + _this.groups = null; + _this.attemptedToUnsubscribe = false; + _this.count = 0; + return _this; + } + GroupBySubscriber.prototype._next = function (value) { + var key; + try { + key = this.keySelector(value); + } + catch (err) { + this.error(err); + return; + } + this._group(value, key); + }; + GroupBySubscriber.prototype._group = function (value, key) { + var groups = this.groups; + if (!groups) { + groups = this.groups = new Map(); + } + var group = groups.get(key); + var element; + if (this.elementSelector) { + try { + element = this.elementSelector(value); + } + catch (err) { + this.error(err); + } + } + else { + element = value; + } + if (!group) { + group = (this.subjectSelector ? this.subjectSelector() : new __WEBPACK_IMPORTED_MODULE_4__Subject__["a" /* Subject */]()); + groups.set(key, group); + var groupedObservable = new GroupedObservable(key, group, this); + this.destination.next(groupedObservable); + if (this.durationSelector) { + var duration = void 0; + try { + duration = this.durationSelector(new GroupedObservable(key, group)); + } + catch (err) { + this.error(err); + return; + } + this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this))); + } + } + if (!group.closed) { + group.next(element); + } + }; + GroupBySubscriber.prototype._error = function (err) { + var groups = this.groups; + if (groups) { + groups.forEach(function (group, key) { + group.error(err); + }); + groups.clear(); + } + this.destination.error(err); + }; + GroupBySubscriber.prototype._complete = function () { + var groups = this.groups; + if (groups) { + groups.forEach(function (group, key) { + group.complete(); + }); + groups.clear(); + } + this.destination.complete(); + }; + GroupBySubscriber.prototype.removeGroup = function (key) { + this.groups.delete(key); + }; + GroupBySubscriber.prototype.unsubscribe = function () { + if (!this.closed) { + this.attemptedToUnsubscribe = true; + if (this.count === 0) { + _super.prototype.unsubscribe.call(this); + } + } + }; + return GroupBySubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](GroupDurationSubscriber, _super); + function GroupDurationSubscriber(key, group, parent) { + var _this = _super.call(this, group) || this; + _this.key = key; + _this.group = group; + _this.parent = parent; + return _this; + } + GroupDurationSubscriber.prototype._next = function (value) { + this.complete(); + }; + GroupDurationSubscriber.prototype._unsubscribe = function () { + var _a = this, parent = _a.parent, key = _a.key; + this.key = this.parent = null; + if (parent) { + parent.removeGroup(key); + } + }; + return GroupDurationSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +var GroupedObservable = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](GroupedObservable, _super); + function GroupedObservable(key, groupSubject, refCountSubscription) { + var _this = _super.call(this) || this; + _this.key = key; + _this.groupSubject = groupSubject; + _this.refCountSubscription = refCountSubscription; + return _this; + } + GroupedObservable.prototype._subscribe = function (subscriber) { + var subscription = new __WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */](); + var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject; + if (refCountSubscription && !refCountSubscription.closed) { + subscription.add(new InnerRefCountSubscription(refCountSubscription)); + } + subscription.add(groupSubject.subscribe(subscriber)); + return subscription; + }; + return GroupedObservable; +}(__WEBPACK_IMPORTED_MODULE_3__Observable__["a" /* Observable */])); + +var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](InnerRefCountSubscription, _super); + function InnerRefCountSubscription(parent) { + var _this = _super.call(this) || this; + _this.parent = parent; + parent.count++; + return _this; + } + InnerRefCountSubscription.prototype.unsubscribe = function () { + var parent = this.parent; + if (!parent.closed && !this.closed) { + _super.prototype.unsubscribe.call(this); + parent.count -= 1; + if (parent.count === 0 && parent.attemptedToUnsubscribe) { + parent.unsubscribe(); + } + } + }; + return InnerRefCountSubscription; +}(__WEBPACK_IMPORTED_MODULE_2__Subscription__["a" /* Subscription */])); +//# sourceMappingURL=groupBy.js.map + + +/***/ }), +/* 398 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["b"] = observeOn; +/* unused harmony export ObserveOnOperator */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ObserveOnSubscriber; }); +/* unused harmony export ObserveOnMessage */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Notification__ = __webpack_require__(168); +/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */ + + + +function observeOn(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + return function observeOnOperatorFunction(source) { + return source.lift(new ObserveOnOperator(scheduler, delay)); + }; +} +var ObserveOnOperator = /*@__PURE__*/ (function () { + function ObserveOnOperator(scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + this.scheduler = scheduler; + this.delay = delay; + } + ObserveOnOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay)); + }; + return ObserveOnOperator; +}()); + +var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ObserveOnSubscriber, _super); + function ObserveOnSubscriber(destination, scheduler, delay) { + if (delay === void 0) { + delay = 0; + } + var _this = _super.call(this, destination) || this; + _this.scheduler = scheduler; + _this.delay = delay; + return _this; + } + ObserveOnSubscriber.dispatch = function (arg) { + var notification = arg.notification, destination = arg.destination; + notification.observe(destination); + this.unsubscribe(); + }; + ObserveOnSubscriber.prototype.scheduleMessage = function (notification) { + var destination = this.destination; + destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination))); + }; + ObserveOnSubscriber.prototype._next = function (value) { + this.scheduleMessage(__WEBPACK_IMPORTED_MODULE_2__Notification__["a" /* Notification */].createNext(value)); + }; + ObserveOnSubscriber.prototype._error = function (err) { + this.scheduleMessage(__WEBPACK_IMPORTED_MODULE_2__Notification__["a" /* Notification */].createError(err)); + this.unsubscribe(); + }; + ObserveOnSubscriber.prototype._complete = function () { + this.scheduleMessage(__WEBPACK_IMPORTED_MODULE_2__Notification__["a" /* Notification */].createComplete()); + this.unsubscribe(); + }; + return ObserveOnSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); + +var ObserveOnMessage = /*@__PURE__*/ (function () { + function ObserveOnMessage(notification, destination) { + this.notification = notification; + this.destination = destination; + } + return ObserveOnMessage; +}()); + +//# sourceMappingURL=observeOn.js.map + + +/***/ }), +/* 399 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = tap; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Subscriber__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_noop__ = __webpack_require__(175); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_isFunction__ = __webpack_require__(137); +/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */ + + + + +function tap(nextOrObserver, error, complete) { + return function tapOperatorFunction(source) { + return source.lift(new DoOperator(nextOrObserver, error, complete)); + }; +} +var DoOperator = /*@__PURE__*/ (function () { + function DoOperator(nextOrObserver, error, complete) { + this.nextOrObserver = nextOrObserver; + this.error = error; + this.complete = complete; + } + DoOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete)); + }; + return DoOperator; +}()); +var TapSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](TapSubscriber, _super); + function TapSubscriber(destination, observerOrNext, error, complete) { + var _this = _super.call(this, destination) || this; + _this._tapNext = __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + _this._tapError = __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + _this._tapComplete = __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + _this._tapError = error || __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + _this._tapComplete = complete || __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__util_isFunction__["a" /* isFunction */])(observerOrNext)) { + _this._context = _this; + _this._tapNext = observerOrNext; + } + else if (observerOrNext) { + _this._context = observerOrNext; + _this._tapNext = observerOrNext.next || __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + _this._tapError = observerOrNext.error || __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + _this._tapComplete = observerOrNext.complete || __WEBPACK_IMPORTED_MODULE_2__util_noop__["a" /* noop */]; + } + return _this; + } + TapSubscriber.prototype._next = function (value) { + try { + this._tapNext.call(this._context, value); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.next(value); + }; + TapSubscriber.prototype._error = function (err) { + try { + this._tapError.call(this._context, err); + } + catch (err) { + this.destination.error(err); + return; + } + this.destination.error(err); + }; + TapSubscriber.prototype._complete = function () { + try { + this._tapComplete.call(this._context); + } + catch (err) { + this.destination.error(err); + return; + } + return this.destination.complete(); + }; + return TapSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__Subscriber__["a" /* Subscriber */])); +//# sourceMappingURL=tap.js.map + + +/***/ }), +/* 400 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return defaultThrottleConfig; }); +/* harmony export (immutable) */ __webpack_exports__["a"] = throttle; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_subscribeToResult__ = __webpack_require__(19); +/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ + + + +var defaultThrottleConfig = { + leading: true, + trailing: false +}; +function throttle(durationSelector, config) { + if (config === void 0) { + config = defaultThrottleConfig; + } + return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); }; +} +var ThrottleOperator = /*@__PURE__*/ (function () { + function ThrottleOperator(durationSelector, leading, trailing) { + this.durationSelector = durationSelector; + this.leading = leading; + this.trailing = trailing; + } + ThrottleOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing)); + }; + return ThrottleOperator; +}()); +var ThrottleSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](ThrottleSubscriber, _super); + function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) { + var _this = _super.call(this, destination) || this; + _this.destination = destination; + _this.durationSelector = durationSelector; + _this._leading = _leading; + _this._trailing = _trailing; + _this._hasValue = false; + return _this; + } + ThrottleSubscriber.prototype._next = function (value) { + this._hasValue = true; + this._sendValue = value; + if (!this._throttled) { + if (this._leading) { + this.send(); + } + else { + this.throttle(value); + } + } + }; + ThrottleSubscriber.prototype.send = function () { + var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue; + if (_hasValue) { + this.destination.next(_sendValue); + this.throttle(_sendValue); + } + this._hasValue = false; + this._sendValue = null; + }; + ThrottleSubscriber.prototype.throttle = function (value) { + var duration = this.tryDurationSelector(value); + if (duration) { + this.add(this._throttled = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_subscribeToResult__["a" /* subscribeToResult */])(this, duration)); + } + }; + ThrottleSubscriber.prototype.tryDurationSelector = function (value) { + try { + return this.durationSelector(value); + } + catch (err) { + this.destination.error(err); + return null; + } + }; + ThrottleSubscriber.prototype.throttlingDone = function () { + var _a = this, _throttled = _a._throttled, _trailing = _a._trailing; + if (_throttled) { + _throttled.unsubscribe(); + } + this._throttled = null; + if (_trailing) { + this.send(); + } + }; + ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { + this.throttlingDone(); + }; + ThrottleSubscriber.prototype.notifyComplete = function () { + this.throttlingDone(); + }; + return ThrottleSubscriber; +}(__WEBPACK_IMPORTED_MODULE_1__OuterSubscriber__["a" /* OuterSubscriber */])); +//# sourceMappingURL=throttle.js.map + + +/***/ }), +/* 401 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = timeoutWith; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_tslib__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__scheduler_async__ = __webpack_require__(46); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_isDate__ = __webpack_require__(407); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__ = __webpack_require__(19); +/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */ + + + + + +function timeoutWith(due, withObservable, scheduler) { + if (scheduler === void 0) { + scheduler = __WEBPACK_IMPORTED_MODULE_1__scheduler_async__["a" /* async */]; + } + return function (source) { + var absoluteTimeout = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__util_isDate__["a" /* isDate */])(due); + var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due); + return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler)); + }; +} +var TimeoutWithOperator = /*@__PURE__*/ (function () { + function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) { + this.waitFor = waitFor; + this.absoluteTimeout = absoluteTimeout; + this.withObservable = withObservable; + this.scheduler = scheduler; + } + TimeoutWithOperator.prototype.call = function (subscriber, source) { + return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler)); + }; + return TimeoutWithOperator; +}()); +var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) { + __WEBPACK_IMPORTED_MODULE_0_tslib__["a" /* __extends */](TimeoutWithSubscriber, _super); + function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) { + var _this = _super.call(this, destination) || this; + _this.absoluteTimeout = absoluteTimeout; + _this.waitFor = waitFor; + _this.withObservable = withObservable; + _this.scheduler = scheduler; + _this.action = null; + _this.scheduleTimeout(); + return _this; + } + TimeoutWithSubscriber.dispatchTimeout = function (subscriber) { + var withObservable = subscriber.withObservable; + subscriber._unsubscribeAndRecycle(); + subscriber.add(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__util_subscribeToResult__["a" /* subscribeToResult */])(subscriber, withObservable)); + }; + TimeoutWithSubscriber.prototype.scheduleTimeout = function () { + var action = this.action; + if (action) { + this.action = action.schedule(this, this.waitFor); + } + else { + this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this)); + } + }; + TimeoutWithSubscriber.prototype._next = function (value) { + if (!this.absoluteTimeout) { + this.scheduleTimeout(); + } + _super.prototype._next.call(this, value); + }; + TimeoutWithSubscriber.prototype._unsubscribe = function () { + this.action = null; + this.scheduler = null; + this.withObservable = null; + }; + return TimeoutWithSubscriber; +}(__WEBPACK_IMPORTED_MODULE_3__OuterSubscriber__["a" /* OuterSubscriber */])); +//# sourceMappingURL=timeoutWith.js.map + + +/***/ }), +/* 402 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return asap; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsapAction__ = __webpack_require__(962); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__AsapScheduler__ = __webpack_require__(963); +/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */ + + +var asap = /*@__PURE__*/ new __WEBPACK_IMPORTED_MODULE_1__AsapScheduler__["a" /* AsapScheduler */](__WEBPACK_IMPORTED_MODULE_0__AsapAction__["a" /* AsapAction */]); +//# sourceMappingURL=asap.js.map + + +/***/ }), +/* 403 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return queue; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__QueueAction__ = __webpack_require__(964); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__QueueScheduler__ = __webpack_require__(965); +/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */ + + +var queue = /*@__PURE__*/ new __WEBPACK_IMPORTED_MODULE_1__QueueScheduler__["a" /* QueueScheduler */](__WEBPACK_IMPORTED_MODULE_0__QueueAction__["a" /* QueueAction */]); +//# sourceMappingURL=queue.js.map + + +/***/ }), +/* 404 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TimeoutError; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function TimeoutErrorImpl() { + Error.call(this); + this.message = 'Timeout has occurred'; + this.name = 'TimeoutError'; + return this; +} +TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype); +var TimeoutError = TimeoutErrorImpl; +//# sourceMappingURL=TimeoutError.js.map + + +/***/ }), +/* 405 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UnsubscriptionError; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function UnsubscriptionErrorImpl(errors) { + Error.call(this); + this.message = errors ? + errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : ''; + this.name = 'UnsubscriptionError'; + this.errors = errors; + return this; +} +UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype); +var UnsubscriptionError = UnsubscriptionErrorImpl; +//# sourceMappingURL=UnsubscriptionError.js.map + + +/***/ }), +/* 406 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isArrayLike; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); +//# sourceMappingURL=isArrayLike.js.map + + +/***/ }), +/* 407 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isDate; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function isDate(value) { + return value instanceof Date && !isNaN(+value); +} +//# sourceMappingURL=isDate.js.map + + +/***/ }), +/* 408 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isObject; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function isObject(x) { + return x != null && typeof x === 'object'; +} +//# sourceMappingURL=isObject.js.map + + +/***/ }), +/* 409 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = isPromise; +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +function isPromise(value) { + return value && typeof value.subscribe !== 'function' && typeof value.then === 'function'; +} +//# sourceMappingURL=isPromise.js.map + + +/***/ }), +/* 410 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeTo; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Observable__ = __webpack_require__(16); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__subscribeToArray__ = __webpack_require__(411); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__subscribeToPromise__ = __webpack_require__(414); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__subscribeToIterable__ = __webpack_require__(412); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__subscribeToObservable__ = __webpack_require__(413); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArrayLike__ = __webpack_require__(406); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isPromise__ = __webpack_require__(409); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isObject__ = __webpack_require__(408); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__symbol_iterator__ = __webpack_require__(134); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__symbol_observable__ = __webpack_require__(105); +/** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */ + + + + + + + + + + +var subscribeTo = function (result) { + if (result instanceof __WEBPACK_IMPORTED_MODULE_0__Observable__["a" /* Observable */]) { + return function (subscriber) { + if (result._isScalar) { + subscriber.next(result.value); + subscriber.complete(); + return undefined; + } + else { + return result.subscribe(subscriber); + } + }; + } + else if (result && typeof result[__WEBPACK_IMPORTED_MODULE_9__symbol_observable__["a" /* observable */]] === 'function') { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__subscribeToObservable__["a" /* subscribeToObservable */])(result); + } + else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__isArrayLike__["a" /* isArrayLike */])(result)) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__subscribeToArray__["a" /* subscribeToArray */])(result); + } + else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__isPromise__["a" /* isPromise */])(result)) { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__subscribeToPromise__["a" /* subscribeToPromise */])(result); + } + else if (result && typeof result[__WEBPACK_IMPORTED_MODULE_8__symbol_iterator__["a" /* iterator */]] === 'function') { + return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__subscribeToIterable__["a" /* subscribeToIterable */])(result); + } + else { + var value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__isObject__["a" /* isObject */])(result) ? 'an invalid object' : "'" + result + "'"; + var msg = "You provided " + value + " where a stream was expected." + + ' You can provide an Observable, Promise, Array, or Iterable.'; + throw new TypeError(msg); + } +}; +//# sourceMappingURL=subscribeTo.js.map + + +/***/ }), +/* 411 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToArray; }); +/** PURE_IMPORTS_START PURE_IMPORTS_END */ +var subscribeToArray = function (array) { + return function (subscriber) { + for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) { + subscriber.next(array[i]); + } + if (!subscriber.closed) { + subscriber.complete(); + } + }; +}; +//# sourceMappingURL=subscribeToArray.js.map + + +/***/ }), +/* 412 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToIterable; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_iterator__ = __webpack_require__(134); +/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */ + +var subscribeToIterable = function (iterable) { + return function (subscriber) { + var iterator = iterable[__WEBPACK_IMPORTED_MODULE_0__symbol_iterator__["a" /* iterator */]](); + do { + var item = iterator.next(); + if (item.done) { + subscriber.complete(); + break; + } + subscriber.next(item.value); + if (subscriber.closed) { + break; + } + } while (true); + if (typeof iterator.return === 'function') { + subscriber.add(function () { + if (iterator.return) { + iterator.return(); + } + }); + } + return subscriber; + }; +}; +//# sourceMappingURL=subscribeToIterable.js.map + + +/***/ }), +/* 413 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToObservable; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__symbol_observable__ = __webpack_require__(105); +/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */ + +var subscribeToObservable = function (obj) { + return function (subscriber) { + var obs = obj[__WEBPACK_IMPORTED_MODULE_0__symbol_observable__["a" /* observable */]](); + if (typeof obs.subscribe !== 'function') { + throw new TypeError('Provided object does not correctly implement Symbol.observable'); + } + else { + return obs.subscribe(subscriber); + } + }; +}; +//# sourceMappingURL=subscribeToObservable.js.map + + +/***/ }), +/* 414 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return subscribeToPromise; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hostReportError__ = __webpack_require__(255); +/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */ + +var subscribeToPromise = function (promise) { + return function (subscriber) { + promise.then(function (value) { + if (!subscriber.closed) { + subscriber.next(value); + subscriber.complete(); + } + }, function (err) { return subscriber.error(err); }) + .then(null, __WEBPACK_IMPORTED_MODULE_0__hostReportError__["a" /* hostReportError */]); + return subscriber; + }; +}; +//# sourceMappingURL=subscribeToPromise.js.map + + +/***/ }), +/* 415 */ /***/ (function(module, exports, __webpack_require__) { // Note: since nyc uses this module to output coverage, any lines // that are in the direct sync flow of nyc's outputCoverage are // ignored, since we can never get coverage for them. -var assert = __webpack_require__(36) -var signals = __webpack_require__(720) +var assert = __webpack_require__(49) +var signals = __webpack_require__(974) -var EE = __webpack_require__(72) +var EE = __webpack_require__(92) /* istanbul ignore if */ if (typeof EE !== 'function') { EE = EE.EventEmitter @@ -75466,20 +75926,14 @@ function processEmit (ev, arg) { /***/ }), -/* 319 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(721); - -/***/ }), -/* 320 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var scan = __webpack_require__(728) -var parse = __webpack_require__(727) +var scan = __webpack_require__(979) +var parse = __webpack_require__(978) module.exports = function (source) { return parse(scan(source)) @@ -75487,772 +75941,13 @@ module.exports = function (source) { /***/ }), -/* 321 */ +/* 417 */ /***/ (function(module, exports) { -module.exports = [ - "0BSD", - "AAL", - "Abstyles", - "Adobe-2006", - "Adobe-Glyph", - "ADSL", - "AFL-1.1", - "AFL-1.2", - "AFL-2.0", - "AFL-2.1", - "AFL-3.0", - "Afmparse", - "AGPL-1.0", - "AGPL-3.0-only", - "AGPL-3.0-or-later", - "Aladdin", - "AMDPLPA", - "AML", - "AMPAS", - "ANTLR-PD", - "Apache-1.0", - "Apache-1.1", - "Apache-2.0", - "APAFML", - "APL-1.0", - "APSL-1.0", - "APSL-1.1", - "APSL-1.2", - "APSL-2.0", - "Artistic-1.0-cl8", - "Artistic-1.0-Perl", - "Artistic-1.0", - "Artistic-2.0", - "Bahyph", - "Barr", - "Beerware", - "BitTorrent-1.0", - "BitTorrent-1.1", - "Borceux", - "BSD-1-Clause", - "BSD-2-Clause-FreeBSD", - "BSD-2-Clause-NetBSD", - "BSD-2-Clause-Patent", - "BSD-2-Clause", - "BSD-3-Clause-Attribution", - "BSD-3-Clause-Clear", - "BSD-3-Clause-LBNL", - "BSD-3-Clause-No-Nuclear-License-2014", - "BSD-3-Clause-No-Nuclear-License", - "BSD-3-Clause-No-Nuclear-Warranty", - "BSD-3-Clause", - "BSD-4-Clause-UC", - "BSD-4-Clause", - "BSD-Protection", - "BSD-Source-Code", - "BSL-1.0", - "bzip2-1.0.5", - "bzip2-1.0.6", - "Caldera", - "CATOSL-1.1", - "CC-BY-1.0", - "CC-BY-2.0", - "CC-BY-2.5", - "CC-BY-3.0", - "CC-BY-4.0", - "CC-BY-NC-1.0", - "CC-BY-NC-2.0", - "CC-BY-NC-2.5", - "CC-BY-NC-3.0", - "CC-BY-NC-4.0", - "CC-BY-NC-ND-1.0", - "CC-BY-NC-ND-2.0", - "CC-BY-NC-ND-2.5", - "CC-BY-NC-ND-3.0", - "CC-BY-NC-ND-4.0", - "CC-BY-NC-SA-1.0", - "CC-BY-NC-SA-2.0", - "CC-BY-NC-SA-2.5", - "CC-BY-NC-SA-3.0", - "CC-BY-NC-SA-4.0", - "CC-BY-ND-1.0", - "CC-BY-ND-2.0", - "CC-BY-ND-2.5", - "CC-BY-ND-3.0", - "CC-BY-ND-4.0", - "CC-BY-SA-1.0", - "CC-BY-SA-2.0", - "CC-BY-SA-2.5", - "CC-BY-SA-3.0", - "CC-BY-SA-4.0", - "CC0-1.0", - "CDDL-1.0", - "CDDL-1.1", - "CDLA-Permissive-1.0", - "CDLA-Sharing-1.0", - "CECILL-1.0", - "CECILL-1.1", - "CECILL-2.0", - "CECILL-2.1", - "CECILL-B", - "CECILL-C", - "ClArtistic", - "CNRI-Jython", - "CNRI-Python-GPL-Compatible", - "CNRI-Python", - "Condor-1.1", - "CPAL-1.0", - "CPL-1.0", - "CPOL-1.02", - "Crossword", - "CrystalStacker", - "CUA-OPL-1.0", - "Cube", - "curl", - "D-FSL-1.0", - "diffmark", - "DOC", - "Dotseqn", - "DSDP", - "dvipdfm", - "ECL-1.0", - "ECL-2.0", - "EFL-1.0", - "EFL-2.0", - "eGenix", - "Entessa", - "EPL-1.0", - "EPL-2.0", - "ErlPL-1.1", - "EUDatagrid", - "EUPL-1.0", - "EUPL-1.1", - "EUPL-1.2", - "Eurosym", - "Fair", - "Frameworx-1.0", - "FreeImage", - "FSFAP", - "FSFUL", - "FSFULLR", - "FTL", - "GFDL-1.1-only", - "GFDL-1.1-or-later", - "GFDL-1.2-only", - "GFDL-1.2-or-later", - "GFDL-1.3-only", - "GFDL-1.3-or-later", - "Giftware", - "GL2PS", - "Glide", - "Glulxe", - "gnuplot", - "GPL-1.0-only", - "GPL-1.0-or-later", - "GPL-2.0-only", - "GPL-2.0-or-later", - "GPL-3.0-only", - "GPL-3.0-or-later", - "gSOAP-1.3b", - "HaskellReport", - "HPND", - "IBM-pibs", - "ICU", - "IJG", - "ImageMagick", - "iMatix", - "Imlib2", - "Info-ZIP", - "Intel-ACPI", - "Intel", - "Interbase-1.0", - "IPA", - "IPL-1.0", - "ISC", - "JasPer-2.0", - "JSON", - "LAL-1.2", - "LAL-1.3", - "Latex2e", - "Leptonica", - "LGPL-2.0-only", - "LGPL-2.0-or-later", - "LGPL-2.1-only", - "LGPL-2.1-or-later", - "LGPL-3.0-only", - "LGPL-3.0-or-later", - "LGPLLR", - "Libpng", - "libtiff", - "LiLiQ-P-1.1", - "LiLiQ-R-1.1", - "LiLiQ-Rplus-1.1", - "LPL-1.0", - "LPL-1.02", - "LPPL-1.0", - "LPPL-1.1", - "LPPL-1.2", - "LPPL-1.3a", - "LPPL-1.3c", - "MakeIndex", - "MirOS", - "MIT-advertising", - "MIT-CMU", - "MIT-enna", - "MIT-feh", - "MIT", - "MITNFA", - "Motosoto", - "mpich2", - "MPL-1.0", - "MPL-1.1", - "MPL-2.0-no-copyleft-exception", - "MPL-2.0", - "MS-PL", - "MS-RL", - "MTLL", - "Multics", - "Mup", - "NASA-1.3", - "Naumen", - "NBPL-1.0", - "NCSA", - "Net-SNMP", - "NetCDF", - "Newsletr", - "NGPL", - "NLOD-1.0", - "NLPL", - "Nokia", - "NOSL", - "Noweb", - "NPL-1.0", - "NPL-1.1", - "NPOSL-3.0", - "NRL", - "NTP", - "OCCT-PL", - "OCLC-2.0", - "ODbL-1.0", - "OFL-1.0", - "OFL-1.1", - "OGTSL", - "OLDAP-1.1", - "OLDAP-1.2", - "OLDAP-1.3", - "OLDAP-1.4", - "OLDAP-2.0.1", - "OLDAP-2.0", - "OLDAP-2.1", - "OLDAP-2.2.1", - "OLDAP-2.2.2", - "OLDAP-2.2", - "OLDAP-2.3", - "OLDAP-2.4", - "OLDAP-2.5", - "OLDAP-2.6", - "OLDAP-2.7", - "OLDAP-2.8", - "OML", - "OpenSSL", - "OPL-1.0", - "OSET-PL-2.1", - "OSL-1.0", - "OSL-1.1", - "OSL-2.0", - "OSL-2.1", - "OSL-3.0", - "PDDL-1.0", - "PHP-3.0", - "PHP-3.01", - "Plexus", - "PostgreSQL", - "psfrag", - "psutils", - "Python-2.0", - "Qhull", - "QPL-1.0", - "Rdisc", - "RHeCos-1.1", - "RPL-1.1", - "RPL-1.5", - "RPSL-1.0", - "RSA-MD", - "RSCPL", - "Ruby", - "SAX-PD", - "Saxpath", - "SCEA", - "Sendmail", - "SGI-B-1.0", - "SGI-B-1.1", - "SGI-B-2.0", - "SimPL-2.0", - "SISSL-1.2", - "SISSL", - "Sleepycat", - "SMLNJ", - "SMPPL", - "SNIA", - "Spencer-86", - "Spencer-94", - "Spencer-99", - "SPL-1.0", - "SugarCRM-1.1.3", - "SWL", - "TCL", - "TCP-wrappers", - "TMate", - "TORQUE-1.1", - "TOSL", - "Unicode-DFS-2015", - "Unicode-DFS-2016", - "Unicode-TOU", - "Unlicense", - "UPL-1.0", - "Vim", - "VOSTROM", - "VSL-1.0", - "W3C-19980720", - "W3C-20150513", - "W3C", - "Watcom-1.0", - "Wsuipa", - "WTFPL", - "X11", - "Xerox", - "XFree86-1.1", - "xinetd", - "Xnet", - "xpp", - "XSkat", - "YPL-1.0", - "YPL-1.1", - "Zed", - "Zend-2.0", - "Zimbra-1.3", - "Zimbra-1.4", - "zlib-acknowledgement", - "Zlib", - "ZPL-1.1", - "ZPL-2.0", - "ZPL-2.1" -]; +module.exports = ["0BSD","AAL","Abstyles","Adobe-2006","Adobe-Glyph","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","Afmparse","AGPL-1.0","AGPL-3.0-only","AGPL-3.0-or-later","Aladdin","AMDPLPA","AML","AMPAS","ANTLR-PD","Apache-1.0","Apache-1.1","Apache-2.0","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","Artistic-1.0-cl8","Artistic-1.0-Perl","Artistic-1.0","Artistic-2.0","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Borceux","BSD-1-Clause","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","BSD-2-Clause-Patent","BSD-2-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-LBNL","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause","BSD-4-Clause-UC","BSD-4-Clause","BSD-Protection","BSD-Source-Code","BSL-1.0","bzip2-1.0.5","bzip2-1.0.6","Caldera","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-3.0","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-4.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDLA-Permissive-1.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","ClArtistic","CNRI-Jython","CNRI-Python-GPL-Compatible","CNRI-Python","Condor-1.1","CPAL-1.0","CPL-1.0","CPOL-1.02","Crossword","CrystalStacker","CUA-OPL-1.0","Cube","curl","D-FSL-1.0","diffmark","DOC","Dotseqn","DSDP","dvipdfm","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","eGenix","Entessa","EPL-1.0","EPL-2.0","ErlPL-1.1","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Eurosym","Fair","Frameworx-1.0","FreeImage","FSFAP","FSFUL","FSFULLR","FTL","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-only","GFDL-1.3-or-later","Giftware","GL2PS","Glide","Glulxe","gnuplot","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","gSOAP-1.3b","HaskellReport","HPND","IBM-pibs","ICU","IJG","ImageMagick","iMatix","Imlib2","Info-ZIP","Intel-ACPI","Intel","Interbase-1.0","IPA","IPL-1.0","ISC","JasPer-2.0","JSON","LAL-1.2","LAL-1.3","Latex2e","Leptonica","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","Libpng","libtiff","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","MakeIndex","MirOS","MIT-advertising","MIT-CMU","MIT-enna","MIT-feh","MIT","MITNFA","Motosoto","mpich2","MPL-1.0","MPL-1.1","MPL-2.0-no-copyleft-exception","MPL-2.0","MS-PL","MS-RL","MTLL","Multics","Mup","NASA-1.3","Naumen","NBPL-1.0","NCSA","Net-SNMP","NetCDF","Newsletr","NGPL","NLOD-1.0","NLPL","Nokia","NOSL","Noweb","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTP","OCCT-PL","OCLC-2.0","ODbL-1.0","OFL-1.0","OFL-1.1","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0.1","OLDAP-2.0","OLDAP-2.1","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OML","OpenSSL","OPL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","PDDL-1.0","PHP-3.0","PHP-3.01","Plexus","PostgreSQL","psfrag","psutils","Python-2.0","Qhull","QPL-1.0","Rdisc","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Ruby","SAX-PD","Saxpath","SCEA","Sendmail","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SimPL-2.0","SISSL-1.2","SISSL","Sleepycat","SMLNJ","SMPPL","SNIA","Spencer-86","Spencer-94","Spencer-99","SPL-1.0","SugarCRM-1.1.3","SWL","TCL","TCP-wrappers","TMate","TORQUE-1.1","TOSL","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","Unlicense","UPL-1.0","Vim","VOSTROM","VSL-1.0","W3C-19980720","W3C-20150513","W3C","Watcom-1.0","Wsuipa","WTFPL","X11","Xerox","XFree86-1.1","xinetd","Xnet","xpp","XSkat","YPL-1.0","YPL-1.1","Zed","Zend-2.0","Zimbra-1.3","Zimbra-1.4","zlib-acknowledgement","Zlib","ZPL-1.1","ZPL-2.0","ZPL-2.1"] /***/ }), -/* 322 */ -/***/ (function(module, exports, __webpack_require__) { - -// Copyright 2017 Joyent, Inc. - -module.exports = { - DiffieHellman: DiffieHellman, - generateECDSA: generateECDSA, - generateED25519: generateED25519 -}; - -var assert = __webpack_require__(17); -var crypto = __webpack_require__(14); -var algs = __webpack_require__(26); -var utils = __webpack_require__(25); -var ed; -var nacl; - -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); - -var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined); - -var ecdh, ec, jsbn; - -function DiffieHellman(key) { - utils.assertCompatible(key, Key, [1, 4], 'key'); - this._isPriv = PrivateKey.isPrivateKey(key, [1, 3]); - this._algo = key.type; - this._curve = key.curve; - this._key = key; - if (key.type === 'dsa') { - if (!CRYPTO_HAVE_ECDH) { - throw (new Error('Due to bugs in the node 0.10 ' + - 'crypto API, node 0.12.x or later is required ' + - 'to use DH')); - } - this._dh = crypto.createDiffieHellman( - key.part.p.data, undefined, - key.part.g.data, undefined); - this._p = key.part.p; - this._g = key.part.g; - if (this._isPriv) - this._dh.setPrivateKey(key.part.x.data); - this._dh.setPublicKey(key.part.y.data); - - } else if (key.type === 'ecdsa') { - if (!CRYPTO_HAVE_ECDH) { - if (ecdh === undefined) - ecdh = __webpack_require__(285); - if (ec === undefined) - ec = __webpack_require__(123); - if (jsbn === undefined) - jsbn = __webpack_require__(62).BigInteger; - - this._ecParams = new X9ECParameters(this._curve); - - if (this._isPriv) { - this._priv = new ECPrivate( - this._ecParams, key.part.d.data); - } - return; - } - - var curve = { - 'nistp256': 'prime256v1', - 'nistp384': 'secp384r1', - 'nistp521': 'secp521r1' - }[key.curve]; - this._dh = crypto.createECDH(curve); - if (typeof (this._dh) !== 'object' || - typeof (this._dh.setPrivateKey) !== 'function') { - CRYPTO_HAVE_ECDH = false; - DiffieHellman.call(this, key); - return; - } - if (this._isPriv) - this._dh.setPrivateKey(key.part.d.data); - this._dh.setPublicKey(key.part.Q.data); - - } else if (key.type === 'curve25519') { - if (ed === undefined) - ed = __webpack_require__(192); - - if (this._isPriv) { - this._priv = key.part.r.data; - if (this._priv[0] === 0x00) - this._priv = this._priv.slice(1); - this._priv = this._priv.slice(0, 32); - } - - } else { - throw (new Error('DH not supported for ' + key.type + ' keys')); - } -} - -DiffieHellman.prototype.getPublicKey = function () { - if (this._isPriv) - return (this._key.toPublic()); - return (this._key); -}; - -DiffieHellman.prototype.getPrivateKey = function () { - if (this._isPriv) - return (this._key); - else - return (undefined); -}; -DiffieHellman.prototype.getKey = DiffieHellman.prototype.getPrivateKey; - -DiffieHellman.prototype._keyCheck = function (pk, isPub) { - assert.object(pk, 'key'); - if (!isPub) - utils.assertCompatible(pk, PrivateKey, [1, 3], 'key'); - utils.assertCompatible(pk, Key, [1, 4], 'key'); - - if (pk.type !== this._algo) { - throw (new Error('A ' + pk.type + ' key cannot be used in ' + - this._algo + ' Diffie-Hellman')); - } - - if (pk.curve !== this._curve) { - throw (new Error('A key from the ' + pk.curve + ' curve ' + - 'cannot be used with a ' + this._curve + - ' Diffie-Hellman')); - } - - if (pk.type === 'dsa') { - assert.deepEqual(pk.part.p, this._p, - 'DSA key prime does not match'); - assert.deepEqual(pk.part.g, this._g, - 'DSA key generator does not match'); - } -}; - -DiffieHellman.prototype.setKey = function (pk) { - this._keyCheck(pk); - - if (pk.type === 'dsa') { - this._dh.setPrivateKey(pk.part.x.data); - this._dh.setPublicKey(pk.part.y.data); - - } else if (pk.type === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.setPrivateKey(pk.part.d.data); - this._dh.setPublicKey(pk.part.Q.data); - } else { - this._priv = new ECPrivate( - this._ecParams, pk.part.d.data); - } - - } else if (pk.type === 'curve25519') { - this._priv = pk.part.r.data; - if (this._priv[0] === 0x00) - this._priv = this._priv.slice(1); - this._priv = this._priv.slice(0, 32); - } - this._key = pk; - this._isPriv = true; -}; -DiffieHellman.prototype.setPrivateKey = DiffieHellman.prototype.setKey; - -DiffieHellman.prototype.computeSecret = function (otherpk) { - this._keyCheck(otherpk, true); - if (!this._isPriv) - throw (new Error('DH exchange has not been initialized with ' + - 'a private key yet')); - - var pub; - if (this._algo === 'dsa') { - return (this._dh.computeSecret( - otherpk.part.y.data)); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - return (this._dh.computeSecret( - otherpk.part.Q.data)); - } else { - pub = new ECPublic( - this._ecParams, otherpk.part.Q.data); - return (this._priv.deriveSharedSecret(pub)); - } - - } else if (this._algo === 'curve25519') { - pub = otherpk.part.R.data; - if (pub[0] === 0x00) - pub = pub.slice(1); - - var secret = ed.dh.computeKey( - this._priv.toString('binary'), - pub.toString('binary')); - - return (new Buffer(secret, 'binary')); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; - -DiffieHellman.prototype.generateKey = function () { - var parts = []; - var priv, pub; - if (this._algo === 'dsa') { - this._dh.generateKeys(); - - parts.push({name: 'p', data: this._p.data}); - parts.push({name: 'q', data: this._key.part.q.data}); - parts.push({name: 'g', data: this._g.data}); - parts.push({name: 'y', data: this._dh.getPublicKey()}); - parts.push({name: 'x', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'dsa', - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else if (this._algo === 'ecdsa') { - if (CRYPTO_HAVE_ECDH) { - this._dh.generateKeys(); - - parts.push({name: 'curve', - data: new Buffer(this._curve)}); - parts.push({name: 'Q', data: this._dh.getPublicKey()}); - parts.push({name: 'd', data: this._dh.getPrivateKey()}); - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - - } else { - var n = this._ecParams.getN(); - var r = new jsbn(crypto.randomBytes(n.bitLength())); - var n1 = n.subtract(jsbn.ONE); - priv = r.mod(n1).add(jsbn.ONE); - pub = this._ecParams.getG().multiply(priv); - - priv = new Buffer(priv.toByteArray()); - pub = new Buffer(this._ecParams.getCurve(). - encodePointHex(pub), 'hex'); - - this._priv = new ECPrivate(this._ecParams, priv); - - parts.push({name: 'curve', - data: new Buffer(this._curve)}); - parts.push({name: 'Q', data: pub}); - parts.push({name: 'd', data: priv}); - - this._key = new PrivateKey({ - type: 'ecdsa', - curve: this._curve, - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - } else if (this._algo === 'curve25519') { - priv = ed.dh.generateKey(); - pub = ed.dh.publicKey(priv); - this._priv = priv = new Buffer(priv, 'binary'); - pub = new Buffer(pub, 'binary'); - - parts.push({name: 'R', data: pub}); - parts.push({name: 'r', data: Buffer.concat([priv, pub])}); - this._key = new PrivateKey({ - type: 'curve25519', - parts: parts - }); - this._isPriv = true; - return (this._key); - } - - throw (new Error('Invalid algorithm: ' + this._algo)); -}; -DiffieHellman.prototype.generateKeys = DiffieHellman.prototype.generateKey; - -/* These are helpers for using ecc-jsbn (for node 0.10 compatibility). */ - -function X9ECParameters(name) { - var params = algs.curves[name]; - assert.object(params); - - var p = new jsbn(params.p); - var a = new jsbn(params.a); - var b = new jsbn(params.b); - var n = new jsbn(params.n); - var h = jsbn.ONE; - var curve = new ec.ECCurveFp(p, a, b); - var G = curve.decodePointHex(params.G.toString('hex')); - - this.curve = curve; - this.g = G; - this.n = n; - this.h = h; -} -X9ECParameters.prototype.getCurve = function () { return (this.curve); }; -X9ECParameters.prototype.getG = function () { return (this.g); }; -X9ECParameters.prototype.getN = function () { return (this.n); }; -X9ECParameters.prototype.getH = function () { return (this.h); }; - -function ECPublic(params, buffer) { - this._params = params; - if (buffer[0] === 0x00) - buffer = buffer.slice(1); - this._pub = params.getCurve().decodePointHex(buffer.toString('hex')); -} - -function ECPrivate(params, buffer) { - this._params = params; - this._priv = new jsbn(utils.mpNormalize(buffer)); -} -ECPrivate.prototype.deriveSharedSecret = function (pubKey) { - assert.ok(pubKey instanceof ECPublic); - var S = pubKey._pub.multiply(this._priv); - return (new Buffer(S.getX().toBigInteger().toByteArray())); -}; - -function generateED25519() { - if (nacl === undefined) - nacl = __webpack_require__(141); - - var pair = nacl.sign.keyPair(); - var priv = new Buffer(pair.secretKey); - var pub = new Buffer(pair.publicKey); - assert.strictEqual(priv.length, 64); - assert.strictEqual(pub.length, 32); - - var parts = []; - parts.push({name: 'R', data: pub}); - parts.push({name: 'r', data: priv}); - var key = new PrivateKey({ - type: 'ed25519', - parts: parts - }); - return (key); -} - -/* Generates a new ECDSA private key on a given curve. */ -function generateECDSA(curve) { - var parts = []; - var key; - - if (CRYPTO_HAVE_ECDH) { - /* - * Node crypto doesn't expose key generation directly, but the - * ECDH instances can generate keys. It turns out this just - * calls into the OpenSSL generic key generator, and we can - * read its output happily without doing an actual DH. So we - * use that here. - */ - var osCurve = { - 'nistp256': 'prime256v1', - 'nistp384': 'secp384r1', - 'nistp521': 'secp521r1' - }[curve]; - - var dh = crypto.createECDH(osCurve); - dh.generateKeys(); - - parts.push({name: 'curve', - data: new Buffer(curve)}); - parts.push({name: 'Q', data: dh.getPublicKey()}); - parts.push({name: 'd', data: dh.getPrivateKey()}); - - key = new PrivateKey({ - type: 'ecdsa', - curve: curve, - parts: parts - }); - return (key); - - } else { - if (ecdh === undefined) - ecdh = __webpack_require__(285); - if (ec === undefined) - ec = __webpack_require__(123); - if (jsbn === undefined) - jsbn = __webpack_require__(62).BigInteger; - - var ecParams = new X9ECParameters(curve); - - /* This algorithm taken from FIPS PUB 186-4 (section B.4.1) */ - var n = ecParams.getN(); - /* - * The crypto.randomBytes() function can only give us whole - * bytes, so taking a nod from X9.62, we round up. - */ - var cByteLen = Math.ceil((n.bitLength() + 64) / 8); - var c = new jsbn(crypto.randomBytes(cByteLen)); - - var n1 = n.subtract(jsbn.ONE); - var priv = c.mod(n1).add(jsbn.ONE); - var pub = ecParams.getG().multiply(priv); - - priv = new Buffer(priv.toByteArray()); - pub = new Buffer(ecParams.getCurve(). - encodePointHex(pub), 'hex'); - - parts.push({name: 'curve', data: new Buffer(curve)}); - parts.push({name: 'Q', data: pub}); - parts.push({name: 'd', data: priv}); - - key = new PrivateKey({ - type: 'ecdsa', - curve: curve, - parts: parts - }); - return (key); - } -} - - -/***/ }), -/* 323 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -76263,14 +75958,15 @@ module.exports = { }; var nacl; -var stream = __webpack_require__(29); -var util = __webpack_require__(4); -var assert = __webpack_require__(17); -var Signature = __webpack_require__(51); +var stream = __webpack_require__(34); +var util = __webpack_require__(9); +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var Signature = __webpack_require__(70); function Verifier(key, hashAlgo) { if (nacl === undefined) - nacl = __webpack_require__(141); + nacl = __webpack_require__(71); if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + @@ -76290,7 +75986,7 @@ Verifier.prototype._write = function (chunk, enc, cb) { Verifier.prototype.update = function (chunk) { if (typeof (chunk) === 'string') - chunk = new Buffer(chunk, 'binary'); + chunk = Buffer.from(chunk, 'binary'); this.chunks.push(chunk); }; @@ -76302,7 +75998,7 @@ Verifier.prototype.verify = function (signature, fmt) { sig = signature.toBuffer('raw'); } else if (typeof (signature) === 'string') { - sig = new Buffer(signature, 'base64'); + sig = Buffer.from(signature, 'base64'); } else if (Signature.isSignature(signature, [1, 0])) { throw (new Error('signature was created by too old ' + @@ -76313,12 +76009,12 @@ Verifier.prototype.verify = function (signature, fmt) { return (nacl.sign.detached.verify( new Uint8Array(Buffer.concat(this.chunks)), new Uint8Array(sig), - new Uint8Array(this.key.part.R.data))); + new Uint8Array(this.key.part.A.data))); }; function Signer(key, hashAlgo) { if (nacl === undefined) - nacl = __webpack_require__(141); + nacl = __webpack_require__(71); if (hashAlgo.toLowerCase() !== 'sha512') throw (new Error('ED25519 only supports the use of ' + @@ -76338,15 +76034,16 @@ Signer.prototype._write = function (chunk, enc, cb) { Signer.prototype.update = function (chunk) { if (typeof (chunk) === 'string') - chunk = new Buffer(chunk, 'binary'); + chunk = Buffer.from(chunk, 'binary'); this.chunks.push(chunk); }; Signer.prototype.sign = function () { var sig = nacl.sign.detached( new Uint8Array(Buffer.concat(this.chunks)), - new Uint8Array(this.key.part.r.data)); - var sigBuf = new Buffer(sig); + new Uint8Array(Buffer.concat([ + this.key.part.k.data, this.key.part.A.data]))); + var sigBuf = Buffer.from(sig); var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw'); sigObj.hashAlgorithm = 'sha512'; return (sigObj); @@ -76354,7 +76051,7 @@ Signer.prototype.sign = function () { /***/ }), -/* 324 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -76364,14 +76061,18 @@ module.exports = { write: write }; -var assert = __webpack_require__(17); -var utils = __webpack_require__(25); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var utils = __webpack_require__(31); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); -var pem = __webpack_require__(63); -var ssh = __webpack_require__(325); -var rfc4253 = __webpack_require__(71); +var pem = __webpack_require__(80); +var ssh = __webpack_require__(420); +var rfc4253 = __webpack_require__(91); +var dnssec = __webpack_require__(258); + +var DNSSEC_PRIVKEY_HEADER_PREFIX = 'Private-key-format: v1'; function read(buf, options) { if (typeof (buf) === 'string') { @@ -76381,13 +76082,17 @@ function read(buf, options) { return (ssh.read(buf, options)); if (buf.match(/^\s*ecdsa-/)) return (ssh.read(buf, options)); - buf = new Buffer(buf, 'binary'); + if (findDNSSECHeader(buf)) + return (dnssec.read(buf, options)); + buf = Buffer.from(buf, 'binary'); } else { assert.buffer(buf); if (findPEMHeader(buf)) return (pem.read(buf, options)); if (findSSHHeader(buf)) return (ssh.read(buf, options)); + if (findDNSSECHeader(buf)) + return (dnssec.read(buf, options)); } if (buf.readUInt32BE(0) < buf.length) return (rfc4253.read(buf, options)); @@ -76427,13 +76132,39 @@ function findPEMHeader(buf) { return (true); } +function findDNSSECHeader(buf) { + // private case first + if (buf.length <= DNSSEC_PRIVKEY_HEADER_PREFIX.length) + return (false); + var headerCheck = buf.slice(0, DNSSEC_PRIVKEY_HEADER_PREFIX.length); + if (headerCheck.toString('ascii') === DNSSEC_PRIVKEY_HEADER_PREFIX) + return (true); + + // public-key RFC3110 ? + // 'domain.com. IN KEY ...' or 'domain.com. IN DNSKEY ...' + // skip any comment-lines + if (typeof (buf) !== 'string') { + buf = buf.toString('ascii'); + } + var lines = buf.split('\n'); + var line = 0; + /* JSSTYLED */ + while (lines[line].match(/^\;/)) + line++; + if (lines[line].toString('ascii').match(/\. IN KEY /)) + return (true); + if (lines[line].toString('ascii').match(/\. IN DNSKEY /)) + return (true); + return (false); +} + function write(key, options) { throw (new Error('"auto" format cannot be used for writing')); } /***/ }), -/* 325 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2015 Joyent, Inc. @@ -76443,18 +76174,19 @@ module.exports = { write: write }; -var assert = __webpack_require__(17); -var rfc4253 = __webpack_require__(71); -var utils = __webpack_require__(25); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); +var assert = __webpack_require__(22); +var Buffer = __webpack_require__(20).Buffer; +var rfc4253 = __webpack_require__(91); +var utils = __webpack_require__(31); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); -var sshpriv = __webpack_require__(138); +var sshpriv = __webpack_require__(176); /*JSSTYLED*/ -var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/; +var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([ \t]+([^ \t][^\n]*[\n]*)?)?$/; /*JSSTYLED*/ -var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/; +var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t\n]+([a-zA-Z0-9+\/][a-zA-Z0-9+\/ \t\n=]*)([^a-zA-Z0-9+\/ \t\n=].*)?$/; function read(buf, options) { if (typeof (buf) !== 'string') { @@ -76469,7 +76201,7 @@ function read(buf, options) { assert.ok(m, 'key must match regex'); var type = rfc4253.algToKeyType(m[1]); - var kbuf = new Buffer(m[2], 'base64'); + var kbuf = Buffer.from(m[2], 'base64'); /* * This is a bit tricky. If we managed to parse the key and locate the @@ -76488,7 +76220,7 @@ function read(buf, options) { } catch (e) { m = trimmed.match(SSHKEY_RE2); assert.ok(m, 'key must match regex'); - kbuf = new Buffer(m[2], 'base64'); + kbuf = Buffer.from(m[2], 'base64'); key = rfc4253.readInternal(ret, 'public', kbuf); } } else { @@ -76509,7 +76241,7 @@ function read(buf, options) { * chars from the beginning up to this point in the the string. * Then offset in this and try to make up for missing = chars. */ - var data = m[2] + m[3]; + var data = m[2] + (m[3] ? m[3] : ''); var realOffset = Math.ceil(ret.consumed / 3) * 4; data = data.slice(0, realOffset - 2). /*JSSTYLED*/ replace(/[^a-zA-Z0-9+\/=]/g, '') + @@ -76548,12 +76280,12 @@ function write(key, options) { if (key.comment) parts.push(key.comment); - return (new Buffer(parts.join(' '))); + return (Buffer.from(parts.join(' '))); } /***/ }), -/* 326 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2017 Joyent, Inc. @@ -76566,17 +76298,18 @@ module.exports = { write: write }; -var assert = __webpack_require__(17); -var asn1 = __webpack_require__(53); -var algs = __webpack_require__(26); -var utils = __webpack_require__(25); -var Key = __webpack_require__(27); -var PrivateKey = __webpack_require__(28); -var pem = __webpack_require__(63); -var Identity = __webpack_require__(104); -var Signature = __webpack_require__(51); -var Certificate = __webpack_require__(101); -var pkcs8 = __webpack_require__(103); +var assert = __webpack_require__(22); +var asn1 = __webpack_require__(66); +var Buffer = __webpack_require__(20).Buffer; +var algs = __webpack_require__(37); +var utils = __webpack_require__(31); +var Key = __webpack_require__(33); +var PrivateKey = __webpack_require__(38); +var pem = __webpack_require__(80); +var Identity = __webpack_require__(141); +var Signature = __webpack_require__(70); +var Certificate = __webpack_require__(138); +var pkcs8 = __webpack_require__(140); /* * This file is based on RFC5280 (X.509). @@ -76628,7 +76361,8 @@ var SIGN_ALGS = { 'ecdsa-sha1': '1.2.840.10045.4.1', 'ecdsa-sha256': '1.2.840.10045.4.3.2', 'ecdsa-sha384': '1.2.840.10045.4.3.3', - 'ecdsa-sha512': '1.2.840.10045.4.3.4' + 'ecdsa-sha512': '1.2.840.10045.4.3.4', + 'ed25519-sha512': '1.3.101.112' }; Object.keys(SIGN_ALGS).forEach(function (k) { SIGN_ALGS[SIGN_ALGS[k]] = k; @@ -76646,7 +76380,7 @@ var EXTS = { function read(buf, options) { if (typeof (buf) === 'string') { - buf = new Buffer(buf, 'binary'); + buf = Buffer.from(buf, 'binary'); } assert.buffer(buf, 'buf'); @@ -77057,7 +76791,7 @@ function write(cert, options) { der.endSequence(); var sigData = sig.signature.toBuffer('asn1'); - var data = new Buffer(sigData.length + 1); + var data = Buffer.alloc(sigData.length + 1); data[0] = 0; sigData.copy(data, 1); der.writeBuffer(data, asn1.Ber.BitString); @@ -77080,6 +76814,8 @@ function writeTBSCert(cert, der) { der.startSequence(); der.writeOID(SIGN_ALGS[sig.algo]); + if (sig.algo.match(/^rsa-/)) + der.writeNull(); der.endSequence(); cert.issuer.toAsn1(der); @@ -77265,8 +77001,7 @@ function writeBitField(setBits, bitIndex) { var bitLen = bitIndex.length; var blen = Math.ceil(bitLen / 8); var unused = blen * 8 - bitLen; - var bits = new Buffer(1 + blen); - bits.fill(0); + var bits = Buffer.alloc(1 + blen); // zero-filled bits[0] = unused; for (var i = 0; i < bitLen; ++i) { var byteN = 1 + Math.floor(i / 8); @@ -77285,7 +77020,309 @@ function writeBitField(setBits, bitIndex) { /***/ }), -/* 327 */ +/* 422 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +/**/ + +var Buffer = __webpack_require__(58).Buffer; +/**/ + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + 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 true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} + +/***/ }), +/* 423 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -77306,11 +77343,11 @@ module.exports = x => { /***/ }), -/* 328 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { -var toBuffer = __webpack_require__(331) -var alloc = __webpack_require__(257) +var toBuffer = __webpack_require__(427) +var alloc = __webpack_require__(320) var ZEROS = '0000000000000000000' var SEVENS = '7777777777777777777' @@ -77595,20 +77632,20 @@ exports.decode = function (buf, filenameEncoding) { /***/ }), -/* 329 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { -exports.extract = __webpack_require__(739) -exports.pack = __webpack_require__(740) +exports.extract = __webpack_require__(990) +exports.pack = __webpack_require__(991) /***/ }), -/* 330 */ +/* 426 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(687) - , inherits = __webpack_require__(4).inherits - , xtend = __webpack_require__(334) +var Transform = __webpack_require__(834) + , inherits = __webpack_require__(9).inherits + , xtend = __webpack_require__(431) function DestroyableTransform(opts) { Transform.call(this, opts) @@ -77705,7 +77742,7 @@ module.exports.obj = through2(function (options, transform, flush) { /***/ }), -/* 331 */ +/* 427 */ /***/ (function(module, exports) { module.exports = toBuffer @@ -77725,12 +77762,12 @@ function toBuffer (buf, enc) { /***/ }), -/* 332 */ +/* 428 */ /***/ (function(module, exports) { /** * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ var byteToHex = []; for (var i = 0; i < 256; ++i) { @@ -77740,37 +77777,75 @@ for (var i = 0; i < 256; ++i) { function bytesToUuid(buf, offset) { var i = offset || 0; var bth = byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]]]).join(''); } module.exports = bytesToUuid; /***/ }), -/* 333 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { // Unique ID creation requires a high quality random # generator. In node.js -// this is prett straight-forward - we use the crypto API. +// this is pretty straight-forward - we use the crypto API. -var rb = __webpack_require__(14).randomBytes; +var crypto = __webpack_require__(21); -function rng() { - return rb(16); +module.exports = function nodeRNG() { + return crypto.randomBytes(16); }; -module.exports = rng; - /***/ }), -/* 334 */ +/* 430 */ +/***/ (function(module, exports) { + +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} + + +/***/ }), +/* 431 */ /***/ (function(module, exports) { module.exports = extend @@ -77795,363 +77870,25 @@ function extend() { /***/ }), -/* 335 */ +/* 432 */ /***/ (function(module, exports) { -module.exports = { - "name": "yarn", - "installationMethod": "unknown", - "version": "1.7.0", - "license": "BSD-2-Clause", - "preferGlobal": true, - "description": "📦🐈 Fast, reliable, and secure dependency management.", - "dependencies": { - "babel-runtime": "^6.26.0", - "bytes": "^3.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.1.0", - "cmd-shim": "^2.0.1", - "commander": "^2.9.0", - "death": "^1.0.0", - "debug": "^3.0.0", - "deep-equal": "^1.0.1", - "detect-indent": "^5.0.0", - "dnscache": "^1.0.1", - "glob": "^7.1.1", - "gunzip-maybe": "^1.4.0", - "ini": "^1.3.4", - "inquirer": "^3.0.1", - "invariant": "^2.2.0", - "is-builtin-module": "^2.0.0", - "is-ci": "^1.0.10", - "is-webpack-bundle": "^1.0.0", - "leven": "^2.0.0", - "loud-rejection": "^1.2.0", - "micromatch": "^2.3.11", - "mkdirp": "^0.5.1", - "node-emoji": "^1.6.1", - "normalize-url": "^2.0.0", - "npm-logical-tree": "^1.2.1", - "object-path": "^0.11.2", - "proper-lockfile": "^2.0.0", - "puka": "^1.0.0", - "read": "^1.0.7", - "request": "^2.81.0", - "request-capture-har": "^1.2.2", - "rimraf": "^2.5.0", - "semver": "^5.1.0", - "strip-ansi": "^4.0.0", - "strip-bom": "^3.0.0", - "tar-fs": "^1.16.0", - "tar-stream": "^1.6.0", - "uuid": "^3.0.1", - "v8-compile-cache": "^2.0.0", - "validate-npm-package-license": "^3.0.3", - "yn": "^2.0.0" - }, - "devDependencies": { - "babel-core": "^6.26.0", - "babel-eslint": "^7.2.3", - "babel-loader": "^6.2.5", - "babel-plugin-array-includes": "^2.0.3", - "babel-plugin-transform-builtin-extend": "^1.1.2", - "babel-plugin-transform-inline-imports-commonjs": "^1.0.0", - "babel-plugin-transform-runtime": "^6.4.3", - "babel-preset-env": "^1.6.0", - "babel-preset-flow": "^6.23.0", - "babel-preset-stage-0": "^6.0.0", - "babylon": "^6.5.0", - "commitizen": "^2.9.6", - "cz-conventional-changelog": "^2.0.0", - "eslint": "^4.3.0", - "eslint-config-fb-strict": "^22.0.0", - "eslint-plugin-babel": "^5.0.0", - "eslint-plugin-flowtype": "^2.35.0", - "eslint-plugin-jasmine": "^2.6.2", - "eslint-plugin-jest": "^21.0.0", - "eslint-plugin-jsx-a11y": "^6.0.2", - "eslint-plugin-prefer-object-spread": "^1.2.1", - "eslint-plugin-prettier": "^2.1.2", - "eslint-plugin-react": "^7.1.0", - "eslint-plugin-relay": "^0.0.21", - "eslint-plugin-yarn-internal": "file:scripts/eslint-rules", - "execa": "^0.10.0", - "flow-bin": "^0.66.0", - "git-release-notes": "^3.0.0", - "gulp": "^3.9.0", - "gulp-babel": "^7.0.0", - "gulp-if": "^2.0.1", - "gulp-newer": "^1.0.0", - "gulp-plumber": "^1.0.1", - "gulp-sourcemaps": "^2.2.0", - "gulp-util": "^3.0.7", - "gulp-watch": "^5.0.0", - "jest": "^22.4.4", - "jsinspect": "^0.12.6", - "minimatch": "^3.0.4", - "mock-stdin": "^0.3.0", - "prettier": "^1.5.2", - "temp": "^0.8.3", - "webpack": "^2.1.0-beta.25", - "yargs": "^6.3.0" - }, - "engines": { - "node": ">=4.0.0" - }, - "repository": "yarnpkg/yarn", - "bin": { - "yarn": "./bin/yarn.js", - "yarnpkg": "./bin/yarn.js" - }, - "scripts": { - "build": "gulp build", - "build-bundle": "node ./scripts/build-webpack.js", - "build-chocolatey": "powershell ./scripts/build-chocolatey.ps1", - "build-deb": "./scripts/build-deb.sh", - "build-dist": "bash ./scripts/build-dist.sh", - "build-win-installer": "scripts\\build-windows-installer.bat", - "changelog": "git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md", - "dupe-check": "yarn jsinspect ./src", - "lint": "eslint . && flow check", - "pkg-tests": "yarn --cwd packages/pkg-tests jest yarn.test.js", - "prettier": "eslint src __tests__ --fix", - "release-branch": "./scripts/release-branch.sh", - "test": "yarn lint && yarn test-only", - "test-only": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose", - "test-only-debug": "node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose", - "test-coverage": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose", - "watch": "gulp watch", - "commit": "git-cz" - }, - "jest": { - "collectCoverageFrom": [ - "src/**/*.js" - ], - "testEnvironment": "node", - "modulePathIgnorePatterns": [ - "__tests__/fixtures/", - "packages/pkg-tests/pkg-tests-fixtures" - ], - "testPathIgnorePatterns": [ - "__tests__/(fixtures|__mocks__)/", - "updates/", - "_(temp|mock|install|init|helpers).js$", - "packages/pkg-tests" - ] - }, - "config": { - "commitizen": { - "path": "./node_modules/cz-conventional-changelog" - } - } -}; +module.exports = {"name":"yarn","installationMethod":"unknown","version":"1.13.0","license":"BSD-2-Clause","preferGlobal":true,"description":"📦🐈 Fast, reliable, and secure dependency management.","dependencies":{"@zkochan/cmd-shim":"^3.1.0","babel-runtime":"^6.26.0","bytes":"^3.0.0","camelcase":"^4.0.0","chalk":"^2.1.0","cli-table3":"^0.4.0","commander":"^2.9.0","death":"^1.0.0","debug":"^3.0.0","deep-equal":"^1.0.1","detect-indent":"^5.0.0","dnscache":"^1.0.1","glob":"^7.1.1","gunzip-maybe":"^1.4.0","hash-for-dep":"^1.2.3","imports-loader":"^0.8.0","ini":"^1.3.4","inquirer":"^6.2.0","invariant":"^2.2.0","is-builtin-module":"^2.0.0","is-ci":"^1.0.10","is-webpack-bundle":"^1.0.0","leven":"^2.0.0","loud-rejection":"^1.2.0","micromatch":"^2.3.11","mkdirp":"^0.5.1","node-emoji":"^1.6.1","normalize-url":"^2.0.0","npm-logical-tree":"^1.2.1","object-path":"^0.11.2","proper-lockfile":"^2.0.0","puka":"^1.0.0","read":"^1.0.7","request":"^2.87.0","request-capture-har":"^1.2.2","rimraf":"^2.5.0","semver":"^5.1.0","ssri":"^5.3.0","strip-ansi":"^4.0.0","strip-bom":"^3.0.0","tar-fs":"^1.16.0","tar-stream":"^1.6.1","uuid":"^3.0.1","v8-compile-cache":"^2.0.0","validate-npm-package-license":"^3.0.4","yn":"^2.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^7.2.3","babel-loader":"^6.2.5","babel-plugin-array-includes":"^2.0.3","babel-plugin-inline-import":"^3.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-plugin-transform-inline-imports-commonjs":"^1.0.0","babel-plugin-transform-runtime":"^6.4.3","babel-preset-env":"^1.6.0","babel-preset-flow":"^6.23.0","babel-preset-stage-0":"^6.0.0","babylon":"^6.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","eslint":"^4.3.0","eslint-config-fb-strict":"^22.0.0","eslint-plugin-babel":"^5.0.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-jasmine":"^2.6.2","eslint-plugin-jest":"^21.0.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-prefer-object-spread":"^1.2.1","eslint-plugin-prettier":"^2.1.2","eslint-plugin-react":"^7.1.0","eslint-plugin-relay":"^0.0.28","eslint-plugin-yarn-internal":"file:scripts/eslint-rules","execa":"^0.11.0","fancy-log":"^1.3.2","flow-bin":"^0.66.0","git-release-notes":"^3.0.0","gulp":"^4.0.0","gulp-babel":"^7.0.0","gulp-if":"^2.0.1","gulp-newer":"^1.0.0","gulp-plumber":"^1.0.1","gulp-sourcemaps":"^2.2.0","jest":"^22.4.4","jsinspect":"^0.12.6","minimatch":"^3.0.4","mock-stdin":"^0.3.0","prettier":"^1.5.2","temp":"^0.8.3","webpack":"^2.1.0-beta.25","yargs":"^6.3.0"},"resolutions":{"sshpk":"^1.14.2"},"engines":{"node":">=4.0.0"},"repository":"yarnpkg/yarn","bin":{"yarn":"./bin/yarn.js","yarnpkg":"./bin/yarn.js"},"scripts":{"build":"gulp build","build-bundle":"node ./scripts/build-webpack.js","build-chocolatey":"powershell ./scripts/build-chocolatey.ps1","build-deb":"./scripts/build-deb.sh","build-dist":"bash ./scripts/build-dist.sh","build-win-installer":"scripts\\build-windows-installer.bat","changelog":"git-release-notes $(git describe --tags --abbrev=0 $(git describe --tags --abbrev=0)^)..$(git describe --tags --abbrev=0) scripts/changelog.md","dupe-check":"yarn jsinspect ./src","lint":"eslint . && flow check","pkg-tests":"yarn --cwd packages/pkg-tests jest yarn.test.js","prettier":"eslint src __tests__ --fix","release-branch":"./scripts/release-branch.sh","test":"yarn lint && yarn test-only","test-only":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose","test-only-debug":"node --inspect-brk --max_old_space_size=4096 node_modules/jest/bin/jest.js --runInBand --verbose","test-coverage":"node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose","watch":"gulp watch","commit":"git-cz"},"jest":{"collectCoverageFrom":["src/**/*.js"],"testEnvironment":"node","modulePathIgnorePatterns":["__tests__/fixtures/","packages/pkg-tests/pkg-tests-fixtures","dist/"],"testPathIgnorePatterns":["__tests__/(fixtures|__mocks__)/","updates/","_(temp|mock|install|init|helpers).js$","packages/pkg-tests"]},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} /***/ }), -/* 336 */ +/* 433 */ /***/ (function(module, exports) { module.exports = require("constants"); /***/ }), -/* 337 */ -/***/ (function(module, exports) { - -module.exports = require("dns"); - -/***/ }), -/* 338 */ +/* 434 */ /***/ (function(module, exports) { module.exports = require("tls"); /***/ }), -/* 339 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -exports.getRcConfigForCwd = getRcConfigForCwd; -exports.getRcArgs = getRcArgs; - -var _path; - -function _load_path() { - return _path = __webpack_require__(0); -} - -var _commander; - -function _load_commander() { - return _commander = _interopRequireDefault(__webpack_require__(209)); -} - -var _lockfile; - -function _load_lockfile() { - return _lockfile = __webpack_require__(21); -} - -var _rc; - -function _load_rc() { - return _rc = _interopRequireWildcard(__webpack_require__(454)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// Keys that will get resolved relative to the path of the rc file they belong to -var PATH_KEYS = new (_set || _load_set()).default(['yarn-path', 'cache-folder', 'global-folder', 'modules-folder', 'cwd']); - -// given a cwd, load all .yarnrc files relative to it -function getRcConfigForCwd(cwd) { - return (_rc || _load_rc()).findRc('yarn', cwd, function (fileText, filePath) { - var _parse = (0, (_lockfile || _load_lockfile()).parse)(fileText, 'yarnrc'), - values = _parse.object; - - // some keys reference directories so keep their relativity - - - for (var _key in values) { - if (PATH_KEYS.has(_key.replace(/^(--)?([^.]+\.)*/, ''))) { - values[_key] = (0, (_path || _load_path()).resolve)((0, (_path || _load_path()).dirname)(filePath), values[_key]); - } - } - - return values; - }); -} - -// get the built of arguments of a .yarnrc chain of the passed cwd -function buildRcArgs(cwd) { - var config = getRcConfigForCwd(cwd); - - var argsForCommands = new (_map || _load_map()).default(); - - for (var _key2 in config) { - // args can be prefixed with the command name they're meant for, eg. - // `--install.check-files true` - var keyMatch = _key2.match(/^--(?:([^.]+)\.)?(.*)$/); - if (!keyMatch) { - continue; - } - - var commandName = keyMatch[1] || '*'; - var arg = keyMatch[2]; - var value = config[_key2]; - - // create args for this command name if we didn't previously have them - var args = argsForCommands.get(commandName) || []; - argsForCommands.set(commandName, args); - - // turn config value into appropriate cli flag - var option = (_commander || _load_commander()).default.optionFor(`--${arg}`); - - // If commander doesn't recognize the option or it takes a value after it - if (!option || option.optional || option.required) { - args.push(`--${arg}`, value); - } else if (value === true) { - // we can't force remove an arg from cli - args.push(`--${arg}`); - } - } - - return argsForCommands; -} - -// extract the value of a --cwd arg if present -function extractCwdArg(args) { - for (var i = 0, I = args.length; i < I; ++i) { - var arg = args[i]; - if (arg === '--') { - return null; - } else if (arg === '--cwd') { - return args[i + 1]; - } - } - return null; -} - -// get a list of arguments from .yarnrc that apply to this commandName -function getRcArgs(commandName, args) { - var previousCwds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - - // for the cwd, use the --cwd arg if it was passed or else use process.cwd() - var origCwd = extractCwdArg(args) || process.cwd(); - - // get a map of command names and their arguments - var argMap = buildRcArgs(origCwd); - - // concat wildcard arguments and arguments meant for this specific command - var newArgs = [].concat(argMap.get('*') || [], argMap.get(commandName) || []); - - // check if the .yarnrc args specified a cwd - var newCwd = extractCwdArg(newArgs); - if (newCwd && newCwd !== origCwd) { - // ensure that we don't enter into a loop - if (previousCwds.indexOf(newCwd) !== -1) { - throw new Error(`Recursive .yarnrc files specifying --cwd flags. Bailing out.`); - } - - // if we have a new cwd then let's refetch the .yarnrc args relative to it - return getRcArgs(commandName, newArgs, previousCwds.concat(origCwd)); - } - - return newArgs; -} - -/***/ }), -/* 340 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -exports.boolify = boolify; -exports.boolifyWithDefault = boolifyWithDefault; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var FALSY_STRINGS = new (_set || _load_set()).default(['0', 'false']); - -function boolify(val) { - return !FALSY_STRINGS.has(val.toString().toLowerCase()); -} - -function boolifyWithDefault(val, defaultResult) { - return val === '' || val === null || val === undefined ? defaultResult : boolify(val); -} - -/***/ }), -/* 341 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -78165,7 +77902,7 @@ exports.default = handleSignals; var _child; function _load_child() { - return _child = __webpack_require__(47); + return _child = __webpack_require__(60); } function forwardSignalAndExit(signal) { @@ -78181,7 +77918,7 @@ function handleSignals() { } /***/ }), -/* 342 */ +/* 436 */ /***/ (function(module, exports) { @@ -78252,14 +77989,14 @@ module.exports = function (arg) { /***/ }), -/* 343 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var util = __webpack_require__(4); -var onExit = __webpack_require__(318); -var currentlyUnhandled = __webpack_require__(531); +var util = __webpack_require__(9); +var onExit = __webpack_require__(415); +var currentlyUnhandled = __webpack_require__(670); var installed = false; @@ -78295,16 +78032,16 @@ module.exports = function (log) { /***/ }), -/* 344 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const fs = __webpack_require__(291); -const path = __webpack_require__(0); -const retry = __webpack_require__(707); -const syncFs = __webpack_require__(675); +const fs = __webpack_require__(358); +const path = __webpack_require__(2); +const retry = __webpack_require__(859); +const syncFs = __webpack_require__(819); const locks = {}; @@ -78682,41 +78419,110 @@ module.exports.checkSync = checkSync; /***/ }), -/* 345 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var compileSchema = __webpack_require__(350) - , resolve = __webpack_require__(213) - , Cache = __webpack_require__(346) - , SchemaObject = __webpack_require__(214) - , stableStringify = __webpack_require__(194) - , formats = __webpack_require__(349) - , rules = __webpack_require__(351) - , v5 = __webpack_require__(375) - , util = __webpack_require__(64) - , async = __webpack_require__(211) - , co = __webpack_require__(260); +var KEYWORDS = [ + 'multipleOf', + 'maximum', + 'exclusiveMaximum', + 'minimum', + 'exclusiveMinimum', + 'maxLength', + 'minLength', + 'pattern', + 'additionalItems', + 'maxItems', + 'minItems', + 'uniqueItems', + 'maxProperties', + 'minProperties', + 'required', + 'additionalProperties', + 'enum', + 'format', + 'const' +]; + +module.exports = function (metaSchema, keywordsJsonPointers) { + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions - */ - function errorsText(errors, options) { - errors = errors || self.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - - var text = ''; - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; module.exports = formats; function formats(mode) { mode = mode == 'full' ? 'full' : 'fast'; - var formatDefs = util.copy(formats[mode]); - for (var fName in formats.compare) { - formatDefs[fName] = { - validate: formatDefs[fName], - compare: formats.compare[fName] - }; - } - return formatDefs; + return util.copy(formats[mode]); } @@ -79229,11 +79193,14 @@ formats.fast = { time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i, + uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i, + 'uri-template': URITEMPLATE, + url: URL, // email (sources from jsen validator): // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, hostname: HOSTNAME, // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, @@ -79255,7 +79222,10 @@ formats.full = { time: time, 'date-time': date_time, uri: uri, - email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, hostname: hostname, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, @@ -79266,13 +79236,6 @@ formats.full = { }; -formats.compare = { - date: compareDate, - time: compareTime, - 'date-time': compareDateTime -}; - - function date(str) { // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 var matches = str.match(DATE); @@ -79311,14 +79274,16 @@ function hostname(str) { } -var NOT_URI_FRAGMENT = /\/|\:/; +var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." return NOT_URI_FRAGMENT.test(str) && URI.test(str); } +var Z_ANCHOR = /[^\\]\\Z/; function regex(str) { + if (Z_ANCHOR.test(str)) return false; try { new RegExp(str); return true; @@ -79328,71 +79293,30 @@ function regex(str) { } -function compareDate(d1, d2) { - if (!(d1 && d2)) return; - if (d1 > d2) return 1; - if (d1 < d2) return -1; - if (d1 === d2) return 0; -} - - -function compareTime(t1, t2) { - if (!(t1 && t2)) return; - t1 = t1.match(TIME); - t2 = t2.match(TIME); - if (!(t1 && t2)) return; - t1 = t1[1] + t1[2] + t1[3] + (t1[4]||''); - t2 = t2[1] + t2[2] + t2[3] + (t2[4]||''); - if (t1 > t2) return 1; - if (t1 < t2) return -1; - if (t1 === t2) return 0; -} - - -function compareDateTime(dt1, dt2) { - if (!(dt1 && dt2)) return; - dt1 = dt1.split(DATE_TIME_SEPARATOR); - dt2 = dt2.split(DATE_TIME_SEPARATOR); - var res = compareDate(dt1[0], dt2[0]); - if (res === undefined) return; - return res || compareTime(dt1[1], dt2[1]); -} - - /***/ }), -/* 350 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var resolve = __webpack_require__(213) - , util = __webpack_require__(64) - , stableStringify = __webpack_require__(194) - , async = __webpack_require__(211); +var resolve = __webpack_require__(185) + , util = __webpack_require__(93) + , errorClasses = __webpack_require__(184) + , stableStringify = __webpack_require__(354); -var beautify; - -function loadBeautify(){ - if (beautify === undefined) { - var name = 'js-beautify'; - try { beautify = !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()).js_beautify; } - catch(e) { beautify = false; } - } -} - -var validateGenerator = __webpack_require__(220); +var validateGenerator = __webpack_require__(275); /** * Functions below are used inside compiled validations function */ -var co = __webpack_require__(260); +var co = __webpack_require__(323); var ucs2length = util.ucs2length; -var equal = __webpack_require__(212); +var equal = __webpack_require__(228); // this error is thrown by async schemas to return validation errors via exception -var ValidationError = __webpack_require__(215); +var ValidationError = errorClasses.Validation; module.exports = compile; @@ -79417,8 +79341,7 @@ function compile(schema, root, localRefs, baseId) { , patternsHash = {} , defaults = [] , defaultsHash = {} - , customRules = [] - , keepSourceCode = opts.sourceCode !== false; + , customRules = []; root = root || { schema: schema, refVal: refVal, refs: refs }; @@ -79440,7 +79363,7 @@ function compile(schema, root, localRefs, baseId) { cv.refVal = v.refVal; cv.root = v.root; cv.$async = v.$async; - if (keepSourceCode) cv.sourceCode = v.sourceCode; + if (opts.sourceCode) cv.source = v.source; } return v; } finally { @@ -79460,7 +79383,6 @@ function compile(schema, root, localRefs, baseId) { return compile.call(self, _schema, _root, localRefs, baseId); var $async = _schema.$async === true; - if ($async && !opts.transpile) async.setup(opts); var sourceCode = validateGenerator({ isTop: true, @@ -79471,6 +79393,7 @@ function compile(schema, root, localRefs, baseId) { schemaPath: '', errSchemaPath: '#', errorPath: '""', + MissingRefError: errorClasses.MissingRef, RULES: RULES, validate: validateGenerator, util: util, @@ -79481,6 +79404,7 @@ function compile(schema, root, localRefs, baseId) { useCustomRule: useCustomRule, opts: opts, formats: formats, + logger: self.logger, self: self }); @@ -79488,20 +79412,10 @@ function compile(schema, root, localRefs, baseId) { + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; - if (opts.beautify) { - loadBeautify(); - /* istanbul ignore else */ - if (beautify) sourceCode = beautify(sourceCode, opts.beautify); - else console.error('"npm install js-beautify" to use beautify option'); - } - // console.log('\n\n\n *** \n', sourceCode); - var validate, validateCode - , transpile = opts._transpileFunc; + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; try { - validateCode = $async && transpile - ? transpile(sourceCode) - : sourceCode; - var makeValidate = new Function( 'self', 'RULES', @@ -79514,7 +79428,7 @@ function compile(schema, root, localRefs, baseId) { 'equal', 'ucs2length', 'ValidationError', - validateCode + sourceCode ); validate = makeValidate( @@ -79533,7 +79447,7 @@ function compile(schema, root, localRefs, baseId) { refVal[0] = validate; } catch(e) { - console.error('Error compiling schema, function code:', validateCode); + self.logger.error('Error compiling schema, function code:', sourceCode); throw e; } @@ -79543,9 +79457,9 @@ function compile(schema, root, localRefs, baseId) { validate.refVal = refVal; validate.root = isRoot ? validate : _root; if ($async) validate.$async = true; - if (keepSourceCode) validate.sourceCode = sourceCode; if (opts.sourceCode === true) { validate.source = { + code: sourceCode, patterns: patterns, defaults: defaults }; @@ -79574,7 +79488,7 @@ function compile(schema, root, localRefs, baseId) { refCode = addLocalRef(ref); var v = resolve.call(self, localCompile, root, ref); - if (!v) { + if (v === undefined) { var localSchema = localRefs && localRefs[ref]; if (localSchema) { v = resolve.inlineRef(localSchema, opts.inlineRefs) @@ -79583,7 +79497,9 @@ function compile(schema, root, localRefs, baseId) { } } - if (v) { + if (v === undefined) { + removeLocalRef(ref); + } else { replaceLocalRef(ref, v); return resolvedRef(v, refCode); } @@ -79596,13 +79512,17 @@ function compile(schema, root, localRefs, baseId) { return 'refVal' + refId; } + function removeLocalRef(ref) { + delete refs[ref]; + } + function replaceLocalRef(ref, v) { var refId = refs[ref]; refVal[refId] = v; } function resolvedRef(refVal, code) { - return typeof refVal == 'object' + return typeof refVal == 'object' || typeof refVal == 'boolean' ? { code: code, schema: refVal, inline: true } : { code: code, $async: refVal && refVal.$async }; } @@ -79641,7 +79561,7 @@ function compile(schema, root, localRefs, baseId) { var valid = validateSchema(schema); if (!valid) { var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') console.error(message); + if (self._opts.validateSchema == 'log') self.logger.error(message); else throw new Error(message); } } @@ -79660,8 +79580,12 @@ function compile(schema, root, localRefs, baseId) { validate = inline.call(self, it, rule.keyword, schema, parentSchema); } else { validate = rule.definition.validate; + if (!validate) return; } + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + var index = customRules.length; customRules[index] = validate; @@ -79738,7 +79662,7 @@ function defaultCode(i) { function refValCode(i, refVal) { - return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : ''; + return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];'; } @@ -79757,46 +79681,64 @@ function vars(arr, statement) { /***/ }), -/* 351 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ruleModules = __webpack_require__(348) - , toHash = __webpack_require__(64).toHash; +var ruleModules = __webpack_require__(442) + , toHash = __webpack_require__(93).toHash; module.exports = function rules() { var RULES = [ { type: 'number', - rules: [ 'maximum', 'minimum', 'multipleOf'] }, + rules: [ { 'maximum': ['exclusiveMaximum'] }, + { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, { type: 'string', rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, { type: 'array', - rules: [ 'maxItems', 'minItems', 'uniqueItems', 'items' ] }, + rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] }, { type: 'object', - rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'properties' ] }, - { rules: [ '$ref', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] } + rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', + { 'properties': ['additionalProperties', 'patternProperties'] } ] }, + { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] } ]; - var ALL = [ 'type', 'additionalProperties', 'patternProperties' ]; - var KEYWORDS = [ 'additionalItems', '$schema', 'id', 'title', 'description', 'default' ]; + var ALL = [ 'type' ]; + var KEYWORDS = [ + 'additionalItems', '$schema', '$id', 'id', 'title', + 'description', 'default', 'definitions' + ]; var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; RULES.all = toHash(ALL); + RULES.types = toHash(TYPES); RULES.forEach(function (group) { group.rules = group.rules.map(function (keyword) { + var implKeywords; + if (typeof keyword == 'object') { + var key = Object.keys(keyword)[0]; + implKeywords = keyword[key]; + keyword = key; + implKeywords.forEach(function (k) { + ALL.push(k); + RULES.all[k] = true; + }); + } ALL.push(keyword); var rule = RULES.all[keyword] = { keyword: keyword, - code: ruleModules[keyword] + code: ruleModules[keyword], + implements: implKeywords }; return rule; }); + + if (group.type) RULES.types[group.type] = group; }); RULES.keywords = toHash(ALL.concat(KEYWORDS)); - RULES.types = toHash(TYPES); RULES.custom = {}; return RULES; @@ -79804,7 +79746,7 @@ module.exports = function rules() { /***/ }), -/* 352 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -79831,195 +79773,12 @@ module.exports = function ucs2length(str) { /***/ }), -/* 353 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate__formatLimit(it, $keyword) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - out += 'var ' + ($valid) + ' = undefined;'; - if (it.opts.format === false) { - out += ' ' + ($valid) + ' = true; '; - return out; - } - var $schemaFormat = it.schema.format, - $isDataFormat = it.opts.v5 && $schemaFormat.$data, - $closingBraces = ''; - if ($isDataFormat) { - var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr), - $format = 'format' + $lvl, - $compare = 'compare' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValueFormat) + '] , ' + ($compare) + ' = ' + ($format) + ' && ' + ($format) + '.compare;'; - } else { - var $format = it.formats[$schemaFormat]; - if (!($format && $format.compare)) { - out += ' ' + ($valid) + ' = true; '; - return out; - } - var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare'; - } - var $isMax = $keyword == 'formatMaximum', - $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum'), - $schemaExcl = it.schema[$exclusiveKeyword], - $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data, - $op = $isMax ? '<' : '>', - $result = 'result' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - if ($isData) { - out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; - $closingBraces += '}'; - } - if ($isDataFormat) { - out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; - $closingBraces += '}'; - } - out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; - } else { - var $exclusive = $schemaExcl === true, - $opStr = $op; - if (!$exclusive) $opStr += '='; - var $opExpr = '\'' + $opStr + '\''; - if ($isData) { - out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; - $closingBraces += '}'; - } - if ($isDataFormat) { - out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; - $closingBraces += '}'; - } - out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op); - if (!$exclusive) { - out += '='; - } - out += ' 0;'; - } - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '}'; - return out; -} - - -/***/ }), -/* 354 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_allOf(it, $keyword) { +module.exports = function generate_allOf(it, $keyword, $ruleType) { var out = ' '; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); @@ -80064,12 +79823,12 @@ module.exports = function generate_allOf(it, $keyword) { /***/ }), -/* 355 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_anyOf(it, $keyword) { +module.exports = function generate_anyOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80108,7 +79867,7 @@ module.exports = function generate_anyOf(it, $keyword) { } } it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { @@ -80121,7 +79880,15 @@ module.exports = function generate_anyOf(it, $keyword) { } else { out += ' {} '; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; if (it.opts.allErrors) { out += ' } '; } @@ -80136,12 +79903,12 @@ module.exports = function generate_anyOf(it, $keyword) { /***/ }), -/* 356 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_constant(it, $keyword) { +module.exports = function generate_const(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80151,7 +79918,7 @@ module.exports = function generate_constant(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -80167,7 +79934,7 @@ module.exports = function generate_constant(it, $keyword) { $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ('constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { out += ' , message: \'should be equal to constant\' '; } @@ -80190,17 +79957,108 @@ module.exports = function generate_constant(it, $keyword) { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' }'; + if ($breakOnError) { + out += ' else { '; + } return out; } /***/ }), -/* 357 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_custom(it, $keyword) { +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} + + +/***/ }), +/* 452 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_custom(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80212,7 +80070,7 @@ module.exports = function generate_custom(it, $keyword) { var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -80222,7 +80080,8 @@ module.exports = function generate_custom(it, $keyword) { } var $rule = this, $definition = 'definition' + $lvl, - $rDef = $rule.definition; + $rDef = $rule.definition, + $closingBraces = ''; var $compile, $inline, $macro, $ruleValidate, $validateCode; if ($isData && $rDef.$data) { $validateCode = 'keywordValidate' + $lvl; @@ -80230,6 +80089,7 @@ module.exports = function generate_custom(it, $keyword) { out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; } else { $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; $schemaValue = 'validate.schema' + $schemaPath; $validateCode = $ruleValidate.code; $compile = $rDef.compile; @@ -80245,8 +80105,13 @@ module.exports = function generate_custom(it, $keyword) { out += '' + ($ruleErrs) + ' = null;'; } out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($validateSchema) { - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') {'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } } if ($inline) { if ($rDef.statements) { @@ -80256,6 +80121,7 @@ module.exports = function generate_custom(it, $keyword) { } } else if ($macro) { var $it = it.util.copy(it); + var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; $it.schema = $ruleValidate.validate; @@ -80305,11 +80171,9 @@ module.exports = function generate_custom(it, $keyword) { } } if ($rDef.modifying) { - out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - if ($validateSchema) { - out += ' }'; + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; } + out += '' + ($closingBraces); if ($rDef.valid) { if ($breakOnError) { out += ' if (true) { '; @@ -80422,12 +80286,12 @@ module.exports = function generate_custom(it, $keyword) { /***/ }), -/* 358 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_dependencies(it, $keyword) { +module.exports = function generate_dependencies(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80442,7 +80306,8 @@ module.exports = function generate_dependencies(it, $keyword) { $it.level++; var $nextValid = 'valid' + $it.level; var $schemaDeps = {}, - $propertyDeps = {}; + $propertyDeps = {}, + $ownProperties = it.opts.ownProperties; for ($property in $schema) { var $sch = $schema[$property]; var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; @@ -80453,100 +80318,115 @@ module.exports = function generate_dependencies(it, $keyword) { out += 'var missing' + ($lvl) + ';'; for (var $property in $propertyDeps) { $deps = $propertyDeps[$property]; - out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($breakOnError) { - out += ' && ( '; - var arr1 = $deps; - if (arr1) { - var _$property, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - _$property = arr1[$i += 1]; - if ($i) { - out += ' || '; + if ($deps.length) { + out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + if ($breakOnError) { + out += ' && ( '; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; } - var $prop = it.util.getProperty(_$property); - out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) '; } - } - out += ')) { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + out += ')) { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - out += ' ) { '; - var arr2 = $deps; - if (arr2) { - var $reqProperty, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $reqProperty = arr2[i2 += 1]; - var $prop = it.util.getProperty($reqProperty), - $missingProperty = it.util.escapeQuotes($reqProperty); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers); - } - out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + out += ' ) { '; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; } } - } - out += ' } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } } } it.errorPath = $currentErrorPath; @@ -80554,7 +80434,11 @@ module.exports = function generate_dependencies(it, $keyword) { for (var $property in $schemaDeps) { var $sch = $schemaDeps[$property]; if (it.util.schemaHasRules($sch, it.RULES.all)) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined) { '; + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; $it.schema = $sch; $it.schemaPath = $schemaPath + it.util.getProperty($property); $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); @@ -80576,12 +80460,12 @@ module.exports = function generate_dependencies(it, $keyword) { /***/ }), -/* 359 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_enum(it, $keyword) { +module.exports = function generate_enum(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80591,7 +80475,7 @@ module.exports = function generate_enum(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -80648,12 +80532,12 @@ module.exports = function generate_enum(it, $keyword) { /***/ }), -/* 360 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_format(it, $keyword) { +module.exports = function generate_format(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80668,7 +80552,7 @@ module.exports = function generate_format(it, $keyword) { } return out; } - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -80679,8 +80563,10 @@ module.exports = function generate_format(it, $keyword) { var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); if ($isData) { - var $format = 'format' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { '; + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; if (it.async) { out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; } @@ -80689,14 +80575,14 @@ module.exports = function generate_format(it, $keyword) { out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; } out += ' ('; - if ($unknownFormats === true || $allowUnknown) { + if ($unknownFormats != 'ignore') { out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; if ($allowUnknown) { out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; } out += ') || '; } - out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? '; + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; if (it.async) { out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; } else { @@ -80706,24 +80592,33 @@ module.exports = function generate_format(it, $keyword) { } else { var $format = it.formats[$schema]; if (!$format) { - if ($unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1)) { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } else { - if (!$allowUnknown) { - console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($unknownFormats !== 'ignore') console.warn('In the next major version it will throw exception. See option unknownFormats for more information'); - } + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); if ($breakOnError) { out += ' if (true) { '; } return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); } } var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; if ($isObject) { var $async = $format.async === true; $format = $format.validate; } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } if ($async) { if (!it.async) throw new Error('async format in sync schema'); var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; @@ -80793,12 +80688,12 @@ module.exports = function generate_format(it, $keyword) { /***/ }), -/* 361 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_items(it, $keyword) { +module.exports = function generate_items(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80929,11 +80824,7 @@ module.exports = function generate_items(it, $keyword) { if ($breakOnError) { out += ' if (!' + ($nextValid) + ') break; '; } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } + out += ' }'; } if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; @@ -80944,12 +80835,12 @@ module.exports = function generate_items(it, $keyword) { /***/ }), -/* 362 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_multipleOf(it, $keyword) { +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -80958,7 +80849,7 @@ module.exports = function generate_multipleOf(it, $keyword) { var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -80991,7 +80882,7 @@ module.exports = function generate_multipleOf(it, $keyword) { if ($isData) { out += '\' + ' + ($schemaValue); } else { - out += '' + ($schema) + '\''; + out += '' + ($schemaValue) + '\''; } } if (it.opts.verbose) { @@ -81027,12 +80918,12 @@ module.exports = function generate_multipleOf(it, $keyword) { /***/ }), -/* 363 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_not(it, $keyword) { +module.exports = function generate_not(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -81117,12 +81008,12 @@ module.exports = function generate_not(it, $keyword) { /***/ }), -/* 364 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_oneOf(it, $keyword) { +module.exports = function generate_oneOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -81164,10 +81055,7 @@ module.exports = function generate_oneOf(it, $keyword) { } } it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { @@ -81180,16 +81068,13 @@ module.exports = function generate_oneOf(it, $keyword) { } else { out += ' {} '; } - var __err = out; - out = $$outStack.pop(); + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; + out += ' throw new ValidationError(vErrors); '; } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + out += ' validate.errors = vErrors; return false; '; } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; if (it.opts.allErrors) { @@ -81200,12 +81085,12 @@ module.exports = function generate_oneOf(it, $keyword) { /***/ }), -/* 365 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_pattern(it, $keyword) { +module.exports = function generate_pattern(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -81214,7 +81099,7 @@ module.exports = function generate_pattern(it, $keyword) { var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -81281,70 +81166,12 @@ module.exports = function generate_pattern(it, $keyword) { /***/ }), -/* 366 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_patternRequired(it, $keyword) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $key = 'key' + $lvl, - $matched = 'patternMatched' + $lvl, - $closingBraces = '', - $ownProperties = it.opts.ownProperties; - out += 'var ' + ($valid) + ' = true;'; - var arr1 = $schema; - if (arr1) { - var $pProperty, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $pProperty = arr1[i1 += 1]; - out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { '; - if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; - } - out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } '; - var $missingPattern = it.util.escapeQuotes($pProperty); - out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - } - out += '' + ($closingBraces); - return out; -} - - -/***/ }), -/* 367 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_properties(it, $keyword) { +module.exports = function generate_properties(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -81360,8 +81187,10 @@ module.exports = function generate_properties(it, $keyword) { $it.level++; var $nextValid = 'valid' + $it.level; var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt; + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; var $schemaKeys = Object.keys($schema || {}), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties), @@ -81375,15 +81204,19 @@ module.exports = function generate_properties(it, $keyword) { $currentBaseId = it.baseId; var $required = it.schema.required; if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); - if (it.opts.v5) { + if (it.opts.patternGroups) { var $pgProperties = it.schema.patternGroups || {}, $pgPropertyKeys = Object.keys($pgProperties); } out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } if ($checkAdditional) { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } if ($someProperties) { out += ' var isAdditional' + ($lvl) + ' = !(false '; @@ -81413,7 +81246,7 @@ module.exports = function generate_properties(it, $keyword) { } } } - if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) { + if (it.opts.patternGroups && $pgPropertyKeys.length) { var arr3 = $pgPropertyKeys; if (arr3) { var $pgProperty, $i = -1, @@ -81553,7 +81386,11 @@ module.exports = function generate_properties(it, $keyword) { out += ' ' + ($code) + ' '; } else { if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = false; '; + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); @@ -81598,9 +81435,17 @@ module.exports = function generate_properties(it, $keyword) { out += ' } else { '; } else { if ($breakOnError) { - out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = true; } else { '; + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; } else { - out += ' if (' + ($useData) + ' !== undefined) { '; + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; } } out += ' ' + ($code) + ' } '; @@ -81613,48 +81458,51 @@ module.exports = function generate_properties(it, $keyword) { } } } - var arr5 = $pPropertyKeys; - if (arr5) { - var $pProperty, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $pProperty = arr5[i5 += 1]; - var $sch = $pProperties[$pProperty]; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; + if ($pPropertyKeys.length) { + var arr5 = $pPropertyKeys; + if (arr5) { + var $pProperty, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $pProperty = arr5[i5 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } } } } } - if (it.opts.v5) { + if (it.opts.patternGroups && $pgPropertyKeys.length) { var arr6 = $pgPropertyKeys; if (arr6) { var $pgProperty, i6 = -1, @@ -81667,9 +81515,11 @@ module.exports = function generate_properties(it, $keyword) { $it.schema = $sch; $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema'; - out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { '; + out += ' var pgPropCount' + ($lvl) + ' = 0; '; if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; '; $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); @@ -81791,12 +81641,100 @@ module.exports = function generate_properties(it, $keyword) { /***/ }), -/* 368 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_ref(it, $keyword) { +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= it.opts.loopRequired; + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; if ($breakOnError) { out += ' var missing' + ($lvl) + '; '; if ($loopRequired) { @@ -81979,7 +81922,11 @@ module.exports = function generate_required(it, $keyword) { if ($isData) { out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } '; + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; if ($isData) { out += ' } '; } @@ -82021,15 +81968,20 @@ module.exports = function generate_required(it, $keyword) { out += ' if ( '; var arr2 = $required; if (arr2) { - var _$property, $i = -1, + var $propertyKey, $i = -1, l2 = arr2.length - 1; while ($i < l2) { - _$property = arr2[$i += 1]; + $propertyKey = arr2[$i += 1]; if ($i) { out += ' || '; } - var $prop = it.util.getProperty(_$property); - out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) '; + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; } } out += ') { '; @@ -82105,7 +82057,11 @@ module.exports = function generate_required(it, $keyword) { } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */ + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { @@ -82131,16 +82087,21 @@ module.exports = function generate_required(it, $keyword) { } else { var arr3 = $required; if (arr3) { - var $reqProperty, i3 = -1, + var $propertyKey, i3 = -1, l3 = arr3.length - 1; while (i3 < l3) { - $reqProperty = arr3[i3 += 1]; - var $prop = it.util.getProperty($reqProperty), - $missingProperty = it.util.escapeQuotes($reqProperty); + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers); + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); } - out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */ + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { @@ -82173,12 +82134,12 @@ module.exports = function generate_required(it, $keyword) { /***/ }), -/* 370 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_switch(it, $keyword) { +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -82188,142 +82149,7 @@ module.exports = function generate_switch(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $ifPassed = 'ifPassed' + it.level, - $currentBaseId = $it.baseId, - $shouldContinue; - out += 'var ' + ($ifPassed) + ';'; - var arr1 = $schema; - if (arr1) { - var $sch, $caseIndex = -1, - l1 = arr1.length - 1; - while ($caseIndex < l1) { - $sch = arr1[$caseIndex += 1]; - if ($caseIndex && !$shouldContinue) { - out += ' if (!' + ($ifPassed) + ') { '; - $closingBraces += '}'; - } - if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - $it.schema = $sch.if; - $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if'; - $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($ifPassed) + ' = ' + ($nextValid) + '; if (' + ($ifPassed) + ') { '; - if (typeof $sch.then == 'boolean') { - if ($sch.then === false) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "switch" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; - } else { - $it.schema = $sch.then; - $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; - $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } '; - } else { - out += ' ' + ($ifPassed) + ' = true; '; - if (typeof $sch.then == 'boolean') { - if ($sch.then === false) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "switch" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; - } else { - $it.schema = $sch.then; - $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; - $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } - } - $shouldContinue = $sch.continue - } - } - out += '' + ($closingBraces) + 'var ' + ($valid) + ' = ' + ($nextValid) + '; '; - out = it.util.cleanUpCode(out); - return out; -} - - -/***/ }), -/* 371 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_uniqueItems(it, $keyword) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -82386,14 +82212,14 @@ module.exports = function generate_uniqueItems(it, $keyword) { /***/ }), -/* 372 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var IDENTIFIER = /^[a-z_$][a-z0-9_$\-]*$/i; -var customRuleCode = __webpack_require__(357); +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = __webpack_require__(452); module.exports = { add: addKeyword, @@ -82406,6 +82232,7 @@ module.exports = { * @this Ajv * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining */ function addKeyword(keyword, definition) { /* jshint validthis: true */ @@ -82432,7 +82259,7 @@ function addKeyword(keyword, definition) { _addRule(keyword, dataType, definition); } - var $data = definition.$data === true && this._opts.v5; + var $data = definition.$data === true && this._opts.$data; if ($data && !definition.validate) throw new Error('$data support: "validate" function is not defined'); @@ -82442,7 +82269,7 @@ function addKeyword(keyword, definition) { metaSchema = { anyOf: [ metaSchema, - { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' } + { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' } ] }; } @@ -82472,7 +82299,8 @@ function addKeyword(keyword, definition) { keyword: keyword, definition: definition, custom: true, - code: customRuleCode + code: customRuleCode, + implements: definition.implements }; ruleGroup.rules.push(rule); RULES.custom[keyword] = rule; @@ -82482,6 +82310,8 @@ function addKeyword(keyword, definition) { function checkDataType(dataType) { if (!RULES.types[dataType]) throw new Error('Unknown type ' + dataType); } + + return this; } @@ -82502,6 +82332,7 @@ function getKeyword(keyword) { * Remove keyword * @this Ajv * @param {String} keyword pre-defined or custom keyword. + * @return {Ajv} this for method chaining */ function removeKeyword(keyword) { /* jshint validthis: true */ @@ -82518,817 +82349,96 @@ function removeKeyword(keyword) { } } } + return this; } /***/ }), -/* 373 */ -/***/ (function(module, exports) { - -module.exports = { - "id": "http://json-schema.org/draft-04/schema#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/positiveInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - } - }, - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "$ref": "#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { - "anyOf": [ - { - "type": "boolean" - }, - { - "$ref": "#" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/schemaArray" - } - ], - "default": {} - }, - "maxItems": { - "$ref": "#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "$ref": "#/definitions/positiveInteger" - }, - "minProperties": { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - "required": { - "$ref": "#/definitions/stringArray" - }, - "additionalProperties": { - "anyOf": [ - { - "type": "boolean" - }, - { - "$ref": "#" - } - ], - "default": {} - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/stringArray" - } - ] - } - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { - "$ref": "#/definitions/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "allOf": { - "$ref": "#/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/schemaArray" - }, - "not": { - "$ref": "#" - } - }, - "dependencies": { - "exclusiveMaximum": [ - "maximum" - ], - "exclusiveMinimum": [ - "minimum" - ] - }, - "default": {} -}; - -/***/ }), -/* 374 */ -/***/ (function(module, exports) { - -module.exports = { - "id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Core schema meta-schema (v5 proposals)", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#" - } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [ - { - "$ref": "#/definitions/positiveInteger" - }, - { - "default": 0 - } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "$data": { - "type": "object", - "required": [ - "$data" - ], - "properties": { - "$data": { - "type": "string", - "anyOf": [ - { - "format": "relative-json-pointer" - }, - { - "format": "json-pointer" - } - ] - } - }, - "additionalProperties": false - } - }, - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "multipleOf": { - "anyOf": [ - { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "maximum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "exclusiveMaximum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "minimum": { - "anyOf": [ - { - "type": "number" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "exclusiveMinimum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "maxLength": { - "anyOf": [ - { - "$ref": "#/definitions/positiveInteger" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "minLength": { - "anyOf": [ - { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "pattern": { - "anyOf": [ - { - "type": "string", - "format": "regex" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "additionalItems": { - "anyOf": [ - { - "type": "boolean" - }, - { - "$ref": "#" - }, - { - "$ref": "#/definitions/$data" - } - ], - "default": {} - }, - "items": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/schemaArray" - } - ], - "default": {} - }, - "maxItems": { - "anyOf": [ - { - "$ref": "#/definitions/positiveInteger" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "minItems": { - "anyOf": [ - { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "uniqueItems": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "maxProperties": { - "anyOf": [ - { - "$ref": "#/definitions/positiveInteger" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "minProperties": { - "anyOf": [ - { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "required": { - "anyOf": [ - { - "$ref": "#/definitions/stringArray" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "additionalProperties": { - "anyOf": [ - { - "type": "boolean" - }, - { - "$ref": "#" - }, - { - "$ref": "#/definitions/$data" - } - ], - "default": {} - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#" - }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "$ref": "#" - }, - { - "$ref": "#/definitions/stringArray" - } - ] - } - }, - "enum": { - "anyOf": [ - { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "type": { - "anyOf": [ - { - "$ref": "#/definitions/simpleTypes" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/simpleTypes" - }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "allOf": { - "$ref": "#/definitions/schemaArray" - }, - "anyOf": { - "$ref": "#/definitions/schemaArray" - }, - "oneOf": { - "$ref": "#/definitions/schemaArray" - }, - "not": { - "$ref": "#" - }, - "format": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "formatMaximum": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "formatMinimum": { - "anyOf": [ - { - "type": "string" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "formatExclusiveMaximum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "formatExclusiveMinimum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "constant": { - "anyOf": [ - {}, - { - "$ref": "#/definitions/$data" - } - ] - }, - "contains": { - "$ref": "#" - }, - "patternGroups": { - "type": "object", - "additionalProperties": { - "type": "object", - "required": [ - "schema" - ], - "properties": { - "maximum": { - "anyOf": [ - { - "$ref": "#/definitions/positiveInteger" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "minimum": { - "anyOf": [ - { - "$ref": "#/definitions/positiveIntegerDefault0" - }, - { - "$ref": "#/definitions/$data" - } - ] - }, - "schema": { - "$ref": "#" - } - }, - "additionalProperties": false - }, - "default": {} - }, - "switch": { - "type": "array", - "items": { - "required": [ - "then" - ], - "properties": { - "if": { - "$ref": "#" - }, - "then": { - "anyOf": [ - { - "type": "boolean" - }, - { - "$ref": "#" - } - ] - }, - "continue": { - "type": "boolean" - } - }, - "additionalProperties": false, - "dependencies": { - "continue": [ - "if" - ] - } - } - } - }, - "dependencies": { - "exclusiveMaximum": [ - "maximum" - ], - "exclusiveMinimum": [ - "minimum" - ], - "formatMaximum": [ - "format" - ], - "formatMinimum": [ - "format" - ], - "formatExclusiveMaximum": [ - "formatMaximum" - ], - "formatExclusiveMinimum": [ - "formatMinimum" - ] - }, - "default": {} -}; - -/***/ }), -/* 375 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var META_SCHEMA_ID = 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json'; +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; -module.exports = { - enable: enableV5, - META_SCHEMA_ID: META_SCHEMA_ID +module.exports = function (ajv) { + var defaultMeta = ajv._opts.defaultMeta; + var metaSchemaRef = typeof defaultMeta == 'string' + ? { $ref: defaultMeta } + : ajv.getSchema(META_SCHEMA_ID) + ? { $ref: META_SCHEMA_ID } + : {}; + + ajv.addKeyword('patternGroups', { + // implemented in properties.jst + metaSchema: { + type: 'object', + additionalProperties: { + type: 'object', + required: [ 'schema' ], + properties: { + maximum: { + type: 'integer', + minimum: 0 + }, + minimum: { + type: 'integer', + minimum: 0 + }, + schema: metaSchemaRef + }, + additionalProperties: false + } + } + }); + ajv.RULES.all.properties.implements.push('patternGroups'); }; -function enableV5(ajv) { - var inlineFunctions = { - 'switch': __webpack_require__(370), - 'constant': __webpack_require__(356), - '_formatLimit': __webpack_require__(353), - 'patternRequired': __webpack_require__(366) - }; - - if (ajv._opts.meta !== false) { - var metaSchema = __webpack_require__(374); - ajv.addMetaSchema(metaSchema, META_SCHEMA_ID); - } - _addKeyword('constant'); - ajv.addKeyword('contains', { type: 'array', macro: containsMacro }); - - _addKeyword('formatMaximum', 'string', inlineFunctions._formatLimit); - _addKeyword('formatMinimum', 'string', inlineFunctions._formatLimit); - ajv.addKeyword('formatExclusiveMaximum'); - ajv.addKeyword('formatExclusiveMinimum'); - - ajv.addKeyword('patternGroups'); // implemented in properties.jst - _addKeyword('patternRequired', 'object'); - _addKeyword('switch'); - - - function _addKeyword(keyword, types, inlineFunc) { - var definition = { - inline: inlineFunc || inlineFunctions[keyword], - statements: true, - errors: 'full' - }; - if (types) definition.type = types; - ajv.addKeyword(keyword, definition); - } -} - - -function containsMacro(schema) { - return { - not: { items: { not: schema } } - }; -} +/***/ }), +/* 468 */ +/***/ (function(module, exports) { +module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#","description":"Meta-schema for $data reference (JSON-schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false} /***/ }), -/* 376 */ +/* 469 */ +/***/ (function(module, exports) { + +module.exports = {"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}} + +/***/ }), +/* 470 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var ESC = '\u001b['; -var x = module.exports; +const x = module.exports; +const ESC = '\u001B['; +const OSC = '\u001B]'; +const BEL = '\u0007'; +const SEP = ';'; +const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal'; -x.cursorTo = function (x, y) { - if (arguments.length === 0) { - return ESC + 'H'; +x.cursorTo = (x, y) => { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); } - if (arguments.length === 1) { + if (typeof y !== 'number') { return ESC + (x + 1) + 'G'; } return ESC + (y + 1) + ';' + (x + 1) + 'H'; }; -x.cursorMove = function (x, y) { - var ret = ''; +x.cursorMove = (x, y) => { + if (typeof x !== 'number') { + throw new TypeError('The `x` argument is required'); + } + + let ret = ''; if (x < 0) { ret += ESC + (-x) + 'D'; @@ -83345,36 +82455,29 @@ x.cursorMove = function (x, y) { return ret; }; -x.cursorUp = function (count) { - return ESC + (typeof count === 'number' ? count : 1) + 'A'; -}; +x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A'; +x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B'; +x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C'; +x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D'; -x.cursorDown = function (count) { - return ESC + (typeof count === 'number' ? count : 1) + 'B'; -}; - -x.cursorForward = function (count) { - return ESC + (typeof count === 'number' ? count : 1) + 'C'; -}; - -x.cursorBackward = function (count) { - return ESC + (typeof count === 'number' ? count : 1) + 'D'; -}; - -x.cursorLeft = ESC + '1000D'; -x.cursorSavePosition = ESC + 's'; -x.cursorRestorePosition = ESC + 'u'; +x.cursorLeft = ESC + 'G'; +x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's'); +x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u'); x.cursorGetPosition = ESC + '6n'; x.cursorNextLine = ESC + 'E'; x.cursorPrevLine = ESC + 'F'; x.cursorHide = ESC + '?25l'; x.cursorShow = ESC + '?25h'; -x.eraseLines = function (count) { - var clear = ''; +x.eraseLines = count => { + let clear = ''; - for (var i = 0; i < count; i++) { - clear += x.cursorLeft + x.eraseEndLine + (i < count - 1 ? x.cursorUp() : ''); + for (let i = 0; i < count; i++) { + clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : ''); + } + + if (count) { + clear += x.cursorLeft; } return clear; @@ -83389,43 +82492,69 @@ x.eraseScreen = ESC + '2J'; x.scrollUp = ESC + 'S'; x.scrollDown = ESC + 'T'; -x.clearScreen = '\u001bc'; -x.beep = '\u0007'; +x.clearScreen = '\u001Bc'; +x.beep = BEL; -x.image = function (buf, opts) { +x.link = (text, url) => { + return [ + OSC, + '8', + SEP, + SEP, + url, + BEL, + text, + OSC, + '8', + SEP, + SEP, + BEL + ].join(''); +}; + +x.image = (buf, opts) => { opts = opts || {}; - var ret = '\u001b]1337;File=inline=1'; + let ret = OSC + '1337;File=inline=1'; if (opts.width) { - ret += ';width=' + opts.width; + ret += `;width=${opts.width}`; } if (opts.height) { - ret += ';height=' + opts.height; + ret += `;height=${opts.height}`; } if (opts.preserveAspectRatio === false) { ret += ';preserveAspectRatio=0'; } - return ret + ':' + buf.toString('base64') + '\u0007'; + return ret + ':' + buf.toString('base64') + BEL; }; x.iTerm = {}; -x.iTerm.setCwd = function (cwd) { - return '\u001b]50;CurrentDir=' + (cwd || process.cwd()) + '\u0007'; +x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL; + + +/***/ }), +/* 471 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; }; /***/ }), -/* 377 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(module) { -const colorConvert = __webpack_require__(476); +const colorConvert = __webpack_require__(595); const wrapAnsi16 = (fn, offset) => function () { const code = fn.apply(colorConvert, arguments); @@ -83528,30 +82657,43 @@ function assembleStyles() { }); } + const ansi2ansi = n => n; const rgb2rgb = (r, g, b) => [r, g, b]; styles.color.close = '\u001B[39m'; styles.bgColor.close = '\u001B[49m'; - styles.color.ansi = {}; - styles.color.ansi256 = {}; + styles.color.ansi = { + ansi: wrapAnsi16(ansi2ansi, 0) + }; + styles.color.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 0) + }; styles.color.ansi16m = { rgb: wrapAnsi16m(rgb2rgb, 0) }; - styles.bgColor.ansi = {}; - styles.bgColor.ansi256 = {}; + styles.bgColor.ansi = { + ansi: wrapAnsi16(ansi2ansi, 10) + }; + styles.bgColor.ansi256 = { + ansi256: wrapAnsi256(ansi2ansi, 10) + }; styles.bgColor.ansi16m = { rgb: wrapAnsi16m(rgb2rgb, 10) }; - for (const key of Object.keys(colorConvert)) { + for (let key of Object.keys(colorConvert)) { if (typeof colorConvert[key] !== 'object') { continue; } const suite = colorConvert[key]; + if (key === 'ansi16') { + key = 'ansi'; + } + if ('ansi16' in suite) { styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); @@ -83577,10 +82719,237 @@ Object.defineProperty(module, 'exports', { get: assembleStyles }); -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)(module))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(145)(module))) /***/ }), -/* 378 */ +/* 473 */ +/***/ (function(module, exports) { + +function webpackEmptyContext(req) { + throw new Error("Cannot find module '" + req + "'."); +} +webpackEmptyContext.keys = function() { return []; }; +webpackEmptyContext.resolve = webpackEmptyContext; +module.exports = webpackEmptyContext; +webpackEmptyContext.id = 473; + +/***/ }), +/* 474 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + // global key for user preferred registration +var REGISTRATION_KEY = '@@any-promise/REGISTRATION', + // Prior registration (preferred or detected) + registered = null + +/** + * Registers the given implementation. An implementation must + * be registered prior to any call to `require("any-promise")`, + * typically on application load. + * + * If called with no arguments, will return registration in + * following priority: + * + * For Node.js: + * + * 1. Previous registration + * 2. global.Promise if node.js version >= 0.12 + * 3. Auto detected promise based on first sucessful require of + * known promise libraries. Note this is a last resort, as the + * loaded library is non-deterministic. node.js >= 0.12 will + * always use global.Promise over this priority list. + * 4. Throws error. + * + * For Browser: + * + * 1. Previous registration + * 2. window.Promise + * 3. Throws error. + * + * Options: + * + * Promise: Desired Promise constructor + * global: Boolean - Should the registration be cached in a global variable to + * allow cross dependency/bundle registration? (default true) + */ +module.exports = function(root, loadImplementation){ + return function register(implementation, opts){ + implementation = implementation || null + opts = opts || {} + // global registration unless explicitly {global: false} in options (default true) + var registerGlobal = opts.global !== false; + + // load any previous global registration + if(registered === null && registerGlobal){ + registered = root[REGISTRATION_KEY] || null + } + + if(registered !== null + && implementation !== null + && registered.implementation !== implementation){ + // Throw error if attempting to redefine implementation + throw new Error('any-promise already defined as "'+registered.implementation+ + '". You can only register an implementation before the first '+ + ' call to require("any-promise") and an implementation cannot be changed') + } + + if(registered === null){ + // use provided implementation + if(implementation !== null && typeof opts.Promise !== 'undefined'){ + registered = { + Promise: opts.Promise, + implementation: implementation + } + } else { + // require implementation if implementation is specified but not provided + registered = loadImplementation(implementation) + } + + if(registerGlobal){ + // register preference globally in case multiple installations + root[REGISTRATION_KEY] = registered + } + } + + return registered + } +} + + +/***/ }), +/* 475 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = __webpack_require__(474)(global, loadImplementation); + +/** + * Node.js version of loadImplementation. + * + * Requires the given implementation and returns the registration + * containing {Promise, implementation} + * + * If implementation is undefined or global.Promise, loads it + * Otherwise uses require + */ +function loadImplementation(implementation){ + var impl = null + + if(shouldPreferGlobalPromise(implementation)){ + // if no implementation or env specified use global.Promise + impl = { + Promise: global.Promise, + implementation: 'global.Promise' + } + } else if(implementation){ + // if implementation specified, require it + var lib = !(function webpackMissingModule() { var e = new Error("Cannot find module \".\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()) + impl = { + Promise: lib.Promise || lib, + implementation: implementation + } + } else { + // try to auto detect implementation. This is non-deterministic + // and should prefer other branches, but this is our last chance + // to load something without throwing error + impl = tryAutoDetect() + } + + if(impl === null){ + throw new Error('Cannot find any-promise implementation nor'+ + ' global.Promise. You must install polyfill or call'+ + ' require("any-promise/register") with your preferred'+ + ' implementation, e.g. require("any-promise/register/bluebird")'+ + ' on application load prior to any require("any-promise").') + } + + return impl +} + +/** + * Determines if the global.Promise should be preferred if an implementation + * has not been registered. + */ +function shouldPreferGlobalPromise(implementation){ + if(implementation){ + return implementation === 'global.Promise' + } else if(typeof global.Promise !== 'undefined'){ + // Load global promise if implementation not specified + // Versions < 0.11 did not have global Promise + // Do not use for version < 0.12 as version 0.11 contained buggy versions + var version = (/v(\d+)\.(\d+)\.(\d+)/).exec(process.version) + return !(version && +version[1] == 0 && +version[2] < 12) + } + + // do not have global.Promise or another implementation was specified + return false +} + +/** + * Look for common libs as last resort there is no guarantee that + * this will return a desired implementation or even be deterministic. + * The priority is also nearly arbitrary. We are only doing this + * for older versions of Node.js <0.12 that do not have a reasonable + * global.Promise implementation and we the user has not registered + * the preference. This preserves the behavior of any-promise <= 0.1 + * and may be deprecated or removed in the future + */ +function tryAutoDetect(){ + var libs = [ + "es6-promise", + "promise", + "native-promise-only", + "bluebird", + "rsvp", + "when", + "q", + "pinkie", + "lie", + "vow"] + var i = 0, len = libs.length + for(; i < len; i++){ + try { + return loadImplementation(libs[i]) + } catch(e){} + } + return null +} + + +/***/ }), +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * arr-flatten + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function (arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var i = 0, cur; + var len = arr.length; + for (; i < len; i++) { + cur = arr[i]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; +} + + +/***/ }), +/* 477 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83612,13 +82981,13 @@ module.exports = function (arr, predicate, ctx) { /***/ }), -/* 379 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var rawAsap = __webpack_require__(380); +var rawAsap = __webpack_require__(479); var freeTasks = []; /** @@ -83684,7 +83053,7 @@ RawTask.prototype.call = function () { /***/ }), -/* 380 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -83768,7 +83137,7 @@ function requestFlush() { if (!domain) { // Lazy execute the domain module. // Only employed if the user elects to use domains. - domain = __webpack_require__(752); + domain = __webpack_require__(1006); } domain.active = process.domain = null; } @@ -83792,19 +83161,19 @@ function requestFlush() { /***/ }), -/* 381 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2011 Mark Cavage All rights reserved. -var errors = __webpack_require__(147); -var types = __webpack_require__(148); +var errors = __webpack_require__(186); +var types = __webpack_require__(187); -var Reader = __webpack_require__(382); -var Writer = __webpack_require__(383); +var Reader = __webpack_require__(481); +var Writer = __webpack_require__(482); -///--- Exports +// --- Exports module.exports = { @@ -83825,24 +83194,25 @@ for (var e in errors) { /***/ }), -/* 382 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2011 Mark Cavage All rights reserved. -var assert = __webpack_require__(36); +var assert = __webpack_require__(49); +var Buffer = __webpack_require__(20).Buffer; -var ASN1 = __webpack_require__(148); -var errors = __webpack_require__(147); +var ASN1 = __webpack_require__(187); +var errors = __webpack_require__(186); -///--- Globals +// --- Globals var newInvalidAsn1Error = errors.newInvalidAsn1Error; -///--- API +// --- API function Reader(data) { if (!data || !Buffer.isBuffer(data)) @@ -83882,7 +83252,7 @@ Object.defineProperty(Reader.prototype, 'buffer', { * @param {Boolean} peek true means don't move offset. * @return {Number} the next byte, null if not enough data. */ -Reader.prototype.readByte = function(peek) { +Reader.prototype.readByte = function (peek) { if (this._size - this._offset < 1) return null; @@ -83895,7 +83265,7 @@ Reader.prototype.readByte = function(peek) { }; -Reader.prototype.peek = function() { +Reader.prototype.peek = function () { return this.readByte(true); }; @@ -83911,7 +83281,7 @@ Reader.prototype.peek = function() { * @return {Number} the amount of offset to advance the buffer. * @throws {InvalidAsn1Error} on bad ASN.1 */ -Reader.prototype.readLength = function(offset) { +Reader.prototype.readLength = function (offset) { if (offset === undefined) offset = this._offset; @@ -83922,10 +83292,10 @@ Reader.prototype.readLength = function(offset) { if (lenB === null) return null; - if ((lenB & 0x80) == 0x80) { + if ((lenB & 0x80) === 0x80) { lenB &= 0x7f; - if (lenB == 0) + if (lenB === 0) throw newInvalidAsn1Error('Indefinite length not supported'); if (lenB > 4) @@ -83954,7 +83324,7 @@ Reader.prototype.readLength = function(offset) { * * @return {Number} the sequence's tag. */ -Reader.prototype.readSequence = function(tag) { +Reader.prototype.readSequence = function (tag) { var seq = this.peek(); if (seq === null) return null; @@ -83971,22 +83341,22 @@ Reader.prototype.readSequence = function(tag) { }; -Reader.prototype.readInt = function() { +Reader.prototype.readInt = function () { return this._readTag(ASN1.Integer); }; -Reader.prototype.readBoolean = function() { +Reader.prototype.readBoolean = function () { return (this._readTag(ASN1.Boolean) === 0 ? false : true); }; -Reader.prototype.readEnumeration = function() { +Reader.prototype.readEnumeration = function () { return this._readTag(ASN1.Enumeration); }; -Reader.prototype.readString = function(tag, retbuf) { +Reader.prototype.readString = function (tag, retbuf) { if (!tag) tag = ASN1.OctetString; @@ -84009,7 +83379,7 @@ Reader.prototype.readString = function(tag, retbuf) { this._offset = o; if (this.length === 0) - return retbuf ? new Buffer(0) : ''; + return retbuf ? Buffer.alloc(0) : ''; var str = this._buf.slice(this._offset, this._offset + this.length); this._offset += this.length; @@ -84017,7 +83387,7 @@ Reader.prototype.readString = function(tag, retbuf) { return retbuf ? str : str.toString('utf8'); }; -Reader.prototype.readOID = function(tag) { +Reader.prototype.readOID = function (tag) { if (!tag) tag = ASN1.OID; @@ -84033,7 +83403,7 @@ Reader.prototype.readOID = function(tag) { value <<= 7; value += byte & 0x7f; - if ((byte & 0x80) == 0) { + if ((byte & 0x80) === 0) { values.push(value); value = 0; } @@ -84047,7 +83417,7 @@ Reader.prototype.readOID = function(tag) { }; -Reader.prototype._readTag = function(tag) { +Reader.prototype._readTag = function (tag) { assert.ok(tag !== undefined); var b = this.peek(); @@ -84078,7 +83448,7 @@ Reader.prototype._readTag = function(tag) { value |= (this._buf[this._offset++] & 0xff); } - if ((fb & 0x80) == 0x80 && i !== 4) + if ((fb & 0x80) === 0x80 && i !== 4) value -= (1 << (i * 8)); return value >> 0; @@ -84086,23 +83456,24 @@ Reader.prototype._readTag = function(tag) { -///--- Exported API +// --- Exported API module.exports = Reader; /***/ }), -/* 383 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { // Copyright 2011 Mark Cavage All rights reserved. -var assert = __webpack_require__(36); -var ASN1 = __webpack_require__(148); -var errors = __webpack_require__(147); +var assert = __webpack_require__(49); +var Buffer = __webpack_require__(20).Buffer; +var ASN1 = __webpack_require__(187); +var errors = __webpack_require__(186); -///--- Globals +// --- Globals var newInvalidAsn1Error = errors.newInvalidAsn1Error; @@ -84112,16 +83483,16 @@ var DEFAULT_OPTS = { }; -///--- Helpers +// --- Helpers function merge(from, to) { assert.ok(from); - assert.equal(typeof(from), 'object'); + assert.equal(typeof (from), 'object'); assert.ok(to); - assert.equal(typeof(to), 'object'); + assert.equal(typeof (to), 'object'); var keys = Object.getOwnPropertyNames(from); - keys.forEach(function(key) { + keys.forEach(function (key) { if (to[key]) return; @@ -84134,12 +83505,12 @@ function merge(from, to) { -///--- API +// --- API function Writer(options) { options = merge(DEFAULT_OPTS, options || {}); - this._buf = new Buffer(options.size || 1024); + this._buf = Buffer.alloc(options.size || 1024); this._size = this._buf.length; this._offset = 0; this._options = options; @@ -84152,14 +83523,14 @@ function Writer(options) { Object.defineProperty(Writer.prototype, 'buffer', { get: function () { if (this._seq.length) - throw new InvalidAsn1Error(this._seq.length + ' unended sequence(s)'); + throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); return (this._buf.slice(0, this._offset)); } }); -Writer.prototype.writeByte = function(b) { - if (typeof(b) !== 'number') +Writer.prototype.writeByte = function (b) { + if (typeof (b) !== 'number') throw new TypeError('argument must be a Number'); this._ensure(1); @@ -84167,22 +83538,22 @@ Writer.prototype.writeByte = function(b) { }; -Writer.prototype.writeInt = function(i, tag) { - if (typeof(i) !== 'number') +Writer.prototype.writeInt = function (i, tag) { + if (typeof (i) !== 'number') throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') + if (typeof (tag) !== 'number') tag = ASN1.Integer; var sz = 4; while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && - (sz > 1)) { + (sz > 1)) { sz--; i <<= 8; } if (sz > 4) - throw new InvalidAsn1Error('BER ints cannot be > 0xffffffff'); + throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); this._ensure(2 + sz); this._buf[this._offset++] = tag; @@ -84196,26 +83567,26 @@ Writer.prototype.writeInt = function(i, tag) { }; -Writer.prototype.writeNull = function() { +Writer.prototype.writeNull = function () { this.writeByte(ASN1.Null); this.writeByte(0x00); }; -Writer.prototype.writeEnumeration = function(i, tag) { - if (typeof(i) !== 'number') +Writer.prototype.writeEnumeration = function (i, tag) { + if (typeof (i) !== 'number') throw new TypeError('argument must be a Number'); - if (typeof(tag) !== 'number') + if (typeof (tag) !== 'number') tag = ASN1.Enumeration; return this.writeInt(i, tag); }; -Writer.prototype.writeBoolean = function(b, tag) { - if (typeof(b) !== 'boolean') +Writer.prototype.writeBoolean = function (b, tag) { + if (typeof (b) !== 'boolean') throw new TypeError('argument must be a Boolean'); - if (typeof(tag) !== 'number') + if (typeof (tag) !== 'number') tag = ASN1.Boolean; this._ensure(3); @@ -84225,10 +83596,10 @@ Writer.prototype.writeBoolean = function(b, tag) { }; -Writer.prototype.writeString = function(s, tag) { - if (typeof(s) !== 'string') - throw new TypeError('argument must be a string (was: ' + typeof(s) + ')'); - if (typeof(tag) !== 'number') +Writer.prototype.writeString = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); + if (typeof (tag) !== 'number') tag = ASN1.OctetString; var len = Buffer.byteLength(s); @@ -84242,8 +83613,8 @@ Writer.prototype.writeString = function(s, tag) { }; -Writer.prototype.writeBuffer = function(buf, tag) { - if (typeof(tag) !== 'number') +Writer.prototype.writeBuffer = function (buf, tag) { + if (typeof (tag) !== 'number') throw new TypeError('tag must be a number'); if (!Buffer.isBuffer(buf)) throw new TypeError('argument must be a buffer'); @@ -84256,21 +83627,21 @@ Writer.prototype.writeBuffer = function(buf, tag) { }; -Writer.prototype.writeStringArray = function(strings) { +Writer.prototype.writeStringArray = function (strings) { if ((!strings instanceof Array)) throw new TypeError('argument must be an Array[String]'); var self = this; - strings.forEach(function(s) { + strings.forEach(function (s) { self.writeString(s); }); }; // This is really to solve DER cases, but whatever for now -Writer.prototype.writeOID = function(s, tag) { - if (typeof(s) !== 'string') +Writer.prototype.writeOID = function (s, tag) { + if (typeof (s) !== 'string') throw new TypeError('argument must be a string'); - if (typeof(tag) !== 'number') + if (typeof (tag) !== 'number') tag = ASN1.OID; if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) @@ -84303,7 +83674,7 @@ Writer.prototype.writeOID = function(s, tag) { var tmp = s.split('.'); var bytes = []; bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); - tmp.slice(2).forEach(function(b) { + tmp.slice(2).forEach(function (b) { encodeOctet(bytes, parseInt(b, 10)); }); @@ -84311,14 +83682,14 @@ Writer.prototype.writeOID = function(s, tag) { this._ensure(2 + bytes.length); this.writeByte(tag); this.writeLength(bytes.length); - bytes.forEach(function(b) { + bytes.forEach(function (b) { self.writeByte(b); }); }; -Writer.prototype.writeLength = function(len) { - if (typeof(len) !== 'number') +Writer.prototype.writeLength = function (len) { + if (typeof (len) !== 'number') throw new TypeError('argument must be a Number'); this._ensure(4); @@ -84338,12 +83709,12 @@ Writer.prototype.writeLength = function(len) { this._buf[this._offset++] = len >> 8; this._buf[this._offset++] = len; } else { - throw new InvalidAsn1ERror('Length too long (> 4 bytes)'); + throw newInvalidAsn1Error('Length too long (> 4 bytes)'); } }; -Writer.prototype.startSequence = function(tag) { - if (typeof(tag) !== 'number') +Writer.prototype.startSequence = function (tag) { + if (typeof (tag) !== 'number') tag = ASN1.Sequence | ASN1.Constructor; this.writeByte(tag); @@ -84353,7 +83724,7 @@ Writer.prototype.startSequence = function(tag) { }; -Writer.prototype.endSequence = function() { +Writer.prototype.endSequence = function () { var seq = this._seq.pop(); var start = seq + 3; var len = this._offset - start; @@ -84376,12 +83747,12 @@ Writer.prototype.endSequence = function() { this._buf[seq + 2] = len >> 8; this._buf[seq + 3] = len; } else { - throw new InvalidAsn1Error('Sequence too long'); + throw newInvalidAsn1Error('Sequence too long'); } }; -Writer.prototype._shift = function(start, len, shift) { +Writer.prototype._shift = function (start, len, shift) { assert.ok(start !== undefined); assert.ok(len !== undefined); assert.ok(shift); @@ -84390,7 +83761,7 @@ Writer.prototype._shift = function(start, len, shift) { this._offset += shift; }; -Writer.prototype._ensure = function(len) { +Writer.prototype._ensure = function (len) { assert.ok(len); if (this._size - this._offset < len) { @@ -84398,7 +83769,7 @@ Writer.prototype._ensure = function(len) { if (sz - this._offset < len) sz += len; - var buf = new Buffer(sz); + var buf = Buffer.alloc(sz); this._buf.copy(buf, 0, 0, this._offset); this._buf = buf; @@ -84408,25 +83779,25 @@ Writer.prototype._ensure = function(len) { -///--- Exported API +// --- Exported API module.exports = Writer; /***/ }), -/* 384 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { - parallel : __webpack_require__(386), - serial : __webpack_require__(387), - serialOrdered : __webpack_require__(227) + parallel : __webpack_require__(485), + serial : __webpack_require__(486), + serialOrdered : __webpack_require__(282) }; /***/ }), -/* 385 */ +/* 484 */ /***/ (function(module, exports) { module.exports = defer; @@ -84458,12 +83829,12 @@ function defer(fn) /***/ }), -/* 386 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { -var iterate = __webpack_require__(224) - , initState = __webpack_require__(225) - , terminator = __webpack_require__(226) +var iterate = __webpack_require__(279) + , initState = __webpack_require__(280) + , terminator = __webpack_require__(281) ; // Public API @@ -84507,10 +83878,10 @@ function parallel(list, iterator, callback) /***/ }), -/* 387 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { -var serialOrdered = __webpack_require__(227); +var serialOrdered = __webpack_require__(282); // Public API module.exports = serial; @@ -84530,7 +83901,7 @@ function serial(list, iterator, callback) /***/ }), -/* 388 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { @@ -84554,8 +83925,8 @@ function serial(list, iterator, callback) * Module dependencies. */ -var crypto = __webpack_require__(14) - , parse = __webpack_require__(19).parse +var crypto = __webpack_require__(21) + , parse = __webpack_require__(29).parse ; /** @@ -84668,7 +84039,7 @@ function stringToSign (options) { ] return r.join('\n') } -module.exports.queryStringToSign = stringToSign +module.exports.stringToSign = stringToSign /** * Return a string for sign() with the given `options`, but is meant exclusively @@ -84748,14 +84119,14 @@ module.exports.canonicalizeResource = canonicalizeResource /***/ }), -/* 389 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { var aws4 = exports, - url = __webpack_require__(19), - querystring = __webpack_require__(144), - crypto = __webpack_require__(14), - lru = __webpack_require__(390), + url = __webpack_require__(29), + querystring = __webpack_require__(179), + crypto = __webpack_require__(21), + lru = __webpack_require__(489), credentialsCache = lru(1000) // http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html @@ -84986,8 +84357,8 @@ RequestSigner.prototype.canonicalString = function() { if (normalizePath && piece === '..') { path.pop() } else if (!normalizePath || piece !== '.') { - if (decodePath) piece = querystring.unescape(piece) - path.push(encodeRfc3986(querystring.escape(piece))) + if (decodePath) piece = decodeURIComponent(piece) + path.push(encodeRfc3986(encodeURIComponent(piece))) } return path }, []).join('/') @@ -85056,7 +84427,7 @@ RequestSigner.prototype.parsePath = function() { // So if there are non-reserved chars (and it's not already all % encoded), just encode them all if (/[^0-9A-Za-z!'()*\-._~%/]/.test(path)) { path = path.split('/').map(function(piece) { - return querystring.escape(querystring.unescape(piece)) + return encodeURIComponent(decodeURIComponent(piece)) }).join('/') } @@ -85086,7 +84457,7 @@ aws4.sign = function(request, credentials) { /***/ }), -/* 390 */ +/* 489 */ /***/ (function(module, exports) { module.exports = function(size) { @@ -85188,7 +84559,2177 @@ function DoublyLinkedNode(key, val) { /***/ }), -/* 391 */ +/* 490 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); + +/** + * Choice object + * Normalize input as choice object + * @constructor + * @param {String|Object} val Choice value. If an object is passed, it should contains + * at least one of `value` or `name` property + */ + +module.exports = function Choice(val, answers) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Choice); + + // Don't process Choice and Separator object + if (val instanceof Choice || val.type === 'separator') { + return val; + } + + if (_.isString(val)) { + this.name = val; + this.value = val; + this.short = val; + } else { + _.extend(this, val, { + name: val.name || val.value, + value: 'value' in val ? val.value : val.name, + short: val.short || val.name || val.value + }); + } + + if (_.isFunction(val.disabled)) { + this.disabled = val.disabled(answers); + } else { + this.disabled = val.disabled; + } +}; + +/***/ }), +/* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var assert = __webpack_require__(49); +var _ = __webpack_require__(44); +var Separator = __webpack_require__(147); +var Choice = __webpack_require__(490); + +/** + * Choices collection + * Collection of multiple `choice` object + * @constructor + * @param {Array} choices All `choice` to keep in the collection + */ + +module.exports = function () { + function Choices(choices, answers) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, Choices); + + this.choices = choices.map(function (val) { + if (val.type === 'separator') { + if (!(val instanceof Separator)) { + val = new Separator(val.line); + } + return val; + } + return new Choice(val, answers); + }); + + this.realChoices = this.choices.filter(Separator.exclude).filter(function (item) { + return !item.disabled; + }); + + Object.defineProperty(this, 'length', { + get() { + return this.choices.length; + }, + set(val) { + this.choices.length = val; + } + }); + + Object.defineProperty(this, 'realLength', { + get() { + return this.realChoices.length; + }, + set() { + throw new Error('Cannot set `realLength` of a Choices collection'); + } + }); + } + + /** + * Get a valid choice from the collection + * @param {Number} selector The selected choice index + * @return {Choice|Undefined} Return the matched choice or undefined + */ + + Choices.prototype.getChoice = function getChoice(selector) { + assert(_.isNumber(selector)); + return this.realChoices[selector]; + }; + + /** + * Get a raw element from the collection + * @param {Number} selector The selected index value + * @return {Choice|Undefined} Return the matched choice or undefined + */ + + Choices.prototype.get = function get(selector) { + assert(_.isNumber(selector)); + return this.choices[selector]; + }; + + /** + * Match the valid choices against a where clause + * @param {Object} whereClause Lodash `where` clause + * @return {Array} Matching choices or empty array + */ + + Choices.prototype.where = function where(whereClause) { + return _.filter(this.realChoices, whereClause); + }; + + /** + * Pluck a particular key from the choices + * @param {String} propertyName Property name to select + * @return {Array} Selected properties + */ + + Choices.prototype.pluck = function pluck(propertyName) { + return _.map(this.realChoices, propertyName); + }; + + // Expose usual Array methods + + + Choices.prototype.indexOf = function indexOf() { + return this.choices.indexOf.apply(this.choices, arguments); + }; + + Choices.prototype.forEach = function forEach() { + return this.choices.forEach.apply(this.choices, arguments); + }; + + Choices.prototype.filter = function filter() { + return this.choices.filter.apply(this.choices, arguments); + }; + + Choices.prototype.find = function find(func) { + return _.find(this.choices, func); + }; + + Choices.prototype.push = function push() { + var objs = _.map(arguments, function (val) { + return new Choice(val); + }); + this.choices.push.apply(this.choices, objs); + this.realChoices = this.choices.filter(Separator.exclude); + return this.choices; + }; + + return Choices; +}(); + +/***/ }), +/* 492 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `list` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var chalk = __webpack_require__(35); +var cliCursor = __webpack_require__(321); +var figures = __webpack_require__(229); + +var _require = __webpack_require__(65), + map = _require.map, + takeUntil = _require.takeUntil; + +var Base = __webpack_require__(72); +var observe = __webpack_require__(73); +var Paginator = __webpack_require__(148); + +var CheckboxPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(CheckboxPrompt, _Base); + + function CheckboxPrompt(questions, rl, answers) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, CheckboxPrompt); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.call(this, questions, rl, answers)); + + if (!_this.opt.choices) { + _this.throwParamError('choices'); + } + + if (_.isArray(_this.opt.default)) { + _this.opt.choices.forEach(function (choice) { + if (this.opt.default.indexOf(choice.value) >= 0) { + choice.checked = true; + } + }, _this); + } + + _this.pointer = 0; + _this.firstRender = true; + + // Make sure no default is set (so it won't be printed) + _this.opt.default = null; + + _this.paginator = new Paginator(_this.screen); + return _this; + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + CheckboxPrompt.prototype._run = function _run(cb) { + this.done = cb; + + var events = observe(this.rl); + + var validation = this.handleSubmitEvents(events.line.pipe(map(this.getCurrentValue.bind(this)))); + validation.success.forEach(this.onEnd.bind(this)); + validation.error.forEach(this.onError.bind(this)); + + events.normalizedUpKey.pipe(takeUntil(validation.success)).forEach(this.onUpKey.bind(this)); + events.normalizedDownKey.pipe(takeUntil(validation.success)).forEach(this.onDownKey.bind(this)); + events.numberKey.pipe(takeUntil(validation.success)).forEach(this.onNumberKey.bind(this)); + events.spaceKey.pipe(takeUntil(validation.success)).forEach(this.onSpaceKey.bind(this)); + events.aKey.pipe(takeUntil(validation.success)).forEach(this.onAllKey.bind(this)); + events.iKey.pipe(takeUntil(validation.success)).forEach(this.onInverseKey.bind(this)); + + // Init the prompt + cliCursor.hide(); + this.render(); + this.firstRender = false; + + return this; + }; + + /** + * Render the prompt to screen + * @return {CheckboxPrompt} self + */ + + CheckboxPrompt.prototype.render = function render(error) { + // Render question + var message = this.getQuestion(); + var bottomContent = ''; + + if (this.firstRender) { + message += '(Press ' + chalk.cyan.bold('') + ' to select, ' + chalk.cyan.bold('') + ' to toggle all, ' + chalk.cyan.bold('') + ' to invert selection)'; + } + + // Render choices or answer depending on the state + if (this.status === 'answered') { + message += chalk.cyan(this.selection.join(', ')); + } else { + var choicesStr = renderChoices(this.opt.choices, this.pointer); + var indexPosition = this.opt.choices.indexOf(this.opt.choices.getChoice(this.pointer)); + message += '\n' + this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize); + } + + if (error) { + bottomContent = chalk.red('>> ') + error; + } + + this.screen.render(message, bottomContent); + }; + + /** + * When user press `enter` key + */ + + CheckboxPrompt.prototype.onEnd = function onEnd(state) { + this.status = 'answered'; + + // Rerender prompt (and clean subline error) + this.render(); + + this.screen.done(); + cliCursor.show(); + this.done(state.value); + }; + + CheckboxPrompt.prototype.onError = function onError(state) { + this.render(state.isValid); + }; + + CheckboxPrompt.prototype.getCurrentValue = function getCurrentValue() { + var choices = this.opt.choices.filter(function (choice) { + return Boolean(choice.checked) && !choice.disabled; + }); + + this.selection = _.map(choices, 'short'); + return _.map(choices, 'value'); + }; + + CheckboxPrompt.prototype.onUpKey = function onUpKey() { + var len = this.opt.choices.realLength; + this.pointer = this.pointer > 0 ? this.pointer - 1 : len - 1; + this.render(); + }; + + CheckboxPrompt.prototype.onDownKey = function onDownKey() { + var len = this.opt.choices.realLength; + this.pointer = this.pointer < len - 1 ? this.pointer + 1 : 0; + this.render(); + }; + + CheckboxPrompt.prototype.onNumberKey = function onNumberKey(input) { + if (input <= this.opt.choices.realLength) { + this.pointer = input - 1; + this.toggleChoice(this.pointer); + } + this.render(); + }; + + CheckboxPrompt.prototype.onSpaceKey = function onSpaceKey() { + this.toggleChoice(this.pointer); + this.render(); + }; + + CheckboxPrompt.prototype.onAllKey = function onAllKey() { + var shouldBeChecked = Boolean(this.opt.choices.find(function (choice) { + return choice.type !== 'separator' && !choice.checked; + })); + + this.opt.choices.forEach(function (choice) { + if (choice.type !== 'separator') { + choice.checked = shouldBeChecked; + } + }); + + this.render(); + }; + + CheckboxPrompt.prototype.onInverseKey = function onInverseKey() { + this.opt.choices.forEach(function (choice) { + if (choice.type !== 'separator') { + choice.checked = !choice.checked; + } + }); + + this.render(); + }; + + CheckboxPrompt.prototype.toggleChoice = function toggleChoice(index) { + var item = this.opt.choices.getChoice(index); + if (item !== undefined) { + this.opt.choices.getChoice(index).checked = !item.checked; + } + }; + + return CheckboxPrompt; +}(Base); + +/** + * Function for rendering checkbox choices + * @param {Number} pointer Position of the pointer + * @return {String} Rendered content + */ + +function renderChoices(choices, pointer) { + var output = ''; + var separatorOffset = 0; + + choices.forEach(function (choice, i) { + if (choice.type === 'separator') { + separatorOffset++; + output += ' ' + choice + '\n'; + return; + } + + if (choice.disabled) { + separatorOffset++; + output += ' - ' + choice.name; + output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')'; + } else { + var line = getCheckbox(choice.checked) + ' ' + choice.name; + if (i - separatorOffset === pointer) { + output += chalk.cyan(figures.pointer + line); + } else { + output += ' ' + line; + } + } + + output += '\n'; + }); + + return output.replace(/\n$/, ''); +} + +/** + * Get the checkbox + * @param {Boolean} checked - add a X or not to the checkbox + * @return {String} Composited checkbox string + */ + +function getCheckbox(checked) { + return checked ? chalk.green(figures.radioOn) : figures.radioOff; +} + +module.exports = CheckboxPrompt; + +/***/ }), +/* 493 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `confirm` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var chalk = __webpack_require__(35); + +var _require = __webpack_require__(65), + take = _require.take, + takeUntil = _require.takeUntil; + +var Base = __webpack_require__(72); +var observe = __webpack_require__(73); + +var ConfirmPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(ConfirmPrompt, _Base); + + function ConfirmPrompt(questions, rl, answers) { + var _ret; + + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ConfirmPrompt); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.call(this, questions, rl, answers)); + + var rawDefault = true; + + _.extend(_this.opt, { + filter: function filter(input) { + var value = rawDefault; + if (input != null && input !== '') { + value = /^y(es)?/i.test(input); + } + return value; + } + }); + + if (_.isBoolean(_this.opt.default)) { + rawDefault = _this.opt.default; + } + + _this.opt.default = rawDefault ? 'Y/n' : 'y/N'; + + return _ret = _this, (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(_this, _ret); + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + ConfirmPrompt.prototype._run = function _run(cb) { + this.done = cb; + + // Once user confirm (enter key) + var events = observe(this.rl); + events.keypress.pipe(takeUntil(events.line)).forEach(this.onKeypress.bind(this)); + + events.line.pipe(take(1)).forEach(this.onEnd.bind(this)); + + // Init + this.render(); + + return this; + }; + + /** + * Render the prompt to screen + * @return {ConfirmPrompt} self + */ + + ConfirmPrompt.prototype.render = function render(answer) { + var message = this.getQuestion(); + + if (typeof answer === 'boolean') { + message += chalk.cyan(answer ? 'Yes' : 'No'); + } else { + message += this.rl.line; + } + + this.screen.render(message); + + return this; + }; + + /** + * When user press `enter` key + */ + + ConfirmPrompt.prototype.onEnd = function onEnd(input) { + this.status = 'answered'; + + var output = this.opt.filter(input); + this.render(output); + + this.screen.done(); + this.done(output); + }; + + /** + * When user press a key + */ + + ConfirmPrompt.prototype.onKeypress = function onKeypress() { + this.render(); + }; + + return ConfirmPrompt; +}(Base); + +module.exports = ConfirmPrompt; + +/***/ }), +/* 494 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `editor` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var chalk = __webpack_require__(35); +var editAsync = __webpack_require__(746).editAsync; +var Base = __webpack_require__(72); +var observe = __webpack_require__(73); + +var _require = __webpack_require__(166), + Subject = _require.Subject; + +var EditorPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(EditorPrompt, _Base); + + function EditorPrompt() { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, EditorPrompt); + return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.apply(this, arguments)); + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + EditorPrompt.prototype._run = function _run(cb) { + this.done = cb; + + this.editorResult = new Subject(); + + // Open Editor on "line" (Enter Key) + var events = observe(this.rl); + this.lineSubscription = events.line.subscribe(this.startExternalEditor.bind(this)); + + // Trigger Validation when editor closes + var validation = this.handleSubmitEvents(this.editorResult); + validation.success.forEach(this.onEnd.bind(this)); + validation.error.forEach(this.onError.bind(this)); + + // Prevents default from being printed on screen (can look weird with multiple lines) + this.currentText = this.opt.default; + this.opt.default = null; + + // Init + this.render(); + + return this; + }; + + /** + * Render the prompt to screen + * @return {EditorPrompt} self + */ + + EditorPrompt.prototype.render = function render(error) { + var bottomContent = ''; + var message = this.getQuestion(); + + if (this.status === 'answered') { + message += chalk.dim('Received'); + } else { + message += chalk.dim('Press to launch your preferred editor.'); + } + + if (error) { + bottomContent = chalk.red('>> ') + error; + } + + this.screen.render(message, bottomContent); + }; + + /** + * Launch $EDITOR on user press enter + */ + + EditorPrompt.prototype.startExternalEditor = function startExternalEditor() { + // Pause Readline to prevent stdin and stdout from being modified while the editor is showing + this.rl.pause(); + editAsync(this.currentText, this.endExternalEditor.bind(this)); + }; + + EditorPrompt.prototype.endExternalEditor = function endExternalEditor(error, result) { + this.rl.resume(); + if (error) { + this.editorResult.error(error); + } else { + this.editorResult.next(result); + } + }; + + EditorPrompt.prototype.onEnd = function onEnd(state) { + this.editorResult.unsubscribe(); + this.lineSubscription.unsubscribe(); + this.answer = state.value; + this.status = 'answered'; + // Re-render prompt + this.render(); + this.screen.done(); + this.done(this.answer); + }; + + EditorPrompt.prototype.onError = function onError(state) { + this.render(state.isValid); + }; + + return EditorPrompt; +}(Base); + +module.exports = EditorPrompt; + +/***/ }), +/* 495 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `rawlist` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var chalk = __webpack_require__(35); + +var _require = __webpack_require__(65), + map = _require.map, + takeUntil = _require.takeUntil; + +var Base = __webpack_require__(72); +var Separator = __webpack_require__(147); +var observe = __webpack_require__(73); +var Paginator = __webpack_require__(148); + +var ExpandPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(ExpandPrompt, _Base); + + function ExpandPrompt(questions, rl, answers) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ExpandPrompt); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.call(this, questions, rl, answers)); + + if (!_this.opt.choices) { + _this.throwParamError('choices'); + } + + _this.validateChoices(_this.opt.choices); + + // Add the default `help` (/expand) option + _this.opt.choices.push({ + key: 'h', + name: 'Help, list all options', + value: 'help' + }); + + _this.opt.validate = function (choice) { + if (choice == null) { + return 'Please enter a valid command'; + } + + return choice !== 'help'; + }; + + // Setup the default string (capitalize the default key) + _this.opt.default = _this.generateChoicesString(_this.opt.choices, _this.opt.default); + + _this.paginator = new Paginator(_this.screen); + return _this; + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + ExpandPrompt.prototype._run = function _run(cb) { + this.done = cb; + + // Save user answer and update prompt to show selected option. + var events = observe(this.rl); + var validation = this.handleSubmitEvents(events.line.pipe(map(this.getCurrentValue.bind(this)))); + validation.success.forEach(this.onSubmit.bind(this)); + validation.error.forEach(this.onError.bind(this)); + this.keypressObs = events.keypress.pipe(takeUntil(validation.success)).forEach(this.onKeypress.bind(this)); + + // Init the prompt + this.render(); + + return this; + }; + + /** + * Render the prompt to screen + * @return {ExpandPrompt} self + */ + + ExpandPrompt.prototype.render = function render(error, hint) { + var message = this.getQuestion(); + var bottomContent = ''; + + if (this.status === 'answered') { + message += chalk.cyan(this.answer); + } else if (this.status === 'expanded') { + var choicesStr = renderChoices(this.opt.choices, this.selectedKey); + message += this.paginator.paginate(choicesStr, this.selectedKey, this.opt.pageSize); + message += '\n Answer: '; + } + + message += this.rl.line; + + if (error) { + bottomContent = chalk.red('>> ') + error; + } + + if (hint) { + bottomContent = chalk.cyan('>> ') + hint; + } + + this.screen.render(message, bottomContent); + }; + + ExpandPrompt.prototype.getCurrentValue = function getCurrentValue(input) { + if (!input) { + input = this.rawDefault; + } + var selected = this.opt.choices.where({ key: input.toLowerCase().trim() })[0]; + if (!selected) { + return null; + } + + return selected.value; + }; + + /** + * Generate the prompt choices string + * @return {String} Choices string + */ + + ExpandPrompt.prototype.getChoices = function getChoices() { + var _this2 = this; + + var output = ''; + + this.opt.choices.forEach(function (choice) { + output += '\n '; + + if (choice.type === 'separator') { + output += ' ' + choice; + return; + } + + var choiceStr = choice.key + ') ' + choice.name; + if (_this2.selectedKey === choice.key) { + choiceStr = chalk.cyan(choiceStr); + } + output += choiceStr; + }); + + return output; + }; + + ExpandPrompt.prototype.onError = function onError(state) { + if (state.value === 'help') { + this.selectedKey = ''; + this.status = 'expanded'; + this.render(); + return; + } + this.render(state.isValid); + }; + + /** + * When user press `enter` key + */ + + ExpandPrompt.prototype.onSubmit = function onSubmit(state) { + this.status = 'answered'; + var choice = this.opt.choices.where({ value: state.value })[0]; + this.answer = choice.short || choice.name; + + // Re-render prompt + this.render(); + this.screen.done(); + this.done(state.value); + }; + + /** + * When user press a key + */ + + ExpandPrompt.prototype.onKeypress = function onKeypress() { + this.selectedKey = this.rl.line.toLowerCase(); + var selected = this.opt.choices.where({ key: this.selectedKey })[0]; + if (this.status === 'expanded') { + this.render(); + } else { + this.render(null, selected ? selected.name : null); + } + }; + + /** + * Validate the choices + * @param {Array} choices + */ + + ExpandPrompt.prototype.validateChoices = function validateChoices(choices) { + var formatError; + var errors = []; + var keymap = {}; + choices.filter(Separator.exclude).forEach(function (choice) { + if (!choice.key || choice.key.length !== 1) { + formatError = true; + } + if (keymap[choice.key]) { + errors.push(choice.key); + } + keymap[choice.key] = true; + choice.key = String(choice.key).toLowerCase(); + }); + + if (formatError) { + throw new Error('Format error: `key` param must be a single letter and is required.'); + } + if (keymap.h) { + throw new Error('Reserved key error: `key` param cannot be `h` - this value is reserved.'); + } + if (errors.length) { + throw new Error('Duplicate key error: `key` param must be unique. Duplicates: ' + _.uniq(errors).join(', ')); + } + }; + + /** + * Generate a string out of the choices keys + * @param {Array} choices + * @param {Number|String} default - the choice index or name to capitalize + * @return {String} The rendered choices key string + */ + + + ExpandPrompt.prototype.generateChoicesString = function generateChoicesString(choices, defaultChoice) { + var defIndex = choices.realLength - 1; + if (_.isNumber(defaultChoice) && this.opt.choices.getChoice(defaultChoice)) { + defIndex = defaultChoice; + } else if (_.isString(defaultChoice)) { + var index = _.findIndex(choices.realChoices, function (_ref) { + var value = _ref.value; + return value === defaultChoice; + }); + defIndex = index === -1 ? defIndex : index; + } + var defStr = this.opt.choices.pluck('key'); + this.rawDefault = defStr[defIndex]; + defStr[defIndex] = String(defStr[defIndex]).toUpperCase(); + return defStr.join(''); + }; + + return ExpandPrompt; +}(Base); + +/** + * Function for rendering checkbox choices + * @param {String} pointer Selected key + * @return {String} Rendered content + */ + +function renderChoices(choices, pointer) { + var output = ''; + + choices.forEach(function (choice) { + output += '\n '; + + if (choice.type === 'separator') { + output += ' ' + choice; + return; + } + + var choiceStr = choice.key + ') ' + choice.name; + if (pointer === choice.key) { + choiceStr = chalk.cyan(choiceStr); + } + output += choiceStr; + }); + + return output; +} + +module.exports = ExpandPrompt; + +/***/ }), +/* 496 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `list` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var chalk = __webpack_require__(35); +var figures = __webpack_require__(229); +var cliCursor = __webpack_require__(321); +var runAsync = __webpack_require__(165); + +var _require = __webpack_require__(65), + flatMap = _require.flatMap, + map = _require.map, + take = _require.take, + takeUntil = _require.takeUntil; + +var Base = __webpack_require__(72); +var observe = __webpack_require__(73); +var Paginator = __webpack_require__(148); + +var ListPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(ListPrompt, _Base); + + function ListPrompt(questions, rl, answers) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ListPrompt); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.call(this, questions, rl, answers)); + + if (!_this.opt.choices) { + _this.throwParamError('choices'); + } + + _this.firstRender = true; + _this.selected = 0; + + var def = _this.opt.default; + + // If def is a Number, then use as index. Otherwise, check for value. + if (_.isNumber(def) && def >= 0 && def < _this.opt.choices.realLength) { + _this.selected = def; + } else if (!_.isNumber(def) && def != null) { + var index = _.findIndex(_this.opt.choices.realChoices, function (_ref) { + var value = _ref.value; + return value === def; + }); + _this.selected = Math.max(index, 0); + } + + // Make sure no default is set (so it won't be printed) + _this.opt.default = null; + + _this.paginator = new Paginator(_this.screen); + return _this; + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + ListPrompt.prototype._run = function _run(cb) { + this.done = cb; + + var self = this; + + var events = observe(this.rl); + events.normalizedUpKey.pipe(takeUntil(events.line)).forEach(this.onUpKey.bind(this)); + events.normalizedDownKey.pipe(takeUntil(events.line)).forEach(this.onDownKey.bind(this)); + events.numberKey.pipe(takeUntil(events.line)).forEach(this.onNumberKey.bind(this)); + events.line.pipe(take(1), map(this.getCurrentValue.bind(this)), flatMap(function (value) { + return runAsync(self.opt.filter)(value).catch(function (err) { + return err; + }); + })).forEach(this.onSubmit.bind(this)); + + // Init the prompt + cliCursor.hide(); + this.render(); + + return this; + }; + + /** + * Render the prompt to screen + * @return {ListPrompt} self + */ + + ListPrompt.prototype.render = function render() { + // Render question + var message = this.getQuestion(); + + if (this.firstRender) { + message += chalk.dim('(Use arrow keys)'); + } + + // Render choices or answer depending on the state + if (this.status === 'answered') { + message += chalk.cyan(this.opt.choices.getChoice(this.selected).short); + } else { + var choicesStr = listRender(this.opt.choices, this.selected); + var indexPosition = this.opt.choices.indexOf(this.opt.choices.getChoice(this.selected)); + message += '\n' + this.paginator.paginate(choicesStr, indexPosition, this.opt.pageSize); + } + + this.firstRender = false; + + this.screen.render(message); + }; + + /** + * When user press `enter` key + */ + + ListPrompt.prototype.onSubmit = function onSubmit(value) { + this.status = 'answered'; + + // Rerender prompt + this.render(); + + this.screen.done(); + cliCursor.show(); + this.done(value); + }; + + ListPrompt.prototype.getCurrentValue = function getCurrentValue() { + return this.opt.choices.getChoice(this.selected).value; + }; + + /** + * When user press a key + */ + + + ListPrompt.prototype.onUpKey = function onUpKey() { + var len = this.opt.choices.realLength; + this.selected = this.selected > 0 ? this.selected - 1 : len - 1; + this.render(); + }; + + ListPrompt.prototype.onDownKey = function onDownKey() { + var len = this.opt.choices.realLength; + this.selected = this.selected < len - 1 ? this.selected + 1 : 0; + this.render(); + }; + + ListPrompt.prototype.onNumberKey = function onNumberKey(input) { + if (input <= this.opt.choices.realLength) { + this.selected = input - 1; + } + this.render(); + }; + + return ListPrompt; +}(Base); + +/** + * Function for rendering list choices + * @param {Number} pointer Position of the pointer + * @return {String} Rendered content + */ + + +function listRender(choices, pointer) { + var output = ''; + var separatorOffset = 0; + + choices.forEach(function (choice, i) { + if (choice.type === 'separator') { + separatorOffset++; + output += ' ' + choice + '\n'; + return; + } + + if (choice.disabled) { + separatorOffset++; + output += ' - ' + choice.name; + output += ' (' + (_.isString(choice.disabled) ? choice.disabled : 'Disabled') + ')'; + output += '\n'; + return; + } + + var isSelected = i - separatorOffset === pointer; + var line = (isSelected ? figures.pointer + ' ' : ' ') + choice.name; + if (isSelected) { + line = chalk.cyan(line); + } + output += line + ' \n'; + }); + + return output.replace(/\n$/, ''); +} + +module.exports = ListPrompt; + +/***/ }), +/* 497 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `input` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var Input = __webpack_require__(283); + +/** + * Extention of the Input prompt specifically for use with number inputs. + */ + +var NumberPrompt = function (_Input) { + (0, (_inherits2 || _load_inherits()).default)(NumberPrompt, _Input); + + function NumberPrompt() { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, NumberPrompt); + return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Input.apply(this, arguments)); + } + + NumberPrompt.prototype.filterInput = function filterInput(input) { + if (input && typeof input === 'string') { + input = input.trim(); + // Match a number in the input + var numberMatch = input.match(/(^-?\d+|^\d+\.\d*|^\d*\.\d+)(e\d+)?$/); + // If a number is found, return that input. + if (numberMatch) { + return Number(numberMatch[0]); + } + } + // If the input was invalid return the default value. + return this.opt.default == null ? NaN : this.opt.default; + }; + + return NumberPrompt; +}(Input); + +module.exports = NumberPrompt; + +/***/ }), +/* 498 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `password` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var chalk = __webpack_require__(35); + +var _require = __webpack_require__(65), + map = _require.map, + takeUntil = _require.takeUntil; + +var Base = __webpack_require__(72); +var observe = __webpack_require__(73); + +function mask(input, maskChar) { + input = String(input); + maskChar = typeof maskChar === 'string' ? maskChar : '*'; + if (input.length === 0) { + return ''; + } + + return new Array(input.length + 1).join(maskChar); +} + +var PasswordPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(PasswordPrompt, _Base); + + function PasswordPrompt() { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, PasswordPrompt); + return (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.apply(this, arguments)); + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + PasswordPrompt.prototype._run = function _run(cb) { + this.done = cb; + + var events = observe(this.rl); + + // Once user confirm (enter key) + var submit = events.line.pipe(map(this.filterInput.bind(this))); + + var validation = this.handleSubmitEvents(submit); + validation.success.forEach(this.onEnd.bind(this)); + validation.error.forEach(this.onError.bind(this)); + + if (this.opt.mask) { + events.keypress.pipe(takeUntil(validation.success)).forEach(this.onKeypress.bind(this)); + } + + // Init + this.render(); + + return this; + }; + + /** + * Render the prompt to screen + * @return {PasswordPrompt} self + */ + + PasswordPrompt.prototype.render = function render(error) { + var message = this.getQuestion(); + var bottomContent = ''; + + if (this.status === 'answered') { + message += this.opt.mask ? chalk.cyan(mask(this.answer, this.opt.mask)) : chalk.italic.dim('[hidden]'); + } else if (this.opt.mask) { + message += mask(this.rl.line || '', this.opt.mask); + } else { + message += chalk.italic.dim('[input is hidden] '); + } + + if (error) { + bottomContent = '\n' + chalk.red('>> ') + error; + } + + this.screen.render(message, bottomContent); + }; + + /** + * When user press `enter` key + */ + + PasswordPrompt.prototype.filterInput = function filterInput(input) { + if (!input) { + return this.opt.default == null ? '' : this.opt.default; + } + return input; + }; + + PasswordPrompt.prototype.onEnd = function onEnd(state) { + this.status = 'answered'; + this.answer = state.value; + + // Re-render prompt + this.render(); + + this.screen.done(); + this.done(state.value); + }; + + PasswordPrompt.prototype.onError = function onError(state) { + this.render(state.isValid); + }; + + PasswordPrompt.prototype.onKeypress = function onKeypress() { + this.render(); + }; + + return PasswordPrompt; +}(Base); + +module.exports = PasswordPrompt; + +/***/ }), +/* 499 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * `rawlist` type prompt + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var chalk = __webpack_require__(35); + +var _require = __webpack_require__(65), + map = _require.map, + takeUntil = _require.takeUntil; + +var Base = __webpack_require__(72); +var Separator = __webpack_require__(147); +var observe = __webpack_require__(73); +var Paginator = __webpack_require__(148); + +var RawListPrompt = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(RawListPrompt, _Base); + + function RawListPrompt(questions, rl, answers) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, RawListPrompt); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.call(this, questions, rl, answers)); + + if (!_this.opt.choices) { + _this.throwParamError('choices'); + } + + _this.opt.validChoices = _this.opt.choices.filter(Separator.exclude); + + _this.selected = 0; + _this.rawDefault = 0; + + _.extend(_this.opt, { + validate: function validate(val) { + return val != null; + } + }); + + var def = _this.opt.default; + if (_.isNumber(def) && def >= 0 && def < _this.opt.choices.realLength) { + _this.selected = def; + _this.rawDefault = def; + } else if (!_.isNumber(def) && def != null) { + var index = _.findIndex(_this.opt.choices.realChoices, function (_ref) { + var value = _ref.value; + return value === def; + }); + var safeIndex = Math.max(index, 0); + _this.selected = safeIndex; + _this.rawDefault = safeIndex; + } + + // Make sure no default is set (so it won't be printed) + _this.opt.default = null; + + _this.paginator = new Paginator(); + return _this; + } + + /** + * Start the Inquiry session + * @param {Function} cb Callback when prompt is done + * @return {this} + */ + + RawListPrompt.prototype._run = function _run(cb) { + this.done = cb; + + // Once user confirm (enter key) + var events = observe(this.rl); + var submit = events.line.pipe(map(this.getCurrentValue.bind(this))); + + var validation = this.handleSubmitEvents(submit); + validation.success.forEach(this.onEnd.bind(this)); + validation.error.forEach(this.onError.bind(this)); + + events.keypress.pipe(takeUntil(validation.success)).forEach(this.onKeypress.bind(this)); + + // Init the prompt + this.render(); + + return this; + }; + + /** + * Render the prompt to screen + * @return {RawListPrompt} self + */ + + RawListPrompt.prototype.render = function render(error) { + // Render question + var message = this.getQuestion(); + var bottomContent = ''; + + if (this.status === 'answered') { + message += chalk.cyan(this.answer); + } else { + var choicesStr = renderChoices(this.opt.choices, this.selected); + message += this.paginator.paginate(choicesStr, this.selected, this.opt.pageSize); + message += '\n Answer: '; + } + + message += this.rl.line; + + if (error) { + bottomContent = '\n' + chalk.red('>> ') + error; + } + + this.screen.render(message, bottomContent); + }; + + /** + * When user press `enter` key + */ + + RawListPrompt.prototype.getCurrentValue = function getCurrentValue(index) { + if (index == null || index === '') { + index = this.rawDefault; + } else { + index -= 1; + } + + var choice = this.opt.choices.getChoice(index); + return choice ? choice.value : null; + }; + + RawListPrompt.prototype.onEnd = function onEnd(state) { + this.status = 'answered'; + this.answer = state.value; + + // Re-render prompt + this.render(); + + this.screen.done(); + this.done(state.value); + }; + + RawListPrompt.prototype.onError = function onError() { + this.render('Please enter a valid index'); + }; + + /** + * When user press a key + */ + + RawListPrompt.prototype.onKeypress = function onKeypress() { + var index = this.rl.line.length ? Number(this.rl.line) - 1 : 0; + + if (this.opt.choices.getChoice(index)) { + this.selected = index; + } else { + this.selected = undefined; + } + + this.render(); + }; + + return RawListPrompt; +}(Base); + +/** + * Function for rendering list choices + * @param {Number} pointer Position of the pointer + * @return {String} Rendered content + */ + +function renderChoices(choices, pointer) { + var output = ''; + var separatorOffset = 0; + + choices.forEach(function (choice, i) { + output += '\n '; + + if (choice.type === 'separator') { + separatorOffset++; + output += ' ' + choice; + return; + } + + var index = i - separatorOffset; + var display = index + 1 + ') ' + choice.name; + if (index === pointer) { + display = chalk.cyan(display); + } + output += display; + }); + + return output; +} + +module.exports = RawListPrompt; + +/***/ }), +/* 500 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +/** + * Sticky bottom bar user interface + */ + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var through = __webpack_require__(994); +var Base = __webpack_require__(284); +var rlUtils = __webpack_require__(285); +var _ = __webpack_require__(44); + +var BottomBar = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(BottomBar, _Base); + + function BottomBar(opt) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, BottomBar); + + opt = opt || {}; + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.call(this, opt)); + + _this.log = through(_this.writeLog.bind(_this)); + _this.bottomBar = opt.bottomBar || ''; + _this.render(); + return _this; + } + + /** + * Render the prompt to screen + * @return {BottomBar} self + */ + + BottomBar.prototype.render = function render() { + this.write(this.bottomBar); + return this; + }; + + BottomBar.prototype.clean = function clean() { + rlUtils.clearLine(this.rl, this.bottomBar.split('\n').length); + return this; + }; + + /** + * Update the bottom bar content and rerender + * @param {String} bottomBar Bottom bar content + * @return {BottomBar} self + */ + + BottomBar.prototype.updateBottomBar = function updateBottomBar(bottomBar) { + rlUtils.clearLine(this.rl, 1); + this.rl.output.unmute(); + this.clean(); + this.bottomBar = bottomBar; + this.render(); + this.rl.output.mute(); + return this; + }; + + /** + * Write out log data + * @param {String} data - The log data to be output + * @return {BottomBar} self + */ + + BottomBar.prototype.writeLog = function writeLog(data) { + this.rl.output.unmute(); + this.clean(); + this.rl.output.write(this.enforceLF(data.toString())); + this.render(); + this.rl.output.mute(); + return this; + }; + + /** + * Make sure line end on a line feed + * @param {String} str Input string + * @return {String} The input string with a final line feed + */ + + BottomBar.prototype.enforceLF = function enforceLF(str) { + return str.match(/[\r\n]$/) ? str : str + '\n'; + }; + + /** + * Helper for writing message in Prompt + * @param {BottomBar} prompt - The Prompt object that extends tty + * @param {String} message - The message to be output + */ + + + BottomBar.prototype.write = function write(message) { + var msgLines = message.split(/\n/); + this.height = msgLines.length; + + // Write message to screen and setPrompt to control backspace + this.rl.setPrompt(_.last(msgLines)); + + if (this.rl.output.rows === 0 && this.rl.output.columns === 0) { + /* When it's a tty through serial port there's no terminal info and the render will malfunction, + so we need enforce the cursor to locate to the leftmost position for rendering. */ + rlUtils.left(this.rl, message.length + this.rl.line.length); + } + this.rl.output.write(message); + }; + + return BottomBar; +}(Base); + +module.exports = BottomBar; + +/***/ }), +/* 501 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +var _possibleConstructorReturn2; + +function _load_possibleConstructorReturn() { + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); +} + +var _inherits2; + +function _load_inherits() { + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); + +var _require = __webpack_require__(166), + defer = _require.defer, + empty = _require.empty, + from = _require.from, + of = _require.of; + +var _require2 = __webpack_require__(65), + concatMap = _require2.concatMap, + filter = _require2.filter, + publish = _require2.publish, + reduce = _require2.reduce; + +var runAsync = __webpack_require__(165); +var utils = __webpack_require__(503); +var Base = __webpack_require__(284); + +/** + * Base interface class other can inherits from + */ + +var PromptUI = function (_Base) { + (0, (_inherits2 || _load_inherits()).default)(PromptUI, _Base); + + function PromptUI(prompts, opt) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, PromptUI); + + var _this = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _Base.call(this, opt)); + + _this.prompts = prompts; + return _this; + } + + PromptUI.prototype.run = function run(questions) { + var _this2 = this; + + // Keep global reference to the answers + this.answers = {}; + + // Make sure questions is an array. + if (_.isPlainObject(questions)) { + questions = [questions]; + } + + // Create an observable, unless we received one as parameter. + // Note: As this is a public interface, we cannot do an instanceof check as we won't + // be using the exact same object in memory. + var obs = _.isArray(questions) ? from(questions) : questions; + + this.process = obs.pipe(concatMap(this.processQuestion.bind(this)), publish() // Creates a hot Observable. It prevents duplicating prompts. + ); + + this.process.connect(); + + return this.process.pipe(reduce(function (answers, answer) { + _.set(_this2.answers, answer.name, answer.answer); + return _this2.answers; + }, {})).toPromise((_promise || _load_promise()).default).then(this.onCompletion.bind(this)); + }; + + /** + * Once all prompt are over + */ + + PromptUI.prototype.onCompletion = function onCompletion() { + this.close(); + + return this.answers; + }; + + PromptUI.prototype.processQuestion = function processQuestion(question) { + var _this3 = this; + + question = _.clone(question); + return defer(function () { + var obs = of(question); + + return obs.pipe(concatMap(_this3.setDefaultType.bind(_this3)), concatMap(_this3.filterIfRunnable.bind(_this3)), concatMap(function () { + return utils.fetchAsyncQuestionProperty(question, 'message', _this3.answers); + }), concatMap(function () { + return utils.fetchAsyncQuestionProperty(question, 'default', _this3.answers); + }), concatMap(function () { + return utils.fetchAsyncQuestionProperty(question, 'choices', _this3.answers); + }), concatMap(_this3.fetchAnswer.bind(_this3))); + }); + }; + + PromptUI.prototype.fetchAnswer = function fetchAnswer(question) { + var _this4 = this; + + var Prompt = this.prompts[question.type]; + this.activePrompt = new Prompt(question, this.rl, this.answers); + return defer(function () { + return from(_this4.activePrompt.run().then(function (answer) { + return { name: question.name, answer: answer }; + })); + }); + }; + + PromptUI.prototype.setDefaultType = function setDefaultType(question) { + // Default type to input + if (!this.prompts[question.type]) { + question.type = 'input'; + } + return defer(function () { + return of(question); + }); + }; + + PromptUI.prototype.filterIfRunnable = function filterIfRunnable(question) { + if (question.when === false) { + return empty(); + } + + if (!_.isFunction(question.when)) { + return of(question); + } + + var answers = this.answers; + return defer(function () { + return from(runAsync(question.when)(answers).then(function (shouldRun) { + if (shouldRun) { + return question; + } + })).pipe(filter(function (val) { + return val != null; + })); + }); + }; + + return PromptUI; +}(Base); + +module.exports = PromptUI; + +/***/ }), +/* 502 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classCallCheck2; + +function _load_classCallCheck() { + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); +} + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _ = __webpack_require__(44); +var util = __webpack_require__(285); +var cliWidth = __webpack_require__(593); +var stripAnsi = __webpack_require__(261); +var stringWidth = __webpack_require__(765); + +function height(content) { + return content.split('\n').length; +} + +function lastLine(content) { + return _.last(content.split('\n')); +} + +var ScreenManager = function () { + function ScreenManager(rl) { + (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ScreenManager); + + // These variables are keeping information to allow correct prompt re-rendering + this.height = 0; + this.extraLinesUnderPrompt = 0; + + this.rl = rl; + } + + ScreenManager.prototype.render = function render(content, bottomContent) { + this.rl.output.unmute(); + this.clean(this.extraLinesUnderPrompt); + + /** + * Write message to screen and setPrompt to control backspace + */ + + var promptLine = lastLine(content); + var rawPromptLine = stripAnsi(promptLine); + + // Remove the rl.line from our prompt. We can't rely on the content of + // rl.line (mainly because of the password prompt), so just rely on it's + // length. + var prompt = rawPromptLine; + if (this.rl.line.length) { + prompt = prompt.slice(0, -this.rl.line.length); + } + this.rl.setPrompt(prompt); + + // SetPrompt will change cursor position, now we can get correct value + var cursorPos = this.rl._getCursorPos(); + var width = this.normalizedCliWidth(); + + content = this.forceLineReturn(content, width); + if (bottomContent) { + bottomContent = this.forceLineReturn(bottomContent, width); + } + // Manually insert an extra line if we're at the end of the line. + // This prevent the cursor from appearing at the beginning of the + // current line. + if (rawPromptLine.length % width === 0) { + content += '\n'; + } + var fullContent = content + (bottomContent ? '\n' + bottomContent : ''); + this.rl.output.write(fullContent); + + /** + * Re-adjust the cursor at the correct position. + */ + + // We need to consider parts of the prompt under the cursor as part of the bottom + // content in order to correctly cleanup and re-render. + var promptLineUpDiff = Math.floor(rawPromptLine.length / width) - cursorPos.rows; + var bottomContentHeight = promptLineUpDiff + (bottomContent ? height(bottomContent) : 0); + if (bottomContentHeight > 0) { + util.up(this.rl, bottomContentHeight); + } + + // Reset cursor at the beginning of the line + util.left(this.rl, stringWidth(lastLine(fullContent))); + + // Adjust cursor on the right + if (cursorPos.cols > 0) { + util.right(this.rl, cursorPos.cols); + } + + /** + * Set up state for next re-rendering + */ + this.extraLinesUnderPrompt = bottomContentHeight; + this.height = height(fullContent); + + this.rl.output.mute(); + }; + + ScreenManager.prototype.clean = function clean(extraLines) { + if (extraLines > 0) { + util.down(this.rl, extraLines); + } + util.clearLine(this.rl, this.height); + }; + + ScreenManager.prototype.done = function done() { + this.rl.setPrompt(''); + this.rl.output.unmute(); + this.rl.output.write('\n'); + }; + + ScreenManager.prototype.releaseCursor = function releaseCursor() { + if (this.extraLinesUnderPrompt > 0) { + util.down(this.rl, this.extraLinesUnderPrompt); + } + }; + + ScreenManager.prototype.normalizedCliWidth = function normalizedCliWidth() { + var width = cliWidth({ + defaultWidth: 80, + output: this.rl.output + }); + return width; + }; + + ScreenManager.prototype.breakLines = function breakLines(lines, width) { + // Break lines who're longer than the cli width so we can normalize the natural line + // returns behavior across terminals. + width = width || this.normalizedCliWidth(); + var regex = new RegExp('(?:(?:\\033[[0-9;]*m)*.?){1,' + width + '}', 'g'); + return lines.map(function (line) { + var chunk = line.match(regex); + // Last match is always empty + chunk.pop(); + return chunk || ''; + }); + }; + + ScreenManager.prototype.forceLineReturn = function forceLineReturn(content, width) { + width = width || this.normalizedCliWidth(); + return _.flatten(this.breakLines(content.split('\n'), width)).join('\n'); + }; + + return ScreenManager; +}(); + +module.exports = ScreenManager; + +/***/ }), +/* 503 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ = __webpack_require__(44); + +var _require = __webpack_require__(166), + from = _require.from, + of = _require.of; + +var runAsync = __webpack_require__(165); + +/** + * Resolve a question property value if it is passed as a function. + * This method will overwrite the property on the question object with the received value. + * @param {Object} question - Question object + * @param {String} prop - Property to fetch name + * @param {Object} answers - Answers object + * @return {Rx.Observable} - Observable emitting once value is known + */ + +exports.fetchAsyncQuestionProperty = function (question, prop, answers) { + if (!_.isFunction(question[prop])) { + return of(question); + } + + return from(runAsync(question[prop])(answers).then(function (value) { + question[prop] = value; + return question; + })); +}; + +/***/ }), +/* 504 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85214,11 +86755,11 @@ exports.default = function (message) { var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } /***/ }), -/* 392 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85232,7 +86773,7 @@ exports.examples = exports.hasWrapper = exports.run = undefined; var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } exports.setFlags = setFlags; @@ -85240,7 +86781,7 @@ exports.setFlags = setFlags; var _buildSubCommands2; function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -85271,7 +86812,7 @@ exports.hasWrapper = hasWrapper; exports.examples = examples; /***/ }), -/* 393 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85280,28 +86821,56 @@ exports.examples = examples; Object.defineProperty(exports, "__esModule", { value: true }); +exports.run = undefined; -var _promise; +var _asyncToGenerator2; -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); } +var run = exports.run = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var binFolder = path.join(config.cwd, config.registries[(_yarnResolver || _load_yarnResolver()).default.registry].folder, '.bin'); + if (args.length === 0) { + reporter.log(binFolder, { force: true }); + } else { + var binEntries = yield (0, (_run || _load_run()).getBinEntries)(config); + + var binName = args[0]; + var binPath = binEntries.get(binName); + + if (binPath) { + reporter.log(binPath, { force: true }); + } else { + reporter.error(reporter.lang('packageBinaryNotFound', binName)); + } + } + }); + + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +}(); + exports.hasWrapper = hasWrapper; exports.setFlags = setFlags; -exports.run = run; var _yarnResolver; function _load_yarnResolver() { - return _yarnResolver = _interopRequireDefault(__webpack_require__(246)); + return _yarnResolver = _interopRequireDefault(__webpack_require__(307)); +} + +var _run; + +function _load_run() { + return _run = __webpack_require__(294); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var fs = __webpack_require__(10); - -var path = __webpack_require__(0); +var path = __webpack_require__(2); function hasWrapper(commander) { return false; @@ -85311,261 +86880,8 @@ function setFlags(commander) { commander.description('Displays the location of the yarn bin folder.'); } -function run(config, reporter, flags, args) { - var binFolder = path.join(config.cwd, config.registries[(_yarnResolver || _load_yarnResolver()).default.registry].folder, '.bin'); - if (args.length === 0) { - reporter.log(binFolder, { force: true }); - } else { - var binName = args[0]; - var finalPath = path.normalize(`${binFolder}/${binName}`); - if (fs.existsSync(finalPath)) { - reporter.log(finalPath, { force: true }); - } else { - reporter.error(reporter.lang('packageBinaryNotFound', binName)); - } - } - return (_promise || _load_promise()).default.resolve(); -} - /***/ }), -/* 394 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.examples = exports.run = undefined; - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var getPackagesPaths = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, currentPath) { - var results = []; - var stat = yield (_fs || _load_fs()).lstat(currentPath); - - if (!stat.isDirectory()) { - return results; - } - - var folders = yield (_fs || _load_fs()).readdir(currentPath); - for (var _iterator = folders, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var folder = _ref2; - - if (folder[0] === '.') { - continue; - } - var packagePath = path.join(currentPath, folder); - if (isScopedPackageDirectory(folder)) { - results.push.apply(results, (yield getPackagesPaths(config, packagePath))); - } else { - results.push(packagePath); - } - } - return results; - }); - - return function getPackagesPaths(_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); - -var getCachedPackages = function () { - var _ref3 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { - var paths = yield getPackagesPaths(config, config.cacheFolder); - return _getMetadataWithPath(config.readPackageMetadata.bind(config), paths).then(function (packages) { - return packages.filter(function (p) { - return !!p; - }); - }); - }); - - return function getCachedPackages(_x3) { - return _ref3.apply(this, arguments); - }; -}(); - -var list = function () { - var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - var filterOut = function filterOut() { - var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - registry = _ref5.registry, - manifest = _ref5.package, - remote = _ref5.remote; - - if (flags.pattern && !micromatch.contains(manifest.name, flags.pattern)) { - return false; - } - return true; - }; - - var forReport = function forReport() { - var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - registry = _ref6.registry, - manifest = _ref6.package, - remote = _ref6.remote; - - return [manifest.name, manifest.version, registry, remote && remote.resolved || '']; - }; - - var packages = yield getCachedPackages(config); - var body = packages.filter(filterOut).map(forReport); - reporter.table(['Name', 'Version', 'Registry', 'Resolved'], body); - }); - - return function list(_x4, _x5, _x6, _x7) { - return _ref4.apply(this, arguments); - }; -}(); - -var clean = function () { - var _ref7 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - if (config.cacheFolder) { - var activity = reporter.activity(); - - if (args.length > 0) { - // Clear named packages from cache - var packages = yield getCachedPackages(config); - var shouldDelete = function shouldDelete() { - var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - registry = _ref8.registry, - manifest = _ref8.package, - remote = _ref8.remote; - - return args.indexOf(manifest.name) !== -1; - }; - var packagesToDelete = packages.filter(shouldDelete); - - for (var _iterator2 = packagesToDelete, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref9; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref9 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref9 = _i2.value; - } - - var manifest = _ref9; - - yield (_fs || _load_fs()).unlink(manifest._path); // save package path when retrieving - } - activity.end(); - reporter.success(reporter.lang('clearedPackageFromCache', args[0])); - } else { - // Clear all cache - yield (_fs || _load_fs()).unlink(config._cacheRootFolder); - yield (_fs || _load_fs()).mkdirp(config.cacheFolder); - activity.end(); - reporter.success(reporter.lang('clearedCache')); - } - } - }); - - return function clean(_x10, _x11, _x12, _x13) { - return _ref7.apply(this, arguments); - }; -}(); - -exports.hasWrapper = hasWrapper; -exports.setFlags = setFlags; - -var _buildSubCommands2; - -function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var path = __webpack_require__(0); -var micromatch = __webpack_require__(80); - -function hasWrapper(flags, args) { - return args[0] !== 'dir'; -} - -function isScopedPackageDirectory(packagePath) { - return packagePath.indexOf('@') > -1; -} - -function _getMetadataWithPath(getMetadataFn, paths) { - return (_promise || _load_promise()).default.all(paths.map(function (path) { - return getMetadataFn(path).then(function (r) { - r._path = path; - return r; - }).catch(function (error) { - return undefined; - }); - })); -} - -var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('cache', { - ls(config, reporter, flags, args) { - return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { - reporter.warn(`\`yarn cache ls\` is deprecated. Please use \`yarn cache list\`.`); - yield list(config, reporter, flags, args); - })(); - }, - list, - clean, - dir(config, reporter) { - reporter.log(config.cacheFolder, { force: true }); - } -}), - run = _buildSubCommands.run, - _setFlags = _buildSubCommands.setFlags, - examples = _buildSubCommands.examples; - -exports.run = run; -exports.examples = examples; -function setFlags(commander) { - _setFlags(commander); - commander.description('Yarn cache list will print out every cached package.'); - commander.option('--pattern [pattern]', 'filter cached packages by pattern'); -} - -/***/ }), -/* 395 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85579,7 +86895,7 @@ exports.examples = exports.run = undefined; var _stringify; function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); + return _stringify = _interopRequireDefault(__webpack_require__(39)); } var _asyncToGenerator2; @@ -85594,7 +86910,7 @@ exports.setFlags = setFlags; var _buildSubCommands2; function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -85691,7 +87007,7 @@ exports.run = run; exports.examples = examples; /***/ }), -/* 396 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85708,6 +87024,12 @@ function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); } +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + var run = exports.run = function () { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { var builderName = args[0], @@ -85718,13 +87040,14 @@ var run = exports.run = function () { throw new (_errors || _load_errors()).MessageError(reporter.lang('invalidPackageName')); } - var packageName = builderName.replace(/^(@[^\/]+\/)?/, '$1create-'); - var commandName = packageName.replace(/^@[^\/]+\//, ''); + var _coerceCreatePackageN = coerceCreatePackageName(builderName), + packageName = _coerceCreatePackageN.fullName, + commandName = _coerceCreatePackageN.name; yield (0, (_global || _load_global()).run)(config, reporter, {}, ['add', packageName]); var binFolder = yield (0, (_global || _load_global()).getBinFolder)(config, {}); - var command = path.resolve(binFolder, path.basename(commandName)); + var command = path.resolve(binFolder, commandName); yield (_child || _load_child()).spawn(command, rest, { stdio: `inherit`, shell: true }); }); @@ -85736,30 +87059,32 @@ var run = exports.run = function () { exports.setFlags = setFlags; exports.hasWrapper = hasWrapper; +exports.parsePackageName = parsePackageName; +exports.coerceCreatePackageName = coerceCreatePackageName; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(47)); + return _child = _interopRequireWildcard(__webpack_require__(60)); } var _global; function _load_global() { - return _global = __webpack_require__(85); + return _global = __webpack_require__(111); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); +var path = __webpack_require__(2); function setFlags(commander) { commander.description('Creates new projects from any create-* starter kits.'); @@ -85769,8 +87094,40 @@ function hasWrapper(commander, args) { return true; } +function parsePackageName(str) { + if (str.charAt(0) === '/') { + throw new Error(`Name should not start with "/", got "${str}"`); + } + if (str.charAt(0) === '.') { + throw new Error(`Name should not start with ".", got "${str}"`); + } + var parts = str.split('/'); + var isScoped = str.charAt(0) === '@'; + if (isScoped && parts[0] === '@') { + throw new Error(`Scope should not be empty, got "${str}"`); + } + var scope = isScoped ? parts[0] : ''; + var name = parts[isScoped ? 1 : 0] || ''; + var path = parts.slice(isScoped ? 2 : 1).join('/'); + var fullName = [scope, name].filter(Boolean).join('/'); + var full = [scope, name, path].filter(Boolean).join('/'); + + return { fullName, name, scope, path, full }; +} + +function coerceCreatePackageName(str) { + var pkgNameObj = parsePackageName(str); + var coercedName = pkgNameObj.name !== '' ? `create-${pkgNameObj.name}` : `create`; + var coercedPkgNameObj = (0, (_extends2 || _load_extends()).default)({}, pkgNameObj, { + name: coercedName, + fullName: [pkgNameObj.scope, coercedName].filter(Boolean).join('/'), + full: [pkgNameObj.scope, coercedName, pkgNameObj.path].filter(Boolean).join('/') + }); + return coercedPkgNameObj; +} + /***/ }), -/* 397 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85812,19 +87169,19 @@ exports.hasWrapper = hasWrapper; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(47)); + return _child = _interopRequireWildcard(__webpack_require__(60)); } var _executeLifecycleScript; function _load_executeLifecycleScript() { - return _executeLifecycleScript = __webpack_require__(91); + return _executeLifecycleScript = __webpack_require__(115); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -85838,7 +87195,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 398 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85895,13 +87252,13 @@ exports.setFlags = setFlags; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _lockfile; function _load_lockfile() { - return _lockfile = __webpack_require__(21); + return _lockfile = __webpack_require__(24); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -85920,7 +87277,7 @@ function setFlags(commander) { var examples = exports.examples = ['generate-lock-entry', 'generate-lock-entry --use-manifest ./package.json', 'generate-lock-entry --resolved local-file.tgz#hash']; /***/ }), -/* 399 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -85933,19 +87290,19 @@ Object.defineProperty(exports, "__esModule", { var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } exports.hasWrapper = hasWrapper; @@ -85955,32 +87312,32 @@ exports.run = run; var _index; function _load_index() { - return _index = _interopRequireDefault(__webpack_require__(207)); + return _index = _interopRequireDefault(__webpack_require__(265)); } var _constants; function _load_constants() { - return _constants = _interopRequireWildcard(__webpack_require__(8)); + return _constants = _interopRequireWildcard(__webpack_require__(14)); } var _misc; function _load_misc() { - return _misc = __webpack_require__(18); + return _misc = __webpack_require__(27); } var _aliases; function _load_aliases() { - return _aliases = _interopRequireDefault(__webpack_require__(228)); + return _aliases = _interopRequireDefault(__webpack_require__(286)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var chalk = __webpack_require__(115); +var chalk = __webpack_require__(35); function hasWrapper(flags, args) { return false; @@ -86047,12 +87404,14 @@ function run(config, reporter, commander, args) { reporter.log(reporter.lang('helpLearnMore', reporter.rawText(chalk.bold((_constants || _load_constants()).YARN_DOCS)))); }); + commander.options.sort((_misc || _load_misc()).sortOptionsByFlags); + commander.help(); return (_promise || _load_promise()).default.resolve(); } /***/ }), -/* 400 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86066,13 +87425,13 @@ exports.run = exports.Import = exports.noArguments = undefined; var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _asyncToGenerator2; @@ -86084,19 +87443,19 @@ function _load_asyncToGenerator() { var _classCallCheck2; function _load_classCallCheck() { - return _classCallCheck2 = _interopRequireDefault(__webpack_require__(2)); + return _classCallCheck2 = _interopRequireDefault(__webpack_require__(3)); } var _possibleConstructorReturn2; function _load_possibleConstructorReturn() { - return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(13)); + return _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(11)); } var _inherits2; function _load_inherits() { - return _inherits2 = _interopRequireDefault(__webpack_require__(12)); + return _inherits2 = _interopRequireDefault(__webpack_require__(10)); } var run = exports.run = function () { @@ -86116,156 +87475,155 @@ exports.hasWrapper = hasWrapper; var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); } var _check; function _load_check() { - return _check = __webpack_require__(230); + return _check = __webpack_require__(290); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _index; function _load_index() { - return _index = __webpack_require__(41); + return _index = __webpack_require__(62); } var _baseResolver; function _load_baseResolver() { - return _baseResolver = _interopRequireDefault(__webpack_require__(88)); + return _baseResolver = _interopRequireDefault(__webpack_require__(113)); } var _hostedGitResolver; function _load_hostedGitResolver() { - return _hostedGitResolver = _interopRequireDefault(__webpack_require__(75)); + return _hostedGitResolver = _interopRequireDefault(__webpack_require__(96)); } var _hostedGitResolver2; function _load_hostedGitResolver2() { - return _hostedGitResolver2 = __webpack_require__(75); + return _hostedGitResolver2 = __webpack_require__(96); } var _gistResolver; function _load_gistResolver() { - return _gistResolver = _interopRequireDefault(__webpack_require__(157)); + return _gistResolver = _interopRequireDefault(__webpack_require__(197)); } var _gistResolver2; function _load_gistResolver2() { - return _gistResolver2 = __webpack_require__(157); + return _gistResolver2 = __webpack_require__(197); } var _gitResolver; function _load_gitResolver() { - return _gitResolver = _interopRequireDefault(__webpack_require__(89)); + return _gitResolver = _interopRequireDefault(__webpack_require__(114)); } var _fileResolver; function _load_fileResolver() { - return _fileResolver = _interopRequireDefault(__webpack_require__(156)); + return _fileResolver = _interopRequireDefault(__webpack_require__(196)); } var _packageResolver; function _load_packageResolver() { - return _packageResolver = _interopRequireDefault(__webpack_require__(241)); + return _packageResolver = _interopRequireDefault(__webpack_require__(302)); } var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(87)); + return _packageRequest = _interopRequireDefault(__webpack_require__(112)); } var _packageReference; function _load_packageReference() { - return _packageReference = _interopRequireDefault(__webpack_require__(240)); + return _packageReference = _interopRequireDefault(__webpack_require__(301)); } var _packageFetcher; function _load_packageFetcher() { - return _packageFetcher = _interopRequireWildcard(__webpack_require__(151)); + return _packageFetcher = _interopRequireWildcard(__webpack_require__(191)); } var _packageLinker; function _load_packageLinker() { - return _packageLinker = _interopRequireDefault(__webpack_require__(152)); + return _packageLinker = _interopRequireDefault(__webpack_require__(192)); } var _packageCompatibility; function _load_packageCompatibility() { - return _packageCompatibility = _interopRequireWildcard(__webpack_require__(239)); + return _packageCompatibility = _interopRequireWildcard(__webpack_require__(300)); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } -var _normalizePattern10; +var _normalizePattern9; function _load_normalizePattern() { - return _normalizePattern10 = __webpack_require__(42); + return _normalizePattern9 = __webpack_require__(51); } var _logicalDependencyTree; function _load_logicalDependencyTree() { - return _logicalDependencyTree = __webpack_require__(446); + return _logicalDependencyTree = __webpack_require__(561); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _misc; function _load_misc() { - return _misc = _interopRequireWildcard(__webpack_require__(18)); + return _misc = _interopRequireWildcard(__webpack_require__(27)); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } var _semver; function _load_semver() { - return _semver = _interopRequireDefault(__webpack_require__(20)); + return _semver = _interopRequireDefault(__webpack_require__(26)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var NPM_REGISTRY = /http[s]:\/\/registry.npmjs.org/g; - -var invariant = __webpack_require__(9); -var path = __webpack_require__(0); -var uuid = __webpack_require__(83); +var invariant = __webpack_require__(13); +var path = __webpack_require__(2); +var uuid = __webpack_require__(108); +var ssri = __webpack_require__(107); var nodeVersion = process.versions.node.split('-')[0]; var noArguments = exports.noArguments = true; @@ -86288,7 +87646,7 @@ var ImportResolver = function (_BaseResolver) { }; ImportResolver.prototype.resolveHostedGit = function resolveHostedGit(info, Resolver) { - var _normalizePattern = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(this.pattern), + var _normalizePattern = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern), range = _normalizePattern.range; var exploded = (0, (_hostedGitResolver2 || _load_hostedGitResolver2()).explodeHostedGitFragment)(range, this.reporter); @@ -86307,7 +87665,7 @@ var ImportResolver = function (_BaseResolver) { }; ImportResolver.prototype.resolveGist = function resolveGist(info, Resolver) { - var _normalizePattern2 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(this.pattern), + var _normalizePattern2 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern), range = _normalizePattern2.range; var _explodeGistFragment = (0, (_gistResolver2 || _load_gistResolver2()).explodeGistFragment)(range, this.reporter), @@ -86344,7 +87702,7 @@ var ImportResolver = function (_BaseResolver) { }; ImportResolver.prototype.resolveFile = function resolveFile(info, Resolver) { - var _normalizePattern3 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(this.pattern), + var _normalizePattern3 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern), range = _normalizePattern3.range; var loc = (_misc || _load_misc()).removePrefix(range, 'file:'); @@ -86367,7 +87725,7 @@ var ImportResolver = function (_BaseResolver) { invariant(url, 'expected package _resolved'); invariant(hash, 'expected package _shasum'); if (this.config.getOption('registry') === (_constants || _load_constants()).YARN_REGISTRY) { - url = url.replace(NPM_REGISTRY, (_constants || _load_constants()).YARN_REGISTRY); + url = url.replace((_constants || _load_constants()).NPM_REGISTRY_RE, (_constants || _load_constants()).YARN_REGISTRY); } info._uid = info.version; info._remote = { @@ -86375,13 +87733,14 @@ var ImportResolver = function (_BaseResolver) { type: 'tarball', registry: this.registry, reference: url, + integrity: info._integrity ? ssri.parse(info._integrity) : ssri.fromHex(hash, 'sha1'), hash }; return info; }; ImportResolver.prototype.resolveImport = function resolveImport(info) { - var _normalizePattern4 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(this.pattern), + var _normalizePattern4 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern), range = _normalizePattern4.range; var Resolver = (0, (_index || _load_index()).getExoticResolver)(range); @@ -86415,7 +87774,7 @@ var ImportResolver = function (_BaseResolver) { ImportResolver.prototype.resolveFixedVersion = function () { var _ref2 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (fixedVersionPattern) { - var _normalizePattern5 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(fixedVersionPattern), + var _normalizePattern5 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(fixedVersionPattern), range = _normalizePattern5.range; var exoticResolver = (0, (_index || _load_index()).getExoticResolver)(range); @@ -86435,19 +87794,18 @@ var ImportResolver = function (_BaseResolver) { var _this2 = this; invariant(this.request instanceof ImportPackageRequest, 'request must be ImportPackageRequest'); - invariant(this.request.fixedVersionPattern, 'fixedVersionPattern must exist on request'); - var fixedVersionPattern = this.request.fixedVersionPattern; + var _normalizePattern6 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern), + name = _normalizePattern6.name; + + invariant(this.request.dependencyTree instanceof (_logicalDependencyTree || _load_logicalDependencyTree()).LogicalDependencyTree, 'dependencyTree on request must be LogicalDependencyTree'); + var fixedVersionPattern = this.request.dependencyTree.getFixedVersionPattern(name, this.request.parentNames); var info = yield this.config.getCache(`import-resolver-${fixedVersionPattern}`, function () { return _this2.resolveFixedVersion(fixedVersionPattern); }); if (info) { return info; } - - var _normalizePattern6 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(this.pattern), - name = _normalizePattern6.name; - throw new (_errors || _load_errors()).MessageError(this.reporter.lang('importResolveFailed', name, this.getCwd())); }); @@ -86462,7 +87820,7 @@ var ImportResolver = function (_BaseResolver) { var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { var _this3 = this; - var _normalizePattern7 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(this.pattern), + var _normalizePattern7 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern), name = _normalizePattern7.name; var cwd = this.getCwd(); @@ -86496,7 +87854,7 @@ var ImportResolver = function (_BaseResolver) { }(); ImportResolver.prototype.resolve = function resolve() { - if (this.request instanceof ImportPackageRequest && this.request.fixedVersionPattern) { + if (this.request instanceof ImportPackageRequest && this.request.dependencyTree) { return this._resolveFromFixedVersions(); } else { return this._resolveFromNodeModules(); @@ -86509,13 +87867,13 @@ var ImportResolver = function (_BaseResolver) { var ImportPackageRequest = function (_PackageRequest) { (0, (_inherits2 || _load_inherits()).default)(ImportPackageRequest, _PackageRequest); - function ImportPackageRequest(req, fixedVersionPattern, resolver) { + function ImportPackageRequest(req, dependencyTree, resolver) { (0, (_classCallCheck2 || _load_classCallCheck()).default)(this, ImportPackageRequest); var _this4 = (0, (_possibleConstructorReturn2 || _load_possibleConstructorReturn()).default)(this, _PackageRequest.call(this, req, resolver)); _this4.import = _this4.parentRequest instanceof ImportPackageRequest ? _this4.parentRequest.import : true; - _this4.fixedVersionPattern = fixedVersionPattern; + _this4.dependencyTree = dependencyTree; return _this4; } @@ -86535,7 +87893,7 @@ var ImportPackageRequest = function (_PackageRequest) { }; ImportPackageRequest.prototype._findResolvedManifest = function _findResolvedManifest(info) { - var _normalizePattern8 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(this.pattern), + var _normalizePattern8 = (0, (_normalizePattern9 || _load_normalizePattern()).normalizePattern)(this.pattern), range = _normalizePattern8.range, name = _normalizePattern8.name; @@ -86601,12 +87959,7 @@ var ImportPackageResolver = function (_PackageResolver) { if (this.activity) { this.activity.tick(req.pattern); } - - var _normalizePattern9 = (0, (_normalizePattern10 || _load_normalizePattern()).normalizePattern)(req.pattern), - name = _normalizePattern9.name; - - var fixedVersionPattern = this.dependencyTree ? this.dependencyTree.getFixedVersionPattern(name, req.parentNames) : null; - var request = new ImportPackageRequest(req, fixedVersionPattern, this); + var request = new ImportPackageRequest(req, this.dependencyTree, this); yield request.find({ fresh: false }); }); @@ -86791,7 +88144,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 401 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86805,13 +88158,13 @@ exports.run = undefined; var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _asyncToGenerator2; @@ -86840,7 +88193,13 @@ var run = exports.run = function () { name = _parsePackageName.name, version = _parsePackageName.version; - var result = yield config.registries.npm.request(name, { unfiltered: true }); + var result = void 0; + try { + result = yield config.registries.npm.request(name, { unfiltered: true }); + } catch (e) { + reporter.error(reporter.lang('infoFail')); + return; + } if (!result) { reporter.error(reporter.lang('infoFail')); return; @@ -86879,18 +88238,18 @@ exports.hasWrapper = hasWrapper; var _npmRegistry; function _load_npmRegistry() { - return _npmRegistry = _interopRequireDefault(__webpack_require__(54)); + return _npmRegistry = _interopRequireDefault(__webpack_require__(83)); } var _parsePackageName2; function _load_parsePackageName() { - return _parsePackageName2 = _interopRequireDefault(__webpack_require__(453)); + return _parsePackageName2 = _interopRequireDefault(__webpack_require__(567)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var semver = __webpack_require__(20); +var semver = __webpack_require__(26); function clean(object) { if (Array.isArray(object)) { @@ -86931,7 +88290,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 402 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -86945,13 +88304,13 @@ exports.getGitConfigInfo = exports.run = exports.shouldRunInCurrentCwd = undefin var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _asyncToGenerator2; @@ -87195,46 +88554,46 @@ exports.hasWrapper = hasWrapper; var _util; function _load_util() { - return _util = __webpack_require__(161); + return _util = __webpack_require__(201); } var _index; function _load_index() { - return _index = __webpack_require__(40); + return _index = __webpack_require__(59); } var _githubResolver; function _load_githubResolver() { - return _githubResolver = _interopRequireDefault(__webpack_require__(244)); + return _githubResolver = _interopRequireDefault(__webpack_require__(305)); } var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(47)); + return _child = _interopRequireWildcard(__webpack_require__(60)); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _validate; function _load_validate() { - return _validate = _interopRequireWildcard(__webpack_require__(92)); + return _validate = _interopRequireWildcard(__webpack_require__(116)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var objectPath = __webpack_require__(300); -var path = __webpack_require__(0); -var yn = __webpack_require__(749); +var objectPath = __webpack_require__(366); +var path = __webpack_require__(2); +var yn = __webpack_require__(1003); function setFlags(commander) { commander.description('Interactively creates or updates a package.json file.'); @@ -87249,7 +88608,7 @@ function hasWrapper(commander, args) { var shouldRunInCurrentCwd = exports.shouldRunInCurrentCwd = true; /***/ }), -/* 403 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87263,19 +88622,19 @@ exports.examples = exports.run = undefined; var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _map; function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(37)); + return _map = _interopRequireDefault(__webpack_require__(41)); } var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _asyncToGenerator2; @@ -87423,7 +88782,7 @@ var list = function () { }); }); - reporter.tree('licenses', trees); + reporter.tree('licenses', trees, { force: true }); } }); @@ -87438,30 +88797,30 @@ exports.setFlags = setFlags; var _baseReporter; function _load_baseReporter() { - return _baseReporter = _interopRequireDefault(__webpack_require__(74)); + return _baseReporter = _interopRequireDefault(__webpack_require__(95)); } var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _buildSubCommands2; function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); function hasWrapper(flags, args) { return args[0] != 'generate-disclaimer'; @@ -87610,7 +88969,7 @@ exports.run = run; exports.examples = examples; /***/ }), -/* 404 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87656,7 +89015,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 405 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87667,6 +89026,12 @@ Object.defineProperty(exports, "__esModule", { }); exports.run = undefined; +var _extends2; + +function _load_extends() { + return _extends2 = _interopRequireDefault(__webpack_require__(28)); +} + var _asyncToGenerator2; function _load_asyncToGenerator() { @@ -87675,10 +89040,18 @@ function _load_asyncToGenerator() { var run = exports.run = function () { var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var pnpPath = `${config.lockfileFolder}/${(_constants || _load_constants()).PNP_FILENAME}`; + + var nodeOptions = process.env.NODE_OPTIONS || ''; + if (yield (_fs || _load_fs()).exists(pnpPath)) { + nodeOptions += ` --require ${pnpPath}`; + } + try { yield (_child || _load_child()).spawn((_constants || _load_constants()).NODE_BIN_PATH, args, { stdio: 'inherit', - cwd: config.cwd + cwd: flags.into || config.cwd, + env: (0, (_extends2 || _load_extends()).default)({}, process.env, { NODE_OPTIONS: nodeOptions }) }); } catch (err) { throw err; @@ -87696,27 +89069,37 @@ exports.hasWrapper = hasWrapper; var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(47)); + return _child = _interopRequireWildcard(__webpack_require__(60)); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function setFlags(commander) {} +function setFlags(commander) { + commander.description('Runs Node with the same version that the one used by Yarn itself, and by default from the project root'); + commander.usage('node [--into PATH] [... args]'); + commander.option('--into ', 'Sets the cwd to the specified location'); +} function hasWrapper(commander, args) { return true; } /***/ }), -/* 406 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87730,13 +89113,13 @@ exports.run = exports.requireLockfile = undefined; var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _asyncToGenerator2; @@ -87807,31 +89190,31 @@ exports.hasWrapper = hasWrapper; var _packageRequest; function _load_packageRequest() { - return _packageRequest = _interopRequireDefault(__webpack_require__(87)); + return _packageRequest = _interopRequireDefault(__webpack_require__(112)); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); } var _colorForVersions; function _load_colorForVersions() { - return _colorForVersions = _interopRequireDefault(__webpack_require__(247)); + return _colorForVersions = _interopRequireDefault(__webpack_require__(308)); } var _colorizeDiff; function _load_colorizeDiff() { - return _colorizeDiff = _interopRequireDefault(__webpack_require__(248)); + return _colorizeDiff = _interopRequireDefault(__webpack_require__(309)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -87848,7 +89231,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 407 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -87862,7 +89245,7 @@ exports.examples = exports.hasWrapper = exports.run = exports.mutate = undefined var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _asyncToGenerator2; @@ -87990,37 +89373,37 @@ exports.setFlags = setFlags; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _buildSubCommands2; function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); } var _validate; function _load_validate() { - return _validate = __webpack_require__(92); + return _validate = __webpack_require__(116); } var _tag; function _load_tag() { - return _tag = __webpack_require__(234); + return _tag = __webpack_require__(295); } var _login; function _load_login() { - return _login = __webpack_require__(86); + return _login = __webpack_require__(94); } var _npmRegistry; function _load_npmRegistry() { - return _npmRegistry = _interopRequireDefault(__webpack_require__(54)); + return _npmRegistry = _interopRequireDefault(__webpack_require__(83)); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -88115,7 +89498,196 @@ exports.hasWrapper = hasWrapper; exports.examples = examples; /***/ }), -/* 408 */ +/* 520 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.examples = exports.setFlags = exports.run = undefined; + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var fetchReleases = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref2$includePrerelea = _ref2.includePrereleases, + includePrereleases = _ref2$includePrerelea === undefined ? false : _ref2$includePrerelea; + + var request = yield config.requestManager.request({ + url: `https://api.github.com/repos/yarnpkg/yarn/releases`, + json: true + }); + + var releases = request.filter(function (release) { + if (release.draft) { + return false; + } + + if (release.prerelease && !includePrereleases) { + return false; + } + + // $FlowFixMe + release.version = semver.coerce(release.tag_name); + + if (!release.version) { + return false; + } + + if (!getBundleAsset(release)) { + return false; + } + + return true; + }); + + releases.sort(function (a, b) { + // $FlowFixMe + return -semver.compare(a.version, b.version); + }); + + return releases; + }); + + return function fetchReleases(_x) { + return _ref.apply(this, arguments); + }; +}(); + +exports.hasWrapper = hasWrapper; + +var _buildSubCommands2; + +function _load_buildSubCommands() { + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); +} + +var _rc; + +function _load_rc() { + return _rc = __webpack_require__(266); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +var _lockfile; + +function _load_lockfile() { + return _lockfile = __webpack_require__(24); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var chalk = __webpack_require__(35); +var invariant = __webpack_require__(13); +var path = __webpack_require__(2); +var semver = __webpack_require__(26); + +function getBundleAsset(release) { + return release.assets.find(function (asset) { + return asset.name.match(/^yarn-[0-9]+\.[0-9]+\.[0-9]+\.js$/); + }); +} + +function fetchBundle(config, url) { + return config.requestManager.request({ + url, + buffer: true + }); +} + +function hasWrapper(flags, args) { + return false; +} + +var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).default)('policies', { + setVersion(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var range = args[0] || 'latest'; + var allowRc = flags.rc; + + reporter.log(`Resolving ${chalk.yellow(range)} to a url...`); + + if (range === 'rc') { + range = 'latest'; + allowRc = true; + } + + if (range === 'latest') { + range = '*'; + } + + var bundleUrl = void 0; + var bundleVersion = void 0; + + if (range === 'nightly' || range === 'nightlies') { + bundleUrl = 'https://nightly.yarnpkg.com/latest.js'; + bundleVersion = 'nightly'; + } else { + var releases = yield fetchReleases(config, { + includePrereleases: allowRc + }); + + var release = releases.find(function (release) { + // $FlowFixMe + return semver.satisfies(release.version, range); + }); + + if (!release) { + throw new Error(`Release not found: ${range}`); + } + + var asset = getBundleAsset(release); + invariant(asset, 'The bundle asset should exist'); + + bundleUrl = asset.browser_download_url; + bundleVersion = release.version.version; + } + + reporter.log(`Downloading ${chalk.green(bundleUrl)}...`); + + var bundle = yield fetchBundle(config, bundleUrl); + var rc = (0, (_rc || _load_rc()).getRcConfigForCwd)(config.lockfileFolder, []); + + var yarnPath = path.resolve(config.lockfileFolder, `.yarn/releases/yarn-${bundleVersion}.js`); + reporter.log(`Saving it into ${chalk.magenta(yarnPath)}...`); + yield (_fs || _load_fs()).mkdirp(path.dirname(yarnPath)); + yield (_fs || _load_fs()).writeFile(yarnPath, bundle); + yield (_fs || _load_fs()).chmod(yarnPath, 0o755); + + var rcPath = `${config.lockfileFolder}/.yarnrc`; + reporter.log(`Updating ${chalk.magenta(rcPath)}...`); + rc['yarn-path'] = path.relative(config.lockfileFolder, yarnPath); + yield (_fs || _load_fs()).writeFilePreservingEol(rcPath, `${(0, (_lockfile || _load_lockfile()).stringify)(rc)}\n`); + + reporter.log(`Done!`); + })(); + } +}), + run = _buildSubCommands.run, + setFlags = _buildSubCommands.setFlags, + examples = _buildSubCommands.examples; + +exports.run = run; +exports.setFlags = setFlags; +exports.examples = examples; + +/***/ }), +/* 521 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88129,13 +89701,13 @@ exports.run = undefined; var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _asyncToGenerator2; @@ -88222,6 +89794,7 @@ var publish = function () { pkg._id = `${pkg.name}@${pkg.version}`; pkg.dist = pkg.dist || {}; pkg.dist.shasum = crypto.createHash('sha1').update(buffer).digest('hex'); + pkg.dist.integrity = ssri.fromData(buffer).toString(); var registry = String(config.getOption('registry')); pkg.dist.tarball = url.resolve(registry, tbURI).replace(/^https:\/\//, 'http://'); @@ -88265,6 +89838,7 @@ var run = exports.run = function () { } // validate package fields that are required for publishing + // $FlowFixMe var pkg = yield config.readRootManifest(); if (pkg.private) { throw new (_errors || _load_errors()).MessageError(reporter.lang('publishPrivate')); @@ -88273,13 +89847,18 @@ var run = exports.run = function () { throw new (_errors || _load_errors()).MessageError(reporter.lang('noName')); } - // + var registry = ''; + + if (pkg && pkg.publishConfig && pkg.publishConfig.registry) { + registry = pkg.publishConfig.registry; + } + reporter.step(1, 4, reporter.lang('bumpingVersion')); - var commitVersion = yield (0, (_version || _load_version()).setVersion)(config, reporter, flags, args, false); + var commitVersion = yield (0, (_version || _load_version()).setVersion)(config, reporter, flags, [], false); // reporter.step(2, 4, reporter.lang('loggingIn')); - var revoke = yield (0, (_login || _load_login()).getToken)(config, reporter, pkg.name, flags); + var revoke = yield (0, (_login || _load_login()).getToken)(config, reporter, pkg.name, flags, registry); // reporter.step(3, 4, reporter.lang('publishing')); @@ -88303,54 +89882,55 @@ exports.hasWrapper = hasWrapper; var _npmRegistry; function _load_npmRegistry() { - return _npmRegistry = _interopRequireDefault(__webpack_require__(54)); + return _npmRegistry = _interopRequireDefault(__webpack_require__(83)); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _version; function _load_version() { - return _version = __webpack_require__(236); + return _version = __webpack_require__(297); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _pack; function _load_pack() { - return _pack = __webpack_require__(110); + return _pack = __webpack_require__(150); } var _login; function _load_login() { - return _login = __webpack_require__(86); + return _login = __webpack_require__(94); } var _path; function _load_path() { - return _path = _interopRequireDefault(__webpack_require__(0)); + return _path = _interopRequireDefault(__webpack_require__(2)); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); -var crypto = __webpack_require__(14); -var url = __webpack_require__(19); -var fs2 = __webpack_require__(10); +var crypto = __webpack_require__(21); +var url = __webpack_require__(29); +var fs2 = __webpack_require__(12); +var ssri = __webpack_require__(107); function setFlags(commander) { (0, (_version || _load_version()).setFlags)(commander); @@ -88365,301 +89945,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 409 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.run = undefined; - -var _promise; - -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} - -var _stringify; - -function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); -} - -var _getIterator2; - -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} - -var _assign; - -function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); -} - -var _keys; - -function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); -} - -var _set; - -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} - -var _asyncToGenerator2; - -function _load_asyncToGenerator() { - return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); -} - -var run = exports.run = function () { - var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { - var runCommand = function () { - var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (args) { - var action = args.shift(); - - // build up list of commands - var cmds = []; - - if (pkgScripts && action in pkgScripts) { - var preAction = `pre${action}`; - if (preAction in pkgScripts) { - cmds.push([preAction, pkgScripts[preAction]]); - } - - cmds.push([action, scripts[action]]); - - var postAction = `post${action}`; - if (postAction in pkgScripts) { - cmds.push([postAction, pkgScripts[postAction]]); - } - } else if (scripts[action]) { - cmds.push([action, scripts[action]]); - } - - if (cmds.length) { - // Disable wrapper in executed commands - process.env.YARN_WRAP_OUTPUT = 'false'; - for (var _iterator3 = cmds, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { - var _ref6; - - if (_isArray3) { - if (_i3 >= _iterator3.length) break; - _ref6 = _iterator3[_i3++]; - } else { - _i3 = _iterator3.next(); - if (_i3.done) break; - _ref6 = _i3.value; - } - - var _ref5 = _ref6; - var stage = _ref5[0]; - var _cmd = _ref5[1]; - - // only tack on trailing arguments for default script, ignore for pre and post - #1595 - var cmdWithArgs = stage === action ? sh`${unquoted(_cmd)} ${args}` : _cmd; - var customShell = config.getOption('script-shell'); - yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).execCommand)({ - stage, - config, - cmd: cmdWithArgs, - cwd: config.cwd, - isInteractive: true, - customShell: customShell ? String(customShell) : undefined - }); - } - } else if (action === 'env') { - reporter.log((0, (_stringify || _load_stringify()).default)((yield (0, (_executeLifecycleScript || _load_executeLifecycleScript()).makeEnv)('env', config.cwd, config)), null, 2), { force: true }); - } else { - var suggestion = void 0; - - for (var commandName in scripts) { - var steps = leven(commandName, action); - if (steps < 2) { - suggestion = commandName; - } - } - - var msg = `Command ${(0, (_stringify || _load_stringify()).default)(action)} not found.`; - if (suggestion) { - msg += ` Did you mean ${(0, (_stringify || _load_stringify()).default)(suggestion)}?`; - } - throw new (_errors || _load_errors()).MessageError(msg); - } - }); - - return function runCommand(_x5) { - return _ref4.apply(this, arguments); - }; - }(); - - // list possible scripts if none specified - - - // build up a list of possible scripts - var pkg = yield config.readManifest(config.cwd); - var scripts = (0, (_map || _load_map()).default)(); - var binCommands = []; - var visitedBinFolders = new (_set || _load_set()).default(); - var pkgCommands = []; - for (var _iterator = (0, (_keys || _load_keys()).default)((_index || _load_index()).registries), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { - var _ref2; - - if (_isArray) { - if (_i >= _iterator.length) break; - _ref2 = _iterator[_i++]; - } else { - _i = _iterator.next(); - if (_i.done) break; - _ref2 = _i.value; - } - - var registry = _ref2; - - var binFolder = path.join(config.cwd, config.registries[registry].folder, '.bin'); - if (!visitedBinFolders.has(binFolder)) { - if (yield (_fs || _load_fs()).exists(binFolder)) { - for (var _iterator4 = yield (_fs || _load_fs()).readdir(binFolder), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { - var _ref7; - - if (_isArray4) { - if (_i4 >= _iterator4.length) break; - _ref7 = _iterator4[_i4++]; - } else { - _i4 = _iterator4.next(); - if (_i4.done) break; - _ref7 = _i4.value; - } - - var name = _ref7; - - binCommands.push(name); - scripts[name] = quoteForShell(path.join(binFolder, name)); - } - } - visitedBinFolders.add(binFolder); - } - } - var pkgScripts = pkg.scripts; - var cmdHints = {}; - if (pkgScripts) { - // inherit `scripts` from manifest - pkgCommands = (0, (_keys || _load_keys()).default)(pkgScripts).sort(); - - // add command hints (what the actual yarn command will do) - for (var _iterator2 = pkgCommands, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { - var _ref3; - - if (_isArray2) { - if (_i2 >= _iterator2.length) break; - _ref3 = _iterator2[_i2++]; - } else { - _i2 = _iterator2.next(); - if (_i2.done) break; - _ref3 = _i2.value; - } - - var cmd = _ref3; - - cmdHints[cmd] = pkgScripts[cmd] || ''; - } - - (0, (_assign || _load_assign()).default)(scripts, pkgScripts); - } - - if (args.length === 0) { - if (binCommands.length) { - reporter.info(`${reporter.lang('binCommands') + binCommands.join(', ')}`); - } else { - reporter.error(reporter.lang('noBinAvailable')); - } - - if (pkgCommands.length) { - reporter.info(`${reporter.lang('possibleCommands')}`); - reporter.list('possibleCommands', pkgCommands, cmdHints); - if (!flags.nonInteractive) { - yield reporter.question(reporter.lang('commandQuestion')).then(function (answer) { - return runCommand(answer.trim().split(' ')); - }, function () { - return reporter.error(reporter.lang('commandNotSpecified')); - }); - } - } else { - reporter.error(reporter.lang('noScriptsAvailable')); - } - return (_promise || _load_promise()).default.resolve(); - } else { - return runCommand(args); - } - }); - - return function run(_x, _x2, _x3, _x4) { - return _ref.apply(this, arguments); - }; -}(); - -exports.setFlags = setFlags; -exports.hasWrapper = hasWrapper; - -var _executeLifecycleScript; - -function _load_executeLifecycleScript() { - return _executeLifecycleScript = __webpack_require__(91); -} - -var _errors; - -function _load_errors() { - return _errors = __webpack_require__(6); -} - -var _index; - -function _load_index() { - return _index = __webpack_require__(41); -} - -var _fs; - -function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); -} - -var _map; - -function _load_map() { - return _map = _interopRequireDefault(__webpack_require__(35)); -} - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var leven = __webpack_require__(646); - -var path = __webpack_require__(0); - -var _require = __webpack_require__(676), - quoteForShell = _require.quoteForShell, - sh = _require.sh, - unquoted = _require.unquoted; - -function setFlags(commander) { - commander.description('Runs a defined package script.'); -} - -function hasWrapper(commander, args) { - return true; -} - -/***/ }), -/* 410 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88673,7 +89959,7 @@ exports.examples = exports.hasWrapper = exports.run = undefined; var _extends2; function _load_extends() { - return _extends2 = _interopRequireDefault(__webpack_require__(23)); + return _extends2 = _interopRequireDefault(__webpack_require__(28)); } var _asyncToGenerator2; @@ -88721,13 +90007,13 @@ exports.setFlags = setFlags; var _buildSubCommands2; function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); } var _login; function _load_login() { - return _login = __webpack_require__(86); + return _login = __webpack_require__(94); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -88902,7 +90188,7 @@ exports.hasWrapper = hasWrapper; exports.examples = examples; /***/ }), -/* 411 */ +/* 523 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -88916,7 +90202,7 @@ exports.run = undefined; var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _asyncToGenerator2; @@ -88997,32 +90283,32 @@ exports.hasWrapper = hasWrapper; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _link; function _load_link() { - return _link = __webpack_require__(231); + return _link = __webpack_require__(291); } var _global; function _load_global() { - return _global = __webpack_require__(85); + return _global = __webpack_require__(111); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var path = __webpack_require__(0); +var path = __webpack_require__(2); function setFlags(commander) { commander.description('Unlink a previously created symlink for a package.'); @@ -89033,7 +90319,199 @@ function hasWrapper(commander, args) { } /***/ }), -/* 412 */ +/* 524 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.clearAll = exports.clearSome = exports.run = undefined; + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); +} + +var _asyncToGenerator2; + +function _load_asyncToGenerator() { + return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); +} + +var run = exports.run = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + if (!config.plugnplayEnabled) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('unplugDisabled')); + } + if (!args.length && flags.clear) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('tooFewArguments', 1)); + } + if (args.length && flags.clearAll) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('noArguments')); + } + + if (flags.clearAll) { + yield clearAll(config); + } else if (flags.clear) { + yield clearSome(config, new (_set || _load_set()).default(args)); + } else if (args.length > 0) { + var lockfile = yield (_lockfile || _load_lockfile()).default.fromDirectory(config.lockfileFolder, reporter); + yield (0, (_install || _load_install()).wrapLifecycle)(config, flags, (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + var install = new (_install || _load_install()).Install(flags, config, reporter, lockfile); + install.linker.unplugged = args; + yield install.init(); + })); + } + + var unpluggedPackageFolders = yield config.listUnpluggedPackageFolders(); + + for (var _iterator = unpluggedPackageFolders.values(), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, (_getIterator2 || _load_getIterator()).default)(_iterator);;) { + var _ref3; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref3 = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref3 = _i.value; + } + + var target = _ref3; + + reporter.log(target, { force: true }); + } + }); + + return function run(_x, _x2, _x3, _x4) { + return _ref.apply(this, arguments); + }; +}(); + +var clearSome = exports.clearSome = function () { + var _ref4 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, filters) { + var unpluggedPackageFolders = yield config.listUnpluggedPackageFolders(); + var removeList = []; + + for (var _iterator2 = unpluggedPackageFolders.entries(), _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator2);;) { + var _ref6; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref6 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref6 = _i2.value; + } + + var _ref5 = _ref6; + var unpluggedName = _ref5[0]; + var target = _ref5[1]; + + var _ref8 = yield (_fs || _load_fs()).readJson(path.join(target, 'package.json')), + name = _ref8.name; + + var toBeRemoved = filters.has(name); + + if (toBeRemoved) { + removeList.push(path.join(config.getUnpluggedPath(), unpluggedName)); + } + } + + if (removeList.length === unpluggedPackageFolders.size) { + yield (_fs || _load_fs()).unlink(config.getUnpluggedPath()); + } else { + for (var _iterator3 = removeList, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator3);;) { + var _ref7; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref7 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref7 = _i3.value; + } + + var unpluggedPackagePath = _ref7; + + yield (_fs || _load_fs()).unlink(unpluggedPackagePath); + } + } + }); + + return function clearSome(_x5, _x6) { + return _ref4.apply(this, arguments); + }; +}(); + +var clearAll = exports.clearAll = function () { + var _ref9 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config) { + yield (_fs || _load_fs()).unlink(config.getUnpluggedPath()); + }); + + return function clearAll(_x7) { + return _ref9.apply(this, arguments); + }; +}(); + +exports.hasWrapper = hasWrapper; +exports.setFlags = setFlags; + +var _lockfile; + +function _load_lockfile() { + return _lockfile = _interopRequireDefault(__webpack_require__(24)); +} + +var _install; + +function _load_install() { + return _install = __webpack_require__(40); +} + +var _errors; + +function _load_errors() { + return _errors = __webpack_require__(7); +} + +var _fs; + +function _load_fs() { + return _fs = _interopRequireWildcard(__webpack_require__(8)); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var path = __webpack_require__(2); + +function hasWrapper(commander) { + return true; +} + +function setFlags(commander) { + commander.description('Temporarily copies a package (with an optional @range suffix) outside of the global cache for debugging purposes'); + commander.usage('unplug [packages ...] [flags]'); + commander.option('--clear', 'Delete the selected packages'); + commander.option('--clear-all', 'Delete all unplugged packages'); +} + +/***/ }), +/* 525 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89047,7 +90525,7 @@ exports.run = undefined; var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); } var _asyncToGenerator2; @@ -89081,7 +90559,7 @@ exports.hasWrapper = hasWrapper; var _yarnVersion; function _load_yarnVersion() { - return _yarnVersion = __webpack_require__(84); + return _yarnVersion = __webpack_require__(110); } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -89095,7 +90573,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 413 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89109,31 +90587,31 @@ exports.run = exports.requireLockfile = undefined; var _from; function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(55)); + return _from = _interopRequireDefault(__webpack_require__(52)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _promise; function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); + return _promise = _interopRequireDefault(__webpack_require__(6)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _asyncToGenerator2; @@ -89403,31 +90881,31 @@ exports.queryWhy = queryWhy; var _install; function _load_install() { - return _install = __webpack_require__(34); + return _install = __webpack_require__(40); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } var _fs; function _load_fs() { - return _fs = _interopRequireWildcard(__webpack_require__(7)); + return _fs = _interopRequireWildcard(__webpack_require__(8)); } var _lockfile; function _load_lockfile() { - return _lockfile = _interopRequireDefault(__webpack_require__(21)); + return _lockfile = _interopRequireDefault(__webpack_require__(24)); } var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } @@ -89436,10 +90914,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de var requireLockfile = exports.requireLockfile = true; -var invariant = __webpack_require__(9); -var bytes = __webpack_require__(468); -var emoji = __webpack_require__(197); -var path = __webpack_require__(0); +var invariant = __webpack_require__(13); +var bytes = __webpack_require__(582); +var emoji = __webpack_require__(235); +var path = __webpack_require__(2); function sum(array) { return array.length ? array.reduce(function (a, b) { @@ -89565,7 +91043,7 @@ function queryWhy(pattern, hoisted) { } /***/ }), -/* 414 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89635,26 +91113,26 @@ exports.hasWrapper = hasWrapper; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _child; function _load_child() { - return _child = _interopRequireWildcard(__webpack_require__(47)); + return _child = _interopRequireWildcard(__webpack_require__(60)); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); +var invariant = __webpack_require__(13); function setFlags(commander) {} @@ -89663,7 +91141,7 @@ function hasWrapper(commander, args) { } /***/ }), -/* 415 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89672,36 +91150,36 @@ function hasWrapper(commander, args) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.examples = exports.setFlags = exports.run = exports.info = undefined; +exports.examples = exports.setFlags = exports.run = exports.runScript = exports.info = undefined; var _from; function _load_from() { - return _from = _interopRequireDefault(__webpack_require__(55)); + return _from = _interopRequireDefault(__webpack_require__(52)); } var _set; function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); + return _set = _interopRequireDefault(__webpack_require__(17)); } var _getIterator2; function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); } var _keys; function _load_keys() { - return _keys = _interopRequireDefault(__webpack_require__(11)); + return _keys = _interopRequireDefault(__webpack_require__(15)); } var _stringify; function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); + return _stringify = _interopRequireDefault(__webpack_require__(39)); } var _asyncToGenerator2; @@ -89804,31 +91282,95 @@ var info = exports.info = function () { }; }(); +var runScript = exports.runScript = function () { + var _ref5 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (config, reporter, flags, args) { + var workspaceRootFolder = config.workspaceRootFolder; + + + if (!workspaceRootFolder) { + throw new (_errors || _load_errors()).MessageError(reporter.lang('workspaceRootNotFound', config.cwd)); + } + + var manifest = yield config.findManifest(workspaceRootFolder, false); + invariant(manifest && manifest.workspaces, 'We must find a manifest with a "workspaces" property'); + + var workspaces = yield config.resolveWorkspaces(workspaceRootFolder, manifest); + + try { + var _ref6 = flags.originalArgs || [], + _ = _ref6[0], + rest = _ref6.slice(1); + + for (var _iterator4 = (0, (_keys || _load_keys()).default)(workspaces), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : (0, (_getIterator2 || _load_getIterator()).default)(_iterator4);;) { + var _ref7; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref7 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref7 = _i4.value; + } + + var workspaceName = _ref7; + var loc = workspaces[workspaceName].loc; + + + yield (_child || _load_child()).spawn((_constants2 || _load_constants2()).NODE_BIN_PATH, [(_constants2 || _load_constants2()).YARN_BIN_PATH].concat(rest), { + stdio: 'inherit', + cwd: loc + }); + } + } catch (err) { + throw err; + } + }); + + return function runScript(_x5, _x6, _x7, _x8) { + return _ref5.apply(this, arguments); + }; +}(); + exports.hasWrapper = hasWrapper; var _errors; function _load_errors() { - return _errors = __webpack_require__(6); + return _errors = __webpack_require__(7); } var _buildSubCommands2; function _load_buildSubCommands() { - return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(48)); + return _buildSubCommands2 = _interopRequireDefault(__webpack_require__(61)); } var _constants; function _load_constants() { - return _constants = __webpack_require__(8); + return _constants = __webpack_require__(14); } +var _child; + +function _load_child() { + return _child = _interopRequireWildcard(__webpack_require__(60)); +} + +var _constants2; + +function _load_constants2() { + return _constants2 = __webpack_require__(14); +} + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var invariant = __webpack_require__(9); -var path = __webpack_require__(0); -var semver = __webpack_require__(20); +var invariant = __webpack_require__(13); +var path = __webpack_require__(2); +var semver = __webpack_require__(26); function hasWrapper(commander, args) { return true; @@ -89839,6 +91381,11 @@ var _buildSubCommands = (0, (_buildSubCommands2 || _load_buildSubCommands()).def return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { yield info(config, reporter, flags, args); })(); + }, + run(config, reporter, flags, args) { + return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () { + yield runScript(config, reporter, flags, args); + })(); } }), run = _buildSubCommands.run, @@ -89850,7 +91397,7 @@ exports.setFlags = setFlags; exports.examples = examples; /***/ }), -/* 416 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -89859,12 +91406,36 @@ exports.examples = examples; Object.defineProperty(exports, "__esModule", { value: true }); -exports.autoRun = undefined; +exports.autoRun = exports.main = undefined; var _assign; function _load_assign() { - return _assign = _interopRequireDefault(__webpack_require__(16)); + return _assign = _interopRequireDefault(__webpack_require__(23)); +} + +var _getIterator2; + +function _load_getIterator() { + return _getIterator2 = _interopRequireDefault(__webpack_require__(4)); +} + +var _stringify; + +function _load_stringify() { + return _stringify = _interopRequireDefault(__webpack_require__(39)); +} + +var _promise; + +function _load_promise() { + return _promise = _interopRequireDefault(__webpack_require__(6)); +} + +var _set; + +function _load_set() { + return _set = _interopRequireDefault(__webpack_require__(17)); } var _asyncToGenerator2; @@ -89873,33 +91444,570 @@ function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(1)); } -var _getIterator2; +var main = exports.main = function () { + var _ref = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (_ref2) { + var startArgs = _ref2.startArgs, + args = _ref2.args, + endArgs = _ref2.endArgs; -function _load_getIterator() { - return _getIterator2 = _interopRequireDefault(__webpack_require__(3)); -} + var collect = function collect(val, acc) { + acc.push(val); + return acc; + }; -var _stringify; + (0, (_loudRejection || _load_loudRejection()).default)(); + (0, (_signalHandler || _load_signalHandler()).default)(); -function _load_stringify() { - return _stringify = _interopRequireDefault(__webpack_require__(33)); -} + // set global options + (_commander || _load_commander()).default.version((_yarnVersion || _load_yarnVersion()).version, '-v, --version'); + (_commander || _load_commander()).default.usage('[command] [flags]'); + (_commander || _load_commander()).default.option('--no-default-rc', 'prevent Yarn from automatically detecting yarnrc and npmrc files'); + (_commander || _load_commander()).default.option('--use-yarnrc ', 'specifies a yarnrc file that Yarn should use (.yarnrc only, not .npmrc)', collect, []); + (_commander || _load_commander()).default.option('--verbose', 'output verbose messages on internal operations'); + (_commander || _load_commander()).default.option('--offline', 'trigger an error if any required dependencies are not available in local cache'); + (_commander || _load_commander()).default.option('--prefer-offline', 'use network only if dependencies are not available in local cache'); + (_commander || _load_commander()).default.option('--enable-pnp, --pnp', "enable the Plug'n'Play installation"); + (_commander || _load_commander()).default.option('--disable-pnp', "disable the Plug'n'Play installation"); + (_commander || _load_commander()).default.option('--strict-semver'); + (_commander || _load_commander()).default.option('--json', 'format Yarn log messages as lines of JSON (see jsonlines.org)'); + (_commander || _load_commander()).default.option('--ignore-scripts', "don't run lifecycle scripts"); + (_commander || _load_commander()).default.option('--har', 'save HAR output of network traffic'); + (_commander || _load_commander()).default.option('--ignore-platform', 'ignore platform checks'); + (_commander || _load_commander()).default.option('--ignore-engines', 'ignore engines check'); + (_commander || _load_commander()).default.option('--ignore-optional', 'ignore optional dependencies'); + (_commander || _load_commander()).default.option('--force', 'install and build packages even if they were built before, overwrite lockfile'); + (_commander || _load_commander()).default.option('--skip-integrity-check', 'run install without checking if node_modules is installed'); + (_commander || _load_commander()).default.option('--check-files', 'install will verify file tree of packages for consistency'); + (_commander || _load_commander()).default.option('--no-bin-links', "don't generate bin links when setting up packages"); + (_commander || _load_commander()).default.option('--flat', 'only allow one version of a package'); + (_commander || _load_commander()).default.option('--prod, --production [prod]', '', (_conversion || _load_conversion()).boolify); + (_commander || _load_commander()).default.option('--no-lockfile', "don't read or generate a lockfile"); + (_commander || _load_commander()).default.option('--pure-lockfile', "don't generate a lockfile"); + (_commander || _load_commander()).default.option('--frozen-lockfile', "don't generate a lockfile and fail if an update is needed"); + (_commander || _load_commander()).default.option('--update-checksums', 'update package checksums from current repository'); + (_commander || _load_commander()).default.option('--link-duplicates', 'create hardlinks to the repeated modules in node_modules'); + (_commander || _load_commander()).default.option('--link-folder ', 'specify a custom folder to store global links'); + (_commander || _load_commander()).default.option('--global-folder ', 'specify a custom folder to store global packages'); + (_commander || _load_commander()).default.option('--modules-folder ', 'rather than installing modules into the node_modules folder relative to the cwd, output them here'); + (_commander || _load_commander()).default.option('--preferred-cache-folder ', 'specify a custom folder to store the yarn cache if possible'); + (_commander || _load_commander()).default.option('--cache-folder ', 'specify a custom folder that must be used to store the yarn cache'); + (_commander || _load_commander()).default.option('--mutex [:specifier]', 'use a mutex to ensure only one yarn instance is executing'); + (_commander || _load_commander()).default.option('--emoji [bool]', 'enable emoji in output', (_conversion || _load_conversion()).boolify, process.platform === 'darwin' || process.env.TERM_PROGRAM === 'Hyper' || process.env.TERM_PROGRAM === 'HyperTerm'); + (_commander || _load_commander()).default.option('-s, --silent', 'skip Yarn console logs, other types of logs (script output) will be printed'); + (_commander || _load_commander()).default.option('--cwd ', 'working directory to use', process.cwd()); + (_commander || _load_commander()).default.option('--proxy ', ''); + (_commander || _load_commander()).default.option('--https-proxy ', ''); + (_commander || _load_commander()).default.option('--registry ', 'override configuration registry'); + (_commander || _load_commander()).default.option('--no-progress', 'disable progress bar'); + (_commander || _load_commander()).default.option('--network-concurrency ', 'maximum number of concurrent network requests', parseInt); + (_commander || _load_commander()).default.option('--network-timeout ', 'TCP timeout for network requests', parseInt); + (_commander || _load_commander()).default.option('--non-interactive', 'do not show interactive prompts'); + (_commander || _load_commander()).default.option('--scripts-prepend-node-path [bool]', 'prepend the node executable dir to the PATH in scripts', (_conversion || _load_conversion()).boolify); + (_commander || _load_commander()).default.option('--no-node-version-check', 'do not warn when using a potentially unsupported Node version'); + (_commander || _load_commander()).default.option('--focus', 'Focus on a single workspace by installing remote copies of its sibling workspaces.'); + (_commander || _load_commander()).default.option('--otp ', 'one-time password for two factor authentication'); -var _promise; + // if -v is the first command, then always exit after returning the version + if (args[0] === '-v') { + console.log((_yarnVersion || _load_yarnVersion()).version.trim()); + process.exitCode = 0; + return; + } -function _load_promise() { - return _promise = _interopRequireDefault(__webpack_require__(5)); -} + // get command name + var firstNonFlagIndex = args.findIndex(function (arg, idx, arr) { + var isOption = arg.startsWith('-'); + var prev = idx > 0 && arr[idx - 1]; + var prevOption = prev && prev.startsWith('-') && (_commander || _load_commander()).default.optionFor(prev); + var boundToPrevOption = prevOption && (prevOption.optional || prevOption.required); -var _set; + return !isOption && !boundToPrevOption; + }); + var preCommandArgs = void 0; + var commandName = ''; + if (firstNonFlagIndex > -1) { + preCommandArgs = args.slice(0, firstNonFlagIndex); + commandName = args[firstNonFlagIndex]; + args = args.slice(firstNonFlagIndex + 1); + } else { + preCommandArgs = args; + args = []; + } -function _load_set() { - return _set = _interopRequireDefault(__webpack_require__(15)); -} + var isKnownCommand = Object.prototype.hasOwnProperty.call((_index3 || _load_index3()).default, commandName); + var isHelp = function isHelp(arg) { + return arg === '--help' || arg === '-h'; + }; + var helpInPre = preCommandArgs.findIndex(isHelp); + var helpInArgs = args.findIndex(isHelp); + var setHelpMode = function setHelpMode() { + if (isKnownCommand) { + args.unshift(commandName); + } + commandName = 'help'; + isKnownCommand = true; + }; + + if (helpInPre > -1) { + preCommandArgs.splice(helpInPre); + setHelpMode(); + } else if (isKnownCommand && helpInArgs === 0) { + args.splice(helpInArgs); + setHelpMode(); + } + + if (!commandName) { + commandName = 'install'; + isKnownCommand = true; + } + + if (!isKnownCommand) { + // if command is not recognized, then set default to `run` + args.unshift(commandName); + commandName = 'run'; + } + var command = (_index3 || _load_index3()).default[commandName]; + + var warnAboutRunDashDash = false; + // we are using "yarn