@orchestrator-ui/orchestrator-ui-components 0.0.1-alpha.0 → 0.0.1-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/index.js +3373 -547
  2. package/package.json +8 -3
  3. package/src/index.d.ts +7 -3
  4. package/src/lib/components/Badges/Badge/Badge.d.ts +8 -0
  5. package/src/lib/components/Badges/Badge/index.d.ts +1 -0
  6. package/src/lib/components/Badges/EngineStatusBadge/EngineStatusBadge.d.ts +1 -0
  7. package/src/lib/components/Badges/EngineStatusBadge/index.d.ts +1 -0
  8. package/src/lib/components/Badges/EnvironmentBadge/EnvironmentBadge.d.ts +1 -0
  9. package/src/lib/components/Badges/EnvironmentBadge/index.d.ts +1 -0
  10. package/src/lib/components/Badges/FailedTasksBadge/FailedTasksBadge.d.ts +1 -0
  11. package/src/lib/components/Badges/FailedTasksBadge/index.d.ts +1 -0
  12. package/src/lib/components/Badges/HeaderBadge/HeaderBadge.d.ts +8 -0
  13. package/src/lib/components/Badges/HeaderBadge/index.d.ts +1 -0
  14. package/src/lib/components/Badges/SubscriptionStatusBadge/SubscriptionStatusBadge.d.ts +5 -0
  15. package/src/lib/components/Badges/SubscriptionStatusBadge/index.d.ts +1 -0
  16. package/src/lib/components/Badges/index.d.ts +6 -0
  17. package/src/lib/components/OrchestratorPageTemplate/OrchestratorPageHeader/OrchestratorPageHeader.d.ts +7 -0
  18. package/src/lib/components/OrchestratorPageTemplate/OrchestratorPageHeader/index.d.ts +1 -0
  19. package/src/lib/components/OrchestratorPageTemplate/{OrchestratorPageTemplate.d.ts → OrchestratorPageTemplate/OrchestratorPageTemplate.d.ts} +3 -1
  20. package/src/lib/components/OrchestratorPageTemplate/OrchestratorPageTemplate/index.d.ts +1 -0
  21. package/src/lib/components/OrchestratorPageTemplate/OrchestratorSidebar/OrchestratorSidebar.d.ts +5 -0
  22. package/src/lib/components/OrchestratorPageTemplate/OrchestratorSidebar/index.d.ts +1 -0
  23. package/src/lib/components/OrchestratorPageTemplate/index.d.ts +3 -0
  24. package/src/lib/components/StartPage/FrequentlyUsed.d.ts +5 -0
  25. package/src/lib/components/StartPage/ListItemStartPage.d.ts +8 -0
  26. package/src/lib/components/StartPage/ListStartPage.d.ts +7 -0
  27. package/src/lib/components/StartPage/MultiListSection.d.ts +2 -0
  28. package/src/lib/components/StartPage/NewProcessPanel.d.ts +2 -0
  29. package/src/lib/components/StartPage/StatCards.d.ts +2 -0
  30. package/src/lib/components/StartPage/index.d.ts +6 -0
  31. package/src/lib/components/Table/DataGridTable.d.ts +18 -0
  32. package/src/lib/components/Table/Table.d.ts +14 -0
  33. package/src/lib/components/Table/TableHeaderCell.d.ts +12 -0
  34. package/src/lib/components/Table/columns.d.ts +22 -0
  35. package/src/lib/components/Table/dataGridColumns.d.ts +15 -0
  36. package/src/lib/components/Table/index.d.ts +5 -0
  37. package/src/lib/components/index.d.ts +4 -0
  38. package/src/lib/contexts/OrchestratorConfigContext.d.ts +8 -0
  39. package/src/lib/contexts/index.d.ts +1 -0
  40. package/src/lib/hooks/DataFetchHooks.d.ts +18 -0
  41. package/src/lib/hooks/index.d.ts +6 -0
  42. package/src/lib/hooks/useEngineStatusQuery.d.ts +7 -0
  43. package/src/lib/hooks/useOrchestratorConfig.d.ts +14 -0
  44. package/src/lib/hooks/useOrchestratorTheme.d.ts +6 -0
  45. package/src/lib/hooks/useProcessStatusCountsQuery.d.ts +16 -0
  46. package/src/lib/hooks/useQueryWithGraphql.d.ts +4 -0
  47. package/src/lib/icons/ArrowNarrowDown.d.ts +3 -0
  48. package/src/lib/icons/ArrowNarrowUp.d.ts +3 -0
  49. package/src/lib/icons/CheckmarkCircleFill.d.ts +3 -0
  50. package/src/lib/icons/ChevronDown.d.ts +3 -0
  51. package/src/lib/icons/IconProps.d.ts +5 -0
  52. package/src/lib/icons/LogoutIcon.d.ts +3 -0
  53. package/src/lib/icons/MinusCircleOutline.d.ts +3 -0
  54. package/src/lib/icons/PlusCircleFill.d.ts +3 -0
  55. package/src/lib/icons/StatusDotIcon.d.ts +3 -0
  56. package/src/lib/icons/XCircleFill.d.ts +3 -0
  57. package/src/lib/icons/index.d.ts +10 -0
  58. package/src/lib/theme/index.d.ts +1 -0
  59. package/src/lib/types.d.ts +55 -0
  60. package/src/lib/utils/date.d.ts +1 -0
  61. package/src/lib/utils/getStatusBadgeColor.d.ts +1 -0
  62. package/src/lib/utils/getTypedFieldFromObject.d.ts +1 -0
  63. package/src/lib/utils/index.d.ts +3 -0
package/index.js CHANGED
@@ -1,7 +1,10 @@
1
1
  import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
2
- import { css } from '@emotion/react';
3
- import { useState } from 'react';
4
- import { useEuiTheme, EuiFlexGroup, EuiFlexItem, EuiText, EuiButtonIcon, EuiPageTemplate } from '@elastic/eui';
2
+ import { EuiBadge, EuiText, useEuiTheme, tint, EuiToolTip, EuiHeader, EuiHeaderSection, EuiHeaderSectionItem, EuiHeaderLogo, EuiBadgeGroup, EuiButtonIcon, EuiSideNav, EuiButton, EuiSpacer, EuiPageTemplate, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiTextColor, EuiPanel, EuiHorizontalRule, EuiFieldSearch, EuiAvatar, EuiBasicTable, EuiDataGrid } from '@elastic/eui';
3
+ import { useState, createContext, useContext, useRef } from 'react';
4
+ import { GraphQLClient, request } from 'graphql-request';
5
+ import { useQuery } from 'react-query';
6
+ import moment from 'moment';
7
+ import Link from 'next/link';
5
8
 
6
9
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
10
 
@@ -10,7 +13,7 @@ var check = function (it) {
10
13
  };
11
14
 
12
15
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
13
- var global$b =
16
+ var global$i =
14
17
  // eslint-disable-next-line es/no-global-this -- safe
15
18
  check(typeof globalThis == 'object' && globalThis) ||
16
19
  check(typeof window == 'object' && window) ||
@@ -18,11 +21,11 @@ var global$b =
18
21
  check(typeof self == 'object' && self) ||
19
22
  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
20
23
  // eslint-disable-next-line no-new-func -- fallback
21
- (function () { return this; })() || Function('return this')();
24
+ (function () { return this; })() || commonjsGlobal || Function('return this')();
22
25
 
23
26
  var objectGetOwnPropertyDescriptor = {};
24
27
 
25
- var fails$b = function (exec) {
28
+ var fails$i = function (exec) {
26
29
  try {
27
30
  return !!exec();
28
31
  } catch (error) {
@@ -30,48 +33,48 @@ var fails$b = function (exec) {
30
33
  }
31
34
  };
32
35
 
33
- var fails$a = fails$b;
36
+ var fails$h = fails$i;
34
37
 
35
38
  // Detect IE8's incomplete defineProperty implementation
36
- var descriptors = !fails$a(function () {
39
+ var descriptors = !fails$h(function () {
37
40
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
38
41
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
39
42
  });
40
43
 
41
- var fails$9 = fails$b;
44
+ var fails$g = fails$i;
42
45
 
43
- var functionBindNative = !fails$9(function () {
46
+ var functionBindNative = !fails$g(function () {
44
47
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
45
48
  var test = (function () { /* empty */ }).bind();
46
49
  // eslint-disable-next-line no-prototype-builtins -- safe
47
50
  return typeof test != 'function' || test.hasOwnProperty('prototype');
48
51
  });
49
52
 
50
- var NATIVE_BIND$1 = functionBindNative;
53
+ var NATIVE_BIND$3 = functionBindNative;
51
54
 
52
- var call$6 = Function.prototype.call;
55
+ var call$f = Function.prototype.call;
53
56
 
54
- var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
55
- return call$6.apply(call$6, arguments);
57
+ var functionCall = NATIVE_BIND$3 ? call$f.bind(call$f) : function () {
58
+ return call$f.apply(call$f, arguments);
56
59
  };
57
60
 
58
61
  var objectPropertyIsEnumerable = {};
59
62
 
60
63
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
61
64
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
62
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
65
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
63
66
 
64
67
  // Nashorn ~ JDK8 bug
65
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
68
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
66
69
 
67
70
  // `Object.prototype.propertyIsEnumerable` method implementation
68
71
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
69
72
  objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
70
- var descriptor = getOwnPropertyDescriptor$1(this, V);
73
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
71
74
  return !!descriptor && descriptor.enumerable;
72
75
  } : $propertyIsEnumerable;
73
76
 
74
- var createPropertyDescriptor$3 = function (bitmap, value) {
77
+ var createPropertyDescriptor$4 = function (bitmap, value) {
75
78
  return {
76
79
  enumerable: !(bitmap & 1),
77
80
  configurable: !(bitmap & 2),
@@ -80,66 +83,66 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
80
83
  };
81
84
  };
82
85
 
83
- var NATIVE_BIND = functionBindNative;
86
+ var NATIVE_BIND$2 = functionBindNative;
84
87
 
85
- var FunctionPrototype$1 = Function.prototype;
86
- var call$5 = FunctionPrototype$1.call;
87
- var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$5, call$5);
88
+ var FunctionPrototype$2 = Function.prototype;
89
+ var call$e = FunctionPrototype$2.call;
90
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$e, call$e);
88
91
 
89
- var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
92
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
90
93
  return function () {
91
- return call$5.apply(fn, arguments);
94
+ return call$e.apply(fn, arguments);
92
95
  };
93
96
  };
94
97
 
95
- var uncurryThis$9 = functionUncurryThis;
98
+ var uncurryThis$i = functionUncurryThis;
96
99
 
97
- var toString$1 = uncurryThis$9({}.toString);
98
- var stringSlice = uncurryThis$9(''.slice);
100
+ var toString$6 = uncurryThis$i({}.toString);
101
+ var stringSlice$1 = uncurryThis$i(''.slice);
99
102
 
100
- var classofRaw = function (it) {
101
- return stringSlice(toString$1(it), 8, -1);
103
+ var classofRaw$2 = function (it) {
104
+ return stringSlice$1(toString$6(it), 8, -1);
102
105
  };
103
106
 
104
- var uncurryThis$8 = functionUncurryThis;
105
- var fails$8 = fails$b;
106
- var classof = classofRaw;
107
+ var uncurryThis$h = functionUncurryThis;
108
+ var fails$f = fails$i;
109
+ var classof$6 = classofRaw$2;
107
110
 
108
- var $Object$3 = Object;
109
- var split = uncurryThis$8(''.split);
111
+ var $Object$4 = Object;
112
+ var split = uncurryThis$h(''.split);
110
113
 
111
114
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
112
- var indexedObject = fails$8(function () {
115
+ var indexedObject = fails$f(function () {
113
116
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
114
117
  // eslint-disable-next-line no-prototype-builtins -- safe
115
- return !$Object$3('z').propertyIsEnumerable(0);
118
+ return !$Object$4('z').propertyIsEnumerable(0);
116
119
  }) ? function (it) {
117
- return classof(it) == 'String' ? split(it, '') : $Object$3(it);
118
- } : $Object$3;
120
+ return classof$6(it) == 'String' ? split(it, '') : $Object$4(it);
121
+ } : $Object$4;
119
122
 
120
123
  // we can't use just `it == null` since of `document.all` special case
121
124
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
122
- var isNullOrUndefined$2 = function (it) {
125
+ var isNullOrUndefined$4 = function (it) {
123
126
  return it === null || it === undefined;
124
127
  };
125
128
 
126
- var isNullOrUndefined$1 = isNullOrUndefined$2;
129
+ var isNullOrUndefined$3 = isNullOrUndefined$4;
127
130
 
128
- var $TypeError$6 = TypeError;
131
+ var $TypeError$e = TypeError;
129
132
 
130
133
  // `RequireObjectCoercible` abstract operation
131
134
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
132
- var requireObjectCoercible$2 = function (it) {
133
- if (isNullOrUndefined$1(it)) throw $TypeError$6("Can't call method on " + it);
135
+ var requireObjectCoercible$4 = function (it) {
136
+ if (isNullOrUndefined$3(it)) throw $TypeError$e("Can't call method on " + it);
134
137
  return it;
135
138
  };
136
139
 
137
140
  // toObject with fallback for non-array-like ES3 strings
138
141
  var IndexedObject$1 = indexedObject;
139
- var requireObjectCoercible$1 = requireObjectCoercible$2;
142
+ var requireObjectCoercible$3 = requireObjectCoercible$4;
140
143
 
141
144
  var toIndexedObject$5 = function (it) {
142
- return IndexedObject$1(requireObjectCoercible$1(it));
145
+ return IndexedObject$1(requireObjectCoercible$3(it));
143
146
  };
144
147
 
145
148
  var documentAll$2 = typeof document == 'object' && document.all;
@@ -159,48 +162,46 @@ var documentAll$1 = $documentAll$1.all;
159
162
 
160
163
  // `IsCallable` abstract operation
161
164
  // https://tc39.es/ecma262/#sec-iscallable
162
- var isCallable$e = $documentAll$1.IS_HTMLDDA ? function (argument) {
165
+ var isCallable$k = $documentAll$1.IS_HTMLDDA ? function (argument) {
163
166
  return typeof argument == 'function' || argument === documentAll$1;
164
167
  } : function (argument) {
165
168
  return typeof argument == 'function';
166
169
  };
167
170
 
168
- var isCallable$d = isCallable$e;
171
+ var isCallable$j = isCallable$k;
169
172
  var $documentAll = documentAll_1;
170
173
 
171
174
  var documentAll = $documentAll.all;
172
175
 
173
- var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
174
- return typeof it == 'object' ? it !== null : isCallable$d(it) || it === documentAll;
176
+ var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
177
+ return typeof it == 'object' ? it !== null : isCallable$j(it) || it === documentAll;
175
178
  } : function (it) {
176
- return typeof it == 'object' ? it !== null : isCallable$d(it);
179
+ return typeof it == 'object' ? it !== null : isCallable$j(it);
177
180
  };
178
181
 
179
- var global$a = global$b;
180
- var isCallable$c = isCallable$e;
182
+ var global$h = global$i;
183
+ var isCallable$i = isCallable$k;
181
184
 
182
185
  var aFunction = function (argument) {
183
- return isCallable$c(argument) ? argument : undefined;
186
+ return isCallable$i(argument) ? argument : undefined;
184
187
  };
185
188
 
186
- var getBuiltIn$4 = function (namespace, method) {
187
- return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
189
+ var getBuiltIn$7 = function (namespace, method) {
190
+ return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
188
191
  };
189
192
 
190
- var uncurryThis$7 = functionUncurryThis;
191
-
192
- var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
193
+ var uncurryThis$g = functionUncurryThis;
193
194
 
194
- var getBuiltIn$3 = getBuiltIn$4;
195
+ var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
195
196
 
196
- var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
197
+ var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
197
198
 
198
- var global$9 = global$b;
199
- var userAgent = engineUserAgent;
199
+ var global$g = global$i;
200
+ var userAgent$5 = engineUserAgent;
200
201
 
201
- var process = global$9.process;
202
- var Deno = global$9.Deno;
203
- var versions = process && process.versions || Deno && Deno.version;
202
+ var process$4 = global$g.process;
203
+ var Deno$1 = global$g.Deno;
204
+ var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version;
204
205
  var v8 = versions && versions.v8;
205
206
  var match, version;
206
207
 
@@ -213,10 +214,10 @@ if (v8) {
213
214
 
214
215
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
215
216
  // so check `userAgent` even if `.v8` exists, but 0
216
- if (!version && userAgent) {
217
- match = userAgent.match(/Edge\/(\d+)/);
217
+ if (!version && userAgent$5) {
218
+ match = userAgent$5.match(/Edge\/(\d+)/);
218
219
  if (!match || match[1] >= 74) {
219
- match = userAgent.match(/Chrome\/(\d+)/);
220
+ match = userAgent$5.match(/Chrome\/(\d+)/);
220
221
  if (match) version = +match[1];
221
222
  }
222
223
  }
@@ -225,17 +226,22 @@ var engineV8Version = version;
225
226
 
226
227
  /* eslint-disable es/no-symbol -- required for testing */
227
228
 
228
- var V8_VERSION = engineV8Version;
229
- var fails$7 = fails$b;
229
+ var V8_VERSION$1 = engineV8Version;
230
+ var fails$e = fails$i;
231
+ var global$f = global$i;
232
+
233
+ var $String$5 = global$f.String;
230
234
 
231
235
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
232
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(function () {
236
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$e(function () {
233
237
  var symbol = Symbol();
234
238
  // Chrome 38 Symbol has incorrect toString conversion
235
239
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
236
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
240
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
241
+ // of course, fail.
242
+ return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
237
243
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
238
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
244
+ !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
239
245
  });
240
246
 
241
247
  /* eslint-disable es/no-symbol -- required for testing */
@@ -246,87 +252,87 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
246
252
  && !Symbol.sham
247
253
  && typeof Symbol.iterator == 'symbol';
248
254
 
249
- var getBuiltIn$2 = getBuiltIn$4;
250
- var isCallable$b = isCallable$e;
251
- var isPrototypeOf = objectIsPrototypeOf;
255
+ var getBuiltIn$6 = getBuiltIn$7;
256
+ var isCallable$h = isCallable$k;
257
+ var isPrototypeOf$3 = objectIsPrototypeOf;
252
258
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
253
259
 
254
- var $Object$2 = Object;
260
+ var $Object$3 = Object;
255
261
 
256
262
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
257
263
  return typeof it == 'symbol';
258
264
  } : function (it) {
259
- var $Symbol = getBuiltIn$2('Symbol');
260
- return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
265
+ var $Symbol = getBuiltIn$6('Symbol');
266
+ return isCallable$h($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
261
267
  };
262
268
 
263
- var $String$2 = String;
269
+ var $String$4 = String;
264
270
 
265
- var tryToString$1 = function (argument) {
271
+ var tryToString$5 = function (argument) {
266
272
  try {
267
- return $String$2(argument);
273
+ return $String$4(argument);
268
274
  } catch (error) {
269
275
  return 'Object';
270
276
  }
271
277
  };
272
278
 
273
- var isCallable$a = isCallable$e;
274
- var tryToString = tryToString$1;
279
+ var isCallable$g = isCallable$k;
280
+ var tryToString$4 = tryToString$5;
275
281
 
276
- var $TypeError$5 = TypeError;
282
+ var $TypeError$d = TypeError;
277
283
 
278
284
  // `Assert: IsCallable(argument) is true`
279
- var aCallable$1 = function (argument) {
280
- if (isCallable$a(argument)) return argument;
281
- throw $TypeError$5(tryToString(argument) + ' is not a function');
285
+ var aCallable$9 = function (argument) {
286
+ if (isCallable$g(argument)) return argument;
287
+ throw $TypeError$d(tryToString$4(argument) + ' is not a function');
282
288
  };
283
289
 
284
- var aCallable = aCallable$1;
285
- var isNullOrUndefined = isNullOrUndefined$2;
290
+ var aCallable$8 = aCallable$9;
291
+ var isNullOrUndefined$2 = isNullOrUndefined$4;
286
292
 
287
293
  // `GetMethod` abstract operation
288
294
  // https://tc39.es/ecma262/#sec-getmethod
289
- var getMethod$1 = function (V, P) {
295
+ var getMethod$3 = function (V, P) {
290
296
  var func = V[P];
291
- return isNullOrUndefined(func) ? undefined : aCallable(func);
297
+ return isNullOrUndefined$2(func) ? undefined : aCallable$8(func);
292
298
  };
293
299
 
294
- var call$4 = functionCall;
295
- var isCallable$9 = isCallable$e;
296
- var isObject$5 = isObject$6;
300
+ var call$d = functionCall;
301
+ var isCallable$f = isCallable$k;
302
+ var isObject$8 = isObject$9;
297
303
 
298
- var $TypeError$4 = TypeError;
304
+ var $TypeError$c = TypeError;
299
305
 
300
306
  // `OrdinaryToPrimitive` abstract operation
301
307
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
302
308
  var ordinaryToPrimitive$1 = function (input, pref) {
303
309
  var fn, val;
304
- if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
305
- if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
306
- if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
307
- throw $TypeError$4("Can't convert object to primitive value");
310
+ if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$8(val = call$d(fn, input))) return val;
311
+ if (isCallable$f(fn = input.valueOf) && !isObject$8(val = call$d(fn, input))) return val;
312
+ if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$8(val = call$d(fn, input))) return val;
313
+ throw $TypeError$c("Can't convert object to primitive value");
308
314
  };
309
315
 
310
316
  var shared$3 = {exports: {}};
311
317
 
312
- var global$8 = global$b;
318
+ var global$e = global$i;
313
319
 
314
320
  // eslint-disable-next-line es/no-object-defineproperty -- safe
315
- var defineProperty$5 = Object.defineProperty;
321
+ var defineProperty$6 = Object.defineProperty;
316
322
 
317
323
  var defineGlobalProperty$3 = function (key, value) {
318
324
  try {
319
- defineProperty$5(global$8, key, { value: value, configurable: true, writable: true });
325
+ defineProperty$6(global$e, key, { value: value, configurable: true, writable: true });
320
326
  } catch (error) {
321
- global$8[key] = value;
327
+ global$e[key] = value;
322
328
  } return value;
323
329
  };
324
330
 
325
- var global$7 = global$b;
331
+ var global$d = global$i;
326
332
  var defineGlobalProperty$2 = defineGlobalProperty$3;
327
333
 
328
334
  var SHARED = '__core-js_shared__';
329
- var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {});
335
+ var store$3 = global$d[SHARED] || defineGlobalProperty$2(SHARED, {});
330
336
 
331
337
  var sharedStore = store$3;
332
338
 
@@ -335,91 +341,85 @@ var store$2 = sharedStore;
335
341
  (shared$3.exports = function (key, value) {
336
342
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
337
343
  })('versions', []).push({
338
- version: '3.27.1',
344
+ version: '3.30.2',
339
345
  mode: 'global',
340
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
341
- license: 'https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE',
346
+ copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
347
+ license: 'https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE',
342
348
  source: 'https://github.com/zloirock/core-js'
343
349
  });
344
350
 
345
- var requireObjectCoercible = requireObjectCoercible$2;
351
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
346
352
 
347
- var $Object$1 = Object;
353
+ var $Object$2 = Object;
348
354
 
349
355
  // `ToObject` abstract operation
350
356
  // https://tc39.es/ecma262/#sec-toobject
351
- var toObject$3 = function (argument) {
352
- return $Object$1(requireObjectCoercible(argument));
357
+ var toObject$4 = function (argument) {
358
+ return $Object$2(requireObjectCoercible$2(argument));
353
359
  };
354
360
 
355
- var uncurryThis$6 = functionUncurryThis;
356
- var toObject$2 = toObject$3;
361
+ var uncurryThis$f = functionUncurryThis;
362
+ var toObject$3 = toObject$4;
357
363
 
358
- var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
364
+ var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
359
365
 
360
366
  // `HasOwnProperty` abstract operation
361
367
  // https://tc39.es/ecma262/#sec-hasownproperty
362
368
  // eslint-disable-next-line es/no-object-hasown -- safe
363
369
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
364
- return hasOwnProperty(toObject$2(it), key);
370
+ return hasOwnProperty(toObject$3(it), key);
365
371
  };
366
372
 
367
- var uncurryThis$5 = functionUncurryThis;
373
+ var uncurryThis$e = functionUncurryThis;
368
374
 
369
375
  var id = 0;
370
376
  var postfix = Math.random();
371
- var toString = uncurryThis$5(1.0.toString);
377
+ var toString$5 = uncurryThis$e(1.0.toString);
372
378
 
373
379
  var uid$2 = function (key) {
374
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
380
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
375
381
  };
376
382
 
377
- var global$6 = global$b;
383
+ var global$c = global$i;
378
384
  var shared$2 = shared$3.exports;
379
- var hasOwn$8 = hasOwnProperty_1;
385
+ var hasOwn$a = hasOwnProperty_1;
380
386
  var uid$1 = uid$2;
381
387
  var NATIVE_SYMBOL = symbolConstructorDetection;
382
388
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
383
389
 
390
+ var Symbol$2 = global$c.Symbol;
384
391
  var WellKnownSymbolsStore = shared$2('wks');
385
- var Symbol$1 = global$6.Symbol;
386
- var symbolFor = Symbol$1 && Symbol$1['for'];
387
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
388
-
389
- var wellKnownSymbol$6 = function (name) {
390
- if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
391
- var description = 'Symbol.' + name;
392
- if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
393
- WellKnownSymbolsStore[name] = Symbol$1[name];
394
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
395
- WellKnownSymbolsStore[name] = symbolFor(description);
396
- } else {
397
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
398
- }
392
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
393
+
394
+ var wellKnownSymbol$g = function (name) {
395
+ if (!hasOwn$a(WellKnownSymbolsStore, name)) {
396
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$a(Symbol$2, name)
397
+ ? Symbol$2[name]
398
+ : createWellKnownSymbol('Symbol.' + name);
399
399
  } return WellKnownSymbolsStore[name];
400
400
  };
401
401
 
402
- var call$3 = functionCall;
403
- var isObject$4 = isObject$6;
402
+ var call$c = functionCall;
403
+ var isObject$7 = isObject$9;
404
404
  var isSymbol$1 = isSymbol$2;
405
- var getMethod = getMethod$1;
405
+ var getMethod$2 = getMethod$3;
406
406
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
407
- var wellKnownSymbol$5 = wellKnownSymbol$6;
407
+ var wellKnownSymbol$f = wellKnownSymbol$g;
408
408
 
409
- var $TypeError$3 = TypeError;
410
- var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
409
+ var $TypeError$b = TypeError;
410
+ var TO_PRIMITIVE = wellKnownSymbol$f('toPrimitive');
411
411
 
412
412
  // `ToPrimitive` abstract operation
413
413
  // https://tc39.es/ecma262/#sec-toprimitive
414
414
  var toPrimitive$1 = function (input, pref) {
415
- if (!isObject$4(input) || isSymbol$1(input)) return input;
416
- var exoticToPrim = getMethod(input, TO_PRIMITIVE);
415
+ if (!isObject$7(input) || isSymbol$1(input)) return input;
416
+ var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
417
417
  var result;
418
418
  if (exoticToPrim) {
419
419
  if (pref === undefined) pref = 'default';
420
- result = call$3(exoticToPrim, input, pref);
421
- if (!isObject$4(result) || isSymbol$1(result)) return result;
422
- throw $TypeError$3("Can't convert object to primitive value");
420
+ result = call$c(exoticToPrim, input, pref);
421
+ if (!isObject$7(result) || isSymbol$1(result)) return result;
422
+ throw $TypeError$b("Can't convert object to primitive value");
423
423
  }
424
424
  if (pref === undefined) pref = 'number';
425
425
  return ordinaryToPrimitive(input, pref);
@@ -430,41 +430,41 @@ var isSymbol = isSymbol$2;
430
430
 
431
431
  // `ToPropertyKey` abstract operation
432
432
  // https://tc39.es/ecma262/#sec-topropertykey
433
- var toPropertyKey$2 = function (argument) {
433
+ var toPropertyKey$3 = function (argument) {
434
434
  var key = toPrimitive(argument, 'string');
435
435
  return isSymbol(key) ? key : key + '';
436
436
  };
437
437
 
438
- var global$5 = global$b;
439
- var isObject$3 = isObject$6;
438
+ var global$b = global$i;
439
+ var isObject$6 = isObject$9;
440
440
 
441
- var document$1 = global$5.document;
441
+ var document$3 = global$b.document;
442
442
  // typeof document.createElement is 'object' in old IE
443
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
443
+ var EXISTS$1 = isObject$6(document$3) && isObject$6(document$3.createElement);
444
444
 
445
445
  var documentCreateElement$2 = function (it) {
446
- return EXISTS$1 ? document$1.createElement(it) : {};
446
+ return EXISTS$1 ? document$3.createElement(it) : {};
447
447
  };
448
448
 
449
- var DESCRIPTORS$9 = descriptors;
450
- var fails$6 = fails$b;
451
- var createElement = documentCreateElement$2;
449
+ var DESCRIPTORS$a = descriptors;
450
+ var fails$d = fails$i;
451
+ var createElement$1 = documentCreateElement$2;
452
452
 
453
453
  // Thanks to IE8 for its funny defineProperty
454
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$6(function () {
454
+ var ie8DomDefine = !DESCRIPTORS$a && !fails$d(function () {
455
455
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
456
- return Object.defineProperty(createElement('div'), 'a', {
456
+ return Object.defineProperty(createElement$1('div'), 'a', {
457
457
  get: function () { return 7; }
458
458
  }).a != 7;
459
459
  });
460
460
 
461
- var DESCRIPTORS$8 = descriptors;
462
- var call$2 = functionCall;
461
+ var DESCRIPTORS$9 = descriptors;
462
+ var call$b = functionCall;
463
463
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
464
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
464
+ var createPropertyDescriptor$3 = createPropertyDescriptor$4;
465
465
  var toIndexedObject$4 = toIndexedObject$5;
466
- var toPropertyKey$1 = toPropertyKey$2;
467
- var hasOwn$7 = hasOwnProperty_1;
466
+ var toPropertyKey$2 = toPropertyKey$3;
467
+ var hasOwn$9 = hasOwnProperty_1;
468
468
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
469
469
 
470
470
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -472,23 +472,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
472
472
 
473
473
  // `Object.getOwnPropertyDescriptor` method
474
474
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
475
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
475
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
476
476
  O = toIndexedObject$4(O);
477
- P = toPropertyKey$1(P);
477
+ P = toPropertyKey$2(P);
478
478
  if (IE8_DOM_DEFINE$1) try {
479
479
  return $getOwnPropertyDescriptor$1(O, P);
480
480
  } catch (error) { /* empty */ }
481
- if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
481
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$3(!call$b(propertyIsEnumerableModule$1.f, O, P), O[P]);
482
482
  };
483
483
 
484
484
  var objectDefineProperty = {};
485
485
 
486
- var DESCRIPTORS$7 = descriptors;
487
- var fails$5 = fails$b;
486
+ var DESCRIPTORS$8 = descriptors;
487
+ var fails$c = fails$i;
488
488
 
489
489
  // V8 ~ Chrome 36-
490
490
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
491
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$5(function () {
491
+ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$c(function () {
492
492
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
493
493
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
494
494
  value: 42,
@@ -496,24 +496,24 @@ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$5(function () {
496
496
  }).prototype != 42;
497
497
  });
498
498
 
499
- var isObject$2 = isObject$6;
499
+ var isObject$5 = isObject$9;
500
500
 
501
- var $String$1 = String;
502
- var $TypeError$2 = TypeError;
501
+ var $String$3 = String;
502
+ var $TypeError$a = TypeError;
503
503
 
504
504
  // `Assert: Type(argument) is Object`
505
- var anObject$5 = function (argument) {
506
- if (isObject$2(argument)) return argument;
507
- throw $TypeError$2($String$1(argument) + ' is not an object');
505
+ var anObject$c = function (argument) {
506
+ if (isObject$5(argument)) return argument;
507
+ throw $TypeError$a($String$3(argument) + ' is not an object');
508
508
  };
509
509
 
510
- var DESCRIPTORS$6 = descriptors;
510
+ var DESCRIPTORS$7 = descriptors;
511
511
  var IE8_DOM_DEFINE = ie8DomDefine;
512
512
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
513
- var anObject$4 = anObject$5;
514
- var toPropertyKey = toPropertyKey$2;
513
+ var anObject$b = anObject$c;
514
+ var toPropertyKey$1 = toPropertyKey$3;
515
515
 
516
- var $TypeError$1 = TypeError;
516
+ var $TypeError$9 = TypeError;
517
517
  // eslint-disable-next-line es/no-object-defineproperty -- safe
518
518
  var $defineProperty = Object.defineProperty;
519
519
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -524,10 +524,10 @@ var WRITABLE = 'writable';
524
524
 
525
525
  // `Object.defineProperty` method
526
526
  // https://tc39.es/ecma262/#sec-object.defineproperty
527
- objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
528
- anObject$4(O);
529
- P = toPropertyKey(P);
530
- anObject$4(Attributes);
527
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
528
+ anObject$b(O);
529
+ P = toPropertyKey$1(P);
530
+ anObject$b(Attributes);
531
531
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
532
532
  var current = $getOwnPropertyDescriptor(O, P);
533
533
  if (current && current[WRITABLE]) {
@@ -540,41 +540,41 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
540
540
  }
541
541
  } return $defineProperty(O, P, Attributes);
542
542
  } : $defineProperty : function defineProperty(O, P, Attributes) {
543
- anObject$4(O);
544
- P = toPropertyKey(P);
545
- anObject$4(Attributes);
543
+ anObject$b(O);
544
+ P = toPropertyKey$1(P);
545
+ anObject$b(Attributes);
546
546
  if (IE8_DOM_DEFINE) try {
547
547
  return $defineProperty(O, P, Attributes);
548
548
  } catch (error) { /* empty */ }
549
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
549
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$9('Accessors not supported');
550
550
  if ('value' in Attributes) O[P] = Attributes.value;
551
551
  return O;
552
552
  };
553
553
 
554
- var DESCRIPTORS$5 = descriptors;
555
- var definePropertyModule$3 = objectDefineProperty;
556
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
554
+ var DESCRIPTORS$6 = descriptors;
555
+ var definePropertyModule$4 = objectDefineProperty;
556
+ var createPropertyDescriptor$2 = createPropertyDescriptor$4;
557
557
 
558
- var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
559
- return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
558
+ var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
559
+ return definePropertyModule$4.f(object, key, createPropertyDescriptor$2(1, value));
560
560
  } : function (object, key, value) {
561
561
  object[key] = value;
562
562
  return object;
563
563
  };
564
564
 
565
- var makeBuiltIn$2 = {exports: {}};
565
+ var makeBuiltIn$3 = {exports: {}};
566
566
 
567
- var DESCRIPTORS$4 = descriptors;
568
- var hasOwn$6 = hasOwnProperty_1;
567
+ var DESCRIPTORS$5 = descriptors;
568
+ var hasOwn$8 = hasOwnProperty_1;
569
569
 
570
- var FunctionPrototype = Function.prototype;
570
+ var FunctionPrototype$1 = Function.prototype;
571
571
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
572
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
572
+ var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
573
573
 
574
- var EXISTS = hasOwn$6(FunctionPrototype, 'name');
574
+ var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
575
575
  // additional protection from minified / mangled / dropped function names
576
576
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
577
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
577
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
578
578
 
579
579
  var functionName = {
580
580
  EXISTS: EXISTS,
@@ -582,27 +582,27 @@ var functionName = {
582
582
  CONFIGURABLE: CONFIGURABLE
583
583
  };
584
584
 
585
- var uncurryThis$4 = functionUncurryThis;
586
- var isCallable$8 = isCallable$e;
585
+ var uncurryThis$d = functionUncurryThis;
586
+ var isCallable$e = isCallable$k;
587
587
  var store$1 = sharedStore;
588
588
 
589
- var functionToString = uncurryThis$4(Function.toString);
589
+ var functionToString = uncurryThis$d(Function.toString);
590
590
 
591
591
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
592
- if (!isCallable$8(store$1.inspectSource)) {
592
+ if (!isCallable$e(store$1.inspectSource)) {
593
593
  store$1.inspectSource = function (it) {
594
594
  return functionToString(it);
595
595
  };
596
596
  }
597
597
 
598
- var inspectSource$1 = store$1.inspectSource;
598
+ var inspectSource$3 = store$1.inspectSource;
599
599
 
600
- var global$4 = global$b;
601
- var isCallable$7 = isCallable$e;
600
+ var global$a = global$i;
601
+ var isCallable$d = isCallable$k;
602
602
 
603
- var WeakMap$1 = global$4.WeakMap;
603
+ var WeakMap$1 = global$a.WeakMap;
604
604
 
605
- var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
605
+ var weakMapBasicDetection = isCallable$d(WeakMap$1) && /native code/.test(String(WeakMap$1));
606
606
 
607
607
  var shared$1 = shared$3.exports;
608
608
  var uid = uid$2;
@@ -616,28 +616,28 @@ var sharedKey$3 = function (key) {
616
616
  var hiddenKeys$4 = {};
617
617
 
618
618
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
619
- var global$3 = global$b;
620
- var isObject$1 = isObject$6;
619
+ var global$9 = global$i;
620
+ var isObject$4 = isObject$9;
621
621
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
622
- var hasOwn$5 = hasOwnProperty_1;
622
+ var hasOwn$7 = hasOwnProperty_1;
623
623
  var shared = sharedStore;
624
624
  var sharedKey$2 = sharedKey$3;
625
625
  var hiddenKeys$3 = hiddenKeys$4;
626
626
 
627
627
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
628
- var TypeError$1 = global$3.TypeError;
629
- var WeakMap = global$3.WeakMap;
630
- var set, get, has;
628
+ var TypeError$2 = global$9.TypeError;
629
+ var WeakMap = global$9.WeakMap;
630
+ var set$1, get, has;
631
631
 
632
632
  var enforce = function (it) {
633
- return has(it) ? get(it) : set(it, {});
633
+ return has(it) ? get(it) : set$1(it, {});
634
634
  };
635
635
 
636
636
  var getterFor = function (TYPE) {
637
637
  return function (it) {
638
638
  var state;
639
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
640
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
639
+ if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
640
+ throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
641
641
  } return state;
642
642
  };
643
643
  };
@@ -649,8 +649,8 @@ if (NATIVE_WEAK_MAP || shared.state) {
649
649
  store.has = store.has;
650
650
  store.set = store.set;
651
651
  /* eslint-enable no-self-assign -- prototype methods protection */
652
- set = function (it, metadata) {
653
- if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
652
+ set$1 = function (it, metadata) {
653
+ if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
654
654
  metadata.facade = it;
655
655
  store.set(it, metadata);
656
656
  return metadata;
@@ -664,88 +664,93 @@ if (NATIVE_WEAK_MAP || shared.state) {
664
664
  } else {
665
665
  var STATE = sharedKey$2('state');
666
666
  hiddenKeys$3[STATE] = true;
667
- set = function (it, metadata) {
668
- if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
667
+ set$1 = function (it, metadata) {
668
+ if (hasOwn$7(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
669
669
  metadata.facade = it;
670
670
  createNonEnumerableProperty$3(it, STATE, metadata);
671
671
  return metadata;
672
672
  };
673
673
  get = function (it) {
674
- return hasOwn$5(it, STATE) ? it[STATE] : {};
674
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
675
675
  };
676
676
  has = function (it) {
677
- return hasOwn$5(it, STATE);
677
+ return hasOwn$7(it, STATE);
678
678
  };
679
679
  }
680
680
 
681
681
  var internalState = {
682
- set: set,
682
+ set: set$1,
683
683
  get: get,
684
684
  has: has,
685
685
  enforce: enforce,
686
686
  getterFor: getterFor
687
687
  };
688
688
 
689
- var fails$4 = fails$b;
690
- var isCallable$6 = isCallable$e;
691
- var hasOwn$4 = hasOwnProperty_1;
692
- var DESCRIPTORS$3 = descriptors;
689
+ var uncurryThis$c = functionUncurryThis;
690
+ var fails$b = fails$i;
691
+ var isCallable$c = isCallable$k;
692
+ var hasOwn$6 = hasOwnProperty_1;
693
+ var DESCRIPTORS$4 = descriptors;
693
694
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
694
- var inspectSource = inspectSource$1;
695
- var InternalStateModule$1 = internalState;
695
+ var inspectSource$2 = inspectSource$3;
696
+ var InternalStateModule$2 = internalState;
696
697
 
697
- var enforceInternalState = InternalStateModule$1.enforce;
698
- var getInternalState$1 = InternalStateModule$1.get;
698
+ var enforceInternalState = InternalStateModule$2.enforce;
699
+ var getInternalState$1 = InternalStateModule$2.get;
700
+ var $String$2 = String;
699
701
  // eslint-disable-next-line es/no-object-defineproperty -- safe
700
- var defineProperty$4 = Object.defineProperty;
702
+ var defineProperty$5 = Object.defineProperty;
703
+ var stringSlice = uncurryThis$c(''.slice);
704
+ var replace$1 = uncurryThis$c(''.replace);
705
+ var join = uncurryThis$c([].join);
701
706
 
702
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$4(function () {
703
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
707
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$b(function () {
708
+ return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
704
709
  });
705
710
 
706
711
  var TEMPLATE = String(String).split('String');
707
712
 
708
- var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
709
- if (String(name).slice(0, 7) === 'Symbol(') {
710
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
713
+ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
714
+ if (stringSlice($String$2(name), 0, 7) === 'Symbol(') {
715
+ name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
711
716
  }
712
717
  if (options && options.getter) name = 'get ' + name;
713
718
  if (options && options.setter) name = 'set ' + name;
714
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
715
- if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
719
+ if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
720
+ if (DESCRIPTORS$4) defineProperty$5(value, 'name', { value: name, configurable: true });
716
721
  else value.name = name;
717
722
  }
718
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
719
- defineProperty$4(value, 'length', { value: options.arity });
723
+ if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
724
+ defineProperty$5(value, 'length', { value: options.arity });
720
725
  }
721
726
  try {
722
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
723
- if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
727
+ if (options && hasOwn$6(options, 'constructor') && options.constructor) {
728
+ if (DESCRIPTORS$4) defineProperty$5(value, 'prototype', { writable: false });
724
729
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
725
730
  } else if (value.prototype) value.prototype = undefined;
726
731
  } catch (error) { /* empty */ }
727
732
  var state = enforceInternalState(value);
728
- if (!hasOwn$4(state, 'source')) {
729
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
733
+ if (!hasOwn$6(state, 'source')) {
734
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
730
735
  } return value;
731
736
  };
732
737
 
733
738
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
734
739
  // eslint-disable-next-line no-extend-native -- required
735
- Function.prototype.toString = makeBuiltIn$1(function toString() {
736
- return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
740
+ Function.prototype.toString = makeBuiltIn$2(function toString() {
741
+ return isCallable$c(this) && getInternalState$1(this).source || inspectSource$2(this);
737
742
  }, 'toString');
738
743
 
739
- var isCallable$5 = isCallable$e;
740
- var definePropertyModule$2 = objectDefineProperty;
741
- var makeBuiltIn = makeBuiltIn$2.exports;
744
+ var isCallable$b = isCallable$k;
745
+ var definePropertyModule$3 = objectDefineProperty;
746
+ var makeBuiltIn$1 = makeBuiltIn$3.exports;
742
747
  var defineGlobalProperty$1 = defineGlobalProperty$3;
743
748
 
744
- var defineBuiltIn$3 = function (O, key, value, options) {
749
+ var defineBuiltIn$6 = function (O, key, value, options) {
745
750
  if (!options) options = {};
746
751
  var simple = options.enumerable;
747
752
  var name = options.name !== undefined ? options.name : key;
748
- if (isCallable$5(value)) makeBuiltIn(value, name, options);
753
+ if (isCallable$b(value)) makeBuiltIn$1(value, name, options);
749
754
  if (options.global) {
750
755
  if (simple) O[key] = value;
751
756
  else defineGlobalProperty$1(key, value);
@@ -755,7 +760,7 @@ var defineBuiltIn$3 = function (O, key, value, options) {
755
760
  else if (O[key]) simple = true;
756
761
  } catch (error) { /* empty */ }
757
762
  if (simple) O[key] = value;
758
- else definePropertyModule$2.f(O, key, {
763
+ else definePropertyModule$3.f(O, key, {
759
764
  value: value,
760
765
  enumerable: false,
761
766
  configurable: !options.nonConfigurable,
@@ -767,14 +772,14 @@ var defineBuiltIn$3 = function (O, key, value, options) {
767
772
  var objectGetOwnPropertyNames = {};
768
773
 
769
774
  var ceil = Math.ceil;
770
- var floor = Math.floor;
775
+ var floor$1 = Math.floor;
771
776
 
772
777
  // `Math.trunc` method
773
778
  // https://tc39.es/ecma262/#sec-math.trunc
774
779
  // eslint-disable-next-line es/no-math-trunc -- safe
775
780
  var mathTrunc = Math.trunc || function trunc(x) {
776
781
  var n = +x;
777
- return (n > 0 ? floor : ceil)(n);
782
+ return (n > 0 ? floor$1 : ceil)(n);
778
783
  };
779
784
 
780
785
  var trunc = mathTrunc;
@@ -789,15 +794,15 @@ var toIntegerOrInfinity$2 = function (argument) {
789
794
 
790
795
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
791
796
 
792
- var max = Math.max;
797
+ var max$1 = Math.max;
793
798
  var min$1 = Math.min;
794
799
 
795
800
  // Helper for a popular repeating case of the spec:
796
801
  // Let integer be ? ToInteger(index).
797
802
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
798
- var toAbsoluteIndex$1 = function (index, length) {
803
+ var toAbsoluteIndex$2 = function (index, length) {
799
804
  var integer = toIntegerOrInfinity$1(index);
800
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
805
+ return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
801
806
  };
802
807
 
803
808
  var toIntegerOrInfinity = toIntegerOrInfinity$2;
@@ -814,20 +819,20 @@ var toLength = toLength$1;
814
819
 
815
820
  // `LengthOfArrayLike` abstract operation
816
821
  // https://tc39.es/ecma262/#sec-lengthofarraylike
817
- var lengthOfArrayLike$1 = function (obj) {
822
+ var lengthOfArrayLike$4 = function (obj) {
818
823
  return toLength(obj.length);
819
824
  };
820
825
 
821
826
  var toIndexedObject$3 = toIndexedObject$5;
822
- var toAbsoluteIndex = toAbsoluteIndex$1;
823
- var lengthOfArrayLike = lengthOfArrayLike$1;
827
+ var toAbsoluteIndex$1 = toAbsoluteIndex$2;
828
+ var lengthOfArrayLike$3 = lengthOfArrayLike$4;
824
829
 
825
830
  // `Array.prototype.{ indexOf, includes }` methods implementation
826
- var createMethod = function (IS_INCLUDES) {
831
+ var createMethod$1 = function (IS_INCLUDES) {
827
832
  return function ($this, el, fromIndex) {
828
833
  var O = toIndexedObject$3($this);
829
- var length = lengthOfArrayLike(O);
830
- var index = toAbsoluteIndex(fromIndex, length);
834
+ var length = lengthOfArrayLike$3(O);
835
+ var index = toAbsoluteIndex$1(fromIndex, length);
831
836
  var value;
832
837
  // Array#includes uses SameValueZero equality algorithm
833
838
  // eslint-disable-next-line no-self-compare -- NaN check
@@ -845,29 +850,29 @@ var createMethod = function (IS_INCLUDES) {
845
850
  var arrayIncludes = {
846
851
  // `Array.prototype.includes` method
847
852
  // https://tc39.es/ecma262/#sec-array.prototype.includes
848
- includes: createMethod(true),
853
+ includes: createMethod$1(true),
849
854
  // `Array.prototype.indexOf` method
850
855
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
851
- indexOf: createMethod(false)
856
+ indexOf: createMethod$1(false)
852
857
  };
853
858
 
854
- var uncurryThis$3 = functionUncurryThis;
855
- var hasOwn$3 = hasOwnProperty_1;
859
+ var uncurryThis$b = functionUncurryThis;
860
+ var hasOwn$5 = hasOwnProperty_1;
856
861
  var toIndexedObject$2 = toIndexedObject$5;
857
862
  var indexOf = arrayIncludes.indexOf;
858
863
  var hiddenKeys$2 = hiddenKeys$4;
859
864
 
860
- var push = uncurryThis$3([].push);
865
+ var push$1 = uncurryThis$b([].push);
861
866
 
862
867
  var objectKeysInternal = function (object, names) {
863
868
  var O = toIndexedObject$2(object);
864
869
  var i = 0;
865
870
  var result = [];
866
871
  var key;
867
- for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
872
+ for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$1(result, key);
868
873
  // Don't enum bug & hidden keys
869
- while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
870
- ~indexOf(result, key) || push(result, key);
874
+ while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
875
+ ~indexOf(result, key) || push$1(result, key);
871
876
  }
872
877
  return result;
873
878
  };
@@ -900,68 +905,68 @@ var objectGetOwnPropertySymbols = {};
900
905
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
901
906
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
902
907
 
903
- var getBuiltIn$1 = getBuiltIn$4;
904
- var uncurryThis$2 = functionUncurryThis;
908
+ var getBuiltIn$5 = getBuiltIn$7;
909
+ var uncurryThis$a = functionUncurryThis;
905
910
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
906
911
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
907
- var anObject$3 = anObject$5;
912
+ var anObject$a = anObject$c;
908
913
 
909
- var concat$1 = uncurryThis$2([].concat);
914
+ var concat$1 = uncurryThis$a([].concat);
910
915
 
911
916
  // all object keys, includes non-enumerable and symbols
912
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
913
- var keys = getOwnPropertyNamesModule.f(anObject$3(it));
917
+ var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
918
+ var keys = getOwnPropertyNamesModule.f(anObject$a(it));
914
919
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
915
920
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
916
921
  };
917
922
 
918
- var hasOwn$2 = hasOwnProperty_1;
923
+ var hasOwn$4 = hasOwnProperty_1;
919
924
  var ownKeys = ownKeys$1;
920
925
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
921
- var definePropertyModule$1 = objectDefineProperty;
926
+ var definePropertyModule$2 = objectDefineProperty;
922
927
 
923
928
  var copyConstructorProperties$1 = function (target, source, exceptions) {
924
929
  var keys = ownKeys(source);
925
- var defineProperty = definePropertyModule$1.f;
930
+ var defineProperty = definePropertyModule$2.f;
926
931
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
927
932
  for (var i = 0; i < keys.length; i++) {
928
933
  var key = keys[i];
929
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
934
+ if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
930
935
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
931
936
  }
932
937
  }
933
938
  };
934
939
 
935
- var fails$3 = fails$b;
936
- var isCallable$4 = isCallable$e;
940
+ var fails$a = fails$i;
941
+ var isCallable$a = isCallable$k;
937
942
 
938
943
  var replacement = /#|\.prototype\./;
939
944
 
940
- var isForced$1 = function (feature, detection) {
945
+ var isForced$2 = function (feature, detection) {
941
946
  var value = data[normalize(feature)];
942
947
  return value == POLYFILL ? true
943
948
  : value == NATIVE ? false
944
- : isCallable$4(detection) ? fails$3(detection)
949
+ : isCallable$a(detection) ? fails$a(detection)
945
950
  : !!detection;
946
951
  };
947
952
 
948
- var normalize = isForced$1.normalize = function (string) {
953
+ var normalize = isForced$2.normalize = function (string) {
949
954
  return String(string).replace(replacement, '.').toLowerCase();
950
955
  };
951
956
 
952
- var data = isForced$1.data = {};
953
- var NATIVE = isForced$1.NATIVE = 'N';
954
- var POLYFILL = isForced$1.POLYFILL = 'P';
957
+ var data = isForced$2.data = {};
958
+ var NATIVE = isForced$2.NATIVE = 'N';
959
+ var POLYFILL = isForced$2.POLYFILL = 'P';
955
960
 
956
- var isForced_1 = isForced$1;
961
+ var isForced_1 = isForced$2;
957
962
 
958
- var global$2 = global$b;
959
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
963
+ var global$8 = global$i;
964
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
960
965
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
961
- var defineBuiltIn$2 = defineBuiltIn$3;
966
+ var defineBuiltIn$5 = defineBuiltIn$6;
962
967
  var defineGlobalProperty = defineGlobalProperty$3;
963
968
  var copyConstructorProperties = copyConstructorProperties$1;
964
- var isForced = isForced_1;
969
+ var isForced$1 = isForced_1;
965
970
 
966
971
  /*
967
972
  options.target - name of the target object
@@ -984,19 +989,19 @@ var _export = function (options, source) {
984
989
  var STATIC = options.stat;
985
990
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
986
991
  if (GLOBAL) {
987
- target = global$2;
992
+ target = global$8;
988
993
  } else if (STATIC) {
989
- target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
994
+ target = global$8[TARGET] || defineGlobalProperty(TARGET, {});
990
995
  } else {
991
- target = (global$2[TARGET] || {}).prototype;
996
+ target = (global$8[TARGET] || {}).prototype;
992
997
  }
993
998
  if (target) for (key in source) {
994
999
  sourceProperty = source[key];
995
1000
  if (options.dontCallGetSet) {
996
- descriptor = getOwnPropertyDescriptor(target, key);
1001
+ descriptor = getOwnPropertyDescriptor$1(target, key);
997
1002
  targetProperty = descriptor && descriptor.value;
998
1003
  } else targetProperty = target[key];
999
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1004
+ FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1000
1005
  // contained in target
1001
1006
  if (!FORCED && targetProperty !== undefined) {
1002
1007
  if (typeof sourceProperty == typeof targetProperty) continue;
@@ -1006,7 +1011,7 @@ var _export = function (options, source) {
1006
1011
  if (options.sham || (targetProperty && targetProperty.sham)) {
1007
1012
  createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1008
1013
  }
1009
- defineBuiltIn$2(target, key, sourceProperty, options);
1014
+ defineBuiltIn$5(target, key, sourceProperty, options);
1010
1015
  }
1011
1016
  };
1012
1017
 
@@ -1020,30 +1025,30 @@ var objectKeys$2 = Object.keys || function keys(O) {
1020
1025
  return internalObjectKeys(O, enumBugKeys$1);
1021
1026
  };
1022
1027
 
1023
- var DESCRIPTORS$2 = descriptors;
1024
- var uncurryThis$1 = functionUncurryThis;
1025
- var call$1 = functionCall;
1026
- var fails$2 = fails$b;
1028
+ var DESCRIPTORS$3 = descriptors;
1029
+ var uncurryThis$9 = functionUncurryThis;
1030
+ var call$a = functionCall;
1031
+ var fails$9 = fails$i;
1027
1032
  var objectKeys$1 = objectKeys$2;
1028
1033
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1029
1034
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1030
- var toObject$1 = toObject$3;
1035
+ var toObject$2 = toObject$4;
1031
1036
  var IndexedObject = indexedObject;
1032
1037
 
1033
1038
  // eslint-disable-next-line es/no-object-assign -- safe
1034
1039
  var $assign = Object.assign;
1035
1040
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1036
- var defineProperty$3 = Object.defineProperty;
1037
- var concat = uncurryThis$1([].concat);
1041
+ var defineProperty$4 = Object.defineProperty;
1042
+ var concat = uncurryThis$9([].concat);
1038
1043
 
1039
1044
  // `Object.assign` method
1040
1045
  // https://tc39.es/ecma262/#sec-object.assign
1041
- var objectAssign = !$assign || fails$2(function () {
1046
+ var objectAssign = !$assign || fails$9(function () {
1042
1047
  // should have correct order of operations (Edge bug)
1043
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1048
+ if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', {
1044
1049
  enumerable: true,
1045
1050
  get: function () {
1046
- defineProperty$3(this, 'b', {
1051
+ defineProperty$4(this, 'b', {
1047
1052
  value: 3,
1048
1053
  enumerable: false
1049
1054
  });
@@ -1059,7 +1064,7 @@ var objectAssign = !$assign || fails$2(function () {
1059
1064
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1060
1065
  return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1061
1066
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1062
- var T = toObject$1(target);
1067
+ var T = toObject$2(target);
1063
1068
  var argumentsLength = arguments.length;
1064
1069
  var index = 1;
1065
1070
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -1072,77 +1077,110 @@ var objectAssign = !$assign || fails$2(function () {
1072
1077
  var key;
1073
1078
  while (length > j) {
1074
1079
  key = keys[j++];
1075
- if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1080
+ if (!DESCRIPTORS$3 || call$a(propertyIsEnumerable, S, key)) T[key] = S[key];
1076
1081
  }
1077
1082
  } return T;
1078
1083
  } : $assign;
1079
1084
 
1080
- var $$1 = _export;
1085
+ var $$b = _export;
1081
1086
  var assign = objectAssign;
1082
1087
 
1083
1088
  // `Object.assign` method
1084
1089
  // https://tc39.es/ecma262/#sec-object.assign
1085
1090
  // eslint-disable-next-line es/no-object-assign -- required for testing
1086
- $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1091
+ $$b({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1087
1092
  assign: assign
1088
1093
  });
1089
1094
 
1090
- const CustomButton = ({
1091
- buttonText
1092
- }) => {
1093
- const contentStyles = css({
1094
- height: '300px',
1095
- width: '300px',
1096
- backgroundColor: 'lightgrey'
1097
- });
1098
- const buttonStyles = css({
1099
- backgroundColor: 'grey'
1100
- });
1101
- return jsx("div", Object.assign({
1102
- css: contentStyles
1103
- }, {
1104
- children: jsx("button", Object.assign({
1105
- css: buttonStyles
1095
+ /******************************************************************************
1096
+ Copyright (c) Microsoft Corporation.
1097
+
1098
+ Permission to use, copy, modify, and/or distribute this software for any
1099
+ purpose with or without fee is hereby granted.
1100
+
1101
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1102
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1103
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1104
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1105
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1106
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1107
+ PERFORMANCE OF THIS SOFTWARE.
1108
+ ***************************************************************************** */
1109
+
1110
+ function __rest(s, e) {
1111
+ var t = {};
1112
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1113
+ t[p] = s[p];
1114
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1115
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1116
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1117
+ t[p[i]] = s[p[i]];
1118
+ }
1119
+ return t;
1120
+ }
1121
+
1122
+ function __awaiter(thisArg, _arguments, P, generator) {
1123
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1124
+ return new (P || (P = Promise))(function (resolve, reject) {
1125
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1126
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1127
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1128
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1129
+ });
1130
+ }
1131
+
1132
+ const Badge = _a => {
1133
+ var {
1134
+ textColor,
1135
+ children
1136
+ } = _a,
1137
+ restProps = __rest(_a, ["textColor", "children"]);
1138
+ return jsx(EuiBadge, Object.assign({}, restProps, {
1139
+ children: jsx(EuiText, Object.assign({
1140
+ color: textColor,
1141
+ size: "xs"
1106
1142
  }, {
1107
- children: buttonText
1143
+ children: jsx("b", {
1144
+ children: children
1145
+ })
1108
1146
  }))
1109
1147
  }));
1110
1148
  };
1111
1149
 
1112
1150
  var objectDefineProperties = {};
1113
1151
 
1114
- var DESCRIPTORS$1 = descriptors;
1152
+ var DESCRIPTORS$2 = descriptors;
1115
1153
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1116
- var definePropertyModule = objectDefineProperty;
1117
- var anObject$2 = anObject$5;
1154
+ var definePropertyModule$1 = objectDefineProperty;
1155
+ var anObject$9 = anObject$c;
1118
1156
  var toIndexedObject$1 = toIndexedObject$5;
1119
1157
  var objectKeys = objectKeys$2;
1120
1158
 
1121
1159
  // `Object.defineProperties` method
1122
1160
  // https://tc39.es/ecma262/#sec-object.defineproperties
1123
1161
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1124
- objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1125
- anObject$2(O);
1162
+ objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1163
+ anObject$9(O);
1126
1164
  var props = toIndexedObject$1(Properties);
1127
1165
  var keys = objectKeys(Properties);
1128
1166
  var length = keys.length;
1129
1167
  var index = 0;
1130
1168
  var key;
1131
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1169
+ while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1132
1170
  return O;
1133
1171
  };
1134
1172
 
1135
- var getBuiltIn = getBuiltIn$4;
1173
+ var getBuiltIn$4 = getBuiltIn$7;
1136
1174
 
1137
- var html$1 = getBuiltIn('document', 'documentElement');
1175
+ var html$2 = getBuiltIn$4('document', 'documentElement');
1138
1176
 
1139
1177
  /* global ActiveXObject -- old IE, WSH */
1140
1178
 
1141
- var anObject$1 = anObject$5;
1179
+ var anObject$8 = anObject$c;
1142
1180
  var definePropertiesModule = objectDefineProperties;
1143
1181
  var enumBugKeys = enumBugKeys$3;
1144
1182
  var hiddenKeys = hiddenKeys$4;
1145
- var html = html$1;
1183
+ var html$1 = html$2;
1146
1184
  var documentCreateElement$1 = documentCreateElement$2;
1147
1185
  var sharedKey$1 = sharedKey$3;
1148
1186
 
@@ -1174,7 +1212,7 @@ var NullProtoObjectViaIFrame = function () {
1174
1212
  var JS = 'java' + SCRIPT + ':';
1175
1213
  var iframeDocument;
1176
1214
  iframe.style.display = 'none';
1177
- html.appendChild(iframe);
1215
+ html$1.appendChild(iframe);
1178
1216
  // https://github.com/zloirock/core-js/issues/475
1179
1217
  iframe.src = String(JS);
1180
1218
  iframeDocument = iframe.contentWindow.document;
@@ -1212,7 +1250,7 @@ hiddenKeys[IE_PROTO$1] = true;
1212
1250
  var objectCreate = Object.create || function create(O, Properties) {
1213
1251
  var result;
1214
1252
  if (O !== null) {
1215
- EmptyConstructor[PROTOTYPE] = anObject$1(O);
1253
+ EmptyConstructor[PROTOTYPE] = anObject$8(O);
1216
1254
  result = new EmptyConstructor();
1217
1255
  EmptyConstructor[PROTOTYPE] = null;
1218
1256
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -1221,68 +1259,68 @@ var objectCreate = Object.create || function create(O, Properties) {
1221
1259
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1222
1260
  };
1223
1261
 
1224
- var wellKnownSymbol$4 = wellKnownSymbol$6;
1262
+ var wellKnownSymbol$e = wellKnownSymbol$g;
1225
1263
  var create$1 = objectCreate;
1226
- var defineProperty$2 = objectDefineProperty.f;
1264
+ var defineProperty$3 = objectDefineProperty.f;
1227
1265
 
1228
- var UNSCOPABLES = wellKnownSymbol$4('unscopables');
1229
- var ArrayPrototype = Array.prototype;
1266
+ var UNSCOPABLES = wellKnownSymbol$e('unscopables');
1267
+ var ArrayPrototype$1 = Array.prototype;
1230
1268
 
1231
1269
  // Array.prototype[@@unscopables]
1232
1270
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1233
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
1234
- defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1271
+ if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
1272
+ defineProperty$3(ArrayPrototype$1, UNSCOPABLES, {
1235
1273
  configurable: true,
1236
1274
  value: create$1(null)
1237
1275
  });
1238
1276
  }
1239
1277
 
1240
1278
  // add a key to Array.prototype[@@unscopables]
1241
- var addToUnscopables$1 = function (key) {
1242
- ArrayPrototype[UNSCOPABLES][key] = true;
1279
+ var addToUnscopables$2 = function (key) {
1280
+ ArrayPrototype$1[UNSCOPABLES][key] = true;
1243
1281
  };
1244
1282
 
1245
1283
  var iterators = {};
1246
1284
 
1247
- var fails$1 = fails$b;
1285
+ var fails$8 = fails$i;
1248
1286
 
1249
- var correctPrototypeGetter = !fails$1(function () {
1287
+ var correctPrototypeGetter = !fails$8(function () {
1250
1288
  function F() { /* empty */ }
1251
1289
  F.prototype.constructor = null;
1252
1290
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1253
1291
  return Object.getPrototypeOf(new F()) !== F.prototype;
1254
1292
  });
1255
1293
 
1256
- var hasOwn$1 = hasOwnProperty_1;
1257
- var isCallable$3 = isCallable$e;
1258
- var toObject = toObject$3;
1294
+ var hasOwn$3 = hasOwnProperty_1;
1295
+ var isCallable$9 = isCallable$k;
1296
+ var toObject$1 = toObject$4;
1259
1297
  var sharedKey = sharedKey$3;
1260
1298
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1261
1299
 
1262
1300
  var IE_PROTO = sharedKey('IE_PROTO');
1263
- var $Object = Object;
1264
- var ObjectPrototype = $Object.prototype;
1301
+ var $Object$1 = Object;
1302
+ var ObjectPrototype = $Object$1.prototype;
1265
1303
 
1266
1304
  // `Object.getPrototypeOf` method
1267
1305
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1268
1306
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1269
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1270
- var object = toObject(O);
1271
- if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1307
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1308
+ var object = toObject$1(O);
1309
+ if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
1272
1310
  var constructor = object.constructor;
1273
- if (isCallable$3(constructor) && object instanceof constructor) {
1311
+ if (isCallable$9(constructor) && object instanceof constructor) {
1274
1312
  return constructor.prototype;
1275
- } return object instanceof $Object ? ObjectPrototype : null;
1313
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1276
1314
  };
1277
1315
 
1278
- var fails = fails$b;
1279
- var isCallable$2 = isCallable$e;
1280
- var isObject = isObject$6;
1316
+ var fails$7 = fails$i;
1317
+ var isCallable$8 = isCallable$k;
1318
+ var isObject$3 = isObject$9;
1281
1319
  var getPrototypeOf$1 = objectGetPrototypeOf;
1282
- var defineBuiltIn$1 = defineBuiltIn$3;
1283
- var wellKnownSymbol$3 = wellKnownSymbol$6;
1320
+ var defineBuiltIn$4 = defineBuiltIn$6;
1321
+ var wellKnownSymbol$d = wellKnownSymbol$g;
1284
1322
 
1285
- var ITERATOR$2 = wellKnownSymbol$3('iterator');
1323
+ var ITERATOR$6 = wellKnownSymbol$d('iterator');
1286
1324
  var BUGGY_SAFARI_ITERATORS$1 = false;
1287
1325
 
1288
1326
  // `%IteratorPrototype%` object
@@ -1300,18 +1338,18 @@ if ([].keys) {
1300
1338
  }
1301
1339
  }
1302
1340
 
1303
- var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails(function () {
1341
+ var NEW_ITERATOR_PROTOTYPE = !isObject$3(IteratorPrototype$2) || fails$7(function () {
1304
1342
  var test = {};
1305
1343
  // FF44- legacy iterators case
1306
- return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1344
+ return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
1307
1345
  });
1308
1346
 
1309
1347
  if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1310
1348
 
1311
1349
  // `%IteratorPrototype%[@@iterator]()` method
1312
1350
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1313
- if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
1314
- defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1351
+ if (!isCallable$8(IteratorPrototype$2[ITERATOR$6])) {
1352
+ defineBuiltIn$4(IteratorPrototype$2, ITERATOR$6, function () {
1315
1353
  return this;
1316
1354
  });
1317
1355
  }
@@ -1321,49 +1359,59 @@ var iteratorsCore = {
1321
1359
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1322
1360
  };
1323
1361
 
1324
- var defineProperty$1 = objectDefineProperty.f;
1325
- var hasOwn = hasOwnProperty_1;
1326
- var wellKnownSymbol$2 = wellKnownSymbol$6;
1362
+ var defineProperty$2 = objectDefineProperty.f;
1363
+ var hasOwn$2 = hasOwnProperty_1;
1364
+ var wellKnownSymbol$c = wellKnownSymbol$g;
1327
1365
 
1328
- var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1366
+ var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag');
1329
1367
 
1330
- var setToStringTag$2 = function (target, TAG, STATIC) {
1368
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1331
1369
  if (target && !STATIC) target = target.prototype;
1332
- if (target && !hasOwn(target, TO_STRING_TAG$1)) {
1333
- defineProperty$1(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
1370
+ if (target && !hasOwn$2(target, TO_STRING_TAG$3)) {
1371
+ defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1334
1372
  }
1335
1373
  };
1336
1374
 
1337
1375
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1338
1376
  var create = objectCreate;
1339
- var createPropertyDescriptor = createPropertyDescriptor$3;
1340
- var setToStringTag$1 = setToStringTag$2;
1341
- var Iterators$2 = iterators;
1377
+ var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1378
+ var setToStringTag$2 = setToStringTag$3;
1379
+ var Iterators$4 = iterators;
1342
1380
 
1343
1381
  var returnThis$1 = function () { return this; };
1344
1382
 
1345
1383
  var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1346
1384
  var TO_STRING_TAG = NAME + ' Iterator';
1347
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1348
- setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1349
- Iterators$2[TO_STRING_TAG] = returnThis$1;
1385
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
1386
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1387
+ Iterators$4[TO_STRING_TAG] = returnThis$1;
1350
1388
  return IteratorConstructor;
1351
1389
  };
1352
1390
 
1353
- var isCallable$1 = isCallable$e;
1391
+ var uncurryThis$8 = functionUncurryThis;
1392
+ var aCallable$7 = aCallable$9;
1354
1393
 
1355
- var $String = String;
1356
- var $TypeError = TypeError;
1394
+ var functionUncurryThisAccessor = function (object, key, method) {
1395
+ try {
1396
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1397
+ return uncurryThis$8(aCallable$7(Object.getOwnPropertyDescriptor(object, key)[method]));
1398
+ } catch (error) { /* empty */ }
1399
+ };
1400
+
1401
+ var isCallable$7 = isCallable$k;
1402
+
1403
+ var $String$1 = String;
1404
+ var $TypeError$8 = TypeError;
1357
1405
 
1358
1406
  var aPossiblePrototype$1 = function (argument) {
1359
- if (typeof argument == 'object' || isCallable$1(argument)) return argument;
1360
- throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
1407
+ if (typeof argument == 'object' || isCallable$7(argument)) return argument;
1408
+ throw $TypeError$8("Can't set " + $String$1(argument) + ' as a prototype');
1361
1409
  };
1362
1410
 
1363
1411
  /* eslint-disable no-proto -- safe */
1364
1412
 
1365
- var uncurryThis = functionUncurryThis;
1366
- var anObject = anObject$5;
1413
+ var uncurryThisAccessor = functionUncurryThisAccessor;
1414
+ var anObject$7 = anObject$c;
1367
1415
  var aPossiblePrototype = aPossiblePrototype$1;
1368
1416
 
1369
1417
  // `Object.setPrototypeOf` method
@@ -1375,13 +1423,12 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1375
1423
  var test = {};
1376
1424
  var setter;
1377
1425
  try {
1378
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1379
- setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1426
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1380
1427
  setter(test, []);
1381
1428
  CORRECT_SETTER = test instanceof Array;
1382
1429
  } catch (error) { /* empty */ }
1383
1430
  return function setPrototypeOf(O, proto) {
1384
- anObject(O);
1431
+ anObject$7(O);
1385
1432
  aPossiblePrototype(proto);
1386
1433
  if (CORRECT_SETTER) setter(O, proto);
1387
1434
  else O.__proto__ = proto;
@@ -1389,25 +1436,25 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1389
1436
  };
1390
1437
  }() : undefined);
1391
1438
 
1392
- var $ = _export;
1393
- var call = functionCall;
1439
+ var $$a = _export;
1440
+ var call$9 = functionCall;
1394
1441
  var FunctionName = functionName;
1395
- var isCallable = isCallable$e;
1442
+ var isCallable$6 = isCallable$k;
1396
1443
  var createIteratorConstructor = iteratorCreateConstructor;
1397
1444
  var getPrototypeOf = objectGetPrototypeOf;
1398
- var setPrototypeOf = objectSetPrototypeOf;
1399
- var setToStringTag = setToStringTag$2;
1445
+ var setPrototypeOf$1 = objectSetPrototypeOf;
1446
+ var setToStringTag$1 = setToStringTag$3;
1400
1447
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1401
- var defineBuiltIn = defineBuiltIn$3;
1402
- var wellKnownSymbol$1 = wellKnownSymbol$6;
1403
- var Iterators$1 = iterators;
1448
+ var defineBuiltIn$3 = defineBuiltIn$6;
1449
+ var wellKnownSymbol$b = wellKnownSymbol$g;
1450
+ var Iterators$3 = iterators;
1404
1451
  var IteratorsCore = iteratorsCore;
1405
1452
 
1406
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1453
+ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1407
1454
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1408
1455
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1409
1456
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1410
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
1457
+ var ITERATOR$5 = wellKnownSymbol$b('iterator');
1411
1458
  var KEYS = 'keys';
1412
1459
  var VALUES = 'values';
1413
1460
  var ENTRIES = 'entries';
@@ -1430,7 +1477,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1430
1477
  var TO_STRING_TAG = NAME + ' Iterator';
1431
1478
  var INCORRECT_VALUES_NAME = false;
1432
1479
  var IterablePrototype = Iterable.prototype;
1433
- var nativeIterator = IterablePrototype[ITERATOR$1]
1480
+ var nativeIterator = IterablePrototype[ITERATOR$5]
1434
1481
  || IterablePrototype['@@iterator']
1435
1482
  || DEFAULT && IterablePrototype[DEFAULT];
1436
1483
  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
@@ -1442,24 +1489,24 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1442
1489
  CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1443
1490
  if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1444
1491
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1445
- if (setPrototypeOf) {
1446
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1447
- } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1448
- defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1492
+ if (setPrototypeOf$1) {
1493
+ setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
1494
+ } else if (!isCallable$6(CurrentIteratorPrototype[ITERATOR$5])) {
1495
+ defineBuiltIn$3(CurrentIteratorPrototype, ITERATOR$5, returnThis);
1449
1496
  }
1450
1497
  }
1451
1498
  // Set @@toStringTag to native iterators
1452
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1499
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1453
1500
  }
1454
1501
  }
1455
1502
 
1456
1503
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1457
- if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1504
+ if (PROPER_FUNCTION_NAME$1 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1458
1505
  if (CONFIGURABLE_FUNCTION_NAME) {
1459
1506
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1460
1507
  } else {
1461
1508
  INCORRECT_VALUES_NAME = true;
1462
- defaultIterator = function values() { return call(nativeIterator, this); };
1509
+ defaultIterator = function values() { return call$9(nativeIterator, this); };
1463
1510
  }
1464
1511
  }
1465
1512
 
@@ -1472,16 +1519,16 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1472
1519
  };
1473
1520
  if (FORCED) for (KEY in methods) {
1474
1521
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1475
- defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1522
+ defineBuiltIn$3(IterablePrototype, KEY, methods[KEY]);
1476
1523
  }
1477
- } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1524
+ } else $$a({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1478
1525
  }
1479
1526
 
1480
1527
  // define iterator
1481
- if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1482
- defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1528
+ if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
1529
+ defineBuiltIn$3(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
1483
1530
  }
1484
- Iterators$1[NAME] = defaultIterator;
1531
+ Iterators$3[NAME] = defaultIterator;
1485
1532
 
1486
1533
  return methods;
1487
1534
  };
@@ -1493,17 +1540,17 @@ var createIterResultObject$1 = function (value, done) {
1493
1540
  };
1494
1541
 
1495
1542
  var toIndexedObject = toIndexedObject$5;
1496
- var addToUnscopables = addToUnscopables$1;
1497
- var Iterators = iterators;
1498
- var InternalStateModule = internalState;
1499
- var defineProperty = objectDefineProperty.f;
1543
+ var addToUnscopables$1 = addToUnscopables$2;
1544
+ var Iterators$2 = iterators;
1545
+ var InternalStateModule$1 = internalState;
1546
+ var defineProperty$1 = objectDefineProperty.f;
1500
1547
  var defineIterator = iteratorDefine;
1501
1548
  var createIterResultObject = createIterResultObject$1;
1502
- var DESCRIPTORS = descriptors;
1549
+ var DESCRIPTORS$1 = descriptors;
1503
1550
 
1504
1551
  var ARRAY_ITERATOR = 'Array Iterator';
1505
- var setInternalState = InternalStateModule.set;
1506
- var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1552
+ var setInternalState$1 = InternalStateModule$1.set;
1553
+ var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
1507
1554
 
1508
1555
  // `Array.prototype.entries` method
1509
1556
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -1516,7 +1563,7 @@ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1516
1563
  // `CreateArrayIterator` internal method
1517
1564
  // https://tc39.es/ecma262/#sec-createarrayiterator
1518
1565
  var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1519
- setInternalState(this, {
1566
+ setInternalState$1(this, {
1520
1567
  type: ARRAY_ITERATOR,
1521
1568
  target: toIndexedObject(iterated), // target
1522
1569
  index: 0, // next index
@@ -1541,16 +1588,16 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1541
1588
  // argumentsList[@@iterator] is %ArrayProto_values%
1542
1589
  // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1543
1590
  // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1544
- var values = Iterators.Arguments = Iterators.Array;
1591
+ var values = Iterators$2.Arguments = Iterators$2.Array;
1545
1592
 
1546
1593
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1547
- addToUnscopables('keys');
1548
- addToUnscopables('values');
1549
- addToUnscopables('entries');
1594
+ addToUnscopables$1('keys');
1595
+ addToUnscopables$1('values');
1596
+ addToUnscopables$1('entries');
1550
1597
 
1551
1598
  // V8 ~ Chrome 45- bug
1552
- if (DESCRIPTORS && values.name !== 'values') try {
1553
- defineProperty(values, 'name', { value: 'values' });
1599
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1600
+ defineProperty$1(values, 'name', { value: 'values' });
1554
1601
  } catch (error) { /* empty */ }
1555
1602
 
1556
1603
  // iterable DOM collections
@@ -1597,27 +1644,27 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1597
1644
 
1598
1645
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1599
1646
 
1600
- var global$1 = global$b;
1647
+ var global$7 = global$i;
1601
1648
  var DOMIterables = domIterables;
1602
1649
  var DOMTokenListPrototype = domTokenListPrototype;
1603
1650
  var ArrayIteratorMethods = es_array_iterator;
1604
1651
  var createNonEnumerableProperty = createNonEnumerableProperty$4;
1605
- var wellKnownSymbol = wellKnownSymbol$6;
1652
+ var wellKnownSymbol$a = wellKnownSymbol$g;
1606
1653
 
1607
- var ITERATOR = wellKnownSymbol('iterator');
1608
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1654
+ var ITERATOR$4 = wellKnownSymbol$a('iterator');
1655
+ var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
1609
1656
  var ArrayValues = ArrayIteratorMethods.values;
1610
1657
 
1611
1658
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1612
1659
  if (CollectionPrototype) {
1613
1660
  // some Chrome versions have non-configurable methods on DOMTokenList
1614
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1615
- createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1661
+ if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
1662
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
1616
1663
  } catch (error) {
1617
- CollectionPrototype[ITERATOR] = ArrayValues;
1664
+ CollectionPrototype[ITERATOR$4] = ArrayValues;
1618
1665
  }
1619
- if (!CollectionPrototype[TO_STRING_TAG]) {
1620
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
1666
+ if (!CollectionPrototype[TO_STRING_TAG$2]) {
1667
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
1621
1668
  }
1622
1669
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1623
1670
  // some Chrome versions have non-configurable methods on DOMTokenList
@@ -1631,119 +1678,2898 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1631
1678
  };
1632
1679
 
1633
1680
  for (var COLLECTION_NAME in DOMIterables) {
1634
- handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1681
+ handlePrototype(global$7[COLLECTION_NAME] && global$7[COLLECTION_NAME].prototype, COLLECTION_NAME);
1635
1682
  }
1636
1683
 
1637
1684
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1638
1685
 
1639
- const OrchestratorPageTemplate = ({
1686
+ var Environment;
1687
+ (function (Environment) {
1688
+ Environment["DEVELOPMENT"] = "Development";
1689
+ Environment["PRODUCTION"] = "Production";
1690
+ })(Environment || (Environment = {}));
1691
+ const useOrchestratorConfig = initialOrchestratorConfig => {
1692
+ const [orchestratorConfig] = useState(initialOrchestratorConfig);
1693
+ return {
1694
+ orchestratorConfig
1695
+ };
1696
+ };
1697
+
1698
+ const OrchestratorConfigContext = /*#__PURE__*/createContext({
1699
+ orchestratorApiBaseUrl: '',
1700
+ engineStatusEndpoint: '',
1701
+ processStatusCountsEndpoint: '',
1702
+ environmentName: '',
1703
+ graphqlEndpoint: ''
1704
+ });
1705
+ const OrchestratorConfigProvider = ({
1706
+ initialOrchestratorConfig,
1640
1707
  children
1641
1708
  }) => {
1642
1709
  const {
1643
- euiTheme
1644
- } = useEuiTheme();
1645
- const [isSideMenuVisible, setIsSideMenuVisible] = useState(true);
1646
- const multiplyBaseValue = multiplier => euiTheme.base * multiplier;
1647
- const navigationHeight = multiplyBaseValue(3);
1648
- return jsxs(Fragment, {
1649
- children: [jsxs(EuiFlexGroup, Object.assign({
1650
- direction: "row",
1651
- justifyContent: "spaceBetween",
1652
- alignItems: "center",
1653
- css: {
1654
- backgroundColor: euiTheme.colors.primary,
1655
- height: navigationHeight,
1656
- paddingLeft: euiTheme.size.l,
1657
- paddingRight: euiTheme.size.l
1658
- }
1659
- }, {
1660
- children: [jsx(EuiFlexItem, {
1661
- children: jsx(EuiFlexGroup, Object.assign({
1662
- alignItems: "center"
1663
- }, {
1664
- children: jsx(EuiText, Object.assign({
1665
- color: euiTheme.colors.emptyShade
1666
- }, {
1667
- children: "Orchestrator"
1668
- }))
1669
- }))
1670
- }), jsx(EuiFlexItem, {
1671
- children: jsx(EuiFlexGroup, Object.assign({
1672
- direction: "row",
1673
- justifyContent: "flexEnd"
1674
- }, {
1675
- children: jsx(EuiButtonIcon, {
1676
- display: "empty",
1677
- iconType: "arrowRight",
1678
- color: "ghost",
1679
- onClick: () => setIsSideMenuVisible(!isSideMenuVisible)
1680
- })
1681
- }))
1682
- })]
1683
- })), jsxs(EuiPageTemplate, Object.assign({
1684
- grow: false,
1685
- contentBorder: false,
1686
- minHeight: `calc(100vh - ${navigationHeight})`
1687
- }, {
1688
- children: [isSideMenuVisible && jsx(EuiPageTemplate.Sidebar, Object.assign({
1689
- css: {
1690
- backgroundColor: euiTheme.colors.body
1691
- }
1692
- }, {
1693
- children: jsx("div", {
1694
- children: "Sidebar"
1695
- })
1696
- })), jsx(EuiPageTemplate.Section, Object.assign({
1697
- css: {
1698
- backgroundColor: euiTheme.colors.emptyShade
1699
- }
1700
- }, {
1701
- children: children
1702
- }))]
1703
- }))]
1710
+ orchestratorConfig
1711
+ } = useOrchestratorConfig(initialOrchestratorConfig);
1712
+ return jsx(OrchestratorConfigContext.Provider, Object.assign({
1713
+ value: orchestratorConfig
1714
+ }, {
1715
+ children: children
1716
+ }));
1717
+ };
1718
+
1719
+ const useQueryWithGraphql = (query, queryVars) => {
1720
+ const {
1721
+ graphqlEndpoint
1722
+ } = useContext(OrchestratorConfigContext);
1723
+ const graphQLClient = new GraphQLClient(graphqlEndpoint);
1724
+ const fetchFromGraphql = () => __awaiter(void 0, void 0, void 0, function* () {
1725
+ // TS-Ignore because queryVars does not seem to be accepted by the client
1726
+ // The props in this useQueryWithGraphql-hook ensures queryVars is indeed related to the query
1727
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1728
+ // @ts-ignore
1729
+ return yield graphQLClient.request(query, queryVars);
1730
+ });
1731
+ return useQuery(['subscriptions', ...Object.values(queryVars)], fetchFromGraphql);
1732
+ };
1733
+ const useStringQueryWithGraphql = (query, queryVars) => {
1734
+ const {
1735
+ graphqlEndpoint
1736
+ } = useContext(OrchestratorConfigContext);
1737
+ const fetchFromGraphql = () => __awaiter(void 0, void 0, void 0, function* () {
1738
+ return yield request(graphqlEndpoint, query, queryVars);
1704
1739
  });
1740
+ return useQuery(['subscriptions', ...Object.values(queryVars)], fetchFromGraphql);
1705
1741
  };
1706
1742
 
1707
- const defaultOrchestratorTheme = {
1708
- colors: {
1709
- DARK: {},
1710
- LIGHT: {
1711
- primary: '#0077C8',
1712
- accent: '#E67300',
1713
- success: '#008939',
1714
- warning: '#FFC514',
1715
- danger: '#BD271F',
1716
- primaryText: '#0067AC',
1717
- accentText: '#B05200',
1718
- successText: '#007832',
1719
- warningText: '#8E6A00',
1720
- dangerText: '#AC0A01',
1721
- emptyShade: '#FFFFFF',
1722
- lightestShade: '#F1F5F9',
1723
- lightShade: '#CCD5E2',
1724
- mediumShade: '#94A4B8',
1725
- darkShade: '#64758B',
1726
- darkestShade: '#334255',
1727
- fullShade: '#0F172B',
1728
- text: '#334255',
1729
- title: '#0F172B',
1730
- subduedText: '#64758B',
1731
- link: '#0067AC',
1732
- body: '#F1F5F9',
1733
- highlight: '#FFF6DE',
1734
- disabled: '#94A4B8',
1735
- disabledText: '#94A4B8',
1736
- shadow: '#000000'
1737
- }
1738
- },
1739
- font: {
1740
- weight: {
1741
- regular: 400,
1742
- medium: 500,
1743
- semiBold: 600,
1744
- bold: 700
1745
- }
1743
+ var classof$5 = classofRaw$2;
1744
+
1745
+ var engineIsNode = typeof process != 'undefined' && classof$5(process) == 'process';
1746
+
1747
+ var makeBuiltIn = makeBuiltIn$3.exports;
1748
+ var defineProperty = objectDefineProperty;
1749
+
1750
+ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
1751
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1752
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1753
+ return defineProperty.f(target, name, descriptor);
1754
+ };
1755
+
1756
+ var getBuiltIn$3 = getBuiltIn$7;
1757
+ var defineBuiltInAccessor = defineBuiltInAccessor$1;
1758
+ var wellKnownSymbol$9 = wellKnownSymbol$g;
1759
+ var DESCRIPTORS = descriptors;
1760
+
1761
+ var SPECIES$2 = wellKnownSymbol$9('species');
1762
+
1763
+ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1764
+ var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
1765
+
1766
+ if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
1767
+ defineBuiltInAccessor(Constructor, SPECIES$2, {
1768
+ configurable: true,
1769
+ get: function () { return this; }
1770
+ });
1771
+ }
1772
+ };
1773
+
1774
+ var isPrototypeOf$2 = objectIsPrototypeOf;
1775
+
1776
+ var $TypeError$7 = TypeError;
1777
+
1778
+ var anInstance$1 = function (it, Prototype) {
1779
+ if (isPrototypeOf$2(Prototype, it)) return it;
1780
+ throw $TypeError$7('Incorrect invocation');
1781
+ };
1782
+
1783
+ var wellKnownSymbol$8 = wellKnownSymbol$g;
1784
+
1785
+ var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
1786
+ var test$1 = {};
1787
+
1788
+ test$1[TO_STRING_TAG$1] = 'z';
1789
+
1790
+ var toStringTagSupport = String(test$1) === '[object z]';
1791
+
1792
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1793
+ var isCallable$5 = isCallable$k;
1794
+ var classofRaw$1 = classofRaw$2;
1795
+ var wellKnownSymbol$7 = wellKnownSymbol$g;
1796
+
1797
+ var TO_STRING_TAG = wellKnownSymbol$7('toStringTag');
1798
+ var $Object = Object;
1799
+
1800
+ // ES3 wrong here
1801
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1802
+
1803
+ // fallback for IE11 Script Access Denied error
1804
+ var tryGet = function (it, key) {
1805
+ try {
1806
+ return it[key];
1807
+ } catch (error) { /* empty */ }
1808
+ };
1809
+
1810
+ // getting tag from ES6+ `Object.prototype.toString`
1811
+ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1812
+ var O, tag, result;
1813
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1814
+ // @@toStringTag case
1815
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1816
+ // builtinTag case
1817
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1818
+ // ES3 arguments fallback
1819
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
1820
+ };
1821
+
1822
+ var uncurryThis$7 = functionUncurryThis;
1823
+ var fails$6 = fails$i;
1824
+ var isCallable$4 = isCallable$k;
1825
+ var classof$3 = classof$4;
1826
+ var getBuiltIn$2 = getBuiltIn$7;
1827
+ var inspectSource$1 = inspectSource$3;
1828
+
1829
+ var noop = function () { /* empty */ };
1830
+ var empty = [];
1831
+ var construct = getBuiltIn$2('Reflect', 'construct');
1832
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1833
+ var exec$1 = uncurryThis$7(constructorRegExp.exec);
1834
+ var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1835
+
1836
+ var isConstructorModern = function isConstructor(argument) {
1837
+ if (!isCallable$4(argument)) return false;
1838
+ try {
1839
+ construct(noop, empty, argument);
1840
+ return true;
1841
+ } catch (error) {
1842
+ return false;
1746
1843
  }
1747
1844
  };
1748
1845
 
1749
- export { CustomButton, OrchestratorPageTemplate, defaultOrchestratorTheme };
1846
+ var isConstructorLegacy = function isConstructor(argument) {
1847
+ if (!isCallable$4(argument)) return false;
1848
+ switch (classof$3(argument)) {
1849
+ case 'AsyncFunction':
1850
+ case 'GeneratorFunction':
1851
+ case 'AsyncGeneratorFunction': return false;
1852
+ }
1853
+ try {
1854
+ // we can't check .prototype since constructors produced by .bind haven't it
1855
+ // `Function#toString` throws on some built-it function in some legacy engines
1856
+ // (for example, `DOMQuad` and similar in FF41-)
1857
+ return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
1858
+ } catch (error) {
1859
+ return true;
1860
+ }
1861
+ };
1862
+
1863
+ isConstructorLegacy.sham = true;
1864
+
1865
+ // `IsConstructor` abstract operation
1866
+ // https://tc39.es/ecma262/#sec-isconstructor
1867
+ var isConstructor$1 = !construct || fails$6(function () {
1868
+ var called;
1869
+ return isConstructorModern(isConstructorModern.call)
1870
+ || !isConstructorModern(Object)
1871
+ || !isConstructorModern(function () { called = true; })
1872
+ || called;
1873
+ }) ? isConstructorLegacy : isConstructorModern;
1874
+
1875
+ var isConstructor = isConstructor$1;
1876
+ var tryToString$3 = tryToString$5;
1877
+
1878
+ var $TypeError$6 = TypeError;
1879
+
1880
+ // `Assert: IsConstructor(argument) is true`
1881
+ var aConstructor$1 = function (argument) {
1882
+ if (isConstructor(argument)) return argument;
1883
+ throw $TypeError$6(tryToString$3(argument) + ' is not a constructor');
1884
+ };
1885
+
1886
+ var anObject$6 = anObject$c;
1887
+ var aConstructor = aConstructor$1;
1888
+ var isNullOrUndefined$1 = isNullOrUndefined$4;
1889
+ var wellKnownSymbol$6 = wellKnownSymbol$g;
1890
+
1891
+ var SPECIES$1 = wellKnownSymbol$6('species');
1892
+
1893
+ // `SpeciesConstructor` abstract operation
1894
+ // https://tc39.es/ecma262/#sec-speciesconstructor
1895
+ var speciesConstructor$1 = function (O, defaultConstructor) {
1896
+ var C = anObject$6(O).constructor;
1897
+ var S;
1898
+ return C === undefined || isNullOrUndefined$1(S = anObject$6(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
1899
+ };
1900
+
1901
+ var NATIVE_BIND$1 = functionBindNative;
1902
+
1903
+ var FunctionPrototype = Function.prototype;
1904
+ var apply$1 = FunctionPrototype.apply;
1905
+ var call$8 = FunctionPrototype.call;
1906
+
1907
+ // eslint-disable-next-line es/no-reflect -- safe
1908
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$8.bind(apply$1) : function () {
1909
+ return call$8.apply(apply$1, arguments);
1910
+ });
1911
+
1912
+ var classofRaw = classofRaw$2;
1913
+ var uncurryThis$6 = functionUncurryThis;
1914
+
1915
+ var functionUncurryThisClause = function (fn) {
1916
+ // Nashorn bug:
1917
+ // https://github.com/zloirock/core-js/issues/1128
1918
+ // https://github.com/zloirock/core-js/issues/1130
1919
+ if (classofRaw(fn) === 'Function') return uncurryThis$6(fn);
1920
+ };
1921
+
1922
+ var uncurryThis$5 = functionUncurryThisClause;
1923
+ var aCallable$6 = aCallable$9;
1924
+ var NATIVE_BIND = functionBindNative;
1925
+
1926
+ var bind$4 = uncurryThis$5(uncurryThis$5.bind);
1927
+
1928
+ // optional / simple context binding
1929
+ var functionBindContext = function (fn, that) {
1930
+ aCallable$6(fn);
1931
+ return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
1932
+ return fn.apply(that, arguments);
1933
+ };
1934
+ };
1935
+
1936
+ var uncurryThis$4 = functionUncurryThis;
1937
+
1938
+ var arraySlice$2 = uncurryThis$4([].slice);
1939
+
1940
+ var $TypeError$5 = TypeError;
1941
+
1942
+ var validateArgumentsLength$1 = function (passed, required) {
1943
+ if (passed < required) throw $TypeError$5('Not enough arguments');
1944
+ return passed;
1945
+ };
1946
+
1947
+ var userAgent$4 = engineUserAgent;
1948
+
1949
+ // eslint-disable-next-line redos/no-vulnerable -- safe
1950
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
1951
+
1952
+ var global$6 = global$i;
1953
+ var apply = functionApply;
1954
+ var bind$3 = functionBindContext;
1955
+ var isCallable$3 = isCallable$k;
1956
+ var hasOwn$1 = hasOwnProperty_1;
1957
+ var fails$5 = fails$i;
1958
+ var html = html$2;
1959
+ var arraySlice$1 = arraySlice$2;
1960
+ var createElement = documentCreateElement$2;
1961
+ var validateArgumentsLength = validateArgumentsLength$1;
1962
+ var IS_IOS$1 = engineIsIos;
1963
+ var IS_NODE$3 = engineIsNode;
1964
+
1965
+ var set = global$6.setImmediate;
1966
+ var clear = global$6.clearImmediate;
1967
+ var process$3 = global$6.process;
1968
+ var Dispatch = global$6.Dispatch;
1969
+ var Function$1 = global$6.Function;
1970
+ var MessageChannel = global$6.MessageChannel;
1971
+ var String$1 = global$6.String;
1972
+ var counter = 0;
1973
+ var queue$2 = {};
1974
+ var ONREADYSTATECHANGE = 'onreadystatechange';
1975
+ var $location, defer, channel, port;
1976
+
1977
+ fails$5(function () {
1978
+ // Deno throws a ReferenceError on `location` access without `--location` flag
1979
+ $location = global$6.location;
1980
+ });
1981
+
1982
+ var run = function (id) {
1983
+ if (hasOwn$1(queue$2, id)) {
1984
+ var fn = queue$2[id];
1985
+ delete queue$2[id];
1986
+ fn();
1987
+ }
1988
+ };
1989
+
1990
+ var runner = function (id) {
1991
+ return function () {
1992
+ run(id);
1993
+ };
1994
+ };
1995
+
1996
+ var eventListener = function (event) {
1997
+ run(event.data);
1998
+ };
1999
+
2000
+ var globalPostMessageDefer = function (id) {
2001
+ // old engines have not location.origin
2002
+ global$6.postMessage(String$1(id), $location.protocol + '//' + $location.host);
2003
+ };
2004
+
2005
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
2006
+ if (!set || !clear) {
2007
+ set = function setImmediate(handler) {
2008
+ validateArgumentsLength(arguments.length, 1);
2009
+ var fn = isCallable$3(handler) ? handler : Function$1(handler);
2010
+ var args = arraySlice$1(arguments, 1);
2011
+ queue$2[++counter] = function () {
2012
+ apply(fn, undefined, args);
2013
+ };
2014
+ defer(counter);
2015
+ return counter;
2016
+ };
2017
+ clear = function clearImmediate(id) {
2018
+ delete queue$2[id];
2019
+ };
2020
+ // Node.js 0.8-
2021
+ if (IS_NODE$3) {
2022
+ defer = function (id) {
2023
+ process$3.nextTick(runner(id));
2024
+ };
2025
+ // Sphere (JS game engine) Dispatch API
2026
+ } else if (Dispatch && Dispatch.now) {
2027
+ defer = function (id) {
2028
+ Dispatch.now(runner(id));
2029
+ };
2030
+ // Browsers with MessageChannel, includes WebWorkers
2031
+ // except iOS - https://github.com/zloirock/core-js/issues/624
2032
+ } else if (MessageChannel && !IS_IOS$1) {
2033
+ channel = new MessageChannel();
2034
+ port = channel.port2;
2035
+ channel.port1.onmessage = eventListener;
2036
+ defer = bind$3(port.postMessage, port);
2037
+ // Browsers with postMessage, skip WebWorkers
2038
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
2039
+ } else if (
2040
+ global$6.addEventListener &&
2041
+ isCallable$3(global$6.postMessage) &&
2042
+ !global$6.importScripts &&
2043
+ $location && $location.protocol !== 'file:' &&
2044
+ !fails$5(globalPostMessageDefer)
2045
+ ) {
2046
+ defer = globalPostMessageDefer;
2047
+ global$6.addEventListener('message', eventListener, false);
2048
+ // IE8-
2049
+ } else if (ONREADYSTATECHANGE in createElement('script')) {
2050
+ defer = function (id) {
2051
+ html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
2052
+ html.removeChild(this);
2053
+ run(id);
2054
+ };
2055
+ };
2056
+ // Rest old browsers
2057
+ } else {
2058
+ defer = function (id) {
2059
+ setTimeout(runner(id), 0);
2060
+ };
2061
+ }
2062
+ }
2063
+
2064
+ var task$1 = {
2065
+ set: set,
2066
+ clear: clear
2067
+ };
2068
+
2069
+ var Queue$2 = function () {
2070
+ this.head = null;
2071
+ this.tail = null;
2072
+ };
2073
+
2074
+ Queue$2.prototype = {
2075
+ add: function (item) {
2076
+ var entry = { item: item, next: null };
2077
+ var tail = this.tail;
2078
+ if (tail) tail.next = entry;
2079
+ else this.head = entry;
2080
+ this.tail = entry;
2081
+ },
2082
+ get: function () {
2083
+ var entry = this.head;
2084
+ if (entry) {
2085
+ var next = this.head = entry.next;
2086
+ if (next === null) this.tail = null;
2087
+ return entry.item;
2088
+ }
2089
+ }
2090
+ };
2091
+
2092
+ var queue$1 = Queue$2;
2093
+
2094
+ var userAgent$3 = engineUserAgent;
2095
+
2096
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && typeof Pebble != 'undefined';
2097
+
2098
+ var userAgent$2 = engineUserAgent;
2099
+
2100
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
2101
+
2102
+ var global$5 = global$i;
2103
+ var bind$2 = functionBindContext;
2104
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
2105
+ var macrotask = task$1.set;
2106
+ var Queue$1 = queue$1;
2107
+ var IS_IOS = engineIsIos;
2108
+ var IS_IOS_PEBBLE = engineIsIosPebble;
2109
+ var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
2110
+ var IS_NODE$2 = engineIsNode;
2111
+
2112
+ var MutationObserver = global$5.MutationObserver || global$5.WebKitMutationObserver;
2113
+ var document$2 = global$5.document;
2114
+ var process$2 = global$5.process;
2115
+ var Promise$1 = global$5.Promise;
2116
+ // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
2117
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$5, 'queueMicrotask');
2118
+ var microtask$1 = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
2119
+ var notify$1, toggle, node, promise, then;
2120
+
2121
+ // modern engines have queueMicrotask method
2122
+ if (!microtask$1) {
2123
+ var queue = new Queue$1();
2124
+
2125
+ var flush = function () {
2126
+ var parent, fn;
2127
+ if (IS_NODE$2 && (parent = process$2.domain)) parent.exit();
2128
+ while (fn = queue.get()) try {
2129
+ fn();
2130
+ } catch (error) {
2131
+ if (queue.head) notify$1();
2132
+ throw error;
2133
+ }
2134
+ if (parent) parent.enter();
2135
+ };
2136
+
2137
+ // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
2138
+ // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
2139
+ if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
2140
+ toggle = true;
2141
+ node = document$2.createTextNode('');
2142
+ new MutationObserver(flush).observe(node, { characterData: true });
2143
+ notify$1 = function () {
2144
+ node.data = toggle = !toggle;
2145
+ };
2146
+ // environments with maybe non-completely correct, but existent Promise
2147
+ } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
2148
+ // Promise.resolve without an argument throws an error in LG WebOS 2
2149
+ promise = Promise$1.resolve(undefined);
2150
+ // workaround of WebKit ~ iOS Safari 10.1 bug
2151
+ promise.constructor = Promise$1;
2152
+ then = bind$2(promise.then, promise);
2153
+ notify$1 = function () {
2154
+ then(flush);
2155
+ };
2156
+ // Node.js without promises
2157
+ } else if (IS_NODE$2) {
2158
+ notify$1 = function () {
2159
+ process$2.nextTick(flush);
2160
+ };
2161
+ // for other environments - macrotask based on:
2162
+ // - setImmediate
2163
+ // - MessageChannel
2164
+ // - window.postMessage
2165
+ // - onreadystatechange
2166
+ // - setTimeout
2167
+ } else {
2168
+ // `webpack` dev server bug on IE global methods - use bind(fn, global)
2169
+ macrotask = bind$2(macrotask, global$5);
2170
+ notify$1 = function () {
2171
+ macrotask(flush);
2172
+ };
2173
+ }
2174
+
2175
+ microtask$1 = function (fn) {
2176
+ if (!queue.head) notify$1();
2177
+ queue.add(fn);
2178
+ };
2179
+ }
2180
+
2181
+ var microtask_1 = microtask$1;
2182
+
2183
+ var hostReportErrors$1 = function (a, b) {
2184
+ try {
2185
+ // eslint-disable-next-line no-console -- safe
2186
+ arguments.length == 1 ? console.error(a) : console.error(a, b);
2187
+ } catch (error) { /* empty */ }
2188
+ };
2189
+
2190
+ var perform$3 = function (exec) {
2191
+ try {
2192
+ return { error: false, value: exec() };
2193
+ } catch (error) {
2194
+ return { error: true, value: error };
2195
+ }
2196
+ };
2197
+
2198
+ var global$4 = global$i;
2199
+
2200
+ var promiseNativeConstructor = global$4.Promise;
2201
+
2202
+ /* global Deno -- Deno case */
2203
+
2204
+ var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
2205
+
2206
+ var IS_DENO$1 = engineIsDeno;
2207
+ var IS_NODE$1 = engineIsNode;
2208
+
2209
+ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
2210
+ && typeof window == 'object'
2211
+ && typeof document == 'object';
2212
+
2213
+ var global$3 = global$i;
2214
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
2215
+ var isCallable$2 = isCallable$k;
2216
+ var isForced = isForced_1;
2217
+ var inspectSource = inspectSource$3;
2218
+ var wellKnownSymbol$5 = wellKnownSymbol$g;
2219
+ var IS_BROWSER = engineIsBrowser;
2220
+ var IS_DENO = engineIsDeno;
2221
+ var V8_VERSION = engineV8Version;
2222
+
2223
+ NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
2224
+ var SPECIES = wellKnownSymbol$5('species');
2225
+ var SUBCLASSING = false;
2226
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$3.PromiseRejectionEvent);
2227
+
2228
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
2229
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
2230
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
2231
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
2232
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
2233
+ // We can't detect it synchronously, so just check versions
2234
+ if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
2235
+ // We can't use @@species feature detection in V8 since it causes
2236
+ // deoptimization and performance degradation
2237
+ // https://github.com/zloirock/core-js/issues/679
2238
+ if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
2239
+ // Detect correctness of subclassing with @@species support
2240
+ var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
2241
+ var FakePromise = function (exec) {
2242
+ exec(function () { /* empty */ }, function () { /* empty */ });
2243
+ };
2244
+ var constructor = promise.constructor = {};
2245
+ constructor[SPECIES] = FakePromise;
2246
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
2247
+ if (!SUBCLASSING) return true;
2248
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
2249
+ } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
2250
+ });
2251
+
2252
+ var promiseConstructorDetection = {
2253
+ CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
2254
+ REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
2255
+ SUBCLASSING: SUBCLASSING
2256
+ };
2257
+
2258
+ var newPromiseCapability$2 = {};
2259
+
2260
+ var aCallable$5 = aCallable$9;
2261
+
2262
+ var $TypeError$4 = TypeError;
2263
+
2264
+ var PromiseCapability = function (C) {
2265
+ var resolve, reject;
2266
+ this.promise = new C(function ($$resolve, $$reject) {
2267
+ if (resolve !== undefined || reject !== undefined) throw $TypeError$4('Bad Promise constructor');
2268
+ resolve = $$resolve;
2269
+ reject = $$reject;
2270
+ });
2271
+ this.resolve = aCallable$5(resolve);
2272
+ this.reject = aCallable$5(reject);
2273
+ };
2274
+
2275
+ // `NewPromiseCapability` abstract operation
2276
+ // https://tc39.es/ecma262/#sec-newpromisecapability
2277
+ newPromiseCapability$2.f = function (C) {
2278
+ return new PromiseCapability(C);
2279
+ };
2280
+
2281
+ var $$9 = _export;
2282
+ var IS_NODE = engineIsNode;
2283
+ var global$2 = global$i;
2284
+ var call$7 = functionCall;
2285
+ var defineBuiltIn$2 = defineBuiltIn$6;
2286
+ var setPrototypeOf = objectSetPrototypeOf;
2287
+ var setToStringTag = setToStringTag$3;
2288
+ var setSpecies = setSpecies$1;
2289
+ var aCallable$4 = aCallable$9;
2290
+ var isCallable$1 = isCallable$k;
2291
+ var isObject$2 = isObject$9;
2292
+ var anInstance = anInstance$1;
2293
+ var speciesConstructor = speciesConstructor$1;
2294
+ var task = task$1.set;
2295
+ var microtask = microtask_1;
2296
+ var hostReportErrors = hostReportErrors$1;
2297
+ var perform$2 = perform$3;
2298
+ var Queue = queue$1;
2299
+ var InternalStateModule = internalState;
2300
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
2301
+ var PromiseConstructorDetection = promiseConstructorDetection;
2302
+ var newPromiseCapabilityModule$3 = newPromiseCapability$2;
2303
+
2304
+ var PROMISE = 'Promise';
2305
+ var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
2306
+ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
2307
+ var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
2308
+ var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
2309
+ var setInternalState = InternalStateModule.set;
2310
+ var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
2311
+ var PromiseConstructor = NativePromiseConstructor$2;
2312
+ var PromisePrototype = NativePromisePrototype$1;
2313
+ var TypeError$1 = global$2.TypeError;
2314
+ var document$1 = global$2.document;
2315
+ var process$1 = global$2.process;
2316
+ var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
2317
+ var newGenericPromiseCapability = newPromiseCapability$1;
2318
+
2319
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$2.dispatchEvent);
2320
+ var UNHANDLED_REJECTION = 'unhandledrejection';
2321
+ var REJECTION_HANDLED = 'rejectionhandled';
2322
+ var PENDING = 0;
2323
+ var FULFILLED = 1;
2324
+ var REJECTED = 2;
2325
+ var HANDLED = 1;
2326
+ var UNHANDLED = 2;
2327
+
2328
+ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
2329
+
2330
+ // helpers
2331
+ var isThenable = function (it) {
2332
+ var then;
2333
+ return isObject$2(it) && isCallable$1(then = it.then) ? then : false;
2334
+ };
2335
+
2336
+ var callReaction = function (reaction, state) {
2337
+ var value = state.value;
2338
+ var ok = state.state == FULFILLED;
2339
+ var handler = ok ? reaction.ok : reaction.fail;
2340
+ var resolve = reaction.resolve;
2341
+ var reject = reaction.reject;
2342
+ var domain = reaction.domain;
2343
+ var result, then, exited;
2344
+ try {
2345
+ if (handler) {
2346
+ if (!ok) {
2347
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
2348
+ state.rejection = HANDLED;
2349
+ }
2350
+ if (handler === true) result = value;
2351
+ else {
2352
+ if (domain) domain.enter();
2353
+ result = handler(value); // can throw
2354
+ if (domain) {
2355
+ domain.exit();
2356
+ exited = true;
2357
+ }
2358
+ }
2359
+ if (result === reaction.promise) {
2360
+ reject(TypeError$1('Promise-chain cycle'));
2361
+ } else if (then = isThenable(result)) {
2362
+ call$7(then, result, resolve, reject);
2363
+ } else resolve(result);
2364
+ } else reject(value);
2365
+ } catch (error) {
2366
+ if (domain && !exited) domain.exit();
2367
+ reject(error);
2368
+ }
2369
+ };
2370
+
2371
+ var notify = function (state, isReject) {
2372
+ if (state.notified) return;
2373
+ state.notified = true;
2374
+ microtask(function () {
2375
+ var reactions = state.reactions;
2376
+ var reaction;
2377
+ while (reaction = reactions.get()) {
2378
+ callReaction(reaction, state);
2379
+ }
2380
+ state.notified = false;
2381
+ if (isReject && !state.rejection) onUnhandled(state);
2382
+ });
2383
+ };
2384
+
2385
+ var dispatchEvent = function (name, promise, reason) {
2386
+ var event, handler;
2387
+ if (DISPATCH_EVENT) {
2388
+ event = document$1.createEvent('Event');
2389
+ event.promise = promise;
2390
+ event.reason = reason;
2391
+ event.initEvent(name, false, true);
2392
+ global$2.dispatchEvent(event);
2393
+ } else event = { promise: promise, reason: reason };
2394
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$2['on' + name])) handler(event);
2395
+ else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
2396
+ };
2397
+
2398
+ var onUnhandled = function (state) {
2399
+ call$7(task, global$2, function () {
2400
+ var promise = state.facade;
2401
+ var value = state.value;
2402
+ var IS_UNHANDLED = isUnhandled(state);
2403
+ var result;
2404
+ if (IS_UNHANDLED) {
2405
+ result = perform$2(function () {
2406
+ if (IS_NODE) {
2407
+ process$1.emit('unhandledRejection', value, promise);
2408
+ } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
2409
+ });
2410
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
2411
+ state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
2412
+ if (result.error) throw result.value;
2413
+ }
2414
+ });
2415
+ };
2416
+
2417
+ var isUnhandled = function (state) {
2418
+ return state.rejection !== HANDLED && !state.parent;
2419
+ };
2420
+
2421
+ var onHandleUnhandled = function (state) {
2422
+ call$7(task, global$2, function () {
2423
+ var promise = state.facade;
2424
+ if (IS_NODE) {
2425
+ process$1.emit('rejectionHandled', promise);
2426
+ } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
2427
+ });
2428
+ };
2429
+
2430
+ var bind$1 = function (fn, state, unwrap) {
2431
+ return function (value) {
2432
+ fn(state, value, unwrap);
2433
+ };
2434
+ };
2435
+
2436
+ var internalReject = function (state, value, unwrap) {
2437
+ if (state.done) return;
2438
+ state.done = true;
2439
+ if (unwrap) state = unwrap;
2440
+ state.value = value;
2441
+ state.state = REJECTED;
2442
+ notify(state, true);
2443
+ };
2444
+
2445
+ var internalResolve = function (state, value, unwrap) {
2446
+ if (state.done) return;
2447
+ state.done = true;
2448
+ if (unwrap) state = unwrap;
2449
+ try {
2450
+ if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
2451
+ var then = isThenable(value);
2452
+ if (then) {
2453
+ microtask(function () {
2454
+ var wrapper = { done: false };
2455
+ try {
2456
+ call$7(then, value,
2457
+ bind$1(internalResolve, wrapper, state),
2458
+ bind$1(internalReject, wrapper, state)
2459
+ );
2460
+ } catch (error) {
2461
+ internalReject(wrapper, error, state);
2462
+ }
2463
+ });
2464
+ } else {
2465
+ state.value = value;
2466
+ state.state = FULFILLED;
2467
+ notify(state, false);
2468
+ }
2469
+ } catch (error) {
2470
+ internalReject({ done: false }, error, state);
2471
+ }
2472
+ };
2473
+
2474
+ // constructor polyfill
2475
+ if (FORCED_PROMISE_CONSTRUCTOR$4) {
2476
+ // 25.4.3.1 Promise(executor)
2477
+ PromiseConstructor = function Promise(executor) {
2478
+ anInstance(this, PromisePrototype);
2479
+ aCallable$4(executor);
2480
+ call$7(Internal, this);
2481
+ var state = getInternalPromiseState(this);
2482
+ try {
2483
+ executor(bind$1(internalResolve, state), bind$1(internalReject, state));
2484
+ } catch (error) {
2485
+ internalReject(state, error);
2486
+ }
2487
+ };
2488
+
2489
+ PromisePrototype = PromiseConstructor.prototype;
2490
+
2491
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
2492
+ Internal = function Promise(executor) {
2493
+ setInternalState(this, {
2494
+ type: PROMISE,
2495
+ done: false,
2496
+ notified: false,
2497
+ parent: false,
2498
+ reactions: new Queue(),
2499
+ rejection: false,
2500
+ state: PENDING,
2501
+ value: undefined
2502
+ });
2503
+ };
2504
+
2505
+ // `Promise.prototype.then` method
2506
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
2507
+ Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
2508
+ var state = getInternalPromiseState(this);
2509
+ var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
2510
+ state.parent = true;
2511
+ reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
2512
+ reaction.fail = isCallable$1(onRejected) && onRejected;
2513
+ reaction.domain = IS_NODE ? process$1.domain : undefined;
2514
+ if (state.state == PENDING) state.reactions.add(reaction);
2515
+ else microtask(function () {
2516
+ callReaction(reaction, state);
2517
+ });
2518
+ return reaction.promise;
2519
+ });
2520
+
2521
+ OwnPromiseCapability = function () {
2522
+ var promise = new Internal();
2523
+ var state = getInternalPromiseState(promise);
2524
+ this.promise = promise;
2525
+ this.resolve = bind$1(internalResolve, state);
2526
+ this.reject = bind$1(internalReject, state);
2527
+ };
2528
+
2529
+ newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
2530
+ return C === PromiseConstructor || C === PromiseWrapper
2531
+ ? new OwnPromiseCapability(C)
2532
+ : newGenericPromiseCapability(C);
2533
+ };
2534
+
2535
+ if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
2536
+ nativeThen = NativePromisePrototype$1.then;
2537
+
2538
+ if (!NATIVE_PROMISE_SUBCLASSING) {
2539
+ // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
2540
+ defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
2541
+ var that = this;
2542
+ return new PromiseConstructor(function (resolve, reject) {
2543
+ call$7(nativeThen, that, resolve, reject);
2544
+ }).then(onFulfilled, onRejected);
2545
+ // https://github.com/zloirock/core-js/issues/640
2546
+ }, { unsafe: true });
2547
+ }
2548
+
2549
+ // make `.constructor === Promise` work for native promise-based APIs
2550
+ try {
2551
+ delete NativePromisePrototype$1.constructor;
2552
+ } catch (error) { /* empty */ }
2553
+
2554
+ // make `instanceof Promise` work for native promise-based APIs
2555
+ if (setPrototypeOf) {
2556
+ setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
2557
+ }
2558
+ }
2559
+ }
2560
+
2561
+ $$9({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
2562
+ Promise: PromiseConstructor
2563
+ });
2564
+
2565
+ setToStringTag(PromiseConstructor, PROMISE, false);
2566
+ setSpecies(PROMISE);
2567
+
2568
+ var wellKnownSymbol$4 = wellKnownSymbol$g;
2569
+ var Iterators$1 = iterators;
2570
+
2571
+ var ITERATOR$3 = wellKnownSymbol$4('iterator');
2572
+ var ArrayPrototype = Array.prototype;
2573
+
2574
+ // check on default Array iterator
2575
+ var isArrayIteratorMethod$1 = function (it) {
2576
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$3] === it);
2577
+ };
2578
+
2579
+ var classof$2 = classof$4;
2580
+ var getMethod$1 = getMethod$3;
2581
+ var isNullOrUndefined = isNullOrUndefined$4;
2582
+ var Iterators = iterators;
2583
+ var wellKnownSymbol$3 = wellKnownSymbol$g;
2584
+
2585
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
2586
+
2587
+ var getIteratorMethod$2 = function (it) {
2588
+ if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2)
2589
+ || getMethod$1(it, '@@iterator')
2590
+ || Iterators[classof$2(it)];
2591
+ };
2592
+
2593
+ var call$6 = functionCall;
2594
+ var aCallable$3 = aCallable$9;
2595
+ var anObject$5 = anObject$c;
2596
+ var tryToString$2 = tryToString$5;
2597
+ var getIteratorMethod$1 = getIteratorMethod$2;
2598
+
2599
+ var $TypeError$3 = TypeError;
2600
+
2601
+ var getIterator$1 = function (argument, usingIterator) {
2602
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
2603
+ if (aCallable$3(iteratorMethod)) return anObject$5(call$6(iteratorMethod, argument));
2604
+ throw $TypeError$3(tryToString$2(argument) + ' is not iterable');
2605
+ };
2606
+
2607
+ var call$5 = functionCall;
2608
+ var anObject$4 = anObject$c;
2609
+ var getMethod = getMethod$3;
2610
+
2611
+ var iteratorClose$1 = function (iterator, kind, value) {
2612
+ var innerResult, innerError;
2613
+ anObject$4(iterator);
2614
+ try {
2615
+ innerResult = getMethod(iterator, 'return');
2616
+ if (!innerResult) {
2617
+ if (kind === 'throw') throw value;
2618
+ return value;
2619
+ }
2620
+ innerResult = call$5(innerResult, iterator);
2621
+ } catch (error) {
2622
+ innerError = true;
2623
+ innerResult = error;
2624
+ }
2625
+ if (kind === 'throw') throw value;
2626
+ if (innerError) throw innerResult;
2627
+ anObject$4(innerResult);
2628
+ return value;
2629
+ };
2630
+
2631
+ var bind = functionBindContext;
2632
+ var call$4 = functionCall;
2633
+ var anObject$3 = anObject$c;
2634
+ var tryToString$1 = tryToString$5;
2635
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
2636
+ var lengthOfArrayLike$2 = lengthOfArrayLike$4;
2637
+ var isPrototypeOf$1 = objectIsPrototypeOf;
2638
+ var getIterator = getIterator$1;
2639
+ var getIteratorMethod = getIteratorMethod$2;
2640
+ var iteratorClose = iteratorClose$1;
2641
+
2642
+ var $TypeError$2 = TypeError;
2643
+
2644
+ var Result = function (stopped, result) {
2645
+ this.stopped = stopped;
2646
+ this.result = result;
2647
+ };
2648
+
2649
+ var ResultPrototype = Result.prototype;
2650
+
2651
+ var iterate$2 = function (iterable, unboundFunction, options) {
2652
+ var that = options && options.that;
2653
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2654
+ var IS_RECORD = !!(options && options.IS_RECORD);
2655
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2656
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
2657
+ var fn = bind(unboundFunction, that);
2658
+ var iterator, iterFn, index, length, result, next, step;
2659
+
2660
+ var stop = function (condition) {
2661
+ if (iterator) iteratorClose(iterator, 'normal', condition);
2662
+ return new Result(true, condition);
2663
+ };
2664
+
2665
+ var callFn = function (value) {
2666
+ if (AS_ENTRIES) {
2667
+ anObject$3(value);
2668
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2669
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
2670
+ };
2671
+
2672
+ if (IS_RECORD) {
2673
+ iterator = iterable.iterator;
2674
+ } else if (IS_ITERATOR) {
2675
+ iterator = iterable;
2676
+ } else {
2677
+ iterFn = getIteratorMethod(iterable);
2678
+ if (!iterFn) throw $TypeError$2(tryToString$1(iterable) + ' is not iterable');
2679
+ // optimisation for array iterators
2680
+ if (isArrayIteratorMethod(iterFn)) {
2681
+ for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
2682
+ result = callFn(iterable[index]);
2683
+ if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
2684
+ } return new Result(false);
2685
+ }
2686
+ iterator = getIterator(iterable, iterFn);
2687
+ }
2688
+
2689
+ next = IS_RECORD ? iterable.next : iterator.next;
2690
+ while (!(step = call$4(next, iterator)).done) {
2691
+ try {
2692
+ result = callFn(step.value);
2693
+ } catch (error) {
2694
+ iteratorClose(iterator, 'throw', error);
2695
+ }
2696
+ if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
2697
+ } return new Result(false);
2698
+ };
2699
+
2700
+ var wellKnownSymbol$2 = wellKnownSymbol$g;
2701
+
2702
+ var ITERATOR$1 = wellKnownSymbol$2('iterator');
2703
+ var SAFE_CLOSING = false;
2704
+
2705
+ try {
2706
+ var called = 0;
2707
+ var iteratorWithReturn = {
2708
+ next: function () {
2709
+ return { done: !!called++ };
2710
+ },
2711
+ 'return': function () {
2712
+ SAFE_CLOSING = true;
2713
+ }
2714
+ };
2715
+ iteratorWithReturn[ITERATOR$1] = function () {
2716
+ return this;
2717
+ };
2718
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2719
+ Array.from(iteratorWithReturn, function () { throw 2; });
2720
+ } catch (error) { /* empty */ }
2721
+
2722
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2723
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2724
+ var ITERATION_SUPPORT = false;
2725
+ try {
2726
+ var object = {};
2727
+ object[ITERATOR$1] = function () {
2728
+ return {
2729
+ next: function () {
2730
+ return { done: ITERATION_SUPPORT = true };
2731
+ }
2732
+ };
2733
+ };
2734
+ exec(object);
2735
+ } catch (error) { /* empty */ }
2736
+ return ITERATION_SUPPORT;
2737
+ };
2738
+
2739
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
2740
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2741
+ var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2742
+
2743
+ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2744
+ NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2745
+ });
2746
+
2747
+ var $$8 = _export;
2748
+ var call$3 = functionCall;
2749
+ var aCallable$2 = aCallable$9;
2750
+ var newPromiseCapabilityModule$2 = newPromiseCapability$2;
2751
+ var perform$1 = perform$3;
2752
+ var iterate$1 = iterate$2;
2753
+ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2754
+
2755
+ // `Promise.all` method
2756
+ // https://tc39.es/ecma262/#sec-promise.all
2757
+ $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2758
+ all: function all(iterable) {
2759
+ var C = this;
2760
+ var capability = newPromiseCapabilityModule$2.f(C);
2761
+ var resolve = capability.resolve;
2762
+ var reject = capability.reject;
2763
+ var result = perform$1(function () {
2764
+ var $promiseResolve = aCallable$2(C.resolve);
2765
+ var values = [];
2766
+ var counter = 0;
2767
+ var remaining = 1;
2768
+ iterate$1(iterable, function (promise) {
2769
+ var index = counter++;
2770
+ var alreadyCalled = false;
2771
+ remaining++;
2772
+ call$3($promiseResolve, C, promise).then(function (value) {
2773
+ if (alreadyCalled) return;
2774
+ alreadyCalled = true;
2775
+ values[index] = value;
2776
+ --remaining || resolve(values);
2777
+ }, reject);
2778
+ });
2779
+ --remaining || resolve(values);
2780
+ });
2781
+ if (result.error) reject(result.value);
2782
+ return capability.promise;
2783
+ }
2784
+ });
2785
+
2786
+ var $$7 = _export;
2787
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2788
+ var NativePromiseConstructor = promiseNativeConstructor;
2789
+ var getBuiltIn$1 = getBuiltIn$7;
2790
+ var isCallable = isCallable$k;
2791
+ var defineBuiltIn$1 = defineBuiltIn$6;
2792
+
2793
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2794
+
2795
+ // `Promise.prototype.catch` method
2796
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
2797
+ $$7({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2798
+ 'catch': function (onRejected) {
2799
+ return this.then(undefined, onRejected);
2800
+ }
2801
+ });
2802
+
2803
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2804
+ if (isCallable(NativePromiseConstructor)) {
2805
+ var method = getBuiltIn$1('Promise').prototype['catch'];
2806
+ if (NativePromisePrototype['catch'] !== method) {
2807
+ defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
2808
+ }
2809
+ }
2810
+
2811
+ var $$6 = _export;
2812
+ var call$2 = functionCall;
2813
+ var aCallable$1 = aCallable$9;
2814
+ var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2815
+ var perform = perform$3;
2816
+ var iterate = iterate$2;
2817
+ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2818
+
2819
+ // `Promise.race` method
2820
+ // https://tc39.es/ecma262/#sec-promise.race
2821
+ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2822
+ race: function race(iterable) {
2823
+ var C = this;
2824
+ var capability = newPromiseCapabilityModule$1.f(C);
2825
+ var reject = capability.reject;
2826
+ var result = perform(function () {
2827
+ var $promiseResolve = aCallable$1(C.resolve);
2828
+ iterate(iterable, function (promise) {
2829
+ call$2($promiseResolve, C, promise).then(capability.resolve, reject);
2830
+ });
2831
+ });
2832
+ if (result.error) reject(result.value);
2833
+ return capability.promise;
2834
+ }
2835
+ });
2836
+
2837
+ var $$5 = _export;
2838
+ var call$1 = functionCall;
2839
+ var newPromiseCapabilityModule = newPromiseCapability$2;
2840
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2841
+
2842
+ // `Promise.reject` method
2843
+ // https://tc39.es/ecma262/#sec-promise.reject
2844
+ $$5({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2845
+ reject: function reject(r) {
2846
+ var capability = newPromiseCapabilityModule.f(this);
2847
+ call$1(capability.reject, undefined, r);
2848
+ return capability.promise;
2849
+ }
2850
+ });
2851
+
2852
+ var anObject$2 = anObject$c;
2853
+ var isObject$1 = isObject$9;
2854
+ var newPromiseCapability = newPromiseCapability$2;
2855
+
2856
+ var promiseResolve$1 = function (C, x) {
2857
+ anObject$2(C);
2858
+ if (isObject$1(x) && x.constructor === C) return x;
2859
+ var promiseCapability = newPromiseCapability.f(C);
2860
+ var resolve = promiseCapability.resolve;
2861
+ resolve(x);
2862
+ return promiseCapability.promise;
2863
+ };
2864
+
2865
+ var $$4 = _export;
2866
+ var getBuiltIn = getBuiltIn$7;
2867
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2868
+ var promiseResolve = promiseResolve$1;
2869
+
2870
+ getBuiltIn('Promise');
2871
+
2872
+ // `Promise.resolve` method
2873
+ // https://tc39.es/ecma262/#sec-promise.resolve
2874
+ $$4({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2875
+ resolve: function resolve(x) {
2876
+ return promiseResolve(this, x);
2877
+ }
2878
+ });
2879
+
2880
+ const useEngineStatusQuery = () => {
2881
+ const {
2882
+ engineStatusEndpoint
2883
+ } = useContext(OrchestratorConfigContext);
2884
+ const fetchEngineStatus = () => __awaiter(void 0, void 0, void 0, function* () {
2885
+ const response = yield fetch(engineStatusEndpoint, {
2886
+ method: 'GET'
2887
+ });
2888
+ return yield response.json();
2889
+ });
2890
+ return useQuery('engineStatus', fetchEngineStatus);
2891
+ };
2892
+
2893
+ const useOrchestratorTheme = () => {
2894
+ const {
2895
+ euiTheme
2896
+ } = useEuiTheme();
2897
+ const baseUnit = euiTheme.base;
2898
+ const multiplyByBaseUnit = multiplier => baseUnit * multiplier;
2899
+ const toSecondaryColor = color => tint(color, 0.8);
2900
+ return {
2901
+ theme: euiTheme,
2902
+ multiplyByBaseUnit,
2903
+ toSecondaryColor
2904
+ };
2905
+ };
2906
+
2907
+ var ProcessStatus;
2908
+ (function (ProcessStatus) {
2909
+ ProcessStatus["CREATED"] = "created";
2910
+ ProcessStatus["RUNNING"] = "running";
2911
+ ProcessStatus["SUSPENDED"] = "suspended";
2912
+ ProcessStatus["WAITING"] = "waiting";
2913
+ ProcessStatus["ABORTED"] = "aborted";
2914
+ ProcessStatus["FAILED"] = "failed";
2915
+ ProcessStatus["API_UNAVAILABLE"] = "api_unavailable";
2916
+ ProcessStatus["INCONSISTENT_DATA"] = "inconsistent_data";
2917
+ ProcessStatus["COMPLETED"] = "completed";
2918
+ })(ProcessStatus || (ProcessStatus = {}));
2919
+ const useProcessStatusCountsQuery = () => {
2920
+ const {
2921
+ processStatusCountsEndpoint
2922
+ } = useContext(OrchestratorConfigContext);
2923
+ const fetchProcessStatusCounts = () => __awaiter(void 0, void 0, void 0, function* () {
2924
+ const response = yield fetch(processStatusCountsEndpoint, {
2925
+ method: 'GET'
2926
+ });
2927
+ return yield response.json();
2928
+ });
2929
+ return useQuery('processStatusCounts', fetchProcessStatusCounts);
2930
+ };
2931
+
2932
+ function getFavouriteSubscriptions(apiUrl) {
2933
+ return __awaiter(this, void 0, void 0, function* () {
2934
+ console.log('api url', apiUrl);
2935
+ const response = yield fetch(apiUrl + '/subscriptions/?range=10%2C15');
2936
+ return yield response.json();
2937
+ });
2938
+ }
2939
+ function getProcessesNeedingAttention(apiUrl) {
2940
+ return __awaiter(this, void 0, void 0, function* () {
2941
+ const response = yield fetch(apiUrl + '/processes/?range=100%2C105');
2942
+ return yield response.json();
2943
+ });
2944
+ }
2945
+ function getRecentProcesses(apiUrl) {
2946
+ return __awaiter(this, void 0, void 0, function* () {
2947
+ const response = yield fetch(apiUrl + '/processes/?range=106%2C111');
2948
+ return yield response.json();
2949
+ });
2950
+ }
2951
+ const useFavouriteSubscriptions = () => {
2952
+ const {
2953
+ orchestratorApiBaseUrl
2954
+ } = useContext(OrchestratorConfigContext);
2955
+ const {
2956
+ data,
2957
+ isLoading
2958
+ } = useQuery(['favouriteSubscriptions'], () => getFavouriteSubscriptions(orchestratorApiBaseUrl));
2959
+ const initialData = {
2960
+ buttonName: 'Show all favourites',
2961
+ items: [],
2962
+ title: 'Favourite Subscriptions',
2963
+ type: 'subscription'
2964
+ };
2965
+ return isLoading ? initialData : Object.assign(Object.assign({}, initialData), {
2966
+ items: data
2967
+ });
2968
+ };
2969
+ const useProcessesAttention = () => {
2970
+ const {
2971
+ orchestratorApiBaseUrl
2972
+ } = useContext(OrchestratorConfigContext);
2973
+ const {
2974
+ data,
2975
+ isLoading
2976
+ } = useQuery(['processesAttention'], () => getProcessesNeedingAttention(orchestratorApiBaseUrl));
2977
+ const initialData = {
2978
+ type: 'process',
2979
+ title: 'Processes that need attention',
2980
+ items: [],
2981
+ buttonName: 'Show all active processes'
2982
+ };
2983
+ return isLoading ? initialData : Object.assign(Object.assign({}, initialData), {
2984
+ items: data
2985
+ });
2986
+ };
2987
+ const useRecentProcesses = () => {
2988
+ const {
2989
+ orchestratorApiBaseUrl
2990
+ } = useContext(OrchestratorConfigContext);
2991
+ const {
2992
+ data,
2993
+ isLoading
2994
+ } = useQuery(['recentProcesses'], () => getRecentProcesses(orchestratorApiBaseUrl));
2995
+ const initialData = {
2996
+ type: 'process',
2997
+ title: 'Recently completed processes',
2998
+ items: [],
2999
+ buttonName: 'Show all completed processes'
3000
+ };
3001
+ return isLoading ? initialData : Object.assign(Object.assign({}, initialData), {
3002
+ items: data
3003
+ });
3004
+ };
3005
+
3006
+ const SubscriptionStatusBadge = ({
3007
+ subscriptionStatus
3008
+ }) => {
3009
+ const {
3010
+ theme,
3011
+ toSecondaryColor
3012
+ } = useOrchestratorTheme();
3013
+ const getBadgeColorFromSubscriptionStatus = status => {
3014
+ const {
3015
+ primary,
3016
+ darkestShade,
3017
+ lightShade,
3018
+ primaryText,
3019
+ success,
3020
+ successText
3021
+ } = theme.colors;
3022
+ switch (status) {
3023
+ case 'active':
3024
+ return {
3025
+ badgeColor: toSecondaryColor(success),
3026
+ textColor: successText
3027
+ };
3028
+ case 'terminated':
3029
+ return {
3030
+ badgeColor: lightShade,
3031
+ textColor: darkestShade
3032
+ };
3033
+ default:
3034
+ return {
3035
+ badgeColor: toSecondaryColor(primary),
3036
+ textColor: primaryText
3037
+ };
3038
+ }
3039
+ };
3040
+ const {
3041
+ badgeColor,
3042
+ textColor
3043
+ } = getBadgeColorFromSubscriptionStatus(subscriptionStatus);
3044
+ return jsx(Badge, Object.assign({
3045
+ textColor: textColor,
3046
+ color: badgeColor
3047
+ }, {
3048
+ children: subscriptionStatus
3049
+ }));
3050
+ };
3051
+
3052
+ const HeaderBadge = _a => {
3053
+ var {
3054
+ children
3055
+ } = _a,
3056
+ restProps = __rest(_a, ["children"]);
3057
+ const css = restProps.iconType ? {
3058
+ height: 24,
3059
+ display: 'flex',
3060
+ paddingLeft: 0
3061
+ } : {
3062
+ height: 24,
3063
+ display: 'flex'
3064
+ };
3065
+ return jsx(Badge, Object.assign({}, restProps, {
3066
+ css: css
3067
+ }, {
3068
+ children: children
3069
+ }));
3070
+ };
3071
+
3072
+ const XCircleFill = ({
3073
+ width: _width = 24,
3074
+ height: _height = 24,
3075
+ color: _color = '#000000'
3076
+ }) => jsxs("svg", Object.assign({
3077
+ width: _width,
3078
+ height: _height,
3079
+ viewBox: "0 0 24 24",
3080
+ version: "1.1",
3081
+ xmlns: "http://www.w3.org/2000/svg"
3082
+ }, {
3083
+ children: [jsx("title", {
3084
+ children: "icon/x-circle-fill"
3085
+ }), jsx("g", Object.assign({
3086
+ id: "Symbols",
3087
+ stroke: "none",
3088
+ strokeWidth: "1",
3089
+ fill: "none",
3090
+ fillRule: "evenodd"
3091
+ }, {
3092
+ children: jsx("g", Object.assign({
3093
+ id: "icon/x-circle-fill",
3094
+ fill: _color
3095
+ }, {
3096
+ children: jsx("path", {
3097
+ d: "M12,20 C16.4183,20 20,16.4183 20,12 C20,7.58172 16.4183,4 12,4 C7.58172,4 4,7.58172 4,12 C4,16.4183 7.58172,20 12,20 Z M10.70711,9.29289 C10.31658,8.90237 9.68342,8.90237 9.29289,9.29289 C8.90237,9.68342 8.90237,10.31658 9.29289,10.70711 L10.58579,12 L9.29289,13.2929 C8.90237,13.6834 8.90237,14.3166 9.29289,14.7071 C9.68342,15.0976 10.31658,15.0976 10.70711,14.7071 L12,13.4142 L13.2929,14.7071 C13.6834,15.0976 14.3166,15.0976 14.7071,14.7071 C15.0976,14.3166 15.0976,13.6834 14.7071,13.2929 L13.4142,12 L14.7071,10.70711 C15.0976,10.31658 15.0976,9.68342 14.7071,9.29289 C14.3166,8.90237 13.6834,8.90237 13.2929,9.29289 L12,10.58579 L10.70711,9.29289 Z",
3098
+ id: "Shape"
3099
+ })
3100
+ }))
3101
+ }))]
3102
+ }));
3103
+
3104
+ const getTaskCountsSummary = processStatusCounts => {
3105
+ const failed = (processStatusCounts === null || processStatusCounts === void 0 ? void 0 : processStatusCounts.task_counts.failed) || 0;
3106
+ const inconsistentData = (processStatusCounts === null || processStatusCounts === void 0 ? void 0 : processStatusCounts.task_counts.inconsistent_data) || 0;
3107
+ const apiUnavailable = (processStatusCounts === null || processStatusCounts === void 0 ? void 0 : processStatusCounts.task_counts.api_unavailable) || 0;
3108
+ return {
3109
+ failed,
3110
+ inconsistentData,
3111
+ apiUnavailable,
3112
+ total: failed + inconsistentData + apiUnavailable
3113
+ };
3114
+ };
3115
+ const FailedTasksBadge = () => {
3116
+ const {
3117
+ theme
3118
+ } = useOrchestratorTheme();
3119
+ const {
3120
+ data: processStatusCounts
3121
+ } = useProcessStatusCountsQuery();
3122
+ const taskCountsSummary = getTaskCountsSummary(processStatusCounts);
3123
+ return jsx(EuiToolTip, Object.assign({
3124
+ position: "bottom",
3125
+ content: jsxs(Fragment, {
3126
+ children: [jsxs("div", {
3127
+ children: ["Failed: ", taskCountsSummary.failed]
3128
+ }), jsxs("div", {
3129
+ children: ["Inconsistent data: ", taskCountsSummary.inconsistentData]
3130
+ }), jsxs("div", {
3131
+ children: ["API unavailable: ", taskCountsSummary.apiUnavailable]
3132
+ })]
3133
+ })
3134
+ }, {
3135
+ children: jsx(HeaderBadge, Object.assign({
3136
+ color: theme.colors.emptyShade,
3137
+ textColor: theme.colors.shadow,
3138
+ iconType: () => jsx(XCircleFill, {
3139
+ color: theme.colors.danger
3140
+ })
3141
+ }, {
3142
+ children: taskCountsSummary.total
3143
+ }))
3144
+ }));
3145
+ };
3146
+
3147
+ const EnvironmentBadge = () => {
3148
+ const {
3149
+ environmentName
3150
+ } = useContext(OrchestratorConfigContext);
3151
+ const {
3152
+ theme,
3153
+ toSecondaryColor
3154
+ } = useOrchestratorTheme();
3155
+ if (environmentName !== Environment.PRODUCTION) {
3156
+ return jsx(HeaderBadge, Object.assign({
3157
+ color: "warning",
3158
+ textColor: theme.colors.shadow
3159
+ }, {
3160
+ children: environmentName
3161
+ }));
3162
+ }
3163
+ return jsx(HeaderBadge, Object.assign({
3164
+ color: toSecondaryColor(theme.colors.primary),
3165
+ textColor: theme.colors.primary
3166
+ }, {
3167
+ children: environmentName
3168
+ }));
3169
+ };
3170
+
3171
+ const StatusDotIcon = ({
3172
+ width: _width = 24,
3173
+ height: _height = 24,
3174
+ color: _color = '#000000'
3175
+ }) => jsxs("svg", Object.assign({
3176
+ width: _width,
3177
+ height: _height,
3178
+ viewBox: "0 0 24 24",
3179
+ version: "1.1",
3180
+ xmlns: "http://www.w3.org/2000/svg"
3181
+ }, {
3182
+ children: [jsx("title", {
3183
+ children: "icon/statusdot"
3184
+ }), jsx("g", Object.assign({
3185
+ id: "Symbols",
3186
+ stroke: "none",
3187
+ strokeWidth: "1",
3188
+ fill: "none",
3189
+ fillRule: "evenodd"
3190
+ }, {
3191
+ children: jsxs("g", Object.assign({
3192
+ id: "icon/statusdot",
3193
+ fill: _color,
3194
+ fillRule: "nonzero"
3195
+ }, {
3196
+ children: [jsx("circle", {
3197
+ id: "Oval",
3198
+ opacity: "0.25",
3199
+ cx: "12",
3200
+ cy: "12",
3201
+ r: "8"
3202
+ }), jsx("circle", {
3203
+ id: "Oval",
3204
+ cx: "12",
3205
+ cy: "12",
3206
+ r: "4"
3207
+ })]
3208
+ }))
3209
+ }))]
3210
+ }));
3211
+
3212
+ const EngineStatusBadge = () => {
3213
+ const {
3214
+ theme
3215
+ } = useOrchestratorTheme();
3216
+ const {
3217
+ data: engineStatus
3218
+ } = useEngineStatusQuery();
3219
+ const engineStatusText = (engineStatus === null || engineStatus === void 0 ? void 0 : engineStatus.global_status) ? `Engine is ${engineStatus.global_status}` : 'Engine status is unavailable';
3220
+ return jsx(HeaderBadge, Object.assign({
3221
+ color: theme.colors.emptyShade,
3222
+ textColor: theme.colors.shadow,
3223
+ iconType: () => jsx(StatusDotIcon, {
3224
+ color: theme.colors.success
3225
+ })
3226
+ }, {
3227
+ children: engineStatusText
3228
+ }));
3229
+ };
3230
+
3231
+ const LogoutIcon = ({
3232
+ width: _width = 24,
3233
+ height: _height = 24,
3234
+ color: _color = '#000000'
3235
+ }) => jsxs("svg", Object.assign({
3236
+ width: _width,
3237
+ height: _height,
3238
+ viewBox: "0 0 24 24",
3239
+ version: "1.1",
3240
+ xmlns: "http://www.w3.org/2000/svg"
3241
+ }, {
3242
+ children: [jsx("title", {
3243
+ children: "icon/logout"
3244
+ }), jsx("g", Object.assign({
3245
+ id: "Symbols",
3246
+ stroke: "none",
3247
+ strokeWidth: "1",
3248
+ fill: "none",
3249
+ fillRule: "evenodd"
3250
+ }, {
3251
+ children: jsx("g", Object.assign({
3252
+ id: "icon/logout",
3253
+ fill: _color,
3254
+ fillRule: "nonzero"
3255
+ }, {
3256
+ children: jsx("path", {
3257
+ d: "M10,3 C12.2091701,3 14,4.79085056 14,7 L14,8 C14,8.55228475 13.5522847,9 13,9 C12.4477153,9 12,8.55228475 12,8 L12,7 C12,5.8954149 11.1045954,5 10,5 L6,5 C4.89543475,5 4,5.89543475 4,7 L4,17 C4,18.1045954 4.8954149,19 6,19 L10,19 C11.1046153,19 12,18.1046153 12,17 L12,16 C12,15.4477153 12.4477153,15 13,15 C13.5522847,15 14,15.4477153 14,16 L14,17 C14,19.2091847 12.2091847,21 10,21 L6,21 C3.79085056,21 2,19.2091701 2,17 L2,7 C2,4.79086525 3.79086525,3 6,3 L10,3 Z M17.7071068,7.29289322 L21.7071068,11.2928932 L21.7485042,11.336853 L21.757,11.347 L21.787214,11.3832499 L21.779,11.374 L21.8036654,11.4046934 C21.8215099,11.4288693 21.8382813,11.453725 21.8539326,11.4793398 L21.8753288,11.5159379 C21.8862061,11.5357061 21.8966234,11.5561086 21.9063462,11.5769009 L21.9287745,11.628664 C21.9366843,11.6484208 21.9438775,11.6682023 21.9504533,11.6882636 C21.9552713,11.7031487 21.9599023,11.7185367 21.9641549,11.734007 C21.9701664,11.7555635 21.9753602,11.7772539 21.9798348,11.7992059 C21.9832978,11.8166247 21.9863719,11.834051 21.9889822,11.8515331 C21.9920328,11.8714753 21.9944666,11.892114 21.9962623,11.912935 C21.9978436,11.9317345 21.9989053,11.9497336 21.9994829,11.9677454 C21.9998183,11.9777892 22,11.9888734 22,12 L21.996384,12.0852242 L21.9889807,12.1489612 C21.9863719,12.165949 21.9832978,12.1833753 21.9797599,12.2007258 C21.9753602,12.2227461 21.9701664,12.2444365 21.964279,12.2658396 C21.9599023,12.2814633 21.9552713,12.2968513 21.9502619,12.3121425 C21.9438775,12.3317977 21.9366843,12.3515792 21.928896,12.3710585 L21.9063266,12.4232215 C21.8966234,12.4438914 21.8862061,12.4642939 21.8751242,12.484277 C21.8685012,12.4963944 21.8613931,12.5086131 21.8540045,12.5207088 C21.8382813,12.546275 21.8215099,12.5711307 21.8036865,12.5951593 L21.7870723,12.6170223 C21.7849289,12.6196628 21.7826279,12.6225624 21.7803112,12.625449 L21.7071068,12.7071068 L17.7071068,16.7071068 C17.3165825,17.0976311 16.6834175,17.0976311 16.2928932,16.7071068 C15.9023689,16.3165825 15.9023689,15.6834175 16.2928932,15.2928932 L18.585,13 L7,13 C6.44771525,13 6,12.5522847 6,12 C6,11.4477153 6.44771525,11 7,11 L18.585,11 L16.2928932,8.70710678 C15.9023689,8.31658249 15.9023689,7.68341751 16.2928932,7.29289322 C16.6834175,6.90236893 17.3165825,6.90236893 17.7071068,7.29289322 Z",
3258
+ id: "Combined-Shape"
3259
+ })
3260
+ }))
3261
+ }))]
3262
+ }));
3263
+
3264
+ const OrchestratorPageHeader = ({
3265
+ navigationHeight,
3266
+ getAppLogo,
3267
+ handleLogoutClick
3268
+ }) => {
3269
+ const {
3270
+ theme,
3271
+ multiplyByBaseUnit
3272
+ } = useOrchestratorTheme();
3273
+ return jsxs(EuiHeader, Object.assign({
3274
+ css: {
3275
+ backgroundColor: theme.colors.primary,
3276
+ height: navigationHeight
3277
+ }
3278
+ }, {
3279
+ children: [jsxs(EuiHeaderSection, {
3280
+ children: [jsx(EuiHeaderSectionItem, {
3281
+ children: jsx(EuiHeaderLogo, {
3282
+ iconType: () => getAppLogo(navigationHeight)
3283
+ })
3284
+ }), jsx(EuiHeaderSectionItem, {
3285
+ children: jsx(EnvironmentBadge, {})
3286
+ })]
3287
+ }), jsx(EuiHeaderSection, {
3288
+ children: jsxs(EuiHeaderSectionItem, {
3289
+ children: [jsxs(EuiBadgeGroup, Object.assign({
3290
+ css: {
3291
+ marginRight: multiplyByBaseUnit(2)
3292
+ }
3293
+ }, {
3294
+ children: [jsx(EngineStatusBadge, {}), jsx(FailedTasksBadge, {})]
3295
+ })), jsx(EuiButtonIcon, {
3296
+ "aria-label": "Logout",
3297
+ display: "empty",
3298
+ iconType: () => jsx(LogoutIcon, {
3299
+ color: theme.colors.emptyShade
3300
+ }),
3301
+ css: {
3302
+ width: 48,
3303
+ height: 48
3304
+ },
3305
+ color: "ghost",
3306
+ onClick: () => handleLogoutClick()
3307
+ })]
3308
+ })
3309
+ })]
3310
+ }));
3311
+ };
3312
+
3313
+ const OrchestratorSidebar = ({
3314
+ routeTo
3315
+ }) => jsx(EuiSideNav, {
3316
+ mobileTitle: "Nav Items",
3317
+ isOpenOnMobile: false,
3318
+ items: [{
3319
+ renderItem: () => jsxs(Fragment, {
3320
+ children: [jsx(EuiButton, Object.assign({
3321
+ onClick: e => {
3322
+ e.preventDefault();
3323
+ routeTo('/new-process');
3324
+ },
3325
+ iconType: "plus",
3326
+ fullWidth: true
3327
+ }, {
3328
+ children: "New Process"
3329
+ })), jsx(EuiSpacer, {
3330
+ size: "m"
3331
+ })]
3332
+ }),
3333
+ name: 'Menu',
3334
+ id: 1,
3335
+ items: [{
3336
+ name: 'Start',
3337
+ id: 2,
3338
+ onClick: e => {
3339
+ e.preventDefault();
3340
+ routeTo('/');
3341
+ },
3342
+ href: '/'
3343
+ }, {
3344
+ name: 'Subscriptions',
3345
+ id: 3,
3346
+ // TODO: NEXT router / EUI seem to cause unneeded re-renders. At least in dev mode,
3347
+ onClick: e => {
3348
+ e.preventDefault();
3349
+ routeTo('/subscriptions');
3350
+ },
3351
+ href: '/subscriptions'
3352
+ }]
3353
+ }]
3354
+ });
3355
+
3356
+ const OrchestratorPageTemplate = ({
3357
+ children,
3358
+ routeTo,
3359
+ getAppLogo
3360
+ }) => {
3361
+ const {
3362
+ theme,
3363
+ multiplyByBaseUnit
3364
+ } = useOrchestratorTheme();
3365
+ const [isSideMenuVisible, setIsSideMenuVisible] = useState(true);
3366
+ const navigationHeight = multiplyByBaseUnit(3);
3367
+ return jsxs(Fragment, {
3368
+ children: [jsx(OrchestratorPageHeader, {
3369
+ getAppLogo: getAppLogo,
3370
+ navigationHeight: navigationHeight,
3371
+ handleLogoutClick: () => setIsSideMenuVisible(!isSideMenuVisible)
3372
+ }), jsxs(EuiPageTemplate, Object.assign({
3373
+ panelled: false,
3374
+ grow: false,
3375
+ contentBorder: false,
3376
+ minHeight: `calc(100vh - ${navigationHeight}px)`,
3377
+ restrictWidth: false
3378
+ }, {
3379
+ children: [isSideMenuVisible && jsx(EuiPageTemplate.Sidebar, Object.assign({
3380
+ css: {
3381
+ backgroundColor: theme.colors.body
3382
+ }
3383
+ }, {
3384
+ children: jsx(OrchestratorSidebar, {
3385
+ routeTo: routeTo
3386
+ })
3387
+ })), jsx(EuiPageTemplate.Section, Object.assign({
3388
+ css: {
3389
+ backgroundColor: theme.colors.emptyShade
3390
+ }
3391
+ }, {
3392
+ children: children
3393
+ }))]
3394
+ }))]
3395
+ });
3396
+ };
3397
+
3398
+ const FrequentlyUsed = ({
3399
+ values
3400
+ }) => {
3401
+ return jsx(EuiFlexGroup, Object.assign({
3402
+ wrap: true,
3403
+ gutterSize: "m"
3404
+ }, {
3405
+ children: values.map((value, index) => jsx(EuiFlexItem, Object.assign({
3406
+ grow: false
3407
+ }, {
3408
+ children: jsx(EuiButton, Object.assign({
3409
+ size: "xs",
3410
+ style: {
3411
+ minWidth: 0
3412
+ }
3413
+ }, {
3414
+ children: value
3415
+ }))
3416
+ }), index))
3417
+ }));
3418
+ };
3419
+
3420
+ const ListItemStartPage = ({
3421
+ item,
3422
+ type
3423
+ }) => {
3424
+ const [hoverState, setHoverState] = useState(false);
3425
+ const renderItem = (item, type) => {
3426
+ if (type === 'subscription') {
3427
+ item = item;
3428
+ return jsxs(EuiFlexItem, {
3429
+ children: [jsx(EuiTextColor, Object.assign({
3430
+ color: hoverState ? '#397dc2' : 'black',
3431
+ style: {
3432
+ fontWeight: 500,
3433
+ transition: '0.2s'
3434
+ }
3435
+ }, {
3436
+ children: item.product.name
3437
+ })), jsx(EuiTextColor, Object.assign({
3438
+ style: {
3439
+ fontWeight: 400
3440
+ }
3441
+ }, {
3442
+ children: item.subscription_id.slice(0, 8)
3443
+ }))]
3444
+ });
3445
+ } else if (type === 'process') {
3446
+ item = item;
3447
+ const date = new Date(item.last_modified_at * 1000);
3448
+ const formattedDate = moment(date).format('DD-MM-YYYY, HH:mm');
3449
+ return jsxs(EuiFlexItem, {
3450
+ children: [jsx(EuiTextColor, Object.assign({
3451
+ color: hoverState ? '#397dc2' : 'black',
3452
+ style: {
3453
+ fontWeight: 500,
3454
+ transition: '0.2s'
3455
+ }
3456
+ }, {
3457
+ children: item.workflow
3458
+ })), jsxs(EuiTextColor, Object.assign({
3459
+ style: {
3460
+ fontWeight: 400
3461
+ }
3462
+ }, {
3463
+ children: [formattedDate, " for", ' ', jsx("span", Object.assign({
3464
+ style: {
3465
+ color: '#397dc2'
3466
+ }
3467
+ }, {
3468
+ children: "KLM"
3469
+ }))]
3470
+ }))]
3471
+ });
3472
+ }
3473
+ };
3474
+ return jsx(Link, Object.assign({
3475
+ href: `/subscriptions/${'subscription_id' in item ? item.subscription_id : ''}`
3476
+ }, {
3477
+ children: jsxs(EuiFlexGroup, Object.assign({
3478
+ style: {
3479
+ cursor: 'pointer',
3480
+ paddingBlock: 10
3481
+ },
3482
+ onMouseOver: () => setHoverState(true),
3483
+ onMouseLeave: () => setHoverState(false)
3484
+ }, {
3485
+ children: [renderItem(item, type), jsx(EuiFlexItem, Object.assign({
3486
+ grow: false,
3487
+ style: {
3488
+ display: hoverState ? 'block' : 'none'
3489
+ }
3490
+ }, {
3491
+ children: jsx(EuiIcon, {
3492
+ type: "sortRight",
3493
+ color: "primary"
3494
+ })
3495
+ }))]
3496
+ }))
3497
+ }));
3498
+ };
3499
+
3500
+ function ListStartPage({
3501
+ list
3502
+ }) {
3503
+ return list && jsx(EuiFlexItem, Object.assign({
3504
+ style: {
3505
+ minWidth: 300
3506
+ }
3507
+ }, {
3508
+ children: jsxs(EuiPanel, Object.assign({
3509
+ hasShadow: false,
3510
+ hasBorder: true,
3511
+ paddingSize: "l"
3512
+ }, {
3513
+ children: [jsx("p", Object.assign({
3514
+ style: {
3515
+ fontWeight: 600
3516
+ }
3517
+ }, {
3518
+ children: list.title
3519
+ })), jsx(EuiSpacer, {
3520
+ size: "m"
3521
+ }), list.items.map((item, index) => jsxs(Fragment, {
3522
+ children: [jsx(ListItemStartPage, {
3523
+ item: item,
3524
+ type: list.type
3525
+ }), index === list.items.length - 1 ? null : jsx(EuiHorizontalRule, {
3526
+ margin: "none"
3527
+ })]
3528
+ })), jsx(EuiSpacer, {
3529
+ size: "m"
3530
+ }), jsx(EuiButton, Object.assign({
3531
+ fullWidth: true
3532
+ }, {
3533
+ children: list.buttonName
3534
+ }))]
3535
+ }))
3536
+ }));
3537
+ }
3538
+
3539
+ const MultiListSection = () => {
3540
+ const favouriteSubscriptionsList = useFavouriteSubscriptions();
3541
+ const processesAttentionList = useProcessesAttention();
3542
+ const completedProcessesList = useRecentProcesses();
3543
+ return jsxs(EuiFlexGroup, Object.assign({
3544
+ wrap: true
3545
+ }, {
3546
+ children: [jsx(ListStartPage, {
3547
+ list: favouriteSubscriptionsList
3548
+ }), jsx(ListStartPage, {
3549
+ list: processesAttentionList
3550
+ }), jsx(ListStartPage, {
3551
+ list: completedProcessesList
3552
+ })]
3553
+ }));
3554
+ };
3555
+
3556
+ const NewProcessPanel = () => {
3557
+ const [value, setValue] = useState('');
3558
+ const onChange = e => {
3559
+ setValue(e.target.value);
3560
+ };
3561
+ const frequentlyUsedValues = ['IP Prefix', 'SN8 LightPath', 'NL8 MSC', 'NL8 Service Port 100G', 'SN8 AGGSP'];
3562
+ return jsxs(EuiPanel, Object.assign({
3563
+ hasShadow: false,
3564
+ color: "subdued",
3565
+ paddingSize: "l"
3566
+ }, {
3567
+ children: [jsx(EuiText, {
3568
+ children: jsx("b", {
3569
+ children: "Start a new process"
3570
+ })
3571
+ }), jsx(EuiSpacer, {
3572
+ size: "m"
3573
+ }), jsx(EuiFieldSearch, {
3574
+ fullWidth: true,
3575
+ placeholder: "Search and select process",
3576
+ value: value,
3577
+ onChange: e => onChange(e),
3578
+ "aria-label": "Search and select process"
3579
+ }), jsx(EuiSpacer, {
3580
+ size: "m"
3581
+ }), jsx(EuiTextColor, Object.assign({
3582
+ color: "subdued"
3583
+ }, {
3584
+ children: "Frequently used:"
3585
+ })), jsx(EuiSpacer, {
3586
+ size: "s"
3587
+ }), jsx(FrequentlyUsed, {
3588
+ values: frequentlyUsedValues
3589
+ })]
3590
+ }));
3591
+ };
3592
+
3593
+ const totalStats = [{
3594
+ icon: 'kubernetesPod',
3595
+ name: 'subscriptions',
3596
+ value: 24864,
3597
+ color: 'primary'
3598
+ }, {
3599
+ icon: 'error',
3600
+ name: 'processes failed',
3601
+ value: 462252,
3602
+ color: 'danger'
3603
+ }, {
3604
+ icon: 'checkInCircleFilled',
3605
+ name: 'processes completed',
3606
+ value: 1353632,
3607
+ color: 'success'
3608
+ }];
3609
+ const StatCards = () => {
3610
+ const [stats] = useState(totalStats);
3611
+ const {
3612
+ theme
3613
+ } = useOrchestratorTheme();
3614
+ return jsx(EuiFlexGroup, Object.assign({
3615
+ wrap: true
3616
+ }, {
3617
+ children: stats.map((stat, index) => jsx(EuiFlexItem, {
3618
+ children: jsx(EuiPanel, Object.assign({
3619
+ hasShadow: false,
3620
+ color: "subdued",
3621
+ paddingSize: "l"
3622
+ }, {
3623
+ children: jsxs(EuiFlexGroup, {
3624
+ children: [jsx(EuiFlexItem, Object.assign({
3625
+ grow: false
3626
+ }, {
3627
+ children: jsx(EuiAvatar, {
3628
+ iconSize: "l",
3629
+ size: "xl",
3630
+ type: "space",
3631
+ name: stat.name,
3632
+ style: {
3633
+ maxHeight: 55,
3634
+ maxWidth: 55
3635
+ },
3636
+ iconType: stat.icon,
3637
+ iconColor: theme.colors.ghost,
3638
+ color: theme.colors[stat.color]
3639
+ })
3640
+ })), jsxs(EuiFlexItem, {
3641
+ children: [jsx(EuiText, Object.assign({
3642
+ color: "subdued"
3643
+ }, {
3644
+ children: jsxs("h4", Object.assign({
3645
+ style: {
3646
+ fontWeight: 300
3647
+ }
3648
+ }, {
3649
+ children: ["Total ", stat.name]
3650
+ }))
3651
+ })), jsx(EuiText, {
3652
+ children: jsx("h2", Object.assign({
3653
+ style: {
3654
+ fontWeight: 500
3655
+ }
3656
+ }, {
3657
+ children: stat.value.toLocaleString('de-DE')
3658
+ }))
3659
+ })]
3660
+ })]
3661
+ })
3662
+ }))
3663
+ }, index))
3664
+ }));
3665
+ };
3666
+
3667
+ var $$3 = _export;
3668
+ var $includes = arrayIncludes.includes;
3669
+ var fails$4 = fails$i;
3670
+ var addToUnscopables = addToUnscopables$2;
3671
+
3672
+ // FF99+ bug
3673
+ var BROKEN_ON_SPARSE = fails$4(function () {
3674
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
3675
+ return !Array(1).includes();
3676
+ });
3677
+
3678
+ // `Array.prototype.includes` method
3679
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
3680
+ $$3({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
3681
+ includes: function includes(el /* , fromIndex = 0 */) {
3682
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
3683
+ }
3684
+ });
3685
+
3686
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3687
+ addToUnscopables('includes');
3688
+
3689
+ var isObject = isObject$9;
3690
+ var classof$1 = classofRaw$2;
3691
+ var wellKnownSymbol$1 = wellKnownSymbol$g;
3692
+
3693
+ var MATCH$1 = wellKnownSymbol$1('match');
3694
+
3695
+ // `IsRegExp` abstract operation
3696
+ // https://tc39.es/ecma262/#sec-isregexp
3697
+ var isRegexp = function (it) {
3698
+ var isRegExp;
3699
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
3700
+ };
3701
+
3702
+ var isRegExp = isRegexp;
3703
+
3704
+ var $TypeError$1 = TypeError;
3705
+
3706
+ var notARegexp = function (it) {
3707
+ if (isRegExp(it)) {
3708
+ throw $TypeError$1("The method doesn't accept regular expressions");
3709
+ } return it;
3710
+ };
3711
+
3712
+ var classof = classof$4;
3713
+
3714
+ var $String = String;
3715
+
3716
+ var toString$4 = function (argument) {
3717
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
3718
+ return $String(argument);
3719
+ };
3720
+
3721
+ var wellKnownSymbol = wellKnownSymbol$g;
3722
+
3723
+ var MATCH = wellKnownSymbol('match');
3724
+
3725
+ var correctIsRegexpLogic = function (METHOD_NAME) {
3726
+ var regexp = /./;
3727
+ try {
3728
+ '/./'[METHOD_NAME](regexp);
3729
+ } catch (error1) {
3730
+ try {
3731
+ regexp[MATCH] = false;
3732
+ return '/./'[METHOD_NAME](regexp);
3733
+ } catch (error2) { /* empty */ }
3734
+ } return false;
3735
+ };
3736
+
3737
+ var $$2 = _export;
3738
+ var uncurryThis$3 = functionUncurryThis;
3739
+ var notARegExp = notARegexp;
3740
+ var requireObjectCoercible$1 = requireObjectCoercible$4;
3741
+ var toString$3 = toString$4;
3742
+ var correctIsRegExpLogic = correctIsRegexpLogic;
3743
+
3744
+ var stringIndexOf = uncurryThis$3(''.indexOf);
3745
+
3746
+ // `String.prototype.includes` method
3747
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
3748
+ $$2({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
3749
+ includes: function includes(searchString /* , position = 0 */) {
3750
+ return !!~stringIndexOf(
3751
+ toString$3(requireObjectCoercible$1(this)),
3752
+ toString$3(notARegExp(searchString)),
3753
+ arguments.length > 1 ? arguments[1] : undefined
3754
+ );
3755
+ }
3756
+ });
3757
+
3758
+ const CheckmarkCircleFill = ({
3759
+ width: _width = 24,
3760
+ height: _height = 24,
3761
+ color: _color = '#000000'
3762
+ }) => jsxs("svg", Object.assign({
3763
+ width: _width,
3764
+ height: _height,
3765
+ viewBox: "0 0 24 24",
3766
+ version: "1.1",
3767
+ xmlns: "http://www.w3.org/2000/svg"
3768
+ }, {
3769
+ children: [jsx("title", {
3770
+ children: "icon/checkmark-circle-fill"
3771
+ }), jsx("g", Object.assign({
3772
+ id: "Symbols",
3773
+ stroke: "none",
3774
+ strokeWidth: "1",
3775
+ fill: "none",
3776
+ fillRule: "evenodd"
3777
+ }, {
3778
+ children: jsx("g", Object.assign({
3779
+ id: "icon/checkmark-circle-fill",
3780
+ fill: _color
3781
+ }, {
3782
+ children: jsx("path", {
3783
+ d: "M12,20 C16.4183,20 20,16.4183 20,12 C20,7.58172 16.4183,4 12,4 C7.58172,4 4,7.58172 4,12 C4,16.4183 7.58172,20 12,20 Z M15.7071,10.70711 C16.0976,10.31658 16.0976,9.68342 15.7071,9.29289 C15.3166,8.90237 14.6834,8.90237 14.2929,9.29289 L11,12.5858 L9.70711,11.29289 C9.31658,10.90237 8.68342,10.90237 8.29289,11.29289 C7.90237,11.68342 7.90237,12.3166 8.29289,12.7071 L10.29289,14.7071 C10.68342,15.0976 11.31658,15.0976 11.70711,14.7071 L15.7071,10.70711 Z",
3784
+ id: "Shape"
3785
+ })
3786
+ }))
3787
+ }))]
3788
+ }));
3789
+
3790
+ const MinusCircleOutline = ({
3791
+ width: _width = 24,
3792
+ height: _height = 24,
3793
+ color: _color = '#000000'
3794
+ }) => jsxs("svg", Object.assign({
3795
+ width: _width,
3796
+ height: _height,
3797
+ viewBox: "0 0 24 24",
3798
+ version: "1.1",
3799
+ xmlns: "http://www.w3.org/2000/svg"
3800
+ }, {
3801
+ children: [jsx("title", {
3802
+ children: "icon/minus-circle-outline"
3803
+ }), jsx("g", Object.assign({
3804
+ id: "Symbols",
3805
+ stroke: "none",
3806
+ strokeWidth: "1",
3807
+ fill: "none",
3808
+ fillRule: "evenodd"
3809
+ }, {
3810
+ children: jsx("g", Object.assign({
3811
+ id: "icon/minus-circle-outline",
3812
+ fill: _color,
3813
+ fillRule: "nonzero"
3814
+ }, {
3815
+ children: jsx("path", {
3816
+ d: "M12,4 C16.4183,4 20,7.58172 20,12 C20,16.4183 16.4183,20 12,20 C7.58172,20 4,16.4183 4,12 C4,7.58172 7.58172,4 12,4 Z M12,6 C8.6862895,6 6,8.6862895 6,12 C6,15.3137228 8.68628182,18 12,18 C15.3137305,18 18,15.3137305 18,12 C18,8.68628182 15.3137228,6 12,6 Z M15,11 C15.5523,11 16,11.44772 16,12 C16,12.5523 15.5523,13 15,13 L9,13 C8.44772,13 8,12.5523 8,12 C8,11.44772 8.44772,11 9,11 Z",
3817
+ id: "Combined-Shape"
3818
+ })
3819
+ }))
3820
+ }))]
3821
+ }));
3822
+
3823
+ const PlusCircleFill = ({
3824
+ width: _width = 24,
3825
+ height: _height = 24,
3826
+ color: _color = '#000000'
3827
+ }) => jsxs("svg", Object.assign({
3828
+ width: _width,
3829
+ height: _height,
3830
+ viewBox: "0 0 24 24",
3831
+ version: "1.1",
3832
+ xmlns: "http://www.w3.org/2000/svg"
3833
+ }, {
3834
+ children: [jsx("title", {
3835
+ children: "icon/plus-circle-fill"
3836
+ }), jsx("g", Object.assign({
3837
+ id: "Symbols",
3838
+ stroke: "none",
3839
+ strokeWidth: "1",
3840
+ fill: "none",
3841
+ fillRule: "evenodd"
3842
+ }, {
3843
+ children: jsx("g", Object.assign({
3844
+ id: "icon/plus-circle-fill",
3845
+ fill: _color
3846
+ }, {
3847
+ children: jsx("path", {
3848
+ d: "M12,20 C16.4183,20 20,16.4183 20,12 C20,7.58172 16.4183,4 12,4 C7.58172,4 4,7.58172 4,12 C4,16.4183 7.58172,20 12,20 Z M13,9 C13,8.44772 12.5523,8 12,8 C11.44772,8 11,8.44772 11,9 L11,11 L9,11 C8.44772,11 8,11.44771 8,12 C8,12.5523 8.44772,13 9,13 L11,13 L11,15 C11,15.5523 11.44772,16 12,16 C12.5523,16 13,15.5523 13,15 L13,13 L15,13 C15.5523,13 16,12.5523 16,12 C16,11.44772 15.5523,11 15,11 L13,11 L13,9 Z",
3849
+ id: "Shape"
3850
+ })
3851
+ }))
3852
+ }))]
3853
+ }));
3854
+
3855
+ const ChevronDown = ({
3856
+ width: _width = 24,
3857
+ height: _height = 24,
3858
+ color: _color = '#000000'
3859
+ }) => jsxs("svg", Object.assign({
3860
+ width: _width,
3861
+ height: _height,
3862
+ viewBox: "0 0 24 24",
3863
+ version: "1.1",
3864
+ xmlns: "http://www.w3.org/2000/svg"
3865
+ }, {
3866
+ children: [jsx("title", {
3867
+ children: "icon/chevron-down"
3868
+ }), jsx("g", Object.assign({
3869
+ id: "Symbols",
3870
+ stroke: "none",
3871
+ strokeWidth: "1",
3872
+ fill: "none",
3873
+ fillRule: "evenodd"
3874
+ }, {
3875
+ children: jsx("g", Object.assign({
3876
+ id: "icon/chevron-down",
3877
+ fill: _color
3878
+ }, {
3879
+ children: jsx("path", {
3880
+ d: "M7.29289,9.29289 C7.68342,8.90237 8.31658,8.90237 8.70711,9.29289 L12,12.5858 L15.2929,9.29289 C15.6834,8.90237 16.3166,8.90237 16.7071,9.29289 C17.0976,9.68342 17.0976,10.31658 16.7071,10.70711 L12.7071,14.7071 C12.3166,15.0976 11.68342,15.0976 11.29289,14.7071 L7.29289,10.70711 C6.90237,10.31658 6.90237,9.68342 7.29289,9.29289 Z",
3881
+ id: "Path"
3882
+ })
3883
+ }))
3884
+ }))]
3885
+ }));
3886
+
3887
+ const ArrowNarrowDown = ({
3888
+ width: _width = 16,
3889
+ height: _height = 20,
3890
+ color: _color = '#000000'
3891
+ }) => jsxs("svg", Object.assign({
3892
+ width: _width,
3893
+ height: _height,
3894
+ viewBox: "0 0 16 20",
3895
+ version: "1.1",
3896
+ xmlns: "http://www.w3.org/2000/svg"
3897
+ }, {
3898
+ children: [jsx("title", {
3899
+ children: "icon/arrow-narrow-down"
3900
+ }), jsx("g", Object.assign({
3901
+ id: "Symbols",
3902
+ stroke: "none",
3903
+ strokeWidth: "1",
3904
+ fill: "none",
3905
+ fillRule: "evenodd"
3906
+ }, {
3907
+ children: jsx("g", Object.assign({
3908
+ id: "icon/arrow-narrow-down",
3909
+ fill: _color
3910
+ }, {
3911
+ children: jsx("path", {
3912
+ d: "M4.29289,9.70711 C3.90237,9.31658 3.90237,8.68342 4.29289,8.29289 L7.29289,5.29289 C7.68342,4.90237 8.3166,4.90237 8.7071,5.29289 L11.7071,8.29289 C12.0976,8.68342 12.0976,9.31658 11.7071,9.70711 C11.3166,10.09763 10.6834,10.09763 10.2929,9.70711 L9,8.41421 L9,14 C9,14.5523 8.5523,15 8,15 C7.44772,15 7,14.5523 7,14 L7,8.41421 L5.70711,9.70711 C5.31658,10.09763 4.68342,10.09763 4.29289,9.70711 Z",
3913
+ id: "Path",
3914
+ transform: "translate(7.999988, 10.000000) rotate(-180.000000) translate(-7.999988, -10.000000) "
3915
+ })
3916
+ }))
3917
+ }))]
3918
+ }));
3919
+
3920
+ const ArrowNarrowUp = ({
3921
+ width: _width = 16,
3922
+ height: _height = 20,
3923
+ color: _color = '#000000'
3924
+ }) => jsxs("svg", Object.assign({
3925
+ width: _width,
3926
+ height: _height,
3927
+ viewBox: "0 0 16 20",
3928
+ version: "1.1",
3929
+ xmlns: "http://www.w3.org/2000/svg"
3930
+ }, {
3931
+ children: [jsx("title", {
3932
+ children: "icon/arrow-narrow-up"
3933
+ }), jsx("g", Object.assign({
3934
+ id: "Symbols",
3935
+ stroke: "none",
3936
+ strokeWidth: "1",
3937
+ fill: "none",
3938
+ fillRule: "evenodd"
3939
+ }, {
3940
+ children: jsx("g", Object.assign({
3941
+ id: "icon/arrow-narrow-up",
3942
+ fill: _color
3943
+ }, {
3944
+ children: jsx("path", {
3945
+ d: "M4.29289,9.70711 C3.90237,9.31658 3.90237,8.68342 4.29289,8.29289 L7.29289,5.29289 C7.68342,4.90237 8.3166,4.90237 8.7071,5.29289 L11.7071,8.29289 C12.0976,8.68342 12.0976,9.31658 11.7071,9.70711 C11.3166,10.09763 10.6834,10.09763 10.2929,9.70711 L9,8.41421 L9,14 C9,14.5523 8.5523,15 8,15 C7.44772,15 7,14.5523 7,14 L7,8.41421 L5.70711,9.70711 C5.31658,10.09763 4.68342,10.09763 4.29289,9.70711 Z",
3946
+ id: "Path"
3947
+ })
3948
+ }))
3949
+ }))]
3950
+ }));
3951
+
3952
+ var anObject$1 = anObject$c;
3953
+
3954
+ // `RegExp.prototype.flags` getter implementation
3955
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
3956
+ var regexpFlags = function () {
3957
+ var that = anObject$1(this);
3958
+ var result = '';
3959
+ if (that.hasIndices) result += 'd';
3960
+ if (that.global) result += 'g';
3961
+ if (that.ignoreCase) result += 'i';
3962
+ if (that.multiline) result += 'm';
3963
+ if (that.dotAll) result += 's';
3964
+ if (that.unicode) result += 'u';
3965
+ if (that.unicodeSets) result += 'v';
3966
+ if (that.sticky) result += 'y';
3967
+ return result;
3968
+ };
3969
+
3970
+ var call = functionCall;
3971
+ var hasOwn = hasOwnProperty_1;
3972
+ var isPrototypeOf = objectIsPrototypeOf;
3973
+ var regExpFlags = regexpFlags;
3974
+
3975
+ var RegExpPrototype$1 = RegExp.prototype;
3976
+
3977
+ var regexpGetFlags = function (R) {
3978
+ var flags = R.flags;
3979
+ return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
3980
+ ? call(regExpFlags, R) : flags;
3981
+ };
3982
+
3983
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
3984
+ var defineBuiltIn = defineBuiltIn$6;
3985
+ var anObject = anObject$c;
3986
+ var $toString = toString$4;
3987
+ var fails$3 = fails$i;
3988
+ var getRegExpFlags = regexpGetFlags;
3989
+
3990
+ var TO_STRING = 'toString';
3991
+ var RegExpPrototype = RegExp.prototype;
3992
+ var nativeToString = RegExpPrototype[TO_STRING];
3993
+
3994
+ var NOT_GENERIC = fails$3(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
3995
+ // FF44- RegExp#toString has a wrong name
3996
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
3997
+
3998
+ // `RegExp.prototype.toString` method
3999
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
4000
+ if (NOT_GENERIC || INCORRECT_NAME) {
4001
+ defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
4002
+ var R = anObject(this);
4003
+ var pattern = $toString(R.source);
4004
+ var flags = $toString(getRegExpFlags(R));
4005
+ return '/' + pattern + '/' + flags;
4006
+ }, { unsafe: true });
4007
+ }
4008
+
4009
+ var SortDirection;
4010
+ (function (SortDirection) {
4011
+ SortDirection["Asc"] = "ASC";
4012
+ SortDirection["Desc"] = "DESC";
4013
+ })(SortDirection || (SortDirection = {}));
4014
+ const getSortDirectionFromString = sortOrder => {
4015
+ if (!sortOrder) {
4016
+ return undefined;
4017
+ }
4018
+ switch (sortOrder.toUpperCase()) {
4019
+ case SortDirection.Asc.toString():
4020
+ return SortDirection.Asc;
4021
+ case SortDirection.Desc.toString():
4022
+ return SortDirection.Desc;
4023
+ default:
4024
+ return undefined;
4025
+ }
4026
+ };
4027
+
4028
+ const TableHeaderCell = ({
4029
+ sortDirection,
4030
+ children,
4031
+ onClick
4032
+ }) => jsxs("div", Object.assign({
4033
+ css: {
4034
+ display: 'flex',
4035
+ alignItems: 'center',
4036
+ cursor: 'pointer'
4037
+ },
4038
+ onClick: onClick
4039
+ }, {
4040
+ children: [jsx("div", {
4041
+ children: children
4042
+ }), sortDirection && jsx(SortDirectionIcon, {
4043
+ sortDirection: sortDirection
4044
+ })]
4045
+ }));
4046
+ const SortDirectionIcon = ({
4047
+ sortDirection
4048
+ }) => {
4049
+ const {
4050
+ theme
4051
+ } = useOrchestratorTheme();
4052
+ return sortDirection === SortDirection.Asc ? jsx(ArrowNarrowUp, {
4053
+ color: theme.colors.subduedText,
4054
+ height: 24,
4055
+ width: 24
4056
+ }) : jsx(ArrowNarrowDown, {
4057
+ color: theme.colors.subduedText,
4058
+ height: 24,
4059
+ width: 24
4060
+ });
4061
+ };
4062
+
4063
+ const Table = ({
4064
+ data,
4065
+ columns,
4066
+ hiddenColumns,
4067
+ dataSorting,
4068
+ pagination,
4069
+ isLoading,
4070
+ onCriteriaChange,
4071
+ onDataSort
4072
+ }) => jsx(EuiBasicTable, {
4073
+ tableCaption: "Demo of EuiBasicTable",
4074
+ items: data,
4075
+ rowHeader: "firstName",
4076
+ columns: mapTableColumnsToEuiColumns(columns, hiddenColumns, dataSorting, onDataSort),
4077
+ pagination: pagination,
4078
+ onChange: onCriteriaChange,
4079
+ loading: isLoading
4080
+ });
4081
+ function mapTableColumnsToEuiColumns(columns, hiddenColumns, dataSorting, onDataSort) {
4082
+ function isVisibleColumn(columnKey) {
4083
+ return !(hiddenColumns === null || hiddenColumns === void 0 ? void 0 : hiddenColumns.includes(columnKey));
4084
+ }
4085
+ function mapToEuiColumn(colKey) {
4086
+ const typedColumnKey = colKey;
4087
+ const column = columns[typedColumnKey];
4088
+ const {
4089
+ name
4090
+ } = column;
4091
+ const sortDirection = (dataSorting === null || dataSorting === void 0 ? void 0 : dataSorting.columnId) === colKey ? dataSorting.sortDirection : undefined;
4092
+ return Object.assign(Object.assign({}, column), {
4093
+ field: typedColumnKey,
4094
+ name: name && jsx(TableHeaderCell, Object.assign({
4095
+ sortDirection: sortDirection,
4096
+ onClick: () => onDataSort === null || onDataSort === void 0 ? void 0 : onDataSort(typedColumnKey)
4097
+ }, {
4098
+ children: name
4099
+ })),
4100
+ truncateText: true
4101
+ });
4102
+ }
4103
+ return Object.keys(columns).filter(isVisibleColumn).map(mapToEuiColumn);
4104
+ }
4105
+
4106
+ var tryToString = tryToString$5;
4107
+
4108
+ var $TypeError = TypeError;
4109
+
4110
+ var deletePropertyOrThrow$1 = function (O, P) {
4111
+ if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
4112
+ };
4113
+
4114
+ var toPropertyKey = toPropertyKey$3;
4115
+ var definePropertyModule = objectDefineProperty;
4116
+ var createPropertyDescriptor = createPropertyDescriptor$4;
4117
+
4118
+ var createProperty$1 = function (object, key, value) {
4119
+ var propertyKey = toPropertyKey(key);
4120
+ if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
4121
+ else object[propertyKey] = value;
4122
+ };
4123
+
4124
+ var toAbsoluteIndex = toAbsoluteIndex$2;
4125
+ var lengthOfArrayLike$1 = lengthOfArrayLike$4;
4126
+ var createProperty = createProperty$1;
4127
+
4128
+ var $Array = Array;
4129
+ var max = Math.max;
4130
+
4131
+ var arraySliceSimple = function (O, start, end) {
4132
+ var length = lengthOfArrayLike$1(O);
4133
+ var k = toAbsoluteIndex(start, length);
4134
+ var fin = toAbsoluteIndex(end === undefined ? length : end, length);
4135
+ var result = $Array(max(fin - k, 0));
4136
+ for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
4137
+ result.length = n;
4138
+ return result;
4139
+ };
4140
+
4141
+ var arraySlice = arraySliceSimple;
4142
+
4143
+ var floor = Math.floor;
4144
+
4145
+ var mergeSort = function (array, comparefn) {
4146
+ var length = array.length;
4147
+ var middle = floor(length / 2);
4148
+ return length < 8 ? insertionSort(array, comparefn) : merge(
4149
+ array,
4150
+ mergeSort(arraySlice(array, 0, middle), comparefn),
4151
+ mergeSort(arraySlice(array, middle), comparefn),
4152
+ comparefn
4153
+ );
4154
+ };
4155
+
4156
+ var insertionSort = function (array, comparefn) {
4157
+ var length = array.length;
4158
+ var i = 1;
4159
+ var element, j;
4160
+
4161
+ while (i < length) {
4162
+ j = i;
4163
+ element = array[i];
4164
+ while (j && comparefn(array[j - 1], element) > 0) {
4165
+ array[j] = array[--j];
4166
+ }
4167
+ if (j !== i++) array[j] = element;
4168
+ } return array;
4169
+ };
4170
+
4171
+ var merge = function (array, left, right, comparefn) {
4172
+ var llength = left.length;
4173
+ var rlength = right.length;
4174
+ var lindex = 0;
4175
+ var rindex = 0;
4176
+
4177
+ while (lindex < llength || rindex < rlength) {
4178
+ array[lindex + rindex] = (lindex < llength && rindex < rlength)
4179
+ ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
4180
+ : lindex < llength ? left[lindex++] : right[rindex++];
4181
+ } return array;
4182
+ };
4183
+
4184
+ var arraySort = mergeSort;
4185
+
4186
+ var fails$2 = fails$i;
4187
+
4188
+ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
4189
+ var method = [][METHOD_NAME];
4190
+ return !!method && fails$2(function () {
4191
+ // eslint-disable-next-line no-useless-call -- required for testing
4192
+ method.call(null, argument || function () { return 1; }, 1);
4193
+ });
4194
+ };
4195
+
4196
+ var userAgent$1 = engineUserAgent;
4197
+
4198
+ var firefox = userAgent$1.match(/firefox\/(\d+)/i);
4199
+
4200
+ var engineFfVersion = !!firefox && +firefox[1];
4201
+
4202
+ var UA = engineUserAgent;
4203
+
4204
+ var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
4205
+
4206
+ var userAgent = engineUserAgent;
4207
+
4208
+ var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
4209
+
4210
+ var engineWebkitVersion = !!webkit && +webkit[1];
4211
+
4212
+ var $$1 = _export;
4213
+ var uncurryThis$2 = functionUncurryThis;
4214
+ var aCallable = aCallable$9;
4215
+ var toObject = toObject$4;
4216
+ var lengthOfArrayLike = lengthOfArrayLike$4;
4217
+ var deletePropertyOrThrow = deletePropertyOrThrow$1;
4218
+ var toString$2 = toString$4;
4219
+ var fails$1 = fails$i;
4220
+ var internalSort = arraySort;
4221
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
4222
+ var FF = engineFfVersion;
4223
+ var IE_OR_EDGE = engineIsIeOrEdge;
4224
+ var V8 = engineV8Version;
4225
+ var WEBKIT = engineWebkitVersion;
4226
+
4227
+ var test = [];
4228
+ var nativeSort = uncurryThis$2(test.sort);
4229
+ var push = uncurryThis$2(test.push);
4230
+
4231
+ // IE8-
4232
+ var FAILS_ON_UNDEFINED = fails$1(function () {
4233
+ test.sort(undefined);
4234
+ });
4235
+ // V8 bug
4236
+ var FAILS_ON_NULL = fails$1(function () {
4237
+ test.sort(null);
4238
+ });
4239
+ // Old WebKit
4240
+ var STRICT_METHOD = arrayMethodIsStrict('sort');
4241
+
4242
+ var STABLE_SORT = !fails$1(function () {
4243
+ // feature detection can be too slow, so check engines versions
4244
+ if (V8) return V8 < 70;
4245
+ if (FF && FF > 3) return;
4246
+ if (IE_OR_EDGE) return true;
4247
+ if (WEBKIT) return WEBKIT < 603;
4248
+
4249
+ var result = '';
4250
+ var code, chr, value, index;
4251
+
4252
+ // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
4253
+ for (code = 65; code < 76; code++) {
4254
+ chr = String.fromCharCode(code);
4255
+
4256
+ switch (code) {
4257
+ case 66: case 69: case 70: case 72: value = 3; break;
4258
+ case 68: case 71: value = 4; break;
4259
+ default: value = 2;
4260
+ }
4261
+
4262
+ for (index = 0; index < 47; index++) {
4263
+ test.push({ k: chr + index, v: value });
4264
+ }
4265
+ }
4266
+
4267
+ test.sort(function (a, b) { return b.v - a.v; });
4268
+
4269
+ for (index = 0; index < test.length; index++) {
4270
+ chr = test[index].k.charAt(0);
4271
+ if (result.charAt(result.length - 1) !== chr) result += chr;
4272
+ }
4273
+
4274
+ return result !== 'DGBEFHACIJK';
4275
+ });
4276
+
4277
+ var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
4278
+
4279
+ var getSortCompare = function (comparefn) {
4280
+ return function (x, y) {
4281
+ if (y === undefined) return -1;
4282
+ if (x === undefined) return 1;
4283
+ if (comparefn !== undefined) return +comparefn(x, y) || 0;
4284
+ return toString$2(x) > toString$2(y) ? 1 : -1;
4285
+ };
4286
+ };
4287
+
4288
+ // `Array.prototype.sort` method
4289
+ // https://tc39.es/ecma262/#sec-array.prototype.sort
4290
+ $$1({ target: 'Array', proto: true, forced: FORCED$1 }, {
4291
+ sort: function sort(comparefn) {
4292
+ if (comparefn !== undefined) aCallable(comparefn);
4293
+
4294
+ var array = toObject(this);
4295
+
4296
+ if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
4297
+
4298
+ var items = [];
4299
+ var arrayLength = lengthOfArrayLike(array);
4300
+ var itemsLength, index;
4301
+
4302
+ for (index = 0; index < arrayLength; index++) {
4303
+ if (index in array) push(items, array[index]);
4304
+ }
4305
+
4306
+ internalSort(items, getSortCompare(comparefn));
4307
+
4308
+ itemsLength = lengthOfArrayLike(items);
4309
+ index = 0;
4310
+
4311
+ while (index < itemsLength) array[index] = items[index++];
4312
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
4313
+
4314
+ return array;
4315
+ }
4316
+ });
4317
+
4318
+ function getInitialColumnOrder(columns, initialColumnOrder) {
4319
+ const euiDataGridColumns = Object.keys(columns).map(colKey => {
4320
+ const column = columns[colKey];
4321
+ return Object.assign({
4322
+ id: colKey,
4323
+ isExpandable: false
4324
+ }, column);
4325
+ });
4326
+ const columnOrderIds = initialColumnOrder.map(columnId => columnId.toString());
4327
+ return euiDataGridColumns.slice().sort((left, right) => columnOrderIds.indexOf(left.id) - columnOrderIds.indexOf(right.id));
4328
+ }
4329
+ function columnSortToEuiDataGridSorting(columnSort, updateColumnSort) {
4330
+ return {
4331
+ columns: columnSort ? [{
4332
+ id: columnSort.columnId.toString(),
4333
+ direction: columnSort.sortDirection === SortDirection.Asc ? 'asc' : 'desc'
4334
+ }] : [],
4335
+ onSort: columns => {
4336
+ const lastSortData = columns.slice(-1)[0];
4337
+ if (updateColumnSort && lastSortData) {
4338
+ updateColumnSort({
4339
+ columnId: lastSortData.id,
4340
+ sortDirection: lastSortData.direction === 'asc' ? SortDirection.Asc : SortDirection.Desc
4341
+ });
4342
+ }
4343
+ }
4344
+ };
4345
+ }
4346
+
4347
+ // Total height of grid button bar, table header and pagination bar
4348
+ const EUI_DATA_GRID_HEIGHT_OFFSET = 103;
4349
+ const GRID_STYLE = {
4350
+ border: 'horizontal',
4351
+ stripes: false,
4352
+ rowHover: 'highlight',
4353
+ header: 'shade',
4354
+ cellPadding: 'l',
4355
+ fontSize: 'm',
4356
+ footer: 'overline'
4357
+ };
4358
+ const DataGridTable = ({
4359
+ data,
4360
+ pagination,
4361
+ columns,
4362
+ leadingControlColumns,
4363
+ trailingControlColumns,
4364
+ initialColumnOrder,
4365
+ dataSorting,
4366
+ handleRowClick,
4367
+ updateDataSorting
4368
+ }) => {
4369
+ const initialColumnOrderRef = useRef(getInitialColumnOrder(columns, initialColumnOrder));
4370
+ const defaultVisibleColumns = initialColumnOrder.filter(columnId => !columns[columnId].isHiddenByDefault).map(columnId => columnId.toString());
4371
+ const [visibleColumns, setVisibleColumns] = useState(defaultVisibleColumns);
4372
+ const renderCellValue = ({
4373
+ rowIndex,
4374
+ columnId,
4375
+ setCellProps
4376
+ }) => {
4377
+ const {
4378
+ pageSize,
4379
+ pageIndex
4380
+ } = pagination;
4381
+ const rowIndexOnPage = rowIndex - pageIndex * pageSize;
4382
+ const dataRow = data[rowIndexOnPage];
4383
+ if (!dataRow) {
4384
+ return;
4385
+ }
4386
+ const column = columns[columnId];
4387
+ const cellValue = dataRow[columnId];
4388
+ handleRowClick && setCellProps({
4389
+ css: {
4390
+ cursor: 'pointer'
4391
+ },
4392
+ onClick: () => handleRowClick(dataRow)
4393
+ });
4394
+ return column.renderCell ? column.renderCell(cellValue, dataRow) : `${cellValue}`;
4395
+ };
4396
+ const controlColumnToEuiDataGridControlColumnMapper = ({
4397
+ id,
4398
+ width,
4399
+ rowCellRender
4400
+ }) => ({
4401
+ id,
4402
+ width,
4403
+ headerCellRender: props => null,
4404
+ rowCellRender: ({
4405
+ rowIndex
4406
+ }) => {
4407
+ const {
4408
+ pageSize,
4409
+ pageIndex
4410
+ } = pagination;
4411
+ const rowIndexOnPage = rowIndex - pageIndex * pageSize;
4412
+ const dataRow = data[rowIndexOnPage];
4413
+ return rowCellRender(dataRow);
4414
+ }
4415
+ });
4416
+ const euiDataGridLeadingControlColumns = leadingControlColumns === null || leadingControlColumns === void 0 ? void 0 : leadingControlColumns.map(controlColumnToEuiDataGridControlColumnMapper);
4417
+ const euiDataGridTrailingControlColumns = trailingControlColumns === null || trailingControlColumns === void 0 ? void 0 : trailingControlColumns.map(controlColumnToEuiDataGridControlColumnMapper);
4418
+ const gridHeightValue = pagination.pageSize * 40 + EUI_DATA_GRID_HEIGHT_OFFSET;
4419
+ return jsx(EuiDataGrid, {
4420
+ "aria-label": "Data Grid",
4421
+ columns: initialColumnOrderRef.current,
4422
+ leadingControlColumns: euiDataGridLeadingControlColumns,
4423
+ trailingControlColumns: euiDataGridTrailingControlColumns,
4424
+ height: `${gridHeightValue}px`,
4425
+ gridStyle: GRID_STYLE,
4426
+ columnVisibility: {
4427
+ visibleColumns,
4428
+ setVisibleColumns
4429
+ },
4430
+ pagination: pagination,
4431
+ sorting: columnSortToEuiDataGridSorting(dataSorting, updateDataSorting),
4432
+ rowCount: pagination.totalRecords,
4433
+ renderCellValue: renderCellValue
4434
+ });
4435
+ };
4436
+
4437
+ const defaultOrchestratorTheme = {
4438
+ colors: {
4439
+ DARK: {},
4440
+ LIGHT: {
4441
+ primary: '#0077C8',
4442
+ accent: '#E67300',
4443
+ success: '#008939',
4444
+ warning: '#FFC514',
4445
+ danger: '#BD271F',
4446
+ primaryText: '#0067AC',
4447
+ accentText: '#B05200',
4448
+ successText: '#007832',
4449
+ warningText: '#8E6A00',
4450
+ dangerText: '#AC0A01',
4451
+ emptyShade: '#FFFFFF',
4452
+ lightestShade: '#F1F5F9',
4453
+ lightShade: '#CCD5E2',
4454
+ mediumShade: '#94A4B8',
4455
+ darkShade: '#64758B',
4456
+ darkestShade: '#334255',
4457
+ fullShade: '#0F172B',
4458
+ text: '#334255',
4459
+ title: '#0F172B',
4460
+ subduedText: '#64758B',
4461
+ link: '#0067AC',
4462
+ body: '#F1F5F9',
4463
+ highlight: '#FFF6DE',
4464
+ disabled: '#94A4B8',
4465
+ disabledText: '#94A4B8',
4466
+ shadow: '#000000'
4467
+ }
4468
+ },
4469
+ font: {
4470
+ weight: {
4471
+ regular: 400,
4472
+ medium: 500,
4473
+ semiBold: 600,
4474
+ bold: 700
4475
+ }
4476
+ }
4477
+ };
4478
+
4479
+ // a string of all valid unicode whitespaces
4480
+ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
4481
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
4482
+
4483
+ var uncurryThis$1 = functionUncurryThis;
4484
+ var requireObjectCoercible = requireObjectCoercible$4;
4485
+ var toString$1 = toString$4;
4486
+ var whitespaces$1 = whitespaces$2;
4487
+
4488
+ var replace = uncurryThis$1(''.replace);
4489
+ var ltrim = RegExp('^[' + whitespaces$1 + ']+');
4490
+ var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
4491
+
4492
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
4493
+ var createMethod = function (TYPE) {
4494
+ return function ($this) {
4495
+ var string = toString$1(requireObjectCoercible($this));
4496
+ if (TYPE & 1) string = replace(string, ltrim, '');
4497
+ if (TYPE & 2) string = replace(string, rtrim, '$1');
4498
+ return string;
4499
+ };
4500
+ };
4501
+
4502
+ var stringTrim = {
4503
+ // `String.prototype.{ trimLeft, trimStart }` methods
4504
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
4505
+ start: createMethod(1),
4506
+ // `String.prototype.{ trimRight, trimEnd }` methods
4507
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
4508
+ end: createMethod(2),
4509
+ // `String.prototype.trim` method
4510
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
4511
+ trim: createMethod(3)
4512
+ };
4513
+
4514
+ var global$1 = global$i;
4515
+ var fails = fails$i;
4516
+ var uncurryThis = functionUncurryThis;
4517
+ var toString = toString$4;
4518
+ var trim = stringTrim.trim;
4519
+ var whitespaces = whitespaces$2;
4520
+
4521
+ var $parseInt$1 = global$1.parseInt;
4522
+ var Symbol$1 = global$1.Symbol;
4523
+ var ITERATOR = Symbol$1 && Symbol$1.iterator;
4524
+ var hex = /^[+-]?0x/i;
4525
+ var exec = uncurryThis(hex.exec);
4526
+ var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
4527
+ // MS Edge 18- broken with boxed symbols
4528
+ || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
4529
+
4530
+ // `parseInt` method
4531
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
4532
+ var numberParseInt = FORCED ? function parseInt(string, radix) {
4533
+ var S = trim(toString(string));
4534
+ return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
4535
+ } : $parseInt$1;
4536
+
4537
+ var $ = _export;
4538
+ var $parseInt = numberParseInt;
4539
+
4540
+ // `parseInt` method
4541
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
4542
+ $({ global: true, forced: parseInt != $parseInt }, {
4543
+ parseInt: $parseInt
4544
+ });
4545
+
4546
+ const parseDate = date => {
4547
+ if (date === null || date === '') {
4548
+ return null;
4549
+ }
4550
+ return new Date(parseInt(date) * 1000);
4551
+ };
4552
+
4553
+ const getStatusBadgeColor = status => {
4554
+ const statusColors = {
4555
+ terminated: 'danger',
4556
+ active: 'success',
4557
+ provisioning: 'primary',
4558
+ migrating: 'primary',
4559
+ initial: 'danger'
4560
+ };
4561
+ // eslint-disable-next-line no-prototype-builtins
4562
+ return statusColors.hasOwnProperty(status) ?
4563
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
4564
+ // @ts-ignore
4565
+ statusColors[status] : 'primary';
4566
+ };
4567
+
4568
+ function getTypedFieldFromObject(field, object) {
4569
+ if (!Object.keys(object).includes(field)) {
4570
+ return null;
4571
+ }
4572
+ return field;
4573
+ }
4574
+
4575
+ export { ArrowNarrowDown, ArrowNarrowUp, Badge, CheckmarkCircleFill, ChevronDown, DataGridTable, EngineStatusBadge, Environment, EnvironmentBadge, FailedTasksBadge, FrequentlyUsed, HeaderBadge, ListItemStartPage, LogoutIcon, MinusCircleOutline, MultiListSection, NewProcessPanel, OrchestratorConfigContext, OrchestratorConfigProvider, OrchestratorPageHeader, OrchestratorPageTemplate, OrchestratorSidebar, PlusCircleFill, ProcessStatus, SortDirection, SortDirectionIcon, StatCards, StatusDotIcon, SubscriptionStatusBadge, Table, TableHeaderCell, XCircleFill, columnSortToEuiDataGridSorting, defaultOrchestratorTheme, getInitialColumnOrder, getSortDirectionFromString, getStatusBadgeColor, getTypedFieldFromObject, parseDate, useEngineStatusQuery, useFavouriteSubscriptions, useOrchestratorConfig, useOrchestratorTheme, useProcessStatusCountsQuery, useProcessesAttention, useQueryWithGraphql, useRecentProcesses, useStringQueryWithGraphql };