- *
- * Copyright (c) 2014-2017, Jon Schlinkert.
- * Released under the MIT License.
- */
+ styles.bgColor.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi16m = {
+ rgb: wrapAnsi16m(rgb2rgb, 10)
+ };
-var isExtglob = __webpack_require__(310);
-var chars = { '{': '}', '(': ')', '[': ']'};
-var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
-var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
+ for (let key of Object.keys(colorConvert)) {
+ if (typeof colorConvert[key] !== 'object') {
+ continue;
+ }
-module.exports = function isGlob(str, options) {
- if (typeof str !== 'string' || str === '') {
- return false;
- }
+ const suite = colorConvert[key];
- if (isExtglob(str)) {
- return true;
- }
+ if (key === 'ansi16') {
+ key = 'ansi';
+ }
- var regex = strictRegex;
- var match;
+ if ('ansi16' in suite) {
+ styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
+ styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
+ }
- // optionally relax regex
- if (options && options.strict === false) {
- regex = relaxedRegex;
- }
+ if ('ansi256' in suite) {
+ styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
+ styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
+ }
- while ((match = regex.exec(str))) {
- if (match[2]) return true;
- var idx = match.index + match[0].length;
+ if ('rgb' in suite) {
+ styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
+ styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
+ }
+ }
- // if an open bracket/brace/paren is escaped,
- // set the index to the next closing character
- var open = match[1];
- var close = open ? chars[open] : null;
- if (open && close) {
- var n = str.indexOf(close, idx);
- if (n !== -1) {
- idx = n + 1;
- }
- }
+ return styles;
+}
- str = str.slice(idx);
- }
- return false;
-};
+// Make the export immutable
+Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+});
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(114)(module)))
/***/ }),
-/* 376 */
+/* 378 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var conversions = __webpack_require__(379);
+var route = __webpack_require__(381);
-const path = __webpack_require__(4);
+var convert = {};
-module.exports = path_ => {
- let cwd = process.cwd();
+var models = Object.keys(conversions);
- path_ = path.resolve(path_);
+function wrapRaw(fn) {
+ var wrappedFn = function (args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
- if (process.platform === 'win32') {
- cwd = cwd.toLowerCase();
- path_ = path_.toLowerCase();
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
+
+ return fn(args);
+ };
+
+ // preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
}
- return path_ === cwd;
-};
+ return wrappedFn;
+}
+function wrapRounded(fn) {
+ var wrappedFn = function (args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
-/***/ }),
-/* 377 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
-"use strict";
+ var result = fn(args);
-const path = __webpack_require__(4);
+ // we're assuming the result is an array here.
+ // see notice in conversions.js; don't use box types
+ // in conversion functions.
+ if (typeof result === 'object') {
+ for (var len = result.length, i = 0; i < len; i++) {
+ result[i] = Math.round(result[i]);
+ }
+ }
-module.exports = (childPath, parentPath) => {
- childPath = path.resolve(childPath);
- parentPath = path.resolve(parentPath);
+ return result;
+ };
- if (process.platform === 'win32') {
- childPath = childPath.toLowerCase();
- parentPath = parentPath.toLowerCase();
+ // preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
}
- if (childPath === parentPath) {
- return false;
- }
+ return wrappedFn;
+}
- childPath += path.sep;
- parentPath += path.sep;
+models.forEach(function (fromModel) {
+ convert[fromModel] = {};
- return childPath.startsWith(parentPath);
-};
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
+
+ var routes = route(fromModel);
+ var routeModels = Object.keys(routes);
+
+ routeModels.forEach(function (toModel) {
+ var fn = routes[toModel];
+
+ convert[fromModel][toModel] = wrapRounded(fn);
+ convert[fromModel][toModel].raw = wrapRaw(fn);
+ });
+});
+
+module.exports = convert;
/***/ }),
-/* 378 */
+/* 379 */
/***/ (function(module, exports, __webpack_require__) {
-const assert = __webpack_require__(139)
-const path = __webpack_require__(4)
-const fs = __webpack_require__(133)
-let glob = undefined
-try {
- glob = __webpack_require__(146)
-} catch (_err) {
- // treat glob as optional.
-}
+/* MIT license */
+var cssKeywords = __webpack_require__(380);
-const defaultGlobOpts = {
- nosort: true,
- silent: true
+// NOTE: conversions should only return primitive values (i.e. arrays, or
+// values that give correct `typeof` results).
+// do not use box values types (i.e. Number(), String(), etc.)
+
+var reverseKeywords = {};
+for (var key in cssKeywords) {
+ if (cssKeywords.hasOwnProperty(key)) {
+ reverseKeywords[cssKeywords[key]] = key;
+ }
}
-// for EMFILE handling
-let timeout = 0
+var convert = module.exports = {
+ rgb: {channels: 3, labels: 'rgb'},
+ hsl: {channels: 3, labels: 'hsl'},
+ hsv: {channels: 3, labels: 'hsv'},
+ hwb: {channels: 3, labels: 'hwb'},
+ cmyk: {channels: 4, labels: 'cmyk'},
+ xyz: {channels: 3, labels: 'xyz'},
+ lab: {channels: 3, labels: 'lab'},
+ lch: {channels: 3, labels: 'lch'},
+ hex: {channels: 1, labels: ['hex']},
+ keyword: {channels: 1, labels: ['keyword']},
+ ansi16: {channels: 1, labels: ['ansi16']},
+ ansi256: {channels: 1, labels: ['ansi256']},
+ hcg: {channels: 3, labels: ['h', 'c', 'g']},
+ apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
+ gray: {channels: 1, labels: ['gray']}
+};
-const isWindows = (process.platform === "win32")
+// hide .channels and .labels properties
+for (var model in convert) {
+ if (convert.hasOwnProperty(model)) {
+ if (!('channels' in convert[model])) {
+ throw new Error('missing channels property: ' + model);
+ }
-const defaults = options => {
- const methods = [
- 'unlink',
- 'chmod',
- 'stat',
- 'lstat',
- 'rmdir',
- 'readdir'
- ]
- methods.forEach(m => {
- options[m] = options[m] || fs[m]
- m = m + 'Sync'
- options[m] = options[m] || fs[m]
- })
+ if (!('labels' in convert[model])) {
+ throw new Error('missing channel labels property: ' + model);
+ }
- options.maxBusyTries = options.maxBusyTries || 3
- options.emfileWait = options.emfileWait || 1000
- if (options.glob === false) {
- options.disableGlob = true
- }
- if (options.disableGlob !== true && glob === undefined) {
- throw Error('glob dependency not found, set `options.disableGlob = true` if intentional')
- }
- options.disableGlob = options.disableGlob || false
- options.glob = options.glob || defaultGlobOpts
-}
+ if (convert[model].labels.length !== convert[model].channels) {
+ throw new Error('channel and label counts mismatch: ' + model);
+ }
-const rimraf = (p, options, cb) => {
- if (typeof options === 'function') {
- cb = options
- options = {}
- }
+ var channels = convert[model].channels;
+ var labels = convert[model].labels;
+ delete convert[model].channels;
+ delete convert[model].labels;
+ Object.defineProperty(convert[model], 'channels', {value: channels});
+ Object.defineProperty(convert[model], 'labels', {value: labels});
+ }
+}
- assert(p, 'rimraf: missing path')
- assert.equal(typeof p, 'string', 'rimraf: path should be a string')
- assert.equal(typeof cb, 'function', 'rimraf: callback function required')
- assert(options, 'rimraf: invalid options argument provided')
- assert.equal(typeof options, 'object', 'rimraf: options should be object')
+convert.rgb.hsl = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var min = Math.min(r, g, b);
+ var max = Math.max(r, g, b);
+ var delta = max - min;
+ var h;
+ var s;
+ var l;
- defaults(options)
+ 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;
+ }
- let busyTries = 0
- let errState = null
- let n = 0
+ h = Math.min(h * 60, 360);
- const next = (er) => {
- errState = errState || er
- if (--n === 0)
- cb(errState)
- }
+ if (h < 0) {
+ h += 360;
+ }
- const afterGlob = (er, results) => {
- if (er)
- return cb(er)
+ l = (min + max) / 2;
- n = results.length
- if (n === 0)
- return cb()
+ if (max === min) {
+ s = 0;
+ } else if (l <= 0.5) {
+ s = delta / (max + min);
+ } else {
+ s = delta / (2 - max - min);
+ }
- results.forEach(p => {
- const CB = (er) => {
- if (er) {
- if ((er.code === "EBUSY" || er.code === "ENOTEMPTY" || er.code === "EPERM") &&
- busyTries < options.maxBusyTries) {
- busyTries ++
- // try again, with the same exact callback as this one.
- return setTimeout(() => rimraf_(p, options, CB), busyTries * 100)
- }
+ return [h, s * 100, l * 100];
+};
- // this one won't happen if graceful-fs is used.
- if (er.code === "EMFILE" && timeout < options.emfileWait) {
- return setTimeout(() => rimraf_(p, options, CB), timeout ++)
- }
+convert.rgb.hsv = function (rgb) {
+ var rdif;
+ var gdif;
+ var bdif;
+ var h;
+ var s;
- // already gone
- if (er.code === "ENOENT") er = null
- }
+ 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;
+ };
- timeout = 0
- next(er)
- }
- rimraf_(p, options, CB)
- })
- }
+ if (diff === 0) {
+ h = s = 0;
+ } else {
+ s = diff / v;
+ rdif = diffc(r);
+ gdif = diffc(g);
+ bdif = diffc(b);
- if (options.disableGlob || !glob.hasMagic(p))
- return afterGlob(null, [p])
+ 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;
+ }
+ }
- options.lstat(p, (er, stat) => {
- if (!er)
- return afterGlob(null, [p])
+ return [
+ h * 360,
+ s * 100,
+ v * 100
+ ];
+};
- glob(p, options.glob, afterGlob)
- })
+convert.rgb.hwb = function (rgb) {
+ var r = rgb[0];
+ var g = rgb[1];
+ var b = rgb[2];
+ var h = convert.rgb.hsl(rgb)[0];
+ var w = 1 / 255 * Math.min(r, Math.min(g, b));
-}
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
-// Two possible strategies.
-// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
-// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
-//
-// Both result in an extra syscall when you guess wrong. However, there
-// are likely far more normal files in the world than directories. This
-// is based on the assumption that a the average number of files per
-// directory is >= 1.
-//
-// If anyone ever complains about this, then I guess the strategy could
-// be made configurable somehow. But until then, YAGNI.
-const rimraf_ = (p, options, cb) => {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
+ return [h, w * 100, b * 100];
+};
- // sunos lets the root user unlink directories, which is... weird.
- // so we have to lstat here and make sure it's not a dir.
- options.lstat(p, (er, st) => {
- if (er && er.code === "ENOENT")
- return cb(null)
+convert.rgb.cmyk = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var c;
+ var m;
+ var y;
+ var k;
- // Windows can EPERM on stat. Life is suffering.
- if (er && er.code === "EPERM" && isWindows)
- fixWinEPERM(p, options, er, cb)
+ k = Math.min(1 - r, 1 - g, 1 - b);
+ c = (1 - r - k) / (1 - k) || 0;
+ m = (1 - g - k) / (1 - k) || 0;
+ y = (1 - b - k) / (1 - k) || 0;
- if (st && st.isDirectory())
- return rmdir(p, options, er, cb)
+ return [c * 100, m * 100, y * 100, k * 100];
+};
- options.unlink(p, er => {
- if (er) {
- if (er.code === "ENOENT")
- return cb(null)
- if (er.code === "EPERM")
- return (isWindows)
- ? fixWinEPERM(p, options, er, cb)
- : rmdir(p, options, er, cb)
- if (er.code === "EISDIR")
- return rmdir(p, options, er, cb)
- }
- return cb(er)
- })
- })
+/**
+ * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ * */
+function comparativeDistance(x, y) {
+ return (
+ Math.pow(x[0] - y[0], 2) +
+ Math.pow(x[1] - y[1], 2) +
+ Math.pow(x[2] - y[2], 2)
+ );
}
-const fixWinEPERM = (p, options, er, cb) => {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
-
- options.chmod(p, 0o666, er2 => {
- if (er2)
- cb(er2.code === "ENOENT" ? null : er)
- else
- options.stat(p, (er3, stats) => {
- if (er3)
- cb(er3.code === "ENOENT" ? null : er)
- else if (stats.isDirectory())
- rmdir(p, options, er, cb)
- else
- options.unlink(p, cb)
- })
- })
-}
+convert.rgb.keyword = function (rgb) {
+ var reversed = reverseKeywords[rgb];
+ if (reversed) {
+ return reversed;
+ }
-const fixWinEPERMSync = (p, options, er) => {
- assert(p)
- assert(options)
+ var currentClosestDistance = Infinity;
+ var currentClosestKeyword;
- try {
- options.chmodSync(p, 0o666)
- } catch (er2) {
- if (er2.code === "ENOENT")
- return
- else
- throw er
- }
+ for (var keyword in cssKeywords) {
+ if (cssKeywords.hasOwnProperty(keyword)) {
+ var value = cssKeywords[keyword];
- let stats
- try {
- stats = options.statSync(p)
- } catch (er3) {
- if (er3.code === "ENOENT")
- return
- else
- throw er
- }
+ // Compute comparative distance
+ var distance = comparativeDistance(rgb, value);
- if (stats.isDirectory())
- rmdirSync(p, options, er)
- else
- options.unlinkSync(p)
-}
+ // Check if its less, if so set as closest
+ if (distance < currentClosestDistance) {
+ currentClosestDistance = distance;
+ currentClosestKeyword = keyword;
+ }
+ }
+ }
-const rmdir = (p, options, originalEr, cb) => {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
+ return currentClosestKeyword;
+};
- // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
- // if we guessed wrong, and it's not a directory, then
- // raise the original error.
- options.rmdir(p, er => {
- if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
- rmkids(p, options, cb)
- else if (er && er.code === "ENOTDIR")
- cb(originalEr)
- else
- cb(er)
- })
-}
+convert.keyword.rgb = function (keyword) {
+ return cssKeywords[keyword];
+};
-const rmkids = (p, options, cb) => {
- assert(p)
- assert(options)
- assert(typeof cb === 'function')
+convert.rgb.xyz = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
- options.readdir(p, (er, files) => {
- if (er)
- return cb(er)
- let n = files.length
- if (n === 0)
- return options.rmdir(p, cb)
- let errState
- files.forEach(f => {
- rimraf(path.join(p, f), options, er => {
- if (errState)
- return
- if (er)
- return cb(errState = er)
- if (--n === 0)
- options.rmdir(p, cb)
- })
- })
- })
-}
+ // assume sRGB
+ r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
+ g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
+ b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
-// this looks simpler, and is strictly *faster*, but will
-// tie up the JavaScript thread and fail on excessively
-// deep directory trees.
-const rimrafSync = (p, options) => {
- options = options || {}
- defaults(options)
+ var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
+ var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
+ var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
- assert(p, 'rimraf: missing path')
- assert.equal(typeof p, 'string', 'rimraf: path should be a string')
- assert(options, 'rimraf: missing options')
- assert.equal(typeof options, 'object', 'rimraf: options should be object')
+ return [x * 100, y * 100, z * 100];
+};
- let results
+convert.rgb.lab = function (rgb) {
+ var xyz = convert.rgb.xyz(rgb);
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
- if (options.disableGlob || !glob.hasMagic(p)) {
- results = [p]
- } else {
- try {
- options.lstatSync(p)
- results = [p]
- } catch (er) {
- results = glob.sync(p, options.glob)
- }
- }
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
- if (!results.length)
- return
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
- for (let i = 0; i < results.length; i++) {
- const p = results[i]
+ l = (116 * y) - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
- let st
- try {
- st = options.lstatSync(p)
- } catch (er) {
- if (er.code === "ENOENT")
- return
+ return [l, a, b];
+};
- // Windows can EPERM on stat. Life is suffering.
- if (er.code === "EPERM" && isWindows)
- fixWinEPERMSync(p, options, er)
- }
+convert.hsl.rgb = function (hsl) {
+ var h = hsl[0] / 360;
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var t1;
+ var t2;
+ var t3;
+ var rgb;
+ var val;
- try {
- // sunos lets the root user unlink directories, which is... weird.
- if (st && st.isDirectory())
- rmdirSync(p, options, null)
- else
- options.unlinkSync(p)
- } catch (er) {
- if (er.code === "ENOENT")
- return
- if (er.code === "EPERM")
- return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
- if (er.code !== "EISDIR")
- throw er
+ if (s === 0) {
+ val = l * 255;
+ return [val, val, val];
+ }
- rmdirSync(p, options, er)
- }
- }
-}
+ if (l < 0.5) {
+ t2 = l * (1 + s);
+ } else {
+ t2 = l + s - l * s;
+ }
-const rmdirSync = (p, options, originalEr) => {
- assert(p)
- assert(options)
+ t1 = 2 * l - t2;
- try {
- options.rmdirSync(p)
- } catch (er) {
- if (er.code === "ENOENT")
- return
- if (er.code === "ENOTDIR")
- throw originalEr
- if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
- rmkidsSync(p, options)
- }
-}
+ rgb = [0, 0, 0];
+ for (var i = 0; i < 3; i++) {
+ t3 = h + 1 / 3 * -(i - 1);
+ if (t3 < 0) {
+ t3++;
+ }
+ if (t3 > 1) {
+ t3--;
+ }
-const rmkidsSync = (p, options) => {
- assert(p)
- assert(options)
- options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
+ if (6 * t3 < 1) {
+ val = t1 + (t2 - t1) * 6 * t3;
+ } else if (2 * t3 < 1) {
+ val = t2;
+ } else if (3 * t3 < 2) {
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ } else {
+ val = t1;
+ }
- // We only end up here once we got ENOTEMPTY at least once, and
- // at this point, we are guaranteed to have removed all the kids.
- // So, we know that it won't be ENOENT or ENOTDIR or anything else.
- // try really hard to delete stuff on windows, because it has a
- // PROFOUNDLY annoying habit of not closing handles promptly when
- // files are deleted, resulting in spurious ENOTEMPTY errors.
- const retries = isWindows ? 100 : 1
- let i = 0
- do {
- let threw = true
- try {
- const ret = options.rmdirSync(p, options)
- threw = false
- return ret
- } finally {
- if (++i < retries && threw)
- continue
- }
- } while (true)
-}
+ rgb[i] = val * 255;
+ }
-module.exports = rimraf
-rimraf.sync = rimrafSync
+ return rgb;
+};
+convert.hsl.hsv = function (hsl) {
+ var h = hsl[0];
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var smin = s;
+ var lmin = Math.max(l, 0.01);
+ var sv;
+ var v;
-/***/ }),
-/* 379 */
-/***/ (function(module, exports, __webpack_require__) {
+ l *= 2;
+ s *= (l <= 1) ? l : 2 - l;
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
+ v = (l + s) / 2;
+ sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
-"use strict";
+ return [h, sv * 100, v * 100];
+};
-const AggregateError = __webpack_require__(380);
+convert.hsv.rgb = function (hsv) {
+ var h = hsv[0] / 60;
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var hi = Math.floor(h) % 6;
-module.exports = async (
- iterable,
- mapper,
- {
- concurrency = Infinity,
- stopOnError = true
- } = {}
-) => {
- return new Promise((resolve, reject) => {
- if (typeof mapper !== 'function') {
- throw new TypeError('Mapper function is required');
- }
+ var f = h - Math.floor(h);
+ var p = 255 * v * (1 - s);
+ var q = 255 * v * (1 - (s * f));
+ var t = 255 * v * (1 - (s * (1 - f)));
+ v *= 255;
- if (!(typeof concurrency === 'number' && concurrency >= 1)) {
- throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`);
- }
+ switch (hi) {
+ case 0:
+ return [v, t, p];
+ case 1:
+ return [q, v, p];
+ case 2:
+ return [p, v, t];
+ case 3:
+ return [p, q, v];
+ case 4:
+ return [t, p, v];
+ case 5:
+ return [v, p, q];
+ }
+};
- const ret = [];
- const errors = [];
- const iterator = iterable[Symbol.iterator]();
- let isRejected = false;
- let isIterableDone = false;
- let resolvingCount = 0;
- let currentIndex = 0;
+convert.hsv.hsl = function (hsv) {
+ var h = hsv[0];
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var vmin = Math.max(v, 0.01);
+ var lmin;
+ var sl;
+ var l;
- const next = () => {
- if (isRejected) {
- return;
- }
+ l = (2 - s) * v;
+ lmin = (2 - s) * vmin;
+ sl = s * vmin;
+ sl /= (lmin <= 1) ? lmin : 2 - lmin;
+ sl = sl || 0;
+ l /= 2;
- const nextItem = iterator.next();
- const i = currentIndex;
- currentIndex++;
+ return [h, sl * 100, l * 100];
+};
- if (nextItem.done) {
- isIterableDone = true;
+// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+convert.hwb.rgb = function (hwb) {
+ var h = hwb[0] / 360;
+ var wh = hwb[1] / 100;
+ var bl = hwb[2] / 100;
+ var ratio = wh + bl;
+ var i;
+ var v;
+ var f;
+ var n;
- if (resolvingCount === 0) {
- if (!stopOnError && errors.length !== 0) {
- reject(new AggregateError(errors));
- } else {
- resolve(ret);
- }
- }
+ // wh + bl cant be > 1
+ if (ratio > 1) {
+ wh /= ratio;
+ bl /= ratio;
+ }
- return;
- }
+ i = Math.floor(6 * h);
+ v = 1 - bl;
+ f = 6 * h - i;
- resolvingCount++;
+ if ((i & 0x01) !== 0) {
+ f = 1 - f;
+ }
- (async () => {
- try {
- const element = await nextItem.value;
- ret[i] = await mapper(element, i);
- resolvingCount--;
- next();
- } catch (error) {
- if (stopOnError) {
- isRejected = true;
- reject(error);
- } else {
- errors.push(error);
- resolvingCount--;
- next();
- }
- }
- })();
- };
+ n = wh + f * (v - wh); // linear interpolation
- for (let i = 0; i < concurrency; i++) {
- next();
+ var r;
+ var g;
+ var b;
+ switch (i) {
+ default:
+ case 6:
+ case 0: r = v; g = n; b = wh; break;
+ case 1: r = n; g = v; b = wh; break;
+ case 2: r = wh; g = v; b = n; break;
+ case 3: r = wh; g = n; b = v; break;
+ case 4: r = n; g = wh; b = v; break;
+ case 5: r = v; g = wh; b = n; break;
+ }
- if (isIterableDone) {
- break;
- }
- }
- });
+ return [r * 255, g * 255, b * 255];
};
+convert.cmyk.rgb = function (cmyk) {
+ var c = cmyk[0] / 100;
+ var m = cmyk[1] / 100;
+ var y = cmyk[2] / 100;
+ var k = cmyk[3] / 100;
+ var r;
+ var g;
+ var b;
-/***/ }),
-/* 380 */
-/***/ (function(module, exports, __webpack_require__) {
+ r = 1 - Math.min(1, c * (1 - k) + k);
+ g = 1 - Math.min(1, m * (1 - k) + k);
+ b = 1 - Math.min(1, y * (1 - k) + k);
-"use strict";
+ return [r * 255, g * 255, b * 255];
+};
-const indentString = __webpack_require__(381);
-const cleanStack = __webpack_require__(382);
+convert.xyz.rgb = function (xyz) {
+ var x = xyz[0] / 100;
+ var y = xyz[1] / 100;
+ var z = xyz[2] / 100;
+ var r;
+ var g;
+ var b;
-const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, '');
+ r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
+ g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
+ b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
-class AggregateError extends Error {
- constructor(errors) {
- if (!Array.isArray(errors)) {
- throw new TypeError(`Expected input to be an Array, got ${typeof errors}`);
- }
+ // assume sRGB
+ r = r > 0.0031308
+ ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
+ : r * 12.92;
- errors = [...errors].map(error => {
- if (error instanceof Error) {
- return error;
- }
+ g = g > 0.0031308
+ ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
+ : g * 12.92;
- if (error !== null && typeof error === 'object') {
- // Handle plain error objects with message property and/or possibly other metadata
- return Object.assign(new Error(error.message), error);
- }
+ b = b > 0.0031308
+ ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
+ : b * 12.92;
- return new Error(error);
- });
+ r = Math.min(Math.max(0, r), 1);
+ g = Math.min(Math.max(0, g), 1);
+ b = Math.min(Math.max(0, b), 1);
- let message = errors
- .map(error => {
- // The `stack` property is not standardized, so we can't assume it exists
- return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error);
- })
- .join('\n');
- message = '\n' + indentString(message, 4);
- super(message);
+ return [r * 255, g * 255, b * 255];
+};
- this.name = 'AggregateError';
+convert.xyz.lab = function (xyz) {
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
- Object.defineProperty(this, '_errors', {value: errors});
- }
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
- * [Symbol.iterator]() {
- for (const error of this._errors) {
- yield error;
- }
- }
-}
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
-module.exports = AggregateError;
+ l = (116 * y) - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
+ return [l, a, b];
+};
-/***/ }),
-/* 381 */
-/***/ (function(module, exports, __webpack_require__) {
+convert.lab.xyz = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var x;
+ var y;
+ var z;
-"use strict";
+ y = (l + 16) / 116;
+ x = a / 500 + y;
+ z = y - b / 200;
+ var y2 = Math.pow(y, 3);
+ var x2 = Math.pow(x, 3);
+ var z2 = Math.pow(z, 3);
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
-module.exports = (string, count = 1, options) => {
- options = {
- indent: ' ',
- includeEmptyLines: false,
- ...options
- };
+ x *= 95.047;
+ y *= 100;
+ z *= 108.883;
- if (typeof string !== 'string') {
- throw new TypeError(
- `Expected \`input\` to be a \`string\`, got \`${typeof string}\``
- );
- }
+ return [x, y, z];
+};
- if (typeof count !== 'number') {
- throw new TypeError(
- `Expected \`count\` to be a \`number\`, got \`${typeof count}\``
- );
- }
+convert.lab.lch = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var hr;
+ var h;
+ var c;
- if (typeof options.indent !== 'string') {
- throw new TypeError(
- `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``
- );
- }
+ hr = Math.atan2(b, a);
+ h = hr * 360 / 2 / Math.PI;
- if (count === 0) {
- return string;
+ if (h < 0) {
+ h += 360;
}
- const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
+ c = Math.sqrt(a * a + b * b);
- return string.replace(regex, options.indent.repeat(count));
+ return [l, c, h];
};
+convert.lch.lab = function (lch) {
+ var l = lch[0];
+ var c = lch[1];
+ var h = lch[2];
+ var a;
+ var b;
+ var hr;
-/***/ }),
-/* 382 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+ hr = h / 360 * 2 * Math.PI;
+ a = c * Math.cos(hr);
+ b = c * Math.sin(hr);
-const os = __webpack_require__(120);
+ return [l, a, b];
+};
-const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
-const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
-const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir();
+convert.rgb.ansi16 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2];
+ var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
-module.exports = (stack, options) => {
- options = Object.assign({pretty: false}, options);
+ value = Math.round(value / 50);
- return stack.replace(/\\/g, '/')
- .split('\n')
- .filter(line => {
- const pathMatches = line.match(extractPathRegex);
- if (pathMatches === null || !pathMatches[1]) {
- return true;
- }
+ if (value === 0) {
+ return 30;
+ }
- const match = pathMatches[1];
+ var ansi = 30
+ + ((Math.round(b / 255) << 2)
+ | (Math.round(g / 255) << 1)
+ | Math.round(r / 255));
- // Electron
- if (
- match.includes('.app/Contents/Resources/electron.asar') ||
- match.includes('.app/Contents/Resources/default_app.asar')
- ) {
- return false;
- }
+ if (value === 2) {
+ ansi += 60;
+ }
- return !pathRegex.test(match);
- })
- .filter(line => line.trim() !== '')
- .map(line => {
- if (options.pretty) {
- return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));
- }
+ return ansi;
+};
- return line;
- })
- .join('\n');
+convert.hsv.ansi16 = function (args) {
+ // optimization here; we already know the value and don't need to get
+ // it converted for us.
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
};
+convert.rgb.ansi256 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2];
-/***/ }),
-/* 383 */
-/***/ (function(module, exports, __webpack_require__) {
+ // we use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (r === g && g === b) {
+ if (r < 8) {
+ return 16;
+ }
-"use strict";
+ if (r > 248) {
+ return 231;
+ }
-const chalk = __webpack_require__(384);
-const cliCursor = __webpack_require__(387);
-const cliSpinners = __webpack_require__(391);
-const logSymbols = __webpack_require__(393);
+ return Math.round(((r - 8) / 247) * 24) + 232;
+ }
-class Ora {
- constructor(options) {
- if (typeof options === 'string') {
- options = {
- text: options
- };
- }
+ var ansi = 16
+ + (36 * Math.round(r / 255 * 5))
+ + (6 * Math.round(g / 255 * 5))
+ + Math.round(b / 255 * 5);
- this.options = Object.assign({
- text: '',
- color: 'cyan',
- stream: process.stderr
- }, options);
+ return ansi;
+};
- const sp = this.options.spinner;
- this.spinner = typeof sp === 'object' ? sp : (process.platform === 'win32' ? cliSpinners.line : (cliSpinners[sp] || cliSpinners.dots)); // eslint-disable-line no-nested-ternary
+convert.ansi16.rgb = function (args) {
+ var color = args % 10;
- if (this.spinner.frames === undefined) {
- throw new Error('Spinner must define `frames`');
+ // handle greyscale
+ if (color === 0 || color === 7) {
+ if (args > 50) {
+ color += 3.5;
}
- this.text = this.options.text;
- this.color = this.options.color;
- this.interval = this.options.interval || this.spinner.interval || 100;
- this.stream = this.options.stream;
- this.id = null;
- this.frameIndex = 0;
- this.enabled = typeof this.options.enabled === 'boolean' ? this.options.enabled : ((this.stream && this.stream.isTTY) && !process.env.CI);
+ color = color / 10.5 * 255;
+
+ return [color, color, color];
}
- frame() {
- const frames = this.spinner.frames;
- let frame = frames[this.frameIndex];
- if (this.color) {
- frame = chalk[this.color](frame);
- }
+ var mult = (~~(args > 50) + 1) * 0.5;
+ var r = ((color & 1) * mult) * 255;
+ var g = (((color >> 1) & 1) * mult) * 255;
+ var b = (((color >> 2) & 1) * mult) * 255;
- this.frameIndex = ++this.frameIndex % frames.length;
+ return [r, g, b];
+};
- return frame + ' ' + this.text;
+convert.ansi256.rgb = function (args) {
+ // handle greyscale
+ if (args >= 232) {
+ var c = (args - 232) * 10 + 8;
+ return [c, c, c];
}
- clear() {
- if (!this.enabled) {
- return this;
- }
- this.stream.clearLine();
- this.stream.cursorTo(0);
+ args -= 16;
- return this;
- }
- render() {
- this.clear();
- this.stream.write(this.frame());
+ var rem;
+ var r = Math.floor(args / 36) / 5 * 255;
+ var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+ var b = (rem % 6) / 5 * 255;
- return this;
- }
- start(text) {
- if (text) {
- this.text = text;
- }
+ return [r, g, b];
+};
- if (!this.enabled || this.id) {
- return this;
- }
+convert.rgb.hex = function (args) {
+ var integer = ((Math.round(args[0]) & 0xFF) << 16)
+ + ((Math.round(args[1]) & 0xFF) << 8)
+ + (Math.round(args[2]) & 0xFF);
- cliCursor.hide(this.stream);
- this.render();
- this.id = setInterval(this.render.bind(this), this.interval);
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
- return this;
+convert.hex.rgb = function (args) {
+ var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ if (!match) {
+ return [0, 0, 0];
}
- stop() {
- if (!this.enabled) {
- return this;
- }
- clearInterval(this.id);
- this.id = null;
- this.frameIndex = 0;
- this.clear();
- cliCursor.show(this.stream);
+ var colorString = match[0];
- return this;
- }
- succeed(text) {
- return this.stopAndPersist({symbol: logSymbols.success, text});
- }
- fail(text) {
- return this.stopAndPersist({symbol: logSymbols.error, text});
+ if (match[0].length === 3) {
+ colorString = colorString.split('').map(function (char) {
+ return char + char;
+ }).join('');
}
- warn(text) {
- return this.stopAndPersist({symbol: logSymbols.warning, text});
+
+ var integer = parseInt(colorString, 16);
+ var r = (integer >> 16) & 0xFF;
+ var g = (integer >> 8) & 0xFF;
+ var b = integer & 0xFF;
+
+ return [r, g, b];
+};
+
+convert.rgb.hcg = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var max = Math.max(Math.max(r, g), b);
+ var min = Math.min(Math.min(r, g), b);
+ var chroma = (max - min);
+ var grayscale;
+ var hue;
+
+ if (chroma < 1) {
+ grayscale = min / (1 - chroma);
+ } else {
+ grayscale = 0;
}
- info(text) {
- return this.stopAndPersist({symbol: logSymbols.info, text});
+
+ if (chroma <= 0) {
+ hue = 0;
+ } else
+ if (max === r) {
+ hue = ((g - b) / chroma) % 6;
+ } else
+ if (max === g) {
+ hue = 2 + (b - r) / chroma;
+ } else {
+ hue = 4 + (r - g) / chroma + 4;
}
- stopAndPersist(options) {
- if (!this.enabled) {
- return this;
- }
- // Legacy argument
- // TODO: Deprecate sometime in the future
- if (typeof options === 'string') {
- options = {
- symbol: options
- };
- }
+ hue /= 6;
+ hue %= 1;
+
+ return [hue * 360, chroma * 100, grayscale * 100];
+};
- options = options || {};
+convert.hsl.hcg = function (hsl) {
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var c = 1;
+ var f = 0;
- this.stop();
- this.stream.write(`${options.symbol || ' '} ${options.text || this.text}\n`);
+ if (l < 0.5) {
+ c = 2.0 * s * l;
+ } else {
+ c = 2.0 * s * (1.0 - l);
+ }
- return this;
+ if (c < 1.0) {
+ f = (l - 0.5 * c) / (1.0 - c);
}
-}
-module.exports = function (opts) {
- return new Ora(opts);
+ return [hsl[0], c * 100, f * 100];
};
-module.exports.promise = (action, options) => {
- if (typeof action.then !== 'function') {
- throw new TypeError('Parameter `action` must be a Promise');
- }
+convert.hsv.hcg = function (hsv) {
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
- const spinner = new Ora(options);
- spinner.start();
+ var c = s * v;
+ var f = 0;
- action.then(
- () => {
- spinner.succeed();
- },
- () => {
- spinner.fail();
- }
- );
+ if (c < 1.0) {
+ f = (v - c) / (1 - c);
+ }
- return spinner;
+ return [hsv[0], c * 100, f * 100];
};
+convert.hcg.rgb = function (hcg) {
+ var h = hcg[0] / 360;
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
-/***/ }),
-/* 384 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (c === 0.0) {
+ return [g * 255, g * 255, g * 255];
+ }
-"use strict";
+ var pure = [0, 0, 0];
+ var hi = (h % 1) * 6;
+ var v = hi % 1;
+ var w = 1 - v;
+ var mg = 0;
-const escapeStringRegexp = __webpack_require__(178);
-const ansiStyles = __webpack_require__(385);
-const stdoutColor = __webpack_require__(184).stdout;
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1; pure[1] = v; pure[2] = 0; break;
+ case 1:
+ pure[0] = w; pure[1] = 1; pure[2] = 0; break;
+ case 2:
+ pure[0] = 0; pure[1] = 1; pure[2] = v; break;
+ case 3:
+ pure[0] = 0; pure[1] = w; pure[2] = 1; break;
+ case 4:
+ pure[0] = v; pure[1] = 0; pure[2] = 1; break;
+ default:
+ pure[0] = 1; pure[1] = 0; pure[2] = w;
+ }
-const template = __webpack_require__(386);
+ mg = (1.0 - c) * g;
-const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
+ return [
+ (c * pure[0] + mg) * 255,
+ (c * pure[1] + mg) * 255,
+ (c * pure[2] + mg) * 255
+ ];
+};
-// `supportsColor.level` → `ansiStyles.color[name]` mapping
-const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
+convert.hcg.hsv = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
-// `color-convert` models to exclude from the Chalk API due to conflicts and such
-const skipModels = new Set(['gray']);
+ var v = c + g * (1.0 - c);
+ var f = 0;
-const styles = Object.create(null);
+ if (v > 0.0) {
+ f = c / v;
+ }
-function applyOptions(obj, options) {
- options = options || {};
+ return [hcg[0], f * 100, v * 100];
+};
- // 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;
-}
+convert.hcg.hsl = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
-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);
+ var l = g * (1.0 - c) + 0.5 * c;
+ var s = 0;
- chalk.template = function () {
- const args = [].slice.call(arguments);
- return chalkTag.apply(null, [chalk.template].concat(args));
- };
+ if (l > 0.0 && l < 0.5) {
+ s = c / (2 * l);
+ } else
+ if (l >= 0.5 && l < 1.0) {
+ s = c / (2 * (1 - l));
+ }
- Object.setPrototypeOf(chalk, Chalk.prototype);
- Object.setPrototypeOf(chalk.template, chalk);
+ return [hcg[0], s * 100, l * 100];
+};
- chalk.template.constructor = Chalk;
+convert.hcg.hwb = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+ var v = c + g * (1.0 - c);
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
+};
- return chalk.template;
+convert.hwb.hcg = function (hwb) {
+ var w = hwb[1] / 100;
+ var b = hwb[2] / 100;
+ var v = 1 - b;
+ var c = v - w;
+ var g = 0;
+
+ if (c < 1) {
+ g = (v - c) / (1 - c);
}
- applyOptions(this, options);
-}
+ return [hwb[0], c * 100, g * 100];
+};
-// Use bright blue on Windows as the normal blue color is illegible
-if (isSimpleWindowsTerm) {
- ansiStyles.blue.open = '\u001B[94m';
-}
+convert.apple.rgb = function (apple) {
+ return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
+};
-for (const key of Object.keys(ansiStyles)) {
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+convert.rgb.apple = function (rgb) {
+ return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
+};
- styles[key] = {
- get() {
- const codes = ansiStyles[key];
- return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
- }
- };
-}
+convert.gray.rgb = function (args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+};
-styles.visible = {
- get() {
- return build.call(this, this._styles || [], true, 'visible');
- }
+convert.gray.hsl = convert.gray.hsv = function (args) {
+ return [0, 0, args[0]];
};
-ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
-for (const model of Object.keys(ansiStyles.color.ansi)) {
- if (skipModels.has(model)) {
- continue;
- }
+convert.gray.hwb = function (gray) {
+ return [0, 100, gray[0]];
+};
- 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);
- };
- }
- };
-}
+convert.gray.cmyk = function (gray) {
+ return [0, 0, 0, gray[0]];
+};
-ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
-for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
- if (skipModels.has(model)) {
- continue;
- }
+convert.gray.lab = function (gray) {
+ return [gray[0], 0, 0];
+};
- 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);
- };
- }
- };
-}
+convert.gray.hex = function (gray) {
+ var val = Math.round(gray[0] / 100 * 255) & 0xFF;
+ var integer = (val << 16) + (val << 8) + val;
-const proto = Object.defineProperties(() => {}, styles);
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
-function build(_styles, _empty, key) {
- const builder = function () {
- return applyStyle.apply(builder, arguments);
- };
+convert.rgb.gray = function (rgb) {
+ var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+ return [val / 255 * 100];
+};
- builder._styles = _styles;
- builder._empty = _empty;
- const self = this;
+/***/ }),
+/* 380 */
+/***/ (function(module, exports, __webpack_require__) {
- Object.defineProperty(builder, 'level', {
- enumerable: true,
- get() {
- return self.level;
- },
- set(level) {
- self.level = level;
- }
- });
+"use strict";
+
+
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "darkkhaki": [189, 183, 107],
+ "darkmagenta": [139, 0, 139],
+ "darkolivegreen": [85, 107, 47],
+ "darkorange": [255, 140, 0],
+ "darkorchid": [153, 50, 204],
+ "darkred": [139, 0, 0],
+ "darksalmon": [233, 150, 122],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
+};
- 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';
+/***/ }),
+/* 381 */
+/***/ (function(module, exports, __webpack_require__) {
- // `__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
+var conversions = __webpack_require__(379);
- return builder;
-}
+/*
+ this function routes a model to all other models.
-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]);
+ all functions that are routed have a property `.conversion` attached
+ to the returned synthetic function. This property is an array
+ of strings, each with the steps in between the 'from' and 'to'
+ color models (inclusive).
- if (argsLen === 0) {
- return '';
- }
+ conversions that are not possible simply are not included.
+*/
- if (argsLen > 1) {
- // Don't slice `arguments`, it prevents V8 optimizations
- for (let a = 1; a < argsLen; a++) {
- str += ' ' + args[a];
- }
- }
+function buildGraph() {
+ var graph = {};
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
+ var models = Object.keys(conversions);
- if (!this.enabled || this.level <= 0 || !str) {
- return this._empty ? '' : str;
+ for (var len = models.length, i = 0; i < len; i++) {
+ graph[models[i]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
}
- // 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 = '';
- }
+ return graph;
+}
- 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;
+// https://en.wikipedia.org/wiki/Breadth-first_search
+function deriveBFS(fromModel) {
+ var graph = buildGraph();
+ var queue = [fromModel]; // unshift -> queue -> pop
- // 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}`);
+ graph[fromModel].distance = 0;
+
+ while (queue.length) {
+ var current = queue.pop();
+ var adjacents = Object.keys(conversions[current]);
+
+ for (var len = adjacents.length, i = 0; i < len; i++) {
+ var adjacent = adjacents[i];
+ var node = graph[adjacent];
+
+ if (node.distance === -1) {
+ node.distance = graph[current].distance + 1;
+ node.parent = current;
+ queue.unshift(adjacent);
+ }
+ }
}
- // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
- ansiStyles.dim.open = originalDim;
-
- return str;
+ return graph;
}
-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(' ');
- }
+function link(from, to) {
+ return function (args) {
+ return to(from(args));
+ };
+}
- const args = [].slice.call(arguments, 2);
- const parts = [strings.raw[0]];
+function wrapConversion(toModel, graph) {
+ var path = [graph[toModel].parent, toModel];
+ var fn = conversions[graph[toModel].parent][toModel];
- for (let i = 1; i < strings.length; i++) {
- parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
- parts.push(String(strings.raw[i]));
+ var cur = graph[toModel].parent;
+ while (graph[cur].parent) {
+ path.unshift(graph[cur].parent);
+ fn = link(conversions[graph[cur].parent][cur], fn);
+ cur = graph[cur].parent;
}
- return template(chalk, parts.join(''));
+ fn.conversion = path;
+ return fn;
}
-Object.defineProperties(Chalk.prototype, styles);
+module.exports = function (fromModel) {
+ var graph = deriveBFS(fromModel);
+ var conversion = {};
+
+ var models = Object.keys(graph);
+ for (var len = models.length, i = 0; i < len; i++) {
+ var toModel = models[i];
+ var node = graph[toModel];
+
+ if (node.parent === null) {
+ // no possible conversion, or this node is the source model.
+ continue;
+ }
+
+ conversion[toModel] = wrapConversion(toModel, graph);
+ }
+
+ return conversion;
+};
-module.exports = Chalk(); // eslint-disable-line new-cap
-module.exports.supportsColor = stdoutColor;
-module.exports.default = module.exports; // For TypeScript
/***/ }),
-/* 385 */
+/* 382 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(module) {
-const colorConvert = __webpack_require__(180);
-
-const wrapAnsi16 = (fn, offset) => function () {
- const code = fn.apply(colorConvert, arguments);
- return `\u001B[${code + offset}m`;
-};
-const wrapAnsi256 = (fn, offset) => function () {
- const code = fn.apply(colorConvert, arguments);
- return `\u001B[${38 + offset};5;${code}m`;
-};
+const os = __webpack_require__(120);
+const hasFlag = __webpack_require__(383);
-const wrapAnsi16m = (fn, offset) => function () {
- const rgb = fn.apply(colorConvert, arguments);
- return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
-};
+const env = process.env;
-function assembleStyles() {
- const codes = new Map();
- const styles = {
- modifier: {
- reset: [0, 0],
- // 21 isn't widely supported and 22 does the same thing
- bold: [1, 22],
- dim: [2, 22],
- italic: [3, 23],
- underline: [4, 24],
- inverse: [7, 27],
- hidden: [8, 28],
- strikethrough: [9, 29]
- },
- color: {
- black: [30, 39],
- red: [31, 39],
- green: [32, 39],
- yellow: [33, 39],
- blue: [34, 39],
- magenta: [35, 39],
- cyan: [36, 39],
- white: [37, 39],
- gray: [90, 39],
+let forceColor;
+if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false')) {
+ forceColor = false;
+} else if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ forceColor = true;
+}
+if ('FORCE_COLOR' in env) {
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
+}
- // Bright color
- redBright: [91, 39],
- greenBright: [92, 39],
- yellowBright: [93, 39],
- blueBright: [94, 39],
- magentaBright: [95, 39],
- cyanBright: [96, 39],
- whiteBright: [97, 39]
- },
- bgColor: {
- bgBlack: [40, 49],
- bgRed: [41, 49],
- bgGreen: [42, 49],
- bgYellow: [43, 49],
- bgBlue: [44, 49],
- bgMagenta: [45, 49],
- bgCyan: [46, 49],
- bgWhite: [47, 49],
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
- // Bright color
- bgBlackBright: [100, 49],
- bgRedBright: [101, 49],
- bgGreenBright: [102, 49],
- bgYellowBright: [103, 49],
- bgBlueBright: [104, 49],
- bgMagentaBright: [105, 49],
- bgCyanBright: [106, 49],
- bgWhiteBright: [107, 49]
- }
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
};
+}
- // Fix humans
- styles.color.grey = styles.color.gray;
+function supportsColor(stream) {
+ if (forceColor === false) {
+ return 0;
+ }
- for (const groupName of Object.keys(styles)) {
- const group = styles[groupName];
+ if (hasFlag('color=16m') ||
+ hasFlag('color=full') ||
+ hasFlag('color=truecolor')) {
+ return 3;
+ }
- for (const styleName of Object.keys(group)) {
- const style = group[styleName];
+ if (hasFlag('color=256')) {
+ return 2;
+ }
- styles[styleName] = {
- open: `\u001B[${style[0]}m`,
- close: `\u001B[${style[1]}m`
- };
+ if (stream && !stream.isTTY && forceColor !== true) {
+ return 0;
+ }
- group[styleName] = styles[styleName];
+ const min = forceColor ? 1 : 0;
- codes.set(style[0], style[1]);
+ if (process.platform === 'win32') {
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
+ // libuv that enables 256 color output on Windows. Anything earlier and it
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
+ // that supports 16m/TrueColor.
+ const osRelease = os.release().split('.');
+ if (
+ Number(process.versions.node.split('.')[0]) >= 8 &&
+ Number(osRelease[0]) >= 10 &&
+ Number(osRelease[2]) >= 10586
+ ) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
- Object.defineProperty(styles, groupName, {
- value: group,
- enumerable: false
- });
-
- Object.defineProperty(styles, 'codes', {
- value: codes,
- enumerable: false
- });
+ return 1;
}
- const ansi2ansi = n => n;
- const rgb2rgb = (r, g, b) => [r, g, b];
-
- styles.color.close = '\u001B[39m';
- styles.bgColor.close = '\u001B[49m';
+ if ('CI' in env) {
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
- styles.color.ansi = {
- ansi: wrapAnsi16(ansi2ansi, 0)
- };
- styles.color.ansi256 = {
- ansi256: wrapAnsi256(ansi2ansi, 0)
- };
- styles.color.ansi16m = {
- rgb: wrapAnsi16m(rgb2rgb, 0)
- };
+ return min;
+ }
- styles.bgColor.ansi = {
- ansi: wrapAnsi16(ansi2ansi, 10)
- };
- styles.bgColor.ansi256 = {
- ansi256: wrapAnsi256(ansi2ansi, 10)
- };
- styles.bgColor.ansi16m = {
- rgb: wrapAnsi16m(rgb2rgb, 10)
- };
+ if ('TEAMCITY_VERSION' in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
- for (let key of Object.keys(colorConvert)) {
- if (typeof colorConvert[key] !== 'object') {
- continue;
- }
+ if (env.COLORTERM === 'truecolor') {
+ return 3;
+ }
- const suite = colorConvert[key];
+ if ('TERM_PROGRAM' in env) {
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
- if (key === 'ansi16') {
- key = 'ansi';
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app':
+ return version >= 3 ? 3 : 2;
+ case 'Apple_Terminal':
+ return 2;
+ // No default
}
+ }
- if ('ansi16' in suite) {
- styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
- styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
- }
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
- if ('ansi256' in suite) {
- styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
- styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
- }
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
- if ('rgb' in suite) {
- styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
- styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
- }
+ if ('COLORTERM' in env) {
+ return 1;
}
- return styles;
+ if (env.TERM === 'dumb') {
+ return min;
+ }
+
+ return min;
}
-// Make the export immutable
-Object.defineProperty(module, 'exports', {
- enumerable: true,
- get: assembleStyles
-});
+function getSupportLevel(stream) {
+ const level = supportsColor(stream);
+ return translateLevel(level);
+}
+
+module.exports = {
+ supportsColor: getSupportLevel,
+ stdout: getSupportLevel(process.stdout),
+ stderr: getSupportLevel(process.stderr)
+};
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(114)(module)))
/***/ }),
-/* 386 */
+/* 383 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+module.exports = (flag, argv) => {
+ argv = argv || process.argv;
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+ const pos = argv.indexOf(prefix + flag);
+ const terminatorPos = argv.indexOf('--');
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
+};
+
+
+/***/ }),
+/* 384 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50339,12 +50194,12 @@ module.exports = (chalk, tmp) => {
/***/ }),
-/* 387 */
+/* 385 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const restoreCursor = __webpack_require__(388);
+const restoreCursor = __webpack_require__(386);
let hidden = false;
@@ -50385,13 +50240,13 @@ exports.toggle = (force, stream) => {
/***/ }),
-/* 388 */
+/* 386 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const onetime = __webpack_require__(389);
-const signalExit = __webpack_require__(225);
+const onetime = __webpack_require__(387);
+const signalExit = __webpack_require__(217);
module.exports = onetime(() => {
signalExit(() => {
@@ -50401,12 +50256,12 @@ module.exports = onetime(() => {
/***/ }),
-/* 389 */
+/* 387 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const mimicFn = __webpack_require__(390);
+const mimicFn = __webpack_require__(388);
module.exports = (fn, opts) => {
// TODO: Remove this in v3
@@ -50447,7 +50302,7 @@ module.exports = (fn, opts) => {
/***/ }),
-/* 390 */
+/* 388 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50463,27 +50318,27 @@ module.exports = (to, from) => {
/***/ }),
-/* 391 */
+/* 389 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = __webpack_require__(392);
+module.exports = __webpack_require__(390);
/***/ }),
-/* 392 */
+/* 390 */
/***/ (function(module) {
module.exports = JSON.parse("{\"dots\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠹\",\"⠸\",\"⠼\",\"⠴\",\"⠦\",\"⠧\",\"⠇\",\"⠏\"]},\"dots2\":{\"interval\":80,\"frames\":[\"⣾\",\"⣽\",\"⣻\",\"⢿\",\"⡿\",\"⣟\",\"⣯\",\"⣷\"]},\"dots3\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠞\",\"⠖\",\"⠦\",\"⠴\",\"⠲\",\"⠳\",\"⠓\"]},\"dots4\":{\"interval\":80,\"frames\":[\"⠄\",\"⠆\",\"⠇\",\"⠋\",\"⠙\",\"⠸\",\"⠰\",\"⠠\",\"⠰\",\"⠸\",\"⠙\",\"⠋\",\"⠇\",\"⠆\"]},\"dots5\":{\"interval\":80,\"frames\":[\"⠋\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\"]},\"dots6\":{\"interval\":80,\"frames\":[\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠴\",\"⠲\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠚\",\"⠙\",\"⠉\",\"⠁\"]},\"dots7\":{\"interval\":80,\"frames\":[\"⠈\",\"⠉\",\"⠋\",\"⠓\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠖\",\"⠦\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\"]},\"dots8\":{\"interval\":80,\"frames\":[\"⠁\",\"⠁\",\"⠉\",\"⠙\",\"⠚\",\"⠒\",\"⠂\",\"⠂\",\"⠒\",\"⠲\",\"⠴\",\"⠤\",\"⠄\",\"⠄\",\"⠤\",\"⠠\",\"⠠\",\"⠤\",\"⠦\",\"⠖\",\"⠒\",\"⠐\",\"⠐\",\"⠒\",\"⠓\",\"⠋\",\"⠉\",\"⠈\",\"⠈\"]},\"dots9\":{\"interval\":80,\"frames\":[\"⢹\",\"⢺\",\"⢼\",\"⣸\",\"⣇\",\"⡧\",\"⡗\",\"⡏\"]},\"dots10\":{\"interval\":80,\"frames\":[\"⢄\",\"⢂\",\"⢁\",\"⡁\",\"⡈\",\"⡐\",\"⡠\"]},\"dots11\":{\"interval\":100,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⡀\",\"⢀\",\"⠠\",\"⠐\",\"⠈\"]},\"dots12\":{\"interval\":80,\"frames\":[\"⢀⠀\",\"⡀⠀\",\"⠄⠀\",\"⢂⠀\",\"⡂⠀\",\"⠅⠀\",\"⢃⠀\",\"⡃⠀\",\"⠍⠀\",\"⢋⠀\",\"⡋⠀\",\"⠍⠁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⢈⠩\",\"⡀⢙\",\"⠄⡙\",\"⢂⠩\",\"⡂⢘\",\"⠅⡘\",\"⢃⠨\",\"⡃⢐\",\"⠍⡐\",\"⢋⠠\",\"⡋⢀\",\"⠍⡁\",\"⢋⠁\",\"⡋⠁\",\"⠍⠉\",\"⠋⠉\",\"⠋⠉\",\"⠉⠙\",\"⠉⠙\",\"⠉⠩\",\"⠈⢙\",\"⠈⡙\",\"⠈⠩\",\"⠀⢙\",\"⠀⡙\",\"⠀⠩\",\"⠀⢘\",\"⠀⡘\",\"⠀⠨\",\"⠀⢐\",\"⠀⡐\",\"⠀⠠\",\"⠀⢀\",\"⠀⡀\"]},\"line\":{\"interval\":130,\"frames\":[\"-\",\"\\\\\",\"|\",\"/\"]},\"line2\":{\"interval\":100,\"frames\":[\"⠂\",\"-\",\"–\",\"—\",\"–\",\"-\"]},\"pipe\":{\"interval\":100,\"frames\":[\"┤\",\"┘\",\"┴\",\"└\",\"├\",\"┌\",\"┬\",\"┐\"]},\"simpleDots\":{\"interval\":400,\"frames\":[\". \",\".. \",\"...\",\" \"]},\"simpleDotsScrolling\":{\"interval\":200,\"frames\":[\". \",\".. \",\"...\",\" ..\",\" .\",\" \"]},\"star\":{\"interval\":70,\"frames\":[\"✶\",\"✸\",\"✹\",\"✺\",\"✹\",\"✷\"]},\"star2\":{\"interval\":80,\"frames\":[\"+\",\"x\",\"*\"]},\"flip\":{\"interval\":70,\"frames\":[\"_\",\"_\",\"_\",\"-\",\"`\",\"`\",\"'\",\"´\",\"-\",\"_\",\"_\",\"_\"]},\"hamburger\":{\"interval\":100,\"frames\":[\"☱\",\"☲\",\"☴\"]},\"growVertical\":{\"interval\":120,\"frames\":[\"▁\",\"▃\",\"▄\",\"▅\",\"▆\",\"▇\",\"▆\",\"▅\",\"▄\",\"▃\"]},\"growHorizontal\":{\"interval\":120,\"frames\":[\"▏\",\"▎\",\"▍\",\"▌\",\"▋\",\"▊\",\"▉\",\"▊\",\"▋\",\"▌\",\"▍\",\"▎\"]},\"balloon\":{\"interval\":140,\"frames\":[\" \",\".\",\"o\",\"O\",\"@\",\"*\",\" \"]},\"balloon2\":{\"interval\":120,\"frames\":[\".\",\"o\",\"O\",\"°\",\"O\",\"o\",\".\"]},\"noise\":{\"interval\":100,\"frames\":[\"▓\",\"▒\",\"░\"]},\"bounce\":{\"interval\":120,\"frames\":[\"⠁\",\"⠂\",\"⠄\",\"⠂\"]},\"boxBounce\":{\"interval\":120,\"frames\":[\"▖\",\"▘\",\"▝\",\"▗\"]},\"boxBounce2\":{\"interval\":100,\"frames\":[\"▌\",\"▀\",\"▐\",\"▄\"]},\"triangle\":{\"interval\":50,\"frames\":[\"◢\",\"◣\",\"◤\",\"◥\"]},\"arc\":{\"interval\":100,\"frames\":[\"◜\",\"◠\",\"◝\",\"◞\",\"◡\",\"◟\"]},\"circle\":{\"interval\":120,\"frames\":[\"◡\",\"⊙\",\"◠\"]},\"squareCorners\":{\"interval\":180,\"frames\":[\"◰\",\"◳\",\"◲\",\"◱\"]},\"circleQuarters\":{\"interval\":120,\"frames\":[\"◴\",\"◷\",\"◶\",\"◵\"]},\"circleHalves\":{\"interval\":50,\"frames\":[\"◐\",\"◓\",\"◑\",\"◒\"]},\"squish\":{\"interval\":100,\"frames\":[\"╫\",\"╪\"]},\"toggle\":{\"interval\":250,\"frames\":[\"⊶\",\"⊷\"]},\"toggle2\":{\"interval\":80,\"frames\":[\"▫\",\"▪\"]},\"toggle3\":{\"interval\":120,\"frames\":[\"□\",\"■\"]},\"toggle4\":{\"interval\":100,\"frames\":[\"■\",\"□\",\"▪\",\"▫\"]},\"toggle5\":{\"interval\":100,\"frames\":[\"▮\",\"▯\"]},\"toggle6\":{\"interval\":300,\"frames\":[\"ဝ\",\"၀\"]},\"toggle7\":{\"interval\":80,\"frames\":[\"⦾\",\"⦿\"]},\"toggle8\":{\"interval\":100,\"frames\":[\"◍\",\"◌\"]},\"toggle9\":{\"interval\":100,\"frames\":[\"◉\",\"◎\"]},\"toggle10\":{\"interval\":100,\"frames\":[\"㊂\",\"㊀\",\"㊁\"]},\"toggle11\":{\"interval\":50,\"frames\":[\"⧇\",\"⧆\"]},\"toggle12\":{\"interval\":120,\"frames\":[\"☗\",\"☖\"]},\"toggle13\":{\"interval\":80,\"frames\":[\"=\",\"*\",\"-\"]},\"arrow\":{\"interval\":100,\"frames\":[\"←\",\"↖\",\"↑\",\"↗\",\"→\",\"↘\",\"↓\",\"↙\"]},\"arrow2\":{\"interval\":80,\"frames\":[\"⬆️ \",\"↗️ \",\"➡️ \",\"↘️ \",\"⬇️ \",\"↙️ \",\"⬅️ \",\"↖️ \"]},\"arrow3\":{\"interval\":120,\"frames\":[\"▹▹▹▹▹\",\"▸▹▹▹▹\",\"▹▸▹▹▹\",\"▹▹▸▹▹\",\"▹▹▹▸▹\",\"▹▹▹▹▸\"]},\"bouncingBar\":{\"interval\":80,\"frames\":[\"[ ]\",\"[= ]\",\"[== ]\",\"[=== ]\",\"[ ===]\",\"[ ==]\",\"[ =]\",\"[ ]\",\"[ =]\",\"[ ==]\",\"[ ===]\",\"[====]\",\"[=== ]\",\"[== ]\",\"[= ]\"]},\"bouncingBall\":{\"interval\":80,\"frames\":[\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ●)\",\"( ● )\",\"( ● )\",\"( ● )\",\"( ● )\",\"(● )\"]},\"smiley\":{\"interval\":200,\"frames\":[\"😄 \",\"😝 \"]},\"monkey\":{\"interval\":300,\"frames\":[\"🙈 \",\"🙈 \",\"🙉 \",\"🙊 \"]},\"hearts\":{\"interval\":100,\"frames\":[\"💛 \",\"💙 \",\"💜 \",\"💚 \",\"❤️ \"]},\"clock\":{\"interval\":100,\"frames\":[\"🕐 \",\"🕑 \",\"🕒 \",\"🕓 \",\"🕔 \",\"🕕 \",\"🕖 \",\"🕗 \",\"🕘 \",\"🕙 \",\"🕚 \"]},\"earth\":{\"interval\":180,\"frames\":[\"🌍 \",\"🌎 \",\"🌏 \"]},\"moon\":{\"interval\":80,\"frames\":[\"🌑 \",\"🌒 \",\"🌓 \",\"🌔 \",\"🌕 \",\"🌖 \",\"🌗 \",\"🌘 \"]},\"runner\":{\"interval\":140,\"frames\":[\"🚶 \",\"🏃 \"]},\"pong\":{\"interval\":80,\"frames\":[\"▐⠂ ▌\",\"▐⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂▌\",\"▐ ⠠▌\",\"▐ ⡀▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐ ⠠ ▌\",\"▐ ⠂ ▌\",\"▐ ⠈ ▌\",\"▐ ⠂ ▌\",\"▐ ⠠ ▌\",\"▐ ⡀ ▌\",\"▐⠠ ▌\"]},\"shark\":{\"interval\":120,\"frames\":[\"▐|\\\\____________▌\",\"▐_|\\\\___________▌\",\"▐__|\\\\__________▌\",\"▐___|\\\\_________▌\",\"▐____|\\\\________▌\",\"▐_____|\\\\_______▌\",\"▐______|\\\\______▌\",\"▐_______|\\\\_____▌\",\"▐________|\\\\____▌\",\"▐_________|\\\\___▌\",\"▐__________|\\\\__▌\",\"▐___________|\\\\_▌\",\"▐____________|\\\\▌\",\"▐____________/|▌\",\"▐___________/|_▌\",\"▐__________/|__▌\",\"▐_________/|___▌\",\"▐________/|____▌\",\"▐_______/|_____▌\",\"▐______/|______▌\",\"▐_____/|_______▌\",\"▐____/|________▌\",\"▐___/|_________▌\",\"▐__/|__________▌\",\"▐_/|___________▌\",\"▐/|____________▌\"]},\"dqpb\":{\"interval\":100,\"frames\":[\"d\",\"q\",\"p\",\"b\"]},\"weather\":{\"interval\":100,\"frames\":[\"☀️ \",\"☀️ \",\"☀️ \",\"🌤 \",\"⛅️ \",\"🌥 \",\"☁️ \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"🌧 \",\"🌨 \",\"⛈ \",\"🌨 \",\"🌧 \",\"🌨 \",\"☁️ \",\"🌥 \",\"⛅️ \",\"🌤 \",\"☀️ \",\"☀️ \"]},\"christmas\":{\"interval\":400,\"frames\":[\"🌲\",\"🎄\"]}}");
/***/ }),
-/* 393 */
+/* 391 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const chalk = __webpack_require__(394);
+const chalk = __webpack_require__(392);
const isSupported = process.platform !== 'win32' || process.env.CI || process.env.TERM === 'xterm-256color';
@@ -50505,16 +50360,16 @@ module.exports = isSupported ? main : fallbacks;
/***/ }),
-/* 394 */
+/* 392 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const escapeStringRegexp = __webpack_require__(178);
-const ansiStyles = __webpack_require__(395);
+const ansiStyles = __webpack_require__(393);
const stdoutColor = __webpack_require__(184).stdout;
-const template = __webpack_require__(396);
+const template = __webpack_require__(394);
const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
@@ -50740,7 +50595,7 @@ module.exports.default = module.exports; // For TypeScript
/***/ }),
-/* 395 */
+/* 393 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -50913,7 +50768,7 @@ Object.defineProperty(module, 'exports', {
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(114)(module)))
/***/ }),
-/* 396 */
+/* 394 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -51048,7 +50903,7 @@ module.exports = (chalk, tmp) => {
/***/ }),
-/* 397 */
+/* 395 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -51109,7 +50964,7 @@ const RunCommand = {
};
/***/ }),
-/* 398 */
+/* 396 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -51119,7 +50974,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143);
/* harmony import */ var _utils_parallelize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(144);
/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(145);
-/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(399);
+/* harmony import */ var _utils_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(397);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -51204,14 +51059,14 @@ const WatchCommand = {
};
/***/ }),
-/* 399 */
+/* 397 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "waitUntilWatchIsReady", function() { return waitUntilWatchIsReady; });
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
-/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(400);
+/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(398);
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
@@ -51278,141 +51133,141 @@ function waitUntilWatchIsReady(stream, opts = {}) {
}
/***/ }),
-/* 400 */
+/* 398 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(401);
+/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(399);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
-/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(402);
+/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(400);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
-/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(403);
+/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(401);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
-/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(404);
+/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(402);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
-/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(405);
+/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(403);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
-/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(406);
+/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(404);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
-/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(407);
+/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(405);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
-/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(408);
+/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(406);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
-/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(409);
+/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(407);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
-/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(410);
+/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(408);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
-/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(411);
+/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(409);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
-/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(412);
+/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(410);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
-/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(413);
+/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(411);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
-/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(414);
+/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(412);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
-/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(415);
+/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(413);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
-/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(416);
+/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(414);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
-/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(417);
+/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(415);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
-/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(418);
+/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(416);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
-/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(420);
+/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(418);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
-/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(421);
+/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(419);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
-/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(422);
+/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(420);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
-/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(423);
+/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(421);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
-/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(424);
+/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(422);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
-/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(425);
+/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(423);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
-/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(428);
+/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(426);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
-/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(429);
+/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(427);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
-/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(430);
+/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(428);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
-/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(431);
+/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(429);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
-/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(432);
+/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(430);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(104);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
-/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(433);
+/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(431);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
-/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(434);
+/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(432);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
-/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(435);
+/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(433);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
-/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(436);
+/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(434);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(31);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
-/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(437);
+/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(435);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
-/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(438);
+/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(436);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
-/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(439);
+/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(437);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(66);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
-/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(441);
+/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(439);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
-/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(442);
+/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(440);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
-/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(443);
+/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(441);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
-/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(446);
+/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(444);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(81);
@@ -51423,175 +51278,175 @@ __webpack_require__.r(__webpack_exports__);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
-/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(447);
+/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(445);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
-/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(448);
+/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(446);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
-/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(449);
+/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(447);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
-/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(450);
+/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(448);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(41);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
-/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(451);
+/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(449);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
-/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(452);
+/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(450);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
-/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(453);
+/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(451);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
-/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(454);
+/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(452);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
-/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(455);
+/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(453);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
-/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(456);
+/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(454);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
-/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(457);
+/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(455);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
-/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(458);
+/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(456);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
-/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(459);
+/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(457);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
-/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(444);
+/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(442);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
-/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(460);
+/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(458);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
-/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(461);
+/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(459);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
-/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(462);
+/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(460);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
-/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(463);
+/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(461);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(30);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
-/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(464);
+/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(462);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
-/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(465);
+/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(463);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
-/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(445);
+/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(443);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
-/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(466);
+/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(464);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
-/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(467);
+/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(465);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
-/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(468);
+/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(466);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
-/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(469);
+/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(467);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
-/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(470);
+/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(468);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
-/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(471);
+/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(469);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
-/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(472);
+/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(470);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
-/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(473);
+/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(471);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
-/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(474);
+/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(472);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
-/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(475);
+/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(473);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
-/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(477);
+/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(475);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
-/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(478);
+/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(476);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
-/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(479);
+/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(477);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
-/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(427);
+/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(425);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
-/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(440);
+/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(438);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
-/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(480);
+/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(478);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
-/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(481);
+/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(479);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
-/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(482);
+/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(480);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
-/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(483);
+/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(481);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
-/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(484);
+/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(482);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
-/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(426);
+/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(424);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
-/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(485);
+/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(483);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
-/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(486);
+/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(484);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
-/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(487);
+/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(485);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
-/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(488);
+/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(486);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
-/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(489);
+/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(487);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
-/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(490);
+/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(488);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
-/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(491);
+/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(489);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
-/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(492);
+/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(490);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
-/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(493);
+/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(491);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
-/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(494);
+/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(492);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
-/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(495);
+/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(493);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
-/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(496);
+/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(494);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
-/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(497);
+/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(495);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
/** PURE_IMPORTS_START PURE_IMPORTS_END */
@@ -51703,7 +51558,7 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
-/* 401 */
+/* 399 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -51784,14 +51639,14 @@ var AuditSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 402 */
+/* 400 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55);
-/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(401);
+/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(399);
/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(107);
/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
@@ -51807,7 +51662,7 @@ function auditTime(duration, scheduler) {
/***/ }),
-/* 403 */
+/* 401 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -51856,7 +51711,7 @@ var BufferSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 404 */
+/* 402 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -51957,7 +51812,7 @@ var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 405 */
+/* 403 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52118,7 +51973,7 @@ function dispatchBufferClose(arg) {
/***/ }),
-/* 406 */
+/* 404 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52238,7 +52093,7 @@ var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 407 */
+/* 405 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52333,7 +52188,7 @@ var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 408 */
+/* 406 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52397,7 +52252,7 @@ var CatchSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 409 */
+/* 407 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52413,7 +52268,7 @@ function combineAll(project) {
/***/ }),
-/* 410 */
+/* 408 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52445,7 +52300,7 @@ function combineLatest() {
/***/ }),
-/* 411 */
+/* 409 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52465,7 +52320,7 @@ function concat() {
/***/ }),
-/* 412 */
+/* 410 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52481,13 +52336,13 @@ function concatMap(project, resultSelector) {
/***/ }),
-/* 413 */
+/* 411 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
-/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(412);
+/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(410);
/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
function concatMapTo(innerObservable, resultSelector) {
@@ -52497,7 +52352,7 @@ function concatMapTo(innerObservable, resultSelector) {
/***/ }),
-/* 414 */
+/* 412 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52562,7 +52417,7 @@ var CountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 415 */
+/* 413 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52650,7 +52505,7 @@ var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 416 */
+/* 414 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52726,7 +52581,7 @@ function dispatchNext(subscriber) {
/***/ }),
-/* 417 */
+/* 415 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52776,7 +52631,7 @@ var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 418 */
+/* 416 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52784,7 +52639,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55);
-/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(419);
+/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(417);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(42);
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
@@ -52883,7 +52738,7 @@ var DelayMessage = /*@__PURE__*/ (function () {
/***/ }),
-/* 419 */
+/* 417 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -52897,7 +52752,7 @@ function isDate(value) {
/***/ }),
-/* 420 */
+/* 418 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53043,7 +52898,7 @@ var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 421 */
+/* 419 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53081,7 +52936,7 @@ var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 422 */
+/* 420 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53159,7 +53014,7 @@ var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 423 */
+/* 421 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53230,13 +53085,13 @@ var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 424 */
+/* 422 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
-/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(423);
+/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(421);
/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
function distinctUntilKeyChanged(key, compare) {
@@ -53246,7 +53101,7 @@ function distinctUntilKeyChanged(key, compare) {
/***/ }),
-/* 425 */
+/* 423 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53254,9 +53109,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(62);
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(104);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(426);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(417);
-/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(427);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(424);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(415);
+/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(425);
/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
@@ -53278,7 +53133,7 @@ function elementAt(index, defaultValue) {
/***/ }),
-/* 426 */
+/* 424 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53344,7 +53199,7 @@ function defaultErrorFactory() {
/***/ }),
-/* 427 */
+/* 425 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53406,7 +53261,7 @@ var TakeSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 428 */
+/* 426 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53428,7 +53283,7 @@ function endWith() {
/***/ }),
-/* 429 */
+/* 427 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53490,7 +53345,7 @@ var EverySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 430 */
+/* 428 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53547,7 +53402,7 @@ var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 431 */
+/* 429 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53647,7 +53502,7 @@ var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 432 */
+/* 430 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53766,7 +53621,7 @@ var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 433 */
+/* 431 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53804,7 +53659,7 @@ var FinallySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 434 */
+/* 432 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53876,13 +53731,13 @@ var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 435 */
+/* 433 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
-/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(434);
+/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(432);
/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
function findIndex(predicate, thisArg) {
@@ -53892,7 +53747,7 @@ function findIndex(predicate, thisArg) {
/***/ }),
-/* 436 */
+/* 434 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53900,9 +53755,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63);
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(104);
-/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(427);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(417);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(426);
+/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(425);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(415);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(424);
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25);
/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
@@ -53919,7 +53774,7 @@ function first(predicate, defaultValue) {
/***/ }),
-/* 437 */
+/* 435 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -53956,7 +53811,7 @@ var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 438 */
+/* 436 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54000,7 +53855,7 @@ var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 439 */
+/* 437 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54008,9 +53863,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63);
/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(104);
-/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(440);
-/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(426);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(417);
+/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(438);
+/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(424);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(415);
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25);
/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
@@ -54027,7 +53882,7 @@ function last(predicate, defaultValue) {
/***/ }),
-/* 440 */
+/* 438 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54104,7 +53959,7 @@ var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 441 */
+/* 439 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54143,7 +53998,7 @@ var MapToSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 442 */
+/* 440 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54193,13 +54048,13 @@ var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 443 */
+/* 441 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
-/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(444);
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(442);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function max(comparer) {
@@ -54212,15 +54067,15 @@ function max(comparer) {
/***/ }),
-/* 444 */
+/* 442 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
-/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(445);
-/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(440);
-/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(417);
+/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(443);
+/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(438);
+/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(415);
/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24);
/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
@@ -54241,7 +54096,7 @@ function reduce(accumulator, seed) {
/***/ }),
-/* 445 */
+/* 443 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54323,7 +54178,7 @@ var ScanSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 446 */
+/* 444 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54343,7 +54198,7 @@ function merge() {
/***/ }),
-/* 447 */
+/* 445 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54368,7 +54223,7 @@ function mergeMapTo(innerObservable, resultSelector, concurrent) {
/***/ }),
-/* 448 */
+/* 446 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54483,13 +54338,13 @@ var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 449 */
+/* 447 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
-/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(444);
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(442);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function min(comparer) {
@@ -54502,7 +54357,7 @@ function min(comparer) {
/***/ }),
-/* 450 */
+/* 448 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54551,7 +54406,7 @@ var MulticastOperator = /*@__PURE__*/ (function () {
/***/ }),
-/* 451 */
+/* 449 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54645,7 +54500,7 @@ var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 452 */
+/* 450 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54693,7 +54548,7 @@ var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 453 */
+/* 451 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54716,7 +54571,7 @@ function partition(predicate, thisArg) {
/***/ }),
-/* 454 */
+/* 452 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54756,14 +54611,14 @@ function plucker(props, length) {
/***/ }),
-/* 455 */
+/* 453 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(450);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(448);
/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
@@ -54776,14 +54631,14 @@ function publish(selector) {
/***/ }),
-/* 456 */
+/* 454 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(450);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(448);
/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
@@ -54794,14 +54649,14 @@ function publishBehavior(value) {
/***/ }),
-/* 457 */
+/* 455 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(450);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(448);
/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
@@ -54812,14 +54667,14 @@ function publishLast() {
/***/ }),
-/* 458 */
+/* 456 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(33);
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(450);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(448);
/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
@@ -54835,7 +54690,7 @@ function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
/***/ }),
-/* 459 */
+/* 457 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54862,7 +54717,7 @@ function race() {
/***/ }),
-/* 460 */
+/* 458 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -54927,7 +54782,7 @@ var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 461 */
+/* 459 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55023,7 +54878,7 @@ var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 462 */
+/* 460 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55076,7 +54931,7 @@ var RetrySubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 463 */
+/* 461 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55164,7 +55019,7 @@ var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 464 */
+/* 462 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55221,7 +55076,7 @@ var SampleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 465 */
+/* 463 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55281,7 +55136,7 @@ function dispatchNotification(state) {
/***/ }),
-/* 466 */
+/* 464 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55404,13 +55259,13 @@ var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 467 */
+/* 465 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
-/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(450);
+/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(448);
/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27);
/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
@@ -55427,7 +55282,7 @@ function share() {
/***/ }),
-/* 468 */
+/* 466 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55492,7 +55347,7 @@ function shareReplayOperator(_a) {
/***/ }),
-/* 469 */
+/* 467 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55572,7 +55427,7 @@ var SingleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 470 */
+/* 468 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55614,7 +55469,7 @@ var SkipSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 471 */
+/* 469 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55676,7 +55531,7 @@ var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 472 */
+/* 470 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55737,7 +55592,7 @@ var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 473 */
+/* 471 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55793,7 +55648,7 @@ var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 474 */
+/* 472 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55822,13 +55677,13 @@ function startWith() {
/***/ }),
-/* 475 */
+/* 473 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
-/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(476);
+/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(474);
/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
function subscribeOn(scheduler, delay) {
@@ -55853,7 +55708,7 @@ var SubscribeOnOperator = /*@__PURE__*/ (function () {
/***/ }),
-/* 476 */
+/* 474 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -55917,13 +55772,13 @@ var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 477 */
+/* 475 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
-/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(478);
+/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(476);
/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25);
/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
@@ -55935,7 +55790,7 @@ function switchAll() {
/***/ }),
-/* 478 */
+/* 476 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56029,13 +55884,13 @@ var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 479 */
+/* 477 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
-/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(478);
+/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(476);
/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
function switchMapTo(innerObservable, resultSelector) {
@@ -56045,7 +55900,7 @@ function switchMapTo(innerObservable, resultSelector) {
/***/ }),
-/* 480 */
+/* 478 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56095,7 +55950,7 @@ var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 481 */
+/* 479 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56163,7 +56018,7 @@ var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 482 */
+/* 480 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56251,7 +56106,7 @@ var TapSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 483 */
+/* 481 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56355,7 +56210,7 @@ var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 484 */
+/* 482 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56364,7 +56219,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55);
-/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(483);
+/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(481);
/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
@@ -56453,7 +56308,7 @@ function dispatchNext(arg) {
/***/ }),
-/* 485 */
+/* 483 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56461,7 +56316,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55);
-/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(445);
+/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(443);
/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90);
/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66);
/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
@@ -56497,7 +56352,7 @@ var TimeInterval = /*@__PURE__*/ (function () {
/***/ }),
-/* 486 */
+/* 484 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56505,7 +56360,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55);
/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64);
-/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(487);
+/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(485);
/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49);
/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
@@ -56522,7 +56377,7 @@ function timeout(due, scheduler) {
/***/ }),
-/* 487 */
+/* 485 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56530,7 +56385,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55);
-/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(419);
+/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(417);
/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(69);
/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70);
/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
@@ -56604,7 +56459,7 @@ var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 488 */
+/* 486 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56634,13 +56489,13 @@ var Timestamp = /*@__PURE__*/ (function () {
/***/ }),
-/* 489 */
+/* 487 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
-/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(444);
+/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(442);
/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
function toArrayReducer(arr, item, index) {
@@ -56657,7 +56512,7 @@ function toArray() {
/***/ }),
-/* 490 */
+/* 488 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56737,7 +56592,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 491 */
+/* 489 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56827,7 +56682,7 @@ var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 492 */
+/* 490 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -56997,7 +56852,7 @@ function dispatchWindowClose(state) {
/***/ }),
-/* 493 */
+/* 491 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -57140,7 +56995,7 @@ var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 494 */
+/* 492 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -57237,7 +57092,7 @@ var WindowSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 495 */
+/* 493 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -57332,7 +57187,7 @@ var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
/***/ }),
-/* 496 */
+/* 494 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -57354,7 +57209,7 @@ function zip() {
/***/ }),
-/* 497 */
+/* 495 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -57370,7 +57225,7 @@ function zipAll(project) {
/***/ }),
-/* 498 */
+/* 496 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -57379,8 +57234,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(162);
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143);
/* harmony import */ var _utils_projects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(145);
-/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(499);
-/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(500);
+/* harmony import */ var _utils_projects_tree__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(497);
+/* harmony import */ var _utils_kibana__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(498);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -57462,13 +57317,13 @@ function toArray(value) {
}
/***/ }),
-/* 499 */
+/* 497 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderProjectsTree", function() { return renderProjectsTree; });
-/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(235);
+/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(227);
/* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(chalk__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
@@ -57615,7 +57470,7 @@ function addProjectToTree(tree, pathParts, project) {
}
/***/ }),
-/* 500 */
+/* 498 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -57623,12 +57478,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Kibana", function() { return Kibana; });
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(501);
+/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(499);
/* harmony import */ var multimatch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(multimatch__WEBPACK_IMPORTED_MODULE_1__);
-/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(377);
+/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(369);
/* harmony import */ var is_path_inside__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(is_path_inside__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _projects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(145);
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(288);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(280);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -57769,15 +57624,15 @@ class Kibana {
}
/***/ }),
-/* 501 */
+/* 499 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const minimatch = __webpack_require__(149);
-const arrayUnion = __webpack_require__(502);
-const arrayDiffer = __webpack_require__(503);
-const arrify = __webpack_require__(504);
+const arrayUnion = __webpack_require__(500);
+const arrayDiffer = __webpack_require__(501);
+const arrify = __webpack_require__(502);
module.exports = (list, patterns, options = {}) => {
list = arrify(list);
@@ -57801,7 +57656,7 @@ module.exports = (list, patterns, options = {}) => {
/***/ }),
-/* 502 */
+/* 500 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57813,7 +57668,7 @@ module.exports = (...arguments_) => {
/***/ }),
-/* 503 */
+/* 501 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57828,7 +57683,7 @@ module.exports = arrayDiffer;
/***/ }),
-/* 504 */
+/* 502 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57858,12 +57713,12 @@ module.exports = arrify;
/***/ }),
-/* 505 */
+/* 503 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
-/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(506);
+/* harmony import */ var _build_production_projects__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(504);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return _build_production_projects__WEBPACK_IMPORTED_MODULE_0__["buildProductionProjects"]; });
/*
@@ -57887,19 +57742,19 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
-/* 506 */
+/* 504 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buildProductionProjects", function() { return buildProductionProjects; });
-/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(507);
+/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(505);
/* harmony import */ var cpy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cpy__WEBPACK_IMPORTED_MODULE_0__);
-/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(296);
+/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(288);
/* harmony import */ var del__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(del__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_2__);
-/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(288);
+/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(280);
/* harmony import */ var _utils_fs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(130);
/* harmony import */ var _utils_log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(143);
/* harmony import */ var _utils_package_json__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(164);
@@ -58035,7 +57890,7 @@ async function copyToBuild(project, kibanaRoot, buildRoot) {
}
/***/ }),
-/* 507 */
+/* 505 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58043,13 +57898,13 @@ async function copyToBuild(project, kibanaRoot, buildRoot) {
const EventEmitter = __webpack_require__(155);
const path = __webpack_require__(4);
const os = __webpack_require__(120);
-const pAll = __webpack_require__(508);
-const arrify = __webpack_require__(510);
-const globby = __webpack_require__(511);
-const isGlob = __webpack_require__(721);
-const cpFile = __webpack_require__(722);
-const junk = __webpack_require__(734);
-const CpyError = __webpack_require__(735);
+const pAll = __webpack_require__(506);
+const arrify = __webpack_require__(508);
+const globby = __webpack_require__(509);
+const isGlob = __webpack_require__(719);
+const cpFile = __webpack_require__(720);
+const junk = __webpack_require__(732);
+const CpyError = __webpack_require__(733);
const defaultOptions = {
ignoreJunk: true
@@ -58168,12 +58023,12 @@ module.exports = (source, destination, {
/***/ }),
-/* 508 */
+/* 506 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const pMap = __webpack_require__(509);
+const pMap = __webpack_require__(507);
module.exports = (iterable, options) => pMap(iterable, element => element(), options);
// TODO: Remove this for the next major release
@@ -58181,7 +58036,7 @@ module.exports.default = module.exports;
/***/ }),
-/* 509 */
+/* 507 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58260,7 +58115,7 @@ module.exports.default = pMap;
/***/ }),
-/* 510 */
+/* 508 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58290,17 +58145,17 @@ module.exports = arrify;
/***/ }),
-/* 511 */
+/* 509 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(133);
-const arrayUnion = __webpack_require__(512);
+const arrayUnion = __webpack_require__(510);
const glob = __webpack_require__(146);
-const fastGlob = __webpack_require__(514);
-const dirGlob = __webpack_require__(714);
-const gitignore = __webpack_require__(717);
+const fastGlob = __webpack_require__(512);
+const dirGlob = __webpack_require__(712);
+const gitignore = __webpack_require__(715);
const DEFAULT_FILTER = () => false;
@@ -58445,12 +58300,12 @@ module.exports.gitignore = gitignore;
/***/ }),
-/* 512 */
+/* 510 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var arrayUniq = __webpack_require__(513);
+var arrayUniq = __webpack_require__(511);
module.exports = function () {
return arrayUniq([].concat.apply([], arguments));
@@ -58458,7 +58313,7 @@ module.exports = function () {
/***/ }),
-/* 513 */
+/* 511 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58527,10 +58382,10 @@ if ('Set' in global) {
/***/ }),
-/* 514 */
+/* 512 */
/***/ (function(module, exports, __webpack_require__) {
-const pkg = __webpack_require__(515);
+const pkg = __webpack_require__(513);
module.exports = pkg.async;
module.exports.default = pkg.async;
@@ -58543,19 +58398,19 @@ module.exports.generateTasks = pkg.generateTasks;
/***/ }),
-/* 515 */
+/* 513 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var optionsManager = __webpack_require__(516);
-var taskManager = __webpack_require__(517);
-var reader_async_1 = __webpack_require__(685);
-var reader_stream_1 = __webpack_require__(709);
-var reader_sync_1 = __webpack_require__(710);
-var arrayUtils = __webpack_require__(712);
-var streamUtils = __webpack_require__(713);
+var optionsManager = __webpack_require__(514);
+var taskManager = __webpack_require__(515);
+var reader_async_1 = __webpack_require__(683);
+var reader_stream_1 = __webpack_require__(707);
+var reader_sync_1 = __webpack_require__(708);
+var arrayUtils = __webpack_require__(710);
+var streamUtils = __webpack_require__(711);
/**
* Synchronous API.
*/
@@ -58621,7 +58476,7 @@ function isString(source) {
/***/ }),
-/* 516 */
+/* 514 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58659,13 +58514,13 @@ exports.prepare = prepare;
/***/ }),
-/* 517 */
+/* 515 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var patternUtils = __webpack_require__(518);
+var patternUtils = __webpack_require__(516);
/**
* Generate tasks based on parent directory of each pattern.
*/
@@ -58756,16 +58611,16 @@ exports.convertPatternGroupToTask = convertPatternGroupToTask;
/***/ }),
-/* 518 */
+/* 516 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var path = __webpack_require__(4);
-var globParent = __webpack_require__(519);
-var isGlob = __webpack_require__(522);
-var micromatch = __webpack_require__(523);
+var globParent = __webpack_require__(517);
+var isGlob = __webpack_require__(520);
+var micromatch = __webpack_require__(521);
var GLOBSTAR = '**';
/**
* Return true for static pattern.
@@ -58911,15 +58766,15 @@ exports.matchAny = matchAny;
/***/ }),
-/* 519 */
+/* 517 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var path = __webpack_require__(4);
-var isglob = __webpack_require__(520);
-var pathDirname = __webpack_require__(521);
+var isglob = __webpack_require__(518);
+var pathDirname = __webpack_require__(519);
var isWin32 = __webpack_require__(120).platform() === 'win32';
module.exports = function globParent(str) {
@@ -58942,7 +58797,7 @@ module.exports = function globParent(str) {
/***/ }),
-/* 520 */
+/* 518 */
/***/ (function(module, exports, __webpack_require__) {
/*!
@@ -58952,7 +58807,7 @@ module.exports = function globParent(str) {
* Licensed under the MIT License.
*/
-var isExtglob = __webpack_require__(310);
+var isExtglob = __webpack_require__(302);
module.exports = function isGlob(str) {
if (typeof str !== 'string' || str === '') {
@@ -58973,7 +58828,7 @@ module.exports = function isGlob(str) {
/***/ }),
-/* 521 */
+/* 519 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59123,7 +58978,7 @@ module.exports.win32 = win32;
/***/ }),
-/* 522 */
+/* 520 */
/***/ (function(module, exports, __webpack_require__) {
/*!
@@ -59133,7 +58988,7 @@ module.exports.win32 = win32;
* Released under the MIT License.
*/
-var isExtglob = __webpack_require__(310);
+var isExtglob = __webpack_require__(302);
var chars = { '{': '}', '(': ')', '[': ']'};
module.exports = function isGlob(str, options) {
@@ -59175,7 +59030,7 @@ module.exports = function isGlob(str, options) {
/***/ }),
-/* 523 */
+/* 521 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59186,18 +59041,18 @@ module.exports = function isGlob(str, options) {
*/
var util = __webpack_require__(111);
-var braces = __webpack_require__(524);
-var toRegex = __webpack_require__(637);
-var extend = __webpack_require__(645);
+var braces = __webpack_require__(522);
+var toRegex = __webpack_require__(635);
+var extend = __webpack_require__(643);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(648);
-var parsers = __webpack_require__(681);
-var cache = __webpack_require__(682);
-var utils = __webpack_require__(683);
+var compilers = __webpack_require__(646);
+var parsers = __webpack_require__(679);
+var cache = __webpack_require__(680);
+var utils = __webpack_require__(681);
var MAX_LENGTH = 1024 * 64;
/**
@@ -60059,7 +59914,7 @@ module.exports = micromatch;
/***/ }),
-/* 524 */
+/* 522 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60069,18 +59924,18 @@ module.exports = micromatch;
* Module dependencies
*/
-var toRegex = __webpack_require__(525);
-var unique = __webpack_require__(539);
-var extend = __webpack_require__(534);
+var toRegex = __webpack_require__(523);
+var unique = __webpack_require__(537);
+var extend = __webpack_require__(532);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(540);
-var parsers = __webpack_require__(557);
-var Braces = __webpack_require__(567);
-var utils = __webpack_require__(541);
+var compilers = __webpack_require__(538);
+var parsers = __webpack_require__(555);
+var Braces = __webpack_require__(565);
+var utils = __webpack_require__(539);
var MAX_LENGTH = 1024 * 64;
var cache = {};
@@ -60384,15 +60239,15 @@ module.exports = braces;
/***/ }),
-/* 525 */
+/* 523 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var define = __webpack_require__(526);
-var extend = __webpack_require__(534);
-var not = __webpack_require__(536);
+var define = __webpack_require__(524);
+var extend = __webpack_require__(532);
+var not = __webpack_require__(534);
var MAX_LENGTH = 1024 * 64;
/**
@@ -60539,7 +60394,7 @@ module.exports.makeRe = makeRe;
/***/ }),
-/* 526 */
+/* 524 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60552,7 +60407,7 @@ module.exports.makeRe = makeRe;
-var isDescriptor = __webpack_require__(527);
+var isDescriptor = __webpack_require__(525);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -60577,7 +60432,7 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 527 */
+/* 525 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60590,9 +60445,9 @@ module.exports = function defineProperty(obj, prop, val) {
-var typeOf = __webpack_require__(528);
-var isAccessor = __webpack_require__(529);
-var isData = __webpack_require__(532);
+var typeOf = __webpack_require__(526);
+var isAccessor = __webpack_require__(527);
+var isData = __webpack_require__(530);
module.exports = function isDescriptor(obj, key) {
if (typeOf(obj) !== 'object') {
@@ -60606,7 +60461,7 @@ module.exports = function isDescriptor(obj, key) {
/***/ }),
-/* 528 */
+/* 526 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -60759,7 +60614,7 @@ function isBuffer(val) {
/***/ }),
-/* 529 */
+/* 527 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60772,7 +60627,7 @@ function isBuffer(val) {
-var typeOf = __webpack_require__(530);
+var typeOf = __webpack_require__(528);
// accessor descriptor properties
var accessor = {
@@ -60835,10 +60690,10 @@ module.exports = isAccessorDescriptor;
/***/ }),
-/* 530 */
+/* 528 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(531);
+var isBuffer = __webpack_require__(529);
var toString = Object.prototype.toString;
/**
@@ -60957,7 +60812,7 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 531 */
+/* 529 */
/***/ (function(module, exports) {
/*!
@@ -60984,7 +60839,7 @@ function isSlowBuffer (obj) {
/***/ }),
-/* 532 */
+/* 530 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60997,7 +60852,7 @@ function isSlowBuffer (obj) {
-var typeOf = __webpack_require__(533);
+var typeOf = __webpack_require__(531);
// data descriptor properties
var data = {
@@ -61046,10 +60901,10 @@ module.exports = isDataDescriptor;
/***/ }),
-/* 533 */
+/* 531 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(531);
+var isBuffer = __webpack_require__(529);
var toString = Object.prototype.toString;
/**
@@ -61168,13 +61023,13 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 534 */
+/* 532 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(535);
+var isObject = __webpack_require__(533);
module.exports = function extend(o/*, objects*/) {
if (!isObject(o)) { o = {}; }
@@ -61208,7 +61063,7 @@ function hasOwn(obj, key) {
/***/ }),
-/* 535 */
+/* 533 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61228,13 +61083,13 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 536 */
+/* 534 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extend = __webpack_require__(537);
+var extend = __webpack_require__(535);
/**
* The main export is a function that takes a `pattern` string and an `options` object.
@@ -61301,13 +61156,13 @@ module.exports = toRegex;
/***/ }),
-/* 537 */
+/* 535 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(538);
+var isObject = __webpack_require__(536);
module.exports = function extend(o/*, objects*/) {
if (!isObject(o)) { o = {}; }
@@ -61341,7 +61196,7 @@ function hasOwn(obj, key) {
/***/ }),
-/* 538 */
+/* 536 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61361,7 +61216,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 539 */
+/* 537 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61411,13 +61266,13 @@ module.exports.immutable = function uniqueImmutable(arr) {
/***/ }),
-/* 540 */
+/* 538 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var utils = __webpack_require__(541);
+var utils = __webpack_require__(539);
module.exports = function(braces, options) {
braces.compiler
@@ -61700,25 +61555,25 @@ function hasQueue(node) {
/***/ }),
-/* 541 */
+/* 539 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var splitString = __webpack_require__(542);
+var splitString = __webpack_require__(540);
var utils = module.exports;
/**
* Module dependencies
*/
-utils.extend = __webpack_require__(534);
-utils.flatten = __webpack_require__(548);
-utils.isObject = __webpack_require__(546);
-utils.fillRange = __webpack_require__(549);
-utils.repeat = __webpack_require__(556);
-utils.unique = __webpack_require__(539);
+utils.extend = __webpack_require__(532);
+utils.flatten = __webpack_require__(546);
+utils.isObject = __webpack_require__(544);
+utils.fillRange = __webpack_require__(547);
+utils.repeat = __webpack_require__(554);
+utils.unique = __webpack_require__(537);
utils.define = function(obj, key, val) {
Object.defineProperty(obj, key, {
@@ -62050,7 +61905,7 @@ utils.escapeRegex = function(str) {
/***/ }),
-/* 542 */
+/* 540 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62063,7 +61918,7 @@ utils.escapeRegex = function(str) {
-var extend = __webpack_require__(543);
+var extend = __webpack_require__(541);
module.exports = function(str, options, fn) {
if (typeof str !== 'string') {
@@ -62228,14 +62083,14 @@ function keepEscaping(opts, str, idx) {
/***/ }),
-/* 543 */
+/* 541 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(544);
-var assignSymbols = __webpack_require__(547);
+var isExtendable = __webpack_require__(542);
+var assignSymbols = __webpack_require__(545);
module.exports = Object.assign || function(obj/*, objects*/) {
if (obj === null || typeof obj === 'undefined') {
@@ -62295,7 +62150,7 @@ function isEnum(obj, key) {
/***/ }),
-/* 544 */
+/* 542 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62308,7 +62163,7 @@ function isEnum(obj, key) {
-var isPlainObject = __webpack_require__(545);
+var isPlainObject = __webpack_require__(543);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -62316,7 +62171,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 545 */
+/* 543 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62329,7 +62184,7 @@ module.exports = function isExtendable(val) {
-var isObject = __webpack_require__(546);
+var isObject = __webpack_require__(544);
function isObjectObject(o) {
return isObject(o) === true
@@ -62360,7 +62215,7 @@ module.exports = function isPlainObject(o) {
/***/ }),
-/* 546 */
+/* 544 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62379,7 +62234,7 @@ module.exports = function isObject(val) {
/***/ }),
-/* 547 */
+/* 545 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62426,7 +62281,7 @@ module.exports = function(receiver, objects) {
/***/ }),
-/* 548 */
+/* 546 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62455,7 +62310,7 @@ function flat(arr, res) {
/***/ }),
-/* 549 */
+/* 547 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62469,10 +62324,10 @@ function flat(arr, res) {
var util = __webpack_require__(111);
-var isNumber = __webpack_require__(550);
-var extend = __webpack_require__(552);
-var repeat = __webpack_require__(554);
-var toRegex = __webpack_require__(555);
+var isNumber = __webpack_require__(548);
+var extend = __webpack_require__(550);
+var repeat = __webpack_require__(552);
+var toRegex = __webpack_require__(553);
/**
* Return a range of numbers or letters.
@@ -62670,7 +62525,7 @@ module.exports = fillRange;
/***/ }),
-/* 550 */
+/* 548 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62683,7 +62538,7 @@ module.exports = fillRange;
-var typeOf = __webpack_require__(551);
+var typeOf = __webpack_require__(549);
module.exports = function isNumber(num) {
var type = typeOf(num);
@@ -62699,10 +62554,10 @@ module.exports = function isNumber(num) {
/***/ }),
-/* 551 */
+/* 549 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(531);
+var isBuffer = __webpack_require__(529);
var toString = Object.prototype.toString;
/**
@@ -62821,13 +62676,13 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 552 */
+/* 550 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(553);
+var isObject = __webpack_require__(551);
module.exports = function extend(o/*, objects*/) {
if (!isObject(o)) { o = {}; }
@@ -62861,7 +62716,7 @@ function hasOwn(obj, key) {
/***/ }),
-/* 553 */
+/* 551 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62881,7 +62736,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 554 */
+/* 552 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62958,7 +62813,7 @@ function repeat(str, num) {
/***/ }),
-/* 555 */
+/* 553 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62971,8 +62826,8 @@ function repeat(str, num) {
-var repeat = __webpack_require__(554);
-var isNumber = __webpack_require__(550);
+var repeat = __webpack_require__(552);
+var isNumber = __webpack_require__(548);
var cache = {};
function toRegexRange(min, max, options) {
@@ -63259,7 +63114,7 @@ module.exports = toRegexRange;
/***/ }),
-/* 556 */
+/* 554 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63284,14 +63139,14 @@ module.exports = function repeat(ele, num) {
/***/ }),
-/* 557 */
+/* 555 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var Node = __webpack_require__(558);
-var utils = __webpack_require__(541);
+var Node = __webpack_require__(556);
+var utils = __webpack_require__(539);
/**
* Braces parsers
@@ -63651,15 +63506,15 @@ function concatNodes(pos, node, parent, options) {
/***/ }),
-/* 558 */
+/* 556 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(546);
-var define = __webpack_require__(559);
-var utils = __webpack_require__(566);
+var isObject = __webpack_require__(544);
+var define = __webpack_require__(557);
+var utils = __webpack_require__(564);
var ownNames;
/**
@@ -64150,7 +64005,7 @@ exports = module.exports = Node;
/***/ }),
-/* 559 */
+/* 557 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64163,7 +64018,7 @@ exports = module.exports = Node;
-var isDescriptor = __webpack_require__(560);
+var isDescriptor = __webpack_require__(558);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -64188,7 +64043,7 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 560 */
+/* 558 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64201,9 +64056,9 @@ module.exports = function defineProperty(obj, prop, val) {
-var typeOf = __webpack_require__(561);
-var isAccessor = __webpack_require__(562);
-var isData = __webpack_require__(564);
+var typeOf = __webpack_require__(559);
+var isAccessor = __webpack_require__(560);
+var isData = __webpack_require__(562);
module.exports = function isDescriptor(obj, key) {
if (typeOf(obj) !== 'object') {
@@ -64217,7 +64072,7 @@ module.exports = function isDescriptor(obj, key) {
/***/ }),
-/* 561 */
+/* 559 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -64352,7 +64207,7 @@ function isBuffer(val) {
/***/ }),
-/* 562 */
+/* 560 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64365,7 +64220,7 @@ function isBuffer(val) {
-var typeOf = __webpack_require__(563);
+var typeOf = __webpack_require__(561);
// accessor descriptor properties
var accessor = {
@@ -64428,7 +64283,7 @@ module.exports = isAccessorDescriptor;
/***/ }),
-/* 563 */
+/* 561 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -64563,7 +64418,7 @@ function isBuffer(val) {
/***/ }),
-/* 564 */
+/* 562 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64576,7 +64431,7 @@ function isBuffer(val) {
-var typeOf = __webpack_require__(565);
+var typeOf = __webpack_require__(563);
module.exports = function isDataDescriptor(obj, prop) {
// data descriptor properties
@@ -64619,7 +64474,7 @@ module.exports = function isDataDescriptor(obj, prop) {
/***/ }),
-/* 565 */
+/* 563 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -64754,13 +64609,13 @@ function isBuffer(val) {
/***/ }),
-/* 566 */
+/* 564 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var typeOf = __webpack_require__(551);
+var typeOf = __webpack_require__(549);
var utils = module.exports;
/**
@@ -65780,17 +65635,17 @@ function assert(val, message) {
/***/ }),
-/* 567 */
+/* 565 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extend = __webpack_require__(534);
-var Snapdragon = __webpack_require__(568);
-var compilers = __webpack_require__(540);
-var parsers = __webpack_require__(557);
-var utils = __webpack_require__(541);
+var extend = __webpack_require__(532);
+var Snapdragon = __webpack_require__(566);
+var compilers = __webpack_require__(538);
+var parsers = __webpack_require__(555);
+var utils = __webpack_require__(539);
/**
* Customize Snapdragon parser and renderer
@@ -65891,17 +65746,17 @@ module.exports = Braces;
/***/ }),
-/* 568 */
+/* 566 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var Base = __webpack_require__(569);
-var define = __webpack_require__(595);
-var Compiler = __webpack_require__(605);
-var Parser = __webpack_require__(634);
-var utils = __webpack_require__(614);
+var Base = __webpack_require__(567);
+var define = __webpack_require__(593);
+var Compiler = __webpack_require__(603);
+var Parser = __webpack_require__(632);
+var utils = __webpack_require__(612);
var regexCache = {};
var cache = {};
@@ -66072,20 +65927,20 @@ module.exports.Parser = Parser;
/***/ }),
-/* 569 */
+/* 567 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var util = __webpack_require__(111);
-var define = __webpack_require__(570);
-var CacheBase = __webpack_require__(571);
-var Emitter = __webpack_require__(572);
-var isObject = __webpack_require__(546);
-var merge = __webpack_require__(589);
-var pascal = __webpack_require__(592);
-var cu = __webpack_require__(593);
+var define = __webpack_require__(568);
+var CacheBase = __webpack_require__(569);
+var Emitter = __webpack_require__(570);
+var isObject = __webpack_require__(544);
+var merge = __webpack_require__(587);
+var pascal = __webpack_require__(590);
+var cu = __webpack_require__(591);
/**
* Optionally define a custom `cache` namespace to use.
@@ -66514,7 +66369,7 @@ module.exports.namespace = namespace;
/***/ }),
-/* 570 */
+/* 568 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -66527,7 +66382,7 @@ module.exports.namespace = namespace;
-var isDescriptor = __webpack_require__(560);
+var isDescriptor = __webpack_require__(558);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -66552,21 +66407,21 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 571 */
+/* 569 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(546);
-var Emitter = __webpack_require__(572);
-var visit = __webpack_require__(573);
-var toPath = __webpack_require__(576);
-var union = __webpack_require__(577);
-var del = __webpack_require__(581);
-var get = __webpack_require__(579);
-var has = __webpack_require__(586);
-var set = __webpack_require__(580);
+var isObject = __webpack_require__(544);
+var Emitter = __webpack_require__(570);
+var visit = __webpack_require__(571);
+var toPath = __webpack_require__(574);
+var union = __webpack_require__(575);
+var del = __webpack_require__(579);
+var get = __webpack_require__(577);
+var has = __webpack_require__(584);
+var set = __webpack_require__(578);
/**
* Create a `Cache` constructor that when instantiated will
@@ -66820,7 +66675,7 @@ module.exports.namespace = namespace;
/***/ }),
-/* 572 */
+/* 570 */
/***/ (function(module, exports, __webpack_require__) {
@@ -66989,7 +66844,7 @@ Emitter.prototype.hasListeners = function(event){
/***/ }),
-/* 573 */
+/* 571 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67002,8 +66857,8 @@ Emitter.prototype.hasListeners = function(event){
-var visit = __webpack_require__(574);
-var mapVisit = __webpack_require__(575);
+var visit = __webpack_require__(572);
+var mapVisit = __webpack_require__(573);
module.exports = function(collection, method, val) {
var result;
@@ -67026,7 +66881,7 @@ module.exports = function(collection, method, val) {
/***/ }),
-/* 574 */
+/* 572 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67039,7 +66894,7 @@ module.exports = function(collection, method, val) {
-var isObject = __webpack_require__(546);
+var isObject = __webpack_require__(544);
module.exports = function visit(thisArg, method, target, val) {
if (!isObject(thisArg) && typeof thisArg !== 'function') {
@@ -67066,14 +66921,14 @@ module.exports = function visit(thisArg, method, target, val) {
/***/ }),
-/* 575 */
+/* 573 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var util = __webpack_require__(111);
-var visit = __webpack_require__(574);
+var visit = __webpack_require__(572);
/**
* Map `visit` over an array of objects.
@@ -67110,7 +66965,7 @@ function isObject(val) {
/***/ }),
-/* 576 */
+/* 574 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67123,7 +66978,7 @@ function isObject(val) {
-var typeOf = __webpack_require__(551);
+var typeOf = __webpack_require__(549);
module.exports = function toPath(args) {
if (typeOf(args) !== 'arguments') {
@@ -67150,16 +67005,16 @@ function filter(arr) {
/***/ }),
-/* 577 */
+/* 575 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isObject = __webpack_require__(538);
-var union = __webpack_require__(578);
-var get = __webpack_require__(579);
-var set = __webpack_require__(580);
+var isObject = __webpack_require__(536);
+var union = __webpack_require__(576);
+var get = __webpack_require__(577);
+var set = __webpack_require__(578);
module.exports = function unionValue(obj, prop, value) {
if (!isObject(obj)) {
@@ -67187,7 +67042,7 @@ function arrayify(val) {
/***/ }),
-/* 578 */
+/* 576 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67223,7 +67078,7 @@ module.exports = function union(init) {
/***/ }),
-/* 579 */
+/* 577 */
/***/ (function(module, exports) {
/*!
@@ -67279,7 +67134,7 @@ function toString(val) {
/***/ }),
-/* 580 */
+/* 578 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67292,10 +67147,10 @@ function toString(val) {
-var split = __webpack_require__(542);
-var extend = __webpack_require__(537);
-var isPlainObject = __webpack_require__(545);
-var isObject = __webpack_require__(538);
+var split = __webpack_require__(540);
+var extend = __webpack_require__(535);
+var isPlainObject = __webpack_require__(543);
+var isObject = __webpack_require__(536);
module.exports = function(obj, prop, val) {
if (!isObject(obj)) {
@@ -67341,7 +67196,7 @@ function isValidKey(key) {
/***/ }),
-/* 581 */
+/* 579 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67354,8 +67209,8 @@ function isValidKey(key) {
-var isObject = __webpack_require__(546);
-var has = __webpack_require__(582);
+var isObject = __webpack_require__(544);
+var has = __webpack_require__(580);
module.exports = function unset(obj, prop) {
if (!isObject(obj)) {
@@ -67380,7 +67235,7 @@ module.exports = function unset(obj, prop) {
/***/ }),
-/* 582 */
+/* 580 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67393,9 +67248,9 @@ module.exports = function unset(obj, prop) {
-var isObject = __webpack_require__(583);
-var hasValues = __webpack_require__(585);
-var get = __webpack_require__(579);
+var isObject = __webpack_require__(581);
+var hasValues = __webpack_require__(583);
+var get = __webpack_require__(577);
module.exports = function(obj, prop, noZero) {
if (isObject(obj)) {
@@ -67406,7 +67261,7 @@ module.exports = function(obj, prop, noZero) {
/***/ }),
-/* 583 */
+/* 581 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67419,7 +67274,7 @@ module.exports = function(obj, prop, noZero) {
-var isArray = __webpack_require__(584);
+var isArray = __webpack_require__(582);
module.exports = function isObject(val) {
return val != null && typeof val === 'object' && isArray(val) === false;
@@ -67427,7 +67282,7 @@ module.exports = function isObject(val) {
/***/ }),
-/* 584 */
+/* 582 */
/***/ (function(module, exports) {
var toString = {}.toString;
@@ -67438,7 +67293,7 @@ module.exports = Array.isArray || function (arr) {
/***/ }),
-/* 585 */
+/* 583 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67481,7 +67336,7 @@ module.exports = function hasValue(o, noZero) {
/***/ }),
-/* 586 */
+/* 584 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67494,9 +67349,9 @@ module.exports = function hasValue(o, noZero) {
-var isObject = __webpack_require__(546);
-var hasValues = __webpack_require__(587);
-var get = __webpack_require__(579);
+var isObject = __webpack_require__(544);
+var hasValues = __webpack_require__(585);
+var get = __webpack_require__(577);
module.exports = function(val, prop) {
return hasValues(isObject(val) && prop ? get(val, prop) : val);
@@ -67504,7 +67359,7 @@ module.exports = function(val, prop) {
/***/ }),
-/* 587 */
+/* 585 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67517,8 +67372,8 @@ module.exports = function(val, prop) {
-var typeOf = __webpack_require__(588);
-var isNumber = __webpack_require__(550);
+var typeOf = __webpack_require__(586);
+var isNumber = __webpack_require__(548);
module.exports = function hasValue(val) {
// is-number checks for NaN and other edge cases
@@ -67571,10 +67426,10 @@ module.exports = function hasValue(val) {
/***/ }),
-/* 588 */
+/* 586 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(531);
+var isBuffer = __webpack_require__(529);
var toString = Object.prototype.toString;
/**
@@ -67696,14 +67551,14 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 589 */
+/* 587 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(590);
-var forIn = __webpack_require__(591);
+var isExtendable = __webpack_require__(588);
+var forIn = __webpack_require__(589);
function mixinDeep(target, objects) {
var len = arguments.length, i = 0;
@@ -67767,7 +67622,7 @@ module.exports = mixinDeep;
/***/ }),
-/* 590 */
+/* 588 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67780,7 +67635,7 @@ module.exports = mixinDeep;
-var isPlainObject = __webpack_require__(545);
+var isPlainObject = __webpack_require__(543);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -67788,7 +67643,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 591 */
+/* 589 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -67811,7 +67666,7 @@ module.exports = function forIn(obj, fn, thisArg) {
/***/ }),
-/* 592 */
+/* 590 */
/***/ (function(module, exports) {
/*!
@@ -67838,14 +67693,14 @@ module.exports = pascalcase;
/***/ }),
-/* 593 */
+/* 591 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var util = __webpack_require__(111);
-var utils = __webpack_require__(594);
+var utils = __webpack_require__(592);
/**
* Expose class utils
@@ -68210,7 +68065,7 @@ cu.bubble = function(Parent, events) {
/***/ }),
-/* 594 */
+/* 592 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -68224,10 +68079,10 @@ var utils = {};
* Lazily required module dependencies
*/
-utils.union = __webpack_require__(578);
-utils.define = __webpack_require__(595);
-utils.isObj = __webpack_require__(546);
-utils.staticExtend = __webpack_require__(602);
+utils.union = __webpack_require__(576);
+utils.define = __webpack_require__(593);
+utils.isObj = __webpack_require__(544);
+utils.staticExtend = __webpack_require__(600);
/**
@@ -68238,7 +68093,7 @@ module.exports = utils;
/***/ }),
-/* 595 */
+/* 593 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -68251,7 +68106,7 @@ module.exports = utils;
-var isDescriptor = __webpack_require__(596);
+var isDescriptor = __webpack_require__(594);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -68276,7 +68131,7 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 596 */
+/* 594 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -68289,9 +68144,9 @@ module.exports = function defineProperty(obj, prop, val) {
-var typeOf = __webpack_require__(597);
-var isAccessor = __webpack_require__(598);
-var isData = __webpack_require__(600);
+var typeOf = __webpack_require__(595);
+var isAccessor = __webpack_require__(596);
+var isData = __webpack_require__(598);
module.exports = function isDescriptor(obj, key) {
if (typeOf(obj) !== 'object') {
@@ -68305,7 +68160,7 @@ module.exports = function isDescriptor(obj, key) {
/***/ }),
-/* 597 */
+/* 595 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -68458,7 +68313,7 @@ function isBuffer(val) {
/***/ }),
-/* 598 */
+/* 596 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -68471,7 +68326,7 @@ function isBuffer(val) {
-var typeOf = __webpack_require__(599);
+var typeOf = __webpack_require__(597);
// accessor descriptor properties
var accessor = {
@@ -68534,10 +68389,10 @@ module.exports = isAccessorDescriptor;
/***/ }),
-/* 599 */
+/* 597 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(531);
+var isBuffer = __webpack_require__(529);
var toString = Object.prototype.toString;
/**
@@ -68656,7 +68511,7 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 600 */
+/* 598 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -68669,7 +68524,7 @@ module.exports = function kindOf(val) {
-var typeOf = __webpack_require__(601);
+var typeOf = __webpack_require__(599);
// data descriptor properties
var data = {
@@ -68718,10 +68573,10 @@ module.exports = isDataDescriptor;
/***/ }),
-/* 601 */
+/* 599 */
/***/ (function(module, exports, __webpack_require__) {
-var isBuffer = __webpack_require__(531);
+var isBuffer = __webpack_require__(529);
var toString = Object.prototype.toString;
/**
@@ -68840,7 +68695,7 @@ module.exports = function kindOf(val) {
/***/ }),
-/* 602 */
+/* 600 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -68853,8 +68708,8 @@ module.exports = function kindOf(val) {
-var copy = __webpack_require__(603);
-var define = __webpack_require__(595);
+var copy = __webpack_require__(601);
+var define = __webpack_require__(593);
var util = __webpack_require__(111);
/**
@@ -68937,15 +68792,15 @@ module.exports = extend;
/***/ }),
-/* 603 */
+/* 601 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var typeOf = __webpack_require__(551);
-var copyDescriptor = __webpack_require__(604);
-var define = __webpack_require__(595);
+var typeOf = __webpack_require__(549);
+var copyDescriptor = __webpack_require__(602);
+var define = __webpack_require__(593);
/**
* Copy static properties, prototype properties, and descriptors from one object to another.
@@ -69118,7 +68973,7 @@ module.exports.has = has;
/***/ }),
-/* 604 */
+/* 602 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -69206,16 +69061,16 @@ function isObject(val) {
/***/ }),
-/* 605 */
+/* 603 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var use = __webpack_require__(606);
-var define = __webpack_require__(595);
-var debug = __webpack_require__(608)('snapdragon:compiler');
-var utils = __webpack_require__(614);
+var use = __webpack_require__(604);
+var define = __webpack_require__(593);
+var debug = __webpack_require__(606)('snapdragon:compiler');
+var utils = __webpack_require__(612);
/**
* Create a new `Compiler` with the given `options`.
@@ -69369,7 +69224,7 @@ Compiler.prototype = {
// source map support
if (opts.sourcemap) {
- var sourcemaps = __webpack_require__(633);
+ var sourcemaps = __webpack_require__(631);
sourcemaps(this);
this.mapVisit(this.ast.nodes);
this.applySourceMaps();
@@ -69390,7 +69245,7 @@ module.exports = Compiler;
/***/ }),
-/* 606 */
+/* 604 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -69403,7 +69258,7 @@ module.exports = Compiler;
-var utils = __webpack_require__(607);
+var utils = __webpack_require__(605);
module.exports = function base(app, opts) {
if (!utils.isObject(app) && typeof app !== 'function') {
@@ -69518,7 +69373,7 @@ module.exports = function base(app, opts) {
/***/ }),
-/* 607 */
+/* 605 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -69532,8 +69387,8 @@ var utils = {};
* Lazily required module dependencies
*/
-utils.define = __webpack_require__(595);
-utils.isObject = __webpack_require__(546);
+utils.define = __webpack_require__(593);
+utils.isObject = __webpack_require__(544);
utils.isString = function(val) {
@@ -69548,7 +69403,7 @@ module.exports = utils;
/***/ }),
-/* 608 */
+/* 606 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -69557,14 +69412,14 @@ module.exports = utils;
*/
if (typeof process !== 'undefined' && process.type === 'renderer') {
- module.exports = __webpack_require__(609);
+ module.exports = __webpack_require__(607);
} else {
- module.exports = __webpack_require__(612);
+ module.exports = __webpack_require__(610);
}
/***/ }),
-/* 609 */
+/* 607 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -69573,7 +69428,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') {
* Expose `debug()` as the module.
*/
-exports = module.exports = __webpack_require__(610);
+exports = module.exports = __webpack_require__(608);
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
@@ -69755,7 +69610,7 @@ function localstorage() {
/***/ }),
-/* 610 */
+/* 608 */
/***/ (function(module, exports, __webpack_require__) {
@@ -69771,7 +69626,7 @@ exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enabled = enabled;
-exports.humanize = __webpack_require__(611);
+exports.humanize = __webpack_require__(609);
/**
* The currently active debug mode names, and names to skip.
@@ -69963,7 +69818,7 @@ function coerce(val) {
/***/ }),
-/* 611 */
+/* 609 */
/***/ (function(module, exports) {
/**
@@ -70121,7 +69976,7 @@ function plural(ms, n, name) {
/***/ }),
-/* 612 */
+/* 610 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -70137,7 +69992,7 @@ var util = __webpack_require__(111);
* Expose `debug()` as the module.
*/
-exports = module.exports = __webpack_require__(610);
+exports = module.exports = __webpack_require__(608);
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
@@ -70316,7 +70171,7 @@ function createWritableStdioStream (fd) {
case 'PIPE':
case 'TCP':
- var net = __webpack_require__(613);
+ var net = __webpack_require__(611);
stream = new net.Socket({
fd: fd,
readable: false,
@@ -70375,13 +70230,13 @@ exports.enable(load());
/***/ }),
-/* 613 */
+/* 611 */
/***/ (function(module, exports) {
module.exports = require("net");
/***/ }),
-/* 614 */
+/* 612 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -70391,9 +70246,9 @@ module.exports = require("net");
* Module dependencies
*/
-exports.extend = __webpack_require__(537);
-exports.SourceMap = __webpack_require__(615);
-exports.sourceMapResolve = __webpack_require__(626);
+exports.extend = __webpack_require__(535);
+exports.SourceMap = __webpack_require__(613);
+exports.sourceMapResolve = __webpack_require__(624);
/**
* Convert backslash in the given string to forward slashes
@@ -70436,7 +70291,7 @@ exports.last = function(arr, n) {
/***/ }),
-/* 615 */
+/* 613 */
/***/ (function(module, exports, __webpack_require__) {
/*
@@ -70444,13 +70299,13 @@ exports.last = function(arr, n) {
* Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause
*/
-exports.SourceMapGenerator = __webpack_require__(616).SourceMapGenerator;
-exports.SourceMapConsumer = __webpack_require__(622).SourceMapConsumer;
-exports.SourceNode = __webpack_require__(625).SourceNode;
+exports.SourceMapGenerator = __webpack_require__(614).SourceMapGenerator;
+exports.SourceMapConsumer = __webpack_require__(620).SourceMapConsumer;
+exports.SourceNode = __webpack_require__(623).SourceNode;
/***/ }),
-/* 616 */
+/* 614 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -70460,10 +70315,10 @@ exports.SourceNode = __webpack_require__(625).SourceNode;
* http://opensource.org/licenses/BSD-3-Clause
*/
-var base64VLQ = __webpack_require__(617);
-var util = __webpack_require__(619);
-var ArraySet = __webpack_require__(620).ArraySet;
-var MappingList = __webpack_require__(621).MappingList;
+var base64VLQ = __webpack_require__(615);
+var util = __webpack_require__(617);
+var ArraySet = __webpack_require__(618).ArraySet;
+var MappingList = __webpack_require__(619).MappingList;
/**
* An instance of the SourceMapGenerator represents a source map which is
@@ -70872,7 +70727,7 @@ exports.SourceMapGenerator = SourceMapGenerator;
/***/ }),
-/* 617 */
+/* 615 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -70912,7 +70767,7 @@ exports.SourceMapGenerator = SourceMapGenerator;
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-var base64 = __webpack_require__(618);
+var base64 = __webpack_require__(616);
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
@@ -71018,7 +70873,7 @@ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
/***/ }),
-/* 618 */
+/* 616 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -71091,7 +70946,7 @@ exports.decode = function (charCode) {
/***/ }),
-/* 619 */
+/* 617 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -71514,7 +71369,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate
/***/ }),
-/* 620 */
+/* 618 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -71524,7 +71379,7 @@ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflate
* http://opensource.org/licenses/BSD-3-Clause
*/
-var util = __webpack_require__(619);
+var util = __webpack_require__(617);
var has = Object.prototype.hasOwnProperty;
var hasNativeMap = typeof Map !== "undefined";
@@ -71641,7 +71496,7 @@ exports.ArraySet = ArraySet;
/***/ }),
-/* 621 */
+/* 619 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -71651,7 +71506,7 @@ exports.ArraySet = ArraySet;
* http://opensource.org/licenses/BSD-3-Clause
*/
-var util = __webpack_require__(619);
+var util = __webpack_require__(617);
/**
* Determine whether mappingB is after mappingA with respect to generated
@@ -71726,7 +71581,7 @@ exports.MappingList = MappingList;
/***/ }),
-/* 622 */
+/* 620 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -71736,11 +71591,11 @@ exports.MappingList = MappingList;
* http://opensource.org/licenses/BSD-3-Clause
*/
-var util = __webpack_require__(619);
-var binarySearch = __webpack_require__(623);
-var ArraySet = __webpack_require__(620).ArraySet;
-var base64VLQ = __webpack_require__(617);
-var quickSort = __webpack_require__(624).quickSort;
+var util = __webpack_require__(617);
+var binarySearch = __webpack_require__(621);
+var ArraySet = __webpack_require__(618).ArraySet;
+var base64VLQ = __webpack_require__(615);
+var quickSort = __webpack_require__(622).quickSort;
function SourceMapConsumer(aSourceMap) {
var sourceMap = aSourceMap;
@@ -72814,7 +72669,7 @@ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
/***/ }),
-/* 623 */
+/* 621 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -72931,7 +72786,7 @@ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
/***/ }),
-/* 624 */
+/* 622 */
/***/ (function(module, exports) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -73051,7 +72906,7 @@ exports.quickSort = function (ary, comparator) {
/***/ }),
-/* 625 */
+/* 623 */
/***/ (function(module, exports, __webpack_require__) {
/* -*- Mode: js; js-indent-level: 2; -*- */
@@ -73061,8 +72916,8 @@ exports.quickSort = function (ary, comparator) {
* http://opensource.org/licenses/BSD-3-Clause
*/
-var SourceMapGenerator = __webpack_require__(616).SourceMapGenerator;
-var util = __webpack_require__(619);
+var SourceMapGenerator = __webpack_require__(614).SourceMapGenerator;
+var util = __webpack_require__(617);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result).
@@ -73470,17 +73325,17 @@ exports.SourceNode = SourceNode;
/***/ }),
-/* 626 */
+/* 624 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2014, 2015, 2016, 2017 Simon Lydell
// X11 (“MIT”) Licensed. (See LICENSE.)
-var sourceMappingURL = __webpack_require__(627)
-var resolveUrl = __webpack_require__(628)
-var decodeUriComponent = __webpack_require__(629)
-var urix = __webpack_require__(631)
-var atob = __webpack_require__(632)
+var sourceMappingURL = __webpack_require__(625)
+var resolveUrl = __webpack_require__(626)
+var decodeUriComponent = __webpack_require__(627)
+var urix = __webpack_require__(629)
+var atob = __webpack_require__(630)
@@ -73778,7 +73633,7 @@ module.exports = {
/***/ }),
-/* 627 */
+/* 625 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;// Copyright 2014 Simon Lydell
@@ -73841,7 +73696,7 @@ void (function(root, factory) {
/***/ }),
-/* 628 */
+/* 626 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2014 Simon Lydell
@@ -73859,13 +73714,13 @@ module.exports = resolveUrl
/***/ }),
-/* 629 */
+/* 627 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2017 Simon Lydell
// X11 (“MIT”) Licensed. (See LICENSE.)
-var decodeUriComponent = __webpack_require__(630)
+var decodeUriComponent = __webpack_require__(628)
function customDecodeUriComponent(string) {
// `decodeUriComponent` turns `+` into ` `, but that's not wanted.
@@ -73876,7 +73731,7 @@ module.exports = customDecodeUriComponent
/***/ }),
-/* 630 */
+/* 628 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -73977,7 +73832,7 @@ module.exports = function (encodedURI) {
/***/ }),
-/* 631 */
+/* 629 */
/***/ (function(module, exports, __webpack_require__) {
// Copyright 2014 Simon Lydell
@@ -74000,7 +73855,7 @@ module.exports = urix
/***/ }),
-/* 632 */
+/* 630 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -74014,7 +73869,7 @@ module.exports = atob.atob = atob;
/***/ }),
-/* 633 */
+/* 631 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -74022,8 +73877,8 @@ module.exports = atob.atob = atob;
var fs = __webpack_require__(133);
var path = __webpack_require__(4);
-var define = __webpack_require__(595);
-var utils = __webpack_require__(614);
+var define = __webpack_require__(593);
+var utils = __webpack_require__(612);
/**
* Expose `mixin()`.
@@ -74166,19 +74021,19 @@ exports.comment = function(node) {
/***/ }),
-/* 634 */
+/* 632 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var use = __webpack_require__(606);
+var use = __webpack_require__(604);
var util = __webpack_require__(111);
-var Cache = __webpack_require__(635);
-var define = __webpack_require__(595);
-var debug = __webpack_require__(608)('snapdragon:parser');
-var Position = __webpack_require__(636);
-var utils = __webpack_require__(614);
+var Cache = __webpack_require__(633);
+var define = __webpack_require__(593);
+var debug = __webpack_require__(606)('snapdragon:parser');
+var Position = __webpack_require__(634);
+var utils = __webpack_require__(612);
/**
* Create a new `Parser` with the given `input` and `options`.
@@ -74706,7 +74561,7 @@ module.exports = Parser;
/***/ }),
-/* 635 */
+/* 633 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -74813,13 +74668,13 @@ MapCache.prototype.del = function mapDelete(key) {
/***/ }),
-/* 636 */
+/* 634 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var define = __webpack_require__(595);
+var define = __webpack_require__(593);
/**
* Store position for a node
@@ -74834,16 +74689,16 @@ module.exports = function Position(start, parser) {
/***/ }),
-/* 637 */
+/* 635 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var safe = __webpack_require__(638);
-var define = __webpack_require__(644);
-var extend = __webpack_require__(645);
-var not = __webpack_require__(647);
+var safe = __webpack_require__(636);
+var define = __webpack_require__(642);
+var extend = __webpack_require__(643);
+var not = __webpack_require__(645);
var MAX_LENGTH = 1024 * 64;
/**
@@ -74996,10 +74851,10 @@ module.exports.makeRe = makeRe;
/***/ }),
-/* 638 */
+/* 636 */
/***/ (function(module, exports, __webpack_require__) {
-var parse = __webpack_require__(639);
+var parse = __webpack_require__(637);
var types = parse.types;
module.exports = function (re, opts) {
@@ -75045,13 +74900,13 @@ function isRegExp (x) {
/***/ }),
-/* 639 */
+/* 637 */
/***/ (function(module, exports, __webpack_require__) {
-var util = __webpack_require__(640);
-var types = __webpack_require__(641);
-var sets = __webpack_require__(642);
-var positions = __webpack_require__(643);
+var util = __webpack_require__(638);
+var types = __webpack_require__(639);
+var sets = __webpack_require__(640);
+var positions = __webpack_require__(641);
module.exports = function(regexpStr) {
@@ -75333,11 +75188,11 @@ module.exports.types = types;
/***/ }),
-/* 640 */
+/* 638 */
/***/ (function(module, exports, __webpack_require__) {
-var types = __webpack_require__(641);
-var sets = __webpack_require__(642);
+var types = __webpack_require__(639);
+var sets = __webpack_require__(640);
// All of these are private and only used by randexp.
@@ -75450,7 +75305,7 @@ exports.error = function(regexp, msg) {
/***/ }),
-/* 641 */
+/* 639 */
/***/ (function(module, exports) {
module.exports = {
@@ -75466,10 +75321,10 @@ module.exports = {
/***/ }),
-/* 642 */
+/* 640 */
/***/ (function(module, exports, __webpack_require__) {
-var types = __webpack_require__(641);
+var types = __webpack_require__(639);
var INTS = function() {
return [{ type: types.RANGE , from: 48, to: 57 }];
@@ -75554,10 +75409,10 @@ exports.anyChar = function() {
/***/ }),
-/* 643 */
+/* 641 */
/***/ (function(module, exports, __webpack_require__) {
-var types = __webpack_require__(641);
+var types = __webpack_require__(639);
exports.wordBoundary = function() {
return { type: types.POSITION, value: 'b' };
@@ -75577,7 +75432,7 @@ exports.end = function() {
/***/ }),
-/* 644 */
+/* 642 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -75590,8 +75445,8 @@ exports.end = function() {
-var isobject = __webpack_require__(546);
-var isDescriptor = __webpack_require__(560);
+var isobject = __webpack_require__(544);
+var isDescriptor = __webpack_require__(558);
var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty)
? Reflect.defineProperty
: Object.defineProperty;
@@ -75622,14 +75477,14 @@ module.exports = function defineProperty(obj, key, val) {
/***/ }),
-/* 645 */
+/* 643 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(646);
-var assignSymbols = __webpack_require__(547);
+var isExtendable = __webpack_require__(644);
+var assignSymbols = __webpack_require__(545);
module.exports = Object.assign || function(obj/*, objects*/) {
if (obj === null || typeof obj === 'undefined') {
@@ -75689,7 +75544,7 @@ function isEnum(obj, key) {
/***/ }),
-/* 646 */
+/* 644 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -75702,7 +75557,7 @@ function isEnum(obj, key) {
-var isPlainObject = __webpack_require__(545);
+var isPlainObject = __webpack_require__(543);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -75710,14 +75565,14 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 647 */
+/* 645 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extend = __webpack_require__(645);
-var safe = __webpack_require__(638);
+var extend = __webpack_require__(643);
+var safe = __webpack_require__(636);
/**
* The main export is a function that takes a `pattern` string and an `options` object.
@@ -75789,14 +75644,14 @@ module.exports = toRegex;
/***/ }),
-/* 648 */
+/* 646 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var nanomatch = __webpack_require__(649);
-var extglob = __webpack_require__(665);
+var nanomatch = __webpack_require__(647);
+var extglob = __webpack_require__(663);
module.exports = function(snapdragon) {
var compilers = snapdragon.compiler.compilers;
@@ -75873,7 +75728,7 @@ function escapeExtglobs(compiler) {
/***/ }),
-/* 649 */
+/* 647 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -75884,17 +75739,17 @@ function escapeExtglobs(compiler) {
*/
var util = __webpack_require__(111);
-var toRegex = __webpack_require__(650);
-var extend = __webpack_require__(651);
+var toRegex = __webpack_require__(648);
+var extend = __webpack_require__(649);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(653);
-var parsers = __webpack_require__(654);
-var cache = __webpack_require__(657);
-var utils = __webpack_require__(659);
+var compilers = __webpack_require__(651);
+var parsers = __webpack_require__(652);
+var cache = __webpack_require__(655);
+var utils = __webpack_require__(657);
var MAX_LENGTH = 1024 * 64;
/**
@@ -76718,15 +76573,15 @@ module.exports = nanomatch;
/***/ }),
-/* 650 */
+/* 648 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var define = __webpack_require__(595);
-var extend = __webpack_require__(537);
-var not = __webpack_require__(536);
+var define = __webpack_require__(593);
+var extend = __webpack_require__(535);
+var not = __webpack_require__(534);
var MAX_LENGTH = 1024 * 64;
/**
@@ -76873,14 +76728,14 @@ module.exports.makeRe = makeRe;
/***/ }),
-/* 651 */
+/* 649 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var isExtendable = __webpack_require__(652);
-var assignSymbols = __webpack_require__(547);
+var isExtendable = __webpack_require__(650);
+var assignSymbols = __webpack_require__(545);
module.exports = Object.assign || function(obj/*, objects*/) {
if (obj === null || typeof obj === 'undefined') {
@@ -76940,7 +76795,7 @@ function isEnum(obj, key) {
/***/ }),
-/* 652 */
+/* 650 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -76953,7 +76808,7 @@ function isEnum(obj, key) {
-var isPlainObject = __webpack_require__(545);
+var isPlainObject = __webpack_require__(543);
module.exports = function isExtendable(val) {
return isPlainObject(val) || typeof val === 'function' || Array.isArray(val);
@@ -76961,7 +76816,7 @@ module.exports = function isExtendable(val) {
/***/ }),
-/* 653 */
+/* 651 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -77307,15 +77162,15 @@ module.exports = function(nanomatch, options) {
/***/ }),
-/* 654 */
+/* 652 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var regexNot = __webpack_require__(536);
-var toRegex = __webpack_require__(650);
-var isOdd = __webpack_require__(655);
+var regexNot = __webpack_require__(534);
+var toRegex = __webpack_require__(648);
+var isOdd = __webpack_require__(653);
/**
* Characters to use in negation regex (we want to "not" match
@@ -77701,7 +77556,7 @@ module.exports.not = NOT_REGEX;
/***/ }),
-/* 655 */
+/* 653 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -77714,7 +77569,7 @@ module.exports.not = NOT_REGEX;
-var isNumber = __webpack_require__(656);
+var isNumber = __webpack_require__(654);
module.exports = function isOdd(i) {
if (!isNumber(i)) {
@@ -77728,7 +77583,7 @@ module.exports = function isOdd(i) {
/***/ }),
-/* 656 */
+/* 654 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -77756,14 +77611,14 @@ module.exports = function isNumber(num) {
/***/ }),
-/* 657 */
+/* 655 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = new (__webpack_require__(658))();
+module.exports = new (__webpack_require__(656))();
/***/ }),
-/* 658 */
+/* 656 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -77776,7 +77631,7 @@ module.exports = new (__webpack_require__(658))();
-var MapCache = __webpack_require__(635);
+var MapCache = __webpack_require__(633);
/**
* Create a new `FragmentCache` with an optional object to use for `caches`.
@@ -77898,7 +77753,7 @@ exports = module.exports = FragmentCache;
/***/ }),
-/* 659 */
+/* 657 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -77911,14 +77766,14 @@ var path = __webpack_require__(4);
* Module dependencies
*/
-var isWindows = __webpack_require__(660)();
-var Snapdragon = __webpack_require__(568);
-utils.define = __webpack_require__(661);
-utils.diff = __webpack_require__(662);
-utils.extend = __webpack_require__(651);
-utils.pick = __webpack_require__(663);
-utils.typeOf = __webpack_require__(664);
-utils.unique = __webpack_require__(539);
+var isWindows = __webpack_require__(658)();
+var Snapdragon = __webpack_require__(566);
+utils.define = __webpack_require__(659);
+utils.diff = __webpack_require__(660);
+utils.extend = __webpack_require__(649);
+utils.pick = __webpack_require__(661);
+utils.typeOf = __webpack_require__(662);
+utils.unique = __webpack_require__(537);
/**
* Returns true if the given value is effectively an empty string
@@ -78284,7 +78139,7 @@ utils.unixify = function(options) {
/***/ }),
-/* 660 */
+/* 658 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -78312,7 +78167,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
/***/ }),
-/* 661 */
+/* 659 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -78325,8 +78180,8 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
-var isobject = __webpack_require__(546);
-var isDescriptor = __webpack_require__(560);
+var isobject = __webpack_require__(544);
+var isDescriptor = __webpack_require__(558);
var define = (typeof Reflect !== 'undefined' && Reflect.defineProperty)
? Reflect.defineProperty
: Object.defineProperty;
@@ -78357,7 +78212,7 @@ module.exports = function defineProperty(obj, key, val) {
/***/ }),
-/* 662 */
+/* 660 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -78411,7 +78266,7 @@ function diffArray(one, two) {
/***/ }),
-/* 663 */
+/* 661 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -78424,7 +78279,7 @@ function diffArray(one, two) {
-var isObject = __webpack_require__(546);
+var isObject = __webpack_require__(544);
module.exports = function pick(obj, keys) {
if (!isObject(obj) && typeof obj !== 'function') {
@@ -78453,7 +78308,7 @@ module.exports = function pick(obj, keys) {
/***/ }),
-/* 664 */
+/* 662 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -78588,7 +78443,7 @@ function isBuffer(val) {
/***/ }),
-/* 665 */
+/* 663 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -78598,18 +78453,18 @@ function isBuffer(val) {
* Module dependencies
*/
-var extend = __webpack_require__(537);
-var unique = __webpack_require__(539);
-var toRegex = __webpack_require__(650);
+var extend = __webpack_require__(535);
+var unique = __webpack_require__(537);
+var toRegex = __webpack_require__(648);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(666);
-var parsers = __webpack_require__(677);
-var Extglob = __webpack_require__(680);
-var utils = __webpack_require__(679);
+var compilers = __webpack_require__(664);
+var parsers = __webpack_require__(675);
+var Extglob = __webpack_require__(678);
+var utils = __webpack_require__(677);
var MAX_LENGTH = 1024 * 64;
/**
@@ -78926,13 +78781,13 @@ module.exports = extglob;
/***/ }),
-/* 666 */
+/* 664 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var brackets = __webpack_require__(667);
+var brackets = __webpack_require__(665);
/**
* Extglob compilers
@@ -79102,7 +78957,7 @@ module.exports = function(extglob) {
/***/ }),
-/* 667 */
+/* 665 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -79112,17 +78967,17 @@ module.exports = function(extglob) {
* Local dependencies
*/
-var compilers = __webpack_require__(668);
-var parsers = __webpack_require__(670);
+var compilers = __webpack_require__(666);
+var parsers = __webpack_require__(668);
/**
* Module dependencies
*/
-var debug = __webpack_require__(672)('expand-brackets');
-var extend = __webpack_require__(537);
-var Snapdragon = __webpack_require__(568);
-var toRegex = __webpack_require__(650);
+var debug = __webpack_require__(670)('expand-brackets');
+var extend = __webpack_require__(535);
+var Snapdragon = __webpack_require__(566);
+var toRegex = __webpack_require__(648);
/**
* Parses the given POSIX character class `pattern` and returns a
@@ -79320,13 +79175,13 @@ module.exports = brackets;
/***/ }),
-/* 668 */
+/* 666 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var posix = __webpack_require__(669);
+var posix = __webpack_require__(667);
module.exports = function(brackets) {
brackets.compiler
@@ -79414,7 +79269,7 @@ module.exports = function(brackets) {
/***/ }),
-/* 669 */
+/* 667 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -79443,14 +79298,14 @@ module.exports = {
/***/ }),
-/* 670 */
+/* 668 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var utils = __webpack_require__(671);
-var define = __webpack_require__(595);
+var utils = __webpack_require__(669);
+var define = __webpack_require__(593);
/**
* Text regex
@@ -79669,14 +79524,14 @@ module.exports.TEXT_REGEX = TEXT_REGEX;
/***/ }),
-/* 671 */
+/* 669 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var toRegex = __webpack_require__(650);
-var regexNot = __webpack_require__(536);
+var toRegex = __webpack_require__(648);
+var regexNot = __webpack_require__(534);
var cached;
/**
@@ -79710,7 +79565,7 @@ exports.createRegex = function(pattern, include) {
/***/ }),
-/* 672 */
+/* 670 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -79719,14 +79574,14 @@ exports.createRegex = function(pattern, include) {
*/
if (typeof process !== 'undefined' && process.type === 'renderer') {
- module.exports = __webpack_require__(673);
+ module.exports = __webpack_require__(671);
} else {
- module.exports = __webpack_require__(676);
+ module.exports = __webpack_require__(674);
}
/***/ }),
-/* 673 */
+/* 671 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -79735,7 +79590,7 @@ if (typeof process !== 'undefined' && process.type === 'renderer') {
* Expose `debug()` as the module.
*/
-exports = module.exports = __webpack_require__(674);
+exports = module.exports = __webpack_require__(672);
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
@@ -79917,7 +79772,7 @@ function localstorage() {
/***/ }),
-/* 674 */
+/* 672 */
/***/ (function(module, exports, __webpack_require__) {
@@ -79933,7 +79788,7 @@ exports.coerce = coerce;
exports.disable = disable;
exports.enable = enable;
exports.enabled = enabled;
-exports.humanize = __webpack_require__(675);
+exports.humanize = __webpack_require__(673);
/**
* The currently active debug mode names, and names to skip.
@@ -80125,7 +79980,7 @@ function coerce(val) {
/***/ }),
-/* 675 */
+/* 673 */
/***/ (function(module, exports) {
/**
@@ -80283,7 +80138,7 @@ function plural(ms, n, name) {
/***/ }),
-/* 676 */
+/* 674 */
/***/ (function(module, exports, __webpack_require__) {
/**
@@ -80299,7 +80154,7 @@ var util = __webpack_require__(111);
* Expose `debug()` as the module.
*/
-exports = module.exports = __webpack_require__(674);
+exports = module.exports = __webpack_require__(672);
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
@@ -80478,7 +80333,7 @@ function createWritableStdioStream (fd) {
case 'PIPE':
case 'TCP':
- var net = __webpack_require__(613);
+ var net = __webpack_require__(611);
stream = new net.Socket({
fd: fd,
readable: false,
@@ -80537,15 +80392,15 @@ exports.enable(load());
/***/ }),
-/* 677 */
+/* 675 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var brackets = __webpack_require__(667);
-var define = __webpack_require__(678);
-var utils = __webpack_require__(679);
+var brackets = __webpack_require__(665);
+var define = __webpack_require__(676);
+var utils = __webpack_require__(677);
/**
* Characters to use in text regex (we want to "not" match
@@ -80700,7 +80555,7 @@ module.exports = parsers;
/***/ }),
-/* 678 */
+/* 676 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -80713,7 +80568,7 @@ module.exports = parsers;
-var isDescriptor = __webpack_require__(560);
+var isDescriptor = __webpack_require__(558);
module.exports = function defineProperty(obj, prop, val) {
if (typeof obj !== 'object' && typeof obj !== 'function') {
@@ -80738,14 +80593,14 @@ module.exports = function defineProperty(obj, prop, val) {
/***/ }),
-/* 679 */
+/* 677 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var regex = __webpack_require__(536);
-var Cache = __webpack_require__(658);
+var regex = __webpack_require__(534);
+var Cache = __webpack_require__(656);
/**
* Utils
@@ -80814,7 +80669,7 @@ utils.createRegex = function(str) {
/***/ }),
-/* 680 */
+/* 678 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -80824,16 +80679,16 @@ utils.createRegex = function(str) {
* Module dependencies
*/
-var Snapdragon = __webpack_require__(568);
-var define = __webpack_require__(678);
-var extend = __webpack_require__(537);
+var Snapdragon = __webpack_require__(566);
+var define = __webpack_require__(676);
+var extend = __webpack_require__(535);
/**
* Local dependencies
*/
-var compilers = __webpack_require__(666);
-var parsers = __webpack_require__(677);
+var compilers = __webpack_require__(664);
+var parsers = __webpack_require__(675);
/**
* Customize Snapdragon parser and renderer
@@ -80899,16 +80754,16 @@ module.exports = Extglob;
/***/ }),
-/* 681 */
+/* 679 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var extglob = __webpack_require__(665);
-var nanomatch = __webpack_require__(649);
-var regexNot = __webpack_require__(536);
-var toRegex = __webpack_require__(637);
+var extglob = __webpack_require__(663);
+var nanomatch = __webpack_require__(647);
+var regexNot = __webpack_require__(534);
+var toRegex = __webpack_require__(635);
var not;
/**
@@ -80989,14 +80844,14 @@ function textRegex(pattern) {
/***/ }),
-/* 682 */
+/* 680 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = new (__webpack_require__(658))();
+module.exports = new (__webpack_require__(656))();
/***/ }),
-/* 683 */
+/* 681 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -81009,13 +80864,13 @@ var path = __webpack_require__(4);
* Module dependencies
*/
-var Snapdragon = __webpack_require__(568);
-utils.define = __webpack_require__(644);
-utils.diff = __webpack_require__(662);
-utils.extend = __webpack_require__(645);
-utils.pick = __webpack_require__(663);
-utils.typeOf = __webpack_require__(684);
-utils.unique = __webpack_require__(539);
+var Snapdragon = __webpack_require__(566);
+utils.define = __webpack_require__(642);
+utils.diff = __webpack_require__(660);
+utils.extend = __webpack_require__(643);
+utils.pick = __webpack_require__(661);
+utils.typeOf = __webpack_require__(682);
+utils.unique = __webpack_require__(537);
/**
* Returns true if the platform is windows, or `path.sep` is `\\`.
@@ -81312,7 +81167,7 @@ utils.unixify = function(options) {
/***/ }),
-/* 684 */
+/* 682 */
/***/ (function(module, exports) {
var toString = Object.prototype.toString;
@@ -81447,7 +81302,7 @@ function isBuffer(val) {
/***/ }),
-/* 685 */
+/* 683 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -81466,9 +81321,9 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-var readdir = __webpack_require__(686);
-var reader_1 = __webpack_require__(699);
-var fs_stream_1 = __webpack_require__(703);
+var readdir = __webpack_require__(684);
+var reader_1 = __webpack_require__(697);
+var fs_stream_1 = __webpack_require__(701);
var ReaderAsync = /** @class */ (function (_super) {
__extends(ReaderAsync, _super);
function ReaderAsync() {
@@ -81529,15 +81384,15 @@ exports.default = ReaderAsync;
/***/ }),
-/* 686 */
+/* 684 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const readdirSync = __webpack_require__(687);
-const readdirAsync = __webpack_require__(695);
-const readdirStream = __webpack_require__(698);
+const readdirSync = __webpack_require__(685);
+const readdirAsync = __webpack_require__(693);
+const readdirStream = __webpack_require__(696);
module.exports = exports = readdirAsyncPath;
exports.readdir = exports.readdirAsync = exports.async = readdirAsyncPath;
@@ -81621,7 +81476,7 @@ function readdirStreamStat (dir, options) {
/***/ }),
-/* 687 */
+/* 685 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -81629,11 +81484,11 @@ function readdirStreamStat (dir, options) {
module.exports = readdirSync;
-const DirectoryReader = __webpack_require__(688);
+const DirectoryReader = __webpack_require__(686);
let syncFacade = {
- fs: __webpack_require__(693),
- forEach: __webpack_require__(694),
+ fs: __webpack_require__(691),
+ forEach: __webpack_require__(692),
sync: true
};
@@ -81662,7 +81517,7 @@ function readdirSync (dir, options, internalOptions) {
/***/ }),
-/* 688 */
+/* 686 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -81671,9 +81526,9 @@ function readdirSync (dir, options, internalOptions) {
const Readable = __webpack_require__(137).Readable;
const EventEmitter = __webpack_require__(155).EventEmitter;
const path = __webpack_require__(4);
-const normalizeOptions = __webpack_require__(689);
-const stat = __webpack_require__(691);
-const call = __webpack_require__(692);
+const normalizeOptions = __webpack_require__(687);
+const stat = __webpack_require__(689);
+const call = __webpack_require__(690);
/**
* Asynchronously reads the contents of a directory and streams the results
@@ -82049,14 +81904,14 @@ module.exports = DirectoryReader;
/***/ }),
-/* 689 */
+/* 687 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(4);
-const globToRegExp = __webpack_require__(690);
+const globToRegExp = __webpack_require__(688);
module.exports = normalizeOptions;
@@ -82233,7 +82088,7 @@ function normalizeOptions (options, internalOptions) {
/***/ }),
-/* 690 */
+/* 688 */
/***/ (function(module, exports) {
module.exports = function (glob, opts) {
@@ -82370,13 +82225,13 @@ module.exports = function (glob, opts) {
/***/ }),
-/* 691 */
+/* 689 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const call = __webpack_require__(692);
+const call = __webpack_require__(690);
module.exports = stat;
@@ -82451,7 +82306,7 @@ function symlinkStat (fs, path, lstats, callback) {
/***/ }),
-/* 692 */
+/* 690 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -82512,14 +82367,14 @@ function callOnce (fn) {
/***/ }),
-/* 693 */
+/* 691 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(133);
-const call = __webpack_require__(692);
+const call = __webpack_require__(690);
/**
* A facade around {@link fs.readdirSync} that allows it to be called
@@ -82583,7 +82438,7 @@ exports.lstat = function (path, callback) {
/***/ }),
-/* 694 */
+/* 692 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -82612,7 +82467,7 @@ function syncForEach (array, iterator, done) {
/***/ }),
-/* 695 */
+/* 693 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -82620,12 +82475,12 @@ function syncForEach (array, iterator, done) {
module.exports = readdirAsync;
-const maybe = __webpack_require__(696);
-const DirectoryReader = __webpack_require__(688);
+const maybe = __webpack_require__(694);
+const DirectoryReader = __webpack_require__(686);
let asyncFacade = {
fs: __webpack_require__(133),
- forEach: __webpack_require__(697),
+ forEach: __webpack_require__(695),
async: true
};
@@ -82667,7 +82522,7 @@ function readdirAsync (dir, options, callback, internalOptions) {
/***/ }),
-/* 696 */
+/* 694 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -82694,7 +82549,7 @@ module.exports = function maybe (cb, promise) {
/***/ }),
-/* 697 */
+/* 695 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -82730,7 +82585,7 @@ function asyncForEach (array, iterator, done) {
/***/ }),
-/* 698 */
+/* 696 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -82738,11 +82593,11 @@ function asyncForEach (array, iterator, done) {
module.exports = readdirStream;
-const DirectoryReader = __webpack_require__(688);
+const DirectoryReader = __webpack_require__(686);
let streamFacade = {
fs: __webpack_require__(133),
- forEach: __webpack_require__(697),
+ forEach: __webpack_require__(695),
async: true
};
@@ -82762,16 +82617,16 @@ function readdirStream (dir, options, internalOptions) {
/***/ }),
-/* 699 */
+/* 697 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var path = __webpack_require__(4);
-var deep_1 = __webpack_require__(700);
-var entry_1 = __webpack_require__(702);
-var pathUtil = __webpack_require__(701);
+var deep_1 = __webpack_require__(698);
+var entry_1 = __webpack_require__(700);
+var pathUtil = __webpack_require__(699);
var Reader = /** @class */ (function () {
function Reader(options) {
this.options = options;
@@ -82837,14 +82692,14 @@ exports.default = Reader;
/***/ }),
-/* 700 */
+/* 698 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var pathUtils = __webpack_require__(701);
-var patternUtils = __webpack_require__(518);
+var pathUtils = __webpack_require__(699);
+var patternUtils = __webpack_require__(516);
var DeepFilter = /** @class */ (function () {
function DeepFilter(options, micromatchOptions) {
this.options = options;
@@ -82927,7 +82782,7 @@ exports.default = DeepFilter;
/***/ }),
-/* 701 */
+/* 699 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -82958,14 +82813,14 @@ exports.makeAbsolute = makeAbsolute;
/***/ }),
-/* 702 */
+/* 700 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var pathUtils = __webpack_require__(701);
-var patternUtils = __webpack_require__(518);
+var pathUtils = __webpack_require__(699);
+var patternUtils = __webpack_require__(516);
var EntryFilter = /** @class */ (function () {
function EntryFilter(options, micromatchOptions) {
this.options = options;
@@ -83050,7 +82905,7 @@ exports.default = EntryFilter;
/***/ }),
-/* 703 */
+/* 701 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83070,8 +82925,8 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var stream = __webpack_require__(137);
-var fsStat = __webpack_require__(704);
-var fs_1 = __webpack_require__(708);
+var fsStat = __webpack_require__(702);
+var fs_1 = __webpack_require__(706);
var FileSystemStream = /** @class */ (function (_super) {
__extends(FileSystemStream, _super);
function FileSystemStream() {
@@ -83121,14 +82976,14 @@ exports.default = FileSystemStream;
/***/ }),
-/* 704 */
+/* 702 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-const optionsManager = __webpack_require__(705);
-const statProvider = __webpack_require__(707);
+const optionsManager = __webpack_require__(703);
+const statProvider = __webpack_require__(705);
/**
* Asynchronous API.
*/
@@ -83159,13 +83014,13 @@ exports.statSync = statSync;
/***/ }),
-/* 705 */
+/* 703 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-const fsAdapter = __webpack_require__(706);
+const fsAdapter = __webpack_require__(704);
function prepare(opts) {
const options = Object.assign({
fs: fsAdapter.getFileSystemAdapter(opts ? opts.fs : undefined),
@@ -83178,7 +83033,7 @@ exports.prepare = prepare;
/***/ }),
-/* 706 */
+/* 704 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83201,7 +83056,7 @@ exports.getFileSystemAdapter = getFileSystemAdapter;
/***/ }),
-/* 707 */
+/* 705 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83253,7 +83108,7 @@ exports.isFollowedSymlink = isFollowedSymlink;
/***/ }),
-/* 708 */
+/* 706 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83284,7 +83139,7 @@ exports.default = FileSystem;
/***/ }),
-/* 709 */
+/* 707 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83304,9 +83159,9 @@ var __extends = (this && this.__extends) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
var stream = __webpack_require__(137);
-var readdir = __webpack_require__(686);
-var reader_1 = __webpack_require__(699);
-var fs_stream_1 = __webpack_require__(703);
+var readdir = __webpack_require__(684);
+var reader_1 = __webpack_require__(697);
+var fs_stream_1 = __webpack_require__(701);
var TransformStream = /** @class */ (function (_super) {
__extends(TransformStream, _super);
function TransformStream(reader) {
@@ -83374,7 +83229,7 @@ exports.default = ReaderStream;
/***/ }),
-/* 710 */
+/* 708 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83393,9 +83248,9 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-var readdir = __webpack_require__(686);
-var reader_1 = __webpack_require__(699);
-var fs_sync_1 = __webpack_require__(711);
+var readdir = __webpack_require__(684);
+var reader_1 = __webpack_require__(697);
+var fs_sync_1 = __webpack_require__(709);
var ReaderSync = /** @class */ (function (_super) {
__extends(ReaderSync, _super);
function ReaderSync() {
@@ -83455,7 +83310,7 @@ exports.default = ReaderSync;
/***/ }),
-/* 711 */
+/* 709 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83474,8 +83329,8 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
-var fsStat = __webpack_require__(704);
-var fs_1 = __webpack_require__(708);
+var fsStat = __webpack_require__(702);
+var fs_1 = __webpack_require__(706);
var FileSystemSync = /** @class */ (function (_super) {
__extends(FileSystemSync, _super);
function FileSystemSync() {
@@ -83521,7 +83376,7 @@ exports.default = FileSystemSync;
/***/ }),
-/* 712 */
+/* 710 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83537,13 +83392,13 @@ exports.flatten = flatten;
/***/ }),
-/* 713 */
+/* 711 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-var merge2 = __webpack_require__(299);
+var merge2 = __webpack_require__(291);
/**
* Merge multiple streams and propagate their errors into one stream in parallel.
*/
@@ -83558,13 +83413,13 @@ exports.merge = merge;
/***/ }),
-/* 714 */
+/* 712 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(4);
-const pathType = __webpack_require__(715);
+const pathType = __webpack_require__(713);
const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0];
@@ -83630,13 +83485,13 @@ module.exports.sync = (input, opts) => {
/***/ }),
-/* 715 */
+/* 713 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(133);
-const pify = __webpack_require__(716);
+const pify = __webpack_require__(714);
function type(fn, fn2, fp) {
if (typeof fp !== 'string') {
@@ -83679,7 +83534,7 @@ exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
/***/ }),
-/* 716 */
+/* 714 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -83770,17 +83625,17 @@ module.exports = (obj, opts) => {
/***/ }),
-/* 717 */
+/* 715 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const fs = __webpack_require__(133);
const path = __webpack_require__(4);
-const fastGlob = __webpack_require__(514);
-const gitIgnore = __webpack_require__(718);
-const pify = __webpack_require__(719);
-const slash = __webpack_require__(720);
+const fastGlob = __webpack_require__(512);
+const gitIgnore = __webpack_require__(716);
+const pify = __webpack_require__(717);
+const slash = __webpack_require__(718);
const DEFAULT_IGNORE = [
'**/node_modules/**',
@@ -83878,7 +83733,7 @@ module.exports.sync = options => {
/***/ }),
-/* 718 */
+/* 716 */
/***/ (function(module, exports) {
// A simple implementation of make-array
@@ -84347,7 +84202,7 @@ module.exports = options => new IgnoreBase(options)
/***/ }),
-/* 719 */
+/* 717 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -84422,7 +84277,7 @@ module.exports = (input, options) => {
/***/ }),
-/* 720 */
+/* 718 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -84440,7 +84295,7 @@ module.exports = input => {
/***/ }),
-/* 721 */
+/* 719 */
/***/ (function(module, exports, __webpack_require__) {
/*!
@@ -84450,7 +84305,7 @@ module.exports = input => {
* Released under the MIT License.
*/
-var isExtglob = __webpack_require__(310);
+var isExtglob = __webpack_require__(302);
var chars = { '{': '}', '(': ')', '[': ']'};
var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
@@ -84494,17 +84349,17 @@ module.exports = function isGlob(str, options) {
/***/ }),
-/* 722 */
+/* 720 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const path = __webpack_require__(4);
const {constants: fsConstants} = __webpack_require__(133);
-const pEvent = __webpack_require__(723);
-const CpFileError = __webpack_require__(726);
-const fs = __webpack_require__(730);
-const ProgressEmitter = __webpack_require__(733);
+const pEvent = __webpack_require__(721);
+const CpFileError = __webpack_require__(724);
+const fs = __webpack_require__(728);
+const ProgressEmitter = __webpack_require__(731);
const cpFileAsync = async (source, destination, options, progressEmitter) => {
let readError;
@@ -84618,12 +84473,12 @@ module.exports.sync = (source, destination, options) => {
/***/ }),
-/* 723 */
+/* 721 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const pTimeout = __webpack_require__(724);
+const pTimeout = __webpack_require__(722);
const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator';
@@ -84914,12 +84769,12 @@ module.exports.iterator = (emitter, event, options) => {
/***/ }),
-/* 724 */
+/* 722 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const pFinally = __webpack_require__(725);
+const pFinally = __webpack_require__(723);
class TimeoutError extends Error {
constructor(message) {
@@ -84965,7 +84820,7 @@ module.exports.TimeoutError = TimeoutError;
/***/ }),
-/* 725 */
+/* 723 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -84987,12 +84842,12 @@ module.exports = (promise, onFinally) => {
/***/ }),
-/* 726 */
+/* 724 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const NestedError = __webpack_require__(727);
+const NestedError = __webpack_require__(725);
class CpFileError extends NestedError {
constructor(message, nested) {
@@ -85006,10 +84861,10 @@ module.exports = CpFileError;
/***/ }),
-/* 727 */
+/* 725 */
/***/ (function(module, exports, __webpack_require__) {
-var inherits = __webpack_require__(728);
+var inherits = __webpack_require__(726);
var NestedError = function (message, nested) {
this.nested = nested;
@@ -85060,7 +84915,7 @@ module.exports = NestedError;
/***/ }),
-/* 728 */
+/* 726 */
/***/ (function(module, exports, __webpack_require__) {
try {
@@ -85068,12 +84923,12 @@ try {
if (typeof util.inherits !== 'function') throw '';
module.exports = util.inherits;
} catch (e) {
- module.exports = __webpack_require__(729);
+ module.exports = __webpack_require__(727);
}
/***/ }),
-/* 729 */
+/* 727 */
/***/ (function(module, exports) {
if (typeof Object.create === 'function') {
@@ -85102,16 +84957,16 @@ if (typeof Object.create === 'function') {
/***/ }),
-/* 730 */
+/* 728 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const {promisify} = __webpack_require__(111);
const fs = __webpack_require__(132);
-const makeDir = __webpack_require__(731);
-const pEvent = __webpack_require__(723);
-const CpFileError = __webpack_require__(726);
+const makeDir = __webpack_require__(729);
+const pEvent = __webpack_require__(721);
+const CpFileError = __webpack_require__(724);
const stat = promisify(fs.stat);
const lstat = promisify(fs.lstat);
@@ -85208,7 +85063,7 @@ exports.copyFileSync = (source, destination, flags) => {
/***/ }),
-/* 731 */
+/* 729 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -85216,7 +85071,7 @@ exports.copyFileSync = (source, destination, flags) => {
const fs = __webpack_require__(133);
const path = __webpack_require__(4);
const {promisify} = __webpack_require__(111);
-const semver = __webpack_require__(732);
+const semver = __webpack_require__(730);
const useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0');
@@ -85371,7 +85226,7 @@ module.exports.sync = (input, options) => {
/***/ }),
-/* 732 */
+/* 730 */
/***/ (function(module, exports) {
exports = module.exports = SemVer
@@ -86973,7 +86828,7 @@ function coerce (version, options) {
/***/ }),
-/* 733 */
+/* 731 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -87014,7 +86869,7 @@ module.exports = ProgressEmitter;
/***/ }),
-/* 734 */
+/* 732 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -87060,12 +86915,12 @@ exports.default = module.exports;
/***/ }),
-/* 735 */
+/* 733 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-const NestedError = __webpack_require__(736);
+const NestedError = __webpack_require__(734);
class CpyError extends NestedError {
constructor(message, nested) {
@@ -87079,7 +86934,7 @@ module.exports = CpyError;
/***/ }),
-/* 736 */
+/* 734 */
/***/ (function(module, exports, __webpack_require__) {
var inherits = __webpack_require__(111).inherits;
diff --git a/scripts/generate_plugin.js b/scripts/generate_plugin.js
index e080afb183aa8..f695eabb30f21 100644
--- a/scripts/generate_plugin.js
+++ b/scripts/generate_plugin.js
@@ -17,5 +17,5 @@
* under the License.
*/
-require('../src/setup_node_env');
-require('@kbn/plugin-generator').run(process.argv.slice(2));
+require('../src/setup_node_env/prebuilt_dev_only_entry');
+require('@kbn/plugin-generator').runCli();
diff --git a/src/core/server/elasticsearch/client/cluster_client.test.ts b/src/core/server/elasticsearch/client/cluster_client.test.ts
index 85517b80745f1..121ef3aa42d51 100644
--- a/src/core/server/elasticsearch/client/cluster_client.test.ts
+++ b/src/core/server/elasticsearch/client/cluster_client.test.ts
@@ -96,7 +96,7 @@ describe('ClusterClient', () => {
expect(scopedClusterClient.asCurrentUser).toBe(scopedClient.child.mock.results[0].value);
});
- it('returns a distinct scoped cluster client on each call', () => {
+ it('returns a distinct scoped cluster client on each call', () => {
const clusterClient = new ClusterClient(createConfig(), logger, getAuthHeaders);
const request = httpServerMock.createKibanaRequest();
@@ -127,7 +127,7 @@ describe('ClusterClient', () => {
expect(scopedClient.child).toHaveBeenCalledTimes(1);
expect(scopedClient.child).toHaveBeenCalledWith({
- headers: { foo: 'bar' },
+ headers: { foo: 'bar', 'x-opaque-id': expect.any(String) },
});
});
@@ -147,7 +147,7 @@ describe('ClusterClient', () => {
expect(scopedClient.child).toHaveBeenCalledTimes(1);
expect(scopedClient.child).toHaveBeenCalledWith({
- headers: { authorization: 'auth' },
+ headers: { authorization: 'auth', 'x-opaque-id': expect.any(String) },
});
});
@@ -171,7 +171,7 @@ describe('ClusterClient', () => {
expect(scopedClient.child).toHaveBeenCalledTimes(1);
expect(scopedClient.child).toHaveBeenCalledWith({
- headers: { authorization: 'auth' },
+ headers: { authorization: 'auth', 'x-opaque-id': expect.any(String) },
});
});
@@ -195,6 +195,26 @@ describe('ClusterClient', () => {
headers: {
foo: 'bar',
hello: 'dolly',
+ 'x-opaque-id': expect.any(String),
+ },
+ });
+ });
+
+ it('adds the x-opaque-id header based on the request id', () => {
+ const config = createConfig();
+ getAuthHeaders.mockReturnValue({});
+
+ const clusterClient = new ClusterClient(config, logger, getAuthHeaders);
+ const request = httpServerMock.createKibanaRequest({
+ kibanaRequestState: { requestId: 'my-fake-id' },
+ });
+
+ clusterClient.asScoped(request);
+
+ expect(scopedClient.child).toHaveBeenCalledTimes(1);
+ expect(scopedClient.child).toHaveBeenCalledWith({
+ headers: {
+ 'x-opaque-id': 'my-fake-id',
},
});
});
@@ -221,6 +241,7 @@ describe('ClusterClient', () => {
headers: {
foo: 'auth',
hello: 'dolly',
+ 'x-opaque-id': expect.any(String),
},
});
});
@@ -247,6 +268,31 @@ describe('ClusterClient', () => {
headers: {
foo: 'request',
hello: 'dolly',
+ 'x-opaque-id': expect.any(String),
+ },
+ });
+ });
+
+ it('respect the precedence of x-opaque-id header over config headers', () => {
+ const config = createConfig({
+ customHeaders: {
+ 'x-opaque-id': 'from config',
+ },
+ });
+ getAuthHeaders.mockReturnValue({});
+
+ const clusterClient = new ClusterClient(config, logger, getAuthHeaders);
+ const request = httpServerMock.createKibanaRequest({
+ headers: { foo: 'request' },
+ kibanaRequestState: { requestId: 'from request' },
+ });
+
+ clusterClient.asScoped(request);
+
+ expect(scopedClient.child).toHaveBeenCalledTimes(1);
+ expect(scopedClient.child).toHaveBeenCalledWith({
+ headers: {
+ 'x-opaque-id': 'from request',
},
});
});
diff --git a/src/core/server/elasticsearch/client/cluster_client.ts b/src/core/server/elasticsearch/client/cluster_client.ts
index d9a0e6fe3f238..ffe0c10321fff 100644
--- a/src/core/server/elasticsearch/client/cluster_client.ts
+++ b/src/core/server/elasticsearch/client/cluster_client.ts
@@ -19,7 +19,7 @@
import { Client } from '@elastic/elasticsearch';
import { Logger } from '../../logging';
-import { GetAuthHeaders, isRealRequest, Headers } from '../../http';
+import { GetAuthHeaders, Headers, isKibanaRequest, isRealRequest } from '../../http';
import { ensureRawRequest, filterHeaders } from '../../http/router';
import { ScopeableRequest } from '../types';
import { ElasticsearchClient } from './types';
@@ -95,12 +95,14 @@ export class ClusterClient implements ICustomClusterClient {
private getScopedHeaders(request: ScopeableRequest): Headers {
let scopedHeaders: Headers;
if (isRealRequest(request)) {
- const authHeaders = this.getAuthHeaders(request);
const requestHeaders = ensureRawRequest(request).headers;
- scopedHeaders = filterHeaders(
- { ...requestHeaders, ...authHeaders },
- this.config.requestHeadersWhitelist
- );
+ const requestIdHeaders = isKibanaRequest(request) ? { 'x-opaque-id': request.id } : {};
+ const authHeaders = this.getAuthHeaders(request);
+
+ scopedHeaders = filterHeaders({ ...requestHeaders, ...requestIdHeaders, ...authHeaders }, [
+ 'x-opaque-id',
+ ...this.config.requestHeadersWhitelist,
+ ]);
} else {
scopedHeaders = filterHeaders(request?.headers ?? {}, this.config.requestHeadersWhitelist);
}
diff --git a/src/core/server/elasticsearch/legacy/cluster_client.test.ts b/src/core/server/elasticsearch/legacy/cluster_client.test.ts
index fd57d06e61eee..73d941053e84b 100644
--- a/src/core/server/elasticsearch/legacy/cluster_client.test.ts
+++ b/src/core/server/elasticsearch/legacy/cluster_client.test.ts
@@ -349,6 +349,20 @@ describe('#asScoped', () => {
);
});
+ test('passes x-opaque-id header with request id', () => {
+ clusterClient.asScoped(
+ httpServerMock.createKibanaRequest({ kibanaRequestState: { requestId: 'alpha' } })
+ );
+
+ expect(MockScopedClusterClient).toHaveBeenCalledTimes(1);
+ expect(MockScopedClusterClient).toHaveBeenCalledWith(
+ expect.any(Function),
+ expect.any(Function),
+ { 'x-opaque-id': 'alpha' },
+ expect.any(Object)
+ );
+ });
+
test('both scoped and internal API caller fail if cluster client is closed', async () => {
clusterClient.asScoped(
httpServerMock.createRawRequest({ headers: { zero: '0', one: '1', two: '2', three: '3' } })
@@ -482,7 +496,7 @@ describe('#asScoped', () => {
expect(MockScopedClusterClient).toHaveBeenCalledWith(
expect.any(Function),
expect.any(Function),
- {},
+ expect.objectContaining({ 'x-opaque-id': expect.any(String) }),
auditor
);
});
diff --git a/src/core/server/elasticsearch/legacy/cluster_client.ts b/src/core/server/elasticsearch/legacy/cluster_client.ts
index f8b2d39a4251c..81cbb5a10d7c6 100644
--- a/src/core/server/elasticsearch/legacy/cluster_client.ts
+++ b/src/core/server/elasticsearch/legacy/cluster_client.ts
@@ -20,7 +20,7 @@ import { Client } from 'elasticsearch';
import { get } from 'lodash';
import { LegacyElasticsearchErrorHelpers } from './errors';
-import { GetAuthHeaders, isRealRequest, KibanaRequest } from '../../http';
+import { GetAuthHeaders, KibanaRequest, isKibanaRequest, isRealRequest } from '../../http';
import { AuditorFactory } from '../../audit_trail';
import { filterHeaders, ensureRawRequest } from '../../http/router';
import { Logger } from '../../logging';
@@ -207,7 +207,10 @@ export class LegacyClusterClient implements ILegacyClusterClient {
return new LegacyScopedClusterClient(
this.callAsInternalUser,
this.callAsCurrentUser,
- filterHeaders(this.getHeaders(request), this.config.requestHeadersWhitelist),
+ filterHeaders(this.getHeaders(request), [
+ 'x-opaque-id',
+ ...this.config.requestHeadersWhitelist,
+ ]),
this.getScopedAuditor(request)
);
}
@@ -215,8 +218,7 @@ export class LegacyClusterClient implements ILegacyClusterClient {
private getScopedAuditor(request?: ScopeableRequest) {
// TODO: support alternative credential owners from outside of Request context in #39430
if (request && isRealRequest(request)) {
- const kibanaRequest =
- request instanceof KibanaRequest ? request : KibanaRequest.from(request);
+ const kibanaRequest = isKibanaRequest(request) ? request : KibanaRequest.from(request);
const auditorFactory = this.getAuditorFactory();
return auditorFactory.asScoped(kibanaRequest);
}
@@ -256,8 +258,9 @@ export class LegacyClusterClient implements ILegacyClusterClient {
return request && request.headers ? request.headers : {};
}
const authHeaders = this.getAuthHeaders(request);
- const headers = ensureRawRequest(request).headers;
+ const requestHeaders = ensureRawRequest(request).headers;
+ const requestIdHeaders = isKibanaRequest(request) ? { 'x-opaque-id': request.id } : {};
- return { ...headers, ...authHeaders };
+ return { ...requestHeaders, ...requestIdHeaders, ...authHeaders };
}
}
diff --git a/src/core/server/http/__snapshots__/http_config.test.ts.snap b/src/core/server/http/__snapshots__/http_config.test.ts.snap
index d48ead3cec8e1..e9b818fe859ec 100644
--- a/src/core/server/http/__snapshots__/http_config.test.ts.snap
+++ b/src/core/server/http/__snapshots__/http_config.test.ts.snap
@@ -39,6 +39,10 @@ Object {
},
"name": "kibana-hostname",
"port": 5601,
+ "requestId": Object {
+ "allowFromAnyIp": false,
+ "ipAllowlist": Array [],
+ },
"rewriteBasePath": false,
"socketTimeout": 120000,
"ssl": Object {
diff --git a/src/core/server/http/cookie_session_storage.test.ts b/src/core/server/http/cookie_session_storage.test.ts
index 1fb2b5693bb61..8e5dec7d4eadd 100644
--- a/src/core/server/http/cookie_session_storage.test.ts
+++ b/src/core/server/http/cookie_session_storage.test.ts
@@ -63,6 +63,10 @@ configService.atPath.mockReturnValue(
whitelist: [],
},
customResponseHeaders: {},
+ requestId: {
+ allowFromAnyIp: true,
+ ipAllowlist: [],
+ },
} as any)
);
diff --git a/src/core/server/http/http_config.test.ts b/src/core/server/http/http_config.test.ts
index 0698f118be03f..58e6699582e13 100644
--- a/src/core/server/http/http_config.test.ts
+++ b/src/core/server/http/http_config.test.ts
@@ -54,6 +54,63 @@ test('throws if invalid hostname', () => {
expect(() => httpSchema.validate(obj)).toThrowErrorMatchingSnapshot();
});
+describe('requestId', () => {
+ test('accepts valid ip addresses', () => {
+ const {
+ requestId: { ipAllowlist },
+ } = config.schema.validate({
+ requestId: {
+ allowFromAnyIp: false,
+ ipAllowlist: ['0.0.0.0', '123.123.123.123', '1200:0000:AB00:1234:0000:2552:7777:1313'],
+ },
+ });
+ expect(ipAllowlist).toMatchInlineSnapshot(`
+ Array [
+ "0.0.0.0",
+ "123.123.123.123",
+ "1200:0000:AB00:1234:0000:2552:7777:1313",
+ ]
+ `);
+ });
+
+ test('rejects invalid ip addresses', () => {
+ expect(() => {
+ config.schema.validate({
+ requestId: {
+ allowFromAnyIp: false,
+ ipAllowlist: ['1200:0000:AB00:1234:O000:2552:7777:1313', '[2001:db8:0:1]:80'],
+ },
+ });
+ }).toThrowErrorMatchingInlineSnapshot(
+ `"[requestId.ipAllowlist.0]: value must be a valid ipv4 or ipv6 address"`
+ );
+ });
+
+ test('rejects if allowFromAnyIp is `true` and `ipAllowlist` is non-empty', () => {
+ expect(() => {
+ config.schema.validate({
+ requestId: {
+ allowFromAnyIp: true,
+ ipAllowlist: ['0.0.0.0', '123.123.123.123', '1200:0000:AB00:1234:0000:2552:7777:1313'],
+ },
+ });
+ }).toThrowErrorMatchingInlineSnapshot(
+ `"[requestId]: allowFromAnyIp must be set to 'false' if any values are specified in ipAllowlist"`
+ );
+
+ expect(() => {
+ config.schema.validate({
+ requestId: {
+ allowFromAnyIp: true,
+ ipAllowlist: ['0.0.0.0', '123.123.123.123', '1200:0000:AB00:1234:0000:2552:7777:1313'],
+ },
+ });
+ }).toThrowErrorMatchingInlineSnapshot(
+ `"[requestId]: allowFromAnyIp must be set to 'false' if any values are specified in ipAllowlist"`
+ );
+ });
+});
+
test('can specify max payload as string', () => {
const obj = {
maxPayload: '2mb',
diff --git a/src/core/server/http/http_config.ts b/src/core/server/http/http_config.ts
index e74f6d32e92b0..7d41b4ea9e915 100644
--- a/src/core/server/http/http_config.ts
+++ b/src/core/server/http/http_config.ts
@@ -87,6 +87,19 @@ export const config = {
{ defaultValue: [] }
),
}),
+ requestId: schema.object(
+ {
+ allowFromAnyIp: schema.boolean({ defaultValue: false }),
+ ipAllowlist: schema.arrayOf(schema.ip(), { defaultValue: [] }),
+ },
+ {
+ validate(value) {
+ if (value.allowFromAnyIp === true && value.ipAllowlist?.length > 0) {
+ return `allowFromAnyIp must be set to 'false' if any values are specified in ipAllowlist`;
+ }
+ },
+ }
+ ),
},
{
validate: (rawConfig) => {
@@ -130,6 +143,7 @@ export class HttpConfig {
public compression: { enabled: boolean; referrerWhitelist?: string[] };
public csp: ICspConfig;
public xsrf: { disableProtection: boolean; whitelist: string[] };
+ public requestId: { allowFromAnyIp: boolean; ipAllowlist: string[] };
/**
* @internal
@@ -158,6 +172,7 @@ export class HttpConfig {
this.compression = rawHttpConfig.compression;
this.csp = new CspConfig(rawCspConfig);
this.xsrf = rawHttpConfig.xsrf;
+ this.requestId = rawHttpConfig.requestId;
}
}
diff --git a/src/core/server/http/http_server.mocks.ts b/src/core/server/http/http_server.mocks.ts
index ba6662db3655e..6d096b76263b5 100644
--- a/src/core/server/http/http_server.mocks.ts
+++ b/src/core/server/http/http_server.mocks.ts
@@ -29,7 +29,8 @@ import {
RouteMethod,
KibanaResponseFactory,
RouteValidationSpec,
- KibanaRouteState,
+ KibanaRouteOptions,
+ KibanaRequestState,
} from './router';
import { OnPreResponseToolkit } from './lifecycle/on_pre_response';
import { OnPostAuthToolkit } from './lifecycle/on_post_auth';
@@ -45,7 +46,8 @@ interface RequestFixtureOptions {
method?: RouteMethod;
socket?: Socket;
routeTags?: string[];
- kibanaRouteState?: KibanaRouteState;
+ kibanaRouteOptions?: KibanaRouteOptions;
+ kibanaRequestState?: KibanaRequestState;
routeAuthRequired?: false;
validation?: {
params?: RouteValidationSpec
;
@@ -65,13 +67,15 @@ function createKibanaRequestMock
({
routeTags,
routeAuthRequired,
validation = {},
- kibanaRouteState = { xsrfRequired: true },
+ kibanaRouteOptions = { xsrfRequired: true },
+ kibanaRequestState = { requestId: '123' },
auth = { isAuthenticated: true },
}: RequestFixtureOptions
= {}) {
const queryString = stringify(query, { sort: false });
return KibanaRequest.from
(
createRawRequestMock({
+ app: kibanaRequestState,
auth,
headers,
params,
@@ -86,7 +90,7 @@ function createKibanaRequestMock
({
search: queryString ? `?${queryString}` : queryString,
},
route: {
- settings: { tags: routeTags, auth: routeAuthRequired, app: kibanaRouteState },
+ settings: { tags: routeTags, auth: routeAuthRequired, app: kibanaRouteOptions },
},
raw: {
req: {
@@ -133,6 +137,7 @@ function createRawRequestMock(customization: DeepPartial = {}) {
raw: {
req: {
url: '/',
+ socket: {},
},
},
},
diff --git a/src/core/server/http/http_server.test.ts b/src/core/server/http/http_server.test.ts
index 007d75a69b955..7507a08dd150a 100644
--- a/src/core/server/http/http_server.test.ts
+++ b/src/core/server/http/http_server.test.ts
@@ -68,7 +68,11 @@ beforeEach(() => {
port: 10002,
ssl: { enabled: false },
compression: { enabled: true },
- } as HttpConfig;
+ requestId: {
+ allowFromAnyIp: true,
+ ipAllowlist: [],
+ },
+ } as any;
configWithSSL = {
...config,
@@ -799,6 +803,7 @@ test('exposes route details of incoming request to a route handler', async () =>
authRequired: true,
xsrfRequired: false,
tags: [],
+ timeout: {},
},
});
});
@@ -906,6 +911,9 @@ test('exposes route details of incoming request to a route handler (POST + paylo
authRequired: true,
xsrfRequired: true,
tags: [],
+ timeout: {
+ payload: 10000,
+ },
body: {
parse: true, // hapi populates the default
maxBytes: 1024, // hapi populates the default
@@ -993,129 +1001,249 @@ describe('body options', () => {
});
describe('timeout options', () => {
- test('should accept a socket "timeout" which is 3 minutes in milliseconds, "300000" for a POST', async () => {
- const { registerRouter, server: innerServer } = await server.setup(config);
+ describe('payload timeout', () => {
+ test('POST routes set the payload timeout', async () => {
+ const { registerRouter, server: innerServer } = await server.setup(config);
+
+ const router = new Router('', logger, enhanceWithContext);
+ router.post(
+ {
+ path: '/',
+ validate: false,
+ options: {
+ timeout: {
+ payload: 300000,
+ },
+ },
+ },
+ (context, req, res) => {
+ try {
+ return res.ok({
+ body: {
+ timeout: req.route.options.timeout,
+ },
+ });
+ } catch (err) {
+ return res.internalError({ body: err.message });
+ }
+ }
+ );
+ registerRouter(router);
+ await server.start();
+ await supertest(innerServer.listener)
+ .post('/')
+ .send({ test: 1 })
+ .expect(200, {
+ timeout: {
+ payload: 300000,
+ },
+ });
+ });
- const router = new Router('', logger, enhanceWithContext);
- router.post(
- {
- path: '/',
- validate: false,
- options: { timeout: 300000 },
- },
- (context, req, res) => {
- try {
- return res.ok({ body: { timeout: req.route.options.timeout } });
- } catch (err) {
- return res.internalError({ body: err.message });
+ test('DELETE routes set the payload timeout', async () => {
+ const { registerRouter, server: innerServer } = await server.setup(config);
+
+ const router = new Router('', logger, enhanceWithContext);
+ router.delete(
+ {
+ path: '/',
+ validate: false,
+ options: {
+ timeout: {
+ payload: 300000,
+ },
+ },
+ },
+ (context, req, res) => {
+ try {
+ return res.ok({
+ body: {
+ timeout: req.route.options.timeout,
+ },
+ });
+ } catch (err) {
+ return res.internalError({ body: err.message });
+ }
}
- }
- );
- registerRouter(router);
- await server.start();
- await supertest(innerServer.listener).post('/').send({ test: 1 }).expect(200, {
- timeout: 300000,
+ );
+ registerRouter(router);
+ await server.start();
+ await supertest(innerServer.listener)
+ .delete('/')
+ .expect(200, {
+ timeout: {
+ payload: 300000,
+ },
+ });
});
- });
- test('should accept a socket "timeout" which is 3 minutes in milliseconds, "300000" for a GET', async () => {
- const { registerRouter, server: innerServer } = await server.setup(config);
+ test('PUT routes set the payload timeout and automatically adjusts the idle socket timeout', async () => {
+ const { registerRouter, server: innerServer } = await server.setup(config);
+
+ const router = new Router('', logger, enhanceWithContext);
+ router.put(
+ {
+ path: '/',
+ validate: false,
+ options: {
+ timeout: {
+ payload: 300000,
+ },
+ },
+ },
+ (context, req, res) => {
+ try {
+ return res.ok({
+ body: {
+ timeout: req.route.options.timeout,
+ },
+ });
+ } catch (err) {
+ return res.internalError({ body: err.message });
+ }
+ }
+ );
+ registerRouter(router);
+ await server.start();
+ await supertest(innerServer.listener)
+ .put('/')
+ .expect(200, {
+ timeout: {
+ payload: 300000,
+ },
+ });
+ });
- const router = new Router('', logger, enhanceWithContext);
- router.get(
- {
- path: '/',
- validate: false,
- options: { timeout: 300000 },
- },
- (context, req, res) => {
- try {
- return res.ok({ body: { timeout: req.route.options.timeout } });
- } catch (err) {
- return res.internalError({ body: err.message });
+ test('PATCH routes set the payload timeout and automatically adjusts the idle socket timeout', async () => {
+ const { registerRouter, server: innerServer } = await server.setup(config);
+
+ const router = new Router('', logger, enhanceWithContext);
+ router.patch(
+ {
+ path: '/',
+ validate: false,
+ options: {
+ timeout: {
+ payload: 300000,
+ },
+ },
+ },
+ (context, req, res) => {
+ try {
+ return res.ok({
+ body: {
+ timeout: req.route.options.timeout,
+ },
+ });
+ } catch (err) {
+ return res.internalError({ body: err.message });
+ }
}
- }
- );
- registerRouter(router);
- await server.start();
- await supertest(innerServer.listener).get('/').expect(200, {
- timeout: 300000,
+ );
+ registerRouter(router);
+ await server.start();
+ await supertest(innerServer.listener)
+ .patch('/')
+ .expect(200, {
+ timeout: {
+ payload: 300000,
+ },
+ });
});
});
- test('should accept a socket "timeout" which is 3 minutes in milliseconds, "300000" for a DELETE', async () => {
- const { registerRouter, server: innerServer } = await server.setup(config);
+ describe('idleSocket timeout', () => {
+ test('uses server socket timeout when not specified in the route', async () => {
+ const { registerRouter, server: innerServer } = await server.setup({
+ ...config,
+ socketTimeout: 11000,
+ });
- const router = new Router('', logger, enhanceWithContext);
- router.delete(
- {
- path: '/',
- validate: false,
- options: { timeout: 300000 },
- },
- (context, req, res) => {
- try {
- return res.ok({ body: { timeout: req.route.options.timeout } });
- } catch (err) {
- return res.internalError({ body: err.message });
+ const router = new Router('', logger, enhanceWithContext);
+ router.get(
+ {
+ path: '/',
+ validate: { body: schema.any() },
+ },
+ (context, req, res) => {
+ return res.ok({
+ body: {
+ timeout: req.route.options.timeout,
+ },
+ });
}
- }
- );
- registerRouter(router);
- await server.start();
- await supertest(innerServer.listener).delete('/').expect(200, {
- timeout: 300000,
+ );
+ registerRouter(router);
+
+ await server.start();
+ await supertest(innerServer.listener)
+ .get('/')
+ .send()
+ .expect(200, {
+ timeout: {
+ idleSocket: 11000,
+ },
+ });
});
- });
- test('should accept a socket "timeout" which is 3 minutes in milliseconds, "300000" for a PUT', async () => {
- const { registerRouter, server: innerServer } = await server.setup(config);
+ test('sets the socket timeout when specified in the route', async () => {
+ const { registerRouter, server: innerServer } = await server.setup({
+ ...config,
+ socketTimeout: 11000,
+ });
- const router = new Router('', logger, enhanceWithContext);
- router.put(
- {
- path: '/',
- validate: false,
- options: { timeout: 300000 },
- },
- (context, req, res) => {
- try {
- return res.ok({ body: { timeout: req.route.options.timeout } });
- } catch (err) {
- return res.internalError({ body: err.message });
+ const router = new Router('', logger, enhanceWithContext);
+ router.get(
+ {
+ path: '/',
+ validate: { body: schema.any() },
+ options: { timeout: { idleSocket: 12000 } },
+ },
+ (context, req, res) => {
+ return res.ok({
+ body: {
+ timeout: req.route.options.timeout,
+ },
+ });
}
- }
- );
- registerRouter(router);
- await server.start();
- await supertest(innerServer.listener).put('/').expect(200, {
- timeout: 300000,
+ );
+ registerRouter(router);
+
+ await server.start();
+ await supertest(innerServer.listener)
+ .get('/')
+ .send()
+ .expect(200, {
+ timeout: {
+ idleSocket: 12000,
+ },
+ });
});
});
- test('should accept a socket "timeout" which is 3 minutes in milliseconds, "300000" for a PATCH', async () => {
- const { registerRouter, server: innerServer } = await server.setup(config);
+ test(`idleSocket timeout can be smaller than the payload timeout`, async () => {
+ const { registerRouter } = await server.setup(config);
const router = new Router('', logger, enhanceWithContext);
- router.patch(
+ router.post(
{
path: '/',
- validate: false,
- options: { timeout: 300000 },
+ validate: { body: schema.any() },
+ options: {
+ timeout: {
+ payload: 1000,
+ idleSocket: 10,
+ },
+ },
},
(context, req, res) => {
- try {
- return res.ok({ body: { timeout: req.route.options.timeout } });
- } catch (err) {
- return res.internalError({ body: err.message });
- }
+ return res.ok({ body: { timeout: req.route.options.timeout } });
}
);
+
registerRouter(router);
+
await server.start();
- await supertest(innerServer.listener).patch('/').expect(200, {
- timeout: 300000,
- });
});
});
diff --git a/src/core/server/http/http_server.ts b/src/core/server/http/http_server.ts
index 4b70f58deba99..7609f23fe0c51 100644
--- a/src/core/server/http/http_server.ts
+++ b/src/core/server/http/http_server.ts
@@ -22,13 +22,19 @@ import url from 'url';
import { Logger, LoggerFactory } from '../logging';
import { HttpConfig } from './http_config';
-import { createServer, getListenerOptions, getServerOptions } from './http_tools';
+import { createServer, getListenerOptions, getServerOptions, getRequestId } from './http_tools';
import { adoptToHapiAuthFormat, AuthenticationHandler } from './lifecycle/auth';
import { adoptToHapiOnPreAuth, OnPreAuthHandler } from './lifecycle/on_pre_auth';
import { adoptToHapiOnPostAuthFormat, OnPostAuthHandler } from './lifecycle/on_post_auth';
import { adoptToHapiOnRequest, OnPreRoutingHandler } from './lifecycle/on_pre_routing';
import { adoptToHapiOnPreResponseFormat, OnPreResponseHandler } from './lifecycle/on_pre_response';
-import { IRouter, RouteConfigOptions, KibanaRouteState, isSafeMethod } from './router';
+import {
+ IRouter,
+ RouteConfigOptions,
+ KibanaRouteOptions,
+ KibanaRequestState,
+ isSafeMethod,
+} from './router';
import {
SessionStorageCookieOptions,
createCookieSessionStorageFactory,
@@ -115,6 +121,7 @@ export class HttpServer {
const basePathService = new BasePath(config.basePath);
this.setupBasePathRewrite(config, basePathService);
this.setupConditionalCompression(config);
+ this.setupRequestStateAssignment(config);
return {
registerRouter: this.registerRouter.bind(this),
@@ -163,27 +170,47 @@ export class HttpServer {
const validate = isSafeMethod(route.method) ? undefined : { payload: true };
const { authRequired, tags, body = {}, timeout } = route.options;
const { accepts: allow, maxBytes, output, parse } = body;
- // Hapi does not allow timeouts on payloads to be specified for 'head' or 'get' requests
- const payloadTimeout = isSafeMethod(route.method) || timeout == null ? undefined : timeout;
- const kibanaRouteState: KibanaRouteState = {
+ const kibanaRouteOptions: KibanaRouteOptions = {
xsrfRequired: route.options.xsrfRequired ?? !isSafeMethod(route.method),
};
+ // To work around https://github.com/hapijs/hapi/issues/4122 until v20, set the socket
+ // timeout on the route to a fake timeout only when the payload timeout is specified.
+ // Within the onPreAuth lifecycle of the route itself, we'll override the timeout with the
+ // real socket timeout.
+ const fakeSocketTimeout = timeout?.payload ? timeout.payload + 1 : undefined;
+
this.server.route({
handler: route.handler,
method: route.method,
path: route.path,
options: {
auth: this.getAuthOption(authRequired),
- app: kibanaRouteState,
+ app: kibanaRouteOptions,
+ ext: {
+ onPreAuth: {
+ method: (request, h) => {
+ // At this point, the socket timeout has only been set to work-around the HapiJS bug.
+ // We need to either set the real per-route timeout or use the default idle socket timeout
+ if (timeout?.idleSocket) {
+ request.raw.req.socket.setTimeout(timeout.idleSocket);
+ } else if (fakeSocketTimeout) {
+ // NodeJS uses a socket timeout of `0` to denote "no timeout"
+ request.raw.req.socket.setTimeout(this.config!.socketTimeout ?? 0);
+ }
+
+ return h.continue;
+ },
+ },
+ },
tags: tags ? Array.from(tags) : undefined,
// TODO: This 'validate' section can be removed once the legacy platform is completely removed.
// We are telling Hapi that NP routes can accept any payload, so that it can bypass the default
// validation applied in ./http_tools#getServerOptions
// (All NP routes are already required to specify their own validation in order to access the payload)
validate,
- payload: [allow, maxBytes, output, parse, payloadTimeout].some(
+ payload: [allow, maxBytes, output, parse, timeout?.payload].some(
(v) => typeof v !== 'undefined'
)
? {
@@ -191,15 +218,12 @@ export class HttpServer {
maxBytes,
output,
parse,
- timeout: payloadTimeout,
+ timeout: timeout?.payload,
}
: undefined,
- timeout:
- timeout != null
- ? {
- socket: timeout + 1, // Hapi server requires the socket to be greater than payload settings so we add 1 millisecond
- }
- : undefined,
+ timeout: {
+ socket: fakeSocketTimeout,
+ },
},
});
}
@@ -286,6 +310,16 @@ export class HttpServer {
}
}
+ private setupRequestStateAssignment(config: HttpConfig) {
+ this.server!.ext('onRequest', (request, responseToolkit) => {
+ request.app = {
+ ...(request.app ?? {}),
+ requestId: getRequestId(request, config.requestId),
+ } as KibanaRequestState;
+ return responseToolkit.continue;
+ });
+ }
+
private registerOnPreAuth(fn: OnPreAuthHandler) {
if (this.server === undefined) {
throw new Error('Server is not created yet');
diff --git a/src/core/server/http/http_tools.test.ts b/src/core/server/http/http_tools.test.ts
index f09d862f9edac..bdeca3a87799a 100644
--- a/src/core/server/http/http_tools.test.ts
+++ b/src/core/server/http/http_tools.test.ts
@@ -26,11 +26,20 @@ jest.mock('fs', () => {
};
});
+jest.mock('uuid', () => ({
+ v4: jest.fn().mockReturnValue('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'),
+}));
+
import supertest from 'supertest';
import { Request, ResponseToolkit } from 'hapi';
import Joi from 'joi';
-import { defaultValidationErrorHandler, HapiValidationError, getServerOptions } from './http_tools';
+import {
+ defaultValidationErrorHandler,
+ HapiValidationError,
+ getServerOptions,
+ getRequestId,
+} from './http_tools';
import { HttpServer } from './http_server';
import { HttpConfig, config } from './http_config';
import { Router } from './router';
@@ -94,7 +103,11 @@ describe('timeouts', () => {
maxPayload: new ByteSizeValue(1024),
ssl: {},
compression: { enabled: true },
- } as HttpConfig);
+ requestId: {
+ allowFromAnyIp: true,
+ ipAllowlist: [],
+ },
+ } as any);
registerRouter(router);
await server.start();
@@ -173,3 +186,75 @@ describe('getServerOptions', () => {
`);
});
});
+
+describe('getRequestId', () => {
+ describe('when allowFromAnyIp is true', () => {
+ it('generates a UUID if no x-opaque-id header is present', () => {
+ const request = {
+ headers: {},
+ raw: { req: { socket: { remoteAddress: '1.1.1.1' } } },
+ } as any;
+ expect(getRequestId(request, { allowFromAnyIp: true, ipAllowlist: [] })).toEqual(
+ 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
+ );
+ });
+
+ it('uses x-opaque-id header value if present', () => {
+ const request = {
+ headers: {
+ 'x-opaque-id': 'id from header',
+ raw: { req: { socket: { remoteAddress: '1.1.1.1' } } },
+ },
+ } as any;
+ expect(getRequestId(request, { allowFromAnyIp: true, ipAllowlist: [] })).toEqual(
+ 'id from header'
+ );
+ });
+ });
+
+ describe('when allowFromAnyIp is false', () => {
+ describe('and ipAllowlist is empty', () => {
+ it('generates a UUID even if x-opaque-id header is present', () => {
+ const request = {
+ headers: { 'x-opaque-id': 'id from header' },
+ raw: { req: { socket: { remoteAddress: '1.1.1.1' } } },
+ } as any;
+ expect(getRequestId(request, { allowFromAnyIp: false, ipAllowlist: [] })).toEqual(
+ 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
+ );
+ });
+ });
+
+ describe('and ipAllowlist is not empty', () => {
+ it('uses x-opaque-id header if request comes from trusted IP address', () => {
+ const request = {
+ headers: { 'x-opaque-id': 'id from header' },
+ raw: { req: { socket: { remoteAddress: '1.1.1.1' } } },
+ } as any;
+ expect(getRequestId(request, { allowFromAnyIp: false, ipAllowlist: ['1.1.1.1'] })).toEqual(
+ 'id from header'
+ );
+ });
+
+ it('generates a UUID if request comes from untrusted IP address', () => {
+ const request = {
+ headers: { 'x-opaque-id': 'id from header' },
+ raw: { req: { socket: { remoteAddress: '5.5.5.5' } } },
+ } as any;
+ expect(getRequestId(request, { allowFromAnyIp: false, ipAllowlist: ['1.1.1.1'] })).toEqual(
+ 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
+ );
+ });
+
+ it('generates UUID if request comes from trusted IP address but no x-opaque-id header is present', () => {
+ const request = {
+ headers: {},
+ raw: { req: { socket: { remoteAddress: '1.1.1.1' } } },
+ } as any;
+ expect(getRequestId(request, { allowFromAnyIp: false, ipAllowlist: ['1.1.1.1'] })).toEqual(
+ 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
+ );
+ });
+ });
+ });
+});
diff --git a/src/core/server/http/http_tools.ts b/src/core/server/http/http_tools.ts
index 4e47cf492e287..71900ab982f3d 100644
--- a/src/core/server/http/http_tools.ts
+++ b/src/core/server/http/http_tools.ts
@@ -21,6 +21,7 @@ import { Lifecycle, Request, ResponseToolkit, Server, ServerOptions, Util } from
import Hoek from 'hoek';
import { ServerOptions as TLSOptions } from 'https';
import { ValidationError } from 'joi';
+import uuid from 'uuid';
import { HttpConfig } from './http_config';
import { validateObject } from './prototype_pollution';
@@ -169,3 +170,12 @@ export function defaultValidationErrorHandler(
throw err;
}
+
+export function getRequestId(request: Request, options: HttpConfig['requestId']): string {
+ return options.allowFromAnyIp ||
+ // socket may be undefined in integration tests that connect via the http listener directly
+ (request.raw.req.socket?.remoteAddress &&
+ options.ipAllowlist.includes(request.raw.req.socket.remoteAddress))
+ ? request.headers['x-opaque-id'] ?? uuid.v4()
+ : uuid.v4();
+}
diff --git a/src/core/server/http/index.ts b/src/core/server/http/index.ts
index e91f7d9375842..7513e60966085 100644
--- a/src/core/server/http/index.ts
+++ b/src/core/server/http/index.ts
@@ -24,6 +24,7 @@ export { AuthStatus, GetAuthState, IsAuthenticated } from './auth_state_storage'
export {
CustomHttpResponseOptions,
IKibanaSocket,
+ isKibanaRequest,
isRealRequest,
Headers,
HttpResponseOptions,
diff --git a/src/core/server/http/integration_tests/core_services.test.ts b/src/core/server/http/integration_tests/core_services.test.ts
index 6a00db5a6cc4a..2b9193a280aec 100644
--- a/src/core/server/http/integration_tests/core_services.test.ts
+++ b/src/core/server/http/integration_tests/core_services.test.ts
@@ -406,7 +406,10 @@ describe('http service', () => {
// client contains authHeaders for BWC with legacy platform.
const [client] = MockLegacyScopedClusterClient.mock.calls;
const [, , clientHeaders] = client;
- expect(clientHeaders).toEqual(authHeaders);
+ expect(clientHeaders).toEqual({
+ ...authHeaders,
+ 'x-opaque-id': expect.any(String),
+ });
});
it('passes request authorization header to Elasticsearch if registerAuth was not set', async () => {
@@ -430,7 +433,10 @@ describe('http service', () => {
const [client] = MockLegacyScopedClusterClient.mock.calls;
const [, , clientHeaders] = client;
- expect(clientHeaders).toEqual({ authorization: authorizationHeader });
+ expect(clientHeaders).toEqual({
+ authorization: authorizationHeader,
+ 'x-opaque-id': expect.any(String),
+ });
});
it('forwards 401 errors returned from elasticsearch', async () => {
diff --git a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts
index e23426e630455..a1401ba73813b 100644
--- a/src/core/server/http/integration_tests/lifecycle_handlers.test.ts
+++ b/src/core/server/http/integration_tests/lifecycle_handlers.test.ts
@@ -62,6 +62,10 @@ describe('core lifecycle handlers', () => {
'some-header': 'some-value',
},
xsrf: { disableProtection: false, whitelist: [whitelistedTestPath] },
+ requestId: {
+ allowFromAnyIp: true,
+ ipAllowlist: [],
+ },
} as any)
);
server = createHttpServer({ configService });
diff --git a/src/core/server/http/integration_tests/request.test.ts b/src/core/server/http/integration_tests/request.test.ts
index 3a7335583296e..0727ff848c189 100644
--- a/src/core/server/http/integration_tests/request.test.ts
+++ b/src/core/server/http/integration_tests/request.test.ts
@@ -288,4 +288,24 @@ describe('KibanaRequest', () => {
});
});
});
+
+ describe('request id', () => {
+ it('accepts x-opaque-id header case-insensitively', async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
+ router.get({ path: '/', validate: false }, async (context, req, res) => {
+ return res.ok({ body: { requestId: req.id } });
+ });
+ await server.start();
+
+ const st = supertest(innerServer.listener);
+
+ const resp1 = await st.get('/').set({ 'x-opaque-id': 'alpha' }).expect(200);
+ expect(resp1.body).toEqual({ requestId: 'alpha' });
+ const resp2 = await st.get('/').set({ 'X-Opaque-Id': 'beta' }).expect(200);
+ expect(resp2.body).toEqual({ requestId: 'beta' });
+ const resp3 = await st.get('/').set({ 'X-OPAQUE-ID': 'gamma' }).expect(200);
+ expect(resp3.body).toEqual({ requestId: 'gamma' });
+ });
+ });
});
diff --git a/src/core/server/http/integration_tests/router.test.ts b/src/core/server/http/integration_tests/router.test.ts
index 434e22e3cf6f5..e19c348511f1a 100644
--- a/src/core/server/http/integration_tests/router.test.ts
+++ b/src/core/server/http/integration_tests/router.test.ts
@@ -304,126 +304,204 @@ describe('Options', () => {
});
describe('timeout', () => {
- it('should timeout if configured with a small timeout value for a POST', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ const writeBodyCharAtATime = (request: supertest.Test, body: string, interval: number) => {
+ return new Promise((resolve, reject) => {
+ let i = 0;
+ const intervalId = setInterval(() => {
+ if (i < body.length) {
+ request.write(body[i++]);
+ } else {
+ clearInterval(intervalId);
+ request.end((err, res) => {
+ resolve(res);
+ });
+ }
+ }, interval);
+ request.on('error', (err) => {
+ clearInterval(intervalId);
+ reject(err);
+ });
+ });
+ };
- router.post(
- { path: '/a', validate: false, options: { timeout: 1000 } },
- async (context, req, res) => {
- await new Promise((resolve) => setTimeout(resolve, 2000));
- return res.ok({});
- }
- );
- router.post({ path: '/b', validate: false }, (context, req, res) => res.ok({}));
- await server.start();
- expect(supertest(innerServer.listener).post('/a')).rejects.toThrow('socket hang up');
- await supertest(innerServer.listener).post('/b').expect(200, {});
- });
+ describe('payload', () => {
+ it('should timeout if POST payload sending is too slow', async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
- it('should timeout if configured with a small timeout value for a PUT', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ router.post(
+ {
+ options: {
+ body: {
+ accepts: ['application/json'],
+ },
+ timeout: { payload: 100 },
+ },
+ path: '/a',
+ validate: false,
+ },
+ async (context, req, res) => {
+ return res.ok({});
+ }
+ );
+ await server.start();
- router.put(
- { path: '/a', validate: false, options: { timeout: 1000 } },
- async (context, req, res) => {
- await new Promise((resolve) => setTimeout(resolve, 2000));
- return res.ok({});
- }
- );
- router.put({ path: '/b', validate: false }, (context, req, res) => res.ok({}));
- await server.start();
+ // start the request
+ const request = supertest(innerServer.listener)
+ .post('/a')
+ .set('Content-Type', 'application/json')
+ .set('Transfer-Encoding', 'chunked');
- expect(supertest(innerServer.listener).put('/a')).rejects.toThrow('socket hang up');
- await supertest(innerServer.listener).put('/b').expect(200, {});
- });
+ const result = writeBodyCharAtATime(request, '{"foo":"bar"}', 10);
- it('should timeout if configured with a small timeout value for a DELETE', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ await expect(result).rejects.toMatchInlineSnapshot(`[Error: Request Timeout]`);
+ });
- router.delete(
- { path: '/a', validate: false, options: { timeout: 1000 } },
- async (context, req, res) => {
- await new Promise((resolve) => setTimeout(resolve, 2000));
- return res.ok({});
- }
- );
- router.delete({ path: '/b', validate: false }, (context, req, res) => res.ok({}));
- await server.start();
- expect(supertest(innerServer.listener).delete('/a')).rejects.toThrow('socket hang up');
- await supertest(innerServer.listener).delete('/b').expect(200, {});
- });
+ it('should not timeout if POST payload sending is quick', async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
- it('should timeout if configured with a small timeout value for a GET', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ router.post(
+ {
+ path: '/a',
+ validate: false,
+ options: { body: { accepts: 'application/json' }, timeout: { payload: 10000 } },
+ },
+ async (context, req, res) => res.ok({})
+ );
+ await server.start();
- router.get(
- // Note: There is a bug within Hapi Server where it cannot set the payload timeout for a GET call but it also cannot configure a timeout less than the payload body
- // so the least amount of possible time to configure the timeout is 10 seconds.
- { path: '/a', validate: false, options: { timeout: 100000 } },
- async (context, req, res) => {
- // Cause a wait of 20 seconds to cause the socket hangup
- await new Promise((resolve) => setTimeout(resolve, 200000));
- return res.ok({});
- }
- );
- router.get({ path: '/b', validate: false }, (context, req, res) => res.ok({}));
- await server.start();
+ // start the request
+ const request = supertest(innerServer.listener)
+ .post('/a')
+ .set('Content-Type', 'application/json')
+ .set('Transfer-Encoding', 'chunked');
+
+ const result = writeBodyCharAtATime(request, '{}', 10);
- expect(supertest(innerServer.listener).get('/a')).rejects.toThrow('socket hang up');
- await supertest(innerServer.listener).get('/b').expect(200, {});
+ await expect(result).resolves.toHaveProperty('status', 200);
+ });
});
- it('should not timeout if configured with a 5 minute timeout value for a POST', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ describe('idleSocket', () => {
+ it('should timeout if payload sending has too long of an idle period', async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
- router.post(
- { path: '/a', validate: false, options: { timeout: 300000 } },
- async (context, req, res) => res.ok({})
- );
- await server.start();
- await supertest(innerServer.listener).post('/a').expect(200, {});
- });
+ router.post(
+ {
+ path: '/a',
+ validate: false,
+ options: {
+ body: {
+ accepts: ['application/json'],
+ },
+ timeout: { idleSocket: 10 },
+ },
+ },
+ async (context, req, res) => {
+ return res.ok({});
+ }
+ );
- it('should not timeout if configured with a 5 minute timeout value for a PUT', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ await server.start();
- router.put(
- { path: '/a', validate: false, options: { timeout: 300000 } },
- async (context, req, res) => res.ok({})
- );
- await server.start();
+ // start the request
+ const request = supertest(innerServer.listener)
+ .post('/a')
+ .set('Content-Type', 'application/json')
+ .set('Transfer-Encoding', 'chunked');
- await supertest(innerServer.listener).put('/a').expect(200, {});
- });
+ const result = writeBodyCharAtATime(request, '{}', 20);
- it('should not timeout if configured with a 5 minute timeout value for a DELETE', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ await expect(result).rejects.toThrow('socket hang up');
+ });
- router.delete(
- { path: '/a', validate: false, options: { timeout: 300000 } },
- async (context, req, res) => res.ok({})
- );
- await server.start();
- await supertest(innerServer.listener).delete('/a').expect(200, {});
- });
+ it(`should not timeout if payload sending doesn't have too long of an idle period`, async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
- it('should not timeout if configured with a 5 minute timeout value for a GET', async () => {
- const { server: innerServer, createRouter } = await server.setup(setupDeps);
- const router = createRouter('/');
+ router.post(
+ {
+ path: '/a',
+ validate: false,
+ options: {
+ body: {
+ accepts: ['application/json'],
+ },
+ timeout: { idleSocket: 1000 },
+ },
+ },
+ async (context, req, res) => {
+ return res.ok({});
+ }
+ );
- router.get(
- { path: '/a', validate: false, options: { timeout: 300000 } },
- async (context, req, res) => res.ok({})
- );
- await server.start();
- await supertest(innerServer.listener).get('/a').expect(200, {});
+ await server.start();
+
+ // start the request
+ const request = supertest(innerServer.listener)
+ .post('/a')
+ .set('Content-Type', 'application/json')
+ .set('Transfer-Encoding', 'chunked');
+
+ const result = writeBodyCharAtATime(request, '{}', 10);
+
+ await expect(result).resolves.toHaveProperty('status', 200);
+ });
+
+ it('should timeout if servers response is too slow', async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
+
+ router.post(
+ {
+ path: '/a',
+ validate: false,
+ options: {
+ body: {
+ accepts: ['application/json'],
+ },
+ timeout: { idleSocket: 1000, payload: 100 },
+ },
+ },
+ async (context, req, res) => {
+ await new Promise((resolve) => setTimeout(resolve, 2000));
+ return res.ok({});
+ }
+ );
+
+ await server.start();
+ await expect(supertest(innerServer.listener).post('/a')).rejects.toThrow('socket hang up');
+ });
+
+ it('should not timeout if servers response is quick', async () => {
+ const { server: innerServer, createRouter } = await server.setup(setupDeps);
+ const router = createRouter('/');
+
+ router.post(
+ {
+ path: '/a',
+ validate: false,
+ options: {
+ body: {
+ accepts: ['application/json'],
+ },
+ timeout: { idleSocket: 2000, payload: 100 },
+ },
+ },
+ async (context, req, res) => {
+ await new Promise((resolve) => setTimeout(resolve, 10));
+ return res.ok({});
+ }
+ );
+
+ await server.start();
+ await expect(supertest(innerServer.listener).post('/a')).resolves.toHaveProperty(
+ 'status',
+ 200
+ );
+ });
});
});
});
diff --git a/src/core/server/http/lifecycle_handlers.test.ts b/src/core/server/http/lifecycle_handlers.test.ts
index a80e432e0d4cb..fdcf2a173b906 100644
--- a/src/core/server/http/lifecycle_handlers.test.ts
+++ b/src/core/server/http/lifecycle_handlers.test.ts
@@ -24,7 +24,7 @@ import {
} from './lifecycle_handlers';
import { httpServerMock } from './http_server.mocks';
import { HttpConfig } from './http_config';
-import { KibanaRequest, RouteMethod, KibanaRouteState } from './router';
+import { KibanaRequest, RouteMethod, KibanaRouteOptions } from './router';
const createConfig = (partial: Partial): HttpConfig => partial as HttpConfig;
@@ -32,14 +32,19 @@ const forgeRequest = ({
headers = {},
path = '/',
method = 'get',
- kibanaRouteState,
+ kibanaRouteOptions,
}: Partial<{
headers: Record;
path: string;
method: RouteMethod;
- kibanaRouteState: KibanaRouteState;
+ kibanaRouteOptions: KibanaRouteOptions;
}>): KibanaRequest => {
- return httpServerMock.createKibanaRequest({ headers, path, method, kibanaRouteState });
+ return httpServerMock.createKibanaRequest({
+ headers,
+ path,
+ method,
+ kibanaRouteOptions,
+ });
};
describe('xsrf post-auth handler', () => {
@@ -154,7 +159,7 @@ describe('xsrf post-auth handler', () => {
method: 'post',
headers: {},
path: '/some-path',
- kibanaRouteState: {
+ kibanaRouteOptions: {
xsrfRequired: false,
},
});
diff --git a/src/core/server/http/router/index.ts b/src/core/server/http/router/index.ts
index 83ceff4a25d86..e09833ef6b2da 100644
--- a/src/core/server/http/router/index.ts
+++ b/src/core/server/http/router/index.ts
@@ -24,7 +24,9 @@ export {
KibanaRequestEvents,
KibanaRequestRoute,
KibanaRequestRouteOptions,
- KibanaRouteState,
+ KibanaRouteOptions,
+ KibanaRequestState,
+ isKibanaRequest,
isRealRequest,
LegacyRequest,
ensureRawRequest,
diff --git a/src/core/server/http/router/request.test.ts b/src/core/server/http/router/request.test.ts
index fb999dc60e39c..e741121f3d70c 100644
--- a/src/core/server/http/router/request.test.ts
+++ b/src/core/server/http/router/request.test.ts
@@ -16,12 +16,45 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+jest.mock('uuid', () => ({
+ v4: jest.fn().mockReturnValue('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'),
+}));
+
import { RouteOptions } from 'hapi';
import { KibanaRequest } from './request';
import { httpServerMock } from '../http_server.mocks';
import { schema } from '@kbn/config-schema';
describe('KibanaRequest', () => {
+ describe('id property', () => {
+ it('uses the request.app.requestId property if present', () => {
+ const request = httpServerMock.createRawRequest({
+ app: { requestId: 'fakeId' },
+ });
+ const kibanaRequest = KibanaRequest.from(request);
+ expect(kibanaRequest.id).toEqual('fakeId');
+ });
+
+ it('generates a new UUID if request.app property is not present', () => {
+ // Undefined app property
+ const request = httpServerMock.createRawRequest({
+ app: undefined,
+ });
+ const kibanaRequest = KibanaRequest.from(request);
+ expect(kibanaRequest.id).toEqual('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
+ });
+
+ it('generates a new UUID if request.app.requestId property is not present', () => {
+ // Undefined app.requestId property
+ const request = httpServerMock.createRawRequest({
+ app: {},
+ });
+ const kibanaRequest = KibanaRequest.from(request);
+ expect(kibanaRequest.id).toEqual('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
+ });
+ });
+
describe('get all headers', () => {
it('returns all headers', () => {
const request = httpServerMock.createRawRequest({
diff --git a/src/core/server/http/router/request.ts b/src/core/server/http/router/request.ts
index 93ffb5aa48259..76f8761a7e998 100644
--- a/src/core/server/http/router/request.ts
+++ b/src/core/server/http/router/request.ts
@@ -18,7 +18,8 @@
*/
import { Url } from 'url';
-import { Request, ApplicationState } from 'hapi';
+import uuid from 'uuid';
+import { Request, RouteOptionsApp, ApplicationState } from 'hapi';
import { Observable, fromEvent, merge } from 'rxjs';
import { shareReplay, first, takeUntil } from 'rxjs/operators';
import { RecursiveReadonly } from '@kbn/utility-types';
@@ -34,9 +35,17 @@ const requestSymbol = Symbol('request');
/**
* @internal
*/
-export interface KibanaRouteState extends ApplicationState {
+export interface KibanaRouteOptions extends RouteOptionsApp {
xsrfRequired: boolean;
}
+
+/**
+ * @internal
+ */
+export interface KibanaRequestState extends ApplicationState {
+ requestId: string;
+}
+
/**
* Route options: If 'GET' or 'OPTIONS' method, body options won't be returned.
* @public
@@ -134,6 +143,15 @@ export class KibanaRequest<
return { query, params, body };
}
+ /**
+ * A identifier to identify this request.
+ *
+ * @remarks
+ * Depending on the user's configuration, this value may be sourced from the
+ * incoming request's `X-Opaque-Id` header which is not guaranteed to be unique
+ * per request.
+ */
+ public readonly id: string;
/** a WHATWG URL standard object. */
public readonly url: Url;
/** matched route details */
@@ -171,6 +189,11 @@ export class KibanaRequest<
// until that time we have to expose all the headers
private readonly withoutSecretHeaders: boolean
) {
+ // The `requestId` property will not be populated for requests that are 'faked' by internal systems that leverage
+ // KibanaRequest in conjunction with scoped Elaticcsearch and SavedObjectsClient in order to pass credentials.
+ // In these cases, the id defaults to a newly generated UUID.
+ this.id = (request.app as KibanaRequestState | undefined)?.requestId ?? uuid.v4();
+
this.url = request.url;
this.headers = deepFreeze({ ...request.headers });
this.isSystemRequest =
@@ -211,15 +234,21 @@ export class KibanaRequest<
private getRouteInfo(request: Request): KibanaRequestRoute {
const method = request.method as Method;
- const { parse, maxBytes, allow, output } = request.route.settings.payload || {};
- const timeout = request.route.settings.timeout?.socket;
+ const { parse, maxBytes, allow, output, timeout: payloadTimeout } =
+ request.route.settings.payload || {};
+ // net.Socket#timeout isn't documented, yet, and isn't part of the types... https://github.com/nodejs/node/pull/34543
+ // the socket is also undefined when using @hapi/shot, or when a "fake request" is used
+ const socketTimeout = (request.raw.req.socket as any)?.timeout;
const options = ({
authRequired: this.getAuthRequired(request),
// some places in LP call KibanaRequest.from(request) manually. remove fallback to true before v8
- xsrfRequired: (request.route.settings.app as KibanaRouteState)?.xsrfRequired ?? true,
+ xsrfRequired: (request.route.settings.app as KibanaRouteOptions)?.xsrfRequired ?? true,
tags: request.route.settings.tags || [],
- timeout: typeof timeout === 'number' ? timeout - 1 : undefined, // We are forced to have the timeout be 1 millisecond greater than the server and payload so we subtract one here to give the user consist settings
+ timeout: {
+ payload: payloadTimeout,
+ idleSocket: socketTimeout === 0 ? undefined : socketTimeout,
+ },
body: isSafeMethod(method)
? undefined
: {
@@ -270,7 +299,11 @@ export class KibanaRequest<
export const ensureRawRequest = (request: KibanaRequest | LegacyRequest) =>
isKibanaRequest(request) ? request[requestSymbol] : request;
-function isKibanaRequest(request: unknown): request is KibanaRequest {
+/**
+ * Checks if an incoming request is a {@link KibanaRequest}
+ * @internal
+ */
+export function isKibanaRequest(request: unknown): request is KibanaRequest {
return request instanceof KibanaRequest;
}
diff --git a/src/core/server/http/router/route.ts b/src/core/server/http/router/route.ts
index 676c494bec522..ce898a34e6b2c 100644
--- a/src/core/server/http/router/route.ts
+++ b/src/core/server/http/router/route.ts
@@ -146,10 +146,19 @@ export interface RouteConfigOptions {
body?: Method extends 'get' | 'options' ? undefined : RouteConfigOptionsBody;
/**
- * Timeouts for processing durations. Response timeout is in milliseconds.
- * Default value: 2 minutes
+ * Defines per-route timeouts.
*/
- timeout?: number;
+ timeout?: {
+ /**
+ * Milliseconds to receive the payload
+ */
+ payload?: Method extends 'get' | 'options' ? undefined : number;
+
+ /**
+ * Milliseconds the socket can be idle before it's closed
+ */
+ idleSocket?: number;
+ };
}
/**
diff --git a/src/core/server/http/test_utils.ts b/src/core/server/http/test_utils.ts
index bda66e1de8168..c3afae108027e 100644
--- a/src/core/server/http/test_utils.ts
+++ b/src/core/server/http/test_utils.ts
@@ -46,6 +46,10 @@ configService.atPath.mockReturnValue(
whitelist: [],
},
customResponseHeaders: {},
+ requestId: {
+ allowFromAnyIp: true,
+ ipAllowlist: [],
+ },
} as any)
);
diff --git a/src/core/server/index.ts b/src/core/server/index.ts
index 382318ea86a34..76bcf5f7df665 100644
--- a/src/core/server/index.ts
+++ b/src/core/server/index.ts
@@ -274,7 +274,9 @@ export {
SavedObjectsUpdateOptions,
SavedObjectsUpdateResponse,
SavedObjectsAddToNamespacesOptions,
+ SavedObjectsAddToNamespacesResponse,
SavedObjectsDeleteFromNamespacesOptions,
+ SavedObjectsDeleteFromNamespacesResponse,
SavedObjectsServiceStart,
SavedObjectsServiceSetup,
SavedObjectStatusMeta,
diff --git a/src/core/server/saved_objects/import/import_saved_objects.ts b/src/core/server/saved_objects/import/import_saved_objects.ts
index 6065e03fb1628..4956491a79aa9 100644
--- a/src/core/server/saved_objects/import/import_saved_objects.ts
+++ b/src/core/server/saved_objects/import/import_saved_objects.ts
@@ -25,6 +25,7 @@ import {
SavedObjectsImportOptions,
} from './types';
import { validateReferences } from './validate_references';
+import { SavedObject } from '../types';
/**
* Import saved objects from given stream. See the {@link SavedObjectsImportOptions | options} for more
@@ -67,7 +68,7 @@ export async function importSavedObjectsFromStream({
}
// Create objects in bulk
- const bulkCreateResult = await savedObjectsClient.bulkCreate(filteredObjects, {
+ const bulkCreateResult = await savedObjectsClient.bulkCreate(omitVersion(filteredObjects), {
overwrite,
namespace,
});
@@ -82,3 +83,7 @@ export async function importSavedObjectsFromStream({
...(errorAccumulator.length ? { errors: errorAccumulator } : {}),
};
}
+
+export function omitVersion(objects: SavedObject[]): SavedObject[] {
+ return objects.map(({ version, ...object }) => object);
+}
diff --git a/src/core/server/saved_objects/import/resolve_import_errors.ts b/src/core/server/saved_objects/import/resolve_import_errors.ts
index a5175aa080598..dce044a31a577 100644
--- a/src/core/server/saved_objects/import/resolve_import_errors.ts
+++ b/src/core/server/saved_objects/import/resolve_import_errors.ts
@@ -26,6 +26,7 @@ import {
SavedObjectsResolveImportErrorsOptions,
} from './types';
import { validateReferences } from './validate_references';
+import { omitVersion } from './import_saved_objects';
/**
* Resolve and return saved object import errors.
@@ -91,7 +92,7 @@ export async function resolveSavedObjectsImportErrors({
// Bulk create in two batches, overwrites and non-overwrites
const { objectsToOverwrite, objectsToNotOverwrite } = splitOverwrites(filteredObjects, retries);
if (objectsToOverwrite.length) {
- const bulkCreateResult = await savedObjectsClient.bulkCreate(objectsToOverwrite, {
+ const bulkCreateResult = await savedObjectsClient.bulkCreate(omitVersion(objectsToOverwrite), {
overwrite: true,
namespace,
});
@@ -102,9 +103,12 @@ export async function resolveSavedObjectsImportErrors({
successCount += bulkCreateResult.saved_objects.filter((obj) => !obj.error).length;
}
if (objectsToNotOverwrite.length) {
- const bulkCreateResult = await savedObjectsClient.bulkCreate(objectsToNotOverwrite, {
- namespace,
- });
+ const bulkCreateResult = await savedObjectsClient.bulkCreate(
+ omitVersion(objectsToNotOverwrite),
+ {
+ namespace,
+ }
+ );
errorAccumulator = [
...errorAccumulator,
...extractErrors(bulkCreateResult.saved_objects, objectsToNotOverwrite),
diff --git a/src/core/server/saved_objects/service/lib/repository.test.js b/src/core/server/saved_objects/service/lib/repository.test.js
index 4a9fceb9bf357..6d85223d1fc88 100644
--- a/src/core/server/saved_objects/service/lib/repository.test.js
+++ b/src/core/server/saved_objects/service/lib/repository.test.js
@@ -393,14 +393,14 @@ describe('SavedObjectsRepository', () => {
});
describe('returns', () => {
- it(`returns an empty object on success`, async () => {
+ it(`returns all existing and new namespaces on success`, async () => {
const result = await addToNamespacesSuccess(type, id, [newNs1, newNs2]);
- expect(result).toEqual({});
+ expect(result).toEqual({ namespaces: [currentNs1, currentNs2, newNs1, newNs2] });
});
it(`succeeds when adding existing namespaces`, async () => {
const result = await addToNamespacesSuccess(type, id, [currentNs1]);
- expect(result).toEqual({});
+ expect(result).toEqual({ namespaces: [currentNs1, currentNs2] });
});
});
});
@@ -464,8 +464,16 @@ describe('SavedObjectsRepository', () => {
{ method, _index = expect.any(String), getId = () => expect.any(String) }
) => {
const body = [];
- for (const { type, id } of objects) {
- body.push({ [method]: { _index, _id: getId(type, id) } });
+ for (const { type, id, if_primary_term: ifPrimaryTerm, if_seq_no: ifSeqNo } of objects) {
+ body.push({
+ [method]: {
+ _index,
+ _id: getId(type, id),
+ ...(ifPrimaryTerm && ifSeqNo
+ ? { if_primary_term: expect.any(Number), if_seq_no: expect.any(Number) }
+ : {}),
+ },
+ });
body.push(expect.any(Object));
}
expect(client.bulk).toHaveBeenCalledWith(
@@ -525,6 +533,27 @@ describe('SavedObjectsRepository', () => {
expectClientCallArgsAction([obj1, obj2], { method: 'index' });
});
+ it(`should use the ES index method with version if ID and version are defined and overwrite=true`, async () => {
+ await bulkCreateSuccess(
+ [
+ {
+ ...obj1,
+ version: mockVersion,
+ },
+ obj2,
+ ],
+ { overwrite: true }
+ );
+
+ const obj1WithSeq = {
+ ...obj1,
+ if_seq_no: mockVersionProps._seq_no,
+ if_primary_term: mockVersionProps._primary_term,
+ };
+
+ expectClientCallArgsAction([obj1WithSeq, obj2], { method: 'index' });
+ });
+
it(`should use the ES create method if ID is defined and overwrite=false`, async () => {
await bulkCreateSuccess([obj1, obj2]);
expectClientCallArgsAction([obj1, obj2], { method: 'create' });
@@ -1516,6 +1545,16 @@ describe('SavedObjectsRepository', () => {
expect(client.index).toHaveBeenCalled();
});
+ it(`should use the ES index with version if ID and version are defined and overwrite=true`, async () => {
+ await createSuccess(type, attributes, { id, overwrite: true, version: mockVersion });
+ expect(client.index).toHaveBeenCalled();
+
+ expect(client.index.mock.calls[0][0]).toMatchObject({
+ if_seq_no: mockVersionProps._seq_no,
+ if_primary_term: mockVersionProps._primary_term,
+ });
+ });
+
it(`should use the ES create action if ID is defined and overwrite=false`, async () => {
await createSuccess(type, attributes, { id });
expect(client.create).toHaveBeenCalled();
@@ -3063,17 +3102,17 @@ describe('SavedObjectsRepository', () => {
});
describe('returns', () => {
- it(`returns an empty object on success (delete)`, async () => {
+ it(`returns an empty namespaces array on success (delete)`, async () => {
const test = async (namespaces) => {
const result = await deleteFromNamespacesSuccess(type, id, namespaces, namespaces);
- expect(result).toEqual({});
+ expect(result).toEqual({ namespaces: [] });
client.delete.mockClear();
};
await test([namespace1]);
await test([namespace1, namespace2]);
});
- it(`returns an empty object on success (update)`, async () => {
+ it(`returns remaining namespaces on success (update)`, async () => {
const test = async (remaining) => {
const currentNamespaces = [namespace1].concat(remaining);
const result = await deleteFromNamespacesSuccess(
@@ -3082,7 +3121,7 @@ describe('SavedObjectsRepository', () => {
[namespace1],
currentNamespaces
);
- expect(result).toEqual({});
+ expect(result).toEqual({ namespaces: remaining });
client.delete.mockClear();
};
await test([namespace2]);
@@ -3093,7 +3132,7 @@ describe('SavedObjectsRepository', () => {
const namespaces = [namespace2];
const currentNamespaces = [namespace1];
const result = await deleteFromNamespacesSuccess(type, id, namespaces, currentNamespaces);
- expect(result).toEqual({});
+ expect(result).toEqual({ namespaces: currentNamespaces });
});
});
});
diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts
index d7e1ecba0370b..28d409f7b65bb 100644
--- a/src/core/server/saved_objects/service/lib/repository.ts
+++ b/src/core/server/saved_objects/service/lib/repository.ts
@@ -52,7 +52,9 @@ import {
SavedObjectsBulkUpdateOptions,
SavedObjectsDeleteOptions,
SavedObjectsAddToNamespacesOptions,
+ SavedObjectsAddToNamespacesResponse,
SavedObjectsDeleteFromNamespacesOptions,
+ SavedObjectsDeleteFromNamespacesResponse,
} from '../saved_objects_client';
import {
SavedObject,
@@ -220,6 +222,7 @@ export class SavedObjectsRepository {
overwrite = false,
references = [],
refresh = DEFAULT_REFRESH_SETTING,
+ version,
} = options;
if (!this._allowedTypes.includes(type)) {
@@ -259,6 +262,7 @@ export class SavedObjectsRepository {
index: this.getIndexForType(type),
refresh,
body: raw._source,
+ ...(overwrite && version ? decodeRequestVersion(version) : {}),
};
const { body } =
@@ -345,7 +349,12 @@ export class SavedObjectsRepository {
let savedObjectNamespace;
let savedObjectNamespaces;
- const { esRequestIndex, object, method } = expectedBulkGetResult.value;
+ let versionProperties;
+ const {
+ esRequestIndex,
+ object: { version, ...object },
+ method,
+ } = expectedBulkGetResult.value;
if (esRequestIndex !== undefined) {
const indexFound = bulkGetResponse?.statusCode !== 404;
const actualResult = indexFound ? bulkGetResponse?.body.docs[esRequestIndex] : undefined;
@@ -362,12 +371,14 @@ export class SavedObjectsRepository {
};
}
savedObjectNamespaces = getSavedObjectNamespaces(namespace, docFound && actualResult);
+ versionProperties = getExpectedVersionProperties(version, actualResult);
} else {
if (this._registry.isSingleNamespace(object.type)) {
savedObjectNamespace = namespace;
} else if (this._registry.isMultiNamespace(object.type)) {
savedObjectNamespaces = getSavedObjectNamespaces(namespace);
}
+ versionProperties = getExpectedVersionProperties(version);
}
const expectedResult = {
@@ -392,6 +403,7 @@ export class SavedObjectsRepository {
[method]: {
_id: expectedResult.rawMigratedDoc._id,
_index: this.getIndexForType(object.type),
+ ...(overwrite && versionProperties),
},
},
expectedResult.rawMigratedDoc._source
@@ -937,7 +949,7 @@ export class SavedObjectsRepository {
id: string,
namespaces: string[],
options: SavedObjectsAddToNamespacesOptions = {}
- ): Promise<{}> {
+ ): Promise {
if (!this._allowedTypes.includes(type)) {
throw SavedObjectsErrorHelpers.createGenericNotFoundError(type, id);
}
@@ -986,7 +998,7 @@ export class SavedObjectsRepository {
throw SavedObjectsErrorHelpers.createGenericNotFoundError(type, id);
}
- return {};
+ return { namespaces: doc.namespaces };
}
/**
@@ -999,7 +1011,7 @@ export class SavedObjectsRepository {
id: string,
namespaces: string[],
options: SavedObjectsDeleteFromNamespacesOptions = {}
- ): Promise<{}> {
+ ): Promise {
if (!this._allowedTypes.includes(type)) {
throw SavedObjectsErrorHelpers.createGenericNotFoundError(type, id);
}
@@ -1053,7 +1065,7 @@ export class SavedObjectsRepository {
// see "404s from missing index" above
throw SavedObjectsErrorHelpers.createGenericNotFoundError(type, id);
}
- return {};
+ return { namespaces: doc.namespaces };
} else {
// if there are no namespaces remaining, delete the saved object
const { body, statusCode } = await this.client.delete(
@@ -1070,7 +1082,7 @@ export class SavedObjectsRepository {
const deleted = body.result === 'deleted';
if (deleted) {
- return {};
+ return { namespaces: [] };
}
const deleteDocNotFound = body.result === 'not_found';
diff --git a/src/core/server/saved_objects/service/saved_objects_client.ts b/src/core/server/saved_objects/service/saved_objects_client.ts
index e15a92c92772f..812669ee108a2 100644
--- a/src/core/server/saved_objects/service/saved_objects_client.ts
+++ b/src/core/server/saved_objects/service/saved_objects_client.ts
@@ -37,6 +37,11 @@ export interface SavedObjectsCreateOptions extends SavedObjectsBaseOptions {
id?: string;
/** Overwrite existing documents (defaults to false) */
overwrite?: boolean;
+ /**
+ * An opaque version number which changes on each successful write operation.
+ * Can be used in conjunction with `overwrite` for implementing optimistic concurrency control.
+ **/
+ version?: string;
/** {@inheritDoc SavedObjectsMigrationVersion} */
migrationVersion?: SavedObjectsMigrationVersion;
references?: SavedObjectReference[];
@@ -52,6 +57,7 @@ export interface SavedObjectsBulkCreateObject {
id?: string;
type: string;
attributes: T;
+ version?: string;
references?: SavedObjectReference[];
/** {@inheritDoc SavedObjectsMigrationVersion} */
migrationVersion?: SavedObjectsMigrationVersion;
@@ -129,6 +135,15 @@ export interface SavedObjectsAddToNamespacesOptions extends SavedObjectsBaseOpti
refresh?: MutatingOperationRefreshSetting;
}
+/**
+ *
+ * @public
+ */
+export interface SavedObjectsAddToNamespacesResponse {
+ /** The namespaces the object exists in after this operation is complete. */
+ namespaces: string[];
+}
+
/**
*
* @public
@@ -138,6 +153,15 @@ export interface SavedObjectsDeleteFromNamespacesOptions extends SavedObjectsBas
refresh?: MutatingOperationRefreshSetting;
}
+/**
+ *
+ * @public
+ */
+export interface SavedObjectsDeleteFromNamespacesResponse {
+ /** The namespaces the object exists in after this operation is complete. An empty array indicates the object was deleted. */
+ namespaces: string[];
+}
+
/**
*
* @public
@@ -314,7 +338,7 @@ export class SavedObjectsClient {
id: string,
namespaces: string[],
options: SavedObjectsAddToNamespacesOptions = {}
- ): Promise<{}> {
+ ): Promise {
return await this._repository.addToNamespaces(type, id, namespaces, options);
}
@@ -331,7 +355,7 @@ export class SavedObjectsClient {
id: string,
namespaces: string[],
options: SavedObjectsDeleteFromNamespacesOptions = {}
- ): Promise<{}> {
+ ): Promise {
return await this._repository.deleteFromNamespaces(type, id, namespaces, options);
}
diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md
index 60b01aa06d07f..772be68f507d5 100644
--- a/src/core/server/server.api.md
+++ b/src/core/server/server.api.md
@@ -1059,6 +1059,7 @@ export class KibanaRequest(req: Request, routeSchemas?: RouteValidator | RouteValidatorFullConfig
, withoutSecretHeaders?: boolean): KibanaRequest
;
readonly headers: Headers;
+ readonly id: string;
readonly isSystemRequest: boolean;
// (undocumented)
readonly params: Params;
@@ -1886,7 +1887,10 @@ export interface RouteConfigOptions {
authRequired?: boolean | 'optional';
body?: Method extends 'get' | 'options' ? undefined : RouteConfigOptionsBody;
tags?: readonly string[];
- timeout?: number;
+ timeout?: {
+ payload?: Method extends 'get' | 'options' ? undefined : number;
+ idleSocket?: number;
+ };
xsrfRequired?: Method extends 'get' ? never : boolean;
}
@@ -2019,6 +2023,11 @@ export interface SavedObjectsAddToNamespacesOptions extends SavedObjectsBaseOpti
version?: string;
}
+// @public (undocumented)
+export interface SavedObjectsAddToNamespacesResponse {
+ namespaces: string[];
+}
+
// Warning: (ae-forgotten-export) The symbol "SavedObjectDoc" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Referencable" needs to be exported by the entry point index.d.ts
//
@@ -2041,6 +2050,8 @@ export interface SavedObjectsBulkCreateObject {
references?: SavedObjectReference[];
// (undocumented)
type: string;
+ // (undocumented)
+ version?: string;
}
// @public (undocumented)
@@ -2086,13 +2097,13 @@ export interface SavedObjectsBulkUpdateResponse {
export class SavedObjectsClient {
// @internal
constructor(repository: ISavedObjectsRepository);
- addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise<{}>;
+ addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise;
bulkCreate(objects: Array>, options?: SavedObjectsCreateOptions): Promise>;
bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjectsBaseOptions): Promise>;
bulkUpdate(objects: Array>, options?: SavedObjectsBulkUpdateOptions): Promise>;
create(type: string, attributes: T, options?: SavedObjectsCreateOptions): Promise>;
delete(type: string, id: string, options?: SavedObjectsDeleteOptions): Promise<{}>;
- deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise<{}>;
+ deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise;
// (undocumented)
static errors: typeof SavedObjectsErrorHelpers;
// (undocumented)
@@ -2175,6 +2186,7 @@ export interface SavedObjectsCreateOptions extends SavedObjectsBaseOptions {
// (undocumented)
references?: SavedObjectReference[];
refresh?: MutatingOperationRefreshSetting;
+ version?: string;
}
// @public (undocumented)
@@ -2187,6 +2199,11 @@ export interface SavedObjectsDeleteFromNamespacesOptions extends SavedObjectsBas
refresh?: MutatingOperationRefreshSetting;
}
+// @public (undocumented)
+export interface SavedObjectsDeleteFromNamespacesResponse {
+ namespaces: string[];
+}
+
// @public (undocumented)
export interface SavedObjectsDeleteOptions extends SavedObjectsBaseOptions {
refresh?: MutatingOperationRefreshSetting;
@@ -2485,7 +2502,7 @@ export interface SavedObjectsRawDoc {
// @public (undocumented)
export class SavedObjectsRepository {
- addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise<{}>;
+ addToNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsAddToNamespacesOptions): Promise;
bulkCreate(objects: Array>, options?: SavedObjectsCreateOptions): Promise>;
bulkGet(objects?: SavedObjectsBulkGetObject[], options?: SavedObjectsBaseOptions): Promise>;
bulkUpdate(objects: Array>, options?: SavedObjectsBulkUpdateOptions): Promise>;
@@ -2496,7 +2513,7 @@ export class SavedObjectsRepository {
static createRepository(migrator: KibanaMigrator, typeRegistry: SavedObjectTypeRegistry, indexName: string, client: ElasticsearchClient, includedHiddenTypes?: string[], injectedConstructor?: any): ISavedObjectsRepository;
delete(type: string, id: string, options?: SavedObjectsDeleteOptions): Promise<{}>;
deleteByNamespace(namespace: string, options?: SavedObjectsDeleteByNamespaceOptions): Promise;
- deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise<{}>;
+ deleteFromNamespaces(type: string, id: string, namespaces: string[], options?: SavedObjectsDeleteFromNamespacesOptions): Promise;
// (undocumented)
find({ search, defaultSearchOperator, searchFields, hasReference, page, perPage, sortField, sortOrder, fields, namespaces, type, filter, preference, }: SavedObjectsFindOptions): Promise>;
get(type: string, id: string, options?: SavedObjectsBaseOptions): Promise>;
diff --git a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts
index f1700ef7b578c..a5b9e01714f38 100644
--- a/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts
+++ b/src/dev/build/tasks/nodejs/extract_node_builds_task.test.ts
@@ -17,10 +17,15 @@
* under the License.
*/
+import { readFileSync } from 'fs';
+import Path from 'path';
+
import {
ToolingLog,
ToolingLogCollectingWriter,
createAbsolutePathSerializer,
+ createRecursiveSerializer,
+ REPO_ROOT,
} from '@kbn/dev-utils';
import { Config } from '../../lib';
@@ -37,6 +42,14 @@ log.setWriters([testWriter]);
expect.addSnapshotSerializer(createAbsolutePathSerializer());
+const nodeVersion = readFileSync(Path.resolve(REPO_ROOT, '.node-version'), 'utf8').trim();
+expect.addSnapshotSerializer(
+ createRecursiveSerializer(
+ (s) => typeof s === 'string' && s.includes(nodeVersion),
+ (s) => s.split(nodeVersion).join('')
+ )
+);
+
async function setup() {
const config = await Config.create({
isRelease: true,
@@ -74,8 +87,8 @@ it('runs expected fs operations', async () => {
Object {
"copy": Array [
Array [
- /.node_binaries/10.21.0/node.exe,
- /.node_binaries/10.21.0/win32-x64/node.exe,
+ /.node_binaries//node.exe,
+ /.node_binaries//win32-x64/node.exe,
Object {
"clone": true,
},
@@ -83,22 +96,22 @@ it('runs expected fs operations', async () => {
],
"untar": Array [
Array [
- /.node_binaries/10.21.0/node-v10.21.0-linux-x64.tar.gz,
- /.node_binaries/10.21.0/linux-x64,
+ /.node_binaries//node-v-linux-x64.tar.gz,
+ /.node_binaries//linux-x64,
Object {
"strip": 1,
},
],
Array [
- /.node_binaries/10.21.0/node-v10.21.0-linux-arm64.tar.gz,
- /.node_binaries/10.21.0/linux-arm64,
+ /.node_binaries//node-v-linux-arm64.tar.gz,
+ /.node_binaries//linux-arm64,
Object {
"strip": 1,
},
],
Array [
- /.node_binaries/10.21.0/node-v10.21.0-darwin-x64.tar.gz,
- /.node_binaries/10.21.0/darwin-x64,
+ /.node_binaries//node-v-darwin-x64.tar.gz,
+ /.node_binaries//darwin-x64,
Object {
"strip": 1,
},
diff --git a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts
index 19416963d5edd..1a850890a33fe 100644
--- a/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts
+++ b/src/dev/build/tasks/nodejs/verify_existing_node_builds_task.test.ts
@@ -17,10 +17,15 @@
* under the License.
*/
+import Path from 'path';
+import Fs from 'fs';
+
import {
ToolingLog,
ToolingLogCollectingWriter,
createAnyInstanceSerializer,
+ createRecursiveSerializer,
+ REPO_ROOT,
} from '@kbn/dev-utils';
import { Config, Platform } from '../../lib';
@@ -41,6 +46,14 @@ log.setWriters([testWriter]);
expect.addSnapshotSerializer(createAnyInstanceSerializer(Config));
+const nodeVersion = Fs.readFileSync(Path.resolve(REPO_ROOT, '.node-version'), 'utf8').trim();
+expect.addSnapshotSerializer(
+ createRecursiveSerializer(
+ (s) => typeof s === 'string' && s.includes(nodeVersion),
+ (s) => s.split(nodeVersion).join('')
+ )
+);
+
async function setup(actualShaSums?: Record) {
const config = await Config.create({
isRelease: true,
@@ -87,7 +100,7 @@ it('checks shasums for each downloaded node build', async () => {
[MockFunction] {
"calls": Array [
Array [
- "10.21.0",
+ "",
],
],
"results": Array [
diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/Dockerfile b/src/dev/build/tasks/os_packages/docker_generator/templates/Dockerfile
index c6f333beb060e..d235bfe9d6fbc 100644
--- a/src/dev/build/tasks/os_packages/docker_generator/templates/Dockerfile
+++ b/src/dev/build/tasks/os_packages/docker_generator/templates/Dockerfile
@@ -47,7 +47,7 @@ EXPOSE 5601
RUN for iter in {1..10}; do \
{{packageManager}} update --setopt=tsflags=nodocs -y && \
{{packageManager}} install --setopt=tsflags=nodocs -y \
- fontconfig freetype shadow-utils {{#ubi}}findutils{{/ubi}} && \
+ fontconfig freetype shadow-utils libnss3.so {{#ubi}}findutils{{/ubi}} && \
{{packageManager}} clean all && exit_code=0 && break || exit_code=$? && echo "{{packageManager}} error: retry $iter in 10s" && \
sleep 10; \
done; \
@@ -119,4 +119,4 @@ LABEL name="Kibana" \
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
-CMD ["/usr/local/bin/kibana-docker"]
\ No newline at end of file
+CMD ["/usr/local/bin/kibana-docker"]
diff --git a/src/dev/file.ts b/src/dev/file.ts
index 32998d3e776ef..1209cc323c4c3 100644
--- a/src/dev/file.ts
+++ b/src/dev/file.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { dirname, extname, join, relative, resolve, sep } from 'path';
+import { dirname, extname, join, relative, resolve, sep, basename } from 'path';
export class File {
private path: string;
@@ -38,6 +38,12 @@ export class File {
return this.relativePath;
}
+ public getWithoutExtension() {
+ const directory = dirname(this.path);
+ const stem = basename(this.path, this.ext);
+ return new File(resolve(directory, stem));
+ }
+
public isJs() {
return this.ext === '.js';
}
diff --git a/src/dev/i18n/tasks/extract_untracked_translations.ts b/src/dev/i18n/tasks/extract_untracked_translations.ts
index 21ab47641f2f0..928997aced801 100644
--- a/src/dev/i18n/tasks/extract_untracked_translations.ts
+++ b/src/dev/i18n/tasks/extract_untracked_translations.ts
@@ -47,7 +47,7 @@ export async function extractUntrackedMessagesTask({
'**/build/**',
'**/__fixtures__/**',
'**/packages/kbn-i18n/**',
- '**/packages/kbn-plugin-generator/sao_template/**',
+ '**/packages/kbn-plugin-generator/template/**',
'**/packages/kbn-ui-framework/generator-kui/**',
'**/target/**',
'**/test/**',
diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js
index 19d03e41ac5a9..e22dc03cf57aa 100644
--- a/src/dev/precommit_hook/casing_check_config.js
+++ b/src/dev/precommit_hook/casing_check_config.js
@@ -109,6 +109,14 @@ export const IGNORE_DIRECTORY_GLOBS = [
'packages/kbn-optimizer/src/__fixtures__/mock_repo/x-pack',
];
+/**
+ * These patterns identify files which should have the extension stripped
+ * to reveal the actual name that should be checked.
+ *
+ * @type {Array}
+ */
+export const REMOVE_EXTENSION = ['packages/kbn-plugin-generator/template/**/*.ejs'];
+
/**
* DO NOT ADD FILES TO THIS LIST!!
*
diff --git a/src/dev/precommit_hook/check_file_casing.js b/src/dev/precommit_hook/check_file_casing.js
index ec77d9a8bad3c..243818d35a90b 100644
--- a/src/dev/precommit_hook/check_file_casing.js
+++ b/src/dev/precommit_hook/check_file_casing.js
@@ -29,6 +29,7 @@ import {
IGNORE_FILE_GLOBS,
TEMPORARILY_IGNORED_PATHS,
KEBAB_CASE_DIRECTORY_GLOBS,
+ REMOVE_EXTENSION,
} from './casing_check_config';
const NON_SNAKE_CASE_RE = /[A-Z \-]/;
@@ -143,6 +144,10 @@ async function checkForSnakeCase(log, files) {
}
export async function checkFileCasing(log, files) {
+ files = files.map((f) =>
+ matchesAnyGlob(f.getRelativePath(), REMOVE_EXTENSION) ? f.getWithoutExtension() : f
+ );
+
await checkForKebabCase(log, files);
await checkForSnakeCase(log, files);
}
diff --git a/src/dev/typescript/run_type_check_cli.ts b/src/dev/typescript/run_type_check_cli.ts
index 5d4cf14c1cd95..9eeaeb4da7042 100644
--- a/src/dev/typescript/run_type_check_cli.ts
+++ b/src/dev/typescript/run_type_check_cli.ts
@@ -88,7 +88,7 @@ export function runTypeCheckCli() {
}
execInProjects(log, projects, process.execPath, (project) => [
- ...(project.name.startsWith('x-pack') ? ['--max-old-space-size=4096'] : []),
+ '--max-old-space-size=4096',
require.resolve('typescript/bin/tsc'),
...['--project', project.tsConfigPath],
...tscArgs,
diff --git a/src/legacy/core_plugins/console_legacy/index.ts b/src/legacy/core_plugins/console_legacy/index.ts
deleted file mode 100644
index 82e00a99c6cfd..0000000000000
--- a/src/legacy/core_plugins/console_legacy/index.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { first } from 'rxjs/operators';
-import { head } from 'lodash';
-import url from 'url';
-
-// TODO: Remove this hack once we can get the ES config we need for Console proxy a better way.
-let _legacyEsConfig: any;
-export const readLegacyEsConfig = () => {
- return _legacyEsConfig;
-};
-
-// eslint-disable-next-line import/no-default-export
-export default function (kibana: any) {
- return new kibana.Plugin({
- id: 'console_legacy',
-
- async init(server: any) {
- _legacyEsConfig = await server.newPlatform.__internals.elasticsearch.legacy.config$
- .pipe(first())
- .toPromise();
- },
-
- uiExports: {
- injectDefaultVars: () => ({
- elasticsearchUrl: url.format(
- Object.assign(url.parse(head(_legacyEsConfig.hosts) as any), { auth: false })
- ),
- }),
- },
- } as any);
-}
diff --git a/src/legacy/core_plugins/console_legacy/package.json b/src/legacy/core_plugins/console_legacy/package.json
deleted file mode 100644
index b78807daed959..0000000000000
--- a/src/legacy/core_plugins/console_legacy/package.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "name": "console_legacy",
- "version": "kibana"
-}
diff --git a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js
index 5ef1149146afe..b8d48b784dba7 100644
--- a/src/legacy/ui/public/new_platform/new_platform.karma_mock.js
+++ b/src/legacy/ui/public/new_platform/new_platform.karma_mock.js
@@ -221,17 +221,6 @@ export const npSetup = {
registerFunction: sinon.fake(),
registerRenderer: sinon.fake(),
registerType: sinon.fake(),
- __LEGACY: {
- renderers: {
- register: () => undefined,
- get: () => null,
- },
- getExecutor: () => ({
- interpreter: {
- interpretAst: () => {},
- },
- }),
- },
},
data: {
autocomplete: {
diff --git a/src/legacy/ui/public/new_platform/set_services.ts b/src/legacy/ui/public/new_platform/set_services.ts
index ee92eda064aa8..036157a9f3fbc 100644
--- a/src/legacy/ui/public/new_platform/set_services.ts
+++ b/src/legacy/ui/public/new_platform/set_services.ts
@@ -41,7 +41,6 @@ interface NpStart {
export function setSetupServices(npSetup: NpSetup) {
// Services that need to be set in the legacy platform since the legacy data plugin
// which previously provided them has been removed.
- dataServices.setInjectedMetadata(npSetup.core.injectedMetadata);
visualizationsServices.setUISettings(npSetup.core.uiSettings);
visualizationsServices.setUsageCollector(npSetup.plugins.usageCollection);
}
@@ -49,7 +48,6 @@ export function setSetupServices(npSetup: NpSetup) {
export function setStartServices(npStart: NpStart) {
// Services that need to be set in the legacy platform since the legacy data plugin
// which previously provided them has been removed.
- dataServices.setHttp(npStart.core.http);
dataServices.setNotifications(npStart.core.notifications);
dataServices.setOverlays(npStart.core.overlays);
dataServices.setUiSettings(npStart.core.uiSettings);
diff --git a/src/plugins/console/common/types/api_responses.ts b/src/plugins/console/common/types/api_responses.ts
new file mode 100644
index 0000000000000..1c8166bbe27f2
--- /dev/null
+++ b/src/plugins/console/common/types/api_responses.ts
@@ -0,0 +1,29 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+export interface EsConfigApiResponse {
+ /**
+ * This is the first host in the hosts array that Kibana is configured to use
+ * to communicate with ES.
+ *
+ * At the moment this is used to power the copy as cURL functionality in Console
+ * to complete the host portion of the URL.
+ */
+ host?: string;
+}
diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx
index 880069d8ebc7a..fc88b31711b23 100644
--- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx
+++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx
@@ -67,9 +67,8 @@ const inputId = 'ConAppInputTextarea';
function EditorUI({ initialTextValue }: EditorProps) {
const {
- services: { history, notifications, settings: settingsService },
+ services: { history, notifications, settings: settingsService, esHostService },
docLinkVersion,
- elasticsearchUrl,
} = useServicesContext();
const { settings } = useEditorReadContext();
@@ -232,7 +231,7 @@ function EditorUI({ initialTextValue }: EditorProps) {
{
- return editorInstanceRef.current!.getRequestsAsCURL(elasticsearchUrl);
+ return editorInstanceRef.current!.getRequestsAsCURL(esHostService.getHost());
}}
getDocumentation={() => {
return getDocumentation(editorInstanceRef.current!, docLinkVersion);
diff --git a/src/plugins/console/public/application/contexts/services_context.mock.ts b/src/plugins/console/public/application/contexts/services_context.mock.ts
index ae8d15a890782..ba982d3f50cfb 100644
--- a/src/plugins/console/public/application/contexts/services_context.mock.ts
+++ b/src/plugins/console/public/application/contexts/services_context.mock.ts
@@ -17,21 +17,27 @@
* under the License.
*/
import { notificationServiceMock } from '../../../../../core/public/mocks';
+import { httpServiceMock } from '../../../../../core/public/mocks';
+
import { HistoryMock } from '../../services/history.mock';
import { SettingsMock } from '../../services/settings.mock';
import { StorageMock } from '../../services/storage.mock';
+import { createApi, createEsHostService } from '../lib';
import { ContextValue } from './services_context';
export const serviceContextMock = {
create: (): ContextValue => {
const storage = new StorageMock({} as any, 'test');
+ const http = httpServiceMock.createSetupContract();
+ const api = createApi({ http });
+ const esHostService = createEsHostService({ api });
(storage.keys as jest.Mock).mockImplementation(() => []);
return {
- elasticsearchUrl: 'test',
services: {
trackUiMetric: { count: () => {}, load: () => {} },
storage,
+ esHostService,
settings: new SettingsMock(storage),
history: new HistoryMock(storage),
notifications: notificationServiceMock.createSetupContract(),
diff --git a/src/plugins/console/public/application/contexts/services_context.tsx b/src/plugins/console/public/application/contexts/services_context.tsx
index 3d4ac3291c5ac..e2f01a152b27b 100644
--- a/src/plugins/console/public/application/contexts/services_context.tsx
+++ b/src/plugins/console/public/application/contexts/services_context.tsx
@@ -17,22 +17,25 @@
* under the License.
*/
-import React, { createContext, useContext } from 'react';
+import React, { createContext, useContext, useEffect } from 'react';
import { NotificationsSetup } from 'kibana/public';
-import { History, Storage, Settings } from '../../services';
+import { History, Settings, Storage } from '../../services';
import { ObjectStorageClient } from '../../../common/types';
import { MetricsTracker } from '../../types';
+import { EsHostService } from '../lib';
+
+interface ContextServices {
+ history: History;
+ storage: Storage;
+ settings: Settings;
+ notifications: NotificationsSetup;
+ objectStorageClient: ObjectStorageClient;
+ trackUiMetric: MetricsTracker;
+ esHostService: EsHostService;
+}
export interface ContextValue {
- services: {
- history: History;
- storage: Storage;
- settings: Settings;
- notifications: NotificationsSetup;
- objectStorageClient: ObjectStorageClient;
- trackUiMetric: MetricsTracker;
- };
- elasticsearchUrl: string;
+ services: ContextServices;
docLinkVersion: string;
}
@@ -44,6 +47,11 @@ interface ContextProps {
const ServicesContext = createContext(null as any);
export function ServicesContextProvider({ children, value }: ContextProps) {
+ useEffect(() => {
+ // Fire and forget, we attempt to init the host service once.
+ value.services.esHostService.init();
+ }, [value.services.esHostService]);
+
return {children};
}
diff --git a/src/plugins/console/public/application/hooks/README.md b/src/plugins/console/public/application/hooks/README.md
new file mode 100644
index 0000000000000..10057193560e9
--- /dev/null
+++ b/src/plugins/console/public/application/hooks/README.md
@@ -0,0 +1,5 @@
+## Notes
+
+* Do not add any code directly to this directory. This code should be moved to the neighbouring `lib` directory to be in line with future ES UI plugin patterns.
+
+* The `es.send` method uses $.ajax under the hood and needs to be refactored to use the new platform-provided http client.
\ No newline at end of file
diff --git a/src/plugins/console/public/application/index.tsx b/src/plugins/console/public/application/index.tsx
index 051eaea27a7de..0a5a502eb5062 100644
--- a/src/plugins/console/public/application/index.tsx
+++ b/src/plugins/console/public/application/index.tsx
@@ -19,19 +19,20 @@
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
-import { NotificationsSetup } from 'src/core/public';
+import { HttpSetup, NotificationsSetup } from 'src/core/public';
import { ServicesContextProvider, EditorContextProvider, RequestContextProvider } from './contexts';
import { Main } from './containers';
import { createStorage, createHistory, createSettings } from '../services';
import * as localStorageObjectClient from '../lib/local_storage_object_client';
import { createUsageTracker } from '../services/tracker';
import { UsageCollectionSetup } from '../../../usage_collection/public';
+import { createApi, createEsHostService } from './lib';
export interface BootDependencies {
+ http: HttpSetup;
docLinkVersion: string;
I18nContext: any;
notifications: NotificationsSetup;
- elasticsearchUrl: string;
usageCollection?: UsageCollectionSetup;
element: HTMLElement;
}
@@ -40,9 +41,9 @@ export function renderApp({
I18nContext,
notifications,
docLinkVersion,
- elasticsearchUrl,
usageCollection,
element,
+ http,
}: BootDependencies) {
const trackUiMetric = createUsageTracker(usageCollection);
trackUiMetric.load('opened_app');
@@ -54,14 +55,16 @@ export function renderApp({
const history = createHistory({ storage });
const settings = createSettings({ storage });
const objectStorageClient = localStorageObjectClient.create(storage);
+ const api = createApi({ http });
+ const esHostService = createEsHostService({ api });
render(
) => {
- const savedObjectsClient: KUSavedObjectClient = {
- get: (...args) => getCoreStart().savedObjects.client.get(...args),
- };
+export type Api = ReturnType;
- return savedObjectsClient;
+export const createApi = ({ http }: Dependencies) => {
+ return {
+ getEsConfig: () => {
+ return sendRequest(http, {
+ path: '/api/console/es_config',
+ method: 'get',
+ });
+ },
+ };
};
diff --git a/src/plugins/kibana_utils/public/core/create_kibana_utils_core.test.ts b/src/plugins/console/public/application/lib/es_host_service.ts
similarity index 50%
rename from src/plugins/kibana_utils/public/core/create_kibana_utils_core.test.ts
rename to src/plugins/console/public/application/lib/es_host_service.ts
index c5b23bdf0055f..887f270a24687 100644
--- a/src/plugins/kibana_utils/public/core/create_kibana_utils_core.test.ts
+++ b/src/plugins/console/public/application/lib/es_host_service.ts
@@ -17,23 +17,38 @@
* under the License.
*/
-import { createKibanaUtilsCore } from './create_kibana_utils_core';
-import { CoreStart } from 'kibana/public';
+import { Api } from './api';
-describe('createKibanaUtilsCore', () => {
- it('should allows to work with multiple instances', () => {
- const core1 = {} as CoreStart;
- const core2 = {} as CoreStart;
+/**
+ * Very simple state for holding the current ES host.
+ *
+ * This is used to power the copy as cURL functionality.
+ */
+export class EsHostService {
+ private host = 'http://localhost:9200';
+
+ constructor(private readonly api: Api) {}
- const { setCoreStart: setCoreStart1, getCoreStart: getCoreStart1 } = createKibanaUtilsCore();
- const { setCoreStart: setCoreStart2, getCoreStart: getCoreStart2 } = createKibanaUtilsCore();
+ private setHost(host: string): void {
+ this.host = host;
+ }
- setCoreStart1(core1);
- setCoreStart2(core2);
+ /**
+ * Initialize the host value based on the value set on the server.
+ *
+ * This call is necessary because this value can only be retrieved at
+ * runtime.
+ */
+ public async init() {
+ const { data } = await this.api.getEsConfig();
+ if (data && data.host) {
+ this.setHost(data.host);
+ }
+ }
- expect(getCoreStart1()).toBe(core1);
- expect(getCoreStart2()).toBe(core2);
+ public getHost(): string {
+ return this.host;
+ }
+}
- expect(getCoreStart1() !== getCoreStart2()).toBeTruthy();
- });
-});
+export const createEsHostService = ({ api }: { api: Api }) => new EsHostService(api);
diff --git a/src/plugins/visualize/config.ts b/src/plugins/console/public/application/lib/index.ts
similarity index 78%
rename from src/plugins/visualize/config.ts
rename to src/plugins/console/public/application/lib/index.ts
index ee79a37717f26..1ba99cc607269 100644
--- a/src/plugins/visualize/config.ts
+++ b/src/plugins/console/public/application/lib/index.ts
@@ -17,10 +17,5 @@
* under the License.
*/
-import { schema, TypeOf } from '@kbn/config-schema';
-
-export const configSchema = schema.object({
- showNewVisualizeFlow: schema.boolean({ defaultValue: false }),
-});
-
-export type ConfigSchema = TypeOf;
+export { createApi, Api } from './api';
+export { createEsHostService, EsHostService } from './es_host_service';
diff --git a/src/plugins/console/public/plugin.ts b/src/plugins/console/public/plugin.ts
index 851dc7a063d7b..03b65a8bd145c 100644
--- a/src/plugins/console/public/plugin.ts
+++ b/src/plugins/console/public/plugin.ts
@@ -25,7 +25,7 @@ import { AppSetupUIPluginDependencies } from './types';
export class ConsoleUIPlugin implements Plugin {
public setup(
- { notifications, getStartServices }: CoreSetup,
+ { notifications, getStartServices, http }: CoreSetup,
{ devTools, home, usageCollection }: AppSetupUIPluginDependencies
) {
home.featureCatalogue.register({
@@ -53,23 +53,17 @@ export class ConsoleUIPlugin implements Plugin (series) => flow(uniq, size)(map(series, name)) > 1;
+export { sendRequest };
diff --git a/src/plugins/console/server/__tests__/proxy_route/mocks.ts b/src/plugins/console/server/__tests__/proxy_route/mocks.ts
index 74bd43fe52146..411bea1a48e8a 100644
--- a/src/plugins/console/server/__tests__/proxy_route/mocks.ts
+++ b/src/plugins/console/server/__tests__/proxy_route/mocks.ts
@@ -23,22 +23,44 @@ jest.mock('../../lib/proxy_request', () => ({
import { duration } from 'moment';
import { ProxyConfigCollection } from '../../lib';
-import { CreateHandlerDependencies } from '../../routes/api/console/proxy/create_handler';
-import { coreMock } from '../../../../../core/server/mocks';
+import { RouteDependencies, ProxyDependencies } from '../../routes';
+import { EsLegacyConfigService, SpecDefinitionsService } from '../../services';
+import { coreMock, httpServiceMock } from '../../../../../core/server/mocks';
-export const getProxyRouteHandlerDeps = ({
- proxyConfigCollection = new ProxyConfigCollection([]),
- pathFilters = [/.*/],
- readLegacyESConfig = () => ({
+const defaultProxyValue = Object.freeze({
+ readLegacyESConfig: async () => ({
requestTimeout: duration(30000),
customHeaders: {},
requestHeadersWhitelist: [],
hosts: ['http://localhost:9200'],
}),
- log = coreMock.createPluginInitializerContext().logger.get(),
-}: Partial): CreateHandlerDependencies => ({
- proxyConfigCollection,
- pathFilters,
- readLegacyESConfig,
- log,
+ pathFilters: [/.*/],
+ proxyConfigCollection: new ProxyConfigCollection([]),
});
+
+interface MockDepsArgument extends Partial> {
+ proxy?: Partial;
+}
+
+export const getProxyRouteHandlerDeps = ({
+ proxy,
+ log = coreMock.createPluginInitializerContext().logger.get(),
+ router = httpServiceMock.createSetupContract().createRouter(),
+}: MockDepsArgument): RouteDependencies => {
+ const services: RouteDependencies['services'] = {
+ esLegacyConfigService: new EsLegacyConfigService(),
+ specDefinitionService: new SpecDefinitionsService(),
+ };
+
+ return {
+ services,
+ router,
+ proxy: proxy
+ ? {
+ ...defaultProxyValue,
+ ...proxy,
+ }
+ : defaultProxyValue,
+ log,
+ };
+};
diff --git a/src/plugins/console/server/__tests__/proxy_route/params.test.ts b/src/plugins/console/server/__tests__/proxy_route/params.test.ts
index 1ab9c3ae789cc..e1c5295f6d30f 100644
--- a/src/plugins/console/server/__tests__/proxy_route/params.test.ts
+++ b/src/plugins/console/server/__tests__/proxy_route/params.test.ts
@@ -36,7 +36,7 @@ describe('Console Proxy Route', () => {
describe('no matches', () => {
it('rejects with 403', async () => {
handler = createHandler(
- getProxyRouteHandlerDeps({ pathFilters: [/^\/foo\//, /^\/bar\//] })
+ getProxyRouteHandlerDeps({ proxy: { pathFilters: [/^\/foo\//, /^\/bar\//] } })
);
const { status } = await handler(
@@ -51,7 +51,7 @@ describe('Console Proxy Route', () => {
describe('one match', () => {
it('allows the request', async () => {
handler = createHandler(
- getProxyRouteHandlerDeps({ pathFilters: [/^\/foo\//, /^\/bar\//] })
+ getProxyRouteHandlerDeps({ proxy: { pathFilters: [/^\/foo\//, /^\/bar\//] } })
);
(requestModule.proxyRequest as jest.Mock).mockResolvedValue(createResponseStub('foo'));
@@ -68,7 +68,9 @@ describe('Console Proxy Route', () => {
});
describe('all match', () => {
it('allows the request', async () => {
- handler = createHandler(getProxyRouteHandlerDeps({ pathFilters: [/^\/foo\//] }));
+ handler = createHandler(
+ getProxyRouteHandlerDeps({ proxy: { pathFilters: [/^\/foo\//] } })
+ );
(requestModule.proxyRequest as jest.Mock).mockResolvedValue(createResponseStub('foo'));
diff --git a/src/plugins/console/server/__tests__/proxy_route/proxy_fallback.test.ts b/src/plugins/console/server/__tests__/proxy_route/proxy_fallback.test.ts
index b226bad11a01a..fc5233d0f833d 100644
--- a/src/plugins/console/server/__tests__/proxy_route/proxy_fallback.test.ts
+++ b/src/plugins/console/server/__tests__/proxy_route/proxy_fallback.test.ts
@@ -38,12 +38,14 @@ describe('Console Proxy Route', () => {
const handler = createHandler(
getProxyRouteHandlerDeps({
- readLegacyESConfig: () => ({
- requestTimeout: duration(30000),
- customHeaders: {},
- requestHeadersWhitelist: [],
- hosts: ['http://localhost:9201', 'http://localhost:9202', 'http://localhost:9203'],
- }),
+ proxy: {
+ readLegacyESConfig: async () => ({
+ requestTimeout: duration(30000),
+ customHeaders: {},
+ requestHeadersWhitelist: [],
+ hosts: ['http://localhost:9201', 'http://localhost:9202', 'http://localhost:9203'],
+ }),
+ },
})
);
diff --git a/src/plugins/console/server/plugin.ts b/src/plugins/console/server/plugin.ts
index eedd1541e8898..a76a35f8146c9 100644
--- a/src/plugins/console/server/plugin.ts
+++ b/src/plugins/console/server/plugin.ts
@@ -19,13 +19,12 @@
import { first } from 'rxjs/operators';
import { CoreSetup, Logger, Plugin, PluginInitializerContext } from 'kibana/server';
-import { readLegacyEsConfig } from '../../../legacy/core_plugins/console_legacy';
-
import { ProxyConfigCollection } from './lib';
-import { SpecDefinitionsService } from './services';
+import { SpecDefinitionsService, EsLegacyConfigService } from './services';
import { ConfigType } from './config';
-import { registerProxyRoute } from './routes/api/console/proxy';
-import { registerSpecDefinitionsRoute } from './routes/api/console/spec_definitions';
+
+import { registerRoutes } from './routes';
+
import { ESConfigForProxy, ConsoleSetup, ConsoleStart } from './types';
export class ConsoleServerPlugin implements Plugin {
@@ -33,11 +32,13 @@ export class ConsoleServerPlugin implements Plugin {
specDefinitionsService = new SpecDefinitionsService();
+ esLegacyConfigService = new EsLegacyConfigService();
+
constructor(private readonly ctx: PluginInitializerContext) {
this.log = this.ctx.logger.get();
}
- async setup({ http, capabilities, getStartServices }: CoreSetup) {
+ async setup({ http, capabilities, getStartServices, elasticsearch }: CoreSetup) {
capabilities.registerProvider(() => ({
dev_tools: {
show: true,
@@ -46,30 +47,31 @@ export class ConsoleServerPlugin implements Plugin {
}));
const config = await this.ctx.config.create().pipe(first()).toPromise();
-
- const { elasticsearch } = await this.ctx.config.legacy.globalConfig$.pipe(first()).toPromise();
-
+ const globalConfig = await this.ctx.config.legacy.globalConfig$.pipe(first()).toPromise();
const proxyPathFilters = config.proxyFilter.map((str: string) => new RegExp(str));
+ this.esLegacyConfigService.setup(elasticsearch.legacy.config$);
+
const router = http.createRouter();
- registerProxyRoute({
+ registerRoutes({
+ router,
log: this.log,
- proxyConfigCollection: new ProxyConfigCollection(config.proxyConfig),
- readLegacyESConfig: (): ESConfigForProxy => {
- const legacyConfig = readLegacyEsConfig();
- return {
- ...elasticsearch,
- ...legacyConfig,
- };
+ services: {
+ esLegacyConfigService: this.esLegacyConfigService,
+ specDefinitionService: this.specDefinitionsService,
+ },
+ proxy: {
+ proxyConfigCollection: new ProxyConfigCollection(config.proxyConfig),
+ readLegacyESConfig: async (): Promise => {
+ const legacyConfig = await this.esLegacyConfigService.readConfig();
+ return {
+ ...globalConfig.elasticsearch,
+ ...legacyConfig,
+ };
+ },
+ pathFilters: proxyPathFilters,
},
- pathFilters: proxyPathFilters,
- router,
- });
-
- registerSpecDefinitionsRoute({
- router,
- services: { specDefinitions: this.specDefinitionsService },
});
return {
@@ -82,4 +84,8 @@ export class ConsoleServerPlugin implements Plugin {
...this.specDefinitionsService.start(),
};
}
+
+ stop() {
+ this.esLegacyConfigService.stop();
+ }
}
diff --git a/src/plugins/vis_type_metric/public/metric_vis_type.test.ts b/src/plugins/console/server/routes/api/console/es_config/index.ts
similarity index 62%
rename from src/plugins/vis_type_metric/public/metric_vis_type.test.ts
rename to src/plugins/console/server/routes/api/console/es_config/index.ts
index 636118c692aaa..a115a6b32ad01 100644
--- a/src/plugins/vis_type_metric/public/metric_vis_type.test.ts
+++ b/src/plugins/console/server/routes/api/console/es_config/index.ts
@@ -17,13 +17,17 @@
* under the License.
*/
-import { createMetricVisTypeDefinition } from './metric_vis_type';
-import { MetricVisComponent } from './components/metric_vis_component';
+import { EsConfigApiResponse } from '../../../../../common/types/api_responses';
+import { RouteDependencies } from '../../../';
-describe('metric_vis - createMetricVisTypeDefinition', () => {
- it('has metric vis component set', () => {
- const def = createMetricVisTypeDefinition();
+export const registerEsConfigRoute = ({ router, services }: RouteDependencies): void => {
+ router.get({ path: '/api/console/es_config', validate: false }, async (ctx, req, res) => {
+ const {
+ hosts: [host],
+ } = await services.esLegacyConfigService.readConfig();
- expect(def.visConfig.component).toBe(MetricVisComponent);
+ const body: EsConfigApiResponse = { host };
+
+ return res.ok({ body });
});
-});
+};
diff --git a/src/plugins/console/server/routes/api/console/proxy/create_handler.ts b/src/plugins/console/server/routes/api/console/proxy/create_handler.ts
index a16fb1dadfbcf..f6d9bcb77ddda 100644
--- a/src/plugins/console/server/routes/api/console/proxy/create_handler.ts
+++ b/src/plugins/console/server/routes/api/console/proxy/create_handler.ts
@@ -21,7 +21,7 @@ import { Agent, IncomingMessage } from 'http';
import * as url from 'url';
import { pick, trimStart, trimEnd } from 'lodash';
-import { KibanaRequest, Logger, RequestHandler } from 'kibana/server';
+import { KibanaRequest, RequestHandler } from 'kibana/server';
import { ESConfigForProxy } from '../../../../types';
import {
@@ -31,19 +31,14 @@ import {
setHeaders,
} from '../../../../lib';
-import { Body, Query } from './validation_config';
-
// TODO: find a better way to get information from the request like remoteAddress and remotePort
// for forwarding.
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { ensureRawRequest } from '../../../../../../../core/server/http/router';
-export interface CreateHandlerDependencies {
- log: Logger;
- readLegacyESConfig: () => ESConfigForProxy;
- pathFilters: RegExp[];
- proxyConfigCollection: ProxyConfigCollection;
-}
+import { RouteDependencies } from '../../../';
+
+import { Body, Query } from './validation_config';
function toURL(base: string, path: string) {
const urlResult = new url.URL(`${trimEnd(base, '/')}/${trimStart(path, '/')}`);
@@ -120,14 +115,8 @@ function getProxyHeaders(req: KibanaRequest) {
export const createHandler = ({
log,
- readLegacyESConfig,
- pathFilters,
- proxyConfigCollection,
-}: CreateHandlerDependencies): RequestHandler => async (
- ctx,
- request,
- response
-) => {
+ proxy: { readLegacyESConfig, pathFilters, proxyConfigCollection },
+}: RouteDependencies): RequestHandler => async (ctx, request, response) => {
const { body, query } = request;
const { path, method } = query;
@@ -140,7 +129,7 @@ export const createHandler = ({
});
}
- const legacyConfig = readLegacyESConfig();
+ const legacyConfig = await readLegacyESConfig();
const { hosts } = legacyConfig;
let esIncomingMessage: IncomingMessage;
diff --git a/src/plugins/console/server/routes/api/console/proxy/index.ts b/src/plugins/console/server/routes/api/console/proxy/index.ts
index 5f7df1d7cf66b..5841671c340bd 100644
--- a/src/plugins/console/server/routes/api/console/proxy/index.ts
+++ b/src/plugins/console/server/routes/api/console/proxy/index.ts
@@ -17,17 +17,13 @@
* under the License.
*/
-import { IRouter } from 'kibana/server';
import { routeValidationConfig } from './validation_config';
-import { createHandler, CreateHandlerDependencies } from './create_handler';
+import { createHandler } from './create_handler';
-export const registerProxyRoute = (
- deps: {
- router: IRouter;
- } & CreateHandlerDependencies
-) => {
- const { router, ...handlerDeps } = deps;
- router.post(
+import { RouteDependencies } from '../../../';
+
+export const registerProxyRoute = (deps: RouteDependencies) => {
+ deps.router.post(
{
path: '/api/console/proxy',
options: {
@@ -39,6 +35,6 @@ export const registerProxyRoute = (
},
validate: routeValidationConfig,
},
- createHandler(handlerDeps)
+ createHandler(deps)
);
};
diff --git a/src/plugins/console/server/routes/api/console/spec_definitions/index.ts b/src/plugins/console/server/routes/api/console/spec_definitions/index.ts
index 5c7e679cd0d35..a179c36364e26 100644
--- a/src/plugins/console/server/routes/api/console/spec_definitions/index.ts
+++ b/src/plugins/console/server/routes/api/console/spec_definitions/index.ts
@@ -16,8 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { IRouter, RequestHandler } from 'kibana/server';
-import { SpecDefinitionsService } from '../../../../services';
+import { RequestHandler } from 'kibana/server';
+import { RouteDependencies } from '../../../';
interface SpecDefinitionsRouteResponse {
es: {
@@ -27,16 +27,10 @@ interface SpecDefinitionsRouteResponse {
};
}
-export const registerSpecDefinitionsRoute = ({
- router,
- services,
-}: {
- router: IRouter;
- services: { specDefinitions: SpecDefinitionsService };
-}) => {
+export const registerSpecDefinitionsRoute = ({ router, services }: RouteDependencies) => {
const handler: RequestHandler = async (ctx, request, response) => {
const specResponse: SpecDefinitionsRouteResponse = {
- es: services.specDefinitions.asJson(),
+ es: services.specDefinitionService.asJson(),
};
return response.ok({
diff --git a/src/plugins/console/server/routes/index.ts b/src/plugins/console/server/routes/index.ts
new file mode 100644
index 0000000000000..cbd1cef7b36e3
--- /dev/null
+++ b/src/plugins/console/server/routes/index.ts
@@ -0,0 +1,50 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { IRouter, Logger } from 'kibana/server';
+
+import { EsLegacyConfigService, SpecDefinitionsService } from '../services';
+import { ESConfigForProxy } from '../types';
+import { ProxyConfigCollection } from '../lib';
+
+import { registerEsConfigRoute } from './api/console/es_config';
+import { registerProxyRoute } from './api/console/proxy';
+import { registerSpecDefinitionsRoute } from './api/console/spec_definitions';
+
+export interface ProxyDependencies {
+ readLegacyESConfig: () => Promise;
+ pathFilters: RegExp[];
+ proxyConfigCollection: ProxyConfigCollection;
+}
+
+export interface RouteDependencies {
+ router: IRouter;
+ log: Logger;
+ proxy: ProxyDependencies;
+ services: {
+ esLegacyConfigService: EsLegacyConfigService;
+ specDefinitionService: SpecDefinitionsService;
+ };
+}
+
+export const registerRoutes = (dependencies: RouteDependencies) => {
+ registerEsConfigRoute(dependencies);
+ registerProxyRoute(dependencies);
+ registerSpecDefinitionsRoute(dependencies);
+};
diff --git a/src/plugins/console/server/services/es_legacy_config_service.ts b/src/plugins/console/server/services/es_legacy_config_service.ts
new file mode 100644
index 0000000000000..37928839b1846
--- /dev/null
+++ b/src/plugins/console/server/services/es_legacy_config_service.ts
@@ -0,0 +1,64 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { Observable, Subscription } from 'rxjs';
+import { first } from 'rxjs/operators';
+import { ElasticsearchConfig } from 'kibana/server';
+
+export class EsLegacyConfigService {
+ /**
+ * The elasticsearch config value at a given point in time.
+ */
+ private config?: ElasticsearchConfig;
+
+ /**
+ * An observable that emits elasticsearch config.
+ */
+ private config$?: Observable;
+
+ /**
+ * A reference to the subscription to the elasticsearch observable
+ */
+ private configSub?: Subscription;
+
+ setup(config$: Observable) {
+ this.config$ = config$;
+ this.configSub = this.config$.subscribe((config) => {
+ this.config = config;
+ });
+ }
+
+ stop() {
+ if (this.configSub) {
+ this.configSub.unsubscribe();
+ }
+ }
+
+ async readConfig(): Promise {
+ if (!this.config$) {
+ throw new Error('Could not read elasticsearch config, this service has not been setup!');
+ }
+
+ if (!this.config) {
+ return this.config$.pipe(first()).toPromise();
+ }
+
+ return this.config;
+ }
+}
diff --git a/src/plugins/console/server/services/index.ts b/src/plugins/console/server/services/index.ts
index c8dfeccd23070..c9d0b8b858150 100644
--- a/src/plugins/console/server/services/index.ts
+++ b/src/plugins/console/server/services/index.ts
@@ -17,4 +17,6 @@
* under the License.
*/
+export { EsLegacyConfigService } from './es_legacy_config_service';
+
export { SpecDefinitionsService } from './spec_definitions_service';
diff --git a/src/plugins/console/server/types.ts b/src/plugins/console/server/types.ts
index 4f026555ada7b..5dc8322c23ea9 100644
--- a/src/plugins/console/server/types.ts
+++ b/src/plugins/console/server/types.ts
@@ -38,8 +38,8 @@ export interface ESConfigForProxy {
requestTimeout: Duration;
ssl?: {
verificationMode: 'none' | 'certificate' | 'full';
- certificateAuthorities: string[] | string;
alwaysPresentCertificate: boolean;
+ certificateAuthorities?: string[];
certificate?: string;
key?: string;
keyPassphrase?: string;
diff --git a/src/plugins/dashboard/public/application/actions/add_to_library_action.test.tsx b/src/plugins/dashboard/public/application/actions/add_to_library_action.test.tsx
new file mode 100644
index 0000000000000..9fa7fff9ad087
--- /dev/null
+++ b/src/plugins/dashboard/public/application/actions/add_to_library_action.test.tsx
@@ -0,0 +1,162 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { isErrorEmbeddable, IContainer, ReferenceOrValueEmbeddable } from '../../embeddable_plugin';
+import { DashboardContainer } from '../embeddable';
+import { getSampleDashboardInput } from '../test_helpers';
+import {
+ CONTACT_CARD_EMBEDDABLE,
+ ContactCardEmbeddableFactory,
+ ContactCardEmbeddable,
+ ContactCardEmbeddableInput,
+ ContactCardEmbeddableOutput,
+} from '../../embeddable_plugin_test_samples';
+import { coreMock } from '../../../../../core/public/mocks';
+import { CoreStart } from 'kibana/public';
+import { AddToLibraryAction } from '.';
+import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks';
+import { ViewMode } from '../../../../embeddable/public';
+
+const { setup, doStart } = embeddablePluginMock.createInstance();
+setup.registerEmbeddableFactory(
+ CONTACT_CARD_EMBEDDABLE,
+ new ContactCardEmbeddableFactory((() => null) as any, {} as any)
+);
+const start = doStart();
+
+let container: DashboardContainer;
+let embeddable: ContactCardEmbeddable & ReferenceOrValueEmbeddable;
+let coreStart: CoreStart;
+beforeEach(async () => {
+ coreStart = coreMock.createStart();
+
+ const containerOptions = {
+ ExitFullScreenButton: () => null,
+ SavedObjectFinder: () => null,
+ application: {} as any,
+ embeddable: start,
+ inspector: {} as any,
+ notifications: {} as any,
+ overlays: coreStart.overlays,
+ savedObjectMetaData: {} as any,
+ uiActions: {} as any,
+ };
+
+ container = new DashboardContainer(getSampleDashboardInput(), containerOptions);
+
+ const contactCardEmbeddable = await container.addNewEmbeddable<
+ ContactCardEmbeddableInput,
+ ContactCardEmbeddableOutput,
+ ContactCardEmbeddable
+ >(CONTACT_CARD_EMBEDDABLE, {
+ firstName: 'Kibanana',
+ });
+
+ if (isErrorEmbeddable(contactCardEmbeddable)) {
+ throw new Error('Failed to create embeddable');
+ } else {
+ embeddable = embeddablePluginMock.mockRefOrValEmbeddable<
+ ContactCardEmbeddable,
+ ContactCardEmbeddableInput
+ >(contactCardEmbeddable, {
+ mockedByReferenceInput: { savedObjectId: 'testSavedObjectId', id: contactCardEmbeddable.id },
+ mockedByValueInput: { firstName: 'Kibanana', id: contactCardEmbeddable.id },
+ });
+ embeddable.updateInput({ viewMode: ViewMode.EDIT });
+ }
+});
+
+test('Add to library is compatible when embeddable on dashboard has value type input', async () => {
+ const action = new AddToLibraryAction();
+ embeddable.updateInput(await embeddable.getInputAsValueType());
+ expect(await action.isCompatible({ embeddable })).toBe(true);
+});
+
+test('Add to library is not compatible when embeddable input is by reference', async () => {
+ const action = new AddToLibraryAction();
+ embeddable.updateInput(await embeddable.getInputAsRefType());
+ expect(await action.isCompatible({ embeddable })).toBe(false);
+});
+
+test('Add to library is not compatible when view mode is set to view', async () => {
+ const action = new AddToLibraryAction();
+ embeddable.updateInput(await embeddable.getInputAsRefType());
+ embeddable.updateInput({ viewMode: ViewMode.VIEW });
+ expect(await action.isCompatible({ embeddable })).toBe(false);
+});
+
+test('Add to library is not compatible when embeddable is not in a dashboard container', async () => {
+ let orphanContactCard = await container.addNewEmbeddable<
+ ContactCardEmbeddableInput,
+ ContactCardEmbeddableOutput,
+ ContactCardEmbeddable
+ >(CONTACT_CARD_EMBEDDABLE, {
+ firstName: 'Orphan',
+ });
+ orphanContactCard = embeddablePluginMock.mockRefOrValEmbeddable<
+ ContactCardEmbeddable,
+ ContactCardEmbeddableInput
+ >(orphanContactCard, {
+ mockedByReferenceInput: { savedObjectId: 'test', id: orphanContactCard.id },
+ mockedByValueInput: { firstName: 'Kibanana', id: orphanContactCard.id },
+ });
+ const action = new AddToLibraryAction();
+ expect(await action.isCompatible({ embeddable: orphanContactCard })).toBe(false);
+});
+
+test('Add to library replaces embeddableId but retains panel count', async () => {
+ const dashboard = embeddable.getRoot() as IContainer;
+ const originalPanelCount = Object.keys(dashboard.getInput().panels).length;
+ const originalPanelKeySet = new Set(Object.keys(dashboard.getInput().panels));
+ const action = new AddToLibraryAction();
+ await action.execute({ embeddable });
+ expect(Object.keys(container.getInput().panels).length).toEqual(originalPanelCount);
+
+ const newPanelId = Object.keys(container.getInput().panels).find(
+ (key) => !originalPanelKeySet.has(key)
+ );
+ expect(newPanelId).toBeDefined();
+ const newPanel = container.getInput().panels[newPanelId!];
+ expect(newPanel.type).toEqual(embeddable.type);
+});
+
+test('Add to library returns reference type input', async () => {
+ const complicatedAttributes = {
+ attribute1: 'The best attribute',
+ attribute2: 22,
+ attribute3: ['array', 'of', 'strings'],
+ attribute4: { nestedattribute: 'hello from the nest' },
+ };
+
+ embeddable = embeddablePluginMock.mockRefOrValEmbeddable(embeddable, {
+ mockedByReferenceInput: { savedObjectId: 'testSavedObjectId', id: embeddable.id },
+ mockedByValueInput: { attributes: complicatedAttributes, id: embeddable.id },
+ });
+ const dashboard = embeddable.getRoot() as IContainer;
+ const originalPanelKeySet = new Set(Object.keys(dashboard.getInput().panels));
+ const action = new AddToLibraryAction();
+ await action.execute({ embeddable });
+ const newPanelId = Object.keys(container.getInput().panels).find(
+ (key) => !originalPanelKeySet.has(key)
+ );
+ expect(newPanelId).toBeDefined();
+ const newPanel = container.getInput().panels[newPanelId!];
+ expect(newPanel.type).toEqual(embeddable.type);
+ expect(newPanel.explicitInput.attributes).toBeUndefined();
+ expect(newPanel.explicitInput.savedObjectId).toBe('testSavedObjectId');
+});
diff --git a/src/plugins/dashboard/public/application/actions/add_to_library_action.tsx b/src/plugins/dashboard/public/application/actions/add_to_library_action.tsx
new file mode 100644
index 0000000000000..3cc1a8a1dffe1
--- /dev/null
+++ b/src/plugins/dashboard/public/application/actions/add_to_library_action.tsx
@@ -0,0 +1,93 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { i18n } from '@kbn/i18n';
+import _ from 'lodash';
+import uuid from 'uuid';
+import { ActionByType, IncompatibleActionError } from '../../ui_actions_plugin';
+import { ViewMode, PanelState, IEmbeddable } from '../../embeddable_plugin';
+import {
+ PanelNotFoundError,
+ EmbeddableInput,
+ isReferenceOrValueEmbeddable,
+} from '../../../../embeddable/public';
+import { DashboardPanelState, DASHBOARD_CONTAINER_TYPE, DashboardContainer } from '..';
+
+export const ACTION_ADD_TO_LIBRARY = 'addToFromLibrary';
+
+export interface AddToLibraryActionContext {
+ embeddable: IEmbeddable;
+}
+
+export class AddToLibraryAction implements ActionByType {
+ public readonly type = ACTION_ADD_TO_LIBRARY;
+ public readonly id = ACTION_ADD_TO_LIBRARY;
+ public order = 15;
+
+ constructor() {}
+
+ public getDisplayName({ embeddable }: AddToLibraryActionContext) {
+ if (!embeddable.getRoot() || !embeddable.getRoot().isContainer) {
+ throw new IncompatibleActionError();
+ }
+ return i18n.translate('dashboard.panel.AddToLibrary', {
+ defaultMessage: 'Add to library',
+ });
+ }
+
+ public getIconType({ embeddable }: AddToLibraryActionContext) {
+ if (!embeddable.getRoot() || !embeddable.getRoot().isContainer) {
+ throw new IncompatibleActionError();
+ }
+ return 'folderCheck';
+ }
+
+ public async isCompatible({ embeddable }: AddToLibraryActionContext) {
+ return Boolean(
+ embeddable.getInput()?.viewMode !== ViewMode.VIEW &&
+ embeddable.getRoot() &&
+ embeddable.getRoot().isContainer &&
+ embeddable.getRoot().type === DASHBOARD_CONTAINER_TYPE &&
+ isReferenceOrValueEmbeddable(embeddable) &&
+ !embeddable.inputIsRefType(embeddable.getInput())
+ );
+ }
+
+ public async execute({ embeddable }: AddToLibraryActionContext) {
+ if (!isReferenceOrValueEmbeddable(embeddable)) {
+ throw new IncompatibleActionError();
+ }
+
+ const newInput = await embeddable.getInputAsRefType();
+
+ embeddable.updateInput(newInput);
+
+ const dashboard = embeddable.getRoot() as DashboardContainer;
+ const panelToReplace = dashboard.getInput().panels[embeddable.id] as DashboardPanelState;
+ if (!panelToReplace) {
+ throw new PanelNotFoundError();
+ }
+
+ const newPanel: PanelState = {
+ type: embeddable.type,
+ explicitInput: { ...newInput, id: uuid.v4() },
+ };
+ dashboard.replacePanel(panelToReplace, newPanel);
+ }
+}
diff --git a/src/plugins/dashboard/public/application/actions/index.ts b/src/plugins/dashboard/public/application/actions/index.ts
index be183976c676f..4343a3409b696 100644
--- a/src/plugins/dashboard/public/application/actions/index.ts
+++ b/src/plugins/dashboard/public/application/actions/index.ts
@@ -33,7 +33,12 @@ export {
ACTION_CLONE_PANEL,
} from './clone_panel_action';
export {
+ AddToLibraryAction,
+ AddToLibraryActionContext,
+ ACTION_ADD_TO_LIBRARY,
+} from './add_to_library_action';
+export {
+ UnlinkFromLibraryAction,
UnlinkFromLibraryActionContext,
ACTION_UNLINK_FROM_LIBRARY,
- UnlinkFromLibraryAction,
} from './unlink_from_library_action';
diff --git a/src/plugins/dashboard/public/attribute_service/attribute_service.tsx b/src/plugins/dashboard/public/attribute_service/attribute_service.tsx
index c2f529fe399f3..fe5f6a0c8e2bd 100644
--- a/src/plugins/dashboard/public/attribute_service/attribute_service.tsx
+++ b/src/plugins/dashboard/public/attribute_service/attribute_service.tsx
@@ -30,13 +30,21 @@ import {
SimpleSavedObject,
I18nStart,
NotificationsStart,
+ OverlayStart,
} from '../../../../core/public';
import {
SavedObjectSaveModal,
showSaveModal,
OnSaveProps,
SaveResult,
+ checkForDuplicateTitle,
} from '../../../saved_objects/public';
+import {
+ EmbeddableStart,
+ EmbeddableFactory,
+ EmbeddableFactoryNotFoundError,
+ Container,
+} from '../../../embeddable/public';
/**
* The attribute service is a shared, generic service that embeddables can use to provide the functionality
@@ -49,12 +57,22 @@ export class AttributeService<
ValType extends EmbeddableInput & { attributes: SavedObjectAttributes },
RefType extends SavedObjectEmbeddableInput
> {
+ private embeddableFactory: EmbeddableFactory;
+
constructor(
private type: string,
private savedObjectsClient: SavedObjectsClientContract,
+ private overlays: OverlayStart,
private i18nContext: I18nStart['Context'],
- private toasts: NotificationsStart['toasts']
- ) {}
+ private toasts: NotificationsStart['toasts'],
+ getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory']
+ ) {
+ const factory = getEmbeddableFactory(this.type);
+ if (!factory) {
+ throw new EmbeddableFactoryNotFoundError(this.type);
+ }
+ this.embeddableFactory = factory;
+ }
public async unwrapAttributes(input: RefType | ValType): Promise {
if (this.inputIsRefType(input)) {
@@ -105,6 +123,15 @@ export class AttributeService<
return isSavedObjectEmbeddableInput(input);
};
+ public getExplicitInputFromEmbeddable(embeddable: IEmbeddable): ValType | RefType {
+ return embeddable.getRoot() &&
+ (embeddable.getRoot() as Container).getInput().panels[embeddable.id].explicitInput
+ ? ((embeddable.getRoot() as Container).getInput().panels[embeddable.id].explicitInput as
+ | ValType
+ | RefType)
+ : (embeddable.getInput() as ValType | RefType);
+ }
+
getInputAsValueType = async (input: ValType | RefType): Promise => {
if (!this.inputIsRefType(input)) {
return input;
@@ -124,16 +151,31 @@ export class AttributeService<
if (this.inputIsRefType(input)) {
return input;
}
-
return new Promise((resolve, reject) => {
const onSave = async (props: OnSaveProps): Promise => {
+ await checkForDuplicateTitle(
+ {
+ title: props.newTitle,
+ copyOnSave: false,
+ lastSavedTitle: '',
+ getEsType: () => this.type,
+ getDisplayName: this.embeddableFactory.getDisplayName,
+ },
+ props.isTitleDuplicateConfirmed,
+ props.onTitleDuplicate,
+ {
+ savedObjectsClient: this.savedObjectsClient,
+ overlays: this.overlays,
+ }
+ );
try {
- input.attributes.title = props.newTitle;
- const wrappedInput = (await this.wrapAttributes(input.attributes, true)) as RefType;
+ const newAttributes = { ...input.attributes };
+ newAttributes.title = props.newTitle;
+ const wrappedInput = (await this.wrapAttributes(newAttributes, true)) as RefType;
resolve(wrappedInput);
return { id: wrappedInput.savedObjectId };
} catch (error) {
- reject();
+ reject(error);
return { error };
}
};
diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx
index 2a36f2d801850..a788b06f91905 100644
--- a/src/plugins/dashboard/public/plugin.tsx
+++ b/src/plugins/dashboard/public/plugin.tsx
@@ -95,6 +95,11 @@ import { addEmbeddableToDashboardUrl } from './url_utils/url_helper';
import { PlaceholderEmbeddableFactory } from './application/embeddable/placeholder';
import { UrlGeneratorState } from '../../share/public';
import { AttributeService } from '.';
+import {
+ AddToLibraryAction,
+ ACTION_ADD_TO_LIBRARY,
+ AddToLibraryActionContext,
+} from './application/actions/add_to_library_action';
declare module '../../share/public' {
export interface UrlGeneratorStateMapping {
@@ -155,6 +160,7 @@ declare module '../../../plugins/ui_actions/public' {
[ACTION_EXPAND_PANEL]: ExpandPanelActionContext;
[ACTION_REPLACE_PANEL]: ReplacePanelActionContext;
[ACTION_CLONE_PANEL]: ClonePanelActionContext;
+ [ACTION_ADD_TO_LIBRARY]: AddToLibraryActionContext;
[ACTION_UNLINK_FROM_LIBRARY]: UnlinkFromLibraryActionContext;
}
}
@@ -406,6 +412,7 @@ export class DashboardPlugin
const {
uiActions,
data: { indexPatterns, search },
+ embeddable,
} = plugins;
const SavedObjectFinder = getSavedObjectFinder(core.savedObjects, core.uiSettings);
@@ -424,6 +431,9 @@ export class DashboardPlugin
uiActions.attachAction(CONTEXT_MENU_TRIGGER, clonePanelAction.id);
if (this.dashboardFeatureFlagConfig?.allowByValueEmbeddables) {
+ const addToLibraryAction = new AddToLibraryAction();
+ uiActions.registerAction(addToLibraryAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, addToLibraryAction.id);
const unlinkFromLibraryAction = new UnlinkFromLibraryAction();
uiActions.registerAction(unlinkFromLibraryAction);
uiActions.attachAction(CONTEXT_MENU_TRIGGER, unlinkFromLibraryAction.id);
@@ -452,8 +462,10 @@ export class DashboardPlugin
new AttributeService(
type,
core.savedObjects.client,
+ core.overlays,
core.i18n.Context,
- core.notifications.toasts
+ core.notifications.toasts,
+ embeddable.getEmbeddableFactory
),
};
}
diff --git a/src/plugins/data/common/es_query/es_query/get_es_query_config.ts b/src/plugins/data/common/es_query/es_query/get_es_query_config.ts
index ff8fc5b11b26e..87dbbcee03b81 100644
--- a/src/plugins/data/common/es_query/es_query/get_es_query_config.ts
+++ b/src/plugins/data/common/es_query/es_query/get_es_query_config.ts
@@ -18,10 +18,10 @@
*/
import { EsQueryConfig } from './build_es_query';
-import { UI_SETTINGS } from '../../';
+import { GetConfigFn, UI_SETTINGS } from '../../';
interface KibanaConfig {
- get(key: string): T;
+ get: GetConfigFn;
}
export function getEsQueryConfig(config: KibanaConfig) {
diff --git a/src/plugins/data/common/field_formats/converters/date_nanos_shared.ts b/src/plugins/data/common/field_formats/converters/date_nanos_shared.ts
index 89a63243c76f0..7a225cd7d1ae7 100644
--- a/src/plugins/data/common/field_formats/converters/date_nanos_shared.ts
+++ b/src/plugins/data/common/field_formats/converters/date_nanos_shared.ts
@@ -20,7 +20,8 @@
import { i18n } from '@kbn/i18n';
import { memoize, noop } from 'lodash';
import moment, { Moment } from 'moment';
-import { FieldFormat, FIELD_FORMAT_IDS, KBN_FIELD_TYPES, TextContextTypeConvert } from '../../';
+import { FieldFormat, FIELD_FORMAT_IDS, KBN_FIELD_TYPES } from '../../';
+import { TextContextTypeConvert } from '../types';
/**
* Analyse the given moment.js format pattern for the fractional sec part (S,SS,SSS...)
diff --git a/src/plugins/data/common/field_formats/field_formats_registry.ts b/src/plugins/data/common/field_formats/field_formats_registry.ts
index 4b847ebc358d7..32f9f37b9ba53 100644
--- a/src/plugins/data/common/field_formats/field_formats_registry.ts
+++ b/src/plugins/data/common/field_formats/field_formats_registry.ts
@@ -32,7 +32,7 @@ import {
import { baseFormatters } from './constants/base_formatters';
import { FieldFormat } from './field_format';
import { SerializedFieldFormat } from '../../../expressions/common/types';
-import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '../types';
+import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '../kbn_field_types/types';
import { UI_SETTINGS } from '../constants';
export class FieldFormatsRegistry {
diff --git a/src/plugins/data/common/field_formats/types.ts b/src/plugins/data/common/field_formats/types.ts
index 6f773378de08d..daa44b2b0f85b 100644
--- a/src/plugins/data/common/field_formats/types.ts
+++ b/src/plugins/data/common/field_formats/types.ts
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+import { GetConfigFn } from '../types';
import { FieldFormat } from './field_format';
import { FieldFormatsRegistry } from './field_formats_registry';
@@ -72,7 +74,7 @@ export interface FieldFormatConfig {
es?: boolean;
}
-export type FieldFormatsGetConfigFn = (key: string, defaultOverride?: T) => T;
+export type FieldFormatsGetConfigFn = GetConfigFn;
export type IFieldFormat = PublicMethodsOf;
diff --git a/src/plugins/data/common/search/aggs/aggs_service.ts b/src/plugins/data/common/search/aggs/aggs_service.ts
index 59c54fcce6838..6f3e3904dbbd5 100644
--- a/src/plugins/data/common/search/aggs/aggs_service.ts
+++ b/src/plugins/data/common/search/aggs/aggs_service.ts
@@ -19,6 +19,7 @@
import { ExpressionsServiceSetup } from 'src/plugins/expressions/common';
import { UI_SETTINGS } from '../../../common';
+import { GetConfigFn } from '../../types';
import {
AggConfigs,
AggTypesRegistry,
@@ -48,7 +49,7 @@ export interface AggsCommonSetupDependencies {
/** @internal */
export interface AggsCommonStartDependencies {
- getConfig: (key: string) => T;
+ getConfig: GetConfigFn;
}
/**
diff --git a/src/plugins/data/common/search/es_search/types.ts b/src/plugins/data/common/search/es_search/types.ts
index 6fc0923768703..8853e40dd0ad2 100644
--- a/src/plugins/data/common/search/es_search/types.ts
+++ b/src/plugins/data/common/search/es_search/types.ts
@@ -16,14 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { SearchParams, SearchResponse } from 'elasticsearch';
+import { SearchResponse } from 'elasticsearch';
+import { Search } from '@elastic/elasticsearch/api/requestParams';
import { IKibanaSearchRequest, IKibanaSearchResponse } from '../types';
export const ES_SEARCH_STRATEGY = 'es';
export type ISearchRequestParams = {
trackTotalHits?: boolean;
-} & SearchParams;
+} & Search;
export interface IEsSearchRequest extends IKibanaSearchRequest {
params?: ISearchRequestParams;
diff --git a/src/plugins/data/common/types.ts b/src/plugins/data/common/types.ts
index e2ec1a031b0ca..a1e1252b3112f 100644
--- a/src/plugins/data/common/types.ts
+++ b/src/plugins/data/common/types.ts
@@ -20,4 +20,15 @@
export * from './query/types';
export * from './kbn_field_types/types';
export * from './index_patterns/types';
-export { TextContextTypeConvert, IFieldFormatMetaParams } from './field_formats/types';
+
+/**
+ * If a service is being shared on both the client and the server, and
+ * the client code requires synchronous access to uiSettings, both client
+ * and server should wrap the core uiSettings services in a function
+ * matching this signature.
+ *
+ * This matches the signature of the public `core.uiSettings.get`, and
+ * should only be used in scenarios where async access to uiSettings is
+ * not possible.
+ */
+export type GetConfigFn = (key: string, defaultOverride?: T) => T;
diff --git a/src/plugins/data/public/field_formats/converters/date.ts b/src/plugins/data/public/field_formats/converters/date.ts
index 78ef8b293e8b9..8070633ef2dfe 100644
--- a/src/plugins/data/public/field_formats/converters/date.ts
+++ b/src/plugins/data/public/field_formats/converters/date.ts
@@ -20,12 +20,8 @@
import { i18n } from '@kbn/i18n';
import { memoize, noop } from 'lodash';
import moment from 'moment';
-import {
- FieldFormat,
- KBN_FIELD_TYPES,
- TextContextTypeConvert,
- FIELD_FORMAT_IDS,
-} from '../../../common';
+import { FieldFormat, KBN_FIELD_TYPES, FIELD_FORMAT_IDS } from '../../../common';
+import { TextContextTypeConvert } from '../../../common/field_formats/types';
export class DateFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DATE;
diff --git a/src/plugins/data/public/plugin.ts b/src/plugins/data/public/plugin.ts
index 564c571b6ccd6..ee0b0714febc0 100644
--- a/src/plugins/data/public/plugin.ts
+++ b/src/plugins/data/public/plugin.ts
@@ -48,9 +48,7 @@ import {
} from './index_patterns';
import {
setFieldFormats,
- setHttp,
setIndexPatterns,
- setInjectedMetadata,
setNotifications,
setOverlays,
setQueryService,
@@ -164,11 +162,9 @@ export class DataPublicPlugin
public start(core: CoreStart, { uiActions }: DataStartDependencies): DataPublicPluginStart {
const { uiSettings, http, notifications, savedObjects, overlays, application } = core;
- setHttp(http);
setNotifications(notifications);
setOverlays(overlays);
setUiSettings(uiSettings);
- setInjectedMetadata(core.injectedMetadata);
const fieldFormats = this.fieldFormatsService.start();
setFieldFormats(fieldFormats);
diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md
index 58c2bd9957ab8..7defddb8f570a 100644
--- a/src/plugins/data/public/public.api.md
+++ b/src/plugins/data/public/public.api.md
@@ -34,7 +34,6 @@ import { InjectedIntl } from '@kbn/i18n/react';
import { ISearchSource as ISearchSource_2 } from 'src/plugins/data/public';
import { IStorageWrapper } from 'src/plugins/kibana_utils/public';
import { IUiSettingsClient } from 'src/core/public';
-import { IUiSettingsClient as IUiSettingsClient_3 } from 'kibana/public';
import { KibanaClient } from '@elastic/elasticsearch/api/kibana';
import { KibanaConfigType } from 'src/core/server/kibana_config';
import { Location } from 'history';
@@ -61,7 +60,7 @@ import * as Rx from 'rxjs';
import { SavedObject } from 'src/core/server';
import { SavedObject as SavedObject_3 } from 'src/core/public';
import { SavedObjectsClientContract } from 'src/core/public';
-import { SearchParams } from 'elasticsearch';
+import { Search } from '@elastic/elasticsearch/api/requestParams';
import { SearchResponse as SearchResponse_2 } from 'elasticsearch';
import { SerializedFieldFormat as SerializedFieldFormat_2 } from 'src/plugins/expressions/common';
import { Subscription } from 'rxjs';
@@ -594,10 +593,11 @@ export const fieldFormats: {
// @public (undocumented)
export type FieldFormatsContentType = 'html' | 'text';
+// Warning: (ae-forgotten-export) The symbol "GetConfigFn" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "FieldFormatsGetConfigFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
-export type FieldFormatsGetConfigFn = (key: string, defaultOverride?: T) => T;
+export type FieldFormatsGetConfigFn = GetConfigFn;
// Warning: (ae-missing-release-tag) "FieldList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -727,12 +727,11 @@ export function getEsPreference(uiSettings: IUiSettingsClient_2, sessionId?: str
export const getKbnTypeNames: () => string[];
// Warning: (ae-forgotten-export) The symbol "ISearchRequestParams" needs to be exported by the entry point index.d.ts
-// Warning: (ae-missing-release-tag) "getSearchParamsFromRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function getSearchParamsFromRequest(searchRequest: SearchRequest, dependencies: {
- injectedMetadata: CoreStart['injectedMetadata'];
- uiSettings: IUiSettingsClient_3;
+ esShardTimeout: number;
+ getConfig: GetConfigFn;
}): ISearchRequestParams;
// Warning: (ae-missing-release-tag) "getTime" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
diff --git a/src/plugins/data/public/search/collectors/create_usage_collector.test.ts b/src/plugins/data/public/search/collectors/create_usage_collector.test.ts
index aaaac5ae6ff7c..315d4678cabf1 100644
--- a/src/plugins/data/public/search/collectors/create_usage_collector.test.ts
+++ b/src/plugins/data/public/search/collectors/create_usage_collector.test.ts
@@ -42,7 +42,7 @@ describe('Search Usage Collector', () => {
{} as any,
]);
mockUsageCollectionSetup = usageCollectionPluginMock.createSetupContract();
- usageCollector = createUsageCollector(mockCoreSetup, mockUsageCollectionSetup);
+ usageCollector = createUsageCollector(mockCoreSetup.getStartServices, mockUsageCollectionSetup);
});
test('tracks query timeouts', async () => {
diff --git a/src/plugins/data/public/search/collectors/create_usage_collector.ts b/src/plugins/data/public/search/collectors/create_usage_collector.ts
index 7adb0c3caa675..321b2c5b99049 100644
--- a/src/plugins/data/public/search/collectors/create_usage_collector.ts
+++ b/src/plugins/data/public/search/collectors/create_usage_collector.ts
@@ -18,16 +18,16 @@
*/
import { first } from 'rxjs/operators';
-import { CoreSetup } from '../../../../../core/public';
+import { StartServicesAccessor } from '../../../../../core/public';
import { METRIC_TYPE, UsageCollectionSetup } from '../../../../usage_collection/public';
import { SEARCH_EVENT_TYPE, SearchUsageCollector } from './types';
export const createUsageCollector = (
- core: CoreSetup,
+ getStartServices: StartServicesAccessor,
usageCollection?: UsageCollectionSetup
): SearchUsageCollector => {
const getCurrentApp = async () => {
- const [{ application }] = await core.getStartServices();
+ const [{ application }] = await getStartServices();
return application.currentAppId$.pipe(first()).toPromise();
};
diff --git a/src/plugins/data/public/search/fetch/get_search_params.test.ts b/src/plugins/data/public/search/fetch/get_search_params.test.ts
index f9b62fdd4fc61..1ecb879b1602d 100644
--- a/src/plugins/data/public/search/fetch/get_search_params.test.ts
+++ b/src/plugins/data/public/search/fetch/get_search_params.test.ts
@@ -18,13 +18,10 @@
*/
import { getSearchParams } from './get_search_params';
-import { IUiSettingsClient } from 'kibana/public';
-import { UI_SETTINGS } from '../../../common';
+import { GetConfigFn, UI_SETTINGS } from '../../../common';
-function getConfigStub(config: any = {}) {
- return {
- get: (key) => config[key],
- } as IUiSettingsClient;
+function getConfigStub(config: any = {}): GetConfigFn {
+ return (key) => config[key];
}
describe('getSearchParams', () => {
diff --git a/src/plugins/data/public/search/fetch/get_search_params.ts b/src/plugins/data/public/search/fetch/get_search_params.ts
index 3246156b6b37e..5e0395189f647 100644
--- a/src/plugins/data/public/search/fetch/get_search_params.ts
+++ b/src/plugins/data/public/search/fetch/get_search_params.ts
@@ -17,37 +17,36 @@
* under the License.
*/
-import { IUiSettingsClient, CoreStart } from 'kibana/public';
-import { UI_SETTINGS, ISearchRequestParams } from '../../../common';
+import { UI_SETTINGS, ISearchRequestParams, GetConfigFn } from '../../../common';
import { SearchRequest } from './types';
const sessionId = Date.now();
-export function getSearchParams(config: IUiSettingsClient, esShardTimeout: number = 0) {
+export function getSearchParams(getConfig: GetConfigFn, esShardTimeout: number = 0) {
return {
rest_total_hits_as_int: true,
ignore_unavailable: true,
- ignore_throttled: getIgnoreThrottled(config),
- max_concurrent_shard_requests: getMaxConcurrentShardRequests(config),
- preference: getPreference(config),
+ ignore_throttled: getIgnoreThrottled(getConfig),
+ max_concurrent_shard_requests: getMaxConcurrentShardRequests(getConfig),
+ preference: getPreference(getConfig),
timeout: getTimeout(esShardTimeout),
};
}
-export function getIgnoreThrottled(config: IUiSettingsClient) {
- return !config.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN);
+export function getIgnoreThrottled(getConfig: GetConfigFn) {
+ return !getConfig(UI_SETTINGS.SEARCH_INCLUDE_FROZEN);
}
-export function getMaxConcurrentShardRequests(config: IUiSettingsClient) {
- const maxConcurrentShardRequests = config.get(UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS);
+export function getMaxConcurrentShardRequests(getConfig: GetConfigFn) {
+ const maxConcurrentShardRequests = getConfig(UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS);
return maxConcurrentShardRequests > 0 ? maxConcurrentShardRequests : undefined;
}
-export function getPreference(config: IUiSettingsClient) {
- const setRequestPreference = config.get(UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE);
+export function getPreference(getConfig: GetConfigFn) {
+ const setRequestPreference = getConfig(UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE);
if (setRequestPreference === 'sessionId') return sessionId;
return setRequestPreference === 'custom'
- ? config.get(UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE)
+ ? getConfig(UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE)
: undefined;
}
@@ -55,13 +54,15 @@ export function getTimeout(esShardTimeout: number) {
return esShardTimeout > 0 ? `${esShardTimeout}ms` : undefined;
}
+/** @public */
+// TODO: Could provide this on runtime contract with dependencies
+// already wired up.
export function getSearchParamsFromRequest(
searchRequest: SearchRequest,
- dependencies: { injectedMetadata: CoreStart['injectedMetadata']; uiSettings: IUiSettingsClient }
+ dependencies: { esShardTimeout: number; getConfig: GetConfigFn }
): ISearchRequestParams {
- const { injectedMetadata, uiSettings } = dependencies;
- const esShardTimeout = injectedMetadata.getInjectedVar('esShardTimeout') as number;
- const searchParams = getSearchParams(uiSettings, esShardTimeout);
+ const { esShardTimeout, getConfig } = dependencies;
+ const searchParams = getSearchParams(getConfig, esShardTimeout);
return {
index: searchRequest.index.title || searchRequest.index,
diff --git a/src/plugins/data/public/search/fetch/types.ts b/src/plugins/data/public/search/fetch/types.ts
index dda66d6b5238d..18d277204815b 100644
--- a/src/plugins/data/public/search/fetch/types.ts
+++ b/src/plugins/data/public/search/fetch/types.ts
@@ -17,7 +17,7 @@
* under the License.
*/
-import { IUiSettingsClient } from '../../../../../core/public';
+import { GetConfigFn } from '../../../common';
import { ISearchStartLegacy } from '../types';
export type SearchRequest = any;
@@ -30,7 +30,7 @@ export interface FetchOptions {
export interface FetchHandlers {
legacySearchService: ISearchStartLegacy;
- config: IUiSettingsClient;
+ config: { get: GetConfigFn };
esShardTimeout: number;
}
diff --git a/src/plugins/data/public/search/legacy/default_search_strategy.ts b/src/plugins/data/public/search/legacy/default_search_strategy.ts
index 284768bc5a1cc..6ccb0a01cf898 100644
--- a/src/plugins/data/public/search/legacy/default_search_strategy.ts
+++ b/src/plugins/data/public/search/legacy/default_search_strategy.ts
@@ -42,7 +42,7 @@ function msearch({
index: index.title || index,
search_type: searchType,
ignore_unavailable: true,
- preference: getPreference(config),
+ preference: getPreference(config.get),
};
const inlineBody = {
...body,
@@ -52,7 +52,7 @@ function msearch({
});
const searching = es.msearch({
- ...getMSearchParams(config),
+ ...getMSearchParams(config.get),
body: `${inlineRequests.join('\n')}\n`,
});
diff --git a/src/plugins/data/public/search/legacy/es_client/get_es_client.ts b/src/plugins/data/public/search/legacy/es_client/get_es_client.ts
index 93d9d24920271..4367544ad9ff4 100644
--- a/src/plugins/data/public/search/legacy/es_client/get_es_client.ts
+++ b/src/plugins/data/public/search/legacy/es_client/get_es_client.ts
@@ -22,17 +22,20 @@ import { default as es } from 'elasticsearch-browser/elasticsearch';
import { CoreStart, PackageInfo } from 'kibana/public';
import { BehaviorSubject } from 'rxjs';
-export function getEsClient(
- injectedMetadata: CoreStart['injectedMetadata'],
- http: CoreStart['http'],
- packageInfo: PackageInfo
-) {
- const esRequestTimeout = injectedMetadata.getInjectedVar('esRequestTimeout') as number;
- const esApiVersion = injectedMetadata.getInjectedVar('esApiVersion') as string;
-
+export function getEsClient({
+ esRequestTimeout,
+ esApiVersion,
+ http,
+ packageVersion,
+}: {
+ esRequestTimeout: number;
+ esApiVersion: string;
+ http: CoreStart['http'];
+ packageVersion: PackageInfo['version'];
+}) {
// Use legacy es client for msearch.
const client = es.Client({
- host: getEsUrl(http, packageInfo),
+ host: getEsUrl(http, packageVersion),
log: 'info',
requestTimeout: esRequestTimeout,
apiVersion: esApiVersion,
@@ -78,7 +81,7 @@ function wrapEsClientMethod(esClient: any, method: string, loadingCount$: Behavi
};
}
-function getEsUrl(http: CoreStart['http'], packageInfo: PackageInfo) {
+function getEsUrl(http: CoreStart['http'], packageVersion: PackageInfo['version']) {
const a = document.createElement('a');
a.href = http.basePath.prepend('/elasticsearch');
const protocolPort = /https/.test(a.protocol) ? 443 : 80;
@@ -89,7 +92,7 @@ function getEsUrl(http: CoreStart['http'], packageInfo: PackageInfo) {
protocol: a.protocol,
pathname: a.pathname,
headers: {
- 'kbn-version': packageInfo.version,
+ 'kbn-version': packageVersion,
},
};
}
diff --git a/src/plugins/data/public/search/legacy/fetch_soon.test.ts b/src/plugins/data/public/search/legacy/fetch_soon.test.ts
index 61d3568350b6b..d375398af1add 100644
--- a/src/plugins/data/public/search/legacy/fetch_soon.test.ts
+++ b/src/plugins/data/public/search/legacy/fetch_soon.test.ts
@@ -19,15 +19,12 @@
import { fetchSoon } from './fetch_soon';
import { callClient } from './call_client';
-import { IUiSettingsClient } from 'kibana/public';
import { FetchHandlers, FetchOptions } from '../fetch/types';
import { SearchRequest, SearchResponse } from '../index';
-import { UI_SETTINGS } from '../../../common';
+import { GetConfigFn, UI_SETTINGS } from '../../../common';
-function getConfigStub(config: any = {}) {
- return {
- get: (key) => config[key],
- } as IUiSettingsClient;
+function getConfigStub(config: any = {}): GetConfigFn {
+ return (key) => config[key];
}
const mockResponses: Record = {
@@ -60,9 +57,9 @@ describe('fetchSoon', () => {
});
test('should execute asap if config is set to not batch searches', () => {
- const config = getConfigStub({
- [UI_SETTINGS.COURIER_BATCH_SEARCHES]: false,
- });
+ const config = {
+ get: getConfigStub({ [UI_SETTINGS.COURIER_BATCH_SEARCHES]: false }),
+ };
const request = {};
const options = {};
@@ -72,9 +69,9 @@ describe('fetchSoon', () => {
});
test('should delay by 50ms if config is set to batch searches', () => {
- const config = getConfigStub({
- [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true,
- });
+ const config = {
+ get: getConfigStub({ [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true }),
+ };
const request = {};
const options = {};
@@ -88,9 +85,9 @@ describe('fetchSoon', () => {
});
test('should send a batch of requests to callClient', () => {
- const config = getConfigStub({
- [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true,
- });
+ const config = {
+ get: getConfigStub({ [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true }),
+ };
const requests = [{ foo: 1 }, { foo: 2 }];
const options = [{ bar: 1 }, { bar: 2 }];
@@ -105,9 +102,9 @@ describe('fetchSoon', () => {
});
test('should return the response to the corresponding call for multiple batched requests', async () => {
- const config = getConfigStub({
- [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true,
- });
+ const config = {
+ get: getConfigStub({ [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true }),
+ };
const requests = [{ _mockResponseId: 'foo' }, { _mockResponseId: 'bar' }];
const promises = requests.map((request) => {
@@ -120,9 +117,9 @@ describe('fetchSoon', () => {
});
test('should wait for the previous batch to start before starting a new batch', () => {
- const config = getConfigStub({
- [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true,
- });
+ const config = {
+ get: getConfigStub({ [UI_SETTINGS.COURIER_BATCH_SEARCHES]: true }),
+ };
const firstBatch = [{ foo: 1 }, { foo: 2 }];
const secondBatch = [{ bar: 1 }, { bar: 2 }];
diff --git a/src/plugins/data/public/search/legacy/get_msearch_params.test.ts b/src/plugins/data/public/search/legacy/get_msearch_params.test.ts
index dc61e19406631..d3206950174c8 100644
--- a/src/plugins/data/public/search/legacy/get_msearch_params.test.ts
+++ b/src/plugins/data/public/search/legacy/get_msearch_params.test.ts
@@ -18,13 +18,10 @@
*/
import { getMSearchParams } from './get_msearch_params';
-import { IUiSettingsClient } from '../../../../../core/public';
-import { UI_SETTINGS } from '../../../common';
+import { GetConfigFn, UI_SETTINGS } from '../../../common';
-function getConfigStub(config: any = {}) {
- return {
- get: (key) => config[key],
- } as IUiSettingsClient;
+function getConfigStub(config: any = {}): GetConfigFn {
+ return (key) => config[key];
}
describe('getMSearchParams', () => {
diff --git a/src/plugins/data/public/search/legacy/get_msearch_params.ts b/src/plugins/data/public/search/legacy/get_msearch_params.ts
index 48d13903c972f..c4f77b25078cd 100644
--- a/src/plugins/data/public/search/legacy/get_msearch_params.ts
+++ b/src/plugins/data/public/search/legacy/get_msearch_params.ts
@@ -17,13 +17,13 @@
* under the License.
*/
-import { IUiSettingsClient } from 'kibana/public';
+import { GetConfigFn } from '../../../common';
import { getIgnoreThrottled, getMaxConcurrentShardRequests } from '../fetch';
-export function getMSearchParams(config: IUiSettingsClient) {
+export function getMSearchParams(getConfig: GetConfigFn) {
return {
rest_total_hits_as_int: true,
- ignore_throttled: getIgnoreThrottled(config),
- max_concurrent_shard_requests: getMaxConcurrentShardRequests(config),
+ ignore_throttled: getIgnoreThrottled(getConfig),
+ max_concurrent_shard_requests: getMaxConcurrentShardRequests(getConfig),
};
}
diff --git a/src/plugins/data/public/search/search_service.test.ts b/src/plugins/data/public/search/search_service.test.ts
index 4360a0caa7cde..738f1e8ffbca0 100644
--- a/src/plugins/data/public/search/search_service.test.ts
+++ b/src/plugins/data/public/search/search_service.test.ts
@@ -52,6 +52,7 @@ describe('Search service', () => {
} as any);
expect(start).toHaveProperty('aggs');
expect(start).toHaveProperty('search');
+ expect(start).toHaveProperty('searchSource');
});
});
});
diff --git a/src/plugins/data/public/search/search_service.ts b/src/plugins/data/public/search/search_service.ts
index 04e1a46c84652..a65b2b4b71f20 100644
--- a/src/plugins/data/public/search/search_service.ts
+++ b/src/plugins/data/public/search/search_service.ts
@@ -51,11 +51,22 @@ export class SearchService implements Plugin {
private usageCollector?: SearchUsageCollector;
public setup(
- core: CoreSetup,
- { packageInfo, usageCollection, expressions }: SearchServiceSetupDependencies
+ { http, getStartServices, injectedMetadata, notifications, uiSettings }: CoreSetup,
+ { expressions, packageInfo, usageCollection }: SearchServiceSetupDependencies
): ISearchSetup {
- this.usageCollector = createUsageCollector(core, usageCollection);
- this.esClient = getEsClient(core.injectedMetadata, core.http, packageInfo);
+ const esApiVersion = injectedMetadata.getInjectedVar('esApiVersion') as string;
+ const esRequestTimeout = injectedMetadata.getInjectedVar('esRequestTimeout') as number;
+ const packageVersion = packageInfo.version;
+
+ this.usageCollector = createUsageCollector(getStartServices, usageCollection);
+
+ this.esClient = getEsClient({
+ esRequestTimeout,
+ esApiVersion,
+ http,
+ packageVersion,
+ });
+
/**
* A global object that intercepts all searches and provides convenience methods for cancelling
* all pending search requests, as well as getting the number of pending search requests.
@@ -64,13 +75,13 @@ export class SearchService implements Plugin {
*/
this.searchInterceptor = new SearchInterceptor(
{
- toasts: core.notifications.toasts,
- http: core.http,
- uiSettings: core.uiSettings,
- startServices: core.getStartServices(),
+ toasts: notifications.toasts,
+ http,
+ uiSettings,
+ startServices: getStartServices(),
usageCollector: this.usageCollector!,
},
- core.injectedMetadata.getInjectedVar('esRequestTimeout') as number
+ esRequestTimeout
);
expressions.registerFunction(esdsl);
@@ -79,7 +90,7 @@ export class SearchService implements Plugin {
return {
aggs: this.aggsService.setup({
registerFunction: expressions.registerFunction,
- uiSettings: core.uiSettings,
+ uiSettings,
}),
usageCollector: this.usageCollector!,
__enhance: (enhancements: SearchEnhancements) => {
@@ -101,8 +112,8 @@ export class SearchService implements Plugin {
};
const searchSourceDependencies: SearchSourceDependencies = {
- uiSettings,
- injectedMetadata,
+ getConfig: uiSettings.get.bind(uiSettings),
+ esShardTimeout: injectedMetadata.getInjectedVar('esShardTimeout') as number,
search,
legacySearch,
};
diff --git a/src/plugins/data/public/search/search_source/create_search_source.test.ts b/src/plugins/data/public/search/search_source/create_search_source.test.ts
index 23ab5979595af..56f6ca6c56270 100644
--- a/src/plugins/data/public/search/search_source/create_search_source.test.ts
+++ b/src/plugins/data/public/search/search_source/create_search_source.test.ts
@@ -16,27 +16,28 @@
* specific language governing permissions and limitations
* under the License.
*/
+
import { createSearchSource as createSearchSourceFactory } from './create_search_source';
+import { SearchSourceDependencies } from './search_source';
import { IIndexPattern } from '../../../common/index_patterns';
import { IndexPatternsContract } from '../../index_patterns/index_patterns';
import { Filter } from '../../../common/es_query/filters';
-import { coreMock } from '../../../../../core/public/mocks';
import { dataPluginMock } from '../../mocks';
describe('createSearchSource', () => {
const indexPatternMock: IIndexPattern = {} as IIndexPattern;
let indexPatternContractMock: jest.Mocked;
- let dependencies: any;
+ let dependencies: SearchSourceDependencies;
let createSearchSource: ReturnType;
beforeEach(() => {
- const core = coreMock.createStart();
const data = dataPluginMock.createStartContract();
dependencies = {
- searchService: data.search,
- uiSettings: core.uiSettings,
- injectedMetadata: core.injectedMetadata,
+ getConfig: jest.fn(),
+ search: jest.fn(),
+ legacySearch: data.search.__LEGACY,
+ esShardTimeout: 30000,
};
indexPatternContractMock = ({
diff --git a/src/plugins/data/public/search/search_source/mocks.ts b/src/plugins/data/public/search/search_source/mocks.ts
index cf2d009e41b54..4e1c35557ffa6 100644
--- a/src/plugins/data/public/search/search_source/mocks.ts
+++ b/src/plugins/data/public/search/search_source/mocks.ts
@@ -17,10 +17,7 @@
* under the License.
*/
-import {
- injectedMetadataServiceMock,
- uiSettingsServiceMock,
-} from '../../../../../core/public/mocks';
+import { uiSettingsServiceMock } from '../../../../../core/public/mocks';
import { ISearchSource, SearchSource } from './search_source';
import { SearchSourceFields } from './types';
@@ -54,6 +51,8 @@ export const searchSourceMock = {
export const createSearchSourceMock = (fields?: SearchSourceFields) =>
new SearchSource(fields, {
+ getConfig: uiSettingsServiceMock.createStartContract().get,
+ esShardTimeout: 30000,
search: jest.fn(),
legacySearch: {
esClient: {
@@ -61,6 +60,4 @@ export const createSearchSourceMock = (fields?: SearchSourceFields) =>
msearch: jest.fn(),
},
},
- uiSettings: uiSettingsServiceMock.createStartContract(),
- injectedMetadata: injectedMetadataServiceMock.createStartContract(),
});
diff --git a/src/plugins/data/public/search/search_source/search_source.test.ts b/src/plugins/data/public/search/search_source/search_source.test.ts
index 6d53b8dfc4b4e..2f0fa0765e25a 100644
--- a/src/plugins/data/public/search/search_source/search_source.test.ts
+++ b/src/plugins/data/public/search/search_source/search_source.test.ts
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
+
import { Observable } from 'rxjs';
-import { SearchSource } from './search_source';
+import { GetConfigFn } from 'src/plugins/data/common';
+import { SearchSource, SearchSourceDependencies } from './search_source';
import { IndexPattern, SortDirection } from '../..';
import { fetchSoon } from '../legacy';
-import { IUiSettingsClient } from '../../../../../core/public';
import { dataPluginMock } from '../../../../data/public/mocks';
-import { coreMock } from '../../../../../core/public/mocks';
jest.mock('../legacy', () => ({
fetchSoon: jest.fn().mockResolvedValue({}),
@@ -51,10 +51,9 @@ const indexPattern2 = ({
describe('SearchSource', () => {
let mockSearchMethod: any;
- let searchSourceDependencies: any;
+ let searchSourceDependencies: SearchSourceDependencies;
beforeEach(() => {
- const core = coreMock.createStart();
const data = dataPluginMock.createStartContract();
mockSearchMethod = jest.fn(() => {
@@ -69,10 +68,10 @@ describe('SearchSource', () => {
});
searchSourceDependencies = {
+ getConfig: jest.fn(),
search: mockSearchMethod,
legacySearch: data.search.__LEGACY,
- injectedMetadata: core.injectedMetadata,
- uiSettings: core.uiSettings,
+ esShardTimeout: 30000,
};
});
@@ -184,16 +183,11 @@ describe('SearchSource', () => {
describe('#legacy fetch()', () => {
beforeEach(() => {
- const core = coreMock.createStart();
-
searchSourceDependencies = {
...searchSourceDependencies,
- uiSettings: {
- ...core.uiSettings,
- get: jest.fn(() => {
- return true; // batchSearches = true
- }),
- } as IUiSettingsClient,
+ getConfig: jest.fn(() => {
+ return true; // batchSearches = true
+ }) as GetConfigFn,
};
});
diff --git a/src/plugins/data/public/search/search_source/search_source.ts b/src/plugins/data/public/search/search_source/search_source.ts
index 847dc8853d6ba..06ad13bfcfdf5 100644
--- a/src/plugins/data/public/search/search_source/search_source.ts
+++ b/src/plugins/data/public/search/search_source/search_source.ts
@@ -72,7 +72,6 @@
import { setWith } from '@elastic/safer-lodash-set';
import { uniqueId, uniq, extend, pick, difference, omit, isObject, keys, isFunction } from 'lodash';
import { map } from 'rxjs/operators';
-import { CoreStart } from 'kibana/public';
import { normalizeSortRequest } from './normalize_sort_request';
import { filterDocvalueFields } from './filter_docvalue_fields';
import { fieldWildcardFilter } from '../../../../kibana_utils/common';
@@ -82,15 +81,32 @@ import { FetchOptions, RequestFailure, handleResponse, getSearchParamsFromReques
import { getEsQueryConfig, buildEsQuery, Filter, UI_SETTINGS } from '../../../common';
import { getHighlightRequest } from '../../../common/field_formats';
+import { GetConfigFn } from '../../../common/types';
import { fetchSoon } from '../legacy';
import { extractReferences } from './extract_references';
import { ISearchStartLegacy } from '../types';
+/** @internal */
+export const searchSourceRequiredUiSettings = [
+ 'dateFormat:tz',
+ UI_SETTINGS.COURIER_BATCH_SEARCHES,
+ UI_SETTINGS.COURIER_CUSTOM_REQUEST_PREFERENCE,
+ UI_SETTINGS.COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX,
+ UI_SETTINGS.COURIER_MAX_CONCURRENT_SHARD_REQUESTS,
+ UI_SETTINGS.COURIER_SET_REQUEST_PREFERENCE,
+ UI_SETTINGS.DOC_HIGHLIGHT,
+ UI_SETTINGS.META_FIELDS,
+ UI_SETTINGS.QUERY_ALLOW_LEADING_WILDCARDS,
+ UI_SETTINGS.QUERY_STRING_OPTIONS,
+ UI_SETTINGS.SEARCH_INCLUDE_FROZEN,
+ UI_SETTINGS.SORT_OPTIONS,
+];
+
export interface SearchSourceDependencies {
- uiSettings: CoreStart['uiSettings'];
+ getConfig: GetConfigFn;
search: ISearchGeneric;
legacySearch: ISearchStartLegacy;
- injectedMetadata: CoreStart['injectedMetadata'];
+ esShardTimeout: number;
}
/** @public **/
@@ -204,11 +220,11 @@ export class SearchSource {
* @return {Observable>}
*/
private fetch$(searchRequest: SearchRequest, signal?: AbortSignal) {
- const { search, injectedMetadata, uiSettings } = this.dependencies;
+ const { search, esShardTimeout, getConfig } = this.dependencies;
const params = getSearchParamsFromRequest(searchRequest, {
- injectedMetadata,
- uiSettings,
+ esShardTimeout,
+ getConfig,
});
return search({ params, indexType: searchRequest.indexType }, { signal }).pipe(
@@ -221,8 +237,7 @@ export class SearchSource {
* @return {Promise>}
*/
private async legacyFetch(searchRequest: SearchRequest, options: FetchOptions) {
- const { injectedMetadata, legacySearch, uiSettings } = this.dependencies;
- const esShardTimeout = injectedMetadata.getInjectedVar('esShardTimeout') as number;
+ const { esShardTimeout, legacySearch, getConfig } = this.dependencies;
return await fetchSoon(
searchRequest,
@@ -232,7 +247,7 @@ export class SearchSource {
},
{
legacySearchService: legacySearch,
- config: uiSettings,
+ config: { get: getConfig },
esShardTimeout,
}
);
@@ -243,14 +258,14 @@ export class SearchSource {
* @async
*/
async fetch(options: FetchOptions = {}) {
- const { uiSettings } = this.dependencies;
+ const { getConfig } = this.dependencies;
await this.requestIsStarting(options);
const searchRequest = await this.flatten();
this.history = [searchRequest];
let response;
- if (uiSettings.get(UI_SETTINGS.COURIER_BATCH_SEARCHES)) {
+ if (getConfig(UI_SETTINGS.COURIER_BATCH_SEARCHES)) {
response = await this.legacyFetch(searchRequest, options);
} else {
response = this.fetch$(searchRequest, options.abortSignal).toPromise();
@@ -342,7 +357,7 @@ export class SearchSource {
}
};
- const { uiSettings } = this.dependencies;
+ const { getConfig } = this.dependencies;
switch (key) {
case 'filter':
@@ -364,7 +379,7 @@ export class SearchSource {
const sort = normalizeSortRequest(
val,
this.getField('index'),
- uiSettings.get(UI_SETTINGS.SORT_OPTIONS)
+ getConfig(UI_SETTINGS.SORT_OPTIONS)
);
return addToBody(key, sort);
default:
@@ -418,14 +433,11 @@ export class SearchSource {
body._source = index.getSourceFiltering();
}
- const { uiSettings } = this.dependencies;
+ const { getConfig } = this.dependencies;
if (body._source) {
// exclude source fields for this index pattern specified by the user
- const filter = fieldWildcardFilter(
- body._source.excludes,
- uiSettings.get(UI_SETTINGS.META_FIELDS)
- );
+ const filter = fieldWildcardFilter(body._source.excludes, getConfig(UI_SETTINGS.META_FIELDS));
body.docvalue_fields = body.docvalue_fields.filter((docvalueField: any) =>
filter(docvalueField.field)
);
@@ -445,11 +457,11 @@ export class SearchSource {
);
}
- const esQueryConfigs = getEsQueryConfig(uiSettings);
+ const esQueryConfigs = getEsQueryConfig({ get: getConfig });
body.query = buildEsQuery(index, query, filters, esQueryConfigs);
if (highlightAll && body.query) {
- body.highlight = getHighlightRequest(body.query, uiSettings.get(UI_SETTINGS.DOC_HIGHLIGHT));
+ body.highlight = getHighlightRequest(body.query, getConfig(UI_SETTINGS.DOC_HIGHLIGHT));
delete searchRequest.highlightAll;
}
diff --git a/src/plugins/data/public/services.ts b/src/plugins/data/public/services.ts
index ba0b2de393bde..032bce6d8d2aa 100644
--- a/src/plugins/data/public/services.ts
+++ b/src/plugins/data/public/services.ts
@@ -31,8 +31,6 @@ export const [getUiSettings, setUiSettings] = createGetterSetter('Http');
-
export const [getFieldFormats, setFieldFormats] = createGetterSetter(
'FieldFormats'
);
@@ -47,10 +45,6 @@ export const [getQueryService, setQueryService] = createGetterSetter<
DataPublicPluginStart['query']
>('Query');
-export const [getInjectedMetadata, setInjectedMetadata] = createGetterSetter<
- CoreStart['injectedMetadata']
->('InjectedMetadata');
-
export const [getSearchService, setSearchService] = createGetterSetter<
DataPublicPluginStart['search']
>('Search');
diff --git a/src/plugins/data/server/field_formats/converters/date_nanos_server.ts b/src/plugins/data/server/field_formats/converters/date_nanos_server.ts
index 299b2aac93d49..b99febf0c7e73 100644
--- a/src/plugins/data/server/field_formats/converters/date_nanos_server.ts
+++ b/src/plugins/data/server/field_formats/converters/date_nanos_server.ts
@@ -24,7 +24,7 @@ import {
DateNanosFormat,
formatWithNanos,
} from '../../../common/field_formats/converters/date_nanos_shared';
-import { TextContextTypeConvert } from '../../../common';
+import { TextContextTypeConvert } from '../../../common/field_formats/types';
class DateNanosFormatServer extends DateNanosFormat {
textConvert: TextContextTypeConvert = (val) => {
diff --git a/src/plugins/data/server/field_formats/converters/date_server.ts b/src/plugins/data/server/field_formats/converters/date_server.ts
index 85eb65dfc6a8d..19c4adc90bade 100644
--- a/src/plugins/data/server/field_formats/converters/date_server.ts
+++ b/src/plugins/data/server/field_formats/converters/date_server.ts
@@ -23,11 +23,13 @@ import moment from 'moment-timezone';
import {
FieldFormat,
KBN_FIELD_TYPES,
- TextContextTypeConvert,
FIELD_FORMAT_IDS,
FieldFormatsGetConfigFn,
- IFieldFormatMetaParams,
} from '../../../common';
+import {
+ IFieldFormatMetaParams,
+ TextContextTypeConvert,
+} from '../../../common/field_formats/types';
export class DateFormat extends FieldFormat {
static id = FIELD_FORMAT_IDS.DATE;
diff --git a/src/plugins/data/server/search/es_search/es_search_strategy.test.ts b/src/plugins/data/server/search/es_search/es_search_strategy.test.ts
index 2888f9d9d20b5..11564bb336b08 100644
--- a/src/plugins/data/server/search/es_search/es_search_strategy.test.ts
+++ b/src/plugins/data/server/search/es_search/es_search_strategy.test.ts
@@ -26,15 +26,17 @@ describe('ES search strategy', () => {
info: () => {},
};
const mockApiCaller = jest.fn().mockResolvedValue({
- _shards: {
- total: 10,
- failed: 1,
- skipped: 2,
- successful: 7,
+ body: {
+ _shards: {
+ total: 10,
+ failed: 1,
+ skipped: 2,
+ successful: 7,
+ },
},
});
const mockContext = {
- core: { elasticsearch: { legacy: { client: { callAsCurrentUser: mockApiCaller } } } },
+ core: { elasticsearch: { client: { asCurrentUser: { search: mockApiCaller } } } },
};
const mockConfig$ = pluginInitializerContextConfigMock({}).legacy.globalConfig$;
@@ -55,8 +57,7 @@ describe('ES search strategy', () => {
await esSearch.search((mockContext as unknown) as RequestHandlerContext, { params });
expect(mockApiCaller).toBeCalled();
- expect(mockApiCaller.mock.calls[0][0]).toBe('search');
- expect(mockApiCaller.mock.calls[0][1]).toEqual({
+ expect(mockApiCaller.mock.calls[0][0]).toEqual({
...params,
timeout: '0ms',
ignoreUnavailable: true,
@@ -71,8 +72,7 @@ describe('ES search strategy', () => {
await esSearch.search((mockContext as unknown) as RequestHandlerContext, { params });
expect(mockApiCaller).toBeCalled();
- expect(mockApiCaller.mock.calls[0][0]).toBe('search');
- expect(mockApiCaller.mock.calls[0][1]).toEqual({
+ expect(mockApiCaller.mock.calls[0][0]).toEqual({
...params,
restTotalHitsAsInt: true,
});
diff --git a/src/plugins/data/server/search/es_search/es_search_strategy.ts b/src/plugins/data/server/search/es_search/es_search_strategy.ts
index 234c30376d6db..7f9cb665b96b5 100644
--- a/src/plugins/data/server/search/es_search/es_search_strategy.ts
+++ b/src/plugins/data/server/search/es_search/es_search_strategy.ts
@@ -20,6 +20,7 @@ import { first } from 'rxjs/operators';
import { SharedGlobalConfig, Logger } from 'kibana/server';
import { SearchResponse } from 'elasticsearch';
import { Observable } from 'rxjs';
+import { ApiResponse } from '@elastic/elasticsearch';
import { SearchUsage } from '../collectors/usage';
import { ISearchStrategy, getDefaultSearchParams, getTotalLoaded } from '..';
@@ -46,11 +47,10 @@ export const esSearchStrategyProvider = (
};
try {
- const rawResponse = (await context.core.elasticsearch.legacy.client.callAsCurrentUser(
- 'search',
- params,
- options
- )) as SearchResponse;
+ const esResponse = (await context.core.elasticsearch.client.asCurrentUser.search(
+ params
+ )) as ApiResponse>;
+ const rawResponse = esResponse.body;
if (usage) usage.trackSuccess(rawResponse.took);
diff --git a/src/plugins/data/server/server.api.md b/src/plugins/data/server/server.api.md
index 9c8a79f27a9db..f0a0d2763ff23 100644
--- a/src/plugins/data/server/server.api.md
+++ b/src/plugins/data/server/server.api.md
@@ -131,6 +131,7 @@ import { RequestStatistics } from 'src/plugins/inspector/common';
import { SavedObject } from 'src/core/server';
import { SavedObjectsClientContract as SavedObjectsClientContract_2 } from 'src/core/server';
import { ScrollParams } from 'elasticsearch';
+import { Search } from '@elastic/elasticsearch/api/requestParams';
import { SearchParams } from 'elasticsearch';
import { SearchResponse } from 'elasticsearch';
import { SearchShardsParams } from 'elasticsearch';
@@ -418,10 +419,11 @@ export const fieldFormats: {
TruncateFormat: typeof TruncateFormat;
};
+// Warning: (ae-forgotten-export) The symbol "GetConfigFn" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "FieldFormatsGetConfigFn" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
-export type FieldFormatsGetConfigFn = (key: string, defaultOverride?: T) => T;
+export type FieldFormatsGetConfigFn = GetConfigFn;
// Warning: (ae-missing-release-tag) "Filter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
diff --git a/src/plugins/discover/public/application/angular/directives/render_complete.ts b/src/plugins/discover/public/application/angular/directives/render_complete.ts
index 635cf68f12fcb..72f97138790b2 100644
--- a/src/plugins/discover/public/application/angular/directives/render_complete.ts
+++ b/src/plugins/discover/public/application/angular/directives/render_complete.ts
@@ -17,14 +17,14 @@
* under the License.
*/
import { IScope } from 'angular';
-import { RenderCompleteHelper } from '../../../../../kibana_utils/public';
+import { RenderCompleteListener } from '../../../../../kibana_utils/public';
export function createRenderCompleteDirective() {
return {
controller($scope: IScope, $element: JQLite) {
const el = $element[0];
- const renderCompleteHelper = new RenderCompleteHelper(el);
- $scope.$on('$destroy', renderCompleteHelper.destroy);
+ const renderCompleteListener = new RenderCompleteListener(el);
+ $scope.$on('$destroy', renderCompleteListener.destroy);
},
};
}
diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field.scss b/src/plugins/discover/public/application/components/sidebar/discover_field.scss
new file mode 100644
index 0000000000000..8e1dd41f66ab1
--- /dev/null
+++ b/src/plugins/discover/public/application/components/sidebar/discover_field.scss
@@ -0,0 +1,4 @@
+.dscSidebarItem__fieldPopoverPanel {
+ min-width: 260px;
+ max-width: 300px;
+}
diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field.test.tsx b/src/plugins/discover/public/application/components/sidebar/discover_field.test.tsx
index e1abbfd7657d0..a0d9e3c541e47 100644
--- a/src/plugins/discover/public/application/components/sidebar/discover_field.test.tsx
+++ b/src/plugins/discover/public/application/components/sidebar/discover_field.test.tsx
@@ -104,9 +104,4 @@ describe('discover sidebar field', function () {
findTestSubject(comp, 'fieldToggle-bytes').simulate('click');
expect(props.onRemoveField).toHaveBeenCalledWith('bytes');
});
- it('should trigger onShowDetails', function () {
- const { comp, props } = getComponent();
- findTestSubject(comp, 'field-bytes-showDetails').simulate('click');
- expect(props.onShowDetails).toHaveBeenCalledWith(true, props.field);
- });
});
diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field.tsx b/src/plugins/discover/public/application/components/sidebar/discover_field.tsx
index 724908281146d..639dbfe09277c 100644
--- a/src/plugins/discover/public/application/components/sidebar/discover_field.tsx
+++ b/src/plugins/discover/public/application/components/sidebar/discover_field.tsx
@@ -16,15 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from 'react';
-import { EuiButton } from '@elastic/eui';
+import React, { useState } from 'react';
+import { EuiPopover, EuiPopoverTitle, EuiButtonIcon, EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { DiscoverFieldDetails } from './discover_field_details';
-import { FieldIcon } from '../../../../../kibana_react/public';
+import { FieldIcon, FieldButton } from '../../../../../kibana_react/public';
import { FieldDetails } from './types';
import { IndexPatternField, IndexPattern } from '../../../../../data/public';
import { shortenDottedString } from '../../helpers';
import { getFieldTypeName } from './lib/get_field_type_name';
+import './discover_field.scss';
export interface DiscoverFieldProps {
/**
@@ -48,14 +49,6 @@ export interface DiscoverFieldProps {
* @param fieldName
*/
onRemoveField: (fieldName: string) => void;
- /**
- * Callback to hide/show details, buckets of the field
- */
- onShowDetails: (show: boolean, field: IndexPatternField) => void;
- /**
- * Determines, whether details of the field are displayed
- */
- showDetails: boolean;
/**
* Retrieve details data for the field
*/
@@ -76,22 +69,14 @@ export function DiscoverField({
onAddField,
onRemoveField,
onAddFilter,
- onShowDetails,
- showDetails,
getDetails,
selected,
useShortDots,
}: DiscoverFieldProps) {
- const addLabel = i18n.translate('discover.fieldChooser.discoverField.addButtonLabel', {
- defaultMessage: 'Add',
- });
const addLabelAria = i18n.translate('discover.fieldChooser.discoverField.addButtonAriaLabel', {
defaultMessage: 'Add {field} to table',
values: { field: field.name },
});
- const removeLabel = i18n.translate('discover.fieldChooser.discoverField.removeButtonLabel', {
- defaultMessage: 'Remove',
- });
const removeLabelAria = i18n.translate(
'discover.fieldChooser.discoverField.removeButtonAriaLabel',
{
@@ -100,6 +85,8 @@ export function DiscoverField({
}
);
+ const [infoIsOpen, setOpen] = useState(false);
+
const toggleDisplay = (f: IndexPatternField) => {
if (selected) {
onRemoveField(f.name);
@@ -108,6 +95,10 @@ export function DiscoverField({
}
};
+ function togglePopover() {
+ setOpen(!infoIsOpen);
+ }
+
function wrapOnDot(str?: string) {
// u200B is a non-width white-space character, which allows
// the browser to efficiently word-wrap right after the dot
@@ -115,64 +106,96 @@ export function DiscoverField({
return str ? str.replace(/\./g, '.\u200B') : '';
}
- return (
- <>
- onShowDetails(!showDetails, field)}
- onKeyPress={() => onShowDetails(!showDetails, field)}
- data-test-subj={`field-${field.name}-showDetails`}
+ const dscFieldIcon = (
+
+ );
+
+ const fieldName = (
+
+ {useShortDots ? wrapOnDot(shortenDottedString(field.name)) : wrapOnDot(field.displayName)}
+
+ );
+
+ let actionButton;
+ if (field.name !== '_source' && !selected) {
+ actionButton = (
+
+ ) => {
+ ev.preventDefault();
+ ev.stopPropagation();
+ toggleDisplay(field);
+ }}
+ data-test-subj={`fieldToggle-${field.name}`}
+ aria-label={addLabelAria}
+ />
+
+ );
+ } else if (field.name !== '_source' && selected) {
+ actionButton = (
+
-
-
-
-
- {useShortDots ? wrapOnDot(shortenDottedString(field.name)) : wrapOnDot(field.displayName)}
-
-
- {field.name !== '_source' && !selected && (
- ) => {
- ev.preventDefault();
- ev.stopPropagation();
- toggleDisplay(field);
- }}
- data-test-subj={`fieldToggle-${field.name}`}
- arial-label={addLabelAria}
- >
- {addLabel}
-
- )}
- {field.name !== '_source' && selected && (
- ) => {
- ev.preventDefault();
- ev.stopPropagation();
- toggleDisplay(field);
- }}
- data-test-subj={`fieldToggle-${field.name}`}
- arial-label={removeLabelAria}
- >
- {removeLabel}
-
- )}
-
-
- {showDetails && (
+ ) => {
+ ev.preventDefault();
+ ev.stopPropagation();
+ toggleDisplay(field);
+ }}
+ data-test-subj={`fieldToggle-${field.name}`}
+ aria-label={removeLabelAria}
+ />
+
+ );
+ }
+
+ return (
+ {
+ togglePopover();
+ }}
+ buttonProps={{ 'data-test-subj': `field-${field.name}-showDetails` }}
+ fieldIcon={dscFieldIcon}
+ fieldAction={actionButton}
+ fieldName={fieldName}
+ />
+ }
+ isOpen={infoIsOpen}
+ closePopover={() => setOpen(false)}
+ anchorPosition="rightUp"
+ panelClassName="dscSidebarItem__fieldPopoverPanel"
+ >
+
+ {' '}
+ {i18n.translate('discover.fieldChooser.discoverField.fieldTopValuesLabel', {
+ defaultMessage: 'Top 5 values',
+ })}
+
+ {infoIsOpen && (
)}
- >
+
);
}
diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_details.scss b/src/plugins/discover/public/application/components/sidebar/discover_field_details.scss
new file mode 100644
index 0000000000000..f4b3eed741f9f
--- /dev/null
+++ b/src/plugins/discover/public/application/components/sidebar/discover_field_details.scss
@@ -0,0 +1,5 @@
+.dscFieldDetails__visualizeBtn {
+ @include euiFontSizeXS;
+ height: $euiSizeL !important;
+ min-width: $euiSize * 4;
+}
diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx b/src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
index dd95a45f71626..3061839bf3ef0 100644
--- a/src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
+++ b/src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
@@ -16,14 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-import React from 'react';
-import { EuiLink, EuiIconTip, EuiText } from '@elastic/eui';
+import React, { useState, useEffect } from 'react';
+import { EuiLink, EuiIconTip, EuiText, EuiPopoverFooter, EuiButton, EuiSpacer } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { DiscoverFieldBucket } from './discover_field_bucket';
import { getWarnings } from './lib/get_warnings';
+import {
+ triggerVisualizeActions,
+ isFieldVisualizable,
+ getVisualizeHref,
+} from './lib/visualize_trigger_utils';
import { Bucket, FieldDetails } from './types';
-import { getServices } from '../../../kibana_services';
import { IndexPatternField, IndexPattern } from '../../../../../data/public';
+import './discover_field_details.scss';
interface DiscoverFieldDetailsProps {
field: IndexPatternField;
@@ -39,64 +44,96 @@ export function DiscoverFieldDetails({
onAddFilter,
}: DiscoverFieldDetailsProps) {
const warnings = getWarnings(field);
+ const [showVisualizeLink, setShowVisualizeLink] = useState(false);
+ const [visualizeLink, setVisualizeLink] = useState('');
+
+ useEffect(() => {
+ isFieldVisualizable(field, indexPattern.id, details.columns).then(
+ (flag) => {
+ setShowVisualizeLink(flag);
+ // get href only if Visualize button is enabled
+ getVisualizeHref(field, indexPattern.id, details.columns).then(
+ (uri) => {
+ if (uri) setVisualizeLink(uri);
+ },
+ () => {
+ setVisualizeLink('');
+ }
+ );
+ },
+ () => {
+ setShowVisualizeLink(false);
+ }
+ );
+ }, [field, indexPattern.id, details.columns]);
+
+ const handleVisualizeLinkClick = (event: React.MouseEvent) => {
+ // regular link click. let the uiActions code handle the navigation and show popup if needed
+ event.preventDefault();
+ triggerVisualizeActions(field, indexPattern.id, details.columns);
+ };
return (
-
- {!details.error && (
-
- {' '}
- {!indexPattern.metaFields.includes(field.name) && !field.scripted ? (
- onAddFilter('_exists_', field.name, '+')}>
- {details.exists}
-
- ) : (
- {details.exists}
- )}{' '}
- / {details.total}{' '}
-
-
- )}
- {details.error &&
{details.error}}
- {!details.error && (
-
- {details.buckets.map((bucket: Bucket, idx: number) => (
-
- ))}
-
- )}
+ <>
+
+ {details.error &&
{details.error}}
+ {!details.error && (
+
+ {details.buckets.map((bucket: Bucket, idx: number) => (
+
+ ))}
+
+ )}
- {details.visualizeUrl && (
- <>
-
{
- getServices().core.application.navigateToApp(details.visualizeUrl.app, {
- path: details.visualizeUrl.path,
- });
- }}
- className="kuiButton kuiButton--secondary kuiButton--small kuiVerticalRhythmSmall"
- data-test-subj={`fieldVisualize-${field.name}`}
- >
-
+ {showVisualizeLink && (
+ <>
+
+ {/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
+ handleVisualizeLinkClick(e)}
+ href={visualizeLink}
+ size="s"
+ className="dscFieldDetails__visualizeBtn"
+ data-test-subj={`fieldVisualize-${field.name}`}
+ >
+
+
{warnings.length > 0 && (
)}
-
- >
+ >
+ )}
+
+ {!details.error && (
+
+
+ {!indexPattern.metaFields.includes(field.name) && !field.scripted ? (
+ onAddFilter('_exists_', field.name, '+')}>
+ {' '}
+ {details.exists}
+
+ ) : (
+ {details.exists}
+ )}{' '}
+ / {details.total}{' '}
+
+
+
)}
-
+ >
);
}
diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.scss b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.scss
index 07efd64752c84..f130b0399f467 100644
--- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.scss
+++ b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.scss
@@ -42,54 +42,15 @@
}
.dscSidebarItem {
- border-top: 1px solid transparent;
- position: relative;
- display: flex;
- align-items: center;
- justify-content: space-between;
- cursor: pointer;
- font-size: $euiFontSizeXS;
- border-top: solid 1px transparent;
- border-bottom: solid 1px transparent;
- line-height: normal;
- margin-bottom: $euiSizeXS * 0.5;
-
&:hover,
- &:focus {
+ &:focus-within,
+ &[class*='-isActive'] {
.dscSidebarItem__action {
opacity: 1;
}
}
}
-.dscSidebarItem--active {
- border-top: 1px solid $euiColorLightShade;
- color: $euiColorFullShade;
-}
-
-.dscSidebarField {
- padding: $euiSizeXS;
- display: flex;
- align-items: center;
- max-width: 100%;
- width: 100%;
- border: none;
- border-radius: $euiBorderRadius - 1px;
- text-align: left;
-}
-
-.dscSidebarField__name {
- margin-left: $euiSizeS;
- flex-grow: 1;
- word-break: break-word;
- padding-right: 1px;
-}
-
-.dscSidebarField__fieldIcon {
- margin-top: $euiSizeXS / 2;
- margin-right: $euiSizeXS / 2;
-}
-
/**
* 1. Only visually hide the action, so that it's still accessible to screen readers.
* 2. When tabbed to, this element needs to be visible for keyboard accessibility.
@@ -101,7 +62,7 @@
&:focus {
opacity: 1; /* 2 */
}
- font-size: 12px;
+ font-size: $euiFontSizeXS;
padding: 2px 6px !important;
height: 22px !important;
min-width: auto !important;
@@ -130,8 +91,6 @@
}
.dscFieldDetails {
- padding: $euiSizeS;
- background-color: $euiColorLightestShade;
color: $euiTextColor;
margin-bottom: $euiSizeS;
}
diff --git a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx
index 58b468762c501..1f27766a1756d 100644
--- a/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx
+++ b/src/plugins/discover/public/application/components/sidebar/discover_sidebar.tsx
@@ -92,7 +92,6 @@ export function DiscoverSidebar({
setIndexPattern,
state,
}: DiscoverSidebarProps) {
- const [openFieldMap, setOpenFieldMap] = useState(new Map());
const [showFields, setShowFields] = useState(false);
const [fields, setFields] = useState(null);
const [fieldFilterState, setFieldFilterState] = useState(getDefaultFieldFilter());
@@ -103,19 +102,6 @@ export function DiscoverSidebar({
setFields(newFields);
}, [selectedIndexPattern, fieldCounts, hits, services]);
- const onShowDetails = useCallback(
- (show: boolean, field: IndexPatternField) => {
- if (!show) {
- setOpenFieldMap(new Map(openFieldMap.set(field.name, false)));
- } else {
- setOpenFieldMap(new Map(openFieldMap.set(field.name, true)));
- if (services.capabilities.discover.save) {
- selectedIndexPattern.popularizeField(field.name, 1);
- }
- }
- },
- [openFieldMap, selectedIndexPattern, services.capabilities.discover.save]
- );
const onChangeFieldSearch = useCallback(
(field: string, value: string | boolean | undefined) => {
const newState = setFieldFilterProp(fieldFilterState, field, value);
@@ -125,9 +111,8 @@ export function DiscoverSidebar({
);
const getDetailsByField = useCallback(
- (ipField: IndexPatternField) =>
- getDetails(ipField, selectedIndexPattern, state, columns, hits, services),
- [selectedIndexPattern, state, columns, hits, services]
+ (ipField: IndexPatternField) => getDetails(ipField, hits, columns),
+ [hits, columns]
);
const popularLimit = services.uiSettings.get(FIELDS_LIMIT_SETTING);
@@ -213,9 +198,7 @@ export function DiscoverSidebar({
onAddField={onAddField}
onRemoveField={onRemoveField}
onAddFilter={onAddFilter}
- onShowDetails={onShowDetails}
getDetails={getDetailsByField}
- showDetails={openFieldMap.get(field.name) || false}
selected={true}
useShortDots={useShortDots}
/>
@@ -290,9 +273,7 @@ export function DiscoverSidebar({
onAddField={onAddField}
onRemoveField={onRemoveField}
onAddFilter={onAddFilter}
- onShowDetails={onShowDetails}
getDetails={getDetailsByField}
- showDetails={openFieldMap.get(field.name) || false}
useShortDots={useShortDots}
/>
@@ -318,9 +299,7 @@ export function DiscoverSidebar({
onAddField={onAddField}
onRemoveField={onRemoveField}
onAddFilter={onAddFilter}
- onShowDetails={onShowDetails}
getDetails={getDetailsByField}
- showDetails={openFieldMap.get(field.name) || false}
useShortDots={useShortDots}
/>
diff --git a/src/plugins/discover/public/application/components/sidebar/lib/get_details.ts b/src/plugins/discover/public/application/components/sidebar/lib/get_details.ts
index 7ac9f009d73d5..41d3393672474 100644
--- a/src/plugins/discover/public/application/components/sidebar/lib/get_details.ts
+++ b/src/plugins/discover/public/application/components/sidebar/lib/get_details.ts
@@ -16,32 +16,24 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { getVisualizeUrl, isFieldVisualizable } from './visualize_url_utils';
-import { AppState } from '../../../angular/discover_state';
+
// @ts-ignore
import { fieldCalculator } from './field_calculator';
-import { IndexPatternField, IndexPattern } from '../../../../../../data/public';
-import { DiscoverServices } from '../../../../build_services';
+import { IndexPatternField } from '../../../../../../data/public';
export function getDetails(
field: IndexPatternField,
- indexPattern: IndexPattern,
- state: AppState,
- columns: string[],
hits: Array>,
- services: DiscoverServices
+ columns: string[]
) {
const details = {
- visualizeUrl:
- services.capabilities.visualize.show && isFieldVisualizable(field, services.visualizations)
- ? getVisualizeUrl(field, indexPattern, state, columns, services)
- : null,
...fieldCalculator.getFieldValueCounts({
hits,
field,
count: 5,
grouped: false,
}),
+ columns,
};
if (details.buckets) {
for (const bucket of details.buckets) {
diff --git a/src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts b/src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts
new file mode 100644
index 0000000000000..f058c198cae7f
--- /dev/null
+++ b/src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts
@@ -0,0 +1,110 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import {
+ VISUALIZE_FIELD_TRIGGER,
+ VISUALIZE_GEO_FIELD_TRIGGER,
+ visualizeFieldTrigger,
+ visualizeGeoFieldTrigger,
+} from '../../../../../../ui_actions/public';
+import { getUiActions } from '../../../../kibana_services';
+import { IndexPatternField, KBN_FIELD_TYPES } from '../../../../../../data/public';
+
+function getTriggerConstant(type: string) {
+ return type === KBN_FIELD_TYPES.GEO_POINT || type === KBN_FIELD_TYPES.GEO_SHAPE
+ ? VISUALIZE_GEO_FIELD_TRIGGER
+ : VISUALIZE_FIELD_TRIGGER;
+}
+
+function getTrigger(type: string) {
+ return type === KBN_FIELD_TYPES.GEO_POINT || type === KBN_FIELD_TYPES.GEO_SHAPE
+ ? visualizeGeoFieldTrigger
+ : visualizeFieldTrigger;
+}
+
+async function getCompatibleActions(
+ fieldName: string,
+ indexPatternId: string,
+ contextualFields: string[],
+ trigger: typeof VISUALIZE_FIELD_TRIGGER | typeof VISUALIZE_GEO_FIELD_TRIGGER
+) {
+ const compatibleActions = await getUiActions().getTriggerCompatibleActions(trigger, {
+ indexPatternId,
+ fieldName,
+ contextualFields,
+ });
+ return compatibleActions;
+}
+
+export async function getVisualizeHref(
+ field: IndexPatternField,
+ indexPatternId: string | undefined,
+ contextualFields: string[]
+) {
+ if (!indexPatternId) return undefined;
+ const triggerOptions = {
+ indexPatternId,
+ fieldName: field.name,
+ contextualFields,
+ trigger: getTrigger(field.type),
+ };
+ const compatibleActions = await getCompatibleActions(
+ field.name,
+ indexPatternId,
+ contextualFields,
+ getTriggerConstant(field.type)
+ );
+ // enable the link only if only one action is registered
+ return compatibleActions.length === 1
+ ? compatibleActions[0].getHref?.(triggerOptions)
+ : undefined;
+}
+
+export function triggerVisualizeActions(
+ field: IndexPatternField,
+ indexPatternId: string | undefined,
+ contextualFields: string[]
+) {
+ if (!indexPatternId) return;
+ const trigger = getTriggerConstant(field.type);
+ const triggerOptions = {
+ indexPatternId,
+ fieldName: field.name,
+ contextualFields,
+ };
+ getUiActions().getTrigger(trigger).exec(triggerOptions);
+}
+
+export async function isFieldVisualizable(
+ field: IndexPatternField,
+ indexPatternId: string | undefined,
+ contextualFields: string[]
+) {
+ if (field.name === '_id' || !indexPatternId) {
+ // for first condition you'd get a 'Fielddata access on the _id field is disallowed' error on ES side.
+ return false;
+ }
+ const trigger = getTriggerConstant(field.type);
+ const compatibleActions = await getCompatibleActions(
+ field.name,
+ indexPatternId,
+ contextualFields,
+ trigger
+ );
+ return compatibleActions.length > 0 && field.visualizable;
+}
diff --git a/src/plugins/discover/public/application/components/sidebar/lib/visualize_url_utils.ts b/src/plugins/discover/public/application/components/sidebar/lib/visualize_url_utils.ts
deleted file mode 100644
index 0c1a44d7845cf..0000000000000
--- a/src/plugins/discover/public/application/components/sidebar/lib/visualize_url_utils.ts
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Licensed to Elasticsearch B.V. under one or more contributor
- * license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright
- * ownership. Elasticsearch B.V. licenses this file to you under
- * the Apache License, Version 2.0 (the "License"); you may
- * not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-import uuid from 'uuid/v4';
-import rison from 'rison-node';
-import { parse, stringify } from 'query-string';
-import {
- IFieldType,
- IIndexPattern,
- IndexPatternField,
- KBN_FIELD_TYPES,
-} from '../../../../../../data/public';
-import { AppState } from '../../../angular/discover_state';
-import { DiscoverServices } from '../../../../build_services';
-import { VisualizationsStart, VisTypeAlias } from '../../../../../../visualizations/public';
-import { AGGS_TERMS_SIZE_SETTING } from '../../../../../common';
-
-export function isMapsAppRegistered(visualizations: VisualizationsStart) {
- return visualizations.getAliases().some(({ name }: VisTypeAlias) => {
- return name === 'maps';
- });
-}
-
-export function isFieldVisualizable(field: IFieldType, visualizations: VisualizationsStart) {
- if (field.name === '_id') {
- // Else you'd get a 'Fielddata access on the _id field is disallowed' error on ES side.
- return false;
- }
- if (
- (field.type === KBN_FIELD_TYPES.GEO_POINT || field.type === KBN_FIELD_TYPES.GEO_SHAPE) &&
- isMapsAppRegistered(visualizations)
- ) {
- return true;
- }
- return field.visualizable;
-}
-
-export function getMapsAppUrl(
- field: IFieldType,
- indexPattern: IIndexPattern,
- appState: AppState,
- columns: string[]
-) {
- const mapAppParams = new URLSearchParams();
-
- // Copy global state
- const locationSplit = window.location.hash.split('?');
- if (locationSplit.length > 1) {
- const discoverParams = new URLSearchParams(locationSplit[1]);
- const globalStateUrlValue = discoverParams.get('_g');
- if (globalStateUrlValue) {
- mapAppParams.set('_g', globalStateUrlValue);
- }
- }
-
- // Copy filters and query in app state
- const mapsAppState: any = {
- filters: appState.filters || [],
- };
- if (appState.query) {
- mapsAppState.query = appState.query;
- }
- // @ts-ignore
- mapAppParams.set('_a', rison.encode(mapsAppState));
-
- // create initial layer descriptor
- const hasColumns = columns && columns.length && columns[0] !== '_source';
- const supportsClustering = field.aggregatable;
- mapAppParams.set(
- 'initialLayers',
- // @ts-ignore
- rison.encode_array([
- {
- id: uuid(),
- label: indexPattern.title,
- sourceDescriptor: {
- id: uuid(),
- type: 'ES_SEARCH',
- geoField: field.name,
- tooltipProperties: hasColumns ? columns : [],
- indexPatternId: indexPattern.id,
- scalingType: supportsClustering ? 'CLUSTERS' : 'LIMIT',
- },
- visible: true,
- type: supportsClustering ? 'BLENDED_VECTOR' : 'VECTOR',
- },
- ])
- );
-
- return {
- app: 'maps',
- path: `/map#?${mapAppParams.toString()}`,
- };
-}
-
-export function getVisualizeUrl(
- field: IndexPatternField,
- indexPattern: IIndexPattern,
- state: AppState,
- columns: string[],
- services: DiscoverServices
-) {
- const aggsTermSize = services.uiSettings.get(AGGS_TERMS_SIZE_SETTING);
- const urlParams = parse(services.history().location.search) as Record;
-
- if (
- (field.type === KBN_FIELD_TYPES.GEO_POINT || field.type === KBN_FIELD_TYPES.GEO_SHAPE) &&
- isMapsAppRegistered(services.visualizations)
- ) {
- return getMapsAppUrl(field, indexPattern, state, columns);
- }
-
- let agg;
- const isGeoPoint = field.type === KBN_FIELD_TYPES.GEO_POINT;
- const type = isGeoPoint ? 'tile_map' : 'histogram';
- // If we're visualizing a date field, and our index is time based (and thus has a time filter),
- // then run a date histogram
- if (field.type === 'date' && indexPattern.timeFieldName === field.name) {
- agg = {
- type: 'date_histogram',
- schema: 'segment',
- params: {
- field: field.name,
- interval: 'auto',
- },
- };
- } else if (isGeoPoint) {
- agg = {
- type: 'geohash_grid',
- schema: 'segment',
- params: {
- field: field.name,
- precision: 3,
- },
- };
- } else {
- agg = {
- type: 'terms',
- schema: 'segment',
- params: {
- field: field.name,
- size: parseInt(aggsTermSize, 10),
- orderBy: '1',
- },
- };
- }
- const linkUrlParams = {
- ...urlParams,
- ...{
- indexPattern: state.index!,
- type,
- _a: rison.encode({
- filters: state.filters || [],
- query: state.query,
- vis: {
- type,
- aggs: [{ schema: 'metric', type: 'count', id: '1' }, agg],
- },
- } as any),
- },
- };
-
- return {
- app: 'visualize',
- path: `#/create?${stringify(linkUrlParams)}`,
- };
-}
diff --git a/src/plugins/discover/public/application/components/sidebar/types.ts b/src/plugins/discover/public/application/components/sidebar/types.ts
index e86138761c747..d80662b65cc7b 100644
--- a/src/plugins/discover/public/application/components/sidebar/types.ts
+++ b/src/plugins/discover/public/application/components/sidebar/types.ts
@@ -27,10 +27,7 @@ export interface FieldDetails {
exists: number;
total: boolean;
buckets: Bucket[];
- visualizeUrl: {
- app: string;
- path: string;
- };
+ columns: string[];
}
export interface Bucket {
diff --git a/src/plugins/discover/public/kibana_services.ts b/src/plugins/discover/public/kibana_services.ts
index ecb5d7fd90283..bc25fa71dcf41 100644
--- a/src/plugins/discover/public/kibana_services.ts
+++ b/src/plugins/discover/public/kibana_services.ts
@@ -20,6 +20,7 @@
import _ from 'lodash';
import { createHashHistory } from 'history';
import { ScopedHistory } from 'kibana/public';
+import { UiActionsStart } from 'src/plugins/ui_actions/public';
import { DiscoverServices } from './build_services';
import { createGetterSetter } from '../../kibana_utils/public';
import { search } from '../../data/public';
@@ -27,6 +28,7 @@ import { DocViewsRegistry } from './application/doc_views/doc_views_registry';
let angularModule: any = null;
let services: DiscoverServices | null = null;
+let uiActions: UiActionsStart;
/**
* set bootstrapped inner angular module
@@ -53,6 +55,9 @@ export function setServices(newServices: any) {
services = newServices;
}
+export const setUiActions = (pluginUiActions: UiActionsStart) => (uiActions = pluginUiActions);
+export const getUiActions = () => uiActions;
+
export const [getUrlTracker, setUrlTracker] = createGetterSetter<{
setTrackedUrl: (url: string) => void;
restorePreviousUrl: () => void;
diff --git a/src/plugins/discover/public/plugin.ts b/src/plugins/discover/public/plugin.ts
index 20e13d204e0e9..015f4267646c1 100644
--- a/src/plugins/discover/public/plugin.ts
+++ b/src/plugins/discover/public/plugin.ts
@@ -53,6 +53,7 @@ import {
setUrlTracker,
setAngularModule,
setServices,
+ setUiActions,
setScopedHistory,
getScopedHistory,
syncHistoryLocations,
@@ -314,6 +315,8 @@ export class DiscoverPlugin
this.innerAngularInitialized = true;
};
+ setUiActions(plugins.uiActions);
+
this.initializeServices = async () => {
if (this.servicesInitialized) {
return { core, plugins };
diff --git a/src/plugins/embeddable/kibana.json b/src/plugins/embeddable/kibana.json
index c9694ad7b9423..6a8e6079232aa 100644
--- a/src/plugins/embeddable/kibana.json
+++ b/src/plugins/embeddable/kibana.json
@@ -12,6 +12,7 @@
],
"requiredBundles": [
"savedObjects",
- "kibanaReact"
+ "kibanaReact",
+ "kibanaUtils"
]
}
diff --git a/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx b/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx
index fcecf117d7d52..ffe8a5bf6e7dc 100644
--- a/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx
+++ b/src/plugins/embeddable/public/lib/embeddables/embeddable.tsx
@@ -19,6 +19,8 @@
import { cloneDeep, isEqual } from 'lodash';
import * as Rx from 'rxjs';
+import { distinctUntilChanged, map } from 'rxjs/operators';
+import { RenderCompleteDispatcher } from '../../../../kibana_utils/public';
import { Adapters, ViewMode } from '../types';
import { IContainer } from '../containers';
import { EmbeddableInput, EmbeddableOutput, IEmbeddable } from './i_embeddable';
@@ -47,6 +49,8 @@ export abstract class Embeddable<
private readonly input$: Rx.BehaviorSubject;
private readonly output$: Rx.BehaviorSubject;
+ protected renderComplete = new RenderCompleteDispatcher();
+
// Listener to parent changes, if this embeddable exists in a parent, in order
// to update input when the parent changes.
private parentSubscription?: Rx.Subscription;
@@ -77,6 +81,15 @@ export abstract class Embeddable<
this.onResetInput(newInput);
});
}
+
+ this.getOutput$()
+ .pipe(
+ map(({ title }) => title || ''),
+ distinctUntilChanged()
+ )
+ .subscribe((title) => {
+ this.renderComplete.setTitle(title);
+ });
}
public getIsContainer(): this is IContainer {
@@ -105,8 +118,8 @@ export abstract class Embeddable<
return this.input;
}
- public getTitle() {
- return this.output.title;
+ public getTitle(): string {
+ return this.output.title || '';
}
/**
@@ -133,7 +146,10 @@ export abstract class Embeddable<
}
}
- public render(domNode: HTMLElement | Element): void {
+ public render(el: HTMLElement): void {
+ this.renderComplete.setEl(el);
+ this.renderComplete.setTitle(this.output.title || '');
+
if (this.destroyed) {
throw new Error('Embeddable has been destroyed');
}
diff --git a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts
index 7628b1d41b452..9c4a1b5602c49 100644
--- a/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts
+++ b/src/plugins/embeddable/public/lib/embeddables/i_embeddable.ts
@@ -22,6 +22,7 @@ import { Adapters } from '../types';
import { IContainer } from '../containers/i_container';
import { ViewMode } from '../types';
import { TriggerContextMapping } from '../../../../ui_actions/public';
+import type { TimeRange, Query, Filter } from '../../../../data/common';
export interface EmbeddableError {
name: string;
@@ -55,6 +56,21 @@ export interface EmbeddableInput {
*/
disableTriggers?: boolean;
+ /**
+ * Time range of the chart.
+ */
+ timeRange?: TimeRange;
+
+ /**
+ * Visualization query string used to narrow down results.
+ */
+ query?: Query;
+
+ /**
+ * Visualization filters used to narrow down results.
+ */
+ filters?: Filter[];
+
[key: string]: unknown;
}
diff --git a/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.test.ts b/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.test.ts
index 42adb9d770e8a..ef79b18acd4f5 100644
--- a/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.test.ts
+++ b/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.test.ts
@@ -19,7 +19,7 @@
import { coreMock, scopedHistoryMock } from '../../../../../core/public/mocks';
import { EmbeddableStateTransfer } from '.';
-import { ApplicationStart } from '../../../../../core/public';
+import { ApplicationStart, PublicAppInfo } from '../../../../../core/public';
function mockHistoryState(state: unknown) {
return scopedHistoryMock.create({ state });
@@ -37,6 +37,29 @@ describe('embeddable state transfer', () => {
stateTransfer = new EmbeddableStateTransfer(application.navigateToApp);
});
+ it('cannot fetch app name when given no app list', async () => {
+ expect(stateTransfer.getAppNameFromId('test')).toBeUndefined();
+ });
+
+ it('cannot fetch app name when app id is not in given app list', async () => {
+ const appsList = new Map([
+ ['testId', { title: 'State Transfer Test App Hello' } as PublicAppInfo],
+ ['testId2', { title: 'State Transfer Test App Goodbye' } as PublicAppInfo],
+ ]);
+ stateTransfer = new EmbeddableStateTransfer(application.navigateToApp, undefined, appsList);
+ expect(stateTransfer.getAppNameFromId('kibanana')).toBeUndefined();
+ });
+
+ it('can fetch app titles when given app list', async () => {
+ const appsList = new Map([
+ ['testId', { title: 'State Transfer Test App Hello' } as PublicAppInfo],
+ ['testId2', { title: 'State Transfer Test App Goodbye' } as PublicAppInfo],
+ ]);
+ stateTransfer = new EmbeddableStateTransfer(application.navigateToApp, undefined, appsList);
+ expect(stateTransfer.getAppNameFromId('testId')).toBe('State Transfer Test App Hello');
+ expect(stateTransfer.getAppNameFromId('testId2')).toBe('State Transfer Test App Goodbye');
+ });
+
it('can send an outgoing originating app state', async () => {
await stateTransfer.navigateToEditor(destinationApp, { state: { originatingApp } });
expect(application.navigateToApp).toHaveBeenCalledWith('superUltraVisualize', {
diff --git a/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts b/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts
index 8f70e5a66c478..780cff9f4be7e 100644
--- a/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts
+++ b/src/plugins/embeddable/public/lib/state_transfer/embeddable_state_transfer.ts
@@ -18,7 +18,12 @@
*/
import { cloneDeep } from 'lodash';
-import { ScopedHistory, ApplicationStart } from '../../../../../core/public';
+import {
+ ScopedHistory,
+ ApplicationStart,
+ PublicLegacyAppInfo,
+ PublicAppInfo,
+} from '../../../../../core/public';
import {
EmbeddableEditorState,
isEmbeddableEditorState,
@@ -35,9 +40,16 @@ import {
export class EmbeddableStateTransfer {
constructor(
private navigateToApp: ApplicationStart['navigateToApp'],
- private scopedHistory?: ScopedHistory
+ private scopedHistory?: ScopedHistory,
+ private appList?: ReadonlyMap | undefined
) {}
+ /**
+ * Fetches an internationalized app title when given an appId.
+ * @param appId - The id of the app to fetch the title for
+ */
+ public getAppNameFromId = (appId: string): string | undefined => this.appList?.get(appId)?.title;
+
/**
* Fetches an {@link EmbeddableEditorState | originating app} argument from the scoped
* history's location state.
diff --git a/src/plugins/embeddable/public/mocks.tsx b/src/plugins/embeddable/public/mocks.tsx
index 7ec03ba659cda..2064236e9ae7f 100644
--- a/src/plugins/embeddable/public/mocks.tsx
+++ b/src/plugins/embeddable/public/mocks.tsx
@@ -25,6 +25,9 @@ import {
EmbeddableStateTransfer,
IEmbeddable,
EmbeddablePanel,
+ EmbeddableInput,
+ SavedObjectEmbeddableInput,
+ ReferenceOrValueEmbeddable,
} from '.';
import { EmbeddablePublicPlugin } from './plugin';
import { coreMock } from '../../../core/public/mocks';
@@ -35,7 +38,6 @@ import { dataPluginMock } from '../../data/public/mocks';
import { inspectorPluginMock } from '../../inspector/public/mocks';
import { uiActionsPluginMock } from '../../ui_actions/public/mocks';
-import { SavedObjectEmbeddableInput, ReferenceOrValueEmbeddable, EmbeddableInput } from './lib';
export type Setup = jest.Mocked;
export type Start = jest.Mocked;
diff --git a/src/plugins/embeddable/public/plugin.tsx b/src/plugins/embeddable/public/plugin.tsx
index 3cbd49279564f..fb09729ab71c3 100644
--- a/src/plugins/embeddable/public/plugin.tsx
+++ b/src/plugins/embeddable/public/plugin.tsx
@@ -17,6 +17,7 @@
* under the License.
*/
import React from 'react';
+import { Subscription } from 'rxjs';
import { DataPublicPluginSetup, DataPublicPluginStart } from '../../data/public';
import { getSavedObjectFinder } from '../../saved_objects/public';
import { UiActionsSetup, UiActionsStart } from '../../ui_actions/public';
@@ -27,6 +28,8 @@ import {
CoreStart,
Plugin,
ScopedHistory,
+ PublicAppInfo,
+ PublicLegacyAppInfo,
} from '../../../core/public';
import { EmbeddableFactoryRegistry, EmbeddableFactoryProvider } from './types';
import { bootstrap } from './bootstrap';
@@ -89,6 +92,8 @@ export class EmbeddablePublicPlugin implements Plugin;
+ private appListSubscription?: Subscription;
constructor(initializerContext: PluginInitializerContext) {}
@@ -121,7 +126,15 @@ export class EmbeddablePublicPlugin implements Plugin {
+ this.appList = appList;
+ });
+
+ this.outgoingOnlyStateTransfer = new EmbeddableStateTransfer(
+ core.application.navigateToApp,
+ undefined,
+ this.appList
+ );
this.isRegistryReady = true;
const getEmbeddablePanelHoc = (stateTransfer?: EmbeddableStateTransfer) => ({
@@ -151,7 +164,7 @@ export class EmbeddablePublicPlugin implements Plugin {
return history
- ? new EmbeddableStateTransfer(core.application.navigateToApp, history)
+ ? new EmbeddableStateTransfer(core.application.navigateToApp, history, this.appList)
: this.outgoingOnlyStateTransfer;
},
EmbeddablePanel: getEmbeddablePanelHoc(),
@@ -159,7 +172,11 @@ export class EmbeddablePublicPlugin implements Plugin {
this.ensureFactoriesExist();
diff --git a/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/json_xjson_translation_tools.test.ts b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/json_xjson_translation_tools.test.ts
index 419e80ad1608f..8c66a87adbaa1 100644
--- a/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/json_xjson_translation_tools.test.ts
+++ b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/json_xjson_translation_tools.test.ts
@@ -23,6 +23,7 @@ import collapsingTests from './utils_string_collapsing.txt';
import expandingTests from './utils_string_expanding.txt';
import * as utils from '../index';
+import { extractJSONStringValues } from '../parser';
describe('JSON to XJSON conversion tools', () => {
it('will collapse multiline strings', () => {
@@ -34,6 +35,32 @@ describe('JSON to XJSON conversion tools', () => {
const multiline = '{ "foo": """bar\r\nbaz""" }';
expect(utils.collapseLiteralStrings(multiline)).toEqual('{ "foo": "bar\\r\\nbaz" }');
});
+
+ describe('JSON string values parser', () => {
+ test('correctly extracts JSON string values', () => {
+ const json = {
+ myString: 'string',
+ notAString: 1,
+ myStringArray: ['a', 1, 'test', { nestedString: 'string' }],
+ };
+ const jsonString = JSON.stringify(json);
+ const { stringValues } = extractJSONStringValues(jsonString);
+ expect(stringValues.length).toBe(4);
+
+ expect(jsonString.substring(stringValues[0].startIndex, stringValues[0].endIndex + 1)).toBe(
+ '"string"'
+ );
+ expect(jsonString.substring(stringValues[1].startIndex, stringValues[1].endIndex + 1)).toBe(
+ '"a"'
+ );
+ expect(jsonString.substring(stringValues[2].startIndex, stringValues[2].endIndex + 1)).toBe(
+ '"test"'
+ );
+ expect(jsonString.substring(stringValues[3].startIndex, stringValues[3].endIndex + 1)).toBe(
+ '"string"'
+ );
+ });
+ });
});
_.each(collapsingTests.split(/^=+$/m), function (fixture) {
diff --git a/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/utils_string_expanding.txt b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/utils_string_expanding.txt
index 7de874c244e74..d157ed73817c2 100644
--- a/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/utils_string_expanding.txt
+++ b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/__tests__/utils_string_expanding.txt
@@ -1,8 +1,9 @@
+
==========
Scripts in requests
-------------------------------------
{
- "f": { "script": { "source": "\ntest\ntest\\\\\\\\\\\\\\\\2\n" } },
+ "f": { "script": { "source": "\ntest\ntest\\2\n" } },
"g": { "script": "second + \"\\\";" },
"a": "short with \\",
"\\\\h": 1,
@@ -12,7 +13,7 @@ Scripts in requests
{
"f": { "script": { "source": """
test
-test\\\\\\\\2
+test\2
""" } },
"g": { "script": """second + "\";""" },
"a": """short with \""",
@@ -23,11 +24,11 @@ test\\\\\\\\2
Preserve triple quotes
-------------------------------------
{
- "content\\\": "tri\"ple",
+ "content\\": "tri\"ple",
}
-------------------------------------
{
- "content\\\": """tri"ple""",
+ "content\\": """tri"ple""",
}
==========
Correctly parse with JSON embedded inside values
@@ -82,3 +83,13 @@ Single quotes escaped special case, end
{
"query": "test\""
}
+==========
+Strings in Arrays
+-------------------------------------
+{
+ "array": ["expand \\ me", "do not expand", "do expand \\"]
+}
+-------------------------------------
+{
+ "array": ["""expand \ me""", "do not expand", """do expand \"""]
+}
diff --git a/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/index.ts b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/index.ts
index 28f1aca95efab..86fe9535a9619 100644
--- a/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/index.ts
+++ b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/index.ts
@@ -17,6 +17,8 @@
* under the License.
*/
+import { extractJSONStringValues } from './parser';
+
export function collapseLiteralStrings(data: string) {
const splitData = data.split(`"""`);
for (let idx = 1; idx < splitData.length - 1; idx += 2) {
@@ -25,47 +27,60 @@ export function collapseLiteralStrings(data: string) {
return splitData.join('');
}
-/*
- The following regex describes global match on:
- 1. one colon followed by any number of space characters
- 2. one double quote (not escaped, special case for JSON in JSON).
- 3. greedily match any non double quote and non newline char OR any escaped double quote char (non-capturing).
- 4. handle a special case where an escaped slash may be the last character
- 5. one double quote
-
- For instance: `: "some characters \" here"`
- Will match and be expanded to: `"""some characters " here"""`
+// 5 megabytes
+const MAX_EXPANDABLE_JSON_SIZE = 5 * 1024 * 1024;
+/**
+ * Takes in a string representing some JSON data and expands strings,
+ * where needed, to a string literal representation.
+ *
+ * For example; given a value like: "{ "my_string": "\nhey!\n" }"
+ *
+ * Will return: "{ "my_string": """
+ * hey!
+ * """
+ * }"
*/
+export function expandLiteralStrings(data: string) {
+ // Assuming 1 byte per char
+ if (data.length > MAX_EXPANDABLE_JSON_SIZE) {
+ return data;
+ }
-const LITERAL_STRING_CANDIDATES = /((:[\s\r\n]*)([^\\])"(\\"|[^"\n])*\\?")/g;
+ const { stringValues } = extractJSONStringValues(data);
-export function expandLiteralStrings(data: string) {
- return data.replace(LITERAL_STRING_CANDIDATES, (match, string) => {
- // Expand to triple quotes if there are _any_ slashes
- if (string.match(/\\./)) {
- const firstDoubleQuoteIdx = string.indexOf('"');
- const lastDoubleQuoteIdx = string.lastIndexOf('"');
+ if (stringValues.length === 0) {
+ return data;
+ }
- // Handle a special case where we may have a value like "\"test\"". We don't
- // want to expand this to """"test"""" - so we terminate before processing the string
- // further if we detect this either at the start or end of the double quote section.
+ // Include JSON before our first string value
+ let result = data.substring(0, stringValues[0].startIndex);
- if (string[firstDoubleQuoteIdx + 1] === '\\' && string[firstDoubleQuoteIdx + 2] === '"') {
- return string;
- }
+ for (let x = 0; x < stringValues.length; x++) {
+ const { startIndex, endIndex } = stringValues[x];
+ const candidate = data.substring(startIndex, endIndex + 1);
- if (string[lastDoubleQuoteIdx - 1] === '"' && string[lastDoubleQuoteIdx - 2] === '\\') {
- return string;
- }
+ // Handle a special case where we may have a value like "\"test\"". We don't
+ // want to expand this to """"test"""" - so we terminate before processing the string
+ // further if we detect this either at the start or end of the double quote section.
+ const skip =
+ (candidate[1] === '\\' && candidate[2] === '"') ||
+ (candidate[candidate.length - 2] === '"' && candidate[candidate.length - 3] === '\\');
- const colonAndAnySpacing = string.slice(0, firstDoubleQuoteIdx);
- const rawStringifiedValue = string.slice(firstDoubleQuoteIdx, string.length);
- // Remove one level of JSON stringification
- const jsonValue = JSON.parse(rawStringifiedValue);
- return `${colonAndAnySpacing}"""${jsonValue}"""`;
+ if (!skip && candidate.match(/\\./)) {
+ result += `"""${JSON.parse(candidate)}"""`;
} else {
- return string;
+ result += candidate;
+ }
+
+ if (stringValues[x + 1]) {
+ // Add any JSON between string values
+ result += data.substring(endIndex + 1, stringValues[x + 1].startIndex);
}
- });
+ }
+
+ // Add any remaining JSON after all string values
+ result += data.substring(stringValues[stringValues.length - 1].endIndex + 1);
+
+ return result;
}
diff --git a/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/parser.ts b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/parser.ts
new file mode 100644
index 0000000000000..2cbd886860a07
--- /dev/null
+++ b/src/plugins/es_ui_shared/public/console_lang/lib/json_xjson_translation_tools/parser.ts
@@ -0,0 +1,97 @@
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+type StringValues = Array<{ startIndex: number; endIndex: number }>;
+
+interface ParseResult {
+ stringValues: StringValues;
+}
+
+const JSON_COLON = ':';
+const JSON_STRING_DELIMITER = '"';
+const JSON_STRING_ESCAPE = '\\';
+
+/**
+ * Accepts JSON (as a string) and extracts the positions of all JSON string
+ * values.
+ *
+ * For example:
+ *
+ * '{ "my_string_value": "is this", "my_number_value": 42 }'
+ *
+ * Would extract one result:
+ *
+ * [ { startIndex: 21, endIndex: 29 } ]
+ *
+ * This result maps to `"is this"` from the example JSON.
+ *
+ */
+export const extractJSONStringValues = (input: string): ParseResult => {
+ let position = 0;
+ let currentStringStartPos: number;
+ let isInsideString = false;
+ const stringValues: StringValues = [];
+
+ function read() {
+ return input[position];
+ }
+
+ function peekNextNonWhitespace(): string | undefined {
+ let peekPosition = position + 1;
+
+ while (peekPosition < input.length) {
+ const peekChar = input[peekPosition];
+ if (peekChar.match(/[^\s\r\n]/)) {
+ return peekChar;
+ }
+ ++peekPosition;
+ }
+ }
+
+ function advance() {
+ ++position;
+ }
+
+ while (position < input.length) {
+ const char = read();
+ if (!isInsideString) {
+ if (char === JSON_STRING_DELIMITER) {
+ currentStringStartPos = position;
+ isInsideString = true;
+ }
+ // else continue scanning for JSON_STRING_DELIMITER
+ } else {
+ if (char === JSON_STRING_ESCAPE) {
+ // skip ahead - we are still inside of a string
+ advance();
+ } else if (char === JSON_STRING_DELIMITER) {
+ if (peekNextNonWhitespace() !== JSON_COLON) {
+ stringValues.push({
+ startIndex: currentStringStartPos!,
+ endIndex: position,
+ });
+ }
+ isInsideString = false;
+ }
+ }
+ advance();
+ }
+
+ return { stringValues };
+};
diff --git a/src/plugins/es_ui_shared/public/forms/form_wizard/form_wizard_context.tsx b/src/plugins/es_ui_shared/public/forms/form_wizard/form_wizard_context.tsx
index 39b91a2e20b53..7719e7748829d 100644
--- a/src/plugins/es_ui_shared/public/forms/form_wizard/form_wizard_context.tsx
+++ b/src/plugins/es_ui_shared/public/forms/form_wizard/form_wizard_context.tsx
@@ -147,7 +147,7 @@ export const FormWizardProvider = WithMultiContent>(function FormWiza
return nextState;
});
},
- [getStepIndex, validate, onSave, getData]
+ [getStepIndex, validate, onSave, getData, lastStep]
);
const value: Context = {
diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.test.tsx b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.test.tsx
index eead90d2f75b7..a55b2f0a8fa29 100644
--- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.test.tsx
+++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/use_field.test.tsx
@@ -98,7 +98,7 @@ describe('', () => {
useEffect(() => {
onForm(form);
- }, [form]);
+ }, [onForm, form]);
return (